v7.0.0-beta.2 release

This commit is contained in:
HeuJung committed 2026-04-21 12:50:07 +09:00
1 parent fa8eba7a0d
commit 5d4890d6fb
30 files changed
+1508 -136

No files matched your search

@@ -4,6 +4,16 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.0-beta.3] - 2026-04-21
### Fixed
- 알림 레이어를 닫을 때 목록이 읽음 상태로 갱신되지 않아 재토글 시 읽음 처리가 누락되던 문제 수정
- 알림 레이어 무한 스크롤 시 "안 읽은 알림만" 필터가 유지되지 않아 읽은 알림이 섞여 노출되던 문제 수정
- 알림 레이어 무한 스크롤 시 동일 페이지 API 가 중복 호출되던 문제 수정
- 안 읽은 알림이 없는데도 알림 레이어를 닫을 때 읽음 처리 API 가 불필요하게 호출되던 문제 수정
- 알림 드롭다운이 화면 경계를 벗어나지 않도록 자동으로 좌/우 정렬 전환 및 최대 너비 제한
## [1.0.0-beta.2] - 2026-04-20
### Added
@@ -0,0 +1,147 @@
/**
* @file admin-base-notification-sync.test.tsx
* @description 관리자 알림 레이어 동기화 회귀 테스트
*
* 회귀 방지 대상:
* 1. onClose(read-batch) 이후 notifications 데이터소스가 refetch되어야 함
* → 이전: notification_unread_count만 refetch되어 다음 토글 시 marked_count: 0
* 2. onLoadMore 무한 스크롤 요청에 read 파라미터가 포함되어야 함
* → 이전: page/per_page만 포함되어 읽은 알림이 섞여서 로드됨
*
* 데스크톱 헤더와 모바일 헤더 양쪽에 동일 구조가 존재하므로 둘 다 검증한다.
* 참고: gnuboard/g7#14 (공개 제보)
*/
import { describe, it, expect } from 'vitest';
import adminBase from '../../layouts/_admin_base.json';
type ActionNode = {
event?: string;
handler?: string;
params?: Record<string, any>;
onSuccess?: ActionNode[];
actions?: ActionNode[];
target?: string;
};
type LayoutNode = {
actions?: ActionNode[];
children?: LayoutNode[];
slots?: Record<string, LayoutNode[]>;
[key: string]: unknown;
};
function walk(input: LayoutNode | LayoutNode[] | undefined, visit: (node: LayoutNode) => void) {
if (!input) return;
const nodes = Array.isArray(input) ? input : [input];
for (const node of nodes) {
visit(node);
if (node.slots) {
for (const key of Object.keys(node.slots)) {
walk(node.slots[key], visit);
}
}
if (node.children) {
walk(node.children, visit);
}
}
}
function collectActionsByEvent(layout: any, eventName: string): ActionNode[] {
const roots = Array.isArray(layout.components) ? layout.components : [layout];
const matched: ActionNode[] = [];
walk(roots, (node) => {
if (!Array.isArray(node.actions)) return;
for (const action of node.actions) {
if (action && action.event === eventName) {
matched.push(action);
}
}
});
return matched;
}
function flattenSequenceActions(action: ActionNode): ActionNode[] {
if (action.handler === 'sequence' && Array.isArray(action.params?.actions)) {
return action.params!.actions as ActionNode[];
}
return [action];
}
describe('관리자 알림 레이어 동기화 (gnuboard/g7#14)', () => {
describe('Bug 1: onClose 후 notifications 데이터소스 refetch', () => {
const closeActions = collectActionsByEvent(adminBase, 'onClose');
it('데스크톱/모바일 양쪽에 onClose 핸들러가 존재해야 한다', () => {
expect(closeActions.length).toBeGreaterThanOrEqual(2);
});
it.each(closeActions.map((a, i) => [i, a] as const))(
'onClose[%i] sequence는 read-batch apiCall을 포함한다',
(_, close) => {
const steps = flattenSequenceActions(close);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/notifications/read-batch'),
);
expect(apiCall).toBeDefined();
},
);
it.each(closeActions.map((a, i) => [i, a] as const))(
'onClose[%i] read-batch onSuccess에 notifications refetch가 포함되어야 한다',
(_, close) => {
const steps = flattenSequenceActions(close);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/notifications/read-batch'),
)!;
const successSteps = (apiCall.onSuccess ?? []) as ActionNode[];
const refetchIds = successSteps
.filter((s) => s.handler === 'refetchDataSource')
.map((s) => s.params?.dataSourceId);
expect(refetchIds).toContain('notifications');
expect(refetchIds).toContain('notification_unread_count');
},
);
it.each(closeActions.map((a, i) => [i, a] as const))(
'onClose[%i] onSuccess에 페이지네이션 리셋 setState가 포함되어야 한다',
(_, close) => {
const steps = flattenSequenceActions(close);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/notifications/read-batch'),
)!;
const successSteps = (apiCall.onSuccess ?? []) as ActionNode[];
const setState = successSteps.find((s) => s.handler === 'setState');
expect(setState).toBeDefined();
expect(setState!.params?.target).toBe('global');
expect(setState!.params?.notificationsCurrentPage).toBe(1);
expect(setState!.params?.notificationsHasMore).toBeNull();
},
);
});
describe('Bug 2: onLoadMore query에 read 파라미터 유지', () => {
const loadMoreActions = collectActionsByEvent(adminBase, 'onLoadMore');
it('데스크톱/모바일 양쪽에 onLoadMore 핸들러가 존재해야 한다', () => {
expect(loadMoreActions.length).toBeGreaterThanOrEqual(2);
});
it.each(loadMoreActions.map((a, i) => [i, a] as const))(
'onLoadMore[%i] apiCall query에 read 파라미터가 포함되어야 한다',
(_, loadMore) => {
const steps = flattenSequenceActions(loadMore);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/admin/notifications'),
);
expect(apiCall).toBeDefined();
const query = apiCall!.params?.query ?? {};
expect(query).toHaveProperty('page');
expect(query).toHaveProperty('per_page');
expect(query).toHaveProperty('read');
expect(String(query.read)).toContain('notificationsUnreadOnly');
},
);
});
});
@@ -1 +1 @@
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--Line truncated
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--Line truncated
@@ -1,13 +1,13 @@
var SirsoftAdminBasic=(function(Q,c,m,ar){"use strict";function Jf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=Jf(m),Rf=()=>window.G7Core,re=m.forwardRef(({children:e,variant:t="primary",size:n="md",className:a="",...r},o)=>{const s="inline-flex items-center justify-center",i=Rf()?.style?.mergeClasses?.(s,a)??`${s} ${a}`;return c.jsx("button",{ref:o,className:i,...r,children:e})});re.displayName="Button";const Vi=m.forwardRef(({accept:e,maxSize:t,onChange:n,onError:a,buttonText:r="Browse",placeholder:o="No file selected",className:s="",disabled:i,...l},g)=>{const u=m.useRef(null),d=g||u,[f,h]=m.useState(""),v=m.useCallback(()=>{!i&&d.current&&d.current.click()},[i,d]),p=m.useCallback(b=>{const O=b.target.files?.[0]||null;if(!O){h(""),n?.({target:{value:null,name:""}});return}if(t&&O.size>t*1024*1024){const C=`File size exceeds ${t}MB limit`;a?.(C),d.current&&(d.current.value=""),h("");return}h(O.name),n?.({target:{value:O,name:O.name}})},[t,n,a,d]),x=m.useCallback(b=>{b.stopPropagation(),d.current&&(d.current.value=""),h(""),n?.({target:{value:null,name:""}})},[n,d]);return c.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[c.jsx("input",{ref:d,type:"file",accept:e,onChange:p,disabled:i,className:"hidden",...l}),c.jsx("button",{type:"button",onClick:v,disabled:i,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:r}),c.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!i&&c.jsx("button",{type:"button",onClick:x,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Vi.displayName="FileInput";const ft=m.forwardRef(({label:e,error:t,className:n="",onChange:a,onKeyPress:r,value:o,defaultValue:s,type:i="text",checked:l,defaultChecked:g,...u},d)=>{const f=i==="radio"||i==="checkbox",h=m.useRef(!1),v=m.useRef(null);m.useImperativeHandle(d,()=>v.current);const[p,x]=m.useState(o??s??"");m.useEffect(()=>{if(!f&&!h.current&&o!==void 0){if(v.current&&document.activeElement===v.current)return;x(o)}},[o,f]);const b=m.useCallback(()=>{h.current=!0},[]),O=m.useCallback(w=>{if(h.current=!1,a){const A=w.target.value;x(A);const D=new Event("change",{bubbles:!0});Object.defineProperty(D,"target",{writable:!1,value:{value:A}}),Object.defineProperty(D,"currentTarget",{writable:!1,value:{value:A}}),a(D)}},[a]),C=m.useCallback(w=>{const A=w.target.value;x(A),!h.current&&a&&a(w)},[a]),E=m.useCallback(w=>{h.current||r&&r(w)},[r]),{loadingactions:N,formdata:S,...k}=u;if(f)return c.jsx("input",{ref:v,type:i,className:n,onChange:a,checked:l,defaultChecked:g,value:o,...k});const y=o!==void 0?{value:p}:{defaultValue:s};return c.jsx("input",{ref:v,type:i,className:n,onChange:C,onKeyPress:E,onCompositionStart:b,onCompositionEnd:O,...y,...k})});ft.displayName="Input";const vr=({label:e,error:t,className:n="",onChange:a,value:r,defaultValue:o,...s})=>{const i=m.useRef(!1),l=m.useRef(null),[g,u]=m.useState(r??o??"");m.useEffect(()=>{!i.current&&r!==void 0&&u(r)},[r]);const d=m.useCallback(()=>{i.current=!0},[]),f=m.useCallback(O=>{if(i.current=!1,a){const C=O.target.value;u(C);const E=new Event("change",{bubbles:!0});Object.defineProperty(E,"target",{writable:!1,value:{value:C}}),Object.defineProperty(E,"currentTarget",{writable:!1,value:{value:C}}),a(E)}},[a]),h=m.useCallback(O=>{const C=O.target.value;u(C),!i.current&&a&&a(O)},[a]),{loadingactions:v,formdata:p,...x}=s,b=r!==void 0?{value:g}:{defaultValue:o};return c.jsx("textarea",{ref:l,className:n,onChange:h,onCompositionStart:d,onCompositionEnd:f,...b,...x})},Ft=({children:e,className:t="",...n})=>c.jsx("label",{className:t,...n,children:e}),_=m.forwardRef(({children:e,className:t="",...n},a)=>c.jsx("div",{ref:a,className:t,...n,children:e})),Z=({children:e,className:t="",...n})=>c.jsx("span",{className:t,...n,children:e}),dt=({children:e,className:t="",...n})=>c.jsx("p",{className:t,...n,children:e}),or=({className:e="",alt:t="",...n})=>c.jsx("img",{className:e,alt:t,...n}),Io=({children:e,className:t="",...n})=>c.jsx("h1",{className:t,...n,children:e}),Er=({children:e,className:t="",...n})=>c.jsx("h2",{className:t,...n,children:e}),Hr=({children:e,className:t="",...n})=>c.jsx("h3",{className:t,...n,children:e}),Hi=({children:e,className:t="",...n})=>c.jsx("h4",{className:t,...Line truncated
var SirsoftAdminBasic=(function(Q,c,m,ar){"use strict";function Jf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=Jf(m),Rf=()=>window.G7Core,re=m.forwardRef(({children:e,variant:t="primary",size:n="md",className:a="",...r},o)=>{const s="inline-flex items-center justify-center",i=Rf()?.style?.mergeClasses?.(s,a)??`${s} ${a}`;return c.jsx("button",{ref:o,className:i,...r,children:e})});re.displayName="Button";const Vi=m.forwardRef(({accept:e,maxSize:t,onChange:n,onError:a,buttonText:r="Browse",placeholder:o="No file selected",className:s="",disabled:i,...l},g)=>{const u=m.useRef(null),d=g||u,[f,h]=m.useState(""),v=m.useCallback(()=>{!i&&d.current&&d.current.click()},[i,d]),p=m.useCallback(b=>{const O=b.target.files?.[0]||null;if(!O){h(""),n?.({target:{value:null,name:""}});return}if(t&&O.size>t*1024*1024){const C=`File size exceeds ${t}MB limit`;a?.(C),d.current&&(d.current.value=""),h("");return}h(O.name),n?.({target:{value:O,name:O.name}})},[t,n,a,d]),x=m.useCallback(b=>{b.stopPropagation(),d.current&&(d.current.value=""),h(""),n?.({target:{value:null,name:""}})},[n,d]);return c.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[c.jsx("input",{ref:d,type:"file",accept:e,onChange:p,disabled:i,className:"hidden",...l}),c.jsx("button",{type:"button",onClick:v,disabled:i,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:r}),c.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!i&&c.jsx("button",{type:"button",onClick:x,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:c.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Vi.displayName="FileInput";const ft=m.forwardRef(({label:e,error:t,className:n="",onChange:a,onKeyPress:r,value:o,defaultValue:s,type:i="text",checked:l,defaultChecked:g,...u},d)=>{const f=i==="radio"||i==="checkbox",h=m.useRef(!1),v=m.useRef(null);m.useImperativeHandle(d,()=>v.current);const[p,x]=m.useState(o??s??"");m.useEffect(()=>{if(!f&&!h.current&&o!==void 0){if(v.current&&document.activeElement===v.current)return;x(o)}},[o,f]);const b=m.useCallback(()=>{h.current=!0},[]),O=m.useCallback(w=>{if(h.current=!1,a){const A=w.target.value;x(A);const _=new Event("change",{bubbles:!0});Object.defineProperty(_,"target",{writable:!1,value:{value:A}}),Object.defineProperty(_,"currentTarget",{writable:!1,value:{value:A}}),a(_)}},[a]),C=m.useCallback(w=>{const A=w.target.value;x(A),!h.current&&a&&a(w)},[a]),S=m.useCallback(w=>{h.current||r&&r(w)},[r]),{loadingactions:N,formdata:E,...k}=u;if(f)return c.jsx("input",{ref:v,type:i,className:n,onChange:a,checked:l,defaultChecked:g,value:o,...k});const y=o!==void 0?{value:p}:{defaultValue:s};return c.jsx("input",{ref:v,type:i,className:n,onChange:C,onKeyPress:S,onCompositionStart:b,onCompositionEnd:O,...y,...k})});ft.displayName="Input";const vr=({label:e,error:t,className:n="",onChange:a,value:r,defaultValue:o,...s})=>{const i=m.useRef(!1),l=m.useRef(null),[g,u]=m.useState(r??o??"");m.useEffect(()=>{!i.current&&r!==void 0&&u(r)},[r]);const d=m.useCallback(()=>{i.current=!0},[]),f=m.useCallback(O=>{if(i.current=!1,a){const C=O.target.value;u(C);const S=new Event("change",{bubbles:!0});Object.defineProperty(S,"target",{writable:!1,value:{value:C}}),Object.defineProperty(S,"currentTarget",{writable:!1,value:{value:C}}),a(S)}},[a]),h=m.useCallback(O=>{const C=O.target.value;u(C),!i.current&&a&&a(O)},[a]),{loadingactions:v,formdata:p,...x}=s,b=r!==void 0?{value:g}:{defaultValue:o};return c.jsx("textarea",{ref:l,className:n,onChange:h,onCompositionStart:d,onCompositionEnd:f,...b,...x})},Ft=({children:e,className:t="",...n})=>c.jsx("label",{className:t,...n,children:e}),D=m.forwardRef(({children:e,className:t="",...n},a)=>c.jsx("div",{ref:a,className:t,...n,children:e})),Z=({children:e,className:t="",...n})=>c.jsx("span",{className:t,...n,children:e}),dt=({children:e,className:t="",...n})=>c.jsx("p",{className:t,...n,children:e}),or=({className:e="",alt:t="",...n})=>c.jsx("img",{className:e,alt:t,...n}),Io=({children:e,className:t="",...n})=>c.jsx("h1",{className:t,...n,children:e}),Er=({children:e,className:t="",...n})=>c.jsx("h2",{className:t,...n,children:e}),Hr=({children:e,className:t="",...n})=>c.jsx("h3",{className:t,...n,children:e}),Hi=({children:e,className:t="",...n})=>c.jsx("h4",{className:t,...Line truncated
inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium
${ee?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"}
`,children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),I(F),ee&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),!ee&&c.jsx(re,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>T(F),disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]}),ee&&Y&&V()]}),n==="textarea"?c.jsx(vr,{name:`${f}[${F}]`,value:C[F]||"",onChange:oe=>L(F,oe.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:g,rows:u,className:`${ae} resize-vertical`}):c.jsx(ft,{type:"text",name:`${f}[${F}]`,value:C[F]||"",onChange:oe=>L(F,oe.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:g,className:ae})]},F)},[f,C,L,s,i,l,g,u,n,I,b,T,V,p]),G=m.useCallback(F=>{const R=`w-full px-3 py-2 border ${p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500"} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-2`,ae=`${s}${s?" (":""}${I(F)}${s?")":""}`;return c.jsx(_,{children:n==="textarea"?c.jsx(vr,{name:`${f}[${F}]`,value:C[F]||"",onChange:ee=>L(F,ee.target.value),placeholder:ae,required:i&&F===b,disabled:l,maxLength:g,rows:u,className:`${R} resize-vertical`}):c.jsx(ft,{type:"text",name:`${f}[${F}]`,value:C[F]||"",onChange:ee=>L(F,ee.target.value),placeholder:ae,required:i&&F===b,disabled:l,maxLength:g,className:R})},F)},[f,C,L,s,i,l,g,u,n,b,I]),H=()=>c.jsx(_,{className:d,children:c.jsx(_,{className:"space-y-4",children:k.map((F,Y)=>z(F,Y===0))})}),W=()=>c.jsxs(_,{className:d,children:[c.jsxs(_,{className:"flex items-center gap-2 mb-3",children:[k.map(F=>c.jsxs(re,{type:"button",className:`
`,children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),I(V),ee&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),!ee&&c.jsx(re,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>T(V),disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]}),ee&&Y&&$()]}),n==="textarea"?c.jsx(vr,{name:`${f}[${V}]`,value:C[V]||"",onChange:oe=>L(V,oe.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:g,rows:u,className:`${ae} resize-vertical`}):c.jsx(ft,{type:"text",name:`${f}[${V}]`,value:C[V]||"",onChange:oe=>L(V,oe.target.value),placeholder:X,required:i&&ee,disabled:l,maxLength:g,className:ae})]},V)},[f,C,L,s,i,l,g,u,n,I,b,T,$,p]),G=m.useCallback(V=>{const R=`w-full px-3 py-2 border ${p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500"} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-2`,ae=`${s}${s?" (":""}${I(V)}${s?")":""}`;return c.jsx(D,{children:n==="textarea"?c.jsx(vr,{name:`${f}[${V}]`,value:C[V]||"",onChange:ee=>L(V,ee.target.value),placeholder:ae,required:i&&V===b,disabled:l,maxLength:g,rows:u,className:`${R} resize-vertical`}):c.jsx(ft,{type:"text",name:`${f}[${V}]`,value:C[V]||"",onChange:ee=>L(V,ee.target.value),placeholder:ae,required:i&&V===b,disabled:l,maxLength:g,className:R})},V)},[f,C,L,s,i,l,g,u,n,b,I]),j=()=>c.jsx(D,{className:d,children:c.jsx(D,{className:"space-y-4",children:k.map((V,Y)=>z(V,Y===0))})}),W=()=>c.jsxs(D,{className:d,children:[c.jsxs(D,{className:"flex items-center gap-2 mb-3",children:[k.map(V=>c.jsxs(re,{type:"button",className:`
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
${w===F?F===b?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":F===b?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>A(F),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),h?c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:I(F)}),c.jsx(Z,{className:"inline md:hidden",children:F.toUpperCase()})]}):I(F),F===b&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),j(F)&&w!==F&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),F!==b&&c.jsx(re,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:Y=>{Y.stopPropagation(),T(F)},disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]},F)),V()]}),k.map(F=>c.jsx(_,{className:w===F?"block":"hidden",children:G(F)},F))]}),B=()=>{const F=p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500";return c.jsx(_,{className:d,children:c.jsxs(_,{className:"flex items-center gap-1",children:[c.jsx(_,{className:"flex items-center shrink-0",children:k.map(Y=>c.jsxs(re,{type:"button",className:`
${w===V?V===b?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":V===b?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>A(V),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),h?c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:I(V)}),c.jsx(Z,{className:"inline md:hidden",children:V.toUpperCase()})]}):I(V),V===b&&c.jsx(Z,{className:"text-red-500 dark:text-red-400",children:"*"}),H(V)&&w!==V&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),V!==b&&c.jsx(re,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:Y=>{Y.stopPropagation(),T(V)},disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]},V)),$()]}),k.map(V=>c.jsx(D,{className:w===V?"block":"hidden",children:G(V)},V))]}),B=()=>{const V=p?"border-red-500 dark:border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-200 dark:border-gray-600 focus:ring-blue-500 focus:border-blue-500";return c.jsx(D,{className:d,children:c.jsxs(D,{className:"flex items-center gap-1",children:[c.jsx(D,{className:"flex items-center shrink-0",children:k.map(Y=>c.jsxs(re,{type:"button",className:`
px-2 py-1.5 text-xs font-medium border-y border-l first:rounded-l last:rounded-r last:border-r transition-colors
${w===Y?"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"}
`,onClick:()=>A(Y),title:I(Y),children:[Y.toUpperCase(),Y===b&&c.jsx(Z,{className:"text-red-400 ml-0.5",children:"*"})]},Y))}),c.jsx(_,{className:"flex-1 min-w-0",children:n==="textarea"?c.jsx(vr,{name:`${f}[${w}]`,value:C[w]||"",onChange:Y=>L(w,Y.target.value),placeholder:s,required:i&&w===b,disabled:l,maxLength:g,rows:u,className:`w-full px-2 py-1.5 border ${F} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`}):c.jsx(ft,{type:"text",name:`${f}[${w}]`,value:C[w]||"",onChange:Y=>L(w,Y.target.value),placeholder:s,required:i&&w===b,disabled:l,maxLength:g,className:`w-full px-2 py-1.5 border ${F} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`})})]})})};return c.jsxs(_,{className:l?"opacity-50 cursor-not-allowed":void 0,children:[a==="compact"?B():a==="tabs"?W():H(),p&&v&&c.jsx(Z,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:v})]})};Uo.displayName="MultilingualInput";const gg=()=>window.G7Core,Vo=({checked:e,value:t,onChange:n,disabled:a=!1,label:r,description:o,size:s="md",className:i="",name:l})=>{const[g,u]=m.useState(()=>e??t??!1);m.useEffect(()=>{u(e??t??!1)},[e,t]);const d=p=>{const x=p.target.checked;u(x),n&&!a&&n(p)},h={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[s],v=()=>{if(!a){const p=!g;if(u(p),n){const x=gg();x?.createChangeEvent&&n(x.createChangeEvent({checked:p,name:l}))}}};return c.jsxs("div",{className:`inline-flex flex-wrap items-start gap-x-2 w-auto ${i}`,children:[c.jsxs("div",{className:`relative inline-flex items-center flex-shrink-0 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onClick:p=>{p.preventDefault(),p.stopPropagation(),v()},children:[c.jsx("input",{type:"checkbox",id:l,name:l,checked:g,onChange:d,disabled:a,className:"sr-only peer",tabIndex:-1}),c.jsx("div",{className:`
`,onClick:()=>A(Y),title:I(Y),children:[Y.toUpperCase(),Y===b&&c.jsx(Z,{className:"text-red-400 ml-0.5",children:"*"})]},Y))}),c.jsx(D,{className:"flex-1 min-w-0",children:n==="textarea"?c.jsx(vr,{name:`${f}[${w}]`,value:C[w]||"",onChange:Y=>L(w,Y.target.value),placeholder:s,required:i&&w===b,disabled:l,maxLength:g,rows:u,className:`w-full px-2 py-1.5 border ${V} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`}):c.jsx(ft,{type:"text",name:`${f}[${w}]`,value:C[w]||"",onChange:Y=>L(w,Y.target.value),placeholder:s,required:i&&w===b,disabled:l,maxLength:g,className:`w-full px-2 py-1.5 border ${V} rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm`})})]})})};return c.jsxs(D,{className:l?"opacity-50 cursor-not-allowed":void 0,children:[a==="compact"?B():a==="tabs"?W():j(),p&&v&&c.jsx(Z,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:v})]})};Uo.displayName="MultilingualInput";const gg=()=>window.G7Core,Vo=({checked:e,value:t,onChange:n,disabled:a=!1,label:r,description:o,size:s="md",className:i="",name:l})=>{const[g,u]=m.useState(()=>e??t??!1);m.useEffect(()=>{u(e??t??!1)},[e,t]);const d=p=>{const x=p.target.checked;u(x),n&&!a&&n(p)},h={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[s],v=()=>{if(!a){const p=!g;if(u(p),n){const x=gg();x?.createChangeEvent&&n(x.createChangeEvent({checked:p,name:l}))}}};return c.jsxs("div",{className:`inline-flex flex-wrap items-start gap-x-2 w-auto ${i}`,children:[c.jsxs("div",{className:`relative inline-flex items-center flex-shrink-0 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onClick:p=>{p.preventDefault(),p.stopPropagation(),v()},children:[c.jsx("input",{type:"checkbox",id:l,name:l,checked:g,onChange:d,disabled:a,className:"sr-only peer",tabIndex:-1}),c.jsx("div",{className:`
relative ${h.track}
bg-gray-200 dark:bg-gray-700
rounded-full
@@ -29,13 +29,13 @@ var SirsoftAdminBasic=(function(Q,c,m,ar){"use strict";function Jf(e){const t=Ob
peer-checked:after:translate-x-full
peer-checked:after:border-white
transition-colors
`})]}),r&&c.jsx("span",{className:`text-sm font-medium text-gray-900 dark:text-white ${a?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:v,children:r}),o&&c.jsx("p",{className:"w-full mt-1 text-xs text-gray-500 dark:text-gray-400",children:o})]})},fa=({status:e,label:t,showIcon:n=!0,iconName:a,className:r="",style:o})=>{const s={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},i={success:ue.CheckCircle,warning:ue.ExclamationTriangle,error:ue.XCircle,info:ue.InfoCircle,pending:ue.Clock,default:ue.QuestionCircle},l={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},g=a||i[e],u=t||l[e],d=s[e];return c.jsxs(Z,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${d} ${r}`,style:o,children:[n&&c.jsx(ne,{name:g,className:"w-4 h-4"}),c.jsx(Z,{children:u})]})},Bi={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},Wi={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},Yi=({color:e="gray",text:t,size:n="md",className:a="",style:r,children:o})=>{const s=Bi[e]||Bi.gray,i=Wi[n]||Wi.md;return c.jsxs(Z,{className:`inline-flex items-center rounded-full font-medium ${i} ${s} ${a}`,style:r,children:[t,o]})};/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:qi,setPrototypeOf:Ki,isFrozen:hg,getPrototypeOf:pg,getOwnPropertyDescriptor:bg}=Object;let{freeze:Ot,seal:zt,create:Xi}=Object,{apply:Ho,construct:jo}=typeof Reflect<"u"&&Reflect;Ot||(Ot=function(t){return t}),zt||(zt=function(t){return t}),Ho||(Ho=function(t,n,a){return t.apply(n,a)}),jo||(jo=function(t,n){return new t(...n)});const ga=Ut(Array.prototype.forEach),Zi=Ut(Array.prototype.pop),vn=Ut(Array.prototype.push),ha=Ut(String.prototype.toLowerCase),zo=Ut(String.prototype.toString),Qi=Ut(String.prototype.match),yn=Ut(String.prototype.replace),mg=Ut(String.prototype.indexOf),vg=Ut(String.prototype.trim),Zt=Ut(Object.prototype.hasOwnProperty),Tt=Ut(RegExp.prototype.test),xn=yg(TypeError);function Ut(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return Ho(e,t,a)}}function yg(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return jo(e,n)}}function je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ha;Ki&&Ki(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const o=n(r);o!==r&&(hg(t)||(t[a]=o),r=o)}e[r]=!0}return e}function xg(e){for(let t=0;t<e.length;t++)Zt(e,t)||(e[t]=null);return e}function Nr(e){const t=Xi(null);for(const[n,a]of qi(e))Zt(e,n)&&(Array.isArray(a)?t[n]=xg(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=Nr(a):t[n]=a);return t}function wn(e,t){for(;e!==null;){const a=bg(e,t);if(a){if(a.get)return Ut(a.get);if(typeof a.value=="function")return Ut(a.value)}e=pg(e)}function n(){return null}return n}const Ji=Ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","stri Line truncated
`+Ve),se&&ga([$,M,L],Ne=>{Ve=yn(Ve,Ne," ")}),E&&Be?E.createHTML(Ve):Ve},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};at(ke),ce=!0},t.clearConfig=function(){Le=null,ce=!1},t.isValidAttribute=function(ke,q,ie){Le||at({});const ye=fe(ke),K=fe(q);return la(ye,K,ie)},t.addHook=function(ke,q){typeof q=="function"&&(D[ke]=D[ke]||[],vn(D[ke],q))},t.removeHook=function(ke){if(D[ke])return Zi(D[ke])},t.removeHooks=function(ke){D[ke]&&(D[ke]=[])},t.removeAllHooks=function(){D={}},t}var Dg=ol();const qo=({content:e,text:t,isHtml:n=!0,className:a="",purifyConfig:r})=>{const o=t??e??"";if(!o||o.trim()==="")return null;if(!n){const g=`
`})]}),r&&c.jsx("span",{className:`text-sm font-medium text-gray-900 dark:text-white ${a?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:v,children:r}),o&&c.jsx("p",{className:"w-full mt-1 text-xs text-gray-500 dark:text-gray-400",children:o})]})},fa=({status:e,label:t,showIcon:n=!0,iconName:a,className:r="",style:o})=>{const s={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},i={success:ue.CheckCircle,warning:ue.ExclamationTriangle,error:ue.XCircle,info:ue.InfoCircle,pending:ue.Clock,default:ue.QuestionCircle},l={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},g=a||i[e],u=t||l[e],d=s[e];return c.jsxs(Z,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${d} ${r}`,style:o,children:[n&&c.jsx(ne,{name:g,className:"w-4 h-4"}),c.jsx(Z,{children:u})]})},Bi={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},Wi={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},Yi=({color:e="gray",text:t,size:n="md",className:a="",style:r,children:o})=>{const s=Bi[e]||Bi.gray,i=Wi[n]||Wi.md;return c.jsxs(Z,{className:`inline-flex items-center rounded-full font-medium ${i} ${s} ${a}`,style:r,children:[t,o]})};/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:qi,setPrototypeOf:Ki,isFrozen:hg,getPrototypeOf:pg,getOwnPropertyDescriptor:bg}=Object;let{freeze:Ot,seal:zt,create:Xi}=Object,{apply:Ho,construct:jo}=typeof Reflect<"u"&&Reflect;Ot||(Ot=function(t){return t}),zt||(zt=function(t){return t}),Ho||(Ho=function(t,n,a){return t.apply(n,a)}),jo||(jo=function(t,n){return new t(...n)});const ga=Ut(Array.prototype.forEach),Zi=Ut(Array.prototype.pop),vn=Ut(Array.prototype.push),ha=Ut(String.prototype.toLowerCase),zo=Ut(String.prototype.toString),Qi=Ut(String.prototype.match),yn=Ut(String.prototype.replace),mg=Ut(String.prototype.indexOf),vg=Ut(String.prototype.trim),Zt=Ut(Object.prototype.hasOwnProperty),Tt=Ut(RegExp.prototype.test),xn=yg(TypeError);function Ut(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return Ho(e,t,a)}}function yg(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return jo(e,n)}}function je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ha;Ki&&Ki(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const o=n(r);o!==r&&(hg(t)||(t[a]=o),r=o)}e[r]=!0}return e}function xg(e){for(let t=0;t<e.length;t++)Zt(e,t)||(e[t]=null);return e}function Nr(e){const t=Xi(null);for(const[n,a]of qi(e))Zt(e,n)&&(Array.isArray(a)?t[n]=xg(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=Nr(a):t[n]=a);return t}function wn(e,t){for(;e!==null;){const a=bg(e,t);if(a){if(a.get)return Ut(a.get);if(typeof a.value=="function")return Ut(a.value)}e=pg(e)}function n(){return null}return n}const Ji=Ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","stri Line truncated
`+Ve),se&&ga([F,M,L],Ne=>{Ve=yn(Ve,Ne," ")}),S&&Be?S.createHTML(Ve):Ve},t.setConfig=function(){let ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};at(ke),ce=!0},t.clearConfig=function(){Le=null,ce=!1},t.isValidAttribute=function(ke,q,ie){Le||at({});const ye=fe(ke),K=fe(q);return la(ye,K,ie)},t.addHook=function(ke,q){typeof q=="function"&&(_[ke]=_[ke]||[],vn(_[ke],q))},t.removeHook=function(ke){if(_[ke])return Zi(_[ke])},t.removeHooks=function(ke){_[ke]&&(_[ke]=[])},t.removeAllHooks=function(){_={}},t}var Dg=ol();const qo=({content:e,text:t,isHtml:n=!0,className:a="",purifyConfig:r})=>{const o=t??e??"";if(!o||o.trim()==="")return null;if(!n){const g=`
whitespace-pre-wrap
text-gray-900 dark:text-gray-100
font-sans
${a}
`.trim().replace(/\s+/g," ");return c.jsx(_,{className:g,children:o})}const s={FORBID_TAGS:["script","noscript","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","button","style","link","meta","base","body","head","html","title","svg","math","audio","video","source","track","canvas","details","dialog","plaintext","xmp","listing","marquee","noframes","noembed","template","slot"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","ontoggle","oncanplay","onloadstart","formaction","xlink:href","action"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"]},i=m.useMemo(()=>{const g=r?{...s,...r,FORBID_TAGS:[...s.FORBID_TAGS,...r.FORBID_TAGS||[]],FORBID_ATTR:[...s.FORBID_ATTR,...r.FORBID_ATTR||[]]}:s;return Dg.sanitize(o,g).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(d,f,h,v)=>(h.startsWith("http://")||h.startsWith("https://"))&&!d.includes("rel=")?`<a ${f}href="${h}"${v} rel="noopener noreferrer">`:d)},[o,r]),l=`
`.trim().replace(/\s+/g," ");return c.jsx(D,{className:g,children:o})}const s={FORBID_TAGS:["script","noscript","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","button","style","link","meta","base","body","head","html","title","svg","math","audio","video","source","track","canvas","details","dialog","plaintext","xmp","listing","marquee","noframes","noembed","template","slot"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","ontoggle","oncanplay","onloadstart","formaction","xlink:href","action"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"]},i=m.useMemo(()=>{const g=r?{...s,...r,FORBID_TAGS:[...s.FORBID_TAGS,...r.FORBID_TAGS||[]],FORBID_ATTR:[...s.FORBID_ATTR,...r.FORBID_ATTR||[]]}:s;return Dg.sanitize(o,g).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(d,f,h,v)=>(h.startsWith("http://")||h.startsWith("https://"))&&!d.includes("rel=")?`<a ${f}href="${h}"${v} rel="noopener noreferrer">`:d)},[o,r]),l=`
prose dark:prose-invert max-w-none
prose-p:my-2
prose-headings:font-bold prose-headings:mt-6 prose-headings:mb-4
@@ -57,86 +57,86 @@ var SirsoftAdminBasic=(function(Q,c,m,ar){"use strict";function Jf(e){const t=Ob
[&_tr:hover]:bg-gray-50 dark:[&_tr:hover]:bg-gray-700/50
after:content-[''] after:block after:clear-both
${a}
`.trim().replace(/\s+/g," ");return c.jsx(_,{className:l,dangerouslySetInnerHTML:{__html:i}})},ba=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...e)=>console.log("[Comp:DataGrid]",...e),warn:(...e)=>console.warn("[Comp:DataGrid]",...e),error:(...e)=>console.error("[Comp:DataGrid]",...e)},Cn=(e,t)=>window.G7Core?.t?.(e,t)??e,Ko={Div:_,Span:Z,Button:re,Icon:ne,Checkbox:Xt,P:dt,A:jr,Label:Ft,Input:ft,H1:Io,H2:Er,H3:Hr,H4:Hi,Img:or,Select:zr,Textarea:vr,Table:_o,Thead:Po,Tbody:$o,Tfoot:Fo,Tr:yr,Th:Gr,Td:Dt,MultilingualInput:Uo,Toggle:Vo,StatusBadge:fa,Badge:Yi,HtmlContent:qo,ActionMenu:mn},Xo=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(t=>Xo(t)).join(", ");if(typeof e=="object"){if(m.isValidElement(e))return e;if(Object.keys(e).length===0)return"";try{return JSON.stringify(e)}catch{return ba.warn("객체를 문자열로 변환할 수 없습니다:",e),"[Object]"}}return String(e)},sl=(e,t)=>{if(!e)return!0;const n=e.match(/^\{\{(.+)\}\}$/);if(!n)return!0;const a=n[1].trim();try{return!!new Function("row",`return ${a}`)(t)}catch(r){return ba.warn("subRow 조건 평가 실패:",e,r),!0}},Sn=(e,t,n,a="",r)=>{const o=window.G7Core;if(o?.renderItemChildren){const s={row:t,value:n,$value:n};return o.renderItemChildren(e,s,Ko,a,r?{componentContext:r}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Zo=(e,t,n="",a)=>{const r=window.G7Core;if(r?.renderItemChildren){const o={row:t,$value:t};return r.renderItemChildren(e,o,Ko,n,a?{componentContext:a}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},_g=({id:e,columns:t,data:n,sortable:a=!0,pagination:r=!1,pageSize:o=10,onRowClick:s,className:i="",style:l,sortField:g,sortDirection:u,onSortChange:d,selectable:f=!1,selectedIds:h=[],onSelectionChange:v,idField:p="id",showColumnSelector:x=!1,visibleColumns:b,onColumnVisibilityChange:O,responsiveBreakpoint:C=768,cardRenderer:E,rowActions:N,onRowAction:S,alwaysShowPagination:k=!1,serverSidePagination:y=!1,serverCurrentPage:w,serverTotalPages:A,onPageChange:D,prevText:$,nextText:M,columnSelectorText:L,emptyMessage:U,actionsColumnHeader:T,requiredText:I,selectedCountText:j,showFirstLast:V=!0,expandable:z=!1,expandedRowIds:G,onExpandChange:H,expandChildren:W,expandedRowRender:B,expandColumnWidth:F="48px",expandIconExpanded:Y=ue.ChevronDown,expandIconCollapsed:R=ue.ChevronRight,expandConditionField:ae,dynamicColumns:ee,dynamicColumnsInsertAfter:X,expandContext:oe,__componentContext:se,subRowChildren:pe,subRowCondition:we,subRowClassName:ce="px-6 py-2 bg-gray-50 dark:bg-gray-750",subRowRender:me,footerCells:ge,footerClassName:De="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:Be})=>{const Ye=$||void 0,te=M||void 0,Ie=L??Cn("common.column_selector"),_e=U??Cn("common.no_data"),Ae=T??Cn("common.actions"),Fe=I??Cn("common.required"),Qe=j??Cn("common.selected_count"),rt=window.G7Core,$e=rt?.useControllableState,st=rt?.shallowArrayEqual,[J,be]=$e?$e(g,null,K=>{K!==null&&d?.(K,he)}):[g??null,()=>{}],[he,xe]=$e?$e(u,"asc",K=>{J!==null&&d?.(J,K)}):[u??"asc",()=>{}],[de,Pe]=m.useState(1),[Ce,Ue]=$e?$e(G,[],H,{isEqual:st}):[G??[],()=>{}],[Te,Je]=m.useState(!1),qe=m.useRef(null),ut=rt?.useResponsive,fe=ut?.(),Le=fe?fe.width<C:typeof window<"u"&&window.innerWidth<C,He=m.useMemo(()=>{if(!ee||!Array.isArray(ee)||ee.length===0)return t;if(X){const K=t.findIndex(le=>le.field===X);if(K!==-1)return[...t.slice(0,K+1),...ee,...t.slice(K+1)]}return[...t,...ee]},[t,ee,X]),[Re,at]=m.useState(()=>b&&b.length>0?b:t.filter(K=>!K.hidden).map(K=>K.field));m.useEffect(()=>{b&&b.length>0&&at(b)},[b]);const tt=m.useRef("");m.useEffect(()=>{const K=t.map(le=>le.field).join(",");tt.current&&K!==tt.current&&(!b||b.length===0)&&at(t.filter(le=>!le.hidden).map(le=>le.field)),tt.current=K},[t,b]);const ot=m.useRef([]),qt=m.useRef(null);m.useEffect(()=>{if(ee&&ee.length>0){const K=ee.map(Ve=>Ve.field);if(qt.current===null&&(qt.current=b!==void 0&&b.length>0,qt.current)){ot.current=K;return}const le=ot.current,ve=K.filter(Ve=>!le.includes(Ve));if(ve.length>0){const Ve=ve.filter(Ne=>!Re.includes(Ne));if(Ve.length>0){const Ne=[...Re,...Ve];at(Ne),O?.(Ne)}}ot.current=K}},[ee]),m.useEffect(()=>{y||Pe(1)},[n,y]),m.useEffect(()=>{const K=le=>{qe.current&&!qe.current.contains(le.target)&&Je(!1)};return Te&&document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[Te]);const et=m.useMemo(()=>!x&&(!b||b.length===0)?He.filter(K=>!K.hidden):He.filter(K=>Re.includes(K.field)),[He,Re,x,b]),kt=m.useMemo(()=>!J||!a||!n?n||[]:[...n].sort((K,le)=>{const ve=K[J],Ve=le[J];if(ve===Ve)return 0;const Ne=ve>Ve?1:-1;return he==="asc"?Ne:-Ne}),[n,J,he,a]),We=m.useMemo(()=>{if(y||!r)return kt;const K=(de-1)*o,le=K+o;return kt.slice(K,le)},[kt,de,o,r,y]),it=y?w||1:de,At=y?A||1:Math.ceil((kt?.length||0)/o),nr=m.useCallback(K=>{y&&D?D(K):Pe(K)},[y,D]),jt=K=>{if(!a||t.find( Line truncated
`.trim().replace(/\s+/g," ");return c.jsx(D,{className:l,dangerouslySetInnerHTML:{__html:i}})},ba=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...e)=>console.log("[Comp:DataGrid]",...e),warn:(...e)=>console.warn("[Comp:DataGrid]",...e),error:(...e)=>console.error("[Comp:DataGrid]",...e)},Cn=(e,t)=>window.G7Core?.t?.(e,t)??e,Ko={Div:D,Span:Z,Button:re,Icon:ne,Checkbox:Xt,P:dt,A:jr,Label:Ft,Input:ft,H1:Io,H2:Er,H3:Hr,H4:Hi,Img:or,Select:zr,Textarea:vr,Table:_o,Thead:Po,Tbody:$o,Tfoot:Fo,Tr:yr,Th:Gr,Td:Dt,MultilingualInput:Uo,Toggle:Vo,StatusBadge:fa,Badge:Yi,HtmlContent:qo,ActionMenu:mn},Xo=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(t=>Xo(t)).join(", ");if(typeof e=="object"){if(m.isValidElement(e))return e;if(Object.keys(e).length===0)return"";try{return JSON.stringify(e)}catch{return ba.warn("객체를 문자열로 변환할 수 없습니다:",e),"[Object]"}}return String(e)},sl=(e,t)=>{if(!e)return!0;const n=e.match(/^\{\{(.+)\}\}$/);if(!n)return!0;const a=n[1].trim();try{return!!new Function("row",`return ${a}`)(t)}catch(r){return ba.warn("subRow 조건 평가 실패:",e,r),!0}},Sn=(e,t,n,a="",r)=>{const o=window.G7Core;if(o?.renderItemChildren){const s={row:t,value:n,$value:n};return o.renderItemChildren(e,s,Ko,a,r?{componentContext:r}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Zo=(e,t,n="",a)=>{const r=window.G7Core;if(r?.renderItemChildren){const o={row:t,$value:t};return r.renderItemChildren(e,o,Ko,n,a?{componentContext:a}:void 0)}return ba.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},_g=({id:e,columns:t,data:n,sortable:a=!0,pagination:r=!1,pageSize:o=10,onRowClick:s,className:i="",style:l,sortField:g,sortDirection:u,onSortChange:d,selectable:f=!1,selectedIds:h=[],onSelectionChange:v,idField:p="id",showColumnSelector:x=!1,visibleColumns:b,onColumnVisibilityChange:O,responsiveBreakpoint:C=768,cardRenderer:S,rowActions:N,onRowAction:E,alwaysShowPagination:k=!1,serverSidePagination:y=!1,serverCurrentPage:w,serverTotalPages:A,onPageChange:_,prevText:F,nextText:M,columnSelectorText:L,emptyMessage:U,actionsColumnHeader:T,requiredText:I,selectedCountText:H,showFirstLast:$=!0,expandable:z=!1,expandedRowIds:G,onExpandChange:j,expandChildren:W,expandedRowRender:B,expandColumnWidth:V="48px",expandIconExpanded:Y=ue.ChevronDown,expandIconCollapsed:R=ue.ChevronRight,expandConditionField:ae,dynamicColumns:ee,dynamicColumnsInsertAfter:X,expandContext:oe,__componentContext:se,subRowChildren:pe,subRowCondition:we,subRowClassName:ce="px-6 py-2 bg-gray-50 dark:bg-gray-750",subRowRender:me,footerCells:ge,footerClassName:De="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:Be})=>{const Ye=F||void 0,te=M||void 0,Ie=L??Cn("common.column_selector"),_e=U??Cn("common.no_data"),Ae=T??Cn("common.actions"),Fe=I??Cn("common.required"),Qe=H??Cn("common.selected_count"),rt=window.G7Core,$e=rt?.useControllableState,st=rt?.shallowArrayEqual,[J,be]=$e?$e(g,null,K=>{K!==null&&d?.(K,he)}):[g??null,()=>{}],[he,xe]=$e?$e(u,"asc",K=>{J!==null&&d?.(J,K)}):[u??"asc",()=>{}],[de,Pe]=m.useState(1),[Ce,Ue]=$e?$e(G,[],j,{isEqual:st}):[G??[],()=>{}],[Te,Je]=m.useState(!1),qe=m.useRef(null),ut=rt?.useResponsive,fe=ut?.(),Le=fe?fe.width<C:typeof window<"u"&&window.innerWidth<C,He=m.useMemo(()=>{if(!ee||!Array.isArray(ee)||ee.length===0)return t;if(X){const K=t.findIndex(le=>le.field===X);if(K!==-1)return[...t.slice(0,K+1),...ee,...t.slice(K+1)]}return[...t,...ee]},[t,ee,X]),[Re,at]=m.useState(()=>b&&b.length>0?b:t.filter(K=>!K.hidden).map(K=>K.field));m.useEffect(()=>{b&&b.length>0&&at(b)},[b]);const tt=m.useRef("");m.useEffect(()=>{const K=t.map(le=>le.field).join(",");tt.current&&K!==tt.current&&(!b||b.length===0)&&at(t.filter(le=>!le.hidden).map(le=>le.field)),tt.current=K},[t,b]);const ot=m.useRef([]),qt=m.useRef(null);m.useEffect(()=>{if(ee&&ee.length>0){const K=ee.map(Ve=>Ve.field);if(qt.current===null&&(qt.current=b!==void 0&&b.length>0,qt.current)){ot.current=K;return}const le=ot.current,ve=K.filter(Ve=>!le.includes(Ve));if(ve.length>0){const Ve=ve.filter(Ne=>!Re.includes(Ne));if(Ve.length>0){const Ne=[...Re,...Ve];at(Ne),O?.(Ne)}}ot.current=K}},[ee]),m.useEffect(()=>{y||Pe(1)},[n,y]),m.useEffect(()=>{const K=le=>{qe.current&&!qe.current.contains(le.target)&&Je(!1)};return Te&&document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[Te]);const et=m.useMemo(()=>!x&&(!b||b.length===0)?He.filter(K=>!K.hidden):He.filter(K=>Re.includes(K.field)),[He,Re,x,b]),kt=m.useMemo(()=>!J||!a||!n?n||[]:[...n].sort((K,le)=>{const ve=K[J],Ve=le[J];if(ve===Ve)return 0;const Ne=ve>Ve?1:-1;return he==="asc"?Ne:-Ne}),[n,J,he,a]),We=m.useMemo(()=>{if(y||!r)return kt;const K=(de-1)*o,le=K+o;return kt.slice(K,le)},[kt,de,o,r,y]),it=y?w||1:de,At=y?A||1:Math.ceil((kt?.length||0)/o),nr=m.useCallback(K=>{y&&_?_(K):Pe(K)},[y,_]),jt=K=>{if(!a||t.find( Line truncated
px-4 py-2 rounded-md font-medium transition-colors
focus:outline-none focus:ring-2 focus:ring-offset-2
disabled:opacity-50 disabled:cursor-not-allowed
${d[f.variant||"primary"]}
`,children:[f.iconName&&c.jsx(ne,{name:f.iconName,className:"w-4 h-4 mr-2 inline-block"}),f.label]},h))})]})},ts=(e,t)=>window.G7Core?.t?.(e,t)??e,hl=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,cancelText:o,onConfirm:s,onCancel:i,confirmButtonVariant:l="primary",cancelButtonVariant:g="secondary",width:u="500px",closeOnOverlay:d=!0,isLoading:f=!1,loadingText:h})=>{const v=r??ts("common.confirm"),p=o??ts("common.cancel"),x=h??ts("common.loading"),b=()=>{s()},O=()=>{f||(i?.(),t())},C=()=>{f||t()},E={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"};return c.jsxs(ma,{isOpen:e,onClose:C,title:n,width:u,children:[c.jsx(_,{className:"py-2",children:typeof a=="string"?c.jsx(dt,{className:"text-gray-700 dark:text-gray-300",children:a}):a}),c.jsxs(_,{className:"flex justify-end gap-3 mt-6",children:[c.jsx(re,{onClick:O,disabled:f,className:"px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(Z,{children:p})}),c.jsxs(re,{onClick:b,disabled:f,className:`flex items-center gap-2 px-4 py-2 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed ${E[l]}`,children:[f&&c.jsx(ne,{name:ue.Spinner,className:"w-4 h-4 animate-spin"}),c.jsx(Z,{children:f?x:v})]})]})]})},t0=(e,t)=>window.G7Core?.t?.(e,t)??e,r0=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,onConfirm:o,confirmButtonVariant:s="primary",width:i="500px",closeOnOverlay:l=!0})=>{const d=[{label:r??t0("common.confirm"),onClick:()=>{o?.(),t()},variant:s}],f=typeof a=="string"?c.jsx(dt,{className:"text-gray-700 dark:text-gray-300",children:a}):a;return c.jsx(gl,{isOpen:e,onClose:t,title:n,content:f,actions:d,width:i,closeOnOverlay:l})},n0=(e,t)=>window.G7Core?.t?.(e,t)??e,a0={success:ue.CheckCircle,error:ue.XCircle,warning:ue.ExclamationTriangle,info:ue.InfoCircle},pl={success:{bg:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",text:"text-green-800 dark:text-green-300"},error:{bg:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",text:"text-red-800 dark:text-red-300"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",text:"text-yellow-800 dark:text-yellow-300"},info:{bg:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",text:"text-blue-800 dark:text-blue-300"}},o0={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"},s0=({toasts:e,position:t="bottom-center",duration:n=3e3,onRemove:a})=>{const[r,o]=m.useState(new Map),s=m.useCallback(i=>{o(l=>{const g=new Map(l);return g.set(i,!1),g}),setTimeout(()=>{if(a)a(i);else{const l=window.G7Core;l?.state?.update&&l.state.update(g=>({toasts:(Array.isArray(g.toasts)?g.toasts:[]).filter(d=>d.id!==i)}))}},300)},[a]);return m.useEffect(()=>{!e||e.length===0||e.forEach(i=>{if(r.has(i.id))return;o(g=>{const u=new Map(g);return u.set(i.id,!0),u});const l=i.duration||n;l>0&&setTimeout(()=>{s(i.id)},l)})},[e,n,s,r]),!e||e.length===0?null:c.jsx(_,{className:`fixed z-[9999] flex flex-col gap-2 ${o0[t]}`,"aria-live":"polite","aria-atomic":"true",children:e.map(i=>c.jsx(i0,{toast:i,position:t,isVisible:r.get(i.id)??!0,onClose:()=>s(i.id)},i.id))})},i0=({toast:e,position:t,isVisible:n,onClose:a})=>{const r=pl[e.type]||pl.info,o=e.icon?e.icon:a0[e.type],s=t.startsWith("bottom")?"translate-y-2":"-translate-y-2";return c.jsxs(_,{className:`
`,children:[f.iconName&&c.jsx(ne,{name:f.iconName,className:"w-4 h-4 mr-2 inline-block"}),f.label]},h))})]})},ts=(e,t)=>window.G7Core?.t?.(e,t)??e,hl=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,cancelText:o,onConfirm:s,onCancel:i,confirmButtonVariant:l="primary",cancelButtonVariant:g="secondary",width:u="500px",closeOnOverlay:d=!0,isLoading:f=!1,loadingText:h})=>{const v=r??ts("common.confirm"),p=o??ts("common.cancel"),x=h??ts("common.loading"),b=()=>{s()},O=()=>{f||(i?.(),t())},C=()=>{f||t()},S={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"};return c.jsxs(ma,{isOpen:e,onClose:C,title:n,width:u,children:[c.jsx(D,{className:"py-2",children:typeof a=="string"?c.jsx(dt,{className:"text-gray-700 dark:text-gray-300",children:a}):a}),c.jsxs(D,{className:"flex justify-end gap-3 mt-6",children:[c.jsx(re,{onClick:O,disabled:f,className:"px-4 py-2 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(Z,{children:p})}),c.jsxs(re,{onClick:b,disabled:f,className:`flex items-center gap-2 px-4 py-2 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed ${S[l]}`,children:[f&&c.jsx(ne,{name:ue.Spinner,className:"w-4 h-4 animate-spin"}),c.jsx(Z,{children:f?x:v})]})]})]})},t0=(e,t)=>window.G7Core?.t?.(e,t)??e,r0=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,onConfirm:o,confirmButtonVariant:s="primary",width:i="500px",closeOnOverlay:l=!0})=>{const d=[{label:r??t0("common.confirm"),onClick:()=>{o?.(),t()},variant:s}],f=typeof a=="string"?c.jsx(dt,{className:"text-gray-700 dark:text-gray-300",children:a}):a;return c.jsx(gl,{isOpen:e,onClose:t,title:n,content:f,actions:d,width:i,closeOnOverlay:l})},n0=(e,t)=>window.G7Core?.t?.(e,t)??e,a0={success:ue.CheckCircle,error:ue.XCircle,warning:ue.ExclamationTriangle,info:ue.InfoCircle},pl={success:{bg:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",text:"text-green-800 dark:text-green-300"},error:{bg:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",text:"text-red-800 dark:text-red-300"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",text:"text-yellow-800 dark:text-yellow-300"},info:{bg:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",text:"text-blue-800 dark:text-blue-300"}},o0={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"},s0=({toasts:e,position:t="bottom-center",duration:n=3e3,onRemove:a})=>{const[r,o]=m.useState(new Map),s=m.useCallback(i=>{o(l=>{const g=new Map(l);return g.set(i,!1),g}),setTimeout(()=>{if(a)a(i);else{const l=window.G7Core;l?.state?.update&&l.state.update(g=>({toasts:(Array.isArray(g.toasts)?g.toasts:[]).filter(d=>d.id!==i)}))}},300)},[a]);return m.useEffect(()=>{!e||e.length===0||e.forEach(i=>{if(r.has(i.id))return;o(g=>{const u=new Map(g);return u.set(i.id,!0),u});const l=i.duration||n;l>0&&setTimeout(()=>{s(i.id)},l)})},[e,n,s,r]),!e||e.length===0?null:c.jsx(D,{className:`fixed z-[9999] flex flex-col gap-2 ${o0[t]}`,"aria-live":"polite","aria-atomic":"true",children:e.map(i=>c.jsx(i0,{toast:i,position:t,isVisible:r.get(i.id)??!0,onClose:()=>s(i.id)},i.id))})},i0=({toast:e,position:t,isVisible:n,onClose:a})=>{const r=pl[e.type]||pl.info,o=e.icon?e.icon:a0[e.type],s=t.startsWith("bottom")?"translate-y-2":"-translate-y-2";return c.jsxs(D,{className:`
flex items-center gap-3 p-4 rounded-lg border shadow-lg
min-w-[300px] max-w-md
transition-all duration-300
${r.bg}
${n?"opacity-100 translate-y-0":`opacity-0 ${s}`}
`,role:"alert",children:[c.jsx(ne,{name:o,className:`w-5 h-5 flex-shrink-0 ${r.text}`}),c.jsx(Z,{className:`flex-1 text-sm font-medium ${r.text}`,children:e.message}),c.jsx(re,{onClick:a,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${r.text} focus:outline-none`,"aria-label":n0("common.close_notification"),children:c.jsx(ne,{name:ue.Times,className:"w-4 h-4"})})]})},bl=({items:e,separator:t=c.jsx(ne,{name:ue.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:a="/",maxItems:r,className:o=""})=>{let i=n?[{label:"Home",href:a},...e]:e,l=i,g=!1;if(r&&i.length>r){g=!0;const u=i.slice(0,1),d=i.slice(-(r-2));l=[...u,...d]}return c.jsx(ua,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",children:c.jsx(_,{className:"flex items-center space-x-2",children:l.map((u,d)=>{const f=d===l.length-1,h=d===0;return c.jsxs(m.Fragment,{children:[g&&h&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:!1}),c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t}),c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:"..."}),l.length>1&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]}),(!g||!h)&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:f}),!f&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]})]},d)})})})},ml=({item:e,isLast:t})=>t||!e.href&&!e.onClick?c.jsx(Z,{className:"font-medium text-gray-900 dark:text-white","aria-current":t?"page":void 0,children:e.label}):e.onClick?c.jsx(jr,{href:"#",onClick:n=>{n.preventDefault(),e.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}):c.jsx(jr,{href:e.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}),l0=({title:e,description:t,iconName:n,illustrationSrc:a,illustrationAlt:r="Empty state illustration",actions:o=[],className:s=""})=>{const i={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return c.jsxs(_,{className:`flex flex-col items-center justify-center p-8 text-center ${s}`,role:"status","aria-live":"polite",children:[a?c.jsx(or,{src:a,alt:r,className:"w-48 h-48 mb-6 object-contain"}):n?c.jsx(_,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:c.jsx(ne,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e}),t&&c.jsx(dt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:t}),o.length>0&&c.jsx(_,{className:"flex flex-wrap gap-3 justify-center",children:o.map((l,g)=>c.jsxs(re,{onClick:l.onClick,className:`
`,role:"alert",children:[c.jsx(ne,{name:o,className:`w-5 h-5 flex-shrink-0 ${r.text}`}),c.jsx(Z,{className:`flex-1 text-sm font-medium ${r.text}`,children:e.message}),c.jsx(re,{onClick:a,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${r.text} focus:outline-none`,"aria-label":n0("common.close_notification"),children:c.jsx(ne,{name:ue.Times,className:"w-4 h-4"})})]})},bl=({items:e,separator:t=c.jsx(ne,{name:ue.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:a="/",maxItems:r,className:o=""})=>{let i=n?[{label:"Home",href:a},...e]:e,l=i,g=!1;if(r&&i.length>r){g=!0;const u=i.slice(0,1),d=i.slice(-(r-2));l=[...u,...d]}return c.jsx(ua,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",children:c.jsx(D,{className:"flex items-center space-x-2",children:l.map((u,d)=>{const f=d===l.length-1,h=d===0;return c.jsxs(m.Fragment,{children:[g&&h&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:!1}),c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t}),c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:"..."}),l.length>1&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]}),(!g||!h)&&c.jsxs(c.Fragment,{children:[c.jsx(ml,{item:u,isLast:f}),!f&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]})]},d)})})})},ml=({item:e,isLast:t})=>t||!e.href&&!e.onClick?c.jsx(Z,{className:"font-medium text-gray-900 dark:text-white","aria-current":t?"page":void 0,children:e.label}):e.onClick?c.jsx(jr,{href:"#",onClick:n=>{n.preventDefault(),e.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}):c.jsx(jr,{href:e.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:e.label}),l0=({title:e,description:t,iconName:n,illustrationSrc:a,illustrationAlt:r="Empty state illustration",actions:o=[],className:s=""})=>{const i={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return c.jsxs(D,{className:`flex flex-col items-center justify-center p-8 text-center ${s}`,role:"status","aria-live":"polite",children:[a?c.jsx(or,{src:a,alt:r,className:"w-48 h-48 mb-6 object-contain"}):n?c.jsx(D,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:c.jsx(ne,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e}),t&&c.jsx(dt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:t}),o.length>0&&c.jsx(D,{className:"flex flex-wrap gap-3 justify-center",children:o.map((l,g)=>c.jsxs(re,{onClick:l.onClick,className:`
px-4 py-2 rounded-md font-medium transition-colors
focus:outline-none focus:ring-2 focus:ring-offset-2
${i[l.variant||"primary"]}
`,children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4 mr-2 inline-block"}),l.label]},g))})]})},c0=(e,t)=>window.G7Core?.t?.(e,t)??e,u0=({id:e,size:t="md",color:n="text-blue-600",fullscreen:a=!1,text:r,className:o=""})=>{const s={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},i={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},l=c.jsxs(_,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[c.jsx(_,{className:`
`,children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4 mr-2 inline-block"}),l.label]},g))})]})},c0=(e,t)=>window.G7Core?.t?.(e,t)??e,u0=({id:e,size:t="md",color:n="text-blue-600",fullscreen:a=!1,text:r,className:o=""})=>{const s={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},i={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},l=c.jsxs(D,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[c.jsx(D,{className:`
${s[t]}
border-gray-200 dark:border-gray-700 border-t-current
rounded-full animate-spin
${n}
`,role:"status","aria-label":c0("common.loading")}),r&&c.jsx(Z,{className:`${i[t]} ${n} font-medium`,children:r})]});return a?c.jsx(_,{id:e,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",children:l}):c.jsx(_,{id:e,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",children:l})},lt=({className:e="",children:t,style:n,...a})=>c.jsx("i",{className:e,style:n,...a,children:t}),Wr=()=>window.G7Core,rs=(e,t)=>window.G7Core?.t?.(e,t)??e,d0=({logo:e,logoAlt:t="Logo",menu:n=[],collapsed:a=!1,onToggleCollapse:r,className:o="",currentLocale:s})=>{const[i,l]=m.useState(new Set),[g,u]=m.useState(s||Wr()?.locale?.current?.()||"ko"),[d,f]=m.useState(window.location.pathname),h=m.useMemo(()=>{const k=[],y=w=>{for(const A of w)A.url&&k.push(A.url),A.children&&y(A.children)};return y(n),k},[n]),v=m.useCallback(k=>{let y=null;for(const w of h)(k===w||k.startsWith(w+"/"))&&(!y||w.length>y.length)&&(y=w);return y},[h]);m.useEffect(()=>{const k=Wr();return k?.state?.subscribe?k.state.subscribe(w=>{const A=w?._global?.locale||k?.locale?.current?.()||"ko";u(A);const D=w?._global?.currentPath||window.location.pathname;f(D)}):void 0},[]),m.useEffect(()=>{const k=()=>{f(window.location.pathname)};return window.addEventListener("popstate",k),()=>window.removeEventListener("popstate",k)},[]),m.useEffect(()=>{s&&u(s)},[s]);const p=(k,y)=>!k||typeof y!="string"?!1:y===k?!0:y.startsWith(k+"/")?v(y)===k:!1,x=(k,y)=>{const w=new Set,A=D=>{for(const $ of D)if($.children&&$.children.length>0){if(A($.children)||p($.url,y))return w.add($.id),!0}else if(p($.url,y))return!0;return!1};return A(k),w};m.useEffect(()=>{if(n.length>0&&d){const k=x(n,d);k.size>0&&l(y=>new Set([...y,...k]))}},[d,n]);const b=k=>p(k,d),O=k=>k.children?k.children.some(y=>b(y.url)||O(y)):!1,C=k=>{l(y=>{const w=new Set(y);return w.has(k)?w.delete(k):w.add(k),w})},E=k=>typeof k=="string"?k:k[g]||k.en||Object.values(k)[0]||"",N=(k,y)=>{Wr()?.dispatch?(k.preventDefault(),Wr().navigation?.onComplete(()=>{Wr().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),Wr().dispatch({handler:"navigate",params:{path:y}})):window.location.href=y},S=(k,y=0)=>{const w=k.children&&k.children.length>0,A=i.has(k.id),D=y*16+16,$=E(k.name),M=b(k.url),L=O(k),U="w-full flex items-center justify-between px-4 py-3 transition-colors",T="bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 border-l-4 border-blue-500",I="text-blue-600 dark:text-blue-400",j="text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700";return c.jsxs(_,{children:[w&&k.url?c.jsxs(_,{className:`
`,role:"status","aria-label":c0("common.loading")}),r&&c.jsx(Z,{className:`${i[t]} ${n} font-medium`,children:r})]});return a?c.jsx(D,{id:e,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",children:l}):c.jsx(D,{id:e,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",children:l})},lt=({className:e="",children:t,style:n,...a})=>c.jsx("i",{className:e,style:n,...a,children:t}),Wr=()=>window.G7Core,rs=(e,t)=>window.G7Core?.t?.(e,t)??e,d0=({logo:e,logoAlt:t="Logo",menu:n=[],collapsed:a=!1,onToggleCollapse:r,className:o="",currentLocale:s})=>{const[i,l]=m.useState(new Set),[g,u]=m.useState(s||Wr()?.locale?.current?.()||"ko"),[d,f]=m.useState(window.location.pathname),h=m.useMemo(()=>{const k=[],y=w=>{for(const A of w)A.url&&k.push(A.url),A.children&&y(A.children)};return y(n),k},[n]),v=m.useCallback(k=>{let y=null;for(const w of h)(k===w||k.startsWith(w+"/"))&&(!y||w.length>y.length)&&(y=w);return y},[h]);m.useEffect(()=>{const k=Wr();return k?.state?.subscribe?k.state.subscribe(w=>{const A=w?._global?.locale||k?.locale?.current?.()||"ko";u(A);const _=w?._global?.currentPath||window.location.pathname;f(_)}):void 0},[]),m.useEffect(()=>{const k=()=>{f(window.location.pathname)};return window.addEventListener("popstate",k),()=>window.removeEventListener("popstate",k)},[]),m.useEffect(()=>{s&&u(s)},[s]);const p=(k,y)=>!k||typeof y!="string"?!1:y===k?!0:y.startsWith(k+"/")?v(y)===k:!1,x=(k,y)=>{const w=new Set,A=_=>{for(const F of _)if(F.children&&F.children.length>0){if(A(F.children)||p(F.url,y))return w.add(F.id),!0}else if(p(F.url,y))return!0;return!1};return A(k),w};m.useEffect(()=>{if(n.length>0&&d){const k=x(n,d);k.size>0&&l(y=>new Set([...y,...k]))}},[d,n]);const b=k=>p(k,d),O=k=>k.children?k.children.some(y=>b(y.url)||O(y)):!1,C=k=>{l(y=>{const w=new Set(y);return w.has(k)?w.delete(k):w.add(k),w})},S=k=>typeof k=="string"?k:k[g]||k.en||Object.values(k)[0]||"",N=(k,y)=>{Wr()?.dispatch?(k.preventDefault(),Wr().navigation?.onComplete(()=>{Wr().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),Wr().dispatch({handler:"navigate",params:{path:y}})):window.location.href=y},E=(k,y=0)=>{const w=k.children&&k.children.length>0,A=i.has(k.id),_=y*16+16,F=S(k.name),M=b(k.url),L=O(k),U="w-full flex items-center justify-between px-4 py-3 transition-colors",T="bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 border-l-4 border-blue-500",I="text-blue-600 dark:text-blue-400",H="text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700";return c.jsxs(D,{children:[w&&k.url?c.jsxs(D,{className:`
${U}
${M?T:L?I:j}
${M?T:L?I:H}
${a?"justify-center":""}
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(re,{onClick:z=>N(z,k.url),className:"flex items-center justify-start flex-1 min-w-0",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{className:"truncate",children:$})]}),!a&&c.jsxs(_,{className:"flex items-center gap-1",children:[k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(re,{onClick:()=>C(k.id),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600","aria-label":rs(A?"common.collapse":"common.expand"),children:c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${A?"rotate-180":""}`})})]})]}):w?c.jsxs(re,{onClick:()=>C(k.id),className:`
`,style:{paddingLeft:a?void 0:`${_}px`},children:[c.jsxs(re,{onClick:z=>N(z,k.url),className:"flex items-center justify-start flex-1 min-w-0",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{className:"truncate",children:F})]}),!a&&c.jsxs(D,{className:"flex items-center gap-1",children:[k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(re,{onClick:()=>C(k.id),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600","aria-label":rs(A?"common.collapse":"common.expand"),children:c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${A?"rotate-180":""}`})})]})]}):w?c.jsxs(re,{onClick:()=>C(k.id),className:`
${U}
${L?I:j}
${L?I:H}
${a?"justify-center":""}
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(_,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:$})]}),!a&&c.jsxs(_,{className:"flex items-center gap-1",children:[k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${A?"rotate-180":""}`})]})]}):k.url?c.jsxs(re,{onClick:z=>N(z,k.url),className:`
`,style:{paddingLeft:a?void 0:`${_}px`},children:[c.jsxs(D,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:F})]}),!a&&c.jsxs(D,{className:"flex items-center gap-1",children:[k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"}),c.jsx(lt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${A?"rotate-180":""}`})]})]}):k.url?c.jsxs(re,{onClick:z=>N(z,k.url),className:`
${U}
${M?T:j}
${M?T:H}
${a?"justify-center":""}
text-left
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(_,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:$})]}),!a&&k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}):c.jsxs(re,{className:`
`,style:{paddingLeft:a?void 0:`${_}px`},children:[c.jsxs(D,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:F})]}),!a&&k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}):c.jsxs(re,{className:`
${U}
text-gray-400 dark:text-gray-500 cursor-default
${a?"justify-center":""}
text-left
`,style:{paddingLeft:a?void 0:`${D}px`},children:[c.jsxs(_,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:$})]}),!a&&k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}),w&&!a&&A&&c.jsx(_,{className:"bg-gray-50 dark:bg-gray-900",children:k.children.map(z=>S(z,y+1))})]},k.id)};return c.jsxs(_,{className:o,children:[(e||r)&&c.jsxs(_,{className:"flex items-center justify-between px-4 py-4 border-b border-gray-200 dark:border-gray-700",children:[e&&!a&&c.jsx(or,{src:e,alt:t,className:"h-8"}),r&&c.jsx(re,{onClick:r,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors","aria-label":rs(a?"common.expand_sidebar":"common.collapse_sidebar"),children:c.jsx(lt,{className:`${a?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-gray-600 dark:text-gray-400`})})]}),c.jsx(_,{children:n.map(k=>S(k))})]})},En=(e,t)=>window.G7Core?.t?.(e,t)??e,f0=({user:e={name:"",email:""},notifications:t=[],onNotificationClick:n,onProfileClick:a,onLogoutClick:r,className:o=""})=>{const[s,i]=m.useState(!1),[l,g]=m.useState(!1),u=m.useRef(null),d=m.useRef(null),f=t.filter(h=>!h.read).length;return m.useEffect(()=>{const h=v=>{u.current&&!u.current.contains(v.target)&&i(!1),d.current&&!d.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),c.jsxs(_,{className:`
`,style:{paddingLeft:a?void 0:`${_}px`},children:[c.jsxs(D,{className:"flex items-center",children:[k.icon&&c.jsx(lt,{className:`${k.icon} ${a?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!a&&c.jsx(Z,{children:F})]}),!a&&k.module_id&&c.jsx(lt,{className:"fas fa-cube w-3 h-3 mr-2 text-gray-400 dark:text-gray-500 opacity-60",title:"모듈 메뉴"})]}),w&&!a&&A&&c.jsx(D,{className:"bg-gray-50 dark:bg-gray-900",children:k.children.map(z=>E(z,y+1))})]},k.id)};return c.jsxs(D,{className:o,children:[(e||r)&&c.jsxs(D,{className:"flex items-center justify-between px-4 py-4 border-b border-gray-200 dark:border-gray-700",children:[e&&!a&&c.jsx(or,{src:e,alt:t,className:"h-8"}),r&&c.jsx(re,{onClick:r,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors","aria-label":rs(a?"common.expand_sidebar":"common.collapse_sidebar"),children:c.jsx(lt,{className:`${a?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-gray-600 dark:text-gray-400`})})]}),c.jsx(D,{children:n.map(k=>E(k))})]})},En=(e,t)=>window.G7Core?.t?.(e,t)??e,f0=({user:e={name:"",email:""},notifications:t=[],onNotificationClick:n,onProfileClick:a,onLogoutClick:r,className:o=""})=>{const[s,i]=m.useState(!1),[l,g]=m.useState(!1),u=m.useRef(null),d=m.useRef(null),f=t.filter(h=>!h.read).length;return m.useEffect(()=>{const h=v=>{u.current&&!u.current.contains(v.target)&&i(!1),d.current&&!d.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),c.jsxs(D,{className:`
bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-6 py-4 flex items-center justify-end gap-4
${o}
`,children:[c.jsxs(_,{ref:u,className:"relative",children:[c.jsxs(re,{onClick:()=>i(!s),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors","aria-label":En("common.notifications"),children:[c.jsx(ne,{name:ue.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),f>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:f>9?"9+":f})]}),s&&c.jsxs(_,{className:"absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsx(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx(Z,{className:"font-semibold text-gray-900 dark:text-white",children:En("common.notifications")})}),c.jsx(_,{className:"max-h-96 overflow-y-auto",children:t.length===0?c.jsx(_,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:c.jsx(Z,{children:En("common.no_notifications")})}):t.map(h=>c.jsx(re,{onClick:()=>{h.onClick?.(),n?.(h.id),i(!1)},className:`
`,children:[c.jsxs(D,{ref:u,className:"relative",children:[c.jsxs(re,{onClick:()=>i(!s),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors","aria-label":En("common.notifications"),children:[c.jsx(ne,{name:ue.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),f>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:f>9?"9+":f})]}),s&&c.jsxs(D,{className:"absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsx(D,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx(Z,{className:"font-semibold text-gray-900 dark:text-white",children:En("common.notifications")})}),c.jsx(D,{className:"max-h-96 overflow-y-auto",children:t.length===0?c.jsx(D,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:c.jsx(Z,{children:En("common.no_notifications")})}):t.map(h=>c.jsx(re,{onClick:()=>{h.onClick?.(),n?.(h.id),i(!1)},className:`
w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 border-b border-gray-100 dark:border-gray-700 transition-colors
${h.read?"":"bg-blue-50 dark:bg-blue-900/20"}
`,children:c.jsxs(_,{className:"flex items-start gap-3",children:[h.iconName&&c.jsx(ne,{name:h.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),c.jsxs(_,{className:"flex-1",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:h.title}),c.jsx(_,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:h.message}),c.jsx(_,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:h.time})]}),!h.read&&c.jsx(Z,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},h.id))})]})]}),c.jsxs(_,{ref:d,className:"relative",children:[c.jsxs(re,{onClick:()=>g(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[e.avatar?c.jsx(or,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(_,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(_,{className:"hidden md:block text-left",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:ue.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&c.jsxs(_,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),c.jsxs(_,{className:"py-2",children:[c.jsxs(re,{onClick:()=>{a?.(),g(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{children:En("common.profile_settings")})]}),c.jsxs(re,{onClick:()=>{r?.(),g(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[c.jsx(ne,{name:ue.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:En("common.logout")})]})]})]})]})]})},g0=({notifications:e=[],unreadCount:t=0,hasMore:n=!1,loading:a=!1,titleText:r="Notifications",emptyText:o="No notifications",markAllReadText:s="Mark all as read",deleteAllText:i="Delete all",unreadOnlyText:l="Unread only",unreadOnly:g=!1,onNotificationClick:u,onClose:d,onLoadMore:f,onMarkAllRead:h,onDeleteAll:v,onDelete:p,onUnreadOnlyToggle:x,dropdownAlign:b="right",className:O=""})=>{const[C,E]=m.useState(!1),N=m.useRef(null),S=m.useRef(null),k=m.useRef(null),y=m.useRef(new Set);m.useEffect(()=>{if(!k.current||!S.current||!n||a||!C)return;const $=new IntersectionObserver(([M])=>{M.isIntersecting&&f?.()},{root:S.current,threshold:.1});return $.observe(k.current),()=>$.disconnect()},[n,a,C,f,e.length]),m.useEffect(()=>{if(!S.current||!C)return;const $=new IntersectionObserver(L=>{L.forEach(U=>{const T=U.target.getAttribute("data-notification-id"),I=U.target.getAttribute("data-unread")==="true";T&&I&&U.isIntersecting&&y.current.add(T)})},{root:S.current,threshold:.5});return S.current.querySelectorAll("[data-notification-id]").forEach(L=>$.observe(L)),()=>$.disconnect()},[C,e]);const w=m.useCallback(()=>{if(C){const $=Array.from(y.current);$.length>0&&d?.($),y.current.clear(),E(!1)}},[C,d]);m.useEffect(()=>{if(!C)return;const $=M=>{N.current&&!N.current.contains(M.target)&&w()};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[C,w]);const A=m.useCallback(()=>{C?w():E(!0)},[C,w]),D=t>0?t:e.filter($=>!$.read).length;return c.jsxs(_,{ref:N,className:`relative ${O}`,children:[c.jsxs(re,{onClick:A,className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":r,children:[c.jsx(ne,{name:ue.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),D>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:D>99?"99+":D})]}),C&&c.jsxs(_,{className:`absolute ${b==="left"?"left-0":"right-0"} mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`,children:[c.jsxs(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between gap-2",children:[c.jsxs(_,{className:"flex items-center gap-3 min-w-0",children:[c.jsx(Z,{className:"font-semibold text-gray-900 dark:text-white",children:r}),x&&c.jsxs(_,{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>x(!g),children:[c.jsx(ft Line truncated
`,children:c.jsxs(D,{className:"flex items-start gap-3",children:[h.iconName&&c.jsx(ne,{name:h.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),c.jsxs(D,{className:"flex-1",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:h.title}),c.jsx(D,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:h.message}),c.jsx(D,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:h.time})]}),!h.read&&c.jsx(Z,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},h.id))})]})]}),c.jsxs(D,{ref:d,className:"relative",children:[c.jsxs(re,{onClick:()=>g(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[e.avatar?c.jsx(or,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(D,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(D,{className:"hidden md:block text-left",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:ue.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&c.jsxs(D,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(D,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),c.jsxs(D,{className:"py-2",children:[c.jsxs(re,{onClick:()=>{a?.(),g(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{children:En("common.profile_settings")})]}),c.jsxs(re,{onClick:()=>{r?.(),g(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[c.jsx(ne,{name:ue.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:En("common.logout")})]})]})]})]})]})},g0=({notifications:e=[],unreadCount:t=0,hasMore:n=!1,loading:a=!1,titleText:r="Notifications",emptyText:o="No notifications",markAllReadText:s="Mark all as read",deleteAllText:i="Delete all",unreadOnlyText:l="Unread only",unreadOnly:g=!1,onNotificationClick:u,onClose:d,onLoadMore:f,onMarkAllRead:h,onDeleteAll:v,onDelete:p,onUnreadOnlyToggle:x,dropdownAlign:b="right",className:O=""})=>{const[C,S]=m.useState(!1),N=m.useRef(null),E=m.useRef(null),k=m.useRef(null),y=m.useRef(null),w=m.useRef(new Set),A=m.useRef(f),_=m.useRef(n),F=m.useRef(a),M=m.useRef(e.length),L=m.useRef(-1);m.useEffect(()=>{A.current=f,_.current=n,F.current=a,M.current=e.length}),m.useEffect(()=>{if(!y.current||!k.current||!C)return;L.current=-1;const H=new IntersectionObserver(([$])=>{$.isIntersecting&&(F.current||!_.current||L.current!==M.current&&(L.current=M.current,A.current?.()))},{root:k.current,threshold:.1});return H.observe(y.current),()=>H.disconnect()},[C]),m.useEffect(()=>{if(!k.current||!C)return;const H=new IntersectionObserver(z=>{z.forEach(G=>{const j=G.target.getAttribute("data-notification-id"),W=G.target.getAttribute("data-unread")==="true";j&&W&&G.isIntersecting&&w.current.add(j)})},{root:k.current,threshold:.5});return k.current.querySelectorAll("[data-notification-id]").forEach(z=>H.observe(z)),()=>H.disconnect()},[C,e]);const U=t>0?t:e.filter(H=>!H.read).length,T=m.useCallback(()=>{if(C){if(U>0){const H=Array.from(w.current).filter($=>{const z=e.find(G=>String(G.id)===String($));return z&&!z.read});H.length>0&&d?.(H)}w.current.clear(),S(!1)}},[C,d,U,e]);m.useEffect(()=>{if(!C)return;const H=$=>{N.current&&!N.current.contains($.target)&&T()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[C,T]);const I=m.useCallback(()=>{C?T():S(!0)},[C,T]);return m.useLayoutEffect(()=>{const H=E.current;if(!C||!H)return;H.style.transform="";const $=H.getBoundingClientRect(),z=typeof window<"u"?window.innerWidth:0;if($.width===0&&$.height===0)return;const G=8;let j=0;$.right>z-G?j=-($.right-(z-G)):$.left<G&&(j=G-$.left),j!==0&&(H.style.transform=`translateX(${j}px)`)},[C,b,e.length]),c.jsxs(D,{ref:N,className:`relative ${O}`,children:[c.jsxs(re,{onClick:I,className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":r,children:[c.jsx(ne,{name:ue.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),U>0&&c.jsx(Z,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h Line truncated
px-3 py-1.5 text-sm font-medium rounded-md transition-colors
${u===x?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
${l?"opacity-50 cursor-not-allowed":""}
`,children:vl(x)},x))})]}):c.jsxs(_,{ref:f,className:`relative ${r}`,children:[c.jsx(re,{onClick:()=>i(!s),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":t,children:c.jsx(ne,{name:ue.Globe,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),s&&c.jsx(_,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsx(_,{className:"py-2",children:e.map(x=>c.jsxs(re,{onClick:()=>p(x),disabled:l,className:`
`,children:vl(x)},x))})]}):c.jsxs(D,{ref:f,className:`relative ${r}`,children:[c.jsx(re,{onClick:()=>i(!s),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":t,children:c.jsx(ne,{name:ue.Globe,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),s&&c.jsx(D,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsx(D,{className:"py-2",children:e.map(x=>c.jsxs(re,{onClick:()=>p(x),disabled:l,className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${u===x?"bg-gray-50 dark:bg-gray-700":""}
${l?"opacity-50 cursor-not-allowed":""}
`,children:[c.jsx(Z,{className:"text-gray-900 dark:text-white flex-1",children:vl(x)}),u===x&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},xl=window.G7Core?.createLogger?.("Comp:UserProfile")??{log:(...e)=>console.log("[Comp:UserProfile]",...e),warn:(...e)=>console.warn("[Comp:UserProfile]",...e),error:(...e)=>console.error("[Comp:UserProfile]",...e)},h0=({user:e={name:"",email:""},profileText:t="Profile Settings",logoutText:n="Logout",languageText:a="Language",availableLocales:r=["ko","en"],onProfileClick:o,onLogoutClick:s,className:i="",logoutEndpoint:l="/api/admin/auth/logout",redirectPath:g="/admin/login"})=>{const[u,d]=m.useState(!1),[f,h]=m.useState(!1),v=m.useRef(null);m.useEffect(()=>{const O=C=>{v.current&&!v.current.contains(C.target)&&d(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]);const p=()=>{const C=`; ${document.cookie}`.split("; XSRF-TOKEN=");return C.length===2?decodeURIComponent(C.pop()?.split(";").shift()||""):null},x=()=>localStorage.getItem("auth_token"),b=async()=>{if(!f)try{if(h(!0),d(!1),s){s();return}const O=p(),C=x(),E=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...O&&{"X-XSRF-TOKEN":O},...C&&{Authorization:`Bearer ${C}`}},credentials:"include"});E.ok?(localStorage.removeItem("auth_token"),window.location.href=g):(xl.error("로그아웃 실패:",E.statusText),localStorage.removeItem("auth_token"),window.location.href=g)}catch(O){xl.error("로그아웃 오류:",O),localStorage.removeItem("auth_token"),window.location.href=g}finally{h(!1)}};return c.jsxs(_,{ref:v,className:`relative ${i}`,children:[c.jsxs(re,{onClick:()=>d(!u),className:"flex items-center gap-2 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors w-full",children:[e.avatar?c.jsx(or,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(_,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(_,{className:"flex-1 text-left",children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:ue.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),u&&c.jsxs(_,{className:"absolute bottom-full left-0 mb-2 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(_,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",onClick:()=>{d(!1),window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}`}})},children:[c.jsx(_,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(_,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),r.length>1&&c.jsx(_,{className:"border-b border-gray-200 dark:border-gray-700",children:c.jsx(yl,{availableLocales:r,languageText:a,inline:!0,onLanguageChange:()=>d(!1)})}),c.jsxs(_,{className:"py-2",children:[c.jsxs(re,{onClick:()=>{d(!1),o?o():window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}/edit`}})},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 transition-colors",children:[c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:t})]}),c.jsxs(re,{onClick:b,disabled:f,className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 text-red-600 dark:text-red-400 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c.jsx(ne,{name:ue.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:f?"Logging out...":n})]})]})]})]})},p0=({copyright:e="© 2026 G7",version:t,quickLinks:n=[],className:a="",changelogModalId:r,copyrightModalId:o})=>{const s=m.useCallback(()=>{r&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:r}],onError:[{handler:"openModal",target:r}]}]})},[r]),i=m.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return c.jsx(_,{className:`
`,children:[c.jsx(Z,{className:"text-gray-900 dark:text-white flex-1",children:vl(x)}),u===x&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},xl=window.G7Core?.createLogger?.("Comp:UserProfile")??{log:(...e)=>console.log("[Comp:UserProfile]",...e),warn:(...e)=>console.warn("[Comp:UserProfile]",...e),error:(...e)=>console.error("[Comp:UserProfile]",...e)},h0=({user:e={name:"",email:""},profileText:t="Profile Settings",logoutText:n="Logout",languageText:a="Language",availableLocales:r=["ko","en"],onProfileClick:o,onLogoutClick:s,className:i="",logoutEndpoint:l="/api/admin/auth/logout",redirectPath:g="/admin/login"})=>{const[u,d]=m.useState(!1),[f,h]=m.useState(!1),v=m.useRef(null);m.useEffect(()=>{const O=C=>{v.current&&!v.current.contains(C.target)&&d(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]);const p=()=>{const C=`; ${document.cookie}`.split("; XSRF-TOKEN=");return C.length===2?decodeURIComponent(C.pop()?.split(";").shift()||""):null},x=()=>localStorage.getItem("auth_token"),b=async()=>{if(!f)try{if(h(!0),d(!1),s){s();return}const O=p(),C=x(),S=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...O&&{"X-XSRF-TOKEN":O},...C&&{Authorization:`Bearer ${C}`}},credentials:"include"});S.ok?(localStorage.removeItem("auth_token"),window.location.href=g):(xl.error("로그아웃 실패:",S.statusText),localStorage.removeItem("auth_token"),window.location.href=g)}catch(O){xl.error("로그아웃 오류:",O),localStorage.removeItem("auth_token"),window.location.href=g}finally{h(!1)}};return c.jsxs(D,{ref:v,className:`relative ${i}`,children:[c.jsxs(re,{onClick:()=>d(!u),className:"flex items-center gap-2 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors w-full",children:[e.avatar?c.jsx(or,{src:e.avatar,alt:e.name,className:"w-8 h-8 rounded-full object-cover"}):c.jsx(D,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),c.jsxs(D,{className:"flex-1 text-left",children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:e.name}),e.role&&c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-xs",children:e.role})]}),c.jsx(ne,{name:ue.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),u&&c.jsxs(D,{className:"absolute bottom-full left-0 mb-2 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[c.jsxs(D,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",onClick:()=>{d(!1),window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}`}})},children:[c.jsx(D,{className:"font-semibold text-gray-900 dark:text-white",children:e.name}),c.jsx(D,{className:"text-gray-500 dark:text-gray-400 text-sm",children:e.email})]}),r.length>1&&c.jsx(D,{className:"border-b border-gray-200 dark:border-gray-700",children:c.jsx(yl,{availableLocales:r,languageText:a,inline:!0,onLanguageChange:()=>d(!1)})}),c.jsxs(D,{className:"py-2",children:[c.jsxs(re,{onClick:()=>{d(!1),o?o():window.G7Core?.dispatch({handler:"navigate",params:{path:`/admin/users/${e.uuid}/edit`}})},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 transition-colors",children:[c.jsx(ne,{name:ue.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:t})]}),c.jsxs(re,{onClick:b,disabled:f,className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-start gap-3 text-red-600 dark:text-red-400 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c.jsx(ne,{name:ue.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:f?"Logging out...":n})]})]})]})]})},p0=({copyright:e="© 2026 G7",version:t,quickLinks:n=[],className:a="",changelogModalId:r,copyrightModalId:o})=>{const s=m.useCallback(()=>{r&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:r}],onError:[{handler:"openModal",target:r}]}]})},[r]),i=m.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return c.jsx(D,{className:`
bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 px-6 py-4
${a}
`,children:c.jsxs(_,{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[c.jsxs(_,{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[c.jsx(Z,{className:o?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":"",onClick:o?i:void 0,children:e}),t&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:"•"}),c.jsxs(Z,{className:`flex items-center gap-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":""}`,onClick:r?s:void 0,children:[c.jsx(ne,{name:ue.Tag,className:"w-4 h-4"}),c.jsxs(Z,{children:["v",t]})]})]})]}),n.length>0&&c.jsx(_,{className:"flex items-center gap-4",children:n.map(l=>c.jsxs(jr,{href:l.url,className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4"}),c.jsx(Z,{children:l.label})]},l.id))})]})})},b0=({title:e,description:t,breadcrumbItems:n,tabs:a,onTabChange:r,actions:o,className:s="",children:i})=>{const l=(g="secondary")=>`px-4 py-2 rounded-lg font-medium transition-colors flex items-center gap-2 ${{primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800"}[g]}`;return c.jsxs(_,{className:s,children:[n&&n.length>0&&c.jsx(_,{className:"mb-4",children:c.jsx(bl,{items:n})}),c.jsxs(_,{className:"flex items-center justify-between mb-6",children:[c.jsxs(_,{children:[c.jsx(Io,{className:"text-xl sm:text-2xl font-semibold text-gray-900 dark:text-white",children:e}),t&&c.jsx(dt,{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t})]}),i?c.jsx(_,{className:"flex items-center gap-2",children:i}):o&&o.length>0?c.jsx(_,{className:"flex items-center gap-2",children:o.map(g=>c.jsxs(re,{onClick:g.onClick,disabled:g.disabled,className:l(g.variant),children:[g.iconName&&c.jsx(ne,{name:g.iconName,className:"w-5 h-5"}),g.variant!=="ghost"&&g.label&&c.jsx(_,{children:g.label})]},g.id))}):null]}),a&&a.length>0&&c.jsx(_,{className:"flex gap-6 border-b border-gray-200 dark:border-gray-700 mb-6",children:a.map(g=>c.jsxs(re,{onClick:()=>r?.(g.value),className:`
`,children:c.jsxs(D,{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[c.jsxs(D,{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[c.jsx(Z,{className:o?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":"",onClick:o?i:void 0,children:e}),t&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{className:"hidden md:inline",children:"•"}),c.jsxs(Z,{className:`flex items-center gap-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400 transition-colors":""}`,onClick:r?s:void 0,children:[c.jsx(ne,{name:ue.Tag,className:"w-4 h-4"}),c.jsxs(Z,{children:["v",t]})]})]})]}),n.length>0&&c.jsx(D,{className:"flex items-center gap-4",children:n.map(l=>c.jsxs(jr,{href:l.url,className:"flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",children:[l.iconName&&c.jsx(ne,{name:l.iconName,className:"w-4 h-4"}),c.jsx(Z,{children:l.label})]},l.id))})]})})},b0=({title:e,description:t,breadcrumbItems:n,tabs:a,onTabChange:r,actions:o,className:s="",children:i})=>{const l=(g="secondary")=>`px-4 py-2 rounded-lg font-medium transition-colors flex items-center gap-2 ${{primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600",danger:"bg-red-600 text-white hover:bg-red-700",ghost:"p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800"}[g]}`;return c.jsxs(D,{className:s,children:[n&&n.length>0&&c.jsx(D,{className:"mb-4",children:c.jsx(bl,{items:n})}),c.jsxs(D,{className:"flex items-center justify-between mb-6",children:[c.jsxs(D,{children:[c.jsx(Io,{className:"text-xl sm:text-2xl font-semibold text-gray-900 dark:text-white",children:e}),t&&c.jsx(dt,{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t})]}),i?c.jsx(D,{className:"flex items-center gap-2",children:i}):o&&o.length>0?c.jsx(D,{className:"flex items-center gap-2",children:o.map(g=>c.jsxs(re,{onClick:g.onClick,disabled:g.disabled,className:l(g.variant),children:[g.iconName&&c.jsx(ne,{name:g.iconName,className:"w-5 h-5"}),g.variant!=="ghost"&&g.label&&c.jsx(D,{children:g.label})]},g.id))}):null]}),a&&a.length>0&&c.jsx(D,{className:"flex gap-6 border-b border-gray-200 dark:border-gray-700 mb-6",children:a.map(g=>c.jsxs(re,{onClick:()=>r?.(g.value),className:`
px-1 py-3 border-b-2 transition-colors font-medium flex items-center gap-2 -mb-px
${g.active?"border-blue-600 text-blue-600 dark:text-blue-400":"border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200"}
`,children:[c.jsx(_,{children:g.label}),g.badge!==void 0&&c.jsx(_,{className:`
`,children:[c.jsx(D,{children:g.label}),g.badge!==void 0&&c.jsx(D,{className:`
px-2 py-0.5 rounded-full text-xs font-semibold
${g.active?"bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400"}
`,children:g.badge})]},g.id))})]})},xr=(e,t)=>window.G7Core?.t?.(e,t)??e,m0=({image:e,imageAlt:t,vendor:n,name:a,version:r,status:o,updateAvailable:s=!1,latestVersion:i,dependencies:l=[],showLayoutEditButton:g=!1,actions:u=[],onLayoutEditClick:d,className:f=""})=>{const h=p=>({active:"success",inactive:"default",pending:"pending",error:"error"})[p],v=p=>({active:xr("common.status_active"),inactive:xr("common.status_inactive"),pending:xr("common.status_pending"),error:xr("common.status_error")})[p];return c.jsxs(_,{className:`
`,children:g.badge})]},g.id))})]})},xr=(e,t)=>window.G7Core?.t?.(e,t)??e,m0=({image:e,imageAlt:t,vendor:n,name:a,version:r,status:o,updateAvailable:s=!1,latestVersion:i,dependencies:l=[],showLayoutEditButton:g=!1,actions:u=[],onLayoutEditClick:d,className:f=""})=>{const h=p=>({active:"success",inactive:"default",pending:"pending",error:"error"})[p],v=p=>({active:xr("common.status_active"),inactive:xr("common.status_inactive"),pending:xr("common.status_pending"),error:xr("common.status_error")})[p];return c.jsxs(D,{className:`
bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden hover:shadow-lg transition-shadow
${f}
`,children:[e&&c.jsxs(_,{className:"relative",children:[c.jsx(or,{src:e,alt:t||xr("common.template_preview",{vendor:n,name:a}),className:"w-full h-48 object-cover"}),c.jsx(_,{className:"absolute top-3 right-3",children:c.jsx(fa,{status:h(o),label:v(o),showIcon:!0})}),s&&c.jsx(_,{className:"absolute top-3 left-3",children:c.jsxs(Z,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[c.jsx(ne,{name:ue.ExclamationTriangle,className:"w-3 h-3"}),c.jsx(Z,{children:xr("common.update_available")})]})})]}),c.jsxs(_,{className:"p-4",children:[c.jsxs(_,{className:"flex items-start justify-between mb-3",children:[c.jsxs(_,{className:"flex-1",children:[c.jsxs(Hr,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",a]}),c.jsxs(_,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[c.jsxs(Z,{children:["v",r]}),s&&i&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{children:"→"}),c.jsxs(Z,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",i]})]})]}),!e&&c.jsx(_,{className:"mt-2",children:c.jsx(fa,{status:h(o),label:v(o),showIcon:!0})})]}),u.length>0&&c.jsx(mn,{items:u,triggerIconName:ue.EllipsisVertical,position:"left"})]}),l.length>0&&c.jsxs(_,{className:"mb-3",children:[c.jsxs(dt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[xr("common.dependencies"),":"]}),c.jsx(_,{className:"flex flex-wrap gap-1",children:l.map((p,x)=>c.jsx(Z,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:p},x))})]}),g&&d&&c.jsxs(re,{onClick:d,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[c.jsx(ne,{name:ue.Edit,className:"w-4 h-4"}),c.jsx(Z,{children:xr("common.edit_layout")})]})]})]})},wl=({type:e,message:t,dismissible:n=!1,onDismiss:a,className:r=""})=>{const s={info:{bgColor:"bg-blue-100 dark:bg-blue-900",borderColor:"border-blue-400 dark:border-blue-600",textColor:"text-blue-800 dark:text-blue-200",iconColor:"text-blue-600 dark:text-blue-400",icon:ue.InfoCircle},success:{bgColor:"bg-green-100 dark:bg-green-900",borderColor:"border-green-400 dark:border-green-600",textColor:"text-green-800 dark:text-green-200",iconColor:"text-green-600 dark:text-green-400",icon:ue.CheckCircle},warning:{bgColor:"bg-yellow-100 dark:bg-yellow-900",borderColor:"border-yellow-400 dark:border-yellow-600",textColor:"text-yellow-800 dark:text-yellow-200",iconColor:"text-yellow-600 dark:text-yellow-400",icon:ue.ExclamationTriangle},error:{bgColor:"bg-red-100 dark:bg-red-900",borderColor:"border-red-400 dark:border-red-600",textColor:"text-red-800 dark:text-red-200",iconColor:"text-red-600 dark:text-red-400",icon:ue.TimesCircle}}[e],i=`
`,children:[e&&c.jsxs(D,{className:"relative",children:[c.jsx(or,{src:e,alt:t||xr("common.template_preview",{vendor:n,name:a}),className:"w-full h-48 object-cover"}),c.jsx(D,{className:"absolute top-3 right-3",children:c.jsx(fa,{status:h(o),label:v(o),showIcon:!0})}),s&&c.jsx(D,{className:"absolute top-3 left-3",children:c.jsxs(Z,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[c.jsx(ne,{name:ue.ExclamationTriangle,className:"w-3 h-3"}),c.jsx(Z,{children:xr("common.update_available")})]})})]}),c.jsxs(D,{className:"p-4",children:[c.jsxs(D,{className:"flex items-start justify-between mb-3",children:[c.jsxs(D,{className:"flex-1",children:[c.jsxs(Hr,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",a]}),c.jsxs(D,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[c.jsxs(Z,{children:["v",r]}),s&&i&&c.jsxs(c.Fragment,{children:[c.jsx(Z,{children:"→"}),c.jsxs(Z,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",i]})]})]}),!e&&c.jsx(D,{className:"mt-2",children:c.jsx(fa,{status:h(o),label:v(o),showIcon:!0})})]}),u.length>0&&c.jsx(mn,{items:u,triggerIconName:ue.EllipsisVertical,position:"left"})]}),l.length>0&&c.jsxs(D,{className:"mb-3",children:[c.jsxs(dt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[xr("common.dependencies"),":"]}),c.jsx(D,{className:"flex flex-wrap gap-1",children:l.map((p,x)=>c.jsx(Z,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:p},x))})]}),g&&d&&c.jsxs(re,{onClick:d,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[c.jsx(ne,{name:ue.Edit,className:"w-4 h-4"}),c.jsx(Z,{children:xr("common.edit_layout")})]})]})]})},wl=({type:e,message:t,dismissible:n=!1,onDismiss:a,className:r=""})=>{const s={info:{bgColor:"bg-blue-100 dark:bg-blue-900",borderColor:"border-blue-400 dark:border-blue-600",textColor:"text-blue-800 dark:text-blue-200",iconColor:"text-blue-600 dark:text-blue-400",icon:ue.InfoCircle},success:{bgColor:"bg-green-100 dark:bg-green-900",borderColor:"border-green-400 dark:border-green-600",textColor:"text-green-800 dark:text-green-200",iconColor:"text-green-600 dark:text-green-400",icon:ue.CheckCircle},warning:{bgColor:"bg-yellow-100 dark:bg-yellow-900",borderColor:"border-yellow-400 dark:border-yellow-600",textColor:"text-yellow-800 dark:text-yellow-200",iconColor:"text-yellow-600 dark:text-yellow-400",icon:ue.ExclamationTriangle},error:{bgColor:"bg-red-100 dark:bg-red-900",borderColor:"border-red-400 dark:border-red-600",textColor:"text-red-800 dark:text-red-200",iconColor:"text-red-600 dark:text-red-400",icon:ue.TimesCircle}}[e],i=`
flex items-start gap-3 p-4 rounded-lg border
${s.bgColor}
${s.borderColor}
${r}
`.trim().replace(/\s+/g," ");return c.jsxs(_,{className:i,role:"alert","aria-live":"polite",children:[c.jsx(ne,{name:s.icon,className:`${s.iconColor} flex-shrink-0 mt-0.5`,ariaLabel:`${e} icon`}),c.jsx(dt,{className:`flex-1 ${s.textColor} text-sm`,children:t}),n&&c.jsx(re,{onClick:a,className:`${s.textColor} hover:opacity-70 flex-shrink-0 bg-transparent border-0 p-0 cursor-pointer`,"aria-label":"Close alert",children:c.jsx(ne,{name:ue.Times,className:s.iconColor,ariaLabel:"Close"})})]})},v0=({layoutName:e,onBack:t,onPreview:n,onSave:a,isSaving:r=!1,className:o=""})=>{const s=`
`.trim().replace(/\s+/g," ");return c.jsxs(D,{className:i,role:"alert","aria-live":"polite",children:[c.jsx(ne,{name:s.icon,className:`${s.iconColor} flex-shrink-0 mt-0.5`,ariaLabel:`${e} icon`}),c.jsx(dt,{className:`flex-1 ${s.textColor} text-sm`,children:t}),n&&c.jsx(re,{onClick:a,className:`${s.textColor} hover:opacity-70 flex-shrink-0 bg-transparent border-0 p-0 cursor-pointer`,"aria-label":"Close alert",children:c.jsx(ne,{name:ue.Times,className:s.iconColor,ariaLabel:"Close"})})]})},v0=({layoutName:e,onBack:t,onPreview:n,onSave:a,isSaving:r=!1,className:o=""})=>{const s=`
flex items-center justify-between gap-4 p-4 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700
${o}
`.trim().replace(/\s+/g," ");return c.jsxs(_,{className:s,children:[c.jsxs(_,{className:"flex items-center gap-3",children:[c.jsx(re,{onClick:t,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors bg-transparent border-0 cursor-pointer","aria-label":"뒤로가기",children:c.jsx(ne,{name:ue.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:e})]}),c.jsxs(_,{className:"flex items-center gap-2",children:[c.jsx(re,{onClick:n,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors border-0 cursor-pointer","aria-label":"미리보기",children:c.jsxs(_,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:ue.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),c.jsx("span",{children:"미리보기"})]})}),c.jsx(re,{onClick:a,disabled:r,className:`
`.trim().replace(/\s+/g," ");return c.jsxs(D,{className:s,children:[c.jsxs(D,{className:"flex items-center gap-3",children:[c.jsx(re,{onClick:t,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors bg-transparent border-0 cursor-pointer","aria-label":"뒤로가기",children:c.jsx(ne,{name:ue.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),c.jsx(Er,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:e})]}),c.jsxs(D,{className:"flex items-center gap-2",children:[c.jsx(re,{onClick:n,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors border-0 cursor-pointer","aria-label":"미리보기",children:c.jsxs(D,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:ue.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),c.jsx("span",{children:"미리보기"})]})}),c.jsx(re,{onClick:a,disabled:r,className:`
px-4 py-2 rounded-lg transition-colors border-0 cursor-pointer
${r?"bg-blue-400 dark:bg-blue-600 cursor-not-allowed":"bg-blue-600 dark:bg-blue-500 hover:bg-blue-700 dark:hover:bg-blue-600"}
text-white
`.trim().replace(/\s+/g," "),"aria-label":r?"저장 중...":"저장",children:c.jsxs(_,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:r?ue.Spinner:ue.Save,className:`text-white ${r?"animate-spin":""}`,ariaLabel:r?"저장 중 아이콘":"저장 아이콘"}),c.jsx("span",{children:r?"저장 중...":"저장"})]})})]})]})},y0=({files:e,selectedId:t,onSelect:n,className:a=""})=>{const r=i=>{try{const l=new Date(i);if(isNaN(l.getTime()))return i;const g=l.getFullYear(),u=String(l.getMonth()+1).padStart(2,"0"),d=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),h=String(l.getMinutes()).padStart(2,"0");return`${g}-${u}-${d} ${f}:${h}`}catch{return i}},o=i=>{n(i)},s=`
`.trim().replace(/\s+/g," "),"aria-label":r?"저장 중...":"저장",children:c.jsxs(D,{className:"flex items-center gap-2",children:[c.jsx(ne,{name:r?ue.Spinner:ue.Save,className:`text-white ${r?"animate-spin":""}`,ariaLabel:r?"저장 중 아이콘":"저장 아이콘"}),c.jsx("span",{children:r?"저장 중...":"저장"})]})})]})]})},y0=({files:e,selectedId:t,onSelect:n,className:a=""})=>{const r=i=>{try{const l=new Date(i);if(isNaN(l.getTime()))return i;const g=l.getFullYear(),u=String(l.getMonth()+1).padStart(2,"0"),d=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),h=String(l.getMinutes()).padStart(2,"0");return`${g}-${u}-${d} ${f}:${h}`}catch{return i}},o=i=>{n(i)},s=`
w-full
${a}
`.trim().replace(/\s+/g," ");return c.jsx(_,{className:s,children:e.length===0?c.jsx(_,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):c.jsx(Ao,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:e.map(i=>{const l=i.id===t,g=`
`.trim().replace(/\s+/g," ");return c.jsx(D,{className:s,children:e.length===0?c.jsx(D,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):c.jsx(Ao,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:e.map(i=>{const l=i.id===t,g=`
flex items-center justify-between p-4 cursor-pointer
transition-colors duration-150
${l?"bg-blue-100 dark:bg-blue-900 border-l-4 border-blue-500":"hover:bg-gray-100 dark:hover:bg-gray-800"}
@@ -146,7 +146,7 @@ var SirsoftAdminBasic=(function(Q,c,m,ar){"use strict";function Jf(e){const t=Ob
`.trim().replace(/\s+/g," "),d=`
text-sm
${l?"text-blue-700 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}
`.trim().replace(/\s+/g," ");return c.jsx(Lo,{className:g,onClick:()=>o(i.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(i.id))},children:c.jsxs(_,{className:"flex flex-col gap-1",children:[c.jsx(Z,{className:u,children:i.name}),c.jsx(Z,{className:d,children:r(i.updated_at)})]})},i.id)})})})};function kl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function x0(e){if(Array.isArray(e))return e}function w0(e,t,n){return(t=T0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,i=[],l=!0,g=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(u){g=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(g)throw r}}return i}}function C0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
`.trim().replace(/\s+/g," ");return c.jsx(Lo,{className:g,onClick:()=>o(i.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(i.id))},children:c.jsxs(D,{className:"flex flex-col gap-1",children:[c.jsx(Z,{className:u,children:i.name}),c.jsx(Z,{className:d,children:r(i.updated_at)})]})},i.id)})})})};function kl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function x0(e){if(Array.isArray(e))return e}function w0(e,t,n){return(t=T0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,i=[],l=!0,g=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(u){g=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(g)throw r}}return i}}function C0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Sl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(n),!0).forEach(function(a){w0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function S0(e,t){if(e==null)return{};var n,a,r=E0(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E0(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function N0(e,t){return x0(e)||k0(e,t)||M0(e,t)||C0()}function O0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T0(e){var t=O0(e,"string");return typeof t=="symbol"?t:t+""}function M0(e,t){if(e){if(typeof e=="string")return kl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kl(e,t):void 0}}function I0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function El(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?El(Object(n),!0).forEach(function(a){I0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function A0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){return t.reduceRight(function(r,o){return o(r)},a)}}function Nn(e){return function t(){for(var n=this,a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return t.apply(n,[].concat(r,i))}}}function ya(e){return{}.toString.call(e).includes("Object")}function L0(e){return!Object.keys(e).length}function On(e){return typeof e=="function"}function D0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _0(e,t){return ya(t)||wr("changeType"),Object.keys(t).some(function(n){return!D0(e,n)})&&wr("changeField"),t}function P0(e){On(e)||wr("selectorType")}function $0(e){On(e)||ya(e)||wr("handlerType"),ya(e)&&Object.values(e).some(function(t){return!On(t)})&&wr("handlersType")}function F0(e){e||wr("initialIsRequired"),ya(e)||wr("initialType"),L0(e)&&wr("initialContent")}function U0(e,t){throw new Error(e[t]||e.default)}var V0={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},wr=Nn(U0)(V0),xa={changes:_0,selector:P0,handler:$0,initial:F0};function H0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xa.initial(e),xa.handler(t);var n={current:e},a=Nn(G0)(n,t),r=Nn(z0)(n),o=Nn(xa.changes)(e),s=Nn(j0)(n);function i(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return xa.selector(g),g(n.current)}function l(g){A0(a,r,o,s)(g)}return[i,l]}function j0(e,t){return On(t)?t(e.current):t}function z0(e,t){return e.current=Nl(Nl({},e.current),t),t}function G0(e,t,n){return On(t)?t(e.current):Object.keys(n).forEach(function(a){var r;return(r=t[a])===null||r===void 0?void 0:r.call(t,e.current[a])}),n}var B0={create:H0},W0={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function Y0(e){return function t(){for(var n=this,a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,i=new Array(s),l=0;l<s;l++)i[l]=arguments[l]; Line truncated
You are using deprecated way of configuration.
@@ -156,28 +156,28 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
monaco.config({ paths: { vs: '...' } })
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
`},Tl=Y0(Z0)(Ol),Q0={config:K0},J0=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return function(r){return n.reduceRight(function(o,s){return s(o)},r)}};function Ml(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Ml(e[n],t[n]))}),Sl(Sl({},e),t)}var R0={type:"cancelation",msg:"operation is manually canceled"};function ns(e){var t=!1,n=new Promise(function(a,r){e.then(function(o){return t?r(R0):a(o)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var eh=["monaco"],th=B0.create({config:W0,isInitialized:!1,resolve:null,reject:null,monaco:null}),Il=N0(th,2),Tn=Il[0],wa=Il[1];function rh(e){var t=Q0.config(e),n=t.monaco,a=S0(t,eh);wa(function(r){return{config:Ml(r.config,a),monaco:n}})}function nh(){var e=Tn(function(t){var n=t.monaco,a=t.isInitialized,r=t.resolve;return{monaco:n,isInitialized:a,resolve:r}});if(!e.isInitialized){if(wa({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ns(as);if(window.monaco&&window.monaco.editor)return Al(window.monaco),e.resolve(window.monaco),ns(as);J0(ah,sh)(ih)}return ns(as)}function ah(e){return document.body.appendChild(e)}function oh(e){var t=document.createElement("script");return e&&(t.src=e),t}function sh(e){var t=Tn(function(a){var r=a.config,o=a.reject;return{config:r,reject:o}}),n=oh("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function ih(){var e=Tn(function(n){var a=n.config,r=n.resolve,o=n.reject;return{config:a,resolve:r,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var a=n.m;Al(a),e.resolve(a)},function(n){e.reject(n)})}function Al(e){Tn().monaco||wa({monaco:e})}function lh(){return Tn(function(e){var t=e.monaco;return t})}var as=new Promise(function(e,t){return wa({resolve:e,reject:t})}),Ll={config:rh,init:nh,__getMonacoInstance:lh},ch={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},os=ch,uh={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dh=uh;function fh({children:e}){return m.createElement("div",{style:dh.container},e)}var gh=fh,hh=gh;function ph({width:e,height:t,isEditorReady:n,loading:a,_ref:r,className:o,wrapperProps:s}){return m.createElement("section",{style:{...os.wrapper,width:e,height:t},...s},!n&&m.createElement(hh,null,a),m.createElement("div",{ref:r,style:{...os.fullWidth,...!n&&os.hide},className:o}))}var bh=ph,Dl=m.memo(bh);function mh(e){m.useEffect(e,[])}var _l=mh;function vh(e,t,n=!0){let a=m.useRef(!0);m.useEffect(a.current||!n?()=>{a.current=!1}:e,t)}var Vt=vh;function Mn(){}function Yr(e,t,n,a){return yh(e,a)||xh(e,t,n,a)}function yh(e,t){return e.editor.getModel(Pl(e,t))}function xh(e,t,n,a){return e.editor.createModel(t,n,a?Pl(e,a):void 0)}function Pl(e,t){return e.Uri.parse(t)}function wh({original:e,modified:t,language:n,originalLanguage:a,modifiedLanguage:r,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:i=!1,keepCurrentModifiedModel:l=!1,theme:g="light",loading:u="Loading...",options:d={},height:f="100%",width:h="100%",className:v,wrapperProps:p={},beforeMount:x=Mn,onMount:b=Mn}){let[O,C]=m.useState(!1),[E,N]=m.useState(!0),S=m.useRef(null),k=m.useRef(null),y=m.useRef(null),w=m.useRef(b),A=m.useRef(x),D=m.useRef(!1);_l(()=>{let U=Ll.init();return U.then(T=>(k.current=T)&&N(!1)).catch(T=>T?.type!=="cancelation"&&console.error("Monaco initialization: error:",T)),()=>S.current?L():U.cancel()}),Vt(()=>{if(S.current&&k.current){let U=S.current.getOriginalEditor(),T=Yr(k.current,e||"",a||n||"text",o||"");T!==U.getModel()&&U.setModel(T)}},[o],O),Vt(()=>{if(S.current&&k.current){let U=S.current.getModifiedEditor(),T=Yr(k.current,t||"",r||n||"text",s||"");T!==U.getModel()&&U.setModel(T)}},[s],O),Vt(()=>{let U=S.current.getModifiedEditor();U.getOption(k.current.editor.EditorOption.readOnly)?U.setValue(t||""):t!==U.getValue()&&(U.executeEdits("",[{range:U.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),U.pushUndoStop())},[t],O),Vt(()=>{S.current?.getModel()?.original.setValue(e||"")},[e],O),Vt(()=>{let{original:U,modified:T}=S.current.getModel();k.current.editor.setModelLanguage(U,a||n||"text"),k.current.editor.setModelLanguage(T,r||n||"text")},[n,a,r],O),Vt(()=>{k.current?.editor.setTheme(g)},[g],O),Vt(()=>{S.current?.updateOptions(d)},[d],O);let $=m.useCallback(()=>{if(!k.current)return;A.current(k.current);let U=Yr(k.current,e||"",a||n||"text",o||""),T=Yr(k.current,t||"",r||n||"text",s||"");S.current?.setModel({original:U,modified:T})},[n,t,r,e,a,o,s]),M=m.useCallback(()=>{!D.current&&y.current&&(S.current=k.current.editor.createDiffEditor(y.current,{automaticLayout:!0,...d}),$(),k.current?.editor.setTheme(g),C(!0),D.current=!0)},[d,g,$]);m.useEffect(()=>{O&&w.current(S.current,k.current)},[O]),m.useEffect(()=>{!E&&!O&&M()},[E,O,M]);function L(){let U=S.current?.getModel();i||U?.original?.disp Line truncated
`},Tl=Y0(Z0)(Ol),Q0={config:K0},J0=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return function(r){return n.reduceRight(function(o,s){return s(o)},r)}};function Ml(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Ml(e[n],t[n]))}),Sl(Sl({},e),t)}var R0={type:"cancelation",msg:"operation is manually canceled"};function ns(e){var t=!1,n=new Promise(function(a,r){e.then(function(o){return t?r(R0):a(o)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var eh=["monaco"],th=B0.create({config:W0,isInitialized:!1,resolve:null,reject:null,monaco:null}),Il=N0(th,2),Tn=Il[0],wa=Il[1];function rh(e){var t=Q0.config(e),n=t.monaco,a=S0(t,eh);wa(function(r){return{config:Ml(r.config,a),monaco:n}})}function nh(){var e=Tn(function(t){var n=t.monaco,a=t.isInitialized,r=t.resolve;return{monaco:n,isInitialized:a,resolve:r}});if(!e.isInitialized){if(wa({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ns(as);if(window.monaco&&window.monaco.editor)return Al(window.monaco),e.resolve(window.monaco),ns(as);J0(ah,sh)(ih)}return ns(as)}function ah(e){return document.body.appendChild(e)}function oh(e){var t=document.createElement("script");return e&&(t.src=e),t}function sh(e){var t=Tn(function(a){var r=a.config,o=a.reject;return{config:r,reject:o}}),n=oh("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function ih(){var e=Tn(function(n){var a=n.config,r=n.resolve,o=n.reject;return{config:a,resolve:r,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var a=n.m;Al(a),e.resolve(a)},function(n){e.reject(n)})}function Al(e){Tn().monaco||wa({monaco:e})}function lh(){return Tn(function(e){var t=e.monaco;return t})}var as=new Promise(function(e,t){return wa({resolve:e,reject:t})}),Ll={config:rh,init:nh,__getMonacoInstance:lh},ch={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},os=ch,uh={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dh=uh;function fh({children:e}){return m.createElement("div",{style:dh.container},e)}var gh=fh,hh=gh;function ph({width:e,height:t,isEditorReady:n,loading:a,_ref:r,className:o,wrapperProps:s}){return m.createElement("section",{style:{...os.wrapper,width:e,height:t},...s},!n&&m.createElement(hh,null,a),m.createElement("div",{ref:r,style:{...os.fullWidth,...!n&&os.hide},className:o}))}var bh=ph,Dl=m.memo(bh);function mh(e){m.useEffect(e,[])}var _l=mh;function vh(e,t,n=!0){let a=m.useRef(!0);m.useEffect(a.current||!n?()=>{a.current=!1}:e,t)}var Vt=vh;function Mn(){}function Yr(e,t,n,a){return yh(e,a)||xh(e,t,n,a)}function yh(e,t){return e.editor.getModel(Pl(e,t))}function xh(e,t,n,a){return e.editor.createModel(t,n,a?Pl(e,a):void 0)}function Pl(e,t){return e.Uri.parse(t)}function wh({original:e,modified:t,language:n,originalLanguage:a,modifiedLanguage:r,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:i=!1,keepCurrentModifiedModel:l=!1,theme:g="light",loading:u="Loading...",options:d={},height:f="100%",width:h="100%",className:v,wrapperProps:p={},beforeMount:x=Mn,onMount:b=Mn}){let[O,C]=m.useState(!1),[S,N]=m.useState(!0),E=m.useRef(null),k=m.useRef(null),y=m.useRef(null),w=m.useRef(b),A=m.useRef(x),_=m.useRef(!1);_l(()=>{let U=Ll.init();return U.then(T=>(k.current=T)&&N(!1)).catch(T=>T?.type!=="cancelation"&&console.error("Monaco initialization: error:",T)),()=>E.current?L():U.cancel()}),Vt(()=>{if(E.current&&k.current){let U=E.current.getOriginalEditor(),T=Yr(k.current,e||"",a||n||"text",o||"");T!==U.getModel()&&U.setModel(T)}},[o],O),Vt(()=>{if(E.current&&k.current){let U=E.current.getModifiedEditor(),T=Yr(k.current,t||"",r||n||"text",s||"");T!==U.getModel()&&U.setModel(T)}},[s],O),Vt(()=>{let U=E.current.getModifiedEditor();U.getOption(k.current.editor.EditorOption.readOnly)?U.setValue(t||""):t!==U.getValue()&&(U.executeEdits("",[{range:U.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),U.pushUndoStop())},[t],O),Vt(()=>{E.current?.getModel()?.original.setValue(e||"")},[e],O),Vt(()=>{let{original:U,modified:T}=E.current.getModel();k.current.editor.setModelLanguage(U,a||n||"text"),k.current.editor.setModelLanguage(T,r||n||"text")},[n,a,r],O),Vt(()=>{k.current?.editor.setTheme(g)},[g],O),Vt(()=>{E.current?.updateOptions(d)},[d],O);let F=m.useCallback(()=>{if(!k.current)return;A.current(k.current);let U=Yr(k.current,e||"",a||n||"text",o||""),T=Yr(k.current,t||"",r||n||"text",s||"");E.current?.setModel({original:U,modified:T})},[n,t,r,e,a,o,s]),M=m.useCallback(()=>{!_.current&&y.current&&(E.current=k.current.editor.createDiffEditor(y.current,{automaticLayout:!0,...d}),F(),k.current?.editor.setTheme(g),C(!0),_.current=!0)},[d,g,F]);m.useEffect(()=>{O&&w.current(E.current,k.current)},[O]),m.useEffect(()=>{!S&&!O&&M()},[S,O,M]);function L(){let U=E.current?.getModel();i||U?.original?.disp Line truncated
p-3 rounded-lg border cursor-pointer transition-colors
${o?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 hover:border-gray-400 dark:border-gray-600 dark:hover:border-gray-500"}
`,onClick:()=>n?.(r.id),children:c.jsxs(_,{className:"flex justify-between items-start",children:[c.jsxs(_,{className:"flex-1",children:[c.jsxs(Z,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",r.version]}),c.jsx(Z,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:a(r.created_at)})]}),c.jsxs(_,{className:"flex gap-3 text-sm",children:[c.jsxs(Z,{className:"text-green-600 dark:text-green-400",children:["+",r.changes_summary.added]}),c.jsxs(Z,{className:"text-red-600 dark:text-red-400",children:["-",r.changes_summary.removed]})]})]})},r.id)})})},Ih=({layoutId:e,versions:t,onRestore:n})=>{const[a,r]=m.useState(),o=l=>{r(l)},s=()=>{a!==void 0&&n(a)},i=a===void 0;return c.jsxs(_,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[c.jsx(_,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:c.jsx($l,{versions:t,selectedId:a,onSelect:o})}),c.jsx(_,{className:"flex justify-end",children:c.jsx(re,{variant:"primary",disabled:i,onClick:s,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Ah=({emailLabel:e="Email",passwordLabel:t="Password",submitButtonText:n="Sign In",processingText:a="Processing...",emailPlaceholder:r="Email",passwordPlaceholder:o="Password",forgotPasswordText:s="Forgot your password?",forgotPasswordUrl:i="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:g="Please enter a valid email address.",passwordRequiredError:u="Please enter your password.",onSubmit:d,loadingActions:f={},isLoading:h=!1,disabled:v=!1,apiError:p="",className:x="",style:b})=>{const[O,C]=m.useState(""),[E,N]=m.useState(""),[S,k]=m.useState({}),y=p,w=Object.values(f).some(L=>L===!0),A=h||w,D=v||A,$=()=>{const L={},U=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!O||O.trim()===""?L.email=l:U.test(O)||(L.email=g),(!E||E.trim()==="")&&(L.password=u),k(L),Object.keys(L).length===0},M=async L=>{if(!$()){L.preventDefault();return}k({}),d?await d(L):L.preventDefault()};return c.jsx(_,{className:`w-full ${x}`,style:b,children:c.jsxs(Do,{onSubmit:M,className:"space-y-6",noValidate:!0,children:[y&&c.jsx(_,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:c.jsx(dt,{className:"text-sm text-red-600 dark:text-red-400",children:y})}),c.jsxs(_,{children:[c.jsx(Ft,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),c.jsx(ft,{id:"email",name:"email",type:"email",value:O,onChange:L=>C(L.target.value),placeholder:r,disabled:D,className:`
`,onClick:()=>n?.(r.id),children:c.jsxs(D,{className:"flex justify-between items-start",children:[c.jsxs(D,{className:"flex-1",children:[c.jsxs(Z,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",r.version]}),c.jsx(Z,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:a(r.created_at)})]}),c.jsxs(D,{className:"flex gap-3 text-sm",children:[c.jsxs(Z,{className:"text-green-600 dark:text-green-400",children:["+",r.changes_summary.added]}),c.jsxs(Z,{className:"text-red-600 dark:text-red-400",children:["-",r.changes_summary.removed]})]})]})},r.id)})})},Ih=({layoutId:e,versions:t,onRestore:n})=>{const[a,r]=m.useState(),o=l=>{r(l)},s=()=>{a!==void 0&&n(a)},i=a===void 0;return c.jsxs(D,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[c.jsx(D,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:c.jsx($l,{versions:t,selectedId:a,onSelect:o})}),c.jsx(D,{className:"flex justify-end",children:c.jsx(re,{variant:"primary",disabled:i,onClick:s,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Ah=({emailLabel:e="Email",passwordLabel:t="Password",submitButtonText:n="Sign In",processingText:a="Processing...",emailPlaceholder:r="Email",passwordPlaceholder:o="Password",forgotPasswordText:s="Forgot your password?",forgotPasswordUrl:i="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:g="Please enter a valid email address.",passwordRequiredError:u="Please enter your password.",onSubmit:d,loadingActions:f={},isLoading:h=!1,disabled:v=!1,apiError:p="",className:x="",style:b})=>{const[O,C]=m.useState(""),[S,N]=m.useState(""),[E,k]=m.useState({}),y=p,w=Object.values(f).some(L=>L===!0),A=h||w,_=v||A,F=()=>{const L={},U=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!O||O.trim()===""?L.email=l:U.test(O)||(L.email=g),(!S||S.trim()==="")&&(L.password=u),k(L),Object.keys(L).length===0},M=async L=>{if(!F()){L.preventDefault();return}k({}),d?await d(L):L.preventDefault()};return c.jsx(D,{className:`w-full ${x}`,style:b,children:c.jsxs(Do,{onSubmit:M,className:"space-y-6",noValidate:!0,children:[y&&c.jsx(D,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:c.jsx(dt,{className:"text-sm text-red-600 dark:text-red-400",children:y})}),c.jsxs(D,{children:[c.jsx(Ft,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),c.jsx(ft,{id:"email",name:"email",type:"email",value:O,onChange:L=>C(L.target.value),placeholder:r,disabled:_,className:`
w-full px-4 py-3 rounded-lg border
${S.email?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
${E.email?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
bg-white dark:bg-gray-800
text-gray-900 dark:text-white
placeholder-gray-400 dark:placeholder-gray-500
focus:outline-none focus:ring-2
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
`}),S.email&&c.jsx(dt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:S.email})]}),c.jsxs(_,{children:[c.jsx(Ft,{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t}),c.jsx(ft,{id:"password",name:"password",type:"password",value:E,onChange:L=>N(L.target.value),placeholder:o,disabled:D,className:`
`}),E.email&&c.jsx(dt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E.email})]}),c.jsxs(D,{children:[c.jsx(Ft,{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t}),c.jsx(ft,{id:"password",name:"password",type:"password",value:S,onChange:L=>N(L.target.value),placeholder:o,disabled:_,className:`
w-full px-4 py-3 rounded-lg border
${S.password?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
${E.password?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
bg-white dark:bg-gray-800
text-gray-900 dark:text-white
placeholder-gray-400 dark:placeholder-gray-500
focus:outline-none focus:ring-2
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
`}),S.password&&c.jsx(dt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:S.password})]}),i&&c.jsx(_,{className:"flex items-center justify-end",children:c.jsx(jr,{href:i,className:"text-sm text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300 transition-colors duration-200",children:s})}),c.jsx(re,{type:"submit",disabled:D,className:`
`}),E.password&&c.jsx(dt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E.password})]}),i&&c.jsx(D,{className:"flex items-center justify-end",children:c.jsx(jr,{href:i,className:"text-sm text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300 transition-colors duration-200",children:s})}),c.jsx(re,{type:"submit",disabled:_,className:`
w-full px-4 py-3 rounded-lg font-medium
bg-blue-600 hover:bg-blue-700
dark:bg-blue-500 dark:hover:bg-blue-600
@@ -187,7 +187,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
flex items-center justify-center
`,children:A?c.jsxs(c.Fragment,{children:[c.jsxs(gr,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a]}):n})]})})},Fl=e=>e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,ss=e=>{const t=Fl(e);document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},Lh=()=>{const e=localStorage.getItem("g7_color_scheme");return e&&["auto","light","dark"].includes(e)?e:"auto"},Dh=({onThemeChange:e,className:t="",autoText:n="System",lightText:a="Light",darkText:r="Dark"})=>{const o=Lh(),[s,i]=m.useState(o),[l,g]=m.useState(!1),u=m.useRef(null);m.useEffect(()=>{ss(s)},[]),m.useEffect(()=>{if(s!=="auto")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>{ss("auto")};return h.addEventListener("change",v),()=>h.removeEventListener("change",v)},[s]),m.useEffect(()=>{const h=v=>{u.current&&!u.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const d=h=>{i(h),localStorage.setItem("g7_color_scheme",h),ss(h),g(!1),e?.(h)},f=()=>Fl(s)==="dark"?ue.Moon:ue.Sun;return c.jsxs(_,{ref:u,className:`relative ${t}`,children:[c.jsx(re,{onClick:()=>g(!l),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":"Toggle theme",children:c.jsx(ne,{name:f(),className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),l&&c.jsx(_,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsxs(_,{className:"py-2",children:[c.jsxs(re,{onClick:()=>d("auto"),className:`
`,children:A?c.jsxs(c.Fragment,{children:[c.jsxs(gr,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a]}):n})]})})},Fl=e=>e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,ss=e=>{const t=Fl(e);document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},Lh=()=>{const e=localStorage.getItem("g7_color_scheme");return e&&["auto","light","dark"].includes(e)?e:"auto"},Dh=({onThemeChange:e,className:t="",autoText:n="System",lightText:a="Light",darkText:r="Dark"})=>{const o=Lh(),[s,i]=m.useState(o),[l,g]=m.useState(!1),u=m.useRef(null);m.useEffect(()=>{ss(s)},[]),m.useEffect(()=>{if(s!=="auto")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>{ss("auto")};return h.addEventListener("change",v),()=>h.removeEventListener("change",v)},[s]),m.useEffect(()=>{const h=v=>{u.current&&!u.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const d=h=>{i(h),localStorage.setItem("g7_color_scheme",h),ss(h),g(!1),e?.(h)},f=()=>Fl(s)==="dark"?ue.Moon:ue.Sun;return c.jsxs(D,{ref:u,className:`relative ${t}`,children:[c.jsx(re,{onClick:()=>g(!l),className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-label":"Toggle theme",children:c.jsx(ne,{name:f(),className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),l&&c.jsx(D,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:c.jsxs(D,{className:"py-2",children:[c.jsxs(re,{onClick:()=>d("auto"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${s==="auto"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[c.jsx(ne,{name:ue.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),s==="auto"&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(re,{onClick:()=>d("light"),className:`
@@ -196,7 +196,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
`,children:[c.jsx(ne,{name:ue.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:a}),s==="light"&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(re,{onClick:()=>d("dark"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${s==="dark"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[c.jsx(ne,{name:ue.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),s==="dark"&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Ul=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...e)=>console.log("[Comp:ColumnSelector]",...e),warn:(...e)=>console.warn("[Comp:ColumnSelector]",...e),error:(...e)=>console.error("[Comp:ColumnSelector]",...e)},Vl=(e,t)=>window.G7Core?.t?.(e,t)??e,_h=()=>window.G7Core,Ph=({id:e,columns:t,visibleColumns:n,onColumnVisibilityChange:a,triggerLabel:r,triggerIconName:o=ue.Sliders,position:s="right",className:i="",style:l,requiredText:g,menuTitle:u,menuDescription:d,defaultColumns:f,triggerClassName:h,labelClassName:v,dynamicColumns:p,dynamicColumnsInsertAfter:x})=>{const b=r??Vl("common.column_selector"),O=g??Vl("common.required"),C=m.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return t;if(x){const B=t.findIndex(F=>F.field===x);if(B!==-1)return[...t.slice(0,B+1),...p,...t.slice(B+1)]}return[...t,...p]},[t,p,x]),[E,N]=m.useState(!1),S=m.useRef(null),k=m.useRef(null),[y,w]=m.useState(!1),[A,D]=m.useState(s),$=m.useMemo(()=>{try{const B=window.G7Core?.AuthManager?.getInstance();return B?B.getUser()?.uuid:void 0}catch{return}},[]),M=e?`g7_columns_${e}${$!==void 0?`_${$}`:""}`:null,L=()=>{if(!M)return null;try{const B=localStorage.getItem(M);if(B){const F=JSON.parse(B);if(Array.isArray(F)&&F.length>0)return F}}catch(B){Ul.warn("Failed to load from localStorage:",B)}return null},U=B=>{if(M)try{localStorage.setItem(M,JSON.stringify(B))}catch(F){Ul.warn("Failed to save to localStorage:",F)}},T=()=>{const B=L();return B||(n&&n.length>0?n:f&&f.length>0?f:C.filter(F=>F.visible!==!1).map(F=>F.field))},[I,j]=m.useState(T);m.useEffect(()=>{y||(a&&I.length>0&&a(I),w(!0))},[y,a,I]),m.useEffect(()=>{y&&n&&n.length>0&&(L()||j(n))},[n,y]);const V=m.useRef([]),z=m.useRef(null);m.useEffect(()=>{if(y&&p&&p.length>0){const B=p.map(R=>R.field);if(z.current===null){const R=L();if(z.current=R!==null,R!==null){V.current=B;return}}const F=V.current,Y=B.filter(R=>!F.includes(R));if(Y.length>0){const R=n&&n.length>0?n:I,ae=Y.filter(ee=>!R.includes(ee));if(ae.length>0){const ee=[...R,...ae];j(ee),U(ee),a?.(ee)}}V.current=B}},[p,y]);const G=n&&n.length>0?n:I;m.useEffect(()=>{const B=F=>{S.current&&!S.current.contains(F.target)&&N(!1)};return E&&document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[E]),m.useEffect(()=>{if(E&&k.current&&S.current){const B=k.current.getBoundingClientRect(),F=S.current.getBoundingClientRect(),Y=window.innerWidth,R=B.width||256;s==="right"?F.right-R<0?D("left"):D("right"):F.left+R>Y?D("right"):D("left")}},[E,s]);const H=B=>{if(C.find(R=>R.field===B)?.required)return;const Y=G.includes(B)?G.filter(R=>R!==B):[...G,B];j(Y),U(Y),a?.(Y)},W=A==="left"?"left-0":"right-0";return c.jsxs(_,{ref:S,className:`relative inline-block ${i}`,style:l,children:[c.jsxs(re,{onClick:()=>N(!E),className:_h()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",h)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${h??""}`,children:[c.jsx(ne,{name:o,className:"w-5 h-5"}),b&&c.jsx(Z,{className:`${v||"hidden sm:inline"} text-sm`,children:b})]}),E&&c.jsxs(_,{ref:k,className:`absolute ${W} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(u||d)&&c.jsxs(_,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[u&&c.jsx(Z,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:u}),d&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:d})]}),c.jsx(_,{className:"p-2 max-h-64 overflow-y-auto",children:C.map(B=>{const F=G.includes(B.field),Y=B.required===!0;return c.jsxs(_,{onClick:()=>!Y&&H(B.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${Y?"cursor-default":"cursor-pointer"}`,children:[c.jsx(Xt,{checked:F,disabled:Y,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),c.jsx(Z,{className:"text-sm text-gray-700 dark:text-gray-300",children:B.header}),Y&&O&&c.jsx(Z,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:O})]},B.field)})})]})]})},$h=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},Fh=({className:e="",style:t})=>{const[n,a]=m.useState(!1);return m.useEffect(()=>{const r=window.G7Core?.Tr Line truncated
`,children:[c.jsx(ne,{name:ue.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),s==="dark"&&c.jsx(ne,{name:ue.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Ul=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...e)=>console.log("[Comp:ColumnSelector]",...e),warn:(...e)=>console.warn("[Comp:ColumnSelector]",...e),error:(...e)=>console.error("[Comp:ColumnSelector]",...e)},Vl=(e,t)=>window.G7Core?.t?.(e,t)??e,_h=()=>window.G7Core,Ph=({id:e,columns:t,visibleColumns:n,onColumnVisibilityChange:a,triggerLabel:r,triggerIconName:o=ue.Sliders,position:s="right",className:i="",style:l,requiredText:g,menuTitle:u,menuDescription:d,defaultColumns:f,triggerClassName:h,labelClassName:v,dynamicColumns:p,dynamicColumnsInsertAfter:x})=>{const b=r??Vl("common.column_selector"),O=g??Vl("common.required"),C=m.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return t;if(x){const B=t.findIndex(V=>V.field===x);if(B!==-1)return[...t.slice(0,B+1),...p,...t.slice(B+1)]}return[...t,...p]},[t,p,x]),[S,N]=m.useState(!1),E=m.useRef(null),k=m.useRef(null),[y,w]=m.useState(!1),[A,_]=m.useState(s),F=m.useMemo(()=>{try{const B=window.G7Core?.AuthManager?.getInstance();return B?B.getUser()?.uuid:void 0}catch{return}},[]),M=e?`g7_columns_${e}${F!==void 0?`_${F}`:""}`:null,L=()=>{if(!M)return null;try{const B=localStorage.getItem(M);if(B){const V=JSON.parse(B);if(Array.isArray(V)&&V.length>0)return V}}catch(B){Ul.warn("Failed to load from localStorage:",B)}return null},U=B=>{if(M)try{localStorage.setItem(M,JSON.stringify(B))}catch(V){Ul.warn("Failed to save to localStorage:",V)}},T=()=>{const B=L();return B||(n&&n.length>0?n:f&&f.length>0?f:C.filter(V=>V.visible!==!1).map(V=>V.field))},[I,H]=m.useState(T);m.useEffect(()=>{y||(a&&I.length>0&&a(I),w(!0))},[y,a,I]),m.useEffect(()=>{y&&n&&n.length>0&&(L()||H(n))},[n,y]);const $=m.useRef([]),z=m.useRef(null);m.useEffect(()=>{if(y&&p&&p.length>0){const B=p.map(R=>R.field);if(z.current===null){const R=L();if(z.current=R!==null,R!==null){$.current=B;return}}const V=$.current,Y=B.filter(R=>!V.includes(R));if(Y.length>0){const R=n&&n.length>0?n:I,ae=Y.filter(ee=>!R.includes(ee));if(ae.length>0){const ee=[...R,...ae];H(ee),U(ee),a?.(ee)}}$.current=B}},[p,y]);const G=n&&n.length>0?n:I;m.useEffect(()=>{const B=V=>{E.current&&!E.current.contains(V.target)&&N(!1)};return S&&document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[S]),m.useEffect(()=>{if(S&&k.current&&E.current){const B=k.current.getBoundingClientRect(),V=E.current.getBoundingClientRect(),Y=window.innerWidth,R=B.width||256;s==="right"?V.right-R<0?_("left"):_("right"):V.left+R>Y?_("right"):_("left")}},[S,s]);const j=B=>{if(C.find(R=>R.field===B)?.required)return;const Y=G.includes(B)?G.filter(R=>R!==B):[...G,B];H(Y),U(Y),a?.(Y)},W=A==="left"?"left-0":"right-0";return c.jsxs(D,{ref:E,className:`relative inline-block ${i}`,style:l,children:[c.jsxs(re,{onClick:()=>N(!S),className:_h()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",h)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${h??""}`,children:[c.jsx(ne,{name:o,className:"w-5 h-5"}),b&&c.jsx(Z,{className:`${v||"hidden sm:inline"} text-sm`,children:b})]}),S&&c.jsxs(D,{ref:k,className:`absolute ${W} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(u||d)&&c.jsxs(D,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[u&&c.jsx(Z,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:u}),d&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:d})]}),c.jsx(D,{className:"p-2 max-h-64 overflow-y-auto",children:C.map(B=>{const V=G.includes(B.field),Y=B.required===!0;return c.jsxs(D,{onClick:()=>!Y&&j(B.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${Y?"cursor-default":"cursor-pointer"}`,children:[c.jsx(Xt,{checked:V,disabled:Y,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),c.jsx(Z,{className:"text-sm text-gray-700 dark:text-gray-300",children:B.header}),Y&&O&&c.jsx(Z,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:O})]},B.field)})})]})]})},$h=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...e)=>console.log("[Comp:PageTransition]",...e),warn:(...e)=>console.warn("[Comp:PageTransition]",...e),error:(...e)=>console.error("[Comp:PageTransition]",...e)},Fh=({className:e="",style:t})=>{const[n,a]=m.useState(!1);return m.useEffect(()=>{const r=window.G7Core?.Tr Line truncated
@keyframes loading {
0% {
transform: translateX(-100%);
@@ -209,18 +209,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
}
}
`})]}):null},Uh=(e,t)=>window.G7Core?.t?.(e,t)??e,Vh=({options:e})=>{const t=document.documentElement.classList.contains("dark"),n=t?"rgb(17,24,39)":"rgb(249,250,251)",a=t?"#6b7280":"#9ca3af",r=t?"#9ca3af":"#6b7280";return c.jsxs("div",{style:{position:"absolute",inset:0,zIndex:2147483647,overflow:"hidden",background:n,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:"15%",gap:"12px"},children:[c.jsx("div",{style:{width:"32px",height:"32px",border:`3px solid ${a}`,borderTopColor:"transparent",borderRadius:"50%",animation:"g7-spin 0.8s linear infinite"}}),c.jsx("span",{style:{color:r,fontSize:"14px"},children:e?.text||Uh("nav.loading")})]})};function Or(e){"@babel/helpers - typeof";return Or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(e)}function Hh(e,t){if(Or(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Or(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hl(e){var t=Hh(e,"string");return Or(t)=="symbol"?t:t+""}function In(e,t,n){return(t=Hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jl(Object(n),!0).forEach(function(a){In(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function jh(e){if(Array.isArray(e))return e}function zh(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,r,o,s,i=[],l=!0,g=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(u){g=!0,r=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(g)throw r}}return i}}function is(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function zl(e,t){if(e){if(typeof e=="string")return is(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?is(e,t):void 0}}function Gh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hr(e,t){return jh(e)||zh(e,t)||zl(e,t)||Gh()}function Bh(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function sr(e,t){if(e==null)return{};var n,a,r=Bh(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Wh=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Gl(e){var t=e.defaultInputValue,n=t===void 0?"":t,a=e.defaultMenuIsOpen,r=a===void 0?!1:a,o=e.defaultValue,s=o===void 0?null:o,i=e.inputValue,l=e.menuIsOpen,g=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,v=sr(e,Wh),p=m.useState(i!==void 0?i:n),x=hr(p,2),b=x[0],O=x[1],C=m.useState(l!==void 0?l:r),E=hr(C,2),N=E[0],S=E[1],k=m.useState(h!==void 0?h:s),y=hr(k,2),w=y[0],A=y[1],D=m.useCallback(function(j,V){typeof g=="function"&&g(j,V),A(j)},[g]),$=m.useCallback(function(j,V){var z;typeof u=="function"&&(z=u(j,V)),O(z!==void 0?z:j)},[u]),M=m.useCallback(function(){typeof f=="function"&&f(),S(!0)},[f]),L=m.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),U=i!==void 0?i:b,T=l!==void 0?l:N,I=h!==void 0?h:w;return Ee(Ee({},v),{},{inputValue:U,menuIsOpen:T,onChange:D,onInputChange:$,onMenuClose:L,onMenuOpen:M,value:I})}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Me.apply(null,arguments)}function Yh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bl(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Hl(a.key),a)}}function qh(e,t,n){return t&&Bl(e.prototype,t),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ls(e,t){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ls(e,t)}function Kh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ls(e,t)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wl=function(){return!!e})()}function Xh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zh(e,t){if(t&&(Or(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xh(e)}function Qh(e){var t=Wl();return function(){var n,a=Ca(e);if(t){var r=Ca(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Zh(this,n)}}function Jh(e){if(Array.isArray(e))return is(e)}function Rh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ep(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qr(e){return Jh(e)||Rh(e)||zl(e)||ep()}function tp(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rp(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var np=(function(){function e(n){var a=this;this._insertTag=function(r){var o;a.tags.length===0?a.insertionPoint?o=a.insertionPoint.nextSibling:a.prepend?o=a.container.firstChild:o=a.before:o=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(r,o),a.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rp(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=tp(r);try{o.insertRule(a,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var r;return(r=a.parentNode)==null?void 0:r.removeChild(a)}),this.tags=[],this.ctr=0},e})(),Ct="-ms-",Sa="-moz-",Ke="-webkit-",Yl="comm",cs="rule",us="decl",ap="@import",ql="@keyframes",op="@layer",sp=Math.abs,Ea=String.fromCharCode,ip=Object.assign;function lp(e,t){return yt(e,0)^45?(((t<<2^yt(e,0))<<2^yt(e,1))<<2^yt(e,2))<<2^yt(e,3):0}function Kl(e){return e.trim()}function cp(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function ds(e,t){return e.indexOf(t)}function yt(e,t){return e.charCodeAt(t)|0}function An(e,t,n){return e.slice(t,n)}function ir(e){return e.length}function fs(e){return e.length}function Na(e,t){return t.push(e),e}function up(e,t){return e.map(t).join("")}var Oa=1,Kr=1,Xl=0,_t=0,gt=0,Xr="";function Ta(e,t,n,a,r,o,s){return{value:e,root:t,parent:n,type:a,props:r,children:o,line:Oa,column:Kr,length:s,return:""}}function Ln(e,t){return ip(Ta("",null,null,"",null,null,0),e,{length:-e.length},t)}function dp(){return gt}function fp(){return gt=_t>0?yt(Xr,--_t):0,Kr--,gt===10&&(Kr=1,Oa--),gt}function Ht(){return gt=_t<Xl?yt(Xr,_t++):0,Kr++,gt===10&&(Kr=1,Oa++),gt}function lr(){return yt(Xr,_t)}function Ma(){return _t}function Dn(e,t){return An(Xr,e,t)}function _n(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zl(e){return Oa=Kr=1,Xl=ir(Xr=e),_t=0,[]}function Ql(e){return Xr="",e}function Ia(e){return Kl(Dn(_t-1,gs(e===91?e+2:e===40?e+1:e)))}function gp(e){for(;(gt=lr())&&gt<33;)Ht();return _n(e)>2||_n(gt)>3?"":" "}function hp(e,t){for(;--t&&Ht()&&!(gt<48||gt>102||gt>57&&gt<65||gt>70&&gt<97););return Dn(e,Ma()+(t<6&&lr()==32&&Ht()==32))}function gs(e){for(;Ht();)switch(gt){case e:return _t;case 34:case 39:e!==34&&e!==39&&gs(gt);break;case 40:e===41&&gs(e);break;case 92:Ht();break}return _t}function pp(e,t){for(;Ht()&&e+gt!==57;)if(e+gt===84&&lr()===47)break;return"/*"+Dn(t,_t-1)+"*"+Ea(e===47?e:Ht())}function bp(e){for(;!_n(lr());)Ht();return Dn(e,_t)}function mp(e){return Ql(Aa("",null,null,null,[""],e=Zl(e),0,[0],e))}function Aa(e,t,n,a,r,o,s,i,l){for(var g=0,u=0,d=s,f=0,h=0,v=0,p=1,x=1,b=1,O=0,C="",E=r,N=o,S=a,k=C;x;)switch(v=O,O=Ht()){case 40:if(v!=108&&yt(k,d-1)==58){ds(k+=Xe(Ia(O),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Ia(O);break;case 9:case 10:case 13:case 32:k+=gp(v);break;case 92:k+=hp(Ma()-1,7);continue;case 47:switch(lr()){case 42:case 47:Na(vp(pp(Ht(),Ma()),t,n),l);break;default:k+="/"}break;case 123*p:i[g++]=ir(k)*b;case 125*p:case 59:case 0:switch(O){case 0:case 125:x=0;case 59+u:b==-1&&(k=Xe(k,/\f/g,"")),h>0&&ir(k)-d&&Na(h>32?Rl(k+";",a,n,d-1):Rl(Xe(k," ","")+";",a,n,d-2),l);break;case 59:k+=";";default:if(Na(S=Jl(k,t,n,g,u,r,i,C,E=[],N=[],d),o),O===123)if(u===0)Aa(k,t,S,S,E,o,d,i,N);else switch(f===99&&yt(k,3)===110?100:f){case 100:case 108:case 109:case 115:Aa(e,S,S,a&&Na(Jl(e,S,S,0,0,r,i,C,r,E=[],d),N),r,N,d,i,a?E:N);break;default:Aa(k,S,S,S,[""],N,0,i,N)}}g=u=h=0,p=b=1,C=k="",d=s;break;case 58:d=1+ir(k),h=v;default:if(p<1){if(O==123)--p;else if(O==125&&p++==0&&fp()==125)continue}switch(k+=Ea(O),O*p){case 38:b=u>0?1:(k+="\f",-1);break;case 44:i[g++]=(ir(k)-1)*b,b=1;break;case 64:lr()===45&&(k+=Ia(Ht())),f=lr(),u=d=ir(C=k+=bp(Ma())),O++;break;case 45:v===45&&ir(k)==2&&(p=0)}}return o}function Jl(e,t,n,a,r,o,s,i,l,g,u){for(var d=r-1,f=r===0?o:[""],h=fs(f),v=0,p=0,x=0;v<a;++v)for(var b=0,O=An(e,d+1,d=sp(p=s[v])),C=e;b<h;++b)(C=Kl(p>0?f[b]+" "+O:Xe(O,/&\f/g,f[b])))&&(l[x++]=C);retu Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hr(e,t){return jh(e)||zh(e,t)||zl(e,t)||Gh()}function Bh(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function sr(e,t){if(e==null)return{};var n,a,r=Bh(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Wh=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Gl(e){var t=e.defaultInputValue,n=t===void 0?"":t,a=e.defaultMenuIsOpen,r=a===void 0?!1:a,o=e.defaultValue,s=o===void 0?null:o,i=e.inputValue,l=e.menuIsOpen,g=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,h=e.value,v=sr(e,Wh),p=m.useState(i!==void 0?i:n),x=hr(p,2),b=x[0],O=x[1],C=m.useState(l!==void 0?l:r),S=hr(C,2),N=S[0],E=S[1],k=m.useState(h!==void 0?h:s),y=hr(k,2),w=y[0],A=y[1],_=m.useCallback(function(H,$){typeof g=="function"&&g(H,$),A(H)},[g]),F=m.useCallback(function(H,$){var z;typeof u=="function"&&(z=u(H,$)),O(z!==void 0?z:H)},[u]),M=m.useCallback(function(){typeof f=="function"&&f(),E(!0)},[f]),L=m.useCallback(function(){typeof d=="function"&&d(),E(!1)},[d]),U=i!==void 0?i:b,T=l!==void 0?l:N,I=h!==void 0?h:w;return Ee(Ee({},v),{},{inputValue:U,menuIsOpen:T,onChange:_,onInputChange:F,onMenuClose:L,onMenuOpen:M,value:I})}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Me.apply(null,arguments)}function Yh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bl(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Hl(a.key),a)}}function qh(e,t,n){return t&&Bl(e.prototype,t),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ls(e,t){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ls(e,t)}function Kh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ls(e,t)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wl=function(){return!!e})()}function Xh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zh(e,t){if(t&&(Or(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xh(e)}function Qh(e){var t=Wl();return function(){var n,a=Ca(e);if(t){var r=Ca(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Zh(this,n)}}function Jh(e){if(Array.isArray(e))return is(e)}function Rh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ep(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qr(e){return Jh(e)||Rh(e)||zl(e)||ep()}function tp(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rp(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var np=(function(){function e(n){var a=this;this._insertTag=function(r){var o;a.tags.length===0?a.insertionPoint?o=a.insertionPoint.nextSibling:a.prepend?o=a.container.firstChild:o=a.before:o=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(r,o),a.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rp(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=tp(r);try{o.insertRule(a,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var r;return(r=a.parentNode)==null?void 0:r.removeChild(a)}),this.tags=[],this.ctr=0},e})(),Ct="-ms-",Sa="-moz-",Ke="-webkit-",Yl="comm",cs="rule",us="decl",ap="@import",ql="@keyframes",op="@layer",sp=Math.abs,Ea=String.fromCharCode,ip=Object.assign;function lp(e,t){return yt(e,0)^45?(((t<<2^yt(e,0))<<2^yt(e,1))<<2^yt(e,2))<<2^yt(e,3):0}function Kl(e){return e.trim()}function cp(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function ds(e,t){return e.indexOf(t)}function yt(e,t){return e.charCodeAt(t)|0}function An(e,t,n){return e.slice(t,n)}function ir(e){return e.length}function fs(e){return e.length}function Na(e,t){return t.push(e),e}function up(e,t){return e.map(t).join("")}var Oa=1,Kr=1,Xl=0,_t=0,gt=0,Xr="";function Ta(e,t,n,a,r,o,s){return{value:e,root:t,parent:n,type:a,props:r,children:o,line:Oa,column:Kr,length:s,return:""}}function Ln(e,t){return ip(Ta("",null,null,"",null,null,0),e,{length:-e.length},t)}function dp(){return gt}function fp(){return gt=_t>0?yt(Xr,--_t):0,Kr--,gt===10&&(Kr=1,Oa--),gt}function Ht(){return gt=_t<Xl?yt(Xr,_t++):0,Kr++,gt===10&&(Kr=1,Oa++),gt}function lr(){return yt(Xr,_t)}function Ma(){return _t}function Dn(e,t){return An(Xr,e,t)}function _n(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zl(e){return Oa=Kr=1,Xl=ir(Xr=e),_t=0,[]}function Ql(e){return Xr="",e}function Ia(e){return Kl(Dn(_t-1,gs(e===91?e+2:e===40?e+1:e)))}function gp(e){for(;(gt=lr())&&gt<33;)Ht();return _n(e)>2||_n(gt)>3?"":" "}function hp(e,t){for(;--t&&Ht()&&!(gt<48||gt>102||gt>57&&gt<65||gt>70&&gt<97););return Dn(e,Ma()+(t<6&&lr()==32&&Ht()==32))}function gs(e){for(;Ht();)switch(gt){case e:return _t;case 34:case 39:e!==34&&e!==39&&gs(gt);break;case 40:e===41&&gs(e);break;case 92:Ht();break}return _t}function pp(e,t){for(;Ht()&&e+gt!==57;)if(e+gt===84&&lr()===47)break;return"/*"+Dn(t,_t-1)+"*"+Ea(e===47?e:Ht())}function bp(e){for(;!_n(lr());)Ht();return Dn(e,_t)}function mp(e){return Ql(Aa("",null,null,null,[""],e=Zl(e),0,[0],e))}function Aa(e,t,n,a,r,o,s,i,l){for(var g=0,u=0,d=s,f=0,h=0,v=0,p=1,x=1,b=1,O=0,C="",S=r,N=o,E=a,k=C;x;)switch(v=O,O=Ht()){case 40:if(v!=108&&yt(k,d-1)==58){ds(k+=Xe(Ia(O),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Ia(O);break;case 9:case 10:case 13:case 32:k+=gp(v);break;case 92:k+=hp(Ma()-1,7);continue;case 47:switch(lr()){case 42:case 47:Na(vp(pp(Ht(),Ma()),t,n),l);break;default:k+="/"}break;case 123*p:i[g++]=ir(k)*b;case 125*p:case 59:case 0:switch(O){case 0:case 125:x=0;case 59+u:b==-1&&(k=Xe(k,/\f/g,"")),h>0&&ir(k)-d&&Na(h>32?Rl(k+";",a,n,d-1):Rl(Xe(k," ","")+";",a,n,d-2),l);break;case 59:k+=";";default:if(Na(E=Jl(k,t,n,g,u,r,i,C,S=[],N=[],d),o),O===123)if(u===0)Aa(k,t,E,E,S,o,d,i,N);else switch(f===99&&yt(k,3)===110?100:f){case 100:case 108:case 109:case 115:Aa(e,E,E,a&&Na(Jl(e,E,E,0,0,r,i,C,r,S=[],d),N),r,N,d,i,a?S:N);break;default:Aa(k,E,E,E,[""],N,0,i,N)}}g=u=h=0,p=b=1,C=k="",d=s;break;case 58:d=1+ir(k),h=v;default:if(p<1){if(O==123)--p;else if(O==125&&p++==0&&fp()==125)continue}switch(k+=Ea(O),O*p){case 38:b=u>0?1:(k+="\f",-1);break;case 44:i[g++]=(ir(k)-1)*b,b=1;break;case 64:lr()===45&&(k+=Ia(Ht())),f=lr(),u=d=ir(C=k+=bp(Ma())),O++;break;case 45:v===45&&ir(k)==2&&(p=0)}}return o}function Jl(e,t,n,a,r,o,s,i,l,g,u){for(var d=r-1,f=r===0?o:[""],h=fs(f),v=0,p=0,x=0;v<a;++v)for(var b=0,O=An(e,d+1,d=sp(p=s[v])),C=e;b<h;++b)(C=Kl(p>0?f[b]+" "+O:Xe(O,/&\f/g,f[b])))&&(l[x++]=C);retu Line truncated
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var rc;function Ap(){if(rc)return Ze;rc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function C(N){if(typeof N=="object"&&N!==null){var S=N.$$typeof;switch(S){case t:switch(N=N.type,N){case l:case g:case a:case o:case r:case d:return N;default:switch(N=N&&N.$$typeof,N){case i:case u:case v:case h:case s:return N;default:return S}}case n:return S}}}function E(N){return C(N)===g}return Ze.AsyncMode=l,Ze.ConcurrentMode=g,Ze.ContextConsumer=i,Ze.ContextProvider=s,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=a,Ze.Lazy=v,Ze.Memo=h,Ze.Portal=n,Ze.Profiler=o,Ze.StrictMode=r,Ze.Suspense=d,Ze.isAsyncMode=function(N){return E(N)||C(N)===l},Ze.isConcurrentMode=E,Ze.isContextConsumer=function(N){return C(N)===i},Ze.isContextProvider=function(N){return C(N)===s},Ze.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===t},Ze.isForwardRef=function(N){return C(N)===u},Ze.isFragment=function(N){return C(N)===a},Ze.isLazy=function(N){return C(N)===v},Ze.isMemo=function(N){return C(N)===h},Ze.isPortal=function(N){return C(N)===n},Ze.isProfiler=function(N){return C(N)===o},Ze.isStrictMode=function(N){return C(N)===r},Ze.isSuspense=function(N){return C(N)===d},Ze.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===g||N===o||N===r||N===d||N===f||typeof N=="object"&&N!==null&&(N.$$typeof===v||N.$$typeof===h||N.$$typeof===s||N.$$typeof===i||N.$$typeof===u||N.$$typeof===x||N.$$typeof===b||N.$$typeof===O||N.$$typeof===p)},Ze.typeOf=C,Ze}var nc;function Lp(){return nc||(nc=1,hs.exports=Ap()),hs.exports}var ps,ac;function Dp(){if(ac)return ps;ac=1;var e=Lp(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=a,o[e.Memo]=r;function s(v){return e.isMemo(v)?r:o[v.$$typeof]||t}var i=Object.defineProperty,l=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(v,p,x){if(typeof p!="string"){if(f){var b=d(p);b&&b!==f&&h(v,b,x)}var O=l(p);g&&(O=O.concat(g(p)));for(var C=s(v),E=s(p),N=0;N<O.length;++N){var S=O[N];if(!n[S]&&!(x&&x[S])&&!(E&&E[S])&&!(C&&C[S])){var k=u(p,S);try{i(v,S,k)}catch{}}}}return v}return ps=h,ps}Dp();var _p=!0;function Pp(e,t,n){var a="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(a+=r+" ")}),a}var oc=function(t,n,a){var r=t.key+"-"+n.name;(a===!1||_p===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},$p=function(t,n,a){oc(t,n,a);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+r:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Fp(e){for(var t=0,n,a=0,r=e.length;r>=4;++a,r-=4)n=e.charCodeAt(a)&255|(e.charCodeAt(++a)&255)<<8|(e.charCodeAt(++a)&255)<<16|(e.charCodeAt(++a)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(a+2)&255)<<16;case 2:t^=(e.charCodeAt(a+1)&255)<<8;case 1:t^=e.charCodeAt(a)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Up={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vp=/[A-Z]|^ms/g,Hp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sc=function(t){return t.charCodeAt(1)===45},ic=functioLine truncated
*/var rc;function Ap(){if(rc)return Ze;rc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,g=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function C(N){if(typeof N=="object"&&N!==null){var E=N.$$typeof;switch(E){case t:switch(N=N.type,N){case l:case g:case a:case o:case r:case d:return N;default:switch(N=N&&N.$$typeof,N){case i:case u:case v:case h:case s:return N;default:return E}}case n:return E}}}function S(N){return C(N)===g}return Ze.AsyncMode=l,Ze.ConcurrentMode=g,Ze.ContextConsumer=i,Ze.ContextProvider=s,Ze.Element=t,Ze.ForwardRef=u,Ze.Fragment=a,Ze.Lazy=v,Ze.Memo=h,Ze.Portal=n,Ze.Profiler=o,Ze.StrictMode=r,Ze.Suspense=d,Ze.isAsyncMode=function(N){return S(N)||C(N)===l},Ze.isConcurrentMode=S,Ze.isContextConsumer=function(N){return C(N)===i},Ze.isContextProvider=function(N){return C(N)===s},Ze.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===t},Ze.isForwardRef=function(N){return C(N)===u},Ze.isFragment=function(N){return C(N)===a},Ze.isLazy=function(N){return C(N)===v},Ze.isMemo=function(N){return C(N)===h},Ze.isPortal=function(N){return C(N)===n},Ze.isProfiler=function(N){return C(N)===o},Ze.isStrictMode=function(N){return C(N)===r},Ze.isSuspense=function(N){return C(N)===d},Ze.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===g||N===o||N===r||N===d||N===f||typeof N=="object"&&N!==null&&(N.$$typeof===v||N.$$typeof===h||N.$$typeof===s||N.$$typeof===i||N.$$typeof===u||N.$$typeof===x||N.$$typeof===b||N.$$typeof===O||N.$$typeof===p)},Ze.typeOf=C,Ze}var nc;function Lp(){return nc||(nc=1,hs.exports=Ap()),hs.exports}var ps,ac;function Dp(){if(ac)return ps;ac=1;var e=Lp(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=a,o[e.Memo]=r;function s(v){return e.isMemo(v)?r:o[v.$$typeof]||t}var i=Object.defineProperty,l=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(v,p,x){if(typeof p!="string"){if(f){var b=d(p);b&&b!==f&&h(v,b,x)}var O=l(p);g&&(O=O.concat(g(p)));for(var C=s(v),S=s(p),N=0;N<O.length;++N){var E=O[N];if(!n[E]&&!(x&&x[E])&&!(S&&S[E])&&!(C&&C[E])){var k=u(p,E);try{i(v,E,k)}catch{}}}}return v}return ps=h,ps}Dp();var _p=!0;function Pp(e,t,n){var a="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(a+=r+" ")}),a}var oc=function(t,n,a){var r=t.key+"-"+n.name;(a===!1||_p===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},$p=function(t,n,a){oc(t,n,a);var r=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+r:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Fp(e){for(var t=0,n,a=0,r=e.length;r>=4;++a,r-=4)n=e.charCodeAt(a)&255|(e.charCodeAt(++a)&255)<<8|(e.charCodeAt(++a)&255)<<16|(e.charCodeAt(++a)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(a+2)&255)<<16;case 2:t^=(e.charCodeAt(a+1)&255)<<8;case 1:t^=e.charCodeAt(a)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Up={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vp=/[A-Z]|^ms/g,Hp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sc=function(t){return t.charCodeAt(1)===45},ic=functioLine truncated
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),om=function(t,n){var a=t.isFocused,r=t.size,o=t.theme,s=o.colors,i=o.spacing.baseUnit;return Ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},n?{}:{color:a?s.neutral60:s.neutral20,padding:i*2})},Ns=function(t){var n=t.delay,a=t.offset;return Se("span",{css:ys({animation:"".concat(am," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},sm=function(t){var n=t.innerProps,a=t.isRtl,r=t.size,o=r===void 0?4:r,s=sr(t,Zb);return Se("div",Me({},ct(Ee(Ee({},s),{},{innerProps:n,isRtl:a,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Se(Ns,{delay:0,offset:a}),Se(Ns,{delay:160,offset:!0}),Se(Ns,{delay:320,offset:!a}))},im=function(t,n){var a=t.isDisabled,r=t.isFocused,o=t.theme,s=o.colors,i=o.borderRadius,l=o.spacing;return Ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:a?s.neutral5:s.neutral0,borderColor:a?s.neutral10:r?s.primary:s.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:r?s.primary:s.neutral30}})},lm=function(t){var n=t.children,a=t.isDisabled,r=t.isFocused,o=t.innerRef,s=t.innerProps,i=t.menuIsOpen;return Se("div",Me({ref:o},ct(t,"control",{control:!0,"control--is-disabled":a,"control--is-focused":r,"control--menu-is-open":i}),s,{"aria-disabled":a||void 0}),n)},cm=lm,um=["data"],dm=function(t,n){var a=t.theme.spacing;return n?{}:{paddingBottom:a.baseUnit*2,paddingTop:a.baseUnit*2}},fm=function(t){var n=t.children,a=t.cx,r=t.getStyles,o=t.getClassNames,s=t.Heading,i=t.headingProps,l=t.innerProps,g=t.label,u=t.theme,d=t.selectProps;return Se("div",Me({},ct(t,"group",{group:!0}),l),Se(s,Me({},i,{selectProps:d,theme:u,getStyles:r,getClassNames:o,cx:a}),g),Se("div",null,n))},gm=function(t,n){var a=t.theme,r=a.colors,o=a.spacing;return Ee({label:"group",cursor:"default",display:"block"},n?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},hm=function(t){var n=wc(t);n.data;var a=sr(n,um);return Se("div",Me({},ct(t,"groupHeading",{"group-heading":!0}),a))},pm=fm,bm=["innerRef","isDisabled","isHidden","inputClassName"],mm=function(t,n){var a=t.isDisabled,r=t.value,o=t.theme,s=o.spacing,i=o.colors;return Ee(Ee({visibility:a?"hidden":"visible",transform:r?"translateZ(0)":""},vm),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:i.neutral80})},Dc={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},vm={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Dc)},ym=function(t){return Ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Dc)},xm=function(t){var n=t.cx,a=t.value,r=wc(t),o=r.innerRef,s=r.isDisabled,i=r.isHidden,l=r.inputClassName,g=sr(r,bm);return Se("div",Me({},ct(t,"input",{"input-container":!0}),{"data-value":a||""}),Se("input",Me({className:n({input:!0},l),ref:o,style:ym(i),disabled:s},g)))},wm=xm,km=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors;return Ee({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},Cm=function(t,n){var a=t.theme,r=a.borderRadius,o=a.colors,s=t.cropWithEllipsis;return Ee({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Sm=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors,i=t.isFocused;return Ee({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:i?s.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},_c=function(t){var n=t.children,a=t.innerProps;return Se("div",a,n)},Em=_c,Nm=_c;function Om(e){var t=e.children,n=e.innerProps;return Se("div",Me({role:"button"},n),t||Se(Es,{size:14}))}var Tm=function(t){var n=t.children,a=t.components,r=t.data,o=t.innerProps,s=t.isDisabled,i=t.removeProps,l=t.selectProps,g=a.Container,u=a.Label,d=a.Remove;return Se(g,{data:r,innerProps:Ee(Ee({},ct(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},Se(u,{data:r,innerProps:Ee({},ct(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Se(d,{data:r,innerProps:Ee(Ee({},ct(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),s Line truncated
`]))),om=function(t,n){var a=t.isFocused,r=t.size,o=t.theme,s=o.colors,i=o.spacing.baseUnit;return Ee({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},n?{}:{color:a?s.neutral60:s.neutral20,padding:i*2})},Ns=function(t){var n=t.delay,a=t.offset;return Se("span",{css:ys({animation:"".concat(am," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},sm=function(t){var n=t.innerProps,a=t.isRtl,r=t.size,o=r===void 0?4:r,s=sr(t,Zb);return Se("div",Me({},ct(Ee(Ee({},s),{},{innerProps:n,isRtl:a,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Se(Ns,{delay:0,offset:a}),Se(Ns,{delay:160,offset:!0}),Se(Ns,{delay:320,offset:!a}))},im=function(t,n){var a=t.isDisabled,r=t.isFocused,o=t.theme,s=o.colors,i=o.borderRadius,l=o.spacing;return Ee({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:a?s.neutral5:s.neutral0,borderColor:a?s.neutral10:r?s.primary:s.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:r?s.primary:s.neutral30}})},lm=function(t){var n=t.children,a=t.isDisabled,r=t.isFocused,o=t.innerRef,s=t.innerProps,i=t.menuIsOpen;return Se("div",Me({ref:o},ct(t,"control",{control:!0,"control--is-disabled":a,"control--is-focused":r,"control--menu-is-open":i}),s,{"aria-disabled":a||void 0}),n)},cm=lm,um=["data"],dm=function(t,n){var a=t.theme.spacing;return n?{}:{paddingBottom:a.baseUnit*2,paddingTop:a.baseUnit*2}},fm=function(t){var n=t.children,a=t.cx,r=t.getStyles,o=t.getClassNames,s=t.Heading,i=t.headingProps,l=t.innerProps,g=t.label,u=t.theme,d=t.selectProps;return Se("div",Me({},ct(t,"group",{group:!0}),l),Se(s,Me({},i,{selectProps:d,theme:u,getStyles:r,getClassNames:o,cx:a}),g),Se("div",null,n))},gm=function(t,n){var a=t.theme,r=a.colors,o=a.spacing;return Ee({label:"group",cursor:"default",display:"block"},n?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},hm=function(t){var n=wc(t);n.data;var a=sr(n,um);return Se("div",Me({},ct(t,"groupHeading",{"group-heading":!0}),a))},pm=fm,bm=["innerRef","isDisabled","isHidden","inputClassName"],mm=function(t,n){var a=t.isDisabled,r=t.value,o=t.theme,s=o.spacing,i=o.colors;return Ee(Ee({visibility:a?"hidden":"visible",transform:r?"translateZ(0)":""},vm),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:i.neutral80})},Dc={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},vm={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ee({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Dc)},ym=function(t){return Ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Dc)},xm=function(t){var n=t.cx,a=t.value,r=wc(t),o=r.innerRef,s=r.isDisabled,i=r.isHidden,l=r.inputClassName,g=sr(r,bm);return Se("div",Me({},ct(t,"input",{"input-container":!0}),{"data-value":a||""}),Se("input",Me({className:n({input:!0},l),ref:o,style:ym(i),disabled:s},g)))},wm=xm,km=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors;return Ee({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},Cm=function(t,n){var a=t.theme,r=a.borderRadius,o=a.colors,s=t.cropWithEllipsis;return Ee({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Sm=function(t,n){var a=t.theme,r=a.spacing,o=a.borderRadius,s=a.colors,i=t.isFocused;return Ee({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:i?s.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},_c=function(t){var n=t.children,a=t.innerProps;return Se("div",a,n)},Em=_c,Nm=_c;function Om(e){var t=e.children,n=e.innerProps;return Se("div",Me({role:"button"},n),t||Se(Es,{size:14}))}var Tm=function(t){var n=t.children,a=t.components,r=t.data,o=t.innerProps,s=t.isDisabled,i=t.removeProps,l=t.selectProps,g=a.Container,u=a.Label,d=a.Remove;return Se(g,{data:r,innerProps:Ee(Ee({},ct(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},Se(u,{data:r,innerProps:Ee({},ct(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Se(d,{data:r,innerProps:Ee(Ee({},ct(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),s Line truncated
px-4 py-2.5 bg-gray-100 dark:bg-gray-700
border-0 rounded-xl
text-gray-700 dark:text-gray-200 font-medium
@@ -229,27 +229,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
text-left cursor-pointer
disabled:opacity-50 disabled:cursor-not-allowed
min-w-[200px]
`,"aria-haspopup":"listbox","aria-expanded":f,children:[c.jsxs(_,{className:"flex items-center gap-2",children:[g,c.jsx(Z,{className:"truncate",children:N})]}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&c.jsxs(_,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden min-w-[280px]",role:"listbox",children:[c.jsx(_,{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx("input",{id:O,type:"text",value:v,onChange:k,placeholder:r,className:"w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent focus:outline-none"})}),c.jsxs(_,{className:"max-h-80 overflow-auto",children:[A&&c.jsx(_,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:i}),D&&c.jsx(_,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:s}),$&&c.jsx(_,{className:"py-2",children:E.map(M=>{const L=w(M.value);return c.jsxs(re,{type:"button",onClick:()=>!M.disabled&&y(M.value),disabled:M.disabled,className:`
`,"aria-haspopup":"listbox","aria-expanded":f,children:[c.jsxs(D,{className:"flex items-center gap-2",children:[g,c.jsx(Z,{className:"truncate",children:N})]}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&c.jsxs(D,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden min-w-[280px]",role:"listbox",children:[c.jsx(D,{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:c.jsx("input",{id:O,type:"text",value:v,onChange:k,placeholder:r,className:"w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent focus:outline-none"})}),c.jsxs(D,{className:"max-h-80 overflow-auto",children:[A&&c.jsx(D,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:i}),_&&c.jsx(D,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:s}),F&&c.jsx(D,{className:"py-2",children:S.map(M=>{const L=w(M.value);return c.jsxs(re,{type:"button",onClick:()=>!M.disabled&&y(M.value),disabled:M.disabled,className:`
w-full px-4 py-3 text-left
flex items-start gap-3
hover:bg-gray-100 dark:hover:bg-gray-700
transition-colors
${M.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":L,children:[c.jsx(_,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:L&&c.jsx(gr,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),c.jsxs(_,{className:"flex-1 min-w-0",children:[c.jsx(_,{className:`font-medium ${L?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:M.label}),M.description&&c.jsx(_,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:M.description})]})]},M.value)})})]})]})]})},Un={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},$v=({options:e=[],value:t=[],onChange:n,placeholder:a="No items selected",disabled:r=!1,className:o=""})=>{const s=m.useCallback(u=>e.find(f=>String(f.value)===String(u))?.label||String(u),[e]),i=m.useCallback(u=>{if(r)return;const d=t.filter(f=>String(f)!==String(u));n?.(d)},[t,n,r]),l=m.useMemo(()=>t.map(u=>({value:u,label:s(u)})),[t,s]),g=`${Un.container.base} ${r?Un.container.disabled:""} ${o}`.trim();return c.jsx(_,{className:g,children:l.length===0?c.jsx(Z,{className:Un.placeholder,children:a}):l.map(u=>c.jsxs(Z,{className:Un.tag,children:[u.label,!r&&c.jsx(Z,{className:Un.tagRemove,onClick:()=>i(u.value),role:"button","aria-label":`Remove ${u.label}`,children:c.jsx(gr,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},u.value))})};function Fv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>a=>{t.forEach(r=>r(a))},t)}const Ya=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rr(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Fs(e){return"nodeType"in e}function Mt(e){var t,n;return e?Rr(e)?e:Fs(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Us(e){const{Document:t}=Mt(e);return e instanceof t}function Vn(e){return Rr(e)?!1:e instanceof Mt(e).HTMLElement}function gu(e){return e instanceof Mt(e).SVGElement}function en(e){return e?Rr(e)?e.document:Fs(e)?Us(e)?e:Vn(e)||gu(e)?e.ownerDocument:document:document:document}const Qt=Ya?m.useLayoutEffect:m.useEffect;function qa(e){const t=m.useRef(e);return Qt(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return t.current==null?void 0:t.current(...a)},[])}function Uv(){const e=m.useRef(null),t=m.useCallback((a,r)=>{e.current=setInterval(a,r)},[]),n=m.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Hn(e,t){t===void 0&&(t=[e]);const n=m.useRef(e);return Qt(()=>{n.current!==e&&(n.current=e)},t),n}function jn(e,t){const n=m.useRef();return m.useMemo(()=>{const a=e(n.current);return n.current=a,a},[...t])}function Ka(e){const t=qa(e),n=m.useRef(null),a=m.useCallback(r=>{r!==n.current&&t?.(r,n.current),n.current=r},[]);return[n,a]}function Xa(e){const t=m.useRef();return m.useEffect(()=>{t.current=e},[e]),t.current}let Vs={};function zn(e,t){return m.useMemo(()=>{if(t)return t;const n=Vs[e]==null?0:Vs[e]+1;return Vs[e]=n,e+"-"+n},[e,t])}function hu(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return a.reduce((o,s)=>{const i=Object.entries(s);for(const[l,g]of i){const u=o[l];u!=null&&(o[l]=u+e*g)}return o},{...t})}}const tn=hu(1),Gn=hu(-1);function Vv(e){return"clientX"in e&&"clientY"in e}function Za(e){if(!e)return!1;const{KeyboardEvent:t}=Mt(e.target);return t&&e instanceof t}function Hv(e){if(!e)return!1;const{TouchEvent:t}=Mt(e.target);return t&&e instanceof t}function Qa(e){if(Hv(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Vv(e)?{x:e.clientX,y:e.clientY}:null}const ur=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ur.Translate.toString(e),ur.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:a}=e;return t+" "+n+"ms "+a}}}),pu="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function jv(e){return e.matches(pu)?e:e.querySelector(pu)}const zv={display:"none"};function Gv(e){let{id:t,value:n}=e;return m.createElement("div",{id:t,style:zv},n)}function Bv(e){le Line truncated
`,role:"option","aria-selected":L,children:[c.jsx(D,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:L&&c.jsx(gr,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),c.jsxs(D,{className:"flex-1 min-w-0",children:[c.jsx(D,{className:`font-medium ${L?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:M.label}),M.description&&c.jsx(D,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:M.description})]})]},M.value)})})]})]})]})},Un={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},$v=({options:e=[],value:t=[],onChange:n,placeholder:a="No items selected",disabled:r=!1,className:o=""})=>{const s=m.useCallback(u=>e.find(f=>String(f.value)===String(u))?.label||String(u),[e]),i=m.useCallback(u=>{if(r)return;const d=t.filter(f=>String(f)!==String(u));n?.(d)},[t,n,r]),l=m.useMemo(()=>t.map(u=>({value:u,label:s(u)})),[t,s]),g=`${Un.container.base} ${r?Un.container.disabled:""} ${o}`.trim();return c.jsx(D,{className:g,children:l.length===0?c.jsx(Z,{className:Un.placeholder,children:a}):l.map(u=>c.jsxs(Z,{className:Un.tag,children:[u.label,!r&&c.jsx(Z,{className:Un.tagRemove,onClick:()=>i(u.value),role:"button","aria-label":`Remove ${u.label}`,children:c.jsx(gr,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},u.value))})};function Fv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>a=>{t.forEach(r=>r(a))},t)}const Ya=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rr(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Fs(e){return"nodeType"in e}function Mt(e){var t,n;return e?Rr(e)?e:Fs(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Us(e){const{Document:t}=Mt(e);return e instanceof t}function Vn(e){return Rr(e)?!1:e instanceof Mt(e).HTMLElement}function gu(e){return e instanceof Mt(e).SVGElement}function en(e){return e?Rr(e)?e.document:Fs(e)?Us(e)?e:Vn(e)||gu(e)?e.ownerDocument:document:document:document}const Qt=Ya?m.useLayoutEffect:m.useEffect;function qa(e){const t=m.useRef(e);return Qt(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return t.current==null?void 0:t.current(...a)},[])}function Uv(){const e=m.useRef(null),t=m.useCallback((a,r)=>{e.current=setInterval(a,r)},[]),n=m.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Hn(e,t){t===void 0&&(t=[e]);const n=m.useRef(e);return Qt(()=>{n.current!==e&&(n.current=e)},t),n}function jn(e,t){const n=m.useRef();return m.useMemo(()=>{const a=e(n.current);return n.current=a,a},[...t])}function Ka(e){const t=qa(e),n=m.useRef(null),a=m.useCallback(r=>{r!==n.current&&t?.(r,n.current),n.current=r},[]);return[n,a]}function Xa(e){const t=m.useRef();return m.useEffect(()=>{t.current=e},[e]),t.current}let Vs={};function zn(e,t){return m.useMemo(()=>{if(t)return t;const n=Vs[e]==null?0:Vs[e]+1;return Vs[e]=n,e+"-"+n},[e,t])}function hu(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return a.reduce((o,s)=>{const i=Object.entries(s);for(const[l,g]of i){const u=o[l];u!=null&&(o[l]=u+e*g)}return o},{...t})}}const tn=hu(1),Gn=hu(-1);function Vv(e){return"clientX"in e&&"clientY"in e}function Za(e){if(!e)return!1;const{KeyboardEvent:t}=Mt(e.target);return t&&e instanceof t}function Hv(e){if(!e)return!1;const{TouchEvent:t}=Mt(e.target);return t&&e instanceof t}function Qa(e){if(Hv(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Vv(e)?{x:e.clientX,y:e.clientY}:null}const ur=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ur.Translate.toString(e),ur.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:a}=e;return t+" "+n+"ms "+a}}}),pu="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function jv(e){return e.matches(pu)?e:e.querySelector(pu)}const zv={display:"none"};function Gv(e){let{id:t,value:n}=e;return m.createElement("div",{id:t,style:zv},n)}function Bv(e){le Line truncated
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},Xv={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Zv(e){let{announcements:t=Xv,container:n,hiddenTextDescribedById:a,screenReaderInstructions:r=Kv}=e;const{announce:o,announcement:s}=Wv(),i=zn("DndLiveRegion"),[l,g]=m.useState(!1);if(m.useEffect(()=>{g(!0)},[]),Yv(m.useMemo(()=>({onDragStart(d){let{active:f}=d;o(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;t.onDragMove&&o(t.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;o(t.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;o(t.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;o(t.onDragCancel({active:f,over:h}))}}),[o,t])),!l)return null;const u=m.createElement(m.Fragment,null,m.createElement(Gv,{id:a,value:r.draggable}),m.createElement(Bv,{id:i,announcement:s}));return n?ar.createPortal(u,n):u}var ht;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ht||(ht={}));function Ja(){}function rn(e,t){return m.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Hs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>[...t].filter(a=>a!=null),[...t])}const Jt=Object.freeze({x:0,y:0});function mu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Qv(e,t){const n=Qa(e);if(!n)return"0 0";const a={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return a.x+"% "+a.y+"%"}function vu(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return n-a}function Jv(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return a-n}function yu(e){let{left:t,top:n,height:a,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+a},{x:t+r,y:n+a}]}function xu(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function wu(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const js=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=wu(t,t.left,t.top),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=mu(wu(l),r);o.push({id:i,data:{droppableContainer:s,value:g}})}}return o.sort(vu)},Rv=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=yu(t),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=yu(l),u=r.reduce((f,h,v)=>f+mu(g[v],h),0),d=Number((u/4).toFixed(4));o.push({id:i,data:{droppableContainer:s,value:d}})}}return o.sort(vu)};function ey(e,t){const n=Math.max(t.top,e.top),a=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=r-a,i=o-n;if(a<r&&n<o){const l=t.width*t.height,g=e.width*e.height,u=s*i,d=u/(l+g-u);return Number(d.toFixed(4))}return 0}const ty=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=[];for(const o of a){const{id:s}=o,i=n.get(s);if(i){const l=ey(i,t);l>0&&r.push({id:s,data:{droppableContainer:o,value:l}})}}return r.sort(Jv)};function ry(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ku(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jt}function ny(e){return function(n){for(var a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>({...s,top:s.top+e*i.y,bottom:s.bottom+e*i.y,left:s.left+e*i.x,right:s.right+e*i.x}),{...n})}}const ay=ny(1);function Cu(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function oy(e,t,n){const a=Cu(t);if(!a)return e;const{scaleX:r,scaleY:o,x:s,y:i}=a,l=e.left-s-(1-r)*parseFloat(n),g=e.top-i-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:g,right:l+u,bottom:g+d,left:l}}const sy={ignoreTransform:!1};function nn(e,t){t===void 0&&(t=sy);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:u}=Mt(e).getComputedStyle(e);g&&(n=oy(n,g,u))}const{top:a,left:r,width:o,height:s,bottom:i,right:l}=n;return{top:a,left:r,width:o,height:s,bottom:i,right:l}}function Su(e){return nn(e,{ignoreTransform:!0})}function iy(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ly(e,t){return t===void 0&&(t=Mt(e).getComputedStyle(e)),t.posit Line truncated
`},Xv={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Zv(e){let{announcements:t=Xv,container:n,hiddenTextDescribedById:a,screenReaderInstructions:r=Kv}=e;const{announce:o,announcement:s}=Wv(),i=zn("DndLiveRegion"),[l,g]=m.useState(!1);if(m.useEffect(()=>{g(!0)},[]),Yv(m.useMemo(()=>({onDragStart(d){let{active:f}=d;o(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:h}=d;t.onDragMove&&o(t.onDragMove({active:f,over:h}))},onDragOver(d){let{active:f,over:h}=d;o(t.onDragOver({active:f,over:h}))},onDragEnd(d){let{active:f,over:h}=d;o(t.onDragEnd({active:f,over:h}))},onDragCancel(d){let{active:f,over:h}=d;o(t.onDragCancel({active:f,over:h}))}}),[o,t])),!l)return null;const u=m.createElement(m.Fragment,null,m.createElement(Gv,{id:a,value:r.draggable}),m.createElement(Bv,{id:i,announcement:s}));return n?ar.createPortal(u,n):u}var ht;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ht||(ht={}));function Ja(){}function rn(e,t){return m.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Hs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.useMemo(()=>[...t].filter(a=>a!=null),[...t])}const Jt=Object.freeze({x:0,y:0});function mu(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Qv(e,t){const n=Qa(e);if(!n)return"0 0";const a={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return a.x+"% "+a.y+"%"}function vu(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return n-a}function Jv(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return a-n}function yu(e){let{left:t,top:n,height:a,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+a},{x:t+r,y:n+a}]}function xu(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function wu(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const js=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=wu(t,t.left,t.top),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=mu(wu(l),r);o.push({id:i,data:{droppableContainer:s,value:g}})}}return o.sort(vu)},Rv=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=yu(t),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=yu(l),u=r.reduce((f,h,v)=>f+mu(g[v],h),0),d=Number((u/4).toFixed(4));o.push({id:i,data:{droppableContainer:s,value:d}})}}return o.sort(vu)};function ey(e,t){const n=Math.max(t.top,e.top),a=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=r-a,i=o-n;if(a<r&&n<o){const l=t.width*t.height,g=e.width*e.height,u=s*i,d=u/(l+g-u);return Number(d.toFixed(4))}return 0}const ty=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=[];for(const o of a){const{id:s}=o,i=n.get(s);if(i){const l=ey(i,t);l>0&&r.push({id:s,data:{droppableContainer:o,value:l}})}}return r.sort(Jv)};function ry(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ku(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jt}function ny(e){return function(n){for(var a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>({...s,top:s.top+e*i.y,bottom:s.bottom+e*i.y,left:s.left+e*i.x,right:s.right+e*i.x}),{...n})}}const ay=ny(1);function Cu(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function oy(e,t,n){const a=Cu(t);if(!a)return e;const{scaleX:r,scaleY:o,x:s,y:i}=a,l=e.left-s-(1-r)*parseFloat(n),g=e.top-i-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:g,right:l+u,bottom:g+d,left:l}}const sy={ignoreTransform:!1};function nn(e,t){t===void 0&&(t=sy);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:u}=Mt(e).getComputedStyle(e);g&&(n=oy(n,g,u))}const{top:a,left:r,width:o,height:s,bottom:i,right:l}=n;return{top:a,left:r,width:o,height:s,bottom:i,right:l}}function Su(e){return nn(e,{ignoreTransform:!0})}function iy(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ly(e,t){return t===void 0&&(t=Mt(e).getComputedStyle(e)),t.posit Line truncated
w-full flex items-center justify-between px-3 py-2
bg-white dark:bg-gray-800
border border-gray-300 dark:border-gray-600 rounded-lg
text-left text-sm
${i?"opacity-50 cursor-not-allowed":"hover:border-gray-400 dark:hover:border-gray-500"}
focus:outline-none focus:ring-2 focus:ring-blue-500
`,children:[c.jsx(_,{className:"flex items-center gap-2",children:v?c.jsxs(c.Fragment,{children:[c.jsx(ne,{name:v.faIcon,className:"w-4 h-4 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:v.label})]}):c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:a})}),c.jsx(ne,{name:"chevron-down",className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${g?"rotate-180":""}`})]}),l&&c.jsx("input",{type:"hidden",name:l,value:e||""}),g&&c.jsxs(_,{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-72 overflow-hidden",children:[c.jsx(_,{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:c.jsx(ft,{type:"text",value:d,onChange:b=>f(b.target.value),placeholder:r,className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white",autoFocus:!0})}),c.jsx(_,{className:"max-h-56 overflow-y-auto",children:p.length>0?p.map(b=>c.jsxs(re,{type:"button",onClick:()=>x(b),className:`
`,children:[c.jsx(D,{className:"flex items-center gap-2",children:v?c.jsxs(c.Fragment,{children:[c.jsx(ne,{name:v.faIcon,className:"w-4 h-4 text-gray-600 dark:text-gray-400"}),c.jsx(Z,{className:"text-gray-900 dark:text-white",children:v.label})]}):c.jsx(Z,{className:"text-gray-500 dark:text-gray-400",children:a})}),c.jsx(ne,{name:"chevron-down",className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${g?"rotate-180":""}`})]}),l&&c.jsx("input",{type:"hidden",name:l,value:e||""}),g&&c.jsxs(D,{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-72 overflow-hidden",children:[c.jsx(D,{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:c.jsx(ft,{type:"text",value:d,onChange:b=>f(b.target.value),placeholder:r,className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white",autoFocus:!0})}),c.jsx(D,{className:"max-h-56 overflow-y-auto",children:p.length>0?p.map(b=>c.jsxs(re,{type:"button",onClick:()=>x(b),className:`
w-full flex items-center gap-3 px-3 py-2 text-left text-sm
${v?.faIcon===b.faIcon?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"}
`,children:[c.jsx(ne,{name:b.faIcon,className:"w-4 h-4"}),c.jsx(Z,{children:b.label}),v?.faIcon===b.faIcon&&c.jsx(ne,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},b.value)):c.jsx(_,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},ei=({defaultOpen:e=!1,isOpen:t,onToggle:n,className:a="",style:r,children:o,disabled:s=!1})=>{const[i,l]=m.useState(e),g=t!==void 0,u=g?t:i,d=m.useRef(null),[f,h]=m.useState(e?void 0:0),v=()=>{if(s)return;const x=!u;g||l(x),n?.(x)};m.useEffect(()=>{if(d.current)if(u){h(d.current.scrollHeight);const x=setTimeout(()=>{h(void 0)},300);return()=>clearTimeout(x)}else h(d.current.scrollHeight),requestAnimationFrame(()=>{h(0)})},[u]);const p={};if(m.Children.forEach(o,x=>{if(m.isValidElement(x)){const b=x.props?.slot;b==="trigger"?p.trigger=x:b==="content"&&(p.content=x)}}),!p.trigger&&!p.content){const x=m.Children.toArray(o);x.length>=2?(p.trigger=x[0],p.content=x.slice(1)):x.length===1&&(p.content=x[0])}return c.jsxs(_,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${a}`,style:r,children:[c.jsxs(re,{type:"button",onClick:v,disabled:s,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${s?"opacity-50 cursor-not-allowed":""} ${u?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":u,children:[c.jsx(_,{className:"flex-1",children:p.trigger}),!p.trigger&&c.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c.jsx(_,{ref:d,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:f!==void 0?`${f}px`:"auto"},children:c.jsx(_,{className:"bg-white dark:bg-gray-800",children:p.content})})]})},Jn=window.G7Core,ld=Jn?.useControllableState,Ox=(e,t)=>window.G7Core?.t?.(e,t)??e,Tx={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},Mx=({options:e,value:t,onChange:n,disabled:a=!1})=>{const[r,o]=m.useState(!1),[s,i]=m.useState({}),l=m.useRef(null),g=e.find(d=>d.value===t)??e[0];m.useEffect(()=>{if(!r)return;const d=h=>{l.current&&!l.current.contains(h.target)&&o(!1)},f=()=>{if(!l.current)return;const h=l.current.getBoundingClientRect();i({position:"fixed",top:h.bottom+4,right:window.innerWidth-h.right,zIndex:9999})};return document.addEventListener("mousedown",d),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",d),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[r]);const u=m.useCallback(()=>{if(a||!l.current)return;const d=l.current.getBoundingClientRect();i({position:"fixed",top:d.bottom+4,right:window.innerWidth-d.right,zIndex:9999}),o(f=>!f)},[a]);return c.jsxs(_,{ref:l,className:"relative flex-shrink-0",children:[c.jsxs(_,{role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),d.preventDefault(),u()},onMouseDown:d=>d.stopPropagation(),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.stopPropagation(),d.preventDefault(),u()),d.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${a?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[c.jsx(Z,{children:g?.label??""}),c.jsx(ne,{name:ue.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),r&&c.jsx(_,{style:s,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:e.map(d=>{const f=d.value??"",h=Tx[f],v=h?Ox(h):"",p=d.value===t;return c.jsxs(_,{role:"option","aria-selected":p,onClick:x=>{x.stopPropagation(),x.preventDefault(),n(d.value),o(!1)},onMouseDown:x=>x.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[c.jsxs(_,{className:"flex items-center justify-between",children:[c.jsx(Z,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:d.label}),p&&c.jsx(ne,{name:ue.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),v&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:v})]},f||"__null__")})})]})},Ix=(e,t)=>{if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r.id-o.id),a=[...t].sort((r,o)=>r.id-o.id);return n.every((r,o)=>r.id===a[o].id&&r.scope_type===a[o].scope_type)},Ax=({data:e=[],value:t=[],onChange:n,scopeOptions:a=[],className:r="",disabled:o=!1,desktopColumns:s=2,installedModules:i=[],installedPl Line truncated
`,children:[c.jsx(ne,{name:b.faIcon,className:"w-4 h-4"}),c.jsx(Z,{children:b.label}),v?.faIcon===b.faIcon&&c.jsx(ne,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},b.value)):c.jsx(D,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},ei=({defaultOpen:e=!1,isOpen:t,onToggle:n,className:a="",style:r,children:o,disabled:s=!1})=>{const[i,l]=m.useState(e),g=t!==void 0,u=g?t:i,d=m.useRef(null),[f,h]=m.useState(e?void 0:0),v=()=>{if(s)return;const x=!u;g||l(x),n?.(x)};m.useEffect(()=>{if(d.current)if(u){h(d.current.scrollHeight);const x=setTimeout(()=>{h(void 0)},300);return()=>clearTimeout(x)}else h(d.current.scrollHeight),requestAnimationFrame(()=>{h(0)})},[u]);const p={};if(m.Children.forEach(o,x=>{if(m.isValidElement(x)){const b=x.props?.slot;b==="trigger"?p.trigger=x:b==="content"&&(p.content=x)}}),!p.trigger&&!p.content){const x=m.Children.toArray(o);x.length>=2?(p.trigger=x[0],p.content=x.slice(1)):x.length===1&&(p.content=x[0])}return c.jsxs(D,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${a}`,style:r,children:[c.jsxs(re,{type:"button",onClick:v,disabled:s,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${s?"opacity-50 cursor-not-allowed":""} ${u?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":u,children:[c.jsx(D,{className:"flex-1",children:p.trigger}),!p.trigger&&c.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),c.jsx(D,{ref:d,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:f!==void 0?`${f}px`:"auto"},children:c.jsx(D,{className:"bg-white dark:bg-gray-800",children:p.content})})]})},Jn=window.G7Core,ld=Jn?.useControllableState,Ox=(e,t)=>window.G7Core?.t?.(e,t)??e,Tx={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},Mx=({options:e,value:t,onChange:n,disabled:a=!1})=>{const[r,o]=m.useState(!1),[s,i]=m.useState({}),l=m.useRef(null),g=e.find(d=>d.value===t)??e[0];m.useEffect(()=>{if(!r)return;const d=h=>{l.current&&!l.current.contains(h.target)&&o(!1)},f=()=>{if(!l.current)return;const h=l.current.getBoundingClientRect();i({position:"fixed",top:h.bottom+4,right:window.innerWidth-h.right,zIndex:9999})};return document.addEventListener("mousedown",d),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",d),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[r]);const u=m.useCallback(()=>{if(a||!l.current)return;const d=l.current.getBoundingClientRect();i({position:"fixed",top:d.bottom+4,right:window.innerWidth-d.right,zIndex:9999}),o(f=>!f)},[a]);return c.jsxs(D,{ref:l,className:"relative flex-shrink-0",children:[c.jsxs(D,{role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),d.preventDefault(),u()},onMouseDown:d=>d.stopPropagation(),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.stopPropagation(),d.preventDefault(),u()),d.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${a?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[c.jsx(Z,{children:g?.label??""}),c.jsx(ne,{name:ue.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),r&&c.jsx(D,{style:s,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:e.map(d=>{const f=d.value??"",h=Tx[f],v=h?Ox(h):"",p=d.value===t;return c.jsxs(D,{role:"option","aria-selected":p,onClick:x=>{x.stopPropagation(),x.preventDefault(),n(d.value),o(!1)},onMouseDown:x=>x.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[c.jsxs(D,{className:"flex items-center justify-between",children:[c.jsx(Z,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:d.label}),p&&c.jsx(ne,{name:ue.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),v&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:v})]},f||"__null__")})})]})},Ix=(e,t)=>{if(e.length!==t.length)return!1;const n=[...e].sort((r,o)=>r.id-o.id),a=[...t].sort((r,o)=>r.id-o.id);return n.every((r,o)=>r.id===a[o].id&&r.scope_type===a[o].scope_type)},Ax=({data:e=[],value:t=[],onChange:n,scopeOptions:a=[],className:r="",disabled:o=!1,desktopColumns:s=2,installedModules:i=[],installedPl Line truncated
let scriptImported = false
self.addEventListener('message', async (e) => {
const { file, id, imageCompressionLibUrl, options } = e.data
@@ -268,11 +268,11 @@ self.addEventListener('message', async (e) => {
self.postMessage({ error: e.message + '\\n' + e.stack, id })
}
})
`;let Ai;function K1(e,t){return new Promise(((n,a)=>{Ai||(Ai=(function(s){const i=[];return i.push(s),URL.createObjectURL(new Blob(i))})(q1));const r=new Worker(Ai);r.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)r.terminate();else if(s.data.progress===void 0){if(s.data.error)return a(new Error(s.data.error)),void r.terminate();n(s.data.file),r.terminate()}else t.onProgress(s.data.progress)})),r.addEventListener("error",a),t.signal&&t.signal.addEventListener("abort",(()=>{a(t.signal.reason),r.terminate()})),r.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Nt(e,t){return new Promise((function(n,a){let r,o,s,i,l,g;if(r={...t},s=0,{onProgress:i}=r,r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof r.useWebWorker!="boolean"||r.useWebWorker,delete r.useWebWorker,r.onProgress=h=>{s=h,typeof i=="function"&&i(s)},!(e instanceof Blob||e instanceof Y1))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(g=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||g)return Lf(e,r).then(function(h){try{return o=h,f.call(this)}catch(v){return a(v)}}.bind(this),a);var u=function(){try{return f.call(this)}catch(h){return a(h)}}.bind(this),d=function(h){try{return Lf(e,r).then((function(v){try{return o=v,u()}catch(p){return a(p)}}),a)}catch(v){return a(v)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",K1(e,r).then((function(h){try{return o=h,u()}catch{return d()}}),d)}catch{d()}function f(){try{o.name=e.name,o.lastModified=e.lastModified}catch{}try{r.preserveExif&&e.type==="image/jpeg"&&(!r.fileType||r.fileType&&r.fileType===e.type)&&(o=wf(e,o))}catch{}return n(o)}}))}Nt.getDataUrlFromFile=Ef,Nt.getFilefromDataUrl=Ii,Nt.loadImage=Nf,Nt.drawImageInCanvas=Tf,Nt.drawFileInCanvas=Co,Nt.canvasToFile=So,Nt.getExifOrientation=Mf,Nt.handleMaxWidthOrHeight=If,Nt.followExifOrientation=Af,Nt.cleanupCanvasMemory=dr,Nt.isAutoOrientationInBrowser=hn,Nt.approximateBelowMaximumCanvasSizeOfBrowser=Of,Nt.copyExifWithoutOrientation=wf,Nt.getBrowserName=$r,Nt.version="2.0.2";const X1=window.G7Core,Li=e=>{const t=["B","KB","MB","GB"];let n=0,a=e;for(;a>=1024&&n<t.length-1;)a/=1024,n++;return`${a.toFixed(2)} ${t[n]}`},Z1=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const n=Object.values(t.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},Q1=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",wt=(e,t)=>X1?.t?.(e,t)??e,Df=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...e)=>console.log("[Comp:FileUploader]",...e),warn:(...e)=>console.warn("[Comp:FileUploader]",...e),error:(...e)=>console.error("[Comp:FileUploader]",...e)},Fr=window.G7Core;function J1(e){const{attachmentableType:t,attachmentableId:n,collection:a,maxFiles:r,maxSize:o,maxConcurrentUploads:s,accept:i,imageCompression:l,roleIds:g,autoUpload:u,initialFiles:d,endpoints:f,onFilesChange:h,onUploadComplete:v,onUploadError:p,onRemove:x,onReorder:b,uploadTriggerEvent:O,confirmBeforeRemove:C,uploadParams:E}=e,[N,S]=m.useState(d),[k,y]=m.useState([]),[w,A]=m.useState(!1),D=m.useRef(null),$=m.useRef(0),M=m.useRef(new Set),L=m.useRef(new Map),[U,T]=m.useState(!1),[I,j]=m.useState(null),[V,z]=m.useState(!1),G=m.useRef(!1),[H,W]=m.useState([]),[B,F]=m.useState(!1),[Y,R]=m.useState(0),ae=m.useRef(0),[ee,X]=m.useState(new Map),oe=m.useRef(new Map),se=m.useRef(h);se.current=h,m.useEffect(()=>{se.current?.(k)},[k]),m.useEffect(()=>{if(G.current)return;const J=d.filter(xe=>!M.current.has(xe.id)&&(!xe.hash||!M.current.has(xe.hash))),be=new Set(J.map(xe=>xe.id)),he=Array.from(L.current.values()).filter(xe=>!be.has(xe.id)&&!M.current.has(xe.id));S([...J,...he])},[d]);const pe=m.useCallback(async J=>{const be={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await Nt(J,be)},[l]),we=m.useCallback(async J=>{const be=N.length+k.length,he=r-be,xe=Array.from(J).slice(0,he);for(const de of xe){if(de.size>o*1024*1024){p?.(`[${de.name}] 파일 크기(${Li(de.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,de);continue}if(i){const Ce="."+de.name.split(".").pop()?.toLowerCase();if(!i.split(",").map(Te=>Te.trim().toLowerCase()).includes(Ce)){p?.(`[${de.name}] 허용되지 않는 파일 형식입니다. (허용: ${i})`,de);continue}}const Pe={id:`pendinLine truncated
`;let Ai;function K1(e,t){return new Promise(((n,a)=>{Ai||(Ai=(function(s){const i=[];return i.push(s),URL.createObjectURL(new Blob(i))})(q1));const r=new Worker(Ai);r.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)r.terminate();else if(s.data.progress===void 0){if(s.data.error)return a(new Error(s.data.error)),void r.terminate();n(s.data.file),r.terminate()}else t.onProgress(s.data.progress)})),r.addEventListener("error",a),t.signal&&t.signal.addEventListener("abort",(()=>{a(t.signal.reason),r.terminate()})),r.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function Nt(e,t){return new Promise((function(n,a){let r,o,s,i,l,g;if(r={...t},s=0,{onProgress:i}=r,r.maxSizeMB=r.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof r.useWebWorker!="boolean"||r.useWebWorker,delete r.useWebWorker,r.onProgress=h=>{s=h,typeof i=="function"&&i(s)},!(e instanceof Blob||e instanceof Y1))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(g=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||g)return Lf(e,r).then(function(h){try{return o=h,f.call(this)}catch(v){return a(v)}}.bind(this),a);var u=function(){try{return f.call(this)}catch(h){return a(h)}}.bind(this),d=function(h){try{return Lf(e,r).then((function(v){try{return o=v,u()}catch(p){return a(p)}}),a)}catch(v){return a(v)}};try{return r.libURL=r.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",K1(e,r).then((function(h){try{return o=h,u()}catch{return d()}}),d)}catch{d()}function f(){try{o.name=e.name,o.lastModified=e.lastModified}catch{}try{r.preserveExif&&e.type==="image/jpeg"&&(!r.fileType||r.fileType&&r.fileType===e.type)&&(o=wf(e,o))}catch{}return n(o)}}))}Nt.getDataUrlFromFile=Ef,Nt.getFilefromDataUrl=Ii,Nt.loadImage=Nf,Nt.drawImageInCanvas=Tf,Nt.drawFileInCanvas=Co,Nt.canvasToFile=So,Nt.getExifOrientation=Mf,Nt.handleMaxWidthOrHeight=If,Nt.followExifOrientation=Af,Nt.cleanupCanvasMemory=dr,Nt.isAutoOrientationInBrowser=hn,Nt.approximateBelowMaximumCanvasSizeOfBrowser=Of,Nt.copyExifWithoutOrientation=wf,Nt.getBrowserName=$r,Nt.version="2.0.2";const X1=window.G7Core,Li=e=>{const t=["B","KB","MB","GB"];let n=0,a=e;for(;a>=1024&&n<t.length-1;)a/=1024,n++;return`${a.toFixed(2)} ${t[n]}`},Z1=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const n=Object.values(t.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},Q1=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",wt=(e,t)=>X1?.t?.(e,t)??e,Df=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...e)=>console.log("[Comp:FileUploader]",...e),warn:(...e)=>console.warn("[Comp:FileUploader]",...e),error:(...e)=>console.error("[Comp:FileUploader]",...e)},Fr=window.G7Core;function J1(e){const{attachmentableType:t,attachmentableId:n,collection:a,maxFiles:r,maxSize:o,maxConcurrentUploads:s,accept:i,imageCompression:l,roleIds:g,autoUpload:u,initialFiles:d,endpoints:f,onFilesChange:h,onUploadComplete:v,onUploadError:p,onRemove:x,onReorder:b,uploadTriggerEvent:O,confirmBeforeRemove:C,uploadParams:S}=e,[N,E]=m.useState(d),[k,y]=m.useState([]),[w,A]=m.useState(!1),_=m.useRef(null),F=m.useRef(0),M=m.useRef(new Set),L=m.useRef(new Map),[U,T]=m.useState(!1),[I,H]=m.useState(null),[$,z]=m.useState(!1),G=m.useRef(!1),[j,W]=m.useState([]),[B,V]=m.useState(!1),[Y,R]=m.useState(0),ae=m.useRef(0),[ee,X]=m.useState(new Map),oe=m.useRef(new Map),se=m.useRef(h);se.current=h,m.useEffect(()=>{se.current?.(k)},[k]),m.useEffect(()=>{if(G.current)return;const J=d.filter(xe=>!M.current.has(xe.id)&&(!xe.hash||!M.current.has(xe.hash))),be=new Set(J.map(xe=>xe.id)),he=Array.from(L.current.values()).filter(xe=>!be.has(xe.id)&&!M.current.has(xe.id));E([...J,...he])},[d]);const pe=m.useCallback(async J=>{const be={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await Nt(J,be)},[l]),we=m.useCallback(async J=>{const be=N.length+k.length,he=r-be,xe=Array.from(J).slice(0,he);for(const de of xe){if(de.size>o*1024*1024){p?.(`[${de.name}] 파일 크기(${Li(de.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,de);continue}if(i){const Ce="."+de.name.split(".").pop()?.toLowerCase();if(!i.split(",").map(Te=>Te.trim().toLowerCase()).includes(Ce)){p?.(`[${de.name}] 허용되지 않는 파일 형식입니다. (허용: ${i})`,de);continue}}const Pe={id:`pendinLine truncated
relative border-2 border-dashed rounded-lg transition-colors
${l?"opacity-60 cursor-not-allowed":""}
${e&&!l?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600"}
`,onDragOver:d=>{d.preventDefault(),u&&a(!0)},onDragLeave:()=>a(!1),onDrop:d=>{d.preventDefault(),a(!1),u&&n(d.dataTransfer.files)},children:[c.jsx("input",{ref:r,type:"file",multiple:!0,accept:o,onChange:d=>d.target.files&&!l&&n(d.target.files),className:"hidden",disabled:l}),!g&&c.jsxs(_,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&r.current?.click(),children:[c.jsx(lt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),c.jsx(dt,{className:"text-sm text-gray-600 dark:text-gray-400",children:wt("attachment.drop_or_click")}),c.jsxs(dt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[wt("attachment.upload_limit",{maxFiles:s,maxSize:i}),o&&` (${o})`]})]}),g]})},ek=window.G7Core,tk=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...e)=>console.log("[Comp:SortableThumbnail]",...e),warn:(...e)=>console.warn("[Comp:SortableThumbnail]",...e),error:(...e)=>console.error("[Comp:SortableThumbnail]",...e)},rk=({file:e,onRemove:t,onRetry:n,onImageClick:a,onDownload:r,isPrimary:o,onPrimaryClick:s,disabled:i})=>{const{attributes:l,listeners:g,setNodeRef:u,transform:d,transition:f,isDragging:h}=lo({id:"hash"in e?e.hash:e.id}),v={transform:ur.Transform.toString(d),transition:f,opacity:h?.5:1},p="status"in e&&e.status!==void 0,x=p?e.status:"done",b=x==="uploading",O=x==="compressing",C=x==="error",E=p?e.progress:100,N=p?e.preview:void 0,S=p?e.mime_type?.startsWith("image/")??!1:e.is_image,[k,y]=m.useState(void 0),w=!p&&S?e.download_url:void 0;m.useEffect(()=>{if(!w){y(void 0);return}let D=!0,$;return(async()=>{try{const L=await ek.api.get(w,{responseType:"blob"});D&&L&&($=URL.createObjectURL(L),y($))}catch(L){tk.error("Failed to load authenticated image:",L)}})(),()=>{D=!1,$&&URL.revokeObjectURL($)}},[w]);const A=k;return c.jsxs(_,{ref:u,style:v,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[c.jsxs(_,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${S||!p?"cursor-pointer":""}`,onClick:()=>{b||O||(S&&a?a():!p&&r&&r())},children:[N||A?c.jsx(or,{src:N||A,alt:e.original_filename,className:"w-full h-full object-cover"}):c.jsx(lt,{className:`fa-solid ${Q1(e.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||O)&&c.jsxs(_,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[c.jsx(_,{className:"w-3/4 h-2 bg-gray-700 rounded-full overflow-hidden",children:c.jsx(_,{className:"h-full bg-blue-500 transition-all",style:{width:`${E}%`}})}),c.jsxs(Z,{className:"text-white text-xs mt-1",children:[E,"%"]})]}),C&&c.jsx(_,{className:"absolute inset-0 bg-red-500/50 flex items-center justify-center",children:c.jsx(lt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),s&&c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),s()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:wt(o?"attachment.primary_image":"attachment.set_as_primary"),children:c.jsx(lt,{className:"fa-solid fa-star text-xs"})}),c.jsxs(_,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${i?"hidden":""}`,children:[c.jsx(re,{type:"button",...l,...g,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:wt("attachment.drag_to_reorder"),onClick:D=>D.stopPropagation(),children:c.jsx(lt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&r&&c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),r()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:wt("common.download"),children:c.jsx(lt,{className:"fa-solid fa-download text-sm"})}),C&&n&&c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:wt("common.retry"),children:c.jsx(lt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),c.jsx(re,{type:"button",onClick:D=>{D.stopPropagation(),t()},disabled:b||O,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:wt("common.delete"),children:c.jsx(lt,{className:"fa-solid fa-times text-sm"})})]})]}),c.jsxs(_,{className:`p-2 ${!p&&r?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&r&&r()},children:[c.jsx(dt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:e.original_filename,children:e.original_filename}),c.jsx(dt,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.siz Line truncated
`,onDragOver:d=>{d.preventDefault(),u&&a(!0)},onDragLeave:()=>a(!1),onDrop:d=>{d.preventDefault(),a(!1),u&&n(d.dataTransfer.files)},children:[c.jsx("input",{ref:r,type:"file",multiple:!0,accept:o,onChange:d=>d.target.files&&!l&&n(d.target.files),className:"hidden",disabled:l}),!g&&c.jsxs(D,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&r.current?.click(),children:[c.jsx(lt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),c.jsx(dt,{className:"text-sm text-gray-600 dark:text-gray-400",children:wt("attachment.drop_or_click")}),c.jsxs(dt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[wt("attachment.upload_limit",{maxFiles:s,maxSize:i}),o&&` (${o})`]})]}),g]})},ek=window.G7Core,tk=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...e)=>console.log("[Comp:SortableThumbnail]",...e),warn:(...e)=>console.warn("[Comp:SortableThumbnail]",...e),error:(...e)=>console.error("[Comp:SortableThumbnail]",...e)},rk=({file:e,onRemove:t,onRetry:n,onImageClick:a,onDownload:r,isPrimary:o,onPrimaryClick:s,disabled:i})=>{const{attributes:l,listeners:g,setNodeRef:u,transform:d,transition:f,isDragging:h}=lo({id:"hash"in e?e.hash:e.id}),v={transform:ur.Transform.toString(d),transition:f,opacity:h?.5:1},p="status"in e&&e.status!==void 0,x=p?e.status:"done",b=x==="uploading",O=x==="compressing",C=x==="error",S=p?e.progress:100,N=p?e.preview:void 0,E=p?e.mime_type?.startsWith("image/")??!1:e.is_image,[k,y]=m.useState(void 0),w=!p&&E?e.download_url:void 0;m.useEffect(()=>{if(!w){y(void 0);return}let _=!0,F;return(async()=>{try{const L=await ek.api.get(w,{responseType:"blob"});_&&L&&(F=URL.createObjectURL(L),y(F))}catch(L){tk.error("Failed to load authenticated image:",L)}})(),()=>{_=!1,F&&URL.revokeObjectURL(F)}},[w]);const A=k;return c.jsxs(D,{ref:u,style:v,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[c.jsxs(D,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${E||!p?"cursor-pointer":""}`,onClick:()=>{b||O||(E&&a?a():!p&&r&&r())},children:[N||A?c.jsx(or,{src:N||A,alt:e.original_filename,className:"w-full h-full object-cover"}):c.jsx(lt,{className:`fa-solid ${Q1(e.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||O)&&c.jsxs(D,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[c.jsx(D,{className:"w-3/4 h-2 bg-gray-700 rounded-full overflow-hidden",children:c.jsx(D,{className:"h-full bg-blue-500 transition-all",style:{width:`${S}%`}})}),c.jsxs(Z,{className:"text-white text-xs mt-1",children:[S,"%"]})]}),C&&c.jsx(D,{className:"absolute inset-0 bg-red-500/50 flex items-center justify-center",children:c.jsx(lt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),s&&c.jsx(re,{type:"button",onClick:_=>{_.stopPropagation(),s()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:wt(o?"attachment.primary_image":"attachment.set_as_primary"),children:c.jsx(lt,{className:"fa-solid fa-star text-xs"})}),c.jsxs(D,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${i?"hidden":""}`,children:[c.jsx(re,{type:"button",...l,...g,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:wt("attachment.drag_to_reorder"),onClick:_=>_.stopPropagation(),children:c.jsx(lt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&r&&c.jsx(re,{type:"button",onClick:_=>{_.stopPropagation(),r()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:wt("common.download"),children:c.jsx(lt,{className:"fa-solid fa-download text-sm"})}),C&&n&&c.jsx(re,{type:"button",onClick:_=>{_.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:wt("common.retry"),children:c.jsx(lt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),c.jsx(re,{type:"button",onClick:_=>{_.stopPropagation(),t()},disabled:b||O,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:wt("common.delete"),children:c.jsx(lt,{className:"fa-solid fa-times text-sm"})})]})]}),c.jsxs(D,{className:`p-2 ${!p&&r?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&r&&r()},children:[c.jsx(dt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:e.original_filename,children:e.original_filename}),c.jsx(dt,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.siz Line truncated
${v.radio}
text-blue-600
bg-gray-100 dark:bg-gray-700
@@ -285,10 +285,10 @@ self.addEventListener('message', async (e) => {
${v.label}
font-medium
text-gray-900 dark:text-gray-300
`,children:x.label})]},x.value)})}),g&&c.jsx(Z,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:g})]})},pn=()=>window.G7Core,Eo=(e,t)=>pn()?.t?.(e,t)??e,ok=()=>pn()?.locale?.supported?.()??["ko","en"],sk=()=>pn()?.locale?.current?.()??"ko",Pf=e=>{const t=Eo(`common.language_${e}`);return t===`common.language_${e}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[e]||e.toUpperCase():t},ik=({content:e="",value:t,onChange:n,multilingual:a=!1,isHtml:r=!1,onIsHtmlChange:o,rows:s=15,placeholder:i="",label:l,showHtmlModeToggle:g=!0,contentClassName:u="",purifyConfig:d,className:f="",name:h="content",htmlFieldName:v="content_mode",readOnly:p=!1})=>{const x=m.useMemo(()=>ok(),[]),b=m.useMemo(()=>sk(),[]),[O,C]=m.useState(b),[E,N]=m.useState(r),[S,k]=m.useState(e),[y,w]=m.useState(t??{}),[A,D]=m.useState(!1);m.useEffect(()=>{N(r)},[r]),m.useEffect(()=>{a||k(e)},[e,a]),m.useEffect(()=>{a&&t&&w(t)},[t,a]);const $=m.useCallback(V=>{const z=V.target.value;if(k(z),n){const G=pn()?.createChangeEvent?.({value:z,name:h,type:"textarea"})??{target:{name:h,value:z}};n(G)}},[n,h]),M=m.useCallback((V,z)=>{const G={...y,[V]:z};if(w(G),n){const H=pn()?.createChangeEvent?.({value:G,name:h,type:"multilingual"})??{target:{name:h,value:G}};n(H)}},[n,h,y]),L=m.useCallback(V=>{const z=V.target.checked;if(N(z),z||D(!1),o){const G=pn()?.createChangeEvent?.({checked:z,name:v,type:"checkbox"})??{target:{name:v,checked:z}};o(G)}},[o,v]),U=m.useCallback(()=>{D(V=>!V)},[]),T=a?y[O]??"":S,I=m.useCallback(V=>!!y[V]?.trim(),[y]),j=()=>c.jsx(_,{className:"flex items-center gap-2 mb-3",children:x.map(V=>{const z=V===b,G=O===V;return c.jsxs(re,{type:"button",className:`
`,children:x.label})]},x.value)})}),g&&c.jsx(Z,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:g})]})},pn=()=>window.G7Core,Eo=(e,t)=>pn()?.t?.(e,t)??e,ok=()=>pn()?.locale?.supported?.()??["ko","en"],sk=()=>pn()?.locale?.current?.()??"ko",Pf=e=>{const t=Eo(`common.language_${e}`);return t===`common.language_${e}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[e]||e.toUpperCase():t},ik=({content:e="",value:t,onChange:n,multilingual:a=!1,isHtml:r=!1,onIsHtmlChange:o,rows:s=15,placeholder:i="",label:l,showHtmlModeToggle:g=!0,contentClassName:u="",purifyConfig:d,className:f="",name:h="content",htmlFieldName:v="content_mode",readOnly:p=!1})=>{const x=m.useMemo(()=>ok(),[]),b=m.useMemo(()=>sk(),[]),[O,C]=m.useState(b),[S,N]=m.useState(r),[E,k]=m.useState(e),[y,w]=m.useState(t??{}),[A,_]=m.useState(!1);m.useEffect(()=>{N(r)},[r]),m.useEffect(()=>{a||k(e)},[e,a]),m.useEffect(()=>{a&&t&&w(t)},[t,a]);const F=m.useCallback($=>{const z=$.target.value;if(k(z),n){const G=pn()?.createChangeEvent?.({value:z,name:h,type:"textarea"})??{target:{name:h,value:z}};n(G)}},[n,h]),M=m.useCallback(($,z)=>{const G={...y,[$]:z};if(w(G),n){const j=pn()?.createChangeEvent?.({value:G,name:h,type:"multilingual"})??{target:{name:h,value:G}};n(j)}},[n,h,y]),L=m.useCallback($=>{const z=$.target.checked;if(N(z),z||_(!1),o){const G=pn()?.createChangeEvent?.({checked:z,name:v,type:"checkbox"})??{target:{name:v,checked:z}};o(G)}},[o,v]),U=m.useCallback(()=>{_($=>!$)},[]),T=a?y[O]??"":E,I=m.useCallback($=>!!y[$]?.trim(),[y]),H=()=>c.jsx(D,{className:"flex items-center gap-2 mb-3",children:x.map($=>{const z=$===b,G=O===$;return c.jsxs(re,{type:"button",className:`
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
${G?z?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":z?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>C(V),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),c.jsx(Z,{children:Pf(V)}),z&&c.jsx(Z,{className:"text-red-500",children:"*"}),I(V)&&!G&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},V)})});return c.jsxs(_,{className:`space-y-2 ${f}`,children:[c.jsxs(_,{className:"flex items-center justify-between",children:[l&&c.jsx(Ft,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),c.jsxs(_,{className:"flex items-center gap-3",children:[E&&!p&&c.jsx(re,{type:"button",onClick:U,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${A?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:Eo(A?"common.preview_off":"common.preview")}),g&&c.jsxs(Ft,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[c.jsx(ft,{type:"checkbox",name:v,checked:E,onChange:L,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),c.jsx(_,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Eo("common.html_mode")})]})]})]}),a&&j(),!A&&(a?x.map(V=>c.jsx(_,{className:O===V?"block":"hidden",children:c.jsx(vr,{name:`${h}[${V}]`,value:y[V]??"",onChange:z=>M(V,z.target.value),placeholder:`${i} (${Pf(V)})`,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${E?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},V)):c.jsx(vr,{name:h,value:S,onChange:$,placeholder:i,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${E?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),A&&c.jsx(_,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:c.jsx(qo,{content:T,isHtml:!0,className:u||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:d})})]})},$f="g7_dismissed_warnings";function Ff(){try{const e=sessionStorage.getItem($f);return e?JSON.parse(e):[]}catch{return[]}}function lk(e){try{const t=Ff();t.includes(e)||(t.push(e),sessionStorage.setItem($f,JSON.stringify(t)))}catch{}}function ck(e){switch(e){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const uk=({warnings:e,className:t=""})=>{const[n,a]=m.useState([]);m.useEffect(()=>{a(Ff())},[]);const r=m.useCallback(s=>{lk(s),a(i=>[...i,s])},[]);if(!e||e.length===0)return null;const o=e.filter(s=>!n.includes(s.id));return o.length===0?null:c.jsx(_,{className:`space-y-2 ${t}`.trim(),children:o.map(s=>c.jsx(wl,{type:ck(s.level),message:s.message,dismissible:!0,onDismiss:()=>r(s.id)},s.id))})},Uf=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...e)=>console.log("[Comp:FilterVisibility]",...e),warn:(...e)=>console.warn("[Comp:FilterVisibility]",...e),error:(...e)=>console.error("[Comp:FilterVisibility]",...e)},dk=({id:e,visibleFilters:t,defaultFilters:n=[],onFilterVisibilityChange:a})=>{const[r,o]=m.useState(!1),s=m.useRef(!0),i=m.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=m.useMemo(()=>`g7_filters_${e}${i!==void 0?`_${i}`:""}`,[e,i]),g=m.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const h=JSON.parse(f);if(Array.isArray(h))return h}}catch(f){Uf.warn("Failed to load from localStorage:",f)}return null},[l]),u=m.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(h){Uf.warn("Failed to save to localStorage:",h)}},[l]),d=m.useCallback(()=>{const f=g();return f||(t&&t.length>0?t:n)},[g,t,n]);return m.useEffect(()=>{if(!r){const f=d();a&&f.length>0&&a(f),o(!0)}},[r,a,d]),m.useEffect(()=>{if(r&&t&&t.length>0){if(s.current){s.current=!1;return}u(t)}},[r,t,u]),null},fk=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>console.log Line truncated
`,onClick:()=>C($),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),c.jsx(Z,{children:Pf($)}),z&&c.jsx(Z,{className:"text-red-500",children:"*"}),I($)&&!G&&c.jsx(ne,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},$)})});return c.jsxs(D,{className:`space-y-2 ${f}`,children:[c.jsxs(D,{className:"flex items-center justify-between",children:[l&&c.jsx(Ft,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),c.jsxs(D,{className:"flex items-center gap-3",children:[S&&!p&&c.jsx(re,{type:"button",onClick:U,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${A?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:Eo(A?"common.preview_off":"common.preview")}),g&&c.jsxs(Ft,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[c.jsx(ft,{type:"checkbox",name:v,checked:S,onChange:L,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),c.jsx(D,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Eo("common.html_mode")})]})]})]}),a&&H(),!A&&(a?x.map($=>c.jsx(D,{className:O===$?"block":"hidden",children:c.jsx(vr,{name:`${h}[${$}]`,value:y[$]??"",onChange:z=>M($,z.target.value),placeholder:`${i} (${Pf($)})`,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${S?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},$)):c.jsx(vr,{name:h,value:E,onChange:F,placeholder:i,rows:s,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${S?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),A&&c.jsx(D,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:c.jsx(qo,{content:T,isHtml:!0,className:u||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:d})})]})},$f="g7_dismissed_warnings";function Ff(){try{const e=sessionStorage.getItem($f);return e?JSON.parse(e):[]}catch{return[]}}function lk(e){try{const t=Ff();t.includes(e)||(t.push(e),sessionStorage.setItem($f,JSON.stringify(t)))}catch{}}function ck(e){switch(e){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const uk=({warnings:e,className:t=""})=>{const[n,a]=m.useState([]);m.useEffect(()=>{a(Ff())},[]);const r=m.useCallback(s=>{lk(s),a(i=>[...i,s])},[]);if(!e||e.length===0)return null;const o=e.filter(s=>!n.includes(s.id));return o.length===0?null:c.jsx(D,{className:`space-y-2 ${t}`.trim(),children:o.map(s=>c.jsx(wl,{type:ck(s.level),message:s.message,dismissible:!0,onDismiss:()=>r(s.id)},s.id))})},Uf=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...e)=>console.log("[Comp:FilterVisibility]",...e),warn:(...e)=>console.warn("[Comp:FilterVisibility]",...e),error:(...e)=>console.error("[Comp:FilterVisibility]",...e)},dk=({id:e,visibleFilters:t,defaultFilters:n=[],onFilterVisibilityChange:a})=>{const[r,o]=m.useState(!1),s=m.useRef(!0),i=m.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=m.useMemo(()=>`g7_filters_${e}${i!==void 0?`_${i}`:""}`,[e,i]),g=m.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const h=JSON.parse(f);if(Array.isArray(h))return h}}catch(f){Uf.warn("Failed to load from localStorage:",f)}return null},[l]),u=m.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(h){Uf.warn("Failed to save to localStorage:",h)}},[l]),d=m.useCallback(()=>{const f=g();return f||(t&&t.length>0?t:n)},[g,t,n]);return m.useEffect(()=>{if(!r){const f=d();a&&f.length>0&&a(f),o(!0)}},[r,a,d]),m.useEffect(()=>{if(r&&t&&t.length>0){if(s.current){s.current=!1;return}u(t)}},[r,t,u]),null},fk=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>console.log Line truncated
w-full px-4 py-2.5
bg-gray-100 dark:bg-gray-700
border-0 rounded-xl
@@ -297,11 +297,11 @@ self.addEventListener('message', async (e) => {
flex items-center justify-between gap-2
text-left cursor-pointer
disabled:opacity-50 disabled:cursor-not-allowed
`,"aria-haspopup":"listbox","aria-expanded":u,children:[c.jsx(_,{className:"flex-1 min-w-0",children:O()}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),u&&c.jsx(_,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:c.jsx(_,{className:"overflow-auto",style:{maxHeight:s},children:e.length===0?c.jsx(_,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:Vf("common.no_options")}):e.map((E,N)=>{const S=String(E.value)===String(t);return c.jsx(re,{type:"button",onClick:()=>!E.disabled&&x(E.value),disabled:E.disabled,className:`
`,"aria-haspopup":"listbox","aria-expanded":u,children:[c.jsx(D,{className:"flex-1 min-w-0",children:O()}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${u?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),u&&c.jsx(D,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:c.jsx(D,{className:"overflow-auto",style:{maxHeight:s},children:e.length===0?c.jsx(D,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:Vf("common.no_options")}):e.map((S,N)=>{const E=String(S.value)===String(t);return c.jsx(re,{type:"button",onClick:()=>!S.disabled&&x(S.value),disabled:S.disabled,className:`
w-full px-4 py-3 text-left
hover:bg-gray-100 dark:hover:bg-gray-700
transition-colors
${S?"bg-blue-50 dark:bg-blue-900/20":""}
${E.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":S,"data-item-value":E.value,"data-item-index":N,"data-item-selected":S,children:g?.item?Hf(g.item,{item:E,index:N,isSelected:S},`item-${N}`):i||C(E,S)},E.value)})})})]})};function pk(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}const bk=({value:e,checked:t=!1,icon:n,label:a,variant:r="blue",customColor:o,className:s="",style:i,onChange:l})=>{const[g,u]=m.useState(!1),d="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const p=pk(o),x=document.documentElement.classList.contains("dark");let b;return t?b={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:g?.85:1}:b=p?{backgroundColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${g?x?.25:.12:x?.15:.06})`,color:o,borderColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${x?.3:.2})`}:{},c.jsxs(Ft,{className:`${d} ${s}`,style:{...b,...i},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[c.jsx(ft,{type:"checkbox",value:e,checked:t,onChange:O=>{l?.(O)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(_,{children:a})]})}const v=t?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[r]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[r];return c.jsxs(Ft,{className:`${d} ${v} ${s}`,style:i,children:[c.jsx(ft,{type:"checkbox",value:e,checked:t,onChange:p=>{l?.(p)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(_,{children:a})]})},mk=({label:e,icon:t,iconPosition:n="left",position:a="right",className:r="",style:o,children:s})=>{const[i,l]=m.useState(!1),[g,u]=m.useState({top:0,left:0}),d=m.useRef(null),f=m.useRef(null),h=m.useCallback(()=>{if(!d.current)return;const p=d.current.getBoundingClientRect(),x=224;let b=a==="right"?p.right-x:p.left;const O=p.bottom+8;b<8&&(b=8),b+x>window.innerWidth-8&&(b=window.innerWidth-x-8),u({top:O,left:b})},[a]);m.useEffect(()=>{i&&h()},[i,h]),m.useEffect(()=>{if(!i)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[i]),m.useEffect(()=>{const p=x=>{const b=x.target,O=d.current?.contains(b),C=f.current?.contains(b);!O&&!C&&l(!1)};return i&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[i]);const v=i?ar.createPortal(c.jsx("div",{ref:f,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:g.top,left:g.left},onClick:()=>l(!1),children:s}),document.body):null;return c.jsxs(_,{className:`relative inline-block ${r}`,style:o,children:[c.jsxs(re,{ref:d,onClick:()=>l(!i),className:"flex items-center gap-2",children:[n==="left"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"}),e&&c.jsx(Z,{className:"text-sm font-medium",children:e}),n==="right"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"})]}),v]})},vk=({label:e,icon:t,variant:n="default",disabled:a=!1,divider:r=!1,className:o="",style:s,onClick:i})=>{if(r)return c.jsx(_,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:s});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",g=a?"opacity-50 cursor-not-allowed":"cursor-pointer",u=()=>{!a&&i&&i()};return c.jsxs(_,{onClick:u,className:`flex items-center gap-3 px-4 py-3 transition-colors ${l} ${g} ${o}`,styl Line truncated
${E?"bg-blue-50 dark:bg-blue-900/20":""}
${S.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":E,"data-item-value":S.value,"data-item-index":N,"data-item-selected":E,children:g?.item?Hf(g.item,{item:S,index:N,isSelected:E},`item-${N}`):i||C(S,E)},S.value)})})})]})};function pk(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}const bk=({value:e,checked:t=!1,icon:n,label:a,variant:r="blue",customColor:o,className:s="",style:i,onChange:l})=>{const[g,u]=m.useState(!1),d="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const p=pk(o),x=document.documentElement.classList.contains("dark");let b;return t?b={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:g?.85:1}:b=p?{backgroundColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${g?x?.25:.12:x?.15:.06})`,color:o,borderColor:`rgba(${p.r}, ${p.g}, ${p.b}, ${x?.3:.2})`}:{},c.jsxs(Ft,{className:`${d} ${s}`,style:{...b,...i},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[c.jsx(ft,{type:"checkbox",value:e,checked:t,onChange:O=>{l?.(O)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(D,{children:a})]})}const v=t?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[r]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[r];return c.jsxs(Ft,{className:`${d} ${v} ${s}`,style:i,children:[c.jsx(ft,{type:"checkbox",value:e,checked:t,onChange:p=>{l?.(p)},className:"hidden"}),n&&c.jsx(ne,{name:n,className:"w-4 h-4"}),c.jsx(D,{children:a})]})},mk=({label:e,icon:t,iconPosition:n="left",position:a="right",className:r="",style:o,children:s})=>{const[i,l]=m.useState(!1),[g,u]=m.useState({top:0,left:0}),d=m.useRef(null),f=m.useRef(null),h=m.useCallback(()=>{if(!d.current)return;const p=d.current.getBoundingClientRect(),x=224;let b=a==="right"?p.right-x:p.left;const O=p.bottom+8;b<8&&(b=8),b+x>window.innerWidth-8&&(b=window.innerWidth-x-8),u({top:O,left:b})},[a]);m.useEffect(()=>{i&&h()},[i,h]),m.useEffect(()=>{if(!i)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[i]),m.useEffect(()=>{const p=x=>{const b=x.target,O=d.current?.contains(b),C=f.current?.contains(b);!O&&!C&&l(!1)};return i&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[i]);const v=i?ar.createPortal(c.jsx("div",{ref:f,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:g.top,left:g.left},onClick:()=>l(!1),children:s}),document.body):null;return c.jsxs(D,{className:`relative inline-block ${r}`,style:o,children:[c.jsxs(re,{ref:d,onClick:()=>l(!i),className:"flex items-center gap-2",children:[n==="left"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"}),e&&c.jsx(Z,{className:"text-sm font-medium",children:e}),n==="right"&&t&&c.jsx(ne,{name:t,className:"w-4 h-4"})]}),v]})},vk=({label:e,icon:t,variant:n="default",disabled:a=!1,divider:r=!1,className:o="",style:s,onClick:i})=>{if(r)return c.jsx(D,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:s});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",g=a?"opacity-50 cursor-not-allowed":"cursor-pointer",u=()=>{!a&&i&&i()};return c.jsxs(D,{onClick:u,className:`flex items-center gap-3 px-4 py-3 transition-colors ${l} ${g} ${o}`,styl Line truncated
//# sourceMappingURL=components.iife.js.map
@@ -1 +1 @@
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/basic/I.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageLoading.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../node_modules/@babel/rLine truncated
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/basic/I.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageLoading.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../node_modules/@babel/rLine truncated
@@ -285,6 +285,19 @@
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
@@ -425,7 +438,8 @@
"method": "GET",
"query": {
"page": "{{(_global.notificationsCurrentPage ?? notifications?.data?.pagination?.current_page ?? 1) + 1}}",
"per_page": 15
"per_page": 15,
"read": "{{(_global.notificationsUnreadOnly ?? true) ? 'unread' : 'all'}}"
}
},
"onSuccess": [
@@ -681,6 +695,19 @@
}
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
@@ -821,7 +848,8 @@
"method": "GET",
"query": {
"page": "{{(_global.notificationsCurrentPage ?? notifications?.data?.pagination?.current_page ?? 1) + 1}}",
"per_page": 15
"per_page": 15,
"read": "{{(_global.notificationsUnreadOnly ?? true) ? 'unread' : 'all'}}"
}
},
"onSuccess": [
@@ -1,6 +1,6 @@
{
"name": "sirsoft-admin_basic",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "Gnuboard7 Basic Admin Template Components",
"type": "module",
"main": "dist/components.js",
@@ -1,4 +1,4 @@
import React, { useState, useRef, useEffect, useCallback } from 'react';
import React, { useState, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
import { Div } from '../basic/Div';
import { Button } from '../basic/Button';
import { Span } from '../basic/Span';
@@ -105,28 +105,55 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
}) => {
const [showNotifications, setShowNotifications] = useState(false);
const notificationRef = useRef<HTMLDivElement>(null);
const dropdownRef = useRef<HTMLDivElement>(null);
const scrollRef = useRef<HTMLDivElement>(null);
const sentinelRef = useRef<HTMLDivElement>(null);
const visibleUnreadIdsRef = useRef<Set<string | number>>(new Set());
// 무한스크롤 관련 최신 값 참조 (observer 재등록 없이 최신 prop 접근)
const onLoadMoreRef = useRef(onLoadMore);
const hasMoreRef = useRef(hasMore);
const loadingRef = useRef(loading);
const notificationsCountRef = useRef(notifications.length);
// 마지막 onLoadMore 발행 시점의 notifications.length — 동일 길이에서 중복 발행 가드
const lastRequestedCountRef = useRef<number>(-1);
useEffect(() => {
onLoadMoreRef.current = onLoadMore;
hasMoreRef.current = hasMore;
loadingRef.current = loading;
notificationsCountRef.current = notifications.length;
});
/**
* 무한스크롤 — IntersectionObserver
*
* observer는 드롭다운 열림/닫힘 전환 시에만 재등록한다.
* 목록이 append되거나 loading/hasMore가 바뀌어도 observer를 새로 만들지 않으므로,
* sentinel이 이미 뷰포트에 있는 상태에서 재등록 시 즉시 intersecting callback이
* 중복 발행되던 문제를 방지한다.
*/
useEffect(() => {
if (!sentinelRef.current || !scrollRef.current || !hasMore || loading || !showNotifications) return;
if (!sentinelRef.current || !scrollRef.current || !showNotifications) return;
// 드롭다운이 새로 열릴 때마다 중복 가드 초기화
lastRequestedCountRef.current = -1;
const observer = new IntersectionObserver(
([entry]) => {
if (entry.isIntersecting) {
onLoadMore?.();
}
if (!entry.isIntersecting) return;
if (loadingRef.current || !hasMoreRef.current) return;
// B안 가드: 같은 length에서 이미 한 번 발행했다면 skip
if (lastRequestedCountRef.current === notificationsCountRef.current) return;
lastRequestedCountRef.current = notificationsCountRef.current;
onLoadMoreRef.current?.();
},
{ root: scrollRef.current, threshold: 0.1 }
);
observer.observe(sentinelRef.current);
return () => observer.disconnect();
}, [hasMore, loading, showNotifications, onLoadMore, notifications.length]);
}, [showNotifications]);
/**
* 뷰포트 내 미읽음 알림 추적 — IntersectionObserver
@@ -156,19 +183,34 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
return () => observer.disconnect();
}, [showNotifications, notifications]);
/**
* 뱃지에 표시할 카운트 (handleClose 보다 먼저 선언 — deps 참조 순서)
*/
const displayCount = unreadCount > 0 ? unreadCount : notifications.filter((n) => !n.read).length;
/**
* 드롭다운 닫기 — 뷰포트에 들어온 미읽음 알림 ID 전달
*
* 불필요한 read-batch 호출 방지:
* 1) displayCount 가 0 이면 이미 모두 읽음/삭제 처리된 상태 → 전체 skip
* 2) 뷰포트에 나타났던 ID 중 현재 notifications 기준 여전히 unread 인 것만 전달
* ("모두 읽음" onSuccess 로 notifications 가 갱신되면 필터 결과가 빈 배열이 됨)
*/
const handleClose = useCallback(() => {
if (showNotifications) {
const ids = Array.from(visibleUnreadIdsRef.current);
if (ids.length > 0) {
onClose?.(ids);
if (displayCount > 0) {
const unreadIds = Array.from(visibleUnreadIdsRef.current).filter((id) => {
const n = notifications.find((item) => String(item.id) === String(id));
return n && !n.read;
});
if (unreadIds.length > 0) {
onClose?.(unreadIds);
}
}
visibleUnreadIdsRef.current.clear();
setShowNotifications(false);
}
}, [showNotifications, onClose]);
}, [showNotifications, onClose, displayCount, notifications]);
/**
* 외부 클릭 감지 — 드롭다운이 열려 있을 때만 리스너 등록
@@ -203,9 +245,36 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
}, [showNotifications, handleClose]);
/**
* 뱃지에 표시할 카운트
* 드롭다운 열릴 때 뷰포트 경계 검사 후 이탈량만큼 translateX 로 보정
*
* class 기반 left-0/right-0 전환은 부모 컨테이너 기준이라 부모가 뷰포트 가장자리에 있을 때
* 여전히 이탈할 수 있다. 따라서 초기 렌더 후 드롭다운의 실제 뷰포트 좌표를 측정하여
* 이탈한 픽셀만큼 반대 방향으로 이동시키는 방식을 사용한다.
*/
const displayCount = unreadCount > 0 ? unreadCount : notifications.filter((n) => !n.read).length;
useLayoutEffect(() => {
const dropdown = dropdownRef.current;
if (!showNotifications || !dropdown) return;
// 측정 전 기존 transform 초기화 (재측정 시 누적 방지)
dropdown.style.transform = '';
const rect = dropdown.getBoundingClientRect();
const vw = typeof window !== 'undefined' ? window.innerWidth : 0;
// layout 미측정(jsdom 등)에서 rect 가 0 으로 반환되는 경우 보정 스킵
if (rect.width === 0 && rect.height === 0) return;
const margin = 8;
let shift = 0;
if (rect.right > vw - margin) {
shift = -(rect.right - (vw - margin));
} else if (rect.left < margin) {
shift = margin - rect.left;
}
if (shift !== 0) {
dropdown.style.transform = `translateX(${shift}px)`;
}
}, [showNotifications, dropdownAlign, notifications.length]);
return (
<Div ref={notificationRef} className={`relative ${className}`}>
@@ -224,7 +293,7 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
{/* 알림 드롭다운 */}
{showNotifications && (
<Div className={`absolute ${dropdownAlign === 'left' ? 'left-0' : 'right-0'} mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`}>
<Div ref={dropdownRef} className={`absolute ${dropdownAlign === 'left' ? 'left-0' : 'right-0'} mt-2 w-80 max-w-[calc(100vw-1rem)] bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`}>
<Div className="px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between gap-2">
<Div className="flex items-center gap-3 min-w-0">
<Span className="font-semibold text-gray-900 dark:text-white">{titleText}</Span>
@@ -1,4 +1,4 @@
import { describe, it, expect, vi } from 'vitest';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { NotificationCenter, NotificationItem } from '../NotificationCenter';
@@ -55,8 +55,8 @@ describe('NotificationCenter', () => {
expect(screen.getByText('2')).toBeInTheDocument(); // 읽지 않은 알림 2개
});
it('읽지 않은 알림이 9개 초과 시 9+로 표시됨', () => {
const manyNotifications: NotificationItem[] = Array.from({ length: 15 }, (_, i) => ({
it('읽지 않은 알림이 99개 초과 시 99+로 표시됨', () => {
const manyNotifications: NotificationItem[] = Array.from({ length: 150 }, (_, i) => ({
id: i,
title: `Notification ${i}`,
message: 'Message',
@@ -65,7 +65,7 @@ describe('NotificationCenter', () => {
}));
render(<NotificationCenter notifications={manyNotifications} />);
expect(screen.getByText('9+')).toBeInTheDocument();
expect(screen.getByText('99+')).toBeInTheDocument();
});
});
@@ -109,9 +109,9 @@ describe('NotificationCenter', () => {
const notificationButton = screen.getByRole('button');
await user.click(notificationButton);
// 읽지 않은 알림 찾기
const unreadNotification = screen.getByText('New Comment').closest('button');
expect(unreadNotification).toHaveClass('bg-blue-50');
// 읽지 않은 알림 찾기 — 카드는 data-notification-id 를 가진 Div (투명도 변형 bg-blue-50/70 적용)
const unreadNotification = screen.getByText('New Comment').closest('[data-notification-id]');
expect(unreadNotification?.className).toMatch(/bg-blue-50/);
});
it('읽은 알림에는 파란색 배경이 없음', async () => {
@@ -122,8 +122,8 @@ describe('NotificationCenter', () => {
await user.click(notificationButton);
// 읽은 알림 찾기
const readNotification = screen.getByText('System Update').closest('button');
expect(readNotification).not.toHaveClass('bg-blue-50');
const readNotification = screen.getByText('System Update').closest('[data-notification-id]');
expect(readNotification?.className).not.toMatch(/bg-blue-50/);
});
it('읽지 않은 알림에 파란색 점 표시가 있음', async () => {
@@ -196,10 +196,10 @@ describe('NotificationCenter', () => {
const notificationButton = screen.getByRole('button');
await user.click(notificationButton);
const notification = screen.getByText('New Comment').closest('button');
await user.click(notification!);
const notification = screen.getByText('New Comment').closest('[data-notification-id]');
await user.click(notification as HTMLElement);
expect(onNotificationClick).toHaveBeenCalledWith(1);
expect(onNotificationClick).toHaveBeenCalledWith(expect.objectContaining({ id: 1 }));
expect(onNotificationClick).toHaveBeenCalledTimes(1);
});
@@ -221,8 +221,8 @@ describe('NotificationCenter', () => {
const notificationButton = screen.getByRole('button');
await user.click(notificationButton);
const notification = screen.getByText('Test').closest('button');
await user.click(notification!);
const notification = screen.getByText('Test').closest('[data-notification-id]');
await user.click(notification as HTMLElement);
expect(onClick).toHaveBeenCalledTimes(1);
});
@@ -240,8 +240,8 @@ describe('NotificationCenter', () => {
const notificationButton = screen.getByRole('button');
await user.click(notificationButton);
const notification = screen.getByText('New Comment').closest('button');
await user.click(notification!);
const notification = screen.getByText('New Comment').closest('[data-notification-id]');
await user.click(notification as HTMLElement);
// 드롭다운이 닫혔는지 확인
expect(screen.queryByText('System Update')).not.toBeInTheDocument();
@@ -352,15 +352,16 @@ describe('NotificationCenter', () => {
expect(button).toBeInTheDocument();
});
it('알림 아이템들이 버튼으로 접근 가능함', async () => {
it('알림 아이템들이 카드 단위로 렌더링되어 접근 가능함', async () => {
const user = userEvent.setup();
render(<NotificationCenter notifications={mockNotifications} />);
const { container } = render(<NotificationCenter notifications={mockNotifications} />);
const notificationButton = screen.getByRole('button');
await user.click(notificationButton);
const buttons = screen.getAllByRole('button');
expect(buttons.length).toBeGreaterThanOrEqual(4); // 메인 버튼 + 알림 3개
// button-in-button 회피를 위해 카드는 Div 로 렌더링됨 → data-notification-id 로 접근
const cards = container.querySelectorAll('[data-notification-id]');
expect(cards.length).toBe(mockNotifications.length);
});
});
@@ -396,15 +397,15 @@ describe('NotificationCenter', () => {
// 첫 번째 알림 클릭
await user.click(screen.getByRole('button'));
await user.click(screen.getByText('New Comment').closest('button')!);
expect(onNotificationClick).toHaveBeenCalledWith(1);
await user.click(screen.getByText('New Comment').closest('[data-notification-id]') as HTMLElement);
expect(onNotificationClick).toHaveBeenCalledWith(expect.objectContaining({ id: 1 }));
// 드롭다운 다시 열기
await user.click(screen.getByRole('button'));
// 두 번째 알림 클릭
await user.click(screen.getByText('System Update').closest('button')!);
expect(onNotificationClick).toHaveBeenCalledWith(2);
await user.click(screen.getByText('System Update').closest('[data-notification-id]') as HTMLElement);
expect(onNotificationClick).toHaveBeenCalledWith(expect.objectContaining({ id: 2 }));
expect(onNotificationClick).toHaveBeenCalledTimes(2);
});
@@ -448,4 +449,302 @@ describe('NotificationCenter', () => {
expect(scrollableArea).toBeInTheDocument();
});
});
describe('[회귀] 무한스크롤 중복 호출 방지 (gnuboard/g7#14 관련)', () => {
// 첫 번째로 생성되는 observer 만 무한스크롤용으로 취급. 미읽음 추적 observer 의
// disconnect 가 무한스크롤 callback 을 교란하지 않도록 인스턴스 메서드로 격리한다.
let infiniteScrollInstance: any = null;
beforeEach(() => {
infiniteScrollInstance = null;
vi.stubGlobal(
'IntersectionObserver',
class MockIO {
root: Element | null = null;
rootMargin = '';
thresholds: number[] = [];
callback: IntersectionObserverCallback | null;
target: Element | null = null;
constructor(cb: IntersectionObserverCallback) {
this.callback = cb;
if (!infiniteScrollInstance) infiniteScrollInstance = this;
}
observe(target: Element) {
if (!this.target) this.target = target;
}
disconnect() {
this.callback = null;
this.target = null;
if (infiniteScrollInstance === this) infiniteScrollInstance = null;
}
unobserve() {}
takeRecords() { return []; }
},
);
});
afterEach(() => {
vi.unstubAllGlobals();
});
const fireIntersection = () => {
infiniteScrollInstance?.callback?.(
[{ isIntersecting: true, target: infiniteScrollInstance.target } as unknown as IntersectionObserverEntry],
{} as IntersectionObserver,
);
};
const makeNotifications = (count: number): NotificationItem[] =>
Array.from({ length: count }, (_, i) => ({
id: i + 1,
title: `t${i}`,
message: `m${i}`,
time: '1m',
read: false,
}));
it('같은 notifications.length 에서 sentinel 이 재교차해도 onLoadMore 는 한 번만 호출된다', async () => {
const user = userEvent.setup();
const onLoadMore = vi.fn();
render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={true}
loading={false}
onLoadMore={onLoadMore}
/>,
);
await user.click(screen.getByRole('button'));
fireIntersection();
fireIntersection();
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(1);
});
it('loading=true 일 때는 onLoadMore 를 발행하지 않는다', async () => {
const user = userEvent.setup();
const onLoadMore = vi.fn();
render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={true}
loading={true}
onLoadMore={onLoadMore}
/>,
);
await user.click(screen.getByRole('button'));
fireIntersection();
expect(onLoadMore).not.toHaveBeenCalled();
});
it('hasMore=false 일 때는 onLoadMore 를 발행하지 않는다', async () => {
const user = userEvent.setup();
const onLoadMore = vi.fn();
render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={false}
loading={false}
onLoadMore={onLoadMore}
/>,
);
await user.click(screen.getByRole('button'));
fireIntersection();
expect(onLoadMore).not.toHaveBeenCalled();
});
it('notifications.length 가 증가한 뒤 재교차하면 onLoadMore 를 다시 발행한다', async () => {
const user = userEvent.setup();
const onLoadMore = vi.fn();
const { rerender } = render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={true}
loading={false}
onLoadMore={onLoadMore}
/>,
);
await user.click(screen.getByRole('button'));
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(1);
// 서버 응답이 와서 목록이 늘어난 상황
rerender(
<NotificationCenter
notifications={makeNotifications(30)}
hasMore={true}
loading={false}
onLoadMore={onLoadMore}
/>,
);
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(2);
// 같은 length 에서 재교차 → 다시 무시
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(2);
});
});
describe('[회귀] 닫기 시 read-batch 불필요 호출 방지', () => {
it('unreadCount=0 + 모든 알림 read=true 상태에서 닫으면 onClose 를 호출하지 않는다', async () => {
const user = userEvent.setup();
const onClose = vi.fn();
const allRead: NotificationItem[] = mockNotifications.map((n) => ({ ...n, read: true }));
render(
<NotificationCenter
notifications={allRead}
unreadCount={0}
onClose={onClose}
/>,
);
// 레이어 열고 닫기
const button = screen.getByRole('button');
await user.click(button);
await user.click(button);
expect(onClose).not.toHaveBeenCalled();
});
it('뷰포트에 노출됐던 ID 라도 현재 notifications 에서 read=true 로 바뀐 것은 onClose 인자에서 제외된다', async () => {
const user = userEvent.setup();
const onClose = vi.fn();
// mockNotifications: id 1(unread), id 2(read), id 3(unread)
const { rerender, container } = render(
<NotificationCenter notifications={mockNotifications} unreadCount={2} onClose={onClose} />,
);
const button = screen.getByRole('button');
await user.click(button);
// data-notification-id 요소에 data-unread 속성을 주입하여 Observer가 ID를 수집할 수 있게 시뮬레이션
container.querySelectorAll('[data-notification-id]').forEach((el) => {
const id = el.getAttribute('data-notification-id');
const notification = mockNotifications.find((n) => String(n.id) === String(id));
el.setAttribute('data-unread', notification?.read ? 'false' : 'true');
});
// rerender: 모든 알림이 read=true 로 갱신된 상황 (모두 읽음 onSuccess 반영)
rerender(
<NotificationCenter
notifications={mockNotifications.map((n) => ({ ...n, read: true }))}
unreadCount={0}
onClose={onClose}
/>,
);
// 레이어 닫기
await user.click(screen.getByRole('button'));
expect(onClose).not.toHaveBeenCalled();
});
});
describe('[회귀] 드롭다운 뷰포트 이탈 방지', () => {
let originalGetBoundingClientRect: typeof Element.prototype.getBoundingClientRect;
beforeEach(() => {
originalGetBoundingClientRect = Element.prototype.getBoundingClientRect;
});
afterEach(() => {
Element.prototype.getBoundingClientRect = originalGetBoundingClientRect;
});
it('드롭다운에 max-w-[calc(100vw-1rem)] 클래스가 적용된다', async () => {
const user = userEvent.setup();
const { container } = render(<NotificationCenter notifications={mockNotifications} />);
await user.click(screen.getByRole('button'));
const dropdown = container.querySelector('.absolute.w-80');
expect(dropdown?.className).toContain('max-w-[calc(100vw-1rem)]');
});
it('드롭다운이 뷰포트 오른쪽을 이탈하면 translateX 로 왼쪽으로 보정된다', async () => {
// rect.right 가 vw 를 초과하도록 mock → 이탈량만큼 음의 translateX 기대
Element.prototype.getBoundingClientRect = vi.fn(() => ({
left: 100,
right: 1100,
top: 0,
bottom: 100,
width: 320,
height: 100,
x: 100,
y: 0,
toJSON: () => ({}),
}) as DOMRect);
Object.defineProperty(window, 'innerWidth', { value: 1024, writable: true, configurable: true });
const user = userEvent.setup();
const { container } = render(
<NotificationCenter notifications={mockNotifications} dropdownAlign="left" />,
);
await user.click(screen.getByRole('button'));
const dropdown = container.querySelector<HTMLElement>('.absolute.w-80');
// 1100 - (1024 - 8) = 84 → translateX(-84px)
expect(dropdown?.style.transform).toBe('translateX(-84px)');
});
it('드롭다운이 뷰포트 왼쪽을 이탈하면 translateX 로 오른쪽으로 보정된다', async () => {
Element.prototype.getBoundingClientRect = vi.fn(() => ({
left: -50,
right: 270,
top: 0,
bottom: 100,
width: 320,
height: 100,
x: -50,
y: 0,
toJSON: () => ({}),
}) as DOMRect);
Object.defineProperty(window, 'innerWidth', { value: 1024, writable: true, configurable: true });
const user = userEvent.setup();
const { container } = render(
<NotificationCenter notifications={mockNotifications} dropdownAlign="right" />,
);
await user.click(screen.getByRole('button'));
const dropdown = container.querySelector<HTMLElement>('.absolute.w-80');
// margin(8) - left(-50) = 58 → translateX(58px)
expect(dropdown?.style.transform).toBe('translateX(58px)');
});
it('드롭다운이 뷰포트 안에 있으면 transform 이 적용되지 않는다', async () => {
Element.prototype.getBoundingClientRect = vi.fn(() => ({
left: 100,
right: 420,
top: 0,
bottom: 100,
width: 320,
height: 100,
x: 100,
y: 0,
toJSON: () => ({}),
}) as DOMRect);
Object.defineProperty(window, 'innerWidth', { value: 1024, writable: true, configurable: true });
const user = userEvent.setup();
const { container } = render(
<NotificationCenter notifications={mockNotifications} dropdownAlign="right" />,
);
await user.click(screen.getByRole('button'));
const dropdown = container.querySelector<HTMLElement>('.absolute.w-80');
expect(dropdown?.style.transform).toBe('');
});
});
});
@@ -5,7 +5,7 @@
"ko": "Admin Basic",
"en": "Admin Basic"
},
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"license": "MIT",
"description": {
"ko": "그누보드7 기본 관리자 템플릿",
@@ -4,6 +4,16 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.0-beta.3] - 2026-04-21
### Fixed
- 알림 레이어를 닫을 때 목록이 읽음 상태로 갱신되지 않아 재토글 시 읽음 처리가 누락되던 문제 수정
- 알림 레이어 무한 스크롤 시 "안 읽은 알림만" 필터가 유지되지 않아 읽은 알림이 섞여 노출되던 문제 수정
- 알림 레이어 무한 스크롤 시 동일 페이지 API 가 중복 호출되던 문제 수정
- 안 읽은 알림이 없는데도 알림 레이어를 닫을 때 읽음 처리 API 가 불필요하게 호출되던 문제 수정
- 알림 드롭다운이 화면 경계를 벗어나지 않도록 자동으로 좌/우 정렬 전환 및 최대 너비 제한
## [1.0.0-beta.2] - 2026-04-20
### Added
@@ -0,0 +1,134 @@
/**
* @file user-base-notification-sync.test.tsx
* @description 사용자 알림 레이어 동기화 회귀 테스트
*
* 회귀 방지 대상:
* 1. onNotificationClose(read-batch) 이후 notifications 데이터소스가 refetch되어야 함
* → 이전: notification_unread_count만 refetch되어 다음 토글 시 marked_count: 0
* 2. onNotificationLoadMore 무한 스크롤 요청에 read 파라미터가 포함되어야 함
* → 이전: page/per_page만 포함되어 읽은 알림이 섞여서 로드됨
*
* 참고: gnuboard/g7#14 (공개 제보)
*/
import { describe, it, expect } from 'vitest';
import userBase from '../../layouts/_user_base.json';
type ActionNode = {
event?: string;
handler?: string;
params?: Record<string, any>;
onSuccess?: ActionNode[];
actions?: ActionNode[];
target?: string;
};
type LayoutNode = {
actions?: ActionNode[];
children?: LayoutNode[];
slots?: Record<string, LayoutNode[]>;
[key: string]: unknown;
};
function walk(input: LayoutNode | LayoutNode[] | undefined, visit: (node: LayoutNode) => void) {
if (!input) return;
const nodes = Array.isArray(input) ? input : [input];
for (const node of nodes) {
visit(node);
if (node.slots) {
for (const key of Object.keys(node.slots)) {
walk(node.slots[key], visit);
}
}
if (node.children) {
walk(node.children, visit);
}
}
}
function collectActionsByEvent(layout: any, eventName: string): ActionNode[] {
const roots = Array.isArray(layout.components) ? layout.components : [layout];
const matched: ActionNode[] = [];
walk(roots, (node) => {
if (!Array.isArray(node.actions)) return;
for (const action of node.actions) {
if (action && action.event === eventName) {
matched.push(action);
}
}
});
return matched;
}
function flattenSequenceActions(action: ActionNode): ActionNode[] {
if (action.handler === 'sequence' && Array.isArray(action.params?.actions)) {
return action.params!.actions as ActionNode[];
}
return [action];
}
describe('사용자 알림 레이어 동기화 (gnuboard/g7#14)', () => {
describe('Bug 1: onNotificationClose 후 notifications 데이터소스 refetch', () => {
const closeActions = collectActionsByEvent(userBase, 'onNotificationClose');
it('onNotificationClose 핸들러가 존재해야 한다', () => {
expect(closeActions.length).toBeGreaterThanOrEqual(1);
});
it('read-batch apiCall을 포함해야 한다', () => {
const steps = flattenSequenceActions(closeActions[0]);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/notifications/read-batch'),
);
expect(apiCall).toBeDefined();
});
it('read-batch onSuccess에 notifications + notification_unread_count refetch가 포함되어야 한다', () => {
const steps = flattenSequenceActions(closeActions[0]);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/notifications/read-batch'),
)!;
const successSteps = (apiCall.onSuccess ?? []) as ActionNode[];
const refetchIds = successSteps
.filter((s) => s.handler === 'refetchDataSource')
.map((s) => s.params?.dataSourceId);
expect(refetchIds).toContain('notifications');
expect(refetchIds).toContain('notification_unread_count');
});
it('onSuccess에 페이지네이션 리셋 setState가 포함되어야 한다', () => {
const steps = flattenSequenceActions(closeActions[0]);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/notifications/read-batch'),
)!;
const successSteps = (apiCall.onSuccess ?? []) as ActionNode[];
const setState = successSteps.find((s) => s.handler === 'setState');
expect(setState).toBeDefined();
expect(setState!.params?.target).toBe('global');
expect(setState!.params?.notificationsCurrentPage).toBe(1);
expect(setState!.params?.notificationsHasMore).toBeNull();
});
});
describe('Bug 2: onNotificationLoadMore query에 read 파라미터 유지', () => {
const loadMoreActions = collectActionsByEvent(userBase, 'onNotificationLoadMore');
it('onNotificationLoadMore 핸들러가 존재해야 한다', () => {
expect(loadMoreActions.length).toBeGreaterThanOrEqual(1);
});
it('apiCall query에 read 파라미터가 포함되어야 한다', () => {
const steps = flattenSequenceActions(loadMoreActions[0]);
const apiCall = steps.find(
(s) => s.handler === 'apiCall' && typeof s.target === 'string' && s.target.endsWith('/user/notifications'),
);
expect(apiCall).toBeDefined();
const query = apiCall!.params?.query ?? {};
expect(query).toHaveProperty('page');
expect(query).toHaveProperty('per_page');
expect(query).toHaveProperty('read');
expect(String(query.read)).toContain('notificationsUnreadOnly');
});
});
});
+1 -1
View File
@@ -1 +1 @@
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(Line truncated
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(Line truncated
@@ -1,4 +1,4 @@
var SirsoftBasic=(function(R,d,x,Jt){"use strict";function pc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=pc(x),mc=()=>window.G7Core,Q=x.forwardRef(({children:e,variant:t="primary",size:r="md",className:n="",...o},a)=>{const s="inline-flex items-center justify-center",l=mc()?.style?.mergeClasses?.(s,n)??`${s} ${n}`;return d.jsx("button",{ref:a,className:l,...o,children:e})});Q.displayName="Button";const j=x.forwardRef(({children:e,className:t="",...r},n)=>d.jsx("div",{ref:n,className:t,...r,children:e})),re=({children:e,className:t="",...r})=>d.jsx("span",{className:t,...r,children:e}),cn=({children:e,className:t="",...r})=>d.jsx("svg",{className:t,...r,children:e}),vt=x.forwardRef(({label:e,error:t,className:r="",onChange:n,onKeyPress:o,value:a,defaultValue:s,type:l="text",checked:f,defaultChecked:g,...c},i)=>{const u=l==="radio"||l==="checkbox",h=x.useRef(!1),p=x.useRef(null);x.useImperativeHandle(i,()=>p.current);const[y,w]=x.useState(a??s??"");x.useEffect(()=>{!u&&!h.current&&a!==void 0&&w(a)},[a,u]);const b=x.useCallback(()=>{h.current=!0},[]),L=x.useCallback(v=>{if(h.current=!1,n){const D=v.target.value;w(D);const N=new Event("change",{bubbles:!0});Object.defineProperty(N,"target",{writable:!1,value:{value:D}}),Object.defineProperty(N,"currentTarget",{writable:!1,value:{value:D}}),n(N)}},[n]),S=x.useCallback(v=>{const D=v.target.value;w(D),!h.current&&n&&n(v)},[n]),O=x.useCallback(v=>{h.current||o&&o(v)},[o]),{loadingactions:F,formdata:E,...T}=c;if(u)return d.jsx("input",{ref:p,type:l,className:r,onChange:n,checked:f,defaultChecked:g,value:a,...T});const m=a!==void 0?{value:y}:{defaultValue:s};return d.jsx("input",{ref:p,type:l,className:r,onChange:S,onKeyPress:O,onCompositionStart:b,onCompositionEnd:L,...m,...T})});vt.displayName="Input";const Oa=x.forwardRef(({accept:e,maxSize:t,onChange:r,onError:n,buttonText:o="Browse",placeholder:a="No file selected",className:s="",disabled:l,...f},g)=>{const c=x.useRef(null),i=g||c,[u,h]=x.useState(""),p=x.useCallback(()=>{!l&&i.current&&i.current.click()},[l,i]),y=x.useCallback(b=>{const L=b.target.files?.[0]||null;if(!L){h(""),r?.(null);return}if(t&&L.size>t*1024*1024){const S=`File size exceeds ${t}MB limit`;n?.(S),i.current&&(i.current.value=""),h("");return}h(L.name),r?.(L)},[t,r,n,i]),w=x.useCallback(b=>{b.stopPropagation(),i.current&&(i.current.value=""),h(""),r?.(null)},[r,i]);return d.jsxs(j,{className:`flex items-center gap-2 ${s}`,children:[d.jsx(vt,{ref:i,type:"file",accept:e,onChange:y,disabled:l,className:"hidden",...f}),d.jsx(Q,{type:"button",onClick:p,disabled:l,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:o}),d.jsx(re,{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:u||a}),u&&!l&&d.jsx(Q,{type:"button",onClick:w,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:d.jsx(cn,{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Oa.displayName="FileInput";var Je=(e=>(e.User="fa-user",e.Users="fa-users",e.UserCircle="fa-user-circle",e.UserPlus="fa-user-plus",e.UserMinus="fa-user-minus",e.UserShield="fa-user-shield",e.Search="fa-search",e.Edit="fa-edit",e.Pencil="fa-pencil-alt",e.Trash="fa-trash",e.Save="fa-save",e.Plus="fa-plus",e.Minus="fa-minus",e.Check="fa-check",e.Times="fa-times",e.Download="fa-download",e.Upload="fa-upload",e.Copy="fa-copy",e.ExternalLink="fa-external-link-alt",e.Home="fa-home",e.ChevronLeft="fa-chevron-left",e.ChevronRight="fa-chevron-right",e.ChevronUp="fa-chevron-up",e.ChevronDown="fa-chevron-down",e.AngleLeft="fa-angle-left",e.AngleRight="fa-angle-right",e.AngleUp="fa-angle-up",e.AngleDown="fa-angle-down",e.ArrowUp="fa-arrow-up",e.ArrowDown="fa-arrow-down",e.ArrowLeft="fa-arrow-left",e.ArrowRight="fa-arrow-right",e.Bars="fa-bars",e.EllipsisVertical="fa-ellipsis-v",e.EllipsisHorizontal="fa-ellipsis-h",e.CheckCircle="fa-check-circle",e.TimesCircle="fa-times-circle",e.ExclamationCircle="fa-exclamation-circle",e.ExclamationTriangle="fa-exclamation-triangle",e.InfoCircle="fa-info-circle",e.QuestionCircle="fa-question-circle",e.XCircle="fa-times-circle",e.ShoppingCart="fa-shopping-cart",e.ShoppingBag="fa-shopping-bag",e.CreditCard="fa-credit-card",e.Tag="fa-tag",e.Tags="fa-tags",e.File="fa-file",e.FileAlt="fa-file-alt",e.Folder="fa-folder",e.FolderOpen="fa-folder-open",e.Envelope="fa-envelope",e.Phone="fa-phonLine truncated
var SirsoftBasic=(function(R,d,x,Jt){"use strict";function pc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const _=pc(x),mc=()=>window.G7Core,Q=x.forwardRef(({children:e,variant:t="primary",size:r="md",className:n="",...o},a)=>{const s="inline-flex items-center justify-center",l=mc()?.style?.mergeClasses?.(s,n)??`${s} ${n}`;return d.jsx("button",{ref:a,className:l,...o,children:e})});Q.displayName="Button";const j=x.forwardRef(({children:e,className:t="",...r},n)=>d.jsx("div",{ref:n,className:t,...r,children:e})),re=({children:e,className:t="",...r})=>d.jsx("span",{className:t,...r,children:e}),cn=({children:e,className:t="",...r})=>d.jsx("svg",{className:t,...r,children:e}),vt=x.forwardRef(({label:e,error:t,className:r="",onChange:n,onKeyPress:o,value:a,defaultValue:s,type:l="text",checked:f,defaultChecked:g,...c},i)=>{const u=l==="radio"||l==="checkbox",h=x.useRef(!1),p=x.useRef(null);x.useImperativeHandle(i,()=>p.current);const[y,w]=x.useState(a??s??"");x.useEffect(()=>{!u&&!h.current&&a!==void 0&&w(a)},[a,u]);const b=x.useCallback(()=>{h.current=!0},[]),I=x.useCallback(v=>{if(h.current=!1,n){const D=v.target.value;w(D);const A=new Event("change",{bubbles:!0});Object.defineProperty(A,"target",{writable:!1,value:{value:D}}),Object.defineProperty(A,"currentTarget",{writable:!1,value:{value:D}}),n(A)}},[n]),S=x.useCallback(v=>{const D=v.target.value;w(D),!h.current&&n&&n(v)},[n]),M=x.useCallback(v=>{h.current||o&&o(v)},[o]),{loadingactions:L,formdata:E,...T}=c;if(u)return d.jsx("input",{ref:p,type:l,className:r,onChange:n,checked:f,defaultChecked:g,value:a,...T});const m=a!==void 0?{value:y}:{defaultValue:s};return d.jsx("input",{ref:p,type:l,className:r,onChange:S,onKeyPress:M,onCompositionStart:b,onCompositionEnd:I,...m,...T})});vt.displayName="Input";const Oa=x.forwardRef(({accept:e,maxSize:t,onChange:r,onError:n,buttonText:o="Browse",placeholder:a="No file selected",className:s="",disabled:l,...f},g)=>{const c=x.useRef(null),i=g||c,[u,h]=x.useState(""),p=x.useCallback(()=>{!l&&i.current&&i.current.click()},[l,i]),y=x.useCallback(b=>{const I=b.target.files?.[0]||null;if(!I){h(""),r?.(null);return}if(t&&I.size>t*1024*1024){const S=`File size exceeds ${t}MB limit`;n?.(S),i.current&&(i.current.value=""),h("");return}h(I.name),r?.(I)},[t,r,n,i]),w=x.useCallback(b=>{b.stopPropagation(),i.current&&(i.current.value=""),h(""),r?.(null)},[r,i]);return d.jsxs(j,{className:`flex items-center gap-2 ${s}`,children:[d.jsx(vt,{ref:i,type:"file",accept:e,onChange:y,disabled:l,className:"hidden",...f}),d.jsx(Q,{type:"button",onClick:p,disabled:l,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:o}),d.jsx(re,{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:u||a}),u&&!l&&d.jsx(Q,{type:"button",onClick:w,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:d.jsx(cn,{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Oa.displayName="FileInput";var Je=(e=>(e.User="fa-user",e.Users="fa-users",e.UserCircle="fa-user-circle",e.UserPlus="fa-user-plus",e.UserMinus="fa-user-minus",e.UserShield="fa-user-shield",e.Search="fa-search",e.Edit="fa-edit",e.Pencil="fa-pencil-alt",e.Trash="fa-trash",e.Save="fa-save",e.Plus="fa-plus",e.Minus="fa-minus",e.Check="fa-check",e.Times="fa-times",e.Download="fa-download",e.Upload="fa-upload",e.Copy="fa-copy",e.ExternalLink="fa-external-link-alt",e.Home="fa-home",e.ChevronLeft="fa-chevron-left",e.ChevronRight="fa-chevron-right",e.ChevronUp="fa-chevron-up",e.ChevronDown="fa-chevron-down",e.AngleLeft="fa-angle-left",e.AngleRight="fa-angle-right",e.AngleUp="fa-angle-up",e.AngleDown="fa-angle-down",e.ArrowUp="fa-arrow-up",e.ArrowDown="fa-arrow-down",e.ArrowLeft="fa-arrow-left",e.ArrowRight="fa-arrow-right",e.Bars="fa-bars",e.EllipsisVertical="fa-ellipsis-v",e.EllipsisHorizontal="fa-ellipsis-h",e.CheckCircle="fa-check-circle",e.TimesCircle="fa-times-circle",e.ExclamationCircle="fa-exclamation-circle",e.ExclamationTriangle="fa-exclamation-triangle",e.InfoCircle="fa-info-circle",e.QuestionCircle="fa-question-circle",e.XCircle="fa-times-circle",e.ShoppingCart="fa-shopping-cart",e.ShoppingBag="fa-shopping-bag",e.CreditCard="fa-credit-card",e.Tag="fa-tag",e.Tags="fa-tags",e.File="fa-file",e.FileAlt="fa-file-alt",e.Folder="fa-folder",e.FolderOpen="fa-folder-open",e.Envelope="fa-envelope",e.Phone="fa-phonLine truncated
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${s==="auto"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[d.jsx(ue,{name:Je.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(re,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),s==="auto"&&d.jsx(ue,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),d.jsxs(Q,{onClick:()=>i("light"),className:`
@@ -7,12 +7,12 @@ var SirsoftBasic=(function(R,d,x,Jt){"use strict";function pc(e){const t=Object.
`,children:[d.jsx(ue,{name:Je.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(re,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),s==="light"&&d.jsx(ue,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),d.jsxs(Q,{onClick:()=>i("dark"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${s==="dark"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[d.jsx(ue,{name:Je.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(re,{className:"flex-1 text-left text-gray-900 dark:text-white",children:o}),s==="dark"&&d.jsx(ue,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Ic=Object.freeze(Object.defineProperty({__proto__:null,ThemeToggle:fn,default:fn},Symbol.toStringTag,{value:"Module"})),Ba={xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-16 h-16 text-xl","2xl":"w-24 h-24 text-2xl","3xl":"w-32 h-32 text-3xl","4xl":"w-40 h-40 text-4xl","5xl":"w-48 h-48 text-5xl"},Pc="rounded-full overflow-hidden flex-shrink-0 border border-gray-200 dark:border-gray-700",Lc="grayscale opacity-50",no={normal:"bg-gradient-to-br from-blue-500 to-purple-600",withdrawn:"bg-gray-300 dark:bg-gray-600",guest:"bg-gray-200 dark:bg-gray-700"},Fr=({author:e,name:t,avatar:r,size:n="md",className:o="",text:a,isWithdrawn:s=!1,isGuest:l=!1})=>{const f=r??e?.avatar,g=a??t??e?.name??"?",c=s||e?.status==="withdrawn",i=l||e?.is_guest||!1,u=x.useMemo(()=>[Ba[n]||Ba.md,Pc,c?Lc:"",o].filter(Boolean).join(" "),[n,c,o]),h=i?no.guest:c?no.withdrawn:no.normal,p=()=>i?d.jsx(j,{className:`w-full h-full flex items-center justify-center ${h}`,children:d.jsx(ue,{name:"user",className:"text-gray-400 dark:text-gray-500"})}):c?d.jsx(j,{className:`w-full h-full flex items-center justify-center ${h}`,children:d.jsx(ue,{name:"user",className:"text-gray-500 dark:text-gray-400"})}):d.jsx(j,{className:`w-full h-full flex items-center justify-center text-white font-semibold ${h}`,children:g.charAt(0).toUpperCase()});return d.jsx(j,{className:u,children:f&&!i&&!c?d.jsx(Wt,{src:f,alt:g,className:"w-full h-full object-cover"}):p()})},Fc=Object.freeze(Object.defineProperty({__proto__:null,Avatar:Fr},Symbol.toStringTag,{value:"Module"})),hn=({notifications:e=[],unreadCount:t=0,hasMore:r=!1,loading:n=!1,titleText:o="알림",emptyText:a="알림이 없습니다.",markAllReadText:s="모두 읽음",deleteAllText:l="모두 삭제",unreadOnlyText:f="안 읽은 알림만",unreadOnly:g=!1,onNotificationClick:c,onClose:i,onLoadMore:u,onMarkAllRead:h,onDeleteAll:p,onDelete:y,onUnreadOnlyToggle:w,dropdownAlign:b="right",className:L=""})=>{const[S,O]=x.useState(!1),F=x.useRef(null),E=x.useRef(null),T=x.useRef(null),m=x.useRef(new Set);x.useEffect(()=>{if(!T.current||!E.current||!r||n||!S)return;const P=new IntersectionObserver(([I])=>{I.isIntersecting&&u?.()},{root:E.current,threshold:.1});return P.observe(T.current),()=>P.disconnect()},[r,n,S,u,e.length]),x.useEffect(()=>{if(!E.current||!S)return;const P=new IntersectionObserver(M=>{M.forEach(A=>{const C=A.target.getAttribute("data-notification-id"),k=A.target.getAttribute("data-unread")==="true";C&&k&&A.isIntersecting&&m.current.add(C)})},{root:E.current,threshold:.5});return E.current.querySelectorAll("[data-notification-id]").forEach(M=>P.observe(M)),()=>P.disconnect()},[S,e]);const v=x.useCallback(()=>{if(S){const P=Array.from(m.current);P.length>0&&i?.(P),m.current.clear(),O(!1)}},[S,i]);x.useEffect(()=>{if(!S)return;const P=I=>{F.current&&!F.current.contains(I.target)&&v()};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[S,v]);const D=x.useCallback(()=>{S?v():O(!0)},[S,v]),N=t>0?t:e.filter(P=>!P.read).length;return d.jsxs(j,{ref:F,className:`relative ${L}`,children:[d.jsxs(Q,{onClick:D,className:"relative p-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors cursor-pointer","aria-label":o,children:[d.jsx(ue,{name:Je.Bell,className:"w-5 h-5"}),N>0&&d.jsx(re,{className:"absolute -top-1 -right-1 w-5 h-5 flex items-center justify-center text-xs font-bold text-white bg-red-500 rounded-full",children:N>99?"99+":N})]}),S&&d.jsxs(j,{className:`absolute ${b==="left"?"left-0":"right-0"} mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`,children:[d.jsxs(j,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between gap-2",children:[d.jsxs(j,{className:"flex items-center gap-3 min-w-0",children:[d.jsx(re,{className:"font-semibold text-gray-900 dark:text-white",children:o}),w&&d.jsxs(j,{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>w(!g),children:[d.jsx(vt,{type:"checkbox",checked:g,onChange:P=>{P.stopPropagation(),w(P.target.checked)},onClick:P=>P.stopPropagation(),className:"w-3.5 h-3.5 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 cursor-pointer"}),d.jsx(re,{className:"text-xs text-gray-600 dark:text-gray-400",children:f})]})]}),d.jsxs(j,{className:"flex items-center gap-3 flex-shrink-0",children:[h&&N>0&&d.jsx(Q,{onClick:()=>{h(),m.current.clear()},className:"text-xs text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline cu Line truncated
`+yt),He&&gn([P,I,M],Qt=>{yt=$r(yt,Qt," ")}),O&&Le?O.createHTML(yt):yt},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ze(ge),J=!0},t.clearConfig=function(){Ge=null,J=!1},t.isValidAttribute=function(ge,H,q){Ge||Ze({});const le=De(ge),Ve=De(H);return dc(le,Ve,q)},t.addHook=function(ge,H){typeof H=="function"&&Ur(N[ge],H)},t.removeHook=function(ge,H){if(H!==void 0){const q=Kc(N[ge],H);return q===-1?void 0:Vc(N[ge],q,1)[0]}return Xa(N[ge])},t.removeHooks=function(ge){N[ge]=[]},t.removeAllHooks=function(){N=rs()},t}var os=ns();const cd=e=>window.G7Core?.state?.get?.(e),dd=e=>{window.G7Core?.dispatch?.({handler:"navigate",params:{path:e}})},ud=e=>{const t=Math.round(e*2)/2;return[1,2,3,4,5].map(r=>t>=r?"full":t>=r-.5?"half":"empty")},as=({product:e,onClick:t,shopBase:r="/shop",className:n=""})=>{const o=cd("preferredCurrency")||"KRW",a=w=>{const b=`multi_currency_${w}`,L=e[b];if(L&&L[o])return L[o].formatted;const S=`${w}_formatted`;return e[S]},s=e.name_localized??(typeof e.name=="string"?e.name:"")??"",l=a("selling_price"),f=a("list_price"),g=e.discount_rate&&e.discount_rate>0,c=e.sales_status&&e.sales_status!=="on_sale",i=e.labels??[],u=w=>os.sanitize(w,{ALLOWED_TAGS:["mark"],ALLOWED_ATTR:[]}),h=e.name_highlighted,p=e.description_highlighted??e.short_description,y=()=>{t?t(e.id):dd(`${r==="/"?"":r}/products/${e.id}`)};return d.jsxs(Q,{onClick:y,className:`block w-full text-left group bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-lg transition-shadow cursor-pointer ${n}`,children:[d.jsxs(j,{className:"relative aspect-square overflow-hidden bg-gray-100 dark:bg-gray-700",children:[d.jsx(Wt,{src:e.thumbnail_url,alt:s,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200",loading:"lazy"}),c&&d.jsx(j,{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:d.jsx(re,{className:`text-lg font-bold ${e.sales_status==="sold_out"?"text-red-300":e.sales_status==="suspended"?"text-amber-300":"text-blue-300"}`,style:{textShadow:"0 1px 4px rgba(0,0,0,0.6)"},children:e.sales_status_label??e.sales_status})}),g&&e.sales_status!=="sold_out"&&e.sales_status!=="suspended"&&d.jsxs(re,{className:"absolute top-2 left-2 px-2 py-1 bg-red-500 text-white text-xs font-bold rounded",children:[e.discount_rate,"%"]}),i.length>0&&d.jsx(j,{className:"absolute bottom-2 right-2 flex gap-1 flex-wrap justify-end",children:i.map((w,b)=>d.jsx(re,{className:"text-xs text-white font-medium px-1.5 py-0.5 rounded",style:{backgroundColor:w.color||"#6b7280"},children:w.name},b))})]}),d.jsxs(j,{className:"p-4",children:[d.jsxs(j,{className:"flex items-center gap-1.5 flex-wrap",children:[e.primary_category&&d.jsx(re,{className:"inline-block text-xs font-medium text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30 px-2 py-0.5 rounded",children:e.primary_category}),e.brand_name&&d.jsx(re,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.brand_name})]}),h?d.jsx(j,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:u(h)}}):d.jsx(dn,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1",children:s}),p&&d.jsx(j,{className:"mt-1 text-sm text-gray-600 dark:text-gray-400 line-clamp-2 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:u(p)}}),d.jsxs(j,{className:"mt-1.5 flex items-center gap-1",children:[ud(e.rating_avg??0).map((w,b)=>d.jsxs(re,{className:`text-xs ${w==="empty"?"text-gray-300 dark:text-gray-600":"text-yellow-400"}`,children:[w==="full"&&d.jsx("i",{className:"fa-solid fa-star"}),w==="half"&&d.jsx("i",{className:"fa-solid fa-star-half-stroke"}),w==="empty"&&d.jsx("i",{className:"fa-regular fa-star"})]},b)),d.jsx(re,{className:"text-xs text-gray-600 dark:text-gray-400 ml-0.5",children:(e.rating_avg??0).toFixed(1)}),d.jsxs(re,{className:"text-xs text-gray-400 dark:text-gray-500",children:["(",e.review_count??0,")"]})]}),d.jsxs(j,{className:"mt-2 flex items-baseline gap-2",children:[d.jsx(re,{className:"font-bold text-gray-900 dark:text-white",children:l}),f&&g&&d.jsx(re,{className:"text-sm text-gray-500 dark:text-gray-400 line-through",children:f})]})]})]})},fd=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"})),ss="carousel",Br="controller",hd="navigation",gd="no-scroll",go="portal",pd="root",ls="toolbar",md="counter",Gr="fullscreen",is="slideshow",Wr="thumbnails",cs="zoom",yr="loading",po="playing",Kr="error",Vr="complete",bd="placeholder",Yr=e=>`active-slide-${e}`,yd=Yr(yr),vd=Yr(po),wd=Yr(Kr),xd=Yr(Vr),ds="fullsize",vr="flex_center",kd="no_scroll",us="no_scroll_padding",mo="slide",fs="slide_wrapper",Cd="slide_wrapper_interactive",Rt="prev",er="next",bo="swipe",wr="close",hs="onPointer Line truncated
`,children:[d.jsx(ue,{name:Je.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),d.jsx(re,{className:"flex-1 text-left text-gray-900 dark:text-white",children:o}),s==="dark"&&d.jsx(ue,{name:Je.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Ic=Object.freeze(Object.defineProperty({__proto__:null,ThemeToggle:fn,default:fn},Symbol.toStringTag,{value:"Module"})),Ba={xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-16 h-16 text-xl","2xl":"w-24 h-24 text-2xl","3xl":"w-32 h-32 text-3xl","4xl":"w-40 h-40 text-4xl","5xl":"w-48 h-48 text-5xl"},Pc="rounded-full overflow-hidden flex-shrink-0 border border-gray-200 dark:border-gray-700",Lc="grayscale opacity-50",no={normal:"bg-gradient-to-br from-blue-500 to-purple-600",withdrawn:"bg-gray-300 dark:bg-gray-600",guest:"bg-gray-200 dark:bg-gray-700"},Fr=({author:e,name:t,avatar:r,size:n="md",className:o="",text:a,isWithdrawn:s=!1,isGuest:l=!1})=>{const f=r??e?.avatar,g=a??t??e?.name??"?",c=s||e?.status==="withdrawn",i=l||e?.is_guest||!1,u=x.useMemo(()=>[Ba[n]||Ba.md,Pc,c?Lc:"",o].filter(Boolean).join(" "),[n,c,o]),h=i?no.guest:c?no.withdrawn:no.normal,p=()=>i?d.jsx(j,{className:`w-full h-full flex items-center justify-center ${h}`,children:d.jsx(ue,{name:"user",className:"text-gray-400 dark:text-gray-500"})}):c?d.jsx(j,{className:`w-full h-full flex items-center justify-center ${h}`,children:d.jsx(ue,{name:"user",className:"text-gray-500 dark:text-gray-400"})}):d.jsx(j,{className:`w-full h-full flex items-center justify-center text-white font-semibold ${h}`,children:g.charAt(0).toUpperCase()});return d.jsx(j,{className:u,children:f&&!i&&!c?d.jsx(Wt,{src:f,alt:g,className:"w-full h-full object-cover"}):p()})},Fc=Object.freeze(Object.defineProperty({__proto__:null,Avatar:Fr},Symbol.toStringTag,{value:"Module"})),hn=({notifications:e=[],unreadCount:t=0,hasMore:r=!1,loading:n=!1,titleText:o="알림",emptyText:a="알림이 없습니다.",markAllReadText:s="모두 읽음",deleteAllText:l="모두 삭제",unreadOnlyText:f="안 읽은 알림만",unreadOnly:g=!1,onNotificationClick:c,onClose:i,onLoadMore:u,onMarkAllRead:h,onDeleteAll:p,onDelete:y,onUnreadOnlyToggle:w,dropdownAlign:b="right",className:I=""})=>{const[S,M]=x.useState(!1),L=x.useRef(null),E=x.useRef(null),T=x.useRef(null),m=x.useRef(null),v=x.useRef(new Set),D=x.useRef(u),A=x.useRef(r),F=x.useRef(n),P=x.useRef(e.length),O=x.useRef(-1);x.useEffect(()=>{D.current=u,A.current=r,F.current=n,P.current=e.length}),x.useEffect(()=>{if(!m.current||!T.current||!S)return;O.current=-1;const U=new IntersectionObserver(([$])=>{$.isIntersecting&&(F.current||!A.current||O.current!==P.current&&(O.current=P.current,D.current?.()))},{root:T.current,threshold:.1});return U.observe(m.current),()=>U.disconnect()},[S]),x.useEffect(()=>{if(!T.current||!S)return;const U=new IntersectionObserver(G=>{G.forEach(K=>{const z=K.target.getAttribute("data-notification-id"),W=K.target.getAttribute("data-unread")==="true";z&&W&&K.isIntersecting&&v.current.add(z)})},{root:T.current,threshold:.5});return T.current.querySelectorAll("[data-notification-id]").forEach(G=>U.observe(G)),()=>U.disconnect()},[S,e]);const N=t>0?t:e.filter(U=>!U.read).length,C=x.useCallback(()=>{if(S){if(N>0){const U=Array.from(v.current).filter($=>{const G=e.find(K=>String(K.id)===String($));return G&&!G.read});U.length>0&&i?.(U)}v.current.clear(),M(!1)}},[S,i,N,e]);x.useEffect(()=>{if(!S)return;const U=$=>{L.current&&!L.current.contains($.target)&&C()};return document.addEventListener("mousedown",U),()=>document.removeEventListener("mousedown",U)},[S,C]);const k=x.useCallback(()=>{S?C():M(!0)},[S,C]);return x.useLayoutEffect(()=>{const U=E.current;if(!S||!U)return;U.style.transform="";const $=U.getBoundingClientRect(),G=typeof window<"u"?window.innerWidth:0;if($.width===0&&$.height===0)return;const K=8;let z=0;$.right>G-K?z=-($.right-(G-K)):$.left<K&&(z=K-$.left),z!==0&&(U.style.transform=`translateX(${z}px)`)},[S,b,e.length]),d.jsxs(j,{ref:L,className:`relative ${I}`,children:[d.jsxs(Q,{onClick:k,className:"relative p-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors cursor-pointer","aria-label":o,children:[d.jsx(ue,{name:Je.Bell,className:"w-5 h-5"}),N>0&&d.jsx(re,{className:"absolute -top-1 -right-1 w-5 h-5 flex items-center justify-center text-xs font-bold text-white bg-red-500 rounded-full",children:N>99?"99+":N})]}),S&&d.jsxs(j,{ref:E,className:`absolute ${b==="left"?"left-0":"right-0"} mt-2 w-80 max-w-[calc(100vw-1rem)] bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`,children:[d.jsxs(j,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between gap-2",children:[d.jsxs(j,{className:"flex items-center gap-3 min-w-0",children:[d.jsx(re,{className:"font-semibold text-gray-900 dark:text-white Line truncated
`+yt),He&&gn([F,P,O],Qt=>{yt=$r(yt,Qt," ")}),M&&Le?M.createHTML(yt):yt},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ze(ge),J=!0},t.clearConfig=function(){Ge=null,J=!1},t.isValidAttribute=function(ge,H,q){Ge||Ze({});const le=De(ge),Ve=De(H);return dc(le,Ve,q)},t.addHook=function(ge,H){typeof H=="function"&&Ur(A[ge],H)},t.removeHook=function(ge,H){if(H!==void 0){const q=Kc(A[ge],H);return q===-1?void 0:Vc(A[ge],q,1)[0]}return Xa(A[ge])},t.removeHooks=function(ge){A[ge]=[]},t.removeAllHooks=function(){A=rs()},t}var os=ns();const cd=e=>window.G7Core?.state?.get?.(e),dd=e=>{window.G7Core?.dispatch?.({handler:"navigate",params:{path:e}})},ud=e=>{const t=Math.round(e*2)/2;return[1,2,3,4,5].map(r=>t>=r?"full":t>=r-.5?"half":"empty")},as=({product:e,onClick:t,shopBase:r="/shop",className:n=""})=>{const o=cd("preferredCurrency")||"KRW",a=w=>{const b=`multi_currency_${w}`,I=e[b];if(I&&I[o])return I[o].formatted;const S=`${w}_formatted`;return e[S]},s=e.name_localized??(typeof e.name=="string"?e.name:"")??"",l=a("selling_price"),f=a("list_price"),g=e.discount_rate&&e.discount_rate>0,c=e.sales_status&&e.sales_status!=="on_sale",i=e.labels??[],u=w=>os.sanitize(w,{ALLOWED_TAGS:["mark"],ALLOWED_ATTR:[]}),h=e.name_highlighted,p=e.description_highlighted??e.short_description,y=()=>{t?t(e.id):dd(`${r==="/"?"":r}/products/${e.id}`)};return d.jsxs(Q,{onClick:y,className:`block w-full text-left group bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-lg transition-shadow cursor-pointer ${n}`,children:[d.jsxs(j,{className:"relative aspect-square overflow-hidden bg-gray-100 dark:bg-gray-700",children:[d.jsx(Wt,{src:e.thumbnail_url,alt:s,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-200",loading:"lazy"}),c&&d.jsx(j,{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:d.jsx(re,{className:`text-lg font-bold ${e.sales_status==="sold_out"?"text-red-300":e.sales_status==="suspended"?"text-amber-300":"text-blue-300"}`,style:{textShadow:"0 1px 4px rgba(0,0,0,0.6)"},children:e.sales_status_label??e.sales_status})}),g&&e.sales_status!=="sold_out"&&e.sales_status!=="suspended"&&d.jsxs(re,{className:"absolute top-2 left-2 px-2 py-1 bg-red-500 text-white text-xs font-bold rounded",children:[e.discount_rate,"%"]}),i.length>0&&d.jsx(j,{className:"absolute bottom-2 right-2 flex gap-1 flex-wrap justify-end",children:i.map((w,b)=>d.jsx(re,{className:"text-xs text-white font-medium px-1.5 py-0.5 rounded",style:{backgroundColor:w.color||"#6b7280"},children:w.name},b))})]}),d.jsxs(j,{className:"p-4",children:[d.jsxs(j,{className:"flex items-center gap-1.5 flex-wrap",children:[e.primary_category&&d.jsx(re,{className:"inline-block text-xs font-medium text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30 px-2 py-0.5 rounded",children:e.primary_category}),e.brand_name&&d.jsx(re,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.brand_name})]}),h?d.jsx(j,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:u(h)}}):d.jsx(dn,{className:"mt-1 font-medium text-gray-900 dark:text-white line-clamp-1",children:s}),p&&d.jsx(j,{className:"mt-1 text-sm text-gray-600 dark:text-gray-400 line-clamp-2 [&_mark]:bg-yellow-200 [&_mark]:dark:bg-yellow-500/40 [&_mark]:px-0.5 [&_mark]:rounded",dangerouslySetInnerHTML:{__html:u(p)}}),d.jsxs(j,{className:"mt-1.5 flex items-center gap-1",children:[ud(e.rating_avg??0).map((w,b)=>d.jsxs(re,{className:`text-xs ${w==="empty"?"text-gray-300 dark:text-gray-600":"text-yellow-400"}`,children:[w==="full"&&d.jsx("i",{className:"fa-solid fa-star"}),w==="half"&&d.jsx("i",{className:"fa-solid fa-star-half-stroke"}),w==="empty"&&d.jsx("i",{className:"fa-regular fa-star"})]},b)),d.jsx(re,{className:"text-xs text-gray-600 dark:text-gray-400 ml-0.5",children:(e.rating_avg??0).toFixed(1)}),d.jsxs(re,{className:"text-xs text-gray-400 dark:text-gray-500",children:["(",e.review_count??0,")"]})]}),d.jsxs(j,{className:"mt-2 flex items-baseline gap-2",children:[d.jsx(re,{className:"font-bold text-gray-900 dark:text-white",children:l}),f&&g&&d.jsx(re,{className:"text-sm text-gray-500 dark:text-gray-400 line-through",children:f})]})]})]})},fd=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"})),ss="carousel",Br="controller",hd="navigation",gd="no-scroll",go="portal",pd="root",ls="toolbar",md="counter",Gr="fullscreen",is="slideshow",Wr="thumbnails",cs="zoom",yr="loading",po="playing",Kr="error",Vr="complete",bd="placeholder",Yr=e=>`active-slide-${e}`,yd=Yr(yr),vd=Yr(po),wd=Yr(Kr),xd=Yr(Vr),ds="fullsize",vr="flex_center",kd="no_scroll",us="no_scroll_padding",mo="slide",fs="slide_wrapper",Cd="slide_wrapper_interactive",Rt="prev",er="next",bo="swipe",wr="close",hs="onPointer Line truncated
inline-flex items-center rounded-full border transition-colors
${s[o]}
${u?`${c.activeColor} border-transparent`:"border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}
`,title:wl(c.labelKey),children:[d.jsx(re,{className:l[o],children:c.emoji}),d.jsx(re,{children:wl(c.labelKey)}),i>0&&d.jsx(re,{className:"font-medium",children:i})]},c.type)})})},kf=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"})),_n=window.G7Core?.createLogger?.("Comp:RichTextEditor")??{log:(...e)=>console.log("[Comp:RichTextEditor]",...e),warn:(...e)=>console.warn("[Comp:RichTextEditor]",...e),error:(...e)=>console.error("[Comp:RichTextEditor]",...e)},kt=(e,t)=>window.G7Core?.t?.(e,t)??e,kl=({name:e,initialValue:t="",placeholder:r,onChange:n,imageUploadUrl:o="/api/upload/image",minHeight:a="300px",disabled:s=!1,className:l=""})=>{const f=x.useRef(null),[g,c]=x.useState(t),[i,u]=x.useState(!1),[h,p]=x.useState(!1),[y,w]=x.useState("");x.useEffect(()=>{f.current&&!f.current.innerHTML&&(f.current.innerHTML=t)},[t]),x.useEffect(()=>{n&&n(g)},[g,n]);const b=m=>{_n.log("Apply format:",m)},L=async m=>{const v=new FormData;v.append("file",m);try{const D=await fetch(o,{method:"POST",body:v,credentials:"include"});if(!D.ok)throw new Error("업로드 실패");const N=await D.json();_n.log("Image uploaded:",N.url)}catch(D){_n.error("이미지 업로드 오류:",D)}},S=m=>{const v=m.target.files?.[0];v&&L(v)},O=()=>{y&&(_n.log("Insert link:",y),p(!1),w(""))},F=[{format:"bold",icon:"B",title:kt("editor.toolbar.bold")},{format:"italic",icon:"I",title:kt("editor.toolbar.italic")},{format:"underline",icon:"U",title:kt("editor.toolbar.underline")},{format:"strike",icon:"S",title:kt("editor.toolbar.strike")},{format:"code",icon:"</>",title:kt("editor.toolbar.code")}],E=[{format:"h1",label:"H1"},{format:"h2",label:"H2"},{format:"h3",label:"H3"}],T=[{format:"bulletList",icon:"•",title:kt("editor.toolbar.bullet_list")},{format:"orderedList",icon:"1.",title:kt("editor.toolbar.ordered_list")},{format:"blockquote",icon:"❝",title:kt("editor.toolbar.blockquote")}];return d.jsxs(j,{className:`border border-gray-300 dark:border-gray-600 rounded-lg overflow-hidden ${l}`,children:[d.jsxs(j,{className:"flex flex-wrap items-center gap-1 p-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[d.jsx(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:F.map(m=>d.jsx(Q,{type:"button",onClick:()=>b(m.format),disabled:s,className:"w-8 h-8 flex items-center justify-center text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",title:m.title,children:m.icon},m.format))}),d.jsx(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:E.map(m=>d.jsx(Q,{type:"button",onClick:()=>b(m.format),disabled:s,className:"px-2 h-8 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",children:m.label},m.format))}),d.jsx(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:T.map(m=>d.jsx(Q,{type:"button",onClick:()=>b(m.format),disabled:s,className:"w-8 h-8 flex items-center justify-center text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",title:m.title,children:m.icon},m.format))}),d.jsxs(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:[d.jsx(Q,{type:"button",onClick:()=>p(!0),disabled:s,className:"w-8 h-8 flex items-center justify-center text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",title:kt("editor.toolbar.link"),children:"🔗"}),d.jsxs(br,{className:"w-8 h-8 flex items-center justify-center text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded cursor-pointer",children:["🖼",d.jsx(vt,{type:"file",accept:"image/*",onChange:S,disabled:s,className:"hidden"})]})]}),d.jsxs(Q,{type:"button",onClick:()=>u(!i),disabled:s,className:`px-2 h-8 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50 ${i?"bg-gray-200 dark:bg-gray-700":""}`,children:["</>",kt("editor.toolbar.code_view")]})]}),i?d.jsx(Jn,{value:g,onChange:m=>c(m.target.value),placeholder:r,disabled:s,className:"w-full p-4 bg-gray-900 text-gray-100 font-mono text-sm focus:outline-none resize-none",style:{minHeight:a}}):d.jsx(j,{ref:f,contentEditable:!s,onInput:m=>c(m.currentTarget.innerHTML),className:"p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none prose dark:prose-invert max-w-none",style:{minHeight:a},"data-placeholder":r}),d.jsx(vt,{type:"hidden",name:e,value:g}),h&&d.jsx(j,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:d.jsxs(j,{className:"bg-white dark:bg-gray-800 rounded-lg p-6 w-96",children:[d.jsx(dn,{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:kt("editor.link_modal.title")}),d.js Line truncated
`,title:wl(c.labelKey),children:[d.jsx(re,{className:l[o],children:c.emoji}),d.jsx(re,{children:wl(c.labelKey)}),i>0&&d.jsx(re,{className:"font-medium",children:i})]},c.type)})})},kf=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"})),_n=window.G7Core?.createLogger?.("Comp:RichTextEditor")??{log:(...e)=>console.log("[Comp:RichTextEditor]",...e),warn:(...e)=>console.warn("[Comp:RichTextEditor]",...e),error:(...e)=>console.error("[Comp:RichTextEditor]",...e)},kt=(e,t)=>window.G7Core?.t?.(e,t)??e,kl=({name:e,initialValue:t="",placeholder:r,onChange:n,imageUploadUrl:o="/api/upload/image",minHeight:a="300px",disabled:s=!1,className:l=""})=>{const f=x.useRef(null),[g,c]=x.useState(t),[i,u]=x.useState(!1),[h,p]=x.useState(!1),[y,w]=x.useState("");x.useEffect(()=>{f.current&&!f.current.innerHTML&&(f.current.innerHTML=t)},[t]),x.useEffect(()=>{n&&n(g)},[g,n]);const b=m=>{_n.log("Apply format:",m)},I=async m=>{const v=new FormData;v.append("file",m);try{const D=await fetch(o,{method:"POST",body:v,credentials:"include"});if(!D.ok)throw new Error("업로드 실패");const A=await D.json();_n.log("Image uploaded:",A.url)}catch(D){_n.error("이미지 업로드 오류:",D)}},S=m=>{const v=m.target.files?.[0];v&&I(v)},M=()=>{y&&(_n.log("Insert link:",y),p(!1),w(""))},L=[{format:"bold",icon:"B",title:kt("editor.toolbar.bold")},{format:"italic",icon:"I",title:kt("editor.toolbar.italic")},{format:"underline",icon:"U",title:kt("editor.toolbar.underline")},{format:"strike",icon:"S",title:kt("editor.toolbar.strike")},{format:"code",icon:"</>",title:kt("editor.toolbar.code")}],E=[{format:"h1",label:"H1"},{format:"h2",label:"H2"},{format:"h3",label:"H3"}],T=[{format:"bulletList",icon:"•",title:kt("editor.toolbar.bullet_list")},{format:"orderedList",icon:"1.",title:kt("editor.toolbar.ordered_list")},{format:"blockquote",icon:"❝",title:kt("editor.toolbar.blockquote")}];return d.jsxs(j,{className:`border border-gray-300 dark:border-gray-600 rounded-lg overflow-hidden ${l}`,children:[d.jsxs(j,{className:"flex flex-wrap items-center gap-1 p-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[d.jsx(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:L.map(m=>d.jsx(Q,{type:"button",onClick:()=>b(m.format),disabled:s,className:"w-8 h-8 flex items-center justify-center text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",title:m.title,children:m.icon},m.format))}),d.jsx(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:E.map(m=>d.jsx(Q,{type:"button",onClick:()=>b(m.format),disabled:s,className:"px-2 h-8 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",children:m.label},m.format))}),d.jsx(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:T.map(m=>d.jsx(Q,{type:"button",onClick:()=>b(m.format),disabled:s,className:"w-8 h-8 flex items-center justify-center text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",title:m.title,children:m.icon},m.format))}),d.jsxs(j,{className:"flex items-center gap-1 pr-2 border-r border-gray-200 dark:border-gray-700",children:[d.jsx(Q,{type:"button",onClick:()=>p(!0),disabled:s,className:"w-8 h-8 flex items-center justify-center text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50",title:kt("editor.toolbar.link"),children:"🔗"}),d.jsxs(br,{className:"w-8 h-8 flex items-center justify-center text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded cursor-pointer",children:["🖼",d.jsx(vt,{type:"file",accept:"image/*",onChange:S,disabled:s,className:"hidden"})]})]}),d.jsxs(Q,{type:"button",onClick:()=>u(!i),disabled:s,className:`px-2 h-8 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 rounded disabled:opacity-50 ${i?"bg-gray-200 dark:bg-gray-700":""}`,children:["</>",kt("editor.toolbar.code_view")]})]}),i?d.jsx(Jn,{value:g,onChange:m=>c(m.target.value),placeholder:r,disabled:s,className:"w-full p-4 bg-gray-900 text-gray-100 font-mono text-sm focus:outline-none resize-none",style:{minHeight:a}}):d.jsx(j,{ref:f,contentEditable:!s,onInput:m=>c(m.currentTarget.innerHTML),className:"p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none prose dark:prose-invert max-w-none",style:{minHeight:a},"data-placeholder":r}),d.jsx(vt,{type:"hidden",name:e,value:g}),h&&d.jsx(j,{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:d.jsxs(j,{className:"bg-white dark:bg-gray-800 rounded-lg p-6 w-96",children:[d.jsx(dn,{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:kt("editor.link_modal.title")}),d.js Line truncated
whitespace-pre-wrap
text-gray-900 dark:text-gray-100
font-sans
@@ -39,7 +39,7 @@ var SirsoftBasic=(function(R,d,x,Jt){"use strict";function pc(e){const t=Object.
[&_tr:hover]:bg-gray-50 dark:[&_tr:hover]:bg-gray-700/50
after:content-[''] after:block after:clear-both
${n}
`.trim().replace(/\s+/g," ");return d.jsx(j,{className:f,dangerouslySetInnerHTML:{__html:l}})},Sf=Object.freeze(Object.defineProperty({__proto__:null,HtmlContent:Bo},Symbol.toStringTag,{value:"Module"})),Go=()=>window.G7Core,Wo=(e,t)=>Go()?.t?.(e,t)??e,Cl=({content:e="",onChange:t,isHtml:r=!1,onIsHtmlChange:n,rows:o=15,placeholder:a="",label:s,showHtmlModeToggle:l=!0,contentClassName:f="",purifyConfig:g,className:c="",name:i="content",htmlFieldName:u="content_mode",readOnly:h=!1})=>{const[p,y]=x.useState(r),[w,b]=x.useState(e),[L,S]=x.useState(!1);x.useEffect(()=>{y(r)},[r]),x.useEffect(()=>{b(e)},[e]);const O=x.useCallback(T=>{const m=T.target.value;if(b(m),t){const v=Go()?.createChangeEvent?.({value:m,name:i,type:"textarea"})??{target:{name:i,value:m}};t(v)}},[t,i]),F=x.useCallback(T=>{const m=T.target.checked;if(y(m),m||S(!1),n){const v=Go()?.createChangeEvent?.({checked:m,name:u,type:"checkbox"})??{target:{name:u,checked:m}};n(v)}},[n,u]),E=x.useCallback(()=>{S(T=>!T)},[]);return d.jsxs(j,{className:`space-y-2 ${c}`,children:[d.jsxs(j,{className:"flex items-center justify-between",children:[s&&d.jsx(br,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:s}),d.jsxs(j,{className:"flex items-center gap-3",children:[p&&!h&&d.jsx(Q,{type:"button",onClick:E,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${L?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:Wo(L?"common.preview_off":"common.preview")}),l&&d.jsxs(br,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[d.jsx(vt,{type:"checkbox",name:u,checked:p,onChange:F,disabled:h,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),d.jsx(j,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Wo("common.html_mode")})]})]})]}),!L&&d.jsx(Jn,{name:i,value:w,onChange:O,placeholder:a,rows:o,readOnly:h,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${p?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`}),L&&d.jsx(j,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:d.jsx(Bo,{content:w,isHtml:!0,className:f||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:g})})]})},Ef=Object.freeze(Object.defineProperty({__proto__:null,HtmlEditor:Cl},Symbol.toStringTag,{value:"Module"})),Sl=e=>window.G7Core?.t?.(e)??e,Ko=({maxHeight:e=500,expandText:t,collapseText:r,className:n="",children:o})=>{const[a,s]=x.useState(!1),[l,f]=x.useState(!1),g=x.useRef(null),c=x.useCallback(()=>{if(g.current){const p=g.current.scrollHeight;f(p>e)}},[e]);x.useEffect(()=>{c();const p=g.current;if(!p)return;const y=p.querySelectorAll("img");y.forEach(b=>{b.complete||b.addEventListener("load",c)});let w=null;return typeof ResizeObserver<"u"&&(w=new ResizeObserver(c),w.observe(p)),()=>{y.forEach(b=>{b.removeEventListener("load",c)}),w?.disconnect()}},[c,o]);const i=()=>{s(p=>!p)},u=t||Sl("sirsoft-ecommerce.shop.product.expand_detail"),h=r||Sl("sirsoft-ecommerce.shop.product.collapse_detail");return d.jsxs(j,{className:n,children:[d.jsxs(j,{className:"relative",children:[d.jsx(j,{ref:g,className:!a&&l?"overflow-hidden transition-[max-height] duration-300 ease-in-out":"transition-[max-height] duration-300 ease-in-out",style:!a&&l?{maxHeight:`${e}px`}:void 0,children:o}),!a&&l&&d.jsx(j,{className:"absolute bottom-0 left-0 right-0 h-24 bg-gradient-to-t from-white dark:from-gray-900 to-transparent pointer-events-none"})]}),l&&d.jsxs(Q,{type:"button",onClick:i,className:"flex items-center justify-center w-full py-3.5 bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer gap-1.5",children:[d.jsx(re,{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:a?h:u}),d.jsx(ue,{name:a?"chevron-up":"chevron-down",size:"sm"})]})]})},_f=Object.freeze(Object.defineProperty({__proto__:null,ExpandableContent:Ko,default:Ko},Symbol.toStringTag,{value:"Module"})),Tf=(e,t)=>window.G7Core?.t?.(e,t)??e,Vo=({isOpen:e,onClose:t,title:r,icon:n,iconClassName:o="text-gray-5 Line truncated
`.trim().replace(/\s+/g," ");return d.jsx(j,{className:f,dangerouslySetInnerHTML:{__html:l}})},Sf=Object.freeze(Object.defineProperty({__proto__:null,HtmlContent:Bo},Symbol.toStringTag,{value:"Module"})),Go=()=>window.G7Core,Wo=(e,t)=>Go()?.t?.(e,t)??e,Cl=({content:e="",onChange:t,isHtml:r=!1,onIsHtmlChange:n,rows:o=15,placeholder:a="",label:s,showHtmlModeToggle:l=!0,contentClassName:f="",purifyConfig:g,className:c="",name:i="content",htmlFieldName:u="content_mode",readOnly:h=!1})=>{const[p,y]=x.useState(r),[w,b]=x.useState(e),[I,S]=x.useState(!1);x.useEffect(()=>{y(r)},[r]),x.useEffect(()=>{b(e)},[e]);const M=x.useCallback(T=>{const m=T.target.value;if(b(m),t){const v=Go()?.createChangeEvent?.({value:m,name:i,type:"textarea"})??{target:{name:i,value:m}};t(v)}},[t,i]),L=x.useCallback(T=>{const m=T.target.checked;if(y(m),m||S(!1),n){const v=Go()?.createChangeEvent?.({checked:m,name:u,type:"checkbox"})??{target:{name:u,checked:m}};n(v)}},[n,u]),E=x.useCallback(()=>{S(T=>!T)},[]);return d.jsxs(j,{className:`space-y-2 ${c}`,children:[d.jsxs(j,{className:"flex items-center justify-between",children:[s&&d.jsx(br,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:s}),d.jsxs(j,{className:"flex items-center gap-3",children:[p&&!h&&d.jsx(Q,{type:"button",onClick:E,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${I?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:Wo(I?"common.preview_off":"common.preview")}),l&&d.jsxs(br,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[d.jsx(vt,{type:"checkbox",name:u,checked:p,onChange:L,disabled:h,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),d.jsx(j,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Wo("common.html_mode")})]})]})]}),!I&&d.jsx(Jn,{name:i,value:w,onChange:M,placeholder:a,rows:o,readOnly:h,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${p?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`}),I&&d.jsx(j,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:d.jsx(Bo,{content:w,isHtml:!0,className:f||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:g})})]})},Ef=Object.freeze(Object.defineProperty({__proto__:null,HtmlEditor:Cl},Symbol.toStringTag,{value:"Module"})),Sl=e=>window.G7Core?.t?.(e)??e,Ko=({maxHeight:e=500,expandText:t,collapseText:r,className:n="",children:o})=>{const[a,s]=x.useState(!1),[l,f]=x.useState(!1),g=x.useRef(null),c=x.useCallback(()=>{if(g.current){const p=g.current.scrollHeight;f(p>e)}},[e]);x.useEffect(()=>{c();const p=g.current;if(!p)return;const y=p.querySelectorAll("img");y.forEach(b=>{b.complete||b.addEventListener("load",c)});let w=null;return typeof ResizeObserver<"u"&&(w=new ResizeObserver(c),w.observe(p)),()=>{y.forEach(b=>{b.removeEventListener("load",c)}),w?.disconnect()}},[c,o]);const i=()=>{s(p=>!p)},u=t||Sl("sirsoft-ecommerce.shop.product.expand_detail"),h=r||Sl("sirsoft-ecommerce.shop.product.collapse_detail");return d.jsxs(j,{className:n,children:[d.jsxs(j,{className:"relative",children:[d.jsx(j,{ref:g,className:!a&&l?"overflow-hidden transition-[max-height] duration-300 ease-in-out":"transition-[max-height] duration-300 ease-in-out",style:!a&&l?{maxHeight:`${e}px`}:void 0,children:o}),!a&&l&&d.jsx(j,{className:"absolute bottom-0 left-0 right-0 h-24 bg-gradient-to-t from-white dark:from-gray-900 to-transparent pointer-events-none"})]}),l&&d.jsxs(Q,{type:"button",onClick:i,className:"flex items-center justify-center w-full py-3.5 bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer gap-1.5",children:[d.jsx(re,{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:a?h:u}),d.jsx(ue,{name:a?"chevron-up":"chevron-down",size:"sm"})]})]})},_f=Object.freeze(Object.defineProperty({__proto__:null,ExpandableContent:Ko,default:Ko},Symbol.toStringTag,{value:"Module"})),Tf=(e,t)=>window.G7Core?.t?.(e,t)??e,Vo=({isOpen:e,onClose:t,title:r,icon:n,iconClassName:o="text-gray-5 Line truncated
let scriptImported = false
self.addEventListener('message', async (e) => {
const { file, id, imageCompressionLibUrl, options } = e.data
@@ -58,14 +58,14 @@ self.addEventListener('message', async (e) => {
self.postMessage({ error: e.message + '\\n' + e.stack, id })
}
})
`;let Qo;function $f(e,t){return new Promise(((r,n)=>{Qo||(Qo=(function(s){const l=[];return l.push(s),URL.createObjectURL(new Blob(l))})(Uf));const o=new Worker(Qo);o.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)o.terminate();else if(s.data.progress===void 0){if(s.data.error)return n(new Error(s.data.error)),void o.terminate();r(s.data.file),o.terminate()}else t.onProgress(s.data.progress)})),o.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",(()=>{n(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function it(e,t){return new Promise((function(r,n){let o,a,s,l,f,g;if(o={...t},s=0,{onProgress:l}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,f=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{s=h,typeof l=="function"&&l(s)},!(e instanceof Blob||e instanceof Ff))return n(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(new Error("The file given is not an image"));if(g=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!f||typeof Worker!="function"||g)return $l(e,o).then(function(h){try{return a=h,u.call(this)}catch(p){return n(p)}}.bind(this),n);var c=function(){try{return u.call(this)}catch(h){return n(h)}}.bind(this),i=function(h){try{return $l(e,o).then((function(p){try{return a=p,c()}catch(y){return n(y)}}),n)}catch(p){return n(p)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",$f(e,o).then((function(h){try{return a=h,c()}catch{return i()}}),i)}catch{i()}function u(){try{a.name=e.name,a.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=Tl(e,a))}catch{}return r(a)}}))}it.getDataUrlFromFile=Ol,it.getFilefromDataUrl=qo,it.loadImage=Dl,it.drawImageInCanvas=Pl,it.drawFileInCanvas=On,it.canvasToFile=Dn,it.getExifOrientation=Ll,it.handleMaxWidthOrHeight=Fl,it.followExifOrientation=Ul,it.cleanupCanvasMemory=Vt,it.isAutoOrientationInBrowser=Tr,it.approximateBelowMaximumCanvasSizeOfBrowser=Il,it.copyExifWithoutOrientation=Tl,it.getBrowserName=ur,it.version="2.0.2";const zf=window.G7Core,In=e=>{const t=["B","KB","MB","GB"];let r=0,n=e;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(2)} ${t[r]}`},zl=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const r=Object.values(t.response.data.errors)[0];if(Array.isArray(r)&&r[0])return r[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},Hl=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",nt=(e,t)=>zf?.t?.(e,t)??e,fr=window.G7Core;function jl(e){const{attachmentableType:t,attachmentableId:r,collection:n,maxFiles:o,maxSize:a,maxConcurrentUploads:s,accept:l,imageCompression:f,roleIds:g,autoUpload:c,initialFiles:i,endpoints:u,onFilesChange:h,onUploadComplete:p,onUploadError:y,onRemove:w,onReorder:b,uploadTriggerEvent:L,confirmBeforeRemove:S,uploadParams:O}=e,[F,E]=x.useState(i),[T,m]=x.useState([]),[v,D]=x.useState(!1),N=x.useRef(null),P=x.useRef(0),I=x.useRef(new Set),M=x.useRef(new Map),[A,C]=x.useState(!1),[k,z]=x.useState(null),[$,G]=x.useState(!1),V=x.useRef(!1),[U,W]=x.useState([]),K=x.useRef(i),[B,Z]=x.useState(!1),[pe,ie]=x.useState(0),fe=x.useRef(0),[ee,_e]=x.useState(new Map),ye=x.useRef(new Map);x.useEffect(()=>{h?.(T)},[T,h]);const He=x.useMemo(()=>{const X=K.current;return X===i?X:X.length!==i.length?(K.current=i,i):X.length===0&&i.length===0?X:i.some((ce,se)=>ce.id!==X[se]?.id)?(K.current=i,i):X},[i]);x.useEffect(()=>{if(V.current)return;const X=He.filter(se=>!I.current.has(se.id)&&(!se.hash||!I.current.has(se.hash))),ne=new Set(X.map(se=>se.id)),ce=Array.from(M.current.values()).filter(se=>!ne.has(se.id)&&!I.current.has(se.id));E([...X,...ce])},[He]);const Fe=x.useCallback(async X=>{const ne={maxSizeMB:f?.maxSizeMB??1,maxWidthOrHeight:f?.maxWidthOrHeight??1920,useWebWorker:!0};return await it(X,ne)},[f]),ve=x.useCallback(async X=>{const ne=F.length+T.length,ce=o-ne,se=Array.from(X).slice(0,ce);for(const oe of se){if(oe.size>a*1024*1024){y?.(`[${oe.name}] 파일 크기(${In(oe.size)})가 최대 허용 크기(${a}MB)를 초과합니다.`,oe);continue}if(l){const we="."+oe.name.split(".").pop()?.toLowerCase();if(!l.split(",").map(Ie=>Ie.trim().toLowerCase()).some(Ie=>{if(Ie.includes("/")){if(Ie.endsWith("/*")){const Be=Ie.slice(0,-2);return oe.type.toLowerCase().startsWith(Be+"/")}return oe.type.toLowerCase()===Ie}return we===Ie})){y?. Line truncated
`;let Qo;function $f(e,t){return new Promise(((r,n)=>{Qo||(Qo=(function(s){const l=[];return l.push(s),URL.createObjectURL(new Blob(l))})(Uf));const o=new Worker(Qo);o.addEventListener("message",(function(s){if(t.signal&&t.signal.aborted)o.terminate();else if(s.data.progress===void 0){if(s.data.error)return n(new Error(s.data.error)),void o.terminate();r(s.data.file),o.terminate()}else t.onProgress(s.data.progress)})),o.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",(()=>{n(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function it(e,t){return new Promise((function(r,n){let o,a,s,l,f,g;if(o={...t},s=0,{onProgress:l}=o,o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,f=typeof o.useWebWorker!="boolean"||o.useWebWorker,delete o.useWebWorker,o.onProgress=h=>{s=h,typeof l=="function"&&l(s)},!(e instanceof Blob||e instanceof Ff))return n(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(new Error("The file given is not an image"));if(g=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!f||typeof Worker!="function"||g)return $l(e,o).then(function(h){try{return a=h,u.call(this)}catch(p){return n(p)}}.bind(this),n);var c=function(){try{return u.call(this)}catch(h){return n(h)}}.bind(this),i=function(h){try{return $l(e,o).then((function(p){try{return a=p,c()}catch(y){return n(y)}}),n)}catch(p){return n(p)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",$f(e,o).then((function(h){try{return a=h,c()}catch{return i()}}),i)}catch{i()}function u(){try{a.name=e.name,a.lastModified=e.lastModified}catch{}try{o.preserveExif&&e.type==="image/jpeg"&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=Tl(e,a))}catch{}return r(a)}}))}it.getDataUrlFromFile=Ol,it.getFilefromDataUrl=qo,it.loadImage=Dl,it.drawImageInCanvas=Pl,it.drawFileInCanvas=On,it.canvasToFile=Dn,it.getExifOrientation=Ll,it.handleMaxWidthOrHeight=Fl,it.followExifOrientation=Ul,it.cleanupCanvasMemory=Vt,it.isAutoOrientationInBrowser=Tr,it.approximateBelowMaximumCanvasSizeOfBrowser=Il,it.copyExifWithoutOrientation=Tl,it.getBrowserName=ur,it.version="2.0.2";const zf=window.G7Core,In=e=>{const t=["B","KB","MB","GB"];let r=0,n=e;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(2)} ${t[r]}`},zl=e=>{if(e&&typeof e=="object"){const t=e;if(t.response?.data?.message)return t.response.data.message;if(t.response?.data?.errors){const r=Object.values(t.response.data.errors)[0];if(Array.isArray(r)&&r[0])return r[0]}if(t.message)return t.message}return e instanceof Error?e.message:"업로드 실패"},Hl=e=>e?e.startsWith("image/")?"fa-file-image":e.startsWith("video/")?"fa-file-video":e.startsWith("audio/")?"fa-file-audio":e==="application/pdf"?"fa-file-pdf":e.includes("word")||e.includes("document")?"fa-file-word":e.includes("excel")||e.includes("spreadsheet")?"fa-file-excel":e.includes("zip")||e.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",nt=(e,t)=>zf?.t?.(e,t)??e,fr=window.G7Core;function jl(e){const{attachmentableType:t,attachmentableId:r,collection:n,maxFiles:o,maxSize:a,maxConcurrentUploads:s,accept:l,imageCompression:f,roleIds:g,autoUpload:c,initialFiles:i,endpoints:u,onFilesChange:h,onUploadComplete:p,onUploadError:y,onRemove:w,onReorder:b,uploadTriggerEvent:I,confirmBeforeRemove:S,uploadParams:M}=e,[L,E]=x.useState(i),[T,m]=x.useState([]),[v,D]=x.useState(!1),A=x.useRef(null),F=x.useRef(0),P=x.useRef(new Set),O=x.useRef(new Map),[N,C]=x.useState(!1),[k,U]=x.useState(null),[$,G]=x.useState(!1),K=x.useRef(!1),[z,W]=x.useState([]),V=x.useRef(i),[B,Z]=x.useState(!1),[pe,ie]=x.useState(0),fe=x.useRef(0),[ee,_e]=x.useState(new Map),ye=x.useRef(new Map);x.useEffect(()=>{h?.(T)},[T,h]);const He=x.useMemo(()=>{const X=V.current;return X===i?X:X.length!==i.length?(V.current=i,i):X.length===0&&i.length===0?X:i.some((ce,se)=>ce.id!==X[se]?.id)?(V.current=i,i):X},[i]);x.useEffect(()=>{if(K.current)return;const X=He.filter(se=>!P.current.has(se.id)&&(!se.hash||!P.current.has(se.hash))),ne=new Set(X.map(se=>se.id)),ce=Array.from(O.current.values()).filter(se=>!ne.has(se.id)&&!P.current.has(se.id));E([...X,...ce])},[He]);const Fe=x.useCallback(async X=>{const ne={maxSizeMB:f?.maxSizeMB??1,maxWidthOrHeight:f?.maxWidthOrHeight??1920,useWebWorker:!0};return await it(X,ne)},[f]),ve=x.useCallback(async X=>{const ne=L.length+T.length,ce=o-ne,se=Array.from(X).slice(0,ce);for(const oe of se){if(oe.size>a*1024*1024){y?.(`[${oe.name}] 파일 크기(${In(oe.size)})가 최대 허용 크기(${a}MB)를 초과합니다.`,oe);continue}if(l){const we="."+oe.name.split(".").pop()?.toLowerCase();if(!l.split(",").map(Ie=>Ie.trim().toLowerCase()).some(Ie=>{if(Ie.includes("/")){if(Ie.endsWith("/*")){const Be=Ie.slice(0,-2);return oe.type.toLowerCase().startsWith(Be+"/")}return oe.type.toLowerCase()===Ie}return we===Ie})){y?. Line truncated
relative border-2 border-dashed rounded-lg transition-colors
${e?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600"}
`,onDragOver:g=>{g.preventDefault(),t&&n(!0)},onDragLeave:()=>n(!1),onDrop:g=>{g.preventDefault(),n(!1),t&&r(g.dataTransfer.files)},children:[d.jsx("input",{ref:o,type:"file",multiple:!0,accept:a,onChange:g=>g.target.files&&r(g.target.files),className:"hidden"}),!f&&d.jsxs(j,{className:"p-8 text-center cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",onClick:()=>o.current?.click(),children:[d.jsx(Ot,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),d.jsx(It,{className:"text-sm text-gray-600 dark:text-gray-400",children:nt("attachment.drop_or_click")}),d.jsxs(It,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[nt("attachment.upload_limit",{maxFiles:s,maxSize:l}),a&&` (${a})`]})]}),f]});function Hf(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return x.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const Pn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nr(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Jo(e){return"nodeType"in e}function mt(e){var t,r;return e?Nr(e)?e:Jo(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function Ro(e){const{Document:t}=mt(e);return e instanceof t}function Zr(e){return Nr(e)?!1:e instanceof mt(e).HTMLElement}function Gl(e){return e instanceof mt(e).SVGElement}function Ar(e){return e?Nr(e)?e.document:Jo(e)?Ro(e)?e:Zr(e)||Gl(e)?e.ownerDocument:document:document:document}const Yt=Pn?x.useLayoutEffect:x.useEffect;function ea(e){const t=x.useRef(e);return Yt(()=>{t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function jf(){const e=x.useRef(null),t=x.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=x.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function qr(e,t){t===void 0&&(t=[e]);const r=x.useRef(e);return Yt(()=>{r.current!==e&&(r.current=e)},t),r}function Qr(e,t){const r=x.useRef();return x.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Ln(e){const t=ea(e),r=x.useRef(null),n=x.useCallback(o=>{o!==r.current&&t?.(o,r.current),r.current=o},[]);return[r,n]}function ta(e){const t=x.useRef();return x.useEffect(()=>{t.current=e},[e]),t.current}let ra={};function Jr(e,t){return x.useMemo(()=>{if(t)return t;const r=ra[e]==null?0:ra[e]+1;return ra[e]=r,e+"-"+r},[e,t])}function Wl(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((a,s)=>{const l=Object.entries(s);for(const[f,g]of l){const c=a[f];c!=null&&(a[f]=c+e*g)}return a},{...t})}}const Mr=Wl(1),Rr=Wl(-1);function Bf(e){return"clientX"in e&&"clientY"in e}function na(e){if(!e)return!1;const{KeyboardEvent:t}=mt(e.target);return t&&e instanceof t}function Gf(e){if(!e)return!1;const{TouchEvent:t}=mt(e.target);return t&&e instanceof t}function oa(e){if(Gf(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return Bf(e)?{x:e.clientX,y:e.clientY}:null}const en=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[en.Translate.toString(e),en.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),Kl="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wf(e){return e.matches(Kl)?e:e.querySelector(Kl)}const Kf={display:"none"};function Vf(e){let{id:t,value:r}=e;return x.createElement("div",{id:t,style:Kf},r)}function Yf(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return x.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function Xf(){const[e,t]=x.useState("");return{announce:x.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const Vl=x.createContext(null);function Zf(e){const t=x.useContext(Vl);x.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function qf(){const[e]=x.useState(()=>new Set),t=x.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[x.useCallback(n=>{let{type:o,event:a}=n;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,a)})},[e]),t]}const Qf={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},Jf={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Rf(e){let{announcements:t=Jf,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=Qf}=e;const{announce:a,announcement:s}=Xf(),l=Jr("DndLiveRegion"),[f,g]=x.useState(!1);if(x.useEffect(()=>{g(!0)},[]),Zf(x.useMemo(()=>({onDragStart(i){let{active:u}=i;a(t.onDragStart({active:u}))},onDragMove(i){let{active:u,over:h}=i;t.onDragMove&&a(t.onDragMove({active:u,over:h}))},onDragOver(i){let{active:u,over:h}=i;a(t.onDragOver({active:u,over:h}))},onDragEnd(i){let{active:u,over:h}=i;a(t.onDragEnd({active:u,over:h}))},onDragCancel(i){let{active:u,over:h}=i;a(t.onDragCancel({active:u,over:h}))}}),[a,t])),!f)return null;const c=x.createElement(x.Fragment,null,x.createElement(Vf,{id:n,value:o.draggable}),x.createElement(Yf,{id:l,announcement:s}));return r?Jt.createPortal(c,r):c}var Re;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Re||(Re={}));function Fn(){}function Yl(e,t){return x.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function eh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return x.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Ht=Object.freeze({x:0,y:0});function Xl(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Zl(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function th(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ql(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function Ql(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function Jl(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const rh=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=Jl(t,t.left,t.top),a=[];for(const s of n){const{id:l}=s,f=r.get(l);if(f){const g=Xl(Jl(f),o);a.push({id:l,data:{droppableContainer:s,value:g}})}}return a.sort(Zl)},nh=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ql(t),a=[];for(const s of n){const{id:l}=s,f=r.get(l);if(f){const g=ql(f),c=o.reduce((u,h,p)=>u+Xl(g[p],h),0),i=Number((c/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:i}})}}return a.sort(Zl)};function oh(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-n,l=a-r;if(n<o&&r<a){const f=t.width*t.height,g=e.width*e.height,c=s*l,i=c/(f+g-c);return Number(i.toFixed(4))}return 0}const ah=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const a of n){const{id:s}=a,l=r.get(s);if(l){const f=oh(l,t);f>0&&o.push({id:s,data:{droppableContainer:a,value:f}})}}return o.sort(th)};function sh(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Rl(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ht}function lh(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const ih=lh(1);function ch(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function dh(e,t,r){const n=ch(t);if(!n)return e;const{scaleX:o,scaleY:a,x:s,y:l}=n,f=e.left-s-(1-o)*parseFloat(r),g=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=o?e.width/o:e.width,i=a?e.height/a:e.height;return{width:c,height:i,top:g,right:f+c,bottom:g+i,left:f}}const uh={ignoreTransform:!1};function Or(e,t){t===void 0&&(t=uh);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:c}=mt(e).getComputedStyle(e);g&&(r=dh(r,g,c))}const{top:n,left:o,width:a,height:s,bottom:l,right:f}=r;return{top:n,left:o,width:a,height:s,bottom:l,right:f}}function ei(e){return Or(e,{ignoreTransform:!0})}function fh(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function hh(e,t){return t===void 0&&(t=mt(e).getComputedStyle(e)),t.position==="fixed"}function gh(e,t){t===void 0&&(t=mt(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","o Line truncated
`},Jf={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Rf(e){let{announcements:t=Jf,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=Qf}=e;const{announce:a,announcement:s}=Xf(),l=Jr("DndLiveRegion"),[f,g]=x.useState(!1);if(x.useEffect(()=>{g(!0)},[]),Zf(x.useMemo(()=>({onDragStart(i){let{active:u}=i;a(t.onDragStart({active:u}))},onDragMove(i){let{active:u,over:h}=i;t.onDragMove&&a(t.onDragMove({active:u,over:h}))},onDragOver(i){let{active:u,over:h}=i;a(t.onDragOver({active:u,over:h}))},onDragEnd(i){let{active:u,over:h}=i;a(t.onDragEnd({active:u,over:h}))},onDragCancel(i){let{active:u,over:h}=i;a(t.onDragCancel({active:u,over:h}))}}),[a,t])),!f)return null;const c=x.createElement(x.Fragment,null,x.createElement(Vf,{id:n,value:o.draggable}),x.createElement(Yf,{id:l,announcement:s}));return r?Jt.createPortal(c,r):c}var Re;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Re||(Re={}));function Fn(){}function Yl(e,t){return x.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function eh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return x.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Ht=Object.freeze({x:0,y:0});function Xl(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Zl(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function th(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ql(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function Ql(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function Jl(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const rh=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=Jl(t,t.left,t.top),a=[];for(const s of n){const{id:l}=s,f=r.get(l);if(f){const g=Xl(Jl(f),o);a.push({id:l,data:{droppableContainer:s,value:g}})}}return a.sort(Zl)},nh=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ql(t),a=[];for(const s of n){const{id:l}=s,f=r.get(l);if(f){const g=ql(f),c=o.reduce((u,h,p)=>u+Xl(g[p],h),0),i=Number((c/4).toFixed(4));a.push({id:l,data:{droppableContainer:s,value:i}})}}return a.sort(Zl)};function oh(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=o-n,l=a-r;if(n<o&&r<a){const f=t.width*t.height,g=e.width*e.height,c=s*l,i=c/(f+g-c);return Number(i.toFixed(4))}return 0}const ah=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const a of n){const{id:s}=a,l=r.get(s);if(l){const f=oh(l,t);f>0&&o.push({id:s,data:{droppableContainer:a,value:f}})}}return o.sort(th)};function sh(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Rl(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ht}function lh(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const ih=lh(1);function ch(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function dh(e,t,r){const n=ch(t);if(!n)return e;const{scaleX:o,scaleY:a,x:s,y:l}=n,f=e.left-s-(1-o)*parseFloat(r),g=e.top-l-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),c=o?e.width/o:e.width,i=a?e.height/a:e.height;return{width:c,height:i,top:g,right:f+c,bottom:g+i,left:f}}const uh={ignoreTransform:!1};function Or(e,t){t===void 0&&(t=uh);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:c}=mt(e).getComputedStyle(e);g&&(r=dh(r,g,c))}const{top:n,left:o,width:a,height:s,bottom:l,right:f}=r;return{top:n,left:o,width:a,height:s,bottom:l,right:f}}function ei(e){return Or(e,{ignoreTransform:!0})}function fh(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function hh(e,t){return t===void 0&&(t=mt(e).getComputedStyle(e)),t.position==="fixed"}function gh(e,t){t===void 0&&(t=mt(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","o Line truncated
flex items-center gap-3 p-4 rounded-lg border shadow-lg
min-w-[300px] max-w-md
transition-all duration-300
@@ -83,5 +83,5 @@ self.addEventListener('message', async (e) => {
transform: translateX(-100%);
}
}
`})]}):null},Ig=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionIndicator:ba,default:ba},Symbol.toStringTag,{value:"Module"})),Fi=window.G7Core?.createLogger?.("Comp:PageTransitionBlur")??{log:(...e)=>console.log("[Comp:PageTransitionBlur]",...e),warn:(...e)=>console.warn("[Comp:PageTransitionBlur]",...e)},ya=({className:e="",style:t})=>{const[r,n]=x.useState(!1);return x.useEffect(()=>{const o=window.G7Core?.TransitionManager;if(!o){Fi.warn("TransitionManager를 찾을 수 없습니다.");return}return n(o.getIsPending()),o.subscribe(s=>{Fi.log("isPending changed:",s),n(s)})},[]),r?d.jsx(j,{className:`fixed inset-0 z-40 bg-white/30 dark:bg-gray-900/30 backdrop-blur-sm transition-opacity duration-150 pointer-events-none ${e}`,style:t,role:"status","aria-label":"페이지 전환 중","data-testid":"page-transition-blur"}):null},Pg=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionBlur:ya,default:ya},Symbol.toStringTag,{value:"Module"})),Ui={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},$i=new Set(["hidden","block","inline-block","inline","flex","inline-flex","grid","inline-grid","table","table-row","table-cell","contents","list-item","flow-root"]),Lg=new Set(["Div","Flex","Grid","Section","Article","Nav","Aside","Main","Header","Footer","Fragment","Form","Container"]),Fg=new Set(["H1","H2","H3","H4","H5","H6","P","Span","Label","A","Strong","Em","Small","Badge"]),Ug=new Set(["Input","Textarea","Select","Checkbox","Radio","Toggle","DatePicker","TagInput","SearchBar"]),$g=new Set(["Img","Image","Avatar","AvatarUploader","ImageGallery","ProductImageViewer","FileUploader"]),zi={DataGrid:(e,t)=>d.jsxs("div",{className:"w-full border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-10 bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 ${e}`,children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-24 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-20 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"})]})}),Array.from({length:t},(r,n)=>d.jsx("div",{className:`h-12 border-b border-gray-100 dark:border-gray-800 ${e}`,style:{animationDelay:`${n*75}ms`},children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 flex-1 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-100 dark:bg-gray-800 rounded"}),d.jsx("div",{className:"h-3 w-14 bg-gray-100 dark:bg-gray-800 rounded"})]})},n))]}),Pagination:e=>d.jsx("div",{className:"flex justify-center gap-1.5 py-3",children:Array.from({length:5},(t,r)=>d.jsx("div",{className:`w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),Tabs:e=>d.jsxs("div",{children:[d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2 mb-3",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),d.jsx("div",{className:`h-32 bg-gray-100 dark:bg-gray-800 rounded ${e}`})]}),TabNavigation:e=>d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),ProductCard:e=>d.jsxs("div",{className:"rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-48 w-full bg-gray-200 dark:bg-gray-700 ${e}`}),d.jsxs("div",{className:"p-3 space-y-2",children:[d.jsx("div",{className:`h-3.5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:`h-4 w-1/3 bg-gray-300 dark:bg-gray-600 rounded ${e}`})]})]}),UserInfo:e=>d.jsx("div",{className:`h-3 w-14 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),QuantitySelector:e=>d.jsx("div",{className:`h-9 w-28 bg-gray-100 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 ${e}`}),Header:e=>d.jsx("header",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:d.jsxs("div",{className:"flex items-center justify-between h-16",children:[d.jsxs("div",{className:"flex items-center gap-8",children:[d.jsx("div",{className:`h-8 w-24 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:"hidden lg:flex items-center gap-6",children:Array.from({length:4},(t,r)=>d.jsx("div",{className:`h-3.5 w-16 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))})]}),d.jsx("div",{className:"flex items-center gap-4",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-8 w-8 bg-gray-200 dark:bg-gray-700 rounded-full ${e}`},r))})]})})}),Footer:e=>d.jsx("footer",{className:"bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray- Line truncated
`})]}):null},Ig=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionIndicator:ba,default:ba},Symbol.toStringTag,{value:"Module"})),Fi=window.G7Core?.createLogger?.("Comp:PageTransitionBlur")??{log:(...e)=>console.log("[Comp:PageTransitionBlur]",...e),warn:(...e)=>console.warn("[Comp:PageTransitionBlur]",...e)},ya=({className:e="",style:t})=>{const[r,n]=x.useState(!1);return x.useEffect(()=>{const o=window.G7Core?.TransitionManager;if(!o){Fi.warn("TransitionManager를 찾을 수 없습니다.");return}return n(o.getIsPending()),o.subscribe(s=>{Fi.log("isPending changed:",s),n(s)})},[]),r?d.jsx(j,{className:`fixed inset-0 z-40 bg-white/30 dark:bg-gray-900/30 backdrop-blur-sm transition-opacity duration-150 pointer-events-none ${e}`,style:t,role:"status","aria-label":"페이지 전환 중","data-testid":"page-transition-blur"}):null},Pg=Object.freeze(Object.defineProperty({__proto__:null,PageTransitionBlur:ya,default:ya},Symbol.toStringTag,{value:"Module"})),Ui={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},$i=new Set(["hidden","block","inline-block","inline","flex","inline-flex","grid","inline-grid","table","table-row","table-cell","contents","list-item","flow-root"]),Lg=new Set(["Div","Flex","Grid","Section","Article","Nav","Aside","Main","Header","Footer","Fragment","Form","Container"]),Fg=new Set(["H1","H2","H3","H4","H5","H6","P","Span","Label","A","Strong","Em","Small","Badge"]),Ug=new Set(["Input","Textarea","Select","Checkbox","Radio","Toggle","DatePicker","TagInput","SearchBar"]),$g=new Set(["Img","Image","Avatar","AvatarUploader","ImageGallery","ProductImageViewer","FileUploader"]),zi={DataGrid:(e,t)=>d.jsxs("div",{className:"w-full border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-10 bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 ${e}`,children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-24 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-20 bg-gray-300 dark:bg-gray-600 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-300 dark:bg-gray-600 rounded"})]})}),Array.from({length:t},(r,n)=>d.jsx("div",{className:`h-12 border-b border-gray-100 dark:border-gray-800 ${e}`,style:{animationDelay:`${n*75}ms`},children:d.jsxs("div",{className:"flex items-center h-full px-4 gap-8",children:[d.jsx("div",{className:"h-3 w-12 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 flex-1 bg-gray-200 dark:bg-gray-700 rounded"}),d.jsx("div",{className:"h-3 w-16 bg-gray-100 dark:bg-gray-800 rounded"}),d.jsx("div",{className:"h-3 w-14 bg-gray-100 dark:bg-gray-800 rounded"})]})},n))]}),Pagination:e=>d.jsx("div",{className:"flex justify-center gap-1.5 py-3",children:Array.from({length:5},(t,r)=>d.jsx("div",{className:`w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),Tabs:e=>d.jsxs("div",{children:[d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2 mb-3",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),d.jsx("div",{className:`h-32 bg-gray-100 dark:bg-gray-800 rounded ${e}`})]}),TabNavigation:e=>d.jsx("div",{className:"flex gap-4 border-b border-gray-200 dark:border-gray-700 pb-2",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-4 w-20 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))}),ProductCard:e=>d.jsxs("div",{className:"rounded-lg overflow-hidden",children:[d.jsx("div",{className:`h-48 w-full bg-gray-200 dark:bg-gray-700 ${e}`}),d.jsxs("div",{className:"p-3 space-y-2",children:[d.jsx("div",{className:`h-3.5 w-3/4 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:`h-4 w-1/3 bg-gray-300 dark:bg-gray-600 rounded ${e}`})]})]}),UserInfo:e=>d.jsx("div",{className:`h-3 w-14 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),QuantitySelector:e=>d.jsx("div",{className:`h-9 w-28 bg-gray-100 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 ${e}`}),Header:e=>d.jsx("header",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:d.jsxs("div",{className:"flex items-center justify-between h-16",children:[d.jsxs("div",{className:"flex items-center gap-8",children:[d.jsx("div",{className:`h-8 w-24 bg-gray-200 dark:bg-gray-700 rounded ${e}`}),d.jsx("div",{className:"hidden lg:flex items-center gap-6",children:Array.from({length:4},(t,r)=>d.jsx("div",{className:`h-3.5 w-16 bg-gray-200 dark:bg-gray-700 rounded ${e}`},r))})]}),d.jsx("div",{className:"flex items-center gap-4",children:Array.from({length:3},(t,r)=>d.jsx("div",{className:`h-8 w-8 bg-gray-200 dark:bg-gray-700 rounded-full ${e}`},r))})]})})}),Footer:e=>d.jsx("footer",{className:"bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray- Line truncated
//# sourceMappingURL=components.iife.js.map
@@ -1 +1 @@
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/IconTypes.ts","../../src/components/basic/Icon.tsx","../../src/components/basic/PasswordInput.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Footer.tsx","../../src/components/basic/Header.tsx","../../src/components/basic/Hr.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/Avatar.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/Header.tsx","../../src/components/composite/Footer.tsx","../../src/components/composite/MobileNav.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/ProductCard.tsx","../../node_modules/yet-another-react-lightbox/dist/types.js","../../node_modules/yet-another-react-lightbox/dist/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/zoom/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/counter/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/slideshow/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/fullscreen/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/thumbnails/index.js","../../src/components/basic/I.tsx","../../src/components/composite/ImageGallery.tsx","../../src/components/composite/ProductImageViewer.tsx","../../src/components/composite/QuantitySelector.tsx","../../src/components/composite/PostReactions.tsx","../../src/components/composite/RichTextEditor.tsx","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/HtmlEditor.tsx","../../src/components/composite/ExpandableContent.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/FileUploader/FileUploaderContext.tsx","../../node_modules/browser-image-compression/dist/browser-image-compression.mjs","../../src/components/composite/FileUploader/utils.ts","../../src/components/composite/FileUploader/useFileUploader.ts","../../src/components/composite/FileUploader/FileDropZone.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/composite/FileUploader/SortableThumbnailItem.tsx","../../src/components/composite/FileUploader/FileList.tsx","../../src/components/composite/FileUploader/FileUploader.tsx","../../src/components/composite/SocialLoginButtons.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageTransitionBlur.tsx","../../src/components/composite/PageSkeleton.tsx","../../src/components/composite/PageLoading.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/AvatarUploader.tsx","../../src/components/composite/UserInfo.tsx","../../src/components/composite/TabNavigation.tsx","../../src/components/composite/index.ts","../../src/components/layout/Container.tsx","../../src/components/layout/Grid.tsx","../../src/components/layout/Flex.tsx","../../src/components/layout/SectionLayout.tsx","../../src/components/layout/ThreeColumnLayout.tsx","../../src/handlers/productOptions.ts","../../src/handlers/cartHandlers.ts","../../src/handlers/cartOptionChange.ts","../../src/handlers/storageHandlers.ts","../../src/handlers/getDisplayPrice.ts","../../src/handlers/formatCurrency.ts","../../src/handlers/loadPreferredCurrency.ts","../../src/handlers/setThemeHandler.ts","../../src/handlers/index.ts","../../src/index.ts"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// G7CLine truncated
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/IconTypes.ts","../../src/components/basic/Icon.tsx","../../src/components/basic/PasswordInput.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Footer.tsx","../../src/components/basic/Header.tsx","../../src/components/basic/Hr.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/Avatar.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/Header.tsx","../../src/components/composite/Footer.tsx","../../src/components/composite/MobileNav.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/ProductCard.tsx","../../node_modules/yet-another-react-lightbox/dist/types.js","../../node_modules/yet-another-react-lightbox/dist/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/zoom/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/counter/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/slideshow/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/fullscreen/index.js","../../node_modules/yet-another-react-lightbox/dist/plugins/thumbnails/index.js","../../src/components/basic/I.tsx","../../src/components/composite/ImageGallery.tsx","../../src/components/composite/ProductImageViewer.tsx","../../src/components/composite/QuantitySelector.tsx","../../src/components/composite/PostReactions.tsx","../../src/components/composite/RichTextEditor.tsx","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/HtmlEditor.tsx","../../src/components/composite/ExpandableContent.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/FileUploader/FileUploaderContext.tsx","../../node_modules/browser-image-compression/dist/browser-image-compression.mjs","../../src/components/composite/FileUploader/utils.ts","../../src/components/composite/FileUploader/useFileUploader.ts","../../src/components/composite/FileUploader/FileDropZone.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/composite/FileUploader/SortableThumbnailItem.tsx","../../src/components/composite/FileUploader/FileList.tsx","../../src/components/composite/FileUploader/FileUploader.tsx","../../src/components/composite/SocialLoginButtons.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageTransitionBlur.tsx","../../src/components/composite/PageSkeleton.tsx","../../src/components/composite/PageLoading.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/AvatarUploader.tsx","../../src/components/composite/UserInfo.tsx","../../src/components/composite/TabNavigation.tsx","../../src/components/composite/index.ts","../../src/components/layout/Container.tsx","../../src/components/layout/Grid.tsx","../../src/components/layout/Flex.tsx","../../src/components/layout/SectionLayout.tsx","../../src/components/layout/ThreeColumnLayout.tsx","../../src/handlers/productOptions.ts","../../src/handlers/cartHandlers.ts","../../src/handlers/cartOptionChange.ts","../../src/handlers/storageHandlers.ts","../../src/handlers/getDisplayPrice.ts","../../src/handlers/formatCurrency.ts","../../src/handlers/loadPreferredCurrency.ts","../../src/handlers/setThemeHandler.ts","../../src/handlers/index.ts","../../src/index.ts"],"sourcesContent":["import React, { forwardRef } from 'react';\n\n// G7CLine truncated
@@ -1704,6 +1704,19 @@
"body": { "ids": "{{$args[0]}}" }
},
"onSuccess": [
{
"handler": "setState",
"params": {
"target": "global",
"notificationsCurrentPage": 1,
"notificationsHasMore": null,
"notificationsLoadingMore": false
}
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notifications" }
},
{
"handler": "refetchDataSource",
"params": { "dataSourceId": "notification_unread_count" }
@@ -1843,7 +1856,8 @@
"method": "GET",
"query": {
"page": "{{(_global.notificationsCurrentPage ?? notifications?.data?.pagination?.current_page ?? 1) + 1}}",
"per_page": 15
"per_page": 15,
"read": "{{(_global.notificationsUnreadOnly ?? true) ? 'unread' : 'all'}}"
}
},
"onSuccess": [
@@ -1,6 +1,6 @@
{
"name": "sirsoft-basic",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "Gnuboard7 Basic User Template Components - Nexibase Style",
"type": "module",
"main": "dist/components.js",
@@ -1,4 +1,4 @@
import React, { useState, useRef, useEffect, useCallback } from 'react';
import React, { useState, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
import { Div } from '../basic/Div';
import { Button } from '../basic/Button';
import { Span } from '../basic/Span';
@@ -105,28 +105,55 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
}) => {
const [showNotifications, setShowNotifications] = useState(false);
const notificationRef = useRef<HTMLDivElement>(null);
const dropdownRef = useRef<HTMLDivElement>(null);
const scrollRef = useRef<HTMLDivElement>(null);
const sentinelRef = useRef<HTMLDivElement>(null);
const visibleUnreadIdsRef = useRef<Set<string | number>>(new Set());
// 무한스크롤 관련 최신 값 참조 (observer 재등록 없이 최신 prop 접근)
const onLoadMoreRef = useRef(onLoadMore);
const hasMoreRef = useRef(hasMore);
const loadingRef = useRef(loading);
const notificationsCountRef = useRef(notifications.length);
// 마지막 onLoadMore 발행 시점의 notifications.length — 동일 길이에서 중복 발행 가드
const lastRequestedCountRef = useRef<number>(-1);
useEffect(() => {
onLoadMoreRef.current = onLoadMore;
hasMoreRef.current = hasMore;
loadingRef.current = loading;
notificationsCountRef.current = notifications.length;
});
/**
* 무한스크롤 — IntersectionObserver
*
* observer는 드롭다운 열림/닫힘 전환 시에만 재등록한다.
* 목록이 append되거나 loading/hasMore가 바뀌어도 observer를 새로 만들지 않으므로,
* sentinel이 이미 뷰포트에 있는 상태에서 재등록 시 즉시 intersecting callback이
* 중복 발행되던 문제를 방지한다.
*/
useEffect(() => {
if (!sentinelRef.current || !scrollRef.current || !hasMore || loading || !showNotifications) return;
if (!sentinelRef.current || !scrollRef.current || !showNotifications) return;
// 드롭다운이 새로 열릴 때마다 중복 가드 초기화
lastRequestedCountRef.current = -1;
const observer = new IntersectionObserver(
([entry]) => {
if (entry.isIntersecting) {
onLoadMore?.();
}
if (!entry.isIntersecting) return;
if (loadingRef.current || !hasMoreRef.current) return;
// B안 가드: 같은 length에서 이미 한 번 발행했다면 skip
if (lastRequestedCountRef.current === notificationsCountRef.current) return;
lastRequestedCountRef.current = notificationsCountRef.current;
onLoadMoreRef.current?.();
},
{ root: scrollRef.current, threshold: 0.1 }
);
observer.observe(sentinelRef.current);
return () => observer.disconnect();
}, [hasMore, loading, showNotifications, onLoadMore, notifications.length]);
}, [showNotifications]);
/**
* 뷰포트 내 미읽음 알림 추적 — IntersectionObserver
@@ -156,19 +183,34 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
return () => observer.disconnect();
}, [showNotifications, notifications]);
/**
* 뱃지에 표시할 카운트 (handleClose 보다 먼저 선언 — deps 참조 순서)
*/
const displayCount = unreadCount > 0 ? unreadCount : notifications.filter((n) => !n.read).length;
/**
* 드롭다운 닫기 — 뷰포트에 들어온 미읽음 알림 ID 전달
*
* 불필요한 read-batch 호출 방지:
* 1) displayCount 가 0 이면 이미 모두 읽음/삭제 처리된 상태 → 전체 skip
* 2) 뷰포트에 나타났던 ID 중 현재 notifications 기준 여전히 unread 인 것만 전달
* ("모두 읽음" onSuccess 로 notifications 가 갱신되면 필터 결과가 빈 배열이 됨)
*/
const handleClose = useCallback(() => {
if (showNotifications) {
const ids = Array.from(visibleUnreadIdsRef.current);
if (ids.length > 0) {
onClose?.(ids);
if (displayCount > 0) {
const unreadIds = Array.from(visibleUnreadIdsRef.current).filter((id) => {
const n = notifications.find((item) => String(item.id) === String(id));
return n && !n.read;
});
if (unreadIds.length > 0) {
onClose?.(unreadIds);
}
}
visibleUnreadIdsRef.current.clear();
setShowNotifications(false);
}
}, [showNotifications, onClose]);
}, [showNotifications, onClose, displayCount, notifications]);
/**
* 외부 클릭 감지 — 드롭다운이 열려 있을 때만 리스너 등록
@@ -203,9 +245,36 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
}, [showNotifications, handleClose]);
/**
* 뱃지에 표시할 카운트
* 드롭다운 열릴 때 뷰포트 경계 검사 후 이탈량만큼 translateX 로 보정
*
* class 기반 left-0/right-0 전환은 부모 컨테이너 기준이라 부모가 뷰포트 가장자리에 있을 때
* 여전히 이탈할 수 있다. 따라서 초기 렌더 후 드롭다운의 실제 뷰포트 좌표를 측정하여
* 이탈한 픽셀만큼 반대 방향으로 이동시키는 방식을 사용한다.
*/
const displayCount = unreadCount > 0 ? unreadCount : notifications.filter((n) => !n.read).length;
useLayoutEffect(() => {
const dropdown = dropdownRef.current;
if (!showNotifications || !dropdown) return;
// 측정 전 기존 transform 초기화 (재측정 시 누적 방지)
dropdown.style.transform = '';
const rect = dropdown.getBoundingClientRect();
const vw = typeof window !== 'undefined' ? window.innerWidth : 0;
// layout 미측정(jsdom 등)에서 rect 가 0 으로 반환되는 경우 보정 스킵
if (rect.width === 0 && rect.height === 0) return;
const margin = 8;
let shift = 0;
if (rect.right > vw - margin) {
shift = -(rect.right - (vw - margin));
} else if (rect.left < margin) {
shift = margin - rect.left;
}
if (shift !== 0) {
dropdown.style.transform = `translateX(${shift}px)`;
}
}, [showNotifications, dropdownAlign, notifications.length]);
return (
<Div ref={notificationRef} className={`relative ${className}`}>
@@ -224,7 +293,7 @@ export const NotificationCenter: React.FC<NotificationCenterProps> = ({
{/* 알림 드롭다운 */}
{showNotifications && (
<Div className={`absolute ${dropdownAlign === 'left' ? 'left-0' : 'right-0'} mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`}>
<Div ref={dropdownRef} className={`absolute ${dropdownAlign === 'left' ? 'left-0' : 'right-0'} mt-2 w-80 max-w-[calc(100vw-1rem)] bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50`}>
<Div className="px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between gap-2">
<Div className="flex items-center gap-3 min-w-0">
<Span className="font-semibold text-gray-900 dark:text-white">{titleText}</Span>
@@ -237,4 +237,279 @@ describe('NotificationCenter (sirsoft-basic)', () => {
expect(read?.className).toMatch(/opacity-70/);
});
});
describe('[회귀] 무한스크롤 중복 호출 방지 (gnuboard/g7#14 관련)', () => {
// 첫 번째로 생성되는 observer 만 무한스크롤용으로 취급. 미읽음 추적 observer 의
// disconnect 가 무한스크롤 callback 을 교란하지 않도록 인스턴스 메서드로 격리한다.
let infiniteScrollInstance: any = null;
beforeEach(() => {
infiniteScrollInstance = null;
(window as any).IntersectionObserver = class MockIO {
root: Element | null = null;
rootMargin = '';
thresholds: number[] = [];
callback: IntersectionObserverCallback | null;
target: Element | null = null;
constructor(cb: IntersectionObserverCallback) {
this.callback = cb;
if (!infiniteScrollInstance) infiniteScrollInstance = this;
}
observe(target: Element) {
if (!this.target) this.target = target;
}
disconnect() {
this.callback = null;
this.target = null;
if (infiniteScrollInstance === this) infiniteScrollInstance = null;
}
unobserve() {}
takeRecords() { return []; }
};
});
const fireIntersection = () => {
infiniteScrollInstance?.callback?.(
[{ isIntersecting: true, target: infiniteScrollInstance.target } as unknown as IntersectionObserverEntry],
{} as IntersectionObserver,
);
};
const makeNotifications = (count: number): NotificationItem[] =>
Array.from({ length: count }, (_, i) => ({
id: i + 1,
title: `t${i}`,
message: `m${i}`,
time: '1m',
read: false,
}));
it('같은 notifications.length 에서 sentinel 이 재교차해도 onLoadMore 는 한 번만 호출된다', () => {
const onLoadMore = vi.fn();
render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={true}
loading={false}
onLoadMore={onLoadMore}
/>,
);
fireEvent.click(screen.getByLabelText('알림'));
fireIntersection();
fireIntersection();
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(1);
});
it('loading=true 일 때는 onLoadMore 를 발행하지 않는다', () => {
const onLoadMore = vi.fn();
render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={true}
loading={true}
onLoadMore={onLoadMore}
/>,
);
fireEvent.click(screen.getByLabelText('알림'));
fireIntersection();
expect(onLoadMore).not.toHaveBeenCalled();
});
it('hasMore=false 일 때는 onLoadMore 를 발행하지 않는다', () => {
const onLoadMore = vi.fn();
render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={false}
loading={false}
onLoadMore={onLoadMore}
/>,
);
fireEvent.click(screen.getByLabelText('알림'));
fireIntersection();
expect(onLoadMore).not.toHaveBeenCalled();
});
it('notifications.length 가 증가한 뒤 재교차하면 onLoadMore 를 다시 발행한다', () => {
const onLoadMore = vi.fn();
const { rerender } = render(
<NotificationCenter
notifications={makeNotifications(15)}
hasMore={true}
loading={false}
onLoadMore={onLoadMore}
/>,
);
fireEvent.click(screen.getByLabelText('알림'));
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(1);
rerender(
<NotificationCenter
notifications={makeNotifications(30)}
hasMore={true}
loading={false}
onLoadMore={onLoadMore}
/>,
);
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(2);
fireIntersection();
expect(onLoadMore).toHaveBeenCalledTimes(2);
});
});
describe('[회귀] 닫기 시 read-batch 불필요 호출 방지', () => {
it('unreadCount=0 + 모든 알림 read=true 상태에서 닫으면 onClose 를 호출하지 않는다', () => {
const onClose = vi.fn();
const allRead: NotificationItem[] = mockNotifications.map((n) => ({ ...n, read: true }));
render(
<NotificationCenter
notifications={allRead}
unreadCount={0}
onClose={onClose}
/>,
);
// 레이어 열고 닫기
const button = screen.getByLabelText('알림');
fireEvent.click(button);
fireEvent.click(button);
expect(onClose).not.toHaveBeenCalled();
});
it('뷰포트에 노출됐던 ID 라도 현재 notifications 에서 read=true 로 바뀐 것은 onClose 인자에서 제외된다', () => {
const onClose = vi.fn();
const { rerender, container } = render(
<NotificationCenter notifications={mockNotifications} unreadCount={1} onClose={onClose} />,
);
const button = screen.getByLabelText('알림');
fireEvent.click(button);
// data-unread 속성 시뮬레이션
container.querySelectorAll('[data-notification-id]').forEach((el) => {
const id = el.getAttribute('data-notification-id');
const n = mockNotifications.find((item) => String(item.id) === String(id));
el.setAttribute('data-unread', n?.read ? 'false' : 'true');
});
// 모두 읽음 처리된 상태로 rerender
rerender(
<NotificationCenter
notifications={mockNotifications.map((n) => ({ ...n, read: true }))}
unreadCount={0}
onClose={onClose}
/>,
);
// 레이어 닫기
fireEvent.click(screen.getByLabelText('알림'));
expect(onClose).not.toHaveBeenCalled();
});
});
describe('[회귀] 드롭다운 뷰포트 이탈 방지', () => {
let originalGetBoundingClientRect: typeof Element.prototype.getBoundingClientRect;
beforeEach(() => {
originalGetBoundingClientRect = Element.prototype.getBoundingClientRect;
});
it('드롭다운에 max-w-[calc(100vw-1rem)] 클래스가 적용된다', () => {
const { container } = render(<NotificationCenter notifications={mockNotifications} />);
fireEvent.click(screen.getByLabelText('알림'));
const dropdown = container.querySelector('.absolute.w-80');
expect(dropdown?.className).toContain('max-w-[calc(100vw-1rem)]');
Element.prototype.getBoundingClientRect = originalGetBoundingClientRect;
});
it('드롭다운이 뷰포트 오른쪽을 이탈하면 translateX 로 왼쪽으로 보정된다', () => {
Element.prototype.getBoundingClientRect = vi.fn(() => ({
left: 100,
right: 1100,
top: 0,
bottom: 100,
width: 320,
height: 100,
x: 100,
y: 0,
toJSON: () => ({}),
}) as DOMRect);
Object.defineProperty(window, 'innerWidth', { value: 1024, writable: true, configurable: true });
const { container } = render(
<NotificationCenter notifications={mockNotifications} dropdownAlign="left" />,
);
fireEvent.click(screen.getByLabelText('알림'));
const dropdown = container.querySelector<HTMLElement>('.absolute.w-80');
expect(dropdown?.style.transform).toBe('translateX(-84px)');
Element.prototype.getBoundingClientRect = originalGetBoundingClientRect;
});
it('드롭다운이 뷰포트 왼쪽을 이탈하면 translateX 로 오른쪽으로 보정된다', () => {
Element.prototype.getBoundingClientRect = vi.fn(() => ({
left: -50,
right: 270,
top: 0,
bottom: 100,
width: 320,
height: 100,
x: -50,
y: 0,
toJSON: () => ({}),
}) as DOMRect);
Object.defineProperty(window, 'innerWidth', { value: 1024, writable: true, configurable: true });
const { container } = render(
<NotificationCenter notifications={mockNotifications} dropdownAlign="right" />,
);
fireEvent.click(screen.getByLabelText('알림'));
const dropdown = container.querySelector<HTMLElement>('.absolute.w-80');
expect(dropdown?.style.transform).toBe('translateX(58px)');
Element.prototype.getBoundingClientRect = originalGetBoundingClientRect;
});
it('드롭다운이 뷰포트 안에 있으면 transform 이 적용되지 않는다', () => {
Element.prototype.getBoundingClientRect = vi.fn(() => ({
left: 100,
right: 420,
top: 0,
bottom: 100,
width: 320,
height: 100,
x: 100,
y: 0,
toJSON: () => ({}),
}) as DOMRect);
Object.defineProperty(window, 'innerWidth', { value: 1024, writable: true, configurable: true });
const { container } = render(
<NotificationCenter notifications={mockNotifications} dropdownAlign="right" />,
);
fireEvent.click(screen.getByLabelText('알림'));
const dropdown = container.querySelector<HTMLElement>('.absolute.w-80');
expect(dropdown?.style.transform).toBe('');
Element.prototype.getBoundingClientRect = originalGetBoundingClientRect;
});
});
});
@@ -5,7 +5,7 @@
"ko": "Basic",
"en": "Basic"
},
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"license": "MIT",
"description": {
"ko": "그누보드7 기본 사용자 템플릿",