'use strict';

var chunkYZX6FH3H_cjs = require('./chunk-YZX6FH3H.cjs');
var chunkCXVGN6ZW_cjs = require('./chunk-CXVGN6ZW.cjs');
require('./chunk-F2N7P5XU.cjs');
var chunkIHAY6FO6_cjs = require('./chunk-IHAY6FO6.cjs');
var chunk77HQWEQ6_cjs = require('./chunk-77HQWEQ6.cjs');
var chunkF2CMIIOH_cjs = require('./chunk-F2CMIIOH.cjs');
var chunkFYLR232K_cjs = require('./chunk-FYLR232K.cjs');
var chunk33AMWFBZ_cjs = require('./chunk-33AMWFBZ.cjs');
require('./chunk-2SMCH62O.cjs');
var chunkL37FZYJU_cjs = require('./chunk-L37FZYJU.cjs');
var chunkPRPG2T2E_cjs = require('./chunk-PRPG2T2E.cjs');
var chunkWGEGR3DF_cjs = require('./chunk-WGEGR3DF.cjs');
var React = require('react');
var lib = require('@djangocfg/ui-core/lib');
var i18n = require('@djangocfg/i18n');
var jsxRuntime = require('react/jsx-runtime');
var hooks = require('@djangocfg/ui-core/hooks');
var react = require('@tiptap/react');
var StarterKit = require('@tiptap/starter-kit');
var Placeholder = require('@tiptap/extension-placeholder');
var Mention = require('@tiptap/extension-mention');
var markdown = require('@tiptap/markdown');
var lucideReact = require('lucide-react');
var dom = require('@floating-ui/dom');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespace(React);
var StarterKit__default = /*#__PURE__*/_interopDefault(StarterKit);
var Placeholder__default = /*#__PURE__*/_interopDefault(Placeholder);
var Mention__default = /*#__PURE__*/_interopDefault(Mention);

