import{r as p,j as i,a as Q,Y as Yr}from"./app-BAHAOwU3.js";import{c as M,X as ai,C as Qt,a as oi,H as Xr}from"./x-DpOGo0Ip.js";/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ne=M("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zr=M("Baby",[["path",{d:"M9 12h.01",key:"157uk2"}],["path",{d:"M15 12h.01",key:"1k8ypt"}],["path",{d:"M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5",key:"1u7htd"}],["path",{d:"M19 6.3a9 9 0 0 1 1.8 3.9 2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1",key:"5yv0yz"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const li=M("Bath",[["path",{d:"M9 6 6.5 3.5a1.5 1.5 0 0 0-1-.5C4.683 3 4 3.683 4 4.5V17a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"1r8yf5"}],["line",{x1:"10",x2:"8",y1:"5",y2:"7",key:"h5g8z4"}],["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["line",{x1:"7",x2:"7",y1:"19",y2:"21",key:"16jp00"}],["line",{x1:"17",x2:"17",y1:"19",y2:"21",key:"1pxrnk"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qr=M("BedDouble",[["path",{d:"M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8",key:"1k78r4"}],["path",{d:"M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4",key:"fb3tl2"}],["path",{d:"M12 4v6",key:"1dcgq2"}],["path",{d:"M2 18h20",key:"ajqnye"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jr=M("Bed",[["path",{d:"M2 4v16",key:"vw9hq8"}],["path",{d:"M2 8h18a2 2 0 0 1 2 2v10",key:"1dgv2r"}],["path",{d:"M2 17h20",key:"18nfp3"}],["path",{d:"M6 8v9",key:"1yriud"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fs=M("Bike",[["circle",{cx:"18.5",cy:"17.5",r:"3.5",key:"15x4ox"}],["circle",{cx:"5.5",cy:"17.5",r:"3.5",key:"1noe27"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["path",{d:"M12 17.5V14l-3-3 4-3 2 3h2",key:"1npguv"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ea=M("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ci=M("ChefHat",[["path",{d:"M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z",key:"1qvrer"}],["path",{d:"M6 17h12",key:"1jwigz"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const At=M("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ta=M("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sa=M("Clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Os=M("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const na=M("Gamepad",[["line",{x1:"6",x2:"10",y1:"12",y2:"12",key:"161bw2"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"15",x2:"15.01",y1:"13",y2:"13",key:"dqpgro"}],["line",{x1:"18",x2:"18.01",y1:"11",y2:"11",key:"meh2c"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ia=M("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vt=M("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jt=M("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const di=M("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ra=M("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aa=M("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oa=M("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const la=M("PartyPopper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12v0c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"bpx1uq"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11v0c-.11.7-.72 1.22-1.43 1.22H17",key:"1pd0s7"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98v0C9.52 4.9 9 5.52 9 6.23V7",key:"zq5xbz"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ca=M("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zs=M("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const da=M("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ua=M("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $s=M("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ha=M("Shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ma=M("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fa=M("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pa=M("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xa=M("Sofa",[["path",{d:"M20 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3",key:"1dgpiv"}],["path",{d:"M2 11v5a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v2H6v-2a2 2 0 0 0-4 0Z",key:"u5qfb7"}],["path",{d:"M4 18v2",key:"jwo5n2"}],["path",{d:"M20 18v2",key:"1ar1qi"}],["path",{d:"M12 4v9",key:"oqhhn3"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ga=M("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qs=M("Trees",[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16v0H5v0h0a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"yh07w9"}],["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"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ya=M("Umbrella",[["path",{d:"M22 12a10.06 10.06 1 0 0-20 0Z",key:"1teyop"}],["path",{d:"M12 12v8a2 2 0 0 0 4 0",key:"ulpmoc"}],["path",{d:"M12 2v1",key:"11qlp1"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ba=M("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const va=M("UtensilsCrossed",[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wa=M("Utensils",[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"1ogz0v"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ja=M("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Na=M("VolumeX",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Us=M("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/**
 * @license lucide-react v0.378.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ws=M("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]),ui=p.createContext(void 0);function ka({children:e}){const[t,s]=p.useState(!1),n=()=>s(!0),r=()=>s(!1);return i.jsx(ui.Provider,{value:{isOpen:t,openModal:n,closeModal:r},children:e})}function X(){const e=p.useContext(ui);if(e===void 0)throw new Error("useWhatsappModal must be used within a WhatsappModalProvider");return e}function Ca(){const[e,t]=p.useState(!1),[s,n]=p.useState(!1),{openModal:r}=X();p.useEffect(()=>{const a=()=>{n(window.scrollY>10)};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[]);const o=()=>{t(!e)};return i.jsxs("nav",{className:`fixed w-full z-50 transition-all duration-300 ${s?"bg-white/60 shadow-md py-4 backdrop-blur-xl":"bg-transparent py-4"}`,children:[i.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("div",{className:"flex-shrink-0",children:i.jsx(Q,{href:"/",className:"flex items-center",children:i.jsx("img",{src:s?"/images/logo.png":"/images/logow.png",className:"w-36",alt:"Karioca Imóveis"})})}),i.jsxs("div",{className:"hidden md:flex md:items-center md:space-x-1",children:[i.jsx(Q,{href:"#conceito",className:"text-[#00227b] hover:text-[#0026bd] px-3 py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:left-0 after:bottom-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-[#0026bd] after:transition-all after:duration-300",children:"Conceito"}),i.jsx(Q,{href:"#fotos",className:"text-[#00227b] hover:text-[#0026bd] px-3 py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:left-0 after:bottom-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-[#0026bd] after:transition-all after:duration-300",children:"Fotos"}),i.jsx(Q,{href:"#plantas",className:"text-[#00227b] hover:text-[#0026bd] px-3 py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:left-0 after:bottom-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-[#0026bd] after:transition-all after:duration-300",children:"Plantas"}),i.jsx(Q,{href:"#lazer",className:"text-[#00227b] hover:text-[#0026bd] px-3 py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:left-0 after:bottom-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-[#0026bd] after:transition-all after:duration-300",children:"Lazer"}),i.jsx(Q,{href:"#localizacao",className:"text-[#00227b] hover:text-[#0026bd] px-3 py-2 text-sm font-medium transition-colors duration-200 relative after:absolute after:left-0 after:bottom-0 after:h-0.5 after:w-0 hover:after:w-full after:bg-[#0026bd] after:transition-all after:duration-300",children:"Localização"}),i.jsx("button",{onClick:r,className:"ml-4 px-5 py-2 bg-[#0026bd] hover:bg-[#00227b] text-white rounded-md text-sm font-medium transition-colors duration-200 shadow-md hover:shadow-lg cursor-pointer",children:"Contato"})]}),i.jsx("div",{className:"md:hidden",children:i.jsx("button",{onClick:o,className:"inline-flex items-center justify-center p-2 rounded-md text-[#00227b] hover:text-[#0026bd] hover:bg-gray-100 focus:outline-none transition duration-150 ease-in-out",children:e?i.jsx(ai,{className:"block h-6 w-6"}):i.jsx(ra,{className:"block h-6 w-6"})})})]})}),i.jsx("div",{className:`${e?"block":"hidden"} md:hidden bg-white shadow-lg absolute w-full`,children:i.jsxs("div",{className:"px-2 pt-2 pb-3 space-y-1",children:[i.jsx(Q,{href:"#conceito",className:"block px-3 py-2 text-[#00227b] hover:text-[#0026bd] hover:bg-gray-50 rounded-md text-base font-medium transition-colors duration-200",onClick:()=>t(!1),children:"Conceito"}),i.jsx(Q,{href:"#fotos",className:"block px-3 py-2 text-[#00227b] hover:text-[#0026bd] hover:bg-gray-50 rounded-md text-base font-medium transition-colors duration-200",onClick:()=>t(!1),children:"Fotos"}),i.jsx(Q,{href:"#plantas",className:"block px-3 py-2 text-[#00227b] hover:text-[#0026bd] hover:bg-gray-50 rounded-md text-base font-medium transition-colors duration-200",onClick:()=>t(!1),children:"Plantas"}),i.jsx(Q,{href:"#lazer",className:"block px-3 py-2 text-[#00227b] hover:text-[#0026bd] hover:bg-gray-50 rounded-md text-base font-medium transition-colors duration-200",onClick:()=>t(!1),children:"Lazer"}),i.jsx(Q,{href:"#localizacao",className:"block px-3 py-2 text-[#00227b] hover:text-[#0026bd] hover:bg-gray-50 rounded-md text-base font-medium transition-colors duration-200",onClick:()=>t(!1),children:"Localização"}),i.jsx("button",{onClick:()=>{t(!1),r()},className:"block w-full text-left px-3 py-2 bg-[#0026bd] text-white rounded-md text-base font-medium mt-4 cursor-pointer",children:"Contato"})]})})]})}function hi(e){const t=e.replace(/\D/g,"");return t.length<=2?t:t.length<=7?`(${t.slice(0,2)})${t.slice(2)}`:t.length<=11?`(${t.slice(0,2)})${t.slice(2,7)}-${t.slice(7)}`:`(${t.slice(0,2)})${t.slice(2,7)}-${t.slice(7,11)}`}function mi({isOpen:e,onClose:t}){p.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]);const[s,n]=p.useState(0),[r,o]=p.useState(""),[a,l]=p.useState(""),[c,u]=p.useState(""),[d,h]=p.useState(!1),[m,f]=p.useState(!1),y=()=>{n(0),o(""),l(""),u(""),h(!1),f(!1)},x=(j,v)=>{j.key==="Enter"&&(j.preventDefault(),v())},w=()=>{h(!0),a.replace(/\D/g,"");const j="5521935057625",v=encodeURIComponent(`Olá! Sou ${r} e tenho interesse em ${c==="morar"?"um apartamento para morar":c==="investir"?"um imóvel para investimento":"informações sobre os imóveis da Karioca"}.`);setTimeout(()=>{h(!1),f(!0),setTimeout(()=>{window.open(`https://wa.me/${j}?text=${v}`,"_blank")},1500)},1e3)},b=()=>{t(),setTimeout(y,300)};return e?i.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4 animate-fadeIn",children:i.jsxs("div",{className:"bg-white w-full max-w-lg rounded-xl shadow-2xl overflow-hidden",children:[i.jsxs("div",{className:"bg-gradient-to-r from-[#00227b] to-[#0026bd] p-4 flex justify-between items-center",children:[i.jsx("img",{src:"/images/logow.png",className:"w-32 mx-auto",alt:""}),i.jsx("button",{onClick:b,className:"text-white/80 hover:text-white transition-colors",children:i.jsx(ai,{className:"h-5 w-5"})})]}),i.jsx("div",{className:"h-1 bg-gray-100",children:i.jsx("div",{className:"h-full bg-[#0026bd] transition-all duration-500",style:{width:m?"100%":`${s/3*100}%`}})}),i.jsxs("div",{className:"p-6",children:[!d&&!m&&i.jsxs(i.Fragment,{children:[s===0&&i.jsxs("div",{className:"animate-slideUp",children:[i.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"Qual é o seu nome?"}),i.jsx("p",{className:"text-gray-500 mb-6",children:"Para que possamos te atender melhor"}),i.jsx("input",{type:"text",value:r,onChange:j=>o(j.target.value),onKeyPress:j=>r.trim()&&x(j,()=>n(1)),placeholder:"Digite seu nome completo",className:"w-full p-4 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#0026bd] focus:border-transparent mb-6",autoFocus:!0}),i.jsxs("button",{onClick:()=>n(1),disabled:!r.trim(),className:"flex items-center justify-center w-full bg-[#0026bd] text-white py-3 rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:["Continuar ",i.jsx(ne,{className:"ml-2 h-4 w-4"})]})]}),s===1&&i.jsxs("div",{className:"animate-slideUp",children:[i.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"Qual é o seu WhatsApp?"}),i.jsx("p",{className:"text-gray-500 mb-6",children:"Para que possamos continuar a conversa"}),i.jsx("input",{type:"tel",value:a,onChange:j=>l(hi(j.target.value)),onKeyDown:j=>a.trim()&&x(j,()=>n(2)),placeholder:"(21)99999-9999",className:"w-full p-4 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#0026bd] focus:border-transparent mb-6",autoFocus:!0,maxLength:15}),i.jsxs("div",{className:"flex space-x-3",children:[i.jsx("button",{onClick:()=>n(0),className:"flex items-center justify-center w-1/3 bg-gray-100 text-gray-700 py-3 rounded-lg font-medium hover:bg-gray-200",children:"Voltar"}),i.jsxs("button",{onClick:()=>n(2),disabled:!a.trim(),className:"flex items-center justify-center w-2/3 bg-[#0026bd] text-white py-3 rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:["Continuar ",i.jsx(ne,{className:"ml-2 h-4 w-4"})]})]})]}),s===2&&i.jsxs("div",{className:"animate-slideUp",children:[i.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"O que você está buscando?"}),i.jsx("p",{className:"text-gray-500 mb-6",children:"Selecione a opção que melhor descreve seu interesse"}),i.jsxs("div",{className:"space-y-3 mb-6",children:[i.jsx("button",{onClick:()=>u("morar"),className:`w-full p-4 rounded-lg border text-left ${c==="morar"?"border-[#0026bd] bg-blue-50 text-[#0026bd]":"border-gray-300 hover:border-gray-400"}`,children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:`w-5 h-5 rounded-full border flex items-center justify-center ${c==="morar"?"border-[#0026bd]":"border-gray-400"}`,children:c==="morar"&&i.jsx("div",{className:"w-3 h-3 rounded-full bg-[#0026bd]"})}),i.jsx("span",{className:"ml-3 font-medium",children:"Apartamento para morar"})]})}),i.jsx("button",{onClick:()=>u("investir"),className:`w-full p-4 rounded-lg border text-left ${c==="investir"?"border-[#0026bd] bg-blue-50 text-[#0026bd]":"border-gray-300 hover:border-gray-400"}`,children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:`w-5 h-5 rounded-full border flex items-center justify-center ${c==="investir"?"border-[#0026bd]":"border-gray-400"}`,children:c==="investir"&&i.jsx("div",{className:"w-3 h-3 rounded-full bg-[#0026bd]"})}),i.jsx("span",{className:"ml-3 font-medium",children:"Imóvel para investimento"})]})}),i.jsx("button",{onClick:()=>u("informacoes"),className:`w-full p-4 rounded-lg border text-left ${c==="informacoes"?"border-[#0026bd] bg-blue-50 text-[#0026bd]":"border-gray-300 hover:border-gray-400"}`,children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:`w-5 h-5 rounded-full border flex items-center justify-center ${c==="informacoes"?"border-[#0026bd]":"border-gray-400"}`,children:c==="informacoes"&&i.jsx("div",{className:"w-3 h-3 rounded-full bg-[#0026bd]"})}),i.jsx("span",{className:"ml-3 font-medium",children:"Apenas informações gerais"})]})})]}),i.jsxs("div",{className:"flex space-x-3",children:[i.jsx("button",{onClick:()=>n(1),className:"flex items-center justify-center w-1/3 bg-gray-100 text-gray-700 py-3 rounded-lg font-medium hover:bg-gray-200",children:"Voltar"}),i.jsxs("button",{onClick:w,disabled:!c,className:"flex items-center justify-center w-2/3 bg-[#0026bd] text-white py-3 rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:["Finalizar ",i.jsx(ne,{className:"ml-2 h-4 w-4"})]})]})]})]}),d&&i.jsxs("div",{className:"animate-fadeIn flex flex-col items-center justify-center py-12",children:[i.jsx("div",{className:"w-16 h-16 border-4 border-gray-200 border-t-[#0026bd] rounded-full animate-spin mb-6"}),i.jsx("p",{className:"text-gray-600 font-medium",children:"Conectando ao WhatsApp..."})]}),m&&i.jsxs("div",{className:"animate-fadeIn flex flex-col items-center justify-center py-12",children:[i.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-6",children:i.jsx(Qt,{className:"h-8 w-8 text-green-500"})}),i.jsx("h3",{className:"text-xl font-bold text-gray-800 mb-2",children:"Tudo pronto!"}),i.jsx("p",{className:"text-gray-600 mb-6 text-center",children:"Você será redirecionado para o WhatsApp para falar com um de nossos consultores."}),i.jsx("p",{className:"text-sm text-gray-500 text-center",children:"Se o redirecionamento não acontecer automaticamente, clique no botão abaixo."})]})]})]})}):null}function Ta(){const[e,t]=p.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>t(!0),className:"fixed bottom-6 right-6 z-40 bg-green-500 hover:bg-green-600 text-white rounded-full w-16 h-16 flex items-center justify-center shadow-lg hover:shadow-xl transform hover:scale-105 transition-all duration-300","aria-label":"Abrir chat WhatsApp",children:i.jsx(aa,{className:"h-8 w-8"})}),i.jsx(mi,{isOpen:e,onClose:()=>t(!1)})]})}function Sa(){const{isOpen:e,closeModal:t}=X();return i.jsx(mi,{isOpen:e,onClose:t})}function Pa({children:e,showHero:t=!0}){return i.jsxs(ka,{children:[i.jsxs("div",{className:"min-h-screen bg-gray-50",children:[i.jsx(Ca,{}),i.jsx("main",{children:e}),i.jsx(Ta,{}),i.jsxs("footer",{className:"bg-gray-900 relative text-white py-12",children:[i.jsx("img",{src:"/images/bg.png",alt:"",className:"absolute opacity-10 top-0 left-0 w-full h-full z-0 object-cover"}),i.jsxs("div",{className:"max-w-7xl relative z-10 mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[i.jsxs("div",{children:[i.jsx("img",{src:"/images/logow.png",alt:"Karioca Imóveis",className:"h-12 mb-4"}),i.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"CRECI: 5933J"}),i.jsx("p",{className:"text-gray-400",children:"lorem ipsum dolor sit amet consectetur adipisicing elit. llorem ipsum dolor sit amet consectetur adipisicing elit."})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Contato"}),i.jsx("p",{className:"text-gray-400 mb-2",children:"contato@kariocaimoveis.com.br"}),i.jsx("p",{className:"text-gray-400",children:"(21) 93505-7625"}),i.jsx("p",{className:"text-gray-400",children:"(21) 3683-4048"})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Redes Sociais"}),i.jsxs("div",{className:"flex space-x-4",children:[i.jsxs("a",{href:"https://www.instagram.com/kariocaimoveis/",className:"text-gray-400 hover:text-white transition-colors",children:[i.jsx("span",{className:"sr-only",children:"Instagram"}),i.jsx("svg",{className:"h-6 w-6",fill:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{fillRule:"evenodd",d:"M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z",clipRule:"evenodd"})})]}),i.jsxs("a",{href:"https://www.facebook.com/kariocaimoveis.oficial",className:"text-gray-400 hover:text-white transition-colors",children:[i.jsx("span",{className:"sr-only",children:"Facebook"}),i.jsx("svg",{className:"h-6 w-6",fill:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{fillRule:"evenodd",d:"M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z",clipRule:"evenodd"})})]})]})]})]}),i.jsxs("div",{className:"mt-8 border-t border-gray-800 pt-8 text-center text-sm text-gray-400",children:["© ",new Date().getFullYear()," Karioca Imóveis. Todos os direitos reservados."]})]})]})]}),i.jsx(Sa,{})]})}function Ma(){const[e,t]=p.useState(!1),s=p.useRef(null),n=p.useRef(null),{openModal:r}=X(),o=()=>{n.current&&(n.current.muted=!1,n.current.currentTime=0,n.current.play(),t(!0))},a=()=>{n.current&&(n.current.paused?(n.current.muted=!1,n.current.play(),t(!0)):(n.current.pause(),t(!1)))};p.useEffect(()=>{const c=new IntersectionObserver(u=>{u.forEach(d=>{!d.isIntersecting&&n.current&&!n.current.paused&&(n.current.pause(),t(!1))})},{threshold:.3});return s.current&&c.observe(s.current),()=>{s.current&&c.unobserve(s.current)}},[]);const l=[{name:"Breve Lançamento",date:"",completed:!0},{name:"Lançamento",date:"Outubro 2022",completed:!0},{name:"Em construção",date:"",completed:!0},{name:"Pronto",date:"Janeiro 2025",completed:!1}];return i.jsxs("section",{ref:s,id:"conceito",className:"relative py-20 overflow-hidden bg-white",children:[i.jsxs("div",{className:"absolute right-0 top-0 w-1/2 h-full z-0 opacity-20 lg:opacity-95",children:[i.jsx("img",{src:"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",alt:"Vista aérea do empreendimento",className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-l from-transparent to-white"})]}),i.jsx("div",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[i.jsxs("div",{className:"space-y-8",children:[i.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-[#00227b] mb-2",children:"Residencial Barra Premium"}),i.jsx("p",{className:"text-gray-700 leading-relaxed",children:"O mais novo bairro planejado da Carvalho Hosken, na Barra da Tijuca, oferece uma experiência única de moradia com ampla infraestrutura de lazer e segurança. Localizado próximo à Avenida Ayrton Senna, o empreendimento conta com fácil acesso a shoppings, praias e parques."}),i.jsx("p",{className:"text-gray-700 leading-relaxed",children:"Apartamentos de 2 e 3 quartos com varanda, acabamento premium e opção de planta flexível para atender diferentes necessidades. Todos os apartamentos possuem vaga de garagem e infraestrutura para ar-condicionado split."}),i.jsxs("div",{className:"flex space-x-4",children:[i.jsx("button",{onClick:r,className:"inline-block bg-[#0026bd] text-white px-8 py-4 rounded-md font-bold text-lg hover:bg-[#00227b] transition-colors cursor-pointer",children:"Quero mais informações"}),i.jsx("a",{href:"#plantas",className:"inline-block bg-white text-[#0026bd] border border-[#0026bd] px-8 py-4 rounded-md font-bold text-lg hover:bg-gray-50 transition-colors",children:"Ver plantas"})]}),i.jsxs("div",{className:"mt-12 pt-8",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsx("h3",{className:"text-xl font-semibold text-gray-800",children:"Status da obra"}),i.jsx("div",{className:"bg-blue-50 text-[#0026bd] text-sm font-medium px-3 py-1 rounded-full",children:"75% concluído"})]}),i.jsx("div",{className:"bg-white  rounded-xl overflow-hidden border border-dashed border-[#0026bd]",children:i.jsxs("div",{className:"relative p-4",children:[i.jsx("div",{className:"absolute left-10 top-0 bottom-0 w-0.5 bg-gray-100"}),l.map((c,u)=>i.jsxs("div",{className:"relative mb-6 last:mb-0 pl-10",children:[i.jsx("div",{className:`absolute left-0 w-12 h-12 rounded-full border-2 ${c.completed?"border-[#0026bd] bg-white":"border-gray-200 bg-gray-50"} flex items-center justify-center z-10 ${!c.completed&&"animate-pulse"}`,children:c.completed?i.jsx("div",{className:"bg-[#0026bd] w-8 h-8 rounded-full flex items-center justify-center",children:i.jsx(ta,{className:"w-4 h-4 text-white"})}):i.jsx("div",{className:"text-lg font-bold text-gray-300",children:u+1})}),i.jsxs("div",{className:`pl-4 ${c.completed?"":"opacity-60"}`,children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("h4",{className:`text-base font-bold ${c.completed?"text-[#00227b]":"text-gray-500"}`,children:c.name}),c.date&&i.jsxs("div",{className:"flex items-center ml-2",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 text-gray-400 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.jsx("span",{className:"text-xs text-gray-500",children:c.date})]})]}),i.jsx("p",{className:"text-gray-600 text-xs mt-1",children:c.completed?"Etapa concluída com sucesso!":u===2?"Em andamento. Acompanhe o progresso.":"Aguardando início da etapa."})]})]},u))]})})]})]}),i.jsxs("div",{className:"hidden lg:block relative rounded-lg overflow-hidden shadow-xl",children:[i.jsx("video",{ref:n,src:"/images/SaveClip.App_AQNva030ZnGFXzwm4E8jKT0udMqYqYFyKeemwd_Clp62Y-SxsBNyE0xrCiNtgRlSaWk_PdI0bBd2lGz8LBqBqQKNONVhvg8-cgjAfx8.mp4",className:"w-full h-auto max-h-[650px] object-cover rounded-lg cursor-pointer",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onClick:a}),!e&&i.jsx("button",{onClick:o,className:"absolute inset-0 flex items-center justify-center bg-black/30 hover:bg-black/40 transition-colors group","aria-label":"Reproduzir vídeo com som",children:i.jsx("div",{className:"w-16 h-16 rounded-full bg-white/80 flex items-center justify-center group-hover:scale-110 transition-transform",children:i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8 text-[#00227b]",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M8 5v14l11-7z"})})})})]})]})})]})}function Aa(){X();const e=[{id:7,title:"Cozinha Gourmet",src:"https://images.unsplash.com/photo-1556912172-45b7abe8b7e1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1556912172-45b7abe8b7e1?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:8,title:"Banheiro Suíte",src:"https://images.unsplash.com/photo-1584622650111-993a426fbf0a?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1584622650111-993a426fbf0a?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:9,title:"Academia",src:"https://images.unsplash.com/photo-1534438327276-14e5300c3a48?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1534438327276-14e5300c3a48?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:10,title:"Espaço Gourmet",src:"https://images.unsplash.com/photo-1505691938895-1758d7feb511?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1505691938895-1758d7feb511?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:11,title:"Playground",src:"https://images.unsplash.com/photo-1596997000103-e597b3ca50df?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1596997000103-e597b3ca50df?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:12,title:"Vista Aérea",src:"https://images.unsplash.com/photo-1564501049412-61c2a3083791?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1564501049412-61c2a3083791?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:1,title:"Fachada do Empreendimento",src:"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:2,title:"Área de Lazer",src:"https://images.unsplash.com/photo-1576013551627-0cc20b96c2a7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1576013551627-0cc20b96c2a7?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:3,title:"Piscina",src:"https://images.unsplash.com/photo-1572331165267-854da2b10ccc?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1572331165267-854da2b10ccc?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:4,title:"Sala de Estar",src:"https://images.unsplash.com/photo-1560185007-c5ca9d2c014d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1560185007-c5ca9d2c014d?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:5,title:"Quarto Principal",src:"https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"},{id:6,title:"Vista da Varanda",src:"https://images.unsplash.com/photo-1564013799919-ab600027ffc6?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",thumbnail:"https://images.unsplash.com/photo-1564013799919-ab600027ffc6?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80"}],[t,s]=p.useState(e[0]),[n,r]=p.useState(0),o=6,a=Math.ceil(e.length/o),l=p.useCallback(()=>{const h=n*o,m=Math.min(h+o,e.length);return e.slice(h,m)},[n,e,o]),c=p.useMemo(()=>l(),[l]);p.useCallback(()=>{r(h=>(h+1)%a)},[a,e.length]),p.useCallback(()=>{r(h=>(h-1+a)%a)},[a]);const u=()=>{const m=(e.findIndex(y=>y.id===t.id)+1)%e.length;s(e[m]);const f=Math.floor(m/o);f!==n&&r(f)},d=()=>{const m=(e.findIndex(y=>y.id===t.id)-1+e.length)%e.length;s(e[m]);const f=Math.floor(m/o);f!==n&&r(f)};return p.useEffect(()=>{const h=e.findIndex(f=>f.id===t.id),m=Math.floor(h/o);m!==n&&r(m)},[t,n]),i.jsx("section",{id:"fotos",className:"py-10 bg-white",children:i.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"grid grid-cols-1 gap-8",children:[i.jsxs("div",{className:"relative aspect-[16/7] overflow-hidden rounded-lg shadow-lg group",children:[i.jsx("img",{src:t.src,alt:t.title,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-6",children:i.jsx("h3",{className:"text-white text-xl font-semibold",children:t.title})}),i.jsx("button",{onClick:d,className:"absolute left-4 top-1/2 -translate-y-1/2 bg-[#0026bd] hover:bg-[#0026bd]/40 backdrop-blur-sm text-white p-2 rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-300 shadow-lg","aria-label":"Imagem anterior",children:i.jsx(At,{size:24})}),i.jsx("button",{onClick:u,className:"absolute right-4 top-1/2 -translate-y-1/2 bg-[#0026bd] hover:bg-[#0026bd]/40 backdrop-blur-sm text-white p-2 rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-300 shadow-lg","aria-label":"Próxima imagem",children:i.jsx(oi,{size:24})}),i.jsxs("div",{className:"absolute top-4 right-4 bg-black/50 text-white text-sm px-3 py-1 rounded-full backdrop-blur-sm",children:[e.findIndex(h=>h.id===t.id)+1," / ",e.length]})]}),i.jsx("div",{className:"flex justify-center items-center gap-2 sm:gap-3 py-2 px-1",children:i.jsx("div",{className:"flex gap-2 sm:gap-3",children:c.map(h=>i.jsxs("div",{onClick:()=>s(h),className:`
                    cursor-pointer overflow-hidden rounded-md relative
                    ${t.id===h.id?"ring-2 ring-[#0026bd]":"ring-1 ring-gray-200"}
                    transition-all duration-200 hover:opacity-90
                    w-16 h-12 sm:w-20 sm:h-14 flex-shrink-0
                  `,children:[i.jsx("img",{src:h.thumbnail,alt:h.title,className:"w-full h-full object-cover"}),t.id===h.id&&i.jsx("div",{className:"absolute inset-0 bg-[#0026bd]/20"})]},h.id))})}),a>1&&i.jsx("div",{className:"flex justify-center mt-2",children:i.jsx("div",{className:"flex gap-1",children:Array.from({length:a}).map((h,m)=>i.jsx("button",{onClick:()=>r(m),className:`w-2 h-2 rounded-full ${n===m?"bg-[#0026bd]":"bg-gray-300"}`,"aria-label":`Página ${m+1}`},m))})})]})})})}function Va(){const{openModal:e}=X(),t=[{id:1,name:"Planta Tipo A",description:"2 quartos com varanda",area:"58m²",image:"https://images.unsplash.com/photo-1628744448840-55bdb2497bd4?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",details:{bedrooms:2,bathrooms:1,suites:1,livingRooms:1,kitchenType:"americana",hasBalcony:!0,hasServiceArea:!0},features:[{name:"Suíte master",description:"Com closet e banheiro privativo"},{name:"Varanda gourmet",description:"Espaço para churrasqueira"},{name:"Cozinha americana",description:"Integrada com sala de jantar"},{name:"Área de serviço",description:"Com espaço para máquina de lavar"}]},{id:2,name:"Planta Tipo B",description:"2 quartos com varanda e escritório",area:"65m²",image:"https://images.unsplash.com/photo-1628744404137-0a878a7157a4?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",details:{bedrooms:2,bathrooms:1,suites:1,livingRooms:1,kitchenType:"americana",hasBalcony:!0,hasServiceArea:!0,hasOffice:!0},features:[{name:"Suíte master",description:"Com closet e banheiro privativo"},{name:"Escritório",description:"Espaço flexível para home office"},{name:"Varanda gourmet",description:"Com vista panorâmica"},{name:"Cozinha americana",description:"Integrada com sala de jantar"},{name:"Área de serviço",description:"Com espaço para máquina de lavar"}]},{id:3,name:"Planta Tipo C",description:"3 quartos com varanda",area:"72m²",image:"https://images.unsplash.com/photo-1628744876497-eb30460be9f6?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",details:{bedrooms:3,bathrooms:2,suites:2,livingRooms:1,kitchenType:"americana",hasBalcony:!0,hasServiceArea:!0,hasLavabo:!0},features:[{name:"2 suítes",description:"Ambas com banheiro privativo"},{name:"Varanda gourmet",description:"Amplo espaço para entretenimento"},{name:"Cozinha americana",description:"Integrada com sala de jantar"},{name:"Área de serviço",description:"Com espaço para máquina de lavar"},{name:"Lavabo",description:"Banheiro social para visitas"}]}],[s,n]=p.useState(t[0]);return i.jsx("section",{id:"plantas",className:"py-10 bg-white",children:i.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[i.jsxs("div",{className:"lg:col-span-1",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-[#00227b]",children:"Plantas"}),i.jsx("div",{className:"w-20 h-1 bg-[#0026bd] mx-auto mt-2"}),i.jsx("p",{className:"mt-4 text-lg text-gray-600",children:"Escolha a planta ideal para você e sua família"})]}),i.jsxs("div",{className:"bg-gray-50 rounded-lg p-6 shadow-md sticky top-24",children:[i.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-4",children:"Opções disponíveis"}),i.jsx("div",{className:"space-y-3",children:t.map(r=>i.jsx("div",{onClick:()=>n(r),className:`
                      p-4 rounded-md cursor-pointer transition-all
                      ${s.id===r.id?"bg-[#00227b] text-white shadow-md":"bg-white hover:bg-gray-100 border border-gray-200"}
                    `,children:i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsxs("div",{children:[i.jsx("h4",{className:`font-medium ${s.id===r.id?"text-white":"text-gray-800"}`,children:r.name}),i.jsx("p",{className:`text-sm ${s.id===r.id?"text-white/80":"text-white font-black"}`,children:r.description})]}),i.jsx("div",{className:`text-right ${s.id===r.id?"text-white":"text-[#0026bd]"}`,children:i.jsx("span",{className:"font-bold",children:r.area})})]})},r.id))}),i.jsx("div",{className:"mt-6",children:i.jsx("button",{onClick:e,className:"block w-full bg-[#0026bd] text-white text-center px-4 py-3 rounded-md font-medium hover:bg-[#00227b] transition-colors cursor-pointer",children:"Solicitar informações"})})]})]}),i.jsx("div",{className:"lg:col-span-2",children:i.jsx("div",{className:"bg-white rounded-lg overflow-hidden shadow-lg border border-gray-100",children:i.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden",children:[i.jsx("div",{className:"absolute top-4 right-4 z-10",children:i.jsxs("a",{href:"#tour-360",className:"flex items-center gap-2 bg-[#0026bd] backdrop-blur-md hover:bg-[#0026bd]/80 text-white px-4 py-2 rounded-full transition-all shadow-lg border border-white/30 font-medium",onClick:r=>{r.preventDefault(),alert("Tour 360° será aberto em breve!")},children:[i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("circle",{cx:"12",cy:"12",r:"4"}),i.jsx("line",{x1:"21.17",y1:"8",x2:"12",y2:"8"}),i.jsx("line",{x1:"3.95",y1:"6.06",x2:"8.54",y2:"14"}),i.jsx("line",{x1:"10.88",y1:"21.94",x2:"15.46",y2:"14"})]}),"Tour 360°"]})}),i.jsx("img",{src:s.image,alt:`Planta ${s.name}`,className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute bg-blue bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-6",children:i.jsxs("div",{className:"flex bg-gradient-to-br from-[#00227b]/80 to-[#0026bd]/80 p-6 rounded-xl shadow-lg border border-white/30 text-white mt-10 lg:mt-0 backdrop-blur-sm  flex-wrap gap-6  border-b border-gray-100",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-white/20 backdrop-blur-2xl flex items-center justify-center mr-3",children:i.jsx(Qr,{className:"h-5 w-5 text-white"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-white font-black",children:"Quartos"}),i.jsx("p",{className:"font-medium",children:s.details.bedrooms})]})]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-white/20 backdrop-blur-2xl flex items-center justify-center mr-3",children:i.jsx(li,{className:"h-5 w-5 text-white"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-white font-black",children:"Banheiros"}),i.jsx("p",{className:"font-medium",children:s.details.bathrooms})]})]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-white/20 backdrop-blur-2xl flex items-center justify-center mr-3",children:i.jsx(di,{className:"h-5 w-5 text-white"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-white font-black",children:"Área"}),i.jsx("p",{className:"font-medium",children:s.area})]})]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-white/20 backdrop-blur-2xl flex items-center justify-center mr-3",children:i.jsx(ci,{className:"h-5 w-5 text-white"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-white font-black",children:"Cozinha"}),i.jsx("p",{className:"font-medium capitalize",children:s.details.kitchenType})]})]})]})})]})})})]})})})}function Ra(){const{openModal:e}=X();return i.jsx("section",{id:"localizacao",className:"py-10 bg-white",children:i.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-[#00227b]",children:"Localização Privilegiada"}),i.jsx("div",{className:"w-20 h-1 bg-[#0026bd] mx-auto mt-2"}),i.jsx("p",{className:"mt-4 text-lg text-gray-600 max-w-2xl mx-auto",children:"Desfrute de uma localização estratégica na Barra da Tijuca, com fácil acesso a tudo que você precisa para viver bem."})]}),i.jsxs("div",{className:"relative rounded-xl overflow-hidden shadow-xl mb-12",children:[i.jsx("div",{className:"aspect-[21/9] w-full",children:i.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3673.6908533307567!2d-43.31492492538548!3d-22.969392079201766!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x9bda2ed54ec2e1%3A0x4431d262cad1d163!2sAv.%20das%20Am%C3%A9ricas%2C%204200%20-%20Barra%20da%20Tijuca%2C%20Rio%20de%20Janeiro%20-%20RJ%2C%2022640-102!5e0!3m2!1spt-BR!2sbr!4v1687887421979!5m2!1spt-BR!2sbr",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Localização do Residencial Barra Premium"})}),i.jsx("div",{className:"absolute bottom-6 left-6 bg-white/90 backdrop-blur-md p-6 rounded-lg shadow-lg max-w-md",children:i.jsxs("div",{className:"flex items-start",children:[i.jsx("div",{className:"bg-[#0026bd] rounded-full p-3",children:i.jsx(Jt,{className:"h-6 w-6 text-white"})}),i.jsxs("div",{className:"ml-4",children:[i.jsx("h3",{className:"text-xl font-bold text-[#00227b]",children:"Residencial Barra Premium"}),i.jsx("p",{className:"text-gray-700",children:"Av. das Américas, 4200 - Barra da Tijuca"}),i.jsx("p",{className:"text-gray-700",children:"Rio de Janeiro - RJ"}),i.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:i.jsx("button",{onClick:e,className:"inline-flex items-center text-white bg-[#0026bd] hover:bg-[#00227b] px-3 py-1 rounded-md font-medium transition-colors cursor-pointer ml-2",children:i.jsx("span",{children:"Agendar visita"})})})]})]})})]})]})})}function Da(){const{openModal:e}=X();return i.jsx("section",{className:"py-16 bg-gray-50",id:"financiamento",children:i.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:i.jsx("div",{className:"bg-gradient-to-r  from-[#00227b] to-[#0026bd] rounded-2xl overflow-hidden shadow-xl",children:i.jsxs("div",{className:"grid grid-cols-1 relative md:grid-cols-2 gap-6",children:[i.jsxs("div",{className:"p-8",children:[i.jsx("h2",{className:"text-4xl max-w-md font-bold text-white mb-4",children:"Tem um imóvel Karioca pra você!"}),i.jsx("p",{className:"text-white/90 mb-6",children:"Conheça nossas opções de imóveis à venda, casas ou apartamentos, para você conquistar a casa própria. Aproveite para conhecer mais sobre financiamento imobiliário e como a Karioca pode te ajudar a transformar o seu futuro hoje!"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-6",children:[i.jsxs("div",{className:"bg-white rounded-xl p-4 shadow-md",children:[i.jsx("div",{className:"flex items-center mb-2",children:i.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Caixa_Econômica_Federal_logo.svg/2560px-Caixa_Econômica_Federal_logo.svg.png",alt:"Logo Caixa",className:"h-6 mx-auto"})}),i.jsxs("div",{className:"text-center py-1",children:[i.jsx("span",{className:"text-orange-500 font-semibold text-sm",children:"Financiamento"}),i.jsx("div",{className:"text-orange-500 font-bold text-sm",children:"Entrada Facilitada"})]})]}),i.jsxs("div",{className:"bg-green-500 rounded-xl p-4 text-white text-center",children:[i.jsx("div",{className:"text-xl font-bold mb-1",children:"$"}),i.jsx("div",{className:"font-semibold text-sm mb-1",children:"Simule seu financiamento"}),i.jsx("div",{className:"text-xs",children:"Condições facilitadas"})]})]})]}),i.jsxs("div",{className:"bg-white p-8 rounded-r-2xl",children:[i.jsx("h3",{className:"text-xl font-bold text-[#00227b] mb-4",children:"Simule seu financiamento"}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg border border-gray-200",children:[i.jsx("h4",{className:"font-semibold text-gray-800 mb-2",children:"Vantagens do financiamento"}),i.jsxs("ul",{className:"space-y-2 text-sm",children:[i.jsxs("li",{className:"flex items-center",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-green-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Entrada facilitada"]}),i.jsxs("li",{className:"flex items-center",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-green-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Taxas de juros reduzidas"]}),i.jsxs("li",{className:"flex items-center",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-green-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Financiamento em até 35 anos"]}),i.jsxs("li",{className:"flex items-center",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-green-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Possibilidade de usar FGTS"]})]})]}),i.jsx("div",{className:"pt-2",children:i.jsxs("button",{onClick:e,className:"w-full bg-[#0026bd] text-white px-6 py-3 rounded-md font-bold text-lg hover:bg-[#00227b] transition-colors shadow-md cursor-pointer flex items-center justify-center",children:[i.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),"Solicitar simulação"]})}),i.jsx("p",{className:"text-xs text-gray-500 text-center mt-2",children:"Fale com um de nossos consultores para uma simulação personalizada."})]})]})]})})})})}function Ea(){const{openModal:e}=X();return i.jsx("section",{className:"py-16 bg-white",children:i.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"bg-gradient-to-r relative from-[#00227b] to-[#0026bd] rounded-2xl overflow-hidden shadow-xl",children:[i.jsx("div",{className:"absolute bottom-0 right-72 w-full h-[600px] opacity-30 -z-0",children:i.jsx("img",{src:"/images/freepik__a-brazilian-family-happy-on-house-that-just-bouth__38929.png",alt:"Ilustração de pessoa",className:"h-full object-contain object-bottom ml-auto"})}),i.jsxs("div",{className:"grid grid-cols-1 relative lg:grid-cols-2 gap-6 items-center",children:[i.jsxs("div",{className:"p-8 lg:p-12",children:[i.jsxs("div",{className:"flex items-center mb-5 gap-4",children:[i.jsx("img",{className:"w-24",src:"/images/minha-casa-minha-vida-logo-0.png",alt:""}),i.jsx("img",{className:"w-52",src:"/images/Logo karioca azul.png",alt:""})]}),i.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white mb-6",children:"Quer ganhar um desconto para comprar o seu apartamento?"}),i.jsx("p",{className:"text-white/90 mb-6 text-lg",children:"O subsídio é o principal benefício do programa Minha Casa Minha Vida. É como se o governo pagasse uma parte do seu imóvel. Confira em qual grupo você se encaixa e veja um valor aproximado de quanto pode ganhar*."}),i.jsx("p",{className:"text-white/70 text-sm italic",children:"*O valor pode variar de acordo com a renda familiar e a região do imóvel."})]}),i.jsx("div",{className:"relative p-8 lg:p-12",children:i.jsxs("div",{className:"relative z-10 space-y-6 ml-auto max-w-sm",children:[i.jsxs("div",{className:"bg-white rounded-xl p-6 shadow-lg",children:[i.jsx("div",{className:"mb-2",children:i.jsx("span",{className:"bg-yellow-100 text-yellow-800 text-xs font-medium px-2.5 py-0.5 rounded",children:"Faixa 1"})}),i.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-2",children:"Até R$ 55.000,00 de subsídio"}),i.jsxs("p",{className:"text-sm text-gray-600 mb-3",children:["Renda até ",i.jsx("span",{className:"font-semibold",children:"R$ 2.640,00"})]}),i.jsx("button",{onClick:e,className:"w-full bg-yellow-400 hover:bg-yellow-500 text-gray-800 font-bold py-3 px-4 rounded-lg transition-colors cursor-pointer",children:"FALE COM A GENTE"})]}),i.jsxs("div",{className:"bg-white rounded-xl p-6 shadow-lg",children:[i.jsx("div",{className:"mb-2",children:i.jsx("span",{className:"bg-yellow-100 text-yellow-800 text-xs font-medium px-2.5 py-0.5 rounded",children:"Faixa 2"})}),i.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-2",children:"Até R$ 55.000,00 de subsídio"}),i.jsxs("p",{className:"text-sm text-gray-600 mb-3",children:["Renda entre ",i.jsx("span",{className:"font-semibold",children:"R$ 2.640,01"})," e ",i.jsx("span",{className:"font-semibold",children:"R$ 4.400,00"})]}),i.jsx("button",{onClick:e,className:"w-full bg-yellow-400 hover:bg-yellow-500 text-gray-800 font-bold py-3 px-4 rounded-lg transition-colors cursor-pointer",children:"FALE COM A GENTE"})]})]})})]})]})})})}function La(){const{openModal:e}=X(),[t,s]=p.useState("lazer"),n=[{id:"lazer",name:"Lazer"},{id:"servico",name:"Serviço"},{id:"social",name:"Social"},{id:"utilitarios",name:"Utilitários"}],r={lazer:[{name:"Piscina adulto",icon:i.jsx(Us,{className:"h-6 w-6"})},{name:"Piscina infantil",icon:i.jsx(Us,{className:"h-6 w-6"})},{name:"Academia completa",icon:i.jsx(Os,{className:"h-6 w-6"})},{name:"Bicicletário",icon:i.jsx(Fs,{className:"h-6 w-6"})},{name:"Playground",icon:i.jsx(Zr,{className:"h-6 w-6"})},{name:"Salão de jogos",icon:i.jsx(na,{className:"h-6 w-6"})},{name:"Quadra poliesportiva",icon:i.jsx(Os,{className:"h-6 w-6"})},{name:"Espaço verde",icon:i.jsx(qs,{className:"h-6 w-6"})}],servico:[{name:"Lavanderia",icon:i.jsx(ha,{className:"h-6 w-6"})},{name:"Portaria 24h",icon:i.jsx($s,{className:"h-6 w-6"})},{name:"Delivery room",icon:i.jsx(va,{className:"h-6 w-6"})},{name:"Wi-Fi nas áreas comuns",icon:i.jsx(Ws,{className:"h-6 w-6"})},{name:"Segurança 24h",icon:i.jsx($s,{className:"h-6 w-6"})}],social:[{name:"Salão de festas",icon:i.jsx(la,{className:"h-6 w-6"})},{name:"Espaço gourmet",icon:i.jsx(ci,{className:"h-6 w-6"})},{name:"Churrasqueira",icon:i.jsx(wa,{className:"h-6 w-6"})},{name:"Sala de reuniões",icon:i.jsx(ba,{className:"h-6 w-6"})},{name:"Home cinema",icon:i.jsx(sa,{className:"h-6 w-6"})},{name:"Lounge",icon:i.jsx(xa,{className:"h-6 w-6"})}],utilitarios:[{name:"Estacionamento",icon:i.jsx(ea,{className:"h-6 w-6"})},{name:"Bicicletário",icon:i.jsx(Fs,{className:"h-6 w-6"})},{name:"Gerador",icon:i.jsx(Ws,{className:"h-6 w-6"})},{name:"Coleta seletiva",icon:i.jsx(qs,{className:"h-6 w-6"})}]};return i.jsx("section",{id:"lazer",className:"py-10 bg-white",children:i.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-[#00227b]",children:"Lazer e Comodidades"}),i.jsx("div",{className:"w-20 h-1 bg-[#0026bd] mx-auto mt-2"}),i.jsx("p",{className:"mt-4 text-lg text-gray-600 max-w-2xl mx-auto",children:"Desfrute de uma infraestrutura completa para seu conforto e bem-estar"})]}),i.jsx("div",{className:"flex justify-center mb-12",children:i.jsx("div",{className:"inline-flex bg-gray-100 rounded-full p-1",children:n.map(o=>i.jsx("button",{onClick:()=>s(o.id),className:`px-6 py-3 rounded-full text-sm font-medium transition-all duration-300 ${t===o.id?"bg-[#0026bd] text-white shadow-md":"text-gray-700 hover:bg-gray-200"}`,children:o.name},o.id))})}),i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-[#00227b]/5 to-[#0026bd]/5 rounded-2xl"}),i.jsx("div",{className:"relative px-6 py-10 md:px-10",children:i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-x-8 gap-y-12",children:r[t].map((o,a)=>i.jsxs("div",{className:"flex flex-col items-center text-center group",children:[i.jsxs("div",{className:"relative mb-4",children:[i.jsx("div",{className:"absolute inset-0 bg-[#0026bd]/10 rounded-full transform scale-0 group-hover:scale-100 transition-transform duration-300"}),i.jsx("div",{className:"relative z-10 w-16 h-16 flex items-center justify-center bg-white rounded-full shadow-md border border-gray-100 group-hover:border-[#0026bd]/30 group-hover:shadow-lg transition-all duration-300",children:i.jsx("div",{className:"text-[#0026bd]",children:o.icon})})]}),i.jsx("h3",{className:"font-medium text-gray-800 group-hover:text-[#0026bd] transition-colors duration-300",children:o.name})]},a))})})]}),i.jsx("div",{className:"mt-16 bg-gray-50 rounded-xl p-8 shadow-sm border border-gray-100",children:i.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between",children:[i.jsxs("div",{className:"mb-6 md:mb-0 md:mr-8",children:[i.jsx("h3",{className:"text-xl font-bold text-[#00227b] mb-2",children:"Conheça pessoalmente"}),i.jsx("p",{className:"text-gray-600",children:"Visite nosso decorado e conheça todos os detalhes das áreas de lazer e comodidades do Residencial Barra Premium."})]}),i.jsxs("button",{onClick:e,className:"inline-flex items-center bg-[#0026bd] text-white px-6 py-3 rounded-md font-medium hover:bg-[#00227b] transition-colors whitespace-nowrap cursor-pointer",children:[i.jsx("span",{children:"Agendar visita"}),i.jsx("svg",{className:"ml-2 w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]})]})})]})})}function Ba(){p.useEffect(()=>{if(!document.querySelector("#whatsapp-form-animations")){const x=document.createElement("style");x.id="whatsapp-form-animations",x.innerHTML=`
        @keyframes fadeIn {
          from { opacity: 0; }
          to { opacity: 1; }
        }
        @keyframes slideUp {
          from { opacity: 0; transform: translateY(10px); }
          to { opacity: 1; transform: translateY(0); }
        }
        .animate-fadeIn {
          animation: fadeIn 0.3s ease-in-out;
        }
        .animate-slideUp {
          animation: slideUp 0.3s ease-in-out;
        }
      `,document.head.appendChild(x)}},[]);const[e,t]=p.useState(0),[s,n]=p.useState(""),[r,o]=p.useState(""),[a,l]=p.useState(""),[c,u]=p.useState(!1),[d,h]=p.useState(!1),m=(x,w)=>{x.key==="Enter"&&(x.preventDefault(),w())},f=()=>{u(!0),r.replace(/\D/g,"");const x="5521935057625",w=encodeURIComponent(`Olá! Sou ${s} e tenho interesse em ${a==="morar"?"um apartamento para morar":a==="investir"?"um imóvel para investimento":"informações sobre os imóveis da Karioca"}.`);setTimeout(()=>{u(!1),h(!0),setTimeout(()=>{window.open(`https://wa.me/${x}?text=${w}`,"_blank")},1500)},1e3)},y=()=>{t(0),n(""),o(""),l(""),u(!1),h(!1)};return i.jsxs("div",{className:"bg-white rounded-lg overflow-hidden shadow-lg transition-all duration-300 relative z-30 pointer-events-auto border border-[#0026bd]/10",children:[i.jsx("div",{className:"h-1 bg-gray-100",children:i.jsx("div",{className:"h-full bg-[#0026bd] transition-all duration-500",style:{width:d?"100%":`${e/3*100}%`}})}),i.jsxs("div",{className:"p-4 pointer-events-auto",children:[!c&&!d&&i.jsxs(i.Fragment,{children:[e===0&&i.jsxs("div",{className:"animate-slideUp",children:[i.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-2",children:"Garanta sua unidade"}),i.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Qual é o seu nome?"}),i.jsx("input",{type:"text",value:s,onChange:x=>n(x.target.value),onKeyDown:x=>s.trim()&&m(x,()=>t(1)),placeholder:"Digite seu nome completo",className:"w-full p-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#0026bd] focus:border-transparent mb-3 text-gray-800",autoFocus:!0,style:{zIndex:20}}),i.jsxs("button",{onClick:()=>t(1),disabled:!s.trim(),className:"flex items-center justify-center w-full bg-[#0026bd] text-white py-2 rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:["Continuar ",i.jsx(ne,{className:"ml-2 h-4 w-4"})]})]}),e===1&&i.jsxs("div",{className:"animate-slideUp",children:[i.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-2",children:"Qual é o seu WhatsApp?"}),i.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Para que possamos continuar a conversa"}),i.jsx("input",{type:"tel",value:r,onChange:x=>o(hi(x.target.value)),onKeyDown:x=>r.trim()&&m(x,()=>t(2)),placeholder:"(21)99999-9999",className:"w-full p-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#0026bd] focus:border-transparent mb-3 text-gray-800",autoFocus:!0,style:{zIndex:20},maxLength:15}),i.jsxs("div",{className:"flex space-x-2",children:[i.jsx("button",{onClick:()=>t(0),className:"flex items-center justify-center w-1/3 bg-gray-100 text-gray-700 py-2 rounded-lg font-medium hover:bg-gray-200",children:"Voltar"}),i.jsxs("button",{onClick:()=>t(2),disabled:!r.trim(),className:"flex items-center justify-center w-2/3 bg-[#0026bd] text-white py-2 rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:["Continuar ",i.jsx(ne,{className:"ml-2 h-4 w-4"})]})]})]}),e===2&&i.jsxs("div",{className:"animate-slideUp",children:[i.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-2",children:"O que você está buscando?"}),i.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Selecione seu interesse"}),i.jsxs("div",{className:"space-y-2 mb-3",children:[i.jsx("button",{onClick:()=>l("morar"),className:`w-full p-2 rounded-lg border text-left text-gray-800 ${a==="morar"?"border-[#0026bd] bg-blue-50 text-[#0026bd]":"border-gray-300 hover:border-gray-400"}`,children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:`w-4 h-4 rounded-full border flex items-center justify-center ${a==="morar"?"border-[#0026bd]":"border-gray-400"}`,children:a==="morar"&&i.jsx("div",{className:"w-2 h-2 rounded-full bg-[#0026bd]"})}),i.jsx("span",{className:"ml-2 text-sm font-medium",children:"Apartamento para morar"})]})}),i.jsx("button",{onClick:()=>l("investir"),className:`w-full p-2 rounded-lg border text-left text-gray-800 ${a==="investir"?"border-[#0026bd] bg-blue-50 text-[#0026bd]":"border-gray-300 hover:border-gray-400"}`,children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:`w-4 h-4 rounded-full border flex items-center justify-center ${a==="investir"?"border-[#0026bd]":"border-gray-400"}`,children:a==="investir"&&i.jsx("div",{className:"w-2 h-2 rounded-full bg-[#0026bd]"})}),i.jsx("span",{className:"ml-2 text-sm font-medium",children:"Imóvel para investimento"})]})}),i.jsx("button",{onClick:()=>l("informacoes"),className:`w-full p-2 rounded-lg border text-left text-gray-800 ${a==="informacoes"?"border-[#0026bd] bg-blue-50 text-[#0026bd]":"border-gray-300 hover:border-gray-400"}`,children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("div",{className:`w-4 h-4 rounded-full border flex items-center justify-center ${a==="informacoes"?"border-[#0026bd]":"border-gray-400"}`,children:a==="informacoes"&&i.jsx("div",{className:"w-2 h-2 rounded-full bg-[#0026bd]"})}),i.jsx("span",{className:"ml-2 text-sm font-medium",children:"Apenas informações gerais"})]})})]}),i.jsxs("div",{className:"flex space-x-2",children:[i.jsx("button",{onClick:()=>t(1),className:"flex items-center justify-center w-1/3 bg-gray-100 text-gray-700 py-2 rounded-lg font-medium hover:bg-gray-200",children:"Voltar"}),i.jsxs("button",{onClick:f,disabled:!a,className:"flex items-center justify-center w-2/3 bg-[#0026bd] text-white py-2 rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:["Finalizar ",i.jsx(ne,{className:"ml-2 h-4 w-4"})]})]})]})]}),c&&i.jsxs("div",{className:"animate-fadeIn flex flex-col items-center justify-center py-6",children:[i.jsx("div",{className:"w-10 h-10 border-3 border-gray-200 border-t-[#0026bd] rounded-full animate-spin mb-3"}),i.jsx("p",{className:"text-sm text-gray-600 font-medium",children:"Conectando ao WhatsApp..."})]}),d&&i.jsxs("div",{className:"animate-fadeIn flex flex-col items-center justify-center py-6",children:[i.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-full flex items-center justify-center mb-3",children:i.jsx(Qt,{className:"h-5 w-5 text-green-500"})}),i.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-1",children:"Tudo pronto!"}),i.jsx("p",{className:"text-sm text-gray-600 mb-2 text-center",children:"Você será redirecionado para o WhatsApp."}),i.jsx("button",{onClick:y,className:"text-xs text-[#0026bd] underline",children:"Iniciar novamente"})]})]})]})}function Ia(){const{openModal:e}=X();return i.jsxs("div",{className:"relative min-h-screen overflow-hidden pt-16",id:"home",children:[i.jsxs("div",{className:"absolute inset-0 z-0",children:[i.jsx("img",{src:"https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?ixlib=rb-1.2.1&auto=format&fit=crop&w=2850&q=80",alt:"Empreendimento de luxo",className:"w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-[#00227b]/90 to-transparent"})]}),i.jsx("div",{className:"relative z-10 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-full flex flex-col justify-center py-20",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-center",children:[i.jsxs("div",{className:"text-white space-y-6",children:[i.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",children:[i.jsx("span",{className:"block",children:"Residencial"}),i.jsx("span",{className:"text-white/90 block mt-2",children:"Barra Premium"})]}),i.jsx("p",{className:"text-xl md:text-2xl font-light text-white/80 mt-4",children:"Lançamento exclusivo com condições especiais"}),i.jsxs("div",{className:"mt-8 space-y-4",children:[i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx(Jt,{className:"h-8 w-8 text-white"}),i.jsxs("span",{className:"text-lg md:text-xl text-white",children:["Fácil acesso para",i.jsx("br",{}),i.jsx("strong",{children:"Av. Ayrton Senna"})]})]}),i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx(ma,{className:"h-8 w-8 text-white"}),i.jsxs("span",{className:"text-lg md:text-xl text-white",children:["Próximo ao shopping",i.jsx("br",{}),i.jsx("strong",{children:"metropolitano"})]})]}),i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx(ya,{className:"h-8 w-8 text-white"}),i.jsxs("span",{className:"text-lg md:text-xl text-white",children:["9 minutos praia da",i.jsx("br",{}),i.jsx("strong",{children:"Barra"})]})]})]}),i.jsx("div",{className:"mt-10",children:i.jsx("button",{onClick:e,className:"inline-block bg-white text-[#00227b] px-8 py-4 rounded-md font-bold text-lg hover:bg-opacity-90 transition-all shadow-lg hover:shadow-xl cursor-pointer",children:"Quero conhecer"})})]}),i.jsx("div",{className:"bg-gradient-to-br from-[#00227b]/80 to-[#0026bd]/80 p-6 rounded-xl shadow-lg border border-white/30 text-white mt-10 lg:mt-0 backdrop-blur-sm",children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"text-center border-b border-white/20 pb-4",children:[i.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Garanta seu apartamento"}),i.jsx("div",{className:"bg-white text-[#0026bd] rounded-full px-6 py-3 inline-block font-bold shadow-lg hover:shadow-xl transition-all cursor-pointer hover:bg-opacity-90 animate-pulse",children:i.jsxs("span",{className:"flex items-center justify-center",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Oferta por tempo limitado"]})})]}),i.jsxs("div",{className:"mt-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("p",{className:"text-lg font-medium",children:"Mensais a partir de:"}),i.jsx("div",{className:"bg-white text-[#0026bd] rounded-lg px-4 py-2 shadow-md",children:i.jsx("span",{className:"text-2xl font-bold",children:"R$ 800,00"})})]}),i.jsx("p",{className:"text-sm mt-2 text-white/70 text-right",children:"*Sujeito a condições"})]}),i.jsx("div",{className:"mt-6 relative z-20",children:i.jsx(Ba,{})})]})})]})}),i.jsx("div",{className:"absolute bottom-10 left-1/2 transform -translate-x-1/2 z-10 animate-bounce",children:i.jsx("svg",{className:"w-6 h-6 text-white",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]})}function Fa(){const{openModal:e}=X(),t=p.useRef(null),s=p.useRef(null);p.useRef(null);const n=p.useRef(null),r=p.useRef(null),[o,a]=p.useState(!1),[l,c]=p.useState(!0),[u,d]=p.useState(0),[h,m]=p.useState(0),[f,y]=p.useState(0),[x,w]=p.useState(1),[b,j]=p.useState(!1),[v,A]=p.useState(!1),[N,C]=p.useState(!1),[R,P]=p.useState(null),[D,g]=p.useState(!1),[S,V]=p.useState(!1),ae=[{time:5,label:"Vista da varanda"},{time:15,label:"Sala de estar"},{time:25,label:"Cozinha gourmet"},{time:35,label:"Suíte master"},{time:45,label:"Área de lazer"}],Ge=()=>{t.current&&(t.current.currentTime=0,t.current.muted=!1,t.current.play(),a(!0),c(!1))},ft=()=>{t.current&&(t.current.paused?(t.current.play(),a(!0)):(t.current.pause(),a(!1)),C(!0))},Es=k=>{const E=parseFloat(k.target.value);w(E),t.current&&(t.current.volume=E,j(E===0))},z=()=>{if(!t.current)return;const k=!b;t.current.muted=k,j(k),k?t.current.volume=0:t.current.volume=x||.5},Z=()=>{s.current&&(document.fullscreenElement?(document.exitFullscreen(),A(!1)):(s.current.requestFullscreen().catch(k=>{console.error(`Erro ao tentar entrar em modo tela cheia: ${k.message}`)}),A(!0)))},Pe=async()=>{try{if(!t.current)return;document.pictureInPictureElement?(await document.exitPictureInPicture(),g(!1)):(await t.current.requestPictureInPicture(),g(!0))}catch(k){console.error("Erro ao alternar modo Picture-in-Picture:",k)}},Me=()=>{V(k=>!k)},Ye=k=>{const E="Conheça o Residencial Barra Premium da Karioca Imóveis",U=window.location.href;switch(k){case"whatsapp":window.open(`https://api.whatsapp.com/send?text=${encodeURIComponent(E+" "+U)}`,"_blank");break;case"facebook":window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(U)}&quote=${encodeURIComponent(E)}`,"_blank");break;case"twitter":window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(E)}&url=${encodeURIComponent(U)}`,"_blank");break;case"email":window.open(`mailto:?subject=${encodeURIComponent("Imóvel interessante")}&body=${encodeURIComponent(E+`

`+U)}`,"_blank");break}V(!1)},Wr=()=>{if(!t.current)return;const k=t.current.currentTime,E=t.current.duration;m(k),y(E)},Kr=k=>{if(!t.current)return;const E=parseFloat(k.target.value);t.current.currentTime=E,m(E)},Hr=()=>{if(!t.current)return;const k=Math.min(t.current.currentTime+10,t.current.duration);t.current.currentTime=k,m(k)},_r=()=>{if(!t.current)return;const k=Math.max(t.current.currentTime-10,0);t.current.currentTime=k,m(k)},Gr=k=>{t.current&&(t.current.currentTime=k,P(k),t.current.paused&&(t.current.play(),a(!0),c(!1)),C(!0),setTimeout(()=>{P(null)},3e3))},pt=k=>{const E=Math.floor(k/60),U=Math.floor(k%60);return`${E}:${U<10?"0":""}${U}`};return p.useEffect(()=>{const k=()=>{if(!r.current)return;const E=r.current.getBoundingClientRect(),U=window.innerHeight,oe=1-E.top/U,xt=Math.max(0,Math.min(1,oe-.2));d(xt)};return window.addEventListener("scroll",k),k(),()=>window.removeEventListener("scroll",k)},[]),p.useEffect(()=>{const k=new IntersectionObserver(([E])=>{var U,oe;E.intersectionRatio<.3&&!((U=t.current)!=null&&U.paused)&&((oe=t.current)==null||oe.pause(),a(!1))},{threshold:[0,.3,.5,.7,1]});return r.current&&k.observe(r.current),()=>{r.current&&k.unobserve(r.current)}},[]),p.useEffect(()=>{if(!S)return;const k=E=>{n.current&&!n.current.contains(E.target)&&V(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[S]),p.useEffect(()=>{const k=t.current;if(!k)return;const E=()=>Wr(),U=()=>{y(k.duration)};let oe;const xt=()=>{clearTimeout(oe),oe=setTimeout(()=>{o&&C(!1)},3e3)},Ls=()=>{C(!0),xt()},Bs=()=>{g(!0)},Is=()=>{g(!1)};return k.addEventListener("timeupdate",E),k.addEventListener("loadedmetadata",U),k.addEventListener("mousemove",Ls),k.addEventListener("enterpictureinpicture",Bs),k.addEventListener("leavepictureinpicture",Is),()=>{k.removeEventListener("timeupdate",E),k.removeEventListener("loadedmetadata",U),k.removeEventListener("mousemove",Ls),k.removeEventListener("enterpictureinpicture",Bs),k.removeEventListener("leavepictureinpicture",Is),clearTimeout(oe)}},[o]),i.jsx("section",{ref:r,className:"relative py-10 overflow-hidden ",children:i.jsxs("div",{className:"relative transition-all duration-300 ease-out",style:{width:`${100-u*15}%`,maxWidth:"100%",margin:"0 auto"},children:[i.jsxs("div",{className:"relative aspect-video overflow-hidden rounded-lg shadow-2xl",children:[i.jsxs("video",{ref:t,className:"w-full h-screen object-cover cursor-pointer",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,onClick:ft,children:[i.jsx("source",{src:"/images/videodemo.mp4",type:"video/mp4"}),"Seu navegador não suporta vídeos HTML5."]}),l&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40 cursor-pointer",onClick:Ge,children:i.jsx("div",{className:"w-20 h-20 rounded-full bg-white/20 backdrop-blur-sm flex items-center justify-center border border-white/30",children:i.jsx("div",{className:"w-16 h-16 rounded-full bg-[#0026bd] flex items-center justify-center shadow-lg",children:i.jsx(zs,{size:32,className:"text-white ml-1"})})})}),i.jsxs("div",{className:`absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 transition-opacity duration-300 ${N||!o?"opacity-100":"opacity-0"}`,onMouseEnter:()=>C(!0),onMouseLeave:()=>o&&setTimeout(()=>C(!1),3e3),children:[i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsx("span",{className:"text-white text-xs",children:pt(h)}),i.jsx("div",{className:"flex-1 relative",children:i.jsx("input",{type:"range",min:"0",max:f||100,value:h,onChange:Kr,className:"w-full h-1 bg-white/30 rounded-full appearance-none cursor-pointer",style:{background:`linear-gradient(to right, #0026bd ${h/(f||1)*100}%, rgba(255,255,255,0.3) 0%)`}})}),i.jsx("span",{className:"text-white text-xs",children:pt(f)})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("button",{onClick:ft,className:"text-white hover:text-[#0026bd] transition-colors",children:o?i.jsx(ca,{size:20}):i.jsx(zs,{size:20})}),i.jsx("button",{onClick:_r,className:"text-white hover:text-[#0026bd] transition-colors",children:i.jsx(fa,{size:18})}),i.jsx("button",{onClick:Hr,className:"text-white hover:text-[#0026bd] transition-colors",children:i.jsx(pa,{size:18})}),i.jsxs("div",{className:"flex items-center gap-2 group relative",children:[i.jsx("button",{onClick:z,className:"text-white hover:text-[#0026bd] transition-colors",children:b?i.jsx(Na,{size:18}):i.jsx(ja,{size:18})}),i.jsx("div",{className:"w-0 overflow-hidden group-hover:w-20 transition-all duration-300",children:i.jsx("input",{type:"range",min:"0",max:"1",step:"0.01",value:b?0:x,onChange:Es,className:"w-full h-1 bg-white/30 rounded-full appearance-none cursor-pointer",style:{background:`linear-gradient(to right, #0026bd ${(b?0:x)*100}%, rgba(255,255,255,0.3) 0%)`}})})]})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"relative",children:[i.jsx("button",{onClick:Me,className:"text-white hover:text-[#0026bd] transition-colors","aria-label":"Compartilhar vídeo",children:i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("circle",{cx:"18",cy:"5",r:"3"}),i.jsx("circle",{cx:"6",cy:"12",r:"3"}),i.jsx("circle",{cx:"18",cy:"19",r:"3"}),i.jsx("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),i.jsx("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]})}),S&&i.jsx("div",{ref:n,className:"absolute bottom-full right-0 mb-2 bg-white rounded-lg shadow-lg p-2 w-48 z-50",children:i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsxs("button",{onClick:()=>Ye("whatsapp"),className:"flex items-center gap-2 p-2 hover:bg-gray-100 rounded-md transition-colors text-left",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"#25D366",stroke:"none",children:i.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})}),"WhatsApp"]}),i.jsxs("button",{onClick:()=>Ye("facebook"),className:"flex items-center gap-2 p-2 hover:bg-gray-100 rounded-md transition-colors text-left",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"#1877F2",stroke:"none",children:i.jsx("path",{d:"M24 12.073c0-5.8-4.2-10.6-9.9-11.6v8.4h2.8l.5 3.3h-3.3v2.1c0 .9.4 1.7 1.8 1.7h1.4v2.8s-1.3.2-2.5.2c-2.6 0-4.3-1.6-4.3-4.4v-2.4h-2.9v-3.3h2.9v-8.4C4.2 1.473 0 6.273 0 12.073c0 6.6 5.4 12 12 12s12-5.4 12-12z"})}),"Facebook"]}),i.jsxs("button",{onClick:()=>Ye("twitter"),className:"flex items-center gap-2 p-2 hover:bg-gray-100 rounded-md transition-colors text-left",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"#1DA1F2",stroke:"none",children:i.jsx("path",{d:"M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"})}),"Twitter"]}),i.jsxs("button",{onClick:()=>Ye("email"),className:"flex items-center gap-2 p-2 hover:bg-gray-100 rounded-md transition-colors text-left",children:[i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"#EA4335",stroke:"none",children:i.jsx("path",{d:"M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z"})}),"Email"]})]})})]}),i.jsx("button",{onClick:Pe,className:"text-white hover:text-[#0026bd] transition-colors","aria-label":"Alternar Picture-in-Picture",children:D?i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"2"}),i.jsx("rect",{x:"8",y:"8",width:"8",height:"8",rx:"1"})]}):i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"2"}),i.jsx("rect",{x:"10",y:"10",width:"12",height:"12",rx:"1"})]})}),i.jsx("button",{onClick:Z,className:"text-white hover:text-[#0026bd] transition-colors",children:v?i.jsx(oa,{size:18}):i.jsx(di,{size:18})}),i.jsxs("button",{onClick:e,className:"bg-[#0026bd] hover:bg-[#00227b] text-white text-xs px-3 py-1 rounded-full transition-colors flex items-center gap-1",children:[i.jsx(Vt,{size:12}),i.jsx("span",{children:"Saiba mais"})]})]})]})]})]}),i.jsxs("div",{className:"mt-6 px-4 md:px-0",children:[i.jsx("h3",{className:"text-lg font-medium text-gray-700 mb-3",children:"Momentos do vídeo"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:ae.map(k=>i.jsxs("button",{onClick:()=>Gr(k.time),className:`px-3 py-2 text-sm rounded-lg transition-all ${R===k.time?"bg-[#0026bd] text-white":"bg-gray-100 hover:bg-gray-200 text-gray-700"}`,children:[pt(k.time)," - ",k.label]},k.time))})]}),i.jsxs("div",{className:"mt-8 text-center md:text-left",children:[i.jsx("h2",{className:"text-3xl font-bold text-gray-800 mb-4",children:"Conheça o Residencial Barra Premium"}),i.jsx("p",{className:"text-gray-600 mb-6 max-w-2xl",children:"Experimente a sensação de viver em um dos empreendimentos mais exclusivos da Barra da Tijuca. Com localização privilegiada, a apenas 9 minutos da praia, o Residencial Barra Premium oferece o equilíbrio perfeito entre conforto, sofisticação e praticidade."}),i.jsxs("div",{className:"flex flex-wrap gap-4 items-center justify-center md:justify-start",children:[i.jsxs("button",{onClick:e,className:"bg-gradient-to-r from-[#0026bd] to-[#00227b] hover:from-[#00227b] hover:to-[#001c62] text-white py-3 px-6 rounded-lg text-sm font-medium transition-all shadow-md hover:shadow-lg flex items-center justify-center",children:[i.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Agende uma visita"]}),i.jsx("a",{href:"#gallery",className:"text-[#0026bd] border border-[#0026bd] py-3 px-6 rounded-lg text-sm font-medium hover:bg-[#0026bd]/5 transition-colors flex items-center",children:"Ver galeria de fotos"})]})]})]})})}const es=p.createContext({});function ts(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const ss=typeof window<"u",fi=ss?p.useLayoutEffect:p.useEffect,dt=p.createContext(null);function ns(e,t){e.indexOf(t)===-1&&e.push(t)}function is(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const ie=(e,t,s)=>s>t?t:s<e?e:s;let it=()=>{};const re={},pi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xi(e){return typeof e=="object"&&e!==null}const gi=e=>/^0[^.\s]+$/u.test(e);function rs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Y=e=>e,Oa=(e,t)=>s=>t(e(s)),We=(...e)=>e.reduce(Oa),Ie=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n};class as{constructor(){this.subscriptions=[]}add(t){return ns(this.subscriptions,t),()=>is(this.subscriptions,t)}notify(t,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,s,n);else for(let o=0;o<r;o++){const a=this.subscriptions[o];a&&a(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ee=e=>e*1e3,te=e=>e/1e3;function yi(e,t){return t?e*(1e3/t):0}const bi=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,za=1e-7,$a=12;function qa(e,t,s,n,r){let o,a,l=0;do a=t+(s-t)/2,o=bi(a,n,r)-e,o>0?s=a:t=a;while(Math.abs(o)>za&&++l<$a);return a}function Ke(e,t,s,n){if(e===t&&s===n)return Y;const r=o=>qa(o,0,1,e,s);return o=>o===0||o===1?o:bi(r(o),t,n)}const vi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wi=e=>t=>1-e(1-t),ji=Ke(.33,1.53,.69,.99),os=wi(ji),Ni=vi(os),ki=e=>(e*=2)<1?.5*os(e):.5*(2-Math.pow(2,-10*(e-1))),ls=e=>1-Math.sin(Math.acos(e)),Ci=wi(ls),Ti=vi(ls),Ua=Ke(.42,0,1,1),Wa=Ke(0,0,.58,1),Si=Ke(.42,0,.58,1),Ka=e=>Array.isArray(e)&&typeof e[0]!="number",Pi=e=>Array.isArray(e)&&typeof e[0]=="number",Ks={linear:Y,easeIn:Ua,easeInOut:Si,easeOut:Wa,circIn:ls,circInOut:Ti,circOut:Ci,backIn:os,backInOut:Ni,backOut:ji,anticipate:ki},Ha=e=>typeof e=="string",Hs=e=>{if(Pi(e)){it(e.length===4);const[t,s,n,r]=e;return Ke(t,s,n,r)}else if(Ha(e))return it(Ks[e]!==void 0),Ks[e];return e},Xe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],_s={value:null,addProjectionMetrics:null};function _a(e,t){let s=new Set,n=new Set,r=!1,o=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){a.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,m=!1,f=!1)=>{const x=f&&r?s:n;return m&&a.add(h),x.has(h)||x.add(h),h},cancel:h=>{n.delete(h),a.delete(h)},process:h=>{if(l=h,r){o=!0;return}r=!0,[s,n]=[n,s],s.forEach(u),t&&_s.value&&_s.value.frameloop[t].push(c),c=0,s.clear(),r=!1,o&&(o=!1,d.process(h))}};return d}const Ga=40;function Mi(e,t){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>s=!0,a=Xe.reduce((v,A)=>(v[A]=_a(o,t?A:void 0),v),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:m,render:f,postRender:y}=a,x=()=>{const v=re.useManualTiming?r.timestamp:performance.now();s=!1,re.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(v-r.timestamp,Ga),1)),r.timestamp=v,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),h.process(r),m.process(r),f.process(r),y.process(r),r.isProcessing=!1,s&&t&&(n=!1,e(x))},w=()=>{s=!0,n=!0,r.isProcessing||e(x)};return{schedule:Xe.reduce((v,A)=>{const N=a[A];return v[A]=(C,R=!1,P=!1)=>(s||w(),N.schedule(C,R,P)),v},{}),cancel:v=>{for(let A=0;A<Xe.length;A++)a[Xe[A]].cancel(v)},state:r,steps:a}}const{schedule:B,cancel:ce,state:$,steps:gt}=Mi(typeof requestAnimationFrame<"u"?requestAnimationFrame:Y,!0);let et;function Ya(){et=void 0}const K={now:()=>(et===void 0&&K.set($.isProcessing||re.useManualTiming?$.timestamp:performance.now()),et),set:e=>{et=e,queueMicrotask(Ya)}},Ai=e=>t=>typeof t=="string"&&t.startsWith(e),cs=Ai("--"),Xa=Ai("var(--"),ds=e=>Xa(e)?Za.test(e.split("/*")[0].trim()):!1,Za=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ce={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fe={...Ce,transform:e=>ie(0,1,e)},Ze={...Ce,default:1},Re=e=>Math.round(e*1e5)/1e5,us=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qa(e){return e==null}const Ja=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hs=(e,t)=>s=>!!(typeof s=="string"&&Ja.test(s)&&s.startsWith(e)||t&&!Qa(s)&&Object.prototype.hasOwnProperty.call(s,t)),Vi=(e,t,s)=>n=>{if(typeof n!="string")return n;const[r,o,a,l]=n.match(us);return{[e]:parseFloat(r),[t]:parseFloat(o),[s]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},eo=e=>ie(0,255,e),yt={...Ce,transform:e=>Math.round(eo(e))},fe={test:hs("rgb","red"),parse:Vi("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+yt.transform(e)+", "+yt.transform(t)+", "+yt.transform(s)+", "+Re(Fe.transform(n))+")"};function to(e){let t="",s="",n="",r="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),r=e.substring(4,5),t+=t,s+=s,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const Rt={test:hs("#"),parse:to,transform:fe.transform},He=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),le=He("deg"),se=He("%"),T=He("px"),so=He("vh"),no=He("vw"),Gs={...se,parse:e=>se.parse(e)/100,transform:e=>se.transform(e*100)},ye={test:hs("hsl","hue"),parse:Vi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+se.transform(Re(t))+", "+se.transform(Re(s))+", "+Re(Fe.transform(n))+")"},O={test:e=>fe.test(e)||Rt.test(e)||ye.test(e),parse:e=>fe.test(e)?fe.parse(e):ye.test(e)?ye.parse(e):Rt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fe.transform(e):ye.transform(e),getAnimatableNone:e=>{const t=O.parse(e);return t.alpha=0,O.transform(t)}},io=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ro(e){var t,s;return isNaN(e)&&typeof e=="string"&&(((t=e.match(us))==null?void 0:t.length)||0)+(((s=e.match(io))==null?void 0:s.length)||0)>0}const Ri="number",Di="color",ao="var",oo="var(",Ys="${}",lo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Oe(e){const t=e.toString(),s=[],n={color:[],number:[],var:[]},r=[];let o=0;const l=t.replace(lo,c=>(O.test(c)?(n.color.push(o),r.push(Di),s.push(O.parse(c))):c.startsWith(oo)?(n.var.push(o),r.push(ao),s.push(c)):(n.number.push(o),r.push(Ri),s.push(parseFloat(c))),++o,Ys)).split(Ys);return{values:s,split:l,indexes:n,types:r}}function Ei(e){return Oe(e).values}function Li(e){const{split:t,types:s}=Oe(e),n=t.length;return r=>{let o="";for(let a=0;a<n;a++)if(o+=t[a],r[a]!==void 0){const l=s[a];l===Ri?o+=Re(r[a]):l===Di?o+=O.transform(r[a]):o+=r[a]}return o}}const co=e=>typeof e=="number"?0:O.test(e)?O.getAnimatableNone(e):e;function uo(e){const t=Ei(e);return Li(e)(t.map(co))}const de={test:ro,parse:Ei,createTransformer:Li,getAnimatableNone:uo};function bt(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function ho({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let r=0,o=0,a=0;if(!t)r=o=a=s;else{const l=s<.5?s*(1+t):s+t-s*t,c=2*s-l;r=bt(c,l,e+1/3),o=bt(c,l,e),a=bt(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:n}}function rt(e,t){return s=>s>0?t:e}const L=(e,t,s)=>e+(t-e)*s,vt=(e,t,s)=>{const n=e*e,r=s*(t*t-n)+n;return r<0?0:Math.sqrt(r)},mo=[Rt,fe,ye],fo=e=>mo.find(t=>t.test(e));function Xs(e){const t=fo(e);if(!t)return!1;let s=t.parse(e);return t===ye&&(s=ho(s)),s}const Zs=(e,t)=>{const s=Xs(e),n=Xs(t);if(!s||!n)return rt(e,t);const r={...s};return o=>(r.red=vt(s.red,n.red,o),r.green=vt(s.green,n.green,o),r.blue=vt(s.blue,n.blue,o),r.alpha=L(s.alpha,n.alpha,o),fe.transform(r))},Dt=new Set(["none","hidden"]);function po(e,t){return Dt.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function xo(e,t){return s=>L(e,t,s)}function ms(e){return typeof e=="number"?xo:typeof e=="string"?ds(e)?rt:O.test(e)?Zs:bo:Array.isArray(e)?Bi:typeof e=="object"?O.test(e)?Zs:go:rt}function Bi(e,t){const s=[...e],n=s.length,r=e.map((o,a)=>ms(o)(o,t[a]));return o=>{for(let a=0;a<n;a++)s[a]=r[a](o);return s}}function go(e,t){const s={...e,...t},n={};for(const r in s)e[r]!==void 0&&t[r]!==void 0&&(n[r]=ms(e[r])(e[r],t[r]));return r=>{for(const o in n)s[o]=n[o](r);return s}}function yo(e,t){const s=[],n={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],a=e.indexes[o][n[o]],l=e.values[a]??0;s[r]=l,n[o]++}return s}const bo=(e,t)=>{const s=de.createTransformer(t),n=Oe(e),r=Oe(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?Dt.has(e)&&!r.values.length||Dt.has(t)&&!n.values.length?po(e,t):We(Bi(yo(n,r),r.values),s):rt(e,t)};function Ii(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?L(e,t,s):ms(e)(e,t)}const vo=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>B.update(t,s),stop:()=>ce(t),now:()=>$.isProcessing?$.timestamp:K.now()}},Fi=(e,t,s=10)=>{let n="";const r=Math.max(Math.round(t/s),2);for(let o=0;o<r;o++)n+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},at=2e4;function fs(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<at;)t+=s,n=e.next(t);return t>=at?1/0:t}function wo(e,t=100,s){const n=s({...e,keyframes:[0,t]}),r=Math.min(fs(n),at);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:te(r)}}const jo=5;function Oi(e,t,s){const n=Math.max(t-jo,0);return yi(s-e(n),t-n)}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},wt=.001;function No({duration:e=I.duration,bounce:t=I.bounce,velocity:s=I.velocity,mass:n=I.mass}){let r,o,a=1-t;a=ie(I.minDamping,I.maxDamping,a),e=ie(I.minDuration,I.maxDuration,te(e)),a<1?(r=u=>{const d=u*a,h=d*e,m=d-s,f=Et(u,a),y=Math.exp(-h);return wt-m/f*y},o=u=>{const h=u*a*e,m=h*s+s,f=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-h),x=Et(Math.pow(u,2),a);return(-r(u)+wt>0?-1:1)*((m-f)*y)/x}):(r=u=>{const d=Math.exp(-u*e),h=(u-s)*e+1;return-wt+d*h},o=u=>{const d=Math.exp(-u*e),h=(s-u)*(e*e);return d*h});const l=5/e,c=Co(r,o,l);if(e=ee(e),isNaN(c))return{stiffness:I.stiffness,damping:I.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:a*2*Math.sqrt(n*u),duration:e}}}const ko=12;function Co(e,t,s){let n=s;for(let r=1;r<ko;r++)n=n-e(n)/t(n);return n}function Et(e,t){return e*Math.sqrt(1-t*t)}const To=["duration","bounce"],So=["stiffness","damping","mass"];function Qs(e,t){return t.some(s=>e[s]!==void 0)}function Po(e){let t={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...e};if(!Qs(e,So)&&Qs(e,To))if(e.visualDuration){const s=e.visualDuration,n=2*Math.PI/(s*1.2),r=n*n,o=2*ie(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:I.mass,stiffness:r,damping:o}}else{const s=No(e);t={...t,...s,mass:I.mass},t.isResolvedFromDuration=!0}return t}function ot(e=I.visualDuration,t=I.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:r}=s;const o=s.keyframes[0],a=s.keyframes[s.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:u,mass:d,duration:h,velocity:m,isResolvedFromDuration:f}=Po({...s,velocity:-te(s.velocity||0)}),y=m||0,x=u/(2*Math.sqrt(c*d)),w=a-o,b=te(Math.sqrt(c/d)),j=Math.abs(w)<5;n||(n=j?I.restSpeed.granular:I.restSpeed.default),r||(r=j?I.restDelta.granular:I.restDelta.default);let v;if(x<1){const N=Et(b,x);v=C=>{const R=Math.exp(-x*b*C);return a-R*((y+x*b*w)/N*Math.sin(N*C)+w*Math.cos(N*C))}}else if(x===1)v=N=>a-Math.exp(-b*N)*(w+(y+b*w)*N);else{const N=b*Math.sqrt(x*x-1);v=C=>{const R=Math.exp(-x*b*C),P=Math.min(N*C,300);return a-R*((y+x*b*w)*Math.sinh(P)+N*w*Math.cosh(P))/N}}const A={calculatedDuration:f&&h||null,next:N=>{const C=v(N);if(f)l.done=N>=h;else{let R=N===0?y:0;x<1&&(R=N===0?ee(y):Oi(v,N,C));const P=Math.abs(R)<=n,D=Math.abs(a-C)<=r;l.done=P&&D}return l.value=l.done?a:C,l},toString:()=>{const N=Math.min(fs(A),at),C=Fi(R=>A.next(N*R).value,N,30);return N+"ms "+C},toTransition:()=>{}};return A}ot.applyToOptions=e=>{const t=wo(e,100,ot);return e.ease=t.ease,e.duration=ee(t.duration),e.type="keyframes",e};function Lt({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],m={done:!1,value:h},f=P=>l!==void 0&&P<l||c!==void 0&&P>c,y=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let x=s*t;const w=h+x,b=a===void 0?w:a(w);b!==w&&(x=b-h);const j=P=>-x*Math.exp(-P/n),v=P=>b+j(P),A=P=>{const D=j(P),g=v(P);m.done=Math.abs(D)<=u,m.value=m.done?b:g};let N,C;const R=P=>{f(m.value)&&(N=P,C=ot({keyframes:[m.value,y(m.value)],velocity:Oi(v,P,m.value),damping:r,stiffness:o,restDelta:u,restSpeed:d}))};return R(0),{calculatedDuration:null,next:P=>{let D=!1;return!C&&N===void 0&&(D=!0,A(P),R(P)),N!==void 0&&P>=N?C.next(P-N):(!D&&A(P),m)}}}function Mo(e,t,s){const n=[],r=s||re.mix||Ii,o=e.length-1;for(let a=0;a<o;a++){let l=r(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Y:t;l=We(c,l)}n.push(l)}return n}function Ao(e,t,{clamp:s=!0,ease:n,mixer:r}={}){const o=e.length;if(it(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Mo(t,n,r),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const m=Ie(e[h],e[h+1],d);return l[h](m)};return s?d=>u(ie(e[0],e[o-1],d)):u}function Vo(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const r=Ie(0,t,n);e.push(L(s,1,r))}}function Ro(e){const t=[0];return Vo(t,e.length-1),t}function Do(e,t){return e.map(s=>s*t)}function Eo(e,t){return e.map(()=>t||Si).splice(0,e.length-1)}function De({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const r=Ka(n)?n.map(Hs):Hs(n),o={done:!1,value:t[0]},a=Do(s&&s.length===t.length?s:Ro(t),e),l=Ao(a,t,{ease:Array.isArray(r)?r:Eo(t,r)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const Lo=e=>e!==null;function ps(e,{repeat:t,repeatType:s="loop"},n,r=1){const o=e.filter(Lo),l=r<0||t&&s!=="loop"&&t%2===1?0:o.length-1;return!l||n===void 0?o[l]:n}const Bo={decay:Lt,inertia:Lt,tween:De,keyframes:De,spring:ot};function zi(e){typeof e.type=="string"&&(e.type=Bo[e.type])}class xs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const Io=e=>e/100;class gs extends xs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,r;const{motionValue:s}=this.options;s&&s.updatedAt!==K.now()&&this.tick(K.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(n=this.options).onStop)==null||r.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;zi(t);const{type:s=De,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=t;let{keyframes:l}=t;const c=s||De;c!==De&&typeof l[0]!="number"&&(this.mixKeyframes=We(Io,Ii(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=fs(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=u}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:m,repeatDelay:f,type:y,onUpdate:x,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),j=this.playbackSpeed>=0?b<0:b>r;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,A=n;if(h){const P=Math.min(this.currentTime,r)/l;let D=Math.floor(P),g=P%1;!g&&P>=1&&(g=1),g===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(m==="reverse"?(g=1-g,f&&(g-=f/l)):m==="mirror"&&(A=a)),v=ie(0,1,g)*l}const N=j?{done:!1,value:d[0]}:A.next(v);o&&(N.value=o(N.value));let{done:C}=N;!j&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return R&&y!==Lt&&(N.value=ps(d,this.options,w,this.speed)),x&&x(N.value),R&&this.finish(),N}then(t,s){return this.finished.then(t,s)}get duration(){return te(this.calculatedDuration)}get time(){return te(this.currentTime)}set time(t){var s;t=ee(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(s=this.driver)==null||s.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(K.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=te(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=vo,startTime:s}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(o=(r=this.options).onPlay)==null||o.call(r);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(K.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(t=this.options).onComplete)==null||s.call(t)}cancel(){var t,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(t=this.options).onCancel)==null||s.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),t.observe(this)}}function Fo(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const pe=e=>e*180/Math.PI,Bt=e=>{const t=pe(Math.atan2(e[1],e[0]));return It(t)},Oo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Bt,rotateZ:Bt,skewX:e=>pe(Math.atan(e[1])),skewY:e=>pe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},It=e=>(e=e%360,e<0&&(e+=360),e),Js=Bt,en=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),tn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zo={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:en,scaleY:tn,scale:e=>(en(e)+tn(e))/2,rotateX:e=>It(pe(Math.atan2(e[6],e[5]))),rotateY:e=>It(pe(Math.atan2(-e[2],e[0]))),rotateZ:Js,rotate:Js,skewX:e=>pe(Math.atan(e[4])),skewY:e=>pe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ft(e){return e.includes("scale")?1:0}function Ot(e,t){if(!e||e==="none")return Ft(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,r;if(s)n=zo,r=s;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Oo,r=l}if(!r)return Ft(t);const o=n[t],a=r[1].split(",").map(qo);return typeof o=="function"?o(a):a[o]}const $o=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return Ot(s,t)};function qo(e){return parseFloat(e.trim())}const Te=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Se=new Set(Te),sn=e=>e===Ce||e===T,Uo=new Set(["x","y","z"]),Wo=Te.filter(e=>!Uo.has(e));function Ko(e){const t=[];return Wo.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t}const xe={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ot(t,"x"),y:(e,{transform:t})=>Ot(t,"y")};xe.translateX=xe.x;xe.translateY=xe.y;const ge=new Set;let zt=!1,$t=!1,qt=!1;function $i(){if($t){const e=Array.from(ge).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),s=new Map;t.forEach(n=>{const r=Ko(n);r.length&&(s.set(n,r),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const r=s.get(n);r&&r.forEach(([o,a])=>{var l;(l=n.getValue(o))==null||l.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}$t=!1,zt=!1,ge.forEach(e=>e.complete(qt)),ge.clear()}function qi(){ge.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($t=!0)})}function Ho(){qt=!0,qi(),$i(),qt=!1}class ys{constructor(t,s,n,r,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=n,this.motionValue=r,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(ge.add(this),zt||(zt=!0,B.read(qi),B.resolveKeyframes($i))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:n,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(n&&s){const l=n.readValue(s,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),r&&o===void 0&&r.set(t[0])}Fo(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ge.delete(this)}cancel(){this.state==="scheduled"&&(ge.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const _o=e=>e.startsWith("--");function Go(e,t,s){_o(t)?e.style.setProperty(t,s):e.style[t]=s}const Yo=rs(()=>window.ScrollTimeline!==void 0),Xo={};function Zo(e,t){const s=rs(e);return()=>Xo[t]??s()}const Ui=Zo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ve=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,nn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ve([0,.65,.55,1]),circOut:Ve([.55,0,1,.45]),backIn:Ve([.31,.01,.66,-.59]),backOut:Ve([.33,1.53,.69,.99])};function Wi(e,t){if(e)return typeof e=="function"?Ui()?Fi(e,t):"ease-out":Pi(e)?Ve(e):Array.isArray(e)?e.map(s=>Wi(s,t)||nn.easeOut):nn[e]}function Qo(e,t,s,{delay:n=0,duration:r=300,repeat:o=0,repeatType:a="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:s};c&&(d.offset=c);const h=Wi(l,r);Array.isArray(h)&&(d.easing=h);const m={delay:n,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(d,m)}function Ki(e){return typeof e=="function"&&"applyToOptions"in e}function Jo({type:e,...t}){return Ki(e)&&Ui()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class el extends xs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:s,name:n,keyframes:r,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,it(typeof t.type!="string");const u=Jo(t);this.animation=Qo(s,n,r,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=ps(r,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):Go(s,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,s;(s=(t=this.animation).finish)==null||s.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,s;this.isPseudoElement||(s=(t=this.animation).commitStyles)==null||s.call(t)}get duration(){var s,n;const t=((n=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:n.call(s).duration)||0;return te(Number(t))}get time(){return te(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ee(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Yo()?(this.animation.timeline=t,Y):s(this)}}const Hi={anticipate:ki,backInOut:Ni,circInOut:Ti};function tl(e){return e in Hi}function sl(e){typeof e.ease=="string"&&tl(e.ease)&&(e.ease=Hi[e.ease])}const rn=10;class nl extends el{constructor(t){sl(t),zi(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:n,onComplete:r,element:o,...a}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const l=new gs({...a,autoplay:!1}),c=ee(this.finishedTime??this.time);s.setWithVelocity(l.sample(c-rn).value,l.sample(c).value,rn),l.stop()}}const an=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(de.test(e)||e==="0")&&!e.startsWith("url("));function il(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function rl(e,t,s,n){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=an(r,t),l=an(o,t);return!a||!l?!1:il(e)||(s==="spring"||Ki(s))&&n}function bs(e){return xi(e)&&"offsetHeight"in e}const al=new Set(["opacity","clipPath","filter","transform"]),ol=rs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ll(e){var u;const{motionValue:t,name:s,repeatDelay:n,repeatType:r,damping:o,type:a}=e;if(!bs((u=t==null?void 0:t.owner)==null?void 0:u.current))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return ol()&&s&&al.has(s)&&(s!=="transform"||!c)&&!l&&!n&&r!=="mirror"&&o!==0&&a!=="inertia"}const cl=40;class dl extends xs{constructor({autoplay:t=!0,delay:s=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var y;super(),this.stop=()=>{var x,w;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=K.now();const m={autoplay:t,delay:s,type:n,repeat:r,repeatDelay:o,repeatType:a,name:c,motionValue:u,element:d,...h},f=(d==null?void 0:d.KeyframeResolver)||ys;this.keyframeResolver=new f(l,(x,w,b)=>this.onKeyframesResolved(x,w,m,!b),c,u,d),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,s,n,r){this.keyframeResolver=void 0;const{name:o,type:a,velocity:l,delay:c,isHandoff:u,onUpdate:d}=n;this.resolvedAt=K.now(),rl(t,o,a,l)||((re.instantAnimations||!c)&&(d==null||d(ps(t,n,s))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>cl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:t},f=!u&&ll(m)?new nl({...m,element:m.motionValue.owner.current}):new gs(m);f.finished.then(()=>this.notifyFinished()).catch(Y),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ho()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const ul=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hl(e){const t=ul.exec(e);if(!t)return[,];const[,s,n,r]=t;return[`--${s??n}`,r]}function _i(e,t,s=1){const[n,r]=hl(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const a=o.trim();return pi(a)?parseFloat(a):a}return ds(r)?_i(r,t,s+1):r}function vs(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Gi=new Set(["width","height","top","left","right","bottom",...Te]),ml={test:e=>e==="auto",parse:e=>e},Yi=e=>t=>t.test(e),Xi=[Ce,T,se,le,no,so,ml],on=e=>Xi.find(Yi(e));function fl(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gi(e):!0}const pl=new Set(["brightness","contrast","saturate","opacity"]);function xl(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(us)||[];if(!n)return e;const r=s.replace(n,"");let o=pl.has(t)?1:0;return n!==s&&(o*=100),t+"("+o+r+")"}const gl=/\b([a-z-]*)\(.*?\)/gu,Ut={...de,getAnimatableNone:e=>{const t=e.match(gl);return t?t.map(xl).join(" "):e}},ln={...Ce,transform:Math.round},yl={rotate:le,rotateX:le,rotateY:le,rotateZ:le,scale:Ze,scaleX:Ze,scaleY:Ze,scaleZ:Ze,skew:le,skewX:le,skewY:le,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Fe,originX:Gs,originY:Gs,originZ:T},ws={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,backgroundPositionX:T,backgroundPositionY:T,...yl,zIndex:ln,fillOpacity:Fe,strokeOpacity:Fe,numOctaves:ln},bl={...ws,color:O,backgroundColor:O,outlineColor:O,fill:O,stroke:O,borderColor:O,borderTopColor:O,borderRightColor:O,borderBottomColor:O,borderLeftColor:O,filter:Ut,WebkitFilter:Ut},Zi=e=>bl[e];function Qi(e,t){let s=Zi(e);return s!==Ut&&(s=de),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const vl=new Set(["auto","none","0"]);function wl(e,t,s){let n=0,r;for(;n<e.length&&!r;){const o=e[n];typeof o=="string"&&!vl.has(o)&&Oe(o).values.length&&(r=e[n]),n++}if(r&&s)for(const o of t)e[o]=Qi(s,r)}class jl extends ys{constructor(t,s,n,r,o){super(t,s,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),ds(u))){const d=_i(u,s.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Gi.has(n)||t.length!==2)return;const[r,o]=t,a=on(r),l=on(o);if(a!==l)if(sn(a)&&sn(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else xe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,n=[];for(let r=0;r<t.length;r++)(t[r]===null||fl(t[r]))&&n.push(r);n.length&&wl(t,n,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&t.getValue(n,r).jump(r,!1)}measureEndState(){var l;const{element:t,name:s,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const r=t.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=n.length-1,a=n[o];n[o]=xe[s](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Nl(e,t,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const r=document.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Ji=(e,t)=>t&&typeof e=="number"?t.transform(e):e,cn=30,kl=e=>!isNaN(parseFloat(e));class Cl{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,r=!0)=>{var a,l;const o=K.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();r&&((l=this.events.renderRequest)==null||l.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=K.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=kl(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new as);const n=this.events[t].add(s);return t==="change"?()=>{n(),B.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t,s=!0){!s||!this.passiveEffect?this.updateAndNotify(t,s):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=K.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>cn)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,cn);return yi(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,s;(t=this.dependents)==null||t.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ne(e,t){return new Cl(e,t)}const{schedule:js,cancel:Tu}=Mi(queueMicrotask,!1),J={x:!1,y:!1};function er(){return J.x||J.y}function Tl(e){return e==="x"||e==="y"?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function tr(e,t){const s=Nl(e),n=new AbortController,r={passive:!0,...t,signal:n.signal};return[s,r,()=>n.abort()]}function dn(e){return!(e.pointerType==="touch"||er())}function Sl(e,t,s={}){const[n,r,o]=tr(e,s),a=l=>{if(!dn(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=h=>{dn(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,r)};return n.forEach(l=>{l.addEventListener("pointerenter",a,r)}),o}const sr=(e,t)=>t?e===t?!0:sr(e,t.parentElement):!1,Ns=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Pl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ml(e){return Pl.has(e.tagName)||e.tabIndex!==-1}const tt=new WeakSet;function un(e){return t=>{t.key==="Enter"&&e(t)}}function jt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Al=(e,t)=>{const s=e.currentTarget;if(!s)return;const n=un(()=>{if(tt.has(s))return;jt(s,"down");const r=un(()=>{jt(s,"up")}),o=()=>jt(s,"cancel");s.addEventListener("keyup",r,t),s.addEventListener("blur",o,t)});s.addEventListener("keydown",n,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),t)};function hn(e){return Ns(e)&&!er()}function Vl(e,t,s={}){const[n,r,o]=tr(e,s),a=l=>{const c=l.currentTarget;if(!hn(l))return;tt.add(c);const u=t(c,l),d=(f,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),tt.has(c)&&tt.delete(c),hn(f)&&typeof u=="function"&&u(f,{success:y})},h=f=>{d(f,c===window||c===document||s.useGlobalTarget||sr(c,f.target))},m=f=>{d(f,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",m,r)};return n.forEach(l=>{(s.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),bs(l)&&(l.addEventListener("focus",u=>Al(u,r)),!Ml(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),o}function nr(e){return xi(e)&&"ownerSVGElement"in e}function Rl(e){return nr(e)&&e.tagName==="svg"}const q=e=>!!(e&&e.getVelocity),Dl=[...Xi,O,de],El=e=>Dl.find(Yi(e)),ks=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Ll extends p.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=s.offsetParent,r=bs(n)&&n.offsetWidth||0,o=this.props.sizeRef.current;o.height=s.offsetHeight||0,o.width=s.offsetWidth||0,o.top=s.offsetTop,o.left=s.offsetLeft,o.right=r-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Bl({children:e,isPresent:t,anchorX:s}){const n=p.useId(),r=p.useRef(null),o=p.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=p.useContext(ks);return p.useInsertionEffect(()=>{const{width:l,height:c,top:u,left:d,right:h}=o.current;if(t||!r.current||!l||!c)return;const m=s==="left"?`left: ${d}`:`right: ${h}`;r.current.dataset.motionPopId=n;const f=document.createElement("style");return a&&(f.nonce=a),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${l}px !important;
            height: ${c}px !important;
            ${m}px !important;
            top: ${u}px !important;
          }
        `),()=>{document.head.contains(f)&&document.head.removeChild(f)}},[t]),i.jsx(Ll,{isPresent:t,childRef:r,sizeRef:o,children:p.cloneElement(e,{ref:r})})}const Il=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:r,presenceAffectsLayout:o,mode:a,anchorX:l})=>{const c=ts(Fl),u=p.useId();let d=!0,h=p.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:s,custom:r,onExitComplete:m=>{c.set(m,!0);for(const f of c.values())if(!f)return;n&&n()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[s,c,n]);return o&&d&&(h={...h}),p.useMemo(()=>{c.forEach((m,f)=>c.set(f,!1))},[s]),p.useEffect(()=>{!s&&!c.size&&n&&n()},[s]),a==="popLayout"&&(e=i.jsx(Bl,{isPresent:s,anchorX:l,children:e})),i.jsx(dt.Provider,{value:h,children:e})};function Fl(){return new Map}function ir(e=!0){const t=p.useContext(dt);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:r}=t,o=p.useId();p.useEffect(()=>{if(e)return r(o)},[e]);const a=p.useCallback(()=>e&&n&&n(o),[o,n,e]);return!s&&n?[!1,a]:[!0]}const Qe=e=>e.key||"";function mn(e){const t=[];return p.Children.forEach(e,s=>{p.isValidElement(s)&&t.push(s)}),t}const Ol=({children:e,custom:t,initial:s=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:o="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=ir(a),d=p.useMemo(()=>mn(e),[e]),h=a&&!c?[]:d.map(Qe),m=p.useRef(!0),f=p.useRef(d),y=ts(()=>new Map),[x,w]=p.useState(d),[b,j]=p.useState(d);fi(()=>{m.current=!1,f.current=d;for(let N=0;N<b.length;N++){const C=Qe(b[N]);h.includes(C)?y.delete(C):y.get(C)!==!0&&y.set(C,!1)}},[b,h.length,h.join("-")]);const v=[];if(d!==x){let N=[...d];for(let C=0;C<b.length;C++){const R=b[C],P=Qe(R);h.includes(P)||(N.splice(C,0,R),v.push(R))}return o==="wait"&&v.length&&(N=v),j(mn(N)),w(d),null}const{forceRender:A}=p.useContext(es);return i.jsx(i.Fragment,{children:b.map(N=>{const C=Qe(N),R=a&&!c?!1:d===b||h.includes(C),P=()=>{if(y.has(C))y.set(C,!0);else return;let D=!0;y.forEach(g=>{g||(D=!1)}),D&&(A==null||A(),j(f.current),a&&(u==null||u()),n&&n())};return i.jsx(Il,{isPresent:R,initial:!m.current||s?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,onExitComplete:R?void 0:P,anchorX:l,children:N},C)})})},rr=p.createContext({strict:!1}),fn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ke={};for(const e in fn)ke[e]={isEnabled:t=>fn[e].some(s=>!!t[s])};function zl(e){for(const t in e)ke[t]={...ke[t],...e[t]}}const $l=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function lt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$l.has(e)}let ar=e=>!lt(e);function ql(e){typeof e=="function"&&(ar=t=>t.startsWith("on")?!lt(t):e(t))}try{ql(require("@emotion/is-prop-valid").default)}catch{}function Ul(e,t,s){const n={};for(const r in e)r==="values"&&typeof e.values=="object"||(ar(r)||s===!0&&lt(r)||!t&&!lt(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}function Wl(e){if(typeof Proxy>"u")return e;const t=new Map,s=(...n)=>e(...n);return new Proxy(s,{get:(n,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const ut=p.createContext({});function ht(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ze(e){return typeof e=="string"||Array.isArray(e)}const Cs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ts=["initial",...Cs];function mt(e){return ht(e.animate)||Ts.some(t=>ze(e[t]))}function or(e){return!!(mt(e)||e.variants)}function Kl(e,t){if(mt(e)){const{initial:s,animate:n}=e;return{initial:s===!1||ze(s)?s:void 0,animate:ze(n)?n:void 0}}return e.inherit!==!1?t:{}}function Hl(e){const{initial:t,animate:s}=Kl(e,p.useContext(ut));return p.useMemo(()=>({initial:t,animate:s}),[pn(t),pn(s)])}function pn(e){return Array.isArray(e)?e.join(" "):e}const _l=Symbol.for("motionComponentSymbol");function be(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Gl(e,t,s){return p.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),s&&(typeof s=="function"?s(n):be(s)&&(s.current=n))},[t])}const Ss=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Yl="framerAppearId",lr="data-"+Ss(Yl),cr=p.createContext({});function Xl(e,t,s,n,r){var x,w;const{visualElement:o}=p.useContext(ut),a=p.useContext(rr),l=p.useContext(dt),c=p.useContext(ks).reducedMotion,u=p.useRef(null);n=n||a.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:o,props:s,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,h=p.useContext(cr);d&&!d.projection&&r&&(d.type==="html"||d.type==="svg")&&Zl(u.current,s,r,h);const m=p.useRef(!1);p.useInsertionEffect(()=>{d&&m.current&&d.update(s,l)});const f=s[lr],y=p.useRef(!!f&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,f))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,f)));return fi(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),js.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),p.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,f)}),y.current=!1))}),d}function Zl(e,t,s,n){const{layoutId:r,layout:o,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:dr(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!a||l&&be(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:c,layoutRoot:u})}function dr(e){if(e)return e.options.allowProjection!==!1?e.projection:dr(e.parent)}function Ql({preloadedFeatures:e,createVisualElement:t,useRender:s,useVisualState:n,Component:r}){e&&zl(e);function o(l,c){let u;const d={...p.useContext(ks),...l,layoutId:Jl(l)},{isStatic:h}=d,m=Hl(l),f=n(l,h);if(!h&&ss){ec();const y=tc(d);u=y.MeasureLayout,m.visualElement=Xl(r,f,d,t,y.ProjectionNode)}return i.jsxs(ut.Provider,{value:m,children:[u&&m.visualElement?i.jsx(u,{visualElement:m.visualElement,...d}):null,s(r,l,Gl(f,m.visualElement,c),f,h,m.visualElement)]})}o.displayName=`motion.${typeof r=="string"?r:`create(${r.displayName??r.name??""})`}`;const a=p.forwardRef(o);return a[_l]=r,a}function Jl({layoutId:e}){const t=p.useContext(es).id;return t&&e!==void 0?t+"-"+e:e}function ec(e,t){p.useContext(rr).strict}function tc(e){const{drag:t,layout:s}=ke;if(!t&&!s)return{};const n={...t,...s};return{MeasureLayout:t!=null&&t.isEnabled(e)||s!=null&&s.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const $e={};function sc(e){for(const t in e)$e[t]=e[t],cs(t)&&($e[t].isCSSVariable=!0)}function ur(e,{layout:t,layoutId:s}){return Se.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!$e[e]||e==="opacity")}const nc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ic=Te.length;function rc(e,t,s){let n="",r=!0;for(let o=0;o<ic;o++){const a=Te[o],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||s){const u=Ji(l,ws[a]);if(!c){r=!1;const d=nc[a]||a;n+=`${d}(${u}) `}s&&(t[a]=u)}}return n=n.trim(),s?n=s(t,r?"":n):r&&(n="none"),n}function Ps(e,t,s){const{style:n,vars:r,transformOrigin:o}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Se.has(c)){a=!0;continue}else if(cs(c)){r[c]=u;continue}else{const d=Ji(u,ws[c]);c.startsWith("origin")?(l=!0,o[c]=d):n[c]=d}}if(t.transform||(a||s?n.transform=rc(t,e.transform,s):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=o;n.transformOrigin=`${c} ${u} ${d}`}}const Ms=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hr(e,t,s){for(const n in t)!q(t[n])&&!ur(n,s)&&(e[n]=t[n])}function ac({transformTemplate:e},t){return p.useMemo(()=>{const s=Ms();return Ps(s,t,e),Object.assign({},s.vars,s.style)},[t])}function oc(e,t){const s=e.style||{},n={};return hr(n,s,e),Object.assign(n,ac(e,t)),n}function lc(e,t){const s={},n=oc(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s}const cc={offset:"stroke-dashoffset",array:"stroke-dasharray"},dc={offset:"strokeDashoffset",array:"strokeDasharray"};function uc(e,t,s=1,n=0,r=!0){e.pathLength=1;const o=r?cc:dc;e[o.offset]=T.transform(-n);const a=T.transform(t),l=T.transform(s);e[o.array]=`${a} ${l}`}function mr(e,{attrX:t,attrY:s,attrScale:n,pathLength:r,pathSpacing:o=1,pathOffset:a=0,...l},c,u,d){if(Ps(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m}=e;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),r!==void 0&&uc(h,r,o,a,!1)}const fr=()=>({...Ms(),attrs:{}}),pr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hc(e,t,s,n){const r=p.useMemo(()=>{const o=fr();return mr(o,t,pr(n),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};hr(o,e.style,e),r.style={...o,...r.style}}return r}const mc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function As(e){return typeof e!="string"||e.includes("-")?!1:!!(mc.indexOf(e)>-1||/[A-Z]/u.test(e))}function fc(e=!1){return(s,n,r,{latestValues:o},a)=>{const c=(As(s)?hc:lc)(n,o,a,s),u=Ul(n,typeof s=="string",e),d=s!==p.Fragment?{...u,...c,ref:r}:{},{children:h}=n,m=p.useMemo(()=>q(h)?h.get():h,[h]);return p.createElement(s,{...d,children:m})}}function xn(e){const t=[{},{}];return e==null||e.values.forEach((s,n)=>{t[0][n]=s.get(),t[1][n]=s.getVelocity()}),t}function Vs(e,t,s,n){if(typeof t=="function"){const[r,o]=xn(n);t=t(s!==void 0?s:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=xn(n);t=t(s!==void 0?s:e.custom,r,o)}return t}function st(e){return q(e)?e.get():e}function pc({scrapeMotionValuesFromProps:e,createRenderState:t},s,n,r){return{latestValues:xc(s,n,r,e),renderState:t()}}const xr=e=>(t,s)=>{const n=p.useContext(ut),r=p.useContext(dt),o=()=>pc(e,t,n,r);return s?o():ts(o)};function xc(e,t,s,n){const r={},o=n(e,{});for(const m in o)r[m]=st(o[m]);let{initial:a,animate:l}=e;const c=mt(e),u=or(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=s?s.initial===!1:!1;d=d||a===!1;const h=d?l:a;if(h&&typeof h!="boolean"&&!ht(h)){const m=Array.isArray(h)?h:[h];for(let f=0;f<m.length;f++){const y=Vs(e,m[f]);if(y){const{transitionEnd:x,transition:w,...b}=y;for(const j in b){let v=b[j];if(Array.isArray(v)){const A=d?v.length-1:0;v=v[A]}v!==null&&(r[j]=v)}for(const j in x)r[j]=x[j]}}}return r}function Rs(e,t,s){var o;const{style:n}=e,r={};for(const a in n)(q(n[a])||t.style&&q(t.style[a])||ur(a,e)||((o=s==null?void 0:s.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=n[a]);return r}const gc={useVisualState:xr({scrapeMotionValuesFromProps:Rs,createRenderState:Ms})};function gr(e,t,s){const n=Rs(e,t,s);for(const r in e)if(q(e[r])||q(t[r])){const o=Te.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}const yc={useVisualState:xr({scrapeMotionValuesFromProps:gr,createRenderState:fr})};function bc(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...As(n)?yc:gc,preloadedFeatures:e,useRender:fc(r),createVisualElement:t,Component:n};return Ql(a)}}function qe(e,t,s){const n=e.getProps();return Vs(n,t,s!==void 0?s:n.custom,e)}const Wt=e=>Array.isArray(e);function vc(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Ne(s))}function wc(e){return Wt(e)?e[e.length-1]||0:e}function jc(e,t){const s=qe(e,t);let{transitionEnd:n={},transition:r={},...o}=s||{};o={...o,...n};for(const a in o){const l=wc(o[a]);vc(e,a,l)}}function Nc(e){return!!(q(e)&&e.add)}function Kt(e,t){const s=e.getValue("willChange");if(Nc(s))return s.add(t);if(!s&&re.WillChange){const n=new re.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function yr(e){return e.props[lr]}const kc=e=>e!==null;function Cc(e,{repeat:t,repeatType:s="loop"},n){const r=e.filter(kc),o=t&&s!=="loop"&&t%2===1?0:r.length-1;return!o||n===void 0?r[o]:n}const Tc={type:"spring",stiffness:500,damping:25,restSpeed:10},Sc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pc={type:"keyframes",duration:.8},Mc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ac=(e,{keyframes:t})=>t.length>2?Pc:Se.has(e)?e.startsWith("scale")?Sc(t[1]):Tc:Mc;function Vc({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:r,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Ds=(e,t,s,n={},r,o)=>a=>{const l=vs(n,e)||{},c=l.delay||n.delay||0;let{elapsed:u=0}=n;u=u-ee(c);const d={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:r};Vc(l)||Object.assign(d,Ac(e,d)),d.duration&&(d.duration=ee(d.duration)),d.repeatDelay&&(d.repeatDelay=ee(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),(re.instantAnimations||re.skipAnimations)&&(h=!0,d.duration=0,d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!o&&t.get()!==void 0){const m=Cc(d.keyframes,l);if(m!==void 0){B.update(()=>{d.onUpdate(m),d.onComplete()});return}}return l.isSync?new gs(d):new dl(d)};function Rc({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function br(e,t,{delay:s=0,transitionOverride:n,type:r}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(o=n);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const d in l){const h=e.getValue(d,e.latestValues[d]??null),m=l[d];if(m===void 0||u&&Rc(u,d))continue;const f={delay:s,...vs(o||{},d)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===y&&!f.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const b=yr(e);if(b){const j=window.MotionHandoffAnimation(b,d,B);j!==null&&(f.startTime=j,x=!0)}}Kt(e,d),h.start(Ds(d,h,m,e.shouldReduceMotion&&Gi.has(d)?{type:!1}:f,e,x));const w=h.animation;w&&c.push(w)}return a&&Promise.all(c).then(()=>{B.update(()=>{a&&jc(e,a)})}),c}function Ht(e,t,s={}){var c;const n=qe(e,t,s.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(r=s.transitionOverride);const o=n?()=>Promise.all(br(e,n,s)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=r;return Dc(e,t,d+u,h,m,s)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,d]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>d())}else return Promise.all([o(),a(s.delay)])}function Dc(e,t,s=0,n=0,r=1,o){const a=[],l=(e.variantChildren.size-1)*n,c=r===1?(u=0)=>u*n:(u=0)=>l-u*n;return Array.from(e.variantChildren).sort(Ec).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Ht(u,t,{...o,delay:s+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Ec(e,t){return e.sortNodePosition(t)}function Lc(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const r=t.map(o=>Ht(e,o,s));n=Promise.all(r)}else if(typeof t=="string")n=Ht(e,t,s);else{const r=typeof t=="function"?qe(e,t,s.custom):t;n=Promise.all(br(e,r,s))}return n.then(()=>{e.notify("AnimationComplete",t)})}function vr(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}const Bc=Ts.length;function wr(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?wr(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<Bc;s++){const n=Ts[s],r=e.props[n];(ze(r)||r===!1)&&(t[n]=r)}return t}const Ic=[...Cs].reverse(),Fc=Cs.length;function Oc(e){return t=>Promise.all(t.map(({animation:s,options:n})=>Lc(e,s,n)))}function zc(e){let t=Oc(e),s=gn(),n=!0;const r=c=>(u,d)=>{var m;const h=qe(e,d,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:f,transitionEnd:y,...x}=h;u={...u,...x,...y}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,d=wr(e.parent)||{},h=[],m=new Set;let f={},y=1/0;for(let w=0;w<Fc;w++){const b=Ic[w],j=s[b],v=u[b]!==void 0?u[b]:d[b],A=ze(v),N=b===c?j.isActive:null;N===!1&&(y=w);let C=v===d[b]&&v!==u[b]&&A;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),j.protectedKeys={...f},!j.isActive&&N===null||!v&&!j.prevProp||ht(v)||typeof v=="boolean")continue;const R=$c(j.prevProp,v);let P=R||b===c&&j.isActive&&!C&&A||w>y&&A,D=!1;const g=Array.isArray(v)?v:[v];let S=g.reduce(r(b),{});N===!1&&(S={});const{prevResolvedValues:V={}}=j,ae={...V,...S},Ge=z=>{P=!0,m.has(z)&&(D=!0,m.delete(z)),j.needsAnimating[z]=!0;const Z=e.getValue(z);Z&&(Z.liveStyle=!1)};for(const z in ae){const Z=S[z],Pe=V[z];if(f.hasOwnProperty(z))continue;let Me=!1;Wt(Z)&&Wt(Pe)?Me=!vr(Z,Pe):Me=Z!==Pe,Me?Z!=null?Ge(z):m.add(z):Z!==void 0&&m.has(z)?Ge(z):j.protectedKeys[z]=!0}j.prevProp=v,j.prevResolvedValues=S,j.isActive&&(f={...f,...S}),n&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&R)||D)&&h.push(...g.map(z=>({animation:z,options:{type:b}})))}if(m.size){const w={};if(typeof u.initial!="boolean"){const b=qe(e,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(w.transition=b.transition)}m.forEach(b=>{const j=e.getBaseTarget(b),v=e.getValue(b);v&&(v.liveStyle=!0),w[b]=j??null}),h.push({animation:w})}let x=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),n=!1,x?t(h):Promise.resolve()}function l(c,u){var h;if(s[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var f;return(f=m.animationState)==null?void 0:f.setActive(c,u)}),s[c].isActive=u;const d=a(c);for(const m in s)s[m].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>s,reset:()=>{s=gn(),n=!0}}}function $c(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vr(t,e):!1}function he(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gn(){return{animate:he(!0),whileInView:he(),whileHover:he(),whileTap:he(),whileDrag:he(),whileFocus:he(),exit:he()}}class ue{constructor(t){this.isMounted=!1,this.node=t}update(){}}class qc extends ue{constructor(t){super(t),t.animationState||(t.animationState=zc(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ht(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Uc=0;class Wc extends ue{constructor(){super(...arguments),this.id=Uc++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);s&&!t&&r.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Kc={animation:{Feature:qc},exit:{Feature:Wc}};function Ue(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}function _e(e){return{point:{x:e.pageX,y:e.pageY}}}const Hc=e=>t=>Ns(t)&&e(t,_e(t));function Ee(e,t,s,n){return Ue(e,t,Hc(s),n)}function jr({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function _c({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Gc(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}const Nr=1e-4,Yc=1-Nr,Xc=1+Nr,kr=.01,Zc=0-kr,Qc=0+kr;function W(e){return e.max-e.min}function Jc(e,t,s){return Math.abs(e-t)<=s}function yn(e,t,s,n=.5){e.origin=n,e.originPoint=L(t.min,t.max,e.origin),e.scale=W(s)/W(t),e.translate=L(s.min,s.max,e.origin)-e.originPoint,(e.scale>=Yc&&e.scale<=Xc||isNaN(e.scale))&&(e.scale=1),(e.translate>=Zc&&e.translate<=Qc||isNaN(e.translate))&&(e.translate=0)}function Le(e,t,s,n){yn(e.x,t.x,s.x,n?n.originX:void 0),yn(e.y,t.y,s.y,n?n.originY:void 0)}function bn(e,t,s){e.min=s.min+t.min,e.max=e.min+W(t)}function ed(e,t,s){bn(e.x,t.x,s.x),bn(e.y,t.y,s.y)}function vn(e,t,s){e.min=t.min-s.min,e.max=e.min+W(t)}function Be(e,t,s){vn(e.x,t.x,s.x),vn(e.y,t.y,s.y)}const wn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ve=()=>({x:wn(),y:wn()}),jn=()=>({min:0,max:0}),F=()=>({x:jn(),y:jn()});function G(e){return[e("x"),e("y")]}function Nt(e){return e===void 0||e===1}function _t({scale:e,scaleX:t,scaleY:s}){return!Nt(e)||!Nt(t)||!Nt(s)}function me(e){return _t(e)||Cr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Cr(e){return Nn(e.x)||Nn(e.y)}function Nn(e){return e&&e!=="0%"}function ct(e,t,s){const n=e-s,r=t*n;return s+r}function kn(e,t,s,n,r){return r!==void 0&&(e=ct(e,r,n)),ct(e,s,n)+t}function Gt(e,t=0,s=1,n,r){e.min=kn(e.min,t,s,n,r),e.max=kn(e.max,t,s,n,r)}function Tr(e,{x:t,y:s}){Gt(e.x,t.translate,t.scale,t.originPoint),Gt(e.y,s.translate,s.scale,s.originPoint)}const Cn=.999999999999,Tn=1.0000000000001;function td(e,t,s,n=!1){const r=s.length;if(!r)return;t.x=t.y=1;let o,a;for(let l=0;l<r;l++){o=s[l],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&je(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Tr(e,a)),n&&me(o.latestValues)&&je(e,o.latestValues))}t.x<Tn&&t.x>Cn&&(t.x=1),t.y<Tn&&t.y>Cn&&(t.y=1)}function we(e,t){e.min=e.min+t,e.max=e.max+t}function Sn(e,t,s,n,r=.5){const o=L(e.min,e.max,r);Gt(e,t,s,o,n)}function je(e,t){Sn(e.x,t.x,t.scaleX,t.scale,t.originX),Sn(e.y,t.y,t.scaleY,t.scale,t.originY)}function Sr(e,t){return jr(Gc(e.getBoundingClientRect(),t))}function sd(e,t,s){const n=Sr(e,s),{scroll:r}=t;return r&&(we(n.x,r.offset.x),we(n.y,r.offset.y)),n}const Pr=({current:e})=>e?e.ownerDocument.defaultView:null,Pn=(e,t)=>Math.abs(e-t);function nd(e,t){const s=Pn(e.x,t.x),n=Pn(e.y,t.y);return Math.sqrt(s**2+n**2)}class Mr{constructor(t,s,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Ct(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,f=nd(h.offset,{x:0,y:0})>=3;if(!m&&!f)return;const{point:y}=h,{timestamp:x}=$;this.history.push({...y,timestamp:x});const{onStart:w,onMove:b}=this.handlers;m||(w&&w(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=kt(m,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:f,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Ct(h.type==="pointercancel"?this.lastMoveEventInfo:kt(m,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,w),y&&y(h,w)},!Ns(t))return;this.dragSnapToOrigin=o,this.handlers=s,this.transformPagePoint=n,this.contextWindow=r||window;const a=_e(t),l=kt(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=$;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=s;d&&d(t,Ct(l,this.history)),this.removeListeners=We(Ee(this.contextWindow,"pointermove",this.handlePointerMove),Ee(this.contextWindow,"pointerup",this.handlePointerUp),Ee(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ce(this.updatePoint)}}function kt(e,t){return t?{point:t(e.point)}:e}function Mn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ct({point:e},t){return{point:e,delta:Mn(e,Ar(t)),offset:Mn(e,id(t)),velocity:rd(t,.1)}}function id(e){return e[0]}function Ar(e){return e[e.length-1]}function rd(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const r=Ar(e);for(;s>=0&&(n=e[s],!(r.timestamp-n.timestamp>ee(t)));)s--;if(!n)return{x:0,y:0};const o=te(r.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const a={x:(r.x-n.x)/o,y:(r.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ad(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?L(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?L(s,e,n.max):Math.min(e,s)),e}function An(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function od(e,{top:t,left:s,bottom:n,right:r}){return{x:An(e.x,s,r),y:An(e.y,t,n)}}function Vn(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function ld(e,t){return{x:Vn(e.x,t.x),y:Vn(e.y,t.y)}}function cd(e,t){let s=.5;const n=W(e),r=W(t);return r>n?s=Ie(t.min,t.max-n,e.min):n>r&&(s=Ie(e.min,e.max-r,t.min)),ie(0,1,s)}function dd(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const Yt=.35;function ud(e=Yt){return e===!1?e=0:e===!0&&(e=Yt),{x:Rn(e,"left","right"),y:Rn(e,"top","bottom")}}function Rn(e,t,s){return{min:Dn(e,t),max:Dn(e,s)}}function Dn(e,t){return typeof e=="number"?e:e[t]||0}const hd=new WeakMap;class md{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=F(),this.visualElement=t}start(t,{snapToCursor:s=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(_e(d).point)},o=(d,h)=>{const{drag:m,dragPropagation:f,onDragStart:y}=this.getProps();if(m&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Tl(m),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),G(w=>{let b=this.getAxisMotionValue(w).get()||0;if(se.test(b)){const{projection:j}=this.visualElement;if(j&&j.layout){const v=j.layout.layoutBox[w];v&&(b=W(v)*(parseFloat(b)/100))}}this.originPoint[w]=b}),y&&B.postRender(()=>y(d,h)),Kt(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{const{dragPropagation:m,dragDirectionLock:f,onDirectionLock:y,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:w}=h;if(f&&this.currentDirection===null){this.currentDirection=fd(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),x&&x(d,h)},l=(d,h)=>this.stop(d,h),c=()=>G(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Mr(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Pr(this.visualElement)})}stop(t,s){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&B.postRender(()=>o(t,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,n){const{drag:r}=this.getProps();if(!n||!Je(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(a=ad(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,r=this.constraints;t&&be(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=od(n.layoutBox,t):this.constraints=!1,this.elastic=ud(s),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&G(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=dd(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!be(t))return!1;const n=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=sd(n,r.root,this.visualElement.getTransformPagePoint());let a=ld(r.layout.layoutBox,o);if(s){const l=s(_c(a));this.hasMutatedConstraints=!!l,l&&(a=jr(l))}return a}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=G(d=>{if(!Je(d,s,this.currentDirection))return;let h=c&&c[d]||{};a&&(h={min:0,max:0});const m=r?200:1e6,f=r?40:1e7,y={type:"inertia",velocity:n?t[d]:0,bounceStiffness:m,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return Kt(this.visualElement,t),n.start(Ds(t,n,0,s,this.visualElement,!1))}stopAnimation(){G(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){G(t=>{var s;return(s=this.getAxisMotionValue(t).animation)==null?void 0:s.pause()})}getAnimationState(t){var s;return(s=this.getAxisMotionValue(t).animation)==null?void 0:s.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[s];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){G(s=>{const{drag:n}=this.getProps();if(!Je(s,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(s);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[s];o.set(t[s]-L(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!be(s)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};G(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=cd({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),G(a=>{if(!Je(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(L(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;hd.set(this.visualElement,this);const t=this.visualElement.current,s=Ee(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();be(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),B.read(n);const a=Ue(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(G(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),s(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=Yt,dragMomentum:l=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:l}}}function Je(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function fd(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class pd extends ue{constructor(t){super(t),this.removeGroupControls=Y,this.removeListeners=Y,this.controls=new md(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Y}unmount(){this.removeGroupControls(),this.removeListeners()}}const En=e=>(t,s)=>{e&&B.postRender(()=>e(t,s))};class xd extends ue{constructor(){super(...arguments),this.removePointerDownListener=Y}onPointerDown(t){this.session=new Mr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:En(t),onStart:En(s),onMove:n,onEnd:(o,a)=>{delete this.session,r&&B.postRender(()=>r(o,a))}}}mount(){this.removePointerDownListener=Ee(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const nt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ln(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ae={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(T.test(e))e=parseFloat(e);else return e;const s=Ln(e,t.target.x),n=Ln(e,t.target.y);return`${s}% ${n}%`}},gd={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,r=de.parse(e);if(r.length>5)return n;const o=de.createTransformer(e),a=typeof r[0]!="number"?1:0,l=s.x.scale*t.x,c=s.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=L(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),o(r)}};class yd extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=t;sc(bd),o&&(s.group&&s.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),nt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:r,isPresent:o}=this.props,{projection:a}=n;return a&&(a.isPresent=o,r||t.layoutDependency!==s||s===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||B.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),js.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vr(e){const[t,s]=ir(),n=p.useContext(es);return i.jsx(yd,{...e,layoutGroup:n,switchLayoutGroup:p.useContext(cr),isPresent:t,safeToRemove:s})}const bd={borderRadius:{...Ae,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ae,borderTopRightRadius:Ae,borderBottomLeftRadius:Ae,borderBottomRightRadius:Ae,boxShadow:gd};function vd(e,t,s){const n=q(e)?e:Ne(e);return n.start(Ds("",n,t,s)),n.animation}const wd=(e,t)=>e.depth-t.depth;class jd{constructor(){this.children=[],this.isDirty=!1}add(t){ns(this.children,t),this.isDirty=!0}remove(t){is(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(wd),this.isDirty=!1,this.children.forEach(t)}}function Nd(e,t){const s=K.now(),n=({timestamp:r})=>{const o=r-s;o>=t&&(ce(n),e(o-t))};return B.setup(n,!0),()=>ce(n)}const Rr=["TopLeft","TopRight","BottomLeft","BottomRight"],kd=Rr.length,Bn=e=>typeof e=="string"?parseFloat(e):e,In=e=>typeof e=="number"||T.test(e);function Cd(e,t,s,n,r,o){r?(e.opacity=L(0,s.opacity??1,Td(n)),e.opacityExit=L(t.opacity??1,0,Sd(n))):o&&(e.opacity=L(t.opacity??1,s.opacity??1,n));for(let a=0;a<kd;a++){const l=`border${Rr[a]}Radius`;let c=Fn(t,l),u=Fn(s,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||In(c)===In(u)?(e[l]=Math.max(L(Bn(c),Bn(u),n),0),(se.test(u)||se.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||s.rotate)&&(e.rotate=L(t.rotate||0,s.rotate||0,n))}function Fn(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Td=Dr(0,.5,Ci),Sd=Dr(.5,.95,Y);function Dr(e,t,s){return n=>n<e?0:n>t?1:s(Ie(e,t,n))}function On(e,t){e.min=t.min,e.max=t.max}function H(e,t){On(e.x,t.x),On(e.y,t.y)}function zn(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function $n(e,t,s,n,r){return e-=t,e=ct(e,1/s,n),r!==void 0&&(e=ct(e,1/r,n)),e}function Pd(e,t=0,s=1,n=.5,r,o=e,a=e){if(se.test(t)&&(t=parseFloat(t),t=L(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=L(o.min,o.max,n);e===o&&(l-=t),e.min=$n(e.min,t,s,l,r),e.max=$n(e.max,t,s,l,r)}function qn(e,t,[s,n,r],o,a){Pd(e,t[s],t[n],t[r],t.scale,o,a)}const Md=["x","scaleX","originX"],Ad=["y","scaleY","originY"];function Un(e,t,s,n){qn(e.x,t,Md,s?s.x:void 0,n?n.x:void 0),qn(e.y,t,Ad,s?s.y:void 0,n?n.y:void 0)}function Wn(e){return e.translate===0&&e.scale===1}function Er(e){return Wn(e.x)&&Wn(e.y)}function Kn(e,t){return e.min===t.min&&e.max===t.max}function Vd(e,t){return Kn(e.x,t.x)&&Kn(e.y,t.y)}function Hn(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Lr(e,t){return Hn(e.x,t.x)&&Hn(e.y,t.y)}function _n(e){return W(e.x)/W(e.y)}function Gn(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Rd{constructor(){this.members=[]}add(t){ns(this.members,t),t.scheduleRender()}remove(t){if(is(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(r=>t===r);if(s===0)return!1;let n;for(let r=s;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Dd(e,t,s){let n="";const r=e.x.translate/t.x,o=e.y.translate/t.y,a=(s==null?void 0:s.z)||0;if((r||o||a)&&(n=`translate3d(${r}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:m,skewX:f,skewY:y}=s;u&&(n=`perspective(${u}px) ${n}`),d&&(n+=`rotate(${d}deg) `),h&&(n+=`rotateX(${h}deg) `),m&&(n+=`rotateY(${m}deg) `),f&&(n+=`skewX(${f}deg) `),y&&(n+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const Tt=["","X","Y","Z"],Ed={visibility:"hidden"},Ld=1e3;let Bd=0;function St(e,t,s,n){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),n&&(n[e]=0))}function Br(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=yr(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",B,!(r||o))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&Br(n)}function Ir({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=Bd++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Od),this.nodes.forEach(Wd),this.nodes.forEach(Kd),this.nodes.forEach(zd)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jd)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new as),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=nr(a)&&!Rl(a),this.instance=a;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Nd(h,250),nt.hasAnimatedSinceResize&&(nt.hasAnimatedSinceResize=!1,this.nodes.forEach(Xn))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||Xd,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=u.getProps(),b=!this.targetLayout||!Lr(this.targetLayout,f),j=!h&&m;if(this.options.layoutRoot||this.resumeFrom||j||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...vs(y,"layout"),onPlay:x,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,j)}else h||Xn(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ce(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Hd),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Br(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Yn);return}this.isUpdating||this.nodes.forEach(qd),this.isUpdating=!1,this.nodes.forEach(Ud),this.nodes.forEach(Id),this.nodes.forEach(Fd),this.clearAllSnapshots();const l=K.now();$.delta=ie(0,1e3/60,l-$.timestamp),$.timestamp=l,$.isProcessing=!0,gt.update.process($),gt.preRender.process($),gt.render.process($),$.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,js.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($d),this.sharedNodes.forEach(_d)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!W(this.snapshot.measuredBox.x)&&!W(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=F(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Er(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&this.instance&&(l||me(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),Zd(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return F();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Qd))){const{scroll:d}=this.root;d&&(we(l.x,d.offset.x),we(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=F();if(H(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:m}=d;d!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&H(l,a),we(l.x,h.offset.x),we(l.y,h.offset.y))}return l}applyTransform(a,l=!1){const c=F();H(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&je(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),me(d.latestValues)&&je(c,d.latestValues)}return me(this.latestValues)&&je(c,this.latestValues),c}removeTransform(a){const l=F();H(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!me(u.latestValues))continue;_t(u.latestValues)&&u.updateSnapshot();const d=F(),h=u.measurePageBox();H(d,h),Un(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return me(this.latestValues)&&Un(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=$.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),Be(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),H(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=F(),this.targetWithTransforms=F()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ed(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):H(this.target,this.layout.layoutBox),Tr(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=F(),this.relativeTargetOrigin=F(),Be(this.relativeTargetOrigin,this.target,f.target),H(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||_t(this.parent.latestValues)||Cr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===$.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;H(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;td(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=F());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zn(this.prevProjectionDelta.x,this.projectionDelta.x),zn(this.prevProjectionDelta.y,this.projectionDelta.y)),Le(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!Gn(this.projectionDelta.x,this.prevProjectionDelta.x)||!Gn(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ve(),this.projectionDelta=ve(),this.projectionDeltaWithTransform=ve()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=ve();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=F(),f=c?c.source:void 0,y=this.layout?this.layout.source:void 0,x=f!==y,w=this.getStack(),b=!w||w.members.length<=1,j=!!(x&&!b&&this.options.crossfade===!0&&!this.path.some(Yd));this.animationProgress=0;let v;this.mixTargetDelta=A=>{const N=A/1e3;Zn(h.x,a.x,N),Zn(h.y,a.y,N),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Be(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gd(this.relativeTarget,this.relativeTargetOrigin,m,N),v&&Vd(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=F()),H(v,this.relativeTarget)),x&&(this.animationValues=d,Cd(d,u,this.latestValues,N,j,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ce(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{nt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ne(0)),this.currentAnimation=vd(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ld),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Fr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||F();const h=W(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const m=W(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}H(l,c),je(l,d),Le(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rd),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&St("z",a,u,this.animationValues);for(let d=0;d<Tt.length;d++)St(`rotate${Tt[d]}`,a,u,this.animationValues),St(`skew${Tt[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ed;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=st(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=st(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!me(this.latestValues)&&(f.transform=c?c({},""):"none",this.hasProjected=!1),f}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=Dd(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:h,y:m}=this.projectionDelta;l.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const f in $e){if(d[f]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:w}=$e[f],b=l.transform==="none"?d[f]:y(d[f],u);if(x){const j=x.length;for(let v=0;v<j;v++)l[x[v]]=b}else w?this.options.visualElement.renderState.vars[f]=b:l[f]=b}return this.options.layoutId&&(l.pointerEvents=u===this?st(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Yn),this.root.sharedNodes.clear()}}}function Id(e){e.updateLayout()}function Fd(e){var s;const t=((s=e.resumeFrom)==null?void 0:s.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;o==="size"?G(h=>{const m=a?t.measuredBox[h]:t.layoutBox[h],f=W(m);m.min=n[h].min,m.max=m.min+f}):Fr(o,t.layoutBox,n)&&G(h=>{const m=a?t.measuredBox[h]:t.layoutBox[h],f=W(n[h]);m.max=m.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+f)});const l=ve();Le(l,n,t.layoutBox);const c=ve();a?Le(c,e.applyTransform(r,!0),t.measuredBox):Le(c,n,t.layoutBox);const u=!Er(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:f}=h;if(m&&f){const y=F();Be(y,t.layoutBox,m.layoutBox);const x=F();Be(x,n,f.layoutBox),Lr(y,x)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=y,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Od(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function zd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $d(e){e.clearSnapshot()}function Yn(e){e.clearMeasurements()}function qd(e){e.isLayoutDirty=!1}function Ud(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Xn(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Wd(e){e.resolveTargetDelta()}function Kd(e){e.calcProjection()}function Hd(e){e.resetSkewAndRotation()}function _d(e){e.removeLeadSnapshot()}function Zn(e,t,s){e.translate=L(t.translate,0,s),e.scale=L(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function Qn(e,t,s,n){e.min=L(t.min,s.min,n),e.max=L(t.max,s.max,n)}function Gd(e,t,s,n){Qn(e.x,t.x,s.x,n),Qn(e.y,t.y,s.y,n)}function Yd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Xd={duration:.45,ease:[.4,0,.1,1]},Jn=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ei=Jn("applewebkit/")&&!Jn("chrome/")?Math.round:Y;function ti(e){e.min=ei(e.min),e.max=ei(e.max)}function Zd(e){ti(e.x),ti(e.y)}function Fr(e,t,s){return e==="position"||e==="preserve-aspect"&&!Jc(_n(t),_n(s),.2)}function Qd(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Jd=Ir({attachResizeListener:(e,t)=>Ue(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pt={current:void 0},Or=Ir({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pt.current){const e=new Jd({});e.mount(window),e.setOptions({layoutScroll:!0}),Pt.current=e}return Pt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),eu={pan:{Feature:xd},drag:{Feature:pd,ProjectionNode:Or,MeasureLayout:Vr}};function si(e,t,s){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,o=n[r];o&&B.postRender(()=>o(t,_e(t)))}class tu extends ue{mount(){const{current:t}=this.node;t&&(this.unmount=Sl(t,(s,n)=>(si(this.node,n,"Start"),r=>si(this.node,r,"End"))))}unmount(){}}class su extends ue{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=We(Ue(this.node.current,"focus",()=>this.onFocus()),Ue(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ni(e,t,s){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),o=n[r];o&&B.postRender(()=>o(t,_e(t)))}class nu extends ue{mount(){const{current:t}=this.node;t&&(this.unmount=Vl(t,(s,n)=>(ni(this.node,n,"Start"),(r,{success:o})=>ni(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xt=new WeakMap,Mt=new WeakMap,iu=e=>{const t=Xt.get(e.target);t&&t(e)},ru=e=>{e.forEach(iu)};function au({root:e,...t}){const s=e||document;Mt.has(s)||Mt.set(s,{});const n=Mt.get(s),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(ru,{root:e,...t})),n[r]}function ou(e,t,s){const n=au(t);return Xt.set(e,s),n.observe(e),()=>{Xt.delete(e),n.unobserve(e)}}const lu={some:0,all:1};class cu extends ue{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:r="some",once:o}=t,a={root:s?s.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:lu[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),m=u?d:h;m&&m(c)};return ou(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(du(t,s))&&this.startObserver()}unmount(){}}function du({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const uu={inView:{Feature:cu},tap:{Feature:nu},focus:{Feature:su},hover:{Feature:tu}},hu={layout:{ProjectionNode:Or,MeasureLayout:Vr}},Zt={current:null},zr={current:!1};function mu(){if(zr.current=!0,!!ss)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zt.current=e.matches;e.addListener(t),t()}else Zt.current=!1}const fu=new WeakMap;function pu(e,t,s){for(const n in t){const r=t[n],o=s[n];if(q(r))e.addValue(n,r);else if(q(o))e.addValue(n,Ne(r,{owner:e}));else if(o!==r)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(n);e.addValue(n,Ne(a!==void 0?a:r,{owner:e}))}}for(const n in s)t[n]===void 0&&e.removeValue(n);return t}const ii=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xu{scrapeMotionValuesFromProps(t,s,n){return{}}constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ys,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=K.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,B.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=mt(s),this.isVariantNode=or(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const m in h){const f=h[m];c[m]!==void 0&&q(f)&&f.set(c[m],!1)}}mount(t){this.current=t,fu.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),zr.current||mu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zt.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ce(this.notifyUpdate),ce(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Se.has(t);n&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&B.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=s.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{r(),o(),a&&a(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ke){const s=ke[t];if(!s)continue;const{isEnabled:n,Feature:r}=s;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<ii.length;n++){const r=ii[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,a=t[o];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=pu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const n=this.values.get(t);s!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=Ne(s===null?void 0:s,{owner:this}),this.addValue(t,n)),n}readValue(t,s){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(pi(n)||gi(n))?n=parseFloat(n):!El(n)&&de.test(s)&&(n=Qi(t,s)),this.setBaseTarget(t,q(n)?n.get():n)),q(n)?n.get():n}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){var o;const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const a=Vs(this.props,s,(o=this.presenceContext)==null?void 0:o.custom);a&&(n=a[t])}if(s&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!q(r)?r:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new as),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}}class $r extends xu{constructor(){super(...arguments),this.KeyframeResolver=jl}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;q(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function qr(e,{style:t,vars:s},n,r){Object.assign(e.style,t,r&&r.getProjectionStyles(n));for(const o in s)e.style.setProperty(o,s[o])}function gu(e){return window.getComputedStyle(e)}class yu extends $r{constructor(){super(...arguments),this.type="html",this.renderInstance=qr}readValueFromInstance(t,s){var n;if(Se.has(s))return(n=this.projection)!=null&&n.isProjecting?Ft(s):$o(t,s);{const r=gu(t),o=(cs(s)?r.getPropertyValue(s):r[s])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:s}){return Sr(t,s)}build(t,s,n){Ps(t,s,n.transformTemplate)}scrapeMotionValuesFromProps(t,s,n){return Rs(t,s,n)}}const Ur=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function bu(e,t,s,n){qr(e,t,void 0,n);for(const r in t.attrs)e.setAttribute(Ur.has(r)?r:Ss(r),t.attrs[r])}class vu extends $r{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=F}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(Se.has(s)){const n=Zi(s);return n&&n.default||0}return s=Ur.has(s)?s:Ss(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,n){return gr(t,s,n)}build(t,s,n){mr(t,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,s,n,r){bu(t,s,n,r)}mount(t){this.isSVGTag=pr(t.tagName),super.mount(t)}}const wu=(e,t)=>As(e)?new vu(t):new yu(t,{allowProjection:e!==p.Fragment}),ju=bc({...Kc,...uu,...eu,...hu},wu),_=Wl(ju),ri=[{id:1,title:"Apartamento Barra Wave",location:"Barra da Tijuca, Rio de Janeiro",price:"R$ 450.000",image:"https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:2,bathrooms:1,area:"65m²",type:"apartamento",purpose:"morar",budget:"medio"},{id:2,title:"Studio Design Botafogo",location:"Botafogo, Rio de Janeiro",price:"R$ 380.000",image:"https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:1,bathrooms:1,area:"45m²",type:"studio",purpose:"investir",budget:"baixo"},{id:3,title:"Cobertura Península",location:"Barra da Tijuca, Rio de Janeiro",price:"R$ 1.200.000",image:"https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:3,bathrooms:2,area:"120m²",type:"cobertura",purpose:"morar",budget:"alto"},{id:4,title:"Casa Jardim Oceânico",location:"Barra da Tijuca, Rio de Janeiro",price:"R$ 1.800.000",image:"https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:4,bathrooms:3,area:"220m²",type:"casa",purpose:"morar",budget:"alto"},{id:5,title:"Apartamento Recreio dos Bandeirantes",location:"Recreio, Rio de Janeiro",price:"R$ 550.000",image:"https://images.unsplash.com/photo-1512917774080-9991f1c4c750?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:3,bathrooms:2,area:"85m²",type:"apartamento",purpose:"morar",budget:"medio"},{id:6,title:"Studio Ipanema",location:"Ipanema, Rio de Janeiro",price:"R$ 650.000",image:"https://images.unsplash.com/photo-1493809842364-78817add7ffb?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:1,bathrooms:1,area:"40m²",type:"studio",purpose:"investir",budget:"medio"},{id:7,title:"Apartamento Tijuca",location:"Tijuca, Rio de Janeiro",price:"R$ 320.000",image:"https://images.unsplash.com/photo-1484154218962-a197022b5858?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:2,bathrooms:1,area:"60m²",type:"apartamento",purpose:"morar",budget:"baixo"},{id:8,title:"Cobertura Leblon",location:"Leblon, Rio de Janeiro",price:"R$ 2.500.000",image:"https://images.unsplash.com/photo-1567496898669-ee935f5f647a?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",bedrooms:3,bathrooms:3,area:"180m²",type:"cobertura",purpose:"morar",budget:"alto"}];function Nu(){const{openModal:e}=X(),[t,s]=p.useState(0),[n,r]=p.useState({type:"",purpose:"",budget:"",bedrooms:"",minArea:"",maxArea:""}),[o,a]=p.useState([]),[l,c]=p.useState(0),[u,d]=p.useState([]),[h,m]=p.useState(null);p.useState(null);const f=p.useRef(null),y=p.useRef(null),x=[{question:"Qual tipo de imóvel você procura?",options:[{value:"apartamento",label:"Apartamento"},{value:"casa",label:"Casa"},{value:"cobertura",label:"Cobertura"},{value:"studio",label:"Studio"}]},{question:"Quantos quartos você precisa?",options:[{value:"1",label:"1 quarto"},{value:"2",label:"2 quartos"},{value:"3",label:"3 quartos"},{value:"4",label:"4 ou mais quartos"}]},{question:"Qual metragem você busca?",options:[{value:"pequeno",label:"Até 60m²"},{value:"medio",label:"60m² a 120m²"},{value:"grande",label:"Acima de 120m²"}]},{question:"Qual o objetivo da compra?",options:[{value:"morar",label:"Para morar"},{value:"investir",label:"Para investir"}]},{question:"Qual sua faixa de orçamento?",options:[{value:"baixo",label:"Até R$ 400.000"},{value:"medio",label:"R$ 400.000 a R$ 800.000"},{value:"alto",label:"Acima de R$ 800.000"}]}];p.useEffect(()=>{if(t===x.length+1){let g=[...ri];n.type&&(g=g.filter(S=>S.type===n.type)),n.bedrooms&&(n.bedrooms==="4"?g=g.filter(S=>S.bedrooms>=4):g=g.filter(S=>S.bedrooms===parseInt(n.bedrooms))),n.minArea&&n.maxArea&&(g=g.filter(S=>{const V=parseInt(S.area.replace(/[^0-9]/g,""));return V>=parseInt(n.minArea)&&V<=parseInt(n.maxArea)})),n.purpose&&(g=g.filter(S=>S.purpose===n.purpose)),n.budget&&(g=g.filter(S=>S.budget===n.budget)),g.length===0&&(g=ri),a(g),c(0)}},[t,n]);const w=(g,S)=>{g===0?r(V=>({...V,type:S})):g===1?r(V=>({...V,bedrooms:S})):g===2?S==="pequeno"?r(V=>({...V,minArea:"0",maxArea:"60"})):S==="medio"?r(V=>({...V,minArea:"60",maxArea:"120"})):S==="grande"&&r(V=>({...V,minArea:"120",maxArea:"1000"})):g===3?r(V=>({...V,purpose:S})):g===4&&r(V=>({...V,budget:S})),s(V=>V+1)},[b,j]=p.useState(4);p.useEffect(()=>{const g=()=>{window.innerWidth>=1024?j(4):window.innerWidth>=768?j(2):j(1)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]);const v=Math.ceil(o.length/b),A=p.useCallback(()=>{l<v-1?c(g=>g+1):c(0)},[l,v]),N=p.useCallback(()=>{l>0?c(g=>g-1):c(v-1)},[l,v]),C=p.useCallback(()=>{s(0),r({type:"",purpose:"",budget:"",bedrooms:"",minArea:"",maxArea:""})},[]),R=p.useCallback(g=>{d(S=>S.includes(g)?S.filter(V=>V!==g):[...S,g])},[]),P=p.useCallback(g=>{m(S=>S===g?null:g)},[]),D=p.useCallback((g,S)=>{const V=`Confira este imóvel: ${S.title} - ${S.location} - ${S.price}`,ae=window.location.href;switch(g){case"whatsapp":window.open(`https://api.whatsapp.com/send?text=${encodeURIComponent(V+" "+ae)}`,"_blank");break;case"facebook":window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(ae)}&quote=${encodeURIComponent(V)}`,"_blank");break;case"twitter":window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(V)}&url=${encodeURIComponent(ae)}`,"_blank");break;case"email":window.open(`mailto:?subject=${encodeURIComponent("Imóvel interessante")}&body=${encodeURIComponent(V+`

`+ae)}`,"_blank");break}m(null)},[]);return p.useEffect(()=>{const g=S=>{y.current&&!y.current.contains(S.target)&&m(null)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),i.jsx("section",{className:"py-16 bg-gray-50",children:i.jsxs("div",{className:"container mx-auto px-4",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsx("h2",{className:"text-3xl font-bold mb-4 bg-gradient-to-r from-[#0026bd] to-[#00227b] bg-clip-text text-transparent inline-block",children:"Imóveis relacionados"}),i.jsx("div",{className:"w-20 h-1 bg-gradient-to-r from-[#0026bd] to-[#00227b] mx-auto mb-4 rounded-full"}),i.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Encontre outros imóveis que podem ser do seu interesse com base nas suas preferências."})]}),i.jsxs(_.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},className:"max-w-7xl mx-auto bg-white rounded-2xl shadow-xl overflow-hidden border border-gray-100",children:[i.jsx("div",{className:"bg-gradient-to-r from-[#0026bd] to-[#00227b] h-2"}),i.jsx(Ol,{mode:"wait",children:t===0&&i.jsxs(_.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},className:"p-10 text-center",children:[i.jsx(_.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.5,delay:.2},className:"w-24 h-24 bg-gradient-to-br from-[#0026bd]/20 to-[#0026bd]/5 rounded-full flex items-center justify-center mx-auto mb-8 shadow-lg shadow-blue-100",children:i.jsx(Xr,{className:"w-12 h-12 text-[#0026bd]"})}),i.jsx(_.h3,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.3},className:"text-3xl font-bold text-gray-800 mb-4",children:"Descubra imóveis perfeitos para você"}),i.jsx(_.p,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.4},className:"text-gray-600 mb-10 max-w-md mx-auto",children:"Responda 3 perguntas rápidas para encontrarmos os imóveis que melhor se adequam às suas necessidades."}),i.jsxs(_.button,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.5},whileHover:{scale:1.05},whileTap:{scale:.98},onClick:()=>s(1),className:"bg-gradient-to-r from-[#0026bd] to-[#00227b] text-white px-8 py-4 rounded-xl font-medium transition-all inline-flex items-center shadow-lg shadow-blue-200/50 hover:shadow-blue-300/50",children:["Começar agora",i.jsx(ne,{className:"ml-2 w-5 h-5"})]})]},"intro")}),t>=1&&t<=3&&i.jsxs("div",{className:"p-8",children:[i.jsx("div",{className:"flex items-center justify-between mb-8",children:[1,2,3].map(g=>i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${g<t?"bg-[#0026bd] text-white":g===t?"bg-[#0026bd]/20 text-[#0026bd] border border-[#0026bd]":"bg-gray-200 text-gray-400"}`,children:g<t?i.jsx(Qt,{className:"w-5 h-5"}):g}),i.jsxs("span",{className:`text-xs mt-1 ${g<=t?"text-[#0026bd]":"text-gray-400"}`,children:["Pergunta ",g]})]},g))}),i.jsx("h3",{className:"text-xl font-bold text-gray-800 mb-6",children:x[t-1].question}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:x[t-1].options.map(g=>i.jsxs("button",{onClick:()=>w(t-1,g.value),className:"p-4 border border-gray-200 rounded-lg hover:border-[#0026bd] hover:bg-[#0026bd]/5 transition-colors flex items-center justify-between",children:[i.jsx("span",{children:g.label}),i.jsx(ne,{className:"w-5 h-5 text-[#0026bd]"})]},g.value))}),t>1&&i.jsxs("button",{onClick:()=>s(g=>g-1),className:"mt-6 text-gray-500 hover:text-[#0026bd] transition-colors flex items-center",children:[i.jsx(At,{className:"w-4 h-4 mr-1"}),"Voltar"]})]}),t===4&&i.jsxs("div",{className:"p-8",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsx("h3",{className:"text-xl font-bold text-gray-800",children:"Imóveis recomendados para você"}),i.jsxs("button",{onClick:C,className:"text-[#0026bd] hover:text-[#00227b] transition-colors text-sm flex items-center",children:[i.jsx(ne,{className:"w-4 h-4 mr-1 rotate-180"}),"Refazer questionário"]})]}),o.length>0?i.jsxs("div",{className:"relative",children:[i.jsx("div",{ref:f,className:"overflow-hidden rounded-lg",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 transition-all duration-300",children:o.slice(l*b,l*b+b).map(g=>i.jsx("div",{className:"w-full flex-shrink-0",children:i.jsxs(_.div,{whileHover:{y:-5},className:"bg-white rounded-xl overflow-hidden shadow-lg border border-gray-100 hover:shadow-xl transition-all duration-300 h-full",children:[i.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden",children:[i.jsx("img",{src:g.image,alt:g.title,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-500"}),i.jsx("div",{className:"absolute top-4 right-4 bg-gradient-to-r from-[#0026bd] to-[#00227b] text-white px-3 py-1 rounded-md text-sm font-medium shadow-md",children:g.price}),i.jsxs("div",{className:"absolute top-4 left-4 flex space-x-2",children:[i.jsx(_.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>R(g.id),className:`w-8 h-8 rounded-full flex items-center justify-center ${u.includes(g.id)?"bg-red-500 text-white":"bg-white text-gray-500"} shadow-md`,children:i.jsx(ia,{className:`w-4 h-4 ${u.includes(g.id)?"fill-current":""}`})}),i.jsxs(_.div,{whileHover:{scale:1.1},whileTap:{scale:.9},className:"relative",children:[i.jsx("button",{onClick:()=>P(g.id),className:"w-8 h-8 rounded-full bg-white text-gray-500 flex items-center justify-center shadow-md",children:i.jsx(ua,{className:"w-4 h-4"})}),h===g.id&&i.jsx(_.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"absolute top-full left-0 mt-2 bg-white rounded-lg shadow-xl p-2 z-10 w-40",ref:y,children:i.jsxs("div",{className:"flex flex-col space-y-1",children:[i.jsxs("button",{onClick:()=>D("whatsapp",g),className:"flex items-center p-2 hover:bg-gray-100 rounded-md text-sm",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-green-600",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M17.498 11.697c-.453-.453-1.134-.453-1.587 0l-5.08 5.081V1c0-.552-.448-1-1-1s-1 .448-1 1v15.778l-5.08-5.08c-.453-.454-1.134-.454-1.587 0-.453.453-.453 1.134 0 1.587l6.704 6.704c.098.098.226.165.354.207.128.042.266.042.394 0 .128-.042.256-.109.354-.207l6.704-6.704c.453-.453.453-1.134 0-1.587z"})}),"WhatsApp"]}),i.jsxs("button",{onClick:()=>D("facebook",g),className:"flex items-center p-2 hover:bg-gray-100 rounded-md text-sm",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),"Facebook"]}),i.jsxs("button",{onClick:()=>D("twitter",g),className:"flex items-center p-2 hover:bg-gray-100 rounded-md text-sm",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-400",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085a4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"})}),"Twitter"]}),i.jsxs("button",{onClick:()=>D("email",g),className:"flex items-center p-2 hover:bg-gray-100 rounded-md text-sm",children:[i.jsx("svg",{className:"w-4 h-4 mr-2 text-red-500",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z"})}),"Email"]})]})})]})]})]}),i.jsxs("div",{className:"p-5",children:[i.jsx("h4",{className:"text-lg font-bold text-gray-800 mb-2 line-clamp-1",children:g.title}),i.jsxs("div",{className:"flex items-center text-gray-500 text-sm mb-4",children:[i.jsx(Jt,{className:"w-4 h-4 mr-1 flex-shrink-0"}),i.jsx("span",{className:"line-clamp-1",children:g.location})]}),i.jsx("div",{className:"flex items-center justify-between border-t border-gray-100 pt-4",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"flex items-center text-gray-700",children:[i.jsx(Jr,{className:"w-4 h-4 mr-1 text-[#0026bd]"}),i.jsx("span",{children:g.bedrooms})]}),i.jsxs("div",{className:"flex items-center text-gray-700",children:[i.jsx(li,{className:"w-4 h-4 mr-1 text-[#0026bd]"}),i.jsx("span",{children:g.bathrooms})]}),i.jsxs("div",{className:"flex items-center text-gray-700",children:[i.jsx(ga,{className:"w-4 h-4 mr-1 text-[#0026bd]"}),i.jsx("span",{children:g.area})]})]})})]}),i.jsx("div",{className:"px-5 pb-5",children:i.jsxs(_.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:e,className:"w-full bg-gradient-to-r from-[#0026bd] to-[#00227b] hover:from-[#00227b] hover:to-[#001c62] text-white py-3 rounded-lg text-sm font-medium transition-all shadow-md hover:shadow-lg flex items-center justify-center",children:[i.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Mais informações"]})})]})},g.id))})}),o.length>b&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-between mt-4",children:[i.jsx("button",{onClick:N,className:"bg-[#0026bd] text-white w-10 h-10 rounded-full flex items-center justify-center hover:bg-[#00227b] transition-colors",children:i.jsx(At,{className:"w-6 h-6"})}),i.jsx("div",{className:"text-center",children:i.jsxs("span",{className:"text-sm text-gray-500",children:["Página ",l+1," de ",v]})}),i.jsx("button",{onClick:A,className:"bg-[#0026bd] text-white w-10 h-10 rounded-full flex items-center justify-center hover:bg-[#00227b] transition-colors",children:i.jsx(oi,{className:"w-6 h-6"})})]}),i.jsx("div",{className:"flex justify-center mt-4 space-x-2",children:Array.from({length:v}).map((g,S)=>i.jsx("button",{onClick:()=>c(S),className:`w-2 h-2 rounded-full transition-all ${l===S?"bg-[#0026bd] w-4":"bg-gray-300"}`,"aria-label":`Ir para página ${S+1}`},S))}),i.jsx("div",{className:"mt-8 text-center",children:i.jsxs(_.button,{whileHover:{scale:1.03},whileTap:{scale:.98},onClick:e,className:"bg-white border-2 border-[#0026bd] text-[#0026bd] hover:bg-[#0026bd] hover:text-white px-6 py-3 rounded-lg text-sm font-medium transition-all shadow-sm hover:shadow-md inline-flex items-center",children:[i.jsx(da,{className:"w-4 h-4 mr-2"}),"Ver todos os imóveis"]})})]})]}):i.jsx("div",{className:"text-center py-10",children:i.jsx("p",{className:"text-gray-500",children:"Nenhum imóvel encontrado com os filtros selecionados."})})]})]})]})})}function Pu(){return i.jsxs(i.Fragment,{children:[i.jsx(Yr,{title:"Modelo de Página"}),i.jsxs(Pa,{showHero:!0,children:[i.jsx(Ia,{}),i.jsx(Ma,{}),i.jsx(Aa,{}),i.jsx(Da,{}),i.jsx(Va,{}),i.jsx(La,{}),i.jsx(Ea,{}),i.jsx(Ra,{}),i.jsx(Fa,{}),i.jsx(Nu,{})]})]})}export{Pu as default};
