@burdenoff/microfe-housingvista 2026.930.1 → 2026.930.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,9 +19,9 @@ import { CoordinatePicker as Se } from "../../components/maps/CoordinatePicker.j
19
19
  import { amenityOptions as d } from "../../utils/amenities.js";
20
20
  import { currencyOptions as Ce, facingOptions as we, furnishingOptions as Te, propertyCategoryOptions as Ee, propertyTypeOptions as De } from "../../utils/propertyOptions.js";
21
21
  import { useMemo as Oe, useState as f } from "react";
22
- import { ArrowLeft as ke, BadgeCheck as Ae, Bath as je, Bed as Me, Building as Ne, Calculator as Pe, Calendar as Fe, Car as Ie, CheckCircle as p, ChevronLeft as Le, ChevronRight as Re, Compass as ze, DollarSign as Be, Download as Ve, Dumbbell as m, Flame as He, Heart as Ue, KeyRound as We, MapPin as Ge, MessageSquare as Ke, Navigation as qe, ParkingCircle as Je, Pencil as Ye, Share2 as Xe, Shield as h, Square as Ze, Trash2 as Qe, TreePine as g, TrendingUp as $e, Utensils as et, Waves as tt, Wifi as nt, Wind as rt } from "lucide-react";
23
- import { useLocation as it, useNavigate as at, useParams as ot } from "react-router";
24
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
22
+ import { ArrowLeft as ke, BadgeCheck as Ae, Bath as je, Bed as Me, Building as Ne, Calculator as Pe, Calendar as Fe, Car as Ie, CheckCircle as p, ChevronLeft as Le, ChevronRight as Re, Compass as ze, DollarSign as Be, Download as Ve, Dumbbell as m, Flame as He, Heart as Ue, KeyRound as We, MapPin as Ge, MessageSquare as Ke, Navigation as qe, ParkingCircle as Je, Pencil as Ye, Share2 as Xe, Shield as h, Square as Ze, Trash2 as Qe, TreePine as g, TrendingUp as $e, Utensils as et, Waves as _, Wifi as tt, Wind as nt } from "lucide-react";
23
+ import { useLocation as rt, useNavigate as it, useParams as at } from "react-router";
24
+ import { Fragment as ot, jsx as v, jsxs as y } from "react/jsx-runtime";
25
25
  import { Button as b, EmphasisPanel as st, NextSteps as ct, PagePurpose as lt, ResponsiveDialog as x, ResponsiveDialogContent as S, ResponsiveDialogDescription as C, ResponsiveDialogFooter as w, ResponsiveDialogHeader as T, ResponsiveDialogTitle as E } from "@burdenoff/fe-libs/ui";
26
26
  //#region src/housingvista/pages/properties/PropertyDetailPage.tsx
27
27
  var ut = {
@@ -129,7 +129,7 @@ var ut = {
129
129
  }, O = (e) => {
130
130
  let t = D(e);
131
131
  return t === null ? void 0 : t;
132
- }, k = (e) => e == null ? "" : String(e), ht = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), gt = [
132
+ }, k = (e) => e == null ? "" : String(e), A = (e) => e ?? "", ht = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), gt = [
133
133
  {
134
134
  key: "bedrooms",
135
135
  label: "Bedrooms",
@@ -208,10 +208,10 @@ var vt = [
208
208
  id: "location",
209
209
  label: "Location"
210
210
  }
211
- ], A = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", yt = [
211
+ ], j = "h-10 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", yt = [
212
212
  {
213
213
  match: /pool|swim/i,
214
- icon: tt
214
+ icon: _
215
215
  },
216
216
  {
217
217
  match: /gym|fitness/i,
@@ -231,11 +231,11 @@ var vt = [
231
231
  },
232
232
  {
233
233
  match: /wifi|internet|broadband/i,
234
- icon: nt
234
+ icon: tt
235
235
  },
236
236
  {
237
237
  match: /a\/?c|air.?condition|central air|hvac/i,
238
- icon: rt
238
+ icon: nt
239
239
  },
240
240
  {
241
241
  match: /fire|chimney|heat/i,
@@ -269,18 +269,18 @@ function St(e) {
269
269
  }
270
270
  }
271
271
  var Ct = () => {
272
- let { id: p } = ot(), m = at(), He = it(), { emit: Je, emitResource: h } = ee();
272
+ let { id: p } = at(), m = it(), He = rt(), { emit: Je, emitResource: h } = ee();
273
273
  te("housingvista.property.viewed", p);
274
- let { data: g, loading: et } = ae(p), { data: tt } = ie({ pagination: {
274
+ let { data: g, loading: et } = ae(p), { data: _ } = ie({ pagination: {
275
275
  limit: 8,
276
276
  offset: 0
277
- } }), { data: nt } = le(), { data: rt } = se({
277
+ } }), { data: tt } = le(), { data: nt } = se({
278
278
  filter: p ? { propertyId: p } : void 0,
279
279
  pagination: {
280
280
  limit: 1,
281
281
  offset: 0
282
282
  }
283
- }), { saveShortlist: yt, loading: Ct } = ce(), { removeShortlist: wt, loading: Tt } = oe(), { bookViewing: Et, loading: Dt } = l(), { submitOffer: Ot, loading: kt } = ue(), { updateProperty: At, loading: j } = fe(), { deleteProperty: jt, loading: Mt } = re(), { submitRentalApplication: Nt, loading: Pt } = de(), { createInvestment: Ft, loading: It } = ne(), { updatePropertyReraStatus: Lt, loading: Rt } = pe(), zt = Oe(() => tt.filter((e) => e.id !== p).slice(0, 3), [tt, p]), M = Oe(() => nt.some((e) => e.propertyId === p), [nt, p]), [N, Bt] = f(0), [P, Vt] = f("details"), [Ht, F] = f(!1), [Ut, I] = f(!1), [Wt, L] = f(!1), [Gt, R] = f(!1), [Kt, z] = f(!1), [qt, Jt] = f(!1), [Yt, Xt] = f(""), [Zt, Qt] = f(""), [$t, en] = f(""), [tn, nn] = f(""), [rn, an] = f(""), [on, sn] = f(""), [cn, ln] = f(""), [un, dn] = f("8"), [B, fn] = f(!0), [pn, mn] = f("6"), [V, hn] = f(!1), [gn, _n] = f("20"), [vn, yn] = f("8.5"), [bn, xn] = f("20"), [H, Sn] = f(""), [Cn, wn] = f("in_person"), [Tn, En] = f(""), [Dn, On] = f(""), [kn, An] = f(""), [jn, Mn] = f(""), [Nn, Pn] = f(""), [Fn, U] = f(""), [W, In] = f(mt), [Ln, Rn] = f(mt);
283
+ }), { saveShortlist: yt, loading: Ct } = ce(), { removeShortlist: wt, loading: Tt } = oe(), { bookViewing: Et, loading: Dt } = l(), { submitOffer: Ot, loading: kt } = ue(), { updateProperty: At, loading: M } = fe(), { deleteProperty: jt, loading: Mt } = re(), { submitRentalApplication: Nt, loading: Pt } = de(), { createInvestment: Ft, loading: It } = ne(), { updatePropertyReraStatus: Lt, loading: Rt } = pe(), zt = Oe(() => _.filter((e) => e.id !== p).slice(0, 3), [_, p]), N = Oe(() => tt.some((e) => e.propertyId === p), [tt, p]), [P, Bt] = f(0), [F, Vt] = f("details"), [Ht, I] = f(!1), [Ut, L] = f(!1), [Wt, R] = f(!1), [Gt, Kt] = f(!1), [qt, z] = f(!1), [Jt, Yt] = f(!1), [B, Xt] = f(""), [Zt, Qt] = f(""), [$t, en] = f(""), [tn, nn] = f(""), [rn, an] = f(""), [on, sn] = f(""), [cn, ln] = f(""), [un, dn] = f("8"), [V, fn] = f(!0), [pn, mn] = f("6"), [H, hn] = f(!1), [gn, _n] = f("20"), [vn, yn] = f("8.5"), [bn, xn] = f("20"), [U, Sn] = f(""), [Cn, wn] = f("in_person"), [Tn, En] = f(""), [Dn, On] = f(""), [kn, An] = f(""), [jn, Mn] = f(""), [Nn, Pn] = f(""), [Fn, W] = f(""), [G, In] = f(mt), [Ln, Rn] = f(mt);
284
284
  if (et) return /* @__PURE__ */ y("div", {
285
285
  className: "space-y-6 p-6",
286
286
  children: [/* @__PURE__ */ v(c, { className: "h-80" }), /* @__PURE__ */ v(c, { variant: "detail" })]
@@ -313,20 +313,20 @@ var Ct = () => {
313
313
  }) : (navigator.clipboard.writeText(window.location.href), u.info("Link copied", "The property link is on your clipboard."));
314
314
  }, Wn = async () => {
315
315
  try {
316
- M ? (await wt(g.id), u.success("Removed from shortlist")) : (await yt(g.id), h("housingvista.shortlist.property_added", g.id), u.success("Saved to shortlist"));
316
+ N ? (await wt(g.id), u.success("Removed from shortlist")) : (await yt(g.id), h("housingvista.shortlist.property_added", g.id), u.success("Saved to shortlist"));
317
317
  } catch (e) {
318
318
  u.error("Could not update shortlist", e.message);
319
319
  }
320
320
  }, Gn = async (e) => {
321
- if (e.preventDefault(), H) try {
321
+ if (e.preventDefault(), U) try {
322
322
  await Et({
323
323
  propertyId: g.id,
324
- scheduledAt: new Date(H).toISOString(),
324
+ scheduledAt: new Date(U).toISOString(),
325
325
  type: Cn,
326
326
  attendeeName: Tn.trim() || void 0,
327
327
  attendeeEmail: Dn.trim() || void 0,
328
328
  notes: kn.trim() || void 0
329
- }), h("housingvista.viewing.scheduled", g.id), u.success("Viewing requested", "The owner will confirm your slot shortly."), F(!1), Sn(""), En(""), On(""), An("");
329
+ }), h("housingvista.viewing.scheduled", g.id), u.success("Viewing requested", "The owner will confirm your slot shortly."), I(!1), Sn(""), En(""), On(""), An("");
330
330
  } catch (e) {
331
331
  u.error("Could not book viewing", e.message);
332
332
  }
@@ -344,24 +344,24 @@ var Ct = () => {
344
344
  currency: g.price.currency,
345
345
  notes: Nn.trim() || void 0,
346
346
  expiresAt: Fn ? new Date(Fn).toISOString() : void 0
347
- }), h("housingvista.offer.created", g.id), u.success("Offer submitted", `Your offer of ${n(t, g.price.currency)} was sent.`), I(!1), Mn(""), Pn(""), U("");
347
+ }), h("housingvista.offer.created", g.id), u.success("Offer submitted", `Your offer of ${n(t, g.price.currency)} was sent.`), L(!1), Mn(""), Pn(""), W("");
348
348
  } catch (e) {
349
349
  u.error("Could not submit offer", e.message);
350
350
  }
