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.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["browser-CXNKh9bA.js","index-MEKLAMY4.js","index-C-05yUZS.css","index-DRNnckqg.js","_commonjs-dynamic-modules-TDtrdbi3.js"])))=>i.map(i=>d[i]);
import { c as je, r as N, j as e, X as Me, C as ht, U as He, _ as et, D as ft, a as ut, x as Ee, L as pt, a5 as mt, e as gt, __tla as __tla_0 } from "./index-MEKLAMY4.js";
import { I as bt, R as kt } from "./rotate-cw-rbHxyQyN.js";
import { S as yt } from "./square-CWI_TPYE.js";
import { T as wt } from "./table-DSghQHG0.js";
import { P as jt } from "./pencil-BVgovPJK.js";
import { Z as tt, a as st } from "./zoom-out-BdIrbhkL.js";
import { C as vt, a as Nt } from "./chevron-up-BsQH8_r2.js";
import { T as Ce } from "./trash-2-cZ7_YyQK.js";
import { P as nt } from "./plus-B9-xED5h.js";
import { I as Ct } from "./image-Dsm0yLDf.js";
import { C as zt } from "./check-DprPcXaF.js";
import { C as St } from "./chevron-left-RDoE7zUF.js";
import { R as Mt } from "./ruler-CHWFHeLg.js";
import { S as Tt } from "./save-BpxKOF3Y.js";
import { F as Dt } from "./folder-open-Ds8b2U7j.js";
import { P as Rt } from "./printer-Eo9-9k6W.js";
let Ns;
let __tla = Promise.all([
(() => {
try {
return __tla_0;
} catch {
}
})()
]).then(async () => {
const Ke = je("BookmarkPlus", [
[
"path",
{
d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",
key: "1fy3hk"
}
],
[
"line",
{
x1: "12",
x2: "12",
y1: "7",
y2: "13",
key: "1cppfj"
}
],
[
"line",
{
x1: "15",
x2: "9",
y1: "10",
y2: "10",
key: "1gty7f"
}
]
]);
const $t = je("DoorOpen", [
[
"path",
{
d: "M13 4h3a2 2 0 0 1 2 2v14",
key: "hrm0s9"
}
],
[
"path",
{
d: "M2 20h3",
key: "1gaodv"
}
],
[
"path",
{
d: "M13 20h9",
key: "s90cdi"
}
],
[
"path",
{
d: "M10 12v.01",
key: "vx6srw"
}
],
[
"path",
{
d: "M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z",
key: "199qr4"
}
]
]);
const rt = je("Menu", [
[
"line",
{
x1: "4",
x2: "20",
y1: "12",
y2: "12",
key: "1e0a9i"
}
],
[
"line",
{
x1: "4",
x2: "20",
y1: "6",
y2: "6",
key: "1owob3"
}
],
[
"line",
{
x1: "4",
x2: "20",
y1: "18",
y2: "18",
key: "yk5zj1"
}
]
]);
const Lt = je("PanelBottom", [
[
"rect",
{
width: "18",
height: "18",
x: "3",
y: "3",
rx: "2",
key: "afitv7"
}
],
[
"path",
{
d: "M3 15h18",
key: "5xshup"
}
]
]);
const Pt = je("RotateCcw", [
[
"path",
{
d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
key: "1357e3"
}
],
[
"path",
{
d: "M3 3v5h5",
key: "1xhq8a"
}
]
]);
const ot = je("ScanText", [
[
"path",
{
d: "M3 7V5a2 2 0 0 1 2-2h2",
key: "aa7l1z"
}
],
[
"path",
{
d: "M17 3h2a2 2 0 0 1 2 2v2",
key: "4qcy5o"
}
],
[
"path",
{
d: "M21 17v2a2 2 0 0 1-2 2h-2",
key: "6vwrx8"
}
],
[
"path",
{
d: "M7 21H5a2 2 0 0 1-2-2v-2",
key: "ioqczr"
}
],
[
"path",
{
d: "M7 8h8",
key: "1jbsf9"
}
],
[
"path",
{
d: "M7 12h10",
key: "b7w52i"
}
],
[
"path",
{
d: "M7 16h6",
key: "1vyc9m"
}
]
]);
const Et = je("Type", [
[
"polyline",
{
points: "4 7 4 4 20 4 20 7",
key: "1nosan"
}
],
[
"line",
{
x1: "9",
x2: "15",
y1: "20",
y2: "20",
key: "swin9y"
}
],
[
"line",
{
x1: "12",
x2: "12",
y1: "4",
y2: "20",
key: "1tx1rr"
}
]
]), Ie = [
"\u7269\u4EF6\u540D",
"\u6240\u5728\u5730",
"\u4FA1\u683C",
"\u9593\u53D6\u308A",
"\u5C02\u6709\u9762\u7A4D",
"\u7BC9\u5E74\u6708",
"\u4EA4\u901A",
"\u7BA1\u7406\u8CBB",
"\u4FEE\u7E55\u7A4D\u7ACB\u91D1",
"\u968E\u6570",
"\u5411\u304D",
"\u30D0\u30EB\u30B3\u30CB\u30FC\u9762\u7A4D"
], Ue = [
{
type: "ldk",
label: "LDK",
color: "#fbf7f0",
pattern: "none",
areaUnit: "jo",
defaultName: "LDK"
},
{
type: "western",
label: "\u6D0B\u5BA4",
color: "#f3f6fb",
pattern: "none",
areaUnit: "jo",
defaultName: "\u6D0B\u5BA4"
},
{
type: "japanese",
label: "\u548C\u5BA4",
color: "#eef3e6",
pattern: "tatami",
areaUnit: "jo",
defaultName: "\u548C\u5BA4"
},
{
type: "water",
label: "\u6C34\u56DE\u308A",
color: "#eaf2f7",
pattern: "none",
areaUnit: "jo",
defaultName: "\u6D17\u9762\u30FB\u6D74\u5BA4"
},
{
type: "balcony",
label: "\u30D0\u30EB\u30B3\u30CB\u30FC",
color: "#f1f2f4",
pattern: "hatch",
areaUnit: "sqm",
defaultName: "\u30D0\u30EB\u30B3\u30CB\u30FC"
},
{
type: "entrance",
label: "\u7384\u95A2",
color: "#f4f1ec",
pattern: "none",
areaUnit: "jo",
defaultName: "\u7384\u95A2"
},
{
type: "hall",
label: "\u5ECA\u4E0B",
color: "#f7f7f8",
pattern: "none",
areaUnit: "jo",
defaultName: "\u5ECA\u4E0B"
},
{
type: "closet",
label: "\u53CE\u7D0D",
color: "#f4f4ef",
pattern: "none",
areaUnit: "jo",
defaultName: "\u53CE\u7D0D"
},
{
type: "other",
label: "\u305D\u306E\u4ED6",
color: "#fafafa",
pattern: "none",
areaUnit: "jo",
defaultName: "\u90E8\u5C4B"
}
], Te = Object.fromEntries(Ue.map((n) => [
n.type,
n
])), $e = (n, t, s, l, i, a, r, x, m) => ({
ldk: n,
western: t,
japanese: s,
water: l,
balcony: i,
entrance: a,
hall: r,
closet: x,
other: m
}), Be = [
{
id: "standard",
label: "\u30B9\u30BF\u30F3\u30C0\u30FC\u30C9",
wall: "#2b2b2b",
labelFont: "sans",
labelColor: "#2a2a2a",
areaColor: "#8a8a8a",
tatami: "#aebf9c",
hatch: "#c4c8cf",
bg: "#ffffff",
rooms: $e("#fbf7f0", "#f3f6fb", "#eef3e6", "#eaf2f7", "#f1f2f4", "#f4f1ec", "#f7f7f8", "#f4f4ef", "#fafafa")
},
{
id: "natural",
label: "\u30CA\u30C1\u30E5\u30E9\u30EB",
wall: "#5e4b3c",
labelFont: "serif",
labelColor: "#4a3b2e",
areaColor: "#9b8a76",
tatami: "#c2b06e",
hatch: "#cfc3b0",
bg: "#fbf8f2",
rooms: $e("#f3e9d8", "#f1ece2", "#ece7cf", "#e6ece8", "#efebe2", "#efe7d8", "#f4efe6", "#efe9dd", "#f6f1e8")
},
{
id: "mono",
label: "\u30E2\u30CE\u30AF\u30ED",
wall: "#1a1a1a",
labelFont: "sans",
labelColor: "#1a1a1a",
areaColor: "#888888",
tatami: "#cccccc",
hatch: "#cccccc",
bg: "#ffffff",
rooms: $e("#f4f4f4", "#f7f7f7", "#f0f0f0", "#f2f2f2", "#eeeeee", "#f4f4f4", "#f8f8f8", "#f3f3f3", "#f6f6f6")
},
{
id: "soft",
label: "\u30BD\u30D5\u30C8",
wall: "#6b7280",
labelFont: "sans",
labelColor: "#475569",
areaColor: "#94a3b8",
tatami: "#b8c9a8",
hatch: "#cbd5e1",
bg: "#fbfcfe",
rooms: $e("#fff4ec", "#eef4fb", "#eef5e8", "#e9f4f6", "#f0f2f6", "#f6f0ea", "#f6f7fa", "#f3f2ee", "#fafafa")
}
], Ft = Object.fromEntries(Be.map((n) => [
n.id,
n
])), Xt = (n) => Ft[n ?? "standard"] ?? Be[0], at = [
{
id: "gold",
label: "\u30B4\u30FC\u30EB\u30C9",
accent: "#b9975b",
obiBg: "#1a1a1a",
obiFg: "#ffffff",
font: "sans"
},
{
id: "navy",
label: "\u30E2\u30C0\u30F3\u7D3A",
accent: "#1f3a5f",
obiBg: "#1f3a5f",
obiFg: "#ffffff",
font: "sans"
},
{
id: "green",
label: "\u30CA\u30C1\u30E5\u30E9\u30EB\u7DD1",
accent: "#6b7d4f",
obiBg: "#3a4a2e",
obiFg: "#f4f1e6",
font: "serif"
},
{
id: "luxe",
label: "\u30E9\u30B0\u30B8\u30E5\u30A2\u30EA\u30FC",
accent: "#b08d57",
obiBg: "#111111",
obiFg: "#f0e4cc",
font: "serif"
},
{
id: "pop",
label: "\u30DD\u30C3\u30D7\u6A59",
accent: "#e2643b",
obiBg: "#2b2b2b",
obiFg: "#ffffff",
font: "sans"
}
];
Object.fromEntries(at.map((n) => [
n.id,
n
]));
const ye = {
w: 1123,
h: 794
}, Le = 40, qe = 0.1, Je = 0.15;
let At = 0;
const E = (n = "b") => `${n}_${Date.now().toString(36)}_${At++}`;
function Oe() {
return {
version: 1,
title: "\u7121\u984C\u306E\u30DE\u30A4\u30BD\u30AF",
blocks: [
{
id: E(),
kind: "rect",
x: 40,
y: 42,
w: 1043,
h: 3,
z: 1,
props: {
fill: "#b9975b",
stroke: "transparent",
strokeWidth: 0,
radius: 0
}
},
{
id: E(),
kind: "text",
x: 40,
y: 56,
w: 620,
h: 50,
z: 2,
props: {
content: "\u7269\u4EF6\u540D\u3092\u5165\u529B",
font: "serif",
size: 32,
weight: 600,
color: "#bdbdbd",
align: "left",
tracking: 1.5,
lineHeight: 1.2
}
},
{
id: E(),
kind: "text",
x: 40,
y: 108,
w: 620,
h: 24,
z: 3,
props: {
content: "\u6240\u5728\u5730\u30FB\u6700\u5BC4\u99C5\u3092\u5165\u529B",
font: "sans",
size: 14,
weight: 400,
color: "#c8c8c8",
align: "left",
tracking: 1.5,
lineHeight: 1.4
}
},
{
id: E(),
kind: "text",
x: 700,
y: 54,
w: 383,
h: 52,
z: 4,
props: {
content: "\u4FA1\u683C\u3092\u5165\u529B",
font: "serif",
size: 30,
weight: 700,
color: "#cbb3b3",
align: "right",
tracking: 0.5,
lineHeight: 1.1
}
},
{
id: E(),
kind: "image",
x: 40,
y: 140,
w: 560,
h: 400,
z: 5,
props: {
src: null,
fit: "cover",
radius: 6
}
},
{
id: E(),
kind: "image",
x: 40,
y: 548,
w: 274,
h: 166,
z: 6,
props: {
src: null,
fit: "cover",
radius: 4
}
},
{
id: E(),
kind: "image",
x: 326,
y: 548,
w: 274,
h: 166,
z: 7,
props: {
src: null,
fit: "cover",
radius: 4
}
},
{
id: E(),
kind: "plan",
x: 620,
y: 140,
w: 463,
h: 300,
z: 8,
props: {
src: null,
fit: "contain",
radius: 6
}
},
{
id: E(),
kind: "table",
x: 620,
y: 452,
w: 463,
h: 262,
z: 9,
props: {
accent: "#b9975b",
fontSize: 12.5,
rows: [
{
label: "\u6240\u5728\u5730",
value: ""
},
{
label: "\u4EA4\u901A",
value: ""
},
{
label: "\u4FA1\u683C",
value: ""
},
{
label: "\u9593\u53D6\u308A",
value: ""
},
{
label: "\u5C02\u6709\u9762\u7A4D",
value: ""
},
{
label: "\u6240\u5728\u968E / \u69CB\u9020",
value: ""
},
{
label: "\u7BC9\u5E74\u6708",
value: ""
},
{
label: "\u7BA1\u7406\u8CBB / \u4FEE\u7E55\u7A4D\u7ACB",
value: ""
},
{
label: "\u6A29\u5229 / \u7528\u9014\u5730\u57DF",
value: ""
}
]
}
},
{
id: E(),
kind: "obi",
x: 40,
y: 726,
w: 1043,
h: 52,
z: 20,
props: {
variant: "motozuke",
company: "\u4F1A\u793E\u540D\u3092\u5165\u529B",
license: "\u514D\u8A31\u756A\u53F7",
tel: "00-0000-0000",
address: "\u6240\u5728\u5730",
agent: "\u62C5\u5F53",
transaction: "\u53D6\u5F15\u614B\u69D8\uFF1A\u5C02\u4EFB\u5A92\u4ECB",
commission: "\u624B\u6570\u6599\uFF1A3% + 6\u4E07\u5186\uFF08\u7A0E\u5225\uFF09",
bg: "#1a1a1a",
fg: "#ffffff",
qrUrl: "",
qrData: null
}
}
],
floor: {
rooms: [
{
id: E("r"),
name: "LDK",
x: 0,
y: 0,
w: 6,
h: 5,
color: "#fbf7ef"
},
{
id: E("r"),
name: "\u6D0B\u5BA41",
x: 6,
y: 0,
w: 3.6,
h: 3.2,
color: "#f3f6fb"
},
{
id: E("r"),
name: "\u6D0B\u5BA42",
x: 6,
y: 3.2,
w: 3.6,
h: 2.8,
color: "#f3f6fb"
},
{
id: E("r"),
name: "\u6D0B\u5BA43",
x: 0,
y: 5,
w: 3.4,
h: 3,
color: "#f3f6fb"
},
{
id: E("r"),
name: "\u6C34\u56DE\u308A",
x: 3.4,
y: 5,
w: 2.6,
h: 3,
color: "#eef7f1"
},
{
id: E("r"),
name: "\u7384\u95A2",
x: 6,
y: 6,
w: 3.6,
h: 2,
color: "#f7f3ef"
}
],
doors: [
{
id: E("d"),
kind: "door",
x: 6,
y: 1.6,
len: 0.9,
angle: 90
},
{
id: E("d"),
kind: "door",
x: 6,
y: 4.4,
len: 0.9,
angle: 90
},
{
id: E("d"),
kind: "window",
x: 3,
y: 0,
len: 2.4,
angle: 0
},
{
id: E("d"),
kind: "window",
x: 1.7,
y: 8,
len: 1.6,
angle: 0
}
]
}
};
}
const c = (n) => Number.isFinite(n) ? n : 0;
function Ne(n) {
const t = N.useRef(null), s = N.useRef(n.onMove), l = N.useRef(n.onEnd), i = N.useRef(n.scale);
return s.current = n.onMove, l.current = n.onEnd, i.current = n.scale, N.useCallback((r) => {
if (r.button !== void 0 && r.button !== 0) return;
r.stopPropagation();
const x = n.onStart ? n.onStart(r) : void 0, m = {
startX: c(r.clientX),
startY: c(r.clientY),
dxClient: 0,
dyClient: 0,
data: x
};
t.current = m;
const u = r.currentTarget;
try {
u.setPointerCapture(r.pointerId);
} catch {
}
const d = (z) => {
var _a;
const S = t.current;
S && (S.dxClient = c(z.clientX) - S.startX, S.dyClient = c(z.clientY) - S.startY, (_a = s.current) == null ? void 0 : _a.call(s, S, z));
}, y = () => {
var _a;
const z = t.current;
t.current = null, window.removeEventListener("pointermove", d), window.removeEventListener("pointerup", y), window.removeEventListener("pointercancel", y);
try {
u.releasePointerCapture(r.pointerId);
} catch {
}
z && ((_a = l.current) == null ? void 0 : _a.call(l, z));
};
window.addEventListener("pointermove", d), window.addEventListener("pointerup", y), window.addEventListener("pointercancel", y);
}, [
n
]);
}
function fe(n, t) {
const s = Number.isFinite(t) && t > 0 ? t : 1;
return c(n) / s;
}
function it(n, t, s = 0.3, l = 3) {
const i = N.useRef(/* @__PURE__ */ new Map()), a = N.useRef({
dist: 0,
zoom: 1
}), r = N.useRef(null);
return {
onPointerDown: (d) => {
if (i.current.set(d.pointerId, {
x: d.clientX,
y: d.clientY
}), i.current.size === 2) {
const [y, z] = [
...i.current.values()
];
a.current = {
dist: Math.hypot(y.x - z.x, y.y - z.y) || 1,
zoom: n
}, r.current = null;
} else if (i.current.size === 1 && d.pointerType === "touch") {
const y = d.currentTarget;
r.current = {
x: d.clientX,
y: d.clientY,
sl: y.scrollLeft,
st: y.scrollTop,
el: y
};
}
},
onPointerMove: (d) => {
if (i.current.has(d.pointerId)) if (i.current.set(d.pointerId, {
x: d.clientX,
y: d.clientY
}), i.current.size === 2) {
const [y, z] = [
...i.current.values()
], S = Math.hypot(y.x - z.x, y.y - z.y), G = Math.min(l, Math.max(s, a.current.zoom * (S / a.current.dist)));
t(+G.toFixed(2));
} else i.current.size === 1 && r.current && (r.current.el.scrollLeft = r.current.sl - (d.clientX - r.current.x), r.current.el.scrollTop = r.current.st - (d.clientY - r.current.y));
},
onPointerUp: (d) => {
i.current.delete(d.pointerId), i.current.size < 1 && (r.current = null);
}
};
}
const We = 6;
function It({ blocks: n, setBlocks: t, selId: s, setSelId: l, marqTheme: i, onApplyTheme: a }) {
const [r, x] = N.useState(0.58), [m, u] = N.useState({
x: [],
y: []
}), [d, y] = N.useState(null), [z, S] = N.useState(false), [G, I] = N.useState(false), X = it(r, x, 0.3, 2), ie = N.useRef(null), A = N.useRef(null), _ = N.useMemo(() => n.find((h) => h.id === s) || null, [
n,
s
]), ne = (h, k) => t((P) => P.map((Y) => Y.id === h ? {
...Y,
...k
} : Y)), $ = (h, k) => t((P) => P.map((Y) => Y.id === h ? {
...Y,
props: {
...Y.props,
...k
}
} : Y));
N.useEffect(() => {
const h = (k) => {
const P = document.activeElement, Y = !!P && (P.tagName === "INPUT" || P.tagName === "TEXTAREA" || P.isContentEditable);
if (d || Y) {
k.key === "Escape" && (P == null ? void 0 : P.blur());
return;
}
if (!s) return;
const de = n.find((re) => re.id === s);
if (de) {
if (k.key === "Delete" || k.key === "Backspace") k.preventDefault(), t((re) => re.filter((me) => me.id !== s)), l(null);
else if (k.key === "Escape") l(null);
else if ((k.metaKey || k.ctrlKey) && k.key.toLowerCase() === "d") k.preventDefault(), F(s);
else if (k.key.startsWith("Arrow")) {
k.preventDefault();
const re = k.shiftKey ? 10 : 1, me = k.key === "ArrowLeft" ? -re : k.key === "ArrowRight" ? re : 0, W = k.key === "ArrowUp" ? -re : k.key === "ArrowDown" ? re : 0;
ne(s, {
x: Math.round(c(de.x) + me),
y: Math.round(c(de.y) + W)
});
}
}
};
return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
}, [
s,
d,
n
]);
const j = (h, k, P) => {
const Y = [
0,
ye.w / 2,
ye.w
], de = [
0,
ye.h / 2,
ye.h
];
for (const g of n) g.id !== h.id && (Y.push(c(g.x), c(g.x) + c(g.w) / 2, c(g.x) + c(g.w)), de.push(c(g.y), c(g.y) + c(g.h) / 2, c(g.y) + c(g.h)));
const re = [
k,
k + c(h.w) / 2,
k + c(h.w)
], me = [
P,
P + c(h.h) / 2,
P + c(h.h)
], W = [], oe = [];
let o = k, f = P;
for (let g = 0; g < re.length; g++) for (const C of Y) Math.abs(re[g] - C) <= We && (o = C - (g === 1 ? c(h.w) / 2 : g === 2 ? c(h.w) : 0), W.push(C));
for (let g = 0; g < me.length; g++) for (const C of de) Math.abs(me[g] - C) <= We && (f = C - (g === 1 ? c(h.h) / 2 : g === 2 ? c(h.h) : 0), oe.push(C));
return {
x: o,
y: f,
gx: [
...new Set(W)
],
gy: [
...new Set(oe)
]
};
}, Q = Ne({
scale: () => r,
onStart: (h) => {
const k = h.currentTarget.dataset.id || null;
l(k);
const P = n.find((Y) => Y.id === k);
return {
id: k,
x0: c(P == null ? void 0 : P.x),
y0: c(P == null ? void 0 : P.y)
};
},
onMove: (h) => {
const { id: k, x0: P, y0: Y } = h.data || {};
if (!k) return;
const de = n.find((oe) => oe.id === k);
if (!de || de.locked) return;
const re = P + fe(h.dxClient, r), me = Y + fe(h.dyClient, r), W = j(de, re, me);
u({
x: W.gx,
y: W.gy
}), ne(k, {
x: Math.round(W.x),
y: Math.round(W.y)
});
},
onEnd: () => u({
x: [],
y: []
})
}), ee = Ne({
scale: () => r,
onStart: (h) => {
const k = h.currentTarget.dataset.id || null, P = n.find((Y) => Y.id === k);
return {
id: k,
w0: c(P == null ? void 0 : P.w),
h0: c(P == null ? void 0 : P.h)
};
},
onMove: (h) => {
const { id: k, w0: P, h0: Y } = h.data || {};
k && ne(k, {
w: Math.max(20, Math.round(P + fe(h.dxClient, r))),
h: Math.max(16, Math.round(Y + fe(h.dyClient, r)))
});
}
}), H = () => n.reduce((h, k) => Math.max(h, c(k.z)), 0), le = (h) => {
t((k) => [
...k,
h
]), l(h.id);
}, b = () => le({
id: E(),
kind: "text",
x: 100,
y: 100,
w: 300,
h: 48,
z: H() + 1,
props: {
content: "\u30C6\u30AD\u30B9\u30C8",
font: "sans",
size: 18,
weight: 500,
color: "#1a1a1a",
align: "left",
tracking: 0,
lineHeight: 1.5
}
}), U = () => le({
id: E(),
kind: "image",
x: 100,
y: 100,
w: 240,
h: 180,
z: H() + 1,
props: {
src: null,
fit: "cover",
radius: 4
}
}), L = () => le({
id: E(),
kind: "rect",
x: 100,
y: 100,
w: 200,
h: 120,
z: H() + 1,
props: {
fill: "#b9975b",
stroke: "transparent",
strokeWidth: 0,
radius: 0
}
}), M = () => le({
id: E(),
kind: "table",
x: 80,
y: 120,
w: 420,
h: 240,
z: H() + 1,
props: {
accent: "#b9975b",
fontSize: 13,
rows: [
{
label: "\u6240\u5728\u5730",
value: ""
},
{
label: "\u4FA1\u683C",
value: ""
},
{
label: "\u9593\u53D6\u308A",
value: ""
},
{
label: "\u5C02\u6709\u9762\u7A4D",
value: ""
}
]
}
}), p = () => le({
id: E(),
kind: "obi",
x: 40,
y: 1e3,
w: 714,
h: 83,
z: H() + 1,
props: {
variant: "motozuke",
company: "\u4F1A\u793E\u540D",
license: "\u514D\u8A31\u756A\u53F7",
tel: "03-0000-0000",
address: "\u4F4F\u6240",
agent: "\u62C5\u5F53",
transaction: "\u53D6\u5F15\u614B\u69D8\uFF1A\u5C02\u4EFB\u5A92\u4ECB",
commission: "\u624B\u6570\u6599\uFF1A3%+6\u4E07\u5186",
bg: "#1a1a1a",
fg: "#fff"
}
}), v = (h) => {
t((k) => k.filter((P) => P.id !== h)), l(null);
}, F = (h) => {
const k = n.find((Y) => Y.id === h);
if (!k) return;
const P = {
...k,
id: E(),
x: c(k.x) + 16,
y: c(k.y) + 16,
z: H() + 1
};
le(P);
}, T = (h) => ne(h, {
z: H() + 1
}), D = (h) => ne(h, {
z: Math.min(...n.map((k) => c(k.z))) - 1
}), O = (h) => {
var _a;
const k = (_a = h.target.files) == null ? void 0 : _a[0];
if (!k || !_) return;
const P = new FileReader();
P.onload = () => $(_.id, {
src: P.result
}), P.readAsDataURL(k), h.target.value = "";
}, he = [
...n
].sort((h, k) => c(h.z) - c(k.z));
return e.jsxs("div", {
className: "flex-1 flex overflow-hidden",
children: [
(z || G) && e.jsx("div", {
className: "fixed inset-0 z-30 md:hidden bg-black/30 no-print",
onClick: () => {
S(false), I(false);
}
}),
e.jsxs("aside", {
className: `no-print fixed md:static top-14 bottom-0 left-0 z-40 w-52 shrink-0 border-r border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-3 space-y-2 overflow-y-auto text-sm transition-transform ${z ? "translate-x-0" : "-translate-x-full md:translate-x-0"}`,
children: [
e.jsx("button", {
onClick: () => S(false),
className: "md:hidden absolute top-2 right-2 p-1.5 text-slate-400",
children: e.jsx(Me, {
size: 16
})
}),
e.jsx("h3", {
className: "font-bold text-slate-500 text-xs uppercase tracking-wider",
children: "\u30B9\u30BF\u30A4\u30EB\uFF08\u3007\u3007\u98A8\uFF09"
}),
e.jsx("div", {
className: "grid grid-cols-2 gap-1.5",
children: at.map((h) => e.jsxs("button", {
onClick: () => a(h),
className: `flex items-center gap-1.5 px-2 py-1.5 rounded-lg border text-xs font-bold transition-colors ${(i ?? "gold") === h.id ? "border-indigo-500 bg-indigo-50/60 dark:bg-indigo-900/20" : "border-slate-200 dark:border-slate-700 hover:border-indigo-400"}`,
children: [
e.jsx("span", {
className: "w-3.5 h-3.5 rounded-sm border border-black/10 shrink-0",
style: {
backgroundColor: h.accent
}
}),
h.label
]
}, h.id))
}),
e.jsx("h3", {
className: "font-bold text-slate-500 text-xs uppercase tracking-wider pt-2",
children: "\u8981\u7D20\u3092\u8FFD\u52A0"
}),
[
[
"\u30C6\u30AD\u30B9\u30C8",
Et,
b
],
[
"\u753B\u50CF",
bt,
U
],
[
"\u56F3\u5F62(\u5E2F/\u7DDA)",
yt,
L
],
[
"\u7269\u4EF6\u6982\u8981\u8868",
wt,
M
],
[
"\u5E2F(\u4F1A\u793E\u60C5\u5831)",
Lt,
p
]
].map(([h, k, P]) => e.jsxs("button", {
onClick: P,
className: "w-full flex items-center gap-2 px-3 py-2 rounded-lg border border-slate-200 dark:border-slate-700 hover:border-indigo-400",
children: [
e.jsx(k, {
size: 15
}),
" ",
h
]
}, h))
]
}),
e.jsxs("div", {
className: "flex-1 relative bg-slate-200 dark:bg-slate-950 overflow-auto",
style: {
touchAction: "none"
},
onPointerDown: X.onPointerDown,
onPointerMove: X.onPointerMove,
onPointerUp: X.onPointerUp,
onPointerCancel: X.onPointerUp,
children: [
e.jsxs("button", {
onClick: () => S(true),
className: "md:hidden absolute top-3 left-3 z-10 flex items-center gap-1 px-3 py-2 bg-white dark:bg-slate-800 rounded-lg shadow border border-slate-200 dark:border-slate-700 text-xs font-bold no-print",
children: [
e.jsx(rt, {
size: 15
}),
" \u8981\u7D20"
]
}),
_ && e.jsxs("button", {
onClick: () => I(true),
className: "md:hidden absolute bottom-4 right-4 z-10 flex items-center gap-1.5 px-4 py-2.5 bg-indigo-600 text-white rounded-full shadow-lg text-xs font-bold no-print",
children: [
e.jsx(jt, {
size: 14
}),
" \u7DE8\u96C6"
]
}),
e.jsxs("div", {
className: "absolute top-3 right-3 z-20 flex gap-1 no-print",
children: [
e.jsx("button", {
onClick: () => x((h) => Math.max(0.3, +(h - 0.08).toFixed(2))),
className: "p-2 bg-white dark:bg-slate-800 rounded-lg shadow border border-slate-200 dark:border-slate-700",
children: e.jsx(tt, {
size: 15
})
}),
e.jsxs("span", {
className: "px-2 py-2 bg-white dark:bg-slate-800 rounded-lg shadow text-xs border border-slate-200 dark:border-slate-700",
children: [
Math.round(r * 100),
"%"
]
}),
e.jsx("button", {
onClick: () => x((h) => Math.min(2, +(h + 0.08).toFixed(2))),
className: "p-2 bg-white dark:bg-slate-800 rounded-lg shadow border border-slate-200 dark:border-slate-700",
children: e.jsx(st, {
size: 15
})
})
]
}),
e.jsx("div", {
className: "min-h-full flex items-start justify-center p-10",
children: e.jsx("div", {
className: "print-area",
style: {
width: ye.w * r,
height: ye.h * r,
flex: "0 0 auto"
},
children: e.jsxs("div", {
ref: ie,
onPointerDown: () => {
l(null), y(null);
},
className: "relative bg-white shadow-2xl origin-top-left",
style: {
width: ye.w,
height: ye.h,
transform: `scale(${r})`
},
children: [
he.map((h) => e.jsx(Ot, {
b: h,
selected: h.id === s,
editing: h.id === d,
onStartEdit: () => {
h.kind === "text" && (l(h.id), y(h.id));
},
onCommitText: (k) => {
$(h.id, {
content: k
}), y(null);
},
onDown: Q,
onResize: ee
}, h.id)),
m.x.map((h, k) => e.jsx("div", {
className: "absolute top-0 botto