function Spinner({ className }) {
  const t = i18n.useAppT();
  const loadingLabel = t("ui.states.loading");
  return /* @__PURE__ */ jsxRuntime.jsx(
    "div",
    {
      className: lib.cn(
        "inline-block h-8 w-8 animate-spin rounded-full",
        "border-4 border-solid border-current border-r-transparent",
        "align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",
        className
      ),
      role: "status",
      "aria-label": loadingLabel
    }
  );
}
chunkWGEGR3DF_cjs.__name(Spinner, "Spinner");
function LoadingFallback({
  minHeight = 200,
  showText = true,
  text,
  className
}) {
  const t = i18n.useAppT();
  const loadingText = text ?? t("ui.form.loading");
  const height = typeof minHeight === "number" ? `${minHeight}px` : minHeight;
  return /* @__PURE__ */ jsxRuntime.jsx(
    "div",
    {
      className: lib.cn(
        "flex items-center justify-center bg-muted/30 rounded-lg",
        className
      ),
      style: { minHeight: height },
      children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
        /* @__PURE__ */ jsxRuntime.jsx(Spinner, { className: "text-primary" }),
        showText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: loadingText })
      ] })
    }
  );
}
chunkWGEGR3DF_cjs.__name(LoadingFallback, "LoadingFallback");
function CardLoadingFallback({
  title,
  description,
  minHeight = 200,
  className
}) {
  const t = i18n.useAppT();
  const cardTitle = title ?? t("ui.states.loading");
  const height = typeof minHeight === "number" ? `${minHeight}px` : minHeight;
  return /* @__PURE__ */ jsxRuntime.jsxs(
    "div",
    {
      className: lib.cn(
        "relative bg-card rounded-lg border border-border overflow-hidden",
        className
      ),
      children: [
        /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border-b border-border bg-muted/50", children: [
          /* @__PURE__ */ jsxRuntime.jsx("h6", { className: "text-sm font-semibold text-foreground", children: cardTitle }),
          description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: description })
        ] }),
        /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
          "div",
          {
            className: "flex justify-center items-center",
            style: { minHeight: height },
            children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { className: "text-primary" })
          }
        ) })
      ]
    }
  );
}
chunkWGEGR3DF_cjs.__name(CardLoadingFallback, "CardLoadingFallback");
function MapLoadingFallback({
  minHeight = 400,
  className
}) {
  const t = i18n.useAppT();
  const loadingText = t("ui.form.loading");
  const height = typeof minHeight === "number" ? `${minHeight}px` : minHeight;
  return /* @__PURE__ */ jsxRuntime.jsx(
    "div",
    {
      className: lib.cn(
        "relative bg-muted/50 rounded-lg overflow-hidden",
        "flex items-center justify-center",
        className
      ),
      style: { minHeight: height },
      children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
        /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
          /* @__PURE__ */ jsxRuntime.jsx(Spinner, { className: "text-primary h-10 w-10" }),
          /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
            "svg",
            {
              className: "h-5 w-5 text-muted-foreground",
              fill: "none",
              viewBox: "0 0 24 24",
              stroke: "currentColor",
              children: [
                /* @__PURE__ */ jsxRuntime.jsx(
                  "path",
                  {
                    strokeLinecap: "round",
                    strokeLinejoin: "round",
                    strokeWidth: 2,
                    d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
                  }
                ),
                /* @__PURE__ */ jsxRuntime.jsx(
                  "path",
                  {
                    strokeLinecap: "round",
                    strokeLinejoin: "round",
                    strokeWidth: 2,
                    d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
                  }
                )
              ]
            }
          ) })
        ] }),
        /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: loadingText })
      ] })
    }
  );
}
chunkWGEGR3DF_cjs.__name(MapLoadingFallback, "MapLoadingFallback");
function LazyWrapper({
  children,
  fallback,
  card = false,
  cardTitle,
  cardDescription,
  minHeight = 200,
  className
}) {
  const defaultFallback = card ? /* @__PURE__ */ jsxRuntime.jsx(
    CardLoadingFallback,
    {
      title: cardTitle,
      description: cardDescription,
      minHeight,
      className
    }
  ) : /* @__PURE__ */ jsxRuntime.jsx(LoadingFallback, { minHeight, className });
  return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: fallback ?? defaultFallback, children });
}
chunkWGEGR3DF_cjs.__name(LazyWrapper, "LazyWrapper");
function createLazyComponent(loader, options = {}) {
  const LazyComponent = React__namespace.lazy(loader);
  const WrappedComponent = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((props) => {
    const fallback = typeof options.fallback === "function" ? options.fallback(props) : options.fallback ?? /* @__PURE__ */ jsxRuntime.jsx(LoadingFallback, {});
    return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback, children: /* @__PURE__ */ jsxRuntime.jsx(LazyComponent, { ...props }) });
  }, "WrappedComponent");
  WrappedComponent.displayName = options.displayName ?? "LazyComponent";
  return WrappedComponent;
}
chunkWGEGR3DF_cjs.__name(createLazyComponent, "createLazyComponent");
var LazyMapContainer = createLazyComponent(
  () => import('./MapContainer-RYG4HPH4.cjs').then((mod) => ({ default: mod.MapContainer })),
  {
    displayName: "LazyMapContainer",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(MapLoadingFallback, { minHeight: 400 })
  }
);
var LazyMapView = createLazyComponent(
  () => import('./MapContainer-RYG4HPH4.cjs').then((mod) => ({ default: mod.MapView })),
  {
    displayName: "LazyMapView",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(MapLoadingFallback, { minHeight: 400 })
  }
);
var LazyMermaid = createLazyComponent(
  () => import('./Mermaid.client-W76R5AKJ.cjs'),
  {
    displayName: "LazyMermaid",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(
      CardLoadingFallback,
      {
        title: "Diagram",
        description: "Loading...",
        minHeight: 200
      }
    )
  }
);
function CodeLoadingFallback() {
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative rounded-sm border border-border overflow-hidden bg-muted dark:bg-zinc-900", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
    /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-pulse h-4 w-4 rounded-full bg-muted-foreground/20" }),
    /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Loading code..." })
  ] }) }) });
}
chunkWGEGR3DF_cjs.__name(CodeLoadingFallback, "CodeLoadingFallback");
var LazyPrettyCode = createLazyComponent(
  () => import('./PrettyCode.client-RPDIE5CH.cjs'),
  {
    displayName: "LazyPrettyCode",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(CodeLoadingFallback, {})
  }
);
function OpenapiLoadingFallback() {
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center min-h-[400px] bg-muted/30 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
    /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-primary border-r-transparent" }),
    /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: "Loading API Playground..." })
  ] }) });
}
chunkWGEGR3DF_cjs.__name(OpenapiLoadingFallback, "OpenapiLoadingFallback");
var LazyDocsLayout = createLazyComponent(
  () => import('./DocsLayout-ZXD2CUOH.cjs').then((mod) => ({ default: mod.DocsLayout })),
  {
    displayName: "LazyDocsLayout",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(OpenapiLoadingFallback, {})
  }
);
var LazyOpenapiViewer = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(({ config }) => {
  return /* @__PURE__ */ jsxRuntime.jsx(chunkFYLR232K_cjs.PlaygroundProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(LazyDocsLayout, {}) });
}, "LazyOpenapiViewer");
LazyOpenapiViewer.displayName = "LazyOpenapiViewer";
var LazyJsonSchemaForm = createLazyComponent(
  () => import('./JsonSchemaForm-IIYKSH6X.cjs').then((mod) => ({ default: mod.JsonSchemaForm })),
  {
    displayName: "LazyJsonSchemaForm",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(
      CardLoadingFallback,
      {
        title: "Form",
        description: "Loading form schema...",
        minHeight: 200
      }
    )
  }
);
function LottieLoadingFallback() {
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
    /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-muted border-t-primary" }),
    /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Loading animation..." })
  ] }) });
}
chunkWGEGR3DF_cjs.__name(LottieLoadingFallback, "LottieLoadingFallback");
var LazyLottiePlayer = createLazyComponent(
  () => import('./LottiePlayer.client-6WVWDO75.cjs').then((mod) => ({ default: mod.LottiePlayer })),
  {
    displayName: "LazyLottiePlayer",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(LottieLoadingFallback, {})
  }
);
function AudioLoadingFallback() {
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center p-6 bg-muted/30 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
    /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-muted border-t-primary" }),
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
        "svg",
        {
          className: "h-5 w-5 text-muted-foreground",
          fill: "none",
          viewBox: "0 0 24 24",
          stroke: "currentColor",
          children: /* @__PURE__ */ jsxRuntime.jsx(
            "path",
            {
              strokeLinecap: "round",
              strokeLinejoin: "round",
              strokeWidth: 2,
              d: "M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"
            }
          )
        }
      ) })
    ] }),
    /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Loading audio player..." })
  ] }) });
}
chunkWGEGR3DF_cjs.__name(AudioLoadingFallback, "AudioLoadingFallback");
var LazyHybridAudioPlayer = createLazyComponent(
  () => import('./components-CPHOUQ5F.cjs').then((mod) => ({ default: mod.HybridAudioPlayer })),
  {
    displayName: "LazyHybridAudioPlayer",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(AudioLoadingFallback, {})
  }
);
var LazyHybridSimplePlayer = createLazyComponent(
  () => import('./components-CPHOUQ5F.cjs').then((mod) => ({ default: mod.HybridSimplePlayer })),
  {
    displayName: "LazyHybridSimplePlayer",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(AudioLoadingFallback, {})
  }
);
var LazyHybridCompactPlayer = createLazyComponent(
  () => import('./components-CPHOUQ5F.cjs').then((mod) => ({ default: mod.HybridCompactPlayer })),
  {
    displayName: "LazyHybridCompactPlayer",
    fallback: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 h-8 px-1 animate-pulse", children: [
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 rounded-md bg-muted flex-shrink-0" }),
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-4 rounded bg-muted" }),
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 w-12 rounded bg-muted flex-shrink-0" })
    ] })
  }
);
function VideoLoadingFallback() {
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center bg-black/90 rounded-lg aspect-video", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
    /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-white/20 border-t-white" }),
      /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
        "svg",
        {
          className: "h-5 w-5 text-white/60",
          fill: "currentColor",
          viewBox: "0 0 24 24",
          children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 5v14l11-7z" })
        }
      ) })
    ] }),
    /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-white/60", children: "Loading video player..." })
  ] }) });
}
chunkWGEGR3DF_cjs.__name(VideoLoadingFallback, "VideoLoadingFallback");
var LazyVideoPlayer = createLazyComponent(
  () => import('./components-3RTH76CV.cjs').then((mod) => ({ default: mod.VideoPlayer })),
  {
    displayName: "LazyVideoPlayer",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(VideoLoadingFallback, {})
  }
);
var LazyJsonTree = createLazyComponent(
  () => import('./JsonTree-F27RMYSI.cjs'),
  {
    displayName: "LazyJsonTree",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(LoadingFallback, { minHeight: 100, text: "Loading JSON viewer..." })
  }
);
var LazyImageViewer = createLazyComponent(
  () => import('./components-5UXYNAKR.cjs').then((mod) => ({ default: mod.ImageViewer })),
  {
    displayName: "LazyImageViewer",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(LoadingFallback, { minHeight: 200, text: "Loading image viewer..." })
  }
);
var LazyCronScheduler = createLazyComponent(
  () => import('./CronScheduler.client-A4GO6YBY.cjs'),
  {
    displayName: "LazyCronScheduler",
    fallback: /* @__PURE__ */ jsxRuntime.jsx(
      LoadingFallback,
      {
        minHeight: 120,
        showText: false,
        className: "rounded-lg"
      }
    )
  }
);
var LottiePlayerClient = React.lazy(
  () => import('./LottiePlayer.client-6WVWDO75.cjs').then((mod) => ({ default: mod.LottiePlayer }))
);
var LoadingFallback6 = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-gray-900" }),
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-gray-500", children: "Loading player..." })
] }) }), "LoadingFallback");
function LottiePlayer(props) {
  return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(LoadingFallback6, {}), children: /* @__PURE__ */ jsxRuntime.jsx(LottiePlayerClient, { ...props }) });
}
chunkWGEGR3DF_cjs.__name(LottiePlayer, "LottiePlayer");
var DocsLayout = React.lazy(
  () => import('./DocsLayout-ZXD2CUOH.cjs').then((mod) => ({ default: mod.DocsLayout }))
);
var LoadingFallback7 = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "Loading API Playground..." }) }), "LoadingFallback");
var Playground = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(({ config }) => {
  return /* @__PURE__ */ jsxRuntime.jsx(chunkFYLR232K_cjs.PlaygroundProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(LoadingFallback7, {}), children: /* @__PURE__ */ jsxRuntime.jsx(DocsLayout, {}) }) });
}, "Playground");
var OpenapiViewer_default = Playground;
var CronSchedulerClient = React.lazy(() => import('./CronScheduler.client-A4GO6YBY.cjs'));
function CronScheduler(props) {
  return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(CronSchedulerFallback, {}), children: /* @__PURE__ */ jsxRuntime.jsx(CronSchedulerClient, { ...props }) });
}
chunkWGEGR3DF_cjs.__name(CronScheduler, "CronScheduler");
function CronSchedulerFallback() {
  return /* @__PURE__ */ jsxRuntime.jsx(
    LoadingFallback,
    {
      minHeight: 120,
      showText: false,
      className: "rounded-lg"
    }
  );
}
chunkWGEGR3DF_cjs.__name(CronSchedulerFallback, "CronSchedulerFallback");