351
351
  }, qn = () => {
352
352
  let e = g.location.coordinates, t = {
353
353
  title: g.title,
354
- description: g.description,
354
+ description: A(g.description),
355
355
  status: g.status,
356
356
  type: g.type,
357
357
  category: g.category,
358
- address: g.location.address,
359
- city: g.location.city,
360
- state: g.location.state,
361
- country: g.location.country,
362
- pincode: g.location.pincode,
363
- neighborhood: g.location.neighborhood,
364
- landmarks: g.location.landmarks.join(", "),
358
+ address: A(g.location.address),
359
+ city: A(g.location.city),
360
+ state: A(g.location.state),
361
+ country: A(g.location.country),
362
+ pincode: A(g.location.pincode),
363
+ neighborhood: A(g.location.neighborhood),
364
+ landmarks: (g.location.landmarks ?? []).join(", "),
365
365
  coordinates: e && (e.latitude !== 0 || e.longitude !== 0) ? {
366
366
  latitude: e.latitude,
367
367
  longitude: e.longitude
@@ -388,22 +388,22 @@ var Ct = () => {
388
388
  extraAmenities: g.amenities.filter((e) => !d.some((t) => t.label === e.name)),
389
389
  catalogAmenities: g.amenities.filter((e) => d.some((t) => t.label === e.name))
390
390
  };
391
- In(t), Rn(t), L(!0);
392
- }, G = (e) => In((t) => ({
391
+ In(t), Rn(t), R(!0);
392
+ }, K = (e) => In((t) => ({
393
393
  ...t,
394
394
  ...e
395
- })), K = (e) => e.trim(), Jn = async (e) => {
395
+ })), q = (e) => e.trim(), Jn = async (e) => {
396
396
  e.preventDefault();
397
- let t = W.title.trim(), n = W.city.trim(), r = W.state.trim(), i = D(W.bedrooms), a = D(W.bathrooms), o = D(W.totalArea), s = D(W.price);
397
+ let t = G.title.trim(), n = G.city.trim(), r = G.state.trim(), i = D(G.bedrooms), a = D(G.bathrooms), o = D(G.totalArea), s = D(G.price);
398
398
  if (!t || !n || !r) {
399
399
  u.warning("Title, city and state are required");
400
400
  return;
401
401
  }
402
- if (W.bedrooms.trim() !== "" && (i == null || i < 0)) {
402
+ if (G.bedrooms.trim() !== "" && (i == null || i < 0)) {
403
403
  u.warning("Bedrooms must be zero or greater");
404
404
  return;
405
405
  }
406
- if (W.bathrooms.trim() !== "" && (a == null || a < 0)) {
406
+ if (G.bathrooms.trim() !== "" && (a == null || a < 0)) {
407
407
  u.warning("Bathrooms must be zero or greater");
408
408
  return;
409
409
  }
@@ -415,46 +415,46 @@ var Ct = () => {
415
415
  u.warning("Enter a price greater than zero");
416
416
  return;
417
417
  }
418
- let c = ht(W.landmarks), ee = c.join("|") !== ht(Ln.landmarks).join("|"), te = [...W.amenities].sort().join("|") !== [...Ln.amenities].sort().join("|"), l = {
418
+ let c = ht(G.landmarks), ee = c.join("|") !== ht(Ln.landmarks).join("|"), te = [...G.amenities].sort().join("|") !== [...Ln.amenities].sort().join("|"), l = {
419
419
  title: t,
420
- description: K(W.description),
421
- status: W.status,
422
- type: W.type,
423
- category: W.category,
424
- address: K(W.address),
420
+ description: q(G.description),
421
+ status: G.status,
422
+ type: G.type,
423
+ category: G.category,
424
+ address: q(G.address),
425
425
  city: n,
426
426
  state: r,
427
- country: K(W.country),
428
- pincode: K(W.pincode),
429
- neighborhood: K(W.neighborhood),
430
- coordinates: W.coordinates ?? void 0,
427
+ country: q(G.country),
428
+ pincode: q(G.pincode),
429
+ neighborhood: q(G.neighborhood),
430
+ coordinates: G.coordinates ?? void 0,
431
431
  bedrooms: i ?? void 0,
432
432
  bathrooms: a ?? void 0,
433
433
  totalArea: o,
434
- carpetArea: O(W.carpetArea),
435
- builtUpArea: O(W.builtUpArea),
436
- floors: O(W.floors),
437
- totalFloors: O(W.totalFloors),
438
- parking: O(W.parking),
439
- balconies: O(W.balconies),
440
- furnishingStatus: W.furnishingStatus,
441
- ageOfProperty: O(W.ageOfProperty),
442
- facing: W.facing || void 0,
434
+ carpetArea: O(G.carpetArea),
435
+ builtUpArea: O(G.builtUpArea),
436
+ floors: O(G.floors),
437
+ totalFloors: O(G.totalFloors),
438
+ parking: O(G.parking),
439
+ balconies: O(G.balconies),
440
+ furnishingStatus: G.furnishingStatus,
441
+ ageOfProperty: O(G.ageOfProperty),
442
+ facing: G.facing || void 0,
443
443
  price: s,
444
- currency: W.currency || void 0,
445
- priceType: W.priceType || void 0,
446
- pricePeriod: W.pricePeriod === "" ? null : W.pricePeriod,
447
- negotiable: W.negotiable,
448
- pricePerSqft: O(W.pricePerSqft)
444
+ currency: G.currency || void 0,
445
+ priceType: G.priceType || void 0,
446
+ pricePeriod: G.pricePeriod === "" ? null : G.pricePeriod,
447
+ negotiable: G.negotiable,
448
+ pricePerSqft: O(G.pricePerSqft)
449
449
  };
450
450
  if (ee && (l.landmarks = c), te) {
451
- let e = new Set(W.amenities.map((e) => d.find((t) => t.id === e)?.label ?? e)), t = /* @__PURE__ */ new Map();
452
- for (let e of W.extraAmenities) t.set(e.name, {
451
+ let e = new Set(G.amenities.map((e) => d.find((t) => t.id === e)?.label ?? e)), t = /* @__PURE__ */ new Map();
452
+ for (let e of G.extraAmenities) t.set(e.name, {
453
453
  name: e.name,
454
454
  category: e.category,
455
455
  available: e.available
456
456
  });
457
- for (let n of W.catalogAmenities) e.has(n.name) ? t.set(n.name, {
457
+ for (let n of G.catalogAmenities) e.has(n.name) ? t.set(n.name, {
458
458
  name: n.name,
459
459
  category: n.category,
460
460
  available: !0
@@ -471,7 +471,7 @@ var Ct = () => {
471
471
  l.amenities = [...t.values()];
472
472
  }
473
473
  try {
474
- await At(g.id, l), h("housingvista.property.updated", g.id), u.success("Property updated"), L(!1);
474
+ await At(g.id, l), h("housingvista.property.updated", g.id), u.success("Property updated"), R(!1);
475
475
  } catch (e) {
476
476
  u.error("Could not update property", e.message);
477
477
  }
@@ -481,19 +481,19 @@ var Ct = () => {
481
481
  } catch (e) {
482
482
  u.error("Could not delete property", e.message);
483
483
  }
484
- }, q = rt[0], J = q?.id, Xn = async (e) => {
485
- if (e.preventDefault(), !J) {
484
+ }, J = nt[0], Y = J?.id, Xn = async (e) => {
485
+ if (e.preventDefault(), !Y) {
486
486
  u.warning("No rental unit is available for this property yet");
487
487
  return;
488
488
  }
489
- if (!Yt.trim() || !Zt.trim()) {
489
+ if (!B.trim() || !Zt.trim()) {
490
490
  u.warning("Enter your name and email to apply");
491
491
  return;
492
492
  }
493
493
  try {
494
494
  await Nt({
495
- rentalUnitId: J,
496
- applicantName: Yt.trim(),
495
+ rentalUnitId: Y,
496
+ applicantName: B.trim(),
497
497
  applicantEmail: Zt.trim(),
498
498
  applicantPhone: $t.trim() || void 0,
499
499
  monthlyIncome: tn ? Number(tn) : void 0,
@@ -522,10 +522,10 @@ var Ct = () => {
522
522
  } catch (e) {
523
523
  u.error("Could not update RERA status", e.message);
524
524
  }
525
- }, Y = g.price.amount, $n = Number(on) || Math.round(Y * .005), er = Number(cn) || Math.round(Y * .0015), tr = $n * 12, nr = Y > 0 ? tr / Y * 100 : 0, rr = tr - er * 12, ir = Y > 0 ? rr / Y * 100 : 0, ar = Math.max(0, Number(un) || 0) / 100, or = Array.from({ length: 6 }, (e, t) => ({
525
+ }, X = g.price.amount, $n = Number(on) || Math.round(X * .005), er = Number(cn) || Math.round(X * .0015), tr = $n * 12, nr = X > 0 ? tr / X * 100 : 0, rr = tr - er * 12, ir = X > 0 ? rr / X * 100 : 0, ar = Math.max(0, Number(un) || 0) / 100, or = Array.from({ length: 6 }, (e, t) => ({
526
526
  label: t === 0 ? "Now" : `Yr ${t}`,
527
- value: Math.round(Y * (1 + ar) ** +t)
528
- })), sr = or[or.length - 1].value, cr = sr - Y + rr * 5, lr = Y > 0 ? cr / Y * 100 : 0, ur = Math.max(0, Number(pn) || 0), X = B ? ur / 100 * Y : 0, dr = Math.min(100, Math.max(0, Number(gn) || 0)), fr = Math.max(0, Number(vn) || 0) / 100, pr = Math.max(1, Number(bn) || 1), mr = V ? dr / 100 * Y : Y, Z = V ? Y - mr : 0, Q = fr / 12, hr = pr * 12, gr = V && Z > 0 ? Q > 0 ? Z * Q * (1 + Q) ** +hr / ((1 + Q) ** +hr - 1) : Z / hr : 0, _r = gr * 12, $ = mr + X, vr = rr - _r, yr = $ > 0 ? vr / $ * 100 : 0;
527
+ value: Math.round(X * (1 + ar) ** +t)
528
+ })), sr = or[or.length - 1].value, cr = sr - X + rr * 5, lr = X > 0 ? cr / X * 100 : 0, ur = Math.max(0, Number(pn) || 0), dr = V ? ur / 100 * X : 0, fr = Math.min(100, Math.max(0, Number(gn) || 0)), pr = Math.max(0, Number(vn) || 0) / 100, mr = Math.max(1, Number(bn) || 1), hr = H ? fr / 100 * X : X, Z = H ? X - hr : 0, Q = pr / 12, gr = mr * 12, _r = H && Z > 0 ? Q > 0 ? Z * Q * (1 + Q) ** +gr / ((1 + Q) ** +gr - 1) : Z / gr : 0, vr = _r * 12, $ = hr + dr, yr = rr - vr, br = $ > 0 ? yr / $ * 100 : 0;
529
529
  return /* @__PURE__ */ y("div", {
530
530
  className: "space-y-6 p-6",
531
531
  children: [
@@ -564,7 +564,7 @@ var Ct = () => {
564
564
  type: "button",
565
565
  variant: "outline",
566
566
  size: "sm",
567
- onClick: () => R(!0),
567
+ onClick: () => Kt(!0),
568
568
  children: [/* @__PURE__ */ v(Qe, { className: "mr-1.5 h-4 w-4" }), "Delete"]
569
569
  })]
570
570
  })
@@ -581,14 +581,14 @@ var Ct = () => {
581
581
  id: "schedule",
582
582
  label: "Schedule a viewing",
583
583
  description: "Book a time to see the property in person or virtually.",
584
- onClick: () => F(!0)
584
+ onClick: () => I(!0)
585
585
  },
586
586
  {
587
587
  id: "offer",
588
588
  label: "Make an offer",
589
589
  description: "Submit a price and let the owner respond.",
590
590
  onClick: () => {
591
- U(_t()), I(!0);
591
+ W(_t()), L(!0);
592
592
  }
593
593
  },
594
594
  {
@@ -605,8 +605,8 @@ var Ct = () => {
605
605
  className: "relative overflow-hidden rounded-xl border border-border-subtle bg-bg-sunken",
606
606
  children: [
607
607
  g.images.length > 0 ? /* @__PURE__ */ v("img", {
608
- src: g.images[N]?.url,
609
- alt: g.images[N]?.title ?? g.title,
608
+ src: g.images[P]?.url,
609
+ alt: g.images[P]?.title ?? g.title,
610
610
  className: "h-80 w-full object-cover sm:h-[26rem]"
611
611
  }) : /* @__PURE__ */ y("div", {
612
612
  className: "flex h-80 w-full flex-col items-center justify-center gap-3 bg-gradient-to-br from-[var(--color-action-primary-bg)]/12 via-bg-sunken to-[var(--color-accent-blue)]/12 text-text-secondary/70 sm:h-[26rem]",
@@ -615,7 +615,7 @@ var Ct = () => {
615
615
  children: "No photos yet"
616
616
  })]
617
617
  }),
618
- g.images.length > 1 && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
618
+ g.images.length > 1 && /* @__PURE__ */ y(ot, { children: [/* @__PURE__ */ v("button", {
619
619
  onClick: Hn,
620
620
  "aria-label": "Previous photo",
621
621
  className: "absolute left-4 top-1/2 -translate-y-1/2 rounded-full bg-bg-overlay/70 p-2 text-text-inverse transition-colors hover:bg-bg-overlay",
@@ -635,9 +635,9 @@ var Ct = () => {
635
635
  children: [/* @__PURE__ */ v("button", {
636
636
  onClick: Wn,
637
637
  disabled: Ct || Tt,
638
- "aria-label": M ? "Remove from shortlist" : "Save to shortlist",
638
+ "aria-label": N ? "Remove from shortlist" : "Save to shortlist",
639
639
  className: "rounded-full bg-bg-surface/85 p-2 shadow-elevation-1 backdrop-blur-sm transition-colors hover:bg-bg-surface disabled:opacity-60",
640
- children: /* @__PURE__ */ v(Ue, { className: e("h-5 w-5", M ? "fill-status-error-text text-status-error-text" : "text-text-secondary") })
640
+ children: /* @__PURE__ */ v(Ue, { className: e("h-5 w-5", N ? "fill-status-error-text text-status-error-text" : "text-text-secondary") })
641
641
  }), /* @__PURE__ */ v("button", {
642
642
  onClick: Un,
643
643
  "aria-label": "Share this listing",
@@ -650,7 +650,7 @@ var Ct = () => {
650
650
  children: /* @__PURE__ */ y("span", {
651
651
  className: "rounded-md bg-bg-overlay/70 px-2 py-1 text-xs font-medium text-text-inverse",
652
652
  children: [
653
- N + 1,
653
+ P + 1,
654
654
  " / ",
655
655
  g.images.length
656
656
  ]
@@ -662,8 +662,8 @@ var Ct = () => {
662
662
  children: g.images.map((t, n) => /* @__PURE__ */ v("button", {
663
663
  onClick: () => Bt(n),
664
664
  "aria-label": `View photo ${n + 1}`,
665
- "aria-current": n === N,
666
- className: e("h-16 w-24 shrink-0 overflow-hidden rounded-lg border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n === N ? "border-action-primary-border" : "border-transparent opacity-70 hover:opacity-100"),
665
+ "aria-current": n === P,
666
+ className: e("h-16 w-24 shrink-0 overflow-hidden rounded-lg border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n === P ? "border-action-primary-border" : "border-transparent opacity-70 hover:opacity-100"),
667
667
  children: /* @__PURE__ */ v("img", {
668
668
  src: t.url,
669
669
  alt: t.title ?? `Photo ${n + 1}`,
@@ -766,14 +766,14 @@ var Ct = () => {
766
766
  className: "flex space-x-6 overflow-x-auto px-6",
767
767
  children: vt.map((t) => /* @__PURE__ */ v("button", {
768
768
  onClick: () => Vt(t.id),
769
- className: e("whitespace-nowrap border-b-2 py-3 text-sm font-medium transition-colors", P === t.id ? "border-action-primary-border text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
769
+ className: e("whitespace-nowrap border-b-2 py-3 text-sm font-medium transition-colors", F === t.id ? "border-action-primary-border text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
770
770
  children: t.label
771
771
  }, t.id))
772
772
  })
773
773
  }), /* @__PURE__ */ y("div", {
774
774
  className: "p-6",
775
775
  children: [
776
- P === "details" && /* @__PURE__ */ y("div", {
776
+ F === "details" && /* @__PURE__ */ y("div", {
777
777
  className: "grid grid-cols-1 gap-6 sm:grid-cols-2",
778
778
  children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h4", {
779
779
  className: "mb-3 text-sm font-semibold text-text-primary",
@@ -895,7 +895,7 @@ var Ct = () => {
895
895
  ]
896
896
  })] })]
897
897
  }),
898
- P === "amenities" && /* @__PURE__ */ v("div", { children: g.amenities.length > 0 ? /* @__PURE__ */ v("div", {
898
+ F === "amenities" && /* @__PURE__ */ v("div", { children: g.amenities.length > 0 ? /* @__PURE__ */ v("div", {
899
899
  className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
900
900
  children: g.amenities.map((e) => /* @__PURE__ */ y("div", {
901
901
  className: "flex flex-col items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-4 text-center",
@@ -913,7 +913,7 @@ var Ct = () => {
913
913
  description: "This property has no amenities recorded yet.",
914
914
  className: "border-0 bg-transparent p-6"
915
915
  }) }),
916
- P === "location" && /* @__PURE__ */ y("div", {
916
+ F === "location" && /* @__PURE__ */ y("div", {
917
917
  className: "space-y-4",
918
918
  children: [
919
919
  /* @__PURE__ */ y("div", {
@@ -1035,17 +1035,17 @@ var Ct = () => {
1035
1035
  type: "button",
1036
1036
  className: "w-full justify-center",
1037
1037
  onClick: () => {
1038
- U(_t()), I(!0);
1038
+ W(_t()), L(!0);
1039
1039
  },
1040
1040
  children: [/* @__PURE__ */ v(Be, { className: "mr-2 h-4 w-4" }), "Make Offer"]
1041
1041
  }),
1042
- g.status === "for_rent" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y(b, {
1042
+ g.status === "for_rent" && /* @__PURE__ */ y(ot, { children: [/* @__PURE__ */ y(b, {
1043
1043
  type: "button",
1044
1044
  className: "w-full justify-center",
1045
1045
  onClick: () => z(!0),
1046
- disabled: !J,
1046
+ disabled: !Y,
1047
1047
  children: [/* @__PURE__ */ v(We, { className: "mr-2 h-4 w-4" }), "Apply to Rent"]
1048
- }), !J && /* @__PURE__ */ v("p", {
1048
+ }), !Y && /* @__PURE__ */ v("p", {
1049
1049
  className: "px-1 text-xs text-text-secondary",
1050
1050
  children: "No rental unit is listed for this property yet — applications open once a unit is added."
1051
1051
  })] }),
@@ -1055,13 +1055,13 @@ var Ct = () => {
1055
1055
  type: "button",
1056
1056
  variant: "outline",
1057
1057
  className: "w-full justify-center",
1058
- onClick: () => F(!0),
1058
+ onClick: () => I(!0),
1059
1059
  children: [/* @__PURE__ */ v(Fe, { className: "mr-2 h-4 w-4" }), "Viewing"]
1060
1060
  }), /* @__PURE__ */ y(b, {
1061
1061
  type: "button",
1062
1062
  variant: "outline",
1063
1063
  className: "w-full justify-center",
1064
- onClick: () => Jt(!0),
1064
+ onClick: () => Yt(!0),
1065
1065
  children: [/* @__PURE__ */ v(Ke, { className: "mr-2 h-4 w-4" }), "Contact"]
1066
1066
  })]
1067
1067
  }),
@@ -1071,7 +1071,7 @@ var Ct = () => {
1071
1071
  className: "w-full justify-center",
1072
1072
  onClick: Wn,
1073
1073
  disabled: Ct || Tt,
1074
- children: [/* @__PURE__ */ v(Ue, { className: e("mr-2 h-4 w-4", M && "fill-status-error-text text-status-error-text") }), M ? "Saved to Shortlist" : "Save to Shortlist"]
1074
+ children: [/* @__PURE__ */ v(Ue, { className: e("mr-2 h-4 w-4", N && "fill-status-error-text text-status-error-text") }), N ? "Saved to Shortlist" : "Save to Shortlist"]
1075
1075
  })
1076
1076
  ]
1077
1077
  }),
@@ -1107,7 +1107,7 @@ var Ct = () => {
1107
1107
  value: on,
1108
1108
  onChange: (e) => sn(e.target.value),
1109
1109
  placeholder: String($n),
1110
- className: A
1110
+ className: j
1111
1111
  })] }),
1112
1112
  /* @__PURE__ */ y("div", {
1113
1113
  className: "grid grid-cols-2 gap-3",
@@ -1124,7 +1124,7 @@ var Ct = () => {
1124
1124
  value: cn,
1125
1125
  onChange: (e) => ln(e.target.value),
1126
1126
  placeholder: String(er),
1127
- className: A
1127
+ className: j
1128
1128
  })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
1129
1129
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
1130
1130
  children: "Appreciation (%/yr)"
@@ -1134,7 +1134,7 @@ var Ct = () => {
1134
1134
  step: .5,
1135
1135
  value: un,
1136
1136
  onChange: (e) => dn(e.target.value),
1137
- className: A
1137
+ className: j
1138
1138
  })] })]
1139
1139
  }),
1140
1140
  /* @__PURE__ */ v("p", {
@@ -1152,11 +1152,11 @@ var Ct = () => {
1152
1152
  className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
1153
1153
  children: [/* @__PURE__ */ v("input", {
1154
1154
  type: "checkbox",
1155
- checked: B,
1155
+ checked: V,
1156
1156
  onChange: (e) => fn(e.target.checked),
1157
1157
  className: "h-3.5 w-3.5 rounded border-border-subtle"
1158
1158
  }), "Include stamp duty & registration"]
1159
- }), B && /* @__PURE__ */ v("input", {
1159
+ }), V && /* @__PURE__ */ v("input", {
1160
1160
  type: "number",
1161
1161
  min: 0,
1162
1162
  step: .5,
@@ -1172,13 +1172,13 @@ var Ct = () => {
1172
1172
  className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
1173
1173
  children: [/* @__PURE__ */ v("input", {
1174
1174
  type: "checkbox",
1175
- checked: V,
1175
+ checked: H,
1176
1176
  onChange: (e) => hn(e.target.checked),
1177
1177
  className: "h-3.5 w-3.5 rounded border-border-subtle"
1178
1178
  }), "Include financing (loan)"]
1179
1179
  })
1180
1180
  }),
1181
- V && /* @__PURE__ */ y("div", {
1181
+ H && /* @__PURE__ */ y("div", {
1182
1182
  className: "grid grid-cols-3 gap-2",
1183
1183
  children: [
1184
1184
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
@@ -1190,7 +1190,7 @@ var Ct = () => {
1190
1190
  max: 100,
1191
1191
  value: gn,
1192
1192
  onChange: (e) => _n(e.target.value),
1193
- className: A
1193
+ className: j
1194
1194
  })] }),
1195
1195
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
1196
1196
  className: "mb-1 block text-[10px] text-text-secondary",
@@ -1201,7 +1201,7 @@ var Ct = () => {
1201
1201
  step: .1,
1202
1202
  value: vn,
1203
1203
  onChange: (e) => yn(e.target.value),
1204
- className: A
1204
+ className: j
1205
1205
  })] }),
1206
1206
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
1207
1207
  className: "mb-1 block text-[10px] text-text-secondary",
@@ -1211,27 +1211,27 @@ var Ct = () => {
1211
1211
  min: 1,
1212
1212
  value: bn,
1213
1213
  onChange: (e) => xn(e.target.value),
1214
- className: A
1214
+ className: j
1215
1215
  })] })
1216
1216
  ]
1217
1217
  }),
1218
- (B || V) && /* @__PURE__ */ y("div", {
1218
+ (V || H) && /* @__PURE__ */ y("div", {
1219
1219
  className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-text-secondary",
1220
1220
  children: [
1221
- B && /* @__PURE__ */ y("span", { children: [
1221
+ V && /* @__PURE__ */ y("span", { children: [
1222
1222
  "Stamp duty:",
1223
1223
  " ",
1224
1224
  /* @__PURE__ */ v("span", {
1225
1225
  className: "font-semibold text-text-primary",
1226
- children: t(X, g.price.currency)
1226
+ children: t(dr, g.price.currency)
1227
1227
  })
1228
1228
  ] }),
1229
- V && /* @__PURE__ */ y("span", { children: [
1229
+ H && /* @__PURE__ */ y("span", { children: [
1230
1230
  "Monthly EMI:",
1231
1231
  " ",
1232
1232
  /* @__PURE__ */ v("span", {
1233
1233
  className: "font-semibold text-text-primary",
1234
- children: t(gr, g.price.currency)
1234
+ children: t(_r, g.price.currency)
1235
1235
  })
1236
1236
  ] }),
1237
1237
  /* @__PURE__ */ y("span", { children: [
@@ -1273,10 +1273,10 @@ var Ct = () => {
1273
1273
  className: "rounded-lg border border-border-subtle bg-bg-sunken/40 p-2.5 text-center",
1274
1274
  children: [/* @__PURE__ */ v("div", {
1275
1275
  className: "text-[11px] font-medium text-text-secondary",
1276
- children: V ? "Cash-on-Cash" : "5-yr ROI"
1276
+ children: H ? "Cash-on-Cash" : "5-yr ROI"
1277
1277
  }), /* @__PURE__ */ y("div", {
1278
1278
  className: "mt-0.5 text-lg font-bold text-text-primary",
1279
- children: [V ? yr.toFixed(1) : lr.toFixed(0), "%"]
1279
+ children: [H ? br.toFixed(1) : lr.toFixed(0), "%"]
1280
1280
  })]
1281
1281
  })
1282
1282
  ]
@@ -1373,7 +1373,7 @@ var Ct = () => {
1373
1373
  `Investment Analysis Report — ${g.title}`,
1374
1374
  `Generated: ${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}`,
1375
1375
  "",
1376
- `Listing price,${Y}`,
1376
+ `Listing price,${X}`,
1377
1377
  `Expected monthly rent,${$n}`,
1378
1378
  `Monthly holding costs,${er}`,
1379
1379
  `Gross rental yield,${nr.toFixed(2)}%`,
@@ -1382,21 +1382,21 @@ var Ct = () => {
1382
1382
  `Projected value (5yr),${sr}`,
1383
1383
  `Projected ROI (5yr, unleveraged),${lr.toFixed(2)}%`,
1384
1384
  "",
1385
- `Stamp duty & registration included,${B ? "Yes" : "No"}`,
1385
+ `Stamp duty & registration included,${V ? "Yes" : "No"}`,
1386
1386
  `Stamp duty rate,${ur}%`,
1387
- `Stamp duty & registration cost,${X.toFixed(0)}`,
1387
+ `Stamp duty & registration cost,${dr.toFixed(0)}`,
1388
1388
  "",
1389
- `Financing included,${V ? "Yes" : "No"}`,
1390
- ...V ? [
1391
- `Down payment (${dr}%),${mr.toFixed(0)}`,
1389
+ `Financing included,${H ? "Yes" : "No"}`,
1390
+ ...H ? [
1391
+ `Down payment (${fr}%),${hr.toFixed(0)}`,
1392
1392
  `Loan amount,${Z.toFixed(0)}`,
1393
- `Loan rate,${(fr * 100).toFixed(2)}%`,
1394
- `Loan tenure (years),${pr}`,
1395
- `Monthly EMI,${gr.toFixed(0)}`,
1396
- `Annual debt service,${_r.toFixed(0)}`
1393
+ `Loan rate,${(pr * 100).toFixed(2)}%`,
1394
+ `Loan tenure (years),${mr}`,
1395
+ `Monthly EMI,${_r.toFixed(0)}`,
1396
+ `Annual debt service,${vr.toFixed(0)}`
1397
1397
  ] : [],
1398
1398
  `Net cash outlay,${$.toFixed(0)}`,
1399
- `Cash-on-cash return,${yr.toFixed(2)}%`,
1399
+ `Cash-on-cash return,${br.toFixed(2)}%`,
1400
1400
  "",
1401
1401
  "This is not financial advice. Consult a licensed financial advisor before investing."
1402
1402
  ], t = new Blob([e.join("\n")], { type: "text/csv;charset=utf-8;" }), n = URL.createObjectURL(t), r = document.createElement("a");
@@ -1532,8 +1532,8 @@ var Ct = () => {
1532
1532
  entityType: "housingvista-property"
1533
1533
  }),
1534
1534
  /* @__PURE__ */ v(me, {
1535
- open: qt,
1536
- onOpenChange: Jt,
1535
+ open: Jt,
1536
+ onOpenChange: Yt,
1537
1537
  entityId: g.id,
1538
1538
  entityType: "housingvista-property",
1539
1539
  title: g.title,
@@ -1542,7 +1542,7 @@ var Ct = () => {
1542
1542
  description: `Ask a question or start a conversation about ${g.title}.`
1543
1543
  }),
1544
1544
  /* @__PURE__ */ v(x, {
1545
- open: Kt,
1545
+ open: qt,
1546
1546
  onOpenChange: z,
1547
1547
  children: /* @__PURE__ */ v(S, {
1548
1548
  className: "sm:max-w-2xl",
@@ -1567,9 +1567,9 @@ var Ct = () => {
1567
1567
  }), /* @__PURE__ */ v("input", {
1568
1568
  type: "text",
1569
1569
  required: !0,
1570
- value: Yt,
1570
+ value: B,
1571
1571
  onChange: (e) => Xt(e.target.value),
1572
- className: A
1572
+ className: j
1573
1573
  })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
1574
1574
  className: "mb-1.5 block text-sm font-medium text-text-primary",
1575
1575
  children: "Email *"
@@ -1578,7 +1578,7 @@ var Ct = () => {
1578
1578
  required: !0,
1579
1579
  value: Zt,
1580
1580
  onChange: (e) => Qt(e.target.value),
1581
- className: A
1581
+ className: j
1582
1582
  })] })]
1583
1583
  }),
1584
1584
  /* @__PURE__ */ y("div", {
@@ -1590,7 +1590,7 @@ var Ct = () => {
1590
1590
  type: "tel",
1591
1591
  value: $t,
1592
1592
  onChange: (e) => en(e.target.value),
1593
- className: A
1593
+ className: j
1594
1594
  })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
1595
1595
  className: "mb-1.5 block text-sm font-medium text-text-primary",
1596
1596
  children: [
@@ -1603,7 +1603,7 @@ var Ct = () => {
1603
1603
  min: 0,
1604
1604
  value: tn,
1605
1605
  onChange: (e) => nn(e.target.value),
1606
- className: A
1606
+ className: j
1607
1607
  })] })]
1608
1608
  }),
1609
1609
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
@@ -1613,7 +1613,7 @@ var Ct = () => {
1613
1613
  type: "date",
1614
1614
  value: rn,
1615
1615
  onChange: (e) => an(e.target.value),
1616
- className: A
1616
+ className: j
1617
1617
  })] })
1618
1618
  ]
1619
1619
  }), /* @__PURE__ */ y("aside", {
@@ -1641,7 +1641,7 @@ var Ct = () => {
1641
1641
  })]
1642
1642
  })]
1643
1643
  }),
1644
- q ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("dl", {
1644
+ J ? /* @__PURE__ */ y(ot, { children: [/* @__PURE__ */ y("dl", {
1645
1645
  className: "mt-3 grid grid-cols-2 gap-3 border-t border-border-subtle pt-3",
1646
1646
  children: [
1647
1647
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
@@ -1649,21 +1649,21 @@ var Ct = () => {
1649
1649
  children: "Rent"
1650
1650
  }), /* @__PURE__ */ y("dd", {
1651
1651
  className: "text-sm font-semibold text-text-primary",
1652
- children: [n(q.monthlyRent), "/mo"]
1652
+ children: [n(J.monthlyRent), "/mo"]
1653
1653
  })] }),
1654
1654
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
1655
1655
  className: "text-xs text-text-secondary",
1656
1656
  children: "Deposit"
1657
1657
  }), /* @__PURE__ */ v("dd", {
1658
1658
  className: "text-sm font-semibold text-text-primary",
1659
- children: q.securityDeposit ? n(q.securityDeposit) : "—"
1659
+ children: J.securityDeposit ? n(J.securityDeposit) : "—"
1660
1660
  })] }),
1661
1661
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
1662
1662
  className: "text-xs text-text-secondary",
1663
1663
  children: "Unit"
1664
1664
  }), /* @__PURE__ */ v("dd", {
1665
1665
  className: "text-sm font-medium text-text-primary",
1666
- children: q.unitNumber
1666
+ children: J.unitNumber
1667
1667
  })] }),
1668
1668
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
1669
1669
  className: "text-xs text-text-secondary",
@@ -1671,14 +1671,14 @@ var Ct = () => {
1671
1671
  }), /* @__PURE__ */ v("dd", {
1672
1672
  className: "mt-0.5",
1673
1673
  children: /* @__PURE__ */ v(a, {
1674
- label: xt(q.status),
1675
- variant: St(q.status)
1674
+ label: xt(J.status),
1675
+ variant: St(J.status)
1676
1676
  })
1677
1677
  })] })
1678
1678
  ]
1679
- }), (q.status === "occupied" || q.status === "notice_period") && q.leaseEnd && /* @__PURE__ */ y("p", {
1679
+ }), (J.status === "occupied" || J.status === "notice_period") && J.leaseEnd && /* @__PURE__ */ y("p", {
1680
1680
  className: "mt-2 text-xs text-text-secondary",
1681
- children: ["Current lease ends ", r(q.leaseEnd)]
1681
+ children: ["Current lease ends ", r(J.leaseEnd)]
1682
1682
  })] }) : /* @__PURE__ */ v("p", {
1683
1683
  className: "mt-3 border-t border-border-subtle pt-3 text-xs text-text-secondary",
1684
1684
  children: "No rental unit is listed for this property yet, so rent and deposit are not available."
@@ -1720,7 +1720,7 @@ var Ct = () => {
1720
1720
  children: "Cancel"
1721
1721
  }), /* @__PURE__ */ v(b, {
1722
1722
  type: "submit",
1723
- disabled: Pt || !J,
1723
+ disabled: Pt || !Y,
1724
1724
  children: Pt ? "Submitting…" : "Submit application"
1725
1725
  })] })
