@shuffleio/shuffle-mcps 0.0.63 → 0.0.64

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.
package/dist/index.mjs CHANGED
@@ -12,12 +12,12 @@ import {
12
12
  setDatastoreItem,
13
13
  setDatastoreItems,
14
14
  setRuntimeOrgId
15
- } from "./chunk-QC2DO6WV.mjs";
15
+ } from "./chunk-C7HCHOHU.mjs";
16
16
  import {
17
17
  fetchApps,
18
18
  fetchAppsViaApiConfig,
19
19
  invalidateAppsCache
20
- } from "./chunk-DSJHIKBO.mjs";
20
+ } from "./chunk-PL74JBB4.mjs";
21
21
  import {
22
22
  API_CONFIG,
23
23
  applyRegionFromPayload,
@@ -46,7 +46,7 @@ import {
46
46
  setHostBaseUrl,
47
47
  setRegionUrl,
48
48
  shuffleFetch
49
- } from "./chunk-XNE7PKME.mjs";
49
+ } from "./chunk-2PFFYHRO.mjs";
50
50
  import {
51
51
  backfillAppImages,
52
52
  deduplicateAuthApps
@@ -371,7 +371,8 @@ function installAllBrowserShims() {
371
371
  installAllBrowserShims();
372
372
 
373
373
  // index.ts
374
- import React49 from "react";
374
+ import React50 from "react";
375
+ import { QueryClient as QueryClient3, QueryClientProvider as QueryClientProvider3, useQueryClient as useQueryClient9 } from "@tanstack/react-query";
375
376
 
376
377
  // ShuffleMcpThemeProvider.tsx
377
378
  import React from "react";
@@ -594,8 +595,392 @@ var ShuffleMcpThemeProvider = ({
594
595
  ] }) }) });
595
596
  };
596
597
 
598
+ // ../context/AuthContext.tsx
599
+ import { createContext, useContext, useState, useEffect, useMemo, useCallback, useRef } from "react";
600
+
601
+ // ../lib/tenantApiUrl.ts
602
+ var STORAGE_KEY = "shuffle-tenant-regions";
603
+ var loadPersistedRegions = () => {
604
+ const map = /* @__PURE__ */ new Map();
605
+ if (typeof window === "undefined") return map;
606
+ try {
607
+ const raw = window.localStorage.getItem(STORAGE_KEY);
608
+ if (!raw) return map;
609
+ const parsed = JSON.parse(raw);
610
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
611
+ for (const [orgId, region] of Object.entries(parsed)) {
612
+ if (typeof orgId === "string" && typeof region === "string" && region.trim()) {
613
+ map.set(orgId, region.trim());
614
+ }
615
+ }
616
+ }
617
+ } catch {
618
+ }
619
+ return map;
620
+ };
621
+ var regionByOrg = loadPersistedRegions();
622
+ var persistRegions = () => {
623
+ if (typeof window === "undefined") return;
624
+ try {
625
+ window.localStorage.setItem(STORAGE_KEY, JSON.stringify(Object.fromEntries(regionByOrg)));
626
+ } catch {
627
+ }
628
+ };
629
+ var registerTenantRegions = (orgs) => {
630
+ if (!Array.isArray(orgs)) return;
631
+ let changed = false;
632
+ for (const o of orgs) {
633
+ if (o?.id && typeof o.region_url === "string" && o.region_url.trim()) {
634
+ const next = o.region_url.trim();
635
+ if (regionByOrg.get(o.id) !== next) {
636
+ regionByOrg.set(o.id, next);
637
+ changed = true;
638
+ }
639
+ }
640
+ }
641
+ if (changed) persistRegions();
642
+ };
643
+ var getTenantRegionBase = (orgId, regionUrl) => {
644
+ if (isDevEnvironment()) return null;
645
+ const raw = regionUrl || (orgId ? regionByOrg.get(orgId) : void 0);
646
+ if (!raw) return null;
647
+ const mapped = (mapCloudRegionUrl(raw) || "").replace(/\/+$/, "");
648
+ if (!mapped) return null;
649
+ const current = (API_CONFIG.baseUrl || "").replace(/\/+$/, "");
650
+ if (mapped === current) return null;
651
+ return mapped;
652
+ };
653
+ var tenantApiUrl = (endpoint, orgId, regionUrl) => {
654
+ const base3 = getTenantRegionBase(orgId, regionUrl);
655
+ return base3 ? `${base3}${endpoint}` : getApiUrl(endpoint);
656
+ };
657
+
658
+ // ../Shuffle-Core/views/appsFetchCache.ts
659
+ var APPS_TTL_MS = 6e4;
660
+ var JSON_CACHE_TTL_MS = 12e4;
661
+ var ENVIRONMENTS_TTL_MS = 12e4;
662
+ var WORKFLOWS_TTL_MS = 5 * 60 * 1e3;
663
+ var _jsonCache = /* @__PURE__ */ new Map();
664
+ var _inFlightPromises = /* @__PURE__ */ new Map();
665
+ function normalizeEndpointKey(url, init) {
666
+ let pathname = url;
667
+ let search = "";
668
+ try {
669
+ const parsed = new URL(url, "https://shuffle.internal");
670
+ pathname = parsed.pathname;
671
+ search = parsed.search;
672
+ } catch {
673
+ }
674
+ let orgId = "";
675
+ if (init?.headers) {
676
+ if (init.headers instanceof Headers) {
677
+ orgId = init.headers.get("Org-Id") || "";
678
+ } else if (Array.isArray(init.headers)) {
679
+ const match = init.headers.find(([k]) => k.toLowerCase() === "org-id");
680
+ if (match) orgId = match[1];
681
+ } else if (typeof init.headers === "object") {
682
+ orgId = init.headers["Org-Id"] || init.headers["org-id"] || "";
683
+ }
684
+ }
685
+ return `${pathname}${search}${orgId ? `::org:${orgId}` : ""}`;
686
+ }
687
+ async function fetchJsonCached(url, init, ttlMs = JSON_CACHE_TTL_MS, force = false) {
688
+ const cacheKey2 = normalizeEndpointKey(url, init);
689
+ const now = Date.now();
690
+ if (!force) {
691
+ const cached2 = _jsonCache.get(cacheKey2);
692
+ if (cached2 && now - cached2.ts < ttlMs) {
693
+ return cached2.data;
694
+ }
695
+ const inFlight = _inFlightPromises.get(cacheKey2);
696
+ if (inFlight) {
697
+ return inFlight;
698
+ }
699
+ }
700
+ const p = (async () => {
701
+ try {
702
+ const res = await fetch(url, init);
703
+ if (!res.ok) {
704
+ const prev = _jsonCache.get(cacheKey2);
705
+ if (prev) return prev.data;
706
+ throw new Error(`HTTP ${res.status}`);
707
+ }
708
+ const data = await res.json();
709
+ _jsonCache.set(cacheKey2, { ts: Date.now(), data });
710
+ return data;
711
+ } finally {
712
+ _inFlightPromises.delete(cacheKey2);
713
+ }
714
+ })();
715
+ _inFlightPromises.set(cacheKey2, p);
716
+ return p;
717
+ }
718
+ async function fetchAppsCached(url, init) {
719
+ const data = await fetchJsonCached(url, init, APPS_TTL_MS);
720
+ return new Response(JSON.stringify(data), {
721
+ status: 200,
722
+ headers: { "Content-Type": "application/json" }
723
+ });
724
+ }
725
+ async function fetchEnvironmentsCached(url, init, force = false) {
726
+ return fetchJsonCached(url, init, ENVIRONMENTS_TTL_MS, force);
727
+ }
728
+ var _workflowsCache = null;
729
+ var _workflowsCacheTs = 0;
730
+ function invalidateWorkflowsCache() {
731
+ _workflowsCache = null;
732
+ _workflowsCacheTs = 0;
733
+ for (const key of _jsonCache.keys()) {
734
+ if (key.includes("/api/v1/workflows")) {
735
+ _jsonCache.delete(key);
736
+ }
737
+ }
738
+ }
739
+ function getCachedWorkflows() {
740
+ if (_workflowsCache && Date.now() - _workflowsCacheTs < WORKFLOWS_TTL_MS) {
741
+ return _workflowsCache;
742
+ }
743
+ return _workflowsCache;
744
+ }
745
+ function setCachedWorkflows(list) {
746
+ _workflowsCache = list;
747
+ _workflowsCacheTs = Date.now();
748
+ }
749
+ async function fetchWorkflowsCached(url, init, force = false) {
750
+ try {
751
+ if (force) {
752
+ invalidateWorkflowsCache();
753
+ }
754
+ const data = await fetchJsonCached(url, init, WORKFLOWS_TTL_MS, force);
755
+ const list = Array.isArray(data) ? data : data?.workflows || [];
756
+ _workflowsCache = list;
757
+ _workflowsCacheTs = Date.now();
758
+ return list;
759
+ } catch {
760
+ return _workflowsCache || [];
761
+ }
762
+ }
763
+ async function fetchWorkflowByIdCached(url, wfId, init) {
764
+ if (_workflowsCache && _workflowsCache.length > 0) {
765
+ const existing = _workflowsCache.find((w) => w.id === wfId);
766
+ if (existing && (existing.actions?.length || existing.triggers?.length)) {
767
+ return existing;
768
+ }
769
+ }
770
+ return fetchJsonCached(url, init, WORKFLOWS_TTL_MS);
771
+ }
772
+ async function fetchOrgCached(url, init) {
773
+ return fetchJsonCached(url, init, WORKFLOWS_TTL_MS);
774
+ }
775
+ async function fetchCategoryAutomationsCached(url, init) {
776
+ return fetchJsonCached(url, init, JSON_CACHE_TTL_MS);
777
+ }
778
+ var _cachedIntegrations = null;
779
+ var _cachedCatalogIcons = {};
780
+ var _cachedCategoryAppNames = null;
781
+ var _cachedValidatedAppsByCategory = null;
782
+ var _cachedValidatedCategories = null;
783
+ var _cachedValidatedAppNames = null;
784
+ var _alluvialCache = null;
785
+ var _algoliaIconCache = /* @__PURE__ */ new Map();
786
+ function getCachedIntegrations() {
787
+ return _cachedIntegrations;
788
+ }
789
+ function setCachedIntegrations(items) {
790
+ _cachedIntegrations = items;
791
+ }
792
+ function getCachedCatalogIcons() {
793
+ return _cachedCatalogIcons;
794
+ }
795
+ function updateCachedCatalogIcons(icons) {
796
+ Object.assign(_cachedCatalogIcons, icons);
797
+ }
798
+ function getCachedCategoryAppNames() {
799
+ return _cachedCategoryAppNames;
800
+ }
801
+ function setCachedCategoryAppNames(val) {
802
+ _cachedCategoryAppNames = val;
803
+ }
804
+ function getCachedValidatedAppsByCategory() {
805
+ return _cachedValidatedAppsByCategory;
806
+ }
807
+ function setCachedValidatedAppsByCategory(val) {
808
+ _cachedValidatedAppsByCategory = val;
809
+ }
810
+ function getCachedValidatedCategories() {
811
+ return _cachedValidatedCategories;
812
+ }
813
+ function setCachedValidatedCategories(val) {
814
+ _cachedValidatedCategories = val;
815
+ }
816
+ function getCachedValidatedAppNames() {
817
+ return _cachedValidatedAppNames;
818
+ }
819
+ function setCachedValidatedAppNames(val) {
820
+ _cachedValidatedAppNames = val;
821
+ }
822
+ function getAlluvialCache() {
823
+ return _alluvialCache;
824
+ }
825
+ function setAlluvialCache(cache3) {
826
+ _alluvialCache = cache3;
827
+ }
828
+ function updateAlluvialIngest(appName, enabled, normalizeAppName6) {
829
+ if (!_alluvialCache) return;
830
+ const next = new Set(_alluvialCache.ingestAppNames);
831
+ const norm5 = normalizeAppName6(appName);
832
+ if (enabled) next.add(norm5);
833
+ else next.delete(norm5);
834
+ _alluvialCache.ingestAppNames = next;
835
+ _alluvialCache.ts = Date.now();
836
+ }
837
+ function updateAlluvialForward(desiredAppNames, normalizeAppName6) {
838
+ if (!_alluvialCache) return;
839
+ _alluvialCache.forwardAppNames = new Set(desiredAppNames.map(normalizeAppName6));
840
+ _alluvialCache.ts = Date.now();
841
+ }
842
+ function invalidateAuthCache() {
843
+ for (const key of _jsonCache.keys()) {
844
+ if (key.includes("/api/v1/apps/authentication")) {
845
+ _jsonCache.delete(key);
846
+ }
847
+ }
848
+ for (const key of _inFlightPromises.keys()) {
849
+ if (key.includes("/api/v1/apps/authentication")) {
850
+ _inFlightPromises.delete(key);
851
+ }
852
+ }
853
+ }
854
+ function invalidateAppsCache2() {
855
+ _jsonCache.clear();
856
+ _inFlightPromises.clear();
857
+ _workflowsCache = null;
858
+ _cachedIntegrations = null;
859
+ _cachedCatalogIcons = {};
860
+ _cachedCategoryAppNames = null;
861
+ _cachedValidatedAppsByCategory = null;
862
+ _cachedValidatedCategories = null;
863
+ _cachedValidatedAppNames = null;
864
+ _alluvialCache = null;
865
+ if (typeof window !== "undefined") {
866
+ window.dispatchEvent(new CustomEvent("shuffle-apps-invalidated"));
867
+ }
868
+ }
869
+
870
+ // authenticatedApps.ts
871
+ var TTL_MS = 3e4;
872
+ var cache = /* @__PURE__ */ new Map();
873
+ var cacheKey = (crossOrgId) => crossOrgId || "";
874
+ var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
875
+ var applyValidationStaleness = (data) => {
876
+ const cutoff = Date.now() - THIRTY_DAYS_MS;
877
+ return data.map((entry) => {
878
+ const v = entry.validation;
879
+ if (v?.valid === true && v?.last_valid) {
880
+ const lastValidMs = v.last_valid > 1e12 ? v.last_valid : v.last_valid * 1e3;
881
+ if (lastValidMs < cutoff) {
882
+ return { ...entry, validation: { ...v, valid: false, error: "Validation expired (older than 30 days)" } };
883
+ }
884
+ }
885
+ return entry;
886
+ });
887
+ };
888
+ var doFetch = async (crossOrgId) => {
889
+ if (!hasShuffleAuth()) return { data: [], failed: false };
890
+ const headers = {
891
+ ...getAuthHeader(crossOrgId ?? void 0)
892
+ };
893
+ try {
894
+ const resp = await fetch(getApiUrl("/api/v1/apps/authentication"), {
895
+ credentials: "include",
896
+ headers
897
+ });
898
+ if (!resp.ok) return { data: [], failed: true };
899
+ const result = await resp.json();
900
+ const data = result?.data || result;
901
+ if (!Array.isArray(data)) return { data: [], failed: true };
902
+ return { data: applyValidationStaleness(data), failed: false };
903
+ } catch {
904
+ return { data: [], failed: true };
905
+ }
906
+ };
907
+ var fetchAuthenticatedApps = (crossOrgId) => {
908
+ const key = cacheKey(crossOrgId);
909
+ const entry = cache.get(key) || {};
910
+ if (entry.data && entry.fetchedAt && Date.now() - entry.fetchedAt < TTL_MS) {
911
+ return Promise.resolve(entry.data);
912
+ }
913
+ if (entry.promise) return entry.promise;
914
+ const promise = doFetch(crossOrgId).then((outcome) => {
915
+ if (outcome.failed) {
916
+ const previous = cache.get(key)?.data;
917
+ cache.delete(key);
918
+ return previous || [];
919
+ }
920
+ cache.set(key, { data: outcome.data, fetchedAt: Date.now() });
921
+ return outcome.data;
922
+ }).catch(() => {
923
+ cache.delete(key);
924
+ return [];
925
+ });
926
+ cache.set(key, { ...entry, promise });
927
+ return promise;
928
+ };
929
+ var invalidateAuthenticatedAppsCache = (crossOrgId) => {
930
+ if (crossOrgId === void 0) {
931
+ cache.clear();
932
+ } else {
933
+ cache.delete(cacheKey(crossOrgId));
934
+ }
935
+ invalidateAuthCache();
936
+ };
937
+
938
+ // ../context/AuthContext.tsx
939
+ import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
940
+ var TAB_FOCUS_GETINFO_COOLDOWN_MS = 60 * 1e3;
941
+ var AuthContext = createContext(void 0);
942
+ var useAuth = () => {
943
+ const context = useContext(AuthContext);
944
+ if (context === void 0) {
945
+ throw new Error("useAuth must be used within an AuthProvider");
946
+ }
947
+ return context;
948
+ };
949
+ var useOptionalAuth = () => useContext(AuthContext);
950
+ var AuthFallbackProvider = ({ children: children2 }) => {
951
+ const existing = useContext(AuthContext);
952
+ const fallback = useMemo(() => {
953
+ let userInfo = null;
954
+ try {
955
+ const raw = typeof window !== "undefined" ? window.localStorage.getItem("shuffle_user_info") || window.localStorage.getItem("userinfo") : null;
956
+ const parsed = raw ? JSON.parse(raw) : null;
957
+ userInfo = parsed && typeof parsed === "object" ? parsed : null;
958
+ } catch {
959
+ userInfo = null;
960
+ }
961
+ return {
962
+ isAuthenticated: !!userInfo,
963
+ sessionToken: null,
964
+ userInfo,
965
+ isLoading: false,
966
+ orgMismatchWarning: false,
967
+ login: async () => false,
968
+ logout: async () => {
969
+ },
970
+ refreshUserInfo: async () => {
971
+ },
972
+ setActiveOrg: async () => {
973
+ },
974
+ dismissOrgMismatch: () => {
975
+ }
976
+ };
977
+ }, []);
978
+ if (existing !== void 0) return /* @__PURE__ */ jsx2(Fragment, { children: children2 });
979
+ return /* @__PURE__ */ jsx2(AuthContext.Provider, { value: fallback, children: children2 });
980
+ };
981
+
597
982
  // views/ShuffleMCP.tsx
598
- import React44, { useState as useState70, useEffect as useEffect65, useRef as useRef32, useCallback as useCallback45, useMemo as useMemo42, useImperativeHandle } from "react";
983
+ import React45, { useState as useState70, useEffect as useEffect65, useRef as useRef32, useCallback as useCallback45, useMemo as useMemo42, useImperativeHandle } from "react";
599
984
  import { algoliasearch as algoliasearch3 } from "algoliasearch";
600
985
  import { Tooltip as Tooltip28 } from "@mui/material";
601
986
 
@@ -603,7 +988,7 @@ import { Tooltip as Tooltip28 } from "@mui/material";
603
988
  import { Drawer as Drawer6 } from "@mui/material";
604
989
 
605
990
  // components/Markdown.tsx
606
- import { useMemo } from "react";
991
+ import { useMemo as useMemo2 } from "react";
607
992
  import { Box as Box2, useTheme } from "@mui/material";
608
993
  import ReactMarkdown from "react-markdown";
609
994
  import remarkGfm from "remark-gfm";
