@burdenoff/microfe-timecampus 2026.1203.1 → 2026.1204.1

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.
Files changed (100) hide show
  1. package/dist/timecampus/components/EmptyState.d.ts +7 -0
  2. package/dist/timecampus/components/EmptyState.js +3 -2
  3. package/dist/timecampus/components/EmptyState.js.map +1 -1
  4. package/dist/timecampus/components/FilterBar.js +1 -0
  5. package/dist/timecampus/components/Toast.js +1 -1
  6. package/dist/timecampus/components/Toast.js.map +1 -1
  7. package/dist/timecampus/components/charts/Heatmap.js +1 -1
  8. package/dist/timecampus/components/charts/Heatmap.js.map +1 -1
  9. package/dist/timecampus/components/maps/LocationGeofenceMap.js +3 -3
  10. package/dist/timecampus/components/maps/LocationGeofenceMap.js.map +1 -1
  11. package/dist/timecampus/pages/HomePage.js +1 -1
  12. package/dist/timecampus/pages/HomePage.js.map +1 -1
  13. package/dist/timecampus/pages/admin/AdminPage.js +283 -283
  14. package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
  15. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +79 -79
  16. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
  17. package/dist/timecampus/pages/channels/ChannelsPage.js +8 -8
  18. package/dist/timecampus/pages/channels/ChannelsPage.js.map +1 -1
  19. package/dist/timecampus/pages/client-portal/ClientPortalPage.js +2 -2
  20. package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
  21. package/dist/timecampus/pages/dashboard/ServerReportExports.js +34 -34
  22. package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
  23. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +49 -48
  24. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  25. package/dist/timecampus/pages/extend/AppletDeveloperPage.js +122 -117
  26. package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
  27. package/dist/timecampus/pages/extend/AppletReviewPage.js +2 -2
  28. package/dist/timecampus/pages/extend/AppletReviewPage.js.map +1 -1
  29. package/dist/timecampus/pages/extend/AppletStorePage.js +2 -2
  30. package/dist/timecampus/pages/extend/AppletStorePage.js.map +1 -1
  31. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js +131 -126
  32. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js.map +1 -1
  33. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +94 -94
  34. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
  35. package/dist/timecampus/pages/extend/TimeTriggersPage.js +98 -98
  36. package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
  37. package/dist/timecampus/pages/focus/FocusProtectionPage.js +121 -121
  38. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  39. package/dist/timecampus/pages/geofencing/GeofencingPage.js +348 -348
  40. package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
  41. package/dist/timecampus/pages/lifetime/LifeBalancePage.js +3 -3
  42. package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
  43. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +25 -25
  44. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  45. package/dist/timecampus/pages/lifetime/RecommendationsPage.js +297 -297
  46. package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
  47. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +189 -189
  48. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
  49. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +2 -2
  50. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
  51. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +47 -46
  52. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  53. package/dist/timecampus/pages/meetings/MeetingDetailPage.js +207 -207
  54. package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
  55. package/dist/timecampus/pages/meetings/MeetingFormModal.js +73 -72
  56. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  57. package/dist/timecampus/pages/meetings/MeetingsPage.js +1 -1
  58. package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
  59. package/dist/timecampus/pages/meetings/ParticipantFormModal.js +32 -31
  60. package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
  61. package/dist/timecampus/pages/mobile/MobileScreen.js +1 -1
  62. package/dist/timecampus/pages/mobile/MobileScreen.js.map +1 -1
  63. package/dist/timecampus/pages/mobile/MobileTimelinePage.js +8 -8
  64. package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -1
  65. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js +1 -1
  66. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js.map +1 -1
  67. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +34 -34
  68. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  69. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js +3 -3
  70. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js.map +1 -1
  71. package/dist/timecampus/pages/projects/ProjectDetailPage.js +163 -163
  72. package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
  73. package/dist/timecampus/pages/projects/ProjectsPage.js +193 -192
  74. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  75. package/dist/timecampus/pages/projects/TasksPage.js +92 -92
  76. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  77. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +66 -66
  78. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  79. package/dist/timecampus/pages/settings/IdleDetectionCard.js +33 -33
  80. package/dist/timecampus/pages/settings/IdleDetectionCard.js.map +1 -1
  81. package/dist/timecampus/pages/settings/PrivacySettingsPage.js +32 -32
  82. package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -1
  83. package/dist/timecampus/pages/settings/SettingsPage.js +3 -3
  84. package/dist/timecampus/pages/settings/SettingsPage.js.map +1 -1
  85. package/dist/timecampus/pages/team/TeamMembersPage.js +1 -1
  86. package/dist/timecampus/pages/team/TeamMembersPage.js.map +1 -1
  87. package/dist/timecampus/pages/time/TimeEntriesPage.js +169 -169
  88. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  89. package/dist/timecampus/pages/time/TimeTrackingPage.js +32 -32
  90. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  91. package/dist/timecampus/pages/time/TimerPage.js +85 -85
  92. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  93. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +1 -1
  94. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
  95. package/dist/timecampus/pages/timeline/TimelinePage.js +227 -227
  96. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  97. package/dist/timecampus/shared/hooks/useConfirmedAction.d.ts +10 -0
  98. package/dist/timecampus/shared/hooks/useConfirmedAction.js +14 -0
  99. package/dist/timecampus/shared/hooks/useConfirmedAction.js.map +1 -0
  100. package/package.json +6 -4
@@ -5,50 +5,50 @@ import { Modal as r } from "../../components/Modal.js";
5
5
  import "../../components/index.js";
6
6
  import "../../components/maps/index.js";
7
7
  import { ChartCard as i } from "../../components/ChartCard.js";
8
- import { BarsChart as a } from "../../components/charts/BarsChart.js";
9
- import { DonutChart as o } from "../../components/charts/DonutChart.js";
10
- import { cn as s, formatRelativeTime as ee } from "../../utils/helpers.js";
11
- import { useCreateGeofenceMutation as te, useDeleteGeofenceMutation as ne, useListGeofencesQuery as re, useToggleGeofenceMutation as ie, useUpdateGeofenceMutation as ae } from "../../../generated/wspace-operations.js";
12
- import { DEFAULT_MAP_CENTER as c, MAX_GEOFENCE_RADIUS_METERS as oe, clampGeofenceRadius as l, formatCoordinates as se, formatRadius as u, isValidGeofenceGeometry as d, parseStrictNumber as f, roundCoordinate as p, validateGeofenceForm as ce } from "../../components/maps/locationGeometry.js";
13
- import { LocationGeofenceMap as le } from "../../components/maps/LocationGeofenceMap.js";
14
- import { GeofenceEventType as m, GeofenceTrigger as h } from "../../../generated/wspace-types.js";
15
- import { useMemo as g, useState as _ } from "react";
16
- import { Crosshair as ue, LogIn as v, LogOut as y, MapPin as b, Pencil as de, Plus as fe, Radio as pe, Search as me, ShieldCheck as he, Trash2 as ge, X as x } from "lucide-react";
17
- import { Fragment as _e, jsx as S, jsxs as C } from "react/jsx-runtime";
18
- import { GlassCard as w } from "@burdenoff/fe-libs/ui";
8
+ import { BarsChart as ee } from "../../components/charts/BarsChart.js";
9
+ import { DonutChart as a } from "../../components/charts/DonutChart.js";
10
+ import { cn as o, formatRelativeTime as te } from "../../utils/helpers.js";
11
+ import { useCreateGeofenceMutation as ne, useDeleteGeofenceMutation as re, useListGeofencesQuery as ie, useToggleGeofenceMutation as ae, useUpdateGeofenceMutation as oe } from "../../../generated/wspace-operations.js";
12
+ import { DEFAULT_MAP_CENTER as s, MAX_GEOFENCE_RADIUS_METERS as se, clampGeofenceRadius as ce, formatCoordinates as le, formatRadius as c, isValidGeofenceGeometry as l, parseStrictNumber as u, roundCoordinate as d, validateGeofenceForm as ue } from "../../components/maps/locationGeometry.js";
13
+ import { LocationGeofenceMap as de } from "../../components/maps/LocationGeofenceMap.js";
14
+ import { GeofenceEventType as f, GeofenceTrigger as p } from "../../../generated/wspace-types.js";
15
+ import { useMemo as m, useState as h } from "react";
16
+ import { Crosshair as g, LogIn as fe, LogOut as pe, MapPin as _, Pencil as me, Plus as he, Radio as ge, Search as _e, ShieldCheck as ve, Trash2 as ye, X as v } from "lucide-react";
17
+ import { Fragment as be, jsx as y, jsxs as b } from "react/jsx-runtime";
18
+ import { GlassCard as x, ThemedSelect as xe } from "@burdenoff/fe-libs/ui";
19
19
  // src/timecampus/pages/geofencing/GeofencingPage.tsx
