@burdenoff/microfe-tours 2026.918.1 → 2026.1004.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.
@@ -9,15 +9,15 @@ import { MarkdownEditor as ee } from "../components/MarkdownEditor.js";
9
9
  import { useTourBuilder as te } from "../hooks/useTourBuilder.js";
10
10
  import { useEffect as s, useMemo as c, useRef as ne, useState as l } from "react";
11
11
  import { PermissionGate as re } from "@burdenoff/fe-libs/shared/components";
12
- import { ArrowLeft as ie, BarChart3 as u, Calendar as d, Eye as f, LayoutTemplate as ae, ListOrdered as p, Save as oe, Sparkles as m } from "lucide-react";
13
- import { Fragment as se, jsx as h, jsxs as g } from "react/jsx-runtime";
14
- import { useNavigate as ce, useParams as le } from "react-router";
15
- import { Button as ue, CTAOverflowMenu as de, EmphasisPanel as fe, GlassCard as pe, NextSteps as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
16
- import { useGatewayClient as ge } from "@burdenoff/fe-libs/shared/graphql";
17
- import { useEventBus as _e } from "@burdenoff/fe-libs/shared/events";
18
- import { gql as _ } from "@apollo/client/core";
12
+ import { ArrowLeft as ie, BarChart3 as ae, Calendar as oe, Eye as se, LayoutTemplate as ce, ListOrdered as le, Save as ue, Sparkles as u } from "lucide-react";
13
+ import { Fragment as de, jsx as d, jsxs as f } from "react/jsx-runtime";
14
+ import { useNavigate as fe, useParams as pe } from "react-router";
15
+ import { Button as me, CTAOverflowMenu as he, EmphasisPanel as p, GlassCard as ge, NextSteps as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
16
+ import { useGatewayClient as ye } from "@burdenoff/fe-libs/shared/graphql";
17
+ import { useEventBus as be } from "@burdenoff/fe-libs/shared/events";
18
+ import { gql as m } from "@apollo/client/core";
19
19
  //#region src/tours/pages/TourBuilderPage.tsx
20
- var ve = 250, ye = _`
20
+ var xe = 250, Se = m`
21
21
  mutation SeedVibeControlsUserTours {
22
22
  seedVibeControlsUserTours {
23
23
  productId
@@ -34,7 +34,7 @@ var ve = 250, ye = _`
34
34
  }
35
35
  }
36
36
  }
37
- `, be = _`
37
+ `, Ce = m`
38
38
  mutation SeedBuildmyiqUserTours {
39
39
  seedBuildmyiqUserTours {
40
40
  productId
@@ -51,8 +51,25 @@ var ve = 250, ye = _`
51
51
  }
52
52
  }
53
53
  }
54
+ `, we = m`
55
+ mutation SeedBigconsoleUserTours {
56
+ seedBigconsoleUserTours {
57
+ productId
58
+ workspaceId
59
+ createdCount
60
+ updatedCount
61
+ totalCount
62
+ tours {
63
+ tourId
64
+ slug
65
+ name
66
+ action
67
+ stepCount
68
+ }
69
+ }
70
+ }
54
71
  `;
55
- function xe(e, t) {
72
+ function h(e, t) {
56
73
  if (!e || typeof e != "object") return null;
57
74
  let n = e, r = n.error;
58
75
  if (r instanceof Error) return r.message;
@@ -66,7 +83,56 @@ function xe(e, t) {
66
83
  }).filter((e) => !!e);
67
84
  return a.length > 0 ? a.join("; ") : t;
68
85
  }
69
- var v = [
86
+ var g = [
87
+ {
88
+ productId: "bigconsole",
89
+ moduleId: "bigconsole",
90
+ moduleLabel: "BigConsole",
91
+ pageId: "home",
92
+ pageLabel: "Overview",
93
+ path: "/bigconsole",
94
+ isModuleHome: !0
95
+ },
96
+ {
97
+ productId: "bigconsole",
98
+ moduleId: "bigconsole",
99
+ moduleLabel: "BigConsole",
100
+ pageId: "dashboards",
101
+ pageLabel: "Dashboards",
102
+ path: "/bigconsole/dashboards"
103
+ },
104
+ {
105
+ productId: "bigconsole",
106
+ moduleId: "bigconsole",
107
+ moduleLabel: "BigConsole",
108
+ pageId: "datasink-builder",
109
+ pageLabel: "Create data sink",
110
+ path: "/bigconsole/datasinks/new"
111
+ },
112
+ {
113
+ productId: "bigconsole",
114
+ moduleId: "bigconsole",
115
+ moduleLabel: "BigConsole",
116
+ pageId: "parser-builder",
117
+ pageLabel: "Create parser",
118
+ path: "/bigconsole/parsers/new"
119
+ },
120
+ {
121
+ productId: "bigconsole",
122
+ moduleId: "bigconsole",
123
+ moduleLabel: "BigConsole",
124
+ pageId: "workflows",
125
+ pageLabel: "Workflows",
126
+ path: "/bigconsole/workflows/list"
127
+ },
128
+ {
129
+ productId: "bigconsole",
130
+ moduleId: "bigconsole",
131
+ moduleLabel: "BigConsole",
132
+ pageId: "insights",
133
+ pageLabel: "AI Insights",
134
+ path: "/bigconsole/insights"
135
+ },
70
136
  {
71
137
  productId: "vibecontrols",
72
138
  moduleId: "dashboard",
@@ -663,39 +729,39 @@ var v = [
663
729
  path: "/collabkin/timeline"
664
730
  }
665
731
  ];
666
- function y(e) {
732
+ function _(e) {
667
733
  return e?.trim() || void 0;
668
734
  }
669
- function b(e) {
670
- let t = y(e);
671
- return t ? v.filter((e) => e.productId === t) : [];
735
+ function v(e) {
736
+ let t = _(e);
737
+ return t ? g.filter((e) => e.productId === t) : [];
672
738
  }
673
- function Se(e) {
739
+ function Te(e) {
674
740
  let t = /* @__PURE__ */ new Map();
675
- for (let n of b(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
741
+ for (let n of v(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
676
742
  moduleId: n.moduleId,
677
743
  label: n.moduleLabel,
678
744
  path: n.path
679
745
  });
680
746
  return [...t.values()];
681
747
  }
682
- function Ce(e, t) {
683
- let n = y(t);
684
- return n ? b(e).flatMap((e) => e.moduleId === n ? [{
748
+ function Ee(e, t) {
749
+ let n = _(t);
750
+ return n ? v(e).flatMap((e) => e.moduleId === n ? [{
685
751
  pageId: e.pageId,
686
752
  label: e.pageLabel,
687
753
  path: e.path
688
754
  }] : []) : [];
689
755
  }
690
- function x() {
691
- let { tr: _ } = e(), { tourId: v } = le(), y = ce(), b = t(), { basePath: x = "/" } = b, S = _e(), C = ge("global"), { hasPermission: w, isLoading: T } = i(), E = !v || v === "new", D = w(a.TOUR_CREATE), O = w(a.TOUR_UPDATE), we = w(a.TOUR_TEMPLATE_CREATE), k = E ? D : O, A = D && O, j = D && O, { tour: M, loadTour: N, createTour: Te, updateTour: Ee, saving: De, validationErrors: Oe, error: ke } = te(v), { saveAsTemplate: Ae } = r(), { data: je, loading: P } = n({
756
+ function y() {
757
+ let { tr: m } = e(), { tourId: g } = pe(), _ = fe(), v = t(), { basePath: y = "/" } = v, b = be(), x = ye("global"), { hasPermission: S, isLoading: C } = i(), w = !g || g === "new", T = S(a.TOUR_CREATE), E = S(a.TOUR_UPDATE), De = S(a.TOUR_TEMPLATE_CREATE), D = w ? T : E, O = T && E, k = T && E, A = T && E, { tour: j, loadTour: M, createTour: Oe, updateTour: ke, saving: N, validationErrors: P, error: Ae } = te(g), { saveAsTemplate: je } = r(), { data: Me, loading: F } = n({
692
758
  variables: {
693
- limit: ve,
759
+ limit: xe,
694
760
  offset: 0
695
761
  },
696
762
  fetchPolicy: "cache-and-network",
697
- skip: T || !k
698
- }), [F, I] = l({
763
+ skip: C || !D
764
+ }), [I, L] = l({
699
765
  name: "",
700
766
  description: "",
701
767
  productId: "",
@@ -708,356 +774,423 @@ function x() {
708
774
  displayOrder: 1,
709
775
  startDate: "",
710
776
  endDate: ""
711
- }), [L, R] = l(!1), [z, B] = l(!1), [V, H] = l(!1), [Me, Ne] = l(!1), [U, Pe] = l(null), [Fe, Ie] = l(null), [Le, Re] = l(!1), [W, ze] = l(null), [Be, Ve] = l(null), G = ne(!1), K = c(() => [...je?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [je]), q = c(() => new Set(K.map((e) => e.slug)), [K]), J = c(() => Se(F.productId), [F.productId]), Y = c(() => new Set(J.map((e) => e.moduleId)), [J]), X = c(() => Ce(F.productId, F.moduleId), [F.moduleId, F.productId]), Z = c(() => new Set(X.map((e) => e.pageId)), [X]);
777
+ }), [R, z] = l(!1), [B, V] = l(!1), [H, U] = l(!1), [Ne, Pe] = l(!1), [W, Fe] = l(null), [Ie, Le] = l(null), [Re, ze] = l(!1), [G, Be] = l(null), [Ve, He] = l(null), [Ue, We] = l(!1), [K, Ge] = l(null), [Ke, qe] = l(null), q = ne(!1), J = c(() => [...Me?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [Me]), Y = c(() => new Set(J.map((e) => e.slug)), [J]), X = c(() => Te(I.productId), [I.productId]), Z = c(() => new Set(X.map((e) => e.moduleId)), [X]), Q = c(() => Ee(I.productId, I.moduleId), [I.moduleId, I.productId]), $ = c(() => new Set(Q.map((e) => e.pageId)), [Q]);
712
778
  s(() => {
713
- G.current || !T && k && v && v !== "new" && N(v);
779
+ q.current || !C && D && g && g !== "new" && M(g);
714
780
  }, [
715
- k,
716
- N,
717
- T,
718
- v
781
+ D,
782
+ M,
783
+ C,
784
+ g
719
785
  ]), s(() => {
720
- M && !G.current && (I(M), G.current = !0);
721
- }, [M]), s(() => {
722
- if (!F.productId || P) {
723
- R(!1);
786
+ j && !q.current && (L(j), q.current = !0);
787
+ }, [j]), s(() => {
788
+ if (!I.productId || F) {
789
+ z(!1);
724
790
  return;
725
791
  }
726
- R(K.length > 0 && !q.has(F.productId));
792
+ z(J.length > 0 && !Y.has(I.productId));
727
793
  }, [
728
- F.productId,
729
- q,
730
- K.length,
731
- P
794
+ I.productId,
795
+ Y,
796
+ J.length,
797
+ F
732
798
  ]), s(() => {
733
- if (!F.productId || !F.moduleId) {
734
- B(!1);
799
+ if (!I.productId || !I.moduleId) {
800
+ V(!1);
735
801
  return;
736
802
  }
737
- B(J.length === 0 || !Y.has(F.moduleId));
803
+ V(X.length === 0 || !Z.has(I.moduleId));
738
804
  }, [
739
- F.moduleId,
740
- F.productId,
741
- Y,
742
- J.length
805
+ I.moduleId,
806
+ I.productId,
807
+ Z,
808
+ X.length
743
809
  ]), s(() => {
744
- if (!F.productId || !F.pageId) {
745
- H(!1);
810
+ if (!I.productId || !I.pageId) {
811
+ U(!1);
746
812
  return;
747
813
  }
748
- H(X.length === 0 || !Z.has(F.pageId));
814
+ U(Q.length === 0 || !$.has(I.pageId));
749
815
  }, [
750
- F.pageId,
751
- F.productId,
752
- Z,
753
- X.length
816
+ I.pageId,
817
+ I.productId,
818
+ $,
819
+ Q.length
754
820
  ]);
755
- let He = !!(F.productId && !L && !q.has(F.productId)), Ue = !!(F.moduleId && !z && !Y.has(F.moduleId)), We = !!(F.pageId && !V && !Z.has(F.pageId)), Ge = async (e) => {
821
+ let Je = !!(I.productId && !R && !Y.has(I.productId)), Ye = !!(I.moduleId && !B && !Z.has(I.moduleId)), Xe = !!(I.pageId && !H && !$.has(I.pageId)), Ze = async (e) => {
756
822
  e.preventDefault();
757
823
  try {
758
- v && v !== "new" ? await Ee(v, F) : await Te(F);
824
+ g && g !== "new" ? await ke(g, I) : await Oe(I);
759
825
  } catch {
760
- o(S, "tour.save", b);
826
+ o(b, "tour.save", v);
761
827
  }
762
- }, Q = () => {
763
- y(`${x}/list`);
764
- }, Ke = (e) => {
828
+ }, Qe = () => {
829
+ _(`${y}/list`);
830
+ }, $e = (e) => {
765
831
  if (!e) return "";
766
832
  let t = new Date(e);
767
833
  return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
768
- }, qe = async () => {
769
- if (!v || v === "new") return;
770
- let e = _("tourBuilder.templateDefaultName", "{{name}} Template", { name: F.name || M?.name || "Tour" }), t = window.prompt(_("tourBuilder.templateNamePrompt", "Template name"), e);
834
+ }, et = async () => {
835
+ if (!g || g === "new") return;
836
+ let e = m("tourBuilder.templateDefaultName", "{{name}} Template", { name: I.name || j?.name || "Tour" }), t = window.prompt(m("tourBuilder.templateNamePrompt", "Template name"), e);
771
837
  if (!t) return;
772
- let n = window.prompt(_("tourBuilder.templateCategoryPrompt", "Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)"), "ONBOARDING") || "ONBOARDING";
838
+ let n = window.prompt(m("tourBuilder.templateCategoryPrompt", "Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)"), "ONBOARDING") || "ONBOARDING";
773
839
  try {
774
- await Ae(v, {
840
+ await je(g, {
775
841
  name: t,
776
- description: F.description,
842
+ description: I.description,
777
843
  category: n,
778
844
  isPublic: !1
779
- }), y(`${x}/templates`);
845
+ }), _(`${y}/templates`);
780
846
  } catch {
781
- o(S, "template.save", b);
847
+ o(b, "template.save", v);
782
848
  }
783
- }, Je = async () => {
784
- if (window.confirm(_("tourBuilder.seedVibeControls.confirm"))) {
785
- Ne(!0), Pe(null), Ie(null);
849
+ }, tt = async () => {
850
+ if (window.confirm(m("tourBuilder.seedVibeControls.confirm"))) {
851
+ Pe(!0), Fe(null), Le(null);
786
852
  try {
787
- let e = await C.mutate({ mutation: ye }), t = xe(e, _("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
853
+ let e = await x.mutate({ mutation: Se }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
788
854
  if (t) throw Error(t);
789
855
  let n = e.data?.seedVibeControlsUserTours;
790
- if (!n) throw Error(_("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
791
- Pe(n);
856
+ if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
857
+ Fe(n);
792
858
  } catch (e) {
793
- let t = e instanceof Error ? e.message : _("tourBuilder.seedVibeControls.error");
794
- Ie(t), S.emit("tours.api.failed", {
859
+ let t = e instanceof Error ? e.message : m("tourBuilder.seedVibeControls.error");
860
+ Le(t), b.emit("tours.api.failed", {
795
861
  route: "/tours",
796
862
  operation: "tour.seed_vibecontrols_user_tours",
797
863
  errorMessage: t,
798
- productId: b.productId,
799
- workspaceId: b.workspaceId
864
+ productId: v.productId,
865
+ workspaceId: v.workspaceId
800
866
  }, { component: "microfe-tours" });
801
867
  } finally {
802
- Ne(!1);
868
+ Pe(!1);
803
869
  }
804
870
  }
805
- }, Ye = async () => {
806
- if (window.confirm(_("tourBuilder.seedBuildmyiq.confirm"))) {
807
- Re(!0), ze(null), Ve(null);
871
+ }, nt = async () => {
872
+ if (window.confirm(m("tourBuilder.seedBuildmyiq.confirm"))) {
873
+ ze(!0), Be(null), He(null);
808
874
  try {
809
- let e = await C.mutate({ mutation: be }), t = xe(e, _("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
875
+ let e = await x.mutate({ mutation: Ce }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
810
876
  if (t) throw Error(t);
811
877
  let n = e.data?.seedBuildmyiqUserTours;
812
- if (!n) throw Error(_("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
813
- ze(n);
878
+ if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
879
+ Be(n);
814
880
  } catch (e) {
815
- let t = e instanceof Error ? e.message : _("tourBuilder.seedBuildmyiq.error");
816
- Ve(t), S.emit("tours.api.failed", {
881
+ let t = e instanceof Error ? e.message : m("tourBuilder.seedBuildmyiq.error");
882
+ He(t), b.emit("tours.api.failed", {
817
883
  route: "/tours",
818
884
  operation: "tour.seed_buildmyiq_user_tours",
819
885
  errorMessage: t,
820
- productId: b.productId,
821
- workspaceId: b.workspaceId
886
+ productId: v.productId,
887
+ workspaceId: v.workspaceId
888
+ }, { component: "microfe-tours" });
889
+ } finally {
890
+ ze(!1);
891
+ }
892
+ }
893
+ }, rt = async () => {
894
+ if (window.confirm(m("tourBuilder.seedBigconsole.confirm"))) {
895
+ We(!0), Ge(null), qe(null);
896
+ try {
897
+ let e = await x.mutate({ mutation: we }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
898
+ if (t) throw Error(t);
899
+ let n = e.data?.seedBigconsoleUserTours;
900
+ if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
901
+ Ge(n);
902
+ } catch (e) {
903
+ let t = e instanceof Error ? e.message : m("tourBuilder.seedBigconsole.error");
904
+ qe(t), b.emit("tours.api.failed", {
905
+ route: "/tours",
906
+ operation: "tour.seed_bigconsole_user_tours",
907
+ errorMessage: t,
908
+ productId: v.productId,
909
+ workspaceId: v.workspaceId
822
910
  }, { component: "microfe-tours" });
823
911
  } finally {
824
- Re(!1);
912
+ We(!1);
825
913
  }
826
914
  }
827
- }, Xe = v && v !== "new" ? [
915
+ }, it = g && g !== "new" ? [
828
916
  {
829
- label: M?.steps && M.steps.length > 0 ? `${_("tourBuilder.editSteps")} (${M.steps.length})` : _("tourBuilder.editSteps"),
830
- onSelect: () => y(`${x}/${v}/steps`),
831
- icon: /* @__PURE__ */ h(p, { size: 16 })
917
+ label: j?.steps && j.steps.length > 0 ? `${m("tourBuilder.editSteps")} (${j.steps.length})` : m("tourBuilder.editSteps"),
918
+ onSelect: () => _(`${y}/${g}/steps`),
919
+ icon: /* @__PURE__ */ d(le, { size: 16 })
832
920
  },
833
921
  {
834
- label: _("tourBuilder.preview"),
835
- onSelect: () => y(`${x}/${v}/preview`),
836
- icon: /* @__PURE__ */ h(f, { size: 16 })
922
+ label: m("tourBuilder.preview"),
923
+ onSelect: () => _(`${y}/${g}/preview`),
924
+ icon: /* @__PURE__ */ d(se, { size: 16 })
837
925
  },
838
926
  {
839
- label: _("tourBuilder.analytics"),
840
- onSelect: () => y(`${x}/${v}/analytics`),
841
- icon: /* @__PURE__ */ h(u, { size: 16 })
927
+ label: m("tourBuilder.analytics"),
928
+ onSelect: () => _(`${y}/${g}/analytics`),
929
+ icon: /* @__PURE__ */ d(ae, { size: 16 })
842
930
  },
843
931
  {
844
- label: _("tourBuilder.schedule", "Schedule"),
845
- onSelect: () => y(`${x}/${v}/schedule`),
846
- icon: /* @__PURE__ */ h(d, { size: 16 })
932
+ label: m("tourBuilder.schedule", "Schedule"),
933
+ onSelect: () => _(`${y}/${g}/schedule`),
934
+ icon: /* @__PURE__ */ d(oe, { size: 16 })
847
935
  },
848
- ...we ? [{
849
- label: _("tourBuilder.saveAsTemplate", "Save as Template"),
850
- onSelect: () => void qe(),
851
- icon: /* @__PURE__ */ h(ae, { size: 16 })
936
+ ...De ? [{
937
+ label: m("tourBuilder.saveAsTemplate", "Save as Template"),
938
+ onSelect: () => void et(),
939
+ icon: /* @__PURE__ */ d(ce, { size: 16 })
852
940
  }] : []
853
- ] : [], $ = v && v !== "new" && O ? [
941
+ ] : [], at = g && g !== "new" && E ? [
854
942
  {
855
943
  id: "edit-steps",
856
- label: _("tourBuilder.nextStepEditSteps"),
857
- description: _("tourBuilder.nextStepEditStepsDesc"),
858
- icon: /* @__PURE__ */ h(p, { size: 16 }),
859
- onClick: () => y(`${x}/${v}/steps`)
944
+ label: m("tourBuilder.nextStepEditSteps"),
945
+ description: m("tourBuilder.nextStepEditStepsDesc"),
946
+ icon: /* @__PURE__ */ d(le, { size: 16 }),
947
+ onClick: () => _(`${y}/${g}/steps`)
860
948
  },
861
949
  {
862
950
  id: "preview",
863
- label: _("tourBuilder.nextStepPreview"),
864
- description: _("tourBuilder.nextStepPreviewDesc"),
865
- icon: /* @__PURE__ */ h(f, { size: 16 }),
866
- onClick: () => y(`${x}/${v}/preview`)
951
+ label: m("tourBuilder.nextStepPreview"),
952
+ description: m("tourBuilder.nextStepPreviewDesc"),
953
+ icon: /* @__PURE__ */ d(se, { size: 16 }),
954
+ onClick: () => _(`${y}/${g}/preview`)
867
955
  },
868
956
  {
869
957
  id: "schedule",
870
- label: _("tourBuilder.nextStepSchedule"),
871
- description: _("tourBuilder.nextStepScheduleDesc"),
872
- icon: /* @__PURE__ */ h(d, { size: 16 }),
873
- onClick: () => y(`${x}/${v}/schedule`)
958
+ label: m("tourBuilder.nextStepSchedule"),
959
+ description: m("tourBuilder.nextStepScheduleDesc"),
960
+ icon: /* @__PURE__ */ d(oe, { size: 16 }),
961
+ onClick: () => _(`${y}/${g}/schedule`)
874
962
  },
875
963
  {
876
964
  id: "analytics",
877
- label: _("tourBuilder.nextStepAnalytics"),
878
- description: _("tourBuilder.nextStepAnalyticsDesc"),
879
- icon: /* @__PURE__ */ h(u, { size: 16 }),
880
- onClick: () => y(`${x}/${v}/analytics`)
965
+ label: m("tourBuilder.nextStepAnalytics"),
966
+ description: m("tourBuilder.nextStepAnalyticsDesc"),
967
+ icon: /* @__PURE__ */ d(ae, { size: 16 }),
968
+ onClick: () => _(`${y}/${g}/analytics`)
881
969
  }
882
970
  ] : [];
883
- return T ? /* @__PURE__ */ h("div", {
971
+ return C ? /* @__PURE__ */ d("div", {
884
972
  className: "flex h-full items-center justify-center p-3 sm:p-6",
885
- children: /* @__PURE__ */ h("p", {
973
+ children: /* @__PURE__ */ d("p", {
886
974
  className: "text-sm text-text-secondary",
887
- children: _("tourBuilder.loading")
975
+ children: m("tourBuilder.loading")
888
976
  })
889
- }) : k ? /* @__PURE__ */ g("div", {
977
+ }) : D ? /* @__PURE__ */ f("div", {
890
978
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-4xl mx-auto",
891
979
  children: [
892
- /* @__PURE__ */ g("div", {
980
+ /* @__PURE__ */ f("div", {
893
981
  className: "flex items-center gap-4",
894
- children: [/* @__PURE__ */ h("button", {
982
+ children: [/* @__PURE__ */ d("button", {
895
983
  type: "button",
896
- onClick: Q,
984
+ onClick: Qe,
897
985
  className: "p-2 hover:bg-accent rounded-md",
898
- "aria-label": _("tourBuilder.goBack"),
899
- children: /* @__PURE__ */ h(ie, { size: 20 })
900
- }), /* @__PURE__ */ g("div", {
986
+ "aria-label": m("tourBuilder.goBack"),
987
+ children: /* @__PURE__ */ d(ie, { size: 20 })
988
+ }), /* @__PURE__ */ f("div", {
901
989
  className: "flex-1",
902
- children: [/* @__PURE__ */ h("h1", {
990
+ children: [/* @__PURE__ */ d("h1", {
903
991
  className: "text-xl sm:text-2xl font-bold text-text-primary",
904
- children: _(v && v !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
905
- }), /* @__PURE__ */ h("p", {
992
+ children: m(g && g !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
993
+ }), /* @__PURE__ */ d("p", {
906
994
  className: "text-sm text-text-secondary",
907
- children: _("tourBuilder.subtitle")
995
+ children: m("tourBuilder.subtitle")
908
996
  })]
909
997
  })]
910
998
  }),
911
- /* @__PURE__ */ h(he, { children: _("tourBuilder.purpose") }),
912
- $.length > 0 ? /* @__PURE__ */ h(me, {
999
+ /* @__PURE__ */ d(ve, { children: m("tourBuilder.purpose") }),
1000
+ at.length > 0 ? /* @__PURE__ */ d(_e, {
913
1001
  storageKey: "tours-builder",
914
- title: _("tourBuilder.nextStepsTitle"),
915
- steps: $
1002
+ title: m("tourBuilder.nextStepsTitle"),
1003
+ steps: at
916
1004
  }) : null,
917
- E ? /* @__PURE__ */ g(se, { children: [/* @__PURE__ */ g(fe, {
918
- className: "p-4 sm:p-6",
919
- children: [
920
- /* @__PURE__ */ g("div", {
921
- className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
922
- children: [/* @__PURE__ */ g("div", {
923
- className: "space-y-1",
924
- children: [/* @__PURE__ */ h("h2", {
925
- className: "text-lg font-semibold text-text-primary",
926
- children: _("tourBuilder.seedVibeControls.title")
927
- }), /* @__PURE__ */ h("p", {
928
- className: "text-sm text-text-secondary",
929
- children: _("tourBuilder.seedVibeControls.description")
1005
+ w ? /* @__PURE__ */ f(de, { children: [
1006
+ /* @__PURE__ */ f(p, {
1007
+ className: "p-4 sm:p-6",
1008
+ children: [
1009
+ /* @__PURE__ */ f("div", {
1010
+ className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
1011
+ children: [/* @__PURE__ */ f("div", {
1012
+ className: "space-y-1",
1013
+ children: [/* @__PURE__ */ d("h2", {
1014
+ className: "text-lg font-semibold text-text-primary",
1015
+ children: m("tourBuilder.seedVibeControls.title")
1016
+ }), /* @__PURE__ */ d("p", {
1017
+ className: "text-sm text-text-secondary",
1018
+ children: m("tourBuilder.seedVibeControls.description")
1019
+ })]
1020
+ }), /* @__PURE__ */ f("button", {
1021
+ type: "button",
1022
+ onClick: () => void tt(),
1023
+ disabled: Ne || !O,
1024
+ className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
1025
+ children: [/* @__PURE__ */ d(u, { size: 18 }), m(Ne ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
930
1026
  })]
931
- }), /* @__PURE__ */ g("button", {
932
- type: "button",
933
- onClick: () => void Je(),
934
- disabled: Me || !A,
935
- className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
936
- children: [/* @__PURE__ */ h(m, { size: 18 }), _(Me ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
937
- })]
938
- }),
939
- A ? null : /* @__PURE__ */ h("p", {
940
- className: "mt-3 text-sm text-text-secondary",
941
- children: _("tourBuilder.seedVibeControls.permissionHint")
942
- }),
943
- Fe ? /* @__PURE__ */ h("p", {
944
- className: "mt-3 text-sm text-status-error-text",
945
- children: Fe
946
- }) : null,
947
- U ? /* @__PURE__ */ h("div", {
948
- className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
949
- children: _("tourBuilder.seedVibeControls.result", {
950
- totalCount: U.totalCount,
951
- productId: U.productId,
952
- workspaceId: U.workspaceId,
953
- createdCount: U.createdCount,
954
- updatedCount: U.updatedCount
955
- })
956
- }) : null
957
- ]
958
- }), /* @__PURE__ */ g(fe, {
959
- className: "p-4 sm:p-6",
960
- children: [
961
- /* @__PURE__ */ g("div", {
962
- className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
963
- children: [/* @__PURE__ */ g("div", {
964
- className: "space-y-1",
965
- children: [/* @__PURE__ */ h("h2", {
966
- className: "text-lg font-semibold text-text-primary",
967
- children: _("tourBuilder.seedBuildmyiq.title")
968
- }), /* @__PURE__ */ h("p", {
969
- className: "text-sm text-text-secondary",
970
- children: _("tourBuilder.seedBuildmyiq.description")
1027
+ }),
1028
+ O ? null : /* @__PURE__ */ d("p", {
1029
+ className: "mt-3 text-sm text-text-secondary",
1030
+ children: m("tourBuilder.seedVibeControls.permissionHint")
1031
+ }),
1032
+ Ie ? /* @__PURE__ */ d("p", {
1033
+ className: "mt-3 text-sm text-status-error-text",
1034
+ children: Ie
1035
+ }) : null,
1036
+ W ? /* @__PURE__ */ d("div", {
1037
+ className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
1038
+ children: m("tourBuilder.seedVibeControls.result", {
1039
+ totalCount: W.totalCount,
1040
+ productId: W.productId,
1041
+ workspaceId: W.workspaceId,
1042
+ createdCount: W.createdCount,
1043
+ updatedCount: W.updatedCount
1044
+ })
1045
+ }) : null
1046
+ ]
1047
+ }),
1048
+ /* @__PURE__ */ f(p, {
1049
+ className: "p-4 sm:p-6",
1050
+ children: [
1051
+ /* @__PURE__ */ f("div", {
1052
+ className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
1053
+ children: [/* @__PURE__ */ f("div", {
1054
+ className: "space-y-1",
1055
+ children: [/* @__PURE__ */ d("h2", {
1056
+ className: "text-lg font-semibold text-text-primary",
1057
+ children: m("tourBuilder.seedBuildmyiq.title")
1058
+ }), /* @__PURE__ */ d("p", {
1059
+ className: "text-sm text-text-secondary",
1060
+ children: m("tourBuilder.seedBuildmyiq.description")
1061
+ })]
1062
+ }), /* @__PURE__ */ f("button", {
1063
+ type: "button",
1064
+ onClick: () => void nt(),
1065
+ disabled: Re || !k,
1066
+ className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
1067
+ children: [/* @__PURE__ */ d(u, { size: 18 }), m(Re ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
971
1068
  })]
972
- }), /* @__PURE__ */ g("button", {
973
- type: "button",
974
- onClick: () => void Ye(),
975
- disabled: Le || !j,
976
- className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
977
- children: [/* @__PURE__ */ h(m, { size: 18 }), _(Le ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
978
- })]
979
- }),
980
- j ? null : /* @__PURE__ */ h("p", {
981
- className: "mt-3 text-sm text-text-secondary",
982
- children: _("tourBuilder.seedBuildmyiq.permissionHint")
983
- }),
984
- Be ? /* @__PURE__ */ h("p", {
985
- className: "mt-3 text-sm text-status-error-text",
986
- children: Be
987
- }) : null,
988
- W ? /* @__PURE__ */ h("div", {
989
- className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
990
- children: _("tourBuilder.seedBuildmyiq.result", {
991
- totalCount: W.totalCount,
992
- productId: W.productId,
993
- workspaceId: W.workspaceId,
994
- createdCount: W.createdCount,
995
- updatedCount: W.updatedCount
996
- })
997
- }) : null
998
- ]
999
- })] }) : null,
1000
- /* @__PURE__ */ g("form", {
1001
- onSubmit: Ge,
1069
+ }),
1070
+ k ? null : /* @__PURE__ */ d("p", {
1071
+ className: "mt-3 text-sm text-text-secondary",
1072
+ children: m("tourBuilder.seedBuildmyiq.permissionHint")
1073
+ }),
1074
+ Ve ? /* @__PURE__ */ d("p", {
1075
+ className: "mt-3 text-sm text-status-error-text",
1076
+ children: Ve
1077
+ }) : null,
1078
+ G ? /* @__PURE__ */ d("div", {
1079
+ className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
1080
+ children: m("tourBuilder.seedBuildmyiq.result", {
1081
+ totalCount: G.totalCount,
1082
+ productId: G.productId,
1083
+ workspaceId: G.workspaceId,
1084
+ createdCount: G.createdCount,
1085
+ updatedCount: G.updatedCount
1086
+ })
1087
+ }) : null
1088
+ ]
1089
+ }),
1090
+ /* @__PURE__ */ f(p, {
1091
+ className: "p-4 sm:p-6",
1092
+ children: [
1093
+ /* @__PURE__ */ f("div", {
1094
+ className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
1095
+ children: [/* @__PURE__ */ f("div", {
1096
+ className: "space-y-1",
1097
+ children: [/* @__PURE__ */ d("h2", {
1098
+ className: "text-lg font-semibold text-text-primary",
1099
+ children: m("tourBuilder.seedBigconsole.title")
1100
+ }), /* @__PURE__ */ d("p", {
1101
+ className: "text-sm text-text-secondary",
1102
+ children: m("tourBuilder.seedBigconsole.description")
1103
+ })]
1104
+ }), /* @__PURE__ */ f("button", {
1105
+ type: "button",
1106
+ onClick: () => void rt(),
1107
+ disabled: Ue || !A,
1108
+ className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
1109
+ children: [/* @__PURE__ */ d(u, { size: 18 }), m(Ue ? "tourBuilder.seedBigconsole.loading" : "tourBuilder.seedBigconsole.button")]
1110
+ })]
1111
+ }),
1112
+ A ? null : /* @__PURE__ */ d("p", {
1113
+ className: "mt-3 text-sm text-text-secondary",
1114
+ children: m("tourBuilder.seedBigconsole.permissionHint")
1115
+ }),
1116
+ Ke ? /* @__PURE__ */ d("p", {
1117
+ className: "mt-3 text-sm text-status-error-text",
1118
+ children: Ke
1119
+ }) : null,
1120
+ K ? /* @__PURE__ */ d("div", {
1121
+ className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
1122
+ children: m("tourBuilder.seedBigconsole.result", {
1123
+ totalCount: K.totalCount,
1124
+ productId: K.productId,
1125
+ workspaceId: K.workspaceId,
1126
+ createdCount: K.createdCount,
1127
+ updatedCount: K.updatedCount
1128
+ })
1129
+ }) : null
1130
+ ]
1131
+ })
1132
+ ] }) : null,
1133
+ /* @__PURE__ */ f("form", {
1134
+ onSubmit: Ze,
1002
1135
  className: "space-y-6",
1003
1136
  children: [
1004
- /* @__PURE__ */ g(pe, {
1137
+ /* @__PURE__ */ f(ge, {
1005
1138
  treatment: "plain",
1006
1139
  className: "p-4 sm:p-6 border-border-seam",
1007
- children: [/* @__PURE__ */ h("h2", {
1140
+ children: [/* @__PURE__ */ d("h2", {
1008
1141
  className: "text-lg font-semibold mb-4",
1009
- children: _("tourBuilder.sectionBasicInfo")
1010
- }), /* @__PURE__ */ g("div", {
1142
+ children: m("tourBuilder.sectionBasicInfo")
1143
+ }), /* @__PURE__ */ f("div", {
1011
1144
  className: "space-y-4",
1012
1145
  children: [
1013
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1146
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1014
1147
  className: "block text-sm font-medium mb-2",
1015
1148
  htmlFor: "tour-name",
1016
- children: _("tourBuilder.labelName")
1017
- }), /* @__PURE__ */ h("input", {
1149
+ children: m("tourBuilder.labelName")
1150
+ }), /* @__PURE__ */ d("input", {
1018
1151
  id: "tour-name",
1019
1152
  type: "text",
1020
- value: F.name || "",
1021
- onChange: (e) => I({
1022
- ...F,
1153
+ value: I.name || "",
1154
+ onChange: (e) => L({
1155
+ ...I,
1023
1156
  name: e.target.value
1024
1157
  }),
1025
1158
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1026
1159
  required: !0,
1027
- "aria-label": _("tourBuilder.labelName")
1160
+ "aria-label": m("tourBuilder.labelName")
1028
1161
  })] }),
1029
- /* @__PURE__ */ h(ee, {
1162
+ /* @__PURE__ */ d(ee, {
1030
1163
  id: "tour-description",
1031
- label: _("tourBuilder.labelDescription"),
1032
- value: F.description || "",
1033
- onChange: (e) => I({
1034
- ...F,
1164
+ label: m("tourBuilder.labelDescription"),
1165
+ value: I.description || "",
1166
+ onChange: (e) => L({
1167
+ ...I,
1035
1168
  description: e
1036
1169
  }),
1037
1170
  rows: 4,
1038
- "aria-label": _("tourBuilder.labelDescription")
1171
+ "aria-label": m("tourBuilder.labelDescription")
1039
1172
  }),
1040
- /* @__PURE__ */ g("div", { children: [
1041
- /* @__PURE__ */ h("label", {
1173
+ /* @__PURE__ */ f("div", { children: [
1174
+ /* @__PURE__ */ d("label", {
1042
1175
  className: "block text-sm font-medium mb-2",
1043
1176
  htmlFor: "product-id",
1044
- children: _("tourBuilder.labelProductId")
1177
+ children: m("tourBuilder.labelProductId")
1045
1178
  }),
1046
- /* @__PURE__ */ g("select", {
1179
+ /* @__PURE__ */ f("select", {
1047
1180
  id: "product-id",
1048
- value: L ? "__custom__" : F.productId || "",
1181
+ value: R ? "__custom__" : I.productId || "",
1049
1182
  onChange: (e) => {
1050
1183
  if (e.target.value === "__custom__") {
1051
- R(!0), I({
1052
- ...F,
1184
+ z(!0), L({
1185
+ ...I,
1053
1186
  productId: "",
1054
1187
  moduleId: void 0,
1055
1188
  pageId: void 0
1056
1189
  });
1057
1190
  return;
1058
1191
  }
1059
- R(!1), B(!1), H(!1), I({
1060
- ...F,
1192
+ z(!1), V(!1), U(!1), L({
1193
+ ...I,
1061
1194
  productId: e.target.value,
1062
1195
  moduleId: void 0,
1063
1196
  pageId: void 0
@@ -1065,17 +1198,17 @@ function x() {
1065
1198
  },
1066
1199
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1067
1200
  required: !0,
1068
- "aria-label": _("tourBuilder.labelProductId"),
1201
+ "aria-label": m("tourBuilder.labelProductId"),
1069
1202
  children: [
1070
- /* @__PURE__ */ h("option", {
1203
+ /* @__PURE__ */ d("option", {
1071
1204
  value: "",
1072
- children: _("tourBuilder.selectProduct", "Select product")
1205
+ children: m("tourBuilder.selectProduct", "Select product")
1073
1206
  }),
1074
- P ? /* @__PURE__ */ h("option", {
1207
+ F ? /* @__PURE__ */ d("option", {
1075
1208
  disabled: !0,
1076
- children: _("tourBuilder.loadingProducts", "Loading products…")
1209
+ children: m("tourBuilder.loadingProducts", "Loading products…")
1077
1210
  }) : null,
1078
- K.map((e) => /* @__PURE__ */ g("option", {
1211
+ J.map((e) => /* @__PURE__ */ f("option", {
1079
1212
  value: e.slug,
1080
1213
  children: [
1081
1214
  e.name,
@@ -1084,67 +1217,67 @@ function x() {
1084
1217
  ")"
1085
1218
  ]
1086
1219
  }, e.id)),
1087
- He ? /* @__PURE__ */ h("option", {
1088
- value: F.productId,
1089
- children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.productId ?? "" })
1220
+ Je ? /* @__PURE__ */ d("option", {
1221
+ value: I.productId,
1222
+ children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.productId ?? "" })
1090
1223
  }) : null,
1091
- /* @__PURE__ */ h("option", {
1224
+ /* @__PURE__ */ d("option", {
1092
1225
  value: "__custom__",
1093
- children: _("tourBuilder.customProductSlug", "Custom product slug")
1226
+ children: m("tourBuilder.customProductSlug", "Custom product slug")
1094
1227
  })
1095
1228
  ]
1096
1229
  }),
1097
- L ? /* @__PURE__ */ h("input", {
1230
+ R ? /* @__PURE__ */ d("input", {
1098
1231
  id: "product-id-custom",
1099
- "aria-label": _("tourBuilder.customProductSlug", "Custom product slug"),
1232
+ "aria-label": m("tourBuilder.customProductSlug", "Custom product slug"),
1100
1233
  type: "text",
1101
- value: F.productId || "",
1102
- onChange: (e) => I({
1103
- ...F,
1234
+ value: I.productId || "",
1235
+ onChange: (e) => L({
1236
+ ...I,
1104
1237
  productId: e.target.value,
1105
1238
  moduleId: void 0,
1106
1239
  pageId: void 0
1107
1240
  }),
1108
1241
  className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1109
- placeholder: _("tourBuilder.productSlugPlaceholder", "vibecontrols"),
1242
+ placeholder: m("tourBuilder.productSlugPlaceholder", "vibecontrols"),
1110
1243
  required: !0
1111
1244
  }) : null
1112
1245
  ] }),
1113
- /* @__PURE__ */ g("div", {
1246
+ /* @__PURE__ */ f("div", {
1114
1247
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1115
- children: [/* @__PURE__ */ g("div", { children: [
1116
- /* @__PURE__ */ h("label", {
1248
+ children: [/* @__PURE__ */ f("div", { children: [
1249
+ /* @__PURE__ */ d("label", {
1117
1250
  className: "block text-sm font-medium mb-2",
1118
1251
  htmlFor: "module-id",
1119
- children: _("tourBuilder.labelModuleId", "Module ID")
1252
+ children: m("tourBuilder.labelModuleId", "Module ID")
1120
1253
  }),
1121
- /* @__PURE__ */ g("select", {
1254
+ /* @__PURE__ */ f("select", {
1122
1255
  id: "module-id",
1123
- value: z ? "__custom__" : F.moduleId || "",
1256
+ value: B ? "__custom__" : I.moduleId || "",
1124
1257
  onChange: (e) => {
1125
1258
  if (e.target.value === "__custom__") {
1126
- B(!0), I({
1127
- ...F,
1259
+ V(!0), L({
1260
+ ...I,
1128
1261
  moduleId: "",
1129
1262
  pageId: void 0
1130
1263
  });
1131
1264
  return;
1132
1265
  }
1133
- B(!1), H(!1), I({
1134
- ...F,
1266
+ V(!1), U(!1), L({
1267
+ ...I,
1135
1268
  moduleId: e.target.value || void 0,
1136
1269
  pageId: void 0
1137
1270
  });
1138
1271
  },
1139
1272
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1140
- disabled: !F.productId,
1141
- "aria-label": _("tourBuilder.labelModuleId", "Module ID"),
1273
+ disabled: !I.productId,
1274
+ "aria-label": m("tourBuilder.labelModuleId", "Module ID"),
1142
1275
  children: [
1143
- /* @__PURE__ */ h("option", {
1276
+ /* @__PURE__ */ d("option", {
1144
1277
  value: "",
1145
- children: _("tourBuilder.allModules", "All modules")
1278
+ children: m("tourBuilder.allModules", "All modules")
1146
1279
  }),
1147
- J.map((e) => /* @__PURE__ */ g("option", {
1280
+ X.map((e) => /* @__PURE__ */ f("option", {
1148
1281
  value: e.moduleId,
1149
1282
  children: [
1150
1283
  e.label,
@@ -1153,60 +1286,60 @@ function x() {
1153
1286
  ")"
1154
1287
  ]
1155
1288
  }, e.moduleId)),
1156
- Ue ? /* @__PURE__ */ h("option", {
1157
- value: F.moduleId,
1158
- children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.moduleId ?? "" })
1289
+ Ye ? /* @__PURE__ */ d("option", {
1290
+ value: I.moduleId,
1291
+ children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.moduleId ?? "" })
1159
1292
  }) : null,
1160
- /* @__PURE__ */ h("option", {
1293
+ /* @__PURE__ */ d("option", {
1161
1294
  value: "__custom__",
1162
- children: _("tourBuilder.customModuleId", "Custom module ID")
1295
+ children: m("tourBuilder.customModuleId", "Custom module ID")
1163
1296
  })
1164
1297
  ]
1165
1298
  }),
1166
- z ? /* @__PURE__ */ h("input", {
1299
+ B ? /* @__PURE__ */ d("input", {
1167
1300
  id: "module-id-custom",
1168
- "aria-label": _("tourBuilder.customModuleId", "Custom module ID"),
1301
+ "aria-label": m("tourBuilder.customModuleId", "Custom module ID"),
1169
1302
  type: "text",
1170
- value: F.moduleId || "",
1171
- onChange: (e) => I({
1172
- ...F,
1303
+ value: I.moduleId || "",
1304
+ onChange: (e) => L({
1305
+ ...I,
1173
1306
  moduleId: e.target.value || void 0,
1174
1307
  pageId: void 0
1175
1308
  }),
1176
1309
  className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1177
- placeholder: _("tourBuilder.moduleSlugPlaceholder", "vibecontrols")
1310
+ placeholder: m("tourBuilder.moduleSlugPlaceholder", "vibecontrols")
1178
1311
  }) : null
1179
- ] }), /* @__PURE__ */ g("div", { children: [
1180
- /* @__PURE__ */ h("label", {
1312
+ ] }), /* @__PURE__ */ f("div", { children: [
1313
+ /* @__PURE__ */ d("label", {
1181
1314
  className: "block text-sm font-medium mb-2",
1182
1315
  htmlFor: "page-id",
1183
- children: _("tourBuilder.labelPageId", "Page ID")
1316
+ children: m("tourBuilder.labelPageId", "Page ID")
1184
1317
  }),
1185
- /* @__PURE__ */ g("select", {
1318
+ /* @__PURE__ */ f("select", {
1186
1319
  id: "page-id",
1187
- value: V ? "__custom__" : F.pageId || "",
1320
+ value: H ? "__custom__" : I.pageId || "",
1188
1321
  onChange: (e) => {
1189
1322
  if (e.target.value === "__custom__") {
1190
- H(!0), I({
1191
- ...F,
1323
+ U(!0), L({
1324
+ ...I,
1192
1325
  pageId: ""
1193
1326
  });
1194
1327
  return;
1195
1328
  }
1196
- H(!1), I({
1197
- ...F,
1329
+ U(!1), L({
1330
+ ...I,
1198
1331
  pageId: e.target.value || void 0
1199
1332
  });
1200
1333
  },
1201
1334
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1202
- disabled: !F.productId,
1203
- "aria-label": _("tourBuilder.labelPageId", "Page ID"),
1335
+ disabled: !I.productId,
1336
+ "aria-label": m("tourBuilder.labelPageId", "Page ID"),
1204
1337
  children: [
1205
- /* @__PURE__ */ h("option", {
1338
+ /* @__PURE__ */ d("option", {
1206
1339
  value: "",
1207
- children: _("tourBuilder.allPages", "All pages")
1340
+ children: m("tourBuilder.allPages", "All pages")
1208
1341
  }),
1209
- X.map((e) => /* @__PURE__ */ g("option", {
1342
+ Q.map((e) => /* @__PURE__ */ f("option", {
1210
1343
  value: e.pageId,
1211
1344
  children: [
1212
1345
  e.label,
@@ -1215,207 +1348,207 @@ function x() {
1215
1348
  ")"
1216
1349
  ]
1217
1350
  }, e.pageId)),
1218
- We ? /* @__PURE__ */ h("option", {
1219
- value: F.pageId,
1220
- children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.pageId ?? "" })
1351
+ Xe ? /* @__PURE__ */ d("option", {
1352
+ value: I.pageId,
1353
+ children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.pageId ?? "" })
1221
1354
  }) : null,
1222
- /* @__PURE__ */ h("option", {
1355
+ /* @__PURE__ */ d("option", {
1223
1356
  value: "__custom__",
1224
- children: _("tourBuilder.customPageId", "Custom page ID")
1357
+ children: m("tourBuilder.customPageId", "Custom page ID")
1225
1358
  })
1226
1359
  ]
1227
1360
  }),
1228
- V ? /* @__PURE__ */ h("input", {
1361
+ H ? /* @__PURE__ */ d("input", {
1229
1362
  id: "page-id-custom",
1230
- "aria-label": _("tourBuilder.customPageId", "Custom page ID"),
1363
+ "aria-label": m("tourBuilder.customPageId", "Custom page ID"),
1231
1364
  type: "text",
1232
- value: F.pageId || "",
1233
- onChange: (e) => I({
1234
- ...F,
1365
+ value: I.pageId || "",
1366
+ onChange: (e) => L({
1367
+ ...I,
1235
1368
  pageId: e.target.value || void 0
1236
1369
  }),
1237
1370
  className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1238
- placeholder: _("tourBuilder.pageSlugPlaceholder", "agents")
1371
+ placeholder: m("tourBuilder.pageSlugPlaceholder", "agents")
1239
1372
  }) : null
1240
1373
  ] })]
1241
1374
  }),
1242
- /* @__PURE__ */ g("label", {
1375
+ /* @__PURE__ */ f("label", {
1243
1376
  className: "flex items-center gap-3 cursor-pointer",
1244
- children: [/* @__PURE__ */ h("input", {
1377
+ children: [/* @__PURE__ */ d("input", {
1245
1378
  type: "checkbox",
1246
- checked: F.isActive ?? !0,
1247
- onChange: (e) => I({
1248
- ...F,
1379
+ checked: I.isActive ?? !0,
1380
+ onChange: (e) => L({
1381
+ ...I,
1249
1382
  isActive: e.target.checked
1250
1383
  }),
1251
1384
  className: "size-4 rounded",
1252
- "aria-label": _("tourBuilder.labelActive", "Active")
1253
- }), /* @__PURE__ */ h("span", {
1385
+ "aria-label": m("tourBuilder.labelActive", "Active")
1386
+ }), /* @__PURE__ */ d("span", {
1254
1387
  className: "text-sm font-medium",
1255
- children: _("tourBuilder.labelActive", "Active")
1388
+ children: m("tourBuilder.labelActive", "Active")
1256
1389
  })]
1257
1390
  })
1258
1391
  ]
1259
1392
  })]
1260
1393
  }),
1261
- /* @__PURE__ */ g(pe, {
1394
+ /* @__PURE__ */ f(ge, {
1262
1395
  treatment: "plain",
1263
1396
  className: "p-4 sm:p-6 border-border-seam",
1264
- children: [/* @__PURE__ */ h("h2", {
1397
+ children: [/* @__PURE__ */ d("h2", {
1265
1398
  className: "text-lg font-semibold mb-4",
1266
- children: _("tourBuilder.sectionTriggerSettings")
1267
- }), /* @__PURE__ */ g("div", {
1399
+ children: m("tourBuilder.sectionTriggerSettings")
1400
+ }), /* @__PURE__ */ f("div", {
1268
1401
  className: "space-y-4",
1269
1402
  children: [
1270
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1403
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1271
1404
  className: "block text-sm font-medium mb-2",
1272
1405
  htmlFor: "trigger-type",
1273
- children: _("tourBuilder.labelTriggerType")
1274
- }), /* @__PURE__ */ g("select", {
1406
+ children: m("tourBuilder.labelTriggerType")
1407
+ }), /* @__PURE__ */ f("select", {
1275
1408
  id: "trigger-type",
1276
- value: F.triggerType || "MANUAL",
1277
- onChange: (e) => I({
1278
- ...F,
1409
+ value: I.triggerType || "MANUAL",
1410
+ onChange: (e) => L({
1411
+ ...I,
1279
1412
  triggerType: e.target.value
1280
1413
  }),
1281
1414
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1282
- "aria-label": _("tourBuilder.labelTriggerType"),
1415
+ "aria-label": m("tourBuilder.labelTriggerType"),
1283
1416
  children: [
1284
- /* @__PURE__ */ h("option", {
1417
+ /* @__PURE__ */ d("option", {
1285
1418
  value: "MANUAL",
1286
- children: _("tourBuilder.triggerManual")
1419
+ children: m("tourBuilder.triggerManual")
1287
1420
  }),
1288
- /* @__PURE__ */ h("option", {
1421
+ /* @__PURE__ */ d("option", {
1289
1422
  value: "AUTO_FIRST_VISIT",
1290
- children: _("tourBuilder.triggerAutoFirstVisit")
1423
+ children: m("tourBuilder.triggerAutoFirstVisit")
1291
1424
  }),
1292
- /* @__PURE__ */ h("option", {
1425
+ /* @__PURE__ */ d("option", {
1293
1426
  value: "AUTO_ALWAYS",
1294
- children: _("tourBuilder.triggerAutoAlways")
1427
+ children: m("tourBuilder.triggerAutoAlways")
1295
1428
  }),
1296
- /* @__PURE__ */ h("option", {
1429
+ /* @__PURE__ */ d("option", {
1297
1430
  value: "ON_EVENT",
1298
- children: _("tourBuilder.triggerOnEvent")
1431
+ children: m("tourBuilder.triggerOnEvent")
1299
1432
  }),
1300
- /* @__PURE__ */ h("option", {
1433
+ /* @__PURE__ */ d("option", {
1301
1434
  value: "SCHEDULED",
1302
- children: _("tourBuilder.triggerScheduled")
1435
+ children: m("tourBuilder.triggerScheduled")
1303
1436
  })
1304
1437
  ]
1305
1438
  })] }),
1306
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1439
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1307
1440
  className: "block text-sm font-medium mb-2",
1308
1441
  htmlFor: "priority",
1309
- children: _("tourBuilder.labelPriority")
1310
- }), /* @__PURE__ */ h("input", {
1442
+ children: m("tourBuilder.labelPriority")
1443
+ }), /* @__PURE__ */ d("input", {
1311
1444
  id: "priority",
1312
1445
  type: "number",
1313
1446
  min: "1",
1314
1447
  max: "100",
1315
- value: F.priority || 50,
1448
+ value: I.priority || 50,
1316
1449
  onChange: (e) => {
1317
1450
  let t = Number.parseInt(e.target.value, 10) || 50;
1318
- I({
1319
- ...F,
1451
+ L({
1452
+ ...I,
1320
1453
  priority: t
1321
1454
  });
1322
1455
  },
1323
1456
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1324
- "aria-label": _("tourBuilder.labelPriority")
1457
+ "aria-label": m("tourBuilder.labelPriority")
1325
1458
  })] }),
1326
- /* @__PURE__ */ g("div", {
1459
+ /* @__PURE__ */ f("div", {
1327
1460
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1328
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1461
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1329
1462
  className: "block text-sm font-medium mb-2",
1330
1463
  htmlFor: "tour-start-date",
1331
- children: _("tourBuilder.labelStartDate", "Start Date")
1332
- }), /* @__PURE__ */ h("input", {
1464
+ children: m("tourBuilder.labelStartDate", "Start Date")
1465
+ }), /* @__PURE__ */ d("input", {
1333
1466
  id: "tour-start-date",
1334
1467
  type: "datetime-local",
1335
- value: Ke(F.startDate),
1336
- onChange: (e) => I({
1337
- ...F,
1468
+ value: $e(I.startDate),
1469
+ onChange: (e) => L({
1470
+ ...I,
1338
1471
  startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
1339
1472
  }),
1340
1473
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1341
- "aria-label": _("tourBuilder.labelStartDate", "Start Date")
1342
- })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
1474
+ "aria-label": m("tourBuilder.labelStartDate", "Start Date")
1475
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1343
1476
  className: "block text-sm font-medium mb-2",
1344
1477
  htmlFor: "tour-end-date",
1345
- children: _("tourBuilder.labelEndDate", "End Date")
1346
- }), /* @__PURE__ */ h("input", {
1478
+ children: m("tourBuilder.labelEndDate", "End Date")
1479
+ }), /* @__PURE__ */ d("input", {
1347
1480
  id: "tour-end-date",
1348
1481
  type: "datetime-local",
1349
- value: Ke(F.endDate),
1350
- onChange: (e) => I({
1351
- ...F,
1482
+ value: $e(I.endDate),
1483
+ onChange: (e) => L({
1484
+ ...I,
1352
1485
  endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
1353
1486
  }),
1354
1487
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1355
- "aria-label": _("tourBuilder.labelEndDate", "End Date")
1488
+ "aria-label": m("tourBuilder.labelEndDate", "End Date")
1356
1489
  })] })]
1357
1490
  })
1358
1491
  ]
1359
1492
  })]
1360
1493
  }),
1361
- ke && /* @__PURE__ */ g("div", {
1494
+ Ae && /* @__PURE__ */ f("div", {
1362
1495
  className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
1363
- children: [/* @__PURE__ */ h("h3", {
1496
+ children: [/* @__PURE__ */ d("h3", {
1364
1497
  className: "font-semibold text-status-error-text mb-2",
1365
- children: _("tourBuilder.errorTitle")
1366
- }), /* @__PURE__ */ h("p", {
1498
+ children: m("tourBuilder.errorTitle")
1499
+ }), /* @__PURE__ */ d("p", {
1367
1500
  className: "text-sm text-status-error-text",
1368
- children: ke.message
1501
+ children: Ae.message
1369
1502
  })]
1370
1503
  }),
1371
- Oe.length > 0 && /* @__PURE__ */ g("div", {
1504
+ P.length > 0 && /* @__PURE__ */ f("div", {
1372
1505
  className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
1373
- children: [/* @__PURE__ */ h("h3", {
1506
+ children: [/* @__PURE__ */ d("h3", {
1374
1507
  className: "font-semibold text-status-error-text mb-2",
1375
- children: _("tourBuilder.validationErrorsTitle")
1376
- }), /* @__PURE__ */ h("ul", {
1508
+ children: m("tourBuilder.validationErrorsTitle")
1509
+ }), /* @__PURE__ */ d("ul", {
1377
1510
  className: "list-disc list-inside space-y-1",
1378
- children: Oe.map((e) => /* @__PURE__ */ h("li", {
1511
+ children: P.map((e) => /* @__PURE__ */ d("li", {
1379
1512
  className: "text-sm text-status-error-text",
1380
- children: _(e.message, e.params)
1513
+ children: m(e.message, e.params)
1381
1514
  }, e.field))
1382
1515
  })]
1383
1516
  }),
1384
- /* @__PURE__ */ g("div", {
1517
+ /* @__PURE__ */ f("div", {
1385
1518
  className: "flex flex-wrap items-center gap-3",
1386
- children: [/* @__PURE__ */ h(re, {
1387
- permission: E ? a.TOUR_CREATE : a.TOUR_UPDATE,
1388
- children: /* @__PURE__ */ g(ue, {
1519
+ children: [/* @__PURE__ */ d(re, {
1520
+ permission: w ? a.TOUR_CREATE : a.TOUR_UPDATE,
1521
+ children: /* @__PURE__ */ f(me, {
1389
1522
  type: "submit",
1390
- disabled: De || !k,
1523
+ disabled: N || !D,
1391
1524
  className: "flex-1 min-w-[200px] min-h-[44px]",
1392
- children: [/* @__PURE__ */ h(oe, { size: 20 }), _(De ? "tourBuilder.saving" : v && v !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
1525
+ children: [/* @__PURE__ */ d(ue, { size: 20 }), m(N ? "tourBuilder.saving" : g && g !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
1393
1526
  })
1394
- }), v && v !== "new" && Xe.length > 0 && /* @__PURE__ */ h(de, { actions: Xe })]
1527
+ }), g && g !== "new" && it.length > 0 && /* @__PURE__ */ d(he, { actions: it })]
1395
1528
  })
1396
1529
  ]
1397
1530
  })
1398
1531
  ]
1399
- }) : /* @__PURE__ */ h("div", {
1532
+ }) : /* @__PURE__ */ d("div", {
1400
1533
  className: "flex h-full items-center justify-center p-3 sm:p-6",
1401
- children: /* @__PURE__ */ g("div", {
1534
+ children: /* @__PURE__ */ f("div", {
1402
1535
  className: "text-center space-y-4",
1403
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
1536
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h2", {
1404
1537
  className: "text-lg font-semibold text-text-primary mb-2",
1405
- children: _("tourBuilder.accessDeniedTitle")
1406
- }), /* @__PURE__ */ h("p", {
1538
+ children: m("tourBuilder.accessDeniedTitle")
1539
+ }), /* @__PURE__ */ d("p", {
1407
1540
  className: "text-sm text-text-secondary",
1408
- children: _(E ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
1409
- })] }), /* @__PURE__ */ h("button", {
1541
+ children: m(w ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
1542
+ })] }), /* @__PURE__ */ d("button", {
1410
1543
  type: "button",
1411
- onClick: Q,
1544
+ onClick: Qe,
1412
1545
  className: "inline-flex items-center justify-center rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent",
1413
- children: _("tourBuilder.goBack")
1546
+ children: m("tourBuilder.goBack")
1414
1547
  })]
1415
1548
  })
1416
1549
  });
1417
1550
  }
1418
1551
  //#endregion
1419
- export { x as TourBuilderPage };
1552
+ export { y as TourBuilderPage };
1420
1553
 
1421
1554
  //# sourceMappingURL=TourBuilderPage.js.map