@burdenoff/microfe-mybodyshield 2026.821.2 → 2026.830.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 (90) hide show
  1. package/dist/mybodyshield/MyBodyShieldRoot.d.ts.map +1 -1
  2. package/dist/mybodyshield/MyBodyShieldRoot.js +54 -56
  3. package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
  4. package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
  5. package/dist/mybodyshield/MyBodyShieldRoutes.js +121 -62
  6. package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
  7. package/dist/mybodyshield/components/EvidenceUpload.d.ts.map +1 -1
  8. package/dist/mybodyshield/components/EvidenceUpload.js +46 -45
  9. package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -1
  10. package/dist/mybodyshield/components/FileLink.d.ts.map +1 -1
  11. package/dist/mybodyshield/components/FileLink.js +27 -18
  12. package/dist/mybodyshield/components/FileLink.js.map +1 -1
  13. package/dist/mybodyshield/components/MybDiscussion.d.ts +1 -1
  14. package/dist/mybodyshield/components/MybDiscussion.d.ts.map +1 -1
  15. package/dist/mybodyshield/components/MybDiscussion.js +59 -58
  16. package/dist/mybodyshield/components/MybDiscussion.js.map +1 -1
  17. package/dist/mybodyshield/components/MybTags.d.ts +1 -1
  18. package/dist/mybodyshield/components/MybTags.d.ts.map +1 -1
  19. package/dist/mybodyshield/components/MybTags.js +83 -74
  20. package/dist/mybodyshield/components/MybTags.js.map +1 -1
  21. package/dist/mybodyshield/components/PageDisabled.d.ts.map +1 -1
  22. package/dist/mybodyshield/components/PageDisabled.js +16 -11
  23. package/dist/mybodyshield/components/PageDisabled.js.map +1 -1
  24. package/dist/mybodyshield/components/Pagination.d.ts.map +1 -1
  25. package/dist/mybodyshield/components/Pagination.js +36 -27
  26. package/dist/mybodyshield/components/Pagination.js.map +1 -1
  27. package/dist/mybodyshield/components/StateViews.d.ts.map +1 -1
  28. package/dist/mybodyshield/components/StateViews.js +42 -34
  29. package/dist/mybodyshield/components/StateViews.js.map +1 -1
  30. package/dist/mybodyshield/components/UserSearchSelect.d.ts.map +1 -1
  31. package/dist/mybodyshield/components/UserSearchSelect.js +66 -68
  32. package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -1
  33. package/dist/mybodyshield/hooks/index.d.ts +1 -0
  34. package/dist/mybodyshield/hooks/index.d.ts.map +1 -1
  35. package/dist/mybodyshield/hooks/index.js +1 -0
  36. package/dist/mybodyshield/hooks/useTr.d.ts +5 -0
  37. package/dist/mybodyshield/hooks/useTr.d.ts.map +1 -0
  38. package/dist/mybodyshield/hooks/useTr.js +12 -0
  39. package/dist/mybodyshield/hooks/useTr.js.map +1 -0
  40. package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -1
  41. package/dist/mybodyshield/pages/DashboardPage.js +157 -136
  42. package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
  43. package/dist/mybodyshield/pages/SettingsPage.d.ts.map +1 -1
  44. package/dist/mybodyshield/pages/SettingsPage.js +50 -59
  45. package/dist/mybodyshield/pages/SettingsPage.js.map +1 -1
  46. package/dist/mybodyshield/pages/_shared/visuals.d.ts +2 -1
  47. package/dist/mybodyshield/pages/_shared/visuals.d.ts.map +1 -1
  48. package/dist/mybodyshield/pages/_shared/visuals.js +91 -81
  49. package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
  50. package/dist/mybodyshield/pages/ai/AiControlsPage.d.ts.map +1 -1
  51. package/dist/mybodyshield/pages/ai/AiControlsPage.js +279 -231
  52. package/dist/mybodyshield/pages/ai/AiControlsPage.js.map +1 -1
  53. package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts.map +1 -1
  54. package/dist/mybodyshield/pages/coaching/CoachingPage.js +349 -258
  55. package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
  56. package/dist/mybodyshield/pages/goals/GoalsPage.d.ts.map +1 -1
  57. package/dist/mybodyshield/pages/goals/GoalsPage.js +247 -251
  58. package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
  59. package/dist/mybodyshield/pages/insights/InsightsCharts.d.ts.map +1 -1
  60. package/dist/mybodyshield/pages/insights/InsightsCharts.js +216 -213
  61. package/dist/mybodyshield/pages/insights/InsightsCharts.js.map +1 -1
  62. package/dist/mybodyshield/pages/insights/InsightsPage.d.ts.map +1 -1
  63. package/dist/mybodyshield/pages/insights/InsightsPage.js +327 -220
  64. package/dist/mybodyshield/pages/insights/InsightsPage.js.map +1 -1
  65. package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -1
  66. package/dist/mybodyshield/pages/nutrition/NutritionPage.js +575 -529
  67. package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
  68. package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts.map +1 -1
  69. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +333 -275
  70. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
  71. package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -1
  72. package/dist/mybodyshield/pages/programs/ProgramsPage.js +258 -253
  73. package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
  74. package/dist/mybodyshield/pages/progress/ProgressPage.d.ts.map +1 -1
  75. package/dist/mybodyshield/pages/progress/ProgressPage.js +271 -254
  76. package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
  77. package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts.map +1 -1
  78. package/dist/mybodyshield/pages/recovery/RecoveryPage.js +206 -200
  79. package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
  80. package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
  81. package/dist/mybodyshield/pages/train/SessionDetailPage.js +327 -294
  82. package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
  83. package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -1
  84. package/dist/mybodyshield/pages/train/SessionsPage.js +180 -163
  85. package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
  86. package/dist/mybodyshield/utils/i18n.d.ts +1 -2
  87. package/dist/mybodyshield/utils/i18n.d.ts.map +1 -1
  88. package/dist/mybodyshield/utils/i18n.js +15 -0
  89. package/dist/mybodyshield/utils/i18n.js.map +1 -0
  90. package/package.json +1 -1
@@ -1,35 +1,36 @@
1
1
  import { useMyBodyShield as e } from "../../context/MyBodyShieldContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatDate as n, formatDuration as r, formatEnumLabel as i, formatMinutes as a, formatNumber as o, formatWeight as s } from "../../utils/formatters.js";
4
- import { StatusBadge as ee } from "../../components/StatusBadge.js";
5
- import { EmptyState as te } from "../../components/EmptyState.js";
6
- import { ErrorView as ne, LoadingView as re, Section as ie } from "../../components/StateViews.js";
3
+ import { formatDate as n, formatDuration as r, formatEnumLabel as i, formatMinutes as ee, formatNumber as a, formatWeight as o } from "../../utils/formatters.js";
4
+ import { StatusBadge as te } from "../../components/StatusBadge.js";
5
+ import { EmptyState as s } from "../../components/EmptyState.js";
7
6
  import "../../context/index.js";
8
- import { useMybAddExercise as ae, useMybAddWorkout as oe, useMybArchiveProgram as se, useMybProgram as ce, useMybTransitionProgram as le, useMybUpdateProgram as ue } from "../../hooks/useMyBodyShieldApi.js";
9
- import { useMyBodyShieldAnalytics as de } from "../../hooks/useMyBodyShieldAnalytics.js";
7
+ import { useMybAddExercise as ne, useMybAddWorkout as re, useMybArchiveProgram as ie, useMybProgram as ae, useMybTransitionProgram as oe, useMybUpdateProgram as se } from "../../hooks/useMyBodyShieldApi.js";
8
+ import { useMyBodyShieldAnalytics as ce } from "../../hooks/useMyBodyShieldAnalytics.js";
9
+ import { useTr as c } from "../../hooks/useTr.js";
10
10
  import "../../hooks/index.js";
11
+ import { ErrorView as le, LoadingView as ue, Section as de } from "../../components/StateViews.js";
11
12
  import { EvidenceUpload as fe } from "../../components/EvidenceUpload.js";
12
- import { FileLink as c } from "../../components/FileLink.js";
13
+ import { FileLink as l } from "../../components/FileLink.js";
13
14
  import { MybDiscussion as pe } from "../../components/MybDiscussion.js";
14
15
  import { MybTags as me } from "../../components/MybTags.js";
15
16
  import "../../components/index.js";
16
- import { motion as l } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
17
+ import { motion as u } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
17
18
  import { useReducedMotion as he } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