1726
1726
  ]
@@ -1729,7 +1729,7 @@ var Ct = () => {
1729
1729
  }),
1730
1730
  /* @__PURE__ */ v(x, {
1731
1731
  open: Ht,
1732
- onOpenChange: F,
1732
+ onOpenChange: I,
1733
1733
  children: /* @__PURE__ */ v(S, {
1734
1734
  className: "sm:max-w-md",
1735
1735
  children: /* @__PURE__ */ y("form", {
@@ -1749,9 +1749,9 @@ var Ct = () => {
1749
1749
  }), /* @__PURE__ */ v("input", {
1750
1750
  type: "datetime-local",
1751
1751
  required: !0,
1752
- value: H,
1752
+ value: U,
1753
1753
  onChange: (e) => Sn(e.target.value),
1754
- className: A
1754
+ className: j
1755
1755
  })] }),
1756
1756
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
1757
1757
  className: "mb-1.5 block text-sm font-medium text-text-primary",
@@ -1759,7 +1759,7 @@ var Ct = () => {
1759
1759
  }), /* @__PURE__ */ y("select", {
1760
1760
  value: Cn,
1761
1761
  onChange: (e) => wn(e.target.value),
1762
- className: A,
1762
+ className: j,
1763
1763
  children: [/* @__PURE__ */ v("option", {
1764
1764
  value: "in_person",
1765
1765
  children: "In person"
@@ -1775,13 +1775,13 @@ var Ct = () => {
1775
1775
  placeholder: "Your name",
1776
1776
  value: Tn,
1777
1777
  onChange: (e) => En(e.target.value),
1778
- className: A
1778
+ className: j
1779
1779
  }), /* @__PURE__ */ v("input", {
1780
1780
  type: "email",
1781
1781
  placeholder: "Your email",
1782
1782
  value: Dn,
1783
1783
  onChange: (e) => On(e.target.value),
1784
- className: A
1784
+ className: j
1785
1785
  })]
1786
1786
  }),
1787
1787
  /* @__PURE__ */ v("textarea", {
@@ -1796,11 +1796,11 @@ var Ct = () => {
1796
1796
  /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(b, {
1797
1797
  type: "button",
1798
1798
  variant: "outline",
1799
- onClick: () => F(!1),
1799
+ onClick: () => I(!1),
1800
1800
  children: "Cancel"
1801
1801
  }), /* @__PURE__ */ v(b, {
1802
1802
  type: "submit",
1803
- disabled: Dt || !H,
1803
+ disabled: Dt || !U,
1804
1804
  children: Dt ? "Booking…" : "Request viewing"
1805
1805
  })] })
1806
1806
  ]
@@ -1809,7 +1809,7 @@ var Ct = () => {
1809
1809
  }),
