'use strict';

var React32 = require('react');
var classVarianceAuthority = require('class-variance-authority');
var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');
var reactDom = require('react-dom');
var lucideReact = require('lucide-react');
require('next/navigation');
var Link = require('next/link');

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

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

var React32__namespace = /*#__PURE__*/_interopNamespace(React32);
var Link__default = /*#__PURE__*/_interopDefault(Link);

// src/portfolio/About.tsx

// src/logger/console-adapter.ts
var ConsoleLoggerAdapter = class {
  constructor() {
    this.colors = {
      DEBUG: "\x1B[36m",
      // Cyan
      INFO: "\x1B[32m",
      // Green
      WARN: "\x1B[33m",
      // Yellow
      ERROR: "\x1B[31m",
      // Red
      RESET: "\x1B[0m"
    };
  }
  log(entry) {
    const { level, message, timestamp, data, context, error } = entry;
    let logMessage = "";
    if (timestamp) {
      logMessage += "[" + this.formatTimestamp(timestamp) + "] ";
    }
    const levelName = this.getLevelName(level);
    logMessage += levelName + ": ";
    if (context) {
      logMessage += "[" + context + "] ";
    }
    logMessage += message;
    switch (level) {
      case 0:
        console.debug(this.colorize(logMessage, "DEBUG"), data || "");
        break;
      case 1:
        console.info(this.colorize(logMessage, "INFO"), data || "");
        break;
      case 2:
        console.warn(this.colorize(logMessage, "WARN"), data || "");
        break;
      case 3:
        console.error(this.colorize(logMessage, "ERROR"), data || "");
        if (error) {
          console.error(error);
        }
        break;
    }
  }
  formatTimestamp(date) {
    return date.toISOString();
  }
  getLevelName(level) {
    const names = ["DEBUG", "INFO", "WARN", "ERROR", "NONE"];
    return names[level] || "UNKNOWN";
  }
  colorize(message, level) {
    if (typeof process !== "undefined" && process.stdout?.isTTY) {
      return this.colors[level] + message + this.colors.RESET;
    }
    return message;
  }
};

// src/logger/Logger.ts
var Logger = class _Logger {
  constructor(config, context) {
    const isProduction = typeof process !== "undefined" ? process.env.NODE_ENV === "production" : false;
    this.config = {
      minLevel: config?.minLevel ?? (isProduction ? 1 : 0),
      // INFO in prod, DEBUG in dev
      enableTimestamp: config?.enableTimestamp ?? true,
      enableContext: config?.enableContext ?? true,
      environment: config?.environment ?? (isProduction ? "production" : "development"),
      adapter: config?.adapter ?? new ConsoleLoggerAdapter()
    };
    this.adapter = this.config.adapter;
    this.context = context;
  }
  /**
   * 创建带上下文的子 Logger
   */
  createChild(context) {
    return new _Logger(this.config, context);
  }
  /**
   * 调试日志
   */
  debug(message, data) {
    this.log(0, message, data);
  }
  /**
   * 信息日志
   */
  info(message, data) {
    this.log(1, message, data);
  }
  /**
   * 警告日志
   */
  warn(message, data) {
    this.log(2, message, data);
  }
  /**
   * 错误日志
   */
  error(message, error) {
    this.log(
      3,
      // LogLevel.ERROR
      message,
      error instanceof Error ? void 0 : error,
      error instanceof Error ? error : void 0
    );
  }
  /**
   * 核心日志方法
   */
  log(level, message, data, error) {
    if (level < this.config.minLevel) {
      return;
    }
    if (typeof window !== "undefined" && typeof localStorage !== "undefined") {
      const loggerDebug = localStorage.getItem("logger-debug");
      if (loggerDebug === "false" && level < 3) {
        return;
      }
    }
    const entry = {
      level,
      message,
      timestamp: this.config.enableTimestamp ? /* @__PURE__ */ new Date() : void 0,
      data,
      context: this.config.enableContext ? this.context : void 0,
      error
    };
    this.adapter.log(entry);
  }
  /**
   * 设置日志级别
   */
  setLevel(level) {
    this.config.minLevel = level;
  }
  /**
   * 获取当前日志级别
   */
  getLevel() {
    return this.config.minLevel;
  }
};
new Logger();
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}

// src/components/Button.tsx
var buttonVariants = classVarianceAuthority.cva(
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
        destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
        outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
        secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
        ghost: "hover:bg-accent hover:text-accent-foreground",
        link: "text-primary underline-offset-4 hover:underline"
      },
      size: {
        default: "h-9 px-4 py-2",
        sm: "h-8 rounded-md px-3 text-xs",
        lg: "h-10 rounded-md px-8",
        icon: "h-9 w-9"
      }
    },
    defaultVariants: {
      variant: "default",
      size: "default"
    }
  }
);
var Button = React32__namespace.forwardRef(
  ({ className, variant = "default", size = "default", asChild = false, children, ...props }, ref) => {
    if (asChild && React32__namespace.isValidElement(children)) {
      const childProps = children.props;
      return React32__namespace.cloneElement(children, {
        ...props,
        className: cn(buttonVariants({ variant, size, className }), childProps.className)
      });
    }
    return /* @__PURE__ */ React32__namespace.createElement(
      "button",
      {
        className: cn(buttonVariants({ variant, size, className })),
        ref,
        ...props
      },
      children
    );
  }
);
Button.displayName = "Button";
var Card = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn(
      "rounded-xl border bg-card text-card-foreground shadow",
      className
    ),
    ...props
  }
));
Card.displayName = "Card";
var CardHeader = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("flex flex-col space-y-1.5 p-6", className),
    ...props
  }
));
CardHeader.displayName = "CardHeader";
var CardTitle = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("font-semibold leading-none tracking-tight", className),
    ...props
  }
));
CardTitle.displayName = "CardTitle";
var CardDescription = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("text-sm text-muted-foreground", className),
    ...props
  }
));
CardDescription.displayName = "CardDescription";
var CardContent = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement("div", { ref, className: cn("p-6 pt-0", className), ...props }));
CardContent.displayName = "CardContent";
var CardFooter = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("flex items-center p-6 pt-0", className),
    ...props
  }
));
CardFooter.displayName = "CardFooter";
classVarianceAuthority.cva(
  "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
  {
    variants: {
      variant: {
        default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
        secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
        destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
        outline: "text-foreground"
      }
    },
    defaultVariants: {
      variant: "default"
    }
  }
);
var Input = React32__namespace.forwardRef(
  ({ className, type, ...props }, ref) => {
    return /* @__PURE__ */ React32__namespace.createElement(
      "input",
      {
        type,
        className: cn(
          "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
          className
        ),
        ref,
        ...props
      }
    );
  }
);
Input.displayName = "Input";
var labelVariants = classVarianceAuthority.cva(
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
);
var Label = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "label",
  {
    ref,
    className: cn(labelVariants(), className),
    ...props
  }
));
Label.displayName = "Label";
function Portal({
  children,
  container
}) {
  const [mounted, setMounted] = React32__namespace.useState(false);
  React32__namespace.useEffect(() => {
    setMounted(true);
  }, []);
  if (!mounted) return null;
  return reactDom.createPortal(children, container ?? document.body);
}
function useOnClickOutside(refs, handler, enabled) {
  React32__namespace.useEffect(() => {
    if (!enabled) return;
    const listener = (event) => {
      const target = event.target;
      const clickedInside = refs.some((ref) => {
        const el = ref.current;
        return el && el.contains(target);
      });
      if (!clickedInside) {
        handler(event);
      }
    };
    document.addEventListener("mousedown", listener);
    document.addEventListener("touchstart", listener);
    return () => {
      document.removeEventListener("mousedown", listener);
      document.removeEventListener("touchstart", listener);
    };
  }, [refs, handler, enabled]);
}
function mergeRefs(...refs) {
  return (value) => {
    refs.forEach((ref) => {
      if (!ref) return;
      if (typeof ref === "function") {
        ref(value);
      } else {
        ref.current = value;
      }
    });
  };
}