18
- import { GOAL_TYPE_META as ge, IconChip as _e, MUSCLE_META as u, WORKOUT_TYPE_META as d } from "../_shared/visuals.js";
19
- import { useMemo as ve, useState as f } from "react";
20
- import { Archive as ye, ArrowLeft as be, CalendarDays as p, CheckCircle2 as xe, Clock as m, Dumbbell as Se, Flame as Ce, Lock as we, Pencil as Te, Play as Ee, Plus as h } from "lucide-react";
21
- import { useParams as De } from "react-router";
22
- import { Fragment as Oe, jsx as g, jsxs as _ } from "react/jsx-runtime";
23
- import { Button as v, GlassCard as ke, Input as y, Label as b, ResponsiveDialog as x, ResponsiveDialogContent as S, ResponsiveDialogDescription as C, ResponsiveDialogFooter as w, ResponsiveDialogHeader as T, ResponsiveDialogTitle as E, Select as Ae, SelectContent as D, SelectItem as O, SelectTrigger as k, SelectValue as A, Textarea as je } from "@burdenoff/fe-libs/ui";
19
+ import { GOAL_TYPE_META as ge, IconChip as _e, MUSCLE_META as d, WORKOUT_TYPE_META as f } from "../_shared/visuals.js";
20
+ import { useMemo as ve, useState as p } from "react";
21
+ import { Archive as ye, ArrowLeft as be, CalendarDays as xe, CheckCircle2 as Se, Clock as m, Dumbbell as Ce, Flame as we, Lock as Te, Pencil as Ee, Play as De, Plus as h } from "lucide-react";
22
+ import { useParams as Oe } from "react-router";
23
+ import { Fragment as ke, jsx as g, jsxs as _ } from "react/jsx-runtime";
24
+ import { Button as v, GlassCard as Ae, Input as y, Label as b, ResponsiveDialog as x, ResponsiveDialogContent as S, ResponsiveDialogDescription as C, ResponsiveDialogFooter as w, ResponsiveDialogHeader as T, ResponsiveDialogTitle as E, Select as je, SelectContent as Me, SelectItem as D, SelectTrigger as O, SelectValue as k, Textarea as Ne } from "@burdenoff/fe-libs/ui";
24
25
  //#region src/mybodyshield/pages/programs/ProgramDetailPage.tsx