1810
1810
  /* @__PURE__ */ v(x, {
1811
1811
  open: Ut,
1812
- onOpenChange: I,
1812
+ onOpenChange: L,
1813
1813
  children: /* @__PURE__ */ v(S, {
1814
1814
  className: "sm:max-w-md",
1815
1815
  children: /* @__PURE__ */ y("form", {
@@ -1837,7 +1837,7 @@ var Ct = () => {
1837
1837
  value: jn,
1838
1838
  onChange: (e) => Mn(e.target.value),
1839
1839
  placeholder: "Enter amount",
1840
- className: A
1840
+ className: j
1841
1841
  })] }),
1842
1842
  /* @__PURE__ */ v("textarea", {
1843
1843
  placeholder: "Message to the owner (optional)",
@@ -1856,8 +1856,8 @@ var Ct = () => {
1856
1856
  id: "offer-expires",
1857
1857
  type: "datetime-local",
1858
1858
  value: Fn,
1859
- onChange: (e) => U(e.target.value),
1860
- className: A
1859
+ onChange: (e) => W(e.target.value),
1860
+ className: j
1861
1861
  }),
1862
1862
  /* @__PURE__ */ v("p", {
1863
1863
  className: "mt-1 text-xs text-text-secondary",
@@ -1869,7 +1869,7 @@ var Ct = () => {
1869
1869
  /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(b, {
1870
1870
  type: "button",
1871
1871
  variant: "outline",
1872
- onClick: () => I(!1),
1872
+ onClick: () => L(!1),
1873
1873
  children: "Cancel"
1874
1874
  }), /* @__PURE__ */ v(b, {
1875
1875
  type: "submit",
@@ -1882,7 +1882,7 @@ var Ct = () => {
1882
1882
  }),
1883
1883
  /* @__PURE__ */ v(x, {
1884
1884
  open: Wt,
1885
- onOpenChange: (e) => !e && !j && L(!1),
1885
+ onOpenChange: (e) => !e && !M && R(!1),
1886
1886
  children: /* @__PURE__ */ v(S, {
1887
1887
  className: "sm:max-w-2xl",
1888
1888
  children: /* @__PURE__ */ y("form", {
@@ -1905,17 +1905,17 @@ var Ct = () => {
1905
1905
  }), /* @__PURE__ */ v("input", {
1906
1906
  type: "text",
1907
1907
  required: !0,
1908
- value: W.title,
1909
- onChange: (e) => G({ title: e.target.value }),
1910
- className: A
1908
+ value: G.title,
1909
+ onChange: (e) => K({ title: e.target.value }),
1910
+ className: j
1911
1911
  })] }),
1912
1912
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
1913
1913
  className: "mb-1.5 block text-sm font-medium text-text-primary",
1914
1914
  children: "Description"
1915
1915
  }), /* @__PURE__ */ v("textarea", {
1916
1916
  rows: 3,
1917
- value: W.description,
1918
- onChange: (e) => G({ description: e.target.value }),
1917
+ value: G.description,
1918
+ onChange: (e) => K({ description: e.target.value }),
1919
1919
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
1920
1920
  })] }),
1921
1921
  /* @__PURE__ */ y("div", {
@@ -1925,9 +1925,9 @@ var Ct = () => {
1925
1925
  className: "mb-1.5 block text-sm font-medium text-text-primary",
1926
1926
  children: "Status"
1927
1927
  }), /* @__PURE__ */ v("select", {
1928
- value: W.status,
1929
- onChange: (e) => G({ status: e.target.value }),
1930
- className: A,
1928
+ value: G.status,
1929
+ onChange: (e) => K({ status: e.target.value }),
1930
+ className: j,
1931
1931
  children: dt.map((e) => /* @__PURE__ */ v("option", {
1932
1932
  value: e.value,
1933
1933
  children: e.label
@@ -1937,9 +1937,9 @@ var Ct = () => {
1937
1937
  className: "mb-1.5 block text-sm font-medium text-text-primary",
1938
1938
  children: "Type"
1939
1939
  }), /* @__PURE__ */ v("select", {
1940
- value: W.type,
1941
- onChange: (e) => G({ type: e.target.value }),
1942
- className: A,
1940
+ value: G.type,
1941
+ onChange: (e) => K({ type: e.target.value }),
1942
+ className: j,
1943
1943
  children: De.map((e) => /* @__PURE__ */ v("option", {
1944
1944
  value: e.value,
1945
1945
  children: e.label
@@ -1949,9 +1949,9 @@ var Ct = () => {
1949
1949
  className: "mb-1.5 block text-sm font-medium text-text-primary",
1950
1950
  children: "Category"
1951
1951
  }), /* @__PURE__ */ v("select", {
1952
- value: W.category,
1953
- onChange: (e) => G({ category: e.target.value }),
1954
- className: A,
1952
+ value: G.category,
1953
+ onChange: (e) => K({ category: e.target.value }),
1954
+ className: j,
1955
1955
  children: Ee.map((e) => /* @__PURE__ */ v("option", {
1956
1956
  value: e.value,
1957
1957
  children: e.label
@@ -1978,9 +1978,9 @@ var Ct = () => {
1978
1978
  children: "Address"
1979
1979
  }), /* @__PURE__ */ v("input", {
1980
1980
  type: "text",
1981
- value: W.address,
1982
- onChange: (e) => G({ address: e.target.value }),
1983
- className: A
1981
+ value: G.address,
1982
+ onChange: (e) => K({ address: e.target.value }),
1983
+ className: j
1984
1984
  })]
1985
1985
  }),
1986
1986
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
@@ -1989,9 +1989,9 @@ var Ct = () => {
1989
1989
  }), /* @__PURE__ */ v("input", {
1990
1990
  type: "text",
1991
1991
  required: !0,
1992
- value: W.city,
1993
- onChange: (e) => G({ city: e.target.value }),
1994
- className: A
1992
+ value: G.city,
1993
+ onChange: (e) => K({ city: e.target.value }),
1994
+ className: j
1995
1995
  })] }),
1996
1996
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
1997
1997
  className: "mb-1.5 block text-sm font-medium text-text-primary",
@@ -1999,46 +1999,46 @@ var Ct = () => {
1999
1999
  }), /* @__PURE__ */ v("input", {
2000
2000
  type: "text",
2001
2001
  required: !0,
2002
- value: W.state,
2003
- onChange: (e) => G({ state: e.target.value }),
2004
- className: A
2002
+ value: G.state,
2003
+ onChange: (e) => K({ state: e.target.value }),
2004
+ className: j
2005
2005
  })] }),
2006
2006
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
2007
2007
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2008
2008
  children: "Country"
2009
2009
  }), /* @__PURE__ */ v("input", {
2010
2010
  type: "text",
2011
- value: W.country,
2012
- onChange: (e) => G({ country: e.target.value }),
2013
- className: A
2011
+ value: G.country,
2012
+ onChange: (e) => K({ country: e.target.value }),
2013
+ className: j
2014
2014
  })] }),
2015
2015
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
2016
2016
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2017
2017
  children: "Pincode"
2018
2018
  }), /* @__PURE__ */ v("input", {
2019
2019
  type: "text",
2020
- value: W.pincode,
2021
- onChange: (e) => G({ pincode: e.target.value }),
2022
- className: A
2020
+ value: G.pincode,
2021
+ onChange: (e) => K({ pincode: e.target.value }),
2022
+ className: j
2023
2023
  })] }),