// src/tools/CodeEditor/workers/setup.ts
var isSetup = false;
function setupMonacoWorkers(getWorker) {
  if (isSetup || typeof window === "undefined") return;
  if (getWorker) {
    self.MonacoEnvironment = {
      getWorker: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((_workerId, label) => getWorker(label), "getWorker")
    };
  }
  isSetup = true;
}
chunkWGEGR3DF_cjs.__name(setupMonacoWorkers, "setupMonacoWorkers");

// src/tools/CodeEditor/hooks/useMonaco.ts
function useMonaco() {
  const [monaco, setMonaco] = React.useState(null);
  const [isLoading, setIsLoading] = React.useState(true);
  const [error, setError] = React.useState(null);
  React.useEffect(() => {
    let mounted = true;
    async function loadMonaco() {
      try {
        setupMonacoWorkers();
        const monacoModule = await import('monaco-editor');
        if (mounted) {
          setMonaco(monacoModule);
          setIsLoading(false);
        }
      } catch (err) {
        if (mounted) {
          setError(err instanceof Error ? err : new Error("Failed to load Monaco Editor"));
          setIsLoading(false);
        }
      }
    }
    chunkWGEGR3DF_cjs.__name(loadMonaco, "loadMonaco");
    loadMonaco();
    return () => {
      mounted = false;
    };
  }, []);
  return { monaco, isLoading, error };
}
chunkWGEGR3DF_cjs.__name(useMonaco, "useMonaco");
function useEditorTheme(monaco, themeOverride) {
  const appTheme = hooks.useResolvedTheme();
  const registered = React.useRef(false);
  React.useEffect(() => {
    if (!monaco || registered.current) return;
    try {
      const colors = _readCSSColors();
      monaco.editor.defineTheme("app-dark", {
        base: "vs-dark",
        inherit: true,
        rules: [
          { token: "comment", foreground: "6A9955", fontStyle: "italic" },
          { token: "keyword", foreground: "C586C0" },
          { token: "string", foreground: "CE9178" },
          { token: "number", foreground: "B5CEA8" },
          { token: "type", foreground: "4EC9B0" },
          { token: "function", foreground: "DCDCAA" },
          { token: "variable", foreground: "9CDCFE" }
        ],
        colors: {
          "editor.background": colors.background,
          "editor.foreground": colors.foreground,
          "editor.lineHighlightBackground": colors.lineHighlight,
          "editor.selectionBackground": colors.selection,
          "editorCursor.foreground": colors.foreground,
          "editorLineNumber.foreground": colors.mutedForeground,
          "editorWidget.background": colors.card,
          "editorWidget.border": colors.border,
          "input.background": colors.card,
          "dropdown.background": colors.card
        }
      });
      monaco.editor.defineTheme("app-light", {
        base: "vs",
        inherit: true,
        rules: [
          { token: "comment", foreground: "008000", fontStyle: "italic" },
          { token: "keyword", foreground: "AF00DB" },
          { token: "string", foreground: "A31515" },
          { token: "number", foreground: "098658" },
          { token: "type", foreground: "267F99" },
          { token: "function", foreground: "795E26" },
          { token: "variable", foreground: "001080" }
        ],
        colors: {
          "editor.background": colors.backgroundLight,
          "editor.foreground": colors.foregroundLight,
          "editor.lineHighlightBackground": colors.lineHighlightLight,
          "editor.selectionBackground": colors.selectionLight,
          "editorLineNumber.foreground": colors.mutedForegroundLight,
          "editorWidget.background": colors.cardLight,
          "editorWidget.border": colors.borderLight
        }
      });
      registered.current = true;
    } catch {
    }
  }, [monaco]);
  if (themeOverride) return themeOverride;
  if (registered.current) {
    return appTheme === "dark" ? "app-dark" : "app-light";
  }
  return appTheme === "dark" ? "vs-dark" : "vs";
}
chunkWGEGR3DF_cjs.__name(useEditorTheme, "useEditorTheme");
function _readCSSColors() {
  const get = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((varName) => {
    if (typeof document === "undefined") return "";
    return getComputedStyle(document.documentElement).getPropertyValue(varName).trim();
  }, "get");
  const hslToHex = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((hsl) => {
    if (!hsl) return "";
    const parts = hsl.split(/\s+/).map((s2) => parseFloat(s2.replace("%", "")));
    if (parts.length < 3 || parts.some(isNaN)) return "";
    const [h, s, l] = [parts[0], parts[1] / 100, parts[2] / 100];
    const a = s * Math.min(l, 1 - l);
    const f = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((n) => {
      const k = (n + h / 30) % 12;
      const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
      return Math.round(255 * color).toString(16).padStart(2, "0");
    }, "f");
    return `#${f(0)}${f(8)}${f(4)}`;
  }, "hslToHex");
  const background = hslToHex(get("--background")) || "#0a0a0a";
  const foreground = hslToHex(get("--foreground")) || "#f5f5f5";
  const card = hslToHex(get("--card")) || "#141414";
  const border = hslToHex(get("--border")) || "#262626";
  const mutedForeground = hslToHex(get("--muted-foreground")) || "#858585";
  const lineHighlight = _adjustBrightness(background, 10);
  const primary = hslToHex(get("--primary"));
  const selection = primary ? _adjustBrightness(primary, -40) : "#264F78";
  return {
    background,
    foreground,
    card,
    border,
    mutedForeground,
    lineHighlight,
    selection,
    // Light variants
    backgroundLight: "#ffffff",
    foregroundLight: "#1a1a1a",
    cardLight: "#ffffff",
    borderLight: "#e5e5e5",
    mutedForegroundLight: "#737373",
    lineHighlightLight: "#f5f5f5",
    selectionLight: "#ADD6FF"
  };
}
chunkWGEGR3DF_cjs.__name(_readCSSColors, "_readCSSColors");
function _adjustBrightness(hex, amount) {
  const num = parseInt(hex.replace("#", ""), 16);
  const r = Math.min(255, Math.max(0, (num >> 16 & 255) + amount));
  const g = Math.min(255, Math.max(0, (num >> 8 & 255) + amount));
  const b = Math.min(255, Math.max(0, (num & 255) + amount));
  return `#${(r << 16 | g << 8 | b).toString(16).padStart(6, "0")}`;
}
chunkWGEGR3DF_cjs.__name(_adjustBrightness, "_adjustBrightness");
var Editor = React.forwardRef(/* @__PURE__ */ chunkWGEGR3DF_cjs.__name(function Editor2({
  value = "",
  language = "plaintext",
  onChange,
  onMount,
  options = {},
  className = "",
  height = "100%",
  width = "100%",
  autoHeight = false,
  minHeight = 100,
  maxHeight = 600
}, ref) {
  const containerRef = React.useRef(null);
  const editorRef = React.useRef(null);
  const { monaco, isLoading } = useMonaco();
  const resolvedTheme = useEditorTheme(monaco, options.theme);
  const [contentHeight, setContentHeight] = React.useState(null);
  const updateContentHeight = React.useCallback((editor) => {
    if (!autoHeight) return;
    const h = editor.getContentHeight();
    setContentHeight(Math.min(Math.max(h, minHeight), maxHeight));
  }, [autoHeight, minHeight, maxHeight]);
  const isInternalChangeRef = React.useRef(false);
  React.useImperativeHandle(ref, () => ({
    getEditor: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editorRef.current, "getEditor"),
    getValue: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editorRef.current?.getValue() || "", "getValue"),
    setValue: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((val) => editorRef.current?.setValue(val), "setValue"),
    focus: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editorRef.current?.focus(), "focus")
  }));
  React.useEffect(() => {
    if (!monaco || !containerRef.current || editorRef.current) return;
    const editor = monaco.editor.create(containerRef.current, {
      value,
      language,
      theme: resolvedTheme,
      fontSize: options.fontSize || 14,
      fontFamily: options.fontFamily || "'Fira Code', 'Consolas', monospace",
      tabSize: options.tabSize || 2,
      insertSpaces: options.insertSpaces !== false,
      wordWrap: options.wordWrap || "on",
      minimap: { enabled: options.minimap !== false },
      lineNumbers: options.lineNumbers || "on",
      readOnly: options.readOnly || false,
      automaticLayout: true,
      scrollBeyondLastLine: autoHeight ? false : false,
      scrollbar: autoHeight ? { vertical: "hidden", horizontal: "auto" } : void 0,
      overviewRulerLanes: autoHeight ? 0 : void 0,
      padding: { top: 16, bottom: 16 },
      renderLineHighlight: "all",
      cursorBlinking: "smooth",
      cursorSmoothCaretAnimation: "on",
      smoothScrolling: true,
      bracketPairColorization: { enabled: true },
      guides: {
        bracketPairs: true,
        indentation: true
      }
    });
    editorRef.current = editor;
    if (onChange) {
      editor.onDidChangeModelContent(() => {
        isInternalChangeRef.current = true;
        onChange(editor.getValue());
      });
    }
    if (autoHeight) {
      editor.onDidContentSizeChange(() => updateContentHeight(editor));
      updateContentHeight(editor);
    }
    onMount?.(editor);
    return () => {
      editor.dispose();
      editorRef.current = null;
    };
  }, [monaco]);
  React.useEffect(() => {
    const editor = editorRef.current;
    if (!editor) return;
    if (isInternalChangeRef.current) {
      isInternalChangeRef.current = false;
      return;
    }
    const currentValue = editor.getValue();
    if (value !== currentValue) {
      const position = editor.getPosition();
      const selections = editor.getSelections();
      editor.setValue(value);
      if (position) {
        editor.setPosition(position);
      }
      if (selections && selections.length > 0) {
        editor.setSelections(selections);
      }
    }
  }, [value]);
  React.useEffect(() => {
    const editor = editorRef.current;
    if (!editor || !monaco) return;
    const model = editor.getModel();
    if (model) {
      monaco.editor.setModelLanguage(model, language);
    }
  }, [language, monaco]);
  React.useEffect(() => {
    const editor = editorRef.current;
    if (!editor) return;
    editor.updateOptions({
      theme: resolvedTheme,
      fontSize: options.fontSize,
      readOnly: options.readOnly,
      minimap: { enabled: options.minimap !== false },
      wordWrap: options.wordWrap,
      lineNumbers: options.lineNumbers
    });
  }, [options, resolvedTheme]);
  if (isLoading) {
    return /* @__PURE__ */ jsxRuntime.jsx(
      "div",
      {
        className,
        style: {
          width,
          height,
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          backgroundColor: "#1e1e1e",
          color: "#666"
        },
        children: "Loading editor..."
      }
    );
  }
  const resolvedHeight = autoHeight && contentHeight != null ? contentHeight : height;
  return /* @__PURE__ */ jsxRuntime.jsx(
    "div",
    {
      ref: containerRef,
      className,
      style: {
        width,
        height: resolvedHeight,
        ...autoHeight && { minHeight, maxHeight, overflow: "hidden" }
      }
    }
  );
}, "Editor"));
function DiffEditor({
  original,
  modified,
  language = "plaintext",
  options = {},
  className = "",
  height = "100%"
}) {
  const containerRef = React.useRef(null);
  const editorRef = React.useRef(null);
  const { monaco, isLoading } = useMonaco();
  const resolvedTheme = useEditorTheme(monaco, options.theme);
  React.useEffect(() => {
    if (!monaco || !containerRef.current || editorRef.current) return;
    const editor = monaco.editor.createDiffEditor(containerRef.current, {
      theme: resolvedTheme,
      fontSize: options.fontSize || 14,
      fontFamily: options.fontFamily || "'Fira Code', 'Consolas', monospace",
      readOnly: true,
      automaticLayout: true,
      renderSideBySide: true,
      scrollBeyondLastLine: false,
      minimap: { enabled: false }
    });
    const originalModel = monaco.editor.createModel(original, language);
    const modifiedModel = monaco.editor.createModel(modified, language);
    editor.setModel({
      original: originalModel,
      modified: modifiedModel
    });
    editorRef.current = editor;
    return () => {
      originalModel.dispose();
      modifiedModel.dispose();
      editor.dispose();
      editorRef.current = null;
    };
  }, [monaco]);
  React.useEffect(() => {
    const editor = editorRef.current;
    if (!editor || !monaco) return;
    const model = editor.getModel();
    if (model) {
      model.original.setValue(original);
      model.modified.setValue(modified);
    }
  }, [original, modified, monaco]);
  React.useEffect(() => {
    const editor = editorRef.current;
    if (!editor || !monaco) return;
    const model = editor.getModel();
    if (model) {
      monaco.editor.setModelLanguage(model.original, language);
      monaco.editor.setModelLanguage(model.modified, language);
    }
  }, [language, monaco]);
  if (isLoading) {
    return /* @__PURE__ */ jsxRuntime.jsx(
      "div",
      {
        className,
        style: {
          width: "100%",
          height,
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          backgroundColor: "#1e1e1e",
          color: "#666"
        },
        children: "Loading diff editor..."
      }
    );
  }
  return /* @__PURE__ */ jsxRuntime.jsx(
    "div",
    {
      ref: containerRef,
      className,
      style: {
        width: "100%",
        height
      }
    }
  );
}
chunkWGEGR3DF_cjs.__name(DiffEditor, "DiffEditor");