25
- var Me = [
26
+ var Pe = [
26
27
  "STRENGTH",
27
28
  "CARDIO",
28
29
  "HIIT",
29
30
  "MOBILITY",
30
31
  "YOGA",
31
32
  "RECOVERY"
32
- ], Ne = [
33
+ ], Fe = [
33
34
  "CHEST",
34
35
  "BACK",
35
36
  "LEGS",
@@ -37,20 +38,20 @@ var Me = [
37
38
  "ARMS",
38
39
  "CORE",
39
40
  "FULL_BODY"
40
- ], j = (e) => {
41
+ ], A = (e) => {
41
42
  let t = e.trim();
42
43
  if (t === "") return null;
43
44
  let n = Number(t);
44
45
  return Number.isFinite(n) ? n : null;
45
- }, Pe = [
46
+ }, Ie = [
46
47
  .16,
47
48
  1,
48
49
  .3,
49
50
  1
50
- ], Fe = {
51
+ ], Le = {
51
52
  hidden: {},
52
53
  show: { transition: { staggerChildren: .06 } }
53
- }, Ie = {
54
+ }, Re = {
54
55
  hidden: {
55
56
  opacity: 0,
56
57
  y: 12
@@ -60,15 +61,15 @@ var Me = [
60
61
  y: 0,
61
62
  transition: {
62
63
  duration: .35,
63
- ease: Pe
64
+ ease: Ie
64
65
  }
65
66
  }
66
- }, M = ({ children: e, icon: t, tint: n }) => /* @__PURE__ */ _("span", {
67
+ }, j = ({ children: e, icon: t, tint: n }) => /* @__PURE__ */ _("span", {
67
68
  className: "inline-flex items-center gap-1.5 rounded-full bg-bg-sunken px-2.5 py-1 text-xs font-medium text-text-secondary",
68
69
  style: n ? { color: n } : void 0,
69
70
  children: [t, e]
70
- }), N = ({ group: e }) => {
71
- let t = u[e].tint;
71
+ }), M = ({ group: e }) => {
72
+ let t = d[e].tint;
72
73
  return /* @__PURE__ */ g("span", {
73
74
  className: "inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
74
75
  style: {
@@ -78,26 +79,26 @@ var Me = [
78
79
  children: i(e)
79
80
  });
80
81
  };
81
- function P({ id: e, value: t, onChange: n, options: r }) {
82
- return /* @__PURE__ */ _(Ae, {
82
+ function N({ id: e, value: t, onChange: n, options: r }) {
83
+ return /* @__PURE__ */ _(je, {
83
84
  value: t,
84
85
  onValueChange: (e) => n(e),
85
- children: [/* @__PURE__ */ g(k, {
86
+ children: [/* @__PURE__ */ g(O, {
86
87
  id: e,
87
- children: /* @__PURE__ */ g(A, {})
88
- }), /* @__PURE__ */ g(D, { children: r.map((e) => /* @__PURE__ */ g(O, {
88
+ children: /* @__PURE__ */ g(k, {})
89
+ }), /* @__PURE__ */ g(Me, { children: r.map((e) => /* @__PURE__ */ g(D, {
89
90
  value: e,
90
91
  children: i(e)
91
92
  }, e)) })]
92
93
  });
93
94
  }
94
- var Le = {
95
+ var ze = {
95
96
  name: "",
96
97
  type: "STRENGTH",
97
98
  weekNumber: "1",
98
99
  dayOfWeek: "1",
99
100
  durationMin: ""
100
- }, Re = {
101
+ }, Be = {
101
102
  name: "",
102
103
  muscleGroup: "FULL_BODY",
103
104
  sets: "",
@@ -105,24 +106,24 @@ var Le = {
105
106
  targetWeight: "",
106
107
  restSeconds: "",
107
108
  instructions: ""
108
- }, ze = [
109
+ }, Ve = [
109
110
  "WEIGHT_LOSS",
110
111
  "MUSCLE_GAIN",
111
112
  "STRENGTH",
112
113
  "ENDURANCE",
113
114
  "MOBILITY",
114
115
  "GENERAL_FITNESS"
115
- ], Be = [
116
+ ], He = [
116
117
  "BEGINNER",
117
118
  "INTERMEDIATE",
118
119
  "ADVANCED",
119
120
  "ELITE"
120
- ], Ve = [
121
+ ], Ue = [
121
122
  "BUILD",
122
123
  "PEAK",
123
124
  "DELOAD",
124
125
  "MAINTENANCE"
125
- ], He = {
126
+ ], We = {
126
127
  name: "",
127
128
  description: "",
128
129
  goalType: "GENERAL_FITNESS",
@@ -132,16 +133,16 @@ var Le = {
132
133
  daysPerWeek: "",
133
134
  startDate: "",
134
135
  endDate: ""
135
- }, Ue = (e) => {
136
+ }, P = (e) => {
136
137
  if (!e) return "";
137
138
  let t = new Date(e);
138
139
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
139
140
  };
140
141
  function F({ exercise: e }) {
141
- let t = u[e.muscleGroup].tint;
142
+ let t = c(), n = d[e.muscleGroup].tint;
142
143
  return /* @__PURE__ */ _("div", {
143
144
  className: "flex flex-col gap-2 rounded-lg border-l-2 py-3 pl-3 pr-1 transition-colors hover:bg-bg-sunken/40 sm:flex-row sm:items-start sm:justify-between",
144
- style: { borderColor: `color-mix(in srgb, ${t} 55%, transparent)` },
145
+ style: { borderColor: `color-mix(in srgb, ${n} 55%, transparent)` },
145
146
  children: [/* @__PURE__ */ _("div", {
146
147
  className: "min-w-0",
147
148
  children: [
@@ -150,7 +151,7 @@ function F({ exercise: e }) {
150
151
  children: [/* @__PURE__ */ g("p", {
151
152
  className: "font-medium text-text-primary",
152
153
  children: e.name
153
- }), /* @__PURE__ */ g(N, { group: e.muscleGroup })]
154
+ }), /* @__PURE__ */ g(M, { group: e.muscleGroup })]
154
155
  }),
155
156
  e.instructions && /* @__PURE__ */ g("p", {
156
157
  className: "mt-1 text-xs text-text-tertiary",
@@ -158,28 +159,32 @@ function F({ exercise: e }) {
158
159
  }),
159
160
  e.demo?.id && /* @__PURE__ */ g("div", {
160
161
  className: "mt-1.5",
161
- children: /* @__PURE__ */ g(c, { fileId: e.demo.id })
162
+ children: /* @__PURE__ */ g(l, { fileId: e.demo.id })
162
163
  })
163
164
  ]
164
165
  }), /* @__PURE__ */ _("div", {
165
166
  className: "flex shrink-0 items-center gap-4 text-sm tabular-nums text-text-secondary",
166
167
  children: [/* @__PURE__ */ _("span", { children: [
167
- o(e.sets),
168
+ a(e.sets),
168
169
  "×",
169
- o(e.reps),
170
+ a(e.reps),
170
171
  " @",
171
172
  " ",
172
- s(e.targetWeight)
173
+ o(e.targetWeight)
173
174
  ] }), /* @__PURE__ */ _("span", {
174
175
  className: "text-text-tertiary",
175
- children: ["Rest ", r(e.restSeconds)]
176
+ children: [
177
+ t("mybodyshield.pages.programDetail.rest", "Rest"),
178
+ " ",
179
+ r(e.restSeconds)
180
+ ]
176
181
  })]
177
182
  })]
178
183
  });
179
184
  }
180
- function We({ workout: e, canEdit: t, onAddExercise: n }) {
181
- let r = d[e.type], i = r.icon, s = ve(() => [...e.exercises ?? []].sort((e, t) => e.orderIndex - t.orderIndex), [e.exercises]);
182
- return /* @__PURE__ */ _(ke, {
185
+ function Ge({ workout: e, canEdit: t, onAddExercise: n }) {
186
+ let r = c(), i = f[e.type], o = i.icon, s = ve(() => [...e.exercises ?? []].sort((e, t) => e.orderIndex - t.orderIndex), [e.exercises]);
187
+ return /* @__PURE__ */ _(Ae, {
183
188
  treatment: "glass",
184
189
  className: "h-full p-5 transition-shadow hover:shadow-float",
185
190
  children: [/* @__PURE__ */ _("div", {
@@ -187,8 +192,8 @@ function We({ workout: e, canEdit: t, onAddExercise: n }) {
187
192
  children: [/* @__PURE__ */ _("div", {
188
193
  className: "flex min-w-0 items-start gap-3",
189
194
  children: [/* @__PURE__ */ g(_e, {
190
- icon: /* @__PURE__ */ g(i, { className: "h-4 w-4" }),
191
- tint: r.tint
195
+ icon: /* @__PURE__ */ g(o, { className: "h-4 w-4" }),
196
+ tint: i.tint
192
197
  }), /* @__PURE__ */ _("div", {
193
198
  className: "min-w-0",
194
199
  children: [/* @__PURE__ */ _("div", {
@@ -196,17 +201,21 @@ function We({ workout: e, canEdit: t, onAddExercise: n }) {
196
201
  children: [/* @__PURE__ */ g("h3", {
197
202
  className: "font-semibold text-text-primary",
198
203
  children: e.name
199
- }), /* @__PURE__ */ g(ee, { status: e.type })]
204
+ }), /* @__PURE__ */ g(te, { status: e.type })]
200
205
  }), /* @__PURE__ */ _("div", {
201
206
  className: "mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-text-tertiary",
202
207
  children: [/* @__PURE__ */ _("span", { children: [
203
- "Week ",
204
- o(e.weekNumber),
205
- " · Day ",
206
- o(e.dayOfWeek)
208
+ r("mybodyshield.pages.programDetail.week", "Week"),
209
+ " ",
210
+ a(e.weekNumber),
211
+ " ·",
212
+ " ",
213
+ r("mybodyshield.pages.programDetail.day", "Day"),
214
+ " ",
215
+ a(e.dayOfWeek)
207
216
  ] }), /* @__PURE__ */ _("span", {
208
217
  className: "inline-flex items-center gap-1",
209
- children: [/* @__PURE__ */ g(m, { className: "h-3.5 w-3.5" }), a(e.durationMin)]
218
+ children: [/* @__PURE__ */ g(m, { className: "h-3.5 w-3.5" }), ee(e.durationMin)]
210
219
  })]
211
220
  })]
212
221
  })]
@@ -214,11 +223,15 @@ function We({ workout: e, canEdit: t, onAddExercise: n }) {
214
223
  variant: "outline",
215
224
  size: "sm",
216
225
  onClick: () => n(e.id),
217
- children: [/* @__PURE__ */ g(h, { className: "mr-1 h-4 w-4" }), " Add exercise"]
226
+ children: [
227
+ /* @__PURE__ */ g(h, { className: "mr-1 h-4 w-4" }),
228
+ " ",
229
+ r("mybodyshield.pages.programDetail.addExercise", "Add exercise")
230
+ ]
218
231
  })]
219
232
  }), s.length === 0 ? /* @__PURE__ */ g("p", {
220
233
  className: "mt-4 rounded-lg border border-dashed border-border-seam px-3 py-4 text-center text-sm text-text-tertiary",
221
- children: "No exercises yet — add the first movement to this workout."
234
+ children: r("mybodyshield.pages.programDetail.noExercises", "No exercises yet — add the first movement to this workout.")
222
235
  }) : /* @__PURE__ */ g("div", {
223
236
  className: "mt-4 divide-y divide-border-seam/60",
224
237
  children: s.map((e) => /* @__PURE__ */ g(F, { exercise: e }, e.id))
@@ -226,50 +239,54 @@ function We({ workout: e, canEdit: t, onAddExercise: n }) {
226
239
  });
227
240
  }
228
241
  function I() {
229
- let { id: r } = De(), { navigateTo: a, workspaceId: s } = e(), c = he(), u = de(), { data: d, isLoading: m, isError: Ae, refetch: D } = ce(r), O = le(), k = se(), A = ue(), N = oe(), F = ae(), [I, L] = f(null), [Ge, R] = f(!1), [z, B] = f(Le), [Ke, V] = f(null), [H, U] = f(null), [W, G] = f(Re), [qe, Je] = f(null), [Ye, K] = f(null), [Xe, q] = f(!1), [J, Y] = f(He), [Ze, X] = f(null), Qe = ve(() => [...d?.workouts ?? []].sort((e, t) => e.weekNumber - t.weekNumber || e.dayOfWeek - t.dayOfWeek || e.orderIndex - t.orderIndex), [d?.workouts]);
230
- if (m) return /* @__PURE__ */ g(t, {
231
- title: "Program",
232
- children: /* @__PURE__ */ g(re, { label: "Loading program…" })
242
+ let r = c(), { id: ee } = Oe(), { navigateTo: o, workspaceId: l } = e(), d = he(), f = ce(), { data: m, isLoading: je, isError: Me, refetch: D } = ae(ee), O = oe(), k = ie(), M = se(), F = re(), I = ne(), [Ke, L] = p(null), [qe, R] = p(!1), [z, B] = p(ze), [Je, V] = p(null), [H, U] = p(null), [W, G] = p(Be), [Ye, Xe] = p(null), [Ze, K] = p(null), [Qe, q] = p(!1), [J, Y] = p(We), [$e, X] = p(null), et = ve(() => [...m?.workouts ?? []].sort((e, t) => e.weekNumber - t.weekNumber || e.dayOfWeek - t.dayOfWeek || e.orderIndex - t.orderIndex), [m?.workouts]);
243
+ if (je) return /* @__PURE__ */ g(t, {
244
+ title: r("mybodyshield.pages.programDetail.title", "Program"),
245
+ children: /* @__PURE__ */ g(ue, { label: r("mybodyshield.pages.programDetail.loading", "Loading program…") })
233
246
  });
234
- if (Ae) return /* @__PURE__ */ g(t, {
235
- title: "Program",
236
- children: /* @__PURE__ */ g(ne, {
237
- message: "We couldn't load this program.",
247
+ if (Me) return /* @__PURE__ */ g(t, {
248
+ title: r("mybodyshield.pages.programDetail.title", "Program"),
249
+ children: /* @__PURE__ */ g(le, {
250
+ message: r("mybodyshield.pages.programDetail.error", "We couldn't load this program."),
238
251
  onRetry: () => void D()
239
252
  })
240
253
  });
241
- if (!d) return /* @__PURE__ */ g(t, {
242
- title: "Program",
243
- children: /* @__PURE__ */ g(te, {
254
+ if (!m) return /* @__PURE__ */ g(t, {
255
+ title: r("mybodyshield.pages.programDetail.title", "Program"),
256
+ children: /* @__PURE__ */ g(s, {
244
257
  illustration: "empty-data",
245
- icon: /* @__PURE__ */ g(Se, { className: "h-10 w-10" }),
246
- title: "Program not found",
247
- description: "This program may have been deleted or you don't have access to it.",
258
+ icon: /* @__PURE__ */ g(Ce, { className: "h-10 w-10" }),
259
+ title: r("mybodyshield.pages.programDetail.notFound", "Program not found"),
260
+ description: r("mybodyshield.pages.programDetail.notFoundDescription", "This program may have been deleted or you don't have access to it."),
248
261
  action: /* @__PURE__ */ _(v, {
249
262
  variant: "outline",
250
- onClick: () => a("programs"),
251
- children: [/* @__PURE__ */ g(be, { className: "mr-1 h-4 w-4" }), " Back to programs"]
263
+ onClick: () => o("programs"),
264
+ children: [
265
+ /* @__PURE__ */ g(be, { className: "mr-1 h-4 w-4" }),
266
+ " ",
267
+ r("mybodyshield.pages.programDetail.backToPrograms", "Back to programs")
268
+ ]
252
269
  })
253
270
  })
254
271
  });
255
- let Z = d.id, Q = d.status === "DRAFT" || d.status === "ACTIVE", $e = d.status === "ACTIVE", $ = ge[d.goalType], et = $.icon, tt = () => {
272
+ let Z = m.id, Q = m.status === "DRAFT" || m.status === "ACTIVE", tt = m.status === "ACTIVE", $ = ge[m.goalType], nt = $.icon, rt = () => {
256
273
  Y({
257
- name: d.name,
258
- description: d.description ?? "",
259
- goalType: d.goalType,
260
- level: d.level,
261
- phase: d.phase,
262
- weeks: d.weeks ? String(d.weeks) : "",
263
- daysPerWeek: d.daysPerWeek ? String(d.daysPerWeek) : "",
264
- startDate: Ue(d.startDate),
265
- endDate: Ue(d.endDate)
266
- }), X(null), q(!0), u.emitIntent("program", "update", {
267
- workspaceId: s,
274
+ name: m.name,
275
+ description: m.description ?? "",
276
+ goalType: m.goalType,
277
+ level: m.level,
278
+ phase: m.phase,
279
+ weeks: m.weeks ? String(m.weeks) : "",
280
+ daysPerWeek: m.daysPerWeek ? String(m.daysPerWeek) : "",
281
+ startDate: P(m.startDate),
282
+ endDate: P(m.endDate)
283
+ }), X(null), q(!0), f.emitIntent("program", "update", {
284
+ workspaceId: l,
268
285
  entityId: Z
269
286
  });
270
- }, nt = async () => {
287
+ }, it = async () => {
271
288
  if (!J.name.trim()) {
272
- X("Program name is required.");
289
+ X(r("mybodyshield.pages.programs.programNameRequired", "Program name is required."));
273
290
  return;
274
291
  }
275
292
  let e = {
@@ -278,150 +295,178 @@ function I() {
278
295
  goalType: J.goalType,
279
296
  level: J.level,
280
297
  phase: J.phase,
281
- weeks: j(J.weeks),
282
- daysPerWeek: j(J.daysPerWeek),
298
+ weeks: A(J.weeks),
299
+ daysPerWeek: A(J.daysPerWeek),
283
300
  startDate: J.startDate ? new Date(J.startDate).toISOString() : null,
284
301
  endDate: J.endDate ? new Date(J.endDate).toISOString() : null
285
302
  };
286
303
  X(null);
287
304
  try {
288
- await A.mutateAsync({
305
+ await M.mutateAsync({
289
306
  id: Z,
290
307
  input: e
291
- }), u.emitFact("program", "updated", {
292
- workspaceId: s,
308
+ }), f.emitFact("program", "updated", {
309
+ workspaceId: l,
293
310
  entityId: Z
294
311
  }), q(!1);
295
312
  } catch (e) {
296
- X(e instanceof Error ? e.message : "Failed to update program.");
313
+ X(e instanceof Error ? e.message : r("mybodyshield.pages.programDetail.failedToUpdate", "Failed to update program."));
297
314
  }
298
- }, rt = async (e) => {
315
+ }, at = async (e) => {
299
316
  L(null);
300
317
  try {
301
318
  await O.mutateAsync({
302
319
  id: Z,
303
320
  status: e
304
- }), u.emitFact("program", "status_changed", {
305
- workspaceId: s,
321
+ }), f.emitFact("program", "status_changed", {
322
+ workspaceId: l,
306
323
  entityId: Z
307
324
  });
308
325
  } catch (e) {
309
- L(e instanceof Error ? e.message : "Failed to update program status.");
326
+ L(e instanceof Error ? e.message : r("mybodyshield.pages.programDetail.failedToUpdateStatus", "Failed to update program status."));
310
327
  }
311
- }, it = async () => {
312
- if (window.confirm("Archive this program? It will be moved out of your active library.")) {
328
+ }, ot = async () => {
329
+ if (window.confirm(r("mybodyshield.pages.programDetail.archiveConfirm", "Archive this program? It will be moved out of your active library."))) {
313
330
  L(null);
314
331
  try {
315
- await k.mutateAsync(Z), u.emitFact("program", "archived", {
316
- workspaceId: s,
332
+ await k.mutateAsync(Z), f.emitFact("program", "archived", {
333
+ workspaceId: l,
317
334
  entityId: Z
318
335
  }), await D();
319
336
  } catch (e) {
320
- L(e instanceof Error ? e.message : "Failed to archive program.");
337
+ L(e instanceof Error ? e.message : r("mybodyshield.pages.programDetail.failedToArchive", "Failed to archive program."));
321
338
  }
322
339
  }
323
- }, at = () => {
324
- B(Le), V(null), R(!0), u.emitIntent("workout", "create", {
325
- workspaceId: s,
340
+ }, st = () => {
341
+ B(ze), V(null), R(!0), f.emitIntent("workout", "create", {
342
+ workspaceId: l,
326
343
  entityId: Z
327
344
  });
328
- }, ot = async () => {
345
+ }, ct = async () => {
329
346
  if (!z.name.trim()) {
330
- V("Workout name is required.");
347
+ V(r("mybodyshield.pages.programDetail.workoutNameRequired", "Workout name is required."));
331
348
  return;
332
349
  }
333
350
  let e = {
334
351
  programId: Z,
335
352
  name: z.name.trim(),
336
353
  type: z.type,
337
- weekNumber: j(z.weekNumber),
338
- dayOfWeek: j(z.dayOfWeek),
339
- durationMin: j(z.durationMin)
354
+ weekNumber: A(z.weekNumber),
355
+ dayOfWeek: A(z.dayOfWeek),
356
+ durationMin: A(z.durationMin)
340
357
  };
341
358
  try {
342
- let t = await N.mutateAsync(e);
343
- u.emitFact("workout", "created", {
344
- workspaceId: s,
359
+ let t = await F.mutateAsync(e);
360
+ f.emitFact("workout", "created", {
361
+ workspaceId: l,
345
362
  entityId: t.id
346
363
  }), R(!1);
347
364
  } catch (e) {
348
- V(e instanceof Error ? e.message : "Failed to add workout.");
365
+ V(e instanceof Error ? e.message : r("mybodyshield.pages.programDetail.failedToAddWorkout", "Failed to add workout."));
349
366
  }
350
- }, st = (e) => {
351
- G(Re), Je(null), K(null), U(e), u.emitIntent("exercise", "create", {
352
- workspaceId: s,
367
+ }, lt = (e) => {
368
+ G(Be), Xe(null), K(null), U(e), f.emitIntent("exercise", "create", {
369
+ workspaceId: l,
353
370
  entityId: e
354
371
  });
355
- }, ct = async () => {
372
+ }, ut = async () => {
356
373
  if (!H) return;
357
374
  if (!W.name.trim()) {
358
- K("Exercise name is required.");
375
+ K(r("mybodyshield.pages.programDetail.exerciseNameRequired", "Exercise name is required."));
359
376
  return;
360
377
  }
361
378
  let e = {
362
379
  workoutId: H,
363
380
  name: W.name.trim(),
364
381
  muscleGroup: W.muscleGroup,
365
- sets: j(W.sets),
366
- reps: j(W.reps),
367
- targetWeight: j(W.targetWeight),
368
- restSeconds: j(W.restSeconds),
382
+ sets: A(W.sets),
383
+ reps: A(W.reps),
384
+ targetWeight: A(W.targetWeight),
385
+ restSeconds: A(W.restSeconds),
369
386
  instructions: W.instructions.trim() || null,
370
- demoFileId: qe?.fileId ?? null
387
+ demoFileId: Ye?.fileId ?? null
371
388
  };
372
389
  try {
373
- let t = await F.mutateAsync(e);
374
- u.emitFact("exercise", "created", {
375
- workspaceId: s,
390
+ let t = await I.mutateAsync(e);
391
+ f.emitFact("exercise", "created", {
392
+ workspaceId: l,
376
393
  entityId: t.id
377
394
  }), U(null);
378
395
  } catch (e) {
379
- K(e instanceof Error ? e.message : "Failed to add exercise.");
396
+ K(e instanceof Error ? e.message : r("mybodyshield.pages.programDetail.failedToAddExercise", "Failed to add exercise."));
380
397
  }
381
398
  };
382
399
  return /* @__PURE__ */ _(t, {
383
- title: d.name,
384
- actions: /* @__PURE__ */ _(Oe, { children: [
385
- d.status === "DRAFT" && /* @__PURE__ */ _(v, {
386
- onClick: () => void rt("ACTIVE"),
400
+ title: m.name,
401
+ actions: /* @__PURE__ */ _(ke, { children: [
402
+ m.status === "DRAFT" && /* @__PURE__ */ _(v, {
403
+ onClick: () => void at("ACTIVE"),
387
404
  disabled: O.isPending,
388
- children: [/* @__PURE__ */ g(Ee, { className: "mr-1 h-4 w-4" }), " Activate"]
405
+ children: [
406
+ /* @__PURE__ */ g(De, { className: "mr-1 h-4 w-4" }),
407
+ " ",
408
+ r("mybodyshield.pages.programDetail.activate", "Activate")
409
+ ]
389
410
  }),
390
- d.status === "ACTIVE" && /* @__PURE__ */ _(Oe, { children: [/* @__PURE__ */ _(v, {
391
- onClick: () => void rt("COMPLETED"),
411
+ m.status === "ACTIVE" && /* @__PURE__ */ _(ke, { children: [/* @__PURE__ */ _(v, {
412
+ onClick: () => void at("COMPLETED"),
392
413
  disabled: O.isPending,
393
- children: [/* @__PURE__ */ g(xe, { className: "mr-1 h-4 w-4" }), " Complete"]
414
+ children: [
415
+ /* @__PURE__ */ g(Se, { className: "mr-1 h-4 w-4" }),
416
+ " ",
417
+ r("mybodyshield.pages.programDetail.complete", "Complete")
418
+ ]
394
419
  }), /* @__PURE__ */ _(v, {
395
420
  variant: "outline",
396
- onClick: () => a("train"),
397
- children: [/* @__PURE__ */ g(Ce, { className: "mr-1 h-4 w-4" }), " Start a session"]
421
+ onClick: () => o("train"),
422
+ children: [
423
+ /* @__PURE__ */ g(we, { className: "mr-1 h-4 w-4" }),
424
+ " ",
425
+ r("mybodyshield.pages.programDetail.startSession", "Start a session")
426
+ ]
398
427
  })] }),
399
- d.status !== "ARCHIVED" && /* @__PURE__ */ _(v, {
428
+ m.status !== "ARCHIVED" && /* @__PURE__ */ _(v, {
400
429
  variant: "outline",
401
- onClick: tt,
402
- disabled: A.isPending,
403
- children: [/* @__PURE__ */ g(Te, { className: "mr-1 h-4 w-4" }), " Edit"]
430
+ onClick: rt,
431
+ disabled: M.isPending,
432
+ children: [
433
+ /* @__PURE__ */ g(Ee, { className: "mr-1 h-4 w-4" }),
434
+ " ",
435
+ r("mybodyshield.common.edit", "Edit")
436
+ ]
404
437
  }),
405
- d.status !== "ARCHIVED" && /* @__PURE__ */ _(v, {
438
+ m.status !== "ARCHIVED" && /* @__PURE__ */ _(v, {
406
439
  variant: "outline",
407
- onClick: () => void it(),
440
+ onClick: () => void ot(),
408
441
  disabled: k.isPending,
409
- children: [/* @__PURE__ */ g(ye, { className: "mr-1 h-4 w-4" }), " Archive"]
442
+ children: [
443
+ /* @__PURE__ */ g(ye, { className: "mr-1 h-4 w-4" }),
444
+ " ",
445
+ r("mybodyshield.pages.programDetail.archive", "Archive")
446
+ ]
410
447
  }),
411
448
  Q && /* @__PURE__ */ _(v, {
412
- onClick: at,
413
- children: [/* @__PURE__ */ g(h, { className: "mr-1 h-4 w-4" }), " Add workout"]
449
+ onClick: st,
450
+ children: [
451
+ /* @__PURE__ */ g(h, { className: "mr-1 h-4 w-4" }),
452
+ " ",
453
+ r("mybodyshield.pages.programDetail.addWorkout", "Add workout")
454
+ ]
414
455
  })
415
456
  ] }),
416
457
  children: [
417
458
  /* @__PURE__ */ _("button", {
418
459
  type: "button",
419
- onClick: () => a("programs"),
460
+ onClick: () => o("programs"),
420
461
  className: "mb-4 inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",
421
- children: [/* @__PURE__ */ g(be, { className: "h-4 w-4" }), " All programs"]
462
+ children: [
463
+ /* @__PURE__ */ g(be, { className: "h-4 w-4" }),
464
+ " ",
465
+ r("mybodyshield.pages.programDetail.allPrograms", "All programs")
466
+ ]
422
467
  }),
423
- /* @__PURE__ */ g(l.div, {
424
- initial: c ? !1 : {
468
+ /* @__PURE__ */ g(u.div, {
469
+ initial: d ? !1 : {
425
470
  opacity: 0,
426
471
  y: 10
427
472
  },
@@ -429,13 +474,13 @@ function I() {
429
474
  opacity: 1,
430
475
  y: 0
431
476
  },
432
- transition: c ? { duration: 0 } : {
477
+ transition: d ? { duration: 0 } : {
433
478
  duration: .35,
434
- ease: Pe
479
+ ease: Ie
435
480
  },
436
- children: /* @__PURE__ */ _(ke, {
481
+ children: /* @__PURE__ */ _(Ae, {
437
482
  treatment: "glass",
438
- glow: $e,
483
+ glow: tt,
439
484
  className: "p-6",
440
485
  children: [
441
486
  /* @__PURE__ */ g("div", {
@@ -447,34 +492,48 @@ function I() {
447
492
  className: "flex flex-wrap items-center gap-2",
448
493
  children: [
449
494
  /* @__PURE__ */ g(_e, {
450
- icon: /* @__PURE__ */ g(et, { className: "h-5 w-5" }),
495
+ icon: /* @__PURE__ */ g(nt, { className: "h-5 w-5" }),
451
496
  tint: $.tint,
452
497
  className: "size-10"
453
498
  }),
454
499
  /* @__PURE__ */ g("h2", {
455
500
  className: "text-xl font-semibold text-text-primary",
456
- children: d.name
501
+ children: m.name
457
502
  }),
458
- /* @__PURE__ */ g(ee, { status: d.status })
503
+ /* @__PURE__ */ g(te, { status: m.status })
459
504
  ]
460
505
  }),
461
506
  /* @__PURE__ */ _("div", {
462
507
  className: "mt-3 flex flex-wrap gap-1.5",
463
508
  children: [
464
- /* @__PURE__ */ _(M, { children: ["Phase · ", i(d.phase)] }),
465
- /* @__PURE__ */ _(M, { children: ["Level · ", i(d.level)] }),
466
- /* @__PURE__ */ g(M, {
467
- icon: /* @__PURE__ */ g(et, { className: "h-3.5 w-3.5" }),
509
+ /* @__PURE__ */ _(j, { children: [
510
+ r("mybodyshield.pages.programDetail.phase", "Phase"),
511
+ " ·",
512
+ " ",
513
+ i(m.phase)
514
+ ] }),
515
+ /* @__PURE__ */ _(j, { children: [
516
+ r("mybodyshield.pages.programDetail.level", "Level"),
517
+ " ·",
518
+ " ",
519
+ i(m.level)
520
+ ] }),
521
+ /* @__PURE__ */ g(j, {
522
+ icon: /* @__PURE__ */ g(nt, { className: "h-3.5 w-3.5" }),
468
523
  tint: $.tint,
469
- children: i(d.goalType)
524
+ children: i(m.goalType)
470
525
  }),
471
- /* @__PURE__ */ _(M, {
472
- icon: /* @__PURE__ */ g(p, { className: "h-3.5 w-3.5" }),
526
+ /* @__PURE__ */ _(j, {
527
+ icon: /* @__PURE__ */ g(xe, { className: "h-3.5 w-3.5" }),
473
528
  children: [
474
- o(d.weeks),
475
- " wk × ",
476
- o(d.daysPerWeek),
477
- " days"
529
+ a(m.weeks),
530
+ " ",
531
+ r(m.weeks === 1 ? "mybodyshield.pages.programDetail.weekSingular" : "mybodyshield.pages.programDetail.weeks", m.weeks === 1 ? "wk" : "wks"),
532
+ " ",
533
+ "× ",
534
+ a(m.daysPerWeek),
535
+ " ",
536
+ r(m.daysPerWeek === 1 ? "mybodyshield.pages.programDetail.daySingular" : "mybodyshield.pages.programDetail.days", m.daysPerWeek === 1 ? "day" : "days")
478
537
  ]
479
538
  })
480
539
  ]
@@ -482,22 +541,22 @@ function I() {
482
541
  /* @__PURE__ */ _("p", {
483
542
  className: "mt-3 inline-flex items-center gap-1.5 text-sm text-text-secondary",
484
543
  children: [
485
- /* @__PURE__ */ g(p, { className: "h-4 w-4 text-text-tertiary" }),
486
- n(d.startDate),
544
+ /* @__PURE__ */ g(xe, { className: "h-4 w-4 text-text-tertiary" }),
545
+ n(m.startDate),
487
546
  " – ",
488
- n(d.endDate)
547
+ n(m.endDate)
489
548
  ]
490
549
  }),
491
- (d.tags ?? []).length > 0 && /* @__PURE__ */ g("div", {
550
+ (m.tags ?? []).length > 0 && /* @__PURE__ */ g("div", {
492
551
  className: "mt-3 flex flex-wrap gap-1.5",
493
- children: (d.tags ?? []).map((e) => /* @__PURE__ */ _("span", {
552
+ children: (m.tags ?? []).map((e) => /* @__PURE__ */ g("span", {
494
553
  className: "inline-flex items-center rounded-full bg-[var(--color-accent-soft)] px-2 py-0.5 text-xs font-medium text-text-secondary",
495
- children: ["#", e]
554
+ children: r("mybodyshield.common.tagPrefix", "#{{tag}}", { tag: e })
496
555
  }, e))
497
556
  }),
498
- d.description && /* @__PURE__ */ g("p", {
557
+ m.description && /* @__PURE__ */ g("p", {
499
558
  className: "mt-3 max-w-2xl text-sm text-text-secondary",
500
- children: d.description
559
+ children: m.description
501
560
  })
502
561
  ]
503
562
  })
@@ -506,78 +565,77 @@ function I() {
506
565
  className: "mt-5 border-t border-border-seam pt-4",
507
566
  children: /* @__PURE__ */ g(me, {
508
567
  entityType: "mybodyshield-program",
509
- entityId: d.id,
510
- label: "Platform tags"
568
+ entityId: m.id,
569
+ label: r("mybodyshield.pages.programDetail.platformTags", "Platform tags")
511
570
  })
512
571
  }),
513
- I && /* @__PURE__ */ g("p", {
572
+ Ke && /* @__PURE__ */ g("p", {
514
573
  className: "mt-4 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
515
- children: I
574
+ children: Ke
516
575
  })
517
576
  ]
518
577
  })
519
578
  }),
520
- /* @__PURE__ */ _(ie, {
521
- title: "Workouts",
522
- description: "Sessions in this block, ordered by week, day & sequence.",
579
+ /* @__PURE__ */ _(de, {
580
+ title: r("mybodyshield.pages.programDetail.workouts", "Workouts"),
581
+ description: r("mybodyshield.pages.programDetail.workoutsDescription", "Sessions in this block, ordered by week, day & sequence."),
523
582
  children: [!Q && /* @__PURE__ */ _("p", {
524
583
  className: "mb-4 inline-flex items-center gap-1.5 rounded-lg border border-border-seam bg-bg-sunken/60 px-3 py-2 text-xs text-text-tertiary",
525
- children: [
526
- /* @__PURE__ */ g(we, { className: "h-3.5 w-3.5 shrink-0" }),
527
- "This program is ",
528
- i(d.status).toLowerCase(),
529
- " — its structure is locked and can no longer be edited."
530
- ]
531
- }), Qe.length === 0 ? /* @__PURE__ */ g(te, {
584
+ children: [/* @__PURE__ */ g(Te, { className: "h-3.5 w-3.5 shrink-0" }), r("mybodyshield.pages.programDetail.lockedDescription", "This program is {{status}} — its structure is locked and can no longer be edited.", { status: i(m.status).toLowerCase() })]
585
+ }), et.length === 0 ? /* @__PURE__ */ g(s, {
532
586
  illustration: "empty-data",
533
- icon: /* @__PURE__ */ g(Se, { className: "h-10 w-10" }),
534
- title: "No workouts yet",
535
- description: Q ? "Add workouts to lay out the training week, then attach exercises to each one." : "This program has no workouts, and its structure is locked in its current status.",
587
+ icon: /* @__PURE__ */ g(Ce, { className: "h-10 w-10" }),
588
+ title: r("mybodyshield.pages.programDetail.noWorkouts", "No workouts yet"),
589
+ description: Q ? r("mybodyshield.pages.programDetail.noWorkoutsDescription", "Add workouts to lay out the training week, then attach exercises to each one.") : r("mybodyshield.pages.programDetail.noWorkoutsLocked", "This program has no workouts, and its structure is locked in its current status."),
536
590
  action: Q ? /* @__PURE__ */ _(v, {
537
- onClick: at,
538
- children: [/* @__PURE__ */ g(h, { className: "mr-1 h-4 w-4" }), " Add workout"]
591
+ onClick: st,
592
+ children: [
593
+ /* @__PURE__ */ g(h, { className: "mr-1 h-4 w-4" }),
594
+ " ",
595
+ r("mybodyshield.pages.programDetail.addWorkout", "Add workout")
596
+ ]
539
597
  }) : void 0
540
- }) : /* @__PURE__ */ g(l.div, {
598
+ }) : /* @__PURE__ */ g(u.div, {
541
599
  className: "grid grid-cols-1 gap-4 xl:grid-cols-2",
542
- variants: c ? void 0 : Fe,
543
- initial: c ? !1 : "hidden",
600
+ variants: d ? void 0 : Le,
601
+ initial: d ? !1 : "hidden",
544
602
  animate: "show",
545
- children: Qe.map((e) => /* @__PURE__ */ g(l.div, {
603
+ children: et.map((e) => /* @__PURE__ */ g(u.div, {
546
604
  className: "h-full",
547
- variants: c ? void 0 : Ie,
548
- children: /* @__PURE__ */ g(We, {
605
+ variants: d ? void 0 : Re,
606
+ children: /* @__PURE__ */ g(Ge, {
549
607
  workout: e,
550
608
  canEdit: Q,
551
- onAddExercise: st
609
+ onAddExercise: lt
552
610
  })
553
611
  }, e.id))
554
612
  })]
555
613
  }),
556
614
  /* @__PURE__ */ g(pe, {
557
615
  entityType: "mybodyshield-program",
558
- entityId: d.id,
559
- title: "Program notes",
560
- description: "Coach and member notes for this training block."
616
+ entityId: m.id,
617
+ title: r("mybodyshield.pages.programDetail.programNotes", "Program notes"),
618
+ description: r("mybodyshield.pages.programDetail.programNotesDescription", "Coach and member notes for this training block.")
561
619
  }),
562
620
  /* @__PURE__ */ g(x, {
563
- open: Ge,
621
+ open: qe,
564
622
  onOpenChange: R,
565
623
  children: /* @__PURE__ */ _(S, {
566
624
  className: "sm:max-w-lg",
567
625
  children: [
568
- /* @__PURE__ */ _(T, { children: [/* @__PURE__ */ g(E, { children: "Add workout" }), /* @__PURE__ */ g(C, { children: "Add a training session to this program. Attach exercises once it's created." })] }),
626
+ /* @__PURE__ */ _(T, { children: [/* @__PURE__ */ g(E, { children: r("mybodyshield.pages.programDetail.addWorkoutDialogTitle", "Add workout") }), /* @__PURE__ */ g(C, { children: r("mybodyshield.pages.programDetail.addWorkoutDialogDescription", "Add a training session to this program. Attach exercises once it's created.") })] }),
569
627
  /* @__PURE__ */ _("div", {
570
628
  className: "space-y-4 py-2",
571
629
  children: [
572
- Ke && /* @__PURE__ */ g("p", {
630
+ Je && /* @__PURE__ */ g("p", {
573
631
  className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
574
- children: Ke
632
+ children: Je
575
633
  }),
576
634
  /* @__PURE__ */ _("div", {
577
635
  className: "space-y-1.5",
578
636
  children: [/* @__PURE__ */ g(b, {
579
637
  htmlFor: "myb-wk-name",
580
- children: "Name"
638
+ children: r("mybodyshield.common.name", "Name")
581
639
  }), /* @__PURE__ */ g(y, {
582
640
  id: "myb-wk-name",
583
641
  value: z.name,
@@ -585,22 +643,22 @@ function I() {
585
643
  ...z,
586
644
  name: e.target.value
587
645
  }),
588
- placeholder: "e.g. Upper Body — Push"
646
+ placeholder: r("mybodyshield.pages.programDetail.workoutNamePlaceholder", "e.g. Upper Body — Push")
589
647
  })]
590
648
  }),
591
649
  /* @__PURE__ */ _("div", {
592
650
  className: "space-y-1.5",
593
651
  children: [/* @__PURE__ */ g(b, {
594
652
  htmlFor: "myb-wk-type",
595
- children: "Type"
596
- }), /* @__PURE__ */ g(P, {
653
+ children: r("mybodyshield.common.type", "Type")
654
+ }), /* @__PURE__ */ g(N, {
597
655
  id: "myb-wk-type",
598
656
  value: z.type,
599
657
  onChange: (e) => B({
600
658
  ...z,
601
659
  type: e
602
660
  }),
603
- options: Me
661
+ options: Pe
604
662
  })]
605
663
  }),
606
664
  /* @__PURE__ */ _("div", {
@@ -610,7 +668,7 @@ function I() {
610
668
  className: "space-y-1.5",
611
669
  children: [/* @__PURE__ */ g(b, {
612
670
  htmlFor: "myb-wk-week",
613
- children: "Week"
671
+ children: r("mybodyshield.pages.programDetail.week", "Week")
614
672
  }), /* @__PURE__ */ g(y, {
615
673
  id: "myb-wk-week",
616
674
  type: "number",
@@ -627,7 +685,7 @@ function I() {
627
685
  className: "space-y-1.5",
628
686
  children: [/* @__PURE__ */ g(b, {
629
687
  htmlFor: "myb-wk-day",
630
- children: "Day"
688
+ children: r("mybodyshield.pages.programDetail.day", "Day")
631
689
  }), /* @__PURE__ */ g(y, {
632
690
  id: "myb-wk-day",
633
691
  type: "number",
@@ -645,7 +703,7 @@ function I() {
645
703
  className: "space-y-1.5",
646
704
  children: [/* @__PURE__ */ g(b, {
647
705
  htmlFor: "myb-wk-dur",
648
- children: "Duration (min)"
706
+ children: r("mybodyshield.pages.programDetail.durationMin", "Duration (min)")
649
707
  }), /* @__PURE__ */ g(y, {
650
708
  id: "myb-wk-dur",
651
709
  type: "number",
@@ -665,12 +723,12 @@ function I() {
665
723
  /* @__PURE__ */ _(w, { children: [/* @__PURE__ */ g(v, {
666
724
  variant: "outline",
667
725
  onClick: () => R(!1),
668
- disabled: N.isPending,
669
- children: "Cancel"
726
+ disabled: F.isPending,
727
+ children: r("mybodyshield.common.cancel", "Cancel")
670
728
  }), /* @__PURE__ */ g(v, {
671
- onClick: () => void ot(),
672
- disabled: N.isPending,
673
- children: N.isPending ? "Adding…" : "Add workout"
729
+ onClick: () => void ct(),
730
+ disabled: F.isPending,
731
+ children: F.isPending ? r("mybodyshield.common.add", "Add") + "…" : r("mybodyshield.pages.programDetail.addWorkout", "Add workout")
674
732
  })] })
675
733
  ]
676
734
  })
@@ -683,19 +741,19 @@ function I() {
683
741
  children: /* @__PURE__ */ _(S, {
684
742
  className: "sm:max-w-lg",
685
743
  children: [
686
- /* @__PURE__ */ _(T, { children: [/* @__PURE__ */ g(E, { children: "Add exercise" }), /* @__PURE__ */ g(C, { children: "Add a movement with its target sets, reps, load & rest." })] }),
744
+ /* @__PURE__ */ _(T, { children: [/* @__PURE__ */ g(E, { children: r("mybodyshield.pages.programDetail.addExerciseDialogTitle", "Add exercise") }), /* @__PURE__ */ g(C, { children: r("mybodyshield.pages.programDetail.addExerciseDialogDescription", "Add a movement with its target sets, reps, load & rest.") })] }),
687
745
  /* @__PURE__ */ _("div", {
688
746
  className: "space-y-4 py-2",
689
747
  children: [
690
- Ye && /* @__PURE__ */ g("p", {
748
+ Ze && /* @__PURE__ */ g("p", {
691
749
  className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
692
- children: Ye
750
+ children: Ze
693
751
  }),
694
752
  /* @__PURE__ */ _("div", {
695
753
  className: "space-y-1.5",
696
754
  children: [/* @__PURE__ */ g(b, {
697
755
  htmlFor: "myb-ex-name",
698
- children: "Name"
756
+ children: r("mybodyshield.common.name", "Name")
699
757
  }), /* @__PURE__ */ g(y, {
700
758
  id: "myb-ex-name",
701
759
  value: W.name,
@@ -703,22 +761,22 @@ function I() {
703
761
  ...W,
704
762
  name: e.target.value
705
763
  }),
706
- placeholder: "e.g. Barbell Bench Press"
764
+ placeholder: r("mybodyshield.pages.programDetail.exerciseNamePlaceholder", "e.g. Barbell Bench Press")
707
765
  })]
708
766
  }),
709
767
  /* @__PURE__ */ _("div", {
710
768
  className: "space-y-1.5",
711
769
  children: [/* @__PURE__ */ g(b, {
712
770
  htmlFor: "myb-ex-muscle",
713
- children: "Muscle group"
714
- }), /* @__PURE__ */ g(P, {
771
+ children: r("mybodyshield.pages.programDetail.muscleGroup", "Muscle group")
772
+ }), /* @__PURE__ */ g(N, {
715
773
  id: "myb-ex-muscle",
716
774
  value: W.muscleGroup,
717
775
  onChange: (e) => G({
718
776
  ...W,
719
777
  muscleGroup: e
720
778
  }),
721
- options: Ne
779
+ options: Fe
722
780
  })]
723
781
  }),
724
782
  /* @__PURE__ */ _("div", {
@@ -728,7 +786,7 @@ function I() {
728
786
  className: "space-y-1.5",
729
787
  children: [/* @__PURE__ */ g(b, {
730
788
  htmlFor: "myb-ex-sets",
731
- children: "Sets"
789
+ children: r("mybodyshield.pages.programDetail.sets", "Sets")
732
790
  }), /* @__PURE__ */ g(y, {
733
791
  id: "myb-ex-sets",
734
792
  type: "number",
@@ -745,7 +803,7 @@ function I() {
745
803
  className: "space-y-1.5",
746
804
  children: [/* @__PURE__ */ g(b, {
747
805
  htmlFor: "myb-ex-reps",
748
- children: "Reps"
806
+ children: r("mybodyshield.pages.programDetail.reps", "Reps")
749
807
  }), /* @__PURE__ */ g(y, {
750
808
  id: "myb-ex-reps",
751
809
  type: "number",
@@ -762,7 +820,7 @@ function I() {
762
820
  className: "space-y-1.5",
763
821
  children: [/* @__PURE__ */ g(b, {
764
822
  htmlFor: "myb-ex-weight",
765
- children: "Weight (kg)"
823
+ children: r("mybodyshield.pages.programDetail.weightKg", "Weight (kg)")
766
824
  }), /* @__PURE__ */ g(y, {
767
825
  id: "myb-ex-weight",
768
826
  type: "number",
@@ -780,7 +838,7 @@ function I() {
780
838
  className: "space-y-1.5",
781
839
  children: [/* @__PURE__ */ g(b, {
782
840
  htmlFor: "myb-ex-rest",
783
- children: "Rest (sec)"
841
+ children: r("mybodyshield.pages.programDetail.restSec", "Rest (sec)")
784
842
  }), /* @__PURE__ */ g(y, {
785
843
  id: "myb-ex-rest",
786
844
  type: "number",
@@ -799,8 +857,8 @@ function I() {
799
857
  className: "space-y-1.5",
800
858
  children: [/* @__PURE__ */ g(b, {
801
859
  htmlFor: "myb-ex-instructions",
802
- children: "Instructions"
803
- }), /* @__PURE__ */ g(je, {
860
+ children: r("mybodyshield.common.instructions", "Instructions")
861
+ }), /* @__PURE__ */ g(Ne, {
804
862
  id: "myb-ex-instructions",
805
863
  rows: 3,
806
864
  value: W.instructions,
@@ -808,52 +866,52 @@ function I() {
808
866
  ...W,
809
867
  instructions: e.target.value
810
868
  }),
811
- placeholder: "Cues, tempo, form notes…"
869
+ placeholder: r("mybodyshield.pages.programDetail.instructionsPlaceholder", "Cues, tempo, form notes…")
812
870
  })]
813
871
  }),
814
872
  /* @__PURE__ */ g(fe, {
815
873
  id: "myb-ex-demo",
816
- label: "Demo media (optional)",
817
- value: qe,
818
- onChange: Je,
874
+ label: r("mybodyshield.pages.programDetail.demoMedia", "Demo media (optional)"),
875
+ value: Ye,
876
+ onChange: Xe,
819
877
  accept: "video/*,image/*",
820
- disabled: F.isPending,
821
- hint: "Attach a short demo clip or image to show how the movement is performed."
878
+ disabled: I.isPending,
879
+ hint: r("mybodyshield.pages.programDetail.demoMediaHint", "Attach a short demo clip or image to show how the movement is performed.")
822
880
  })
823
881
  ]
824
882
  }),
825
883
  /* @__PURE__ */ _(w, { children: [/* @__PURE__ */ g(v, {
826
884
  variant: "outline",
827
885
  onClick: () => U(null),
828
- disabled: F.isPending,
829
- children: "Cancel"
886
+ disabled: I.isPending,
887
+ children: r("mybodyshield.common.cancel", "Cancel")
830
888
  }), /* @__PURE__ */ g(v, {
831
- onClick: () => void ct(),
832
- disabled: F.isPending,
833
- children: F.isPending ? "Adding…" : "Add exercise"
889
+ onClick: () => void ut(),
890
+ disabled: I.isPending,
891
+ children: I.isPending ? r("mybodyshield.common.add", "Add") + "…" : r("mybodyshield.pages.programDetail.addExercise", "Add exercise")
834
892
  })] })
835
893
  ]
836
894
  })
837
895
  }),
838
896
  /* @__PURE__ */ g(x, {
839
- open: Xe,
897
+ open: Qe,
840
898
  onOpenChange: q,
841
899
  children: /* @__PURE__ */ _(S, {
842
900
  className: "sm:max-w-lg",
843
901
  children: [
844
- /* @__PURE__ */ _(T, { children: [/* @__PURE__ */ g(E, { children: "Edit program" }), /* @__PURE__ */ g(C, { children: "Update this program's plan, goal & schedule. Workouts stay untouched." })] }),
902
+ /* @__PURE__ */ _(T, { children: [/* @__PURE__ */ g(E, { children: r("mybodyshield.pages.programDetail.editProgram", "Edit program") }), /* @__PURE__ */ g(C, { children: r("mybodyshield.pages.programDetail.editProgramDialogDescription", "Update this program's plan, goal & schedule. Workouts stay untouched.") })] }),
845
903
  /* @__PURE__ */ _("div", {
846
904
  className: "space-y-4 py-2",
847
905
  children: [
848
- Ze && /* @__PURE__ */ g("p", {
906
+ $e && /* @__PURE__ */ g("p", {
849
907
  className: "rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
850
- children: Ze
908
+ children: $e
851
909
  }),
852
910
  /* @__PURE__ */ _("div", {
853
911
  className: "space-y-1.5",
854
912
  children: [/* @__PURE__ */ g(b, {
855
913
  htmlFor: "myb-edit-name",
856
- children: "Name"
914
+ children: r("mybodyshield.common.name", "Name")
857
915
  }), /* @__PURE__ */ g(y, {
858
916
  id: "myb-edit-name",
859
917
  value: J.name,
@@ -861,15 +919,15 @@ function I() {
861
919
  ...J,
862
920
  name: e.target.value
863
921
  }),
864
- placeholder: "e.g. Hypertrophy Block A"
922
+ placeholder: r("mybodyshield.pages.programs.programNamePlaceholder", "e.g. Hypertrophy Block A")
865
923
  })]
866
924
  }),
867
925
  /* @__PURE__ */ _("div", {
868
926
  className: "space-y-1.5",
869
927
  children: [/* @__PURE__ */ g(b, {
870
928
  htmlFor: "myb-edit-desc",
871
- children: "Description"
872
- }), /* @__PURE__ */ g(je, {
929
+ children: r("mybodyshield.common.description", "Description")
930
+ }), /* @__PURE__ */ g(Ne, {
873
931
  id: "myb-edit-desc",
874
932
  rows: 3,
875
933
  value: J.description,
@@ -877,7 +935,7 @@ function I() {
877
935
  ...J,
878
936
  description: e.target.value
879
937
  }),
880
- placeholder: "Focus, progression scheme, notes…"
938
+ placeholder: r("mybodyshield.pages.programs.descriptionPlaceholder", "Focus, progression scheme, notes…")
881
939
  })]
882
940
  }),
883
941
  /* @__PURE__ */ _("div", {
@@ -887,45 +945,45 @@ function I() {
887
945
  className: "space-y-1.5",
888
946
  children: [/* @__PURE__ */ g(b, {
889
947
  htmlFor: "myb-edit-goal",
890
- children: "Goal type"
891
- }), /* @__PURE__ */ g(P, {
948
+ children: r("mybodyshield.pages.programs.goalType", "Goal type")
949
+ }), /* @__PURE__ */ g(N, {
892
950
  id: "myb-edit-goal",
893
951
  value: J.goalType,
894
952
  onChange: (e) => Y({
895
953
  ...J,
896
954
  goalType: e
897
955
  }),
898
- options: ze
956
+ options: Ve
899
957
  })]
900
958
  }),
901
959
  /* @__PURE__ */ _("div", {
902
960
  className: "space-y-1.5",
903
961
  children: [/* @__PURE__ */ g(b, {
904
962
  htmlFor: "myb-edit-level",
905
- children: "Level"
906
- }), /* @__PURE__ */ g(P, {
963
+ children: r("mybodyshield.common.level", "Level")
964
+ }), /* @__PURE__ */ g(N, {
907
965
  id: "myb-edit-level",
908
966
  value: J.level,
909
967
  onChange: (e) => Y({
910
968
  ...J,
911
969
  level: e
912
970
  }),
913
- options: Be
971
+ options: He
914
972
  })]
915
973
  }),
916
974
  /* @__PURE__ */ _("div", {
917
975
  className: "space-y-1.5",
918
976
  children: [/* @__PURE__ */ g(b, {
919
977
  htmlFor: "myb-edit-phase",
920
- children: "Phase"
921
- }), /* @__PURE__ */ g(P, {
978
+ children: r("mybodyshield.common.phase", "Phase")
979
+ }), /* @__PURE__ */ g(N, {
922
980
  id: "myb-edit-phase",
923
981
  value: J.phase,
924
982
  onChange: (e) => Y({
925
983
  ...J,
926
984
  phase: e
927
985
  }),
928
- options: Ve
986
+ options: Ue
929
987
  })]
930
988
  })
931
989
  ]
@@ -936,7 +994,7 @@ function I() {
936
994
  className: "space-y-1.5",
937
995
  children: [/* @__PURE__ */ g(b, {
938
996
  htmlFor: "myb-edit-weeks",
939
- children: "Weeks"
997
+ children: r("mybodyshield.pages.programs.weeks", "Weeks")
940
998
  }), /* @__PURE__ */ g(y, {
941
999
  id: "myb-edit-weeks",
942
1000
  type: "number",
@@ -952,7 +1010,7 @@ function I() {
952
1010
  className: "space-y-1.5",
953
1011
  children: [/* @__PURE__ */ g(b, {
954
1012
  htmlFor: "myb-edit-days",
955
- children: "Days / week"
1013
+ children: r("mybodyshield.pages.programs.daysPerWeek", "Days / week")
956
1014
  }), /* @__PURE__ */ g(y, {
957
1015
  id: "myb-edit-days",
958
1016
  type: "number",
@@ -973,7 +1031,7 @@ function I() {
973
1031
  className: "space-y-1.5",
974
1032
  children: [/* @__PURE__ */ g(b, {
975
1033
  htmlFor: "myb-edit-start",
976
- children: "Start date"
1034
+ children: r("mybodyshield.pages.programs.startDate", "Start date")
977
1035
  }), /* @__PURE__ */ g(y, {
978
1036
  id: "myb-edit-start",
979
1037
  type: "date",
@@ -987,7 +1045,7 @@ function I() {
987
1045
  className: "space-y-1.5",
988
1046
  children: [/* @__PURE__ */ g(b, {
989
1047
  htmlFor: "myb-edit-end",
990
- children: "End date"
1048
+ children: r("mybodyshield.pages.programDetail.endDate", "End date")
991
1049
  }), /* @__PURE__ */ g(y, {
992
1050
  id: "myb-edit-end",
993
1051
  type: "date",
@@ -1004,12 +1062,12 @@ function I() {
1004
1062
  /* @__PURE__ */ _(w, { children: [/* @__PURE__ */ g(v, {
1005
1063
  variant: "outline",
1006
1064
  onClick: () => q(!1),
1007
- disabled: A.isPending,
1008
- children: "Cancel"
1065
+ disabled: M.isPending,
1066
+ children: r("mybodyshield.common.cancel", "Cancel")
1009
1067
  }), /* @__PURE__ */ g(v, {
1010
- onClick: () => void nt(),
1011
- disabled: A.isPending,
1012
- children: A.isPending ? "Saving…" : "Save changes"
1068
+ onClick: () => void it(),
1069
+ disabled: M.isPending,
1070
+ children: M.isPending ? r("mybodyshield.common.saving", "Saving…") : r("mybodyshield.common.save", "Save")
1013
1071
  })] })
1014
1072
  ]
1015
1073
  })