20
- var T = 25, E = 5e3, D = {
20
+ var S = 25, C = 5e3, w = {
21
21
  name: "",
22
- latitude: String(c[0]),
23
- longitude: String(c[1]),
22
+ latitude: String(s[0]),
23
+ longitude: String(s[1]),
24
24
  radius: "150",
25
- trigger: h.Both,
25
+ trigger: p.Both,
26
26
  address: "",
27
27
  isActive: !0
28
- }, O = "mt-1 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-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus";
29
- function k({ checked: e, onChange: t, label: n, disabled: r }) {
30
- return /* @__PURE__ */ S("button", {
28
+ }, T = "mt-1 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-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus";
29
+ function E({ checked: e, onChange: t, label: n, disabled: r }) {
30
+ return /* @__PURE__ */ y("button", {
31
31
  type: "button",
32
32
  role: "switch",
33
33
  "aria-checked": e,
34
34
  "aria-label": n,
35
35
  disabled: r,
36
36
  onClick: () => t(!e),
37
- className: s("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:cursor-not-allowed disabled:opacity-50", e ? "border-transparent bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
38
- children: /* @__PURE__ */ S("span", { className: s("inline-block h-3.5 w-3.5 transform rounded-full shadow-sm transition-transform", e ? "translate-x-4 bg-action-primary-text" : "translate-x-0.5 bg-text-secondary") })
37
+ className: o("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:cursor-not-allowed disabled:opacity-50", e ? "border-transparent bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
38
+ children: /* @__PURE__ */ y("span", { className: o("inline-block h-3.5 w-3.5 transform rounded-full shadow-sm transition-transform", e ? "translate-x-4 bg-action-primary-text" : "translate-x-0.5 bg-text-secondary") })
39
39
  });
40
40
  }
41
- function A(e, t) {
41
+ function D(e, t) {
42
42
  return e instanceof Error && e.message.trim() ? e.message : t;
43
43
  }
44
- function j() {
45
- let { data: j, loading: ve, error: ye, refetch: M, fetchMore: be } = re({ variables: { pagination: {
46
- limit: T,
44
+ function O() {
45
+ let { data: O, loading: Se, error: Ce, refetch: k, fetchMore: we } = ie({ variables: { pagination: {
46
+ limit: S,
47
47
  offset: 0
48
- } } }), [xe, { loading: Se }] = te(), [N, { loading: P }] = ae(), [Ce, { loading: F }] = ne(), [we] = ie(), [I, L] = _(!1), [R, z] = _(null), [B, V] = _(D), [H, U] = _({}), [W, G] = _(null), [K, q] = _(null), [J, Y] = _(null), [X, Te] = _(""), [Ee, De] = _(!1), Z = g(() => j?.geofences?.items ?? [], [j?.geofences?.items]), Oe = j?.geofences?.hasMore ?? !1, ke = j?.geofences?.total ?? Z.length, Ae = g(() => {
49
- let e = X.trim().toLowerCase();
50
- return e ? Z.filter((t) => t.name.toLowerCase().includes(e) || (t.address ?? "").toLowerCase().includes(e)) : Z;
51
- }, [Z, X]), je = g(() => Z.filter((e) => !R || e.id !== R.id).map((e) => ({
48
+ } } }), [Te, { loading: A }] = ne(), [j, { loading: M }] = oe(), [Ee, { loading: N }] = re(), [De] = ae(), [P, F] = h(!1), [I, L] = h(null), [R, z] = h(w), [B, V] = h({}), [H, U] = h(null), [W, G] = h(null), [K, q] = h(null), [J, Oe] = h(""), [ke, Ae] = h(!1), Y = m(() => O?.geofences?.items ?? [], [O?.geofences?.items]), je = O?.geofences?.hasMore ?? !1, Me = O?.geofences?.total ?? Y.length, Ne = m(() => {
49
+ let e = J.trim().toLowerCase();
50
+ return e ? Y.filter((t) => t.name.toLowerCase().includes(e) || (t.address ?? "").toLowerCase().includes(e)) : Y;
51
+ }, [Y, J]), Pe = m(() => Y.filter((e) => !I || e.id !== I.id).map((e) => ({
52
52
  id: e.id,
53
53
  name: e.name,
54
54
  latitude: e.latitude,
@@ -58,10 +58,10 @@ function j() {
58
58
  trigger: e.trigger,
59
59
  address: e.address,
60
60
  eventsCount: e.events.length
61
- })), [R, Z]), Me = g(() => {
62
- if (!I) return null;
63
- let e = f(B.latitude), t = f(B.longitude), n = f(B.radius);
64
- return e === null || t === null || n === null || !d({
61
+ })), [I, Y]), Fe = m(() => {
62
+ if (!P) return null;
63
+ let e = u(R.latitude), t = u(R.longitude), n = u(R.radius);
64
+ return e === null || t === null || n === null || !l({
65
65
  latitude: e,
66
66
  longitude: t,
67
67
  radius: n
@@ -69,42 +69,42 @@ function j() {
69
69
  latitude: e,
70
70
  longitude: t,
71
71
  radius: n,
72
- name: B.name.trim() || void 0
72
+ name: R.name.trim() || void 0
73
73
  };
74
74
  }, [
75
- I,
76
- B.latitude,
77
- B.longitude,
78
- B.name,
79
- B.radius
80
- ]), Ne = Z.filter((e) => e.isActive).length, Pe = 0, Fe = 0;
81
- for (let e of Z) for (let t of e.events) t.type === m.Enter ? Pe += 1 : Fe += 1;
82
- let Ie = [
75
+ P,
76
+ R.latitude,
77
+ R.longitude,
78
+ R.name,
79
+ R.radius
80
+ ]), Ie = Y.filter((e) => e.isActive).length, Le = 0, X = 0;
81
+ for (let e of Y) for (let t of e.events) t.type === f.Enter ? Le += 1 : X += 1;
82
+ let Re = [
83
83
  {
84
84
  name: "Entry & exit",
85
- value: Z.filter((e) => e.trigger === h.Both).length
85
+ value: Y.filter((e) => e.trigger === p.Both).length
86
86
  },
87
87
  {
88
88
  name: "On entry",
89
- value: Z.filter((e) => e.trigger === h.Enter).length
89
+ value: Y.filter((e) => e.trigger === p.Enter).length
90
90
  },
91
91
  {
92
92
  name: "On exit",
93
- value: Z.filter((e) => e.trigger === h.Exit).length
93
+ value: Y.filter((e) => e.trigger === p.Exit).length
94
94
  }
95
- ], Le = Z.map((e) => ({
95
+ ], ze = Y.map((e) => ({
96
96
  zone: e.name,
97
97
  events: e.events.length
98
- })).filter((e) => e.events > 0).sort((e, t) => t.events - e.events).slice(0, 8), Q = () => {
99
- z(null), U({}), G(null);
100
- let e = Z.find((e) => d(e));
101
- V({
102
- ...D,
103
- latitude: String(p(e ? e.latitude : c[0])),
104
- longitude: String(p(e ? e.longitude : c[1]))
105
- }), L(!0);
106
- }, Re = (e) => {
107
- z(e), Y(e.id), U({}), G(null), V({
98
+ })).filter((e) => e.events > 0).sort((e, t) => t.events - e.events).slice(0, 8), Z = () => {
99
+ L(null), V({}), U(null);
100
+ let e = Y.find((e) => l(e));
101
+ z({
102
+ ...w,
103
+ latitude: String(d(e ? e.latitude : s[0])),
104
+ longitude: String(d(e ? e.longitude : s[1]))
105
+ }), F(!0);
106
+ }, Be = (e) => {
107
+ L(e), q(e.id), V({}), U(null), z({
108
108
  name: e.name,
109
109
  latitude: String(e.latitude),
110
110
  longitude: String(e.longitude),
@@ -112,93 +112,93 @@ function j() {
112
112
  trigger: e.trigger,
113
113
  address: e.address ?? "",
114
114
  isActive: e.isActive
115
- }), L(!0);
116
- }, $ = () => {
117
- L(!1), z(null), U({}), G(null);
118
- }, ze = (e) => {
119
- V((t) => ({
115
+ }), F(!0);
116
+ }, Q = () => {
117
+ F(!1), L(null), V({}), U(null);
118
+ }, Ve = (e) => {
119
+ z((t) => ({
120
120
  ...t,
121
- latitude: String(p(e.latitude)),
122
- longitude: String(p(e.longitude)),
123
- radius: String(l(e.radius))
124
- })), U((e) => ({
121
+ latitude: String(d(e.latitude)),
122
+ longitude: String(d(e.longitude)),
123
+ radius: String(ce(e.radius))
124
+ })), V((e) => ({
125
125
  ...e,
126
126
  latitude: void 0,
127
127
  longitude: void 0,
128
128
  radius: void 0
129
129
  }));
130
- }, Be = async () => {
131
- G(null);
132
- let e = ce(B);
130
+ }, He = async () => {
131
+ U(null);
132
+ let e = ue(R);
133
133
  if (!e.valid || !e.parsed) {
134
- U(e.errors);
134
+ V(e.errors);
135
135
  return;
136
136
  }
137
- U({});
137
+ V({});
138
138
  let t = {
139
139
  name: e.parsed.name,
140
140
  latitude: e.parsed.latitude,
141
141
  longitude: e.parsed.longitude,
142
142
  radius: e.parsed.radius,
143
- trigger: B.trigger,
144
- address: B.address.trim() || void 0,
145
- isActive: B.isActive
143
+ trigger: R.trigger,
144
+ address: R.address.trim() || void 0,
145
+ isActive: R.isActive
146
146
  };
147
147
  try {
148
- if (R) {
149
- let e = (await N({ variables: {
150
- id: R.id,
148
+ if (I) {
149
+ let e = (await j({ variables: {
150
+ id: I.id,
151
151
  input: t
152
- } })).data?.updateGeofence?.id ?? R.id;
153
- Y(e);
152
+ } })).data?.updateGeofence?.id ?? I.id;
153
+ q(e);
154
154
  } else {
155
- let e = (await xe({ variables: { input: t } })).data?.createGeofence?.id ?? null;
156
- e && Y(e);
155
+ let e = (await Te({ variables: { input: t } })).data?.createGeofence?.id ?? null;
156
+ e && q(e);
157
157
  }
158
- L(!1), z(null), await M();
158
+ F(!1), L(null), await k();
159
159
  } catch (e) {
160
- G(A(e, "Failed to save geofence. Check permissions and values, then try again."));
160
+ U(D(e, "Failed to save geofence. Check permissions and values, then try again."));
161
161
  }
162
- }, Ve = async () => {
163
- if (K) {
164
- G(null);
162
+ }, Ue = async () => {
163
+ if (W) {
164
+ U(null);
165
165
  try {
166
- await Ce({ variables: { id: K.id } }), J === K.id && Y(null), q(null), await M();
166
+ await Ee({ variables: { id: W.id } }), K === W.id && q(null), G(null), await k();
167
167
  } catch (e) {
168
- G(A(e, "Failed to delete geofence. You may not have permission to modify zones.")), q(null);
168
+ U(D(e, "Failed to delete geofence. You may not have permission to modify zones.")), G(null);
169
169
  }
170
170
  }
171
- }, He = async (e) => {
172
- G(null);
171
+ }, We = async (e) => {
172
+ U(null);
173
173
  try {
174
- await we({ variables: {
174
+ await De({ variables: {
175
175
  id: e.id,
176
176
  isActive: !e.isActive
177
- } }), await M();
177
+ } }), await k();
178
178
  } catch (e) {
179
- G(A(e, "Failed to update geofence active state."));
179
+ U(D(e, "Failed to update geofence active state."));
180
180
  }
181
- }, Ue = async (e, t, n) => {
181
+ }, Ge = async (e, t, n) => {
182
182
  if (!t && !n) return;
183
- let r = t && n ? h.Both : t ? h.Enter : h.Exit;
183
+ let r = t && n ? p.Both : t ? p.Enter : p.Exit;
184
184
  if (r !== e.trigger) {
185
- G(null);
185
+ U(null);
186
186
  try {
187
- await N({ variables: {
187
+ await j({ variables: {
188
188
  id: e.id,
189
189
  input: { trigger: r }
190
- } }), await M();
190
+ } }), await k();
191
191
  } catch (e) {
192
- G(A(e, "Failed to update geofence trigger."));
192
+ U(D(e, "Failed to update geofence trigger."));
193
193
  }
194
194
  }
195
- }, We = async () => {
196
- De(!0);
195
+ }, Ke = async () => {
196
+ Ae(!0);
197
197
  try {
198
- await be({
198
+ await we({
199
199
  variables: { pagination: {
200
- limit: T,
201
- offset: Z.length
200
+ limit: S,
201
+ offset: Y.length
202
202
  } },
203
203
  updateQuery: (e, { fetchMoreResult: t }) => t ? { geofences: {
204
204
  ...t.geofences,
@@ -206,277 +206,277 @@ function j() {
206
206
  } } : e
207
207
  });
208
208
  } finally {
209
- De(!1);
209
+ Ae(!1);
210
210
  }
211
- }, Ge = /* @__PURE__ */ C("button", {
211
+ }, qe = /* @__PURE__ */ b("button", {
212
212
  type: "button",
213
- onClick: I ? $ : Q,
213
+ onClick: P ? Q : Z,
214
214
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
215
- children: [S(I ? x : fe, { className: "h-4 w-4" }), I ? "Close Editor" : "Create Geofence"]
215
+ children: [y(P ? v : he, { className: "h-4 w-4" }), P ? "Close Editor" : "Create Geofence"]
216
216
  });
217
- if (ve) return /* @__PURE__ */ S(e, {
217
+ if (Se) return /* @__PURE__ */ y(e, {
218
218
  title: "Geofencing",
219
219
  description: "Set up location-based triggers and zones",
220
- children: /* @__PURE__ */ S(n, {
220
+ children: /* @__PURE__ */ y(n, {
221
221
  variant: "card",
222
222
  count: 4
223
223
  })
224
224
  });
225
- if (ye) return /* @__PURE__ */ S(e, {
225
+ if (Ce) return /* @__PURE__ */ y(e, {
226
226
  title: "Geofencing",
227
227
  description: "Set up location-based triggers and zones",
228
- children: /* @__PURE__ */ S("div", {
228
+ children: /* @__PURE__ */ y("div", {
229
229
  role: "alert",
230
230
  className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
231
231
  children: "Failed to load geofences. Please check workspace permissions or try again later."
232
232
  })
233
233
  });
234
- let Ke = l(f(B.radius) ?? 150);
235
- return /* @__PURE__ */ C(e, {
234
+ let $ = ce(u(R.radius) ?? 150);
235
+ return /* @__PURE__ */ b(e, {
236
236
  title: "Geofencing",
237
237
  description: "Set up location-based triggers and zones",
238
238
  purpose: "Draw zones around your worksites — offices, client sites, job locations — and have time tracking start and stop automatically as people move in and out, so on-site hours record themselves.",
239
- actions: Ge,
239
+ actions: qe,
240
240
  children: [
241
- W && !I && /* @__PURE__ */ C("div", {
241
+ H && !P && /* @__PURE__ */ b("div", {
242
242
  role: "alert",
243
243
  className: "mb-4 flex items-center justify-between gap-3 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
244
- children: [/* @__PURE__ */ S("span", { children: W }), /* @__PURE__ */ S("button", {
244
+ children: [/* @__PURE__ */ y("span", { children: H }), /* @__PURE__ */ y("button", {
245
245
  type: "button",
246
- onClick: () => G(null),
246
+ onClick: () => U(null),
247
247
  "aria-label": "Dismiss error",
248
248
  className: "rounded p-1 hover:bg-bg-surface/20",
249
- children: /* @__PURE__ */ S(x, { className: "h-4 w-4" })
249
+ children: /* @__PURE__ */ y(v, { className: "h-4 w-4" })
250
250
  })]
251
251
  }),
252
- /* @__PURE__ */ C("div", {
252
+ /* @__PURE__ */ b("div", {
253
253
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
254
254
  children: [
255
- /* @__PURE__ */ S(t, {
255
+ /* @__PURE__ */ y(t, {
256
256
  featured: !0,
257
257
  title: "Total Zones",
258
- value: String(ke),
259
- icon: /* @__PURE__ */ S(b, { className: "h-5 w-5" })
258
+ value: String(Me),
259
+ icon: /* @__PURE__ */ y(_, { className: "h-5 w-5" })
260
260
  }),
261
- /* @__PURE__ */ S(t, {
261
+ /* @__PURE__ */ y(t, {
262
262
  title: "Active Zones",
263
- value: String(Ne),
264
- icon: /* @__PURE__ */ S(pe, { className: "h-5 w-5" }),
263
+ value: String(Ie),
264
+ icon: /* @__PURE__ */ y(ge, { className: "h-5 w-5" }),
265
265
  description: "Currently tracking"
266
266
  }),
267
- /* @__PURE__ */ S(t, {
267
+ /* @__PURE__ */ y(t, {
268
268
  title: "Entry Events",
269
- value: String(Pe),
270
- icon: /* @__PURE__ */ S(v, { className: "h-5 w-5" })
269
+ value: String(Le),
270
+ icon: /* @__PURE__ */ y(fe, { className: "h-5 w-5" })
271
271
  }),
272
- /* @__PURE__ */ S(t, {
272
+ /* @__PURE__ */ y(t, {
273
273
  title: "Exit Events",
274
- value: String(Fe),
275
- icon: /* @__PURE__ */ S(y, { className: "h-5 w-5" })
274
+ value: String(X),
275
+ icon: /* @__PURE__ */ y(pe, { className: "h-5 w-5" })
276
276
  })
277
277
  ]
278
278
  }),
279
- /* @__PURE__ */ C("div", {
279
+ /* @__PURE__ */ b("div", {
280
280
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-12",
281
- children: [/* @__PURE__ */ C("div", {
281
+ children: [/* @__PURE__ */ b("div", {
282
282
  className: "min-w-0 lg:col-span-7 xl:col-span-8",
283
- children: [/* @__PURE__ */ C("div", {
283
+ children: [/* @__PURE__ */ b("div", {
284
284
  className: "mb-3 flex flex-wrap items-center justify-between gap-2",
285
- children: [/* @__PURE__ */ C("div", {
285
+ children: [/* @__PURE__ */ b("div", {
286
286
  className: "min-w-0",
287
- children: [/* @__PURE__ */ S("h2", {
287
+ children: [/* @__PURE__ */ y("h2", {
288
288
  className: "text-base font-semibold text-text-primary",
289
289
  children: "Geofence Map"
290
- }), /* @__PURE__ */ S("p", {
290
+ }), /* @__PURE__ */ y("p", {
291
291
  className: "text-xs text-text-secondary",
292
- children: I ? "Click on the map to place the center, or drag the center pin and outer radius handle." : "Select any zone on the map or list to inspect boundaries and triggers."
292
+ children: P ? "Click on the map to place the center, or drag the center pin and outer radius handle." : "Select any zone on the map or list to inspect boundaries and triggers."
293
293
  })]
294
- }), !I && /* @__PURE__ */ C("button", {
294
+ }), !P && /* @__PURE__ */ b("button", {
295
295
  type: "button",
296
- onClick: Q,
296
+ onClick: Z,
297
297
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
298
- children: [/* @__PURE__ */ S(ue, { className: "h-3.5 w-3.5" }), "Draw Zone on Map"]
298
+ children: [/* @__PURE__ */ y(g, { className: "h-3.5 w-3.5" }), "Draw Zone on Map"]
299
299
  })]
300
- }), /* @__PURE__ */ S(le, {
301
- geofences: je,
302
- selectedGeofenceId: I ? null : J,
303
- onSelectGeofence: (e) => Y(e),
304
- draftGeofence: Me,
305
- interactiveMode: I ? "place-geofence" : "view",
306
- onDraftGeofenceChange: ze,
300
+ }), /* @__PURE__ */ y(de, {
301
+ geofences: Pe,
302
+ selectedGeofenceId: P ? null : K,
303
+ onSelectGeofence: (e) => q(e),
304
+ draftGeofence: Fe,
305
+ interactiveMode: P ? "place-geofence" : "view",
306
+ onDraftGeofenceChange: Ve,
307
307
  heightClassName: "h-[320px] sm:h-[420px] lg:h-[560px]",
308
308
  ariaLabel: "Geofence zones map",
309
309
  testId: "geofencing-map"
310
310
  })]
311
- }), /* @__PURE__ */ C("div", {
311
+ }), /* @__PURE__ */ b("div", {
312
312
  className: "flex min-w-0 flex-col gap-4 lg:col-span-5 xl:col-span-4",
313
- children: [I ? /* @__PURE__ */ C(w, {
313
+ children: [P ? /* @__PURE__ */ b(x, {
314
314
  treatment: "glass",
315
315
  className: "flex flex-col p-5",
316
316
  "data-testid": "geofence-editor-panel",
317
317
  children: [
318
- /* @__PURE__ */ C("div", {
318
+ /* @__PURE__ */ b("div", {
319
319
  className: "flex items-start justify-between gap-3 border-b border-border-seam pb-3",
320
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h2", {
320
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
321
321
  className: "text-base font-semibold text-text-primary",
322
- children: R ? "Edit Geofence" : "Create Geofence"
323
- }), /* @__PURE__ */ S("p", {
322
+ children: I ? "Edit Geofence" : "Create Geofence"
323
+ }), /* @__PURE__ */ y("p", {
324
324
  className: "mt-0.5 text-xs text-text-secondary",
325
325
  children: "Place on the map or enter exact WGS-84 coordinates."
326
- })] }), /* @__PURE__ */ S("button", {
326
+ })] }), /* @__PURE__ */ y("button", {
327
327
  type: "button",
328
- onClick: $,
328
+ onClick: Q,
329
329
  "aria-label": "Close geofence editor",
330
330
  className: "rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
331
- children: /* @__PURE__ */ S(x, { className: "h-4 w-4" })
331
+ children: /* @__PURE__ */ y(v, { className: "h-4 w-4" })
332
332
  })]
333
333
  }),
334
- W && /* @__PURE__ */ S("div", {
334
+ H && /* @__PURE__ */ y("div", {
335
335
  role: "alert",
336
336
  className: "mt-3 rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-xs text-status-error-text",
337
- children: W
337
+ children: H
338
338
  }),
339
- /* @__PURE__ */ C("form", {
339
+ /* @__PURE__ */ b("form", {
340
340
  className: "mt-4 space-y-3.5",
341
341
  onSubmit: (e) => {
342
- e.preventDefault(), Be();
342
+ e.preventDefault(), He();
343
343
  },
344
344
  noValidate: !0,
345
345
  children: [
346
- /* @__PURE__ */ C("div", { children: [
347
- /* @__PURE__ */ S("label", {
346
+ /* @__PURE__ */ b("div", { children: [
347
+ /* @__PURE__ */ y("label", {
348
348
  htmlFor: "geofence-name",
349
349
  className: "block text-xs font-medium text-text-primary",
350
350
  children: "Name"
351
351
  }),
352
- /* @__PURE__ */ S("input", {
352
+ /* @__PURE__ */ y("input", {
353
353
  id: "geofence-name",
354
354
  type: "text",
355
355
  placeholder: "e.g. SF Headquarters",
356
- value: B.name,
356
+ value: R.name,
357
357
  onChange: (e) => {
358
- V({
359
- ...B,
358
+ z({
359
+ ...R,
360
360
  name: e.target.value
361
- }), U((e) => ({
361
+ }), V((e) => ({
362
362
  ...e,
363
363
  name: void 0
364
364
  }));
365
365
  },
366
- className: O
366
+ className: T
367
367
  }),
368
- H.name && /* @__PURE__ */ S("p", {
368
+ B.name && /* @__PURE__ */ y("p", {
369
369
  role: "alert",
370
370
  className: "mt-1 text-xs text-status-error-text",
371
- children: H.name
371
+ children: B.name
372
372
  })
373
373
  ] }),
374
- /* @__PURE__ */ C("div", {
374
+ /* @__PURE__ */ b("div", {
375
375
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
376
- children: [/* @__PURE__ */ C("div", { children: [
377
- /* @__PURE__ */ S("label", {
376
+ children: [/* @__PURE__ */ b("div", { children: [
377
+ /* @__PURE__ */ y("label", {
378
378
  htmlFor: "geofence-lat",
379
379
  className: "block text-xs font-medium text-text-primary",
380
380
  children: "Latitude"
381
381
  }),
382
- /* @__PURE__ */ S("input", {
382
+ /* @__PURE__ */ y("input", {
383
383
  id: "geofence-lat",
384
384
  type: "number",
385
385
  step: "any",
386
386
  min: -90,
387
387
  max: 90,
388
388
  placeholder: "37.774900",
389
- value: B.latitude,
389
+ value: R.latitude,
390
390
  onChange: (e) => {
391
- V({
392
- ...B,
391
+ z({
392
+ ...R,
393
393
  latitude: e.target.value
394
- }), U((e) => ({
394
+ }), V((e) => ({
395
395
  ...e,
396
396
  latitude: void 0
397
397
  }));
398
398
  },
399
- className: O
399
+ className: T
400
400
  }),
401
- H.latitude && /* @__PURE__ */ S("p", {
401
+ B.latitude && /* @__PURE__ */ y("p", {
402
402
  role: "alert",
403
403
  className: "mt-1 text-xs text-status-error-text",
404
- children: H.latitude
404
+ children: B.latitude
405
405
  })
406
- ] }), /* @__PURE__ */ C("div", { children: [
407
- /* @__PURE__ */ S("label", {
406
+ ] }), /* @__PURE__ */ b("div", { children: [
407
+ /* @__PURE__ */ y("label", {
408
408
  htmlFor: "geofence-lng",
409
409
  className: "block text-xs font-medium text-text-primary",
410
410
  children: "Longitude"
411
411
  }),
412
- /* @__PURE__ */ S("input", {
412
+ /* @__PURE__ */ y("input", {
413
413
  id: "geofence-lng",
414
414
  type: "number",
415
415
  step: "any",
416
416
  min: -180,
417
417
  max: 180,
418
418
  placeholder: "-122.419400",
419
- value: B.longitude,
419
+ value: R.longitude,
420
420
  onChange: (e) => {
421
- V({
422
- ...B,
421
+ z({
422
+ ...R,
423
423
  longitude: e.target.value
424
- }), U((e) => ({
424
+ }), V((e) => ({
425
425
  ...e,
426
426
  longitude: void 0
427
427
  }));
428
428
  },
429
- className: O
429
+ className: T
430
430
  }),
431
- H.longitude && /* @__PURE__ */ S("p", {
431
+ B.longitude && /* @__PURE__ */ y("p", {
432
432
  role: "alert",
433
433
  className: "mt-1 text-xs text-status-error-text",
434
- children: H.longitude
434
+ children: B.longitude
435
435
  })
436
436
  ] })]
437
437
  }),
438
- /* @__PURE__ */ C("div", { children: [
439
- /* @__PURE__ */ C("div", {
438
+ /* @__PURE__ */ b("div", { children: [
439
+ /* @__PURE__ */ b("div", {
440
440
  className: "flex items-center justify-between",
441
- children: [/* @__PURE__ */ S("label", {
441
+ children: [/* @__PURE__ */ y("label", {
442
442
  htmlFor: "geofence-radius",
443
443
  className: "block text-xs font-medium text-text-primary",
444
444
  children: "Radius (meters)"
445
- }), /* @__PURE__ */ S("span", {
445
+ }), /* @__PURE__ */ y("span", {
446
446
  className: "font-mono text-xs text-text-secondary",
447
- children: u(Ke)
447
+ children: c($)
448
448
  })]
449
449
  }),
450
- /* @__PURE__ */ C("div", {
450
+ /* @__PURE__ */ b("div", {
451
451
  className: "mt-1 flex items-center gap-2",
452
- children: [/* @__PURE__ */ S("input", {
452
+ children: [/* @__PURE__ */ y("input", {
453
453
  id: "geofence-radius",
454
454
  type: "number",
455
455
  min: 10,
456
- max: oe,
457
- value: B.radius,
456
+ max: se,
457
+ value: R.radius,
458
458
  onChange: (e) => {
459
- V({
460
- ...B,
459
+ z({
460
+ ...R,
461
461
  radius: e.target.value
462
- }), U((e) => ({
462
+ }), V((e) => ({
463
463
  ...e,
464
464
  radius: void 0
465
465
  }));
466
466
  },
467
467
  className: "w-28 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-sm text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus"
468
- }), /* @__PURE__ */ S("input", {
468
+ }), /* @__PURE__ */ y("input", {
469
469
  type: "range",
470
470
  "aria-label": "Adjust geofence radius",
471
471
  min: 10,
472
- max: E,
472
+ max: C,
473
473
  step: 10,
474
- value: Math.min(E, Ke),
474
+ value: Math.min(C, $),
475
475
  onChange: (e) => {
476
- V({
477
- ...B,
476
+ z({
477
+ ...R,
478
478
  radius: e.target.value
479
- }), U((e) => ({
479
+ }), V((e) => ({
480
480
  ...e,
481
481
  radius: void 0
482
482
  }));
@@ -484,290 +484,290 @@ function j() {
484
484
  className: "h-2 flex-1 cursor-pointer accent-action-primary-bg"
485
485
  })]
486
486
  }),
487
- H.radius && /* @__PURE__ */ S("p", {
487
+ B.radius && /* @__PURE__ */ y("p", {
488
488
  role: "alert",
489
489
  className: "mt-1 text-xs text-status-error-text",
490
- children: H.radius
490
+ children: B.radius
491
491
  })
492
492
  ] }),
493
- /* @__PURE__ */ C("div", {
493
+ /* @__PURE__ */ b("div", {
494
494
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
495
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
495
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
496
496
  htmlFor: "geofence-trigger",
497
497
  className: "block text-xs font-medium text-text-primary",
498
498
  children: "Trigger"
499
- }), /* @__PURE__ */ C("select", {
499
+ }), /* @__PURE__ */ b(xe, {
500
500
  id: "geofence-trigger",
501
- value: B.trigger,
502
- onChange: (e) => V({
503
- ...B,
501
+ value: R.trigger,
502
+ onChange: (e) => z({
503
+ ...R,
504
504
  trigger: e.target.value
505
505
  }),
506
- className: O,
506
+ className: T,
507
507
  children: [
508
- /* @__PURE__ */ S("option", {
509
- value: h.Enter,
508
+ /* @__PURE__ */ y("option", {
509
+ value: p.Enter,
510
510
  children: "On entry"
511
511
  }),
512
- /* @__PURE__ */ S("option", {
513
- value: h.Exit,
512
+ /* @__PURE__ */ y("option", {
513
+ value: p.Exit,
514
514
  children: "On exit"
515
515
  }),
516
- /* @__PURE__ */ S("option", {
517
- value: h.Both,
516
+ /* @__PURE__ */ y("option", {
517
+ value: p.Both,
518
518
  children: "Entry & exit"
519
519
  })
520
520
  ]
521
- })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
521
+ })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
522
522
  htmlFor: "geofence-address",
523
523
  className: "block text-xs font-medium text-text-primary",
524
524
  children: "Address (optional)"
525
- }), /* @__PURE__ */ S("input", {
525
+ }), /* @__PURE__ */ y("input", {
526
526
  id: "geofence-address",
527
527
  type: "text",
528
528
  placeholder: "San Francisco, USA",
529
- value: B.address,
530
- onChange: (e) => V({
531
- ...B,
529
+ value: R.address,
530
+ onChange: (e) => z({
531
+ ...R,
532
532
  address: e.target.value
533
533
  }),
534
- className: O
534
+ className: T
535
535
  })] })]
536
536
  }),
537
- /* @__PURE__ */ C("label", {
537
+ /* @__PURE__ */ b("label", {
538
538
  className: "flex items-center justify-between rounded-lg border border-border-subtle bg-bg-surface/60 px-3 py-2",
539
- children: [/* @__PURE__ */ S("span", {
539
+ children: [/* @__PURE__ */ y("span", {
540
540
  className: "text-xs font-medium text-text-primary",
541
541
  children: "Zone active"
542
- }), /* @__PURE__ */ S("input", {
542
+ }), /* @__PURE__ */ y("input", {
543
543
  type: "checkbox",
544
- checked: B.isActive,
545
- onChange: (e) => V({
546
- ...B,
544
+ checked: R.isActive,
545
+ onChange: (e) => z({
546
+ ...R,
547
547
  isActive: e.target.checked
548
548
  }),
549
549
  className: "h-4 w-4 rounded border-border-subtle"
550
550
  })]
551
551
  }),
552
- /* @__PURE__ */ C("div", {
552
+ /* @__PURE__ */ b("div", {
553
553
  className: "flex items-center justify-end gap-2 border-t border-border-seam pt-3",
554
- children: [/* @__PURE__ */ S("button", {
554
+ children: [/* @__PURE__ */ y("button", {
555
555
  type: "button",
556
- onClick: $,
556
+ onClick: Q,
557
557
  className: "rounded-md border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
558
558
  children: "Cancel"
559
- }), /* @__PURE__ */ S("button", {
559
+ }), /* @__PURE__ */ y("button", {
560
560
  type: "submit",
561
- disabled: Se || P,
561
+ disabled: A || M,
562
562
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:opacity-50",
563
- children: Se || P ? "Saving..." : R ? "Save Changes" : "Save Geofence"
563
+ children: A || M ? "Saving..." : I ? "Save Changes" : "Save Geofence"
564
564
  })]
565
565
  })
566
566
  ]
567
567
  })
568
568
  ]
569
- }) : /* @__PURE__ */ C(w, {
569
+ }) : /* @__PURE__ */ b(x, {
570
570
  treatment: "glass",
571
571
  className: "flex flex-col p-4",
572
572
  children: [
573
- /* @__PURE__ */ C("div", {
573
+ /* @__PURE__ */ b("div", {
574
574
  className: "flex items-center justify-between gap-2 border-b border-border-seam pb-3",
575
- children: [/* @__PURE__ */ C("h2", {
575
+ children: [/* @__PURE__ */ b("h2", {
576
576
  className: "text-base font-semibold text-text-primary",
577
577
  children: [
578
578
  "Geofences (",
579
- ke,
579
+ Me,
580
580
  ")"
581
581
  ]
582
- }), /* @__PURE__ */ C("button", {
582
+ }), /* @__PURE__ */ b("button", {
583
583
  type: "button",
584
- onClick: Q,
584
+ onClick: Z,
585
585
  className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-2.5 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
586
- children: [/* @__PURE__ */ S(fe, { className: "h-3.5 w-3.5" }), "Add Geofence"]
586
+ children: [/* @__PURE__ */ y(he, { className: "h-3.5 w-3.5" }), "Add Geofence"]
587
587
  })]
588
588
  }),
589
- Z.length > 0 && /* @__PURE__ */ C("div", {
589
+ Y.length > 0 && /* @__PURE__ */ b("div", {
590
590
  className: "relative mt-3",
591
- children: [/* @__PURE__ */ S(me, { className: "pointer-events-none absolute left-2.5 top-2.5 h-3.5 w-3.5 text-text-muted" }), /* @__PURE__ */ S("input", {
591
+ children: [/* @__PURE__ */ y(_e, { className: "pointer-events-none absolute start-2.5 top-2.5 h-3.5 w-3.5 text-text-muted" }), /* @__PURE__ */ y("input", {
592
592
  type: "search",
593
593
  "aria-label": "Filter geofences",
594
594
  placeholder: "Filter zones by name or address...",
595
- value: X,
596
- onChange: (e) => Te(e.target.value),
597
- className: "w-full rounded-md border border-border-subtle bg-bg-surface py-1.5 pl-8 pr-3 text-xs text-text-primary placeholder:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus"
595
+ value: J,
596
+ onChange: (e) => Oe(e.target.value),
597
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface py-1.5 ps-8 pe-3 text-xs text-text-primary placeholder:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus"
598
598
  })]
599
599
  }),
600
- Z.length === 0 ? /* @__PURE__ */ C("div", {
600
+ Y.length === 0 ? /* @__PURE__ */ b("div", {
601
601
  className: "mt-4 rounded-lg border border-dashed border-border-subtle bg-bg-surface/40 p-5 text-center",
602
602
  children: [
603
- /* @__PURE__ */ S(b, { className: "mx-auto h-7 w-7 text-text-muted" }),
604
- /* @__PURE__ */ S("p", {
603
+ /* @__PURE__ */ y(_, { className: "mx-auto h-7 w-7 text-text-muted" }),
604
+ /* @__PURE__ */ y("p", {
605
605
  className: "mt-2 text-sm font-medium text-text-primary",
606
606
  children: "No geofences configured yet"
607
607
  }),
608
- /* @__PURE__ */ S("p", {
608
+ /* @__PURE__ */ y("p", {
609
609
  className: "mt-1 text-xs text-text-secondary",
610
610
  children: "Start drawing on the map to create your first worksite zone."
611
611
  }),
612
- /* @__PURE__ */ C("button", {
612
+ /* @__PURE__ */ b("button", {
613
613
  type: "button",
614
- onClick: Q,
614
+ onClick: Z,
615
615
  className: "mt-3 inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90",
616
- children: [/* @__PURE__ */ S(ue, { className: "h-3.5 w-3.5" }), "Place First Zone"]
616
+ children: [/* @__PURE__ */ y(g, { className: "h-3.5 w-3.5" }), "Place First Zone"]
617
617
  })
618
618
  ]
619
- }) : Ae.length === 0 ? /* @__PURE__ */ C("p", {
619
+ }) : Ne.length === 0 ? /* @__PURE__ */ b("p", {
620
620
  className: "mt-4 text-center text-xs text-text-secondary",
621
621
  children: [
622
622
  "No geofences match “",
623
- X,
623
+ J,
624
624
  "”."
625
625
  ]
626
- }) : /* @__PURE__ */ S("div", {
627
- className: "mt-3 max-h-[430px] space-y-3 overflow-y-auto pr-1",
628
- children: Ae.map((e) => {
629
- let t = e.id === J, n = e.trigger === h.Enter || e.trigger === h.Both, r = e.trigger === h.Exit || e.trigger === h.Both, i = e.events.filter((e) => e.type === m.Enter).length, a = e.events.length - i, o = e.events.reduce((e, t) => t.timestamp > e ? t.timestamp : e, "");
630
- return /* @__PURE__ */ C("div", {
631
- className: s("rounded-xl border p-3.5 transition-colors", t ? "border-action-primary-bg bg-bg-surface" : "border-border-subtle bg-bg-surface/60 hover:bg-bg-surface"),
626
+ }) : /* @__PURE__ */ y("div", {
627
+ className: "mt-3 max-h-[430px] space-y-3 overflow-y-auto pe-1",
628
+ children: Ne.map((e) => {
629
+ let t = e.id === K, n = e.trigger === p.Enter || e.trigger === p.Both, r = e.trigger === p.Exit || e.trigger === p.Both, i = e.events.filter((e) => e.type === f.Enter).length, ee = e.events.length - i, a = e.events.reduce((e, t) => t.timestamp > e ? t.timestamp : e, "");
630
+ return /* @__PURE__ */ b("div", {
631
+ className: o("rounded-xl border p-3.5 transition-colors", t ? "border-action-primary-bg bg-bg-surface" : "border-border-subtle bg-bg-surface/60 hover:bg-bg-surface"),
632
632
  children: [
633
- /* @__PURE__ */ C("div", {
633
+ /* @__PURE__ */ b("div", {
634
634
  className: "flex items-start justify-between gap-2",
635
- children: [/* @__PURE__ */ C("button", {
635
+ children: [/* @__PURE__ */ b("button", {
636
636
  type: "button",
637
- onClick: () => Y(e.id),
638
- className: "flex min-w-0 flex-1 items-start gap-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
639
- children: [/* @__PURE__ */ S("span", {
637
+ onClick: () => q(e.id),
638
+ className: "flex min-w-0 flex-1 items-start gap-2 text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
639
+ children: [/* @__PURE__ */ y("span", {
640
640
  className: "mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
641
- children: /* @__PURE__ */ S(b, { className: "h-4 w-4" })
642
- }), /* @__PURE__ */ C("div", {
641
+ children: /* @__PURE__ */ y(_, { className: "h-4 w-4" })
642
+ }), /* @__PURE__ */ b("div", {
643
643
  className: "min-w-0",
644
- children: [/* @__PURE__ */ S("p", {
644
+ children: [/* @__PURE__ */ y("p", {
645
645
  className: "truncate text-sm font-semibold text-text-primary",
646
646
  children: e.name
647
- }), /* @__PURE__ */ C("p", {
647
+ }), /* @__PURE__ */ b("p", {
648
648
  className: "truncate text-xs text-text-secondary",
649
649
  children: [
650
- e.address ?? se(e.latitude, e.longitude),
650
+ e.address ?? le(e.latitude, e.longitude),
651
651
  " ",
652
652
  "· ",
653
- u(e.radius)
653
+ c(e.radius)
654
654
  ]
655
655
  })]
656
656
  })]
657
- }), /* @__PURE__ */ C("div", {
657
+ }), /* @__PURE__ */ b("div", {
658
658
  className: "flex shrink-0 flex-col items-end gap-1",
659
- children: [/* @__PURE__ */ S(k, {
659
+ children: [/* @__PURE__ */ y(E, {
660
660
  checked: e.isActive,
661
- onChange: () => void He(e),
661
+ onChange: () => void We(e),
662
662
  label: `Toggle ${e.name} active`
663
- }), /* @__PURE__ */ S("span", {
664
- className: s("text-[11px] font-medium", e.isActive ? "text-status-success-text" : "text-text-muted"),
663
+ }), /* @__PURE__ */ y("span", {
664
+ className: o("text-[11px] font-medium", e.isActive ? "text-status-success-text" : "text-text-muted"),
665
665
  children: e.isActive ? "Active" : "Inactive"
666
666
  })]
667
667
  })]
668
668
  }),
669
- /* @__PURE__ */ C("div", {
669
+ /* @__PURE__ */ b("div", {
670
670
  className: "mt-3 grid grid-cols-2 gap-2",
671
- children: [/* @__PURE__ */ C("div", {
671
+ children: [/* @__PURE__ */ b("div", {
672
672
  className: "flex items-center justify-between rounded-lg border border-border-subtle bg-bg-sunken/40 px-2.5 py-1.5",
673
- children: [/* @__PURE__ */ C("span", {
673
+ children: [/* @__PURE__ */ b("span", {
674
674
  className: "flex items-center gap-1 text-[11px] font-medium text-text-secondary",
675
- children: [/* @__PURE__ */ S(v, { className: "h-3 w-3" }), "Enter"]
676
- }), /* @__PURE__ */ S(k, {
675
+ children: [/* @__PURE__ */ y(fe, { className: "h-3 w-3" }), "Enter"]
676
+ }), /* @__PURE__ */ y(E, {
677
677
  checked: n,
678
- onChange: (t) => void Ue(e, t, r),
678
+ onChange: (t) => void Ge(e, t, r),
679
679
  label: `Enter trigger for ${e.name}`
680
680
  })]
681
- }), /* @__PURE__ */ C("div", {
681
+ }), /* @__PURE__ */ b("div", {
682
682
  className: "flex items-center justify-between rounded-lg border border-border-subtle bg-bg-sunken/40 px-2.5 py-1.5",
683
- children: [/* @__PURE__ */ C("span", {
683
+ children: [/* @__PURE__ */ b("span", {
684
684
  className: "flex items-center gap-1 text-[11px] font-medium text-text-secondary",
685
- children: [/* @__PURE__ */ S(y, { className: "h-3 w-3" }), "Exit"]
686
- }), /* @__PURE__ */ S(k, {
685
+ children: [/* @__PURE__ */ y(pe, { className: "h-3 w-3" }), "Exit"]
686
+ }), /* @__PURE__ */ y(E, {
687
687
  checked: r,
688
- onChange: (t) => void Ue(e, n, t),
688
+ onChange: (t) => void Ge(e, n, t),
689
689
  label: `Exit trigger for ${e.name}`
690
690
  })]
691
691
  })]
692
692
  }),
693
- /* @__PURE__ */ C("div", {
693
+ /* @__PURE__ */ b("div", {
694
694
  className: "mt-2.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-text-secondary",
695
695
  children: [
696
- /* @__PURE__ */ C("span", { children: [
696
+ /* @__PURE__ */ b("span", { children: [
697
697
  "Entries",
698
698
  " ",
699
- /* @__PURE__ */ S("span", {
699
+ /* @__PURE__ */ y("span", {
700
700
  className: "font-semibold tabular-nums text-text-primary",
701
701
  children: i
702
702
  })
703
703
  ] }),
704
- /* @__PURE__ */ C("span", { children: [
704
+ /* @__PURE__ */ b("span", { children: [
705
705
  "Exits",
706
706
  " ",
707
- /* @__PURE__ */ S("span", {
707
+ /* @__PURE__ */ y("span", {
708
708
  className: "font-semibold tabular-nums text-text-primary",
709
- children: a
709
+ children: ee
710
710
  })
711
711
  ] }),
712
- o ? /* @__PURE__ */ C("span", {
713
- className: "ml-auto",
712
+ a ? /* @__PURE__ */ b("span", {
713
+ className: "ms-auto",
714
714
  children: [
715
715
  "Last",
716
716
  " ",
717
- /* @__PURE__ */ S("span", {
717
+ /* @__PURE__ */ y("span", {
718
718
  className: "text-text-primary",
719
- children: ee(o)
719
+ children: te(a)
720
720
  })
721
721
  ]
722
- }) : /* @__PURE__ */ S("span", {
723
- className: "ml-auto text-text-muted",
722
+ }) : /* @__PURE__ */ y("span", {
723
+ className: "ms-auto text-text-muted",
724
724
  children: "No events yet"
725
725
  })
726
726
  ]
727
727
  }),
728
- /* @__PURE__ */ C("div", {
728
+ /* @__PURE__ */ b("div", {
729
729
  className: "mt-3 flex items-center gap-2 border-t border-border-seam pt-2.5",
730
- children: [/* @__PURE__ */ C("button", {
730
+ children: [/* @__PURE__ */ b("button", {
731
731
  type: "button",
732
- onClick: () => Re(e),
732
+ onClick: () => Be(e),
733
733
  className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
734
- children: [/* @__PURE__ */ S(de, { className: "h-3 w-3" }), "Edit"]
735
- }), /* @__PURE__ */ C("button", {
734
+ children: [/* @__PURE__ */ y(me, { className: "h-3 w-3" }), "Edit"]
735
+ }), /* @__PURE__ */ b("button", {
736
736
  type: "button",
737
- onClick: () => q(e),
737
+ onClick: () => G(e),
738
738
  className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2 py-1 text-xs font-medium text-status-error-text hover:bg-status-error-bg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
739
- children: [/* @__PURE__ */ S(ge, { className: "h-3 w-3" }), "Delete"]
739
+ children: [/* @__PURE__ */ y(ye, { className: "h-3 w-3" }), "Delete"]
740
740
  })]
741
741
  })
742
742
  ]
743
743
  }, e.id);
744
744
  })
745
745
  }),
746
- Oe && /* @__PURE__ */ S("div", {
746
+ je && /* @__PURE__ */ y("div", {
747
747
  className: "mt-3 flex justify-center",
748
- children: /* @__PURE__ */ S("button", {
748
+ children: /* @__PURE__ */ y("button", {
749
749
  type: "button",
750
- onClick: () => void We(),
751
- disabled: Ee,
750
+ onClick: () => void Ke(),
751
+ disabled: ke,
752
752
  className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50",
753
- children: Ee ? "Loading..." : "Load more"
753
+ children: ke ? "Loading..." : "Load more"
754
754
  })
755
755
  })
756
756
  ]
757
- }), /* @__PURE__ */ S(w, {
757
+ }), /* @__PURE__ */ y(x, {
758
758
  treatment: "insight",
759
759
  className: "p-4",
760
- children: /* @__PURE__ */ C("div", {
760
+ children: /* @__PURE__ */ b("div", {
761
761
  className: "flex items-start gap-3",
762
- children: [/* @__PURE__ */ S("span", {
762
+ children: [/* @__PURE__ */ y("span", {
763
763
  className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
764
- children: /* @__PURE__ */ S(he, { className: "h-4 w-4" })
765
- }), /* @__PURE__ */ C("div", {
764
+ children: /* @__PURE__ */ y(ve, { className: "h-4 w-4" })
765
+ }), /* @__PURE__ */ b("div", {
766
766
  className: "min-w-0",
767
- children: [/* @__PURE__ */ S("p", {
767
+ children: [/* @__PURE__ */ y("p", {
768
768
  className: "text-xs font-semibold text-text-primary",
769
769
  children: "Privacy first"
770
- }), /* @__PURE__ */ S("p", {
770
+ }), /* @__PURE__ */ y("p", {
771
771
  className: "mt-0.5 text-xs text-text-secondary",
772
772
  children: "Location data is encrypted. Activity is tracked only when entering or leaving defined geofences."
773
773
  })]
@@ -776,23 +776,23 @@ function j() {
776
776
  })]
777
777
  })]
778
778
  }),
779
- Z.length > 0 && /* @__PURE__ */ C("div", {
779
+ Y.length > 0 && /* @__PURE__ */ b("div", {
780
780
  className: "mt-6 grid grid-cols-1 gap-4 lg:grid-cols-2",
781
- children: [/* @__PURE__ */ S(i, {
781
+ children: [/* @__PURE__ */ y(i, {
782
782
  title: "Trigger configuration",
783
783
  description: "How your zones fire",
784
- children: /* @__PURE__ */ S(o, {
785
- data: Ie,
784
+ children: /* @__PURE__ */ y(a, {
785
+ data: Re,
786
786
  centerLabel: "Zones",
787
- centerValue: Z.length,
787
+ centerValue: Y.length,
788
788
  ariaLabel: "Geofence trigger configuration mix",
789
789
  emptyLabel: "No zones to summarize yet"
790
790
  })
791
- }), /* @__PURE__ */ S(i, {
791
+ }), /* @__PURE__ */ y(i, {
792
792
  title: "Activity by zone",
793
793
  description: "Recorded enter/exit events per zone",
794
- children: /* @__PURE__ */ S(a, {
795
- data: Le,
794
+ children: /* @__PURE__ */ y(ee, {
795
+ data: ze,
796
796
  xKey: "zone",
797
797
  orientation: "horizontal",
798
798
  series: [{
@@ -805,31 +805,31 @@ function j() {
805
805
  })
806
806
  })]
807
807
  }),
808
- /* @__PURE__ */ S(r, {
809
- open: K !== null,
810
- onClose: () => q(null),
808
+ /* @__PURE__ */ y(r, {
809
+ open: W !== null,
810
+ onClose: () => G(null),
811
811
  title: "Delete Geofence",
812
812
  description: "This action cannot be undone.",
813
- footer: /* @__PURE__ */ C(_e, { children: [/* @__PURE__ */ S("button", {
813
+ footer: /* @__PURE__ */ b(be, { children: [/* @__PURE__ */ y("button", {
814
814
  type: "button",
815
- onClick: () => q(null),
815
+ onClick: () => G(null),
816
816
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken/50",
817
817
  children: "Cancel"
818
- }), /* @__PURE__ */ S("button", {
818
+ }), /* @__PURE__ */ y("button", {
819
819
  type: "button",
820
- onClick: () => void Ve(),
821
- disabled: F,
820
+ onClick: () => void Ue(),
821
+ disabled: N,
822
822
  className: "rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/80 disabled:opacity-50",
823
- children: F ? "Deleting..." : "Delete"
823
+ children: N ? "Deleting..." : "Delete"
824
824
  })] }),
825
- children: /* @__PURE__ */ C("p", {
825
+ children: /* @__PURE__ */ b("p", {
826
826
  className: "text-sm text-text-secondary",
827
827
  children: [
828
828
  "Are you sure you want to delete",
829
829
  " ",
830
- /* @__PURE__ */ S("span", {
830
+ /* @__PURE__ */ y("span", {
831
831
  className: "font-medium text-text-primary",
832
- children: K?.name
832
+ children: W?.name
833
833
  }),
834
834
  "? Any automatic tracking tied to this zone will stop."
835
835
  ]
@@ -838,6 +838,6 @@ function j() {
838
838
  ]
839
839
  });
840
840
  }
841
- export { j as GeofencingPage };
841
+ export { O as GeofencingPage };
842
842
 
843
843
  //# sourceMappingURL=GeofencingPage.js.map