2024
2024
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
2025
2025
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2026
2026
  children: "Neighborhood"
2027
2027
  }), /* @__PURE__ */ v("input", {
2028
2028
  type: "text",
2029
- value: W.neighborhood,
2030
- onChange: (e) => G({ neighborhood: e.target.value }),
2031
- className: A
2029
+ value: G.neighborhood,
2030
+ onChange: (e) => K({ neighborhood: e.target.value }),
2031
+ className: j
2032
2032
  })] }),
2033
2033
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
2034
2034
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2035
2035
  children: "Landmarks"
2036
2036
  }), /* @__PURE__ */ v("input", {
2037
2037
  type: "text",
2038
- value: W.landmarks,
2039
- onChange: (e) => G({ landmarks: e.target.value }),
2038
+ value: G.landmarks,
2039
+ onChange: (e) => K({ landmarks: e.target.value }),
2040
2040
  placeholder: "Comma-separated",
2041
- className: A
2041
+ className: j
2042
2042
  })] })
2043
2043
  ]
2044
2044
  }),
@@ -2046,8 +2046,8 @@ var Ct = () => {
2046
2046
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2047
2047
  children: "Map location"
2048
2048
  }), /* @__PURE__ */ v(Se, {
2049
- value: W.coordinates,
2050
- onChange: (e) => G({ coordinates: e })
2049
+ value: G.coordinates,
2050
+ onChange: (e) => K({ coordinates: e })
2051
2051
  })] })
