PageSourceSearch

https://www.smartlever.ai/_next/static/chunks/06c~y_nn4xk6u.js?dpl=dpl_GmWAiNuEUAj1YXdyV2adH9EEtkri

js smartlever.ai collected 2026-10-05 12:39:25 UTC 99,978 bytes, 12 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21385,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(57688),o=e.i(46932),i=e.i(47163),a=e.i(11871);let s={headline:"Do more work with the same team",subcopy:"SmartLever Solutions helps field service businesses increase profitability without adding office headcount by building and operating AI automations.",ctaLabel:a.HOMEPAGE_PRIMARY_CTA_LABEL};var l=e.i(55596),u=e.i(15754);let c=[.33,1,.68,1];function d(){let[e,a]=(0,n.useState)(!1),[d,f]=(0,n.useState)(!1);return(0,t.jsxs)("section",{id:"hero",className:(0,i.cn)("relative flex min-h-[80vh] w-full flex-col justify-start overflow-hidden md:min-h-[85vh]","pt-16 pb-20 md:pt-24 md:pb-24"),"aria-label":"Hero",children:[!e&&(0,t.jsx)("div",{className:"absolute inset-0 md:hidden",children:(0,t.jsx)(r.default,{src:"/images/hero-background-mobile.png",alt:"",fill:!0,className:"object-cover object-center",sizes:"(max-width: 767px) 100vw, 1px",priority:!0,onError:()=>a(!0)})}),!d&&(0,t.jsx)("div",{className:"absolute inset-0 hidden md:block",children:(0,t.jsx)(r.default,{src:"/images/hero-background.png",alt:"",fill:!0,className:"object-cover object-[70%_center]",sizes:"(min-width: 768px) 100vw, 1px",priority:!0,onError:()=>f(!0)})}),(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"radial-gradient(rgba(23,37,66,1) 1px, transparent 1px)",backgroundSize:"32px 32px"},"aria-hidden":!0}),(0,t.jsx)("div",{className:"relative z-10 mx-auto w-full max-w-6xl px-6 md:px-8",children:(0,t.jsxs)("div",{className:"max-w-[310px] sm:max-w-[420px] md:max-w-[540px] lg:max-w-[660px]",children:[(0,t.jsx)(o.motion.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.55,ease:c,delay:.08},children:(0,t.jsx)(l.FoundingPartnerSpots,{animateCountdown:!0})}),(0,t.jsx)(o.motion.h1,{initial:!1,animate:{opacity:1,y:0},transition:{duration:.65,ease:c,delay:.12},className:"mt-3 font-heading text-4xl font-bold leading-none tracking-tighter text-text md:text-5xl lg:text-6xl",children:s.headline}),(0,t.jsx)(o.motion.p,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},transition:{duration:.6,ease:c,delay:.26},className:"mt-5 max-w-[17rem] text-pretty text-base leading-relaxed text-text/75 sm:max-w-sm md:max-w-[480px] md:text-lg",children:s.subcopy}),(0,t.jsx)(o.motion.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.55,ease:c,delay:.4},className:"mt-8 flex flex-col gap-3 sm:flex-row sm:items-center",children:(0,t.jsx)(u.BookConsultationButton,{ctaId:"book_discovery_call_hero",label:s.ctaLabel})}),(0,t.jsx)(o.motion.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.55,ease:c,delay:.52},className:"mt-6",children:(0,t.jsx)(l.FoundingPartnerCountdownLine,{className:"max-w-md text-base md:text-base"})})]})})]})}var f=e.i(22016),p=e.i(3833),m=e.i(52677),h=e.i(91090),g=e.i(96835);function x({title:e}){return(0,t.jsxs)("div",{className:"flex size-full max-w-[18rem] flex-col items-center justify-center rounded-2xl border border-dashed border-background/25 bg-background/[0.04] px-6 py-8",children:[(0,t.jsx)("div",{className:"flex size-12 items-center justify-center rounded-xl bg-accent/10 ring-1 ring-accent/20",children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:"text-accent",children:[(0,t.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.5"}),(0,t.jsx)("path",{d:"M3 14L8 10L12 13L16 9L21 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("circle",{cx:"8",cy:"9",r:"1",fill:"currentColor"})]})}),(0,t.jsx)("p",{className:"mt-4 text-center text-sm font-medium text-background/50",children:"Preview image"}),(0,t.jsx)("p",{className:"mt-1 text-center text-xs text-background/35",children:e})]})}function v({solution:e}){let[o,i]=(0,n.useState)(!1);return!e.previewImagePath||o?(0,t.jsx)(x,{title:e.title}):(0,t.jsx)(r.default,{src:e.previewImagePath,alt:e.previewImageAlt??e.title,width:480,height:288,className:"max-h-full w-auto object-contain",onError:()=>i(!0)})}let y=(0,i.cn)("group relative flex h-full flex-col overflow-hidden rounded-2xl border border-primary/[0.08] bg-white","transition-[box-shadow,transform] duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)]","hover:-translate-y-0.5 hover:shadow-[0_12px_32px_rgba(23,37,66,0.08)]","motion-reduce:transition-none motion-reduce:hover:translate-y-0","has-[a:focus-visible]:ring-2 has-[a:focus-visible]:ring-accent has-[a:focus-visible]:ring-offset-2");function b({solution:e}){var n;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative flex aspect-[5/3] items-center justify-center overflow-hidden bg-[#172542]",children:[(0,t.jsx)(h.CardGridBackgroun
1d,{tone:"dark"}),(0,t.jsx)("div",{className:"relative z-10 flex size-full items-center justify-center p-8",children:(0,t.jsx)(v,{solution:e})})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col p-6",children:[(0,t.jsx)("h3",{className:"font-heading text-lg font-bold leading-snug text-primary",children:(0,t.jsx)(f.default,{href:(n=e.slug,`/solutions/${n}`),onClick:()=>(0,g.trackCtaClick)(`solution_card_${e.slug.replace(/-/g,"_")}`),className:"after:absolute after:inset-0 after:z-20 after:content-[''] focus:outline-none",children:e.title})}),(0,t.jsx)("p",{className:"mt-2 flex-1 text-sm leading-relaxed text-text/70",children:e.summary})]})]})}function w({solution:e}){return(0,t.jsx)("article",{className:y,children:(0,t.jsx)(b,{solution:e})})}function E({solutions:e,className:n}){return(0,t.jsx)(m.StaggerReveal,{className:(0,i.cn)("mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-8",n),children:e.map(e=>(0,t.jsx)(w,{solution:e},e.id))})}var k=e.i(44124);let S={title:"Automate it all",description:"Automate the work that slips through the cracks.",fallbackPrompt:"Book a consultation to see how we can use these automations, and more, within your business.",ctaLabel:a.HOMEPAGE_PRIMARY_CTA_LABEL};function j(){let e=(0,k.getHomepageSolutionsGrid)();return 0===e.length?null:(0,t.jsxs)(p.SectionWrapper,{id:"solutions",variant:"surface",children:[(0,t.jsxs)(m.ScrollReveal,{className:"max-w-2xl space-y-4",children:[(0,t.jsx)("h2",{className:"font-heading text-3xl font-bold tracking-tight text-primary md:text-4xl",children:S.title}),(0,t.jsx)("p",{className:"text-base leading-relaxed text-text/70",children:S.description})]}),(0,t.jsx)(E,{solutions:e}),(0,t.jsxs)(m.ScrollReveal,{className:"mt-12 flex flex-col items-center gap-5 text-center md:mt-16",children:[(0,t.jsx)("p",{className:"text-base leading-relaxed text-text/70",children:S.fallbackPrompt}),(0,t.jsxs)(f.default,{href:a.BOOK_CONSULTATION_PATH,onClick:()=>(0,g.trackCtaClick)("book_discovery_call_solutions_preview"),className:(0,i.cn)("group relative flex items-center gap-2 rounded-full px-6 py-3.5 font-sans text-sm font-semibold text-background","bg-accent shadow-[0_4px_20px_rgba(28,152,211,0.35)]","transition-all duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)]","hover:bg-[#1a88be] hover:shadow-[0_6px_28px_rgba(28,152,211,0.45)]","active:scale-[0.97]","focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2"),children:[S.ctaLabel,(0,t.jsx)("span",{className:"flex size-7 items-center justify-center rounded-full bg-white/20 transition-transform duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-0.5",children:(0,t.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M2 5.5L7.5 5.5M7 4L9 5.5L7 7",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]})}var C=e.i(31680),R=e.i(7618);function N(){let[e]=(0,k.getFeaturedTestimonials)();return e?(0,t.jsxs)("section",{id:"testimonials",className:"relative w-full overflow-hidden bg-[#172542]",children:[(0,t.jsx)(C.PrimaryBandBackground,{}),(0,t.jsx)("div",{className:"relative z-10 mx-auto w-full max-w-[72rem] px-6 md:px-8",children:(0,t.jsx)(R.Testimonial,{inverted:!0,quote:e.quote,authorName:e.authorName||void 0,authorPosition:e.authorPosition,highlightedText:e.highlightedText,companyLogo:e.companyLogo,authorImage:e.authorImage,className:"py-20 md:py-28"})})]}):null}function T(){return(0,t.jsxs)("section",{id:"problem",className:"relative w-full overflow-hidden bg-[#172542]",children:[(0,t.jsx)(C.PrimaryBandBackground,{}),(0,t.jsx)("div",{className:"relative z-10 mx-auto w-full max-w-[72rem] px-6 pt-20 pb-12 md:px-8 md:pt-28 md:pb-16",children:(0,t.jsxs)(m.ScrollReveal,{className:"mx-auto flex max-w-3xl flex-col items-center text-center",children:[(0,t.jsx)("h2",{className:"font-heading text-3xl font-bold tracking-tight text-background md:text-4xl",children:"Office staff are expensive"}),(0,t.jsx)("p",{className:"mx-auto mt-5 max-w-2xl text-base leading-relaxed text-background/65",children:"Your growing business can't afford to hire more office staff, so you and your team end up absorbing the extra work while your business loses profitability."}),(0,t.jsx)("div",{className:"relative mt-14 w-full max-w-2xl overflow-hidden rounded-xl md:mt-16",children:(0,t.jsx)(r.default,{src:"/images/problem.png",alt:"Timeline from job c
1ompleted on Monday to invoice sent two months later, with nobody has time in between",width:960,height:540,className:"h-auto w-full object-cover",sizes:"(max-width: 768px) 100vw, 672px"})}),(0,t.jsx)("p",{className:"mt-10 font-heading text-xl font-semibold tracking-tight text-background md:mt-12 md:text-2xl",children:"There's another way"}),(0,t.jsx)("div",{className:"relative mx-auto mt-8 h-[30px] w-[75px] md:mt-10 md:h-10 md:w-[100px]",children:(0,t.jsx)(r.default,{src:"/images/problem_arrow.png",alt:"",fill:!0,className:"object-contain",sizes:"100px"})})]})})]})}function O({children:e,className:n}){return(0,t.jsx)("div",{className:n??"p-[2px] bg-gradient-to-br from-accent/35 via-primary/15 to-accent/15",children:(0,t.jsx)("div",{className:"h-full overflow-hidden bg-background/90 shadow-[inset_0_1px_1px_rgba(255,255,255,0.9),0_8px_32px_rgba(28,152,211,0.10)] backdrop-blur-sm",children:e})})}var L=e.i(75254);let M=(0,L.default)("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]),A=(0,L.default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),I=(0,L.default)("handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]),P={"clear-queue":(0,L.default)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]),"finds-slipped-work":(0,L.default)("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),"platform-gets-smarter":M,"partner-with-you":I,"tracks-recovery":A};function _({highlightId:e}){let n=P[e];return(0,t.jsx)("div",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg bg-primary text-background",children:(0,t.jsx)(n,{className:"size-5",strokeWidth:1.5,"aria-hidden":!0})})}let D={title:"Let us handle it",body:"We find the processes that are quietly costing your business money, then automate them to help you increase productivity and profitability without adding another salary to your payroll.",ctaLabel:a.HOMEPAGE_PRIMARY_CTA_LABEL,platformImageAlt:"Client dashboard on the SmartLever platform showing drafted back-office actions awaiting team sign-off",platformImagePath:"/images/platform_dashboard.png",highlights:[{id:"partner-with-you",text:"We partner with you to automate your processes and continuously deliver results."},{id:"finds-slipped-work",text:"Work that's directly costing your business money gets caught and handled before it's forgotten."},{id:"platform-gets-smarter",text:"As your team approves work, our platform learns about your business and delivers more accurate automations."},{id:"clear-queue",text:"Your team starts every morning with a clear queue of drafted actions ready for approval."},{id:"tracks-recovery",text:"Custom dashboards track your profitability metrics so you always know what is moving and what it is worth to your business."}]};function W({text:e,highlightId:n,className:r}){return(0,t.jsxs)("div",{className:(0,i.cn)("flex flex-col items-center gap-3 text-center",r),children:[(0,t.jsx)(_,{highlightId:n}),(0,t.jsx)("p",{className:"max-w-sm text-sm leading-relaxed text-text/65 md:max-w-[18rem] lg:max-w-[20rem]",children:e})]})}function B(){return(0,t.jsxs)("div",{className:"flex aspect-[4/3] w-full flex-col items-center justify-center gap-3 bg-gradient-to-br from-primary/[0.04] via-background to-accent/[0.06] p-8",children:[(0,t.jsx)("div",{className:"flex size-12 items-center justify-center rounded-xl bg-accent/10 ring-1 ring-accent/20",children:(0,t.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,
1className:"text-accent",children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.5"}),(0,t.jsx)("path",{d:"M3 9H21",stroke:"currentColor",strokeWidth:"1.5"}),(0,t.jsx)("circle",{cx:"7",cy:"6.5",r:"0.75",fill:"currentColor"}),(0,t.jsx)("circle",{cx:"9.5",cy:"6.5",r:"0.75",fill:"currentColor"})]})}),(0,t.jsx)("p",{className:"max-w-[14rem] text-center text-sm font-medium text-text/50",children:"How we deliver"})]})}function z(){let[e,o]=(0,n.useState)(!1);return e?(0,t.jsx)(B,{}):(0,t.jsx)(r.default,{src:D.platformImagePath,alt:D.platformImageAlt,width:800,height:600,className:"h-auto w-full object-cover",onError:()=>o(!0)})}function H(){return(0,t.jsxs)(f.default,{href:a.BOOK_CONSULTATION_PATH,onClick:()=>(0,g.trackCtaClick)("book_discovery_call_solution"),className:(0,i.cn)("group relative flex w-fit items-center gap-2 rounded-full px-6 py-3.5 font-sans text-sm font-semibold text-background","bg-accent shadow-[0_4px_20px_rgba(28,152,211,0.35)]","transition-all duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)]","hover:bg-[#1a88be] hover:shadow-[0_6px_28px_rgba(28,152,211,0.45)]","active:scale-[0.97]","focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2"),children:[D.ctaLabel,(0,t.jsx)("span",{className:"flex size-7 items-center justify-center rounded-full bg-white/20 transition-transform duration-300 [transition-timing-function:cubic-bezier(0.32,0.72,0,1)] group-hover:translate-x-0.5",children:(0,t.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M2 5.5L7.5 5.5M7 4L9 5.5L7 7",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function F(){let[e,n,r,o,i]=D.highlights;return(0,t.jsx)(p.SectionWrapper,{id:"solution",variant:"surface",children:(0,t.jsxs)(m.ScrollReveal,{className:"flex flex-col",children:[(0,t.jsxs)("header",{className:"mx-auto max-w-3xl text-center",children:[(0,t.jsx)("h2",{className:"font-heading text-3xl font-bold tracking-tight text-text md:text-4xl",children:D.title}),(0,t.jsx)("p",{className:"-mx-2 mt-5 max-w-[calc(100%+1rem)] text-base leading-relaxed text-text/65 sm:mx-auto sm:max-w-md md:max-w-2xl md:text-lg",children:D.body})]}),(0,t.jsxs)("div",{className:"mt-12 grid grid-cols-1 items-center gap-10 md:mt-16 md:grid-cols-[1fr_minmax(17.5rem,26.25rem)_1fr] md:grid-rows-2 md:gap-x-10 md:gap-y-14 lg:gap-x-14",children:[(0,t.jsx)("div",{className:"mx-auto w-full max-w-md md:col-start-2 md:row-span-2 md:row-start-1 md:max-w-none",children:(0,t.jsx)(O,{children:(0,t.jsx)(z,{})})}),(0,t.jsx)(W,{text:e.text,highlightId:e.id,className:"md:col-start-1 md:row-start-1 md:justify-self-center"}),(0,t.jsx)(W,{text:n.text,highlightId:n.id,className:"md:col-start-3 md:row-start-1 md:justify-self-center"}),(0,t.jsx)(W,{text:r.text,highlightId:r.id,className:"md:col-start-1 md:row-start-2 md:justify-self-center"}),(0,t.jsx)(W,{text:o.text,highlightId:o.id,className:"md:col-start-3 md:row-start-2 md:justify-self-center"})]}),(0,t.jsx)(W,{text:i.text,highlightId:i.id,className:"mx-auto mt-10 md:mt-12"}),(0,t.jsx)("div",{className:"mt-10 flex justify-center md:mt-12",children:(0,t.jsx)(H,{})})]})})}var q=e.i(51804);let V=(0,L.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),Y=(0,L.default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
1],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),U=(0,L.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),$=[{id:"consultation",title:"Free consultation",body:"Leave knowing where work is slipping and what to fix first."},{id:"dashboard",title:"Free dashboard",body:"See where manual work and margin leaks are costing you at a glance."},{id:"service-hours",title:"Service hours",body:"Close the gaps you found with dashboards and automations."},{id:"managed-automations",title:"Managed automations",body:"We keep managing your systems\nso recovered margin keeps growing."}],K=[q.CalendarCheck,V,U,Y];function G(){return(0,t.jsxs)("section",{id:"how-we-work",className:"relative w-full overflow-hidden bg-[#172542]",children:[(0,t.jsx)(C.PrimaryBandBackground,{}),(0,t.jsxs)("div",{className:"relative z-10 mx-auto w-full max-w-[72rem] px-6 py-20 md:px-8 md:py-28",children:[(0,t.jsxs)(m.ScrollReveal,{className:"mx-auto max-w-3xl text-center",children:[(0,t.jsx)("h2",{className:"font-heading text-3xl font-bold tracking-tight text-background md:text-4xl",children:"How we work"}),(0,t.jsx)("p",{className:"mx-auto mt-4 max-w-2xl text-base leading-relaxed text-background/65",children:"Our ROI-first approach starts with a free consultation and dashboard so you know what processes are costing your business money and the return you'll get from working with us. We only move forward once you know you'll recover more than you'll pay us."})]}),(0,t.jsxs)("div",{className:"relative mx-auto mt-14 w-full max-w-6xl",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute left-[8%] right-[8%] top-7 hidden h-0.5 bg-gradient-to-r from-transparent via-white/25 to-transparent md:block","aria-hidden":!0}),(0,t.jsx)(m.StaggerReveal,{className:"grid grid-cols-1 gap-10 md:grid-cols-4 md:gap-6 [&>*]:min-w-0",children:$.map((e,n)=>{let r=K[n];return(0,t.jsxs)("div",{className:"relative flex flex-col items-center text-center",children:[(0,t.jsx)("div",{className:"relative z-10 flex size-14 shrink-0 items-center justify-center rounded-full bg-accent text-background shadow-[0_4px_16px_rgba(28,152,211,0.35)] ring-4 ring-[#172542]",children:(0,t.jsx)(r,{className:"size-6",strokeWidth:1.75,"aria-hidden":!0})}),(0,t.jsx)("h3",{className:"mt-4 font-heading text-base font-bold text-background md:text-lg",children:e.title}),(0,t.jsx)("p",{className:"mt-2 whitespace-pre-line text-sm leading-relaxed text-background/65",children:e.body})]},e.id)})})]})]})]})}let X=[{id:"servicetitan",name:"ServiceTitan",imagePath:"/images/integrations/servicetitan_logo.png"},{id:"aspire",name:"Aspire",imagePath:"/images/integrations/aspire_logo.png"},{id:"google-workspace",name:"Google Workspace",imagePath:"/images/integrations/google_workspace_logo.png",imageClassName:"brightness-[0.5] contrast-[1.35]"},{id:"microsoft-365",name:"Microsoft 365",imagePath:"/images/integrations/microsoft_365_logo.png"},{id:"quickbooks",name:"QuickBooks",imagePath:"/images/integrations/quickbooks_logo.png"},{id:"gusto",name:"Gusto",imagePath:"/images/integrations/gusto_logo.png"},{id:"adp",name:"ADP",imagePath:"/images/integrations/adp_logo.png"}];var Z=e.i(96351);function J(){return(0,t.jsx)("section",{id:"integrations",className:"relative w-full overflow-hidden bg-background",children:(0,t.jsx)("div",{className:"relative z-10 mx-auto w-full max-w-[72rem] px-6 py-20 md:px-8 md:py-28",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-16 md:gap-20",children:[(0,t.jsx)(m.ScrollReveal,{className:"w-full text-center",children:(0,t.jsx)("h2",{className:"font-heading text-lg font-medium tracking-tight text-primary",children:"Integrate with the software you already use"})}),(0,t.jsx)(Z.LogoCloud,{logos:X.map(e=>({src:e.imagePath,alt:`${e.name} logo`,fallbackLabel:e.name,muted:!0,imageClassName:e.imageClassName})),className:"w-full"})]})})})}let Q=(0,L.default)("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}
1],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]),ee=(0,L.default)("clipboard-check",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]),et=(0,L.default)("hard-hat",[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]]),en=(0,L.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),er=(0,L.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),eo=(0,L.default)("trees",[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]]),ei=(0,L.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);function ea({items:e,tone:n="light",className:r}){let o="dark"===n;return(0,t.jsx)("ul",{className:(0,i.cn)("relative mx-auto grid max-w-2xl auto-rows-fr border-l-2 border-t-2 *:border-b-2 *:border-r-2 *:p-12 sm:grid-cols-2 lg:max-w-4xl lg:grid-cols-3",o?"border-background/10 *:border-background/10":"border-border *:border-border",r),children:e.map(({id:e,icon:n,title:r,description:a})=>(0,t.jsxs)("li",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n,{className:(0,i.cn)("size-4 shrink-0",o?"text-accent":"text-primary"),"aria-hidden":!0}),(0,t.jsx)("h3",{className:(0,i.cn)("text-sm font-medium",o?"text-background":"text-primary"),children:r})]}),(0,t.jsx)("p",{className:(0,i.cn)("text-sm",o?"text-background/60":"text-text/70"),children:a})]},e))})}var es=e.i(27692);let el={"building-systems":Q,"exteriors-and-restoration":en,"property-and-grounds":eo,"equipment-and-inspection":ee,"specialty-contractors":et,"security-and-facilities":er};function eu(){return(0,t.jsxs)("section",{id:"who-its-for",className:"relative w-full overflow-hidden bg-[#172542]",children:[(0,t.jsx)(C.PrimaryBandBackground,{}),(0,t.jsxs)("div",{className:"relative z-10 mx-auto w-full max-w-[72rem] px-6 py-20 md:px-8 md:py-28",children:[(0,t.jsxs)(m.ScrollReveal,{className:"mx-auto max-w-3xl text-center",children:[(0,t.jsx)("div",{className:"relative mx-auto mb-8 w-full max-w-[21rem] overflow-hidden rounded-xl md:mb-10",children:(0,t.jsx)(r.default,{src:"/images/field_service.png",alt:"Field service operator coordinating crews in the field while back-office work stacks up",width:4100,height:2312,className:"h-auto w-full",sizes:"(max-width: 768px) 100vw, 336px"})}),(0,t.jsx)("h2",{className:"font-heading text-3xl font-bold tracking-tight text-background md:text-4xl",children:"Built for field service businesses"}),(0,t.jsx)("p",{className:"mx-auto mt-5 max-w-2xl text-pretty text-base leading-relaxed text-background/65",children:es.INDUSTRIES_DEFINITION})]}),(0,t.jsxs)(m.ScrollReveal,{className:"mx-auto mt-12 max-w-5xl",children:[(0,t.jsx)(ea,{tone:"dark",items:es.industryGroups.map(e=>({id:e.id,icon:el[e.id]??ei,title:e.name,description:e.trades.join(", ")}))}),(0,t.jsx)("p",{className:"mt-8 text-center text-sm text-background/60",children:es.INDUSTRIES_CLOSING})]})]})]})}var ec=e.i(32497);e.s(["HomePage",0,function(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d,{}),(0,t.jsx)(T,{}),(0,t.jsx)(F,{}),(0,t.jsx)(G,{}),(0,t.jsx)(J,{}),(0,t.jsx)(eu,{}),(0,t.jsx)(j,{}),(0,t.jsx)(N,{}),(0,t.jsx)(ec.CtaBlock,{})]})}],21385)},55838,(e,t,n)=>{"use strict";var r=e.r(71645),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();
1return!o(e,n)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return s(function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})},[e,n,t]),a(function(){return u(o)&&c({inst:o}),e(function(){u(o)&&c({inst:o})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,n)=>{"use strict";var r=e.r(71645),o=e.r(2239),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=r.useRef,l=r.useEffect,u=r.useMemo,c=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=a(e,(d=u(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(a=e,t):(a=e,s=n)}var a,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,o]))[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},30224,(e,t,n)=>{"use strict";t.exports=e.r(52822)},34676,e=>{"use strict";let t;var n,r,o,i,a,s=e.i(43476),l=e.i(71645),u=e.i(22016),c=e.i(31278),d=e.i(75254);let f=(0,d.default)("mail-check",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);e.s([],9111),e.i(9111),e.i(47167);var p=e.i(67805);let m=l.createContext(void 0);function h(e){let t=l.useContext(m);if(!1===e&&void 0===t)throw Error((0,p.default)(27));return t}var g=e.i(27601),x=e.i(84759);let v=((n={}).open="data-open",n.closed="data-closed",n[n.startingStyle=x.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=x.TransitionStatusDataAttributes.endingStyle]="endingStyle",n.anchorHidden="data-anchor-hidden",n.side="data-side",n.align="data-align",n),y=((r={}).popupOpen="data-popup-open",r.pressed="data-pressed",r),b={[y.popupOpen]:""};y.popupOpen,y.pressed;let w={[v.open]:""},E={[v.closed]:""},k={[v.anchorHidden]:""},S={open:e=>e?b:null},j={open:e=>e?w:E,anchorHidden:e=>e?k:null},C={...j,...x.transitionStatusMapping},R=l.forwardRef(function(e,t){let{render:n,className:r,forceRender:o=!1,...i}=e,{store:a}=h(),s=a.useState("open"),l=a.useState("nested"),u=a.useState("mounted"),c=a.useState("transitionStatus");return(0,g.useRenderElement)("div",e,{state:{open:s,transitionStatus:c},ref:[a.context.backdropRef,t],stateAttributesMapping:C,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:o||!l})});var N=e.i(91730),T=e.i(5963),O=e.i(3404);let L=l.forwardRef(function(e,t){let{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...a}=e,{store:s}=h(),l=s.useState("open"),{getButtonProps:u,buttonRef:c}=(0,N.useButton)({disabled:o,native:i});return(0,g.useRenderElement)("button",e,{state:{disabled:o},ref:[t,c],props:[{onClick:function(e){l&&s.setOpen(!1,(0,T.createChangeEventDetails)(O.REASONS.closePress,e.nativeEvent))}},a,u]})});var M=e.i(89879);let A=l.forwardRef(function(e,t){let{render:n,className:r,id:o,...i}=e,{store:a}=h(),s=(0,M.useBaseUiId)(o);return a.useSyncedValueWithCleanup("descriptionElementId",s),(0,g.useRenderElement)("p",e,{ref:t,props:[{id:s},i]})});var I='input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[href]:not([inert]):not([inert] *),button:not([inert]):not([inert] *),[tabindex]:not(slot):not([inert]):not([inert] *),audio[controls]:not([inert]):not([inert] *),video[controls]:not([inert]):not([inert] *),[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *),details>summary:first-of-type:not([inert]):not([inert] *),details:not([inert]):not([inert] *)',P="u"<typeof Element,_=P?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,D=!P&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},W=function(e,t){void 0===t&&(t=!0);var n,r=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):W(e.parentNode))},B=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},z=function(e,t,n){if(W(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(I));return t&&_.call(e,I)&&r.unshift(e),r=r.filter(n)},H=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!W(i,!1))if("SLOT"===i.tagName){var a=i.assignedElements(),s=H(a.length?a:i.children,!0,n);
1n.flatten?r.push.apply(r,s):r.push({scopeParent:i,candidates:s})}else{_.call(i,I)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var l=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!W(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(l&&u){var c=H(!0===l?i.children:l.children,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else o.unshift.apply(o,i.children)}}return r},F=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},q=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||B(e))&&!F(e)?0:e.tabIndex},V=function(e,t){var n=q(e);return n<0&&t&&!F(e)?0:n},Y=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},U=function(e){return"INPUT"===e.tagName},$=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},K=function(e){if(!e.name)return!0;var t,n=e.form||D(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("u">typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=$(t,e.form);return!o||o===e},G=function(e){return U(e)&&"radio"===e.type&&!K(e)},X=function(e){var t,n,r,o,i,a,s,l=e&&D(e),u=null==(t=l)?void 0:t.host,c=!1;if(l&&l!==e)for(c=!!(null!=(n=u)&&null!=(r=n.ownerDocument)&&r.contains(u)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!c&&u;)c=!!(null!=(a=u=null==(i=l=D(u))?void 0:i.host)&&null!=(s=a.ownerDocument)&&s.contains(u));return c},Z=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},J=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=_.call(e,"details>summary:first-of-type")?e.parentElement:e;if(_.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Z(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=D(e);if(a&&!a.shadowRoot&&!0===r(a))return Z(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(X(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Q=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!_.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1},ee=function(e,t){return!(t.disabled||U(t)&&"hidden"===t.type||J(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||Q(t))},et=function(e,t){return!(G(t)||0>q(t))&&!!ee(e,t)},en=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},er=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,a=V(i,o),s=o?er(e.candidates):i;0===a?o?t.push.apply(t,s):t.push(i):n.push({documentOrder:r,tabIndex:a,item:e,isScope:o,content:s})}),n.sort(Y).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},eo=function(e,t){return er((t=t||{}).getShadowRoot?H([e],t.includeContainer,{filter:et.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:en}):z(e,t.includeContainer,et.bind(null,t)))},ei=function(e,t){return(t=t||{}).getShadowRoot?H([e],t.includeContainer,{filter:ee.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):z(e,t.includeContainer,ee.bind(null,t))},ea=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==_.call(e,I)&&et(t,e)},es=e.i(29315),el=e.i(26292),eu=e.i(977),ec=e.i(30628);function ed(e){let t=(0,ec.useRefWithInit)(ef,e).current;return t.next=e,(0,eu.useIsoLayoutEffect)(t.effect),t}function ef(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var ep=e.i(76477),em=e.i(66745);let eh="u">typeof navigator,eg=function(){if(!eh)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),ex=function(){if(!eh)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}(),ev=function(){if(!eh)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}(),ey="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),eb="MacIntel"===eg.platform&&eg.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(eg.platform);eh&&/firefox/i.test(ev);let ew=eh&&/apple/i.test(navigator.vendor);eh&&/Edg/i.test(ev);let eE=eh&&/android/i.test(ex)||/android/i.test(ev);eh&&ex.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;let ek=ev.includes("jsdom/");var eS=e.i(47135),ej=e.i(90219),eC=es;
1let eR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},eN={...eR,position:"fixed",top:0,left:0};({...eR,position:"absolute"});let eT=l.forwardRef(function(e,t){let[n,r]=l.useState();return(0,eu.useIsoLayoutEffect)(()=>{ew&&r("button")},[]),(0,s.jsx)("span",{...e,ref:t,style:eN,"aria-hidden":!n||void 0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var eO=e.i(47857);function eL(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function eM(e){let t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}function eA(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...eA(e,t.id,n)])}function eI(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}let eP=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function e_(e,t){let n=eo(e,eP()),r=n.length;if(0===r)return;let o=(0,eO.activeElement)((0,ej.ownerDocument)(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function eD(e){return e_((0,ej.ownerDocument)(e).body,1)||e}function eW(e){return e_((0,ej.ownerDocument)(e).body,-1)||e}function eB(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!(0,eO.contains)(n,r)}function ez(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}function eH(e){return`data-base-ui-${e}`}let eF=0;
1function eq(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(eF);let i=()=>e?.focus({preventScroll:n});o?i():eF=requestAnimationFrame(i)}let eV={inert:new WeakMap,"aria-hidden":new WeakMap},eY="data-base-ui-inert",eU={inert:new WeakSet,"aria-hidden":new WeakSet},e$=new WeakMap,eK=0,eG=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=function e(t){return t?(0,es.isShadowRoot)(t)?t.host:e(t.parentNode):null}(t);return e.contains(n)?n:null}).filter(e=>null!=e),eX=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},eZ=(e,t,n)=>{let r=[],o=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{"script"!==(0,es.getNodeName)(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function eJ(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:i=[]}=t,a=(0,ej.ownerDocument)(e[0]).body;return function(e,t,n,r,{mark:o=!0,markerIgnoreElements:i=[]}){let a=r?"inert":n?"aria-hidden":null,s=null,l=null,u=eG(t,e),c=new Set(o?eG(t,i):[]),d=o?eZ(t,eX(u),new Set(u)).filter(e=>!c.has(e)):[],f=[],p=[];if(a){let e=eV[a],n=eU[a];l=n,s=e;let r=eG(t,Array.from(t.querySelectorAll("[aria-live]"))),o=u.concat(r);eZ(t,eX(o),new Set(o)).forEach(t=>{let r=t.getAttribute(a),o=null!==r&&"false"!==r,i=(e.get(t)||0)+1;e.set(t,i),f.push(t),1===i&&o&&n.add(t),o||t.setAttribute(a,"inert"===a?"":"true")})}return o&&d.forEach(e=>{let t=(e$.get(e)||0)+1;e$.set(e,t),p.push(e),1===t&&e.setAttribute(eY,"")}),eK+=1,()=>{s&&f.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!l?.has(e)&&a&&e.removeAttribute(a),l?.delete(e))}),o&&p.forEach(e=>{let t=(e$.get(e)||0)-1;e$.set(e,t),t||e.removeAttribute(eY)}),(eK-=1)||(eV.inert=new WeakMap,eV["aria-hidden"]=new WeakMap,eU.inert=new WeakSet,eU["aria-hidden"]=new WeakSet,e$=new WeakMap)}}(e,a,n,r,{mark:o,markerIgnoreElements:i})}var eQ=e.i(74080),e0=e.i(83799),e1=e.i(17514);let e2="data-base-ui-click-trigger",e5={clipPath:"inset(50%)",position:"fixed",top:0,left:0},e4=l.createContext(null),e3=eH("portal"),e6=l.forwardRef(function(e,t){let{children:n,container:r,className:o,render:i,renderGuards:a,...u}=e,{portalNode:c,portalSubtree:d}=function(e={}){let{ref:t,container:n,componentProps:r=e1.EMPTY_OBJECT,elementProps:o}=e,i=(0,e0.useId)(),a=l.useContext(e4),s=a?.portalNode,[u,c]=l.useState(null),[d,f]=l.useState(null),p=(0,ep.useStableCallback)(e=>{null!==e&&f(e)}),m=l.useRef(null);(0,eu.useIsoLayoutEffect)(()=>{if(null===n){m.current&&(m.current=null,f(null),c(null));return}if(null==i)return;let e=(n&&((0,es.isNode)(n)?n:n.current))??s??document.body;if(null==e){m.current&&(m.current=null,f(null),c(null));return}m.current!==e&&(m.current=e,f(null),c(e))},[n,s,i]);let h=(0,g.useRenderElement)("div",r,{ref:[t,p],props:[{id:i,[e3]:""},o]});return{portalNode:d,portalSubtree:u&&h?eQ.createPortal(h,u):null}}({container:r,ref:t,componentProps:e,elementProps:u}),f=l.useRef(null),p=l.useRef(null),m=l.useRef(null),h=l.useRef(null),[x,v]=l.useState(null),y=x?.modal,b=x?.open,w="boolean"==typeof a?a:!!x&&!x.modal&&x.open&&!!c;l.useEffect(()=>{if(c&&!y)return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){c&&e.relatedTarget&&eB(e)&&("focusin"===e.type?ez:function(e){eo(e,eP()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(c)}},[c,y]),l.useEffect(()=>{c&&!b&&ez(c)},[b,c]);let E=l.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:c,setFocusManagerState:v}),[c]);return(0,s.jsxs)(l.Fragment,{children:[d,(0,s.jsxs)(e4.Provider,{value:E,children:[w&&c&&(0,s.jsx)(eT,{"data-type":"outside",ref:f,onFocus:e=>{if(eB(e,c))m.current?.focus();else{let e=eW(x?x.domReference:null);e?.focus()}}}),w&&c&&(0,s.jsx)("span",{"aria-owns":c.id,style:e5}),c&&eQ.createPortal(n,c),w&&c&&(0,s.jsx)(eT,{"data-type":"outside",ref:p,onFocus:e=>{if(eB(e,c))h.current?.focus();else{let t=eD(x?x.domReference:null);t?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,(0,T.createChangeEventDetails)(O.REASONS.focusOut,e.nativeEvent))}}})]})]})}),e8=l.createContext(null),e7=l.createContext(null),e9=()=>l.useContext(e8)?.id||null,te=e=>{let t=l.useContext(e7);return e??t};var tt=e.i(19414);let tn=[];function tr(){tn=tn.filter(e=>e.deref()?.isConnected)}function to(){return tr(),tn[tn.length-1]?.deref()}function ti(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;let n=eP(),r=ei(e,n).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return ea(e,n)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||0===r.length?"0"!==o&&e.setAttribute("tabindex","0"):("-1"!==o||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}
1function ta(e){let{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:a=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:d="",nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:h,getInsideElements:g}=e,x="rootStore"in t?t.rootStore:t,v=x.useState("open"),y=x.useState("domReferenceElement"),b=x.useState("floatingElement"),{events:w,dataRef:E}=x.context,k=(0,ep.useStableCallback)(()=>E.current.floatingContext?.nodeId),S=!1===o,j=(0,eO.isTypeableCombobox)(y)&&S,C=l.useRef(["content"]),R=ed(o),N=ed(i),L=ed(d),M=te(h),A=l.useContext(e4),I=l.useRef(!1),P=l.useRef(!1),_=l.useRef(!1),D=l.useRef(-1),W=l.useRef(""),B=l.useRef(""),z=l.useRef(null),H=l.useRef(null),F=(0,el.useMergedRefs)(z,m,A?.beforeInsideRef),q=(0,el.useMergedRefs)(H,A?.afterInsideRef),V=(0,em.useTimeout)(),Y=(0,em.useTimeout)(),U=(0,eS.useAnimationFrame)(),$=null!=A,K=(0,eO.getFloatingFocusElement)(b),G=(0,ep.useStableCallback)((e=K)=>e?eo(e,eP()):[]),X=(0,ep.useStableCallback)(()=>g?.().filter(e=>null!=e)??[]),Z=(0,ep.useStableCallback)(e=>{let t=G(e);return C.current.map(()=>t).filter(Boolean).flat()});l.useEffect(()=>{if(r||!u)return;function e(e){"Tab"===e.key&&(0,eO.contains)(K,(0,eO.activeElement)((0,ej.ownerDocument)(K)))&&0===G().length&&!j&&(e.preventDefault(),e.stopPropagation())}let t=(0,ej.ownerDocument)(K);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,y,K,u,C,j,G,Z]),l.useEffect(()=>{if(r||!v)return;let e=(0,ej.ownerDocument)(K);function t(){_.current=!1}function n(e){let t=(0,eO.getTarget)(e),n=X();_.current=!((0,eO.contains)(b,t)||(0,eO.contains)(y,t)||(0,eO.contains)(A?.portalNode,t)||n.some(e=>e===t||(0,eO.contains)(e,t))),B.current=e.pointerType||"keyboard",t?.closest(`[${e2}]`)&&(P.current=!0)}function o(){B.current="keyboard"}return e.addEventListener("pointerdown",n,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",o,!0),()=>{e.removeEventListener("pointerdown",n,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",o,!0)}},[r,b,y,K,v,A,X]),l.useEffect(()=>{if(r||!c)return;let e=(0,ej.ownerDocument)(K);function t(){P.current=!0,Y.start(0,()=>{P.current=!1})}function n(e){let t=(0,eO.getTarget)(e),n=G().indexOf(t);-1!==n&&(D.current=n)}function o(t){let n=t.relatedTarget,r=t.currentTarget,o=(0,eO.getTarget)(t);queueMicrotask(()=>{let i=k(),s=x.context.triggerElements,l=X(),c=n?.hasAttribute(eH("focus-guard"))&&[z.current,H.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,(0,tt.resolveRef)(p),(0,tt.resolveRef)(f)].includes(n),d=!((0,eO.contains)(y,n)||(0,eO.contains)(b,n)||(0,eO.contains)(n,b)||(0,eO.contains)(A?.portalNode,n)||l.some(e=>e===n||(0,eO.contains)(e,n))||null!=n&&s.hasElement(n)||s.hasMatchingElement(e=>(0,eO.contains)(e,n))||c||M&&(eA(M.nodesRef.current,i).find(e=>(0,eO.contains)(e.context?.elements.floating,n)||(0,eO.contains)(e.context?.elements.domReference,n))||eI(M.nodesRef.current,i).find(e=>[e.context?.elements.floating,(0,eO.getFloatingFocusElement)(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===y&&K&&ti(K,C),a&&r!==y&&!function(e){return!!e&&!!e.isConnected&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==(0,es.getComputedStyle)(e).display)}(o)&&(0,eO.activeElement)(e)===e.body){if((0,es.isHTMLElement)(K)&&(K.focus(),"popup"===a))return void U.request(()=>{K.focus()});let e=D.current,t=G(),n=t[e]||t[t.length-1]||K;(0,es.isHTMLElement)(n)&&n.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(j||!u)&&n&&d&&!P.current&&(j||n!==to())&&(I.current=!0,x.setOpen(!1,(0,T.createChangeEventDetails)(O.REASONS.focusOut,t)))})}function i(){_.current||(E.current.insideReactTree=!0,V.start(0,()=>{E.current.insideReactTree=!1}))}let s=(0,es.isHTMLElement)(y)?y:null,l=[];if(b||s)return s&&(s.addEventListener("focusout",o),s.addEventListener("pointerdown",t),l.push(()=>{s.removeEventListener("focusout",o),s.removeEventListener("pointerdown",t)})),b&&(b.addEventListener("focusin",n),b.addEventListener("focusout",o),A&&(b.addEventListener("focusout",i,!0),l.push(()=>{b.removeEventListener("focusout",i,!0)})),l.push(()=>{b.removeEventListener("focusin",n),b.removeEventListener("focusout",o)}
1)),()=>{l.forEach(e=>{e()})}},[r,y,b,K,u,M,A,x,c,a,G,j,k,C,E,V,Y,U,f,p,X]),l.useEffect(()=>{if(r||!b||!v)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${eH("portal")}]`)||[]),t=M?eI(M.nodesRef.current,k()):[],n=t.find(e=>(0,eO.isTypeableCombobox)(e.context?.elements.domReference||null))?.context?.elements.domReference,o=eJ([b,...e,z.current,H.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...X(),n,(0,tt.resolveRef)(p),(0,tt.resolveRef)(f),j?y:null].filter(e=>null!=e),{ariaHidden:u||j,mark:!1}),i=eJ([b,...e].filter(e=>null!=e));return()=>{i(),o()}},[v,r,y,b,u,C,A,j,M,k,f,p,X]),(0,eu.useIsoLayoutEffect)(()=>{if(!v||r||!(0,es.isHTMLElement)(K))return;let e=(0,ej.ownerDocument)(K),t=(0,eO.activeElement)(e);queueMicrotask(()=>{let e,n=Z(K),r=R.current,o="function"==typeof r?r(L.current||""):r;void 0===o||!1===o||(e=(e=!0===o||null===o?n[0]||K:(0,tt.resolveRef)(o))||n[0]||K,(0,eO.contains)(K,t)||eq(e,{preventScroll:e===K}))})},[r,v,K,S,Z,R,L]),(0,eu.useIsoLayoutEffect)(()=>{var e;if(r||!K)return;let t=(0,ej.ownerDocument)(K);function n(e){var t,n,r,o;let i;if(e.open||(t=e.nativeEvent,n=B.current,i=(0,eC.getWindow)(t.target),W.current=t instanceof i.KeyboardEvent?"keyboard":t instanceof i.FocusEvent?n||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof i.MouseEvent?n||(0===t.detail?"keyboard":"mouse"):""),e.reason===O.REASONS.triggerHover&&"mouseleave"===e.nativeEvent.type&&(I.current=!0),e.reason===O.REASONS.outsidePress)if(e.nested)I.current=!1;
1else if((""===(r=e.nativeEvent).pointerType&&r.isTrusted?0:eE&&r.pointerType?"click"!==r.type||1!==r.buttons:0!==r.detail||r.pointerType)&&(o=e.nativeEvent,ek?1:(eE||0!==o.width||0!==o.height)&&(!eE||1!==o.width||1!==o.height||0!==o.pressure||0!==o.detail||"mouse"!==o.pointerType)&&(!(o.width<1)||!(o.height<1)||0!==o.pressure||0!==o.detail||"touch"!==o.pointerType))){let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?I.current=!1:I.current=!0}else I.current=!1}return e=(0,eO.activeElement)(t),tr(),e&&"body"!==(0,es.getNodeName)(e)&&(tn.push(new WeakRef(e)),tn.length>20&&(tn=tn.slice(-20))),w.on("openchange",n),()=>{w.off("openchange",n);let e=(0,eO.activeElement)(t),r=X(),o=(0,eO.contains)(b,e)||r.some(t=>t===e||(0,eO.contains)(t,e))||M&&eA(M.nodesRef.current,k(),!1).some(t=>(0,eO.contains)(t.context?.elements.floating,e)),i=function(){let e=N.current,t="function"==typeof e?e(W.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){let e=y||to();return e&&e.isConnected?e:null}let n=y||to();return(0,tt.resolveRef)(t)||n||null}();queueMicrotask(()=>{let n=function(e){if(!e)return null;let t=eP();return ea(e,t)?e:eo(e,t)[0]||e}(i),r="boolean"!=typeof N.current;N.current&&!I.current&&(0,es.isHTMLElement)(n)&&(r||n===e||e===t.body||o)&&n.focus({preventScroll:!0}),I.current=!1})}},[r,b,K,N,E,w,M,y,k,X]),(0,eu.useIsoLayoutEffect)(()=>{if(!ey||v||!b)return;let e=(0,eO.activeElement)((0,ej.ownerDocument)(b));(0,es.isHTMLElement)(e)&&(0,eO.isTypeableElement)(e)&&(0,eO.contains)(b,e)&&e.blur()},[v,b]),(0,eu.useIsoLayoutEffect)(()=>{if(!r&&A)return A.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:x.setOpen,domReference:y}),()=>{A.setFocusManagerState(null)}},[r,A,u,v,x,c,y]),(0,eu.useIsoLayoutEffect)(()=>{if(!r&&K)return ti(K,C),()=>{queueMicrotask(tr)}},[r,K,C]);let J=!r&&(!u||!j)&&($||u);return(0,s.jsxs)(l.Fragment,{children:[J&&(0,s.jsx)(eT,{"data-type":"inside",ref:F,onFocus:e=>{if(u){let e=Z();eq(e[e.length-1])}else if(A?.portalNode)if(I.current=!1,eB(e,A.portalNode)){let e=eD(y);e?.focus()}else(0,tt.resolveRef)(p??A.beforeOutsideRef)?.focus()}}),n,J&&(0,s.jsx)(eT,{"data-type":"inside",ref:q,onFocus:e=>{if(u)eq(Z()[0]);else if(A?.portalNode)if(c&&(I.current=!0),eB(e,A.portalNode)){let e=eW(y);e?.focus()}else(0,tt.resolveRef)(f??A.afterOutsideRef)?.focus()}})]})}let ts=((o={}).nestedDialogs="--nested-dialogs",o),tl=((i={})[i.open=v.open]="open",i[i.closed=v.closed]="closed",i[i.startingStyle=v.startingStyle]="startingStyle",i[i.endingStyle=v.endingStyle]="endingStyle",i.nested="data-nested",i.nestedDialogOpen="data-nested-dialog-open",i),tu=l.createContext(void 0);function tc(){let e=l.useContext(tu);if(void 0===e)throw Error((0,p.default)(26));return e}var td=e.i(89269);let tf="ArrowUp",tp="ArrowDown",tm="ArrowLeft",th="ArrowRight";[...new Set([...new Set([tm,th]),...new Set([tf,tp])])];let tg=new Set([tf,tp,tm,th,"Home","End"]),tx={...j,...x.transitionStatusMapping,nestedDialogOpen:e=>e?{[tl.nestedDialogOpen]:""}:null},tv=l.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:o,render:i,...a}=e,{store:l}=h(),u=l.useState("descriptionElementId"),c=l.useState("disablePointerDismissal"),d=l.useState("floatingRootContext"),f=l.useState("popupProps"),p=l.useState("modal"),m=l.useState("mounted"),x=l.useState("nested"),v=l.useState("nestedOpenDialogCount"),y=l.useState("open"),b=l.useState("openMethod"),w=l.useState("titleElementId"),E=l.useState("transitionStatus"),k=l.useState("role");tc(),(0,td.useOpenChangeComplete)({open:y,ref:l.context.popupRef,onComplete(){y&&l.context.onOpenChangeComplete?.(!0)}});let S=void 0===o?function(e){return"touch"!==e||l.context.popupRef.current}:o,j=(0,g.useRenderElement)("div",e,{state:{open:y,nested:x,transitionStatus:E,nestedDialogOpen:v>0},props:[f,{"aria-labelledby":w??void 0,"aria-describedby":u??void 0,role:k,tabIndex:-1,hidden:!m,onKeyDown(e){tg.has(e.key)&&e.stopPropagation()},style:{[ts.nestedDialogs]:v}},a],ref:[t,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:tx});return(0,s.jsx)(ta,{context:d,openInteractionType:b,disabled:!m,closeOnFocusOut:!c,initialFocus:S,returnFocus:r,modal:!1!==p,restoreFocus:"popup",children:j})});var ty=e.i(35423);let tb=l.forwardRef(function(e,t){let n,{cutout:r,...o}=e;if(r){let e=r?.getBoundingClientRect();n=`polygon(
2      0% 0%,
3      100% 0%,
4      100% 100%,
5      0% 100%,
6      0% 0%,
7      ${e.left}px ${e.top}px,
8      ${e.left}px ${e.bottom}px,
9      ${e.right}px ${e.bottom}px,
10      ${e.right}px ${e.top}px,
11      ${e.left}px ${e.top}px
12    )`}return(0,s.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:n}})}),tw=l.forwardRef(function(e,t){var n;let{keepMounted:r=!1,...o}=e,{store:i}=h(),a=i.useState("mounted"),l=i.useState("modal"),u=i.useState("open");return a||r?(0,s.jsx)(tu.Provider,{value:r,children:(0,s.jsxs)(e6,{ref:t,...o,children:[a&&!0===l&&(0,s.jsx)(tb,{ref:i.context.
12internalBackdropRef,inert:(n=!u,(0,ty.isReactVersionAtLeast)(19)?n:n?"true":void 0)}),e.children]})}):null});var eC=es;let tE={},tk={},tS="";class tj{lockCount=0;restore=null;timeoutLock=em.Timeout.create();timeoutUnlock=em.Timeout.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){let t,n,r,o,i;if(0===this.lockCount||null!==this.restore)return;let a=(0,ej.ownerDocument)(e).documentElement,s=(0,eC.getWindow)(a).getComputedStyle(a).overflowY;if("hidden"===s||"clip"===s){this.restore=e1.NOOP;return}let l=eb||!function(e){if("u"<typeof document)return!1;let t=(0,ej.ownerDocument)(e);return(0,eC.getWindow)(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=l?(n=(t=(0,ej.ownerDocument)(e)).documentElement,r=t.body,i={overflowY:(o=(0,es.isOverflowElement)(n)?n:r).style.overflowY,overflowX:o.style.overflowX},Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}):function(e){let t=(0,ej.ownerDocument)(e),n=t.documentElement,r=t.body,o=(0,eC.getWindow)(n),i=0,a=0,s=!1,l=eS.AnimationFrame.create();if(ey&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){let t=o.getComputedStyle(n),l=o.getComputedStyle(r),u=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,tE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},tS=n.style.scrollBehavior,tk={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let c=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===l.overflowY,p="scroll"===t.overflowX||"scroll"===l.overflowX,m=Math.max(0,o.innerWidth-r.clientWidth),h=Math.max(0,o.innerHeight-r.clientHeight),g=parseFloat(l.marginTop)+parseFloat(l.marginBottom),x=parseFloat(l.marginLeft)+parseFloat(l.marginRight),v=(0,es.isOverflowElement)(n)?n:r;if(s=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=(0,ej.ownerDocument)(e),n=t.documentElement,r=t.body,o=(0,es.isOverflowElement)(n)?n:r,i=o.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";let s=o.offsetWidth;o.style.overflowY="hidden";let l=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=a,s===l}(e)){n.style.scrollbarGutter=u,v.style.overflowY="hidden",v.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:u,overflowY:"hidden",overflowX:"hidden"}),(c||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:g||h?`calc(100dvh - ${g+h}px)`:"100dvh",width:x||m?`calc(100vw - ${x+m}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function c(){Object.assign(n.style,tE),Object.assign(r.style,tk),s||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=tS)}function d(){c(),l.request(u)}return u(),o.addEventListener("resize",d),()=>{l.cancel(),c(),"function"==typeof o.removeEventListener&&o.removeEventListener("resize",d)}}(e)}}let tC=new tj,tR={intentional:"onClick",sloppy:"onPointerDown"};function tN(){return!1}var tT=e.i(494);function tO(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),o=e.map(e=>e?.trigger),i=l.useCallback(t=>tL(t,e,"reference"),t),a=l.useCallback(t=>tL(t,e,"floating"),n),s=l.useCallback(t=>tL(t,e,"item"),r),u=l.useCallback(t=>tL(t,e,"trigger"),o);return l.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:s,getTriggerProps:u}),[i,a,s,u])}function tL(e,t,n){let r=new Map,o="item"===n,i={};for(let t in"floating"===n&&(i.tabIndex=-1,i[tT.FOCUSABLE_ATTRIBUTE]=""),e)o&&e&&(t===tT.ACTIVE_KEY||t===tT.SELECTED_KEY)||(i[t]=e[t]);for(let a=0;a<t.length;a+=1){let s,l=t[a]?.[n];(s="function"==typeof l?e?l(e):null:l)&&tM(i,s,o,r)}return tM(i,e,o,r),i}function tM(e,t,n,r){for(let o in t){let i=t[o];n&&(o===tT.ACTIVE_KEY||o===tT.SELECTED_KEY)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),"function"==typeof i&&(r.get(o)?.push(i),e[o]=(...e)=>r.get(o)?.map(t=>t(...e)).find(e=>void 0!==e))):e[o]=i)}}let tA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var tI=Symbol("NOT_FOUND"),tP=e=>Array.isArray(e)?e:[e],t_=0,tD=class{revision=t_;_value;
12_lastValue;_isEqual=tW;constructor(e,t=tW){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++t_)}};function tW(e,t){return e===t}function tB(e){return e instanceof tD||console.warn("Not a valid cell! ",e),e.value}var tz=(e,t)=>!1;function tH(){return function(e=tW){return new tD(null,e)}(tz)}var tF=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=tH()),tB(t)};Symbol();var tq=0,tV=Object.getPrototypeOf({}),tY=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,tU);tag=tH();tags={};children={};collectionTag=null;id=tq++},tU={get:(e,t)=>(function(){let{value:n}=e,r=Reflect.get(n,t);if("symbol"==typeof t||t in tV)return r;if("object"==typeof r&&null!==r){var o;let n=e.children[t];return void 0===n&&(n=e.children[t]=Array.isArray(o=r)?new t$(o):new tY(o)),n.tag&&tB(n.tag),n.proxy}{let n=e.tags[t];return void 0===n&&((n=e.tags[t]=tH()).value=r),tB(n),r}})(),ownKeys:e=>(tF(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},t$=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],tK);tag=tH();tags={};children={};collectionTag=null;id=tq++},tK={get:([e],t)=>("length"===t&&tF(e),tU.get(e,t)),ownKeys:([e])=>tU.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>tU.getOwnPropertyDescriptor(e,t),has:([e],t)=>tU.has(e,t)},tG=(e,t)=>e===t,tX="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function tZ(){return{s:0,v:void 0,o:null,p:null}}function tJ(e,t={}){let n,r=tZ(),{resultEqualityCheck:o}=t,i=0;function a(){let t,a=r,{length:s}=arguments;for(let e=0;e<s;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=a.o;null===e&&(a.o=e=new WeakMap);let n=e.get(t);void 0===n?(a=tZ(),e.set(t,a)):a=n}else{let e=a.p;null===e&&(a.p=e=new Map);let n=e.get(t);void 0===n?(a=tZ(),e.set(t,a)):a=n}}let l=a;if(1===a.s)t=a.v;else if(t=e.apply(null,arguments),i++,o){let e=n?.deref?.()??n;null!=e&&o(e,t)&&(t=e,0!==i&&i--),n="object"==typeof t&&null!==t||"function"==typeof t?new tX(t):t}return l.s=1,l.v=t,t}return a.clearCache=()=>{r=tZ(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function tQ(e,...t){let n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r,o=0,i=0,a={},s=e.pop();"object"==typeof s&&(a=s,s=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let{memoize:l,memoizeOptions:u=[],argsMemoize:c=tJ,argsMemoizeOptions:d=[],devModeChecks:f={}}={...n,...a},p=tP(u),m=tP(d),h=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${n}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),g=l(function(){return o++,s.apply(null,arguments)},...p);return Object.assign(c(function(){i++;let e=function(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}(h,arguments);return r=g.apply(null,e)},...m),{resultFunc:s,memoizedResultFunc:g,dependencies:h,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>r,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:l,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var t0=tQ(tJ),t1=Object.assign((e,t=t0)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>t1});tQ({memoize:function(e,t){let n,{equalityCheck:r=tG,maxSize:o=1,resultEqualityCheck:i}="object"==typeof t?t:{equalityCheck:t},a=function(e,t){if(null===e||null===t||e.length!==t.length)return!1;let{length:n}=e;for(let o=0;o<n;o++)if(!r(e[o],t[o]))return!1;return!0},s=0,l=o<=1?{get:e=>n&&a(n.key,e)?n.value:tI,put(e,t){n={key:e,value:t}},getEntries:()=>n?[n]:[],clear(){n=void 0}}:function(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return tI}return{get:r,put:function(t,o){r(t)===tI&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(o,a);function u(){let t=l.get(arguments);if(t===tI){if(t=e.apply(null,arguments),s++,i){let e=l.getEntries().find(e=>i(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>s,u.resetResultsCount=()=>{s=0},u},memoizeOptions:{maxSize:1,equalityCheck:Object.is}});let t2=(e,t,n,r,o,i,...a)=>{let s;if(a.length>0)throw Error((0,p.default)(1));if(e&&t&&n&&r&&o&&i)s=(a,s,l,u)=>i(e(a,s,l,u),t(a,s,l,u),n(a,s,l,u),r(a,s,l,u),o(a,s,l,u),s,l,u);else if(e&&t&&n&&r&&o)s=(i,a,s,l)=>o(e(i,a,s,l),t(i,a,s,l),n(i,a,s,l),r(i,a,s,l),a,s,l);else if(e&&t&&n&&r)s=(o,i,a,s)=>r(e(o,i,a,s),t(o,i,a,s),n(o,i,a,s),i,a,s);else if(e&&t&&n)s=(r,o,i,a)=>n(e(r,o,i,a),t(r,o,i,a),o,i,a);else if(e&&t)s=(n,r,o,i)=>t(e(n,r,o,i),r,o,i);else if(e)s=e;else throw Error("Missing arguments");return s};var t5=e.i(2239),t4=e.i(30224);let t3=(0,ty.isReactVersionAtLeast)(19)?function(e,n,r,o,i){let a;if(!t){let t;return t=l.useCallback(()=>n(e.getSnapshot(),r,o,i),[e,n,r,o,i]),(0,t5.useSyncExternalStore)(e.subscribe,t,t)}let s=t.syncIndex;return t.syncIndex+=1,t.didInitialize?(a=t.syncHooks[s]).store===e&&a.selector===n&&Object.is(a.a1,r)&&Object.is(a.a2,o)&&Object.is(a.a3,i)||(a.store!==e&&(t.didChangeStore=!0),a.store=e,a.selector=n,a.a1=r,a.a2=o,a.a3=i,a.didChange=!0):(a={store:e,selector:n,a1:r,a2:o,a3:i,value:n(e.getSnapshot(),r,o,i),didChange:!1},t.syncHooks.push(a)),a.value}:function(e,t,n,r,o){return(0,t4.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};[].push({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,o))&&(t=!0,r.value=o,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,t5.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});class t6{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}
12subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return t3(this,e,t,n,r)}}class t8 extends t6{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){l.useDebugValue(e),(0,eu.useIsoLayoutEffect)(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;(0,eu.useIsoLayoutEffect)(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);(0,eu.useIsoLayoutEffect)(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){l.useDebugValue(e);let n=void 0!==t;(0,eu.useIsoLayoutEffect)(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return l.useDebugValue(e),t3(this,this.selectors[e],t,n,r)}useContextCallback(e,t){l.useDebugValue(e);let n=(0,ep.useStableCallback)(t??e1.NOOP);this.context[e]=n}useStateSetter(e){let t=l.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n,r=(n="function"==typeof e?e:this.selectors[e])(this.state);return t(r,r,this),this.subscribe(e=>{let o=n(e);if(!Object.is(r,o)){let e=r;r=o,t(o,e,this)}})}}let t7={open:t2(e=>e.open),domReferenceElement:t2(e=>e.domReferenceElement),referenceElement:t2(e=>e.positionReference??e.referenceElement),floatingElement:t2(e=>e.floatingElement),floatingId:t2(e=>e.floatingId)};class t9 extends t8{constructor(e){const{nested:t,noEmit:n,onOpenChange:r,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:function(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}(),nested:t,noEmit:n,triggerElements:o},t7)}setOpen=(e,t)=>{if((!e||!this.state.open||eM(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)}this.context.onOpenChange?.(e,t)}}var ne=e.i(88841);
12class nt{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}let nn=t2(e=>e.triggerIdProp??e.activeTriggerId),nr={...{open:t2(e=>e.openProp??e.open),mounted:t2(e=>e.mounted),transitionStatus:t2(e=>e.transitionStatus),floatingRootContext:t2(e=>e.floatingRootContext),preventUnmountingOnClose:t2(e=>e.preventUnmountingOnClose),payload:t2(e=>e.payload),activeTriggerId:nn,activeTriggerElement:t2(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:t2((e,t)=>void 0!==t&&nn(e)===t),isOpenedByTrigger:t2((e,t)=>void 0!==t&&nn(e)===t&&e.open),isMountedByTrigger:t2((e,t)=>void 0!==t&&nn(e)===t&&e.mounted),triggerProps:t2((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:t2(e=>e.popupProps),popupElement:t2(e=>e.popupElement),positionerElement:t2(e=>e.positionerElement)},modal:t2(e=>e.modal),nested:t2(e=>e.nested),nestedOpenDialogCount:t2(e=>e.nestedOpenDialogCount),disablePointerDismissal:t2(e=>e.disablePointerDismissal),openMethod:t2(e=>e.openMethod),descriptionElementId:t2(e=>e.descriptionElementId),titleElementId:t2(e=>e.titleElementId),viewportElement:t2(e=>e.viewportElement),role:t2(e=>e.role)};class no extends t8{constructor(e){super(function(e={}){return{...{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new t9({open:!1,floatingElement:null,referenceElement:null,triggerElements:new nt,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0}),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:e1.EMPTY_OBJECT,inactiveTriggerProps:e1.EMPTY_OBJECT,popupProps:e1.EMPTY_OBJECT},modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}(e),{popupRef:l.createRef(),backdropRef:l.createRef(),internalBackdropRef:l.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new nt,onOpenChange:void 0,onOpenChangeComplete:void 0},nr)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",n);let r={open:e},o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)}}let ni=((a={})[a.open=v.open]="open",a[a.closed=v.closed]="closed",a[a.startingStyle=v.startingStyle]="startingStyle",a[a.endingStyle=v.endingStyle]="endingStyle",a.nested="data-nested",a.nestedDialogOpen="data-nested-dialog-open",a),na={...j,...x.transitionStatusMapping,nested:e=>e?{[ni.nested]:""}:null,nestedDialogOpen:e=>e?{[ni.nestedDialogOpen]:""}:null},ns=l.forwardRef(function(e,t){let{className:n,render:r,children:o,...i}=e,a=tc(),{store:s}=h(),l=s.useState("open"),u=s.useState("nested"),c=s.useState("transitionStatus"),d=s.useState("nestedOpenDialogCount"),f=s.useState("mounted");return(0,g.useRenderElement)("div",e,{enabled:a||f,state:{open:l,nested:u,transitionStatus:c,nestedDialogOpen:d>0},ref:[t,s.useStateSetter("viewportElement")],stateAttributesMapping:na,props:[{role:"presentation",hidden:!f,style:{pointerEvents:l?void 0:"none"},children:o},i]})}),nl=l.forwardRef(function(e,t){let{render:n,className:r,id:o,...i}=e,{store:a}=h(),s=(0,M.useBaseUiId)(o);return a.useSyncedValueWithCleanup("titleElementId",s),(0,g.useRenderElement)("h2",e,{ref:t,props:[{id:s},i]})}),nu=l.forwardRef(function(e,t){var n;let r,o,i,a,s,{render:u,className:c,disabled:d=!1,nativeButton:f=!0,id:m,payload:x,handle:v,...y}=e,b=h(!0),w=v?.store??b?.store;if(!w)throw Error((0,p.default)(79));let E=(0,M.useBaseUiId)(m),k=w.useState("floatingRootContext"),j=w.useState("isOpenedByTrigger",E),C=l.useRef(null),{registerTrigger:
12R,isMountedByThisTrigger:L}=(n={payload:x},r=w.useState("isMountedByTrigger",E),o=l.useRef(null),i=l.useRef(null),a=l.useCallback(e=>{if(void 0!==E){if(null!==o.current){let e=o.current,t=i.current,n=w.context.triggerElements.getById(e);t&&n===t&&w.context.triggerElements.delete(e),o.current=null,i.current=null}null!==e&&(o.current=E,i.current=e,w.context.triggerElements.add(E,e))}},[w,E]),s=(0,ep.useStableCallback)(e=>{if(a(e),!e||!w.select("open"))return;let t=w.select("activeTriggerId");t===E?w.update({activeTriggerElement:e,...n}):null==t&&w.update({activeTriggerId:E,activeTriggerElement:e,...n})}),(0,eu.useIsoLayoutEffect)(()=>{r&&w.update({activeTriggerElement:C.current,...n})},[r,w,C,...Object.values(n)]),{registerTrigger:s,isMountedByThisTrigger:r}),{getButtonProps:A,buttonRef:I}=(0,N.useButton)({disabled:d,native:f}),P=tO([function(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:i="click",toggle:a=!0,ignoreMouse:s=!1,stickIfOpen:u=!0,touchOpenDelay:c=0,reason:d=O.REASONS.triggerPress}=t,f=l.useRef(void 0),p=(0,eS.useAnimationFrame)(),m=(0,em.useTimeout)(),h=l.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current,o=e.nativeEvent,l=n.select("open");if(0!==e.button||"click"===i||eL(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,x=n.select("domReferenceElement")!==e.currentTarget,v=l&&x||!(l&&a&&(!h||!u||"click"===g||"mousedown"===g));if((0,eO.isTypeableElement)(o.target)){let e=(0,T.createChangeEventDetails)(d,o,o.target);v&&"touch"===t&&c>0?m.start(c,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let y=e.currentTarget;p.request(()=>{let e=(0,T.createChangeEventDetails)(d,o,y);v&&"touch"===t&&c>0?m.start(c,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if("mousedown-only"===i)return;let t=f.current;if("mousedown"===i&&t){f.current=void 0;return}if(eL(t,!0)&&s)return;let o=n.select("open"),l=r.current.openEvent,p=n.select("domReferenceElement")!==e.currentTarget,h=o&&p||!(o&&a&&(!l||!u||eM(l))),g=(0,T.createChangeEventDetails)(d,e.nativeEvent,e.currentTarget);h&&"touch"===t&&c>0?m.start(c,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){f.current=void 0}}),[r,i,s,n,u,a,p,m,c,d]);return l.useMemo(()=>o?{reference:h}:e1.EMPTY_OBJECT,[o,h])}(k,{enabled:null!=k})]),_=w.useState("triggerProps",L);return(0,g.useRenderElement)("button",e,{state:{disabled:d,open:j},ref:[I,t,R,C],props:[P.getReferenceProps(),_,{[e2]:"",id:E},y,A],stateAttributesMapping:S})});
12class nc{constructor(e){this.store=e??new no}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,T.createChangeEventDetails)(O.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,T.createChangeEventDetails)(O.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,T.createChangeEventDetails)(O.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Backdrop",0,R,"Close",0,L,"Description",0,A,"Handle",0,nc,"Popup",0,tv,"Portal",0,tw,"Root",0,function(e){let t,{children:n,open:r,defaultOpen:o=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:u=!1,modal:c=!0,actionsRef:d,handle:f,triggerId:p,defaultTriggerId:g=null}=e,x=h(!0),v=!!x,y=(0,ec.useRefWithInit)(()=>f?.store??new no({open:o,openProp:r,activeTriggerId:g,triggerIdProp:p,modal:c,disablePointerDismissal:u,nested:v})).current;(t=l.useRef(!0)).current&&(t.current=!1,(()=>{void 0===r&&!1===y.state.open&&!0===o&&y.update({open:!0,activeTriggerId:g})})()),y.useControlledProp("openProp",r),y.useControlledProp("triggerIdProp",p),y.useSyncedValues({disablePointerDismissal:u,nested:v,modal:c}),y.useContextCallback("onOpenChange",i),y.useContextCallback("onOpenChangeComplete",a);let b=y.useState("payload");!function(e){let t,{store:n,parentContext:r,actionsRef:o}=e,i=n.useState("open"),a=n.useState("disablePointerDismissal"),s=n.useState("modal"),u=n.useState("popupElement"),{openMethod:c,triggerProps:d}=function(e){let t,n,r,o,[i,a]=l.useState(null),s=(0,ep.useStableCallback)((t,n)=>{e||a(n||(eb?"touch":""))});t=l.useRef(e),n=(0,ep.useStableCallback)(t=>{t&&!e&&a(null)}),(0,eu.useIsoLayoutEffect)(()=>{t.current!==e&&n(t.current)},[e,n]),(0,eu.useIsoLayoutEffect)(()=>{t.current=e},[e]);let{onClick:u,onPointerDown:c}=(r=l.useRef(""),o=l.useCallback(e=>{e.defaultPrevented||(r.current=e.pointerType,s(e,e.pointerType))},[s]),{onClick:l.useCallback(e=>{0===e.detail?s(e,"keyboard"):(s(e,"pointerType"in e?e.pointerType:r.current),r.current="")},[s]),onPointerDown:o});return l.useMemo(()=>({openMethod:i,triggerProps:{onClick:u,onPointerDown:c}}),[i,u,c])}(i);t=n.useState("open"),(0,eu.useIsoLayoutEffect)(()=>{if(t&&!n.select("activeTriggerId")&&1===n.context.triggerElements.size){let e=n.context.triggerElements.entries().next();if(!e.done){let[t,r]=e.value;n.update({activeTriggerId:t,activeTriggerElement:r})}}},[t,n]);let{forceUnmount:f}=function(e,t){let{mounted:n,setMounted:r,transitionStatus:o}=(0,ne.useTransitionStatus)(e);t.useSyncedValues({mounted:n,transitionStatus:o});let i=(0,ep.useStableCallback)(()=>{r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return(0,td.useOpenChangeComplete)({enabled:!a,open:e,ref:t.context.popupRef,onComplete(){e||i()}}),{forceUnmount:i,transitionStatus:o}}(i,n),p=(0,ep.useStableCallback)(e=>{let t=(0,T.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{n.set("preventUnmountingOnClose",!0)},t}),m=l.useCallback(()=>{n.setOpen(!1,p(O.REASONS.imperativeAction))},[n,p]);l.useImperativeHandle(o,()=>({unmount:f,close:m}),[f,m]);let h=function(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=(0,e0.useId)(),a=null!=e9(),s=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(r?"popupElement":"positionerElement"),c=t.context.triggerElements,d=(0,ec.useRefWithInit)(()=>new t9({open:s,referenceElement:l,floatingElement:u,triggerElements:c,onOpenChange:o,floatingId:i,nested:a,noEmit:n})).current;return(0,eu.useIsoLayoutEffect)(()=>{let e={open:s,floatingId:i,referenceElement:l,floatingElement:u};(0,es.isElement)(l)&&(e.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(e.positionReference=l),d.update(e)},[s,i,l,u,d]),d.context.onOpenChange=o,d.context.nested=a,d.context.noEmit=n,d}({popupStore:n,onOpenChange:n.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[g,x]=l.useState(0),v=0===g,y=function(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),i=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:s="dialog"}=t,u=(0,e0.useId)(),c=i?.id||u,d=l.useMemo(()=>(0,eO.getFloatingFocusElement)(a)?.id||o,[a,o]),f=tA.get(s)??s,p=null!=e9(),m=l.useMemo(()=>"tooltip"===f||"label"===s?e1.EMPTY_OBJECT:{"aria-haspopup":"alertdialog"===f?"dialog":f,"aria-expanded":"false",..."listbox"===f&&{role:"combobox"},..."menu"===f&&p&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[f,p,s]),h=l.useMemo(()=>"tooltip"===f||"label"===s?{[`aria-${"label"===s?"labelledby":"describedby"}`]:r?d:void 0}:{...m,"aria-expanded":r?"true":"false","aria-controls":r?d:void 0,..."menu"===f&&{id:c}},[f,d,r,c,s,m]),g=l.useMemo(()=>
12{let e={id:d,...f&&{role:f}};return"tooltip"===f||"label"===s?e:{...e,..."menu"===f&&{"aria-labelledby":c}}},[f,d,c,s]),x=l.useCallback(({active:e,selected:t})=>{let n={role:"option",...e&&{id:`${d}-fui-option`}};switch(s){case"select":case"combobox":return{...n,"aria-selected":t}}return{}},[d,s]);return l.useMemo(()=>({reference:h,floating:g,item:x,trigger:m}),[h,g,m,x])}(h),b=function(e,t={}){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),{dataRef:i}=n.context,{enabled:a=!0,escapeKey:s=!0,outsidePress:u=!0,outsidePressEvent:c="sloppy",referencePress:d=tN,referencePressEvent:f="sloppy",bubbles:p,externalTree:m}=t,h=te(m),g=(0,ep.useStableCallback)("function"==typeof u?u:()=>!1),x="function"==typeof u?g:u,v=!1!==x,y=(0,ep.useStableCallback)(()=>c),b=l.useRef(!1),w=l.useRef(!1),E=l.useRef(!1),{escapeKey:k,outsidePress:S}={escapeKey:"boolean"==typeof p?p:p?.escapeKey??!1,outsidePress:"boolean"==typeof p?p:p?.outsidePress??!0},j=l.useRef(null),C=(0,em.useTimeout)(),R=(0,em.useTimeout)(),N=(0,ep.useStableCallback)(()=>{R.clear(),i.current.insideReactTree=!1}),L=l.useRef(!1),M=l.useRef(""),A=(0,ep.useStableCallback)(d),I=(0,ep.useStableCallback)(e=>{if(!r||!a||!s||"Escape"!==e.key||L.current)return;let t=i.current.floatingContext?.nodeId,o=h?eA(h.nodesRef.current,t):[];if(!k&&o.length>0){let e=!0;if(o.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let l="nativeEvent"in e?e.nativeEvent:e,u=(0,T.createChangeEventDetails)(O.REASONS.escapeKey,l);n.setOpen(!1,u),k||u.isPropagationAllowed||e.stopPropagation()}),P=(0,ep.useStableCallback)(()=>{i.current.insideReactTree=!0,R.start(0,N)});l.useEffect(()=>{if(!r||!a)return;i.current.__escapeKeyBubbles=k,i.current.__outsidePressBubbles=S;let e=new em.Timeout,t=new em.Timeout;function l(){e.clear(),L.current=!0}function u(){e.start(5*!!(0,es.isWebKit)(),()=>{L.current=!1})}function c(){E.current=!0,t.start(0,()=>{E.current=!1})}function d(){b.current=!1,w.current=!1}function f(){let e=M.current,t=y(),n="function"==typeof t?t():t;return"string"==typeof n?n:n["pen"!==e&&e?e:"mouse"]}function p(e){let t=i.current.floatingContext?.nodeId,r=h&&eA(h.nodesRef.current,t).some(t=>(0,eO.isEventTargetWithin)(e,t.context?.elements.floating));return(0,eO.isEventTargetWithin)(e,n.select("floatingElement"))||(0,eO.isEventTargetWithin)(e,n.select("domReferenceElement"))||r}function m(e){let r;if("intentional"===(r=f())&&"click"!==e.type||"sloppy"===r&&"click"===e.type||i.current.insideReactTree)return void N();let o=(0,eO.getTarget)(e),a=`[${eH("inert")}]`,s=Array.from((0,ej.ownerDocument)(n.select("floatingElement")).querySelectorAll(a)),l=(0,es.isElement)(o)?o.getRootNode():null;(0,es.isShadowRoot)(l)&&(s=s.concat(Array.from(l.querySelectorAll(a))));let u=n.context.triggerElements;if(o&&(u.hasElement(o)||u.hasMatchingElement(e=>(0,eO.contains)(e,o))))return;let c=(0,es.isElement)(o)?o:null;for(;c&&!(0,es.isLastTraversableNode)(c);){let e=(0,es.getParentNode)(c);if((0,es.isLastTraversableNode)(e)||!(0,es.isElement)(e))break;c=e}if(s.length&&(0,es.isElement)(o)&&!(0,eO.isRootElement)(o)&&!(0,eO.contains)(o,n.select("floatingElement"))&&s.every(e=>!(0,eO.contains)(c,e)))return;if((0,es.isHTMLElement)(o)&&!("touches"in e)){let t=(0,es.isLastTraversableNode)(o),n=(0,es.getComputedStyle)(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,l=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,u="rtl"===n.direction,c=l&&(u?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(c||d)return}if(p(e))return;if("intentional"===f()&&E.current){t.clear(),E.current=!1;return}if("function"==typeof x&&!x(e))return;let d=i.current.floatingContext?.nodeId,m=h?eA(h.nodesRef.current,d):[];if(m.length>0){let e=!0;if(m.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,(0,T.createChangeEventDetails)(O.REASONS.outsidePress,e)),N()}function g(e){M.current="touch";let t=(0,eO.getTarget)(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!n.select("open")||!a||(0,eO.isEventTargetWithin)(e,n.select("floatingElement"))||(0,eO.isEventTargetWithin)(e,n.select("domReferenceElement")))return;let t=e.touches[0];t&&(j.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},C.start(1e3,()=>{j.current&&(j.current.dismissOnTouchEnd=!1,j.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,r)})}function R(e){if(C.clear(),"pointerdown"===e.type&&(M.current=e.pointerType),"mousedown"===e.type&&j.current&&!j.current.dismissOnMouseDown)return;let t=(0,eO.getTarget)(e);t?.addEventListener(e.type,function r(){if("pointerdown"===e.type)"sloppy"!==f()||"touch"===e.pointerType||!n.select("open")||!a||(0,eO.isEventTargetWithin)(e,n.select("floatingElement"))||(0,eO.isEventTargetWithin)(e,n.select("domReferenceElement"))||m(e);else m(e);t?.removeEventListener(e.type,r)})}function A(e){if(!b.current)return;let n=w.current;if(d(),"intentional"===f()){if("pointercancel"===e.type){n&&c();return}p(e)||(n?c():("function"!=typeof x||x(e))&&(t.clear(),E.current=!0,N())
12)}}function P(e){let t=(0,eO.getTarget)(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!j.current||(0,eO.isEventTargetWithin)(e,n.select("floatingElement"))||(0,eO.isEventTargetWithin)(e,n.select("domReferenceElement")))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-j.current.startX),o=Math.abs(t.clientY-j.current.startY),i=Math.sqrt(r*r+o*o);i>5&&(j.current.dismissOnTouchEnd=!0),i>10&&(m(e),C.clear(),j.current=null)}(e),t?.removeEventListener(e.type,r)})}function _(e){let t=(0,eO.getTarget)(e);t?.addEventListener(e.type,function r(){"sloppy"!==f()||!j.current||(0,eO.isEventTargetWithin)(e,n.select("floatingElement"))||(0,eO.isEventTargetWithin)(e,n.select("domReferenceElement"))||(j.current.dismissOnTouchEnd&&m(e),C.clear(),j.current=null),t?.removeEventListener(e.type,r)})}let D=(0,ej.ownerDocument)(o);return s&&(D.addEventListener("keydown",I),D.addEventListener("compositionstart",l),D.addEventListener("compositionend",u)),v&&(D.addEventListener("click",R,!0),D.addEventListener("pointerdown",R,!0),D.addEventListener("pointerup",A,!0),D.addEventListener("pointercancel",A,!0),D.addEventListener("mousedown",R,!0),D.addEventListener("mouseup",A,!0),D.addEventListener("touchstart",g,!0),D.addEventListener("touchmove",P,!0),D.addEventListener("touchend",_,!0)),()=>{s&&(D.removeEventListener("keydown",I),D.removeEventListener("compositionstart",l),D.removeEventListener("compositionend",u)),v&&(D.removeEventListener("click",R,!0),D.removeEventListener("pointerdown",R,!0),D.removeEventListener("pointerup",A,!0),D.removeEventListener("pointercancel",A,!0),D.removeEventListener("mousedown",R,!0),D.removeEventListener("mouseup",A,!0),D.removeEventListener("touchstart",g,!0),D.removeEventListener("touchmove",P,!0),D.removeEventListener("touchend",_,!0)),e.clear(),t.clear(),d(),E.current=!1}},[i,o,s,v,x,r,a,k,S,I,N,y,h,n,C]),l.useEffect(N,[x,N]);let _=l.useMemo(()=>({onKeyDown:I,[tR[f]]:e=>{A()&&n.setOpen(!1,(0,T.createChangeEventDetails)(O.REASONS.triggerPress,e.nativeEvent))},..."intentional"!==f&&{onClick(e){A()&&n.setOpen(!1,(0,T.createChangeEventDetails)(O.REASONS.triggerPress,e.nativeEvent))}}}),[I,n,f,A]),D=(0,ep.useStableCallback)(e=>{if(!r||!a||0!==e.button)return;let t=(0,eO.getTarget)(e.nativeEvent);(0,eO.contains)(n.select("floatingElement"),t)&&(b.current||(b.current=!0,w.current=!1))}),W=(0,ep.useStableCallback)(e=>{!r||!a||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(w.current=!0)}),B=l.useMemo(()=>({onKeyDown:I,onPointerDown:W,onMouseDown:W,onClickCapture:P,onMouseDownCapture(e){P(),D(e)},onPointerDownCapture(e){P(),D(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[I,P,D,W]);return l.useMemo(()=>a?{reference:_,floating:B,trigger:_}:{},[a,_,B])}(h,{outsidePressEvent:()=>n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(e){if(!n.context.outsidePressEnabledRef.current||"button"in e&&0!==e.button||"touches"in e&&1!==e.touches.length)return!1;let t=(0,eO.getTarget)(e);return!!v&&!a&&(!s||!n.context.internalBackdropRef.current&&!n.context.backdropRef.current||n.context.internalBackdropRef.current===t||n.context.backdropRef.current===t||(0,eO.contains)(t,u)&&!t?.hasAttribute("data-base-ui-portal"))},escapeKey:v});!function(e=!0,t=null){(0,eu.useIsoLayoutEffect)(()=>{if(e)return tC.acquire(t)},[e,t])}(i&&!0===s,u);let{getReferenceProps:w,getFloatingProps:E,getTriggerProps:k}=tO([y,b]);n.useContextCallback("onNestedDialogOpen",e=>{x(e+1)}),n.useContextCallback("onNestedDialogClose",()=>{x(0)}),l.useEffect(()=>(r?.onNestedDialogOpen&&i&&r.onNestedDialogOpen(g),r?.onNestedDialogClose&&!i&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&i&&r.onNestedDialogClose()}),[i,r,g]);let S=l.useMemo(()=>w(d),[w,d]),j=l.useMemo(()=>k(d),[k,d]),C=l.useMemo(()=>E(),[E]);n.useSyncedValues({openMethod:c,activeTriggerProps:S,inactiveTriggerProps:j,popupProps:C,floatingRootContext:h,nestedOpenDialogCount:g})}({store:y,actionsRef:d,parentContext:x?.store.context,onOpenChange:i,triggerIdProp:p});let w=l.useMemo(()=>({store:y}),[y]);return(0,s.jsx)(m.Provider,{value:w,children:"function"==typeof n?n({payload:b}):n})},"Title",0,nl,"Trigger",0,nu,"Viewport",0,ns,"createHandle",0,function(){return new nc}],87913);var nd=e.i(87913),nd=nd,nf=e.i(47163),np=e.i(67881);let nm=(0,d.default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
12],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function nh({...e}){return(0,s.jsx)(nd.Root,{"data-slot":"dialog",...e})}function ng({...e}){return(0,s.jsx)(nd.Portal,{"data-slot":"dialog-portal",...e})}function nx({...e}){return(0,s.jsx)(nd.Close,{"data-slot":"dialog-close",...e})}function nv({className:e,...t}){return(0,s.jsx)(nd.Backdrop,{"data-slot":"dialog-overlay",className:(0,nf.cn)("fixed inset-0 isolate z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs","data-open:animate-in data-open:fade-in-0 data-open:duration-200 data-open:ease-out","data-closed:animate-out data-closed:fade-out-0 data-closed:duration-200 data-closed:ease-in","motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none",e),...t})}let ny=l.forwardRef(function({className:e,children:t,showCloseButton:n=!0,overlayClassName:r,closeButtonClassName:o,...i},a){return(0,s.jsxs)(ng,{children:[(0,s.jsx)(nv,{className:r}),(0,s.jsxs)(nd.Popup,{ref:a,"data-slot":"dialog-content",className:(0,nf.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 outline-none sm:max-w-sm","data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-open:duration-200 data-open:ease-out","data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:duration-200 data-closed:ease-in","motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none",e),...i,children:[t,n&&(0,s.jsxs)(nd.Close,{"data-slot":"dialog-close",render:(0,s.jsx)(np.Button,{variant:"ghost",className:(0,nf.cn)("pointer-events-auto absolute top-2 right-2 z-[100] min-h-11 min-w-11 text-foreground hover:!bg-transparent dark:hover:!bg-transparent hover:!text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",o),size:"icon-sm"}),children:[(0,s.jsx)(nm,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close dialog"})]})]})]})});function nb({className:e,...t}){return(0,s.jsx)(nd.Title,{"data-slot":"dialog-title",className:(0,nf.cn)("text-base leading-none font-medium",e),...t})}function nw({className:e,...t}){return(0,s.jsx)(nd.Description,{"data-slot":"dialog-description",className:(0,nf.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}ny.displayName="DialogContent";var nE=e.i(89204),nk=e.i(23750),nS=e.i(10708),nj=e.i(13192),nC=e.i(84034),nR=e.i(37095),nN=e.i(40118);let nT="automation-newsletter",nO="Unsubscribe anytime. See our",nL="Privacy Policy",nM="/privacy-policy",nA="for how we handle your email.";var nI=e.i(67187);let nP=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,n_=(0,nf.cn)("min-h-11 rounded-xl border-primary/[0.12] bg-white text-foreground","placeholder:text-foreground/35 transition-colors","focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-0 focus-visible:border-accent/40"),nD=(0,nf.cn)("group relative inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-full px-6","font-sans text-sm font-semibold","!border-transparent !bg-accent !text-background","shadow-[0_4px_20px_rgba(28,152,211,0.35)]","transition-all duration-300","[transition-timing-function:cubic-bezier(0.32,0.72,0,1)]","hover:!bg-[#1a88be] hover:shadow-[0_6px_28px_rgba(28,152,211,0.45)]","active:translate-y-0 active:scale-[0.97]","focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2");e.s(["COOKIE_BANNER_POLL_MS",0,400,"LeadMagnetModal",0,function(){let[e,t]=(0,l.useState)(!1),[n,r]=(0,l.useState)("idle"),[o,i]=(0,l.useState)(""),[a,d]=(0,l.useState)(""),[p,m]=(0,l.useState)({}),[h,g]=(0,l.useState)(!1),x=(0,l.useRef)(null),v=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e,n;if((0,nI.shouldShowLeadMagnet)()){if((0,nR.shouldShowCookieBanner)()){let e=0;n=setInterval(()=>{e+=400;let t=!(0,nR.shouldShowCookieBanner)();(t||!(e<8e3))&&(clearInterval(n),n=void 0,r(8e3*!!t))},400)}else r(8e3);return()=>{e&&clearTimeout(e),n&&clearInterval(n)}}function r(n){e=setTimeout(()=>{(0,nI.shouldShowLeadMagnet)()&&(t(!0),(0,nC.capture)(nj.AnalyticsEvents.LEAD_MAGNET_SHOWN,{resource_id:nT}))},n)}},[]),(0,l.useEffect)(()=>{"success"===n&&v.current?.focus()},[n]),(0,l.useEffect)(()=>((0,nN.setConsentBannerSuppressed)(e),()=>{(0,nN.setConsentBannerSuppressed)(!1)}),[e]);let y=(0,l.useCallback)(e=>{t(e),e||"success"===n||((0,nI.saveLeadMagnetDismissal)(),(0,nC.capture)(nj.AnalyticsEvents.LEAD_MAGNET_DISMISSED,{resource_id:nT}))},[n]);async function b(e){let t,n;e.preventDefault();let i=(n={},(t=o.trim()).length>0&&t.length<=254&&nP.test(t)||(n.email="Enter a valid email address."),n);if(m(i),i.email)return void x.current?.focus();g(!1),r("submitting");try{let e=await fetch("/api/lead-magnet",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o.trim(),website:a})}
12),t=await e.json().catch(()=>null);if(!e.ok||!t?.success){g(429===e.status),r("error"),(0,nC.capture)(nj.AnalyticsEvents.LEAD_MAGNET_SUBMIT_ERROR,{resource_id:nT,status:e.status});return}(0,nI.saveLeadMagnetState)("claimed"),r("success"),(0,nC.capture)(nj.AnalyticsEvents.LEAD_MAGNET_SUBMITTED,{resource_id:nT})}catch{g(!1),r("error"),(0,nC.capture)(nj.AnalyticsEvents.LEAD_MAGNET_SUBMIT_ERROR,{resource_id:nT,status:0})}}let w="submitting"===n;return(0,s.jsx)(nh,{open:e,onOpenChange:y,children:(0,s.jsx)(ny,{className:(0,nf.cn)("grid-cols-1 gap-0 rounded-lg border border-border bg-background/95","p-6 shadow-xl ring-0 backdrop-blur-sm md:p-8","max-w-[calc(100%-2rem)] sm:max-w-md","max-h-[calc(100dvh-2rem)] overflow-y-auto"),children:"success"===n?(0,s.jsxs)("div",{ref:v,tabIndex:-1,className:"flex flex-col items-center gap-5 py-2 text-center outline-none","aria-live":"assertive","aria-atomic":"true",role:"status",children:[(0,s.jsx)(f,{className:"size-12 text-primary",strokeWidth:1.75,"aria-hidden":!0}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(nb,{className:"font-heading text-lg font-bold text-foreground",children:"Check your email"}),(0,s.jsx)(nw,{className:"text-sm leading-relaxed text-foreground/70",children:"Click the link we sent to confirm your subscription. If it hasn’t shown up in a minute, look in your spam folder."})]}),(0,s.jsx)(nx,{"data-cta":"lead_magnet_success_done",className:nD,children:"Done"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(nb,{className:"font-heading text-2xl font-bold text-primary",children:"Use automation to grow your field service business"}),(0,s.jsxs)("div",{className:"mt-3 w-full font-sans text-sm text-foreground",children:[(0,s.jsx)(nw,{className:"text-sm leading-relaxed text-foreground/70",children:"Get access to weekly case studies, guides, and articles on automating office work in field service businesses."}),(0,s.jsxs)("form",{className:"mt-6 space-y-4",onSubmit:b,noValidate:!0,"aria-busy":w,children:[(0,s.jsx)("input",{type:"text",name:"website",tabIndex:-1,autoComplete:"off","aria-hidden":"true",value:a,onChange:e=>d(e.target.value),className:"pointer-events-none absolute left-0 top-0 h-px w-px overflow-hidden opacity-0"}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(nS.Label,{htmlFor:"lead-magnet-email",className:"text-sm font-medium text-text/80",children:"Email"}),(0,s.jsx)(nk.Input,{ref:x,id:"lead-magnet-email",name:"email",type:"email",inputMode:"email",autoComplete:"email","data-testid":"lead-magnet-email",placeholder:"[email protected]",value:o,onChange:e=>i(e.target.value),"aria-invalid":!!p.email,"aria-required":"true","aria-errormessage":p.email?"err-lead-magnet-email":void 0,className:n_}),p.email?(0,s.jsx)("p",{id:"err-lead-magnet-email",className:"text-sm text-destructive",role:"alert",children:p.email}):null]}),"error"===n?(0,s.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:h?"We’ve already sent a few confirmation emails to that address. Check your inbox and spam folder, then try again later.":"We couldn’t send the confirmation email. Please check the address and try again."}):null,(0,s.jsx)(np.Button,{type:"submit",className:nD,disabled:w,"data-cta":"lead_magnet_subscribe","aria-busy":w,children:w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Loader2,{className:"size-4 shrink-0 animate-spin motion-reduce:animate-none","aria-hidden":!0}),(0,s.jsx)("span",{children:"Subscribing..."})]}):(0,s.jsxs)(s.Fragment,{children:["Subscribe",(0,s.jsx)("span",{className:"absolute inset-y-0 right-6 flex items-center",children:(0,s.jsx)(nE.CtaArrowIcon,{})})]})}),(0,s.jsxs)("p",{className:"text-xs leading-relaxed text-foreground/55",children:[nO," ",(0,s.jsx)(u.default,{href:nM,className:(0,nf.cn)("font-medium text-accent underline underline-offset-2","hover:text-accent/90","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm"),children:nL})," ",nA]})]})]})]})})})},"MAX_CONSENT_WAIT_MS",0,8e3],34676)}]);

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.