// src/tools/CodeEditor/lib/languages.ts
var LANGUAGE_MAP = {
  // Web
  ".html": "html",
  ".htm": "html",
  ".xhtml": "html",
  ".vue": "html",
  ".svelte": "html",
  // CSS
  ".css": "css",
  ".scss": "scss",
  ".sass": "scss",
  ".less": "less",
  // JavaScript/TypeScript
  ".js": "javascript",
  ".mjs": "javascript",
  ".cjs": "javascript",
  ".jsx": "javascript",
  ".ts": "typescript",
  ".tsx": "typescript",
  ".mts": "typescript",
  ".cts": "typescript",
  // Data formats
  ".json": "json",
  ".jsonc": "json",
  ".json5": "json",
  ".yaml": "yaml",
  ".yml": "yaml",
  ".toml": "ini",
  ".xml": "xml",
  ".svg": "xml",
  ".xsl": "xml",
  ".xsd": "xml",
  // Markdown & Documentation
  ".md": "markdown",
  ".mdx": "markdown",
  ".markdown": "markdown",
  ".rst": "restructuredtext",
  ".txt": "plaintext",
  ".text": "plaintext",
  // Programming languages
  ".py": "python",
  ".pyw": "python",
  ".pyi": "python",
  ".rb": "ruby",
  ".rake": "ruby",
  ".gemspec": "ruby",
  ".php": "php",
  ".phtml": "php",
  ".java": "java",
  ".kt": "kotlin",
  ".kts": "kotlin",
  ".scala": "scala",
  ".go": "go",
  ".rs": "rust",
  ".swift": "swift",
  ".c": "c",
  ".h": "c",
  ".cpp": "cpp",
  ".cc": "cpp",
  ".cxx": "cpp",
  ".hpp": "cpp",
  ".hxx": "cpp",
  ".cs": "csharp",
  ".fs": "fsharp",
  ".fsx": "fsharp",
  ".vb": "vb",
  ".lua": "lua",
  ".r": "r",
  ".R": "r",
  ".m": "objective-c",
  ".mm": "objective-c",
  ".pl": "perl",
  ".pm": "perl",
  ".ex": "elixir",
  ".exs": "elixir",
  ".erl": "erlang",
  ".hrl": "erlang",
  ".clj": "clojure",
  ".cljs": "clojure",
  ".cljc": "clojure",
  ".hs": "haskell",
  ".lhs": "haskell",
  ".ml": "fsharp",
  ".mli": "fsharp",
  ".dart": "dart",
  ".groovy": "groovy",
  ".gradle": "groovy",
  ".jl": "julia",
  // Shell & Scripts
  ".sh": "shell",
  ".bash": "shell",
  ".zsh": "shell",
  ".fish": "shell",
  ".ps1": "powershell",
  ".psm1": "powershell",
  ".psd1": "powershell",
  ".bat": "bat",
  ".cmd": "bat",
  // Config files
  ".ini": "ini",
  ".cfg": "ini",
  ".conf": "ini",
  ".properties": "ini",
  ".env": "ini",
  ".gitignore": "ini",
  ".gitattributes": "ini",
  ".editorconfig": "ini",
  ".npmrc": "ini",
  // Database
  ".sql": "sql",
  ".mysql": "mysql",
  ".pgsql": "pgsql",
  ".plsql": "plsql",
  ".redis": "redis",
  // Templates
  ".hbs": "handlebars",
  ".handlebars": "handlebars",
  ".mustache": "handlebars",
  ".ejs": "html",
  ".pug": "pug",
  ".jade": "pug",
  ".twig": "twig",
  ".liquid": "liquid",
  // GraphQL
  ".graphql": "graphql",
  ".gql": "graphql",
  // Docker
  ".dockerfile": "dockerfile",
  // Other
  ".diff": "diff",
  ".patch": "diff",
  ".log": "log",
  ".tex": "latex",
  ".cls": "latex",
  ".sty": "latex",
  ".proto": "protobuf",
  ".sol": "sol",
  ".asm": "mips",
  ".s": "mips",
  ".wasm": "wasm"
};
var FILENAME_MAP = {
  Dockerfile: "dockerfile",
  "docker-compose.yml": "yaml",
  "docker-compose.yaml": "yaml",
  Makefile: "makefile",
  makefile: "makefile",
  Gemfile: "ruby",
  Rakefile: "ruby",
  Jenkinsfile: "groovy",
  Vagrantfile: "ruby",
  ".bashrc": "shell",
  ".bash_profile": "shell",
  ".zshrc": "shell",
  ".profile": "shell",
  ".vimrc": "plaintext",
  ".gitconfig": "ini",
  ".htaccess": "ini",
  "nginx.conf": "ini",
  "package.json": "json",
  "tsconfig.json": "json",
  "jsconfig.json": "json",
  ".prettierrc": "json",
  ".eslintrc": "json",
  "composer.json": "json",
  "Cargo.toml": "ini",
  "go.mod": "go",
  "go.sum": "plaintext",
  "requirements.txt": "plaintext",
  "pyproject.toml": "ini",
  "setup.py": "python",
  "setup.cfg": "ini"
};
function getLanguageByFilename(filename) {
  if (FILENAME_MAP[filename]) {
    return FILENAME_MAP[filename];
  }
  const lastDot = filename.lastIndexOf(".");
  if (lastDot === -1) {
    return "plaintext";
  }
  const extension = filename.slice(lastDot).toLowerCase();
  return LANGUAGE_MAP[extension] || "plaintext";
}
chunkWGEGR3DF_cjs.__name(getLanguageByFilename, "getLanguageByFilename");
var EditorContext = React.createContext(null);
function useEditorContext() {
  const context = React.useContext(EditorContext);
  if (!context) {
    throw new Error("useEditorContext must be used within EditorProvider");
  }
  return context;
}
chunkWGEGR3DF_cjs.__name(useEditorContext, "useEditorContext");
function EditorProvider({ children, onSave }) {
  const { monaco } = useMonaco();
  const [editor, setEditor] = React.useState(null);
  const [openFiles, setOpenFiles] = React.useState([]);
  const [activeFilePath, setActiveFilePath] = React.useState(null);
  const activeFile = React.useMemo(
    () => openFiles.find((f) => f.path === activeFilePath) || null,
    [openFiles, activeFilePath]
  );
  const openFile = React.useCallback(
    (path, content, language) => {
      setOpenFiles((files) => {
        const existing = files.find((f) => f.path === path);
        if (existing) {
          return files;
        }
        const basename = path.split("/").pop() || path;
        const detectedLanguage = language || getLanguageByFilename(basename);
        const newFile = {
          path,
          content,
          language: detectedLanguage,
          isDirty: false
        };
        return [...files, newFile];
      });
      setActiveFilePath(path);
    },
    []
  );
  const closeFile = React.useCallback(
    (path) => {
      setOpenFiles((files) => {
        const index = files.findIndex((f) => f.path === path);
        if (index === -1) return files;
        const newFiles = files.filter((f) => f.path !== path);
        if (activeFilePath === path && newFiles.length > 0) {
          const newIndex = Math.min(index, newFiles.length - 1);
          setActiveFilePath(newFiles[newIndex].path);
        } else if (newFiles.length === 0) {
          setActiveFilePath(null);
        }
        return newFiles;
      });
    },
    [activeFilePath]
  );
  const setActiveFile = React.useCallback((path) => {
    setActiveFilePath(path);
  }, []);
  const updateContent = React.useCallback((path, content) => {
    setOpenFiles(
      (files) => files.map(
        (f) => f.path === path ? { ...f, content, isDirty: true } : f
      )
    );
  }, []);
  const saveFile = React.useCallback(
    async (path) => {
      const file = openFiles.find((f) => f.path === path);
      if (!file) return;
      if (onSave) {
        await onSave(path, file.content);
      }
      setOpenFiles(
        (files) => files.map(
          (f) => f.path === path ? { ...f, isDirty: false } : f
        )
      );
    },
    [openFiles, onSave]
  );
  const isDirty = React.useCallback(
    (path) => {
      const file = openFiles.find((f) => f.path === path);
      return file?.isDirty || false;
    },
    [openFiles]
  );
  const getContent = React.useCallback(
    (path) => {
      const file = openFiles.find((f) => f.path === path);
      return file?.content || null;
    },
    [openFiles]
  );
  const getFile = React.useCallback(
    (path) => {
      return openFiles.find((f) => f.path === path) || null;
    },
    [openFiles]
  );
  const value = {
    openFiles,
    activeFile,
    monaco,
    editor,
    isReady: monaco !== null && editor !== null,
    openFile,
    closeFile,
    setActiveFile,
    updateContent,
    saveFile,
    isDirty,
    getContent,
    getFile
  };
  return /* @__PURE__ */ jsxRuntime.jsx(EditorContext.Provider, { value, children });
}
chunkWGEGR3DF_cjs.__name(EditorProvider, "EditorProvider");
function useEditor() {
  const [editor, setEditorState] = React.useState(null);
  const setEditor = React.useCallback((editorInstance) => {
    setEditorState(editorInstance);
  }, []);
  return {
    editor,
    isReady: editor !== null,
    setEditor
  };
}
chunkWGEGR3DF_cjs.__name(useEditor, "useEditor");
function useLanguage(filename) {
  return React.useMemo(() => {
    if (!filename) return "plaintext";
    const basename = filename.split("/").pop() || filename;
    return getLanguageByFilename(basename);
  }, [filename]);
}
chunkWGEGR3DF_cjs.__name(useLanguage, "useLanguage");
var MentionList = React.forwardRef(
  ({ items, command }, ref) => {
    const [selectedIndex, setSelectedIndex] = React.useState(0);
    React.useEffect(() => setSelectedIndex(0), [items]);
    const select = React.useCallback(
      (index) => {
        const item = items[index];
        if (item) command(item);
      },
      [items, command]
    );
    React.useImperativeHandle(ref, () => ({
      onKeyDown: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((event) => {
        if (event.key === "ArrowUp") {
          setSelectedIndex((i) => (i + items.length - 1) % items.length);
          return true;
        }
        if (event.key === "ArrowDown") {
          setSelectedIndex((i) => (i + 1) % items.length);
          return true;
        }
        if (event.key === "Enter") {
          select(selectedIndex);
          return true;
        }
        return false;
      }, "onKeyDown")
    }));
    if (items.length === 0) return null;
    return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-mention-list", children: items.map((item, i) => {
      const isSelected = i === selectedIndex;
      const cls = `markdown-mention-item ${isSelected ? "selected" : ""}`;
      return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: cls, onClick: () => select(i), children: [
        item.thumbnail && /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.thumbnail, alt: "", className: "markdown-mention-avatar" }),
        /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "markdown-mention-info", children: [
          /* @__PURE__ */ jsxRuntime.jsx("span", { className: "markdown-mention-name", children: item.label }),
          item.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "markdown-mention-desc", children: item.description })
        ] })
      ] }, item.id);
    }) });
  }
);
MentionList.displayName = "MentionList";

