@gospelfix/qr 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +136 -2
- package/dist/chunk-2YL4VYHX.js +154 -0
- package/dist/chunk-AGMNF5IW.mjs +143 -0
- package/dist/index.d.mts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +30 -0
- package/dist/index.mjs +1 -0
- package/dist/react.d.mts +7 -0
- package/dist/react.d.ts +7 -0
- package/dist/react.js +608 -0
- package/dist/react.mjs +605 -0
- package/dist/styles.css +2 -0
- package/package.json +97 -4
package/dist/react.mjs
ADDED
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { parseTransferHash, BANK_OPTIONS, buildTransferUrl, createQrMatrix, LAUNCH_APPS } from './chunk-AGMNF5IW.mjs';
|
|
3
|
+
import { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
7
|
+
import { Button as Button$1 } from '@base-ui/react/button';
|
|
8
|
+
import { cva } from 'class-variance-authority';
|
|
9
|
+
import { Input as Input$1 } from '@base-ui/react/input';
|
|
10
|
+
import { Select as Select$1 } from '@base-ui/react/select';
|
|
11
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
|
|
12
|
+
|
|
13
|
+
function cn(...inputs) {
|
|
14
|
+
return twMerge(clsx(inputs));
|
|
15
|
+
}
|
|
16
|
+
function Card({
|
|
17
|
+
className,
|
|
18
|
+
size = "default",
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "card",
|
|
25
|
+
"data-size": size,
|
|
26
|
+
className: cn(
|
|
27
|
+
"flex flex-col gap-[var(--card-spacing)] overflow-hidden rounded-2xl border border-border bg-card py-[var(--card-spacing)] text-[13px] text-card-foreground [--card-spacing:1rem] data-[size=sm]:[--card-spacing:0.75rem]",
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function CardContent({ className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "card-content",
|
|
39
|
+
className: cn("px-[var(--card-spacing)]", className),
|
|
40
|
+
...props
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
function AccountCard({ bankName, accountNumber, accountHolder }) {
|
|
45
|
+
return /* @__PURE__ */ jsx(Card, { className: "gap-0 py-0", children: /* @__PURE__ */ jsx(CardContent, { className: "px-0", children: /* @__PURE__ */ jsxs("dl", { className: "divide-y divide-border", children: [
|
|
46
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-3", children: [
|
|
47
|
+
/* @__PURE__ */ jsx("dt", { className: "shrink-0 text-muted-foreground", children: "\uBC1B\uB294 \uC740\uD589" }),
|
|
48
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right font-semibold", children: bankName })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-3", children: [
|
|
51
|
+
/* @__PURE__ */ jsx("dt", { className: "shrink-0 text-muted-foreground", children: "\uACC4\uC88C\uBC88\uD638" }),
|
|
52
|
+
/* @__PURE__ */ jsx("dd", { className: "break-all text-right font-mono font-semibold", children: accountNumber })
|
|
53
|
+
] }),
|
|
54
|
+
accountHolder && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-4 py-3", children: [
|
|
55
|
+
/* @__PURE__ */ jsx("dt", { className: "shrink-0 text-muted-foreground", children: "\uC608\uAE08\uC8FC" }),
|
|
56
|
+
/* @__PURE__ */ jsx("dd", { className: "text-right font-semibold", children: accountHolder })
|
|
57
|
+
] })
|
|
58
|
+
] }) }) });
|
|
59
|
+
}
|
|
60
|
+
function AmountHero({ amount }) {
|
|
61
|
+
if (amount === null) return null;
|
|
62
|
+
return /* @__PURE__ */ jsxs("section", { "aria-label": "\uBCF4\uB0BC \uAE08\uC561", className: "space-y-1", children: [
|
|
63
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13px] text-muted-foreground", children: "\uBCF4\uB0BC \uAE08\uC561" }),
|
|
64
|
+
/* @__PURE__ */ jsxs("p", { className: "text-2xl font-semibold", children: [
|
|
65
|
+
amount.toLocaleString("ko-KR"),
|
|
66
|
+
"\uC6D0"
|
|
67
|
+
] })
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
var buttonVariants = cva(
|
|
71
|
+
"inline-flex shrink-0 items-center justify-center rounded-2xl border border-transparent whitespace-nowrap transition-colors outline-none select-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
72
|
+
{
|
|
73
|
+
variants: {
|
|
74
|
+
variant: {
|
|
75
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
76
|
+
// aria-pressed: 선택된 타일은 검정 2px 테두리로 구분한다(고정 높이라 레이아웃은 밀리지 않음)
|
|
77
|
+
outline: "border-border bg-card text-foreground hover:bg-muted aria-pressed:border-2 aria-pressed:border-foreground",
|
|
78
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-muted",
|
|
79
|
+
ghost: "text-foreground hover:bg-muted",
|
|
80
|
+
link: "text-foreground underline-offset-4 hover:underline"
|
|
81
|
+
},
|
|
82
|
+
size: {
|
|
83
|
+
default: "h-12 gap-2 px-2 text-[13px] font-normal",
|
|
84
|
+
lg: "h-12 gap-2 px-4 text-base font-semibold"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
variant: "default",
|
|
89
|
+
size: "default"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
function Button({
|
|
94
|
+
className,
|
|
95
|
+
variant = "default",
|
|
96
|
+
size = "default",
|
|
97
|
+
...props
|
|
98
|
+
}) {
|
|
99
|
+
return /* @__PURE__ */ jsx(
|
|
100
|
+
Button$1,
|
|
101
|
+
{
|
|
102
|
+
"data-slot": "button",
|
|
103
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
104
|
+
...props
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
function AppGrid({ transfer, onCopy, copiedAppName }) {
|
|
109
|
+
return /* @__PURE__ */ jsxs("section", { "aria-labelledby": "app-grid-title", className: "space-y-2", children: [
|
|
110
|
+
/* @__PURE__ */ jsx("h2", { id: "app-grid-title", className: "text-[13px] font-semibold", children: "\uC790\uC8FC \uC4F0\uB294 \uC571" }),
|
|
111
|
+
/* @__PURE__ */ jsx("ul", { className: "grid grid-cols-4 gap-2", children: LAUNCH_APPS.map((app) => {
|
|
112
|
+
const url = app.buildUrl(transfer);
|
|
113
|
+
return /* @__PURE__ */ jsx("li", { className: "flex", children: url ? (
|
|
114
|
+
// 일반 <a>: 커스텀 스킴을 라우터가 가로채지 않게 한다.
|
|
115
|
+
// 계좌가 채워지지 않는 앱은 누를 때 계좌번호를 복사해 두어 앱에서 붙여넣기만 하면 된다
|
|
116
|
+
/* @__PURE__ */ jsx(
|
|
117
|
+
"a",
|
|
118
|
+
{
|
|
119
|
+
className: cn(buttonVariants({ variant: "outline" }), "w-full"),
|
|
120
|
+
href: url,
|
|
121
|
+
onClick: app.prefilled ? void 0 : () => onCopy(app.name),
|
|
122
|
+
children: app.name
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
) : (
|
|
126
|
+
// 열 수 없는 앱은 숨기지 않고 복사 타일로 대체한다
|
|
127
|
+
/* @__PURE__ */ jsx(
|
|
128
|
+
Button,
|
|
129
|
+
{
|
|
130
|
+
variant: "outline",
|
|
131
|
+
className: "w-full",
|
|
132
|
+
"aria-pressed": copiedAppName === app.name,
|
|
133
|
+
onClick: () => onCopy(app.name),
|
|
134
|
+
children: app.name
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
) }, app.id);
|
|
138
|
+
}) }),
|
|
139
|
+
/* @__PURE__ */ jsx("p", { role: "status", className: "text-[13px] text-muted-foreground", children: copiedAppName && `\uACC4\uC88C\uBC88\uD638\uAC00 \uBCF5\uC0AC\uB410\uC5B4\uC694. ${copiedAppName} \uC571\uC744 \uC5F4\uC5B4 \uBD99\uC5EC\uB123\uC5B4 \uC8FC\uC138\uC694.` })
|
|
140
|
+
] });
|
|
141
|
+
}
|
|
142
|
+
function CopyBar({ copied, onCopy }) {
|
|
143
|
+
return /* @__PURE__ */ jsx("div", { className: "sticky bottom-0 border-t border-border bg-background pb-[env(safe-area-inset-bottom)]", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsx(Button, { size: "lg", className: "w-full", onClick: onCopy, "aria-live": "polite", children: copied ? "\uBCF5\uC0AC\uB410\uC5B4\uC694" : "\uACC4\uC88C\uBC88\uD638 \uBCF5\uC0AC" }) }) });
|
|
144
|
+
}
|
|
145
|
+
function GuideSteps() {
|
|
146
|
+
return /* @__PURE__ */ jsxs("section", { "aria-label": "\uC1A1\uAE08 \uBC29\uBC95", className: "space-y-4", children: [
|
|
147
|
+
/* @__PURE__ */ jsxs("ol", { className: "list-decimal space-y-2 pl-4 text-[13px]", children: [
|
|
148
|
+
/* @__PURE__ */ jsx("li", { children: "\uACC4\uC88C\uBC88\uD638 \uBCF5\uC0AC" }),
|
|
149
|
+
/* @__PURE__ */ jsx("li", { children: "\uAE08\uC735\uC571 \uC5F4\uAE30" }),
|
|
150
|
+
/* @__PURE__ */ jsx("li", { children: "\uBD99\uC5EC\uB123\uACE0 \uC740\uD589\xB7\uACC4\uC88C\uBC88\uD638\xB7\uC608\uAE08\uC8FC\xB7\uAE08\uC561 \uD655\uC778" })
|
|
151
|
+
] }),
|
|
152
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] leading-relaxed text-muted-foreground", children: "\uC571\uC774 \uC5F4\uB9AC\uC9C0 \uC54A\uC73C\uBA74 \uACC4\uC88C\uBC88\uD638\uB97C \uBCF5\uC0AC\uD574 \uC0AC\uC6A9 \uC911\uC778 \uAE08\uC735\uC571\uC5D0\uC11C \uC9C1\uC811 \uC1A1\uAE08\uD574 \uC8FC\uC138\uC694." }),
|
|
153
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] leading-relaxed text-muted-foreground", children: "\uAE08\uC735\uC571 \uC1A1\uAE08 \uD654\uBA74\uC744 \uC5EC\uB294 \uD3B8\uC758 \uAE30\uB2A5\uC774\uBA70 \uAC00\uC2A4\uD384\uD53D\uC2A4\uB294 \uD574\uB2F9 \uAE08\uC735\uC571 \uD68C\uC0AC\uC640 \uC81C\uD734 \uAD00\uACC4\uAC00 \uC544\uB2C8\uC5D0\uC694. \uBCF4\uB0B4\uAE30 \uC804 \uBC1B\uB294 \uC740\uD589\xB7\uACC4\uC88C\uBC88\uD638\xB7\uC608\uAE08\uC8FC\xB7\uAE08\uC561\uC744 \uAF2D \uD655\uC778\uD574\uC8FC\uC138\uC694." })
|
|
154
|
+
] });
|
|
155
|
+
}
|
|
156
|
+
function InvalidLink() {
|
|
157
|
+
return /* @__PURE__ */ jsx("div", { className: "px-4 py-8", children: /* @__PURE__ */ jsx(Card, { role: "alert", children: /* @__PURE__ */ jsx(CardContent, { className: "text-muted-foreground", children: "\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 \uB9C1\uD06C\uC608\uC694. \uAC00\uC2A4\uD384\uD53D\uC2A4 \uC785\uAE08 \uC548\uB0B4 \uD654\uBA74\uC5D0\uC11C QR\uC744 \uB2E4\uC2DC \uB9CC\uB4E4\uC5B4 \uC8FC\uC138\uC694." }) }) });
|
|
158
|
+
}
|
|
159
|
+
function TransferHeader({ title = "\uC1A1\uAE08 \uC548\uB0B4" }) {
|
|
160
|
+
return /* @__PURE__ */ jsxs("header", { className: "flex h-12 items-center justify-between border-b border-border px-4", children: [
|
|
161
|
+
/* @__PURE__ */ jsx("span", { className: "text-[13px] font-semibold", children: "\uAC00\uC2A4\uD384\uD53D\uC2A4" }),
|
|
162
|
+
/* @__PURE__ */ jsx("h1", { className: "text-[13px] font-normal text-muted-foreground", children: title })
|
|
163
|
+
] });
|
|
164
|
+
}
|
|
165
|
+
function useCopy(value, resetMs = 1500) {
|
|
166
|
+
const [copied, setCopied] = useState(false);
|
|
167
|
+
const [lastLabel, setLastLabel] = useState(null);
|
|
168
|
+
const timer = useRef(null);
|
|
169
|
+
useEffect(() => {
|
|
170
|
+
return () => {
|
|
171
|
+
if (timer.current) clearTimeout(timer.current);
|
|
172
|
+
};
|
|
173
|
+
}, []);
|
|
174
|
+
const copy = useCallback(
|
|
175
|
+
async (label) => {
|
|
176
|
+
try {
|
|
177
|
+
await navigator.clipboard.writeText(value);
|
|
178
|
+
} catch {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
setLastLabel(label ?? null);
|
|
182
|
+
setCopied(true);
|
|
183
|
+
if (timer.current) clearTimeout(timer.current);
|
|
184
|
+
timer.current = setTimeout(() => setCopied(false), resetMs);
|
|
185
|
+
},
|
|
186
|
+
[value, resetMs]
|
|
187
|
+
);
|
|
188
|
+
return { copied, lastLabel, copy };
|
|
189
|
+
}
|
|
190
|
+
function TransferView() {
|
|
191
|
+
const [view, setView] = useState({ status: "loading" });
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
const transfer = parseTransferHash(window.location.hash);
|
|
194
|
+
setView(transfer ? { status: "ready", transfer } : { status: "invalid" });
|
|
195
|
+
}, []);
|
|
196
|
+
if (view.status === "loading") return null;
|
|
197
|
+
if (view.status === "invalid") {
|
|
198
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
199
|
+
/* @__PURE__ */ jsx(TransferHeader, {}),
|
|
200
|
+
/* @__PURE__ */ jsx(InvalidLink, {})
|
|
201
|
+
] });
|
|
202
|
+
}
|
|
203
|
+
return /* @__PURE__ */ jsx(ReadyView, { transfer: view.transfer });
|
|
204
|
+
}
|
|
205
|
+
function ReadyView({ transfer }) {
|
|
206
|
+
const { copied, lastLabel, copy } = useCopy(transfer.accountNumber);
|
|
207
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
208
|
+
/* @__PURE__ */ jsx(TransferHeader, {}),
|
|
209
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6 px-4 pb-6 pt-6", children: [
|
|
210
|
+
/* @__PURE__ */ jsx(AmountHero, { amount: transfer.amount }),
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
AccountCard,
|
|
213
|
+
{
|
|
214
|
+
bankName: transfer.bankName,
|
|
215
|
+
accountNumber: transfer.accountNumber,
|
|
216
|
+
accountHolder: transfer.accountHolder
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ jsx(AppGrid, { transfer, onCopy: (name) => void copy(name), copiedAppName: lastLabel }),
|
|
220
|
+
/* @__PURE__ */ jsx(GuideSteps, {})
|
|
221
|
+
] }),
|
|
222
|
+
/* @__PURE__ */ jsx(CopyBar, { copied, onCopy: () => void copy() })
|
|
223
|
+
] });
|
|
224
|
+
}
|
|
225
|
+
function NoticeText({ children }) {
|
|
226
|
+
return /* @__PURE__ */ jsx("p", { className: "text-[13px] text-muted-foreground", children });
|
|
227
|
+
}
|
|
228
|
+
var QUIET_ZONE = 4;
|
|
229
|
+
var PNG_MODULE_PX = 10;
|
|
230
|
+
var PNG_FILE_NAME = "gospelfix-qr.png";
|
|
231
|
+
function buildPathData(matrix) {
|
|
232
|
+
const segments = [];
|
|
233
|
+
matrix.forEach((row, r) => {
|
|
234
|
+
let c = 0;
|
|
235
|
+
while (c < row.length) {
|
|
236
|
+
if (!row[c]) {
|
|
237
|
+
c += 1;
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
const start = c;
|
|
241
|
+
while (c < row.length && row[c]) c += 1;
|
|
242
|
+
segments.push(`M${start + QUIET_ZONE} ${r + QUIET_ZONE}h${c - start}v1h-${c - start}z`);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
return segments.join("");
|
|
246
|
+
}
|
|
247
|
+
function downloadPng(matrix) {
|
|
248
|
+
const total = matrix.length + QUIET_ZONE * 2;
|
|
249
|
+
const canvas = document.createElement("canvas");
|
|
250
|
+
canvas.width = total * PNG_MODULE_PX;
|
|
251
|
+
canvas.height = total * PNG_MODULE_PX;
|
|
252
|
+
const ctx = canvas.getContext("2d");
|
|
253
|
+
if (!ctx) return;
|
|
254
|
+
ctx.fillStyle = "#ffffff";
|
|
255
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
256
|
+
ctx.fillStyle = "#000000";
|
|
257
|
+
matrix.forEach((row, r) => {
|
|
258
|
+
row.forEach((dark, c) => {
|
|
259
|
+
if (!dark) return;
|
|
260
|
+
ctx.fillRect(
|
|
261
|
+
(c + QUIET_ZONE) * PNG_MODULE_PX,
|
|
262
|
+
(r + QUIET_ZONE) * PNG_MODULE_PX,
|
|
263
|
+
PNG_MODULE_PX,
|
|
264
|
+
PNG_MODULE_PX
|
|
265
|
+
);
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
canvas.toBlob((blob) => {
|
|
269
|
+
if (!blob) return;
|
|
270
|
+
const objectUrl = URL.createObjectURL(blob);
|
|
271
|
+
const a = document.createElement("a");
|
|
272
|
+
a.href = objectUrl;
|
|
273
|
+
a.download = PNG_FILE_NAME;
|
|
274
|
+
a.click();
|
|
275
|
+
setTimeout(() => URL.revokeObjectURL(objectUrl), 1e4);
|
|
276
|
+
}, "image/png");
|
|
277
|
+
}
|
|
278
|
+
function QrPreview({
|
|
279
|
+
bankLabel,
|
|
280
|
+
accountNumber,
|
|
281
|
+
accountHolder,
|
|
282
|
+
url,
|
|
283
|
+
matrix
|
|
284
|
+
}) {
|
|
285
|
+
const { lastLabel, copy } = useCopy(url);
|
|
286
|
+
const pathData = useMemo(() => buildPathData(matrix), [matrix]);
|
|
287
|
+
const total = matrix.length + QUIET_ZONE * 2;
|
|
288
|
+
return /* @__PURE__ */ jsxs("section", { "aria-label": "\uB9CC\uB4E0 QR", className: "space-y-4", children: [
|
|
289
|
+
/* @__PURE__ */ jsx(
|
|
290
|
+
AccountCard,
|
|
291
|
+
{
|
|
292
|
+
bankName: bankLabel,
|
|
293
|
+
accountNumber,
|
|
294
|
+
accountHolder
|
|
295
|
+
}
|
|
296
|
+
),
|
|
297
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-2xl border border-border", children: /* @__PURE__ */ jsxs(
|
|
298
|
+
"svg",
|
|
299
|
+
{
|
|
300
|
+
role: "img",
|
|
301
|
+
"aria-label": "\uC1A1\uAE08 \uC548\uB0B4 QR \uCF54\uB4DC",
|
|
302
|
+
viewBox: `0 0 ${total} ${total}`,
|
|
303
|
+
shapeRendering: "crispEdges",
|
|
304
|
+
className: "block h-auto w-full",
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ jsx("rect", { width: total, height: total, fill: "white" }),
|
|
307
|
+
/* @__PURE__ */ jsx("path", { d: pathData, fill: "black" })
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
) }),
|
|
311
|
+
/* @__PURE__ */ jsx(NoticeText, { children: "QR\uC744 \uACF5\uC720\uD558\uAE30 \uC804\uC5D0 \uC740\uD589\xB7\uACC4\uC88C\uBC88\uD638\xB7\uC608\uAE08\uC8FC\uB97C \uAF2D \uD655\uC778\uD574 \uC8FC\uC138\uC694." }),
|
|
312
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
313
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", type: "button", onClick: () => downloadPng(matrix), children: "PNG\uB85C \uC800\uC7A5" }),
|
|
314
|
+
/* @__PURE__ */ jsx(Button, { variant: "outline", type: "button", onClick: () => void copy("link"), children: "\uB9C1\uD06C \uBCF5\uC0AC" })
|
|
315
|
+
] }),
|
|
316
|
+
/* @__PURE__ */ jsx("p", { role: "status", className: "min-h-4 text-[13px] text-muted-foreground", children: lastLabel === "link" ? "\uB9C1\uD06C\uB97C \uBCF5\uC0AC\uD588\uC5B4\uC694." : "" })
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
319
|
+
function Input({ className, type, ...props }) {
|
|
320
|
+
return /* @__PURE__ */ jsx(
|
|
321
|
+
Input$1,
|
|
322
|
+
{
|
|
323
|
+
type,
|
|
324
|
+
"data-slot": "input",
|
|
325
|
+
className: cn(
|
|
326
|
+
"h-12 w-full min-w-0 rounded-2xl border border-input bg-card px-3 text-base font-normal text-foreground transition-colors outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 aria-[invalid=true]:border-2 aria-[invalid=true]:border-foreground",
|
|
327
|
+
className
|
|
328
|
+
),
|
|
329
|
+
...props
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
var Select = Select$1.Root;
|
|
334
|
+
function SelectValue({ className, ...props }) {
|
|
335
|
+
return /* @__PURE__ */ jsx(
|
|
336
|
+
Select$1.Value,
|
|
337
|
+
{
|
|
338
|
+
"data-slot": "select-value",
|
|
339
|
+
className: cn("flex-1 truncate text-left", className),
|
|
340
|
+
...props
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
function SelectTrigger({
|
|
345
|
+
className,
|
|
346
|
+
children,
|
|
347
|
+
...props
|
|
348
|
+
}) {
|
|
349
|
+
return /* @__PURE__ */ jsxs(
|
|
350
|
+
Select$1.Trigger,
|
|
351
|
+
{
|
|
352
|
+
"data-slot": "select-trigger",
|
|
353
|
+
className: cn(
|
|
354
|
+
"flex h-12 w-full items-center justify-between gap-2 rounded-2xl border border-input bg-card px-3 text-base font-normal whitespace-nowrap text-foreground transition-colors outline-none select-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-2 aria-[invalid=true]:border-foreground data-[placeholder]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
355
|
+
className
|
|
356
|
+
),
|
|
357
|
+
...props,
|
|
358
|
+
children: [
|
|
359
|
+
children,
|
|
360
|
+
/* @__PURE__ */ jsx(
|
|
361
|
+
Select$1.Icon,
|
|
362
|
+
{
|
|
363
|
+
render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
364
|
+
}
|
|
365
|
+
)
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
function SelectContent({
|
|
371
|
+
className,
|
|
372
|
+
children,
|
|
373
|
+
side = "bottom",
|
|
374
|
+
sideOffset = 4,
|
|
375
|
+
align = "center",
|
|
376
|
+
alignOffset = 0,
|
|
377
|
+
// 선택 항목을 트리거 위에 겹치는 배치는 모바일에서 팝업이 화면 밖으로 밀릴 수 있어 끈다
|
|
378
|
+
alignItemWithTrigger = false,
|
|
379
|
+
...props
|
|
380
|
+
}) {
|
|
381
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
382
|
+
Select$1.Positioner,
|
|
383
|
+
{
|
|
384
|
+
side,
|
|
385
|
+
sideOffset,
|
|
386
|
+
align,
|
|
387
|
+
alignOffset,
|
|
388
|
+
alignItemWithTrigger,
|
|
389
|
+
collisionPadding: 8,
|
|
390
|
+
className: "isolate z-50",
|
|
391
|
+
children: /* @__PURE__ */ jsxs(
|
|
392
|
+
Select$1.Popup,
|
|
393
|
+
{
|
|
394
|
+
"data-slot": "select-content",
|
|
395
|
+
className: cn(
|
|
396
|
+
"relative isolate z-50 max-h-[min(var(--available-height),20rem)] w-[var(--anchor-width)] min-w-36 overflow-x-hidden overflow-y-auto rounded-2xl border border-border bg-popover text-popover-foreground",
|
|
397
|
+
className
|
|
398
|
+
),
|
|
399
|
+
...props,
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
402
|
+
/* @__PURE__ */ jsx(Select$1.List, { children }),
|
|
403
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
)
|
|
407
|
+
}
|
|
408
|
+
) });
|
|
409
|
+
}
|
|
410
|
+
function SelectItem({
|
|
411
|
+
className,
|
|
412
|
+
children,
|
|
413
|
+
...props
|
|
414
|
+
}) {
|
|
415
|
+
return /* @__PURE__ */ jsxs(
|
|
416
|
+
Select$1.Item,
|
|
417
|
+
{
|
|
418
|
+
"data-slot": "select-item",
|
|
419
|
+
className: cn(
|
|
420
|
+
"relative flex min-h-12 w-full cursor-default items-center gap-2 py-2 pr-10 pl-3 text-base font-normal outline-none select-none data-[highlighted]:bg-muted data-[selected]:font-semibold data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
421
|
+
className
|
|
422
|
+
),
|
|
423
|
+
...props,
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ jsx(Select$1.ItemText, { className: "flex-1", children }),
|
|
426
|
+
/* @__PURE__ */ jsx(
|
|
427
|
+
Select$1.ItemIndicator,
|
|
428
|
+
{
|
|
429
|
+
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-3 flex size-4 items-center justify-center" }),
|
|
430
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" })
|
|
431
|
+
}
|
|
432
|
+
)
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
function SelectScrollUpButton({
|
|
438
|
+
className,
|
|
439
|
+
...props
|
|
440
|
+
}) {
|
|
441
|
+
return /* @__PURE__ */ jsx(
|
|
442
|
+
Select$1.ScrollUpArrow,
|
|
443
|
+
{
|
|
444
|
+
"data-slot": "select-scroll-up-button",
|
|
445
|
+
className: cn(
|
|
446
|
+
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1",
|
|
447
|
+
className
|
|
448
|
+
),
|
|
449
|
+
...props,
|
|
450
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
function SelectScrollDownButton({
|
|
455
|
+
className,
|
|
456
|
+
...props
|
|
457
|
+
}) {
|
|
458
|
+
return /* @__PURE__ */ jsx(
|
|
459
|
+
Select$1.ScrollDownArrow,
|
|
460
|
+
{
|
|
461
|
+
"data-slot": "select-scroll-down-button",
|
|
462
|
+
className: cn(
|
|
463
|
+
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1",
|
|
464
|
+
className
|
|
465
|
+
),
|
|
466
|
+
...props,
|
|
467
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
468
|
+
}
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
function findInvalidField(bank, account, holder) {
|
|
472
|
+
const origin = "https://example.invalid";
|
|
473
|
+
if (holder.trim() && buildTransferUrl(origin, { bankName: bank, accountNumber: account })) {
|
|
474
|
+
return "holder";
|
|
475
|
+
}
|
|
476
|
+
if (buildTransferUrl(origin, { bankName: bank, accountNumber: "123456789" })) return "account";
|
|
477
|
+
return "bank";
|
|
478
|
+
}
|
|
479
|
+
var FIELD_ERROR_MESSAGE = {
|
|
480
|
+
bank: "\uC740\uD589\uC744 \uB2E4\uC2DC \uC120\uD0DD\uD574 \uC8FC\uC138\uC694.",
|
|
481
|
+
account: "\uACC4\uC88C\uBC88\uD638\uB97C \uB2E4\uC2DC \uD655\uC778\uD574 \uC8FC\uC138\uC694.",
|
|
482
|
+
holder: "\uC608\uAE08\uC8FC\uB97C \uB2E4\uC2DC \uD655\uC778\uD574 \uC8FC\uC138\uC694."
|
|
483
|
+
};
|
|
484
|
+
function CreateForm() {
|
|
485
|
+
const [bank, setBank] = useState(null);
|
|
486
|
+
const [account, setAccount] = useState("");
|
|
487
|
+
const [holder, setHolder] = useState("");
|
|
488
|
+
const [result, setResult] = useState(null);
|
|
489
|
+
const [errorField, setErrorField] = useState(null);
|
|
490
|
+
const clearResult = () => {
|
|
491
|
+
setResult(null);
|
|
492
|
+
setErrorField(null);
|
|
493
|
+
};
|
|
494
|
+
const handleSubmit = (event) => {
|
|
495
|
+
var _a;
|
|
496
|
+
event.preventDefault();
|
|
497
|
+
if (!bank) {
|
|
498
|
+
setResult(null);
|
|
499
|
+
setErrorField("bank");
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
const url = buildTransferUrl(window.location.origin, {
|
|
503
|
+
bankName: bank,
|
|
504
|
+
accountNumber: account,
|
|
505
|
+
accountHolder: holder
|
|
506
|
+
});
|
|
507
|
+
if (!url) {
|
|
508
|
+
setResult(null);
|
|
509
|
+
setErrorField(findInvalidField(bank, account, holder));
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
setErrorField(null);
|
|
513
|
+
setResult({
|
|
514
|
+
url,
|
|
515
|
+
matrix: createQrMatrix(url),
|
|
516
|
+
bankLabel: ((_a = BANK_OPTIONS.find((option) => option.value === bank)) == null ? void 0 : _a.label) ?? bank,
|
|
517
|
+
accountNumber: account.replace(/[^0-9]/g, ""),
|
|
518
|
+
accountHolder: holder.trim()
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
const errorFor = (field) => errorField === field ? /* @__PURE__ */ jsx("p", { id: `${field}-error`, role: "alert", className: "text-[13px] font-semibold text-foreground", children: FIELD_ERROR_MESSAGE[field] }) : null;
|
|
522
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-6 px-4 pb-8 pt-6", children: [
|
|
523
|
+
/* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, noValidate: true, className: "space-y-4", children: [
|
|
524
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
525
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "bank", className: "block text-[13px] text-muted-foreground", children: "\uBC1B\uB294 \uC740\uD589" }),
|
|
526
|
+
/* @__PURE__ */ jsxs(
|
|
527
|
+
Select,
|
|
528
|
+
{
|
|
529
|
+
items: BANK_OPTIONS,
|
|
530
|
+
value: bank,
|
|
531
|
+
onValueChange: (value) => {
|
|
532
|
+
setBank(value);
|
|
533
|
+
clearResult();
|
|
534
|
+
},
|
|
535
|
+
children: [
|
|
536
|
+
/* @__PURE__ */ jsx(
|
|
537
|
+
SelectTrigger,
|
|
538
|
+
{
|
|
539
|
+
id: "bank",
|
|
540
|
+
"aria-invalid": errorField === "bank",
|
|
541
|
+
"aria-describedby": errorField === "bank" ? "bank-error" : void 0,
|
|
542
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "\uC740\uD589\uC744 \uC120\uD0DD\uD574 \uC8FC\uC138\uC694" })
|
|
543
|
+
}
|
|
544
|
+
),
|
|
545
|
+
/* @__PURE__ */ jsx(SelectContent, { children: BANK_OPTIONS.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
546
|
+
]
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
errorFor("bank")
|
|
550
|
+
] }),
|
|
551
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
552
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "account", className: "block text-[13px] text-muted-foreground", children: "\uACC4\uC88C\uBC88\uD638" }),
|
|
553
|
+
/* @__PURE__ */ jsx(
|
|
554
|
+
Input,
|
|
555
|
+
{
|
|
556
|
+
id: "account",
|
|
557
|
+
inputMode: "numeric",
|
|
558
|
+
autoComplete: "off",
|
|
559
|
+
placeholder: "\uD558\uC774\uD508(-) \uC5C6\uC774 \uC785\uB825\uD574\uB3C4 \uB3FC\uC694",
|
|
560
|
+
value: account,
|
|
561
|
+
onChange: (event) => {
|
|
562
|
+
setAccount(event.target.value);
|
|
563
|
+
clearResult();
|
|
564
|
+
},
|
|
565
|
+
"aria-invalid": errorField === "account",
|
|
566
|
+
"aria-describedby": errorField === "account" ? "account-error" : void 0
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
errorFor("account")
|
|
570
|
+
] }),
|
|
571
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
572
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "holder", className: "block text-[13px] text-muted-foreground", children: "\uC608\uAE08\uC8FC (\uC120\uD0DD)" }),
|
|
573
|
+
/* @__PURE__ */ jsx(
|
|
574
|
+
Input,
|
|
575
|
+
{
|
|
576
|
+
id: "holder",
|
|
577
|
+
autoComplete: "off",
|
|
578
|
+
value: holder,
|
|
579
|
+
onChange: (event) => {
|
|
580
|
+
setHolder(event.target.value);
|
|
581
|
+
clearResult();
|
|
582
|
+
},
|
|
583
|
+
"aria-invalid": errorField === "holder",
|
|
584
|
+
"aria-describedby": errorField === "holder" ? "holder-error" : void 0
|
|
585
|
+
}
|
|
586
|
+
),
|
|
587
|
+
errorFor("holder")
|
|
588
|
+
] }),
|
|
589
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", size: "lg", className: "w-full", children: "QR \uB9CC\uB4E4\uAE30" })
|
|
590
|
+
] }),
|
|
591
|
+
result && (result.matrix ? /* @__PURE__ */ jsx(
|
|
592
|
+
QrPreview,
|
|
593
|
+
{
|
|
594
|
+
bankLabel: result.bankLabel,
|
|
595
|
+
accountNumber: result.accountNumber,
|
|
596
|
+
accountHolder: result.accountHolder,
|
|
597
|
+
url: result.url,
|
|
598
|
+
matrix: result.matrix
|
|
599
|
+
}
|
|
600
|
+
) : /* @__PURE__ */ jsx("p", { role: "alert", className: "text-[13px] font-semibold text-foreground", children: "\uC785\uB825 \uB0B4\uC6A9\uC774 \uB108\uBB34 \uAE38\uC5B4\uC694. \uC608\uAE08\uC8FC\uB97C \uC904\uC5EC \uB2E4\uC2DC \uB9CC\uB4E4\uC5B4 \uC8FC\uC138\uC694." })),
|
|
601
|
+
/* @__PURE__ */ jsx(NoticeText, { children: "QR\uC744 \uC2A4\uCE94\uD55C \uC0AC\uB78C\uC774 \uAE08\uC735\uC571\uC5D0\uC11C \uAE08\uC561\uC744 \uC9C1\uC811 \uC785\uB825\uD574\uC694. \uB9C1\uD06C\uB97C \uBC1B\uC740 \uC0AC\uB78C\uC740 \uB204\uAD6C\uB098 \uC774 \uACC4\uC88C \uC815\uBCF4\uB97C \uBCFC \uC218 \uC788\uC5B4\uC694." })
|
|
602
|
+
] });
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export { CreateForm, TransferView };
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
|
|
2
|
+
/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:1rem;--background:#f7f5f0;--foreground:#111;--card:#fff;--card-foreground:#111;--popover:#fff;--popover-foreground:#111;--primary:#f50;--primary-foreground:#111;--secondary:#f0eee8;--secondary-foreground:#111;--muted:#f0eee8;--muted-foreground:#6b6b66;--accent:#f0eee8;--accent-foreground:#111;--destructive:#dc2626;--border:#e8e5df;--input:#e8e5df;--ring:#111}*{border-color:var(--border)}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.right-3{right:.75rem}.top-0{top:0}.isolate{isolation:isolate}.z-10{z-index:10}.z-50{z-index:50}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.size-4{width:1rem;height:1rem}.h-12{height:3rem}.h-auto{height:auto}.h-px{height:1px}.max-h-\[min\(var\(--available-height\)\2c 20rem\)\]{max-height:min(var(--available-height),20rem)}.min-h-12{min-height:3rem}.min-h-4{min-height:1rem}.w-\[var\(--anchor-width\)\]{width:var(--anchor-width)}.w-full{width:100%}.min-w-0{min-width:0}.min-w-36{min-width:9rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.scroll-my-1{scroll-margin-top:.25rem;scroll-margin-bottom:.25rem}.list-decimal{list-style-type:decimal}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-\[var\(--card-spacing\)\]{gap:var(--card-spacing)}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:var(--border)}.self-start{align-self:flex-start}.justify-self-end{justify-self:end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded-2xl{border-radius:1rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-border{border-color:var(--border)}.border-input{border-color:var(--input)}.border-transparent{border-color:transparent}.bg-background{background-color:var(--background)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-muted{background-color:var(--muted)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.p-1{padding:.25rem}.p-\[var\(--card-spacing\)\]{padding:var(--card-spacing)}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-\[var\(--card-spacing\)\]{padding-left:var(--card-spacing);padding-right:var(--card-spacing)}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[var\(--card-spacing\)\]{padding-top:var(--card-spacing);padding-bottom:var(--card-spacing)}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.text-card-foreground{color:var(--card-foreground)}.text-foreground{color:var(--foreground)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.underline-offset-4{text-underline-offset:4px}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.\[--card-spacing\:1rem\]{--card-spacing:1rem}.placeholder\:text-muted-foreground::-moz-placeholder{color:var(--muted-foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:underline:hover{text-decoration-line:underline}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-muted:disabled{background-color:var(--muted)}.disabled\:opacity-50:disabled{opacity:.5}.has-\[\[data-slot\=card-action\]\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.aria-pressed\:border-2[aria-pressed=true]{border-width:2px}.aria-pressed\:border-foreground[aria-pressed=true]{border-color:var(--foreground)}.aria-\[invalid\=true\]\:border-2[aria-invalid=true]{border-width:2px}.aria-\[invalid\=true\]\:border-foreground[aria-invalid=true]{border-color:var(--foreground)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[highlighted\]\:bg-muted[data-highlighted]{background-color:var(--muted)}.data-\[selected\]\:font-semibold[data-selected]{font-weight:600}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[size\=sm\]\:\[--card-spacing\:0\.75rem\][data-size=sm]{--card-spacing:0.75rem}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}
|