@@ -1373,7 +1758,7 @@ var defaultCollapsed = ({
1373
1758
 
1374
1759
  // components/VideoEmbed.tsx
1375
1760
  import { Box } from "@mui/material";
1376
- import { jsx as jsx2 } from "react/jsx-runtime";
1761
+ import { jsx as jsx3 } from "react/jsx-runtime";
1377
1762
  var FILE_EXT = /\.(mp4|webm|ogg|ogv|mov)(\?.*)?$/i;
1378
1763
  function resolveVideoUrl(raw) {
1379
1764
  if (!raw || typeof raw !== "string") return null;
@@ -1412,7 +1797,7 @@ function resolveVideoUrl(raw) {
1412
1797
  var VideoEmbed = ({
1413
1798
  video,
1414
1799
  title
1415
- }) => /* @__PURE__ */ jsx2(
1800
+ }) => /* @__PURE__ */ jsx3(
1416
1801
  Box,
1417
1802
  {
1418
1803
  component: "span",
@@ -1428,7 +1813,7 @@ var VideoEmbed = ({
1428
1813
  border: "1px solid hsl(var(--border))",
1429
1814
  backgroundColor: "hsl(var(--muted))"
1430
1815
  },
1431
- children: video.kind === "file" ? /* @__PURE__ */ jsx2(
1816
+ children: video.kind === "file" ? /* @__PURE__ */ jsx3(
1432
1817
  "video",
1433
1818
  {
1434
1819
  src: video.src,
@@ -1436,7 +1821,7 @@ var VideoEmbed = ({
1436
1821
  preload: "metadata",
1437
1822
  style: { width: "100%", height: "100%", display: "block", background: "#000" }
1438
1823
  }
1439
- ) : /* @__PURE__ */ jsx2(
1824
+ ) : /* @__PURE__ */ jsx3(
1440
1825
  "iframe",
1441
1826
  {
1442
1827
  src: video.src,
@@ -1452,7 +1837,7 @@ var VideoEmbed = ({
1452
1837
  );
1453
1838
 
1454
1839
  // components/Markdown.tsx
1455
- import { jsx as jsx3 } from "react/jsx-runtime";
1840
+ import { jsx as jsx4 } from "react/jsx-runtime";
1456
1841
  var tryParseJson = (raw) => {
1457
1842
  const trimmed = raw.trim();
1458
1843
  if (!trimmed) return null;
@@ -1478,7 +1863,7 @@ var jsonBoxSx = {
1478
1863
  var MarkdownJsonBlock = ({ src }) => {
1479
1864
  const theme = useTheme();
1480
1865
  const isDark = theme.palette.mode === "dark";
1481
- return /* @__PURE__ */ jsx3(Box2, { sx: jsonBoxSx, children: /* @__PURE__ */ jsx3(
1866
+ return /* @__PURE__ */ jsx4(Box2, { sx: jsonBoxSx, children: /* @__PURE__ */ jsx4(
1482
1867
  JsonView,
1483
1868
  {
1484
1869
  src,
@@ -1543,12 +1928,12 @@ var defaultComponents = {
1543
1928
  const video = isInternal ? null : resolveVideoUrl(href);
1544
1929
  if (video) {
1545
1930
  const label = typeof children2 === "string" ? children2 : void 0;
1546
- return /* @__PURE__ */ jsx3(VideoEmbed, { video, title: label });
1931
+ return /* @__PURE__ */ jsx4(VideoEmbed, { video, title: label });
1547
1932
  }
1548
1933
  const resolved = typeof href === "string" ? resolveProductLink(href) : null;
1549
1934
  const targetUrl = resolved ? resolved.url : href;
1550
1935
  const openExternal = resolved ? !resolved.isInternal : !isInternal;
1551
- return /* @__PURE__ */ jsx3(
1936
+ return /* @__PURE__ */ jsx4(
1552
1937
  "a",
1553
1938
  {
1554
1939
  href: targetUrl,
@@ -1561,8 +1946,8 @@ var defaultComponents = {
1561
1946
  },
1562
1947
  img: ({ src, alt, ...props }) => {
1563
1948
  const video = resolveVideoUrl(src);
1564
- if (video) return /* @__PURE__ */ jsx3(VideoEmbed, { video, title: alt });
1565
- return /* @__PURE__ */ jsx3(
1949
+ if (video) return /* @__PURE__ */ jsx4(VideoEmbed, { video, title: alt });
1950
+ return /* @__PURE__ */ jsx4(
1566
1951
  "img",
1567
1952
  {
1568
1953
  src,
@@ -1578,8 +1963,8 @@ var defaultComponents = {
1578
1963
  const raw = child?.props?.children;
1579
1964
  const text2 = Array.isArray(raw) ? raw.join("") : typeof raw === "string" ? raw : "";
1580
1965
  const parsed = tryParseJson(text2);
1581
- if (parsed) return /* @__PURE__ */ jsx3(MarkdownJsonBlock, { src: parsed });
1582
- return /* @__PURE__ */ jsx3("pre", { ...props, children: children2 });
1966
+ if (parsed) return /* @__PURE__ */ jsx4(MarkdownJsonBlock, { src: parsed });
1967
+ return /* @__PURE__ */ jsx4("pre", { ...props, children: children2 });
1583
1968
  }
1584
1969
  };
1585
1970
  var ShuffleMarkdown = ({
@@ -1590,36 +1975,36 @@ var ShuffleMarkdown = ({
1590
1975
  sx,
1591
1976
  className
1592
1977
  }) => {
1593
- const plugins = useMemo(
1978
+ const plugins = useMemo2(
1594
1979
  () => [remarkGfm, ...disableBreaks ? [] : [remarkBreaks], ...remarkPlugins ?? []],
1595
1980
  [disableBreaks, remarkPlugins]
1596
1981
  );
1597
- const merged = useMemo(() => {
1982
+ const merged = useMemo2(() => {
1598
1983
  const next = { ...defaultComponents, ...components ?? {} };
1599
1984
  if (components?.a) {
1600
1985
  const Custom = components.a;
1601
1986
  next.a = (props) => {
1602
1987
  const video = resolveVideoUrl(props?.href);
1603
- if (video) return /* @__PURE__ */ jsx3(VideoEmbed, { video, title: typeof props?.children === "string" ? props.children : void 0 });
1604
- return /* @__PURE__ */ jsx3(Custom, { ...props });
1988
+ if (video) return /* @__PURE__ */ jsx4(VideoEmbed, { video, title: typeof props?.children === "string" ? props.children : void 0 });
1989
+ return /* @__PURE__ */ jsx4(Custom, { ...props });
1605
1990
  };
1606
1991
  }
1607
1992
  if (components?.img) {
1608
1993
  const Custom = components.img;
1609
1994
  next.img = (props) => {
1610
1995
  const video = resolveVideoUrl(props?.src);
1611
- if (video) return /* @__PURE__ */ jsx3(VideoEmbed, { video, title: props?.alt });
1612
- return /* @__PURE__ */ jsx3(Custom, { ...props });
1996
+ if (video) return /* @__PURE__ */ jsx4(VideoEmbed, { video, title: props?.alt });
1997
+ return /* @__PURE__ */ jsx4(Custom, { ...props });
1613
1998
  };
1614
1999
  }
1615
2000
  return next;
1616
2001
  }, [components]);
1617
- return /* @__PURE__ */ jsx3(Box2, { className, sx: { ...baseSx, ...sx }, children: /* @__PURE__ */ jsx3(ReactMarkdown, { remarkPlugins: plugins, rehypePlugins: [rehypeSanitize], components: merged, children: children2 ?? "" }) });
2002
+ return /* @__PURE__ */ jsx4(Box2, { className, sx: { ...baseSx, ...sx }, children: /* @__PURE__ */ jsx4(ReactMarkdown, { remarkPlugins: plugins, rehypePlugins: [rehypeSanitize], components: merged, children: children2 ?? "" }) });
1618
2003
  };
1619
2004
  var Markdown_default = ShuffleMarkdown;
1620
2005
 
1621
2006
  // views/AppDetailContent.tsx
1622
- import { useState as useState69, useEffect as useEffect64, useMemo as useMemo41, useCallback as useCallback44, useRef as useRef30 } from "react";
2007
+ import React43, { useState as useState69, useEffect as useEffect64, useMemo as useMemo41, useCallback as useCallback44, useRef as useRef30 } from "react";
1623
2008
 
1624
2009
  // toast.ts
1625
2010
  var defaultImpl = (arg, opts) => {
@@ -1666,7 +2051,7 @@ import {
1666
2051
  import { motion as motion17 } from "framer-motion";
1667
2052
 
1668
2053
  // components/AppAuthConfig.tsx
1669
- import { useState as useState3, useEffect as useEffect4, useRef as useRef2, useCallback, useMemo as useMemo2 } from "react";
2054
+ import { useState as useState4, useEffect as useEffect5, useRef as useRef3, useCallback as useCallback2, useMemo as useMemo3 } from "react";
1670
2055
  import {
1671
2056
  CheckCircle2 as CheckCircleIcon,
1672
2057
  X as CloseIcon,
@@ -1681,7 +2066,7 @@ import {
1681
2066
 
1682
2067
  // components/AuthStatusChip.tsx
1683
2068
  import { Chip, Tooltip } from "@mui/material";
1684
- import { jsx as jsx4 } from "react/jsx-runtime";
2069
+ import { jsx as jsx5 } from "react/jsx-runtime";
1685
2070
  var STYLES = {
1686
2071
  validated: {
1687
2072
  label: "Validated",
@@ -1721,7 +2106,7 @@ var STYLES = {
1721
2106
  };
1722
2107
  var AuthStatusChip = ({ status, label, dense, tooltip }) => {
1723
2108
  const style = STYLES[status];
1724
- const chip = /* @__PURE__ */ jsx4(
2109
+ const chip = /* @__PURE__ */ jsx5(
1725
2110
  Chip,
1726
2111
  {
1727
2112
  label: label || style.label,
@@ -1738,14 +2123,14 @@ var AuthStatusChip = ({ status, label, dense, tooltip }) => {
1738
2123
  }
1739
2124
  );
1740
2125
  if (!tooltip) return chip;
1741
- return /* @__PURE__ */ jsx4(Tooltip, { title: tooltip, arrow: true, placement: "top", children: chip });
2126
+ return /* @__PURE__ */ jsx5(Tooltip, { title: tooltip, arrow: true, placement: "top", children: chip });
1742
2127
  };
1743
2128
 
1744
2129
  // validatedAuthMemory.ts
1745
- var STORAGE_KEY = "shuffle-validated-auth-ids";
2130
+ var STORAGE_KEY2 = "shuffle-validated-auth-ids";
1746
2131
  var read = () => {
1747
2132
  try {
1748
- const raw = localStorage.getItem(STORAGE_KEY);
2133
+ const raw = localStorage.getItem(STORAGE_KEY2);
1749
2134
  const parsed = raw ? JSON.parse(raw) : [];
1750
2135
  return Array.isArray(parsed) ? parsed.filter((v) => typeof v === "string") : [];
1751
2136
  } catch {
@@ -1759,20 +2144,20 @@ var rememberValidatedAuth = (authId) => {
1759
2144
  const ids = read();
1760
2145
  if (ids.includes(authId)) return;
1761
2146
  ids.push(authId);
1762
- localStorage.setItem(STORAGE_KEY, JSON.stringify(ids.slice(-50)));
2147
+ localStorage.setItem(STORAGE_KEY2, JSON.stringify(ids.slice(-50)));
1763
2148
  } catch {
1764
2149
  }
1765
2150
  };
1766
2151
  var forgetValidatedAuth = (authId) => {
1767
2152
  if (!authId) return;
1768
2153
  try {
1769
- localStorage.setItem(STORAGE_KEY, JSON.stringify(read().filter((id) => id !== authId)));
2154
+ localStorage.setItem(STORAGE_KEY2, JSON.stringify(read().filter((id) => id !== authId)));
1770
2155
  } catch {
1771
2156
  }
1772
2157
  };
1773
2158
 
1774
2159
  // drawerLayer.ts
1775
- import { useEffect, useState } from "react";
2160
+ import { useEffect as useEffect2, useState as useState2 } from "react";
1776
2161
  var STACK_KEY = "__shuffleOverlayStack";
1777
2162
  var COUNTER_KEY = "__shuffleDrawerLayerTop";
1778
2163
  var AUTO_LAYER_KEY = "__shuffleOverlayAutoLayerInstalled";
@@ -1850,8 +2235,8 @@ var bringSurfaceToFront = (idOrElement) => {
1850
2235
  };
1851
2236
  var useOverlayLayer = (open, options) => {
1852
2237
  const base3 = options?.base ?? OVERLAY_BASE;
1853
- const [zIndex, setZIndex] = useState(() => open ? getTopSurfaceZIndex(base3) + SURFACE_STEP : base3);
1854
- useEffect(() => {
2238
+ const [zIndex, setZIndex] = useState2(() => open ? getTopSurfaceZIndex(base3) + SURFACE_STEP : base3);
2239
+ useEffect2(() => {
1855
2240
  if (!open) return;
1856
2241
  const id = "hook_" + Math.random().toString(36).substring(2, 9);
1857
2242
  const allocated = allocateSurfaceLayer(id, null, base3);
@@ -2042,7 +2427,7 @@ import {
2042
2427
  import { motion } from "framer-motion";
2043
2428
 
2044
2429
  // components/AppFallbackIcon.tsx
2045
- import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
2430
+ import { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
2046
2431
 
2047
2432
  // ../assets/shuffle-logo.png
2048
2433
  var shuffle_logo_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK4AAACuCAYAAACvDDbuAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAArqADAAQAAAABAAAArgAAAABZ+F9+AABAAElEQVR4Ae29bax2bXoWdO/9vFM6rZ2m0TbTpn60QDNo/QhFKhFo/OEPkRDRNKFGCPxQY2I1FkyUaNTEmPiDmIiJ0T9Qm6CxaI21bSzBWCiC2AmRVvsBdGowbaWgcdrO2Hmf59mex3F+n9e59t7P+7zvMB1YM3ut6zrO4zjO87rWtda97nvfz37vbm+4Pfy+2xe/e7t9/Yu72296eLj9Q3d3t4893O6+Umw+cnu4vQO7h+n5QOjudpP/X20iOnSVfwaBhKd1bg8PS47XSNpxqblXsumcgZj8X8ZbtqIPvGBkWl/iUd+RF8SpA3aPnc5J+AMpXJpmDkSx+dgQyZqNRxAs9e+TbhyEZYu0x9wkT/2zr8qyb9qHl5L3kxL9Wfn5Ucnwpx/u7v7kpz/z7v/20e/4v36xqJ5sPpKxax/+9dvf+uozt98i8/bNt/u7Xy+j+tuE8SJHN/jejdEDONNh4I4q1XtuIMfmofjKbZPkevHDwoVt+GQOQqsOeuGFBn1cgXbC0eU2OQX3pnjA5k7+1+wu9blo70ybs+Smchx1zxyixXUsSXO8qu6LVmuaHMtzaAuPwuyrj9cneAVAK3w0pbRXcv5/To4/JN0/evfyQ9/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XIgxcbFEx6KRW1KMLBrPQdQLmCX1kVLfeo8jSIYpW/GSUAD7FfeFd/0ODQPAaTfIJ93t2IQ64IN+WTr7jtf373+9776e//4TzhlHi3bhLP/s7/z7/viD9//wm+TifmXZYJ/rQg+hKguCGkw12ojEXuJj8LSV1umY9xjigFiy2L7naHqS7s06YrvHoRhz9Nn1Beuc3A0bUBmHn1prDXOIigQZn3sgfY5iwLaM69/pETntrObg157IkytlTr81lrV0W4qqQO88YmB1pLhvAFQfYbg4vNmks/IXPxZeUj/j2/y6cFXffd3f4qci91wumAJ/PO/81d+xcvb7bfIvP9TMtW/Tgr5ckn4IpNXbbGNEc87rXEi7nriQLXx2N0YEupLPocQ4122xwDXuc368xOELEm02VFdVCZdi/WTY/5NBwxb1sJwGRsiKVnymtpvGPuizTEgWxpqXvXPGsghb8FQqwigQTRrg0BjaOm26/urAJiD94Avd939VfljLH/24eH1f/n6w7fv++rv+uN/zUwfPQynR7kM8g589/N/z+uH+98kz1G/QYb0MUn+UTl+qRDynwKBHaNdFm3EaCu7Xgon7FlXe9fBDcjrddEObtSg9TGnaBUWbsTdFceyMa53TDiHDpTHtBJr3LAs9YW+YG5bFrxJhV1+Z32hxcxEyHOeXhopeNeUegrH7XD0CxnJUss777vS/3m5q/6M/OX6H3u4e/1nXj+88yfx3QP8Grd6PNX+/wHcd7dpccdg9gAAAABJRU5ErkJggg==";
@@ -2275,14 +2660,14 @@ var getBuiltInAppImage = (name) => {
2275
2660
  };
2276
2661
 
2277
2662
  // components/AppFallbackIcon.tsx
2278
- import { jsx as jsx5 } from "react/jsx-runtime";
2663
+ import { jsx as jsx6 } from "react/jsx-runtime";
2279
2664
  var norm = (s) => s.toLowerCase().replace(/[\s_\-]+/g, "_");
2280
- var STORAGE_KEY2 = "shuffle:app-icon-cache:v1";
2665
+ var STORAGE_KEY3 = "shuffle:app-icon-cache:v1";
2281
2666
  var STORAGE_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
2282
2667
  var readPersisted = () => {
2283
2668
  if (typeof window === "undefined") return {};
2284
2669
  try {
2285
- const raw = window.localStorage.getItem(STORAGE_KEY2);
2670
+ const raw = window.localStorage.getItem(STORAGE_KEY3);
2286
2671
  if (!raw) return {};
2287
2672
  const parsed = JSON.parse(raw);
2288
2673
  return parsed && typeof parsed === "object" ? parsed : {};
@@ -2295,7 +2680,7 @@ var writePersisted = (key, url) => {
2295
2680
  try {
2296
2681
  const map = readPersisted();
2297
2682
  map[key] = { url, ts: Date.now() };
2298
- window.localStorage.setItem(STORAGE_KEY2, JSON.stringify(map));
2683
+ window.localStorage.setItem(STORAGE_KEY3, JSON.stringify(map));
2299
2684
  } catch {
2300
2685
  }
2301
2686
  };
@@ -2363,18 +2748,18 @@ var AppFallbackIcon = ({
2363
2748
  className,
2364
2749
  alt
2365
2750
  }) => {
2366
- const [src, setSrc] = useState2(() => resolveInitialSrc(imageUrl, name));
2367
- const [errored, setErrored] = useState2(false);
2368
- const lookedUpRef = useRef(false);
2369
- useEffect2(() => {
2751
+ const [src, setSrc] = useState3(() => resolveInitialSrc(imageUrl, name));
2752
+ const [errored, setErrored] = useState3(false);
2753
+ const lookedUpRef = useRef2(false);
2754
+ useEffect3(() => {
2370
2755
  if (imageUrl && name) writePersisted(norm(name), imageUrl);
2371
2756
  }, [imageUrl, name]);
2372
- useEffect2(() => {
2757
+ useEffect3(() => {
2373
2758
  setSrc(resolveInitialSrc(imageUrl, name));
2374
2759
  setErrored(false);
2375
2760
  lookedUpRef.current = false;
2376
2761
  }, [imageUrl, name]);
2377
- useEffect2(() => {
2762
+ useEffect3(() => {
2378
2763
  if (lookedUpRef.current) return;
2379
2764
  if (src) return;
2380
2765
  if (!name) return;
@@ -2395,7 +2780,7 @@ var AppFallbackIcon = ({
2395
2780
  ...style
2396
2781
  };
2397
2782
  if (src && !errored) {
2398
- return /* @__PURE__ */ jsx5(
2783
+ return /* @__PURE__ */ jsx6(
2399
2784
  "img",
2400
2785
  {
2401
2786
  src,
@@ -2411,7 +2796,7 @@ var AppFallbackIcon = ({
2411
2796
  }
2412
2797
  const display = (name || "?").trim();
2413
2798
  const letter = (display.replace(/[^a-z0-9]/i, "").charAt(0) || "?").toUpperCase();
2414
- return /* @__PURE__ */ jsx5(
2799
+ return /* @__PURE__ */ jsx6(
2415
2800
  "div",
2416
2801
  {
2417
2802
  className,
@@ -2434,20 +2819,20 @@ var AppFallbackIcon = ({
2434
2819
  };
2435
2820
 
2436
2821
  // useSyncHostBaseUrl.ts
2437
- import { useEffect as useEffect3 } from "react";
2822
+ import { useEffect as useEffect4 } from "react";
2438
2823
  var useSyncHostBaseUrl = (globalUrl) => {
2439
- useEffect3(() => {
2824
+ useEffect4(() => {
2440
2825
  if (!globalUrl) return;
2441
2826
  setHostBaseUrl(globalUrl);
2442
2827
  }, [globalUrl]);
2443
2828
  };
2444
2829
 
2445
2830
  // auth-utils.ts
2446
- var THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1e3;
2831
+ var THIRTY_DAYS_MS2 = 30 * 24 * 60 * 60 * 1e3;
2447
2832
  function isValidationFresh(validation) {
2448
2833
  if (validation?.valid !== true) return false;
2449
2834
  if (!validation.last_valid) return true;
2450
- const cutoff = Date.now() - THIRTY_DAYS_MS;
2835
+ const cutoff = Date.now() - THIRTY_DAYS_MS2;
2451
2836
  const lastValidMs = validation.last_valid > 1e12 ? validation.last_valid : validation.last_valid * 1e3;
2452
2837
  return lastValidMs >= cutoff;
2453
2838
  }
@@ -2499,7 +2884,7 @@ async function backfillAppImages2(dedupedApps) {
2499
2884
  let missing = dedupedApps.filter((d) => !d.bestImage && !d.app.large_image);
2500
2885
  if (missing.length === 0) return dedupedApps;
2501
2886
  try {
2502
- const { fetchAppsViaApiConfig: fetchAppsViaApiConfig3 } = await import("./appsCache-2UYFFT3V.mjs");
2887
+ const { fetchAppsViaApiConfig: fetchAppsViaApiConfig3 } = await import("./appsCache-A4OIDXIN.mjs");
2503
2888
  const apps = await fetchAppsViaApiConfig3().catch(() => []);
2504
2889
  if (Array.isArray(apps) && apps.length > 0) {
2505
2890
  const byName = /* @__PURE__ */ new Map();
@@ -2702,7 +3087,7 @@ function extractValidatedIngestionApps(authApiResponse, workflowAppNames) {
2702
3087
  // appConfigFetch.ts
2703
3088
  var OK_TTL_MS = 5 * 6e4;
2704
3089
  var FAIL_TTL_MS = 3e4;
2705
- var cache = /* @__PURE__ */ new Map();
3090
+ var cache2 = /* @__PURE__ */ new Map();
2706
3091
  var HARD_FAIL_STATUSES = /* @__PURE__ */ new Set([401, 403, 404]);
2707
3092
  var decodeAppConfigPayload = (payload) => {
2708
3093
  if (!payload || typeof payload !== "object" || typeof payload.app !== "string") {
@@ -2719,7 +3104,7 @@ var decodeAppConfigPayload = (payload) => {
2719
3104
  return payload;
2720
3105
  }
2721
3106
  };
2722
- var doFetch = async (appId) => {
3107
+ var doFetch2 = async (appId) => {
2723
3108
  try {
2724
3109
  const response = await fetch(
2725
3110
  getApiUrl(`/api/v1/apps/${encodeURIComponent(appId)}/config`),
@@ -2737,7 +3122,7 @@ var doFetch = async (appId) => {
2737
3122
  };
2738
3123
  var fetchAppConfig = (appId) => {
2739
3124
  if (!appId) return Promise.resolve({ ok: false, status: 0, data: null });
2740
- const entry = cache.get(appId) || {};
3125
+ const entry = cache2.get(appId) || {};
2741
3126
  if (entry.result && !entry.result.ok && HARD_FAIL_STATUSES.has(entry.result.status)) {
2742
3127
  return Promise.resolve(entry.result);
2743
3128
  }
@@ -2748,296 +3133,16 @@ var fetchAppConfig = (appId) => {
2748
3133
  return Promise.resolve(entry.result);
2749
3134
  }
2750
3135
  if (entry.promise) return entry.promise;
2751
- const promise = doFetch(appId).then((result) => {
2752
- cache.set(appId, { result, at: Date.now() });
3136
+ const promise = doFetch2(appId).then((result) => {
3137
+ cache2.set(appId, { result, at: Date.now() });
2753
3138
  return result;
2754
3139
  });
2755
- cache.set(appId, { ...entry, promise });
2756
- return promise;
2757
- };
2758
-
2759
- // ../Shuffle-Core/views/appsFetchCache.ts
2760
- var APPS_TTL_MS = 6e4;
2761
- var JSON_CACHE_TTL_MS = 12e4;
2762
- var ENVIRONMENTS_TTL_MS = 12e4;
2763
- var WORKFLOWS_TTL_MS = 5 * 60 * 1e3;
2764
- var _jsonCache = /* @__PURE__ */ new Map();
2765
- var _inFlightPromises = /* @__PURE__ */ new Map();
2766
- function normalizeEndpointKey(url, init) {
2767
- let pathname = url;
2768
- let search = "";
2769
- try {
2770
- const parsed = new URL(url, "https://shuffle.internal");
2771
- pathname = parsed.pathname;
2772
- search = parsed.search;
2773
- } catch {
2774
- }
2775
- let orgId = "";
2776
- if (init?.headers) {
2777
- if (init.headers instanceof Headers) {
2778
- orgId = init.headers.get("Org-Id") || "";
2779
- } else if (Array.isArray(init.headers)) {
2780
- const match = init.headers.find(([k]) => k.toLowerCase() === "org-id");
2781
- if (match) orgId = match[1];
2782
- } else if (typeof init.headers === "object") {
2783
- orgId = init.headers["Org-Id"] || init.headers["org-id"] || "";
2784
- }
2785
- }
2786
- return `${pathname}${search}${orgId ? `::org:${orgId}` : ""}`;
2787
- }
2788
- async function fetchJsonCached(url, init, ttlMs = JSON_CACHE_TTL_MS, force = false) {
2789
- const cacheKey2 = normalizeEndpointKey(url, init);
2790
- const now = Date.now();
2791
- if (!force) {
2792
- const cached2 = _jsonCache.get(cacheKey2);
2793
- if (cached2 && now - cached2.ts < ttlMs) {
2794
- return cached2.data;
2795
- }
2796
- const inFlight = _inFlightPromises.get(cacheKey2);
2797
- if (inFlight) {
2798
- return inFlight;
2799
- }
2800
- }
2801
- const p = (async () => {
2802
- try {
2803
- const res = await fetch(url, init);
2804
- if (!res.ok) {
2805
- const prev = _jsonCache.get(cacheKey2);
2806
- if (prev) return prev.data;
2807
- throw new Error(`HTTP ${res.status}`);
2808
- }
2809
- const data = await res.json();
2810
- _jsonCache.set(cacheKey2, { ts: Date.now(), data });
2811
- return data;
2812
- } finally {
2813
- _inFlightPromises.delete(cacheKey2);
2814
- }
2815
- })();
2816
- _inFlightPromises.set(cacheKey2, p);
2817
- return p;
2818
- }
2819
- async function fetchAppsCached(url, init) {
2820
- const data = await fetchJsonCached(url, init, APPS_TTL_MS);
2821
- return new Response(JSON.stringify(data), {
2822
- status: 200,
2823
- headers: { "Content-Type": "application/json" }
2824
- });
2825
- }
2826
- async function fetchEnvironmentsCached(url, init, force = false) {
2827
- return fetchJsonCached(url, init, ENVIRONMENTS_TTL_MS, force);
2828
- }
2829
- var _workflowsCache = null;
2830
- var _workflowsCacheTs = 0;
2831
- function invalidateWorkflowsCache() {
2832
- _workflowsCache = null;
2833
- _workflowsCacheTs = 0;
2834
- for (const key of _jsonCache.keys()) {
2835
- if (key.includes("/api/v1/workflows")) {
2836
- _jsonCache.delete(key);
2837
- }
2838
- }
2839
- }
2840
- function getCachedWorkflows() {
2841
- if (_workflowsCache && Date.now() - _workflowsCacheTs < WORKFLOWS_TTL_MS) {
2842
- return _workflowsCache;
2843
- }
2844
- return _workflowsCache;
2845
- }
2846
- function setCachedWorkflows(list) {
2847
- _workflowsCache = list;
2848
- _workflowsCacheTs = Date.now();
2849
- }
2850
- async function fetchWorkflowsCached(url, init, force = false) {
2851
- try {
2852
- if (force) {
2853
- invalidateWorkflowsCache();
2854
- }
2855
- const data = await fetchJsonCached(url, init, WORKFLOWS_TTL_MS, force);
2856
- const list = Array.isArray(data) ? data : data?.workflows || [];
2857
- _workflowsCache = list;
2858
- _workflowsCacheTs = Date.now();
2859
- return list;
2860
- } catch {
2861
- return _workflowsCache || [];
2862
- }
2863
- }
2864
- async function fetchWorkflowByIdCached(url, wfId, init) {
2865
- if (_workflowsCache && _workflowsCache.length > 0) {
2866
- const existing = _workflowsCache.find((w) => w.id === wfId);
2867
- if (existing && (existing.actions?.length || existing.triggers?.length)) {
2868
- return existing;
2869
- }
2870
- }
2871
- return fetchJsonCached(url, init, WORKFLOWS_TTL_MS);
2872
- }
2873
- async function fetchOrgCached(url, init) {
2874
- return fetchJsonCached(url, init, WORKFLOWS_TTL_MS);
2875
- }
2876
- async function fetchCategoryAutomationsCached(url, init) {
2877
- return fetchJsonCached(url, init, JSON_CACHE_TTL_MS);
2878
- }
2879
- var _cachedIntegrations = null;
2880
- var _cachedCatalogIcons = {};
2881
- var _cachedCategoryAppNames = null;
2882
- var _cachedValidatedAppsByCategory = null;
2883
- var _cachedValidatedCategories = null;
2884
- var _cachedValidatedAppNames = null;
2885
- var _alluvialCache = null;
2886
- var _algoliaIconCache = /* @__PURE__ */ new Map();
2887
- function getCachedIntegrations() {
2888
- return _cachedIntegrations;
2889
- }
2890
- function setCachedIntegrations(items) {
2891
- _cachedIntegrations = items;
2892
- }
2893
- function getCachedCatalogIcons() {
2894
- return _cachedCatalogIcons;
2895
- }
2896
- function updateCachedCatalogIcons(icons) {
2897
- Object.assign(_cachedCatalogIcons, icons);
2898
- }
2899
- function getCachedCategoryAppNames() {
2900
- return _cachedCategoryAppNames;
2901
- }
2902
- function setCachedCategoryAppNames(val) {
2903
- _cachedCategoryAppNames = val;
2904
- }
2905
- function getCachedValidatedAppsByCategory() {
2906
- return _cachedValidatedAppsByCategory;
2907
- }
2908
- function setCachedValidatedAppsByCategory(val) {
2909
- _cachedValidatedAppsByCategory = val;
2910
- }
2911
- function getCachedValidatedCategories() {
2912
- return _cachedValidatedCategories;
2913
- }
2914
- function setCachedValidatedCategories(val) {
2915
- _cachedValidatedCategories = val;
2916
- }
2917
- function getCachedValidatedAppNames() {
2918
- return _cachedValidatedAppNames;
2919
- }
2920
- function setCachedValidatedAppNames(val) {
2921
- _cachedValidatedAppNames = val;
2922
- }
2923
- function getAlluvialCache() {
2924
- return _alluvialCache;
2925
- }
2926
- function setAlluvialCache(cache3) {
2927
- _alluvialCache = cache3;
2928
- }
2929
- function updateAlluvialIngest(appName, enabled, normalizeAppName6) {
2930
- if (!_alluvialCache) return;
2931
- const next = new Set(_alluvialCache.ingestAppNames);
2932
- const norm5 = normalizeAppName6(appName);
2933
- if (enabled) next.add(norm5);
2934
- else next.delete(norm5);
2935
- _alluvialCache.ingestAppNames = next;
2936
- _alluvialCache.ts = Date.now();
2937
- }
2938
- function updateAlluvialForward(desiredAppNames, normalizeAppName6) {
2939
- if (!_alluvialCache) return;
2940
- _alluvialCache.forwardAppNames = new Set(desiredAppNames.map(normalizeAppName6));
2941
- _alluvialCache.ts = Date.now();
2942
- }
2943
- function invalidateAuthCache() {
2944
- for (const key of _jsonCache.keys()) {
2945
- if (key.includes("/api/v1/apps/authentication")) {
2946
- _jsonCache.delete(key);
2947
- }
2948
- }
2949
- for (const key of _inFlightPromises.keys()) {
2950
- if (key.includes("/api/v1/apps/authentication")) {
2951
- _inFlightPromises.delete(key);
2952
- }
2953
- }
2954
- }
2955
- function invalidateAppsCache2() {
2956
- _jsonCache.clear();
2957
- _inFlightPromises.clear();
2958
- _workflowsCache = null;
2959
- _cachedIntegrations = null;
2960
- _cachedCatalogIcons = {};
2961
- _cachedCategoryAppNames = null;
2962
- _cachedValidatedAppsByCategory = null;
2963
- _cachedValidatedCategories = null;
2964
- _cachedValidatedAppNames = null;
2965
- _alluvialCache = null;
2966
- if (typeof window !== "undefined") {
2967
- window.dispatchEvent(new CustomEvent("shuffle-apps-invalidated"));
2968
- }
2969
- }
2970
-
2971
- // authenticatedApps.ts
2972
- var TTL_MS = 3e4;
2973
- var cache2 = /* @__PURE__ */ new Map();
2974
- var cacheKey = (crossOrgId) => crossOrgId || "";
2975
- var THIRTY_DAYS_MS2 = 30 * 24 * 60 * 60 * 1e3;
2976
- var applyValidationStaleness = (data) => {
2977
- const cutoff = Date.now() - THIRTY_DAYS_MS2;
2978
- return data.map((entry) => {
2979
- const v = entry.validation;
2980
- if (v?.valid === true && v?.last_valid) {
2981
- const lastValidMs = v.last_valid > 1e12 ? v.last_valid : v.last_valid * 1e3;
2982
- if (lastValidMs < cutoff) {
2983
- return { ...entry, validation: { ...v, valid: false, error: "Validation expired (older than 30 days)" } };
2984
- }
2985
- }
2986
- return entry;
2987
- });
2988
- };
2989
- var doFetch2 = async (crossOrgId) => {
2990
- if (!hasShuffleAuth()) return { data: [], failed: false };
2991
- const headers = {
2992
- ...getAuthHeader(crossOrgId ?? void 0)
2993
- };
2994
- try {
2995
- const resp = await fetch(getApiUrl("/api/v1/apps/authentication"), {
2996
- credentials: "include",
2997
- headers
2998
- });
2999
- if (!resp.ok) return { data: [], failed: true };
3000
- const result = await resp.json();
3001
- const data = result?.data || result;
3002
- if (!Array.isArray(data)) return { data: [], failed: true };
3003
- return { data: applyValidationStaleness(data), failed: false };
3004
- } catch {
3005
- return { data: [], failed: true };
3006
- }
3007
- };
3008
- var fetchAuthenticatedApps = (crossOrgId) => {
3009
- const key = cacheKey(crossOrgId);
3010
- const entry = cache2.get(key) || {};
3011
- if (entry.data && entry.fetchedAt && Date.now() - entry.fetchedAt < TTL_MS) {
3012
- return Promise.resolve(entry.data);
3013
- }
3014
- if (entry.promise) return entry.promise;
3015
- const promise = doFetch2(crossOrgId).then((outcome) => {
3016
- if (outcome.failed) {
3017
- const previous = cache2.get(key)?.data;
3018
- cache2.delete(key);
3019
- return previous || [];
3020
- }
3021
- cache2.set(key, { data: outcome.data, fetchedAt: Date.now() });
3022
- return outcome.data;
3023
- }).catch(() => {
3024
- cache2.delete(key);
3025
- return [];
3026
- });
3027
- cache2.set(key, { ...entry, promise });
3140
+ cache2.set(appId, { ...entry, promise });
3028
3141
  return promise;
3029
3142
  };
3030
- var invalidateAuthenticatedAppsCache = (crossOrgId) => {
3031
- if (crossOrgId === void 0) {
3032
- cache2.clear();
3033
- } else {
3034
- cache2.delete(cacheKey(crossOrgId));
3035
- }
3036
- invalidateAuthCache();
3037
- };
3038
3143
 
3039
3144
  // components/AppAuthConfig.tsx
3040
- import { Fragment, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
3145
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
3041
3146
  var openExecutionDrawer = (executionId) => {
3042
3147
  window.dispatchEvent(
3043
3148
  new CustomEvent("workflow-run:open", { detail: { executionId }, cancelable: true })
@@ -3048,7 +3153,7 @@ var ViewExecutionButton = ({
3048
3153
  tone = "default"
3049
3154
  }) => {
3050
3155
  const color = tone === "destructive" ? "hsl(var(--destructive))" : "currentColor";
3051
- return /* @__PURE__ */ jsx6(
3156
+ return /* @__PURE__ */ jsx7(
3052
3157
  Button,
3053
3158
  {
3054
3159
  variant: "outlined",
@@ -3184,17 +3289,17 @@ var AppAuthCard = ({
3184
3289
  const lastEntry = entries[entries.length - 1];
3185
3290
  return lastEntry.id || lastEntry.label || "0";
3186
3291
  };
3187
- const [selectedAuthId, setSelectedAuthId] = useState3(() => {
3292
+ const [selectedAuthId, setSelectedAuthId] = useState4(() => {
3188
3293
  return getBestDefaultAuth(apiAuthEntries);
3189
3294
  });
3190
- const [userHasSelected, setUserHasSelected] = useState3(false);
3191
- const [testStatusPerAuth, setTestStatusPerAuth] = useState3(
3295
+ const [userHasSelected, setUserHasSelected] = useState4(false);
3296
+ const [testStatusPerAuth, setTestStatusPerAuth] = useState4(
3192
3297
  () => buildInitialVerifiedMap(app2.objectID, apiAuthEntries)
3193
3298
  );
3194
- const [testMessagesPerAuth, setTestMessagesPerAuth] = useState3({});
3195
- const [testingAuthId, setTestingAuthId] = useState3(null);
3196
- const [deleteConfirmAuthId, setDeleteConfirmAuthId] = useState3(null);
3197
- const [deleting, setDeleting] = useState3(false);
3299
+ const [testMessagesPerAuth, setTestMessagesPerAuth] = useState4({});
3300
+ const [testingAuthId, setTestingAuthId] = useState4(null);
3301
+ const [deleteConfirmAuthId, setDeleteConfirmAuthId] = useState4(null);
3302
+ const [deleting, setDeleting] = useState4(false);
3198
3303
  const handleDeleteAuth = async (authId) => {
3199
3304
  setDeleting(true);
3200
3305
  try {
@@ -3226,10 +3331,10 @@ var AppAuthCard = ({
3226
3331
  }
3227
3332
  };
3228
3333
  const localTestStatus = testStatusPerAuth[selectedAuthId] || "untested";
3229
- const [wasPreValidatedPerAuth, setWasPreValidatedPerAuth] = useState3({});
3230
- const prevEntryCountRef = useRef2(apiAuthEntries.length);
3231
- const autoTestFiredRef = useRef2(null);
3232
- useEffect4(() => {
3334
+ const [wasPreValidatedPerAuth, setWasPreValidatedPerAuth] = useState4({});
3335
+ const prevEntryCountRef = useRef3(apiAuthEntries.length);
3336
+ const autoTestFiredRef = useRef3(null);
3337
+ useEffect5(() => {
3233
3338
  if (apiAuthEntries.length > 0) {
3234
3339
  if (apiAuthEntries.length > prevEntryCountRef.current) {
3235
3340
  const sorted = [...apiAuthEntries].sort((a, b) => {
@@ -3257,14 +3362,14 @@ var AppAuthCard = ({
3257
3362
  }
3258
3363
  prevEntryCountRef.current = apiAuthEntries.length;
3259
3364
  }, [apiAuthEntries, userHasSelected, selectedAuthId]);
3260
- const setTestStatusForAuth = useCallback((authId, status) => {
3365
+ const setTestStatusForAuth = useCallback2((authId, status) => {
3261
3366
  setTestStatusPerAuth((prev) => ({ ...prev, [authId]: status }));
3262
3367
  if (status === "success") {
3263
3368
  writeVerifiedToStorage(app2.objectID, authId, "success");
3264
3369
  rememberValidatedAuth(authId);
3265
3370
  }
3266
3371
  }, [app2.objectID]);
3267
- useEffect4(() => {
3372
+ useEffect5(() => {
3268
3373
  apiAuthEntries.forEach((entry) => {
3269
3374
  const authId = entry.id || entry.label || "";
3270
3375
  if (entry.validation?.valid === true && authId) {
@@ -3272,7 +3377,7 @@ var AppAuthCard = ({
3272
3377
  }
3273
3378
  });
3274
3379
  }, [apiAuthEntries, setTestStatusForAuth]);
3275
- useEffect4(() => {
3380
+ useEffect5(() => {
3276
3381
  if (wasPreValidatedPerAuth[selectedAuthId] === void 0) {
3277
3382
  const currentAuth = apiAuthEntries.find(
3278
3383
  (auth2) => (auth2.id || auth2.label || "") === selectedAuthId
@@ -3291,7 +3396,7 @@ var AppAuthCard = ({
3291
3396
  };
3292
3397
  const localTestMessages = testMessagesPerAuth[selectedAuthId] || {};
3293
3398
  const wasPreValidated = wasPreValidatedPerAuth[selectedAuthId] || false;
3294
- useEffect4(() => {
3399
+ useEffect5(() => {
3295
3400
  if (!testingAuthId) return;
3296
3401
  if (authState.status === "testing") {
3297
3402
  setTestStatusForAuth(testingAuthId, "testing");
@@ -3328,7 +3433,7 @@ var AppAuthCard = ({
3328
3433
  }, [authState.status, authState.errorMessage, authState.successMessage, authState.warningMessage, testingAuthId, apiAuthEntries, wasPreValidatedPerAuth]);
3329
3434
  const isCredentialError = localTestMessages.errorCode === 401 || localTestMessages.errorCode === 403;
3330
3435
  const showAddNewForm = compactAuthForm ? true : selectedAuthId === ADD_NEW_AUTH;
3331
- const isRememberedValid = useMemo2(
3436
+ const isRememberedValid = useMemo3(
3332
3437
  () => !!selectedAuth?.id && getValidatedAuthIds().has(selectedAuth.id),
3333
3438
  [selectedAuth?.id, testStatusPerAuth]
3334
3439
  );
@@ -3352,23 +3457,23 @@ var AppAuthCard = ({
3352
3457
  minute: "2-digit"
3353
3458
  });
3354
3459
  };
3355
- const [localCredentials, setLocalCredentials] = useState3(authState.credentials || {});
3356
- const [revealedFields, setRevealedFields] = useState3({});
3357
- const [pendingFailedAuthId, setPendingFailedAuthId] = useState3(null);
3358
- const [fieldErrors, setFieldErrors] = useState3({});
3359
- const [loading, setLoading] = useState3(false);
3360
- const [saving, setSaving] = useState3(false);
3361
- const [saveSuccess, setSaveSuccess] = useState3(null);
3362
- const [error, setError] = useState3(null);
3363
- const [appConfig, setAppConfig] = useState3(
3460
+ const [localCredentials, setLocalCredentials] = useState4(authState.credentials || {});
3461
+ const [revealedFields, setRevealedFields] = useState4({});
3462
+ const [pendingFailedAuthId, setPendingFailedAuthId] = useState4(null);
3463
+ const [fieldErrors, setFieldErrors] = useState4({});
3464
+ const [loading, setLoading] = useState4(false);
3465
+ const [saving, setSaving] = useState4(false);
3466
+ const [saveSuccess, setSaveSuccess] = useState4(null);
3467
+ const [error, setError] = useState4(null);
3468
+ const [appConfig, setAppConfig] = useState4(
3364
3469
  initialAuthConfig ? { authentication: initialAuthConfig } : null
3365
3470
  );
3366
- useEffect4(() => {
3471
+ useEffect5(() => {
3367
3472
  if (isExpanded && onRefreshAuth) {
3368
3473
  onRefreshAuth();
3369
3474
  }
3370
3475
  }, [isExpanded]);
3371
- useEffect4(() => {
3476
+ useEffect5(() => {
3372
3477
  const loadAppConfig = async () => {
3373
3478
  if (!isExpanded || appConfig) return;
3374
3479
  if (!app2.objectID || app2.objectID.startsWith("name:")) {
@@ -3399,13 +3504,13 @@ var AppAuthCard = ({
3399
3504
  }, [isExpanded, app2.objectID, appConfig]);
3400
3505
  const auth = appConfig?.authentication;
3401
3506
  const isOAuth2 = isOAuth2Type(auth?.type);
3402
- const [selectedScopes, setSelectedScopes] = useState3([]);
3403
- useEffect4(() => {
3507
+ const [selectedScopes, setSelectedScopes] = useState4([]);
3508
+ useEffect5(() => {
3404
3509
  if (auth?.scope) {
3405
3510
  setSelectedScopes(auth.scope);
3406
3511
  }
3407
3512
  }, [auth?.scope]);
3408
- useEffect4(() => {
3513
+ useEffect5(() => {
3409
3514
  if (disableUrlPrefill) return;
3410
3515
  if (!auth?.parameters || auth.parameters.length === 0) return;
3411
3516
  const urlDefaults = {};
@@ -3422,7 +3527,7 @@ var AppAuthCard = ({
3422
3527
  setLocalCredentials((prev) => ({ ...urlDefaults, ...prev }));
3423
3528
  }
3424
3529
  }, [auth?.parameters, disableUrlPrefill]);
3425
- useEffect4(() => {
3530
+ useEffect5(() => {
3426
3531
  const incoming = authState.credentials || {};
3427
3532
  let incomingUrl = "";
3428
3533
  for (const [k, v] of Object.entries(incoming)) {
@@ -3455,12 +3560,12 @@ var AppAuthCard = ({
3455
3560
  return changed ? next : prev;
3456
3561
  });
3457
3562
  }, [authState.credentials, auth?.parameters]);
3458
- const [docsOpen, setDocsOpen] = useState3(false);
3459
- const [docsContent, setDocsContent] = useState3("");
3460
- const [docsLoading, setDocsLoading] = useState3(false);
3461
- const [editingLabel, setEditingLabel] = useState3(false);
3462
- const [editLabelValue, setEditLabelValue] = useState3("");
3463
- const [savingLabel, setSavingLabel] = useState3(false);
3563
+ const [docsOpen, setDocsOpen] = useState4(false);
3564
+ const [docsContent, setDocsContent] = useState4("");
3565
+ const [docsLoading, setDocsLoading] = useState4(false);
3566
+ const [editingLabel, setEditingLabel] = useState4(false);
3567
+ const [editLabelValue, setEditLabelValue] = useState4("");
3568
+ const [savingLabel, setSavingLabel] = useState4(false);
3464
3569
  const handleRenameAuth = async () => {
3465
3570
  if (!selectedAuth || !editLabelValue.trim()) return;
3466
3571
  setSavingLabel(true);
@@ -3531,14 +3636,14 @@ var AppAuthCard = ({
3531
3636
  const availableScopes = auth.scope || [];
3532
3637
  const hasManualCredentials = !!localCredentials["client_id"]?.trim() && !!localCredentials["client_secret"]?.trim();
3533
3638
  return /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
3534
- /* @__PURE__ */ jsxs2(Fragment, { children: [
3535
- /* @__PURE__ */ jsx6(Collapse, { in: !hasManualCredentials, children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
3639
+ /* @__PURE__ */ jsxs2(Fragment2, { children: [
3640
+ /* @__PURE__ */ jsx7(Collapse, { in: !hasManualCredentials, children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
3536
3641
  /* @__PURE__ */ jsxs2(
3537
3642
  Button,
3538
3643
  {
3539
3644
  variant: "outlined",
3540
3645
  fullWidth: true,
3541
- startIcon: app2.image_url ? /* @__PURE__ */ jsx6(
3646
+ startIcon: app2.image_url ? /* @__PURE__ */ jsx7(
3542
3647
  Box3,
3543
3648
  {
3544
3649
  component: "img",
@@ -3546,7 +3651,7 @@ var AppAuthCard = ({
3546
3651
  alt: app2.name,
3547
3652
  sx: { width: 24, height: 24, borderRadius: 1, objectFit: "contain" }
3548
3653
  }
3549
- ) : /* @__PURE__ */ jsx6(LockIcon, {}),
3654
+ ) : /* @__PURE__ */ jsx7(LockIcon, {}),
3550
3655
  onClick: () => {
3551
3656
  const authUrl = `https://shuffler.io/appauth?app_id=${app2.objectID}&source=shuffle`;
3552
3657
  const popup = window.open(authUrl, "_blank", "width=600,height=700");
@@ -3600,12 +3705,12 @@ var AppAuthCard = ({
3600
3705
  }
3601
3706
  ),
3602
3707
  /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
3603
- /* @__PURE__ */ jsx6(Divider, { sx: { flex: 1, borderColor: "hsl(var(--border))" } }),
3604
- /* @__PURE__ */ jsx6(Typography, { sx: { color: "hsl(var(--muted-foreground))", fontSize: "0.875rem" }, children: "OR configure manually" }),
3605
- /* @__PURE__ */ jsx6(Divider, { sx: { flex: 1, borderColor: "hsl(var(--border))" } })
3708
+ /* @__PURE__ */ jsx7(Divider, { sx: { flex: 1, borderColor: "hsl(var(--border))" } }),
3709
+ /* @__PURE__ */ jsx7(Typography, { sx: { color: "hsl(var(--muted-foreground))", fontSize: "0.875rem" }, children: "OR configure manually" }),
3710
+ /* @__PURE__ */ jsx7(Divider, { sx: { flex: 1, borderColor: "hsl(var(--border))" } })
3606
3711
  ] })
3607
3712
  ] }) }),
3608
- hasManualCredentials && /* @__PURE__ */ jsx6(
3713
+ hasManualCredentials && /* @__PURE__ */ jsx7(
3609
3714
  Button,
3610
3715
  {
3611
3716
  variant: "text",
@@ -3630,9 +3735,9 @@ var AppAuthCard = ({
3630
3735
  /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
3631
3736
  /* @__PURE__ */ jsxs2(Typography, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))" }, children: [
3632
3737
  "Redirect URL: ",
3633
- /* @__PURE__ */ jsx6(Typography, { component: "span", sx: { color: "hsl(var(--primary))", fontWeight: 600 }, children: auth.redirect_uri || "https://shuffler.io/set_authentication" })
3738
+ /* @__PURE__ */ jsx7(Typography, { component: "span", sx: { color: "hsl(var(--primary))", fontWeight: 600 }, children: auth.redirect_uri || "https://shuffler.io/set_authentication" })
3634
3739
  ] }),
3635
- /* @__PURE__ */ jsx6(
3740
+ /* @__PURE__ */ jsx7(
3636
3741
  TextField,
3637
3742
  {
3638
3743
  label: "Client ID",
@@ -3654,7 +3759,7 @@ var AppAuthCard = ({
3654
3759
  }
3655
3760
  }
3656
3761
  ),
3657
- /* @__PURE__ */ jsx6(
3762
+ /* @__PURE__ */ jsx7(
3658
3763
  TextField,
3659
3764
  {
3660
3765
  label: "Client Secret",
@@ -3677,7 +3782,7 @@ var AppAuthCard = ({
3677
3782
  }
3678
3783
  }
3679
3784
  ),
3680
- availableScopes.length > 0 && /* @__PURE__ */ jsx6(FormControl, { fullWidth: true, size: "small", children: /* @__PURE__ */ jsx6(
3785
+ availableScopes.length > 0 && /* @__PURE__ */ jsx7(FormControl, { fullWidth: true, size: "small", children: /* @__PURE__ */ jsx7(
3681
3786
  Select,
3682
3787
  {
3683
3788
  multiple: true,
@@ -3687,7 +3792,7 @@ var AppAuthCard = ({
3687
3792
  setSelectedScopes(value);
3688
3793
  handleCredentialChange("scopes", value.join(" "));
3689
3794
  },
3690
- input: /* @__PURE__ */ jsx6(OutlinedInput, {}),
3795
+ input: /* @__PURE__ */ jsx7(OutlinedInput, {}),
3691
3796
  renderValue: (selected) => selected.length === 0 ? "Select Scopes" : `${selected.length} scope(s) selected`,
3692
3797
  displayEmpty: true,
3693
3798
  sx: {
@@ -3713,14 +3818,14 @@ var AppAuthCard = ({
3713
3818
  }
3714
3819
  },
3715
3820
  children: availableScopes.map((scope) => /* @__PURE__ */ jsxs2(MenuItem, { value: scope, sx: { color: "hsl(var(--foreground))" }, children: [
3716
- /* @__PURE__ */ jsx6(
3821
+ /* @__PURE__ */ jsx7(
3717
3822
  Checkbox,
3718
3823
  {
3719
3824
  checked: selectedScopes.indexOf(scope) > -1,
3720
3825
  sx: { color: "hsl(var(--muted-foreground))", "&.Mui-checked": { color: "hsl(var(--primary))" } }
3721
3826
  }
3722
3827
  ),
3723
- /* @__PURE__ */ jsx6(ListItemText, { primary: scope, sx: { "& .MuiTypography-root": { color: "hsl(var(--foreground))" } } })
3828
+ /* @__PURE__ */ jsx7(ListItemText, { primary: scope, sx: { "& .MuiTypography-root": { color: "hsl(var(--foreground))" } } })
3724
3829
  ] }, scope))
3725
3830
  }
3726
3831
  ) })
@@ -3730,7 +3835,7 @@ var AppAuthCard = ({
3730
3835
  const renderParameterFields = () => {
3731
3836
  if (isOAuth2) return null;
3732
3837
  if (!auth?.parameters || auth.parameters.length === 0) return null;
3733
- return /* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: auth.parameters.filter((param) => {
3838
+ return /* @__PURE__ */ jsx7(Box3, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: auth.parameters.filter((param) => {
3734
3839
  if (!hideUrlFields) return true;
3735
3840
  const n = (param.name || param.id || "").toLowerCase();
3736
3841
  return !(n.includes("url") || n.includes("endpoint") || n.includes("host"));
@@ -3739,12 +3844,12 @@ var AppAuthCard = ({
3739
3844
  const lowerName = (param.name || "").toLowerCase();
3740
3845
  const isSecretField = lowerName.includes("password") || lowerName.includes("secret") || lowerName.includes("key") || lowerName.includes("token");
3741
3846
  const isRevealed = !!revealedFields[fieldKey];
3742
- return /* @__PURE__ */ jsx6(
3847
+ return /* @__PURE__ */ jsx7(
3743
3848
  TextField,
3744
3849
  {
3745
3850
  label: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
3746
3851
  param.name,
3747
- param.required && /* @__PURE__ */ jsx6(Typography, { component: "span", sx: { color: "hsl(var(--destructive))", fontSize: "0.8rem" }, children: "*" })
3852
+ param.required && /* @__PURE__ */ jsx7(Typography, { component: "span", sx: { color: "hsl(var(--destructive))", fontSize: "0.8rem" }, children: "*" })
3748
3853
  ] }),
3749
3854
  type: "text",
3750
3855
  placeholder: param.example || `Enter ${param.name}`,
@@ -3771,14 +3876,14 @@ var AppAuthCard = ({
3771
3876
  }
3772
3877
  },
3773
3878
  input: isSecretField ? {
3774
- endAdornment: /* @__PURE__ */ jsx6(
3879
+ endAdornment: /* @__PURE__ */ jsx7(
3775
3880
  IconButton,
3776
3881
  {
3777
3882
  size: "small",
3778
3883
  onClick: () => setRevealedFields((prev) => ({ ...prev, [fieldKey]: !prev[fieldKey] })),
3779
3884
  "aria-label": isRevealed ? `Hide ${param.name}` : `Show ${param.name}`,
3780
3885
  sx: { color: "hsl(var(--muted-foreground))", "&:hover": { color: "hsl(var(--foreground))" } },
3781
- children: isRevealed ? /* @__PURE__ */ jsx6(EyeOffIcon, { size: 16 }) : /* @__PURE__ */ jsx6(EyeIcon, { size: 16 })
3886
+ children: isRevealed ? /* @__PURE__ */ jsx7(EyeOffIcon, { size: 16 }) : /* @__PURE__ */ jsx7(EyeIcon, { size: 16 })
3782
3887
  }
3783
3888
  )
3784
3889
  } : void 0
@@ -3934,7 +4039,7 @@ var AppAuthCard = ({
3934
4039
  },
3935
4040
  children: [
3936
4041
  /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 2, flex: 1, minWidth: 0 }, children: [
3937
- /* @__PURE__ */ jsx6(
4042
+ /* @__PURE__ */ jsx7(
3938
4043
  Box3,
3939
4044
  {
3940
4045
  sx: {
@@ -3948,7 +4053,7 @@ var AppAuthCard = ({
3948
4053
  alignItems: "center",
3949
4054
  justifyContent: "center"
3950
4055
  },
3951
- children: /* @__PURE__ */ jsx6(
4056
+ children: /* @__PURE__ */ jsx7(
3952
4057
  AppFallbackIcon,
3953
4058
  {
3954
4059
  name: app2.name,
@@ -3960,7 +4065,7 @@ var AppAuthCard = ({
3960
4065
  }
3961
4066
  ),
3962
4067
  /* @__PURE__ */ jsxs2(Box3, { sx: { minWidth: 0, flex: 1 }, children: [
3963
- /* @__PURE__ */ jsx6(
4068
+ /* @__PURE__ */ jsx7(
3964
4069
  Typography,
3965
4070
  {
3966
4071
  sx: {
@@ -3974,7 +4079,7 @@ var AppAuthCard = ({
3974
4079
  children: app2.name.replace(/_/g, " ")
3975
4080
  }
3976
4081
  ),
3977
- app2.description && /* @__PURE__ */ jsx6(
4082
+ app2.description && /* @__PURE__ */ jsx7(
3978
4083
  Typography,
3979
4084
  {
3980
4085
  variant: "caption",
@@ -3999,14 +4104,14 @@ var AppAuthCard = ({
3999
4104
  width: { xs: "100%", sm: "auto" },
4000
4105
  justifyContent: { xs: "flex-start", sm: "flex-end" }
4001
4106
  }, children: [
4002
- !hideStatusChips && (isNoAuthRequired(auth) ? /* @__PURE__ */ jsx6(AuthStatusChip, { status: "no-auth" }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
4003
- /* @__PURE__ */ jsx6(
4107
+ !hideStatusChips && (isNoAuthRequired(auth) ? /* @__PURE__ */ jsx7(AuthStatusChip, { status: "no-auth" }) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
4108
+ /* @__PURE__ */ jsx7(
4004
4109
  AuthStatusChip,
4005
4110
  {
4006
4111
  status: isTested ? "validated" : isConfigured ? "configured" : "not-configured"
4007
4112
  }
4008
4113
  ),
4009
- /* @__PURE__ */ jsx6(
4114
+ /* @__PURE__ */ jsx7(
4010
4115
  AuthStatusChip,
4011
4116
  {
4012
4117
  status: isTested ? "tested" : "not-tested",
@@ -4014,7 +4119,7 @@ var AppAuthCard = ({
4014
4119
  }
4015
4120
  )
4016
4121
  ] })),
4017
- !hideDocsLink && /* @__PURE__ */ jsx6(Tooltip2, { title: "View documentation", children: /* @__PURE__ */ jsx6(
4122
+ !hideDocsLink && /* @__PURE__ */ jsx7(Tooltip2, { title: "View documentation", children: /* @__PURE__ */ jsx7(
4018
4123
  IconButton,
4019
4124
  {
4020
4125
  size: "small",
@@ -4029,10 +4134,10 @@ var AppAuthCard = ({
4029
4134
  backgroundColor: "hsl(var(--severity-info) / 0.1)"
4030
4135
  }
4031
4136
  },
4032
- children: /* @__PURE__ */ jsx6(MenuBookIcon, { size: 16 })
4137
+ children: /* @__PURE__ */ jsx7(MenuBookIcon, { size: 16 })
4033
4138
  }
4034
4139
  ) }),
4035
- /* @__PURE__ */ jsx6(
4140
+ /* @__PURE__ */ jsx7(
4036
4141
  IconButton,
4037
4142
  {
4038
4143
  size: "small",
@@ -4041,14 +4146,14 @@ var AppAuthCard = ({
4041
4146
  transform: isExpanded ? "rotate(180deg)" : "none",
4042
4147
  transition: "transform 0.3s ease"
4043
4148
  },
4044
- children: /* @__PURE__ */ jsx6(ExpandMoreIcon, {})
4149
+ children: /* @__PURE__ */ jsx7(ExpandMoreIcon, {})
4045
4150
  }
4046
4151
  )
4047
4152
  ] })
4048
4153
  ]
4049
4154
  }
4050
4155
  ),
4051
- /* @__PURE__ */ jsx6(Collapse, { in: isExpanded, children: /* @__PURE__ */ jsxs2(
4156
+ /* @__PURE__ */ jsx7(Collapse, { in: isExpanded, children: /* @__PURE__ */ jsxs2(
4052
4157
  Box3,
4053
4158
  {
4054
4159
  sx: {
@@ -4059,8 +4164,8 @@ var AppAuthCard = ({
4059
4164
  },
4060
4165
  children: [
4061
4166
  !compactAuthForm && (apiAuthEntries.length > 0 || alwaysShowAuthSelector) && /* @__PURE__ */ jsxs2(Box3, { sx: { mb: 3 }, children: [
4062
- /* @__PURE__ */ jsx6(Typography, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))", mb: 1 }, children: "Select authentication" }),
4063
- /* @__PURE__ */ jsx6(FormControl, { fullWidth: true, size: "small", children: /* @__PURE__ */ jsxs2(
4167
+ /* @__PURE__ */ jsx7(Typography, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))", mb: 1 }, children: "Select authentication" }),
4168
+ /* @__PURE__ */ jsx7(FormControl, { fullWidth: true, size: "small", children: /* @__PURE__ */ jsxs2(
4064
4169
  Select,
4065
4170
  {
4066
4171
  value: selectedAuthId,
@@ -4113,9 +4218,9 @@ var AppAuthCard = ({
4113
4218
  };
4114
4219
  const configuredDate = authEntry.created || authEntry.edited;
4115
4220
  const lastValidDate = authEntry.validation?.last_valid;
4116
- return /* @__PURE__ */ jsx6(MenuItem, { value: entryId, sx: { color: "hsl(var(--foreground))", py: 1 }, children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%", minWidth: 0 }, children: [
4221
+ return /* @__PURE__ */ jsx7(MenuItem, { value: entryId, sx: { color: "hsl(var(--foreground))", py: 1 }, children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%", minWidth: 0 }, children: [
4117
4222
  /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", gap: 0.5, flexShrink: 0 }, children: [
4118
- /* @__PURE__ */ jsx6(
4223
+ /* @__PURE__ */ jsx7(
4119
4224
  AuthStatusChip,
4120
4225
  {
4121
4226
  dense: true,
@@ -4123,7 +4228,7 @@ var AppAuthCard = ({
4123
4228
  tooltip: isActive ? `Created: ${formatTimestamp(configuredDate)}` : "Not configured"
4124
4229
  }
4125
4230
  ),
4126
- /* @__PURE__ */ jsx6(
4231
+ /* @__PURE__ */ jsx7(
4127
4232
  AuthStatusChip,
4128
4233
  {
4129
4234
  dense: true,
@@ -4131,16 +4236,16 @@ var AppAuthCard = ({
4131
4236
  tooltip: lastValidDate ? `Last valid: ${formatTimestamp(lastValidDate)}` : isValid ? "Connection verified" : "Never validated"
4132
4237
  }
4133
4238
  ),
4134
- isLatest && /* @__PURE__ */ jsx6(AuthStatusChip, { dense: true, status: "latest" })
4239
+ isLatest && /* @__PURE__ */ jsx7(AuthStatusChip, { dense: true, status: "latest" })
4135
4240
  ] }),
4136
- /* @__PURE__ */ jsx6(Typography, { sx: {
4241
+ /* @__PURE__ */ jsx7(Typography, { sx: {
4137
4242
  flex: 1,
4138
4243
  overflow: "hidden",
4139
4244
  textOverflow: "ellipsis",
4140
4245
  whiteSpace: "nowrap",
4141
4246
  minWidth: 0
4142
4247
  }, children: entryLabel }),
4143
- /* @__PURE__ */ jsx6(Tooltip2, { title: "Delete authentication", arrow: true, placement: "top", children: /* @__PURE__ */ jsx6(
4248
+ /* @__PURE__ */ jsx7(Tooltip2, { title: "Delete authentication", arrow: true, placement: "top", children: /* @__PURE__ */ jsx7(
4144
4249
  IconButton,
4145
4250
  {
4146
4251
  size: "small",
@@ -4166,13 +4271,13 @@ var AppAuthCard = ({
4166
4271
  backgroundColor: "hsl(var(--destructive) / 0.1)"
4167
4272
  }
4168
4273
  },
4169
- children: /* @__PURE__ */ jsx6(DeleteOutlineIcon, { size: 16 })
4274
+ children: /* @__PURE__ */ jsx7(DeleteOutlineIcon, { size: 16 })
4170
4275
  }
4171
4276
  ) })
4172
4277
  ] }) }, entryId);
4173
4278
  }),
4174
- /* @__PURE__ */ jsx6(Divider, { sx: { borderColor: "hsl(var(--border))", my: 1 } }),
4175
- /* @__PURE__ */ jsx6(MenuItem, { value: ADD_NEW_AUTH, sx: { color: "hsl(var(--primary))", fontWeight: 600 }, children: "+ Add new authentication" })
4279
+ /* @__PURE__ */ jsx7(Divider, { sx: { borderColor: "hsl(var(--border))", my: 1 } }),
4280
+ /* @__PURE__ */ jsx7(MenuItem, { value: ADD_NEW_AUTH, sx: { color: "hsl(var(--primary))", fontWeight: 600 }, children: "+ Add new authentication" })
4176
4281
  ]
4177
4282
  }
4178
4283
  ) }),
@@ -4194,11 +4299,11 @@ var AppAuthCard = ({
4194
4299
  }
4195
4300
  },
4196
4301
  children: [
4197
- /* @__PURE__ */ jsx6(DialogTitle, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, pb: 1 }, children: "Delete Authentication" }),
4302
+ /* @__PURE__ */ jsx7(DialogTitle, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, pb: 1 }, children: "Delete Authentication" }),
4198
4303
  /* @__PURE__ */ jsxs2(DialogContent, { children: [
4199
- /* @__PURE__ */ jsx6(Typography, { sx: { color: "hsl(var(--muted-foreground))", mb: 3 }, children: "Are you sure you want to delete this authentication? This action cannot be undone." }),
4304
+ /* @__PURE__ */ jsx7(Typography, { sx: { color: "hsl(var(--muted-foreground))", mb: 3 }, children: "Are you sure you want to delete this authentication? This action cannot be undone." }),
4200
4305
  /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", justifyContent: "flex-end", gap: 1.5 }, children: [
4201
- /* @__PURE__ */ jsx6(
4306
+ /* @__PURE__ */ jsx7(
4202
4307
  Button,
4203
4308
  {
4204
4309
  variant: "outlined",
@@ -4217,7 +4322,7 @@ var AppAuthCard = ({
4217
4322
  children: "Cancel"
4218
4323
  }
4219
4324
  ),
4220
- /* @__PURE__ */ jsx6(
4325
+ /* @__PURE__ */ jsx7(
4221
4326
  Button,
4222
4327
  {
4223
4328
  variant: "contained",
@@ -4262,14 +4367,14 @@ var AppAuthCard = ({
4262
4367
  borderBottom: "1px solid hsl(var(--border))",
4263
4368
  backgroundColor: "transparent"
4264
4369
  }, children: [
4265
- /* @__PURE__ */ jsx6(Box3, { sx: {
4370
+ /* @__PURE__ */ jsx7(Box3, { sx: {
4266
4371
  width: 8,
4267
4372
  height: 8,
4268
4373
  borderRadius: "50%",
4269
4374
  backgroundColor: localTestStatus === "success" || localTestStatus === "pending_validation" ? "hsl(var(--severity-low))" : localTestStatus === "error" ? "hsl(var(--destructive))" : "hsl(var(--muted-foreground))",
4270
4375
  boxShadow: localTestStatus === "success" || localTestStatus === "pending_validation" ? "0 0 8px hsl(var(--severity-low) / 0.6)" : localTestStatus === "error" ? "0 0 8px hsl(var(--destructive) / 0.6)" : "0 0 8px hsl(var(--muted-foreground) / 0.4)"
4271
4376
  } }),
4272
- /* @__PURE__ */ jsx6(Typography, { sx: {
4377
+ /* @__PURE__ */ jsx7(Typography, { sx: {
4273
4378
  color: "hsl(var(--muted-foreground))",
4274
4379
  fontSize: "0.75rem",
4275
4380
  fontWeight: 500,
@@ -4291,7 +4396,7 @@ var AppAuthCard = ({
4291
4396
  minWidth: 0,
4292
4397
  flex: 1
4293
4398
  }, children: [
4294
- /* @__PURE__ */ jsx6(Box3, { sx: {
4399
+ /* @__PURE__ */ jsx7(Box3, { sx: {
4295
4400
  width: 36,
4296
4401
  height: 36,
4297
4402
  borderRadius: 2,
@@ -4301,10 +4406,10 @@ var AppAuthCard = ({
4301
4406
  backgroundColor: "transparent",
4302
4407
  border: `1px solid ${localTestStatus === "success" || localTestStatus === "pending_validation" ? "hsl(var(--severity-low) / 0.3)" : localTestStatus === "error" ? "hsl(var(--destructive) / 0.3)" : isTested ? "hsl(var(--severity-low) / 0.3)" : isConfigured ? "hsl(var(--severity-medium) / 0.3)" : "hsl(var(--border))"}`,
4303
4408
  flexShrink: 0
4304
- }, children: /* @__PURE__ */ jsx6(CheckCircleIcon, { size: 20 }) }),
4409
+ }, children: /* @__PURE__ */ jsx7(CheckCircleIcon, { size: 20 }) }),
4305
4410
  /* @__PURE__ */ jsxs2(Box3, { sx: { minWidth: 0, flex: 1 }, children: [
4306
- /* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: editingLabel ? /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, onClick: (e) => e.stopPropagation(), children: [
4307
- /* @__PURE__ */ jsx6(
4411
+ /* @__PURE__ */ jsx7(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: editingLabel ? /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, onClick: (e) => e.stopPropagation(), children: [
4412
+ /* @__PURE__ */ jsx7(
4308
4413
  TextField,
4309
4414
  {
4310
4415
  value: editLabelValue,
@@ -4328,7 +4433,7 @@ var AppAuthCard = ({
4328
4433
  }
4329
4434
  }
4330
4435
  ),
4331
- /* @__PURE__ */ jsx6(
4436
+ /* @__PURE__ */ jsx7(
4332
4437
  Button,
4333
4438
  {
4334
4439
  size: "small",
@@ -4344,10 +4449,10 @@ var AppAuthCard = ({
4344
4449
  bgcolor: "hsl(var(--primary))",
4345
4450
  "&:hover": { bgcolor: "hsl(var(--primary) / 0.9)" }
4346
4451
  },
4347
- children: savingLabel ? /* @__PURE__ */ jsx6(CircularProgress, { size: 12, sx: { color: "inherit" } }) : "Save"
4452
+ children: savingLabel ? /* @__PURE__ */ jsx7(CircularProgress, { size: 12, sx: { color: "inherit" } }) : "Save"
4348
4453
  }
4349
4454
  ),
4350
- /* @__PURE__ */ jsx6(
4455
+ /* @__PURE__ */ jsx7(
4351
4456
  Button,
4352
4457
  {
4353
4458
  size: "small",
@@ -4364,8 +4469,8 @@ var AppAuthCard = ({
4364
4469
  children: "Cancel"
4365
4470
  }
4366
4471
  )
4367
- ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
4368
- /* @__PURE__ */ jsx6(Typography, { sx: {
4472
+ ] }) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
4473
+ /* @__PURE__ */ jsx7(Typography, { sx: {
4369
4474
  color: "hsl(var(--foreground))",
4370
4475
  fontWeight: 600,
4371
4476
  fontSize: { xs: "0.9rem", sm: "0.95rem" },
@@ -4374,7 +4479,7 @@ var AppAuthCard = ({
4374
4479
  whiteSpace: "nowrap",
4375
4480
  lineHeight: 1.3
4376
4481
  }, children: selectedAuth.label || "Selected authentication" }),
4377
- /* @__PURE__ */ jsx6(Tooltip2, { title: "Rename authentication", arrow: true, children: /* @__PURE__ */ jsx6(
4482
+ /* @__PURE__ */ jsx7(Tooltip2, { title: "Rename authentication", arrow: true, children: /* @__PURE__ */ jsx7(
4378
4483
  IconButton,
4379
4484
  {
4380
4485
  size: "small",
@@ -4388,11 +4493,11 @@ var AppAuthCard = ({
4388
4493
  color: "hsl(var(--muted-foreground))",
4389
4494
  "&:hover": { color: "hsl(var(--primary))" }
4390
4495
  },
4391
- children: /* @__PURE__ */ jsx6(EditIcon, { size: 14 })
4496
+ children: /* @__PURE__ */ jsx7(EditIcon, { size: 14 })
4392
4497
  }
4393
4498
  ) })
4394
4499
  ] }) }),
4395
- /* @__PURE__ */ jsx6(Typography, { sx: {
4500
+ /* @__PURE__ */ jsx7(Typography, { sx: {
4396
4501
  color: localTestStatus === "success" || localTestStatus === "pending_validation" ? "hsl(var(--severity-low))" : localTestStatus === "error" ? "hsl(var(--destructive))" : isTested ? "hsl(var(--severity-low))" : isConfigured ? "hsl(var(--severity-medium))" : "hsl(var(--muted-foreground))",
4397
4502
  fontSize: "0.75rem",
4398
4503
  mt: 0.25,
@@ -4400,7 +4505,7 @@ var AppAuthCard = ({
4400
4505
  }, children: localTestStatus === "success" || localTestStatus === "pending_validation" ? "Connection verified" : localTestStatus === "error" ? "Test failed" : localTestStatus === "testing" ? "Testing..." : "Not tested in this session" })
4401
4506
  ] })
4402
4507
  ] }),
4403
- /* @__PURE__ */ jsx6(
4508
+ /* @__PURE__ */ jsx7(
4404
4509
  Button,
4405
4510
  {
4406
4511
  variant: authState.status === "testing" ? "contained" : "outlined",
@@ -4411,7 +4516,7 @@ var AppAuthCard = ({
4411
4516
  onTestConnection(app2.objectID, selectedAuthId !== ADD_NEW_AUTH ? selectedAuthId : void 0);
4412
4517
  },
4413
4518
  disabled: authState.status === "testing",
4414
- startIcon: authState.status === "testing" ? /* @__PURE__ */ jsx6(CircularProgress, { size: 16, sx: { color: "inherit" } }) : /* @__PURE__ */ jsx6(CheckCircleIcon, { size: 18 }),
4519
+ startIcon: authState.status === "testing" ? /* @__PURE__ */ jsx7(CircularProgress, { size: 16, sx: { color: "inherit" } }) : /* @__PURE__ */ jsx7(CheckCircleIcon, { size: 18 }),
4415
4520
  sx: {
4416
4521
  borderColor: authState.status === "testing" ? "transparent" : "hsl(var(--primary) / 0.5)",
4417
4522
  color: authState.status === "testing" ? "hsl(var(--foreground))" : "hsl(var(--primary))",
@@ -4444,10 +4549,10 @@ var AppAuthCard = ({
4444
4549
  }
4445
4550
  )
4446
4551
  ] }),
4447
- localTestStatus === "error" && localTestMessages.errorMessage && /* @__PURE__ */ jsx6(Box3, { sx: {
4552
+ localTestStatus === "error" && localTestMessages.errorMessage && /* @__PURE__ */ jsx7(Box3, { sx: {
4448
4553
  px: { xs: 2, sm: 2.5 },
4449
4554
  pb: { xs: 2, sm: 2.5 }
4450
- }, children: /* @__PURE__ */ jsx6(
4555
+ }, children: /* @__PURE__ */ jsx7(
4451
4556
  Alert,
4452
4557
  {
4453
4558
  severity: "error",
@@ -4459,15 +4564,15 @@ var AppAuthCard = ({
4459
4564
  "& .MuiAlert-icon": { color: "hsl(var(--destructive))" }
4460
4565
  },
4461
4566
  children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, width: "100%" }, children: [
4462
- /* @__PURE__ */ jsx6(Typography, { sx: { fontSize: "0.875rem", flex: 1 }, children: localTestMessages.errorMessage }),
4463
- localTestMessages.executionId && /* @__PURE__ */ jsx6(ViewExecutionButton, { executionId: localTestMessages.executionId, tone: "destructive" })
4567
+ /* @__PURE__ */ jsx7(Typography, { sx: { fontSize: "0.875rem", flex: 1 }, children: localTestMessages.errorMessage }),
4568
+ localTestMessages.executionId && /* @__PURE__ */ jsx7(ViewExecutionButton, { executionId: localTestMessages.executionId, tone: "destructive" })
4464
4569
  ] })
4465
4570
  }
4466
4571
  ) }),
4467
- localTestStatus === "success" && localTestMessages.warningMessage && /* @__PURE__ */ jsx6(Box3, { sx: {
4572
+ localTestStatus === "success" && localTestMessages.warningMessage && /* @__PURE__ */ jsx7(Box3, { sx: {
4468
4573
  px: { xs: 2, sm: 2.5 },
4469
4574
  pb: { xs: 2, sm: 2.5 }
4470
- }, children: /* @__PURE__ */ jsx6(
4575
+ }, children: /* @__PURE__ */ jsx7(
4471
4576
  Alert,
4472
4577
  {
4473
4578
  severity: "warning",
@@ -4482,10 +4587,10 @@ var AppAuthCard = ({
4482
4587
  },
4483
4588
  children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, width: "100%" }, children: [
4484
4589
  /* @__PURE__ */ jsxs2(Box3, { sx: { flex: 1 }, children: [
4485
- /* @__PURE__ */ jsx6(Typography, { sx: { fontWeight: 600, mb: 0.5 }, children: localTestMessages.successMessage || "Connection probably working" }),
4486
- /* @__PURE__ */ jsx6(Typography, { sx: { fontSize: "0.85rem", opacity: 0.9 }, children: localTestMessages.warningMessage })
4590
+ /* @__PURE__ */ jsx7(Typography, { sx: { fontWeight: 600, mb: 0.5 }, children: localTestMessages.successMessage || "Connection probably working" }),
4591
+ /* @__PURE__ */ jsx7(Typography, { sx: { fontSize: "0.85rem", opacity: 0.9 }, children: localTestMessages.warningMessage })
4487
4592
  ] }),
4488
- localTestMessages.executionId && /* @__PURE__ */ jsx6(ViewExecutionButton, { executionId: localTestMessages.executionId })
4593
+ localTestMessages.executionId && /* @__PURE__ */ jsx7(ViewExecutionButton, { executionId: localTestMessages.executionId })
4489
4594
  ] })
4490
4595
  }
4491
4596
  ) })
@@ -4497,7 +4602,7 @@ var AppAuthCard = ({
4497
4602
  borderRadius: 2,
4498
4603
  border: "1px solid hsl(var(--border))"
4499
4604
  }, children: [
4500
- isCredentialError && /* @__PURE__ */ jsx6(
4605
+ isCredentialError && /* @__PURE__ */ jsx7(
4501
4606
  Alert,
4502
4607
  {
4503
4608
  severity: "warning",
@@ -4509,17 +4614,17 @@ var AppAuthCard = ({
4509
4614
  mb: 2,
4510
4615
  "& .MuiAlert-icon": { color: "hsl(var(--severity-medium))" }
4511
4616
  },
4512
- children: /* @__PURE__ */ jsx6(Typography, { sx: { fontSize: "0.875rem" }, children: localTestMessages.errorCode === 401 ? "Previous credentials were invalid or expired. Please enter new credentials." : "Access was denied with the previous credentials. Please re-authenticate with valid permissions." })
4617
+ children: /* @__PURE__ */ jsx7(Typography, { sx: { fontSize: "0.875rem" }, children: localTestMessages.errorCode === 401 ? "Previous credentials were invalid or expired. Please enter new credentials." : "Access was denied with the previous credentials. Please re-authenticate with valid permissions." })
4513
4618
  }
4514
4619
  ),
4515
- /* @__PURE__ */ jsx6(Typography, { variant: "subtitle2", sx: { color: "hsl(var(--foreground))", fontWeight: 600, mb: 2 }, children: apiAuthEntries.length === 0 ? `Configure ${app2.name.replace(/_/g, " ")}` : "Add New Authentication" }),
4620
+ /* @__PURE__ */ jsx7(Typography, { variant: "subtitle2", sx: { color: "hsl(var(--foreground))", fontWeight: 600, mb: 2 }, children: apiAuthEntries.length === 0 ? `Configure ${app2.name.replace(/_/g, " ")}` : "Add New Authentication" }),
4516
4621
  loading ? /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", py: 4 }, children: [
4517
- /* @__PURE__ */ jsx6(CircularProgress, { size: 32, sx: { color: "hsl(var(--primary))" } }),
4518
- /* @__PURE__ */ jsx6(Typography, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: "Loading configuration..." })
4622
+ /* @__PURE__ */ jsx7(CircularProgress, { size: 32, sx: { color: "hsl(var(--primary))" } }),
4623
+ /* @__PURE__ */ jsx7(Typography, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: "Loading configuration..." })
4519
4624
  ] }) : saving || authState.status === "testing" ? /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", py: 4 }, children: [
4520
- /* @__PURE__ */ jsx6(CircularProgress, { size: 32, sx: { color: "hsl(var(--primary))" } }),
4521
- /* @__PURE__ */ jsx6(Typography, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: saving ? "Saving authentication..." : "Testing connection..." })
4522
- ] }) : error ? /* @__PURE__ */ jsx6(
4625
+ /* @__PURE__ */ jsx7(CircularProgress, { size: 32, sx: { color: "hsl(var(--primary))" } }),
4626
+ /* @__PURE__ */ jsx7(Typography, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: saving ? "Saving authentication..." : "Testing connection..." })
4627
+ ] }) : error ? /* @__PURE__ */ jsx7(
4523
4628
  Alert,
4524
4629
  {
4525
4630
  severity: "error",
@@ -4531,7 +4636,7 @@ var AppAuthCard = ({
4531
4636
  },
4532
4637
  children: error
4533
4638
  }
4534
- ) : isNoAuthRequired(auth) ? /* @__PURE__ */ jsx6(
4639
+ ) : isNoAuthRequired(auth) ? /* @__PURE__ */ jsx7(
4535
4640
  Alert,
4536
4641
  {
4537
4642
  severity: "info",
@@ -4543,15 +4648,15 @@ var AppAuthCard = ({
4543
4648
  "& .MuiAlert-icon": { color: "hsl(var(--severity-info))" }
4544
4649
  },
4545
4650
  children: /* @__PURE__ */ jsxs2(Box3, { children: [
4546
- /* @__PURE__ */ jsx6(Typography, { sx: { fontWeight: 600, mb: 0.5 }, children: "No authentication required" }),
4547
- /* @__PURE__ */ jsx6(Typography, { sx: { fontSize: "0.85rem", opacity: 0.9 }, children: "This app works without credentials. You can use it directly." })
4651
+ /* @__PURE__ */ jsx7(Typography, { sx: { fontWeight: 600, mb: 0.5 }, children: "No authentication required" }),
4652
+ /* @__PURE__ */ jsx7(Typography, { sx: { fontSize: "0.85rem", opacity: 0.9 }, children: "This app works without credentials. You can use it directly." })
4548
4653
  ] })
4549
4654
  }
4550
4655
  ) : /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
4551
4656
  extraFieldsSlot?.({ credentials: localCredentials, setField: handleCredentialChange }),
4552
4657
  renderOAuth2Fields(),
4553
4658
  renderParameterFields(),
4554
- authState.status === "error" && authState.errorMessage && /* @__PURE__ */ jsx6(
4659
+ authState.status === "error" && authState.errorMessage && /* @__PURE__ */ jsx7(
4555
4660
  Alert,
4556
4661
  {
4557
4662
  severity: "error",
@@ -4562,12 +4667,12 @@ var AppAuthCard = ({
4562
4667
  borderRadius: 2
4563
4668
  },
4564
4669
  children: /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, width: "100%" }, children: [
4565
- /* @__PURE__ */ jsx6(Typography, { sx: { fontSize: "0.875rem", flex: 1 }, children: authState.errorMessage }),
4566
- authState.executionId && /* @__PURE__ */ jsx6(ViewExecutionButton, { executionId: authState.executionId, tone: "destructive" })
4670
+ /* @__PURE__ */ jsx7(Typography, { sx: { fontSize: "0.875rem", flex: 1 }, children: authState.errorMessage }),
4671
+ authState.executionId && /* @__PURE__ */ jsx7(ViewExecutionButton, { executionId: authState.executionId, tone: "destructive" })
4567
4672
  ] })
4568
4673
  }
4569
4674
  ),
4570
- saveSuccess === false && /* @__PURE__ */ jsx6(
4675
+ saveSuccess === false && /* @__PURE__ */ jsx7(
4571
4676
  Alert,
4572
4677
  {
4573
4678
  severity: "error",
@@ -4581,7 +4686,7 @@ var AppAuthCard = ({
4581
4686
  }
4582
4687
  ),
4583
4688
  !isOAuth2 && /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", justifyContent: "flex-end", pt: 1.5, gap: 1, flexWrap: "wrap" }, children: [
4584
- pendingFailedAuthId && /* @__PURE__ */ jsx6(
4689
+ pendingFailedAuthId && /* @__PURE__ */ jsx7(
4585
4690
  Button,
4586
4691
  {
4587
4692
  variant: "text",
@@ -4638,7 +4743,7 @@ var AppAuthCard = ({
4638
4743
  children: "Save anyway"
4639
4744
  }
4640
4745
  ),
4641
- /* @__PURE__ */ jsx6(
4746
+ /* @__PURE__ */ jsx7(
4642
4747
  Button,
4643
4748
  {
4644
4749
  variant: "outlined",
@@ -4709,12 +4814,12 @@ var AppAuthCard = ({
4709
4814
  });
4710
4815
  return `${authorizationUrl}?${params.toString()}`;
4711
4816
  };
4712
- return /* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", justifyContent: "flex-end", pt: 1.5 }, children: /* @__PURE__ */ jsx6(
4817
+ return /* @__PURE__ */ jsx7(Box3, { sx: { display: "flex", justifyContent: "flex-end", pt: 1.5 }, children: /* @__PURE__ */ jsx7(
4713
4818
  Button,
4714
4819
  {
4715
4820
  variant: "outlined",
4716
4821
  size: "medium",
4717
- startIcon: app2.image_url ? /* @__PURE__ */ jsx6(
4822
+ startIcon: app2.image_url ? /* @__PURE__ */ jsx7(
4718
4823
  Box3,
4719
4824
  {
4720
4825
  component: "img",
@@ -4722,7 +4827,7 @@ var AppAuthCard = ({
4722
4827
  alt: app2.name,
4723
4828
  sx: { width: 20, height: 20, borderRadius: 0.5, objectFit: "contain" }
4724
4829
  }
4725
- ) : /* @__PURE__ */ jsx6(LockIcon, { size: 18 }),
4830
+ ) : /* @__PURE__ */ jsx7(LockIcon, { size: 18 }),
4726
4831
  onClick: (e) => {
4727
4832
  e.stopPropagation();
4728
4833
  const directUrl = buildOAuth2Url();
@@ -4805,7 +4910,7 @@ var AppAuthCard = ({
4805
4910
  },
4806
4911
  children: [
4807
4912
  /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
4808
- app2.image_url && /* @__PURE__ */ jsx6(
4913
+ app2.image_url && /* @__PURE__ */ jsx7(
4809
4914
  Box3,
4810
4915
  {
4811
4916
  component: "img",
@@ -4819,14 +4924,14 @@ var AppAuthCard = ({
4819
4924
  " Documentation"
4820
4925
  ] })
4821
4926
  ] }),
4822
- /* @__PURE__ */ jsx6(IconButton, { onClick: () => setDocsOpen(false), sx: { color: "hsl(var(--muted-foreground))" }, children: /* @__PURE__ */ jsx6(CloseIcon, {}) })
4927
+ /* @__PURE__ */ jsx7(IconButton, { onClick: () => setDocsOpen(false), sx: { color: "hsl(var(--muted-foreground))" }, children: /* @__PURE__ */ jsx7(CloseIcon, {}) })
4823
4928
  ]
4824
4929
  }
4825
4930
  ),
4826
- /* @__PURE__ */ jsx6(DialogContent, { sx: { pt: 3 }, children: docsLoading ? /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", py: 6 }, children: [
4827
- /* @__PURE__ */ jsx6(CircularProgress, { size: 32, sx: { color: "hsl(var(--primary))" } }),
4828
- /* @__PURE__ */ jsx6(Typography, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: "Loading documentation..." })
4829
- ] }) : /* @__PURE__ */ jsx6(
4931
+ /* @__PURE__ */ jsx7(DialogContent, { sx: { pt: 3 }, children: docsLoading ? /* @__PURE__ */ jsxs2(Box3, { sx: { display: "flex", alignItems: "center", justifyContent: "center", py: 6 }, children: [
4932
+ /* @__PURE__ */ jsx7(CircularProgress, { size: 32, sx: { color: "hsl(var(--primary))" } }),
4933
+ /* @__PURE__ */ jsx7(Typography, { sx: { ml: 2, color: "hsl(var(--muted-foreground))" }, children: "Loading documentation..." })
4934
+ ] }) : /* @__PURE__ */ jsx7(
4830
4935
  Box3,
4831
4936
  {
4832
4937
  sx: {
@@ -4850,7 +4955,7 @@ var AppAuthCard = ({
4850
4955
  "& ul, & ol": { pl: 3, mb: 2 },
4851
4956
  "& li": { mb: 1 }
4852
4957
  },
4853
- children: /* @__PURE__ */ jsx6(Markdown_default, { children: docsContent })
4958
+ children: /* @__PURE__ */ jsx7(Markdown_default, { children: docsContent })
4854
4959
  }
4855
4960
  ) })
4856
4961
  ]
@@ -4892,8 +4997,8 @@ var AppAuthConfig = ({
4892
4997
  const entries = getApiAuthEntries(app2);
4893
4998
  return entries.some((e) => e.validation?.valid === true);
4894
4999
  };
4895
- const initialSortRef = useRef2(null);
4896
- const authAppsLoadedRef = useRef2(false);
5000
+ const initialSortRef = useRef3(null);
5001
+ const authAppsLoadedRef = useRef3(false);
4897
5002
  if (!authAppsLoadedRef.current && authenticatedApps.length > 0) {
4898
5003
  authAppsLoadedRef.current = true;
4899
5004
  initialSortRef.current = null;
@@ -4916,9 +5021,9 @@ var AppAuthConfig = ({
4916
5021
  const firstNotConfigured = sortedApps.find((app2) => !isAppConfigured(app2));
4917
5022
  const firstNotValidated = sortedApps.find((app2) => !isAppValidated(app2));
4918
5023
  const defaultExpanded = firstNotConfigured?.objectID || firstNotValidated?.objectID || false;
4919
- const [expanded, setExpanded] = useState3(defaultExpanded);
5024
+ const [expanded, setExpanded] = useState4(defaultExpanded);
4920
5025
  if (apps.length === 0) {
4921
- return /* @__PURE__ */ jsx6(
5026
+ return /* @__PURE__ */ jsx7(
4922
5027
  Alert,
4923
5028
  {
4924
5029
  severity: "info",
@@ -4935,7 +5040,7 @@ var AppAuthConfig = ({
4935
5040
  const validatedCount = sortedApps.filter((app2) => isAppValidated(app2)).length;
4936
5041
  const totalCount = sortedApps.length;
4937
5042
  return /* @__PURE__ */ jsxs2(Box3, { sx: { width: "100%", maxWidth: "100%", overflow: "hidden" }, children: [
4938
- /* @__PURE__ */ jsx6(
5043
+ /* @__PURE__ */ jsx7(
4939
5044
  Typography,
4940
5045
  {
4941
5046
  variant: "h5",
@@ -4948,7 +5053,7 @@ var AppAuthConfig = ({
4948
5053
  children: "Configure Authentication"
4949
5054
  }
4950
5055
  ),
4951
- /* @__PURE__ */ jsx6(
5056
+ /* @__PURE__ */ jsx7(
4952
5057
  Typography,
4953
5058
  {
4954
5059
  variant: "body1",
@@ -4956,7 +5061,7 @@ var AppAuthConfig = ({
4956
5061
  children: "Set up credentials for each integration. Apps with orange borders need configuration."
4957
5062
  }
4958
5063
  ),
4959
- /* @__PURE__ */ jsx6(
5064
+ /* @__PURE__ */ jsx7(
4960
5065
  Chip2,
4961
5066
  {
4962
5067
  label: `${validatedCount}/${totalCount} validated`,
@@ -4969,11 +5074,11 @@ var AppAuthConfig = ({
4969
5074
  }
4970
5075
  }
4971
5076
  ),
4972
- /* @__PURE__ */ jsx6(motion.div, { variants: containerVariants, initial: "hidden", animate: "visible", children: /* @__PURE__ */ jsx6(Box3, { sx: { display: "flex", flexDirection: "column", gap: 2, width: "100%", maxWidth: "100%" }, children: sortedApps.map((app2) => {
5077
+ /* @__PURE__ */ jsx7(motion.div, { variants: containerVariants, initial: "hidden", animate: "visible", children: /* @__PURE__ */ jsx7(Box3, { sx: { display: "flex", flexDirection: "column", gap: 2, width: "100%", maxWidth: "100%" }, children: sortedApps.map((app2) => {
4973
5078
  const authState = authStates[app2.objectID] || { systemId: app2.objectID, status: "pending", credentials: {} };
4974
5079
  const isExpanded = expanded === app2.objectID;
4975
5080
  const apiAuthEntries = getApiAuthEntries(app2);
4976
- return /* @__PURE__ */ jsx6(
5081
+ return /* @__PURE__ */ jsx7(
4977
5082
  AppAuthCard,
4978
5083
  {
4979
5084
  globalUrl,
@@ -4999,10 +5104,10 @@ var AppAuthConfig = ({
4999
5104
  };
5000
5105
 
5001
5106
  // useAppAuth.ts
5002
- import { useState as useState6, useCallback as useCallback4, useEffect as useEffect6, useRef as useRef3 } from "react";
5107
+ import { useState as useState7, useCallback as useCallback5, useEffect as useEffect7, useRef as useRef4 } from "react";
5003
5108
 
5004
5109
  // components/IntegrationStatus.tsx
5005
- import { useState as useState5, useEffect as useEffect5, useCallback as useCallback3 } from "react";
5110
+ import { useState as useState6, useEffect as useEffect6, useCallback as useCallback4 } from "react";
5006
5111
  import {
5007
5112
  Plus as AddIcon
5008
5113
  } from "lucide-react";
@@ -5017,8 +5122,8 @@ import {
5017
5122
  import { Link as RouterLink } from "react-router-dom";
5018
5123
 
5019
5124
  // AppDetailContext.tsx
5020
- import { createContext, useContext, useState as useState4, useCallback as useCallback2 } from "react";
5021
- import { jsx as jsx7 } from "react/jsx-runtime";
5125
+ import { createContext as createContext2, useContext as useContext2, useState as useState5, useCallback as useCallback3 } from "react";
5126
+ import { jsx as jsx8 } from "react/jsx-runtime";
5022
5127
  var fallbackContext = {
5023
5128
  openApp: (appName) => {
5024
5129
  if (typeof window !== "undefined" && appName) {
@@ -5030,27 +5135,27 @@ var fallbackContext = {
5030
5135
  currentAppName: null,
5031
5136
  isOpen: false
5032
5137
  };
5033
- var AppDetailContext = createContext(fallbackContext);
5138
+ var AppDetailContext = createContext2(fallbackContext);
5034
5139
  var AppDetailProvider = ({ children: children2 }) => {
5035
- const [currentAppName, setCurrentAppName] = useState4(null);
5036
- const openApp = useCallback2((appName) => {
5140
+ const [currentAppName, setCurrentAppName] = useState5(null);
5141
+ const openApp = useCallback3((appName) => {
5037
5142
  setCurrentAppName(appName);
5038
5143
  }, []);
5039
- const closeApp = useCallback2(() => {
5144
+ const closeApp = useCallback3(() => {
5040
5145
  setCurrentAppName(null);
5041
5146
  }, []);
5042
- return /* @__PURE__ */ jsx7(AppDetailContext.Provider, { value: { openApp, closeApp, currentAppName, isOpen: currentAppName !== null }, children: children2 });
5147
+ return /* @__PURE__ */ jsx8(AppDetailContext.Provider, { value: { openApp, closeApp, currentAppName, isOpen: currentAppName !== null }, children: children2 });
5043
5148
  };
5044
5149
  var useAppDetail = () => {
5045
- return useContext(AppDetailContext);
5150
+ return useContext2(AppDetailContext);
5046
5151
  };
5047
5152
  var useAppDetailOptional = () => {
5048
- const ctx = useContext(AppDetailContext);
5153
+ const ctx = useContext2(AppDetailContext);
5049
5154
  return ctx === fallbackContext ? null : ctx;
5050
5155
  };
5051
5156
 
5052
5157
  // components/IntegrationStatus.tsx
5053
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
5158
+ import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
5054
5159
  var ONBOARDING_CONFIG_CATEGORY = "shuffle-security_onboarding";
5055
5160
  var SELECTED_TOOLS_KEY = "selected_tools";
5056
5161
  var PRIORITY_CATEGORY_PATTERNS = {
@@ -5069,12 +5174,12 @@ var refreshAllIntegrationStatus = () => {
5069
5174
  window.dispatchEvent(new CustomEvent("integrations-changed"));
5070
5175
  };
5071
5176
  var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onDisable, disabledApps, showAll, hideAddButton, hideHeader, priorityCategory, extraApps }) => {
5072
- const [allIntegrations, setAllIntegrations] = useState5([]);
5073
- const [onboardingApps, setOnboardingApps] = useState5([]);
5074
- const [loading, setLoading] = useState5(false);
5075
- const [expanded, setExpanded] = useState5(false);
5076
- const [failedImages, setFailedImages] = useState5(/* @__PURE__ */ new Set());
5077
- const [hoveredId, setHoveredId] = useState5(null);
5177
+ const [allIntegrations, setAllIntegrations] = useState6([]);
5178
+ const [onboardingApps, setOnboardingApps] = useState6([]);
5179
+ const [loading, setLoading] = useState6(false);
5180
+ const [expanded, setExpanded] = useState6(false);
5181
+ const [failedImages, setFailedImages] = useState6(/* @__PURE__ */ new Set());
5182
+ const [hoveredId, setHoveredId] = useState6(null);
5078
5183
  const appDetail = useAppDetailOptional();
5079
5184
  const mergedIntegrations = (() => {
5080
5185
  const pending = [...extraApps || [], ...onboardingApps];
@@ -5102,7 +5207,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5102
5207
  const defaultLimit = showAll ? integrations.length : collapsed ? 3 : 7;
5103
5208
  const displayLimit = showAll ? integrations.length : expanded ? integrations.length : defaultLimit;
5104
5209
  const hasMore = !showAll && integrations.length > defaultLimit;
5105
- const fetchIntegrations = useCallback3(async () => {
5210
+ const fetchIntegrations = useCallback4(async () => {
5106
5211
  setLoading(true);
5107
5212
  try {
5108
5213
  const authData = await fetchAuthenticatedApps().catch(() => []);
@@ -5171,7 +5276,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5171
5276
  setLoading(false);
5172
5277
  }
5173
5278
  }, [priorityCategory]);
5174
- const fetchOnboardingApps = useCallback3(async () => {
5279
+ const fetchOnboardingApps = useCallback4(async () => {
5175
5280
  try {
5176
5281
  const resp = await getDatastoreItem(SELECTED_TOOLS_KEY, ONBOARDING_CONFIG_CATEGORY);
5177
5282
  if (!resp?.success || !resp.item?.value) {
@@ -5194,11 +5299,11 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5194
5299
  setOnboardingApps([]);
5195
5300
  }
5196
5301
  }, []);
5197
- useEffect5(() => {
5302
+ useEffect6(() => {
5198
5303
  fetchIntegrations();
5199
5304
  fetchOnboardingApps();
5200
5305
  }, [fetchIntegrations, fetchOnboardingApps]);
5201
- useEffect5(() => {
5306
+ useEffect6(() => {
5202
5307
  const handler = () => {
5203
5308
  fetchIntegrations();
5204
5309
  fetchOnboardingApps();
@@ -5212,7 +5317,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5212
5317
  };
5213
5318
  const sz = iconSize;
5214
5319
  return /* @__PURE__ */ jsxs3(Box4, { sx: { px: collapsed ? 0 : 1, py: 1 }, children: [
5215
- !collapsed && !hideHeader && /* @__PURE__ */ jsx8(
5320
+ !collapsed && !hideHeader && /* @__PURE__ */ jsx9(
5216
5321
  Typography2,
5217
5322
  {
5218
5323
  sx: {
@@ -5227,7 +5332,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5227
5332
  children: "Integrations"
5228
5333
  }
5229
5334
  ),
5230
- /* @__PURE__ */ jsx8(Box4, { sx: {
5335
+ /* @__PURE__ */ jsx9(Box4, { sx: {
5231
5336
  display: "flex",
5232
5337
  flexWrap: "wrap",
5233
5338
  gap: 0.5,
@@ -5235,21 +5340,21 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5235
5340
  px: collapsed ? 0 : 1,
5236
5341
  maxHeight: expanded ? "none" : 80,
5237
5342
  overflow: "hidden"
5238
- }, children: loading ? /* @__PURE__ */ jsx8(CircularProgress2, { size: 20, sx: { color: "hsl(var(--muted-foreground))" } }) : /* @__PURE__ */ jsxs3(Fragment2, { children: [
5343
+ }, children: loading ? /* @__PURE__ */ jsx9(CircularProgress2, { size: 20, sx: { color: "hsl(var(--muted-foreground))" } }) : /* @__PURE__ */ jsxs3(Fragment3, { children: [
5239
5344
  integrations.slice(0, displayLimit).map((integration) => {
5240
5345
  const isDisabled = disabledApps?.has(integration.name) ?? false;
5241
5346
  const isHovered = hoveredId === integration.id;
5242
- return /* @__PURE__ */ jsx8(
5347
+ return /* @__PURE__ */ jsx9(
5243
5348
  Tooltip3,
5244
5349
  {
5245
5350
  title: onDisable && isHovered ? "" : /* @__PURE__ */ jsxs3(Box4, { sx: { textAlign: "left", minWidth: 160, maxWidth: 320, p: 0.5 }, children: [
5246
5351
  /* @__PURE__ */ jsxs3(Typography2, { sx: { fontWeight: 600, fontSize: "0.85rem", color: "hsl(var(--foreground))", textTransform: "capitalize" }, children: [
5247
5352
  integration.name.replace(/_/g, " "),
5248
- isDisabled && /* @__PURE__ */ jsx8(Typography2, { component: "span", sx: { ml: 1, fontSize: "0.7rem", color: "hsl(var(--muted-foreground))" }, children: "(disabled)" })
5353
+ isDisabled && /* @__PURE__ */ jsx9(Typography2, { component: "span", sx: { ml: 1, fontSize: "0.7rem", color: "hsl(var(--muted-foreground))" }, children: "(disabled)" })
5249
5354
  ] }),
5250
- /* @__PURE__ */ jsx8(Typography2, { sx: { fontSize: "0.7rem", color: "hsl(var(--muted-foreground))", mb: 1, textTransform: "capitalize" }, children: integration.category }),
5251
- /* @__PURE__ */ jsx8(Box4, { sx: { display: "flex", flexDirection: "column", gap: 0.5 }, children: integration.authInstances.map((instance, idx) => /* @__PURE__ */ jsxs3(Box4, { sx: { display: "flex", alignItems: "center", gap: 0.75, minWidth: 0 }, children: [
5252
- /* @__PURE__ */ jsx8(
5355
+ /* @__PURE__ */ jsx9(Typography2, { sx: { fontSize: "0.7rem", color: "hsl(var(--muted-foreground))", mb: 1, textTransform: "capitalize" }, children: integration.category }),
5356
+ /* @__PURE__ */ jsx9(Box4, { sx: { display: "flex", flexDirection: "column", gap: 0.5 }, children: integration.authInstances.map((instance, idx) => /* @__PURE__ */ jsxs3(Box4, { sx: { display: "flex", alignItems: "center", gap: 0.75, minWidth: 0 }, children: [
5357
+ /* @__PURE__ */ jsx9(
5253
5358
  Box4,
5254
5359
  {
5255
5360
  sx: {
@@ -5261,8 +5366,8 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5261
5366
  }
5262
5367
  }
5263
5368
  ),
5264
- /* @__PURE__ */ jsx8(Typography2, { sx: { fontSize: "0.75rem", color: "hsl(var(--foreground))", opacity: 0.9, flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: instance.label }),
5265
- /* @__PURE__ */ jsx8(Typography2, { sx: { fontSize: "0.65rem", color: instance.isValidated ? "hsl(var(--severity-low))" : "hsl(var(--muted-foreground))", flexShrink: 0 }, children: instance.isValidated ? "Valid" : "Pending" })
5369
+ /* @__PURE__ */ jsx9(Typography2, { sx: { fontSize: "0.75rem", color: "hsl(var(--foreground))", opacity: 0.9, flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: instance.label }),
5370
+ /* @__PURE__ */ jsx9(Typography2, { sx: { fontSize: "0.65rem", color: instance.isValidated ? "hsl(var(--severity-low))" : "hsl(var(--muted-foreground))", flexShrink: 0 }, children: instance.isValidated ? "Valid" : "Pending" })
5266
5371
  ] }, idx)) })
5267
5372
  ] }),
5268
5373
  placement: "bottom",
@@ -5287,12 +5392,12 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5287
5392
  }
5288
5393
  },
5289
5394
  children: [
5290
- /* @__PURE__ */ jsx8(
5395
+ /* @__PURE__ */ jsx9(
5291
5396
  Box4,
5292
5397
  {
5293
5398
  onClick: !onDisable && appDetail ? () => appDetail.openApp(integration.name) : void 0,
5294
5399
  sx: { display: "flex", alignItems: "center", justifyContent: "center", textDecoration: "none", cursor: !onDisable && appDetail ? "pointer" : "default" },
5295
- children: integration.icon && !failedImages.has(integration.id) ? /* @__PURE__ */ jsx8(
5400
+ children: integration.icon && !failedImages.has(integration.id) ? /* @__PURE__ */ jsx9(
5296
5401
  Box4,
5297
5402
  {
5298
5403
  component: "img",
@@ -5312,7 +5417,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5312
5417
  setFailedImages((prev) => new Set(prev).add(integration.id));
5313
5418
  }
5314
5419
  }
5315
- ) : /* @__PURE__ */ jsx8(
5420
+ ) : /* @__PURE__ */ jsx9(
5316
5421
  Avatar,
5317
5422
  {
5318
5423
  sx: {
@@ -5328,7 +5433,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5328
5433
  )
5329
5434
  }
5330
5435
  ),
5331
- !isDisabled && /* @__PURE__ */ jsx8(
5436
+ !isDisabled && /* @__PURE__ */ jsx9(
5332
5437
  Box4,
5333
5438
  {
5334
5439
  sx: {
@@ -5344,7 +5449,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5344
5449
  }
5345
5450
  }
5346
5451
  ),
5347
- onDisable && isHovered && /* @__PURE__ */ jsx8(
5452
+ onDisable && isHovered && /* @__PURE__ */ jsx9(
5348
5453
  Box4,
5349
5454
  {
5350
5455
  onClick: () => onDisable(integration.name),
@@ -5361,10 +5466,10 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5361
5466
  },
5362
5467
  children: isDisabled ? (
5363
5468
  /* Re-enable: checkmark */
5364
- /* @__PURE__ */ jsx8("svg", { width: sz * 0.45, height: sz * 0.45, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx8("path", { d: "M2 6l3 3 5-5", stroke: "hsl(var(--severity-low))", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
5469
+ /* @__PURE__ */ jsx9("svg", { width: sz * 0.45, height: sz * 0.45, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx9("path", { d: "M2 6l3 3 5-5", stroke: "hsl(var(--severity-low))", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
5365
5470
  ) : (
5366
5471
  /* Disable: X */
5367
- /* @__PURE__ */ jsx8("svg", { width: sz * 0.45, height: sz * 0.45, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx8("path", { d: "M2 2l8 8M10 2l-8 8", stroke: "white", strokeWidth: "1.8", strokeLinecap: "round" }) })
5472
+ /* @__PURE__ */ jsx9("svg", { width: sz * 0.45, height: sz * 0.45, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx9("path", { d: "M2 2l8 8M10 2l-8 8", stroke: "white", strokeWidth: "1.8", strokeLinecap: "round" }) })
5368
5473
  )
5369
5474
  }
5370
5475
  )
@@ -5375,7 +5480,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5375
5480
  integration.id
5376
5481
  );
5377
5482
  }),
5378
- hasMore && !expanded && /* @__PURE__ */ jsx8(Tooltip3, { title: `Show all ${integrations.length} integrations`, placement: "bottom", children: /* @__PURE__ */ jsxs3(
5483
+ hasMore && !expanded && /* @__PURE__ */ jsx9(Tooltip3, { title: `Show all ${integrations.length} integrations`, placement: "bottom", children: /* @__PURE__ */ jsxs3(
5379
5484
  Avatar,
5380
5485
  {
5381
5486
  onClick: () => setExpanded(true),
@@ -5396,7 +5501,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5396
5501
  ]
5397
5502
  }
5398
5503
  ) }),
5399
- expanded && hasMore && /* @__PURE__ */ jsx8(Tooltip3, { title: "Show less", placement: "bottom", children: /* @__PURE__ */ jsx8(
5504
+ expanded && hasMore && /* @__PURE__ */ jsx9(Tooltip3, { title: "Show less", placement: "bottom", children: /* @__PURE__ */ jsx9(
5400
5505
  Avatar,
5401
5506
  {
5402
5507
  onClick: () => setExpanded(false),
@@ -5414,7 +5519,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5414
5519
  children: "\u2212"
5415
5520
  }
5416
5521
  ) }),
5417
- !hideAddButton && /* @__PURE__ */ jsx8(Tooltip3, { title: "Add Integration", placement: "bottom", children: onAddClick ? /* @__PURE__ */ jsx8(
5522
+ !hideAddButton && /* @__PURE__ */ jsx9(Tooltip3, { title: "Add Integration", placement: "bottom", children: onAddClick ? /* @__PURE__ */ jsx9(
5418
5523
  IconButton2,
5419
5524
  {
5420
5525
  size: "small",
@@ -5430,9 +5535,9 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5430
5535
  borderStyle: "solid"
5431
5536
  }
5432
5537
  },
5433
- children: /* @__PURE__ */ jsx8(AddIcon, { size: 14 })
5538
+ children: /* @__PURE__ */ jsx9(AddIcon, { size: 14 })
5434
5539
  }
5435
- ) : /* @__PURE__ */ jsx8(
5540
+ ) : /* @__PURE__ */ jsx9(
5436
5541
  IconButton2,
5437
5542
  {
5438
5543
  size: "small",
@@ -5449,7 +5554,7 @@ var IntegrationStatus = ({ collapsed, filterApps, onAddClick, iconSize = 26, onD
5449
5554
  borderStyle: "solid"
5450
5555
  }
5451
5556
  },
5452
- children: /* @__PURE__ */ jsx8(AddIcon, { size: 14 })
5557
+ children: /* @__PURE__ */ jsx9(AddIcon, { size: 14 })
5453
5558
  }
5454
5559
  ) })
5455
5560
  ] }) })
@@ -5503,11 +5608,11 @@ var parseResultData = (data) => {
5503
5608
  }
5504
5609
  };
5505
5610
  function useAppAuth() {
5506
- const [authStates, setAuthStates] = useState6({});
5507
- const [authenticatedApps, setAuthenticatedApps] = useState6([]);
5508
- const [loading, setLoading] = useState6(true);
5509
- const hasLoadedAuthRef = useRef3(false);
5510
- const fetchAuthenticatedApps3 = useCallback4(async () => {
5611
+ const [authStates, setAuthStates] = useState7({});
5612
+ const [authenticatedApps, setAuthenticatedApps] = useState7([]);
5613
+ const [loading, setLoading] = useState7(true);
5614
+ const hasLoadedAuthRef = useRef4(false);
5615
+ const fetchAuthenticatedApps3 = useCallback5(async () => {
5511
5616
  if (!hasShuffleAuth()) {
5512
5617
  setLoading(false);
5513
5618
  return;
@@ -5523,10 +5628,10 @@ function useAppAuth() {
5523
5628
  setLoading(false);
5524
5629
  }
5525
5630
  }, []);
5526
- useEffect6(() => {
5631
+ useEffect7(() => {
5527
5632
  fetchAuthenticatedApps3();
5528
5633
  }, [fetchAuthenticatedApps3]);
5529
- const handleAuthChange = useCallback4((systemId, credentials) => {
5634
+ const handleAuthChange = useCallback5((systemId, credentials) => {
5530
5635
  setAuthStates((prev) => ({
5531
5636
  ...prev,
5532
5637
  [systemId]: {
@@ -5536,7 +5641,7 @@ function useAppAuth() {
5536
5641
  }
5537
5642
  }));
5538
5643
  }, []);
5539
- const handleTestConnection = useCallback4(async (systemId, authenticationId) => {
5644
+ const handleTestConnection = useCallback5(async (systemId, authenticationId) => {
5540
5645
  setAuthStates((prev) => ({
5541
5646
  ...prev,
5542
5647
  [systemId]: {
@@ -5654,7 +5759,7 @@ function useAppAuth() {
5654
5759
  }));
5655
5760
  }
5656
5761
  }, [fetchAuthenticatedApps3]);
5657
- const handleSaveAuth = useCallback4(async (appId, credentials, appName, label) => {
5762
+ const handleSaveAuth = useCallback5(async (appId, credentials, appName, label) => {
5658
5763
  const fields = Object.entries(credentials).filter(([key, value]) => key?.trim() && value?.trim()).map(([key, value]) => ({ key, value }));
5659
5764
  const payload = {
5660
5765
  label: label?.trim() || `Auth for ${(appName || appId).replace(/_/g, " ")}`,
@@ -5700,14 +5805,14 @@ function useAppAuth() {
5700
5805
  }
5701
5806
 
5702
5807
  // components/AppTitleHeader.tsx
5703
- import { useState as useState7 } from "react";
5808
+ import { useState as useState8 } from "react";
5704
5809
  import { Box as Box5, Typography as Typography3, Avatar as Avatar2, Chip as Chip3, Button as Button2, Tooltip as Tooltip4 } from "@mui/material";
5705
5810
  import {
5706
5811
  CheckCircle2 as CheckCircleIcon2,
5707
5812
  AlertCircle as ErrorOutlineIcon
5708
5813
  } from "lucide-react";
5709
5814
  import { motion as motion2 } from "framer-motion";
5710
- import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
5815
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
5711
5816
  function AppTitleHeader({
5712
5817
  name,
5713
5818
  image,
@@ -5725,9 +5830,9 @@ function AppTitleHeader({
5725
5830
  onAdd
5726
5831
  }) {
5727
5832
  const isBuiltIn = isNoAuthApp(name);
5728
- const [hoveredIngest, setHoveredIngest] = useState7(false);
5833
+ const [hoveredIngest, setHoveredIngest] = useState8(false);
5729
5834
  const resolvedImage = image || (isBuiltIn ? getBuiltInAppImage(name) || void 0 : void 0);
5730
- return /* @__PURE__ */ jsx9(motion2.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: /* @__PURE__ */ jsxs4(
5835
+ return /* @__PURE__ */ jsx10(motion2.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: /* @__PURE__ */ jsxs4(
5731
5836
  Box5,
5732
5837
  {
5733
5838
  sx: {
@@ -5741,7 +5846,7 @@ function AppTitleHeader({
5741
5846
  border: "1px solid hsl(var(--border))"
5742
5847
  },
5743
5848
  children: [
5744
- /* @__PURE__ */ jsx9(
5849
+ /* @__PURE__ */ jsx10(
5745
5850
  Avatar2,
5746
5851
  {
5747
5852
  src: resolvedImage,
@@ -5756,31 +5861,31 @@ function AppTitleHeader({
5756
5861
  p: 0.5,
5757
5862
  "& img": { objectFit: "contain", borderRadius: "10px" }
5758
5863
  },
5759
- children: /* @__PURE__ */ jsx9(Typography3, { sx: { fontSize: "1.2rem", fontWeight: 700 }, children: name.charAt(0).toUpperCase() })
5864
+ children: /* @__PURE__ */ jsx10(Typography3, { sx: { fontSize: "1.2rem", fontWeight: 700 }, children: name.charAt(0).toUpperCase() })
5760
5865
  }
5761
5866
  ),
5762
5867
  /* @__PURE__ */ jsxs4(Box5, { sx: { flex: 1, minWidth: 0 }, children: [
5763
5868
  /* @__PURE__ */ jsxs4(Box5, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 0.5 }, children: [
5764
- /* @__PURE__ */ jsx9(Typography3, { sx: { color: "hsl(var(--foreground))", fontWeight: 700, fontSize: "1rem", textTransform: "capitalize" }, children: name }),
5765
- isAuthenticated && hasValidAuth && /* @__PURE__ */ jsx9(
5869
+ /* @__PURE__ */ jsx10(Typography3, { sx: { color: "hsl(var(--foreground))", fontWeight: 700, fontSize: "1rem", textTransform: "capitalize" }, children: name }),
5870
+ isAuthenticated && hasValidAuth && /* @__PURE__ */ jsx10(
5766
5871
  Chip3,
5767
5872
  {
5768
- icon: /* @__PURE__ */ jsx9(CheckCircleIcon2, { size: 14 }),
5873
+ icon: /* @__PURE__ */ jsx10(CheckCircleIcon2, { size: 14 }),
5769
5874
  label: "Verified",
5770
5875
  size: "small",
5771
5876
  sx: { height: 22, backgroundColor: "hsla(142, 76%, 36%, 0.15)", color: "hsl(var(--severity-low))", fontWeight: 600, fontSize: "0.7rem", "& .MuiChip-icon": { color: "hsl(var(--severity-low))" } }
5772
5877
  }
5773
5878
  ),
5774
- isAuthenticated && !hasValidAuth && hasAnyAuth && /* @__PURE__ */ jsx9(
5879
+ isAuthenticated && !hasValidAuth && hasAnyAuth && /* @__PURE__ */ jsx10(
5775
5880
  Chip3,
5776
5881
  {
5777
- icon: /* @__PURE__ */ jsx9(ErrorOutlineIcon, { size: 14 }),
5882
+ icon: /* @__PURE__ */ jsx10(ErrorOutlineIcon, { size: 14 }),
5778
5883
  label: "Pending",
5779
5884
  size: "small",
5780
5885
  sx: { height: 22, backgroundColor: "hsla(38, 92%, 50%, 0.15)", color: "hsl(var(--severity-medium))", fontWeight: 600, fontSize: "0.7rem", "& .MuiChip-icon": { color: "hsl(var(--severity-medium))" } }
5781
5886
  }
5782
5887
  ),
5783
- isAuthenticated && isIngestEnabled && /* @__PURE__ */ jsx9(
5888
+ isAuthenticated && isIngestEnabled && /* @__PURE__ */ jsx10(
5784
5889
  Chip3,
5785
5890
  {
5786
5891
  label: "Ingesting",
@@ -5796,7 +5901,7 @@ function AppTitleHeader({
5796
5901
  }
5797
5902
  )
5798
5903
  ] }),
5799
- categories && categories.length > 0 && /* @__PURE__ */ jsx9(Box5, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap" }, children: categories.slice(0, 3).map((cat2) => /* @__PURE__ */ jsx9(
5904
+ categories && categories.length > 0 && /* @__PURE__ */ jsx10(Box5, { sx: { display: "flex", gap: 0.5, flexWrap: "wrap" }, children: categories.slice(0, 3).map((cat2) => /* @__PURE__ */ jsx10(
5800
5905
  Chip3,
5801
5906
  {
5802
5907
  label: cat2,
@@ -5806,7 +5911,7 @@ function AppTitleHeader({
5806
5911
  cat2
5807
5912
  )) })
5808
5913
  ] }),
5809
- onAdd && /* @__PURE__ */ jsx9(
5914
+ onAdd && /* @__PURE__ */ jsx10(
5810
5915
  Button2,
5811
5916
  {
5812
5917
  onClick: onAdd,
@@ -5828,11 +5933,11 @@ function AppTitleHeader({
5828
5933
  }
5829
5934
  ),
5830
5935
  !onAdd && isAuthenticated && /* @__PURE__ */ jsxs4(Box5, { sx: { display: "flex", alignItems: "center", gap: 1, flexShrink: 0 }, children: [
5831
- isIngestEnabled !== null && isIngestEnabled !== void 0 && onIngestToggle && /* @__PURE__ */ jsx9(
5936
+ isIngestEnabled !== null && isIngestEnabled !== void 0 && onIngestToggle && /* @__PURE__ */ jsx10(
5832
5937
  Tooltip4,
5833
5938
  {
5834
5939
  title: isIngestEnabled ? `Click to disable direct ingestion for ${name}` : `Enable ingestion of alerts and tickets from ${name} into Shuffle Security`,
5835
- children: /* @__PURE__ */ jsx9("span", { children: /* @__PURE__ */ jsx9(
5940
+ children: /* @__PURE__ */ jsx10("span", { children: /* @__PURE__ */ jsx10(
5836
5941
  Button2,
5837
5942
  {
5838
5943
  onClick: onIngestToggle,
@@ -5872,7 +5977,7 @@ function AppTitleHeader({
5872
5977
  ) })
5873
5978
  }
5874
5979
  ),
5875
- !isBuiltIn && isActivated !== null && onActivateToggle && /* @__PURE__ */ jsx9(
5980
+ !isBuiltIn && isActivated !== null && onActivateToggle && /* @__PURE__ */ jsx10(
5876
5981
  Button2,
5877
5982
  {
5878
5983
  onClick: onActivateToggle,
@@ -5922,7 +6027,7 @@ function AppTitleHeader({
5922
6027
  // components/AppAuthSection.tsx
5923
6028
  import { Box as Box6, Typography as Typography4 } from "@mui/material";
5924
6029
  import { motion as motion3 } from "framer-motion";
5925
- import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
6030
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
5926
6031
  function AppAuthSection({
5927
6032
  displayName: displayName2,
5928
6033
  algoliaApp,
@@ -5945,10 +6050,10 @@ function AppAuthSection({
5945
6050
  theme,
5946
6051
  colorMode
5947
6052
  }) {
5948
- return /* @__PURE__ */ jsx10(motion3.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.1 }, children: /* @__PURE__ */ jsxs5(Box6, { sx: { mb: 3 }, children: [
5949
- /* @__PURE__ */ jsx10(Typography4, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem", mb: 0.5 }, children: "Authentication" }),
5950
- /* @__PURE__ */ jsx10(Typography4, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))", mb: 1.5 }, children: isAuthenticated ? authCount > 0 ? `${authCount} configuration${authCount > 1 ? "s" : ""} found` : "No authentication configured yet" : `Connect your ${displayName2} account` }),
5951
- isAuthenticated && algoliaApp && resolvedAlgoliaId && /* @__PURE__ */ jsx10(
6053
+ return /* @__PURE__ */ jsx11(motion3.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.1 }, children: /* @__PURE__ */ jsxs5(Box6, { sx: { mb: 3 }, children: [
6054
+ /* @__PURE__ */ jsx11(Typography4, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem", mb: 0.5 }, children: "Authentication" }),
6055
+ /* @__PURE__ */ jsx11(Typography4, { variant: "body2", sx: { color: "hsl(var(--muted-foreground))", mb: 1.5 }, children: isAuthenticated ? authCount > 0 ? `${authCount} configuration${authCount > 1 ? "s" : ""} found` : "No authentication configured yet" : `Connect your ${displayName2} account` }),
6056
+ isAuthenticated && algoliaApp && resolvedAlgoliaId && /* @__PURE__ */ jsx11(
5952
6057
  AppAuthCard,
5953
6058
  {
5954
6059
  app: algoliaApp,
@@ -5977,7 +6082,7 @@ import { Box as Box8, Typography as Typography6 } from "@mui/material";
5977
6082
  import { motion as motion5 } from "framer-motion";
5978
6083
 
5979
6084
  // views/AppMcpChat.tsx
5980
- import { useState as useState8, useRef as useRef4, useMemo as useMemo3 } from "react";
6085
+ import { useState as useState9, useRef as useRef5, useMemo as useMemo4 } from "react";
5981
6086
  import {
5982
6087
  CheckCircle as CheckCircleOutlineIcon,
5983
6088
  AlertCircle as ErrorOutlineIcon2,
@@ -5995,8 +6100,8 @@ import {
5995
6100
  } from "@mui/material";
5996
6101
 
5997
6102
  // components/AgentIcon.tsx
5998
- import { jsx as jsx11 } from "react/jsx-runtime";
5999
- var AgentIcon = ({ size = 16, className, style }) => /* @__PURE__ */ jsx11(
6103
+ import { jsx as jsx12 } from "react/jsx-runtime";
6104
+ var AgentIcon = ({ size = 16, className, style }) => /* @__PURE__ */ jsx12(
6000
6105
  "img",
6001
6106
  {
6002
6107
  src: singul_agent_icon_default,
@@ -6011,7 +6116,7 @@ var AgentIcon_default = AgentIcon;
6011
6116
 
6012
6117
  // views/AppMcpChat.tsx
6013
6118
  import { motion as motion4, AnimatePresence } from "framer-motion";
6014
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
6119
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
6015
6120
  var CATEGORY_SUGGESTIONS = {
6016
6121
  "threat": [
6017
6122
  "Is 1.2.3.4 a known bad actor?",
@@ -6141,16 +6246,16 @@ function getPrimaryCategory(appName, categories) {
6141
6246
  }
6142
6247
  var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6143
6248
  useSyncHostBaseUrl(globalUrl);
6144
- const [input, setInput] = useState8("");
6145
- const [runState, setRunState] = useState8("idle");
6146
- const [query, setQuery] = useState8("");
6147
- const [result, setResult] = useState8("");
6148
- const [isError, setIsError] = useState8(false);
6149
- const [executionId, setExecutionId] = useState8("");
6150
- const [executionAuth, setExecutionAuth] = useState8("");
6151
- const inputRef = useRef4(null);
6152
- const suggestions = useMemo3(() => getSuggestions(appName, categories), [appName, categories]);
6153
- const primaryCategory = useMemo3(() => getPrimaryCategory(appName, categories), [appName, categories]);
6249
+ const [input, setInput] = useState9("");
6250
+ const [runState, setRunState] = useState9("idle");
6251
+ const [query, setQuery] = useState9("");
6252
+ const [result, setResult] = useState9("");
6253
+ const [isError, setIsError] = useState9(false);
6254
+ const [executionId, setExecutionId] = useState9("");
6255
+ const [executionAuth, setExecutionAuth] = useState9("");
6256
+ const inputRef = useRef5(null);
6257
+ const suggestions = useMemo4(() => getSuggestions(appName, categories), [appName, categories]);
6258
+ const primaryCategory = useMemo4(() => getPrimaryCategory(appName, categories), [appName, categories]);
6154
6259
  const MIN_INPUT_LENGTH = 6;
6155
6260
  const runAction = async () => {
6156
6261
  const trimmed = input.trim();
@@ -6263,7 +6368,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6263
6368
  }
6264
6369
  };
6265
6370
  const displayName2 = appName.replace(/_/g, " ");
6266
- return /* @__PURE__ */ jsx12(
6371
+ return /* @__PURE__ */ jsx13(
6267
6372
  Box7,
6268
6373
  {
6269
6374
  sx: {
@@ -6273,7 +6378,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6273
6378
  overflow: "hidden"
6274
6379
  },
6275
6380
  children: /* @__PURE__ */ jsxs6(AnimatePresence, { mode: "wait", children: [
6276
- runState === "idle" && /* @__PURE__ */ jsx12(
6381
+ runState === "idle" && /* @__PURE__ */ jsx13(
6277
6382
  motion4.div,
6278
6383
  {
6279
6384
  initial: { opacity: 0 },
@@ -6282,7 +6387,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6282
6387
  transition: { duration: 0.15 },
6283
6388
  children: /* @__PURE__ */ jsxs6(Box7, { sx: { p: 3, display: "flex", flexDirection: "column", gap: 2.5 }, children: [
6284
6389
  /* @__PURE__ */ jsxs6(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6285
- /* @__PURE__ */ jsx12(
6390
+ /* @__PURE__ */ jsx13(
6286
6391
  Box7,
6287
6392
  {
6288
6393
  sx: {
@@ -6296,17 +6401,17 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6296
6401
  border: "1px solid hsl(var(--primary) / 0.2)",
6297
6402
  flexShrink: 0
6298
6403
  },
6299
- children: appIcon ? /* @__PURE__ */ jsx12(
6404
+ children: appIcon ? /* @__PURE__ */ jsx13(
6300
6405
  Avatar3,
6301
6406
  {
6302
6407
  src: appIcon,
6303
6408
  sx: { width: 18, height: 18, "& img": { objectFit: "contain" } }
6304
6409
  }
6305
- ) : /* @__PURE__ */ jsx12(AgentIcon_default, { size: 16 })
6410
+ ) : /* @__PURE__ */ jsx13(AgentIcon_default, { size: 16 })
6306
6411
  }
6307
6412
  ),
6308
- /* @__PURE__ */ jsx12(Typography5, { sx: { fontSize: "0.8rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: "Try it out" }),
6309
- primaryCategory && /* @__PURE__ */ jsx12(
6413
+ /* @__PURE__ */ jsx13(Typography5, { sx: { fontSize: "0.8rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: "Try it out" }),
6414
+ primaryCategory && /* @__PURE__ */ jsx13(
6310
6415
  Chip4,
6311
6416
  {
6312
6417
  label: primaryCategory,
@@ -6321,7 +6426,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6321
6426
  }
6322
6427
  }
6323
6428
  ),
6324
- /* @__PURE__ */ jsx12(
6429
+ /* @__PURE__ */ jsx13(
6325
6430
  Chip4,
6326
6431
  {
6327
6432
  label: "MCP",
@@ -6357,8 +6462,8 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6357
6462
  }
6358
6463
  },
6359
6464
  children: [
6360
- /* @__PURE__ */ jsx12(Typography5, { sx: { fontSize: "0.85rem", color: "hsl(var(--primary))", fontWeight: 600, userSelect: "none", fontFamily: "'JetBrains Mono', monospace" }, children: "\u203A" }),
6361
- /* @__PURE__ */ jsx12(
6465
+ /* @__PURE__ */ jsx13(Typography5, { sx: { fontSize: "0.85rem", color: "hsl(var(--primary))", fontWeight: 600, userSelect: "none", fontFamily: "'JetBrains Mono', monospace" }, children: "\u203A" }),
6466
+ /* @__PURE__ */ jsx13(
6362
6467
  InputBase,
6363
6468
  {
6364
6469
  inputRef,
@@ -6383,7 +6488,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6383
6488
  }
6384
6489
  }
6385
6490
  ),
6386
- /* @__PURE__ */ jsx12(
6491
+ /* @__PURE__ */ jsx13(
6387
6492
  Box7,
6388
6493
  {
6389
6494
  component: "button",
@@ -6407,13 +6512,13 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6407
6512
  filter: "brightness(1.1)"
6408
6513
  } : {}
6409
6514
  },
6410
- children: /* @__PURE__ */ jsx12(PlayArrowRoundedIcon, { size: 18 })
6515
+ children: /* @__PURE__ */ jsx13(PlayArrowRoundedIcon, { size: 18 })
6411
6516
  }
6412
6517
  )
6413
6518
  ]
6414
6519
  }
6415
6520
  ),
6416
- /* @__PURE__ */ jsx12(Box7, { sx: { display: "flex", flexWrap: "wrap", gap: 0.75 }, children: suggestions.map((s) => /* @__PURE__ */ jsx12(
6521
+ /* @__PURE__ */ jsx13(Box7, { sx: { display: "flex", flexWrap: "wrap", gap: 0.75 }, children: suggestions.map((s) => /* @__PURE__ */ jsx13(
6417
6522
  Chip4,
6418
6523
  {
6419
6524
  label: s,
@@ -6445,7 +6550,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6445
6550
  },
6446
6551
  "idle"
6447
6552
  ),
6448
- runState === "running" && /* @__PURE__ */ jsx12(
6553
+ runState === "running" && /* @__PURE__ */ jsx13(
6449
6554
  motion4.div,
6450
6555
  {
6451
6556
  initial: { opacity: 0 },
@@ -6453,9 +6558,9 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6453
6558
  exit: { opacity: 0 },
6454
6559
  transition: { duration: 0.15 },
6455
6560
  children: /* @__PURE__ */ jsxs6(Box7, { sx: { p: 3, display: "flex", alignItems: "center", gap: 2 }, children: [
6456
- /* @__PURE__ */ jsx12(CircularProgress3, { size: 20, thickness: 5, sx: { color: "hsl(var(--primary))" } }),
6561
+ /* @__PURE__ */ jsx13(CircularProgress3, { size: 20, thickness: 5, sx: { color: "hsl(var(--primary))" } }),
6457
6562
  /* @__PURE__ */ jsxs6(Box7, { sx: { flex: 1, minWidth: 0 }, children: [
6458
- /* @__PURE__ */ jsx12(Typography5, { sx: { fontSize: "0.78rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: "Executing\u2026" }),
6563
+ /* @__PURE__ */ jsx13(Typography5, { sx: { fontSize: "0.78rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: "Executing\u2026" }),
6459
6564
  /* @__PURE__ */ jsxs6(
6460
6565
  Typography5,
6461
6566
  {
@@ -6478,7 +6583,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6478
6583
  },
6479
6584
  "running"
6480
6585
  ),
6481
- runState === "done" && /* @__PURE__ */ jsx12(
6586
+ runState === "done" && /* @__PURE__ */ jsx13(
6482
6587
  motion4.div,
6483
6588
  {
6484
6589
  initial: { opacity: 0, y: 4 },
@@ -6488,14 +6593,14 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6488
6593
  children: /* @__PURE__ */ jsxs6(Box7, { sx: { p: 3, display: "flex", flexDirection: "column", gap: 2 }, children: [
6489
6594
  /* @__PURE__ */ jsxs6(Box7, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
6490
6595
  /* @__PURE__ */ jsxs6(Box7, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6491
- isError ? /* @__PURE__ */ jsx12(ErrorOutlineIcon2, { size: 18, color: "hsl(0 70% 55%)" }) : /* @__PURE__ */ jsx12(CheckCircleOutlineIcon, { size: 18, color: "hsl(145 60% 45%)" }),
6492
- /* @__PURE__ */ jsx12(Typography5, { sx: { fontSize: "0.78rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: isError ? "Failed" : "Completed" })
6596
+ isError ? /* @__PURE__ */ jsx13(ErrorOutlineIcon2, { size: 18, color: "hsl(0 70% 55%)" }) : /* @__PURE__ */ jsx13(CheckCircleOutlineIcon, { size: 18, color: "hsl(145 60% 45%)" }),
6597
+ /* @__PURE__ */ jsx13(Typography5, { sx: { fontSize: "0.78rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: isError ? "Failed" : "Completed" })
6493
6598
  ] }),
6494
6599
  /* @__PURE__ */ jsxs6(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
6495
- executionId && /* @__PURE__ */ jsx12(
6600
+ executionId && /* @__PURE__ */ jsx13(
6496
6601
  Chip4,
6497
6602
  {
6498
- icon: /* @__PURE__ */ jsx12(BugIcon, { size: 14 }),
6603
+ icon: /* @__PURE__ */ jsx13(BugIcon, { size: 14 }),
6499
6604
  label: "Debug",
6500
6605
  size: "small",
6501
6606
  onClick: openDebug,
@@ -6515,10 +6620,10 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6515
6620
  }
6516
6621
  }
6517
6622
  ),
6518
- /* @__PURE__ */ jsx12(
6623
+ /* @__PURE__ */ jsx13(
6519
6624
  Chip4,
6520
6625
  {
6521
- icon: /* @__PURE__ */ jsx12(RestartAltIcon, { size: 14 }),
6626
+ icon: /* @__PURE__ */ jsx13(RestartAltIcon, { size: 14 }),
6522
6627
  label: "Run again",
6523
6628
  size: "small",
6524
6629
  onClick: reset,
@@ -6557,7 +6662,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6557
6662
  ]
6558
6663
  }
6559
6664
  ),
6560
- /* @__PURE__ */ jsx12(
6665
+ /* @__PURE__ */ jsx13(
6561
6666
  Box7,
6562
6667
  {
6563
6668
  sx: {
@@ -6609,7 +6714,7 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6609
6714
  textDecoration: "underline"
6610
6715
  }
6611
6716
  },
6612
- children: /* @__PURE__ */ jsx12(Markdown_default, { children: result })
6717
+ children: /* @__PURE__ */ jsx13(Markdown_default, { children: result })
6613
6718
  }
6614
6719
  )
6615
6720
  ] })
@@ -6623,11 +6728,11 @@ var AppMcpChat = ({ appName, appIcon, appId, categories, globalUrl }) => {
6623
6728
  var AppMcpChat_default = AppMcpChat;
6624
6729
 
6625
6730
  // views/TryMcpSection.tsx
6626
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
6731
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
6627
6732
  function TryMcpSection({ appName, appIcon, appId, categories, globalUrl, userdata, isLoaded, isLoggedIn, serverside, theme, colorMode }) {
6628
- return /* @__PURE__ */ jsx13(motion5.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.15 }, children: /* @__PURE__ */ jsxs7(Box8, { sx: { mt: 5, mb: 3 }, children: [
6629
- /* @__PURE__ */ jsx13(Typography6, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem", mb: 1.5 }, children: "Try MCP" }),
6630
- /* @__PURE__ */ jsx13(
6733
+ return /* @__PURE__ */ jsx14(motion5.div, { initial: { opacity: 0, y: 12 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: 0.15 }, children: /* @__PURE__ */ jsxs7(Box8, { sx: { mt: 5, mb: 3 }, children: [
6734
+ /* @__PURE__ */ jsx14(Typography6, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem", mb: 1.5 }, children: "Try MCP" }),
6735
+ /* @__PURE__ */ jsx14(
6631
6736
  AppMcpChat_default,
6632
6737
  {
6633
6738
  appName,
@@ -6647,7 +6752,7 @@ function TryMcpSection({ appName, appIcon, appId, categories, globalUrl, userdat
6647
6752
  }
6648
6753
 
6649
6754
  // components/SingulActionsPreview.tsx
6650
- import { useState as useState9, useEffect as useEffect7, useMemo as useMemo4, useCallback as useCallback5, useRef as useRef5 } from "react";
6755
+ import { useState as useState10, useEffect as useEffect8, useMemo as useMemo5, useCallback as useCallback6, useRef as useRef6 } from "react";
6651
6756
  import {
6652
6757
  Box as Box9,
6653
6758
  Typography as Typography7,
@@ -6671,7 +6776,7 @@ import {
6671
6776
  import JsonView2 from "react18-json-view";
6672
6777
  import "react18-json-view/src/style.css";
6673
6778
  import "react18-json-view/src/dark.css";
6674
- import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
6779
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
6675
6780
  import { createElement } from "react";
6676
6781
  var deepParseJsonStrings = (obj, depth = 0) => {
6677
6782
  if (depth > 5) return obj;
@@ -6933,29 +7038,29 @@ var SingulActionsPreview = ({
6933
7038
  const themeScope = useShuffleMcpTheme();
6934
7039
  const isDark = theme.palette.mode === "dark";
6935
7040
  const scopeClassName = themeScope?.scopeClassName ?? (isDark ? "shuffle-mcp-scope dark" : "shuffle-mcp-scope light");
6936
- const defaultCategory = useMemo4(() => pickDefaultCategory(categories), [categories]);
7041
+ const defaultCategory = useMemo5(() => pickDefaultCategory(categories), [categories]);
6937
7042
  const actions = ALL_ACTIONS;
6938
- const sortedActions = useMemo4(() => {
7043
+ const sortedActions = useMemo5(() => {
6939
7044
  const inCat = actions.filter((a) => a.category === defaultCategory);
6940
7045
  const rest = actions.filter((a) => a.category !== defaultCategory);
6941
7046
  return [...inCat, ...rest];
6942
7047
  }, [actions, defaultCategory]);
6943
7048
  const isDisabled = false;
6944
- const [selected, setSelected] = useState9(null);
6945
- const [lang, setLang] = useState9("curl");
6946
- const [snippet, setSnippet] = useState9("");
6947
- const curlOpts = useMemo4(() => {
7049
+ const [selected, setSelected] = useState10(null);
7050
+ const [lang, setLang] = useState10("curl");
7051
+ const [snippet, setSnippet] = useState10("");
7052
+ const curlOpts = useMemo5(() => {
6948
7053
  const apiKey = API_CONFIG.apiKey;
6949
7054
  const trackedOrg = getTrackedOrgId();
6950
7055
  const orgId = trackedOrg && activeOrgId && trackedOrg !== activeOrgId ? trackedOrg : null;
6951
7056
  const baseUrl = API_CONFIG.baseUrl;
6952
7057
  return { apiKey, orgId, baseUrl };
6953
7058
  }, [activeOrgId]);
6954
- const buildSnippet = useCallback5(
7059
+ const buildSnippet = useCallback6(
6955
7060
  (action, l) => l === "python" ? buildSingulPython(appName, action, curlOpts) : buildSingulCurl(appName, action, curlOpts),
6956
7061
  [appName, curlOpts]
6957
7062
  );
6958
- useEffect7(() => {
7063
+ useEffect8(() => {
6959
7064
  const initial = sortedActions[0] || null;
6960
7065
  setSelected(initial);
6961
7066
  setSnippet(buildSnippet(initial, lang));
@@ -6975,10 +7080,10 @@ var SingulActionsPreview = ({
6975
7080
  toast.error("Copy failed");
6976
7081
  }
6977
7082
  };
6978
- const [playLoading, setPlayLoading] = useState9(false);
6979
- const [playResult, setPlayResult] = useState9(null);
6980
- const responseRef = useRef5(null);
6981
- const [copied, setCopied] = useState9(false);
7083
+ const [playLoading, setPlayLoading] = useState10(false);
7084
+ const [playResult, setPlayResult] = useState10(null);
7085
+ const responseRef = useRef6(null);
7086
+ const [copied, setCopied] = useState10(false);
6982
7087
  const scrollToResponse = () => {
6983
7088
  requestAnimationFrame(() => {
6984
7089
  responseRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
@@ -7046,9 +7151,9 @@ var SingulActionsPreview = ({
7046
7151
  scrollToResponse();
7047
7152
  }
7048
7153
  };
7049
- const lineCount = useMemo4(() => Math.max(snippet.split("\n").length, 1), [snippet]);
7154
+ const lineCount = useMemo5(() => Math.max(snippet.split("\n").length, 1), [snippet]);
7050
7155
  return /* @__PURE__ */ jsxs8(Box9, { sx: { mt: 5, mb: 3, opacity: isDisabled ? 0.55 : 1 }, children: [
7051
- /* @__PURE__ */ jsx14(Box9, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.5 }, children: /* @__PURE__ */ jsxs8(Typography7, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem" }, children: [
7156
+ /* @__PURE__ */ jsx15(Box9, { sx: { display: "flex", alignItems: "center", gap: 1, mb: 1.5 }, children: /* @__PURE__ */ jsxs8(Typography7, { sx: { color: "hsl(var(--foreground))", fontWeight: 600, fontSize: "0.95rem" }, children: [
7052
7157
  "Try individual actions (",
7053
7158
  sortedActions.length,
7054
7159
  ")"
@@ -7078,8 +7183,8 @@ var SingulActionsPreview = ({
7078
7183
  }
7079
7184
  },
7080
7185
  children: [
7081
- isDisabled ? /* @__PURE__ */ jsx14(Typography7, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))", fontStyle: "italic", textAlign: "center", py: 1 }, children: "No category detected for this app" }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
7082
- /* @__PURE__ */ jsx14(Box9, { sx: { display: "flex", gap: 1, mb: 1.5, alignItems: "center" }, children: /* @__PURE__ */ jsx14(
7186
+ isDisabled ? /* @__PURE__ */ jsx15(Typography7, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))", fontStyle: "italic", textAlign: "center", py: 1 }, children: "No category detected for this app" }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
7187
+ /* @__PURE__ */ jsx15(Box9, { sx: { display: "flex", gap: 1, mb: 1.5, alignItems: "center" }, children: /* @__PURE__ */ jsx15(
7083
7188
  Autocomplete,
7084
7189
  {
7085
7190
  size: "small",
@@ -7091,8 +7196,8 @@ var SingulActionsPreview = ({
7091
7196
  getOptionLabel: (o) => o?.label ?? "",
7092
7197
  isOptionEqualToValue: (a, b) => a?.name === b?.name && a?.category === b?.category,
7093
7198
  renderOption: (props, option) => /* @__PURE__ */ createElement("li", { ...props, key: `${option.category}-${option.name}` }, /* @__PURE__ */ jsxs8(Box9, { sx: { display: "flex", flexDirection: "column" }, children: [
7094
- /* @__PURE__ */ jsx14(Typography7, { sx: { fontSize: "0.78rem", color: "hsl(var(--foreground))" }, children: option.label }),
7095
- /* @__PURE__ */ jsx14(Typography7, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: "0.65rem", color: "hsl(var(--muted-foreground))" }, children: option.name })
7199
+ /* @__PURE__ */ jsx15(Typography7, { sx: { fontSize: "0.78rem", color: "hsl(var(--foreground))" }, children: option.label }),
7200
+ /* @__PURE__ */ jsx15(Typography7, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: "0.65rem", color: "hsl(var(--muted-foreground))" }, children: option.name })
7096
7201
  ] })),
7097
7202
  sx: {
7098
7203
  flex: 1,
@@ -7131,7 +7236,7 @@ var SingulActionsPreview = ({
7131
7236
  }
7132
7237
  }
7133
7238
  },
7134
- renderInput: (params) => /* @__PURE__ */ jsx14(TextField2, { ...params, placeholder: "Select action" })
7239
+ renderInput: (params) => /* @__PURE__ */ jsx15(TextField2, { ...params, placeholder: "Select action" })
7135
7240
  }
7136
7241
  ) }),
7137
7242
  /* @__PURE__ */ jsxs8(
@@ -7159,8 +7264,8 @@ var SingulActionsPreview = ({
7159
7264
  backgroundColor: "hsl(var(--card))"
7160
7265
  },
7161
7266
  children: [
7162
- /* @__PURE__ */ jsx14(Code2, { size: 14, style: { color: "hsl(var(--muted-foreground))" } }),
7163
- /* @__PURE__ */ jsx14(
7267
+ /* @__PURE__ */ jsx15(Code2, { size: 14, style: { color: "hsl(var(--muted-foreground))" } }),
7268
+ /* @__PURE__ */ jsx15(
7164
7269
  Typography7,
7165
7270
  {
7166
7271
  sx: {
@@ -7173,7 +7278,7 @@ var SingulActionsPreview = ({
7173
7278
  children: "Action"
7174
7279
  }
7175
7280
  ),
7176
- selected && /* @__PURE__ */ jsx14(
7281
+ selected && /* @__PURE__ */ jsx15(
7177
7282
  Chip5,
7178
7283
  {
7179
7284
  label: selected.name,
@@ -7189,12 +7294,12 @@ var SingulActionsPreview = ({
7189
7294
  }
7190
7295
  }
7191
7296
  ),
7192
- /* @__PURE__ */ jsx14(Box9, { sx: { flex: 1 } }),
7193
- /* @__PURE__ */ jsx14(Box9, { sx: { display: "flex", gap: 0.5 }, children: ["curl", "python"].map((m) => /* @__PURE__ */ jsx14(
7297
+ /* @__PURE__ */ jsx15(Box9, { sx: { flex: 1 } }),
7298
+ /* @__PURE__ */ jsx15(Box9, { sx: { display: "flex", gap: 0.5 }, children: ["curl", "python"].map((m) => /* @__PURE__ */ jsx15(
7194
7299
  Chip5,
7195
7300
  {
7196
7301
  label: m === "curl" ? "cURL" : "Python",
7197
- icon: m === "curl" ? /* @__PURE__ */ jsx14(Terminal, { size: 12 }) : /* @__PURE__ */ jsx14(Code2, { size: 12 }),
7302
+ icon: m === "curl" ? /* @__PURE__ */ jsx15(Terminal, { size: 12 }) : /* @__PURE__ */ jsx15(Code2, { size: 12 }),
7198
7303
  size: "small",
7199
7304
  onClick: () => setLang(m),
7200
7305
  sx: {
@@ -7215,14 +7320,14 @@ var SingulActionsPreview = ({
7215
7320
  },
7216
7321
  m
7217
7322
  )) }),
7218
- /* @__PURE__ */ jsx14(Tooltip5, { title: copied ? "Copied!" : "Copy", arrow: true, children: /* @__PURE__ */ jsx14(IconButton3, { size: "small", onClick: handleCopy, sx: { color: "hsl(var(--muted-foreground))" }, children: copied ? /* @__PURE__ */ jsx14(CheckIcon, { size: 14 }) : /* @__PURE__ */ jsx14(ContentCopyIcon, { size: 14 }) }) }),
7219
- /* @__PURE__ */ jsx14(
7323
+ /* @__PURE__ */ jsx15(Tooltip5, { title: copied ? "Copied!" : "Copy", arrow: true, children: /* @__PURE__ */ jsx15(IconButton3, { size: "small", onClick: handleCopy, sx: { color: "hsl(var(--muted-foreground))" }, children: copied ? /* @__PURE__ */ jsx15(CheckIcon, { size: 14 }) : /* @__PURE__ */ jsx15(ContentCopyIcon, { size: 14 }) }) }),
7324
+ /* @__PURE__ */ jsx15(
7220
7325
  Button3,
7221
7326
  {
7222
7327
  size: "small",
7223
7328
  onClick: handlePlay,
7224
7329
  disabled: playLoading,
7225
- startIcon: !playLoading && /* @__PURE__ */ jsx14(PlayArrowIcon, { size: 14 }),
7330
+ startIcon: !playLoading && /* @__PURE__ */ jsx15(PlayArrowIcon, { size: 14 }),
7226
7331
  sx: {
7227
7332
  height: 26,
7228
7333
  minWidth: 0,
@@ -7245,7 +7350,7 @@ var SingulActionsPreview = ({
7245
7350
  }
7246
7351
  ),
7247
7352
  /* @__PURE__ */ jsxs8(Box9, { sx: { display: "flex", minHeight: 270 }, children: [
7248
- /* @__PURE__ */ jsx14(
7353
+ /* @__PURE__ */ jsx15(
7249
7354
  Box9,
7250
7355
  {
7251
7356
  "aria-hidden": true,
@@ -7263,11 +7368,11 @@ var SingulActionsPreview = ({
7263
7368
  backgroundColor: "hsl(var(--muted) / 0.25)",
7264
7369
  minWidth: 36
7265
7370
  },
7266
- children: Array.from({ length: lineCount }, (_, i) => /* @__PURE__ */ jsx14("div", { children: i + 1 }, i))
7371
+ children: Array.from({ length: lineCount }, (_, i) => /* @__PURE__ */ jsx15("div", { children: i + 1 }, i))
7267
7372
  }
7268
7373
  ),
7269
7374
  /* @__PURE__ */ jsxs8(Box9, { sx: { flex: 1, position: "relative", minHeight: 270 }, children: [
7270
- /* @__PURE__ */ jsx14(
7375
+ /* @__PURE__ */ jsx15(
7271
7376
  Box9,
7272
7377
  {
7273
7378
  "aria-hidden": true,
@@ -7287,7 +7392,7 @@ var SingulActionsPreview = ({
7287
7392
  dangerouslySetInnerHTML: { __html: highlightSnippet(snippet, lang) + "\n" }
7288
7393
  }
7289
7394
  ),
7290
- /* @__PURE__ */ jsx14(
7395
+ /* @__PURE__ */ jsx15(
7291
7396
  Box9,
7292
7397
  {
7293
7398
  component: "textarea",
@@ -7362,20 +7467,20 @@ var SingulActionsPreview = ({
7362
7467
  bgcolor: "hsla(var(--severity-medium) / 0.08)"
7363
7468
  },
7364
7469
  children: [
7365
- /* @__PURE__ */ jsx14(LockIcon2, { size: 22, color: "hsl(var(--severity-medium))" }),
7470
+ /* @__PURE__ */ jsx15(LockIcon2, { size: 22, color: "hsl(var(--severity-medium))" }),
7366
7471
  /* @__PURE__ */ jsxs8(Box9, { sx: { flex: 1, minWidth: 0 }, children: [
7367
7472
  /* @__PURE__ */ jsxs8(Typography7, { sx: { fontSize: "0.85rem", fontWeight: 600, color: "hsl(var(--foreground))" }, children: [
7368
7473
  pretty,
7369
7474
  " requires authentication"
7370
7475
  ] }),
7371
- /* @__PURE__ */ jsx14(Typography7, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))" }, children: typeof parsedResult?.reason === "string" && parsedResult.reason ? parsedResult.reason : `Connect your ${pretty} account so this action can run, then try again.` })
7476
+ /* @__PURE__ */ jsx15(Typography7, { sx: { fontSize: "0.75rem", color: "hsl(var(--muted-foreground))" }, children: typeof parsedResult?.reason === "string" && parsedResult.reason ? parsedResult.reason : `Connect your ${pretty} account so this action can run, then try again.` })
7372
7477
  ] }),
7373
7478
  /* @__PURE__ */ jsxs8(
7374
7479
  Button3,
7375
7480
  {
7376
7481
  variant: "outlined",
7377
7482
  size: "small",
7378
- startIcon: /* @__PURE__ */ jsx14(
7483
+ startIcon: /* @__PURE__ */ jsx15(
7379
7484
  Avatar4,
7380
7485
  {
7381
7486
  src: appIcon || void 0,
@@ -7406,10 +7511,10 @@ var SingulActionsPreview = ({
7406
7511
  }
7407
7512
  ),
7408
7513
  /* @__PURE__ */ jsxs8(Box9, { sx: { display: "flex", alignItems: "center", gap: 0.75, mb: 0.5 }, children: [
7409
- /* @__PURE__ */ jsx14(Box9, { sx: { width: 6, height: 6, borderRadius: "50%", backgroundColor: needsAuth ? "hsl(var(--severity-medium))" : "hsl(140 60% 55%)" } }),
7410
- /* @__PURE__ */ jsx14(Typography7, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: "0.65rem", color: "hsl(var(--muted-foreground))", letterSpacing: 0.4 }, children: "response" })
7514
+ /* @__PURE__ */ jsx15(Box9, { sx: { width: 6, height: 6, borderRadius: "50%", backgroundColor: needsAuth ? "hsl(var(--severity-medium))" : "hsl(140 60% 55%)" } }),
7515
+ /* @__PURE__ */ jsx15(Typography7, { sx: { fontFamily: "'JetBrains Mono', monospace", fontSize: "0.65rem", color: "hsl(var(--muted-foreground))", letterSpacing: 0.4 }, children: "response" })
7411
7516
  ] }),
7412
- parsedResult ? /* @__PURE__ */ jsx14(
7517
+ parsedResult ? /* @__PURE__ */ jsx15(
7413
7518
  Box9,
7414
7519
  {
7415
7520
  sx: {
@@ -7426,7 +7531,7 @@ var SingulActionsPreview = ({
7426
7531
  bgcolor: "transparent !important"
7427
7532
  }
7428
7533
  },
7429
- children: /* @__PURE__ */ jsx14(
7534
+ children: /* @__PURE__ */ jsx15(
7430
7535
  JsonView2,
7431
7536
  {
7432
7537
  src: deepParseJsonStrings(parsedResult),
@@ -7439,7 +7544,7 @@ var SingulActionsPreview = ({
7439
7544
  }
7440
7545
  )
7441
7546
  }
7442
- ) : /* @__PURE__ */ jsx14(
7547
+ ) : /* @__PURE__ */ jsx15(
7443
7548
  Box9,
7444
7549
  {
7445
7550
  component: "pre",
@@ -7471,11 +7576,11 @@ var SingulActionsPreview = ({
7471
7576
  var SingulActionsPreview_default = SingulActionsPreview;
7472
7577
 
7473
7578
  // components/ApiCallViewer.tsx
7474
- import { useState as useState11, useMemo as useMemo5, useCallback as useCallback6 } from "react";
7579
+ import { useState as useState12, useMemo as useMemo6, useCallback as useCallback7 } from "react";
7475
7580
  import { Box as Box10, Typography as Typography8, Button as Button4, Chip as Chip6, CircularProgress as CircularProgress4, Collapse as Collapse2, useTheme as useTheme3 } from "@mui/material";
7476
7581
 
7477
7582
  // useUserApiKey.ts
7478
- import { useState as useState10, useEffect as useEffect8 } from "react";
7583
+ import { useState as useState11, useEffect as useEffect9 } from "react";
7479
7584
  var API_KEY_CACHE_KEY = "shuffle_user_apikey";
7480
7585
  function maskApiKey(key) {
7481
7586
  if (!key || key.trim() === "") return "<API_KEY>";
@@ -7498,7 +7603,7 @@ var readCachedOrgId = () => {
7498
7603
  };
7499
7604
  function useUserApiKey() {
7500
7605
  const isAuthenticated = hasShuffleAuth();
7501
- const [apiKey, setApiKey] = useState10(() => {
7606
+ const [apiKey, setApiKey] = useState11(() => {
7502
7607
  if (typeof window === "undefined") return null;
7503
7608
  try {
7504
7609
  return localStorage.getItem(API_KEY_CACHE_KEY) || null;
@@ -7506,8 +7611,8 @@ function useUserApiKey() {
7506
7611
  return null;
7507
7612
  }
7508
7613
  });
7509
- const [isLoading, setIsLoading] = useState10(false);
7510
- useEffect8(() => {
7614
+ const [isLoading, setIsLoading] = useState11(false);
7615
+ useEffect9(() => {
7511
7616
  if (!isAuthenticated) {
7512
7617
  setApiKey(null);
7513
7618
  try {
@@ -7570,7 +7675,7 @@ function useUserApiKey() {
7570
7675
  import JsonView3 from "react18-json-view";
7571
7676
  import "react18-json-view/src/style.css";
7572
7677
  import "react18-json-view/src/dark.css";
7573
- import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
7678
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
7574
7679
  var deepParseJsonStrings2 = (obj, depth = 0) => {
7575
7680
  if (depth > 5) return obj;
7576
7681
  if (typeof obj === "string") {
@@ -7934,22 +8039,22 @@ var ApiCallViewer = ({
7934
8039
  baseUrl: API_CONFIG.baseUrl || "https://shuffle.security",
7935
8040
  orgId: null
7936
8041
  };
7937
- const [mode, setMode] = useState11(defaultMode);
7938
- const [copied, setCopied] = useState11(false);
7939
- const [isRunning3, setIsRunning] = useState11(false);
7940
- const [responseOutput, setResponseOutput] = useState11(null);
7941
- const [parsedResponse, setParsedResponse] = useState11(null);
7942
- const [responseStatus, setResponseStatus] = useState11(null);
7943
- const [responseDuration, setResponseDuration] = useState11(null);
7944
- const [isResponseOpen, setIsResponseOpen] = useState11(false);
7945
- const [responseViewMode, setResponseViewMode] = useState11("tree");
7946
- const parsedCurlData = useMemo5(() => {
8042
+ const [mode, setMode] = useState12(defaultMode);
8043
+ const [copied, setCopied] = useState12(false);
8044
+ const [isRunning3, setIsRunning] = useState12(false);
8045
+ const [responseOutput, setResponseOutput] = useState12(null);
8046
+ const [parsedResponse, setParsedResponse] = useState12(null);
8047
+ const [responseStatus, setResponseStatus] = useState12(null);
8048
+ const [responseDuration, setResponseDuration] = useState12(null);
8049
+ const [isResponseOpen, setIsResponseOpen] = useState12(false);
8050
+ const [responseViewMode, setResponseViewMode] = useState12("tree");
8051
+ const parsedCurlData = useMemo6(() => {
7947
8052
  if (rawCurl) {
7948
8053
  return parseCurlCommand(rawCurl);
7949
8054
  }
7950
8055
  return null;
7951
8056
  }, [rawCurl]);
7952
- const requestInfo = useMemo5(() => {
8057
+ const requestInfo = useMemo6(() => {
7953
8058
  let method = "GET";
7954
8059
  let url = "";
7955
8060
  const headers = {};
@@ -8006,7 +8111,7 @@ var ApiCallViewer = ({
8006
8111
  return { method, url, headers, body: bodyObj, parsedJson };
8007
8112
  }, [config, parsedCurlData, defaultBaseUrl, apiKey, orgId]);
8008
8113
  const hasJsonBody = requestInfo.parsedJson !== null;
8009
- const generatedCode = useMemo5(() => {
8114
+ const generatedCode = useMemo6(() => {
8010
8115
  return {
8011
8116
  curl: buildCurl(requestInfo.method, requestInfo.url, requestInfo.headers, requestInfo.body, maskAuth),
8012
8117
  python: buildPython(requestInfo.method, requestInfo.url, requestInfo.headers, requestInfo.body, maskAuth),
@@ -8014,7 +8119,7 @@ var ApiCallViewer = ({
8014
8119
  };
8015
8120
  }, [requestInfo, maskAuth]);
8016
8121
  const currentSnippet = mode === "json" ? "" : generatedCode[mode];
8017
- const copyableSnippet = useMemo5(() => {
8122
+ const copyableSnippet = useMemo6(() => {
8018
8123
  if (mode === "json") {
8019
8124
  return JSON.stringify(requestInfo.parsedJson, null, 2);
8020
8125
  }
@@ -8025,10 +8130,10 @@ var ApiCallViewer = ({
8025
8130
  };
8026
8131
  return unmasked[mode];
8027
8132
  }, [mode, requestInfo]);
8028
- const runnableCommand = useMemo5(() => {
8133
+ const runnableCommand = useMemo6(() => {
8029
8134
  return buildCurl(requestInfo.method, requestInfo.url, requestInfo.headers, requestInfo.body, false);
8030
8135
  }, [requestInfo]);
8031
- const handleCopy = useCallback6(async () => {
8136
+ const handleCopy = useCallback7(async () => {
8032
8137
  try {
8033
8138
  if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
8034
8139
  await navigator.clipboard.writeText(copyableSnippet);
@@ -8040,7 +8145,7 @@ var ApiCallViewer = ({
8040
8145
  toast.error("Copy failed");
8041
8146
  }
8042
8147
  }, [copyableSnippet]);
8043
- const handleRun = useCallback6(async () => {
8148
+ const handleRun = useCallback7(async () => {
8044
8149
  setIsRunning(true);
8045
8150
  setIsResponseOpen(true);
8046
8151
  setResponseStatus(null);
@@ -8107,7 +8212,7 @@ var ApiCallViewer = ({
8107
8212
  setIsRunning(false);
8108
8213
  }
8109
8214
  }, [runnableCommand]);
8110
- const methodColor = useMemo5(() => {
8215
+ const methodColor = useMemo6(() => {
8111
8216
  switch (requestInfo.method) {
8112
8217
  case "GET":
8113
8218
  return "#10b981";
@@ -8146,7 +8251,7 @@ var ApiCallViewer = ({
8146
8251
  bgcolor: "hsl(var(--card))"
8147
8252
  },
8148
8253
  children: [
8149
- /* @__PURE__ */ jsx15(
8254
+ /* @__PURE__ */ jsx16(
8150
8255
  Typography8,
8151
8256
  {
8152
8257
  sx: {
@@ -8159,7 +8264,7 @@ var ApiCallViewer = ({
8159
8264
  children: title
8160
8265
  }
8161
8266
  ),
8162
- /* @__PURE__ */ jsx15(
8267
+ /* @__PURE__ */ jsx16(
8163
8268
  Chip6,
8164
8269
  {
8165
8270
  label: requestInfo.method,
@@ -8176,8 +8281,8 @@ var ApiCallViewer = ({
8176
8281
  }
8177
8282
  }
8178
8283
  ),
8179
- /* @__PURE__ */ jsx15(Box10, { sx: { flex: 1 } }),
8180
- /* @__PURE__ */ jsx15(
8284
+ /* @__PURE__ */ jsx16(Box10, { sx: { flex: 1 } }),
8285
+ /* @__PURE__ */ jsx16(
8181
8286
  Box10,
8182
8287
  {
8183
8288
  sx: {
@@ -8191,7 +8296,7 @@ var ApiCallViewer = ({
8191
8296
  children: ["curl", "python", "http", ...hasJsonBody ? ["json"] : []].map((m) => {
8192
8297
  const active = mode === m;
8193
8298
  const label = m === "curl" ? "cURL" : m === "python" ? "Python" : m === "http" ? "HTTP" : "JSON";
8194
- return /* @__PURE__ */ jsx15(
8299
+ return /* @__PURE__ */ jsx16(
8195
8300
  Box10,
8196
8301
  {
8197
8302
  onClick: () => setMode(m),
@@ -8221,7 +8326,7 @@ var ApiCallViewer = ({
8221
8326
  })
8222
8327
  }
8223
8328
  ),
8224
- /* @__PURE__ */ jsx15(
8329
+ /* @__PURE__ */ jsx16(
8225
8330
  Button4,
8226
8331
  {
8227
8332
  size: "small",
@@ -8246,7 +8351,7 @@ var ApiCallViewer = ({
8246
8351
  children: copied ? "Copied" : "Copy"
8247
8352
  }
8248
8353
  ),
8249
- /* @__PURE__ */ jsx15(
8354
+ /* @__PURE__ */ jsx16(
8250
8355
  Button4,
8251
8356
  {
8252
8357
  size: "small",
@@ -8273,15 +8378,15 @@ var ApiCallViewer = ({
8273
8378
  }
8274
8379
  },
8275
8380
  children: isRunning3 ? /* @__PURE__ */ jsxs9(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
8276
- /* @__PURE__ */ jsx15(CircularProgress4, { size: 10, color: "inherit" }),
8277
- /* @__PURE__ */ jsx15("span", { children: "Running" })
8381
+ /* @__PURE__ */ jsx16(CircularProgress4, { size: 10, color: "inherit" }),
8382
+ /* @__PURE__ */ jsx16("span", { children: "Running" })
8278
8383
  ] }) : "Test"
8279
8384
  }
8280
8385
  )
8281
8386
  ]
8282
8387
  }
8283
8388
  ),
8284
- mode === "json" ? /* @__PURE__ */ jsx15(
8389
+ mode === "json" ? /* @__PURE__ */ jsx16(
8285
8390
  Box10,
8286
8391
  {
8287
8392
  sx: {
@@ -8296,7 +8401,7 @@ var ApiCallViewer = ({
8296
8401
  bgcolor: "transparent !important"
8297
8402
  }
8298
8403
  },
8299
- children: /* @__PURE__ */ jsx15(
8404
+ children: /* @__PURE__ */ jsx16(
8300
8405
  JsonView3,
8301
8406
  {
8302
8407
  src: deepParseJsonStrings2(requestInfo.parsedJson),
@@ -8309,7 +8414,7 @@ var ApiCallViewer = ({
8309
8414
  }
8310
8415
  )
8311
8416
  }
8312
- ) : /* @__PURE__ */ jsx15(
8417
+ ) : /* @__PURE__ */ jsx16(
8313
8418
  Box10,
8314
8419
  {
8315
8420
  component: "pre",
@@ -8334,7 +8439,7 @@ var ApiCallViewer = ({
8334
8439
  dangerouslySetInnerHTML: { __html: highlightSnippet2(currentSnippet, mode) }
8335
8440
  }
8336
8441
  ),
8337
- /* @__PURE__ */ jsx15(Collapse2, { in: isResponseOpen, children: /* @__PURE__ */ jsxs9(
8442
+ /* @__PURE__ */ jsx16(Collapse2, { in: isResponseOpen, children: /* @__PURE__ */ jsxs9(
8338
8443
  Box10,
8339
8444
  {
8340
8445
  sx: {
@@ -8355,7 +8460,7 @@ var ApiCallViewer = ({
8355
8460
  },
8356
8461
  children: [
8357
8462
  /* @__PURE__ */ jsxs9(Box10, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
8358
- /* @__PURE__ */ jsx15(
8463
+ /* @__PURE__ */ jsx16(
8359
8464
  Typography8,
8360
8465
  {
8361
8466
  sx: {
@@ -8368,7 +8473,7 @@ var ApiCallViewer = ({
8368
8473
  children: "Response"
8369
8474
  }
8370
8475
  ),
8371
- responseStatus && /* @__PURE__ */ jsx15(
8476
+ responseStatus && /* @__PURE__ */ jsx16(
8372
8477
  Chip6,
8373
8478
  {
8374
8479
  label: responseStatus,
@@ -8403,7 +8508,7 @@ var ApiCallViewer = ({
8403
8508
  )
8404
8509
  ] }),
8405
8510
  /* @__PURE__ */ jsxs9(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
8406
- parsedResponse && /* @__PURE__ */ jsx15(
8511
+ parsedResponse && /* @__PURE__ */ jsx16(
8407
8512
  Box10,
8408
8513
  {
8409
8514
  sx: {
@@ -8416,7 +8521,7 @@ var ApiCallViewer = ({
8416
8521
  },
8417
8522
  children: ["tree", "raw"].map((view) => {
8418
8523
  const active = responseViewMode === view;
8419
- return /* @__PURE__ */ jsx15(
8524
+ return /* @__PURE__ */ jsx16(
8420
8525
  Box10,
8421
8526
  {
8422
8527
  onClick: () => setResponseViewMode(view),
@@ -8440,7 +8545,7 @@ var ApiCallViewer = ({
8440
8545
  })
8441
8546
  }
8442
8547
  ),
8443
- responseOutput && /* @__PURE__ */ jsx15(
8548
+ responseOutput && /* @__PURE__ */ jsx16(
8444
8549
  Button4,
8445
8550
  {
8446
8551
  size: "small",
@@ -8470,7 +8575,7 @@ var ApiCallViewer = ({
8470
8575
  children: "Copy"
8471
8576
  }
8472
8577
  ),
8473
- /* @__PURE__ */ jsx15(
8578
+ /* @__PURE__ */ jsx16(
8474
8579
  Button4,
8475
8580
  {
8476
8581
  size: "small",
@@ -8495,7 +8600,7 @@ var ApiCallViewer = ({
8495
8600
  ]
8496
8601
  }
8497
8602
  ),
8498
- /* @__PURE__ */ jsx15(
8603
+ /* @__PURE__ */ jsx16(
8499
8604
  Box10,
8500
8605
  {
8501
8606
  sx: {
@@ -8506,9 +8611,9 @@ var ApiCallViewer = ({
8506
8611
  bgcolor: "hsl(var(--background) / 0.5)"
8507
8612
  },
8508
8613
  children: isRunning3 ? /* @__PURE__ */ jsxs9(Box10, { sx: { display: "flex", alignItems: "center", gap: 1, py: 1 }, children: [
8509
- /* @__PURE__ */ jsx15(CircularProgress4, { size: 12, color: "inherit" }),
8510
- /* @__PURE__ */ jsx15(Typography8, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))" }, children: "Executing in Shuffle..." })
8511
- ] }) : parsedResponse && responseViewMode === "tree" ? /* @__PURE__ */ jsx15(
8614
+ /* @__PURE__ */ jsx16(CircularProgress4, { size: 12, color: "inherit" }),
8615
+ /* @__PURE__ */ jsx16(Typography8, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))" }, children: "Executing in Shuffle..." })
8616
+ ] }) : parsedResponse && responseViewMode === "tree" ? /* @__PURE__ */ jsx16(
8512
8617
  Box10,
8513
8618
  {
8514
8619
  sx: {
@@ -8518,7 +8623,7 @@ var ApiCallViewer = ({
8518
8623
  bgcolor: "transparent !important"
8519
8624
  }
8520
8625
  },
8521
- children: /* @__PURE__ */ jsx15(
8626
+ children: /* @__PURE__ */ jsx16(
8522
8627
  JsonView3,
8523
8628
  {
8524
8629
  src: deepParseJsonStrings2(parsedResponse),
@@ -8531,7 +8636,7 @@ var ApiCallViewer = ({
8531
8636
  }
8532
8637
  )
8533
8638
  }
8534
- ) : responseOutput ? /* @__PURE__ */ jsx15(
8639
+ ) : responseOutput ? /* @__PURE__ */ jsx16(
8535
8640
  Box10,
8536
8641
  {
8537
8642
  component: "pre",
@@ -8545,7 +8650,7 @@ var ApiCallViewer = ({
8545
8650
  },
8546
8651
  children: responseOutput
8547
8652
  }
8548
- ) : /* @__PURE__ */ jsx15(Typography8, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))" }, children: "No response received." })
8653
+ ) : /* @__PURE__ */ jsx16(Typography8, { sx: { fontSize: "0.72rem", color: "hsl(var(--muted-foreground))" }, children: "No response received." })
8549
8654
  }
8550
8655
  )
8551
8656
  ]
@@ -9561,7 +9666,7 @@ var slugify = (value) => value.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace
9561
9666
  import React41, { useState as useState67, useMemo as useMemo39, useEffect as useEffect62 } from "react";
9562
9667
 
9563
9668
  // ../Shuffle-Core/useSyncHostBaseUrl.ts
9564
- import { useEffect as useEffect9 } from "react";
9669
+ import { useEffect as useEffect10 } from "react";
9565
9670
 
9566
9671
  // ../Shuffle-Core/lib/shuffleUrls.ts
9567
9672
  var readEnv = (key) => {
@@ -10067,7 +10172,7 @@ var shuffleFetch2 = (url, init) => {
10067
10172
 
10068
10173
  // ../Shuffle-Core/useSyncHostBaseUrl.ts
10069
10174
  var useSyncHostBaseUrl2 = (globalUrl) => {
10070
- useEffect9(() => {
10175
+ useEffect10(() => {
10071
10176
  if (!globalUrl) return;
10072
10177
  setHostBaseUrl2(globalUrl);
10073
10178
  }, [globalUrl]);
@@ -10220,110 +10325,6 @@ var singul_agent_icon_default2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA
10220
10325
  import { useCallback as useCallback9 } from "react";
10221
10326
  import { useQuery as useQuery3 } from "@tanstack/react-query";
10222
10327
 
10223
- // ../context/AuthContext.tsx
10224
- import { createContext as createContext2, useContext as useContext2, useState as useState12, useEffect as useEffect10, useMemo as useMemo6, useCallback as useCallback7, useRef as useRef6 } from "react";
10225
-
10226
- // ../lib/tenantApiUrl.ts
10227
- var STORAGE_KEY3 = "shuffle-tenant-regions";
10228
- var loadPersistedRegions = () => {
10229
- const map = /* @__PURE__ */ new Map();
10230
- if (typeof window === "undefined") return map;
10231
- try {
10232
- const raw = window.localStorage.getItem(STORAGE_KEY3);
10233
- if (!raw) return map;
10234
- const parsed = JSON.parse(raw);
10235
- if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
10236
- for (const [orgId, region] of Object.entries(parsed)) {
10237
- if (typeof orgId === "string" && typeof region === "string" && region.trim()) {
10238
- map.set(orgId, region.trim());
10239
- }
10240
- }
10241
- }
10242
- } catch {
10243
- }
10244
- return map;
10245
- };
10246
- var regionByOrg = loadPersistedRegions();
10247
- var persistRegions = () => {
10248
- if (typeof window === "undefined") return;
10249
- try {
10250
- window.localStorage.setItem(STORAGE_KEY3, JSON.stringify(Object.fromEntries(regionByOrg)));
10251
- } catch {
10252
- }
10253
- };
10254
- var registerTenantRegions = (orgs) => {
10255
- if (!Array.isArray(orgs)) return;
10256
- let changed = false;
10257
- for (const o of orgs) {
10258
- if (o?.id && typeof o.region_url === "string" && o.region_url.trim()) {
10259
- const next = o.region_url.trim();
10260
- if (regionByOrg.get(o.id) !== next) {
10261
- regionByOrg.set(o.id, next);
10262
- changed = true;
10263
- }
10264
- }
10265
- }
10266
- if (changed) persistRegions();
10267
- };
10268
- var getTenantRegionBase = (orgId, regionUrl) => {
10269
- if (isDevEnvironment()) return null;
10270
- const raw = regionUrl || (orgId ? regionByOrg.get(orgId) : void 0);
10271
- if (!raw) return null;
10272
- const mapped = (mapCloudRegionUrl(raw) || "").replace(/\/+$/, "");
10273
- if (!mapped) return null;
10274
- const current = (API_CONFIG.baseUrl || "").replace(/\/+$/, "");
10275
- if (mapped === current) return null;
10276
- return mapped;
10277
- };
10278
- var tenantApiUrl = (endpoint, orgId, regionUrl) => {
10279
- const base3 = getTenantRegionBase(orgId, regionUrl);
10280
- return base3 ? `${base3}${endpoint}` : getApiUrl(endpoint);
10281
- };
10282
-
10283
- // ../context/AuthContext.tsx
10284
- import { Fragment as Fragment4, jsx as jsx16 } from "react/jsx-runtime";
10285
- var TAB_FOCUS_GETINFO_COOLDOWN_MS = 60 * 1e3;
10286
- var AuthContext = createContext2(void 0);
10287
- var useAuth = () => {
10288
- const context = useContext2(AuthContext);
10289
- if (context === void 0) {
10290
- throw new Error("useAuth must be used within an AuthProvider");
10291
- }
10292
- return context;
10293
- };
10294
- var useOptionalAuth = () => useContext2(AuthContext);
10295
- var AuthFallbackProvider = ({ children: children2 }) => {
10296
- const existing = useContext2(AuthContext);
10297
- const fallback = useMemo6(() => {
10298
- let userInfo = null;
10299
- try {
10300
- const raw = typeof window !== "undefined" ? window.localStorage.getItem("shuffle_user_info") || window.localStorage.getItem("userinfo") : null;
10301
- const parsed = raw ? JSON.parse(raw) : null;
10302
- userInfo = parsed && typeof parsed === "object" ? parsed : null;
10303
- } catch {
10304
- userInfo = null;
10305
- }
10306
- return {
10307
- isAuthenticated: !!userInfo,
10308
- sessionToken: null,
10309
- userInfo,
10310
- isLoading: false,
10311
- orgMismatchWarning: false,
10312
- login: async () => false,
10313
- logout: async () => {
10314
- },
10315
- refreshUserInfo: async () => {
10316
- },
10317
- setActiveOrg: async () => {
10318
- },
10319
- dismissOrgMismatch: () => {
10320
- }
10321
- };
10322
- }, []);
10323
- if (existing !== void 0) return /* @__PURE__ */ jsx16(Fragment4, { children: children2 });
10324
- return /* @__PURE__ */ jsx16(AuthContext.Provider, { value: fallback, children: children2 });
10325
- };
10326
-
10327
10328
  // ../components/settings/DefaultEnvironmentSelector.tsx
10328
10329
  import { useCallback as useCallback8, useEffect as useEffect11, useMemo as useMemo8, useState as useState13 } from "react";
10329
10330
  import { useQueryClient } from "@tanstack/react-query";
@@ -15008,7 +15009,7 @@ var DEFAULT_THREAT_FEEDS = [
15008
15009
  ];
15009
15010
  var seedDefaultThreatFeeds = async () => {
15010
15011
  try {
15011
- const { setDatastoreItem: setDatastoreItem6, DATASTORE_CATEGORIES: DATASTORE_CATEGORIES8 } = await import("./datastore-DRXSNIPR.mjs");
15012
+ const { setDatastoreItem: setDatastoreItem6, DATASTORE_CATEGORIES: DATASTORE_CATEGORIES8 } = await import("./datastore-TTQFTTDP.mjs");
15012
15013
  const results = await Promise.all(
15013
15014
  DEFAULT_THREAT_FEEDS.map(
15014
15015
  (feed) => setDatastoreItem6(feed.id, feed, DATASTORE_CATEGORIES8.THREAT_FEEDS)
@@ -15144,7 +15145,7 @@ var DEFAULT_IOC_TYPES = [
15144
15145
  var STALE_TIME = 5 * 60 * 1e3;
15145
15146
  var seedDefaultIOCTypes = async () => {
15146
15147
  try {
15147
- const { setDatastoreItems: setDatastoreItems3, DATASTORE_CATEGORIES: DATASTORE_CATEGORIES8 } = await import("./datastore-DRXSNIPR.mjs");
15148
+ const { setDatastoreItems: setDatastoreItems3, DATASTORE_CATEGORIES: DATASTORE_CATEGORIES8 } = await import("./datastore-TTQFTTDP.mjs");
15148
15149
  const dsItems = DEFAULT_IOC_TYPES.map((ioc) => ({
15149
15150
  key: ioc.name,
15150
15151
  value: { ...ioc, enabled: ioc.enabled ?? DEFAULT_ENABLED_IOCS.has(ioc.name) }
@@ -46086,7 +46087,7 @@ var CategoryAutomationsDialog = ({
46086
46087
  (async () => {
46087
46088
  const resolved = {};
46088
46089
  try {
46089
- const { fetchAppsViaApiConfig: fetchAppsViaApiConfig3 } = await import("./appsCache-2UYFFT3V.mjs");
46090
+ const { fetchAppsViaApiConfig: fetchAppsViaApiConfig3 } = await import("./appsCache-A4OIDXIN.mjs");
46090
46091
  const apps = await fetchAppsViaApiConfig3();
46091
46092
  if (!cancelled && Array.isArray(apps)) {
46092
46093
  const byId = /* @__PURE__ */ new Map();
@@ -48685,14 +48686,75 @@ import {
48685
48686
  import { ChevronDown as ChevronDown4, Smartphone, Monitor as Monitor2, MoreVertical, Bell, BellOff, CalendarClock, PhoneCall } from "lucide-react";
48686
48687
  import { getDatastoreItem as getDatastoreItem5, setDatastoreItem as setDatastoreItem5, DATASTORE_CATEGORIES as DATASTORE_CATEGORIES6 } from "@shuffleio/shuffle-mcps";
48687
48688
 
48688
- // ../Shuffle-Core/services/pagerNotificationService.ts
48689
- import { PushNotifications } from "@capacitor/push-notifications";
48690
- import { LocalNotifications } from "@capacitor/local-notifications";
48691
- import { Haptics } from "@capacitor/haptics";
48689
+ // shims/capacitor-shim.ts
48690
+ var getCapacitorPlugin = (name) => {
48691
+ if (typeof window !== "undefined" && window.Capacitor?.Plugins?.[name]) {
48692
+ return window.Capacitor.Plugins[name];
48693
+ }
48694
+ return {
48695
+ requestPermissions: async () => ({ receive: "denied", display: "denied" }),
48696
+ register: async () => {
48697
+ },
48698
+ addListener: () => ({ remove: () => {
48699
+ } }),
48700
+ removeAllListeners: async () => {
48701
+ },
48702
+ createChannel: async () => {
48703
+ },
48704
+ deleteChannel: async () => {
48705
+ },
48706
+ listChannels: async () => ({ channels: [] }),
48707
+ schedule: async () => ({ notifications: [] }),
48708
+ cancel: async () => {
48709
+ },
48710
+ getPending: async () => ({ notifications: [] }),
48711
+ vibrate: async () => {
48712
+ }
48713
+ };
48714
+ };
48715
+ var createPluginProxy = (pluginName) => {
48716
+ return new Proxy({}, {
48717
+ get: (_, prop) => {
48718
+ const plugin = getCapacitorPlugin(pluginName);
48719
+ const val = plugin[prop];
48720
+ return typeof val === "function" ? val.bind(plugin) : val;
48721
+ }
48722
+ });
48723
+ };
48724
+ var PushNotifications = createPluginProxy("PushNotifications");
48725
+ var LocalNotifications = createPluginProxy("LocalNotifications");
48726
+ var Haptics = createPluginProxy("Haptics");
48727
+
48728
+ // shims/firebase-shim.ts
48729
+ var initializeApp = (...args) => {
48730
+ if (typeof window !== "undefined" && window.firebase?.initializeApp) {
48731
+ return window.firebase.initializeApp(...args);
48732
+ }
48733
+ return {};
48734
+ };
48735
+ var getApps = () => {
48736
+ if (typeof window !== "undefined" && window.firebase?.apps) {
48737
+ return window.firebase.apps;
48738
+ }
48739
+ return [];
48740
+ };
48741
+ var getApp = (...args) => {
48742
+ if (typeof window !== "undefined" && window.firebase?.app) {
48743
+ return window.firebase.app(...args);
48744
+ }
48745
+ return {};
48746
+ };
48747
+ var getMessaging = (...args) => {
48748
+ if (typeof window !== "undefined" && window.firebase?.messaging) {
48749
+ return window.firebase.messaging(...args);
48750
+ }
48751
+ return null;
48752
+ };
48753
+ var getToken = async (..._args) => {
48754
+ return "";
48755
+ };
48692
48756
 
48693
48757
  // ../Shuffle-Core/config/firebaseWebConfig.ts
48694
- import { initializeApp, getApps, getApp } from "firebase/app";
48695
- import { getMessaging, getToken, onMessage } from "firebase/messaging";
48696
48758
  var STORAGE_VAPID_KEY = "shuffle_firebase_vapid_key";
48697
48759
  var getStoredVapidKey = () => {
48698
48760
  if (typeof window === "undefined") return "";
@@ -64702,6 +64764,19 @@ function AppRelatedUsecases({
64702
64764
  // views/AppDetailContent.tsx
64703
64765
  import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
64704
64766
  import { Fragment as Fragment38, jsx as jsx90, jsxs as jsxs70 } from "react/jsx-runtime";
64767
+ var UsecasesBoundary = class extends React43.Component {
64768
+ constructor() {
64769
+ super(...arguments);
64770
+ this.state = { hasError: false };
64771
+ }
64772
+ static getDerivedStateFromError() {
64773
+ return { hasError: true };
64774
+ }
64775
+ render() {
64776
+ return this.state.hasError ? null : this.props.children;
64777
+ }
64778
+ };
64779
+ var AppRelatedUsecases2 = (props) => /* @__PURE__ */ jsx90(UsecasesBoundary, { children: /* @__PURE__ */ jsx90(AppRelatedUsecases, { ...props }) });
64705
64780
  var CollapsibleDescription = ({ description }) => {
64706
64781
  const [expanded, setExpanded] = useState69(false);
64707
64782
  return /* @__PURE__ */ jsxs70(
@@ -65552,7 +65627,7 @@ function AppDetailContent({
65552
65627
  }
65553
65628
  ) }) : null),
65554
65629
  appName && /* @__PURE__ */ jsx90(
65555
- AppRelatedUsecases,
65630
+ AppRelatedUsecases2,
65556
65631
  {
65557
65632
  appName,
65558
65633
  displayName: displayName2,
@@ -65824,7 +65899,7 @@ function AppDetailDrawer({
65824
65899
  import "./shuffle-mcp-LXISGW4I.css";
65825
65900
 
65826
65901
  // components/SegmentedControl.tsx
65827
- import * as React43 from "react";
65902
+ import * as React44 from "react";
65828
65903
  import { motion as motion18, LayoutGroup as LayoutGroup2 } from "framer-motion";
65829
65904
  import { jsx as jsx92, jsxs as jsxs71 } from "react/jsx-runtime";
65830
65905
  var SIZE = {
@@ -65857,7 +65932,7 @@ var SIZE = {
65857
65932
  };
65858
65933
  var uid2 = 0;
65859
65934
  function useUniqueId2(prefix) {
65860
- const ref = React43.useRef(void 0);
65935
+ const ref = React44.useRef(void 0);
65861
65936
  if (!ref.current) {
65862
65937
  uid2 += 1;
65863
65938
  ref.current = `${prefix}-${uid2}`;
@@ -66122,7 +66197,7 @@ var SearchErrorMessage = ({ rateLimited, message }) => {
66122
66197
  }
66123
66198
  );
66124
66199
  };
66125
- var ShuffleMCP3 = React44.forwardRef(({
66200
+ var ShuffleMCP3 = React45.forwardRef(({
66126
66201
  authToken,
66127
66202
  orgId,
66128
66203
  placeholder = "Search apps...",
@@ -67021,7 +67096,7 @@ function ShufflePipelinesBanner() {
67021
67096
  var ShufflePipelinesBanner_default = ShufflePipelinesBanner;
67022
67097
 
67023
67098
  // components/AgentUI.tsx
67024
- import React45, { useCallback as useCallback47, useEffect as useEffect69, useLayoutEffect, useMemo as useMemo44, useRef as useRef34, useState as useState74 } from "react";
67099
+ import React46, { useCallback as useCallback47, useEffect as useEffect69, useLayoutEffect, useMemo as useMemo44, useRef as useRef34, useState as useState74 } from "react";
67025
67100
  import { flushSync } from "react-dom";
67026
67101
 
67027
67102
  // agentRunSync.ts
@@ -73018,7 +73093,7 @@ var AgentUI = ({
73018
73093
  },
73019
73094
  [propComposeSubmitInput]
73020
73095
  );
73021
- const promptAnchorRef = React45.useRef(null);
73096
+ const promptAnchorRef = React46.useRef(null);
73022
73097
  const [suggestionsDismissed, setSuggestionsDismissed] = useState74(false);
73023
73098
  const [suggestionIndex, setSuggestionIndex] = useState74(-1);
73024
73099
  const promptSuggestions = useMemo44(
@@ -81846,7 +81921,7 @@ var AskAiDrawer = ({
81846
81921
  var AskAiDrawer_default = AskAiDrawer;
81847
81922
 
81848
81923
  // components/AskAiSidePanel.tsx
81849
- import React47, { useCallback as useCallback52, useEffect as useEffect77, useMemo as useMemo48, useRef as useRef38, useState as useState83 } from "react";
81924
+ import React48, { useCallback as useCallback52, useEffect as useEffect77, useMemo as useMemo48, useRef as useRef38, useState as useState83 } from "react";
81850
81925
  import {
81851
81926
  Box as Box70,
81852
81927
  Button as Button44,
@@ -82031,7 +82106,7 @@ var AskAiSidePanel = ({
82031
82106
  onClose();
82032
82107
  }
82033
82108
  }, [isAgentDisabled, open, onClose]);
82034
- const context = React47.useMemo(
82109
+ const context = React48.useMemo(
82035
82110
  () => resolveAgentContext(currentPathname, currentSearch, rules),
82036
82111
  [currentPathname, currentSearch, rules]
82037
82112
  );
@@ -82075,7 +82150,7 @@ var AskAiSidePanel = ({
82075
82150
  observer?.disconnect();
82076
82151
  };
82077
82152
  }, [open, currentPathname]);
82078
- const displayTitle = React47.useMemo(() => {
82153
+ const displayTitle = React48.useMemo(() => {
82079
82154
  if (context.titleFn) {
82080
82155
  return context.titleFn(entityTitle);
82081
82156
  }
@@ -84385,6 +84460,21 @@ function useAppLookup(appName) {
84385
84460
  }
84386
84461
 
84387
84462
  // index.ts
84463
+ var _fallbackQueryClient = null;
84464
+ function getFallbackQueryClient3() {
84465
+ if (!_fallbackQueryClient) _fallbackQueryClient = new QueryClient3();
84466
+ return _fallbackQueryClient;
84467
+ }
84468
+ var EnsureQueryClient3 = ({ children: children2 }) => {
84469
+ let hasClient = false;
84470
+ try {
84471
+ useQueryClient9();
84472
+ hasClient = true;
84473
+ } catch {
84474
+ }
84475
+ if (hasClient) return React50.createElement(React50.Fragment, null, children2);
84476
+ return React50.createElement(QueryClientProvider3, { client: getFallbackQueryClient3() }, children2);
84477
+ };
84388
84478
  var resolveMode3 = (theme, colorMode) => {
84389
84479
  if (theme === "light" || theme === "dark") return theme;
84390
84480
  if (theme === "system") return "auto";
@@ -84392,20 +84482,36 @@ var resolveMode3 = (theme, colorMode) => {
84392
84482
  return "auto";
84393
84483
  };
84394
84484
  var withMcpTheme = (Inner, displayName2) => {
84395
- const Wrapped = ({ theme, colorMode, ...rest }) => React49.createElement(
84396
- ShuffleMcpThemeProvider,
84397
- { mode: resolveMode3(theme, colorMode) },
84398
- React49.createElement(Inner, { ...rest, theme, colorMode })
84485
+ const Wrapped = ({ theme, colorMode, ...rest }) => React50.createElement(
84486
+ EnsureQueryClient3,
84487
+ null,
84488
+ React50.createElement(
84489
+ AuthFallbackProvider,
84490
+ null,
84491
+ React50.createElement(
84492
+ ShuffleMcpThemeProvider,
84493
+ { mode: resolveMode3(theme, colorMode) },
84494
+ React50.createElement(Inner, { ...rest, theme, colorMode })
84495
+ )
84496
+ )
84399
84497
  );
84400
84498
  Wrapped.displayName = `ShuffleMCPs(${displayName2})`;
84401
84499
  return Wrapped;
84402
84500
  };
84403
84501
  var withMcpThemeRef = (Inner, displayName2) => {
84404
- const Wrapped = React49.forwardRef(
84405
- ({ theme, colorMode, ...rest }, ref) => React49.createElement(
84406
- ShuffleMcpThemeProvider,
84407
- { mode: resolveMode3(theme, colorMode) },
84408
- React49.createElement(Inner, { ...rest, theme, colorMode, ref })
84502
+ const Wrapped = React50.forwardRef(
84503
+ ({ theme, colorMode, ...rest }, ref) => React50.createElement(
84504
+ EnsureQueryClient3,
84505
+ null,
84506
+ React50.createElement(
84507
+ AuthFallbackProvider,
84508
+ null,
84509
+ React50.createElement(
84510
+ ShuffleMcpThemeProvider,
84511
+ { mode: resolveMode3(theme, colorMode) },
84512
+ React50.createElement(Inner, { ...rest, theme, colorMode, ref })
84513
+ )
84514
+ )
84409
84515
  )
84410
84516
  );
84411
84517
  Wrapped.displayName = `ShuffleMCPs(${displayName2})`;