// src/tools/MarkdownEditor/createMentionSuggestion.ts
function createMentionSuggestion(config) {
  const { maxItems = 5, trigger = "@" } = config;
  return {
    char: trigger,
    items: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(({ query }) => {
      const q = query.toLowerCase();
      return config.items.filter((item) => item.label.toLowerCase().includes(q)).slice(0, maxItems);
    }, "items"),
    render: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
      let component = null;
      let popup = null;
      let cleanupAutoUpdate = null;
      let getReferenceRect = null;
      const buildVirtualElement = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => ({
        getBoundingClientRect: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
          const rect = getReferenceRect?.();
          return rect ?? new DOMRect(0, 0, 0, 0);
        }, "getBoundingClientRect")
      }), "buildVirtualElement");
      const updatePosition = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
        if (!popup) return;
        const virtualEl = buildVirtualElement();
        void dom.computePosition(virtualEl, popup, {
          placement: "bottom-start",
          middleware: [
            dom.offset(4),
            dom.flip({ fallbackPlacements: ["top-start"] }),
            dom.shift({ padding: 8 })
          ]
        }).then(({ x, y }) => {
          if (!popup) return;
          popup.style.transform = `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;
        });
      }, "updatePosition");
      const teardown = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
        cleanupAutoUpdate?.();
        cleanupAutoUpdate = null;
        popup?.remove();
        popup = null;
        component?.destroy();
        component = null;
        getReferenceRect = null;
      }, "teardown");
      return {
        onStart: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((props) => {
          component = new react.ReactRenderer(MentionList, {
            props: {
              items: props.items,
              command: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((item) => {
                props.command({ id: item.id, label: item.label });
              }, "command")
            },
            editor: props.editor
          });
          popup = document.createElement("div");
          popup.style.cssText = "position: absolute; top: 0; left: 0; z-index: 99999;";
          popup.appendChild(component.element);
          document.body.appendChild(popup);
          getReferenceRect = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => props.clientRect?.() ?? null, "getReferenceRect");
          const virtualEl = buildVirtualElement();
          cleanupAutoUpdate = dom.autoUpdate(virtualEl, popup, updatePosition);
        }, "onStart"),
        onUpdate: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((props) => {
          component?.updateProps({
            items: props.items,
            command: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((item) => {
              props.command({ id: item.id, label: item.label });
            }, "command")
          });
          getReferenceRect = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => props.clientRect?.() ?? null, "getReferenceRect");
          updatePosition();
        }, "onUpdate"),
        onKeyDown: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((props) => {
          if (props.event.key === "Escape") {
            teardown();
            return true;
          }
          return component?.ref?.onKeyDown(props.event) ?? false;
        }, "onKeyDown"),
        onExit: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
          teardown();
        }, "onExit")
      };
    }, "render")
  };
}
chunkWGEGR3DF_cjs.__name(createMentionSuggestion, "createMentionSuggestion");

// src/tools/MarkdownEditor/mentionPresets.ts
var escapeMd = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((s) => s.replace(/([\\\[\]()_*~`])/g, "\\$1"), "escapeMd");
var mentionPresets = {
  /** "@Label" — default, ideal for chat where LLMs read the text. */
  plainAt: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((({ label, id }) => `@${label || id}`), "plainAt"),
  /** "Label" — bare label, no @ prefix. */
  plainLabel: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((({ label, id }) => label || id), "plainLabel"),
  /** "[@Label](baseUrl/id)" — clickable markdown link. */
  markdownLink: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((baseUrl) => ({ label, id }) => `[@${escapeMd(label || id)}](${baseUrl}${encodeURIComponent(id)})`, "markdownLink"),
  /** "@[Label](scheme://kind/id)" — Notion / Linear-style custom URI. */
  customUri: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((scheme, kind) => ({ label, id }) => `@[${escapeMd(label || id)}](${scheme}://${kind}/${encodeURIComponent(id)})`, "customUri"),
  /** "<@id>" — Slack-style id-only reference (label dropped — receivers resolve it). */
  slackStyle: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((({ id }) => `<@${id}>`), "slackStyle"),
  /** Inline HTML span — for products that consume markdown with raw HTML allowed. */
  htmlSpan: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name((className = "mention") => ({ label, id }) => `<span class="${className}" data-mention-id="${encodeURIComponent(id)}">@${escapeMd(label || id)}</span>`, "htmlSpan")
};
function getMarkdown(editor) {
  const storage = editor.storage.markdown;
  if (!storage?.manager) return editor.getText();
  return storage.manager.serialize(editor.getJSON());
}
chunkWGEGR3DF_cjs.__name(getMarkdown, "getMarkdown");
function extractMentionIds(editor) {
  const ids = [];
  editor.state.doc.descendants((node) => {
    if (node.type.name === "mention" && node.attrs.id) {
      ids.push(node.attrs.id);
    }
  });
  return [...new Set(ids)];
}
chunkWGEGR3DF_cjs.__name(extractMentionIds, "extractMentionIds");
function MarkdownEditor({
  value,
  onChange,
  placeholder = "Write markdown...",
  minHeight = 120,
  className = "",
  disabled = false,
  showToolbar = true,
  mentions,
  onMentionIdsChange
}) {
  const isExternalUpdate = React.useRef(false);
  const initialMentionsDefinedRef = React.useRef(mentions !== void 0);
  const warnedRef = React.useRef(false);
  if (process.env.NODE_ENV !== "production" && !initialMentionsDefinedRef.current && mentions !== void 0 && !warnedRef.current) {
    warnedRef.current = true;
    console.warn(
      "[MarkdownEditor] `mentions` flipped from undefined to a config after mount. Tiptap only installs the Mention extension on first render \u2014 the @-popover will NOT work for this editor instance. Pass `{ items: [] }` from the very first render and mutate `.items` in place instead."
    );
  }
  const extensions = React.useMemo(() => {
    const exts = [
      StarterKit__default.default.configure({ heading: { levels: [1, 2, 3] } }),
      Placeholder__default.default.configure({ placeholder }),
      markdown.Markdown
    ];
    if (mentions) {
      const renderMarkdown = mentions.renderMarkdown ?? mentionPresets.plainAt;
      exts.push(
        Mention__default.default.extend({
          renderMarkdown(node) {
            const raw = node.attrs;
            const attrs = {
              id: raw?.id ?? "",
              label: raw?.label ?? ""
            };
            if (!attrs.id && !attrs.label) return "";
            return renderMarkdown(attrs);
          }
        }).configure({
          HTMLAttributes: { class: "markdown-mention" },
          suggestion: createMentionSuggestion(mentions),
          renderText: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(({ node }) => `@${node.attrs.label}`, "renderText")
        })
      );
    }
    return exts;
  }, [placeholder, mentions]);
  const editor = react.useEditor({
    immediatelyRender: false,
    editable: !disabled,
    extensions,
    content: value,
    onUpdate: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(({ editor: editor2 }) => {
      if (isExternalUpdate.current) return;
      onChange(getMarkdown(editor2));
      if (onMentionIdsChange) {
        onMentionIdsChange(extractMentionIds(editor2));
      }
    }, "onUpdate"),
    editorProps: {
      attributes: {
        class: "markdown-editor-content focus:outline-none text-sm",
        style: `min-height: ${minHeight}px`
      }
    }
  });
  React.useEffect(() => {
    if (!editor) return;
    const current = getMarkdown(editor);
    if (current !== value) {
      isExternalUpdate.current = true;
      editor.commands.setContent(value);
      isExternalUpdate.current = false;
    }
  }, [value, editor]);
  const wrapperClass = `markdown-editor rounded-md border border-input bg-background ${disabled ? "opacity-60" : ""} ${className}`.trim();
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: wrapperClass, children: [
    showToolbar && editor && /* @__PURE__ */ jsxRuntime.jsx(MarkdownToolbar, { editor }),
    /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(react.EditorContent, { editor }) })
  ] });
}
chunkWGEGR3DF_cjs.__name(MarkdownEditor, "MarkdownEditor");
function MarkdownToolbar({ editor }) {
  const items = React.useMemo(() => [
    { icon: lucideReact.Bold, title: "Bold", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleBold().run(), "action"), active: editor.isActive("bold") },
    { icon: lucideReact.Italic, title: "Italic", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleItalic().run(), "action"), active: editor.isActive("italic") },
    { icon: lucideReact.Strikethrough, title: "Strike", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleStrike().run(), "action"), active: editor.isActive("strike") },
    { icon: lucideReact.Code, title: "Code", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleCode().run(), "action"), active: editor.isActive("code") },
    null,
    { icon: lucideReact.Heading1, title: "H1", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleHeading({ level: 1 }).run(), "action"), active: editor.isActive("heading", { level: 1 }) },
    { icon: lucideReact.Heading2, title: "H2", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleHeading({ level: 2 }).run(), "action"), active: editor.isActive("heading", { level: 2 }) },
    { icon: lucideReact.Heading3, title: "H3", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleHeading({ level: 3 }).run(), "action"), active: editor.isActive("heading", { level: 3 }) },
    null,
    { icon: lucideReact.List, title: "Bullet list", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleBulletList().run(), "action"), active: editor.isActive("bulletList") },
    { icon: lucideReact.ListOrdered, title: "Ordered list", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleOrderedList().run(), "action"), active: editor.isActive("orderedList") },
    { icon: lucideReact.Quote, title: "Quote", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().toggleBlockquote().run(), "action"), active: editor.isActive("blockquote") },
    { icon: lucideReact.Minus, title: "Divider", action: /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => editor.chain().focus().setHorizontalRule().run(), "action"), active: false }
  ], [editor]);
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5 px-2 py-1.5 border-b border-border", children: items.map((item, i) => {
    if (!item) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-border mx-1" }, i);
    const Icon = item.icon;
    const btnClass = `markdown-toolbar-btn ${item.active ? "active" : ""}`;
    return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: item.action, title: item.title, className: btnClass, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { style: { width: 14, height: 14 } }) }, i);
  }) });
}
chunkWGEGR3DF_cjs.__name(MarkdownToolbar, "MarkdownToolbar");

