@almadar/ui 5.67.0 → 5.68.0

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/avl/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React93 from 'react';
3
- import React93__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
2
+ import * as React94 from 'react';
3
+ import React94__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
4
4
  import { OrbitalProvider, EventBusContext, useTraitScope, VerificationProvider, TraitScopeProvider } from '@almadar/ui/providers';
5
5
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
@@ -3519,7 +3519,7 @@ var init_Box = __esm({
3519
3519
  fixed: "fixed",
3520
3520
  sticky: "sticky"
3521
3521
  };
3522
- Box = React93__default.forwardRef(
3522
+ Box = React94__default.forwardRef(
3523
3523
  ({
3524
3524
  padding,
3525
3525
  paddingX,
@@ -3584,7 +3584,7 @@ var init_Box = __esm({
3584
3584
  onPointerDown?.(e);
3585
3585
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3586
3586
  const isClickable = action || onClick;
3587
- return React93__default.createElement(
3587
+ return React94__default.createElement(
3588
3588
  Component2,
3589
3589
  {
3590
3590
  ref,
@@ -4175,7 +4175,7 @@ var init_MiniStateMachine = __esm({
4175
4175
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
4176
4176
  const tc = transitionCounts[s.name] ?? 0;
4177
4177
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
4178
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
4178
+ return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
4179
4179
  /* @__PURE__ */ jsx(
4180
4180
  AvlState,
4181
4181
  {
@@ -4550,7 +4550,7 @@ function loadLib(key, importer) {
4550
4550
  return p2;
4551
4551
  }
4552
4552
  function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
4553
- const Lazy = React93__default.lazy(async () => {
4553
+ const Lazy = React94__default.lazy(async () => {
4554
4554
  const lib = await loadLib(libKey, importer);
4555
4555
  const Comp = pick(lib);
4556
4556
  if (!Comp) {
@@ -4560,7 +4560,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
4560
4560
  return { default: Comp };
4561
4561
  });
4562
4562
  const Wrapped = (props) => /* @__PURE__ */ jsx(
4563
- React93__default.Suspense,
4563
+ React94__default.Suspense,
4564
4564
  {
4565
4565
  fallback: /* @__PURE__ */ jsx(
4566
4566
  "span",
@@ -5286,7 +5286,7 @@ var init_Icon = __esm({
5286
5286
  const directIcon = typeof icon === "string" ? void 0 : icon;
5287
5287
  const effectiveName = typeof icon === "string" ? icon : name;
5288
5288
  const family = useIconFamily();
5289
- const RenderedComponent = React93__default.useMemo(() => {
5289
+ const RenderedComponent = React94__default.useMemo(() => {
5290
5290
  if (directIcon) return null;
5291
5291
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
5292
5292
  }, [directIcon, effectiveName, family]);
@@ -5345,7 +5345,7 @@ function resolveIconProp(value, sizeClass) {
5345
5345
  const IconComp = value;
5346
5346
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
5347
5347
  }
5348
- if (React93__default.isValidElement(value)) {
5348
+ if (React94__default.isValidElement(value)) {
5349
5349
  return value;
5350
5350
  }
5351
5351
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -5421,7 +5421,7 @@ var init_Button = __esm({
5421
5421
  md: "h-icon-default w-icon-default",
5422
5422
  lg: "h-icon-default w-icon-default"
5423
5423
  };
5424
- Button = React93__default.forwardRef(
5424
+ Button = React94__default.forwardRef(
5425
5425
  ({
5426
5426
  className,
5427
5427
  variant = "primary",
@@ -5486,7 +5486,7 @@ var Dialog;
5486
5486
  var init_Dialog = __esm({
5487
5487
  "components/core/atoms/Dialog.tsx"() {
5488
5488
  init_cn();
5489
- Dialog = React93__default.forwardRef(
5489
+ Dialog = React94__default.forwardRef(
5490
5490
  ({
5491
5491
  role = "dialog",
5492
5492
  "aria-modal": ariaModal = true,
@@ -5981,7 +5981,7 @@ var init_Badge = __esm({
5981
5981
  md: "px-2.5 py-1 text-sm",
5982
5982
  lg: "px-3 py-1.5 text-base"
5983
5983
  };
5984
- Badge = React93__default.forwardRef(
5984
+ Badge = React94__default.forwardRef(
5985
5985
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
5986
5986
  const iconSizes3 = {
5987
5987
  sm: "h-icon-default w-icon-default",
@@ -6317,7 +6317,7 @@ var init_SvgFlow = __esm({
6317
6317
  width = 100,
6318
6318
  height = 100
6319
6319
  }) => {
6320
- const markerId = React93__default.useMemo(() => {
6320
+ const markerId = React94__default.useMemo(() => {
6321
6321
  flowIdCounter += 1;
6322
6322
  return `almadar-flow-arrow-${flowIdCounter}`;
6323
6323
  }, []);
@@ -6910,7 +6910,7 @@ var init_SvgRing = __esm({
6910
6910
  width = 100,
6911
6911
  height = 100
6912
6912
  }) => {
6913
- const gradientId = React93__default.useMemo(() => {
6913
+ const gradientId = React94__default.useMemo(() => {
6914
6914
  ringIdCounter += 1;
6915
6915
  return `almadar-ring-glow-${ringIdCounter}`;
6916
6916
  }, []);
@@ -7091,7 +7091,7 @@ var init_Input = __esm({
7091
7091
  init_cn();
7092
7092
  init_Icon();
7093
7093
  init_useEventBus();
7094
- Input = React93__default.forwardRef(
7094
+ Input = React94__default.forwardRef(
7095
7095
  ({
7096
7096
  className,
7097
7097
  inputType,
@@ -7251,7 +7251,7 @@ var Label;
7251
7251
  var init_Label = __esm({
7252
7252
  "components/core/atoms/Label.tsx"() {
7253
7253
  init_cn();
7254
- Label = React93__default.forwardRef(
7254
+ Label = React94__default.forwardRef(
7255
7255
  ({ className, required, children, ...props }, ref) => {
7256
7256
  return /* @__PURE__ */ jsxs(
7257
7257
  "label",
@@ -7278,7 +7278,7 @@ var init_Textarea = __esm({
7278
7278
  "components/core/atoms/Textarea.tsx"() {
7279
7279
  init_cn();
7280
7280
  init_useEventBus();
7281
- Textarea = React93__default.forwardRef(
7281
+ Textarea = React94__default.forwardRef(
7282
7282
  ({ className, error, onChange, ...props }, ref) => {
7283
7283
  const eventBus = useEventBus();
7284
7284
  const handleChange = (e) => {
@@ -7517,7 +7517,7 @@ var init_Select = __esm({
7517
7517
  init_cn();
7518
7518
  init_Icon();
7519
7519
  init_useEventBus();
7520
- Select = React93__default.forwardRef(
7520
+ Select = React94__default.forwardRef(
7521
7521
  (props, _ref) => {
7522
7522
  const { multiple, searchable, clearable } = props;
7523
7523
  if (multiple || searchable || clearable) {
@@ -7534,7 +7534,7 @@ var init_Checkbox = __esm({
7534
7534
  "components/core/atoms/Checkbox.tsx"() {
7535
7535
  init_cn();
7536
7536
  init_useEventBus();
7537
- Checkbox = React93__default.forwardRef(
7537
+ Checkbox = React94__default.forwardRef(
7538
7538
  ({ className, label, id, onChange, ...props }, ref) => {
7539
7539
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
7540
7540
  const eventBus = useEventBus();
@@ -7588,7 +7588,7 @@ var init_Spinner = __esm({
7588
7588
  md: "h-6 w-6",
7589
7589
  lg: "h-8 w-8"
7590
7590
  };
7591
- Spinner = React93__default.forwardRef(
7591
+ Spinner = React94__default.forwardRef(
7592
7592
  ({ className, size = "md", overlay, ...props }, ref) => {
7593
7593
  if (overlay) {
7594
7594
  return /* @__PURE__ */ jsx(
@@ -7678,7 +7678,7 @@ var init_Card = __esm({
7678
7678
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
7679
7679
  "tile-image-first": "p-0 overflow-hidden"
7680
7680
  };
7681
- Card = React93__default.forwardRef(
7681
+ Card = React94__default.forwardRef(
7682
7682
  ({
7683
7683
  className,
7684
7684
  variant = "bordered",
@@ -7726,9 +7726,9 @@ var init_Card = __esm({
7726
7726
  }
7727
7727
  );
7728
7728
  Card.displayName = "Card";
7729
- CardHeader = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7729
+ CardHeader = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7730
7730
  CardHeader.displayName = "CardHeader";
7731
- CardTitle = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7731
+ CardTitle = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7732
7732
  "h3",
7733
7733
  {
7734
7734
  ref,
@@ -7741,11 +7741,11 @@ var init_Card = __esm({
7741
7741
  }
7742
7742
  ));
7743
7743
  CardTitle.displayName = "CardTitle";
7744
- CardContent = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7744
+ CardContent = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7745
7745
  CardContent.displayName = "CardContent";
7746
7746
  CardBody = CardContent;
7747
7747
  CardBody.displayName = "CardBody";
7748
- CardFooter = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7748
+ CardFooter = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7749
7749
  "div",
7750
7750
  {
7751
7751
  ref,
@@ -7800,7 +7800,7 @@ var init_FilterPill = __esm({
7800
7800
  md: "w-3.5 h-3.5",
7801
7801
  lg: "w-4 h-4"
7802
7802
  };
7803
- FilterPill = React93__default.forwardRef(
7803
+ FilterPill = React94__default.forwardRef(
7804
7804
  ({
7805
7805
  className,
7806
7806
  variant = "default",
@@ -7929,8 +7929,8 @@ var init_Avatar = __esm({
7929
7929
  actionPayload
7930
7930
  }) => {
7931
7931
  const eventBus = useEventBus();
7932
- const [imgFailed, setImgFailed] = React93__default.useState(false);
7933
- React93__default.useEffect(() => {
7932
+ const [imgFailed, setImgFailed] = React94__default.useState(false);
7933
+ React94__default.useEffect(() => {
7934
7934
  setImgFailed(false);
7935
7935
  }, [src]);
7936
7936
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -8315,7 +8315,7 @@ var init_Radio = __esm({
8315
8315
  md: "w-2.5 h-2.5",
8316
8316
  lg: "w-3 h-3"
8317
8317
  };
8318
- Radio = React93__default.forwardRef(
8318
+ Radio = React94__default.forwardRef(
8319
8319
  ({
8320
8320
  label,
8321
8321
  helperText,
@@ -8332,12 +8332,12 @@ var init_Radio = __esm({
8332
8332
  onChange,
8333
8333
  ...props
8334
8334
  }, ref) => {
8335
- const reactId = React93__default.useId();
8335
+ const reactId = React94__default.useId();
8336
8336
  const baseId = id || `radio-${reactId}`;
8337
8337
  const hasError = !!error;
8338
8338
  const eventBus = useEventBus();
8339
- const [selected, setSelected] = React93__default.useState(value);
8340
- React93__default.useEffect(() => {
8339
+ const [selected, setSelected] = React94__default.useState(value);
8340
+ React94__default.useEffect(() => {
8341
8341
  if (value !== void 0) setSelected(value);
8342
8342
  }, [value]);
8343
8343
  const pick = (next, e) => {
@@ -8519,7 +8519,7 @@ var init_Switch = __esm({
8519
8519
  "components/core/atoms/Switch.tsx"() {
8520
8520
  "use client";
8521
8521
  init_cn();
8522
- Switch = React93.forwardRef(
8522
+ Switch = React94.forwardRef(
8523
8523
  ({
8524
8524
  checked,
8525
8525
  defaultChecked = false,
@@ -8530,10 +8530,10 @@ var init_Switch = __esm({
8530
8530
  name,
8531
8531
  className
8532
8532
  }, ref) => {
8533
- const [isChecked, setIsChecked] = React93.useState(
8533
+ const [isChecked, setIsChecked] = React94.useState(
8534
8534
  checked !== void 0 ? checked : defaultChecked
8535
8535
  );
8536
- React93.useEffect(() => {
8536
+ React94.useEffect(() => {
8537
8537
  if (checked !== void 0) {
8538
8538
  setIsChecked(checked);
8539
8539
  }
@@ -8807,7 +8807,7 @@ var Aside;
8807
8807
  var init_Aside = __esm({
8808
8808
  "components/core/atoms/Aside.tsx"() {
8809
8809
  init_cn();
8810
- Aside = React93__default.forwardRef(
8810
+ Aside = React94__default.forwardRef(
8811
8811
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
8812
8812
  );
8813
8813
  Aside.displayName = "Aside";
@@ -8886,9 +8886,9 @@ var init_LawReferenceTooltip = __esm({
8886
8886
  className
8887
8887
  }) => {
8888
8888
  const { t } = useTranslate();
8889
- const [isVisible, setIsVisible] = React93__default.useState(false);
8890
- const timeoutRef = React93__default.useRef(null);
8891
- const triggerRef = React93__default.useRef(null);
8889
+ const [isVisible, setIsVisible] = React94__default.useState(false);
8890
+ const timeoutRef = React94__default.useRef(null);
8891
+ const triggerRef = React94__default.useRef(null);
8892
8892
  const handleMouseEnter = () => {
8893
8893
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8894
8894
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -8899,7 +8899,7 @@ var init_LawReferenceTooltip = __esm({
8899
8899
  };
8900
8900
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
8901
8901
  const open = isVisible || revealed;
8902
- React93__default.useEffect(() => {
8902
+ React94__default.useEffect(() => {
8903
8903
  return () => {
8904
8904
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8905
8905
  };
@@ -9111,7 +9111,7 @@ var init_StatusDot = __esm({
9111
9111
  md: "w-2.5 h-2.5",
9112
9112
  lg: "w-3 h-3"
9113
9113
  };
9114
- StatusDot = React93__default.forwardRef(
9114
+ StatusDot = React94__default.forwardRef(
9115
9115
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
9116
9116
  return /* @__PURE__ */ jsx(
9117
9117
  "span",
@@ -9165,7 +9165,7 @@ var init_TrendIndicator = __esm({
9165
9165
  down: "trending-down",
9166
9166
  flat: "arrow-right"
9167
9167
  };
9168
- TrendIndicator = React93__default.forwardRef(
9168
+ TrendIndicator = React94__default.forwardRef(
9169
9169
  ({
9170
9170
  className,
9171
9171
  value,
@@ -9232,7 +9232,7 @@ var init_RangeSlider = __esm({
9232
9232
  md: "w-4 h-4",
9233
9233
  lg: "w-5 h-5"
9234
9234
  };
9235
- RangeSlider = React93__default.forwardRef(
9235
+ RangeSlider = React94__default.forwardRef(
9236
9236
  ({
9237
9237
  className,
9238
9238
  min = 0,
@@ -9740,7 +9740,7 @@ var init_ContentSection = __esm({
9740
9740
  md: "py-16",
9741
9741
  lg: "py-24"
9742
9742
  };
9743
- ContentSection = React93__default.forwardRef(
9743
+ ContentSection = React94__default.forwardRef(
9744
9744
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
9745
9745
  return /* @__PURE__ */ jsx(
9746
9746
  Box,
@@ -10274,7 +10274,7 @@ var init_AnimatedReveal = __esm({
10274
10274
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
10275
10275
  "none": {}
10276
10276
  };
10277
- AnimatedReveal = React93__default.forwardRef(
10277
+ AnimatedReveal = React94__default.forwardRef(
10278
10278
  ({
10279
10279
  trigger = "scroll",
10280
10280
  animation = "fade-up",
@@ -10434,7 +10434,7 @@ var init_AnimatedGraphic = __esm({
10434
10434
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
10435
10435
  "use client";
10436
10436
  init_cn();
10437
- AnimatedGraphic = React93__default.forwardRef(
10437
+ AnimatedGraphic = React94__default.forwardRef(
10438
10438
  ({
10439
10439
  src,
10440
10440
  svgContent,
@@ -10457,7 +10457,7 @@ var init_AnimatedGraphic = __esm({
10457
10457
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
10458
10458
  const resolvedSvg = svgContent ?? fetchedSvg;
10459
10459
  const prevAnimateRef = useRef(animate);
10460
- const setRef = React93__default.useCallback(
10460
+ const setRef = React94__default.useCallback(
10461
10461
  (node) => {
10462
10462
  containerRef.current = node;
10463
10463
  if (typeof ref === "function") ref(node);
@@ -10683,9 +10683,9 @@ function ScoreDisplay({
10683
10683
  ...rest
10684
10684
  }) {
10685
10685
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
10686
- const [displayValue, setDisplayValue] = React93.useState(resolvedValue);
10687
- const [isAnimating, setIsAnimating] = React93.useState(false);
10688
- React93.useEffect(() => {
10686
+ const [displayValue, setDisplayValue] = React94.useState(resolvedValue);
10687
+ const [isAnimating, setIsAnimating] = React94.useState(false);
10688
+ React94.useEffect(() => {
10689
10689
  if (!animated || displayValue === resolvedValue) {
10690
10690
  setDisplayValue(resolvedValue);
10691
10691
  return;
@@ -10768,9 +10768,9 @@ function ControlButton({
10768
10768
  className
10769
10769
  }) {
10770
10770
  const eventBus = useEventBus();
10771
- const [isPressed, setIsPressed] = React93.useState(false);
10771
+ const [isPressed, setIsPressed] = React94.useState(false);
10772
10772
  const actualPressed = pressed ?? isPressed;
10773
- const handlePointerDown = React93.useCallback(
10773
+ const handlePointerDown = React94.useCallback(
10774
10774
  (e) => {
10775
10775
  e.preventDefault();
10776
10776
  if (disabled) return;
@@ -10780,7 +10780,7 @@ function ControlButton({
10780
10780
  },
10781
10781
  [disabled, pressEvent, eventBus, onPress]
10782
10782
  );
10783
- const handlePointerUp = React93.useCallback(
10783
+ const handlePointerUp = React94.useCallback(
10784
10784
  (e) => {
10785
10785
  e.preventDefault();
10786
10786
  if (disabled) return;
@@ -10790,7 +10790,7 @@ function ControlButton({
10790
10790
  },
10791
10791
  [disabled, releaseEvent, eventBus, onRelease]
10792
10792
  );
10793
- const handlePointerLeave = React93.useCallback(
10793
+ const handlePointerLeave = React94.useCallback(
10794
10794
  (e) => {
10795
10795
  if (isPressed) {
10796
10796
  setIsPressed(false);
@@ -11411,8 +11411,8 @@ function XPBar({
11411
11411
  }) {
11412
11412
  const sizes = sizeMap9[size];
11413
11413
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
11414
- const [fillWidth, setFillWidth] = React93.useState(animated ? 0 : percentage);
11415
- React93.useEffect(() => {
11414
+ const [fillWidth, setFillWidth] = React94.useState(animated ? 0 : percentage);
11415
+ React94.useEffect(() => {
11416
11416
  if (!animated) {
11417
11417
  setFillWidth(percentage);
11418
11418
  return;
@@ -11920,9 +11920,9 @@ function MiniMap({
11920
11920
  viewportRect = DEFAULT_VIEWPORT,
11921
11921
  className
11922
11922
  }) {
11923
- const canvasRef = React93.useRef(null);
11924
- const frameRef = React93.useRef(0);
11925
- React93.useEffect(() => {
11923
+ const canvasRef = React94.useRef(null);
11924
+ const frameRef = React94.useRef(0);
11925
+ React94.useEffect(() => {
11926
11926
  const canvas = canvasRef.current;
11927
11927
  if (!canvas) return;
11928
11928
  const ctx = canvas.getContext("2d");
@@ -12111,7 +12111,7 @@ var init_ErrorBoundary = __esm({
12111
12111
  }
12112
12112
  );
12113
12113
  };
12114
- ErrorBoundary = class extends React93__default.Component {
12114
+ ErrorBoundary = class extends React94__default.Component {
12115
12115
  constructor(props) {
12116
12116
  super(props);
12117
12117
  __publicField(this, "reset", () => {
@@ -13146,8 +13146,8 @@ function ActionButtons({
13146
13146
  disabled
13147
13147
  }) {
13148
13148
  const eventBus = useEventBus();
13149
- const [activeButtons, setActiveButtons] = React93.useState(/* @__PURE__ */ new Set());
13150
- const handlePress = React93.useCallback(
13149
+ const [activeButtons, setActiveButtons] = React94.useState(/* @__PURE__ */ new Set());
13150
+ const handlePress = React94.useCallback(
13151
13151
  (id) => {
13152
13152
  setActiveButtons((prev) => new Set(prev).add(id));
13153
13153
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -13155,7 +13155,7 @@ function ActionButtons({
13155
13155
  },
13156
13156
  [actionEvent, eventBus, onAction]
13157
13157
  );
13158
- const handleRelease = React93.useCallback(
13158
+ const handleRelease = React94.useCallback(
13159
13159
  (id) => {
13160
13160
  setActiveButtons((prev) => {
13161
13161
  const next = new Set(prev);
@@ -14704,6 +14704,11 @@ function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
14704
14704
  const screenY2 = tileY * (scaledFloorHeight * 0.75);
14705
14705
  return { x: screenX2, y: screenY2 };
14706
14706
  }
14707
+ if (layout === "flat") {
14708
+ const screenX2 = tileX * scaledTileWidth + baseOffsetX;
14709
+ const screenY2 = tileY * scaledFloorHeight;
14710
+ return { x: screenX2, y: screenY2 };
14711
+ }
14707
14712
  const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
14708
14713
  const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
14709
14714
  return { x: screenX, y: screenY };
@@ -14716,6 +14721,11 @@ function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric")
14716
14721
  const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
14717
14722
  return { x: col, y: row };
14718
14723
  }
14724
+ if (layout === "flat") {
14725
+ const col = Math.round((screenX - baseOffsetX) / scaledTileWidth);
14726
+ const row = Math.round(screenY / scaledFloorHeight);
14727
+ return { x: col, y: row };
14728
+ }
14719
14729
  const adjustedX = screenX - baseOffsetX;
14720
14730
  const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
14721
14731
  const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
@@ -14835,7 +14845,7 @@ function IsometricCanvas({
14835
14845
  );
14836
14846
  const sortedTiles = useMemo(() => {
14837
14847
  const tiles = [...tilesProp];
14838
- if (tileLayout === "hex") {
14848
+ if (tileLayout === "hex" || tileLayout === "flat") {
14839
14849
  tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
14840
14850
  } else {
14841
14851
  tiles.sort((a, b) => {
@@ -14963,7 +14973,7 @@ function IsometricCanvas({
14963
14973
  const minX = Math.min(...allScreenPos.map((p2) => p2.x));
14964
14974
  const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
14965
14975
  const minY = Math.min(...allScreenPos.map((p2) => p2.y));
14966
- const tileBottomExtent = tileLayout === "hex" ? scaledTileWidth : scaledTileHeight;
14976
+ const tileBottomExtent = tileLayout === "hex" || tileLayout === "flat" ? scaledTileWidth : scaledTileHeight;
14967
14977
  const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
14968
14978
  const worldW = maxX - minX;
14969
14979
  const worldH = maxY - minY;
@@ -15056,7 +15066,7 @@ function IsometricCanvas({
15056
15066
  const drawW = scaledTileWidth;
15057
15067
  const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
15058
15068
  const drawX = pos.x;
15059
- const drawY = tileLayout === "hex" ? pos.y : pos.y + scaledTileHeight - drawH;
15069
+ const drawY = tileLayout === "hex" || tileLayout === "flat" ? pos.y : pos.y + scaledTileHeight - drawH;
15060
15070
  ctx.drawImage(img, drawX, drawY, drawW, drawH);
15061
15071
  }
15062
15072
  } else {
@@ -15123,7 +15133,7 @@ function IsometricCanvas({
15123
15133
  }
15124
15134
  }
15125
15135
  const sortedFeatures = [...features].sort((a, b) => {
15126
- if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
15136
+ if (tileLayout === "hex" || tileLayout === "flat") return a.y !== b.y ? a.y - b.y : a.x - b.x;
15127
15137
  const depthA = a.x + a.y;
15128
15138
  const depthB = b.x + b.y;
15129
15139
  return depthA !== depthB ? depthA - depthB : a.y - b.y;
@@ -15164,7 +15174,7 @@ function IsometricCanvas({
15164
15174
  }
15165
15175
  const unitsWithPosition = units.filter((u) => !!u.position);
15166
15176
  const sortedUnits = [...unitsWithPosition].sort((a, b) => {
15167
- if (tileLayout === "hex") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
15177
+ if (tileLayout === "hex" || tileLayout === "flat") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
15168
15178
  const depthA = a.position.x + a.position.y;
15169
15179
  const depthB = b.position.x + b.position.y;
15170
15180
  return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
@@ -16510,7 +16520,7 @@ var init_CodeBlock = __esm({
16510
16520
  };
16511
16521
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
16512
16522
  HIDDEN_LINE_NUMBERS = { display: "none" };
16513
- CodeBlock = React93__default.memo(
16523
+ CodeBlock = React94__default.memo(
16514
16524
  ({
16515
16525
  code: rawCode,
16516
16526
  language = "text",
@@ -17097,7 +17107,7 @@ var init_MarkdownContent = __esm({
17097
17107
  init_Box();
17098
17108
  init_CodeBlock();
17099
17109
  init_cn();
17100
- MarkdownContent = React93__default.memo(
17110
+ MarkdownContent = React94__default.memo(
17101
17111
  ({ content, direction = "ltr", className }) => {
17102
17112
  const { t: _t } = useTranslate();
17103
17113
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -17387,6 +17397,48 @@ var init_BloomQuizBlock = __esm({
17387
17397
  BloomQuizBlock.displayName = "BloomQuizBlock";
17388
17398
  }
17389
17399
  });
17400
+ function BoardgameBoard({
17401
+ tiles,
17402
+ units,
17403
+ features,
17404
+ assetManifest,
17405
+ assetBaseUrl,
17406
+ scale = 0.45,
17407
+ showMinimap = false,
17408
+ enableCamera = true,
17409
+ tileClickEvent,
17410
+ unitClickEvent,
17411
+ isLoading,
17412
+ error,
17413
+ className
17414
+ }) {
17415
+ return /* @__PURE__ */ jsx("div", { className: cn("boardgame-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
17416
+ IsometricCanvas_default,
17417
+ {
17418
+ tileLayout: "flat",
17419
+ tiles,
17420
+ units,
17421
+ features,
17422
+ assetManifest,
17423
+ assetBaseUrl,
17424
+ scale,
17425
+ showMinimap,
17426
+ enableCamera,
17427
+ tileClickEvent,
17428
+ unitClickEvent,
17429
+ isLoading,
17430
+ error
17431
+ }
17432
+ ) });
17433
+ }
17434
+ var init_BoardgameBoard = __esm({
17435
+ "components/game/organisms/BoardgameBoard.tsx"() {
17436
+ "use client";
17437
+ init_cn();
17438
+ init_IsometricCanvas();
17439
+ BoardgameBoard.displayName = "BoardgameBoard";
17440
+ }
17441
+ });
17390
17442
  var MIN_DIAGRAM_WIDTH, ScaledDiagram;
17391
17443
  var init_ScaledDiagram = __esm({
17392
17444
  "components/core/molecules/ScaledDiagram.tsx"() {
@@ -18424,7 +18476,7 @@ var init_StateMachineView = __esm({
18424
18476
  style: { top: title ? 30 : 0 },
18425
18477
  children: [
18426
18478
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
18427
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React93__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
18479
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React94__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
18428
18480
  StateNode,
18429
18481
  {
18430
18482
  state,
@@ -22379,7 +22431,7 @@ function CardHand({
22379
22431
  className
22380
22432
  }) {
22381
22433
  const eventBus = useEventBus();
22382
- const handleClick = React93.useCallback(
22434
+ const handleClick = React94.useCallback(
22383
22435
  (card) => {
22384
22436
  if (card.disabled) return;
22385
22437
  onCardClick?.(card.id);
@@ -24525,6 +24577,215 @@ var init_ChartLegend = __esm({
24525
24577
  ChartLegend.displayName = "ChartLegend";
24526
24578
  }
24527
24579
  });
24580
+
24581
+ // components/core/organisms/trace-edit-focus.ts
24582
+ function asString(v) {
24583
+ return typeof v === "string" ? v : void 0;
24584
+ }
24585
+ function asLevel(v) {
24586
+ if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
24587
+ return v;
24588
+ }
24589
+ return "node";
24590
+ }
24591
+ function isEventPayload(v) {
24592
+ return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
24593
+ }
24594
+ function parseEditFocus(value) {
24595
+ if (!isEventPayload(value)) return null;
24596
+ const payload = value;
24597
+ const orbital = asString(payload.orbital);
24598
+ if (orbital === void 0 || orbital.length === 0) return null;
24599
+ const focus = {
24600
+ level: asLevel(payload.level),
24601
+ orbital,
24602
+ label: asString(payload.label) ?? orbital
24603
+ };
24604
+ const trait = asString(payload.trait);
24605
+ if (trait !== void 0) focus.trait = trait;
24606
+ const transition = asString(payload.transition);
24607
+ if (transition !== void 0) focus.transition = transition;
24608
+ const state = asString(payload.state);
24609
+ if (state !== void 0) focus.state = state;
24610
+ const slot = asString(payload.slot);
24611
+ if (slot !== void 0) focus.slot = slot;
24612
+ const path = asString(payload.path);
24613
+ if (path !== void 0) focus.path = path;
24614
+ const patternType = asString(payload.patternType);
24615
+ if (patternType !== void 0) focus.patternType = patternType;
24616
+ const entity = asString(payload.entity);
24617
+ if (entity !== void 0) focus.entity = entity;
24618
+ const source = asString(payload.source);
24619
+ if (source !== void 0) focus.source = source;
24620
+ return focus;
24621
+ }
24622
+ var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
24623
+ var init_trace_edit_focus = __esm({
24624
+ "components/core/organisms/trace-edit-focus.ts"() {
24625
+ ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
24626
+ EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
24627
+ "node",
24628
+ "slot",
24629
+ "field",
24630
+ "effect",
24631
+ "trait",
24632
+ "page",
24633
+ "orbital"
24634
+ ]);
24635
+ }
24636
+ });
24637
+ function getJepaBadgeVariant(probability) {
24638
+ if (probability >= 0.9) return "success";
24639
+ if (probability >= 0.5) return "warning";
24640
+ return "danger";
24641
+ }
24642
+ function ChatBar({
24643
+ status = "idle",
24644
+ activeGate,
24645
+ jepaValidity,
24646
+ placeholder,
24647
+ context,
24648
+ className
24649
+ }) {
24650
+ const { t } = useTranslate();
24651
+ const eventBus = useEventBus();
24652
+ const [inputValue, setInputValue] = useState("");
24653
+ const [focus, setFocus] = useState(null);
24654
+ const clearFocus = useCallback(() => {
24655
+ setFocus(null);
24656
+ eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
24657
+ }, [eventBus]);
24658
+ const handleKeyDown = useCallback((e) => {
24659
+ if (e.key !== "Enter" || e.shiftKey) return;
24660
+ const trimmed = inputValue.trim();
24661
+ if (!trimmed) return;
24662
+ e.preventDefault();
24663
+ eventBus.emit("UI:CHAT_SEND", { message: trimmed });
24664
+ }, [inputValue, eventBus]);
24665
+ useEffect(() => {
24666
+ const unsubSend = eventBus.on("UI:CHAT_SEND", () => {
24667
+ setInputValue("");
24668
+ setFocus(null);
24669
+ });
24670
+ const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
24671
+ setFocus(parseEditFocus(e.payload?.focus));
24672
+ });
24673
+ return () => {
24674
+ unsubSend();
24675
+ unsubSelect();
24676
+ };
24677
+ }, [eventBus]);
24678
+ const trailingAction = status === "error" ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
24679
+ /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", size: "xs" }),
24680
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("openFile.retry") })
24681
+ ] }) : status === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [
24682
+ /* @__PURE__ */ jsx(
24683
+ Button,
24684
+ {
24685
+ variant: "ghost",
24686
+ size: "sm",
24687
+ action: "PAUSE",
24688
+ title: t("chatBar.pauseTheAgentYouCanEdit"),
24689
+ className: "rounded-none flex-shrink-0 h-auto",
24690
+ children: /* @__PURE__ */ jsx(Icon, { name: "pause", size: "xs" })
24691
+ }
24692
+ ),
24693
+ /* @__PURE__ */ jsx(
24694
+ Button,
24695
+ {
24696
+ variant: "ghost",
24697
+ size: "sm",
24698
+ action: "STOP",
24699
+ title: t("chatBar.cancelGeneration"),
24700
+ className: "rounded-none flex-shrink-0 h-auto border-l border-[var(--color-border)]",
24701
+ children: /* @__PURE__ */ jsx(Icon, { name: "square", size: "xs" })
24702
+ }
24703
+ )
24704
+ ] }) : status === "paused" ? /* @__PURE__ */ jsxs(
24705
+ Button,
24706
+ {
24707
+ variant: "primary",
24708
+ size: "sm",
24709
+ action: "RESUME",
24710
+ title: t("chatBar.resumeTheAgentYourCanvasEdits"),
24711
+ className: "rounded-none flex-shrink-0 h-auto",
24712
+ children: [
24713
+ /* @__PURE__ */ jsx(Icon, { name: "play", size: "xs" }),
24714
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("chatBar.resume") })
24715
+ ]
24716
+ }
24717
+ ) : /* @__PURE__ */ jsx(
24718
+ Button,
24719
+ {
24720
+ variant: "primary",
24721
+ size: "sm",
24722
+ action: "CHAT_SEND",
24723
+ actionPayload: { message: inputValue.trim() },
24724
+ disabled: !inputValue.trim(),
24725
+ "aria-label": t("chatBar.sendMessage"),
24726
+ className: "rounded-none flex-shrink-0 h-auto",
24727
+ children: /* @__PURE__ */ jsx(Icon, { name: "send", size: "xs" })
24728
+ }
24729
+ );
24730
+ return /* @__PURE__ */ jsxs(Box, { className: `border-t border-[var(--color-border)] bg-[var(--color-card)] ${className ?? ""}`, children: [
24731
+ focus && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center px-4 pt-2", children: /* @__PURE__ */ jsxs(Badge, { variant: "secondary", size: "sm", className: "flex items-center gap-1 max-w-full", children: [
24732
+ /* @__PURE__ */ jsx(Icon, { name: "mouse-pointer-2", size: "xs" }),
24733
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit truncate", children: [
24734
+ t("chatBar.editing"),
24735
+ ": ",
24736
+ focus.label
24737
+ ] }),
24738
+ /* @__PURE__ */ jsx(
24739
+ Box,
24740
+ {
24741
+ onClick: clearFocus,
24742
+ title: t("chatBar.clearSelection"),
24743
+ className: "cursor-pointer flex items-center ml-1 hover:opacity-70",
24744
+ children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" })
24745
+ }
24746
+ )
24747
+ ] }) }),
24748
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-4 py-2", children: [
24749
+ context && /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "whitespace-nowrap flex-shrink-0", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-inherit", children: context }) }),
24750
+ /* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0 flex items-stretch rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-background)] focus-within:border-[var(--color-primary)] overflow-hidden", children: [
24751
+ /* @__PURE__ */ jsx(
24752
+ Textarea,
24753
+ {
24754
+ value: inputValue,
24755
+ placeholder: placeholder ?? t("chatBar.askTheAgentAnything"),
24756
+ onChange: (e) => setInputValue(e.target.value),
24757
+ onKeyDown: handleKeyDown,
24758
+ rows: 1,
24759
+ className: "flex-1 min-w-0 min-h-0 text-sm border-0 rounded-none shadow-none bg-transparent resize-none focus:ring-0"
24760
+ }
24761
+ ),
24762
+ trailingAction
24763
+ ] }),
24764
+ (activeGate || jepaValidity !== void 0) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
24765
+ activeGate && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "whitespace-nowrap", children: activeGate }),
24766
+ jepaValidity !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: getJepaBadgeVariant(jepaValidity), size: "sm", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit", children: [
24767
+ (jepaValidity * 100).toFixed(1),
24768
+ "%"
24769
+ ] }) })
24770
+ ] })
24771
+ ] })
24772
+ ] });
24773
+ }
24774
+ var init_ChatBar = __esm({
24775
+ "components/core/organisms/ChatBar.tsx"() {
24776
+ "use client";
24777
+ init_Box();
24778
+ init_Stack();
24779
+ init_Typography();
24780
+ init_Button();
24781
+ init_Badge();
24782
+ init_Icon();
24783
+ init_Textarea();
24784
+ init_useEventBus();
24785
+ init_trace_edit_focus();
24786
+ ChatBar.displayName = "ChatBar";
24787
+ }
24788
+ });
24528
24789
  function resolveManifestUrl2(manifest, relative) {
24529
24790
  if (relative == null) return void 0;
24530
24791
  if (/^https?:\/\//.test(relative)) return relative;
@@ -25648,7 +25909,7 @@ function CraftingRecipe({
25648
25909
  className
25649
25910
  }) {
25650
25911
  const eventBus = useEventBus();
25651
- const handleCraft = React93.useCallback(() => {
25912
+ const handleCraft = React94.useCallback(() => {
25652
25913
  onCraft?.();
25653
25914
  if (craftEvent) {
25654
25915
  eventBus.emit(craftEvent, { output: output.label });
@@ -25665,7 +25926,7 @@ function CraftingRecipe({
25665
25926
  children: [
25666
25927
  /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
25667
25928
  const hasSufficient = ingredient.available >= ingredient.required;
25668
- return /* @__PURE__ */ jsxs(React93.Fragment, { children: [
25929
+ return /* @__PURE__ */ jsxs(React94.Fragment, { children: [
25669
25930
  /* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
25670
25931
  ItemSlot,
25671
25932
  {
@@ -25737,8 +25998,8 @@ function DPad({
25737
25998
  }) {
25738
25999
  const eventBus = useEventBus();
25739
26000
  const sizes = sizeMap15[size];
25740
- const [activeDirections, setActiveDirections] = React93.useState(/* @__PURE__ */ new Set());
25741
- const handlePress = React93.useCallback(
26001
+ const [activeDirections, setActiveDirections] = React94.useState(/* @__PURE__ */ new Set());
26002
+ const handlePress = React94.useCallback(
25742
26003
  (direction) => {
25743
26004
  setActiveDirections((prev) => new Set(prev).add(direction));
25744
26005
  if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
@@ -25746,7 +26007,7 @@ function DPad({
25746
26007
  },
25747
26008
  [directionEvent, eventBus, onDirection]
25748
26009
  );
25749
- const handleRelease = React93.useCallback(
26010
+ const handleRelease = React94.useCallback(
25750
26011
  (direction) => {
25751
26012
  setActiveDirections((prev) => {
25752
26013
  const next = new Set(prev);
@@ -26631,8 +26892,8 @@ var init_Menu = __esm({
26631
26892
  "bottom-end": "bottom-start"
26632
26893
  };
26633
26894
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
26634
- const triggerChild = React93__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
26635
- const triggerElement = React93__default.cloneElement(
26895
+ const triggerChild = React94__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
26896
+ const triggerElement = React94__default.cloneElement(
26636
26897
  triggerChild,
26637
26898
  {
26638
26899
  ref: triggerRef,
@@ -26727,14 +26988,14 @@ function useDataDnd(args) {
26727
26988
  const isZone = Boolean(dragGroup || accepts || sortable);
26728
26989
  const enabled = isZone || Boolean(dndRoot);
26729
26990
  const eventBus = useEventBus();
26730
- const parentRoot = React93__default.useContext(RootCtx);
26991
+ const parentRoot = React94__default.useContext(RootCtx);
26731
26992
  const isRoot = enabled && parentRoot === null;
26732
- const zoneId = React93__default.useId();
26993
+ const zoneId = React94__default.useId();
26733
26994
  const ownGroup = dragGroup ?? accepts ?? zoneId;
26734
- const [optimisticOrders, setOptimisticOrders] = React93__default.useState(() => /* @__PURE__ */ new Map());
26735
- const optimisticOrdersRef = React93__default.useRef(optimisticOrders);
26995
+ const [optimisticOrders, setOptimisticOrders] = React94__default.useState(() => /* @__PURE__ */ new Map());
26996
+ const optimisticOrdersRef = React94__default.useRef(optimisticOrders);
26736
26997
  optimisticOrdersRef.current = optimisticOrders;
26737
- const clearOptimisticOrder = React93__default.useCallback((group) => {
26998
+ const clearOptimisticOrder = React94__default.useCallback((group) => {
26738
26999
  setOptimisticOrders((prev) => {
26739
27000
  if (!prev.has(group)) return prev;
26740
27001
  const next = new Map(prev);
@@ -26759,7 +27020,7 @@ function useDataDnd(args) {
26759
27020
  const raw = it[dndItemIdField];
26760
27021
  return String(raw ?? `__idx_${idx}`);
26761
27022
  }).join("|");
26762
- const itemIds = React93__default.useMemo(
27023
+ const itemIds = React94__default.useMemo(
26763
27024
  () => orderedItems.map((it, idx) => {
26764
27025
  const raw = it[dndItemIdField];
26765
27026
  return raw ?? `__idx_${idx}`;
@@ -26767,7 +27028,7 @@ function useDataDnd(args) {
26767
27028
  [itemIdsSignature]
26768
27029
  );
26769
27030
  const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
26770
- React93__default.useEffect(() => {
27031
+ React94__default.useEffect(() => {
26771
27032
  const root = isRoot ? null : parentRoot;
26772
27033
  if (root) {
26773
27034
  root.clearOptimisticOrder(ownGroup);
@@ -26775,20 +27036,20 @@ function useDataDnd(args) {
26775
27036
  clearOptimisticOrder(ownGroup);
26776
27037
  }
26777
27038
  }, [itemsContentSig, ownGroup]);
26778
- const zonesRef = React93__default.useRef(/* @__PURE__ */ new Map());
26779
- const registerZone = React93__default.useCallback((zoneId2, meta2) => {
27039
+ const zonesRef = React94__default.useRef(/* @__PURE__ */ new Map());
27040
+ const registerZone = React94__default.useCallback((zoneId2, meta2) => {
26780
27041
  zonesRef.current.set(zoneId2, meta2);
26781
27042
  }, []);
26782
- const unregisterZone = React93__default.useCallback((zoneId2) => {
27043
+ const unregisterZone = React94__default.useCallback((zoneId2) => {
26783
27044
  zonesRef.current.delete(zoneId2);
26784
27045
  }, []);
26785
- const [activeDrag, setActiveDrag] = React93__default.useState(null);
26786
- const [overZoneGroup, setOverZoneGroup] = React93__default.useState(null);
26787
- const meta = React93__default.useMemo(
27046
+ const [activeDrag, setActiveDrag] = React94__default.useState(null);
27047
+ const [overZoneGroup, setOverZoneGroup] = React94__default.useState(null);
27048
+ const meta = React94__default.useMemo(
26788
27049
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
26789
27050
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
26790
27051
  );
26791
- React93__default.useEffect(() => {
27052
+ React94__default.useEffect(() => {
26792
27053
  const target = isRoot ? null : parentRoot;
26793
27054
  if (!target) {
26794
27055
  zonesRef.current.set(zoneId, meta);
@@ -26807,7 +27068,7 @@ function useDataDnd(args) {
26807
27068
  }, [parentRoot, isRoot, zoneId, meta]);
26808
27069
  const sensors = useAlmadarDndSensors(true);
26809
27070
  const collisionDetection = almadarDndCollisionDetection;
26810
- const findZoneByItem = React93__default.useCallback(
27071
+ const findZoneByItem = React94__default.useCallback(
26811
27072
  (id) => {
26812
27073
  for (const z of zonesRef.current.values()) {
26813
27074
  if (z.itemIds.includes(id)) return z;
@@ -26816,7 +27077,7 @@ function useDataDnd(args) {
26816
27077
  },
26817
27078
  []
26818
27079
  );
26819
- React93__default.useCallback(
27080
+ React94__default.useCallback(
26820
27081
  (group) => {
26821
27082
  for (const z of zonesRef.current.values()) {
26822
27083
  if (z.group === group) return z;
@@ -26825,7 +27086,7 @@ function useDataDnd(args) {
26825
27086
  },
26826
27087
  []
26827
27088
  );
26828
- const handleDragEnd = React93__default.useCallback(
27089
+ const handleDragEnd = React94__default.useCallback(
26829
27090
  (event) => {
26830
27091
  const { active, over } = event;
26831
27092
  const activeIdStr = String(active.id);
@@ -26916,8 +27177,8 @@ function useDataDnd(args) {
26916
27177
  },
26917
27178
  [eventBus]
26918
27179
  );
26919
- const sortableData = React93__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
26920
- const SortableItem = React93__default.useCallback(
27180
+ const sortableData = React94__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
27181
+ const SortableItem = React94__default.useCallback(
26921
27182
  ({ id, children }) => {
26922
27183
  const {
26923
27184
  attributes,
@@ -26957,7 +27218,7 @@ function useDataDnd(args) {
26957
27218
  id: droppableId,
26958
27219
  data: sortableData
26959
27220
  });
26960
- const ctx = React93__default.useContext(RootCtx);
27221
+ const ctx = React94__default.useContext(RootCtx);
26961
27222
  const activeDrag2 = ctx?.activeDrag ?? null;
26962
27223
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
26963
27224
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -26972,7 +27233,7 @@ function useDataDnd(args) {
26972
27233
  showForeignPlaceholder,
26973
27234
  ctxAvailable: ctx != null
26974
27235
  });
26975
- React93__default.useEffect(() => {
27236
+ React94__default.useEffect(() => {
26976
27237
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
26977
27238
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
26978
27239
  return /* @__PURE__ */ jsx(
@@ -26986,11 +27247,11 @@ function useDataDnd(args) {
26986
27247
  }
26987
27248
  );
26988
27249
  };
26989
- const rootContextValue = React93__default.useMemo(
27250
+ const rootContextValue = React94__default.useMemo(
26990
27251
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
26991
27252
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
26992
27253
  );
26993
- const handleDragStart = React93__default.useCallback((event) => {
27254
+ const handleDragStart = React94__default.useCallback((event) => {
26994
27255
  const sourceZone = findZoneByItem(event.active.id);
26995
27256
  const rect = event.active.rect.current.initial;
26996
27257
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -27009,7 +27270,7 @@ function useDataDnd(args) {
27009
27270
  isRoot
27010
27271
  });
27011
27272
  }, [findZoneByItem, isRoot, zoneId]);
27012
- const handleDragOver = React93__default.useCallback((event) => {
27273
+ const handleDragOver = React94__default.useCallback((event) => {
27013
27274
  const { active, over } = event;
27014
27275
  const overData = over?.data?.current;
27015
27276
  const overGroup = overData?.dndGroup ?? null;
@@ -27079,7 +27340,7 @@ function useDataDnd(args) {
27079
27340
  return next;
27080
27341
  });
27081
27342
  }, []);
27082
- const handleDragCancel = React93__default.useCallback((event) => {
27343
+ const handleDragCancel = React94__default.useCallback((event) => {
27083
27344
  setActiveDrag(null);
27084
27345
  setOverZoneGroup(null);
27085
27346
  dndLog.warn("dragCancel", {
@@ -27087,12 +27348,12 @@ function useDataDnd(args) {
27087
27348
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
27088
27349
  });
27089
27350
  }, []);
27090
- const handleDragEndWithCleanup = React93__default.useCallback((event) => {
27351
+ const handleDragEndWithCleanup = React94__default.useCallback((event) => {
27091
27352
  handleDragEnd(event);
27092
27353
  setActiveDrag(null);
27093
27354
  setOverZoneGroup(null);
27094
27355
  }, [handleDragEnd]);
27095
- const wrapContainer = React93__default.useCallback(
27356
+ const wrapContainer = React94__default.useCallback(
27096
27357
  (children) => {
27097
27358
  if (!enabled) return children;
27098
27359
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -27146,7 +27407,7 @@ var init_useDataDnd = __esm({
27146
27407
  init_useAlmadarDndCollision();
27147
27408
  init_Box();
27148
27409
  dndLog = createLogger("almadar:ui:dnd");
27149
- RootCtx = React93__default.createContext(null);
27410
+ RootCtx = React94__default.createContext(null);
27150
27411
  }
27151
27412
  });
27152
27413
  function renderIconInput(icon, props) {
@@ -27672,7 +27933,7 @@ function DataList({
27672
27933
  }) {
27673
27934
  const eventBus = useEventBus();
27674
27935
  const { t } = useTranslate();
27675
- const [visibleCount, setVisibleCount] = React93__default.useState(pageSize || Infinity);
27936
+ const [visibleCount, setVisibleCount] = React94__default.useState(pageSize || Infinity);
27676
27937
  const fieldDefs = fields ?? columns ?? [];
27677
27938
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
27678
27939
  const dnd = useDataDnd({
@@ -27691,7 +27952,7 @@ function DataList({
27691
27952
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
27692
27953
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
27693
27954
  const hasRenderProp = typeof children === "function";
27694
- React93__default.useEffect(() => {
27955
+ React94__default.useEffect(() => {
27695
27956
  const renderItemTypeOf = typeof schemaRenderItem;
27696
27957
  const childrenTypeOf = typeof children;
27697
27958
  if (data.length > 0 && !hasRenderProp) {
@@ -27796,7 +28057,7 @@ function DataList({
27796
28057
  const items2 = data.map((item) => item);
27797
28058
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
27798
28059
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
27799
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
28060
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
27800
28061
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
27801
28062
  group.items.map((itemData, index) => {
27802
28063
  const id = itemData.id || `${gi}-${index}`;
@@ -27937,7 +28198,7 @@ function DataList({
27937
28198
  className
27938
28199
  ),
27939
28200
  children: [
27940
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
28201
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
27941
28202
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
27942
28203
  group.items.map(
27943
28204
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -28853,7 +29114,7 @@ var init_Grid = __esm({
28853
29114
  as: Component2 = "div"
28854
29115
  }) => {
28855
29116
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
28856
- return React93__default.createElement(
29117
+ return React94__default.createElement(
28857
29118
  Component2,
28858
29119
  {
28859
29120
  className: cn(
@@ -29049,9 +29310,9 @@ var init_Popover = __esm({
29049
29310
  onMouseLeave: handleClose,
29050
29311
  onPointerDown: tapTriggerProps.onPointerDown
29051
29312
  };
29052
- const childElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
29313
+ const childElement = React94__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
29053
29314
  const childPointerDown = childElement.props.onPointerDown;
29054
- const triggerElement = React93__default.cloneElement(
29315
+ const triggerElement = React94__default.cloneElement(
29055
29316
  childElement,
29056
29317
  {
29057
29318
  ref: triggerRef,
@@ -29653,9 +29914,9 @@ var init_Tooltip = __esm({
29653
29914
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
29654
29915
  };
29655
29916
  }, []);
29656
- const triggerElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
29917
+ const triggerElement = React94__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
29657
29918
  const childPointerDown = triggerElement.props.onPointerDown;
29658
- const trigger = React93__default.cloneElement(triggerElement, {
29919
+ const trigger = React94__default.cloneElement(triggerElement, {
29659
29920
  ref: triggerRef,
29660
29921
  onMouseEnter: handleMouseEnter,
29661
29922
  onMouseLeave: handleMouseLeave,
@@ -29745,7 +30006,7 @@ var init_WizardProgress = __esm({
29745
30006
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
29746
30007
  const isActive = index === currentStep;
29747
30008
  const isCompleted = index < currentStep;
29748
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
30009
+ return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
29749
30010
  /* @__PURE__ */ jsx(
29750
30011
  "button",
29751
30012
  {
@@ -30808,7 +31069,7 @@ function InventoryGrid({
30808
31069
  const eventBus = useEventBus();
30809
31070
  const slotCount = totalSlots ?? items.length;
30810
31071
  const emptySlotCount = Math.max(0, slotCount - items.length);
30811
- const handleSelect = React93.useCallback(
31072
+ const handleSelect = React94.useCallback(
30812
31073
  (id) => {
30813
31074
  onSelect?.(id);
30814
31075
  if (selectEvent) {
@@ -31043,31 +31304,31 @@ function GameCanvas2D({
31043
31304
  assetBaseUrl,
31044
31305
  className
31045
31306
  }) {
31046
- const canvasRef = React93.useRef(null);
31047
- const rafRef = React93.useRef(0);
31048
- const frameRef = React93.useRef(0);
31049
- const lastTimeRef = React93.useRef(0);
31050
- const imageCache = React93.useRef(/* @__PURE__ */ new Map());
31307
+ const canvasRef = React94.useRef(null);
31308
+ const rafRef = React94.useRef(0);
31309
+ const frameRef = React94.useRef(0);
31310
+ const lastTimeRef = React94.useRef(0);
31311
+ const imageCache = React94.useRef(/* @__PURE__ */ new Map());
31051
31312
  const emit = useEmitEvent();
31052
- const onDrawRef = React93.useRef(onDraw);
31313
+ const onDrawRef = React94.useRef(onDraw);
31053
31314
  onDrawRef.current = onDraw;
31054
- const onTickRef = React93.useRef(onTick);
31315
+ const onTickRef = React94.useRef(onTick);
31055
31316
  onTickRef.current = onTick;
31056
- const tickEventRef = React93.useRef(tickEvent);
31317
+ const tickEventRef = React94.useRef(tickEvent);
31057
31318
  tickEventRef.current = tickEvent;
31058
- const drawEventRef = React93.useRef(drawEvent);
31319
+ const drawEventRef = React94.useRef(drawEvent);
31059
31320
  drawEventRef.current = drawEvent;
31060
- const emitRef = React93.useRef(emit);
31321
+ const emitRef = React94.useRef(emit);
31061
31322
  emitRef.current = emit;
31062
- const assetBaseUrlRef = React93.useRef(assetBaseUrl);
31323
+ const assetBaseUrlRef = React94.useRef(assetBaseUrl);
31063
31324
  assetBaseUrlRef.current = assetBaseUrl;
31064
- const backgroundImageRef = React93.useRef(backgroundImage);
31325
+ const backgroundImageRef = React94.useRef(backgroundImage);
31065
31326
  backgroundImageRef.current = backgroundImage;
31066
- const widthRef = React93.useRef(width);
31327
+ const widthRef = React94.useRef(width);
31067
31328
  widthRef.current = width;
31068
- const heightRef = React93.useRef(height);
31329
+ const heightRef = React94.useRef(height);
31069
31330
  heightRef.current = height;
31070
- const loadImage = React93.useCallback((url) => {
31331
+ const loadImage = React94.useCallback((url) => {
31071
31332
  const base = assetBaseUrlRef.current;
31072
31333
  if (!url.startsWith("http") && !base) return null;
31073
31334
  const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
@@ -31081,7 +31342,7 @@ function GameCanvas2D({
31081
31342
  }
31082
31343
  return null;
31083
31344
  }, []);
31084
- React93.useEffect(() => {
31345
+ React94.useEffect(() => {
31085
31346
  const canvas = canvasRef.current;
31086
31347
  if (!canvas) return;
31087
31348
  const ctx = canvas.getContext("2d");
@@ -31406,7 +31667,7 @@ function TurnPanel({
31406
31667
  className
31407
31668
  }) {
31408
31669
  const eventBus = useEventBus();
31409
- const handleAction = React93.useCallback(
31670
+ const handleAction = React94.useCallback(
31410
31671
  (event) => {
31411
31672
  if (event) {
31412
31673
  eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
@@ -31587,7 +31848,7 @@ function UnitCommandBar({
31587
31848
  className
31588
31849
  }) {
31589
31850
  const eventBus = useEventBus();
31590
- const handleCommand = React93.useCallback(
31851
+ const handleCommand = React94.useCallback(
31591
31852
  (event) => {
31592
31853
  if (event) {
31593
31854
  eventBus.emit(event, { unitId: selectedUnitId });
@@ -32138,7 +32399,7 @@ function GameMenu({
32138
32399
  } catch {
32139
32400
  }
32140
32401
  const eventBus = eventBusProp || eventBusFromHook;
32141
- const handleOptionClick = React93.useCallback(
32402
+ const handleOptionClick = React94.useCallback(
32142
32403
  (option) => {
32143
32404
  if (option.event && eventBus) {
32144
32405
  eventBus.emit(`UI:${option.event}`, { option });
@@ -32257,7 +32518,7 @@ function GameOverScreen({
32257
32518
  } catch {
32258
32519
  }
32259
32520
  const eventBus = eventBusProp || eventBusFromHook;
32260
- const handleActionClick = React93.useCallback(
32521
+ const handleActionClick = React94.useCallback(
32261
32522
  (action) => {
32262
32523
  if (action.event && eventBus) {
32263
32524
  eventBus.emit(`UI:${action.event}`, { action });
@@ -33189,13 +33450,13 @@ var init_MapView = __esm({
33189
33450
  shadowSize: [41, 41]
33190
33451
  });
33191
33452
  L.Marker.prototype.options.icon = defaultIcon;
33192
- const { useEffect: useEffect88, useRef: useRef82, useCallback: useCallback132, useState: useState123 } = React93__default;
33453
+ const { useEffect: useEffect89, useRef: useRef82, useCallback: useCallback133, useState: useState125 } = React94__default;
33193
33454
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
33194
33455
  const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
33195
33456
  function MapUpdater({ centerLat, centerLng, zoom }) {
33196
33457
  const map = useMap();
33197
33458
  const prevRef = useRef82({ centerLat, centerLng, zoom });
33198
- useEffect88(() => {
33459
+ useEffect89(() => {
33199
33460
  const prev = prevRef.current;
33200
33461
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
33201
33462
  map.setView([centerLat, centerLng], zoom);
@@ -33206,7 +33467,7 @@ var init_MapView = __esm({
33206
33467
  }
33207
33468
  function MapClickHandler({ onMapClick }) {
33208
33469
  const map = useMap();
33209
- useEffect88(() => {
33470
+ useEffect89(() => {
33210
33471
  if (!onMapClick) return;
33211
33472
  const handler = (e) => {
33212
33473
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -33234,8 +33495,8 @@ var init_MapView = __esm({
33234
33495
  showAttribution = true
33235
33496
  }) {
33236
33497
  const eventBus = useEventBus4();
33237
- const [clickedPosition, setClickedPosition] = useState123(null);
33238
- const handleMapClick = useCallback132((lat, lng) => {
33498
+ const [clickedPosition, setClickedPosition] = useState125(null);
33499
+ const handleMapClick = useCallback133((lat, lng) => {
33239
33500
  if (showClickedPin) {
33240
33501
  setClickedPosition({ lat, lng });
33241
33502
  }
@@ -33244,7 +33505,7 @@ var init_MapView = __esm({
33244
33505
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
33245
33506
  }
33246
33507
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
33247
- const handleMarkerClick = useCallback132((marker) => {
33508
+ const handleMarkerClick = useCallback133((marker) => {
33248
33509
  onMarkerClick?.(marker);
33249
33510
  if (markerClickEvent) {
33250
33511
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -34095,8 +34356,8 @@ function TableView({
34095
34356
  }) {
34096
34357
  const eventBus = useEventBus();
34097
34358
  const { t } = useTranslate();
34098
- const [visibleCount, setVisibleCount] = React93__default.useState(pageSize > 0 ? pageSize : Infinity);
34099
- const [localSelected, setLocalSelected] = React93__default.useState(/* @__PURE__ */ new Set());
34359
+ const [visibleCount, setVisibleCount] = React94__default.useState(pageSize > 0 ? pageSize : Infinity);
34360
+ const [localSelected, setLocalSelected] = React94__default.useState(/* @__PURE__ */ new Set());
34100
34361
  const colDefs = columns ?? fields ?? [];
34101
34362
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
34102
34363
  const dnd = useDataDnd({
@@ -34291,12 +34552,12 @@ function TableView({
34291
34552
  ]
34292
34553
  }
34293
34554
  );
34294
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React93__default.Fragment, { children: rowInner }, id);
34555
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React94__default.Fragment, { children: rowInner }, id);
34295
34556
  };
34296
34557
  const items = data.map((row) => row);
34297
34558
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
34298
34559
  let runningIndex = 0;
34299
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
34560
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
34300
34561
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
34301
34562
  group.items.map((row) => renderRow(row, runningIndex++))
34302
34563
  ] }, gi)) });
@@ -35653,7 +35914,7 @@ var init_StepFlow = __esm({
35653
35914
  className
35654
35915
  }) => {
35655
35916
  if (orientation === "vertical") {
35656
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React93__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
35917
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React94__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
35657
35918
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
35658
35919
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
35659
35920
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -35664,7 +35925,7 @@ var init_StepFlow = __esm({
35664
35925
  ] })
35665
35926
  ] }) }, index)) });
35666
35927
  }
35667
- return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
35928
+ return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
35668
35929
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
35669
35930
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
35670
35931
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -36649,7 +36910,7 @@ var init_LikertScale = __esm({
36649
36910
  md: "text-base",
36650
36911
  lg: "text-lg"
36651
36912
  };
36652
- LikertScale = React93__default.forwardRef(
36913
+ LikertScale = React94__default.forwardRef(
36653
36914
  ({
36654
36915
  question,
36655
36916
  options = DEFAULT_LIKERT_OPTIONS,
@@ -36661,7 +36922,7 @@ var init_LikertScale = __esm({
36661
36922
  variant = "radios",
36662
36923
  className
36663
36924
  }, ref) => {
36664
- const groupId = React93__default.useId();
36925
+ const groupId = React94__default.useId();
36665
36926
  const eventBus = useEventBus();
36666
36927
  const handleSelect = useCallback(
36667
36928
  (next) => {
@@ -38943,7 +39204,7 @@ var init_DocBreadcrumb = __esm({
38943
39204
  "aria-label": t("aria.breadcrumb"),
38944
39205
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
38945
39206
  const isLast = idx === items.length - 1;
38946
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
39207
+ return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
38947
39208
  idx > 0 && /* @__PURE__ */ jsx(
38948
39209
  Icon,
38949
39210
  {
@@ -39607,7 +39868,7 @@ var init_PageHeader = __esm({
39607
39868
  info: "bg-info/10 text-info"
39608
39869
  };
39609
39870
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
39610
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
39871
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
39611
39872
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
39612
39873
  crumb.href ? /* @__PURE__ */ jsx(
39613
39874
  "a",
@@ -40336,7 +40597,7 @@ var init_WizardContainer = __esm({
40336
40597
  const isCompleted = index < currentStep;
40337
40598
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
40338
40599
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
40339
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
40600
+ return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
40340
40601
  /* @__PURE__ */ jsx(
40341
40602
  Button,
40342
40603
  {
@@ -42896,7 +43157,7 @@ var init_DetailPanel = __esm({
42896
43157
  }
42897
43158
  });
42898
43159
  function extractTitle(children) {
42899
- if (!React93__default.isValidElement(children)) return void 0;
43160
+ if (!React94__default.isValidElement(children)) return void 0;
42900
43161
  const props = children.props;
42901
43162
  if (typeof props.title === "string") {
42902
43163
  return props.title;
@@ -42951,7 +43212,7 @@ function LinearView({
42951
43212
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
42952
43213
  const isDone = i < currentIdx;
42953
43214
  const isCurrent = i === currentIdx;
42954
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
43215
+ return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
42955
43216
  i > 0 && /* @__PURE__ */ jsx(
42956
43217
  Typography,
42957
43218
  {
@@ -43720,6 +43981,42 @@ var init_FeatureGridOrganism = __esm({
43720
43981
  FeatureGridOrganism.displayName = "FeatureGridOrganism";
43721
43982
  }
43722
43983
  });
43984
+ function FishingBoard({
43985
+ backgroundImage,
43986
+ assetBaseUrl,
43987
+ scale = 1,
43988
+ showMinimap = false,
43989
+ enableCamera = true,
43990
+ width = 800,
43991
+ height = 600,
43992
+ isLoading,
43993
+ error,
43994
+ className
43995
+ }) {
43996
+ return /* @__PURE__ */ jsxs("div", { className: cn("fishing-board relative w-full h-full", className), children: [
43997
+ isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
43998
+ error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
43999
+ /* @__PURE__ */ jsx(
44000
+ GameCanvas2D,
44001
+ {
44002
+ width,
44003
+ height,
44004
+ backgroundImage: backgroundImage ?? "",
44005
+ assetBaseUrl,
44006
+ fps: 60,
44007
+ className: "w-full h-full"
44008
+ }
44009
+ )
44010
+ ] });
44011
+ }
44012
+ var init_FishingBoard = __esm({
44013
+ "components/game/organisms/FishingBoard.tsx"() {
44014
+ "use client";
44015
+ init_cn();
44016
+ init_GameCanvas2D();
44017
+ FishingBoard.displayName = "FishingBoard";
44018
+ }
44019
+ });
43723
44020
  function toSharedContext2(formCtx) {
43724
44021
  return createMinimalContext(
43725
44022
  {
@@ -43901,12 +44198,12 @@ var init_Form = __esm({
43901
44198
  const isSchemaEntity = isOrbitalEntitySchema(entity);
43902
44199
  const resolvedEntity = isSchemaEntity ? entity : void 0;
43903
44200
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
43904
- const normalizedInitialData = React93__default.useMemo(() => {
44201
+ const normalizedInitialData = React94__default.useMemo(() => {
43905
44202
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
43906
44203
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
43907
44204
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
43908
44205
  }, [entity, initialData]);
43909
- const entityDerivedFields = React93__default.useMemo(() => {
44206
+ const entityDerivedFields = React94__default.useMemo(() => {
43910
44207
  if (fields && fields.length > 0) return void 0;
43911
44208
  if (!resolvedEntity) return void 0;
43912
44209
  return resolvedEntity.fields.map(
@@ -43926,16 +44223,16 @@ var init_Form = __esm({
43926
44223
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
43927
44224
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
43928
44225
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
43929
- const [formData, setFormData] = React93__default.useState(
44226
+ const [formData, setFormData] = React94__default.useState(
43930
44227
  normalizedInitialData
43931
44228
  );
43932
- const [collapsedSections, setCollapsedSections] = React93__default.useState(
44229
+ const [collapsedSections, setCollapsedSections] = React94__default.useState(
43933
44230
  /* @__PURE__ */ new Set()
43934
44231
  );
43935
- const [submitError, setSubmitError] = React93__default.useState(null);
43936
- const formRef = React93__default.useRef(null);
44232
+ const [submitError, setSubmitError] = React94__default.useState(null);
44233
+ const formRef = React94__default.useRef(null);
43937
44234
  const formMode = props.mode;
43938
- const mountedRef = React93__default.useRef(false);
44235
+ const mountedRef = React94__default.useRef(false);
43939
44236
  if (!mountedRef.current) {
43940
44237
  mountedRef.current = true;
43941
44238
  debug("forms", "mount", {
@@ -43948,7 +44245,7 @@ var init_Form = __esm({
43948
44245
  });
43949
44246
  }
43950
44247
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
43951
- const evalContext = React93__default.useMemo(
44248
+ const evalContext = React94__default.useMemo(
43952
44249
  () => ({
43953
44250
  formValues: formData,
43954
44251
  globalVariables: externalContext?.globalVariables ?? {},
@@ -43957,7 +44254,7 @@ var init_Form = __esm({
43957
44254
  }),
43958
44255
  [formData, externalContext]
43959
44256
  );
43960
- React93__default.useEffect(() => {
44257
+ React94__default.useEffect(() => {
43961
44258
  debug("forms", "initialData-sync", {
43962
44259
  mode: formMode,
43963
44260
  normalizedInitialData,
@@ -43968,7 +44265,7 @@ var init_Form = __esm({
43968
44265
  setFormData(normalizedInitialData);
43969
44266
  }
43970
44267
  }, [normalizedInitialData]);
43971
- const processCalculations = React93__default.useCallback(
44268
+ const processCalculations = React94__default.useCallback(
43972
44269
  (changedFieldId, newFormData) => {
43973
44270
  if (!hiddenCalculations.length) return;
43974
44271
  const context = {
@@ -43993,7 +44290,7 @@ var init_Form = __esm({
43993
44290
  },
43994
44291
  [hiddenCalculations, externalContext, eventBus]
43995
44292
  );
43996
- const checkViolations = React93__default.useCallback(
44293
+ const checkViolations = React94__default.useCallback(
43997
44294
  (changedFieldId, newFormData) => {
43998
44295
  if (!violationTriggers.length) return;
43999
44296
  const context = {
@@ -44031,7 +44328,7 @@ var init_Form = __esm({
44031
44328
  processCalculations(name, newFormData);
44032
44329
  checkViolations(name, newFormData);
44033
44330
  };
44034
- const isFieldVisible = React93__default.useCallback(
44331
+ const isFieldVisible = React94__default.useCallback(
44035
44332
  (fieldName) => {
44036
44333
  const condition = conditionalFields[fieldName];
44037
44334
  if (!condition) return true;
@@ -44039,7 +44336,7 @@ var init_Form = __esm({
44039
44336
  },
44040
44337
  [conditionalFields, evalContext]
44041
44338
  );
44042
- const isSectionVisible = React93__default.useCallback(
44339
+ const isSectionVisible = React94__default.useCallback(
44043
44340
  (section) => {
44044
44341
  if (!section.condition) return true;
44045
44342
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -44115,7 +44412,7 @@ var init_Form = __esm({
44115
44412
  eventBus.emit(`UI:${onCancel}`);
44116
44413
  }
44117
44414
  };
44118
- const renderField = React93__default.useCallback(
44415
+ const renderField = React94__default.useCallback(
44119
44416
  (field) => {
44120
44417
  const fieldName = field.name || field.field;
44121
44418
  if (!fieldName) return null;
@@ -44136,7 +44433,7 @@ var init_Form = __esm({
44136
44433
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
44137
44434
  );
44138
44435
  const effectiveFields = entityDerivedFields ?? fields;
44139
- const normalizedFields = React93__default.useMemo(() => {
44436
+ const normalizedFields = React94__default.useMemo(() => {
44140
44437
  if (!effectiveFields || effectiveFields.length === 0) return [];
44141
44438
  return effectiveFields.map((field) => {
44142
44439
  if (typeof field === "string") {
@@ -44159,7 +44456,7 @@ var init_Form = __esm({
44159
44456
  return field;
44160
44457
  });
44161
44458
  }, [effectiveFields, resolvedEntity]);
44162
- const schemaFields = React93__default.useMemo(() => {
44459
+ const schemaFields = React94__default.useMemo(() => {
44163
44460
  if (normalizedFields.length === 0) return null;
44164
44461
  if (isDebugEnabled()) {
44165
44462
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -44169,7 +44466,7 @@ var init_Form = __esm({
44169
44466
  }
44170
44467
  return normalizedFields.map(renderField).filter(Boolean);
44171
44468
  }, [normalizedFields, renderField, entityName, conditionalFields]);
44172
- const sectionElements = React93__default.useMemo(() => {
44469
+ const sectionElements = React94__default.useMemo(() => {
44173
44470
  if (!sections || sections.length === 0) return null;
44174
44471
  return sections.map((section) => {
44175
44472
  if (!isSectionVisible(section)) {
@@ -46433,10 +46730,10 @@ function getSlotContentRenderer2() {
46433
46730
  }
46434
46731
  function resolveDescriptor(value, idPrefix) {
46435
46732
  if (value === null || value === void 0) return value;
46436
- if (React93__default.isValidElement(value)) return value;
46733
+ if (React94__default.isValidElement(value)) return value;
46437
46734
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
46438
46735
  if (Array.isArray(value)) {
46439
- return value.map((item, i) => /* @__PURE__ */ jsx(React93__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
46736
+ return value.map((item, i) => /* @__PURE__ */ jsx(React94__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
46440
46737
  }
46441
46738
  if (typeof value === "object") {
46442
46739
  const rec = value;
@@ -46537,10 +46834,10 @@ function getSlotContentRenderer3() {
46537
46834
  }
46538
46835
  function resolveDescriptor2(value, idPrefix) {
46539
46836
  if (value === null || value === void 0) return value;
46540
- if (React93__default.isValidElement(value)) return value;
46837
+ if (React94__default.isValidElement(value)) return value;
46541
46838
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
46542
46839
  if (Array.isArray(value)) {
46543
- return value.map((item, i) => /* @__PURE__ */ jsx(React93__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
46840
+ return value.map((item, i) => /* @__PURE__ */ jsx(React94__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
46544
46841
  }
46545
46842
  if (typeof value === "object") {
46546
46843
  const rec = value;
@@ -46873,6 +47170,39 @@ var init_HexStrategyBoard = __esm({
46873
47170
  HexStrategyBoard.displayName = "HexStrategyBoard";
46874
47171
  }
46875
47172
  });
47173
+ function HolidayRunnerBoard({
47174
+ backgroundImage,
47175
+ assetBaseUrl,
47176
+ width = 800,
47177
+ height = 400,
47178
+ fps = 60,
47179
+ isLoading,
47180
+ error,
47181
+ className
47182
+ }) {
47183
+ return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
47184
+ isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
47185
+ error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
47186
+ /* @__PURE__ */ jsx(
47187
+ GameCanvas2D,
47188
+ {
47189
+ width,
47190
+ height,
47191
+ fps,
47192
+ backgroundImage: backgroundImage ?? "",
47193
+ assetBaseUrl
47194
+ }
47195
+ )
47196
+ ] });
47197
+ }
47198
+ var init_HolidayRunnerBoard = __esm({
47199
+ "components/game/organisms/HolidayRunnerBoard.tsx"() {
47200
+ "use client";
47201
+ init_cn();
47202
+ init_GameCanvas2D();
47203
+ HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
47204
+ }
47205
+ });
46876
47206
  var LandingPageTemplate;
46877
47207
  var init_LandingPageTemplate = __esm({
46878
47208
  "components/marketing/templates/LandingPageTemplate.tsx"() {
@@ -47208,7 +47538,7 @@ var init_List = __esm({
47208
47538
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
47209
47539
  return [];
47210
47540
  }, [entity]);
47211
- const getItemActions = React93__default.useCallback(
47541
+ const getItemActions = React94__default.useCallback(
47212
47542
  (item) => {
47213
47543
  if (!itemActions) return [];
47214
47544
  if (typeof itemActions === "function") {
@@ -47627,6 +47957,48 @@ var init_MasterDetailLayout = __esm({
47627
47957
  MasterDetailLayout.displayName = "MasterDetailLayout";
47628
47958
  }
47629
47959
  });
47960
+ function MatchPuzzleBoard({
47961
+ tiles,
47962
+ units,
47963
+ features,
47964
+ assetManifest,
47965
+ assetBaseUrl,
47966
+ scale = 0.45,
47967
+ showMinimap = false,
47968
+ enableCamera = false,
47969
+ tileClickEvent,
47970
+ unitClickEvent,
47971
+ isLoading,
47972
+ error,
47973
+ className
47974
+ }) {
47975
+ return /* @__PURE__ */ jsx("div", { className: cn("match-puzzle-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
47976
+ IsometricCanvas_default,
47977
+ {
47978
+ tileLayout: "flat",
47979
+ tiles,
47980
+ units,
47981
+ features,
47982
+ assetManifest,
47983
+ assetBaseUrl,
47984
+ scale,
47985
+ showMinimap,
47986
+ enableCamera,
47987
+ tileClickEvent,
47988
+ unitClickEvent,
47989
+ isLoading,
47990
+ error
47991
+ }
47992
+ ) });
47993
+ }
47994
+ var init_MatchPuzzleBoard = __esm({
47995
+ "components/game/organisms/MatchPuzzleBoard.tsx"() {
47996
+ "use client";
47997
+ init_cn();
47998
+ init_IsometricCanvas();
47999
+ MatchPuzzleBoard.displayName = "MatchPuzzleBoard";
48000
+ }
48001
+ });
47630
48002
  var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
47631
48003
  var init_MediaGallery = __esm({
47632
48004
  "components/core/organisms/MediaGallery.tsx"() {
@@ -47684,7 +48056,7 @@ var init_MediaGallery = __esm({
47684
48056
  [selectable, selectedItems, selectionEvent, eventBus]
47685
48057
  );
47686
48058
  const entityData = Array.isArray(entity) ? entity : [];
47687
- const items = React93__default.useMemo(() => {
48059
+ const items = React94__default.useMemo(() => {
47688
48060
  if (propItems) return propItems;
47689
48061
  if (entityData.length === 0) return [];
47690
48062
  return entityData.map((record, idx) => ({
@@ -47844,8 +48216,50 @@ var init_MediaGallery = __esm({
47844
48216
  MediaGallery.displayName = "MediaGallery";
47845
48217
  }
47846
48218
  });
48219
+ function MinigolfBoard({
48220
+ tiles,
48221
+ units,
48222
+ features,
48223
+ assetManifest,
48224
+ assetBaseUrl,
48225
+ scale = 0.45,
48226
+ showMinimap = true,
48227
+ enableCamera = true,
48228
+ tileClickEvent,
48229
+ unitClickEvent,
48230
+ isLoading,
48231
+ error,
48232
+ className
48233
+ }) {
48234
+ return /* @__PURE__ */ jsx("div", { className: cn("minigolf-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
48235
+ IsometricCanvas_default,
48236
+ {
48237
+ tileLayout: "isometric",
48238
+ tiles,
48239
+ units,
48240
+ features,
48241
+ assetManifest,
48242
+ assetBaseUrl,
48243
+ scale,
48244
+ showMinimap,
48245
+ enableCamera,
48246
+ tileClickEvent,
48247
+ unitClickEvent,
48248
+ isLoading,
48249
+ error
48250
+ }
48251
+ ) });
48252
+ }
48253
+ var init_MinigolfBoard = __esm({
48254
+ "components/game/organisms/MinigolfBoard.tsx"() {
48255
+ "use client";
48256
+ init_cn();
48257
+ init_IsometricCanvas();
48258
+ MinigolfBoard.displayName = "MinigolfBoard";
48259
+ }
48260
+ });
47847
48261
  function extractTitle2(children) {
47848
- if (!React93__default.isValidElement(children)) return void 0;
48262
+ if (!React94__default.isValidElement(children)) return void 0;
47849
48263
  const props = children.props;
47850
48264
  if (typeof props.title === "string") {
47851
48265
  return props.title;
@@ -48061,6 +48475,87 @@ var init_NegotiatorBoard = __esm({
48061
48475
  NegotiatorBoard.displayName = "NegotiatorBoard";
48062
48476
  }
48063
48477
  });
48478
+ function PinballBoard({
48479
+ tiles: _tiles,
48480
+ units: _units,
48481
+ features: _features,
48482
+ assetManifest: _assetManifest,
48483
+ assetBaseUrl,
48484
+ scale = 1,
48485
+ showMinimap: _showMinimap = false,
48486
+ enableCamera: _enableCamera = false,
48487
+ tileClickEvent: _tileClickEvent,
48488
+ unitClickEvent: _unitClickEvent,
48489
+ isLoading,
48490
+ error,
48491
+ className
48492
+ }) {
48493
+ if (isLoading) {
48494
+ return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full flex items-center justify-center", className), children: /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." }) });
48495
+ }
48496
+ if (error) {
48497
+ return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full flex items-center justify-center", className), children: /* @__PURE__ */ jsx("span", { className: "text-sm text-destructive", children: error.message }) });
48498
+ }
48499
+ return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
48500
+ GameCanvas2D,
48501
+ {
48502
+ width: Math.round(400 * scale),
48503
+ height: Math.round(800 * scale),
48504
+ assetBaseUrl,
48505
+ fps: 60
48506
+ }
48507
+ ) });
48508
+ }
48509
+ var init_PinballBoard = __esm({
48510
+ "components/game/organisms/PinballBoard.tsx"() {
48511
+ "use client";
48512
+ init_cn();
48513
+ init_GameCanvas2D();
48514
+ PinballBoard.displayName = "PinballBoard";
48515
+ }
48516
+ });
48517
+ function PirateBoard({
48518
+ tiles,
48519
+ units,
48520
+ features,
48521
+ assetManifest,
48522
+ assetBaseUrl,
48523
+ scale = 0.45,
48524
+ showMinimap = true,
48525
+ enableCamera = true,
48526
+ tileClickEvent,
48527
+ unitClickEvent,
48528
+ isLoading,
48529
+ error,
48530
+ className
48531
+ }) {
48532
+ return /* @__PURE__ */ jsx("div", { className: cn("pirate-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
48533
+ IsometricCanvas_default,
48534
+ {
48535
+ tileLayout: "flat",
48536
+ tiles,
48537
+ units,
48538
+ features,
48539
+ assetManifest,
48540
+ assetBaseUrl,
48541
+ scale,
48542
+ showMinimap,
48543
+ enableCamera,
48544
+ tileClickEvent,
48545
+ unitClickEvent,
48546
+ isLoading,
48547
+ error
48548
+ }
48549
+ ) });
48550
+ }
48551
+ var init_PirateBoard = __esm({
48552
+ "components/game/organisms/PirateBoard.tsx"() {
48553
+ "use client";
48554
+ init_cn();
48555
+ init_IsometricCanvas();
48556
+ PirateBoard.displayName = "PirateBoard";
48557
+ }
48558
+ });
48064
48559
  function resolveEntity(entity) {
48065
48560
  if (!entity) return {};
48066
48561
  if (Array.isArray(entity)) return entity[0] ?? {};
@@ -48421,6 +48916,37 @@ var init_PricingPageTemplate = __esm({
48421
48916
  PricingPageTemplate.displayName = "PricingPageTemplate";
48422
48917
  }
48423
48918
  });
48919
+ function RacingBoard({
48920
+ backgroundImage,
48921
+ assetBaseUrl,
48922
+ width = 800,
48923
+ height = 600,
48924
+ fps = 60,
48925
+ tickEvent,
48926
+ drawEvent,
48927
+ className
48928
+ }) {
48929
+ return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
48930
+ GameCanvas2D,
48931
+ {
48932
+ backgroundImage,
48933
+ assetBaseUrl,
48934
+ width,
48935
+ height,
48936
+ fps,
48937
+ tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
48938
+ drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
48939
+ }
48940
+ ) });
48941
+ }
48942
+ var init_RacingBoard = __esm({
48943
+ "components/game/organisms/RacingBoard.tsx"() {
48944
+ "use client";
48945
+ init_cn();
48946
+ init_GameCanvas2D();
48947
+ RacingBoard.displayName = "RacingBoard";
48948
+ }
48949
+ });
48424
48950
  function resolveManifestUrl3(manifest, relative) {
48425
48951
  if (relative == null) return void 0;
48426
48952
  if (/^https?:\/\//.test(relative)) return relative;
@@ -48915,7 +49441,7 @@ var init_debugRegistry = __esm({
48915
49441
  }
48916
49442
  });
48917
49443
  function useDebugData() {
48918
- const [data, setData] = React93.useState(() => ({
49444
+ const [data, setData] = React94.useState(() => ({
48919
49445
  traits: [],
48920
49446
  ticks: [],
48921
49447
  guards: [],
@@ -48929,7 +49455,7 @@ function useDebugData() {
48929
49455
  },
48930
49456
  lastUpdate: Date.now()
48931
49457
  }));
48932
- React93.useEffect(() => {
49458
+ React94.useEffect(() => {
48933
49459
  const updateData = () => {
48934
49460
  setData({
48935
49461
  traits: getAllTraits(),
@@ -49038,12 +49564,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
49038
49564
  return positions;
49039
49565
  }
49040
49566
  function WalkMinimap() {
49041
- const [walkStep, setWalkStep] = React93.useState(null);
49042
- const [traits2, setTraits] = React93.useState([]);
49043
- const [coveredEdges, setCoveredEdges] = React93.useState([]);
49044
- const [completedTraits, setCompletedTraits] = React93.useState(/* @__PURE__ */ new Set());
49045
- const prevTraitRef = React93.useRef(null);
49046
- React93.useEffect(() => {
49567
+ const [walkStep, setWalkStep] = React94.useState(null);
49568
+ const [traits2, setTraits] = React94.useState([]);
49569
+ const [coveredEdges, setCoveredEdges] = React94.useState([]);
49570
+ const [completedTraits, setCompletedTraits] = React94.useState(/* @__PURE__ */ new Set());
49571
+ const prevTraitRef = React94.useRef(null);
49572
+ React94.useEffect(() => {
49047
49573
  const interval = setInterval(() => {
49048
49574
  const w = window;
49049
49575
  const step = w.__orbitalWalkStep;
@@ -49479,15 +50005,15 @@ var init_EntitiesTab = __esm({
49479
50005
  });
49480
50006
  function EventFlowTab({ events: events2 }) {
49481
50007
  const { t } = useTranslate();
49482
- const [filter, setFilter] = React93.useState("all");
49483
- const containerRef = React93.useRef(null);
49484
- const [autoScroll, setAutoScroll] = React93.useState(true);
49485
- React93.useEffect(() => {
50008
+ const [filter, setFilter] = React94.useState("all");
50009
+ const containerRef = React94.useRef(null);
50010
+ const [autoScroll, setAutoScroll] = React94.useState(true);
50011
+ React94.useEffect(() => {
49486
50012
  if (autoScroll && containerRef.current) {
49487
50013
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
49488
50014
  }
49489
50015
  }, [events2.length, autoScroll]);
49490
- const filteredEvents = React93.useMemo(() => {
50016
+ const filteredEvents = React94.useMemo(() => {
49491
50017
  if (filter === "all") return events2;
49492
50018
  return events2.filter((e) => e.type === filter);
49493
50019
  }, [events2, filter]);
@@ -49603,7 +50129,7 @@ var init_EventFlowTab = __esm({
49603
50129
  });
49604
50130
  function GuardsPanel({ guards }) {
49605
50131
  const { t } = useTranslate();
49606
- const [filter, setFilter] = React93.useState("all");
50132
+ const [filter, setFilter] = React94.useState("all");
49607
50133
  if (guards.length === 0) {
49608
50134
  return /* @__PURE__ */ jsx(
49609
50135
  EmptyState,
@@ -49616,7 +50142,7 @@ function GuardsPanel({ guards }) {
49616
50142
  }
49617
50143
  const passedCount = guards.filter((g) => g.result).length;
49618
50144
  const failedCount = guards.length - passedCount;
49619
- const filteredGuards = React93.useMemo(() => {
50145
+ const filteredGuards = React94.useMemo(() => {
49620
50146
  if (filter === "all") return guards;
49621
50147
  if (filter === "passed") return guards.filter((g) => g.result);
49622
50148
  return guards.filter((g) => !g.result);
@@ -49779,10 +50305,10 @@ function EffectBadge({ effect }) {
49779
50305
  }
49780
50306
  function TransitionTimeline({ transitions }) {
49781
50307
  const { t } = useTranslate();
49782
- const containerRef = React93.useRef(null);
49783
- const [autoScroll, setAutoScroll] = React93.useState(true);
49784
- const [expandedId, setExpandedId] = React93.useState(null);
49785
- React93.useEffect(() => {
50308
+ const containerRef = React94.useRef(null);
50309
+ const [autoScroll, setAutoScroll] = React94.useState(true);
50310
+ const [expandedId, setExpandedId] = React94.useState(null);
50311
+ React94.useEffect(() => {
49786
50312
  if (autoScroll && containerRef.current) {
49787
50313
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
49788
50314
  }
@@ -50062,9 +50588,9 @@ function getAllEvents(traits2) {
50062
50588
  function EventDispatcherTab({ traits: traits2, schema }) {
50063
50589
  const eventBus = useEventBus();
50064
50590
  const { t } = useTranslate();
50065
- const [log15, setLog] = React93.useState([]);
50066
- const prevStatesRef = React93.useRef(/* @__PURE__ */ new Map());
50067
- React93.useEffect(() => {
50591
+ const [log15, setLog] = React94.useState([]);
50592
+ const prevStatesRef = React94.useRef(/* @__PURE__ */ new Map());
50593
+ React94.useEffect(() => {
50068
50594
  for (const trait of traits2) {
50069
50595
  const prev = prevStatesRef.current.get(trait.id);
50070
50596
  if (prev && prev !== trait.currentState) {
@@ -50233,10 +50759,10 @@ function VerifyModePanel({
50233
50759
  localCount
50234
50760
  }) {
50235
50761
  const { t } = useTranslate();
50236
- const [expanded, setExpanded] = React93.useState(true);
50237
- const scrollRef = React93.useRef(null);
50238
- const prevCountRef = React93.useRef(0);
50239
- React93.useEffect(() => {
50762
+ const [expanded, setExpanded] = React94.useState(true);
50763
+ const scrollRef = React94.useRef(null);
50764
+ const prevCountRef = React94.useRef(0);
50765
+ React94.useEffect(() => {
50240
50766
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
50241
50767
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
50242
50768
  }
@@ -50293,10 +50819,10 @@ function RuntimeDebugger({
50293
50819
  schema
50294
50820
  }) {
50295
50821
  const { t } = useTranslate();
50296
- const [isCollapsed, setIsCollapsed] = React93.useState(mode === "verify" ? true : defaultCollapsed);
50297
- const [isVisible, setIsVisible] = React93.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
50822
+ const [isCollapsed, setIsCollapsed] = React94.useState(mode === "verify" ? true : defaultCollapsed);
50823
+ const [isVisible, setIsVisible] = React94.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
50298
50824
  const debugData = useDebugData();
50299
- React93.useEffect(() => {
50825
+ React94.useEffect(() => {
50300
50826
  if (mode === "inline") return;
50301
50827
  return onDebugToggle((enabled) => {
50302
50828
  setIsVisible(enabled);
@@ -50305,7 +50831,7 @@ function RuntimeDebugger({
50305
50831
  }
50306
50832
  });
50307
50833
  }, [mode]);
50308
- React93.useEffect(() => {
50834
+ React94.useEffect(() => {
50309
50835
  if (mode === "inline") return;
50310
50836
  const handleKeyDown = (e) => {
50311
50837
  if (e.key === "`" && isVisible) {
@@ -50865,7 +51391,7 @@ function SequenceBar({
50865
51391
  onSlotRemove(index);
50866
51392
  }, [onSlotRemove, playing]);
50867
51393
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
50868
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
51394
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
50869
51395
  i > 0 && /* @__PURE__ */ jsx(
50870
51396
  Typography,
50871
51397
  {
@@ -51626,6 +52152,123 @@ var init_SimulatorBoard = __esm({
51626
52152
  SimulatorBoard.displayName = "SimulatorBoard";
51627
52153
  }
51628
52154
  });
52155
+ function SokobanBoard({
52156
+ tiles,
52157
+ units,
52158
+ features,
52159
+ assetManifest,
52160
+ assetBaseUrl,
52161
+ scale = 0.45,
52162
+ showMinimap = false,
52163
+ enableCamera = false,
52164
+ tileClickEvent,
52165
+ unitClickEvent,
52166
+ isLoading,
52167
+ error,
52168
+ className
52169
+ }) {
52170
+ return /* @__PURE__ */ jsx("div", { className: cn("sokoban-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
52171
+ IsometricCanvas_default,
52172
+ {
52173
+ tileLayout: "flat",
52174
+ tiles,
52175
+ units,
52176
+ features,
52177
+ assetManifest,
52178
+ assetBaseUrl,
52179
+ scale,
52180
+ showMinimap,
52181
+ enableCamera,
52182
+ tileClickEvent,
52183
+ unitClickEvent,
52184
+ isLoading,
52185
+ error
52186
+ }
52187
+ ) });
52188
+ }
52189
+ var init_SokobanBoard = __esm({
52190
+ "components/game/organisms/SokobanBoard.tsx"() {
52191
+ "use client";
52192
+ init_cn();
52193
+ init_IsometricCanvas();
52194
+ SokobanBoard.displayName = "SokobanBoard";
52195
+ }
52196
+ });
52197
+ function SpaceShmupBoard({
52198
+ backgroundImage,
52199
+ assetBaseUrl,
52200
+ width = 800,
52201
+ height = 600,
52202
+ fps = 60,
52203
+ isLoading,
52204
+ error,
52205
+ className
52206
+ }) {
52207
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
52208
+ isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
52209
+ error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-red-900/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: error.message }) }),
52210
+ /* @__PURE__ */ jsx(
52211
+ GameCanvas2D,
52212
+ {
52213
+ backgroundImage,
52214
+ assetBaseUrl,
52215
+ width,
52216
+ height,
52217
+ fps
52218
+ }
52219
+ )
52220
+ ] });
52221
+ }
52222
+ var init_SpaceShmupBoard = __esm({
52223
+ "components/game/organisms/SpaceShmupBoard.tsx"() {
52224
+ "use client";
52225
+ init_cn();
52226
+ init_GameCanvas2D();
52227
+ SpaceShmupBoard.displayName = "SpaceShmupBoard";
52228
+ }
52229
+ });
52230
+ function SpaceStationBoard({
52231
+ tiles,
52232
+ units,
52233
+ features,
52234
+ assetManifest,
52235
+ assetBaseUrl,
52236
+ scale = 0.45,
52237
+ showMinimap = true,
52238
+ enableCamera = true,
52239
+ tileClickEvent,
52240
+ unitClickEvent,
52241
+ isLoading,
52242
+ error,
52243
+ className
52244
+ }) {
52245
+ return /* @__PURE__ */ jsx("div", { className: cn("space-station-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
52246
+ IsometricCanvas_default,
52247
+ {
52248
+ tileLayout: "isometric",
52249
+ tiles,
52250
+ units,
52251
+ features,
52252
+ assetManifest,
52253
+ assetBaseUrl,
52254
+ scale,
52255
+ showMinimap,
52256
+ enableCamera,
52257
+ tileClickEvent,
52258
+ unitClickEvent,
52259
+ isLoading,
52260
+ error
52261
+ }
52262
+ ) });
52263
+ }
52264
+ var init_SpaceStationBoard = __esm({
52265
+ "components/game/organisms/SpaceStationBoard.tsx"() {
52266
+ "use client";
52267
+ init_cn();
52268
+ init_IsometricCanvas();
52269
+ SpaceStationBoard.displayName = "SpaceStationBoard";
52270
+ }
52271
+ });
51629
52272
  var SplitPane;
51630
52273
  var init_SplitPane = __esm({
51631
52274
  "components/core/organisms/layout/SplitPane.tsx"() {
@@ -51719,6 +52362,48 @@ var init_SplitPane = __esm({
51719
52362
  SplitPane.displayName = "SplitPane";
51720
52363
  }
51721
52364
  });
52365
+ function SportsBoard({
52366
+ tiles,
52367
+ units,
52368
+ features,
52369
+ assetManifest,
52370
+ assetBaseUrl,
52371
+ scale = 0.45,
52372
+ showMinimap = false,
52373
+ enableCamera = true,
52374
+ tileClickEvent,
52375
+ unitClickEvent,
52376
+ isLoading,
52377
+ error,
52378
+ className
52379
+ }) {
52380
+ return /* @__PURE__ */ jsx("div", { className: cn("sports-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
52381
+ IsometricCanvas_default,
52382
+ {
52383
+ tileLayout: "flat",
52384
+ tiles,
52385
+ units,
52386
+ features,
52387
+ assetManifest,
52388
+ assetBaseUrl,
52389
+ scale,
52390
+ showMinimap,
52391
+ enableCamera,
52392
+ tileClickEvent,
52393
+ unitClickEvent,
52394
+ isLoading,
52395
+ error
52396
+ }
52397
+ ) });
52398
+ }
52399
+ var init_SportsBoard = __esm({
52400
+ "components/game/organisms/SportsBoard.tsx"() {
52401
+ "use client";
52402
+ init_cn();
52403
+ init_IsometricCanvas();
52404
+ SportsBoard.displayName = "SportsBoard";
52405
+ }
52406
+ });
51722
52407
  var StatCard;
51723
52408
  var init_StatCard = __esm({
51724
52409
  "components/core/organisms/StatCard.tsx"() {
@@ -51757,7 +52442,7 @@ var init_StatCard = __esm({
51757
52442
  const labelToUse = propLabel ?? propTitle;
51758
52443
  const eventBus = useEventBus();
51759
52444
  const { t } = useTranslate();
51760
- const handleActionClick = React93__default.useCallback(() => {
52445
+ const handleActionClick = React94__default.useCallback(() => {
51761
52446
  if (action?.event) {
51762
52447
  eventBus.emit(`UI:${action.event}`, {});
51763
52448
  }
@@ -51768,7 +52453,7 @@ var init_StatCard = __esm({
51768
52453
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
51769
52454
  const isLoading = externalLoading ?? false;
51770
52455
  const error = externalError;
51771
- const computeMetricValue = React93__default.useCallback(
52456
+ const computeMetricValue = React94__default.useCallback(
51772
52457
  (metric, items) => {
51773
52458
  if (metric.value !== void 0) {
51774
52459
  return metric.value;
@@ -51807,7 +52492,7 @@ var init_StatCard = __esm({
51807
52492
  },
51808
52493
  []
51809
52494
  );
51810
- const schemaStats = React93__default.useMemo(() => {
52495
+ const schemaStats = React94__default.useMemo(() => {
51811
52496
  if (!metrics || metrics.length === 0) return null;
51812
52497
  return metrics.map((metric) => ({
51813
52498
  label: metric.label,
@@ -51815,7 +52500,7 @@ var init_StatCard = __esm({
51815
52500
  format: metric.format
51816
52501
  }));
51817
52502
  }, [metrics, data, computeMetricValue]);
51818
- const calculatedTrend = React93__default.useMemo(() => {
52503
+ const calculatedTrend = React94__default.useMemo(() => {
51819
52504
  if (manualTrend !== void 0) return manualTrend;
51820
52505
  if (previousValue === void 0 || currentValue === void 0)
51821
52506
  return void 0;
@@ -52564,6 +53249,832 @@ var init_StepFlowOrganism = __esm({
52564
53249
  StepFlowOrganism.displayName = "StepFlowOrganism";
52565
53250
  }
52566
53251
  });
53252
+
53253
+ // components/core/molecules/markdown/index.ts
53254
+ var init_markdown = __esm({
53255
+ "components/core/molecules/markdown/index.ts"() {
53256
+ init_MarkdownContent();
53257
+ init_CodeBlock();
53258
+ }
53259
+ });
53260
+ function groupByOrbital(subagents) {
53261
+ const map = /* @__PURE__ */ new Map();
53262
+ for (const sub of subagents) {
53263
+ const key = sub.orbitalName ?? "(unattached)";
53264
+ const arr = map.get(key) ?? [];
53265
+ arr.push(sub);
53266
+ map.set(key, arr);
53267
+ }
53268
+ return map;
53269
+ }
53270
+ function statusIconName(status) {
53271
+ switch (status) {
53272
+ case "running":
53273
+ return "loader";
53274
+ case "complete":
53275
+ return "check";
53276
+ case "error":
53277
+ return "x";
53278
+ default:
53279
+ return "circle";
53280
+ }
53281
+ }
53282
+ function lastMessage(sub) {
53283
+ if (sub.messages.length === 0) return void 0;
53284
+ return sub.messages[sub.messages.length - 1].message;
53285
+ }
53286
+ function formatHHMMSS(ts) {
53287
+ const d = new Date(ts);
53288
+ const hh = String(d.getHours()).padStart(2, "0");
53289
+ const mm = String(d.getMinutes()).padStart(2, "0");
53290
+ const ss = String(d.getSeconds()).padStart(2, "0");
53291
+ return `${hh}:${mm}:${ss}`;
53292
+ }
53293
+ function compactJson(value) {
53294
+ if (value === void 0 || value === null) return "";
53295
+ if (typeof value === "string") return value;
53296
+ try {
53297
+ const json = JSON.stringify(value);
53298
+ if (json.length <= 240) return json;
53299
+ return json.slice(0, 239) + "\u2026";
53300
+ } catch {
53301
+ return String(value);
53302
+ }
53303
+ }
53304
+ function tryPrettyJson(s) {
53305
+ try {
53306
+ return JSON.stringify(JSON.parse(s), null, 2);
53307
+ } catch {
53308
+ return null;
53309
+ }
53310
+ }
53311
+ function summarizeArgs(args) {
53312
+ const keys = Object.keys(args);
53313
+ if (keys.length === 0) return "";
53314
+ return keys.slice(0, 3).join(", ") + (keys.length > 3 ? ", \u2026" : "");
53315
+ }
53316
+ function previewText(text, max = 120) {
53317
+ if (!text) return "";
53318
+ return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
53319
+ }
53320
+ function coordinatorToActivityItems(activities) {
53321
+ return activities.flatMap((a) => {
53322
+ switch (a.type) {
53323
+ case "tool_call":
53324
+ return [{
53325
+ type: "tool_call",
53326
+ tool: a.tool,
53327
+ args: a.args,
53328
+ timestamp: a.timestamp
53329
+ }];
53330
+ case "tool_result":
53331
+ return [{
53332
+ type: "tool_result",
53333
+ tool: a.tool,
53334
+ result: a.result,
53335
+ success: a.success,
53336
+ timestamp: a.timestamp
53337
+ }];
53338
+ case "message":
53339
+ return [{
53340
+ type: "message",
53341
+ role: a.role,
53342
+ content: a.content,
53343
+ timestamp: a.timestamp
53344
+ }];
53345
+ case "error":
53346
+ return [{
53347
+ type: "message",
53348
+ role: "system",
53349
+ content: `Error: ${a.message}`,
53350
+ timestamp: a.timestamp
53351
+ }];
53352
+ case "coordinator_decision":
53353
+ case "plan_committed":
53354
+ case "pending_question":
53355
+ case "clarification_question":
53356
+ return [];
53357
+ case "file_operation":
53358
+ return [{
53359
+ type: "file_operation",
53360
+ operation: a.operation,
53361
+ path: a.path,
53362
+ success: a.success,
53363
+ timestamp: a.timestamp
53364
+ }];
53365
+ case "schema_diff":
53366
+ return [{
53367
+ type: "schema_diff",
53368
+ filePath: a.filePath,
53369
+ hunks: a.hunks,
53370
+ timestamp: a.timestamp
53371
+ }];
53372
+ }
53373
+ });
53374
+ }
53375
+ function pluckCoordinatorState(activities) {
53376
+ let decision = null;
53377
+ let plan = null;
53378
+ const pendingQuestions = [];
53379
+ for (const a of activities) {
53380
+ if (a.type === "coordinator_decision") decision = a;
53381
+ else if (a.type === "plan_committed") plan = a;
53382
+ else if (a.type === "pending_question") pendingQuestions.push(a);
53383
+ }
53384
+ return { decision, plan, pendingQuestions };
53385
+ }
53386
+ function subagentMessagesToActivities(messages) {
53387
+ return messages.map((m) => {
53388
+ if (m.tool) {
53389
+ return {
53390
+ type: "tool_call",
53391
+ tool: m.tool,
53392
+ args: { preview: m.message },
53393
+ timestamp: m.timestamp
53394
+ };
53395
+ }
53396
+ return {
53397
+ type: "message",
53398
+ role: "system",
53399
+ content: m.message,
53400
+ timestamp: m.timestamp
53401
+ };
53402
+ });
53403
+ }
53404
+ function buildTimelineItems(messages, activities, subagents) {
53405
+ const items = [];
53406
+ if (messages) {
53407
+ messages.forEach((m, i) => items.push({ source: "message", data: m, index: i }));
53408
+ }
53409
+ if (activities) {
53410
+ activities.forEach((a) => items.push({ source: "activity", data: a }));
53411
+ }
53412
+ subagents.forEach((s) => items.push({ source: "subagent", data: s }));
53413
+ return items;
53414
+ }
53415
+ function timelineItemIcon(item) {
53416
+ switch (item.source) {
53417
+ case "message": {
53418
+ const m = item.data;
53419
+ if (m.role === "tool") return { name: "terminal", color: "text-[var(--color-primary)]" };
53420
+ if (m.reasoningContent) return { name: "sparkles", color: "text-[var(--color-primary)]" };
53421
+ if (m.role === "user") return { name: "user", color: "text-[var(--color-primary)]" };
53422
+ return { name: "message-square", color: "text-[var(--color-muted-foreground)]" };
53423
+ }
53424
+ case "activity": {
53425
+ const a = item.data;
53426
+ switch (a.type) {
53427
+ case "tool_call":
53428
+ return { name: "terminal", color: "text-[var(--color-primary)]" };
53429
+ case "tool_result":
53430
+ return { name: a.success !== false ? "check" : "x", color: a.success !== false ? "text-[var(--color-success)]" : "text-[var(--color-danger)]" };
53431
+ case "error":
53432
+ return { name: "alert-triangle", color: "text-[var(--color-danger)]" };
53433
+ case "file_operation":
53434
+ return { name: "file", color: "text-[var(--color-muted-foreground)]" };
53435
+ case "schema_diff":
53436
+ return { name: "git-commit", color: "text-[var(--color-muted-foreground)]" };
53437
+ default:
53438
+ return { name: "info", color: "text-[var(--color-muted-foreground)]" };
53439
+ }
53440
+ }
53441
+ case "subagent":
53442
+ return { name: "bot", color: "text-[var(--color-primary)]" };
53443
+ }
53444
+ }
53445
+ function timelineItemLabel(item) {
53446
+ switch (item.source) {
53447
+ case "message": {
53448
+ const m = item.data;
53449
+ if (m.role === "tool") return "tool";
53450
+ if (m.reasoningContent) return "thinking";
53451
+ return m.role;
53452
+ }
53453
+ case "activity":
53454
+ return item.data.type;
53455
+ case "subagent":
53456
+ return "subagent";
53457
+ }
53458
+ }
53459
+ function timelineItemPreview(item) {
53460
+ switch (item.source) {
53461
+ case "message": {
53462
+ const m = item.data;
53463
+ if (m.role === "tool") return `${m.toolName ?? "tool"} \u2192 ${m.toolCallId?.slice(0, 8) ?? ""}`;
53464
+ if (m.reasoningContent) return previewText(m.reasoningContent, 120);
53465
+ return previewText(m.content, 120);
53466
+ }
53467
+ case "activity": {
53468
+ const a = item.data;
53469
+ switch (a.type) {
53470
+ case "tool_call":
53471
+ return `${a.tool}(${summarizeArgs(a.args)})`;
53472
+ case "tool_result":
53473
+ return `${a.tool}: ${compactJson(a.result)}`;
53474
+ case "message":
53475
+ return previewText(a.content, 120);
53476
+ case "error":
53477
+ return previewText(a.message, 120);
53478
+ case "file_operation":
53479
+ return `${a.operation} ${a.path}`;
53480
+ case "schema_diff":
53481
+ return `diff ${a.filePath}`;
53482
+ default:
53483
+ return String(a.type);
53484
+ }
53485
+ }
53486
+ case "subagent":
53487
+ return `${item.data.name} \xB7 ${item.data.task}`;
53488
+ }
53489
+ }
53490
+ function timelineItemTimeLabel(item) {
53491
+ if (item.source === "activity") return formatHHMMSS(item.data.timestamp);
53492
+ if (item.source === "subagent") {
53493
+ const ts = item.data.messages[0]?.timestamp;
53494
+ return ts !== void 0 ? formatHHMMSS(ts) : void 0;
53495
+ }
53496
+ return void 0;
53497
+ }
53498
+ function TraceDetailContent({ item }) {
53499
+ const { t } = useTranslate();
53500
+ switch (item.source) {
53501
+ case "message": {
53502
+ const m = item.data;
53503
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53504
+ /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center", children: /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[m.role], className: "text-[10px] uppercase", children: m.role }) }),
53505
+ typeof m.reasoningContent === "string" && m.reasoningContent.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
53506
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.reasoning") }),
53507
+ /* @__PURE__ */ jsx(MarkdownContent, { content: m.reasoningContent })
53508
+ ] }),
53509
+ m.content.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
53510
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.content") }),
53511
+ m.role === "tool" ? (() => {
53512
+ const pretty = tryPrettyJson(m.content);
53513
+ return pretty !== null ? /* @__PURE__ */ jsx(CodeBlock, { code: pretty, language: "json", maxHeight: "24rem" }) : /* @__PURE__ */ jsx(Typography, { variant: "body", className: "whitespace-pre-wrap font-mono text-[11px]", children: m.content });
53514
+ })() : /* @__PURE__ */ jsx(MarkdownContent, { content: m.content })
53515
+ ] }),
53516
+ Array.isArray(m.toolCalls) && m.toolCalls.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
53517
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.toolCalls") }),
53518
+ /* @__PURE__ */ jsx(
53519
+ Accordion,
53520
+ {
53521
+ multiple: true,
53522
+ items: m.toolCalls.map((tc, i) => ({
53523
+ id: `tc-detail-${i}`,
53524
+ title: `${tc.name}(${summarizeArgs(tc.args)})`,
53525
+ content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
53526
+ }))
53527
+ }
53528
+ )
53529
+ ] })
53530
+ ] });
53531
+ }
53532
+ case "activity": {
53533
+ const a = item.data;
53534
+ switch (a.type) {
53535
+ case "tool_call":
53536
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53537
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53538
+ /* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: "tool_call" }),
53539
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
53540
+ ] }),
53541
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
53542
+ /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.args, null, 2), language: "json", maxHeight: "60vh" })
53543
+ ] });
53544
+ case "tool_result":
53545
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53546
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53547
+ /* @__PURE__ */ jsx(Badge, { variant: a.success !== false ? "default" : "warning", className: "text-[10px]", children: a.success !== false ? "success" : "fail" }),
53548
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
53549
+ ] }),
53550
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
53551
+ /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.result, null, 2), language: "json", maxHeight: "60vh" })
53552
+ ] });
53553
+ case "message":
53554
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53555
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53556
+ /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: a.role }),
53557
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
53558
+ ] }),
53559
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap", children: a.content })
53560
+ ] });
53561
+ case "error":
53562
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53563
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53564
+ /* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "error" }),
53565
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
53566
+ ] }),
53567
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap text-[var(--color-danger)]", children: a.message })
53568
+ ] });
53569
+ case "file_operation":
53570
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53571
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53572
+ /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "file" }),
53573
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
53574
+ ] }),
53575
+ /* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
53576
+ a.operation,
53577
+ " ",
53578
+ a.path
53579
+ ] })
53580
+ ] });
53581
+ case "schema_diff":
53582
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53583
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53584
+ /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "diff" }),
53585
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
53586
+ ] }),
53587
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.filePath })
53588
+ ] });
53589
+ default:
53590
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53591
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) }),
53592
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", children: String(a.type) })
53593
+ ] });
53594
+ }
53595
+ }
53596
+ case "subagent": {
53597
+ const s = item.data;
53598
+ const activities = subagentMessagesToActivities(s.messages);
53599
+ const ts = s.messages[0]?.timestamp;
53600
+ return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
53601
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53602
+ /* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: s.role }),
53603
+ ts !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(ts) })
53604
+ ] }),
53605
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: s.name }),
53606
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: s.task }),
53607
+ activities.length > 0 && /* @__PURE__ */ jsx(Box, { className: "border-t border-[var(--color-border)] pt-2", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: false }) })
53608
+ ] });
53609
+ }
53610
+ }
53611
+ }
53612
+ var InlineActivityRow, InlineActivityStream, CoordinatorCard, SubagentRow, OrbitalGroup, SubagentRichCard, roleBadgeVariant, ChatMessageRow, CoordinatorConversation, SubagentTracePanel;
53613
+ var init_SubagentTracePanel = __esm({
53614
+ "components/core/organisms/SubagentTracePanel.tsx"() {
53615
+ "use client";
53616
+ init_Box();
53617
+ init_Stack();
53618
+ init_Typography();
53619
+ init_Badge();
53620
+ init_Icon();
53621
+ init_Button();
53622
+ init_Modal();
53623
+ init_Accordion();
53624
+ init_markdown();
53625
+ InlineActivityRow = ({ activity }) => {
53626
+ const time = formatHHMMSS(activity.timestamp);
53627
+ const baseRow = "items-start px-3 py-1 hover:bg-[var(--color-surface)]";
53628
+ if (activity.type === "tool_call") {
53629
+ return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
53630
+ /* @__PURE__ */ jsx(Icon, { name: "terminal", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-primary)]" }),
53631
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
53632
+ /* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", weight: "semibold", className: "text-[11px] font-mono", children: activity.tool }),
53633
+ activity.args !== void 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
53634
+ " ",
53635
+ compactJson(activity.args)
53636
+ ] })
53637
+ ] }),
53638
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
53639
+ ] });
53640
+ }
53641
+ if (activity.type === "tool_result") {
53642
+ const success = activity.success !== false;
53643
+ return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
53644
+ /* @__PURE__ */ jsx(
53645
+ Icon,
53646
+ {
53647
+ name: success ? "check" : "x",
53648
+ size: "xs",
53649
+ className: `mt-0.5 flex-shrink-0 ${success ? "text-[var(--color-success)]" : "text-[var(--color-danger)]"}`
53650
+ }
53651
+ ),
53652
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
53653
+ /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
53654
+ activity.tool,
53655
+ ":",
53656
+ " "
53657
+ ] }),
53658
+ /* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "text-[11px] font-mono", children: compactJson(activity.result) })
53659
+ ] }),
53660
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
53661
+ ] });
53662
+ }
53663
+ if (activity.type === "message") {
53664
+ const role = activity.role;
53665
+ const iconName = role === "user" ? "user" : role === "system" ? "info" : "sparkles";
53666
+ const roleColor = role === "user" ? "text-[var(--color-primary)]" : role === "system" ? "text-[var(--color-muted-foreground)]" : "text-[var(--color-foreground)]";
53667
+ return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
53668
+ /* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `mt-0.5 flex-shrink-0 ${roleColor}` }),
53669
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] whitespace-pre-wrap break-words", children: activity.content }),
53670
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
53671
+ ] });
53672
+ }
53673
+ if (activity.type === "error") {
53674
+ return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
53675
+ /* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-danger)]" }),
53676
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] text-[var(--color-danger)] whitespace-pre-wrap break-words", children: activity.message }),
53677
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
53678
+ ] });
53679
+ }
53680
+ return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
53681
+ /* @__PURE__ */ jsx(Icon, { name: "file", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-muted-foreground)]" }),
53682
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "flex-1 min-w-0 text-[11px] font-mono break-all", children: [
53683
+ "[",
53684
+ activity.type,
53685
+ "] ",
53686
+ compactJson(activity)
53687
+ ] }),
53688
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
53689
+ ] });
53690
+ };
53691
+ InlineActivityStream = ({ activities, autoScroll = true, className }) => {
53692
+ const endRef = React94__default.useRef(null);
53693
+ React94__default.useEffect(() => {
53694
+ if (!autoScroll) return;
53695
+ endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
53696
+ }, [activities.length, autoScroll]);
53697
+ return /* @__PURE__ */ jsxs(Box, { className, children: [
53698
+ activities.map((a, i) => /* @__PURE__ */ jsx(InlineActivityRow, { activity: a }, `${a.timestamp}-${i}`)),
53699
+ /* @__PURE__ */ jsx(Box, { ref: endRef })
53700
+ ] });
53701
+ };
53702
+ CoordinatorCard = ({ snapshot, className }) => {
53703
+ const { t } = useTranslate();
53704
+ const { decision, plan, pendingQuestions } = snapshot;
53705
+ if (!decision && !plan && pendingQuestions.length === 0) return null;
53706
+ return /* @__PURE__ */ jsxs(
53707
+ Box,
53708
+ {
53709
+ className: `px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-muted)]/30 ${className ?? ""}`,
53710
+ children: [
53711
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-2", children: [
53712
+ /* @__PURE__ */ jsx(Icon, { name: "compass", size: "xs" }),
53713
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") })
53714
+ ] }),
53715
+ decision && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
53716
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53717
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide", children: t("subagentTrace.organism") }),
53718
+ /* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: decision.organism }),
53719
+ decision.priorOrganism && decision.priorOrganism !== decision.organism && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.wasOrganism", { organism: decision.priorOrganism }) })
53720
+ ] }),
53721
+ decision.reason && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[11px] mt-0.5", children: decision.reason })
53722
+ ] }),
53723
+ plan && plan.orbitals.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
53724
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide mb-0.5", children: plan.orbitals.length === 1 ? t("subagentTrace.planOrbital", { count: plan.orbitals.length }) : t("subagentTrace.planOrbitals", { count: plan.orbitals.length }) }),
53725
+ /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: plan.orbitals.map((o) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: o }, o)) })
53726
+ ] }),
53727
+ pendingQuestions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
53728
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide mb-0.5", children: pendingQuestions.length === 1 ? t("subagentTrace.pendingQuestion", { count: pendingQuestions.length }) : t("subagentTrace.pendingQuestions", { count: pendingQuestions.length }) }),
53729
+ pendingQuestions.map((q) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-start", children: [
53730
+ /* @__PURE__ */ jsx(Icon, { name: "help-circle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-warning)]" }),
53731
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[11px] flex-1 min-w-0", children: [
53732
+ q.question,
53733
+ q.orbitalName && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px] ml-1", children: [
53734
+ "(",
53735
+ q.orbitalName,
53736
+ ")"
53737
+ ] })
53738
+ ] })
53739
+ ] }, q.questionId))
53740
+ ] })
53741
+ ]
53742
+ }
53743
+ );
53744
+ };
53745
+ SubagentRow = ({ subagent }) => {
53746
+ const recent = lastMessage(subagent);
53747
+ return /* @__PURE__ */ jsxs(
53748
+ HStack,
53749
+ {
53750
+ gap: "sm",
53751
+ className: "items-start px-3 py-2 border-b border-[var(--color-border)]",
53752
+ children: [
53753
+ /* @__PURE__ */ jsx(Box, { className: "pt-0.5", children: /* @__PURE__ */ jsx(Icon, { name: statusIconName(subagent.status), size: "xs" }) }),
53754
+ /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
53755
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
53756
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-medium truncate", children: subagent.name }),
53757
+ /* @__PURE__ */ jsx(Badge, { variant: "default", children: subagent.role })
53758
+ ] }),
53759
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "truncate", children: recent ?? subagent.task })
53760
+ ] })
53761
+ ]
53762
+ }
53763
+ );
53764
+ };
53765
+ OrbitalGroup = ({ orbitalName, subagents }) => {
53766
+ const { t } = useTranslate();
53767
+ const runningCount = subagents.filter((s) => s.status === "running").length;
53768
+ const completeCount = subagents.filter((s) => s.status === "complete").length;
53769
+ return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)]", children: [
53770
+ /* @__PURE__ */ jsxs(
53771
+ HStack,
53772
+ {
53773
+ gap: "sm",
53774
+ className: "items-center px-3 py-2 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
53775
+ children: [
53776
+ /* @__PURE__ */ jsx(Icon, { name: "circle", size: "xs" }),
53777
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: orbitalName }),
53778
+ /* @__PURE__ */ jsx(Badge, { variant: "default", children: runningCount > 0 ? t("subagentTrace.countRunning", { count: runningCount }) : t("subagentTrace.countDone", { count: completeCount }) })
53779
+ ]
53780
+ }
53781
+ ),
53782
+ subagents.map((sub) => /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id))
53783
+ ] });
53784
+ };
53785
+ SubagentRichCard = ({ subagent }) => {
53786
+ const { t } = useTranslate();
53787
+ const activities = React94__default.useMemo(
53788
+ () => subagentMessagesToActivities(subagent.messages),
53789
+ [subagent.messages]
53790
+ );
53791
+ return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)] p-3", children: [
53792
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center mb-2", children: [
53793
+ /* @__PURE__ */ jsx(
53794
+ Box,
53795
+ {
53796
+ style: {
53797
+ width: 8,
53798
+ height: 8,
53799
+ borderRadius: "50%",
53800
+ flexShrink: 0,
53801
+ backgroundColor: subagent.status === "complete" ? "var(--color-success)" : subagent.status === "error" ? "var(--color-error)" : "var(--color-primary)",
53802
+ ...subagent.status === "running" ? { animation: "pulse 1.5s infinite" } : {}
53803
+ }
53804
+ }
53805
+ ),
53806
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: subagent.name }),
53807
+ /* @__PURE__ */ jsx(Badge, { variant: subagent.role === "deterministic" ? "default" : subagent.role === "llm" ? "info" : "warning", children: subagent.role }),
53808
+ subagent.durationMs !== void 0 && subagent.durationMs > 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subagent.durationMs < 1e3 ? `${subagent.durationMs}ms` : `${(subagent.durationMs / 1e3).toFixed(1)}s` })
53809
+ ] }),
53810
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-2", children: subagent.task }),
53811
+ activities.length > 0 ? /* @__PURE__ */ jsx(Box, { className: "max-h-64 overflow-y-auto border-t border-[var(--color-border)]", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: true }) }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "italic text-[10px]", children: subagent.status === "complete" ? t("subagentTrace.noConversationLog") : t("subagentTrace.waitingForProcessData") })
53812
+ ] });
53813
+ };
53814
+ roleBadgeVariant = {
53815
+ system: "neutral",
53816
+ user: "info",
53817
+ assistant: "default",
53818
+ tool: "warning"
53819
+ };
53820
+ ChatMessageRow = ({ message, index }) => {
53821
+ const { t } = useTranslate();
53822
+ const { role, content, toolCalls, reasoningContent, toolCallId, toolName } = message;
53823
+ if (role === "tool") {
53824
+ const pretty = tryPrettyJson(content);
53825
+ const title = `${toolName ?? "tool"} \u2192${toolCallId ? ` ${toolCallId.slice(0, 8)}` : ""}`;
53826
+ const body = pretty !== null ? /* @__PURE__ */ jsx(CodeBlock, { code: pretty, language: "json", maxHeight: "24rem" }) : /* @__PURE__ */ jsx(Typography, { variant: "body", className: "whitespace-pre-wrap font-mono text-[11px]", children: content });
53827
+ const items = [{ id: `tool-${index}`, title, content: body }];
53828
+ return /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx(Accordion, { items }) });
53829
+ }
53830
+ const hasReasoning = typeof reasoningContent === "string" && reasoningContent.length > 0;
53831
+ const hasToolCalls = Array.isArray(toolCalls) && toolCalls.length > 0;
53832
+ return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
53833
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53834
+ /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[role], className: "text-[10px] uppercase", children: role }),
53835
+ hasReasoning && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
53836
+ "\xB7 ",
53837
+ t("subagentTrace.thinking")
53838
+ ] }),
53839
+ hasToolCalls && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
53840
+ "\xB7 ",
53841
+ toolCalls.length === 1 ? t("subagentTrace.toolCallCount", { count: toolCalls.length }) : t("subagentTrace.toolCallCountPlural", { count: toolCalls.length })
53842
+ ] })
53843
+ ] }),
53844
+ hasReasoning && /* @__PURE__ */ jsx(Accordion, { items: [{
53845
+ id: `reasoning-${index}`,
53846
+ title: t("subagentTrace.reasoning"),
53847
+ content: /* @__PURE__ */ jsx(MarkdownContent, { content: reasoningContent })
53848
+ }] }),
53849
+ content.length > 0 && /* @__PURE__ */ jsx(MarkdownContent, { content }),
53850
+ hasToolCalls && /* @__PURE__ */ jsx(
53851
+ Accordion,
53852
+ {
53853
+ multiple: true,
53854
+ items: toolCalls.map((tc, i) => ({
53855
+ id: `tc-${index}-${i}`,
53856
+ title: `${tc.name}(${summarizeArgs(tc.args)})`,
53857
+ content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
53858
+ }))
53859
+ }
53860
+ )
53861
+ ] });
53862
+ };
53863
+ CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
53864
+ const endRef = React94__default.useRef(null);
53865
+ React94__default.useEffect(() => {
53866
+ if (!autoScroll) return;
53867
+ endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
53868
+ }, [messages.length, autoScroll]);
53869
+ return /* @__PURE__ */ jsxs(Box, { className, children: [
53870
+ messages.map((m, i) => /* @__PURE__ */ jsx(ChatMessageRow, { message: m, index: i }, `msg-${i}`)),
53871
+ /* @__PURE__ */ jsx(Box, { ref: endRef })
53872
+ ] });
53873
+ };
53874
+ SubagentTracePanel = ({
53875
+ subagents,
53876
+ focusedOrbital,
53877
+ disclosureLevel,
53878
+ open,
53879
+ onClose,
53880
+ className,
53881
+ mode = "overlay",
53882
+ coordinatorActivities,
53883
+ coordinatorMessages
53884
+ }) => {
53885
+ const { t } = useTranslate();
53886
+ const [selectedItem, setSelectedItem] = useState(null);
53887
+ const densityLabel = (rich) => rich ? t("subagentTrace.densityRich") : t("subagentTrace.densityCompact");
53888
+ if (mode === "overlay" && !open) return null;
53889
+ const isTabMode = mode === "tab";
53890
+ const isRichMode = isTabMode || disclosureLevel >= 3;
53891
+ if (isTabMode) {
53892
+ const timelineItems = buildTimelineItems(coordinatorMessages, coordinatorActivities, subagents);
53893
+ const hasData = timelineItems.length > 0;
53894
+ return /* @__PURE__ */ jsxs(Box, { className: `h-full w-full bg-[var(--color-card)] overflow-hidden flex flex-col ${className ?? ""}`, children: [
53895
+ /* @__PURE__ */ jsxs(
53896
+ HStack,
53897
+ {
53898
+ gap: "sm",
53899
+ className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
53900
+ children: [
53901
+ /* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
53902
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.trace") }),
53903
+ onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
53904
+ ]
53905
+ }
53906
+ ),
53907
+ !hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-4", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "text-center", children: t("subagentTrace.noAgentActivity") }) }),
53908
+ hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: timelineItems.map((item, i) => {
53909
+ const { name: iconName, color: iconColor } = timelineItemIcon(item);
53910
+ const isLast = i === timelineItems.length - 1;
53911
+ return /* @__PURE__ */ jsxs(
53912
+ Box,
53913
+ {
53914
+ className: "flex items-start px-3 py-2 border-b border-[var(--color-border)] hover:bg-[var(--color-muted)]/30 transition-colors duration-fast cursor-pointer",
53915
+ onClick: () => setSelectedItem(item),
53916
+ children: [
53917
+ /* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center mr-3 mt-0.5", style: { width: 20 }, children: [
53918
+ /* @__PURE__ */ jsx(
53919
+ Box,
53920
+ {
53921
+ className: "rounded-full flex-shrink-0",
53922
+ style: {
53923
+ width: 8,
53924
+ height: 8,
53925
+ backgroundColor: "var(--color-primary)"
53926
+ }
53927
+ }
53928
+ ),
53929
+ !isLast && /* @__PURE__ */ jsx(
53930
+ Box,
53931
+ {
53932
+ className: "flex-1",
53933
+ style: {
53934
+ width: 2,
53935
+ backgroundColor: "var(--color-border)",
53936
+ marginTop: 4,
53937
+ minHeight: 24
53938
+ }
53939
+ }
53940
+ )
53941
+ ] }),
53942
+ /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
53943
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
53944
+ /* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `flex-shrink-0 ${iconColor}` }),
53945
+ timelineItemTimeLabel(item) && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: timelineItemTimeLabel(item) }),
53946
+ /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: timelineItemLabel(item) })
53947
+ ] }),
53948
+ /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-start", children: [
53949
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "flex-1 min-w-0 line-clamp-2", children: timelineItemPreview(item) }),
53950
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "flex-shrink-0 mt-0", onClick: (e) => {
53951
+ e.stopPropagation();
53952
+ setSelectedItem(item);
53953
+ }, children: /* @__PURE__ */ jsx(Icon, { name: "maximize-2", size: "xs" }) })
53954
+ ] })
53955
+ ] })
53956
+ ]
53957
+ },
53958
+ `${item.source}-${i}`
53959
+ );
53960
+ }) }) }),
53961
+ /* @__PURE__ */ jsx(
53962
+ Modal,
53963
+ {
53964
+ isOpen: selectedItem !== null,
53965
+ onClose: () => setSelectedItem(null),
53966
+ title: selectedItem ? `${timelineItemLabel(selectedItem)}${timelineItemTimeLabel(selectedItem) ? ` \xB7 ${timelineItemTimeLabel(selectedItem)}` : ""}` : "",
53967
+ size: "lg",
53968
+ children: selectedItem && /* @__PURE__ */ jsx(TraceDetailContent, { item: selectedItem })
53969
+ }
53970
+ )
53971
+ ] });
53972
+ }
53973
+ const filtered = focusedOrbital ? subagents.filter((s) => s.orbitalName === focusedOrbital) : subagents;
53974
+ const wrapperClass = isRichMode ? `absolute inset-x-3 bottom-3 sm:inset-x-auto sm:top-3 sm:right-3 sm:bottom-3 w-full sm:w-[28rem] max-w-[calc(100vw-1.5rem)] max-h-[60vh] sm:max-h-none bg-[var(--color-card)] border border-[var(--color-border)] rounded-md shadow-lg overflow-hidden flex flex-col ${className ?? ""}` : `absolute inset-x-3 bottom-3 sm:inset-x-auto sm:top-3 sm:right-3 sm:bottom-3 w-full sm:w-80 max-w-[calc(100vw-1.5rem)] max-h-[60vh] sm:max-h-none bg-[var(--color-card)] border border-[var(--color-border)] rounded-md shadow-lg overflow-hidden flex flex-col ${className ?? ""}`;
53975
+ const wrapperStyle = { zIndex: 20 };
53976
+ const hasCoordinatorData = coordinatorMessages && coordinatorMessages.length > 0 || coordinatorActivities && coordinatorActivities.length > 0;
53977
+ if (filtered.length === 0 && !hasCoordinatorData) {
53978
+ return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
53979
+ /* @__PURE__ */ jsxs(
53980
+ HStack,
53981
+ {
53982
+ gap: "sm",
53983
+ className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
53984
+ children: [
53985
+ /* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
53986
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.subagents") }),
53987
+ onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
53988
+ ]
53989
+ }
53990
+ ),
53991
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-4", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: focusedOrbital ? t("subagentTrace.noSubagentsForOrbital", { orbital: focusedOrbital }) : t("subagentTrace.noSubagentsActive") }) })
53992
+ ] });
53993
+ }
53994
+ if (focusedOrbital) {
53995
+ return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
53996
+ /* @__PURE__ */ jsxs(
53997
+ HStack,
53998
+ {
53999
+ gap: "sm",
54000
+ className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
54001
+ children: [
54002
+ /* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
54003
+ /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
54004
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold truncate", children: focusedOrbital }),
54005
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
54006
+ filtered.length === 1 ? t("subagentTrace.subagentCount", { count: filtered.length }) : t("subagentTrace.subagentCountPlural", { count: filtered.length }),
54007
+ " \xB7 ",
54008
+ densityLabel(isRichMode)
54009
+ ] })
54010
+ ] }),
54011
+ onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
54012
+ ]
54013
+ }
54014
+ ),
54015
+ /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: filtered.map((sub) => isRichMode ? /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id) : /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id)) })
54016
+ ] });
54017
+ }
54018
+ const grouped = groupByOrbital(filtered);
54019
+ const coordinatorSnapshot = pluckCoordinatorState(coordinatorActivities ?? []);
54020
+ return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
54021
+ /* @__PURE__ */ jsxs(
54022
+ HStack,
54023
+ {
54024
+ gap: "sm",
54025
+ className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
54026
+ children: [
54027
+ /* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
54028
+ /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold flex-1", children: [
54029
+ t("subagentTrace.subagentsWithCount", { count: filtered.length }),
54030
+ " \xB7 ",
54031
+ densityLabel(isRichMode)
54032
+ ] }),
54033
+ onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
54034
+ ]
54035
+ }
54036
+ ),
54037
+ /* @__PURE__ */ jsxs(Box, { className: "flex-1 overflow-y-auto", children: [
54038
+ !focusedOrbital && isRichMode && /* @__PURE__ */ jsx(CoordinatorCard, { snapshot: coordinatorSnapshot }),
54039
+ coordinatorMessages && coordinatorMessages.length > 0 ? /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
54040
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
54041
+ /* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
54042
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
54043
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.messagesCount", { count: coordinatorMessages.length }) })
54044
+ ] }),
54045
+ /* @__PURE__ */ jsx(Box, { className: "max-h-[36rem] overflow-y-auto", children: /* @__PURE__ */ jsx(CoordinatorConversation, { messages: coordinatorMessages, autoScroll: true }) })
54046
+ ] }) : coordinatorActivities && coordinatorActivities.length > 0 && (() => {
54047
+ const filteredCoordinator = coordinatorActivities;
54048
+ if (filteredCoordinator.length === 0) return null;
54049
+ return /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
54050
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
54051
+ /* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
54052
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
54053
+ /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.eventsCount", { count: filteredCoordinator.length }) })
54054
+ ] }),
54055
+ /* @__PURE__ */ jsx(Box, { className: "max-h-60 overflow-y-auto", children: /* @__PURE__ */ jsx(
54056
+ InlineActivityStream,
54057
+ {
54058
+ activities: coordinatorToActivityItems(filteredCoordinator),
54059
+ autoScroll: true
54060
+ }
54061
+ ) })
54062
+ ] });
54063
+ })(),
54064
+ isRichMode ? filtered.map((sub) => /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id)) : Array.from(grouped.entries()).map(([orbitalName, subs]) => /* @__PURE__ */ jsx(
54065
+ OrbitalGroup,
54066
+ {
54067
+ orbitalName,
54068
+ subagents: subs
54069
+ },
54070
+ orbitalName
54071
+ ))
54072
+ ] })
54073
+ ] });
54074
+ };
54075
+ SubagentTracePanel.displayName = "SubagentTracePanel";
54076
+ }
54077
+ });
52567
54078
  var TabbedContainer;
52568
54079
  var init_TabbedContainer = __esm({
52569
54080
  "components/core/organisms/layout/TabbedContainer.tsx"() {
@@ -52678,6 +54189,48 @@ var init_TabbedContainer = __esm({
52678
54189
  TabbedContainer.displayName = "TabbedContainer";
52679
54190
  }
52680
54191
  });
54192
+ function TanksBoard({
54193
+ tiles,
54194
+ units,
54195
+ features,
54196
+ assetManifest,
54197
+ assetBaseUrl,
54198
+ scale = 0.45,
54199
+ showMinimap = true,
54200
+ enableCamera = true,
54201
+ tileClickEvent,
54202
+ unitClickEvent,
54203
+ isLoading,
54204
+ error,
54205
+ className
54206
+ }) {
54207
+ return /* @__PURE__ */ jsx("div", { className: cn("tanks-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
54208
+ IsometricCanvas_default,
54209
+ {
54210
+ tileLayout: "flat",
54211
+ tiles,
54212
+ units,
54213
+ features,
54214
+ assetManifest,
54215
+ assetBaseUrl,
54216
+ scale,
54217
+ showMinimap,
54218
+ enableCamera,
54219
+ tileClickEvent,
54220
+ unitClickEvent,
54221
+ isLoading,
54222
+ error
54223
+ }
54224
+ ) });
54225
+ }
54226
+ var init_TanksBoard = __esm({
54227
+ "components/game/organisms/TanksBoard.tsx"() {
54228
+ "use client";
54229
+ init_cn();
54230
+ init_IsometricCanvas();
54231
+ TanksBoard.displayName = "TanksBoard";
54232
+ }
54233
+ });
52681
54234
  var TeamOrganism;
52682
54235
  var init_TeamOrganism = __esm({
52683
54236
  "components/marketing/organisms/TeamOrganism.tsx"() {
@@ -52781,7 +54334,7 @@ var init_Timeline = __esm({
52781
54334
  }) => {
52782
54335
  const { t } = useTranslate();
52783
54336
  const entityData = Array.isArray(entity) ? entity : [];
52784
- const items = React93__default.useMemo(() => {
54337
+ const items = React94__default.useMemo(() => {
52785
54338
  if (propItems) return propItems;
52786
54339
  if (entityData.length === 0) return [];
52787
54340
  return entityData.map((record, idx) => {
@@ -52888,7 +54441,7 @@ var init_Timeline = __esm({
52888
54441
  }
52889
54442
  });
52890
54443
  function extractToastProps(children) {
52891
- if (!React93__default.isValidElement(children)) {
54444
+ if (!React94__default.isValidElement(children)) {
52892
54445
  if (typeof children === "string") {
52893
54446
  return { message: children };
52894
54447
  }
@@ -52926,7 +54479,7 @@ var init_ToastSlot = __esm({
52926
54479
  eventBus.emit("UI:CLOSE");
52927
54480
  };
52928
54481
  if (!isVisible) return null;
52929
- const isCustomContent = React93__default.isValidElement(children) && !message;
54482
+ const isCustomContent = React94__default.isValidElement(children) && !message;
52930
54483
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
52931
54484
  Toast,
52932
54485
  {
@@ -54542,7 +56095,7 @@ var init_WorldMapTemplate = __esm({
54542
56095
  }
54543
56096
  });
54544
56097
  function lazyThree(name, loader) {
54545
- const Lazy = React93__default.lazy(
56098
+ const Lazy = React94__default.lazy(
54546
56099
  () => loader().then((m) => {
54547
56100
  const Resolved = m[name];
54548
56101
  if (!Resolved) {
@@ -54554,13 +56107,13 @@ function lazyThree(name, loader) {
54554
56107
  })
54555
56108
  );
54556
56109
  function ThreeWrapper(props) {
54557
- return React93__default.createElement(
56110
+ return React94__default.createElement(
54558
56111
  ThreeBoundary,
54559
56112
  { name },
54560
- React93__default.createElement(
54561
- React93__default.Suspense,
56113
+ React94__default.createElement(
56114
+ React94__default.Suspense,
54562
56115
  { fallback: null },
54563
- React93__default.createElement(Lazy, props)
56116
+ React94__default.createElement(Lazy, props)
54564
56117
  )
54565
56118
  );
54566
56119
  }
@@ -54590,6 +56143,7 @@ var init_component_registry_generated = __esm({
54590
56143
  init_BattleTemplate();
54591
56144
  init_BehaviorView();
54592
56145
  init_BloomQuizBlock();
56146
+ init_BoardgameBoard();
54593
56147
  init_BookChapterView();
54594
56148
  init_BookCoverPage();
54595
56149
  init_BookNavBar();
@@ -54616,6 +56170,7 @@ var init_component_registry_generated = __esm({
54616
56170
  init_Center();
54617
56171
  init_Chart();
54618
56172
  init_ChartLegend();
56173
+ init_ChatBar();
54619
56174
  init_Checkbox();
54620
56175
  init_ChoiceButton();
54621
56176
  init_CityBuilderBoard();
@@ -54673,6 +56228,7 @@ var init_component_registry_generated = __esm({
54673
56228
  init_FileTree();
54674
56229
  init_FilterGroup();
54675
56230
  init_FilterPill();
56231
+ init_FishingBoard();
54676
56232
  init_Flex();
54677
56233
  init_FlipCard();
54678
56234
  init_FlipContainer();
@@ -54702,6 +56258,7 @@ var init_component_registry_generated = __esm({
54702
56258
  init_HeroOrganism();
54703
56259
  init_HeroSection();
54704
56260
  init_HexStrategyBoard();
56261
+ init_HolidayRunnerBoard();
54705
56262
  init_Icon();
54706
56263
  init_InfiniteScrollSentinel();
54707
56264
  init_Input();
@@ -54724,11 +56281,13 @@ var init_component_registry_generated = __esm({
54724
56281
  init_MarketingFooter();
54725
56282
  init_MasterDetail();
54726
56283
  init_MasterDetailLayout();
56284
+ init_MatchPuzzleBoard();
54727
56285
  init_MatrixQuestion();
54728
56286
  init_MediaGallery();
54729
56287
  init_Menu();
54730
56288
  init_Meter();
54731
56289
  init_MiniMap();
56290
+ init_MinigolfBoard();
54732
56291
  init_Modal();
54733
56292
  init_ModalSlot();
54734
56293
  init_ModuleCard();
@@ -54741,6 +56300,8 @@ var init_component_registry_generated = __esm({
54741
56300
  init_PageHeader();
54742
56301
  init_Pagination();
54743
56302
  init_PatternTile();
56303
+ init_PinballBoard();
56304
+ init_PirateBoard();
54744
56305
  init_PlatformerBoard();
54745
56306
  init_PlatformerCanvas();
54746
56307
  init_PlatformerTemplate();
@@ -54758,6 +56319,7 @@ var init_component_registry_generated = __esm({
54758
56319
  init_QrScanner();
54759
56320
  init_QuestTracker();
54760
56321
  init_QuizBlock();
56322
+ init_RacingBoard();
54761
56323
  init_Radio();
54762
56324
  init_RangeSlider();
54763
56325
  init_ReflectionBlock();
@@ -54791,12 +56353,16 @@ var init_component_registry_generated = __esm({
54791
56353
  init_SimulatorBoard();
54792
56354
  init_Skeleton();
54793
56355
  init_SocialProof();
56356
+ init_SokobanBoard();
54794
56357
  init_SortableList();
56358
+ init_SpaceShmupBoard();
56359
+ init_SpaceStationBoard();
54795
56360
  init_Sparkline();
54796
56361
  init_Spinner();
54797
56362
  init_Split();
54798
56363
  init_SplitPane();
54799
56364
  init_SplitSection();
56365
+ init_SportsBoard();
54800
56366
  init_Sprite();
54801
56367
  init_StarRating();
54802
56368
  init_StatBadge();
@@ -54811,6 +56377,7 @@ var init_component_registry_generated = __esm({
54811
56377
  init_StatusEffect();
54812
56378
  init_StepFlow();
54813
56379
  init_StepFlowOrganism();
56380
+ init_SubagentTracePanel();
54814
56381
  init_SvgBranch();
54815
56382
  init_SvgConnection();
54816
56383
  init_SvgFlow();
@@ -54830,6 +56397,7 @@ var init_component_registry_generated = __esm({
54830
56397
  init_Tabs();
54831
56398
  init_TagCloud();
54832
56399
  init_TagInput();
56400
+ init_TanksBoard();
54833
56401
  init_TeamCard();
54834
56402
  init_TeamOrganism();
54835
56403
  init_TextHighlight();
@@ -54868,7 +56436,7 @@ var init_component_registry_generated = __esm({
54868
56436
  init_WorldMapBoard();
54869
56437
  init_WorldMapTemplate();
54870
56438
  init_XPBar();
54871
- ThreeBoundary = class extends React93__default.Component {
56439
+ ThreeBoundary = class extends React94__default.Component {
54872
56440
  constructor() {
54873
56441
  super(...arguments);
54874
56442
  __publicField(this, "state", { failed: false });
@@ -54878,7 +56446,7 @@ var init_component_registry_generated = __esm({
54878
56446
  }
54879
56447
  render() {
54880
56448
  if (this.state.failed) {
54881
- return React93__default.createElement(
56449
+ return React94__default.createElement(
54882
56450
  "div",
54883
56451
  {
54884
56452
  "data-testid": "three-unavailable",
@@ -54917,6 +56485,7 @@ var init_component_registry_generated = __esm({
54917
56485
  "BattleTemplate": BattleTemplate,
54918
56486
  "BehaviorView": BehaviorView,
54919
56487
  "BloomQuizBlock": BloomQuizBlock,
56488
+ "BoardgameBoard": BoardgameBoard,
54920
56489
  "BookChapterView": BookChapterView,
54921
56490
  "BookCoverPage": BookCoverPage,
54922
56491
  "BookNavBar": BookNavBar,
@@ -54946,6 +56515,7 @@ var init_component_registry_generated = __esm({
54946
56515
  "Center": Center,
54947
56516
  "Chart": Chart,
54948
56517
  "ChartLegend": ChartLegend,
56518
+ "ChatBar": ChatBar,
54949
56519
  "Checkbox": Checkbox,
54950
56520
  "ChoiceButton": ChoiceButton,
54951
56521
  "CityBuilderBoard": CityBuilderBoard,
@@ -55006,6 +56576,7 @@ var init_component_registry_generated = __esm({
55006
56576
  "FileTree": FileTree,
55007
56577
  "FilterGroup": FilterGroup,
55008
56578
  "FilterPill": FilterPill,
56579
+ "FishingBoard": FishingBoard,
55009
56580
  "Flex": Flex,
55010
56581
  "FlipCard": FlipCard,
55011
56582
  "FlipContainer": FlipContainer,
@@ -55039,6 +56610,7 @@ var init_component_registry_generated = __esm({
55039
56610
  "HeroOrganism": HeroOrganism,
55040
56611
  "HeroSection": HeroSection,
55041
56612
  "HexStrategyBoard": HexStrategyBoard,
56613
+ "HolidayRunnerBoard": HolidayRunnerBoard,
55042
56614
  "Icon": Icon,
55043
56615
  "InfiniteScrollSentinel": InfiniteScrollSentinel,
55044
56616
  "Input": Input,
@@ -55063,11 +56635,13 @@ var init_component_registry_generated = __esm({
55063
56635
  "MarketingFooter": MarketingFooter,
55064
56636
  "MasterDetail": MasterDetail,
55065
56637
  "MasterDetailLayout": MasterDetailLayout,
56638
+ "MatchPuzzleBoard": MatchPuzzleBoard,
55066
56639
  "MatrixQuestion": MatrixQuestion,
55067
56640
  "MediaGallery": MediaGallery,
55068
56641
  "Menu": Menu,
55069
56642
  "Meter": Meter,
55070
56643
  "MiniMap": MiniMap,
56644
+ "MinigolfBoard": MinigolfBoard,
55071
56645
  "Modal": Modal,
55072
56646
  "ModalSlot": ModalSlot,
55073
56647
  "ModuleCard": ModuleCard,
@@ -55080,6 +56654,8 @@ var init_component_registry_generated = __esm({
55080
56654
  "PageHeader": PageHeader,
55081
56655
  "Pagination": Pagination,
55082
56656
  "PatternTile": PatternTile,
56657
+ "PinballBoard": PinballBoard,
56658
+ "PirateBoard": PirateBoard,
55083
56659
  "PlatformerBoard": PlatformerBoard,
55084
56660
  "PlatformerCanvas": PlatformerCanvas,
55085
56661
  "PlatformerTemplate": PlatformerTemplate,
@@ -55097,6 +56673,7 @@ var init_component_registry_generated = __esm({
55097
56673
  "QrScanner": QrScanner,
55098
56674
  "QuestTracker": QuestTracker,
55099
56675
  "QuizBlock": QuizBlock,
56676
+ "RacingBoard": RacingBoard,
55100
56677
  "Radio": Radio,
55101
56678
  "RangeSlider": RangeSlider,
55102
56679
  "ReflectionBlock": ReflectionBlock,
@@ -55130,7 +56707,10 @@ var init_component_registry_generated = __esm({
55130
56707
  "SimulatorBoard": SimulatorBoard,
55131
56708
  "Skeleton": Skeleton,
55132
56709
  "SocialProof": SocialProof,
56710
+ "SokobanBoard": SokobanBoard,
55133
56711
  "SortableList": SortableList,
56712
+ "SpaceShmupBoard": SpaceShmupBoard,
56713
+ "SpaceStationBoard": SpaceStationBoard,
55134
56714
  "Spacer": SpacerPattern,
55135
56715
  "SpacerPattern": SpacerPattern,
55136
56716
  "Sparkline": Sparkline,
@@ -55138,6 +56718,7 @@ var init_component_registry_generated = __esm({
55138
56718
  "Split": Split,
55139
56719
  "SplitPane": SplitPane,
55140
56720
  "SplitSection": SplitSection,
56721
+ "SportsBoard": SportsBoard,
55141
56722
  "Sprite": Sprite,
55142
56723
  "Stack": Stack,
55143
56724
  "StarRating": StarRating,
@@ -55153,6 +56734,7 @@ var init_component_registry_generated = __esm({
55153
56734
  "StatusEffect": StatusEffect,
55154
56735
  "StepFlow": StepFlow,
55155
56736
  "StepFlowOrganism": StepFlowOrganism,
56737
+ "SubagentTracePanel": SubagentTracePanel,
55156
56738
  "SvgBranch": SvgBranch,
55157
56739
  "SvgConnection": SvgConnection,
55158
56740
  "SvgFlow": SvgFlow,
@@ -55172,6 +56754,7 @@ var init_component_registry_generated = __esm({
55172
56754
  "Tabs": Tabs,
55173
56755
  "TagCloud": TagCloud,
55174
56756
  "TagInput": TagInput,
56757
+ "TanksBoard": TanksBoard,
55175
56758
  "TeamCard": TeamCard,
55176
56759
  "TeamOrganism": TeamOrganism,
55177
56760
  "TextHighlight": TextHighlight,
@@ -55229,7 +56812,7 @@ function SuspenseConfigProvider({
55229
56812
  config,
55230
56813
  children
55231
56814
  }) {
55232
- return React93__default.createElement(
56815
+ return React94__default.createElement(
55233
56816
  SuspenseConfigContext.Provider,
55234
56817
  { value: config },
55235
56818
  children
@@ -55719,7 +57302,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
55719
57302
  const key = `${parentId}-${index}-trait:${traitName}`;
55720
57303
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
55721
57304
  }
55722
- return /* @__PURE__ */ jsx(React93__default.Fragment, { children: child }, `${parentId}-${index}`);
57305
+ return /* @__PURE__ */ jsx(React94__default.Fragment, { children: child }, `${parentId}-${index}`);
55723
57306
  }
55724
57307
  if (!child || typeof child !== "object") return null;
55725
57308
  const childId = `${parentId}-${index}`;
@@ -55759,14 +57342,14 @@ function isPatternConfig(value) {
55759
57342
  if (value === null || value === void 0) return false;
55760
57343
  if (typeof value !== "object") return false;
55761
57344
  if (Array.isArray(value)) return false;
55762
- if (React93__default.isValidElement(value)) return false;
57345
+ if (React94__default.isValidElement(value)) return false;
55763
57346
  if (value instanceof Date) return false;
55764
57347
  if (typeof value === "function") return false;
55765
57348
  const record = value;
55766
57349
  return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
55767
57350
  }
55768
57351
  function isPlainConfigObject(value) {
55769
- if (React93__default.isValidElement(value)) return false;
57352
+ if (React94__default.isValidElement(value)) return false;
55770
57353
  if (value instanceof Date) return false;
55771
57354
  const proto = Object.getPrototypeOf(value);
55772
57355
  return proto === Object.prototype || proto === null;
@@ -55892,7 +57475,7 @@ function SlotContentRenderer({
55892
57475
  for (const slotKey of CONTENT_NODE_SLOTS) {
55893
57476
  const slotVal = restProps[slotKey];
55894
57477
  if (slotVal === void 0 || slotVal === null) continue;
55895
- if (React93__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
57478
+ if (React94__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
55896
57479
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
55897
57480
  nodeSlotOverrides[slotKey] = renderPatternChildren(
55898
57481
  slotVal,
@@ -56305,7 +57888,7 @@ var AvlTransition = ({
56305
57888
  opacity = 1,
56306
57889
  className
56307
57890
  }) => {
56308
- const ids = React93__default.useMemo(() => {
57891
+ const ids = React94__default.useMemo(() => {
56309
57892
  avlTransitionId += 1;
56310
57893
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
56311
57894
  }, []);
@@ -56866,7 +58449,7 @@ var AvlStateMachine = ({
56866
58449
  color = "var(--color-primary)",
56867
58450
  animated = false
56868
58451
  }) => {
56869
- const ids = React93__default.useMemo(() => {
58452
+ const ids = React94__default.useMemo(() => {
56870
58453
  avlSmId += 1;
56871
58454
  const base = `avl-sm-${avlSmId}`;
56872
58455
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -57065,7 +58648,7 @@ var AvlOrbitalUnit = ({
57065
58648
  color = "var(--color-primary)",
57066
58649
  animated = false
57067
58650
  }) => {
57068
- const ids = React93__default.useMemo(() => {
58651
+ const ids = React94__default.useMemo(() => {
57069
58652
  avlOuId += 1;
57070
58653
  const base = `avl-ou-${avlOuId}`;
57071
58654
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -57161,7 +58744,7 @@ var AvlClosedCircuit = ({
57161
58744
  color = "var(--color-primary)",
57162
58745
  animated = false
57163
58746
  }) => {
57164
- const ids = React93__default.useMemo(() => {
58747
+ const ids = React94__default.useMemo(() => {
57165
58748
  avlCcId += 1;
57166
58749
  const base = `avl-cc-${avlCcId}`;
57167
58750
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -57316,7 +58899,7 @@ var AvlEmitListen = ({
57316
58899
  color = "var(--color-primary)",
57317
58900
  animated = false
57318
58901
  }) => {
57319
- const ids = React93__default.useMemo(() => {
58902
+ const ids = React94__default.useMemo(() => {
57320
58903
  avlElId += 1;
57321
58904
  const base = `avl-el-${avlElId}`;
57322
58905
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -57590,7 +59173,7 @@ function renderNode(node, color, glowId) {
57590
59173
  const baseR = node.type === "operator" ? 20 : 16;
57591
59174
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
57592
59175
  const nc = nodeColor(node.type, color);
57593
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
59176
+ return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
57594
59177
  node.children.map((child, i) => {
57595
59178
  const childR = Math.max(
57596
59179
  child.type === "operator" ? 20 : 16,
@@ -57647,7 +59230,7 @@ var AvlExprTree = ({
57647
59230
  className,
57648
59231
  color = "var(--color-primary)"
57649
59232
  }) => {
57650
- const ids = React93__default.useMemo(() => {
59233
+ const ids = React94__default.useMemo(() => {
57651
59234
  avlEtId += 1;
57652
59235
  return { glow: `avl-et-${avlEtId}-glow` };
57653
59236
  }, []);
@@ -58471,7 +60054,7 @@ var SystemNode = ({ data }) => {
58471
60054
  stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
58472
60055
  const tc = transitionCounts[s.name] ?? 0;
58473
60056
  const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
58474
- return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
60057
+ return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
58475
60058
  /* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
58476
60059
  i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
58477
60060
  ] }, s.name);
@@ -59623,7 +61206,7 @@ function resolveLambdaBindings(body, params, item, index) {
59623
61206
  if (Array.isArray(body)) {
59624
61207
  return body.map((b) => recur(b));
59625
61208
  }
59626
- if (body !== null && typeof body === "object" && !React93__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
61209
+ if (body !== null && typeof body === "object" && !React94__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
59627
61210
  const out = {};
59628
61211
  for (const [k, v] of Object.entries(body)) {
59629
61212
  out[k] = recur(v);
@@ -59642,7 +61225,7 @@ function getSlotContentRenderer4() {
59642
61225
  function makeLambdaFn(params, lambdaBody, callerKey) {
59643
61226
  return (item, index) => {
59644
61227
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
59645
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React93__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
61228
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React94__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
59646
61229
  return null;
59647
61230
  }
59648
61231
  const record = resolvedBody;
@@ -59661,7 +61244,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
59661
61244
  props: childProps,
59662
61245
  priority: 0
59663
61246
  };
59664
- return React93__default.createElement(SlotContentRenderer2, { content: childContent });
61247
+ return React94__default.createElement(SlotContentRenderer2, { content: childContent });
59665
61248
  };
59666
61249
  }
59667
61250
  function convertNode(node, callerKey) {
@@ -59680,7 +61263,7 @@ function convertNode(node, callerKey) {
59680
61263
  });
59681
61264
  return anyChanged ? mapped : node;
59682
61265
  }
59683
- if (typeof node === "object" && !React93__default.isValidElement(node) && !(node instanceof Date)) {
61266
+ if (typeof node === "object" && !React94__default.isValidElement(node) && !(node instanceof Date)) {
59684
61267
  return convertObjectProps(node);
59685
61268
  }
59686
61269
  return node;
@@ -61912,8 +63495,8 @@ function CanvasDndProvider({
61912
63495
  }) {
61913
63496
  const eventBus = useEventBus();
61914
63497
  const sensors = useAlmadarDndSensors(false);
61915
- const [activePayload, setActivePayload] = React93__default.useState(null);
61916
- const handleDragStart = React93__default.useCallback((e) => {
63498
+ const [activePayload, setActivePayload] = React94__default.useState(null);
63499
+ const handleDragStart = React94__default.useCallback((e) => {
61917
63500
  const data = e.active.data.current;
61918
63501
  const payload = data?.payload;
61919
63502
  if (payload) {
@@ -61924,7 +63507,7 @@ function CanvasDndProvider({
61924
63507
  log13.warn("dragStart:missing-payload", { id: e.active.id });
61925
63508
  }
61926
63509
  }, [eventBus]);
61927
- const handleDragEnd = React93__default.useCallback((e) => {
63510
+ const handleDragEnd = React94__default.useCallback((e) => {
61928
63511
  setActivePayload(null);
61929
63512
  const activeData = e.active.data.current;
61930
63513
  const payload = activeData?.payload;
@@ -61953,7 +63536,7 @@ function CanvasDndProvider({
61953
63536
  const suppressed = onDrop ? onDrop(drop) === true : false;
61954
63537
  if (!suppressed) defaultEmit(eventBus, drop);
61955
63538
  }, [eventBus, onDrop]);
61956
- const handleDragCancel = React93__default.useCallback(() => {
63539
+ const handleDragCancel = React94__default.useCallback(() => {
61957
63540
  setActivePayload(null);
61958
63541
  log13.info("dragCancel");
61959
63542
  }, []);
@@ -62711,7 +64294,7 @@ var OrbPreviewNodeInner = (props) => {
62711
64294
  }
62712
64295
  );
62713
64296
  };
62714
- var OrbPreviewNode = React93__default.memo(OrbPreviewNodeInner);
64297
+ var OrbPreviewNode = React94__default.memo(OrbPreviewNodeInner);
62715
64298
  OrbPreviewNode.displayName = "OrbPreviewNode";
62716
64299
  orbPreviewLog.debug("export-resolved", () => ({
62717
64300
  type: typeof OrbPreviewNode,
@@ -62816,7 +64399,7 @@ var EventFlowEdgeInner = (props) => {
62816
64399
  ) })
62817
64400
  ] });
62818
64401
  };
62819
- var EventFlowEdge = React93__default.memo(EventFlowEdgeInner);
64402
+ var EventFlowEdge = React94__default.memo(EventFlowEdgeInner);
62820
64403
  EventFlowEdge.displayName = "EventFlowEdge";
62821
64404
 
62822
64405
  // components/avl/molecules/BehaviorComposeNode.tsx
@@ -62963,7 +64546,7 @@ var BehaviorComposeNodeInner = (props) => {
62963
64546
  }
62964
64547
  );
62965
64548
  };
62966
- var BehaviorComposeNode = React93__default.memo(BehaviorComposeNodeInner);
64549
+ var BehaviorComposeNode = React94__default.memo(BehaviorComposeNodeInner);
62967
64550
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
62968
64551
 
62969
64552
  // components/avl/molecules/avl-behavior-compose-converter.ts
@@ -63975,7 +65558,7 @@ var TraitCardNodeInner = (props) => {
63975
65558
  }
63976
65559
  );
63977
65560
  };
63978
- var TraitCardNode = React93__default.memo(TraitCardNodeInner);
65561
+ var TraitCardNode = React94__default.memo(TraitCardNodeInner);
63979
65562
  TraitCardNode.displayName = "TraitCardNode";
63980
65563
 
63981
65564
  // components/avl/organisms/FlowCanvas.tsx
@@ -64048,7 +65631,7 @@ function FlowCanvasInner({
64048
65631
  initialOrbital
64049
65632
  );
64050
65633
  const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
64051
- const screenSizeUserOverrideRef = React93__default.useRef(false);
65634
+ const screenSizeUserOverrideRef = React94__default.useRef(false);
64052
65635
  const [screenSize, setScreenSize] = useState(
64053
65636
  () => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
64054
65637
  );
@@ -64432,7 +66015,7 @@ var ZoomBreadcrumb = ({
64432
66015
  if (eventName && band === "detail") {
64433
66016
  segments.push({ icon: "\u26A1", label: eventName });
64434
66017
  }
64435
- return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
66018
+ return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
64436
66019
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
64437
66020
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
64438
66021
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -64773,7 +66356,7 @@ var EventWireOverlay = ({
64773
66356
  containerW,
64774
66357
  containerH
64775
66358
  }) => {
64776
- const ids = React93__default.useMemo(() => {
66359
+ const ids = React94__default.useMemo(() => {
64777
66360
  avlOczWireId += 1;
64778
66361
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
64779
66362
  }, []);
@@ -65140,7 +66723,7 @@ var AvlOrbitalsCosmicZoom = ({
65140
66723
  borderRadius: 6,
65141
66724
  border: `1px solid ${color}`
65142
66725
  },
65143
- children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
66726
+ children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
65144
66727
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
65145
66728
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
65146
66729
  Box,