2052
2052
  ]
2053
2053
  }),
@@ -2067,17 +2067,17 @@ var Ct = () => {
2067
2067
  min: 0,
2068
2068
  step: e.step,
2069
2069
  required: e.required,
2070
- value: W[e.key],
2071
- onChange: (t) => G({ [e.key]: t.target.value }),
2072
- className: A
2070
+ value: G[e.key],
2071
+ onChange: (t) => K({ [e.key]: t.target.value }),
2072
+ className: j
2073
2073
  })] }, e.key)),
2074
2074
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
2075
2075
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2076
2076
  children: "Furnishing"
2077
2077
  }), /* @__PURE__ */ v("select", {
2078
- value: W.furnishingStatus,
2079
- onChange: (e) => G({ furnishingStatus: e.target.value }),
2080
- className: A,
2078
+ value: G.furnishingStatus,
2079
+ onChange: (e) => K({ furnishingStatus: e.target.value }),
2080
+ className: j,
2081
2081
  children: Te.map((e) => /* @__PURE__ */ v("option", {
2082
2082
  value: e.value,
2083
2083
  children: e.label
@@ -2087,9 +2087,9 @@ var Ct = () => {
2087
2087
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2088
2088
  children: "Facing"
2089
2089
  }), /* @__PURE__ */ y("select", {
2090
- value: W.facing,
2091
- onChange: (e) => G({ facing: e.target.value }),
2092
- className: A,
2090
+ value: G.facing,
2091
+ onChange: (e) => K({ facing: e.target.value }),
2092
+ className: j,
2093
2093
  children: [/* @__PURE__ */ v("option", {
2094
2094
  value: "",
2095
2095
  children: "— (unset)"
@@ -2116,17 +2116,17 @@ var Ct = () => {
2116
2116
  type: "number",
2117
2117
  min: 0,
2118
2118
  required: !0,
2119
- value: W.price,
2120
- onChange: (e) => G({ price: e.target.value }),
2121
- className: A
2119
+ value: G.price,
2120
+ onChange: (e) => K({ price: e.target.value }),
2121
+ className: j
2122
2122
  })] }),
2123
2123
  /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
2124
2124
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2125
2125
  children: "Price type"
2126
2126
  }), /* @__PURE__ */ v("select", {
2127
- value: W.priceType,
2128
- onChange: (e) => G({ priceType: e.target.value }),
2129
- className: A,
2127
+ value: G.priceType,
2128
+ onChange: (e) => K({ priceType: e.target.value }),
2129
+ className: j,
2130
2130
  children: ft.map((e) => /* @__PURE__ */ v("option", {
2131
2131
  value: e.value,
2132
2132
  children: e.label
@@ -2136,9 +2136,9 @@ var Ct = () => {
2136
2136
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2137
2137
  children: "Price period"
2138
2138
  }), /* @__PURE__ */ v("select", {
2139
- value: W.pricePeriod,
2140
- onChange: (e) => G({ pricePeriod: e.target.value }),
2141
- className: A,
2139
+ value: G.pricePeriod,
2140
+ onChange: (e) => K({ pricePeriod: e.target.value }),
2141
+ className: j,
2142
2142
  children: pt.map((e) => /* @__PURE__ */ v("option", {
2143
2143
  value: e.value,
2144
2144
  children: e.label
@@ -2148,9 +2148,9 @@ var Ct = () => {
2148
2148
  className: "mb-1.5 block text-sm font-medium text-text-primary",
2149
2149
  children: "Currency"
2150
2150
  }), /* @__PURE__ */ v("select", {
2151
- value: W.currency,
2152
- onChange: (e) => G({ currency: e.target.value }),
2153
- className: A,
2151
+ value: G.currency,
2152
+ onChange: (e) => K({ currency: e.target.value }),
2153
+ className: j,
2154
2154
  children: Ce.map((e) => /* @__PURE__ */ v("option", {
2155
2155
  value: e.value,
2156
2156
  children: e.label
@@ -2163,16 +2163,16 @@ var Ct = () => {
2163
2163
  type: "number",
2164
2164
  min: 0,
2165
2165
  step: "0.01",
2166
- value: W.pricePerSqft,
2167
- onChange: (e) => G({ pricePerSqft: e.target.value }),
2168
- className: A
2166
+ value: G.pricePerSqft,
2167
+ onChange: (e) => K({ pricePerSqft: e.target.value }),
2168
+ className: j
2169
2169
  })] }),
2170
2170
  /* @__PURE__ */ y("label", {
2171
2171
  className: "flex items-end gap-2 pb-2.5 text-sm font-medium text-text-primary",
2172
2172
  children: [/* @__PURE__ */ v("input", {
2173
2173
  type: "checkbox",
2174
- checked: W.negotiable,
2175
- onChange: (e) => G({ negotiable: e.target.checked }),
2174
+ checked: G.negotiable,
2175
+ onChange: (e) => K({ negotiable: e.target.checked }),
2176
2176
  className: "h-4 w-4 rounded border-border-subtle"
2177
2177
  }), "Negotiable"]
2178
2178
  })
@@ -2187,11 +2187,11 @@ var Ct = () => {
2187
2187
  }), /* @__PURE__ */ v("div", {
2188
2188
  className: "flex flex-wrap gap-2",
2189
2189
  children: d.map((t) => {
2190
- let n = t.icon, r = W.amenities.includes(t.id);
2190
+ let n = t.icon, r = G.amenities.includes(t.id);
2191
2191
  return /* @__PURE__ */ y("button", {
2192
2192
  type: "button",
2193
2193
  "aria-pressed": r,
2194
- onClick: () => G({ amenities: r ? W.amenities.filter((e) => e !== t.id) : [...W.amenities, t.id] }),
2194
+ onClick: () => K({ amenities: r ? G.amenities.filter((e) => e !== t.id) : [...G.amenities, t.id] }),
2195
2195
  className: e("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors", r ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-surface text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
2196
2196
  children: [/* @__PURE__ */ v(n, { className: "h-3.5 w-3.5" }), t.label]
2197
2197
  }, t.id);
@@ -2203,13 +2203,13 @@ var Ct = () => {
2203
2203
  /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(b, {
2204
2204
  type: "button",
2205
2205
  variant: "outline",
2206
- onClick: () => L(!1),
2207
- disabled: j,
2206
+ onClick: () => R(!1),
2207
+ disabled: M,
2208
2208
  children: "Cancel"
2209
2209
  }), /* @__PURE__ */ v(b, {
2210
2210
  type: "submit",
2211
- disabled: j,
2212
- children: j ? "Saving…" : "Save changes"
2211
+ disabled: M,
2212
+ children: M ? "Saving…" : "Save changes"
2213
2213
  })] })
2214
2214
  ]
2215
2215
  })
@@ -2217,13 +2217,13 @@ var Ct = () => {
2217
2217
  }),
2218
2218
  /* @__PURE__ */ v(x, {
2219
2219
  open: Gt,
2220
- onOpenChange: R,
2220
+ onOpenChange: Kt,
2221
2221
  children: /* @__PURE__ */ y(S, {
2222
2222
  className: "sm:max-w-md",
2223
2223
  children: [/* @__PURE__ */ y(T, { children: [/* @__PURE__ */ v(E, { children: "Delete this property?" }), /* @__PURE__ */ y(C, { children: [g.title, " will be permanently removed. This cannot be undone."] })] }), /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(b, {
2224
2224
  type: "button",
2225
2225
  variant: "outline",
2226
- onClick: () => R(!1),
2226
+ onClick: () => Kt(!1),
2227
2227
  children: "Cancel"
2228
2228
  }), /* @__PURE__ */ v(b, {
2229
2229
  type: "button",