Object.defineProperty(exports, "AudioReactiveCover", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.AudioReactiveCover; }
});
Object.defineProperty(exports, "COLOR_SCHEMES", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.COLOR_SCHEMES; }
});
Object.defineProperty(exports, "COLOR_SCHEME_INFO", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.COLOR_SCHEME_INFO; }
});
Object.defineProperty(exports, "EFFECT_ANIMATIONS", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.EFFECT_ANIMATIONS; }
});
Object.defineProperty(exports, "GlowEffect", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.GlowEffect; }
});
Object.defineProperty(exports, "HybridAudioPlayer", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.HybridAudioPlayer; }
});
Object.defineProperty(exports, "HybridAudioProvider", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.HybridAudioProvider; }
});
Object.defineProperty(exports, "HybridSimplePlayer", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.HybridSimplePlayer; }
});
Object.defineProperty(exports, "HybridWaveform", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.HybridWaveform; }
});
Object.defineProperty(exports, "INTENSITY_CONFIG", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.INTENSITY_CONFIG; }
});
Object.defineProperty(exports, "INTENSITY_INFO", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.INTENSITY_INFO; }
});
Object.defineProperty(exports, "MeshEffect", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.MeshEffect; }
});
Object.defineProperty(exports, "OrbsEffect", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.OrbsEffect; }
});
Object.defineProperty(exports, "SpotlightEffect", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.SpotlightEffect; }
});
Object.defineProperty(exports, "VARIANT_INFO", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.VARIANT_INFO; }
});
Object.defineProperty(exports, "VisualizationProvider", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.VisualizationProvider; }
});
Object.defineProperty(exports, "calculateGlowLayers", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.calculateGlowLayers; }
});
Object.defineProperty(exports, "calculateMeshGradients", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.calculateMeshGradients; }
});
Object.defineProperty(exports, "calculateOrbs", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.calculateOrbs; }
});
Object.defineProperty(exports, "calculateSpotlight", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.calculateSpotlight; }
});
Object.defineProperty(exports, "formatTime", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.formatTime; }
});
Object.defineProperty(exports, "getColors", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.getColors; }
});
Object.defineProperty(exports, "getEffectConfig", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.getEffectConfig; }
});
Object.defineProperty(exports, "prepareEffectColors", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.prepareEffectColors; }
});
Object.defineProperty(exports, "useAudioBus", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useAudioBus; }
});
Object.defineProperty(exports, "useAudioBusStore", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useAudioBusStore; }
});
Object.defineProperty(exports, "useAudioVisualization", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useAudioVisualization; }
});
Object.defineProperty(exports, "useHybridAudio", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useHybridAudio; }
});
Object.defineProperty(exports, "useHybridAudioAnalysis", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useHybridAudioAnalysis; }
});
Object.defineProperty(exports, "useHybridAudioContext", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useHybridAudioContext; }
});
Object.defineProperty(exports, "useHybridAudioControls", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useHybridAudioControls; }
});
Object.defineProperty(exports, "useHybridAudioLevels", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useHybridAudioLevels; }
});
Object.defineProperty(exports, "useHybridAudioState", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useHybridAudioState; }
});
Object.defineProperty(exports, "useHybridWebAudio", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useHybridWebAudio; }
});
Object.defineProperty(exports, "useVisualization", {
  enumerable: true,
  get: function () { return chunkYZX6FH3H_cjs.useVisualization; }
});
Object.defineProperty(exports, "NativeProvider", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.NativeProvider; }
});
Object.defineProperty(exports, "StreamProvider", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.StreamProvider; }
});
Object.defineProperty(exports, "VideoControls", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.VideoControls; }
});
Object.defineProperty(exports, "VideoErrorFallback", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.VideoErrorFallback; }
});
Object.defineProperty(exports, "VideoPlayer", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.VideoPlayer; }
});
Object.defineProperty(exports, "VideoPlayerProvider", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.VideoPlayerProvider; }
});
Object.defineProperty(exports, "VidstackProvider", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.VidstackProvider; }
});
Object.defineProperty(exports, "createVideoErrorFallback", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.createVideoErrorFallback; }
});
Object.defineProperty(exports, "isSimpleStreamSource", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.isSimpleStreamSource; }
});
Object.defineProperty(exports, "resolveFileSource", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.resolveFileSource; }
});
Object.defineProperty(exports, "resolvePlayerMode", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.resolvePlayerMode; }
});
Object.defineProperty(exports, "resolveStreamSource", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.resolveStreamSource; }
});
Object.defineProperty(exports, "useVideoPlayerContext", {
  enumerable: true,
  get: function () { return chunkCXVGN6ZW_cjs.useVideoPlayerContext; }
});
Object.defineProperty(exports, "ImageViewer", {
  enumerable: true,
  get: function () { return chunkIHAY6FO6_cjs.ImageViewer; }
});
Object.defineProperty(exports, "generateContentKey", {
  enumerable: true,
  get: function () { return chunk77HQWEQ6_cjs.generateContentKey; }
});
Object.defineProperty(exports, "useAudioCache", {
  enumerable: true,
  get: function () { return chunk77HQWEQ6_cjs.useAudioCache; }
});
Object.defineProperty(exports, "useBlobUrlCleanup", {
  enumerable: true,
  get: function () { return chunk77HQWEQ6_cjs.useBlobUrlCleanup; }
});
Object.defineProperty(exports, "useImageCache", {
  enumerable: true,
  get: function () { return chunk77HQWEQ6_cjs.useImageCache; }
});
Object.defineProperty(exports, "useMediaCacheStore", {
  enumerable: true,
  get: function () { return chunk77HQWEQ6_cjs.useMediaCacheStore; }
});
Object.defineProperty(exports, "useVideoCache", {
  enumerable: true,
  get: function () { return chunk77HQWEQ6_cjs.useVideoCache; }
});
Object.defineProperty(exports, "useVideoPlayerSettings", {
  enumerable: true,
  get: function () { return chunk77HQWEQ6_cjs.useVideoPlayerSettings; }
});
Object.defineProperty(exports, "CronSchedulerProvider", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.CronSchedulerProvider; }
});
Object.defineProperty(exports, "CustomInput", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.CustomInput; }
});
Object.defineProperty(exports, "DayChips", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.DayChips; }
});
Object.defineProperty(exports, "MonthDayGrid", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.MonthDayGrid; }
});
Object.defineProperty(exports, "SchedulePreview", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.SchedulePreview; }
});
Object.defineProperty(exports, "ScheduleTypeSelector", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.ScheduleTypeSelector; }
});
Object.defineProperty(exports, "TimeSelector", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.TimeSelector; }
});
Object.defineProperty(exports, "buildCron", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.buildCron; }
});
Object.defineProperty(exports, "humanizeCron", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.humanizeCron; }
});
Object.defineProperty(exports, "isValidCron", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.isValidCron; }
});
Object.defineProperty(exports, "parseCron", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.parseCron; }
});
Object.defineProperty(exports, "useCronCustom", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronCustom; }
});
Object.defineProperty(exports, "useCronMonthDays", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronMonthDays; }
});
Object.defineProperty(exports, "useCronPreview", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronPreview; }
});
Object.defineProperty(exports, "useCronScheduler", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronScheduler; }
});
Object.defineProperty(exports, "useCronSchedulerContext", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronSchedulerContext; }
});
Object.defineProperty(exports, "useCronTime", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronTime; }
});
Object.defineProperty(exports, "useCronType", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronType; }
});
Object.defineProperty(exports, "useCronWeekDays", {
  enumerable: true,
  get: function () { return chunkF2CMIIOH_cjs.useCronWeekDays; }
});
Object.defineProperty(exports, "MarkdownMessage", {
  enumerable: true,
  get: function () { return chunkFYLR232K_cjs.MarkdownMessage; }
});
Object.defineProperty(exports, "Mermaid", {
  enumerable: true,
  get: function () { return chunkFYLR232K_cjs.Mermaid_default; }
});
Object.defineProperty(exports, "PrettyCode", {
  enumerable: true,
  get: function () { return chunkFYLR232K_cjs.PrettyCode_default; }
});
Object.defineProperty(exports, "extractTextFromChildren", {
  enumerable: true,
  get: function () { return chunkFYLR232K_cjs.extractTextFromChildren; }
});
Object.defineProperty(exports, "useCollapsibleContent", {
  enumerable: true,
  get: function () { return chunkFYLR232K_cjs.useCollapsibleContent; }
});
Object.defineProperty(exports, "JsonTree", {
  enumerable: true,
  get: function () { return chunk33AMWFBZ_cjs.JsonTree_default; }
});
Object.defineProperty(exports, "ArrayFieldItemTemplate", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.ArrayFieldItemTemplate; }
});
Object.defineProperty(exports, "ArrayFieldTemplate", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.ArrayFieldTemplate; }
});
Object.defineProperty(exports, "BaseInputTemplate", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.BaseInputTemplate; }
});
Object.defineProperty(exports, "CheckboxWidget", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.CheckboxWidget; }
});
Object.defineProperty(exports, "ColorWidget", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.ColorWidget; }
});
Object.defineProperty(exports, "ErrorListTemplate", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.ErrorListTemplate; }
});
Object.defineProperty(exports, "FieldTemplate", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.FieldTemplate; }
});
Object.defineProperty(exports, "JsonSchemaForm", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.JsonSchemaForm; }
});
Object.defineProperty(exports, "NumberWidget", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.NumberWidget; }
});
Object.defineProperty(exports, "ObjectFieldTemplate", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.ObjectFieldTemplate; }
});
Object.defineProperty(exports, "SelectWidget", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.SelectWidget; }
});
Object.defineProperty(exports, "SliderWidget", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.SliderWidget; }
});
Object.defineProperty(exports, "SwitchWidget", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.SwitchWidget; }
});
Object.defineProperty(exports, "TextWidget", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.TextWidget; }
});
Object.defineProperty(exports, "getRequiredFields", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.getRequiredFields; }
});
Object.defineProperty(exports, "hasRequiredFields", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.hasRequiredFields; }
});
Object.defineProperty(exports, "mergeDefaults", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.mergeDefaults; }
});
Object.defineProperty(exports, "normalizeFormData", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.normalizeFormData; }
});
Object.defineProperty(exports, "safeJsonParse", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.safeJsonParse; }
});
Object.defineProperty(exports, "safeJsonStringify", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.safeJsonStringify; }
});
Object.defineProperty(exports, "validateRequiredFields", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.validateRequiredFields; }
});
Object.defineProperty(exports, "validateSchema", {
  enumerable: true,
  get: function () { return chunkL37FZYJU_cjs.validateSchema; }
});
Object.defineProperty(exports, "useLottie", {
  enumerable: true,
  get: function () { return chunkPRPG2T2E_cjs.useLottie; }
});
exports.CardLoadingFallback = CardLoadingFallback;
exports.CronScheduler = CronScheduler;
exports.DiffEditor = DiffEditor;
exports.Editor = Editor;
exports.EditorProvider = EditorProvider;
exports.LazyCronScheduler = LazyCronScheduler;
exports.LazyHybridAudioPlayer = LazyHybridAudioPlayer;
exports.LazyHybridCompactPlayer = LazyHybridCompactPlayer;
exports.LazyHybridSimplePlayer = LazyHybridSimplePlayer;
exports.LazyImageViewer = LazyImageViewer;
exports.LazyJsonSchemaForm = LazyJsonSchemaForm;
exports.LazyJsonTree = LazyJsonTree;
exports.LazyLottiePlayer = LazyLottiePlayer;
exports.LazyMapContainer = LazyMapContainer;
exports.LazyMapView = LazyMapView;
exports.LazyMermaid = LazyMermaid;
exports.LazyOpenapiViewer = LazyOpenapiViewer;
exports.LazyPrettyCode = LazyPrettyCode;
exports.LazyVideoPlayer = LazyVideoPlayer;
exports.LazyWrapper = LazyWrapper;
exports.LoadingFallback = LoadingFallback;
exports.LottiePlayer = LottiePlayer;
exports.MapLoadingFallback = MapLoadingFallback;
exports.MarkdownEditor = MarkdownEditor;
exports.OpenapiViewer = OpenapiViewer_default;
exports.Spinner = Spinner;
exports.createLazyComponent = createLazyComponent;
exports.mentionPresets = mentionPresets;
exports.useEditor = useEditor;
exports.useEditorContext = useEditorContext;
exports.useLanguage = useLanguage;
exports.useMonaco = useMonaco;
//# sourceMappingURL=index.cjs.map
//# sourceMappingURL=index.cjs.map