// src/components/Tabs.tsx
var TabsContext = React32__namespace.createContext(null);
var TabsList = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn(
      "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
      className
    ),
    ...props
  }
));
TabsList.displayName = "TabsList";
var TabsTrigger = React32__namespace.forwardRef(
  ({ className, value, onClick, ...props }, ref) => {
    const ctx = React32__namespace.useContext(TabsContext);
    const active = ctx?.value === value;
    return /* @__PURE__ */ React32__namespace.createElement(
      "button",
      {
        ref,
        type: "button",
        "data-state": active ? "active" : "inactive",
        className: cn(
          "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
          active && "bg-background text-foreground shadow",
          className
        ),
        onClick: (e) => {
          ctx?.setValue(value);
          onClick?.(e);
        },
        ...props
      }
    );
  }
);
TabsTrigger.displayName = "TabsTrigger";
var TabsContent = React32__namespace.forwardRef(
  ({ className, value, forceMount = false, ...props }, ref) => {
    const ctx = React32__namespace.useContext(TabsContext);
    const active = ctx?.value === value;
    if (!active && !forceMount) return null;
    return /* @__PURE__ */ React32__namespace.createElement(
      "div",
      {
        ref,
        "data-state": active ? "active" : "inactive",
        hidden: !active && forceMount,
        className: cn(
          "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
          className
        ),
        ...props
      }
    );
  }
);
TabsContent.displayName = "TabsContent";
var DialogContext = React32__namespace.createContext(null);
var DialogTrigger = React32__namespace.forwardRef(
  ({ children, onClick, ...props }, ref) => {
    const ctx = React32__namespace.useContext(DialogContext);
    if (!ctx) return null;
    const mergedRef = mergeRefs(ctx.triggerRef, ref);
    const handleClick = (e) => {
      ctx.setOpen(true);
      onClick?.(e);
    };
    return /* @__PURE__ */ React32__namespace.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
  }
);
DialogTrigger.displayName = "DialogTrigger";
var DialogPortal = ({ children }) => {
  const ctx = React32__namespace.useContext(DialogContext);
  if (!ctx?.open) return null;
  return /* @__PURE__ */ React32__namespace.createElement(Portal, null, children);
};
var DialogClose = React32__namespace.forwardRef(({ onClick, ...props }, ref) => {
  const ctx = React32__namespace.useContext(DialogContext);
  return /* @__PURE__ */ React32__namespace.createElement(
    "button",
    {
      ref,
      type: "button",
      onClick: (e) => {
        ctx?.setOpen(false);
        onClick?.(e);
      },
      ...props
    }
  );
});
DialogClose.displayName = "DialogClose";
var DialogOverlay = React32__namespace.forwardRef(({ className, ...props }, ref) => {
  const ctx = React32__namespace.useContext(DialogContext);
  if (!ctx?.open) return null;
  return /* @__PURE__ */ React32__namespace.createElement(
    "div",
    {
      ref,
      className: cn("fixed inset-0 z-[9999] bg-black/80", className),
      ...props
    }
  );
});
DialogOverlay.displayName = "DialogOverlay";
var DialogContent = React32__namespace.forwardRef(
  ({ className, children, onPointerDownOutside, onEscapeKeyDown, showCloseButton = true, ...props }, ref) => {
    const ctx = React32__namespace.useContext(DialogContext);
    const open = !!ctx?.open;
    useOnClickOutside(
      [ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
      (evt) => {
        onPointerDownOutside?.(evt);
        if (!evt.defaultPrevented) {
          ctx?.setOpen(false);
        }
      },
      open
    );
    React32__namespace.useEffect(() => {
      if (!open) return;
      const onKey = (e) => {
        if (e.key !== "Escape") return;
        onEscapeKeyDown?.(e);
        if (!e.defaultPrevented) {
          ctx?.setOpen(false);
        }
      };
      document.addEventListener("keydown", onKey);
      return () => document.removeEventListener("keydown", onKey);
    }, [ctx, onEscapeKeyDown, open]);
    if (!ctx || !open) return null;
    return /* @__PURE__ */ React32__namespace.createElement(DialogPortal, null, /* @__PURE__ */ React32__namespace.createElement(DialogOverlay, null), /* @__PURE__ */ React32__namespace.createElement(
      "div",
      {
        ref: mergeRefs(ctx.contentRef, ref),
        className: cn(
          "fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg",
          className
        ),
        ...props
      },
      children,
      showCloseButton ? /* @__PURE__ */ React32__namespace.createElement(DialogClose, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100" }, /* @__PURE__ */ React32__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React32__namespace.createElement("span", { className: "sr-only" }, "Close")) : null
    ));
  }
);
DialogContent.displayName = "DialogContent";
var DialogTitle = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "h2",
  {
    ref,
    className: cn(
      "text-lg font-semibold leading-none tracking-tight",
      className
    ),
    ...props
  }
));
DialogTitle.displayName = "DialogTitle";
var DialogDescription = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "p",
  {
    ref,
    className: cn("text-sm text-muted-foreground", className),
    ...props
  }
));
DialogDescription.displayName = "DialogDescription";
var AlertDialogContent = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  DialogContent,
  {
    ref,
    className: cn("z-[9999]", className),
    ...props
  }
));
AlertDialogContent.displayName = "AlertDialogContent";
var AlertDialogAction = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  DialogClose,
  {
    ref,
    className: cn(buttonVariants(), className),
    ...props
  }
));
AlertDialogAction.displayName = "AlertDialogAction";
var AlertDialogCancel = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  DialogClose,
  {
    ref,
    className: cn(
      buttonVariants({ variant: "outline" }),
      "mt-2 sm:mt-0",
      className
    ),
    ...props
  }
));
AlertDialogCancel.displayName = "AlertDialogCancel";
var DropdownMenuContext = React32__namespace.createContext(null);
var DropdownMenuRadioGroupContext = React32__namespace.createContext(null);
var DropdownMenuTrigger = React32__namespace.forwardRef(({ children, onClick, ...props }, ref) => {
  const ctx = React32__namespace.useContext(DropdownMenuContext);
  if (!ctx) return null;
  const mergedRef = mergeRefs(ctx.triggerRef, ref);
  const handleClick = (e) => {
    ctx.setOpen(!ctx.open);
    onClick?.(e);
  };
  return /* @__PURE__ */ React32__namespace.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
});
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ React32__namespace.createElement(Portal, null, children);
var DropdownMenuContent = React32__namespace.forwardRef(({ className, sideOffset = 4, style, ...props }, ref) => {
  const ctx = React32__namespace.useContext(DropdownMenuContext);
  const [pos, setPos] = React32__namespace.useState({ top: 0, left: 0 });
  const open = !!ctx?.open;
  const trigger = ctx?.triggerRef.current ?? null;
  React32__namespace.useLayoutEffect(() => {
    if (!trigger) return;
    const rect = trigger.getBoundingClientRect();
    setPos({ top: rect.bottom + sideOffset, left: rect.left });
  }, [trigger, sideOffset]);
  useOnClickOutside(
    [ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
    () => ctx?.setOpen(false),
    open
  );
  if (!ctx || !open || !trigger) return null;
  return /* @__PURE__ */ React32__namespace.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React32__namespace.createElement(
    "div",
    {
      ref: mergeRefs(ctx.contentRef, ref),
      className: cn(
        "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
        className
      ),
      style: { position: "fixed", top: pos.top, left: pos.left, ...style },
      ...props
    }
  ));
});
DropdownMenuContent.displayName = "DropdownMenuContent";
var DropdownMenuItem = React32__namespace.forwardRef(({ className, inset, onSelect, onClick, ...props }, ref) => {
  const ctx = React32__namespace.useContext(DropdownMenuContext);
  return /* @__PURE__ */ React32__namespace.createElement(
    "button",
    {
      ref,
      type: "button",
      className: cn(
        "relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
        inset && "pl-8",
        className
      ),
      onClick: (e) => {
        onSelect?.(e.nativeEvent);
        onClick?.(e);
        if (!e.isDefaultPrevented()) {
          ctx?.setOpen(false);
        }
      },
      ...props
    }
  );
});
DropdownMenuItem.displayName = "DropdownMenuItem";
var DropdownMenuCheckboxItem = React32__namespace.forwardRef(({ className, children, checked = false, onCheckedChange, onClick, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "button",
  {
    ref,
    type: "button",
    className: cn(
      "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
      className
    ),
    onClick: (e) => {
      onCheckedChange?.(!checked);
      onClick?.(e);
    },
    ...props
  },
  /* @__PURE__ */ React32__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, checked ? /* @__PURE__ */ React32__namespace.createElement(lucideReact.Check, { className: "h-4 w-4" }) : null),
  children
));
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
var DropdownMenuRadioItem = React32__namespace.forwardRef(({ className, children, value, onClick, ...props }, ref) => {
  const radioCtx = React32__namespace.useContext(DropdownMenuRadioGroupContext);
  const menuCtx = React32__namespace.useContext(DropdownMenuContext);
  const checked = radioCtx?.value === value;
  return /* @__PURE__ */ React32__namespace.createElement(
    "button",
    {
      ref,
      type: "button",
      className: cn(
        "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
        className
      ),
      onClick: (e) => {
        radioCtx?.onValueChange?.(value);
        onClick?.(e);
        menuCtx?.setOpen(false);
      },
      ...props
    },
    /* @__PURE__ */ React32__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, checked ? /* @__PURE__ */ React32__namespace.createElement(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) : null),
    children
  );
});
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
var DropdownMenuLabel = React32__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
    ...props
  }
));
DropdownMenuLabel.displayName = "DropdownMenuLabel";
var DropdownMenuSeparator = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("-mx-1 my-1 h-px bg-muted", className),
    ...props
  }
));
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
var DropdownMenuSubTrigger = React32__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "button",
  {
    ref,
    type: "button",
    className: cn(
      "flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent",
      inset && "pl-8",
      className
    ),
    ...props
  },
  children,
  /* @__PURE__ */ React32__namespace.createElement(lucideReact.ChevronRight, { className: "ml-auto" })
));
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
var DropdownMenuSubContent = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn(
      "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg",
      className
    ),
    ...props
  }
));
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
var PopoverContext = React32__namespace.createContext(null);
var PopoverTrigger = React32__namespace.forwardRef(
  ({ children, onClick, ...props }, ref) => {
    const ctx = React32__namespace.useContext(PopoverContext);
    if (!ctx) return null;
    const mergedRef = mergeRefs(ctx.triggerRef, ref);
    const handleClick = (e) => {
      ctx.setOpen(!ctx.open);
      onClick?.(e);
    };
    return /* @__PURE__ */ React32__namespace.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
  }
);
PopoverTrigger.displayName = "PopoverTrigger";
var PopoverAnchor = React32__namespace.forwardRef(
  ({ ...props }, ref) => {
    const ctx = React32__namespace.useContext(PopoverContext);
    if (!ctx) return null;
    return /* @__PURE__ */ React32__namespace.createElement("span", { ref: mergeRefs(ctx.anchorRef, ref), ...props });
  }
);
PopoverAnchor.displayName = "PopoverAnchor";
var PopoverContent = React32__namespace.forwardRef(
  ({ className, align = "center", sideOffset = 4, style, ...props }, ref) => {
    const ctx = React32__namespace.useContext(PopoverContext);
    const [position, setPosition] = React32__namespace.useState({ top: 0, left: 0 });
    const open = !!ctx?.open;
    const anchor = ctx?.anchorRef.current ?? ctx?.triggerRef.current ?? null;
    React32__namespace.useLayoutEffect(() => {
      if (!anchor) return;
      const rect = anchor.getBoundingClientRect();
      let left = rect.left + rect.width / 2;
      if (align === "start") left = rect.left;
      if (align === "end") left = rect.right;
      setPosition({ top: rect.bottom + sideOffset, left });
    }, [anchor, align, sideOffset]);
    useOnClickOutside(
      [ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
      () => ctx?.setOpen(false),
      open
    );
    if (!ctx || !open) return null;
    return /* @__PURE__ */ React32__namespace.createElement(Portal, null, /* @__PURE__ */ React32__namespace.createElement(
      "div",
      {
        ref: mergeRefs(ctx.contentRef, ref),
        className: cn(
          "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
          className
        ),
        style: {
          position: "fixed",
          top: position.top,
          left: position.left,
          transform: align === "center" ? "translateX(-50%)" : align === "end" ? "translateX(-100%)" : void 0,
          ...style
        },
        ...props
      }
    ));
  }
);
PopoverContent.displayName = "PopoverContent";
var Progress = React32__namespace.forwardRef(
  ({ className, value = 0, max = 100, ...props }, ref) => {
    const safeMax = max <= 0 ? 100 : max;
    const safeValue = Math.max(0, Math.min(value, safeMax));
    const percent = safeValue / safeMax * 100;
    return /* @__PURE__ */ React32__namespace.createElement(
      "div",
      {
        ref,
        role: "progressbar",
        "aria-valuemin": 0,
        "aria-valuemax": safeMax,
        "aria-valuenow": safeValue,
        className: cn(
          "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
          className
        ),
        ...props
      },
      /* @__PURE__ */ React32__namespace.createElement(
        "div",
        {
          className: "h-full w-full flex-1 bg-primary transition-all",
          style: { transform: `translateX(-${100 - percent}%)` }
        }
      )
    );
  }
);
Progress.displayName = "Progress";
var ScrollArea = React32__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("relative overflow-auto", className),
    ...props
  },
  children
));
ScrollArea.displayName = "ScrollArea";
var ScrollBar = React32__namespace.forwardRef(
  ({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
    "div",
    {
      ref,
      className: cn(
        "pointer-events-none absolute",
        orientation === "vertical" ? "right-0 top-0 h-full w-2.5" : "bottom-0 left-0 h-2.5 w-full",
        className
      ),
      ...props
    }
  )
);
ScrollBar.displayName = "ScrollBar";
var SelectContext = React32__namespace.createContext(null);
React32__namespace.createContext(false);
var SelectTrigger = React32__namespace.forwardRef(({ className, children, onClick, ...props }, ref) => {
  const ctx = React32__namespace.useContext(SelectContext);
  if (!ctx) return null;
  return /* @__PURE__ */ React32__namespace.createElement(
    "button",
    {
      ref: mergeRefs(ctx.triggerRef, ref),
      type: "button",
      className: cn(
        "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
        className
      ),
      onClick: (e) => {
        ctx.setOpen(!ctx.open);
        onClick?.(e);
      },
      ...props
    },
    /* @__PURE__ */ React32__namespace.createElement("span", null, children),
    /* @__PURE__ */ React32__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" })
  );
});
SelectTrigger.displayName = "SelectTrigger";
var SelectScrollUpButton = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("flex cursor-default items-center justify-center py-1", className),
    ...props
  },
  /* @__PURE__ */ React32__namespace.createElement(lucideReact.ChevronUp, { className: "h-4 w-4" })
));
SelectScrollUpButton.displayName = "SelectScrollUpButton";
var SelectScrollDownButton = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("flex cursor-default items-center justify-center py-1", className),
    ...props
  },
  /* @__PURE__ */ React32__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4" })
));
SelectScrollDownButton.displayName = "SelectScrollDownButton";
var SelectContent = React32__namespace.forwardRef(({ className, children, style, ...props }, ref) => {
  const ctx = React32__namespace.useContext(SelectContext);
  const [pos, setPos] = React32__namespace.useState({ top: 0, left: 0, width: 0 });
  const open = !!ctx?.open;
  const trigger = ctx?.triggerRef.current ?? null;
  React32__namespace.useLayoutEffect(() => {
    if (!trigger) return;
    const rect = trigger.getBoundingClientRect();
    setPos({ top: rect.bottom + 4, left: rect.left, width: rect.width });
  }, [trigger]);
  useOnClickOutside(
    [ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
    () => ctx?.setOpen(false),
    open
  );
  if (!ctx || !open || !trigger) return null;
  return /* @__PURE__ */ React32__namespace.createElement(Portal, null, /* @__PURE__ */ React32__namespace.createElement(
    "div",
    {
      ref: mergeRefs(ctx.contentRef, ref),
      className: cn(
        "relative z-50 max-h-80 overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
        className
      ),
      style: {
        position: "fixed",
        top: pos.top,
        left: pos.left,
        minWidth: Math.max(pos.width, 128),
        ...style
      },
      ...props
    },
    /* @__PURE__ */ React32__namespace.createElement("div", { className: "p-1" }, children)
  ));
});
SelectContent.displayName = "SelectContent";
var SelectLabel = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("px-2 py-1.5 text-sm font-semibold", className),
    ...props
  }
));
SelectLabel.displayName = "SelectLabel";
var SelectItem = React32__namespace.forwardRef(
  ({ className, children, value, onClick, ...props }, ref) => {
    const ctx = React32__namespace.useContext(SelectContext);
    React32__namespace.useEffect(() => {
      if (!ctx) return;
      ctx.itemsRef.current.set(value, children);
      return () => {
        ctx.itemsRef.current.delete(value);
      };
    }, [ctx, value, children]);
    if (!ctx) return null;
    const selected = ctx.value === value;
    return /* @__PURE__ */ React32__namespace.createElement(
      "button",
      {
        ref,
        type: "button",
        className: cn(
          "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
          className
        ),
        onClick: (e) => {
          ctx.setValue(value);
          onClick?.(e);
        },
        ...props
      },
      /* @__PURE__ */ React32__namespace.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" }, selected ? /* @__PURE__ */ React32__namespace.createElement(lucideReact.Check, { className: "h-4 w-4" }) : null),
      /* @__PURE__ */ React32__namespace.createElement("span", null, children)
    );
  }
);
SelectItem.displayName = "SelectItem";
var SelectSeparator = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "div",
  {
    ref,
    className: cn("-mx-1 my-1 h-px bg-muted", className),
    ...props
  }
));
SelectSeparator.displayName = "SelectSeparator";
var Separator = React32__namespace.forwardRef(
  ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
    "div",
    {
      ref,
      role: decorative ? void 0 : "separator",
      "aria-orientation": orientation,
      className: cn(
        "shrink-0 bg-border",
        orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
        className
      ),
      ...props
    }
  )
);
Separator.displayName = "Separator";
var sheetVariants = classVarianceAuthority.cva(
  "fixed z-[10000] gap-4 bg-background p-6 shadow-lg transition ease-in-out translate-x-0 translate-y-0",
  {
    variants: {
      side: {
        top: "inset-x-0 top-0 left-0 border-b",
        bottom: "inset-x-0 bottom-0 left-0 border-t",
        left: "inset-y-0 left-0 top-0 h-full w-3/4 border-r sm:max-w-sm",
        right: "inset-y-0 right-0 top-0 h-full w-3/4 border-l sm:max-w-sm"
      }
    },
    defaultVariants: {
      side: "right"
    }
  }
);
var SheetContent = React32__namespace.forwardRef(
  ({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
    DialogContent,
    {
      ref,
      className: cn(
        "max-w-none rounded-none",
        sheetVariants({ side }),
        className
      ),
      showCloseButton: false,
      ...props
    },
    /* @__PURE__ */ React32__namespace.createElement(DialogClose, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100" }, /* @__PURE__ */ React32__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React32__namespace.createElement("span", { className: "sr-only" }, "Close")),
    children
  )
);
SheetContent.displayName = "SheetContent";
var SheetTitle = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "h2",
  {
    ref,
    className: cn("text-lg font-semibold text-foreground", className),
    ...props
  }
));
SheetTitle.displayName = "SheetTitle";
var SheetDescription = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32__namespace.createElement(
  "p",
  {
    ref,
    className: cn("text-sm text-muted-foreground", className),
    ...props
  }
));
SheetDescription.displayName = "SheetDescription";
var Textarea = React32__namespace.forwardRef(({ className, ...props }, ref) => {
  return /* @__PURE__ */ React32__namespace.createElement(
    "textarea",
    {
      className: cn(
        "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
        className
      ),
      ref,
      ...props
    }
  );
});
Textarea.displayName = "Textarea";
var TooltipConfigContext = React32__namespace.createContext({
  delayDuration: 200
});
var TooltipContext = React32__namespace.createContext(null);
var TooltipTrigger = React32__namespace.forwardRef(({ children, ...props }, ref) => {
  const ctx = React32__namespace.useContext(TooltipContext);
  const cfg = React32__namespace.useContext(TooltipConfigContext);
  const timer = React32__namespace.useRef(null);
  if (!ctx) return null;
  const setRef = mergeRefs(ctx.triggerRef, ref);
  const openWithDelay = () => {
    if (timer.current) clearTimeout(timer.current);
    timer.current = setTimeout(() => ctx.setOpen(true), cfg.delayDuration);
  };
  const closeNow = () => {
    if (timer.current) clearTimeout(timer.current);
    ctx.setOpen(false);
  };
  const shared = {
    onMouseEnter: openWithDelay,
    onMouseLeave: closeNow,
    onFocus: openWithDelay,
    onBlur: closeNow,
    ...props
  };
  return /* @__PURE__ */ React32__namespace.createElement("span", { ref: setRef, ...shared }, children);
});
TooltipTrigger.displayName = "TooltipTrigger";
var TooltipContent = React32__namespace.forwardRef(({ className, sideOffset = 4, style, ...props }, ref) => {
  const ctx = React32__namespace.useContext(TooltipContext);
  const [pos, setPos] = React32__namespace.useState({ top: 0, left: 0 });
  const open = !!ctx?.open;
  const trigger = ctx?.triggerRef.current ?? null;
  React32__namespace.useLayoutEffect(() => {
    if (!trigger) return;
    const rect = trigger.getBoundingClientRect();
    setPos({
      top: rect.top - sideOffset,
      left: rect.left + rect.width / 2
    });
  }, [trigger, sideOffset]);
  if (!ctx || !open || !trigger) return null;
  return /* @__PURE__ */ React32__namespace.createElement(Portal, null, /* @__PURE__ */ React32__namespace.createElement(
    "div",
    {
      ref,
      className: cn(
        "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground",
        className
      ),
      style: {
        position: "fixed",
        top: pos.top,
        left: pos.left,
        transform: "translate(-50%, -100%)",
        ...style
      },
      ...props
    }
  ));
});
TooltipContent.displayName = "TooltipContent";
var AvatarContext = React32__namespace.createContext(null);
var Avatar = React32__namespace.forwardRef(({ className, ...props }, ref) => {
  const [status, setStatus] = React32__namespace.useState("idle");
  return /* @__PURE__ */ React32__namespace.createElement(AvatarContext.Provider, { value: { status, setStatus } }, /* @__PURE__ */ React32__namespace.createElement(
    "span",
    {
      ref,
      className: cn(
        "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
        className
      ),
      ...props
    }
  ));
});
Avatar.displayName = "Avatar";
var AvatarImage = React32__namespace.forwardRef(({ className, onLoad, onError, ...props }, ref) => {
  const ctx = React32__namespace.useContext(AvatarContext);
  return /* @__PURE__ */ React32__namespace.createElement(
    "img",
    {
      ref,
      className: cn(
        "aspect-square h-full w-full",
        ctx?.status === "error" ? "hidden" : void 0,
        className
      ),
      onLoad: (e) => {
        ctx?.setStatus("loaded");
        onLoad?.(e);
      },
      onError: (e) => {
        ctx?.setStatus("error");
        onError?.(e);
      },
      ...props
    }
  );
});
AvatarImage.displayName = "AvatarImage";
var AvatarFallback = React32__namespace.forwardRef(({ className, ...props }, ref) => {
  const ctx = React32__namespace.useContext(AvatarContext);
  const show = ctx?.status !== "loaded";
  if (!show) return null;
  return /* @__PURE__ */ React32__namespace.createElement(
    "span",
    {
      ref,
      className: cn(
        "flex h-full w-full items-center justify-center rounded-full bg-muted",
        className
      ),
      ...props
    }
  );
});
AvatarFallback.displayName = "AvatarFallback";
var Timeline = ({ items = [] }) => {
  if (!items || items.length === 0) {
    return null;
  }
  return /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200" }), items.map((item, index) => /* @__PURE__ */ React32__namespace.default.createElement("div", { key: index, className: "relative pl-12 pb-8" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "absolute left-0 w-8 h-8 rounded-full bg-blue-500 border-4 border-white shadow-md flex items-center justify-center" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "w-2 h-2 rounded-full bg-white" })), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "bg-white rounded-lg p-4 shadow-md" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "text-sm text-gray-500 mb-2" }, item.date), /* @__PURE__ */ React32__namespace.default.createElement("h4", { className: "text-lg font-semibold mb-2" }, item.title), /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "text-gray-600" }, item.description)))));
};
var CollisionBalls = ({
  collisionBallsConfig: {
    balls,
    width,
    height
  }
}) => {
  const canvasRef = React32.useRef(null);
  const containerRef = React32.useRef(null);
  const ballsRef = React32.useRef([]);
  const [isShaking, setIsShaking] = React32.useState(false);
  const [draggedBall, setDraggedBall] = React32.useState(null);
  const [mousePos, setMousePos] = React32.useState({ x: 0, y: 0 });
  const animationRef = React32.useRef(null);
  const updateCanvasSize = () => {
    const container = containerRef.current;
    const canvas = canvasRef.current;
    if (!container || !canvas) {
      console.error("Container or canvas not found");
      return;
    }
    const containerWidth = container.clientWidth;
    const containerHeight = container.clientHeight;
    console.log("Container size:", { containerWidth, containerHeight });
    canvas.width = containerWidth;
    canvas.height = containerHeight;
    canvas.style.width = containerWidth + "px";
    canvas.style.height = containerHeight + "px";
    console.log("Canvas size updated:", {
      width: canvas.width,
      height: canvas.height,
      containerWidth,
      containerHeight
    });
  };
  const initBalls = () => {
    const canvas = canvasRef.current;
    if (!canvas) {
      console.error("Canvas not found during ball initialization");
      return [];
    }
    console.log("Initializing balls with canvas size:", {
      width: canvas.width,
      height: canvas.height
    });
    return balls.map((ballConfig) => ({
      x: Math.random() * (canvas.width - 100) + 50,
      y: Math.random() * (canvas.height - 100) + 50,
      vx: (Math.random() - 0.5) * 4,
      vy: (Math.random() - 0.5) * 4,
      radius: ballConfig.size,
      color: ballConfig.color,
      text: ballConfig.label,
      isDragging: false
    }));
  };
  React32.useEffect(() => {
    const handleResize = () => {
      console.log("Window resized");
      updateCanvasSize();
    };
    if (typeof window !== "undefined") {
      window.addEventListener("resize", handleResize);
      updateCanvasSize();
    }
    return () => {
      if (typeof window !== "undefined") {
        window.removeEventListener("resize", handleResize);
      }
    };
  }, []);
  React32.useEffect(() => {
    const canvas = canvasRef.current;
    if (!canvas) {
      console.error("Canvas element not found");
      return;
    }
    const ctx = canvas.getContext("2d");
    if (!ctx) {
      console.error("Failed to get canvas context");
      return;
    }
    console.log("Starting animation setup...");
    updateCanvasSize();
    ballsRef.current = initBalls();
    console.log("Balls initialized:", ballsRef.current);
    let lastTime = performance.now();
    let frameCount = 0;
    const animate = (currentTime) => {
      try {
        frameCount++;
        if (currentTime - lastTime >= 1e3) {
          console.log("FPS: " + frameCount);
          frameCount = 0;
          lastTime = currentTime;
        }
        ctx.clearRect(0, 0, canvas.width, canvas.height);
        ballsRef.current.forEach((ball) => {
          if (!ball.isDragging) {
            updatePosition(ball, canvas.width, canvas.height);
          }
          for (let i = 0; i < ballsRef.current.length; i++) {
            for (let j = i + 1; j < ballsRef.current.length; j++) {
              const ball1 = ballsRef.current[i];
              const ball2 = ballsRef.current[j];
              if (ball1 && ball2) {
                checkCollision(ball1, ball2);
              }
            }
          }
          draw(ctx, ball);
        });
        animationRef.current = requestAnimationFrame(animate);
      } catch (error) {
        console.error("Animation error:", error);
      }
    };
    console.log("Starting animation loop...");
    animationRef.current = requestAnimationFrame(animate);
    return () => {
      console.log("Cleaning up animation...");
      if (animationRef.current) {
        cancelAnimationFrame(animationRef.current);
        animationRef.current = null;
      }
    };
  }, []);
  const shake = () => {
    setIsShaking(true);
    ballsRef.current.forEach((ball) => {
      ball.vx = (Math.random() - 0.5) * 10;
      ball.vy = (Math.random() - 0.5) * 10;
    });
    setTimeout(() => setIsShaking(false), 200);
  };
  const slowdown = () => {
    setIsShaking(true);
    ballsRef.current.forEach((ball) => {
      ball.vx = ball.vx * 0.5;
      ball.vy = ball.vy * 0.5;
    });
    setTimeout(() => setIsShaking(false), 200);
  };
  const checkCollision = (ball1, ball2) => {
    const dx = ball2.x - ball1.x;
    const dy = ball2.y - ball1.y;
    const distance = Math.sqrt(dx * dx + dy * dy);
    if (distance < ball1.radius + ball2.radius) {
      const angle = Math.atan2(dy, dx);
      const overlap = (ball1.radius + ball2.radius - distance) / 2;
      if (ball1.isDragging || ball2.isDragging) {
        const draggedBall2 = ball1.isDragging ? ball1 : ball2;
        const otherBall = ball1.isDragging ? ball2 : ball1;
        otherBall.x += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.cos(angle);
        otherBall.y += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.sin(angle);
        const pushForce = 2;
        otherBall.vx = (draggedBall2 === ball1 ? -1 : 1) * Math.cos(angle) * pushForce;
        otherBall.vy = (draggedBall2 === ball1 ? -1 : 1) * Math.sin(angle) * pushForce;
        return;
      }
      const sin = Math.sin(angle);
      const cos = Math.cos(angle);
      const vx1 = ball1.vx * cos + ball1.vy * sin;
      const vy1 = ball1.vy * cos - ball1.vx * sin;
      const vx2 = ball2.vx * cos + ball2.vy * sin;
      const vy2 = ball2.vy * cos - ball2.vx * sin;
      const newVx1 = vx2;
      const newVx2 = vx1;
      ball1.vx = newVx1 * cos - vy1 * sin;
      ball1.vy = vy1 * cos + newVx1 * sin;
      ball2.vx = newVx2 * cos - vy2 * sin;
      ball2.vy = vy2 * cos + newVx2 * sin;
      ball1.x -= overlap * Math.cos(angle);
      ball1.y -= overlap * Math.sin(angle);
      ball2.x += overlap * Math.cos(angle);
      ball2.y += overlap * Math.sin(angle);
    }
  };
  const updatePosition = (ball, width2, height2) => {
    const handleBoundaryCollision = (velocity, position, boundary, radius) => {
      let newVelocity = velocity;
      let newPosition = position;
      if (position - radius < 0) {
        newPosition = radius;
        newVelocity = Math.abs(velocity);
      } else if (position + radius > boundary) {
        newPosition = boundary - radius;
        newVelocity = -Math.abs(velocity);
      }
      return [newVelocity, newPosition];
    };
    const [newVx, newX] = handleBoundaryCollision(
      ball.vx,
      ball.x,
      width2,
      ball.radius
    );
    const [newVy, newY] = handleBoundaryCollision(
      ball.vy,
      ball.y,
      height2,
      ball.radius
    );
    ball.vx = newVx;
    ball.vy = newVy;
    ball.x = newX;
    ball.y = newY;
  };
  const draw = (ctx, ball) => {
    ctx.beginPath();
    ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
    ctx.fillStyle = ball.color;
    ctx.fill();
    ctx.closePath();
    if (ball.text) {
      ctx.font = "14px Arial";
      ctx.fillStyle = "#fff";
      ctx.textAlign = "center";
      ctx.textBaseline = "middle";
      ctx.fillText(ball.text, ball.x, ball.y);
    }
  };
  const handleMouseDown = (event) => {
    const mousePos2 = getMousePos(event);
    const ball = ballsRef.current.find((b) => {
      const dx = b.x - mousePos2.x;
      const dy = b.y - mousePos2.y;
      return Math.sqrt(dx * dx + dy * dy) < b.radius;
    });
    if (ball) {
      ball.isDragging = true;
      setDraggedBall(ball);
    }
  };
  const handleMouseMove = (event) => {
    const mousePos2 = getMousePos(event);
    setMousePos(mousePos2);
    if (draggedBall) {
      draggedBall.x = mousePos2.x;
      draggedBall.y = mousePos2.y;
      draggedBall.vx = 0;
      draggedBall.vy = 0;
    }
  };
  const handleMouseUp = () => {
    if (draggedBall) {
      draggedBall.isDragging = false;
      setDraggedBall(null);
    }
  };
  const getMousePos = (event) => {
    const canvas = canvasRef.current;
    if (!canvas) return { x: 0, y: 0 };
    const rect = canvas.getBoundingClientRect();
    const scaleX = canvas.width / rect.width;
    const scaleY = canvas.height / rect.height;
    return {
      x: (event.clientX - rect.left) * scaleX,
      y: (event.clientY - rect.top) * scaleY
    };
  };
  return /* @__PURE__ */ React32__namespace.default.createElement("div", { style: { width: "100%", height: "100%", position: "relative", backgroundColor: "#f9fafb", borderRadius: "0.5rem" } }, /* @__PURE__ */ React32__namespace.default.createElement("div", { ref: containerRef, style: { width: "100%", height: "100%", position: "absolute", top: 0, left: 0 } }, /* @__PURE__ */ React32__namespace.default.createElement(
    "canvas",
    {
      ref: canvasRef,
      style: {
        width: "100%",
        height: "100%",
        display: "block"
        // 确保canvas正确显示
      },
      onMouseDown: handleMouseDown,
      onMouseMove: handleMouseMove,
      onMouseUp: handleMouseUp,
      onMouseLeave: handleMouseUp
    }
  )), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "absolute bottom-4 right-4 flex gap-2" }, /* @__PURE__ */ React32__namespace.default.createElement(
    "button",
    {
      onClick: shake,
      className: clsx.clsx("px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors", isShaking ? "animate-pulse" : "")
    },
    "\u6447\u4E00\u6447"
  ), /* @__PURE__ */ React32__namespace.default.createElement(
    "button",
    {
      onClick: slowdown,
      className: clsx.clsx("px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors", isShaking ? "animate-pulse" : "")
    },
    "\u51CF\u901F"
  )));
};

