Walrus blob · mainnet
On-chain registration not yet visible.
The aggregator served this blob, but we couldn't locate a matching BlobRegistered event in our scan window. It may not be certified yet, or live further back than we paged.
Lifecycle data is unavailable until the blob registration is visible on-chain.
import { c as Q, s as oe, r as l, j as e, P as ct, Z as De, F as Xe, T as Te, X as te, n as Ue, M as He, S as it, h as lt, i as dt, k as ot, L as xt } from "./index--DlOfQ5W.js";
import { a as we, C as mt } from "./chevron-up-DdiZuWb4.js";
import { C as Z } from "./check-B5TtavAr.js";
import { C as se } from "./circle-BviWcIgt.js";
import { P as de } from "./plus-kT-5WSCA.js";
import { C as Oe } from "./chevron-left-D5J8eVM_.js";
import { C as ue } from "./chevron-right-BVYX3z_F.js";
import { T as ut } from "./trash-2-DY7OzMF8.js";
import { C as Ze } from "./calendar-CTzban8O.js";
import { C as ht } from "./circle-check-DllKYR_Y.js";
import { S as pt } from "./SyncBadge-fy-ZzJO-.js";
import { S as gt } from "./search-D6HGydHa.js";
import "./circle-alert-DQooZKju.js";
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const re = Q("AlarmClock", [["circle", { cx: "12", cy: "13", r: "8", key: "3y4lt7" }], ["path", { d: "M12 9v4l2 2", key: "1c63tq" }], ["path", { d: "M5 3 2 6", key: "18tl5t" }], ["path", { d: "m22 6-3-3", key: "1opdir" }], ["path", { d: "M6.38 18.7 4 21", key: "17xu3x" }], ["path", { d: "M17.64 18.67 20 21", key: "kv2oe2" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const Fe = Q("CalendarDays", [["path", { d: "M8 2v4", key: "1cmpym" }], ["path", { d: "M16 2v4", key: "4m81vk" }], ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }], ["path", { d: "M3 10h18", key: "8toen8" }], ["path", { d: "M8 14h.01", key: "6423bh" }], ["path", { d: "M12 14h.01", key: "1etili" }], ["path", { d: "M16 14h.01", key: "1gbofw" }], ["path", { d: "M8 18h.01", key: "lrp35t" }], ["path", { d: "M12 18h.01", key: "mhygvu" }], ["path", { d: "M16 18h.01", key: "kzsmim" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const he = Q("Clock", [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const bt = Q("Columns3", [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }], ["path", { d: "M9 3v18", key: "fh3hqa" }], ["path", { d: "M15 3v18", key: "14nvp0" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const ft = Q("House", [["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }], ["path", { d: "M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", key: "1d0kgt" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const kt = Q("Leaf", [["path", { d: "M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z", key: "nnexq3" }], ["path", { d: "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12", key: "mt58a7" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const zt = Q("ListTodo", [["rect", { x: "3", y: "5", width: "6", height: "6", rx: "1", key: "1defrl" }], ["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }], ["path", { d: "M13 6h8", key: "15sg57" }], ["path", { d: "M13 12h8", key: "h98zly" }], ["path", { d: "M13 18h8", key: "oe0vm4" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const Se = Q("List", [["path", { d: "M3 12h.01", key: "nlz23k" }], ["path", { d: "M3 18h.01", key: "1tta3j" }], ["path", { d: "M3 6h.01", key: "1rqtza" }], ["path", { d: "M8 12h13", key: "1za7za" }], ["path", { d: "M8 18h13", key: "1lx6n3" }], ["path", { d: "M8 6h13", key: "ik3vkj" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const Qe = Q("Palette", [["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }], ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }], ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }], ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }], ["path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z", key: "12rzf8" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const Me = Q("Star", [["path", { d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z", key: "r04s7s" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const yt = Q("Sunrise", [["path", { d: "M12 2v8", key: "1q4o3n" }], ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }], ["path", { d: "M2 18h2", key: "j10viu" }], ["path", { d: "M20 18h2", key: "wocana" }], ["path", { d: "m19.07 10.93-1.41 1.41", key: "15zs5n" }], ["path", { d: "M22 22H2", key: "19qnx5" }], ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }], ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]]);
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
const Pe = Q("Users", [["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }], ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }], ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }], ["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]]), pe = [{ key: "critical", label: "\u6700\u512A\u5148 (\u7DCA\u6025)", shortLabel: "\u7DCA\u6025", icon: "\u{1F534}", score: 5, textColor: "text-red-600 dark:text-red-400", bgColor: "bg-red-50 dark:bg-red-900/20", badgeBg: "bg-red-100 dark:bg-red-900/40" }, { key: "rush", label: "\u6025\u304E", shortLabel: "\u6025\u304E", icon: "\u{1F7E0}", score: 4, textColor: "text-orange-600 dark:text-orange-400", bgColor: "bg-orange-50 dark:bg-orange-900/20", badgeBg: "bg-orange-100 dark:bg-orange-900/40" }, { key: "moderate-rush", label: "\u5272\u3068\u6025\u304E", shortLabel: "\u5272\u6025", icon: "\u{1F7E1}", score: 3, textColor: "text-yellow-600 dark:text-yellow-400", bgColor: "bg-yellow-50 dark:bg-yellow-900/20", badgeBg: "bg-yellow-100 dark:bg-yellow-900/40" }, { key: "when-free", label: "\u624B\u304C\u7A7A\u3051\u3070", shortLabel: "\u4F59\u88D5", icon: "\u{1F7E2}", score: 2, textColor: "text-emerald-600 dark:text-emerald-400", bgColor: "bg-emerald-50 dark:bg-emerald-900/20", badgeBg: "bg-emerald-100 dark:bg-emerald-900/40" }, { key: "whenever", label: "\u6687\u306A\u3068\u304D", shortLabel: "\u6687", icon: "\u{1F535}", score: 1, textColor: "text-blue-500 dark:text-blue-400", bgColor: "bg-blue-50 dark:bg-blue-900/20", badgeBg: "bg-blue-100 dark:bg-blue-900/40" }], ge = [{ key: "highest", label: "\u6700\u9AD8", score: 5 }, { key: "high", label: "\u9AD8", score: 4 }, { key: "medium", label: "\u4E2D", score: 3 }, { key: "low", label: "\u5C0F", score: 2 }, { key: "lowest", label: "\u6700\u5C0F", score: 1 }], be = [{ key: "urgent", label: "\u7DCA\u6025", icon: "\u{1F534}", description: "\u4ECA\u3059\u3050\u5BFE\u5FDC\u304C\u5FC5\u8981" }, { key: "normal", label: "\u901A\u5E38\u306E\u30BF\u30B9\u30AF", icon: "\u{1F4CB}", description: "\u901A\u5E38\u306E\u4F5C\u696D" }, { key: "recurring", label: "\u5B9A\u671F\u30BF\u30B9\u30AF", icon: "\u{1F504}", description: "\u7E70\u308A\u8FD4\u3057\u30BF\u30B9\u30AF" }, { key: "someday", label: "\u3044\u3064\u304B\u3084\u308BBOX", icon: "\u{1F4AD}", description: "\u7DCA\u6025\u6027\u306E\u306A\u3044\u4ED5\u4E8B\u3092\u30B9\u30C8\u30C3\u30AF" }, { key: "whenever", label: "\u306A\u308B\u3079\u304F\u65E9\u304F\u3084\u308B", icon: "\u{1F422}", description: "\u6025\u304E\u3067\u306F\u306A\u3044\u304C\u65E9\u3081\u306B" }, { key: "archive", label: "\u904E\u53BB\u30ED\u30B0", icon: "\u{1F4DA}", description: "\u5B8C\u4E86\u6E08\u307F\u30A2\u30FC\u30AB\u30A4\u30D6" }], We = [{ id: "cat-work", name: "\u4ED5\u4E8B", color: "#3b82f6" }, { id: "cat-personal", name: "\u500B\u4EBA", color: "#10b981" }, { id: "cat-project", name: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8", color: "#8b5cf6" }], je = ["#ef4444", "#f97316", "#f59e0b", "#eab308", "#84cc16", "#22c55e", "#10b981", "#14b8a6", "#06b6d4", "#0ea5e9", "#3b82f6", "#6366f1", "#8b5cf6", "#a855f7", "#d946ef", "#ec4899", "#f43f5e", "#78716c"], et = "flowy_tasks_v2", tt = "flowy_categories", ie = () => {
const t = /* @__PURE__ */ new Date(), a = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), m = String(t.getDate()).padStart(2, "0");
return `${a}-${s}-${m}`;
}, le = (t) => {
if (!t) return "";
const [, a, s] = t.split("-").map(Number);
return `${a}\u6708${s}\u65E5`;
}, ae = () => Date.now().toString() + Math.random().toString(36).substring(2, 9);
function Ce(t) {
var _a, _b;
const a = ((_a = pe.find((m) => m.key === t.urgency)) == null ? void 0 : _a.score) ?? 3, s = ((_b = ge.find((m) => m.key === t.importance)) == null ? void 0 : _b.score) ?? 3;
return a * 2 + s;
}
function jt(t) {
return [...t].sort((a, s) => Ce(s) - Ce(a) || a.order - s.order);
}
function Nt(t) {
return { id: t.id, text: t.text || "", memo: t.memo || "", subtasks: t.subtasks || [], deferredDate: t.deferredDate ?? null, completed: t.completed ?? false, status: t.status || "todo", completedAt: t.completedAt ?? null, createdAt: t.createdAt || ie(), priority: t.priority || "normal", categoryId: t.categoryId ?? null, color: t.color ?? null, parentId: t.parentId ?? null, order: t.order ?? 0, dependencies: (t.dependencies || []).map((a) => ({ id: a.id || ae(), personName: a.personName || "", description: a.description || "", urgency: a.urgency || "moderate", createdAt: a.createdAt || ie(), resolved: a.resolved ?? false })), dueDate: t.dueDate ?? null, dueTime: t.dueTime ?? null, recurringRule: t.recurringRule ?? null, urgency: t.urgency ?? "moderate-rush", importance: t.importance ?? "medium", isTodayTask: t.isTodayTask ?? false, updatedAtMs: typeof t.updatedAtMs == "number" ? t.updatedAtMs : Date.parse(t.completedAt || t.createdAt || "") || 0, deleted: t.deleted ?? false, deletedAtMs: t.deletedAtMs };
}
function Ge() {
const t = localStorage.getItem(oe(et));
if (!t) return [];
try {
return JSON.parse(t).map(Nt);
} catch {
return [];
}
}
function vt(t) {
localStorage.setItem(oe(et), JSON.stringify(t));
}
function wt() {
const t = localStorage.getItem(oe(tt));
if (!t) return [...We];
try {
return JSON.parse(t);
} catch {
return [...We];
}
}
function Ct(t) {
localStorage.setItem(oe(tt), JSON.stringify(t));
}
function G(t, a = "normal", s = null) {
return { id: ae(), text: t.trim(), memo: "", subtasks: [], deferredDate: null, completed: false, status: "todo", completedAt: null, createdAt: ie(), priority: a, categoryId: s, color: null, parentId: null, order: Date.now(), dependencies: [], dueDate: null, dueTime: null, recurringRule: null, urgency: "moderate-rush", importance: "medium", isTodayTask: false, updatedAtMs: Date.now() };
}
function Re(t, a, s) {
return { id: ae(), personName: t, description: a, urgency: s, createdAt: ie(), resolved: false };
}
function Dt(t, a) {
return t.filter((s) => s.parentId === a).sort((s, m) => s.order - m.order);
}
function Tt(t, a) {
const s = [];
let m = t.find((x) => x.id === a);
for (; m == null ? void 0 : m.parentId; ) {
const x = t.find((d) => d.id === m.parentId);
if (!x) break;
s.unshift(x), m = x;
}
return s;
}
function St(t, a) {
const s = /* @__PURE__ */ new Set(), m = [];
return t.forEach((x) => {
if (x.completed || s.has(x.id)) return;
const d = x.dueDate === a, D = x.isTodayTask;
if (d || D) {
s.add(x.id);
const N = Tt(t, x.id);
m.push({ task: x, parentText: N.length > 0 ? N[N.length - 1].text : null, grandParentText: N.length > 1 ? N[N.length - 2].text : null });
}
}), m.sort((x, d) => Ce(d.task) - Ce(x.task));
}
function Mt(t) {
const a = new Date(t), s = a.getDay();
return a.setDate(a.getDate() - s), Array.from({ length: 7 }, (m, x) => {
const d = new Date(a);
return d.setDate(a.getDate() + x), d;
});
}
function me(t) {
const a = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), m = String(t.getDate()).padStart(2, "0");
return `${a}-${s}-${m}`;
}
function $t() {
const t = ie(), a = /* @__PURE__ */ new Date();
a.setDate(a.getDate() + 1);
const s = me(a), m = /* @__PURE__ */ new Date();
m.setDate(m.getDate() + 7);
const x = me(m), d = ae();
return [{ ...G("\u65B0\u898F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u4F01\u753B\u66F8\u4F5C\u6210", "urgent"), id: d, urgency: "critical", importance: "highest", status: "in-progress", categoryId: "cat-work", memo: "\u7AF6\u5408\u30EA\u30B5\u30FC\u30C1\u3092\u5148\u306B\u4ED5\u4E0A\u3052\u308B\u3053\u3068\u3002\u6765\u9031\u306E\u30DF\u30FC\u30C6\u30A3\u30F3\u30B0\u307E\u3067\u306B\u5B8C\u6210\u3055\u305B\u308B\u3002", dueDate: x }, { ...G("\u7AF6\u5408\u30EA\u30B5\u30FC\u30C1", "urgent"), parentId: d, urgency: "critical", importance: "high", categoryId: "cat-work", dueDate: t, isTodayTask: true }, { ...G("\u9AA8\u5B50\u4F5C\u6210", "urgent"), parentId: d, urgency: "rush", importance: "highest", categoryId: "cat-work", dueDate: s }, { ...G("\u4ECA\u9031\u306E\u5B9A\u4F8B\u30DF\u30FC\u30C6\u30A3\u30F3\u30B0\u306E\u30A2\u30B8\u30A7\u30F3\u30C0\u6E96\u5099", "normal"), urgency: "rush", importance: "medium", categoryId: "cat-work", dueDate: s }, { ...G("\u6765\u6708\u306E\u7D4C\u8CBB\u7CBE\u7B97", "normal"), urgency: "when-free", importance: "medium", dueDate: x }, { ...G("\u6708\u6B21\u30EC\u30DD\u30FC\u30C8\u63D0\u51FA", "recurring"), urgency: "rush", importance: "high", recurringRule: "monthly", categoryId: "cat-work" }, { ...G("\u6280\u8853\u66F8\u3092\u8AAD\u3080", "someday"), urgency: "whenever", importance: "low", categoryId: "cat-personal", memo: "TypeScript\u306E\u5B9F\u8DF5\u30AC\u30A4\u30C9\u3001React\u30D1\u30BF\u30FC\u30F3\u96C6" }, { ...G("\u30C7\u30B9\u30AF\u5468\u308A\u306E\u6574\u7406", "whenever"), urgency: "whenever", importance: "lowest" }, { ...G("\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8A\u3078\u306E\u63D0\u6848\u8CC7\u6599", "normal"), urgency: "moderate-rush", importance: "highest", dependencies: [Re("\u7530\u4E2D\u3055\u3093", "\u30C7\u30B6\u30A4\u30F3\u6848\u306E\u627F\u8A8D", "urgent"), Re("\u9234\u6728\u3055\u3093", "\u898B\u7A4D\u66F8\u306E\u78BA\u8A8D", "moderate")], categoryId: "cat-work", dueDate: x }, { ...G("\u7A81\u767A\uFF1A\u4ECA\u65E5\u4E2D\u306B\u8FD4\u4FE1\u304C\u5FC5\u8981\u306A\u30E1\u30FC\u30EB\u5BFE\u5FDC", "normal"), urgency: "critical", importance: "high", isTodayTask: true, categoryId: "cat-work" }];
}
function At({ task: t, isDeferred: a, todayStr: s, categories: m, onToggle: x, onDelete: d, onAddSubtask: D, onToggleSubtask: N, onDeleteSubtask: y, onSetDeferred: w, onOpenDependency: f, onEdit: T, depth: E = 0, renderChildren: M, parentText: j, grandParentText: A }) {
const [F, R] = l.useState(false), [o, h] = l.useState(""), [v, S] = l.useState(false), c = t.subtasks || [], k = c.filter((g) => g.completed).length, $ = m.find((g) => g.id === t.categoryId), C = (t.dependencies || []).filter((g) => !g.resolved), O = pe.find((g) => g.key === t.urgency), L = ge.find((g) => g.key === t.importance), _ = t.dueDate && t.dueDate < s && !t.completed, H = t.dueDate === s, p = 4, Y = (g) => {
g.key === "Enter" && (g.preventDefault(), o.trim() && (D(o.trim()), h("")));
}, W = t.color || ($ == null ? void 0 : $.color) || "transparent";
return e.jsx("div", { draggable: true, onDragStart: (g) => {
g.dataTransfer.setData("taskId", t.id), g.currentTarget.style.opacity = "0.4";
}, onDragEnd: (g) => {
g.currentTarget.style.opacity = "1";
}, style: { marginLeft: E * 20 }, className: `group flex flex-col mb-2.5 rounded-xl border transition-all duration-200
bg-white dark:bg-zinc-800 border-zinc-200/70 dark:border-zinc-700/70 shadow-sm
${a ? "opacity-40 hover:opacity-100 grayscale" : "hover:shadow-md hover:border-zinc-300 dark:hover:border-zinc-600"}`, children: e.jsx("div", { className: "flex", style: { borderLeft: `4px solid ${W}`, borderRadius: "12px" }, children: e.jsxs("div", { className: "flex-1 p-4", children: [(j || A) && e.jsxs("div", { className: "text-[11px] text-zinc-400 dark:text-zinc-500 mb-1.5 flex items-center gap-1 flex-wrap", children: [A && e.jsxs("span", { className: "italic", children: ["(", A, ")"] }), A && j && e.jsx(we, { className: "w-3 h-3 -rotate-90" }), j && e.jsxs("span", { className: "italic", children: ["(", j, ")"] })] }), e.jsxs("div", { className: "flex items-start justify-between gap-3", children: [e.jsxs("div", { className: "flex items-center gap-2 mt-0.5 flex-shrink-0", children: [e.jsx(ct, { className: "w-4 h-4 text-zinc-200 dark:text-zinc-600 opacity-0 group-hover:opacity-100 cursor-grab transition-opacity" }), e.jsx("button", { onClick: x, className: "text-zinc-300 dark:text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200 transition-colors", children: t.completed ? e.jsx(Z, { className: "w-5 h-5 text-zinc-800 dark:text-zinc-200" }) : e.jsx(se, { className: "w-5 h-5" }) })] }), e.jsxs("div", { className: "flex-1 min-w-0 cursor-pointer", onClick: T, children: [e.jsx("span", { className: `block text-[15px] font-medium tracking-tight text-zinc-900 dark:text-zinc-50 leading-snug ${t.completed ? "line-through text-zinc-400 dark:text-zinc-500 font-normal" : ""}`, children: t.text }), e.jsxs("div", { className: "flex flex-wrap items-center gap-1.5 mt-1.5", children: [t.isTodayTask && !t.completed && e.jsxs("span", { className: "text-xs px-1.5 py-0.5 rounded-full bg-amber-100 dark:bg-amber-900/40 text-amber-600 dark:text-amber-400 flex items-center gap-0.5 font-medium", children: [e.jsx(re, { className: "w-3 h-3" }), " \u4ECA\u65E5"] }), O && t.urgency !== "moderate-rush" && !t.completed && e.jsxs("span", { className: `text-xs px-1.5 py-0.5 rounded-full font-medium flex items-center gap-0.5 ${O.badgeBg} ${O.textColor}`, children: [e.jsx(De, { className: "w-3 h-3" }), " ", O.shortLabel] }), L && t.importance !== "medium" && !t.completed && e.jsxs("span", { className: "text-xs px-1.5 py-0.5 rounded-full font-medium flex items-center gap-0.5 bg-violet-100 dark:bg-violet-900/40 text-violet-700 dark:text-violet-300", children: [e.jsx(Me, { className: "w-3 h-3" }), " ", L.label] }), $ && e.jsx("span", { className: "text-xs px-2 py-0.5 rounded-full font-medium", style: { backgroundColor: $.color + "20", color: $.color }, children: $.name }), t.dueDate && e.jsxs("span", { className: `text-xs flex items-center gap-0.5 px-1.5 py-0.5 rounded-full
${_ ? "bg-red-50 dark:bg-red-900/30 text-red-600 dark:text-red-400 font-medium" : H ? "bg-amber-50 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400 font-medium" : "bg-zinc-100 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400"}`, children: [e.jsx(Fe, { className: "w-3 h-3" }), _ ? "\u671F\u9650\u8D85\u904E: " : "", le(t.dueDate), t.dueTime && e.jsx("span", { className: "ml-0.5", children: t.dueTime })] }), t.memo && e.jsx("span", { className: "text-xs text-zinc-400 dark:text-zinc-500 flex items-center gap-0.5", children: e.jsx(Xe, { className: "w-3 h-3" }) }), t.recurringRule && e.jsxs("span", { className: "text-xs px-1.5 py-0.5 rounded-full bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400", children: ["\u{1F504} ", t.recurringRule === "daily" ? "\u6BCE\u65E5" : t.recurringRule === "weekly" ? "\u6BCE\u9031" : "\u6BCE\u6708"] }), C.length > 0 && e.jsxs("button", { onClick: (g) => {
g.stopPropagation(), f();
}, className: "text-xs flex items-center gap-0.5 px-1.5 py-0.5 rounded-full bg-amber-50 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400 hover:bg-amber-100 dark:hover:bg-amber-900/50 transition-colors", children: [e.jsx(Pe, { className: "w-3 h-3" }), C.length, "\u4EF6\u5F85\u3061", C.some((g) => g.urgency === "urgent") && e.jsx(Te, { className: "w-3 h-3 text-red-500" })] }), c.length > 0 && e.jsxs("button", { onClick: (g) => {
g.stopPropagation(), R(!F);
}, className: "flex items-center gap-0.5 text-xs text-zinc-400 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors", children: [e.jsx(Se, { className: "w-3.5 h-3.5" }), k, "/", c.length, F ? e.jsx(mt, { className: "w-3 h-3" }) : e.jsx(we, { className: "w-3 h-3" })] }), e.jsxs("div", { className: "relative flex items-center", children: [e.jsxs("button", { onClick: (g) => {
g.stopPropagation(), S(!v);
}, className: `flex items-center gap-0.5 text-xs hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors
${t.deferredDate && !t.completed ? "text-zinc-600 dark:text-zinc-300 font-medium" : "text-zinc-300 dark:text-zinc-600"}`, title: "\u7740\u624B\u65E5\u3092\u8A2D\u5B9A", children: [e.jsx(he, { className: "w-3.5 h-3.5" }), t.deferredDate ? le(t.deferredDate) : ""] }), v && e.jsxs("div", { className: "absolute top-6 left-0 bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-600 shadow-lg rounded-lg p-2 z-20 flex items-center gap-2", onClick: (g) => g.stopPropagation(), children: [e.jsx("input", { type: "date", value: t.deferredDate || "", min: s, onChange: (g) => {
w(g.target.value), S(false);
}, className: "text-sm p-1 border-none outline-none text-zinc-700 dark:text-zinc-200 bg-zinc-50 dark:bg-zinc-700 rounded cursor-pointer" }), t.deferredDate && e.jsx("button", { onClick: () => {
w(null), S(false);
}, className: "text-xs text-zinc-400 hover:text-red-500", children: "\u89E3\u9664" })] })] })] }), t.memo && !t.completed && e.jsx("p", { className: "mt-1.5 text-xs text-zinc-400 dark:text-zinc-500 leading-relaxed", children: F ? t.memo : t.memo.split(`
`)[0] })] }), e.jsx("button", { onClick: d, className: "opacity-0 group-hover:opacity-100 text-zinc-300 dark:text-zinc-500 hover:text-red-500 transition-all p-1 flex-shrink-0", children: e.jsx(te, { className: "w-4 h-4" }) })] }), F && e.jsxs("div", { className: "mt-3 ml-9 pl-4 border-l border-zinc-100 dark:border-zinc-700 flex flex-col gap-2", children: [c.map((g) => e.jsxs("div", { className: "flex items-center gap-2 group/st", children: [e.jsx("button", { onClick: () => N(g.id), className: "text-zinc-300 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300", children: g.completed ? e.jsx(Z, { className: "w-4 h-4 text-zinc-600 dark:text-zinc-300" }) : e.jsx(se, { className: "w-4 h-4" }) }), e.jsx("span", { className: `text-sm flex-1 ${g.completed ? "line-through text-zinc-400 dark:text-zinc-500" : "text-zinc-600 dark:text-zinc-300"}`, children: g.text }), e.jsx("button", { onClick: () => y(g.id), className: "opacity-0 group-hover/st:opacity-100 text-zinc-300 hover:text-red-400", children: e.jsx(te, { className: "w-3 h-3" }) })] }, g.id)), e.jsxs("div", { className: "flex items-center gap-2 mt-1", children: [e.jsx(de, { className: "w-4 h-4 text-zinc-300 dark:text-zinc-500" }), e.jsx("input", { type: "text", placeholder: "\u30C1\u30A7\u30C3\u30AF\u30EA\u30B9\u30C8\u9805\u76EE\u3092\u8FFD\u52A0...", value: o, onChange: (g) => h(g.target.value), onKeyDown: Y, className: "text-sm bg-transparent border-none outline-none text-zinc-700 dark:text-zinc-300 placeholder:text-zinc-300 dark:placeholder:text-zinc-600 w-full" })] })] }), E < p && M && M()] }) }) });
}
function Ie({ onAdd: t, categories: a, compact: s = false, defaultPriority: m = "normal", defaultIsTodayTask: x = false }) {
const [d, D] = l.useState(""), [N, y] = l.useState(false), [w, f] = l.useState(m), [T, E] = l.useState(null), [M, j] = l.useState(""), [A, F] = l.useState(""), [R, o] = l.useState(false), [h, v] = l.useState("moderate-rush"), [S, c] = l.useState("medium"), [k, $] = l.useState(""), [C, O] = l.useState(x), L = ie(), _ = (p) => {
p.preventDefault(), d.trim() && (t({ text: d.trim(), priority: w, categoryId: T, dueDate: M || null, dueTime: M && R && A ? A : null, urgency: h, importance: S, memo: k, isTodayTask: C }), D(""), f(m), E(null), j(""), F(""), o(false), v("moderate-rush"), c("medium"), $(""), O(x), y(false));
}, H = (p) => {
p.key === "Enter" && !p.shiftKey && d.trim() && _(p);
};
return e.jsx("form", { onSubmit: _, className: `relative ${s ? "mb-6" : "mb-8"} group`, children: e.jsxs("div", { className: `bg-white dark:bg-zinc-800 rounded-2xl shadow-sm border border-zinc-200 dark:border-zinc-700
transition-all ${N ? "ring-2 ring-zinc-800/10 dark:ring-zinc-200/10" : ""}`, children: [e.jsxs("div", { className: "flex items-center", children: [e.jsx("input", { type: "text", value: d, onChange: (p) => D(p.target.value), onKeyDown: H, placeholder: s ? "\u30BF\u30B9\u30AF\u3092\u8FFD\u52A0..." : "\u6B21\u306F\u4F55\u3092\u3057\u307E\u3059\u304B\uFF1F (Enter\u3067\u8FFD\u52A0)", className: `flex-1 bg-transparent text-zinc-800 dark:text-zinc-100 ${s ? "text-sm py-3.5 pl-5" : "text-base py-4 pl-5"} pr-4
focus:outline-none placeholder:text-zinc-300 dark:placeholder:text-zinc-600` }), e.jsxs("div", { className: "flex items-center gap-1 pr-3", children: [C && e.jsxs("span", { className: "text-xs px-2 py-0.5 rounded-full bg-amber-100 dark:bg-amber-900/40 text-amber-600 dark:text-amber-400 font-medium flex items-center gap-1", children: [e.jsx(re, { className: "w-3 h-3" }), " \u4ECA\u65E5"] }), e.jsx("button", { type: "button", onClick: () => y(!N), className: "p-1.5 text-zinc-300 dark:text-zinc-500 hover:text-zinc-600 dark:hover:text-zinc-300 transition-colors", children: e.jsx(we, { className: `w-4 h-4 transition-transform ${N ? "rotate-180" : ""}` }) }), e.jsx("button", { type: "submit", disabled: !d.trim(), className: "p-1.5 text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-30 transition-colors", children: e.jsx(de, { className: s ? "w-4 h-4" : "w-5 h-5" }) })] })] }), N && e.jsxs("div", { className: "px-5 pb-5 pt-3 border-t border-zinc-100 dark:border-zinc-700 space-y-4 animate-in slide-in-from-top-2 duration-200", children: [e.jsx("div", { className: "flex items-center justify-between", children: e.jsxs("label", { className: "flex items-center gap-2 cursor-pointer select-none", children: [e.jsx("div", { className: `relative w-10 h-5 rounded-full transition-colors ${C ? "bg-amber-400" : "bg-zinc-200 dark:bg-zinc-600"}`, onClick: () => O(!C), children: e.jsx("div", { className: `absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform ${C ? "translate-x-5" : ""}` }) }), e.jsxs("span", { className: "text-sm font-medium text-zinc-700 dark:text-zinc-200 flex items-center gap-1", children: [e.jsx(re, { className: "w-4 h-4 text-amber-500" }), " \u4ECA\u65E5\u3084\u308B\u30BF\u30B9\u30AF\u306B\u8FFD\u52A0"] })] }) }), e.jsxs("div", { children: [e.jsx("label", { className: "text-xs font-medium text-zinc-400 dark:text-zinc-500 mb-1.5 block", children: "\u30BB\u30AF\u30B7\u30E7\u30F3" }), e.jsx("div", { className: "flex flex-wrap gap-1.5", children: be.filter((p) => p.key !== "archive").map((p) => e.jsxs("button", { type: "button", onClick: () => f(p.key), className: `text-xs px-2.5 py-1.5 rounded-lg transition-colors
${w === p.key ? "bg-zinc-800 dark:bg-zinc-200 text-white dark:text-zinc-900" : "bg-zinc-100 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 hover:bg-zinc-200 dark:hover:bg-zinc-600"}`, children: [p.icon, " ", p.label] }, p.key)) })] }), e.jsxs("div", { children: [e.jsxs("label", { className: "text-xs font-medium text-zinc-400 dark:text-zinc-500 mb-1.5 block flex items-center gap-1", children: [e.jsx(De, { className: "w-3 h-3" }), " \u7DCA\u6025\u5EA6"] }), e.jsx("div", { className: "flex flex-wrap gap-1.5", children: pe.map((p) => e.jsxs("button", { type: "button", onClick: () => v(p.key), className: `text-xs px-2.5 py-1.5 rounded-lg transition-colors flex items-center gap-1
${h === p.key ? `${p.badgeBg} ${p.textColor} font-bold ring-1 ring-current` : "bg-zinc-100 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 hover:bg-zinc-200 dark:hover:bg-zinc-600"}`, children: [p.icon, " ", p.shortLabel] }, p.key)) })] }), e.jsxs("div", { children: [e.jsxs("label", { className: "text-xs font-medium text-zinc-400 dark:text-zinc-500 mb-1.5 block flex items-center gap-1", children: [e.jsx(Me, { className: "w-3 h-3" }), " \u91CD\u8981\u5EA6"] }), e.jsx("div", { className: "flex flex-wrap gap-1.5", children: ge.map((p, Y) => e.jsxs("button", { type: "button", onClick: () => c(p.key), className: `text-xs px-2.5 py-1.5 rounded-lg transition-colors flex items-center gap-1
${S === p.key ? "bg-violet-100 dark:bg-violet-900/40 text-violet-700 dark:text-violet-300 font-bold ring-1 ring-violet-300 dark:ring-violet-700" : "bg-zinc-100 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 hover:bg-zinc-200 dark:hover:bg-zinc-600"}`, children: ["\u2605".repeat(5 - Y), " ", p.label] }, p.key)) })] }), a.length > 0 && e.jsxs("div", { children: [e.jsx("label", { className: "text-xs font-medium text-zinc-400 dark:text-zinc-500 mb-1.5 block", children: "\u30AB\u30C6\u30B4\u30EA" }), e.jsxs("div", { className: "flex flex-wrap gap-1.5", children: [e.jsx("button", { type: "button", onClick: () => E(null), className: `text-xs px-2.5 py-1.5 rounded-lg transition-colors
${T ? "bg-zinc-100 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400" : "bg-zinc-800 dark:bg-zinc-200 text-white dark:text-zinc-900"}`, children: "\u306A\u3057" }), a.map((p) => e.jsxs("button", { type: "button", onClick: () => E(p.id), className: `text-xs px-2.5 py-1.5 rounded-lg transition-colors flex items-center gap-1
${T === p.id ? "ring-2 ring-offset-1 dark:ring-offset-zinc-800 font-medium" : "bg-zinc-100 dark:bg-zinc-700"}`, style: T === p.id ? { backgroundColor: p.color + "25", color: p.color } : {}, children: [e.jsx("span", { className: "w-2.5 h-2.5 rounded-full flex-shrink-0", style: { backgroundColor: p.color } }), p.name] }, p.id))] })] }), e.jsxs("div", { children: [e.jsxs("label", { className: "text-xs font-medium text-zinc-400 dark:text-zinc-500 mb-1.5 block flex items-center gap-1", children: [e.jsx(he, { className: "w-3 h-3" }), " \u671F\u9650"] }), e.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [e.jsx("input", { type: "date", value: M, min: L, onChange: (p) => {
j(p.target.value), p.target.value || (o(false), F(""));
}, className: "text-sm p-1.5 bg-zinc-50 dark:bg-zinc-700 border border-zinc-200 dark:border-zinc-600 outline-none text-zinc-700 dark:text-zinc-200 rounded-lg cursor-pointer" }), M && e.jsxs(e.Fragment, { children: [e.jsxs("label", { className: "flex items-center gap-1 text-xs text-zinc-500 cursor-pointer select-none", children: [e.jsx("input", { type: "checkbox", checked: R, onChange: (p) => {
o(p.target.checked), p.target.checked || F("");
}, className: "rounded" }), "\u6642\u9593\u3092\u8FFD\u52A0"] }), R && e.jsx("input", { type: "time", value: A, onChange: (p) => F(p.target.value), className: "text-sm p-1.5 bg-zinc-50 dark:bg-zinc-700 border border-zinc-200 dark:border-zinc-600 outline-none text-zinc-700 dark:text-zinc-200 rounded-lg cursor-pointer" }), e.jsx("button", { type: "button", onClick: () => {
j(""), F(""), o(false);
}, className: "text-zinc-400 hover:text