// src/portfolio/About.tsx
var About = ({
  timelineConfig,
  collisionBallsConfig
}) => {
  return /* @__PURE__ */ React32__namespace.default.createElement("section", { id: "about", className: "py-16 bg-white" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React32__namespace.default.createElement("h2", { className: "text-3xl font-bold text-center mb-12" }, "\u5173\u4E8E\u6211"), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React32__namespace.default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u4E2A\u4EBA\u7ECF\u5386"), /* @__PURE__ */ React32__namespace.default.createElement(Timeline, { items: timelineConfig.items })), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React32__namespace.default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u6280\u80FD\u5C55\u793A"), /* @__PURE__ */ React32__namespace.default.createElement("div", { style: { height: "400px", position: "relative" } }, /* @__PURE__ */ React32__namespace.default.createElement(CollisionBalls, { collisionBallsConfig }))))));
};
var About_default = About;
var Contact = () => {
  const [formData, setFormData] = React32.useState({
    name: "",
    email: "",
    message: ""
  });
  const [isSubmitting, setIsSubmitting] = React32.useState(false);
  const [submitStatus, setSubmitStatus] = React32.useState("idle");
  const handleChange = (e) => {
    const { name, value } = e.target;
    setFormData((prev) => ({
      ...prev,
      [name]: value
    }));
  };
  const handleSubmit = async (e) => {
    e.preventDefault();
    setIsSubmitting(true);
    setSubmitStatus("idle");
    try {
      await new Promise((resolve) => setTimeout(resolve, 1e3));
      setSubmitStatus("success");
      setFormData({ name: "", email: "", message: "" });
    } catch (error) {
      setSubmitStatus("error");
    } finally {
      setIsSubmitting(false);
    }
  };
  return /* @__PURE__ */ React32__namespace.default.createElement("section", { id: "contact", className: "py-16 bg-gray-50" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "text-center mb-12" }, /* @__PURE__ */ React32__namespace.default.createElement("h2", { className: "text-3xl font-bold text-gray-900 sm:text-4xl" }, "\u8054\u7CFB\u6211"), /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "mt-4 text-lg text-gray-600" }, "\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF1F\u8BF7\u968F\u65F6\u8054\u7CFB\u6211")), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-xl p-6 sm:p-8" }, /* @__PURE__ */ React32__namespace.default.createElement("form", { onSubmit: handleSubmit, className: "space-y-6" }, /* @__PURE__ */ React32__namespace.default.createElement("div", null, /* @__PURE__ */ React32__namespace.default.createElement("label", { htmlFor: "name", className: "block text-sm font-medium text-gray-700" }, "\u59D3\u540D"), /* @__PURE__ */ React32__namespace.default.createElement(
    "input",
    {
      type: "text",
      name: "name",
      id: "name",
      value: formData.name,
      onChange: handleChange,
      required: true,
      className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
      placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u59D3\u540D"
    }
  )), /* @__PURE__ */ React32__namespace.default.createElement("div", null, /* @__PURE__ */ React32__namespace.default.createElement("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700" }, "\u90AE\u7BB1"), /* @__PURE__ */ React32__namespace.default.createElement(
    "input",
    {
      type: "email",
      name: "email",
      id: "email",
      value: formData.email,
      onChange: handleChange,
      required: true,
      className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
      placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u90AE\u7BB1"
    }
  )), /* @__PURE__ */ React32__namespace.default.createElement("div", null, /* @__PURE__ */ React32__namespace.default.createElement("label", { htmlFor: "message", className: "block text-sm font-medium text-gray-700" }, "\u6D88\u606F"), /* @__PURE__ */ React32__namespace.default.createElement(
    "textarea",
    {
      name: "message",
      id: "message",
      rows: 4,
      value: formData.message,
      onChange: handleChange,
      required: true,
      className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
      placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6D88\u606F"
    }
  )), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex items-center justify-end" }, /* @__PURE__ */ React32__namespace.default.createElement(
    "button",
    {
      type: "submit",
      disabled: isSubmitting,
      className: clsx.clsx("inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white", isSubmitting ? "bg-blue-400 cursor-not-allowed" : "bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500")
    },
    isSubmitting ? "\u53D1\u9001\u4E2D..." : "\u53D1\u9001\u6D88\u606F"
  )), submitStatus === "success" && /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "rounded-md bg-green-50 p-4" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React32__namespace.default.createElement("svg", { className: "h-5 w-5 text-green-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React32__namespace.default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }))), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "text-sm font-medium text-green-800" }, "\u6D88\u606F\u5DF2\u6210\u529F\u53D1\u9001\uFF01")))), submitStatus === "error" && /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "rounded-md bg-red-50 p-4" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React32__namespace.default.createElement("svg", { className: "h-5 w-5 text-red-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React32__namespace.default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }))), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "text-sm font-medium text-red-800" }, "\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")))))), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React32__namespace.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React32__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }))), /* @__PURE__ */ React32__namespace.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u90AE\u7BB1"), /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "mt-2 text-gray-600" }, "your.email@example.com")), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React32__namespace.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React32__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }))), /* @__PURE__ */ React32__namespace.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u7535\u8BDD"), /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "mt-2 text-gray-600" }, "+86 123 4567 8900")), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React32__namespace.default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React32__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }), /* @__PURE__ */ React32__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }))), /* @__PURE__ */ React32__namespace.default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u5730\u5740"), /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "mt-2 text-gray-600" }, "\u4E2D\u56FD\uFF0C\u5317\u4EAC")))));
};
var Contact_default = Contact;
var Home = ({ homeConfig, className }) => {
  const { title, subtitle, buttons, imageSrc } = homeConfig;
  const [displayText, setDisplayText] = React32.useState("");
  const [currentIndex, setCurrentIndex] = React32.useState(0);
  React32.useEffect(() => {
    if (currentIndex < title.length) {
      const timer = setTimeout(() => {
        setDisplayText((prev) => prev + title[currentIndex]);
        setCurrentIndex((prev) => prev + 1);
      }, 150);
      return () => clearTimeout(timer);
    }
    return () => {
      setDisplayText("");
      setCurrentIndex(0);
    };
  }, [currentIndex, title]);
  return /* @__PURE__ */ React32__namespace.default.createElement(
    "section",
    {
      id: "home",
      className: cn("min-h-screen flex items-center justify-center py-16 bg-gradient-to-b from-white to-gray-50", className)
    },
    /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex flex-col md:flex-row items-center gap-12" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex-1 text-center md:text-left" }, /* @__PURE__ */ React32__namespace.default.createElement("h1", { className: "text-4xl md:text-6xl font-bold mb-6 text-gray-900" }, /* @__PURE__ */ React32__namespace.default.createElement("span", { className: "inline-block" }, displayText), /* @__PURE__ */ React32__namespace.default.createElement("span", { className: "animate-pulse ml-1 text-blue-500" }, "|")), /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "text-xl md:text-2xl text-gray-600 mb-8" }, subtitle), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex flex-wrap gap-4 justify-center md:justify-start" }, buttons.map((button) => /* @__PURE__ */ React32__namespace.default.createElement(
      "a",
      {
        key: button.link,
        href: button.link,
        className: "px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all duration-300 shadow-md hover:shadow-lg font-medium"
      },
      button.text
    )))), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "relative group" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "absolute -inset-1 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg blur opacity-25 group-hover:opacity-50 transition duration-1000 group-hover:duration-200" }), /* @__PURE__ */ React32__namespace.default.createElement(
      "img",
      {
        src: imageSrc,
        alt: "Profile",
        className: "relative w-full max-w-md mx-auto rounded-lg shadow-xl transform hover:scale-[1.02] transition-transform duration-300 bg-white"
      }
    )))))
  );
};
var Home_default = Home;
var ExperimentCard = ({
  href,
  title,
  description,
  tags,
  category,
  isCompleted,
  updatedAt,
  createdAt,
  className
}) => {
  const formatDate = (dateString) => {
    if (!dateString) return "";
    try {
      const date = new Date(dateString);
      return date.toLocaleDateString("zh-CN", {
        year: "numeric",
        month: "2-digit",
        day: "2-digit"
      });
    } catch (e) {
      return dateString;
    }
  };
  return /* @__PURE__ */ React32__namespace.default.createElement(Link__default.default, { href, className: cn("block group", className) }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "w-full h-full bg-white rounded-2xl overflow-hidden shadow-md hover:shadow-2xl transition-all duration-300 transform group-hover:-translate-y-1 border border-gray-100 hover:border-gray-200" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex items-start justify-between mb-4" }, /* @__PURE__ */ React32__namespace.default.createElement("h3", { className: "text-xl font-semibold text-gray-900 flex-1 pr-4 leading-tight" }, title), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex flex-col gap-2 flex-shrink-0" }, /* @__PURE__ */ React32__namespace.default.createElement("span", { className: cn(
    "px-3 py-1.5 text-xs font-medium rounded-full shadow-sm",
    category === "utility" ? "bg-gradient-to-r from-green-50 to-green-100 text-green-700 border border-green-200" : "bg-gradient-to-r from-purple-50 to-purple-100 text-purple-700 border border-purple-200"
  ) }, category === "utility" ? "\u{1F527} \u5B9E\u7528\u5DE5\u5177" : "\u{1F3AE} \u4F11\u95F2\u5A31\u4E50"), /* @__PURE__ */ React32__namespace.default.createElement("span", { className: cn(
    "px-3 py-1.5 text-xs font-medium rounded-full shadow-sm border",
    isCompleted ? "bg-gradient-to-r from-emerald-50 to-emerald-100 text-emerald-700 border border-emerald-200" : "bg-gradient-to-r from-orange-50 to-orange-100 text-orange-700 border border-orange-200"
  ) }, isCompleted ? "\u2705 \u5DF2\u5B8C\u6210" : "\u{1F6A7} \u8FDB\u884C\u4E2D"))), /* @__PURE__ */ React32__namespace.default.createElement("p", { className: "text-gray-600 mb-4" }, description), updatedAt && /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex items-center gap-1 mb-3 text-xs text-gray-500" }, /* @__PURE__ */ React32__namespace.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React32__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React32__namespace.default.createElement("span", null, "\u66F4\u65B0\u4E8E: ", formatDate(updatedAt)), createdAt && createdAt !== updatedAt && /* @__PURE__ */ React32__namespace.default.createElement("span", { className: "ml-2 text-gray-400" }, "\u521B\u5EFA\u4E8E: ", formatDate(createdAt))), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "flex flex-wrap gap-2" }, tags.map((tag) => /* @__PURE__ */ React32__namespace.default.createElement(
    "span",
    {
      key: tag,
      className: "px-3 py-1.5 text-xs font-medium bg-gradient-to-r from-gray-50 to-gray-100 text-gray-700 rounded-full border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200"
    },
    "#",
    tag
  ))))));
};
var ProjectCarousel = ({ projects, className }) => {
  const [currentIndex, setCurrentIndex] = React32.useState(0);
  const nextSlide = () => {
    setCurrentIndex(
      (prevIndex) => prevIndex === projects.length - 1 ? 0 : prevIndex + 1
    );
  };
  const prevSlide = () => {
    setCurrentIndex(
      (prevIndex) => prevIndex === 0 ? projects.length - 1 : prevIndex - 1
    );
  };
  return /* @__PURE__ */ React32__namespace.default.createElement("section", { id: "projects", className: cn("py-16 bg-gray-50", className) }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React32__namespace.default.createElement("h2", { className: "text-3xl font-bold text-center mb-12 text-gray-900" }, "\u9879\u76EE\u5C55\u793A"), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "relative max-w-4xl mx-auto" }, /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "relative h-[400px] overflow-hidden rounded-lg shadow-xl" }, projects.map((project, index) => /* @__PURE__ */ React32__namespace.default.createElement(
    "div",
    {
      key: project.id,
      className: cn(
        "absolute w-full h-full transition-all duration-500 transform",
        index === currentIndex ? "translate-x-0 opacity-100" : index < currentIndex ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
      )
    },
    /* @__PURE__ */ React32__namespace.default.createElement(
      ExperimentCard,
      {
        href: project.link || "#",
        title: project.title,
        description: project.description,
        tags: project.tags,
        category: "utility"
      }
    )
  ))), /* @__PURE__ */ React32__namespace.default.createElement(
    "button",
    {
      onClick: prevSlide,
      className: "absolute left-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-[10]"
    },
    /* @__PURE__ */ React32__namespace.default.createElement(
      "svg",
      {
        className: "w-6 h-6 text-gray-600",
        fill: "none",
        stroke: "currentColor",
        viewBox: "0 0 24 24"
      },
      /* @__PURE__ */ React32__namespace.default.createElement(
        "path",
        {
          strokeLinecap: "round",
          strokeLinejoin: "round",
          strokeWidth: 2,
          d: "M15 19l-7-7 7-7"
        }
      )
    )
  ), /* @__PURE__ */ React32__namespace.default.createElement(
    "button",
    {
      onClick: nextSlide,
      className: "absolute right-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-[10]"
    },
    /* @__PURE__ */ React32__namespace.default.createElement(
      "svg",
      {
        className: "w-6 h-6 text-gray-600",
        fill: "none",
        stroke: "currentColor",
        viewBox: "0 0 24 24"
      },
      /* @__PURE__ */ React32__namespace.default.createElement(
        "path",
        {
          strokeLinecap: "round",
          strokeLinejoin: "round",
          strokeWidth: 2,
          d: "M9 5l7 7-7 7"
        }
      )
    )
  ), /* @__PURE__ */ React32__namespace.default.createElement("div", { className: "absolute bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2 z-[10]" }, projects.map((_, index) => /* @__PURE__ */ React32__namespace.default.createElement(
    "button",
    {
      key: index,
      onClick: () => setCurrentIndex(index),
      className: cn(
        "w-2 h-2 rounded-full transition-all duration-300",
        index === currentIndex ? "bg-blue-500 w-4" : "bg-gray-300"
      )
    }
  ))))));
};

exports.About = About_default;
exports.Contact = Contact_default;
exports.ExperimentCard = ExperimentCard;
exports.Home = Home_default;
exports.ProjectCarousel = ProjectCarousel;
//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map