v7.0.0 release

This commit is contained in:
HeuJung committed 2026-07-01 10:30:32 +09:00
1 parent 0e7fa04b03
commit c4ea9a6cd1
3582 files changed
+626189 -160151

No files matched your search

@@ -4,7 +4,11 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [0.1.0-beta.1] - 2026-05-11
## [0.1.0] - 2026-07-01
### Changed
- 사이드바 메뉴 링크 텍스트 톤을 sirsoft-admin_basic 표준 시맨틱(.text-body) 과 정합 — 다른 관리자 화면과 같은 결로 통일.
### Added
@@ -14,3 +18,4 @@
- `admin_dashboard` 레이아웃 (Hello G7 환영 카드)
- 에러 레이아웃 6종 (401/403/404/500/503/maintenance)
- 한국어/영어 다국어 지원
- `externals` 외부 리소스 선언 예시 (Font Awesome 스타일시트)
@@ -28,7 +28,7 @@
"type": "basic",
"name": "H2",
"props": {
"className": "text-lg font-semibold text-gray-900 dark:text-white mb-4"
"className": "section-heading mb-4"
},
"text": "$t:admin.sidebar.title"
},
@@ -38,7 +38,7 @@
"name": "A",
"props": {
"href": "/admin",
"className": "block px-3 py-2 text-sm text-gray-700 dark:text-gray-300 rounded hover:bg-gray-100 dark:hover:bg-gray-700"
"className": "block px-3 py-2 text-body rounded hover:bg-gray-100 dark:hover:bg-gray-700"
},
"text": "$t:admin.sidebar.dashboard"
}
@@ -57,7 +57,7 @@
"type": "basic",
"name": "Div",
"props": {
"className": "h-14 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 flex items-center px-6"
"className": "flex-center h-14 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-6"
},
"children": [
{
@@ -65,7 +65,7 @@
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm font-medium text-gray-900 dark:text-white"
"className": "text-primary text-sm font-medium"
},
"text": "$t:admin.header.title"
}
@@ -30,7 +30,7 @@
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 dark:text-white mb-2",
"className": "text-page-heading mb-2",
"data-testid": "welcome-title"
},
"text": "$t:admin.dashboard.welcome_title"
@@ -40,7 +40,7 @@
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-600 dark:text-gray-400",
"className": "text-secondary text-sm",
"data-testid": "welcome-message"
},
"text": "$t:admin.dashboard.welcome_message"
@@ -14,7 +14,7 @@
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col items-center justify-center min-h-[60vh] text-center p-8"
"className": "flex-center flex-col justify-center min-h-[60vh] text-center p-8"
},
"children": [
{
@@ -22,7 +22,7 @@
"type": "basic",
"name": "H1",
"props": {
"className": "text-6xl font-bold text-gray-900 dark:text-white mb-4"
"className": "text-primary text-6xl font-bold mb-4"
},
"text": "401"
},
@@ -14,7 +14,7 @@
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col items-center justify-center min-h-[60vh] text-center p-8"
"className": "flex-center flex-col justify-center min-h-[60vh] text-center p-8"
},
"children": [
{
@@ -22,7 +22,7 @@
"type": "basic",
"name": "H1",
"props": {
"className": "text-6xl font-bold text-gray-900 dark:text-white mb-4"
"className": "text-primary text-6xl font-bold mb-4"
},
"text": "403"
},
@@ -14,7 +14,7 @@
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col items-center justify-center min-h-[60vh] text-center p-8"
"className": "flex-center flex-col justify-center min-h-[60vh] text-center p-8"
},
"children": [
{
@@ -22,7 +22,7 @@
"type": "basic",
"name": "H1",
"props": {
"className": "text-6xl font-bold text-gray-900 dark:text-white mb-4"
"className": "text-primary text-6xl font-bold mb-4"
},
"text": "404"
},
@@ -14,7 +14,7 @@
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col items-center justify-center min-h-[60vh] text-center p-8"
"className": "flex-center flex-col justify-center min-h-[60vh] text-center p-8"
},
"children": [
{
@@ -22,7 +22,7 @@
"type": "basic",
"name": "H1",
"props": {
"className": "text-6xl font-bold text-gray-900 dark:text-white mb-4"
"className": "text-primary text-6xl font-bold mb-4"
},
"text": "500"
},
@@ -14,7 +14,7 @@
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col items-center justify-center min-h-[60vh] text-center p-8"
"className": "flex-center flex-col justify-center min-h-[60vh] text-center p-8"
},
"children": [
{
@@ -22,7 +22,7 @@
"type": "basic",
"name": "H1",
"props": {
"className": "text-6xl font-bold text-gray-900 dark:text-white mb-4"
"className": "text-primary text-6xl font-bold mb-4"
},
"text": "503"
},
@@ -13,7 +13,7 @@
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-col items-center justify-center min-h-[60vh] text-center p-8"
"className": "flex-center flex-col justify-center min-h-[60vh] text-center p-8"
},
"children": [
{
@@ -21,7 +21,7 @@
"type": "basic",
"name": "H1",
"props": {
"className": "text-3xl font-bold text-gray-900 dark:text-white mb-4"
"className": "text-primary text-3xl font-bold mb-4"
},
"text": "$t:errors.maintenance.title"
},
@@ -1,6 +1,6 @@
{
"name": "@gnuboard7/hello-admin-template",
"version": "0.1.0-beta.1",
"version": "0.1.0",
"description": "Gnuboard7 Hello Admin Template - Minimal skeleton for learning",
"type": "module",
"main": "dist/components.js",
@@ -5,7 +5,7 @@
"ko": "Hello Admin Template",
"en": "Hello Admin Template"
},
"version": "0.1.0-beta.1",
"version": "0.1.0",
"license": "MIT",
"description": {
"ko": "그누보드7 학습용 최소 Admin 템플릿 스켈레톤",
@@ -20,7 +20,7 @@
"url": "https://gnuboard.com"
},
"release_date": "2026-04-21",
"g7_version": ">=7.0.0-beta.4",
"g7_version": ">=7.0.0",
"dependencies": {
"modules": {},
"plugins": {}
@@ -44,5 +44,13 @@
"503": "errors/503",
"maintenance": "errors/maintenance"
}
}
},
"externals": [
{
"id": "fontawesome",
"type": "style",
"url": "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css",
"preconnect": "https://cdnjs.cloudflare.com"
}
]
}
@@ -4,7 +4,11 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [0.1.0-beta.1] - 2026-05-11
## [0.1.0] - 2026-07-01
### Changed
- 헤더 좌우 정렬 컨테이너 외형을 sirsoft-admin_basic 표준 시맨틱(.flex-between) 과 정합 — 다른 화면과 같은 결로 통일.
### Added
@@ -14,5 +18,6 @@
- `_user_base` 레이아웃: 간단한 헤더(홈 링크) + 콘텐츠 슬롯 + 푸터
- 홈 레이아웃: `gnuboard7-hello_module` 의 Memo 목록을 data_sources 로 호출하여 iteration 렌더링
- 다국어 지원 (ko/en)
- `externals` 외부 리소스 선언 예시 (Font Awesome 스타일시트)
- `__tests__/layouts/home.test.tsx` — `createLayoutTest()` + `mockApi()` 로 Memo 목록 렌더링 검증
- `__tests__/components/Div.test.tsx` — Basic 컴포넌트 단위 테스트
@@ -1,103 +1,103 @@
{
"version": "1.0.0",
"layout_name": "_user_base",
"meta": {
"title": "$t:user.base_layout_title",
"description": "$t:user.base_layout_description",
"is_base": true
},
"components": [
"version": "1.0.0",
"layout_name": "_user_base",
"meta": {
"title": "$t:user.base_layout_title",
"description": "$t:user.base_layout_description",
"is_base": true
},
"components": [
{
"id": "user_layout_root",
"type": "basic",
"name": "Div",
"props": {
"className": "min-h-screen flex flex-col bg-white text-gray-900"
},
"children": [
{
"id": "user_layout_root",
"type": "basic",
"name": "Div",
"props": {
"className": "min-h-screen flex flex-col bg-white text-gray-900"
"comment": "=== 간단한 헤더 (홈 링크 1개) ===",
"id": "site_header",
"type": "basic",
"name": "Div",
"props": {
"className": "border-b border-gray-200 px-4 py-3 flex-between"
},
"children": [
{
"type": "basic",
"name": "A",
"props": {
"href": "/",
"className": "text-lg font-bold text-gray-900 hover:text-blue-600"
},
"text": "$t:user.header.home_link"
},
"children": [
{
"comment": "=== 간단한 헤더 (홈 링크 1개) ===",
"id": "site_header",
"type": "basic",
"name": "Div",
"props": {
"className": "border-b border-gray-200 px-4 py-3 flex items-center justify-between"
},
"children": [
{
"type": "basic",
"name": "A",
"props": {
"href": "/",
"className": "text-lg font-bold text-gray-900 hover:text-blue-600"
},
"text": "$t:user.header.home_link"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-500"
},
"text": "$t:user.header.tagline"
}
]
},
{
"comment": "=== 메인 콘텐츠 슬롯 ===",
"id": "main_content_area",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 max-w-3xl w-full mx-auto px-4 py-6"
},
"children": [
{
"id": "main_content",
"type": "basic",
"name": "Div",
"slot": "content",
"children": []
}
]
},
{
"comment": "=== 최소 푸터 ===",
"id": "site_footer",
"type": "basic",
"name": "Div",
"props": {
"className": "border-t border-gray-200 px-4 py-4 text-center text-sm text-gray-500"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "$t:user.footer.copyright"
}
]
},
{
"comment": "=== 최소 모바일 네비 (홈 링크만) ===",
"id": "mobile_nav",
"type": "basic",
"name": "Div",
"props": {
"className": "fixed bottom-0 inset-x-0 border-t border-gray-200 bg-white px-4 py-2 flex justify-center md:hidden"
},
"children": [
{
"type": "basic",
"name": "A",
"props": {
"href": "/",
"className": "text-sm text-gray-700 hover:text-blue-600"
},
"text": "$t:user.nav.home"
}
]
}
]
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-sm text-gray-500"
},
"text": "$t:user.header.tagline"
}
]
},
{
"comment": "=== 메인 콘텐츠 슬롯 ===",
"id": "main_content_area",
"type": "basic",
"name": "Div",
"props": {
"className": "flex-1 max-w-3xl w-full mx-auto px-4 py-6"
},
"children": [
{
"id": "main_content",
"type": "basic",
"name": "Div",
"slot": "content",
"children": []
}
]
},
{
"comment": "=== 최소 푸터 ===",
"id": "site_footer",
"type": "basic",
"name": "Div",
"props": {
"className": "empty-state-cell border-t border-gray-200 text-sm text-gray-500"
},
"children": [
{
"type": "basic",
"name": "Span",
"text": "$t:user.footer.copyright"
}
]
},
{
"comment": "=== 최소 모바일 네비 (홈 링크만) ===",
"id": "mobile_nav",
"type": "basic",
"name": "Div",
"props": {
"className": "fixed bottom-0 inset-x-0 border-t border-gray-200 bg-white px-4 py-2 flex justify-center md:hidden"
},
"children": [
{
"type": "basic",
"name": "A",
"props": {
"href": "/",
"className": "text-sm text-gray-700 hover:text-blue-600"
},
"text": "$t:user.nav.home"
}
]
}
]
]
}
]
}
@@ -1,70 +1,72 @@
{
"version": "1.0.0",
"layout_name": "401",
"extends": "_user_base",
"meta": {
"title": "$t:error.401.title",
"description": "$t:error.401.description"
},
"slots": {
"content": [
{
"version": "1.0.0",
"layout_name": "401",
"extends": "_user_base",
"meta": {
"title": "$t:error.401.title",
"description": "$t:error.401.description"
},
"slots": {
"content": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center min-h-[50vh] justify-center"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "min-h-[50vh] flex items-center justify-center"
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"text": "401"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.401.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.401.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": { "path": "/" }
}
],
"text": "$t:error.back_to_home"
}
]
"text": "401"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.401.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.401.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/"
}
]
}
}
],
"text": "$t:error.back_to_home"
}
]
}
]
}
}
]
}
}
@@ -1,70 +1,72 @@
{
"version": "1.0.0",
"layout_name": "403",
"extends": "_user_base",
"meta": {
"title": "$t:error.403.title",
"description": "$t:error.403.description"
},
"slots": {
"content": [
{
"version": "1.0.0",
"layout_name": "403",
"extends": "_user_base",
"meta": {
"title": "$t:error.403.title",
"description": "$t:error.403.description"
},
"slots": {
"content": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center min-h-[50vh] justify-center"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "min-h-[50vh] flex items-center justify-center"
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"text": "403"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.403.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.403.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": { "path": "/" }
}
],
"text": "$t:error.back_to_home"
}
]
"text": "403"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.403.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.403.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/"
}
]
}
}
],
"text": "$t:error.back_to_home"
}
]
}
]
}
}
]
}
}
@@ -1,70 +1,72 @@
{
"version": "1.0.0",
"layout_name": "404",
"extends": "_user_base",
"meta": {
"title": "$t:error.404.title",
"description": "$t:error.404.description"
},
"slots": {
"content": [
{
"version": "1.0.0",
"layout_name": "404",
"extends": "_user_base",
"meta": {
"title": "$t:error.404.title",
"description": "$t:error.404.description"
},
"slots": {
"content": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center min-h-[50vh] justify-center"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "min-h-[50vh] flex items-center justify-center"
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"text": "404"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.404.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.404.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": { "path": "/" }
}
],
"text": "$t:error.back_to_home"
}
]
"text": "404"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.404.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.404.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/"
}
]
}
}
],
"text": "$t:error.back_to_home"
}
]
}
]
}
}
]
}
}
@@ -1,70 +1,72 @@
{
"version": "1.0.0",
"layout_name": "500",
"extends": "_user_base",
"meta": {
"title": "$t:error.500.title",
"description": "$t:error.500.description"
},
"slots": {
"content": [
{
"version": "1.0.0",
"layout_name": "500",
"extends": "_user_base",
"meta": {
"title": "$t:error.500.title",
"description": "$t:error.500.description"
},
"slots": {
"content": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center min-h-[50vh] justify-center"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "min-h-[50vh] flex items-center justify-center"
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"text": "500"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.500.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.500.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": { "path": "/" }
}
],
"text": "$t:error.back_to_home"
}
]
"text": "500"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.500.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.500.description"
},
{
"type": "basic",
"name": "Button",
"props": {
"className": "px-5 py-2 rounded bg-blue-600 text-white hover:bg-blue-700 cursor-pointer"
},
"actions": [
{
"type": "click",
"handler": "navigate",
"params": {
"path": "/"
}
]
}
}
],
"text": "$t:error.back_to_home"
}
]
}
]
}
}
]
}
}
@@ -1,55 +1,55 @@
{
"version": "1.0.0",
"layout_name": "503",
"extends": "_user_base",
"meta": {
"title": "$t:error.503.title",
"description": "$t:error.503.description"
},
"slots": {
"content": [
{
"version": "1.0.0",
"layout_name": "503",
"extends": "_user_base",
"meta": {
"title": "$t:error.503.title",
"description": "$t:error.503.description"
},
"slots": {
"content": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center min-h-[50vh] justify-center"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "min-h-[50vh] flex items-center justify-center"
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-6xl font-bold text-gray-200 mb-4"
},
"text": "503"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.503.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.503.description"
}
]
}
]
}
"text": "503"
},
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-2xl font-bold text-gray-900 mb-2"
},
"text": "$t:error.503.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600 mb-6"
},
"text": "$t:error.503.description"
}
]
}
]
}
}
]
}
}
@@ -1,47 +1,47 @@
{
"version": "1.0.0",
"layout_name": "maintenance",
"extends": "_user_base",
"meta": {
"title": "$t:error.maintenance.title",
"description": "$t:error.maintenance.description"
},
"slots": {
"content": [
{
"version": "1.0.0",
"layout_name": "maintenance",
"extends": "_user_base",
"meta": {
"title": "$t:error.maintenance.title",
"description": "$t:error.maintenance.description"
},
"slots": {
"content": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "flex-center min-h-[50vh] justify-center"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "Div",
"name": "H1",
"props": {
"className": "min-h-[50vh] flex items-center justify-center"
"className": "text-3xl font-bold text-gray-900 mb-3"
},
"children": [
{
"type": "basic",
"name": "Div",
"props": {
"className": "text-center px-4"
},
"children": [
{
"type": "basic",
"name": "H1",
"props": {
"className": "text-3xl font-bold text-gray-900 mb-3"
},
"text": "$t:error.maintenance.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600"
},
"text": "$t:error.maintenance.description"
}
]
}
]
}
"text": "$t:error.maintenance.title"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "block text-gray-600"
},
"text": "$t:error.maintenance.description"
}
]
}
]
}
}
]
}
}
@@ -1,6 +1,6 @@
{
"name": "@gnuboard7/hello-user-template",
"version": "0.1.0-beta.1",
"version": "0.1.0",
"description": "Gnuboard7 Hello User Template - 학습용 최소 샘플 사용자 템플릿",
"type": "module",
"main": "dist/components.js",
@@ -5,7 +5,7 @@
"ko": "Hello 사용자 템플릿",
"en": "Hello User Template"
},
"version": "0.1.0-beta.1",
"version": "0.1.0",
"license": "MIT",
"description": {
"ko": "학습용 최소 샘플 사용자 템플릿 (Basic 8개 컴포넌트)",
@@ -20,10 +20,10 @@
"url": "https://gnuboard.com"
},
"release_date": "2026-04-21",
"g7_version": ">=7.0.0-beta.4",
"g7_version": ">=7.0.0",
"dependencies": {
"modules": {
"gnuboard7-hello_module": ">=0.1.0-beta.1"
"gnuboard7-hello_module": ">=0.1.0"
},
"plugins": {}
},
@@ -50,6 +50,14 @@
"maintenance": "errors/maintenance"
}
},
"externals": [
{
"id": "fontawesome",
"type": "style",
"url": "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css",
"preconnect": "https://cdnjs.cloudflare.com"
}
],
"features": {
"dark_mode": false,
"responsive": false,
@@ -4,6 +4,97 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.0] - 2026-07-01
### Added
- 관리자 화면 상단 헤더에 언어 선택 버튼을 추가했습니다 — 이전에는 프로필 메뉴 안에서만 언어를 바꿀 수 있었으나, 이제 헤더에서 바로 전환할 수 있습니다. 이커머스 모듈이 설치되어 있으면 표시 통화 선택 버튼도 헤더에 함께 나타나, 관리자 화면의 가격 표시 통화를 전환할 수 있습니다.
- 관리자 대시보드의 이커머스 영역(상단 바로가기 버튼과 판매 현황·리뷰·문의 위젯)을 이커머스 모듈이 직접 채우도록 바꿨습니다 — 모듈을 켜면 나타나고 끄면 사라지며, 기존에 고정으로 박혀 있던 예시 숫자·문구가 실제 데이터로 대체됩니다.
- 대시보드 하단 "시스템 리소스(CPU·메모리·디스크)" 위젯을 "최근 알림"(최근 발송된 알림 이력) 위젯으로 교체했습니다.
- 대시보드 하단의 최근 알림·최근 활동·시스템 알림·모듈/플러그인/템플릿 상태 카드를 통일된 회색 카드 스타일로 정리하고, 상단의 시스템 상태 배지를 정리했습니다.
- 대시보드 상단 배지에 설치된 템플릿 수와 활성 언어팩 수를 추가로 표시합니다 (각각 활성/전체).
- 막대 그래프에서 단위·규모가 크게 다른 두 값(예: 판매 수량과 매출액)을 좌·우 양쪽 축으로 나눠 그릴 수 있게 했습니다 — 한쪽 값이 너무 작아 막대가 보이지 않던 문제를 해결합니다.
- 관리자 화면 좌측 메뉴를 상단 메뉴 버튼으로 접고 펼 수 있습니다 — 접으면 본문 영역이 넓어지고, 접은 상태는 새로고침 후에도 유지됩니다.
- 템플릿 정보 모달에 해당 템플릿이 사용하는 외부 리소스(외부 스타일·웹폰트·스크립트) 목록을 표시.
#### 레이아웃 편집기
- 사이드바·푸터·테마 전환 버튼·알림 센터·표 컬럼 선택기·섹션 머리(제목+설명) 컴포넌트를 클릭해 선택하고 속성을 편집할 수 있게 했습니다 — 이전에는 이 컴포넌트들을 클릭해도 선택되지 않거나 속성 편집 패널이 열리지 않았습니다. 섹션 머리 컴포넌트는 요소 추가 팔레트에서 새로 꺼내 화면에 배치할 수도 있습니다.
- 메뉴 아이콘 선택(IconSelect)의 옵션 목록 편집이 내장 기본 아이콘 20종을 시작 목록으로 보여주도록 했습니다 — 이전에는 빈 목록에서 시작해 항목을 1개 추가하면 기본 아이콘 전체가 사라지고 그 1개만 남았습니다. 이제 추가/삭제/순서 변경이 기본 목록 위에서 이루어집니다.
- 페이지 헤더의 "액션 추가" 목록 편집을 제거했습니다 — 페이지 헤더는 직접 배치된 버튼이 있으면 액션 목록을 표시하지 않는데, 모든 화면이 직접 배치 방식을 사용하고 있어 이 편집은 어떤 화면에도 반영되지 않는 항목이었습니다(혼란 방지). 페이지 헤더의 제목·설명 편집과 직접 배치된 버튼의 편집은 종전과 동일합니다.
- 폼 속성 편집을 개선했습니다 — "입력 상자 추가"가 기존 폼 항목과 동일한 "라벨 + 입력칸" 묶음을 추가하고(이전에는 라벨 없는 입력칸 단독이 추가되면서 그 자리가 "컴포넌트 로드 실패"로 깨졌습니다), 각 폼 항목 행에서 라벨과 안내 문구(입력칸의 회색 안내 글)를 각각 한국어/영어/일본어로 편집할 수 있습니다.
- 이 템플릿의 컴포넌트(컨테이너·카드·차트·폼 필드·레이아웃 박스 등)를 드래그로 옮기고 다른 컨테이너 안팎으로 재배치할 수 있도록 편집 표식 연동을 추가했습니다. 이전에는 일부 컨테이너 계열 요소가 편집기에서 선택·드래그 대상으로 잡히지 않아, 그 안의 위젯을 바깥으로 빼낼 수 없었습니다. 관리자 화면(실제 운영 화면)의 모양·동작은 종전과 100% 동일합니다.
- 속성 편집 지원을 추가했습니다 — 요소를 선택하면 정렬·글자 크기·색상·여백·크기 등을 친화적인 컨트롤로 조정하고, 모서리를 드래그해 크기를 직접 바꿀 수 있습니다. 목록/폼 화면의 데이터 있음·없음·검증 실패·저장 중 같은 상태를 미리보기로 전환해 볼 수 있고, 관리자 메뉴·회원·모듈/플러그인 목록 등이 샘플 데이터로 실제와 가깝게 표시됩니다.
- 속성 편집에 스타일 항목을 더 추가했습니다 — 글자가 없는 상자 요소에도 글자색을 지정할 수 있고, 그림자·테두리 모양과 색·모서리 둥글기·투명도·스크롤(자동/숨김/가로·세로 자동)을 설정할 수 있습니다. 글자에는 굵게·기울임·밑줄과 양쪽 정렬, 줄바꿈 설정을 추가했습니다. 표시 권한을 지정할 때 실제 사용 가능한 권한만 목록에 나오고, 각 권한의 식별자를 함께 보여 줘 어떤 권한인지 분명히 알 수 있습니다.
- 화면 상태 미리보기를 더 많은 관리자 화면으로 넓혔습니다 — 환경설정의 모든 탭(메일·업로드·SEO·보안·드라이버·고급·알림 정의·언어팩·본인인증·정보), 역할 폼의 신규/수정/검증 실패, 로그인 실패, 비밀번호 찾기 완료, 비밀번호 재설정의 토큰 정상/오류·검증 실패·완료, 본인인증 단계, 템플릿 목록의 사용자/관리자 탭 화면을 편집기에서 전환해 미리볼 수 있습니다.
### Changed
#### 목록·표 표시
- 목록 표에서 날짜순(또는 특정 항목순) 정렬 시, 값이 비어 있는 행이 정렬 방향과 무관하게 목록 맨 앞으로 끼어들던 문제를 수정했습니다 — 예를 들어 페이지 관리에서 "오래된 발행순"으로 정렬하면 발행일이 없는 항목이 맨 앞으로 올라오던 현상이 사라지고, 서버가 정한 정렬 순서대로 표시됩니다.
- 데이터 표(목록 표)의 각 칸 내용을 위쪽 기준으로 정렬하도록 바꿨습니다 — 한 칸에 여러 줄(예: 가격 아래 외화 환산값)이 들어가 칸 높이가 길어져도, 같은 행의 다른 입력칸·내용이 첫 줄 기준으로 가지런히 정렬됩니다.
#### 화면 외형 정합
- 관리자 카드의 제목·설명과 본문 사이 간격을 한 단계 좁혀 카드 내부가 더 컴팩트하게 보이도록 조정했습니다 — 모든 관리자 카드 (환경설정 / 게시판 폼 / 페이지 폼 / 역할 폼 / 회원 폼 등) 에 일괄 반영됩니다.
- 알림 템플릿 / 본인인증 메시지 정의·템플릿 / 언어팩 설치 모달의 입력 행에서 라벨과 입력칸 사이에 옅은 회색 분리선과 세로 간격이 끼어 보이던 회귀를 수정했습니다 — 라벨과 입력칸이 한 필드로 시각적으로 응집되어 다른 관리자 모달의 입력 행과 동일한 결로 보입니다.
- 환경설정의 고급·보안·본인인증 탭에서 카드들이 세로로 나열될 때 카드 사이 간격이 의도보다 부풀어 마지막 카드 아래에 빈 공간이 끼어 보이던 회귀를 수정했습니다 — 카드 묶음 사이 간격이 다른 관리자 화면과 동일한 결로 정합됩니다.
- 환경설정 본인인증 탭의 "목적별 프로바이더 매핑" 과 "등록된 프로바이더 상세" 영역에서 같은 식별자가 페이지 검사 시 여러 번 나타나던 회귀를 수정했습니다 (HTML 표준 위반 해소).
- 환경설정 본인인증 탭의 "목적별 프로바이더 매핑"에서 저장 검증에 실패하면 문제가 된 입력칸이 빨갛게 강조되고 그 아래에 사유가 표시되도록 보완했습니다 — 기본 설정 영역과 동일하게 어느 항목을 고쳐야 하는지 한눈에 확인할 수 있습니다.
- 회원 등록 / 수정 화면을 환경설정 화면과 동일한 시각 결로 정합했습니다 — 화면 폭에 따라 페이지 좌우 여백이 단계적으로 커지고, 상단 탭 내비의 풀-bleed 영역이 페이지 여백 분기와 정확히 맞춰지고, 각 섹션의 헤더가 아이콘 없이 제목만 표시되며, 폼 행 묶음 사이에 옅은 회색 분리선이 자동 적용됩니다. 다른 관리자 화면과 같은 결로 통일됩니다.
- 카드 제목 우측에 부속 요소(예: 확장 출처 배지) 를 정렬하는 표준 시맨틱을 추가 — 제목과 부속 요소를 한 줄에 배치하면서 부속 요소만 우측 끝으로 정렬할 수 있도록 정리.
- 회원 등록 / 수정 화면에서 상단 탭 내비와 본문 콘텐츠가 너무 붙어 보이던 회귀를 수정했습니다 — 탭 내비와 첫 카드 사이에 표준 상단 여백이 자동으로 들어가 환경설정 화면과 동일한 결로 통일됩니다.
- 역할 등록 / 수정 화면의 카드 헤더 정렬과 기본정보 카드 본문의 폼 행 묶음을 다른 관리자 화면과 동일한 결로 정합했습니다 — 헤더 아이콘이 제거되고, 권한 설정 카드의 선택 카운트 배지가 카드 제목 우측 끝으로 정렬되며, 기본정보 카드의 항목 사이에 옅은 회색 분리선이 자동으로 적용됩니다.
- 관리자 화면 전반의 입력 박스·드롭다운·텍스트 영역·태그 입력·상태 배지 외형을 표준화했습니다 — 패딩·배경·모서리·포커스 효과가 화면마다 다르게 보이던 차이가 사라지고, 다국어 입력 탭, 비활성·읽기전용 입력, 옵션 없는 드롭다운까지 동일한 모양으로 표시됩니다. 잠긴 드롭다운이 일반 드롭다운보다 작게 보이던 현상과, 식별자·참조용 읽기전용 입력은 옅은 회색 글자로 "잠긴 정보"임을 구분하도록 정리했습니다.
- 알림 발송 이력 / 본인인증 이력 페이지의 상단 탭을 다른 관리자 화면과 동일한 표준 탭으로 통일 — 색상·모양이 일관되고, 스크롤 시 상단 고정과 모바일 드롭다운 자동 전환이 함께 적용됩니다.
- 사용자 등록/수정·역할 등록/수정 화면의 상단 영역을 재배치 — 페이지 제목은 일반 흐름, 탭만 상단 고정, 취소·저장 버튼은 화면 하단에 항상 고정되어, 긴 폼을 스크롤하는 동안에도 저장 버튼이 항상 보입니다.
- 관리자 화면 전반(환경설정·사용자 폼·역할 폼·본인인증 정책·모달·대시보드·목록 패널)의 카드·입력 칸·라벨·보조 설명·에러 메시지·본문 텍스트·배지·아이콘 버튼·보조 버튼·구분선·여백·2단 그리드 모양을 한 가지 기준으로 통일했습니다 — 화면마다 조금씩 다르게 보이던 카드 모양·padding·간격, 입력 칸 테두리·배경·포커스, 입력 행 사이 구분선, 글자 톤, 새로고침 등 아이콘 버튼·보조 버튼의 다크 모드 외형·포커스 링이 모든 관리자 화면(코어·모듈·플러그인 공통)에서 동일한 결로 표시됩니다. 입력 칸·드롭다운에 외형 클래스가 중복 적용되던 결함과, 입력 행 묶음의 간격이 어색하게 벌어지던 회귀도 함께 해소되었습니다.
#### 대시보드·차트·구조
- 관리자 대시보드 반응형 레이아웃과 시각 구조를 개편.
- 대시보드 오늘 주문 요약을 입금대기·결제완료·상품준비중·배송준비중·배송중 상태별 배지로 변경.
- 상품 판매 현황 영역에 BarChart 기반 차트 컴포넌트를 적용.
- UnifiedIcon, BarChart, DonutChart 컴포넌트와 Tailwind safelist/prebuild 구성을 추가.
- Font Awesome·웹폰트·flag-icons 등 외부 CDN 리소스를 `externals` 선언으로 통합.
- 코어 최소 요구 버전을 7.0.0-beta.8 로 상향 (`externals` 선언 기능 의존).
- 본인인증 모달의 외부 provider 슬롯 구조 개편 — 외부 본인인증 플러그인이 모달의 코어 UI 를 의도치 않게 비워버리는 회귀를 차단하고, 향후 추가될 외부 본인인증 플러그인이 일관된 슬롯에 자기 UI 를 주입할 수 있도록 정합화.
- 관리자 대시보드의 게시판 영역(상단 빠른 진입 버튼·통계 카드)을 게시판 모듈이 직접 채우도록 변경 — 게시판 모듈이 활성화된 환경에서만 표시되고, 비활성 시 자동으로 사라집니다.
- 레이아웃 편집 화면 좌측 목록을 트리 구조로 개편하여 일반 레이아웃과 확장 주입 레이아웃을 구분 표시하고, 확장 레이아웃도 버전 히스토리·복구·미리보기를 동일하게 사용할 수 있도록 개선.
- 에러 페이지(404 / 403 / 500 / 503 / 401 / 점검) 식별자를 다른 모든 페이지와 동일하게 디렉토리 접두사 포함 형식(`errors/{코드}`) 으로 통일. 관리자 화면 동작은 동일하나 내부적으로 에러 페이지가 일관된 식별자로 시드되도록 정합화.
- 대시보드 상단의 "전체회원수" 통계 카드를 제거했습니다.
### Fixed
#### 화면 표시·식별·복구
- 관리자 대시보드의 목록형 카드(최근 활동·최근 알림·모듈/플러그인/템플릿 상태·시스템 알림)에서 각 항목이 같은 화면 식별자를 공유해 일부 보조 기능·접근성 도구가 항목을 구분하지 못하던 문제를 수정했습니다 — 이제 목록의 각 행이 고유하게 식별됩니다.
- 헤더에 모듈이 추가하는 선택기(통화 등)가 데스크톱과 모바일 화면에 동시에 배치될 때 같은 화면 식별자를 공유하던 문제를 수정했습니다 — 두 위치의 선택기가 각각 고유하게 식별됩니다.
- 환경설정 본인인증 정책 편집 화면에서 코어/모듈이 제공한 정책의 "인증 목적"을 선택할 수 없고, "적용 대상" 등 일부 항목을 바꿔도 저장되지 않던 문제를 수정했습니다 — 이제 정책 키·강제 시점·강제 위치를 제외한 모든 항목을 자유롭게 변경할 수 있으며, 안내 문구도 실제 편집 가능 범위에 맞춰 정정되었습니다.
- 파일 업로더에서 저장 시 함께 올린 파일들이 누락되던 경우를 막기 위해, 업로드를 마친 뒤 기존 파일과 새로 올린 파일을 올바른 순서로 합쳐 저장 화면에 전달하도록 보완했습니다 — 파일을 추가하고 저장하는 화면(상품 이미지 등)에서 추가·재첨부·순서 변경이 저장한 그대로 반영됩니다.
- 관리자 게시글·답변 상세에서 첨부파일을 내려받을 때, 활동이력에 "받은 사람"이 함께 남도록 다운로드 방식을 개선했습니다. 다운로드 동작과 화면은 종전과 동일합니다.
- 관리자 사이드바 하단에 중복 노출되던 프로필/링크 영역을 제거하고, 계정 관련 기능은 상단 헤더 드롭다운으로 일원화.
- 관리자 환경설정 화면에서 상단 탭과 하단 저장 버튼이 스크롤 중에도 화면에 고정되도록 복구.
#### 본인인증·인증 화면
- 코어 메일 본인인증 흐름에서 모달의 코드 재전송 / 확인 버튼이 노출되지 않던 회귀 수정.
- 본인인증 모달과 풀페이지의 "남은 시도 횟수" 표시가 환경설정값과 무관하게 항상 5회로 굳어 있던 문제 수정. 운영자가 환경설정에서 지정한 한도가 사용자 화면에 정확히 표시됩니다.
- 본인인증 풀페이지를 URL 로 직접 접속한 경우(외부 본인인증 콜백 후 진입 등) "남은 시도 횟수"·만료 카운트다운·렌더링 분기 값이 부정확하게 표시되던 문제 수정. 진입 시 서버에서 최신 상태를 받아 즉시 갱신합니다.
- 본인인증 인증 코드 메일이 화면에서 선택한 언어와 다른 언어로 발송되던 문제 수정 — 한국어 화면에서 인증을 요청하면 인증 코드 메일도 한국어로, 영문 화면이면 영어로 발송됩니다.
- 로그인 / 비밀번호 찾기 / 비밀번호 재설정 화면의 언어 변경·테마 변경 동작이 핸들러 매개변수 누락으로 무시되던 결함 수정 — 사용자가 선택한 언어·테마가 정상 반영됩니다.
- 템플릿 레이아웃 편집 화면의 코드 에디터 변경 이벤트 정의에 표준 키 누락으로 자동 저장 핸들러가 실행되지 않던 결함 수정.
#### 배지·필터·다국어
- 상태 배지(주문상태·결제상태 등)가 의미별 색상(성공=초록, 경고=노랑, 위험=빨강 등)으로 표시되지 않고 모두 회색으로만 보이던 문제 수정. 화면에서 상태를 색으로 한눈에 구분할 수 있습니다.
- 환경설정의 본인인증 정책 관리와 언어팩 관리에서 필터(강제 시점 / 출처 등)를 적용하면 "선택한 scope이(가) 올바르지 않습니다." 오류 알림이 반복적으로 뜨던 문제 수정. 한 화면 안에 함께 있는 두 목록이 같은 필터 조건을 잘못 공유해 발생하던 현상으로, 이제 각 목록은 자기 화면에서만 조회되어 불필요한 오류 알림이 표시되지 않습니다.
- 환경설정에서 탭을 클릭으로 전환했을 때(예: 본인인증 ↔ 언어팩) 해당 탭의 목록이 비어 보이던 문제 수정. 새로고침해야 보이던 목록이 이제 탭 전환 즉시 정상 표시됩니다.
- 회원 목록의 일괄 작업 영역에서 "상태 변경" 라벨이 다국어로 전환되지 않던 문제 수정. 이제 언어 설정에 따라 정상적으로 번역되어 표시됩니다. (#45 @glitter-gim 님께서 제보해주셨습니다.)
- SEO 설정의 "OG 사이트 이름" 입력칸 안내를 개선했습니다. 이 값이 선택 재정의 항목이며 비워두면 일반 설정의 사이트 이름을 기본값으로 따른다는 점을 라벨과 안내문에 명확히 표시합니다. (#49 @glitter-gim 님께서 제보해주셨습니다.)
- 본인인증 이력에서 상태 필터(예: 요청됨)를 적용한 채 인증수단 탭을 전환하면, 필터 체크는 그대로 남아 있는데 목록은 필터가 풀린 전체가 나오던 문제 수정. 탭을 전환하면 필터가 즉시 초기화되어 화면의 필터 상태와 실제 목록이 항상 일치합니다.
## [1.0.0-beta.7] - 2026-05-15
### Changed
@@ -213,74 +304,74 @@
### Changed
- 레이아웃 편집기 CodeEditor, 레이아웃 설명, 파일 설명 바인딩에 `raw:` 접두사 적용 — 사용자 입력 데이터 내 `$t:` 패턴 번역 방지 (admin_template_layout_edit.json) (#225)
- 레이아웃 편집기 CodeEditor, 레이아웃 설명, 파일 설명 바인딩에 `raw:` 접두사 적용 — 사용자 입력 데이터 내 `$t:` 패턴 번역 방지 (admin_template_layout_edit.json)
## [0.2.25] - 2026-03-28
### Added
- 활동 로그 기간 검색 프리셋 버튼 추가 — 오늘, 1주일, 1개월, 3개월, 6개월, 1년 빠른 선택 (주문관리와 동일 UX) (_partial_filter.json) (#225)
- `setDateRange` 핸들러 추가 — 날짜 프리셋별 시작일/종료일 자동 계산, datetime-local 형식 반환 (setDateRangeHandler.ts) (#225)
- 삭제 모달 스피너 추가 — 개별/일괄 삭제 진행 중 삭제 버튼에 스피너 아이콘 표시 (admin_activity_log_list.json) (#225)
- 활동 로그 기간 검색 프리셋 버튼 추가 — 오늘, 1주일, 1개월, 3개월, 6개월, 1년 빠른 선택 (주문관리와 동일 UX) (_partial_filter.json)
- `setDateRange` 핸들러 추가 — 날짜 프리셋별 시작일/종료일 자동 계산, datetime-local 형식 반환 (setDateRangeHandler.ts)
- 삭제 모달 스피너 추가 — 개별/일괄 삭제 진행 중 삭제 버튼에 스피너 아이콘 표시 (admin_activity_log_list.json)
### Changed
- 활동 로그 기간 필터를 date에서 datetime-local로 변경 — 시/분/초 지정 가능 (_partial_filter.json) (#225)
- 활동 로그 기간 필터를 date에서 datetime-local로 변경 — 시/분/초 지정 가능 (_partial_filter.json)
## [0.2.24] - 2026-03-28
### Changed
- 활동 로그 행위자 필터를 텍스트 Input에서 SearchableDropdown으로 변경 — UUID 기반 사용자 검색, API `/api/admin/users/search` 연동 (_partial_filter.json, admin_activity_log_list.json) (#225)
- 활동 로그 DataGrid 행위자 컬럼을 ActionMenu로 변경 — 회원 정보 보기, 해당 행위자로 검색 기능 추가 (_partial_datagrid.json) (#225)
- 활동 로그 양방향(한글/영어) 검색 지원 — 액션/설명 검색 시 번역 라벨 역추적으로 원본 키도 함께 검색 (ActivityLogRepository.php) (#225)
- 활동 로그 행위자 필터를 텍스트 Input에서 SearchableDropdown으로 변경 — UUID 기반 사용자 검색, API `/api/admin/users/search` 연동 (_partial_filter.json, admin_activity_log_list.json)
- 활동 로그 DataGrid 행위자 컬럼을 ActionMenu로 변경 — 회원 정보 보기, 해당 행위자로 검색 기능 추가 (_partial_datagrid.json)
- 활동 로그 양방향(한글/영어) 검색 지원 — 액션/설명 검색 시 번역 라벨 역추적으로 원본 키도 함께 검색 (ActivityLogRepository.php)
## [0.2.23] - 2026-03-28
### Added
- 활동 로그 이력 조회 메뉴 및 목록 페이지 신설 — 필터(검색어, 로그 타입, 날짜 범위), DataGrid(확장 행으로 변경 내역 표시), 서버 사이드 페이지네이션, 단건/일괄 삭제 기능 (admin_activity_log_list.json, _partial_filter.json, _partial_datagrid.json) (#225)
- 활동 로그 다국어 키 추가 — 페이지 제목, 필터 레이블, 테이블 컬럼, 상세 정보, 삭제 확인 메시지 등 (ko/admin.json, en/admin.json) (#225)
- 활동 로그 목록 레이아웃 렌더링 테스트 추가 — 필터 UI, DataGrid 렌더링, 빈 상태, abilities 기반 삭제 버튼 제어 (admin-activity-log-list.test.tsx) (#225)
- 대시보드 활동 로그 레이아웃 렌더링 테스트 추가 (admin-dashboard-activity-log.test.tsx) (#225)
- 활동 로그 이력 조회 메뉴 및 목록 페이지 신설 — 필터(검색어, 로그 타입, 날짜 범위), DataGrid(확장 행으로 변경 내역 표시), 서버 사이드 페이지네이션, 단건/일괄 삭제 기능 (admin_activity_log_list.json, _partial_filter.json, _partial_datagrid.json)
- 활동 로그 다국어 키 추가 — 페이지 제목, 필터 레이블, 테이블 컬럼, 상세 정보, 삭제 확인 메시지 등 (ko/admin.json, en/admin.json)
- 활동 로그 목록 레이아웃 렌더링 테스트 추가 — 필터 UI, DataGrid 렌더링, 빈 상태, abilities 기반 삭제 버튼 제어 (admin-activity-log-list.test.tsx)
- 대시보드 활동 로그 레이아웃 렌더링 테스트 추가 (admin-dashboard-activity-log.test.tsx)
### Changed
- 활동 로그 필터 전면 재구현 — 검색 키워드 대상 드롭다운(전체/액션/설명/IP주소), 로그 타입 체크박스(전체/관리자/사용자/시스템), 행위자 필터, 기간 필터, filter-row/filter-label CSS 패턴 (_partial_filter.json, admin_activity_log_list.json) (#225)
- DataGrid `expandConditionField` prop 추가 — 행별 조건부 확장 아이콘 표시 지원, `has_changes` 필드 기반 변경 이력 있는 행만 확장 가능 (DataGrid.tsx) (#225)
- 활동 로그 DataGrid에 IP 주소 컬럼 추가, selectable 항상 활성화, expandConditionField 적용 (_partial_datagrid.json) (#225)
- 활동 로그 일괄 삭제 버튼 `if` 조건 → `disabled` 속성으로 변경 (admin_activity_log_list.json) (#225)
- 대시보드 "시스템 알림" 카드 숨김 처리 — `if: "false"` 추가, dashboard_alerts 데이터소스 `auto_fetch: false` 변경 (admin_dashboard.json) (#225)
- 대시보드 "최근 활동"이 사용자 가입 이력 대신 ActivityLog 전체를 표시하도록 변경 (admin_dashboard.json) (#225)
- 활동 로그 필터 전면 재구현 — 검색 키워드 대상 드롭다운(전체/액션/설명/IP주소), 로그 타입 체크박스(전체/관리자/사용자/시스템), 행위자 필터, 기간 필터, filter-row/filter-label CSS 패턴 (_partial_filter.json, admin_activity_log_list.json)
- DataGrid `expandConditionField` prop 추가 — 행별 조건부 확장 아이콘 표시 지원, `has_changes` 필드 기반 변경 이력 있는 행만 확장 가능 (DataGrid.tsx)
- 활동 로그 DataGrid에 IP 주소 컬럼 추가, selectable 항상 활성화, expandConditionField 적용 (_partial_datagrid.json)
- 활동 로그 일괄 삭제 버튼 `if` 조건 → `disabled` 속성으로 변경 (admin_activity_log_list.json)
- 대시보드 "시스템 알림" 카드 숨김 처리 — `if: "false"` 추가, dashboard_alerts 데이터소스 `auto_fetch: false` 변경 (admin_dashboard.json)
- 대시보드 "최근 활동"이 사용자 가입 이력 대신 ActivityLog 전체를 표시하도록 변경 (admin_dashboard.json)
## [0.2.22] - 2026-03-28
### Fixed
- 대시보드 모듈 상태 배지가 항상 "비활성화"로 표시되는 버그 수정 — `module.is_active` (미존재 필드) → `module.status === 'active'` (admin_dashboard.json) (#225)
- 대시보드 확장 카드 아이콘을 사이드바 메뉴 아이콘과 일치 — 모듈: cube, 플러그인: puzzle-piece, 템플릿: palette (admin_dashboard.json) (#225)
- 대시보드 "더보기" 버튼 actions 형식을 배열 형식(`type: "click"`)으로 수정 — onClick 객체 형식에서 navigate 무반응 해결 (admin_dashboard.json) (#225)
- 대시보드 모듈 상태 배지가 항상 "비활성화"로 표시되는 버그 수정 — `module.is_active` (미존재 필드) → `module.status === 'active'` (admin_dashboard.json)
- 대시보드 확장 카드 아이콘을 사이드바 메뉴 아이콘과 일치 — 모듈: cube, 플러그인: puzzle-piece, 템플릿: palette (admin_dashboard.json)
- 대시보드 "더보기" 버튼 actions 형식을 배열 형식(`type: "click"`)으로 수정 — onClick 객체 형식에서 navigate 무반응 해결 (admin_dashboard.json)
### Added
- 대시보드 플러그인/템플릿 상태 카드 추가 — 모듈 카드와 동일 구조, 각 확장 타입별 아이콘 표시 (cube/puzzle-piece/palette) (admin_dashboard.json) (#225)
- 대시보드 확장 카드 "더보기" 버튼 추가 — 각 카드에서 해당 관리 페이지로 이동 (admin_dashboard.json) (#225)
- IconTypes.ts에 Palette 아이콘 추가 — 템플릿 관리 메뉴 아이콘(`fa-palette`) 지원 (IconTypes.ts) (#225)
- 대시보드 확장 상태 카드 레이아웃 렌더링 테스트 추가 (admin-dashboard-extension-status.test.tsx) (#225)
- 대시보드 플러그인/템플릿 상태 카드 추가 — 모듈 카드와 동일 구조, 각 확장 타입별 아이콘 표시 (cube/puzzle-piece/palette) (admin_dashboard.json)
- 대시보드 확장 카드 "더보기" 버튼 추가 — 각 카드에서 해당 관리 페이지로 이동 (admin_dashboard.json)
- IconTypes.ts에 Palette 아이콘 추가 — 템플릿 관리 메뉴 아이콘(`fa-palette`) 지원 (IconTypes.ts)
- 대시보드 확장 상태 카드 레이아웃 렌더링 테스트 추가 (admin-dashboard-extension-status.test.tsx)
### Changed
- 대시보드 하단 그리드를 2열에서 3열로 변경 — 확장 카드 3개 (모듈/플러그인/템플릿) + 알림 카드 별도 행 (admin_dashboard.json) (#225)
- 대시보드 하단 그리드를 2열에서 3열로 변경 — 확장 카드 3개 (모듈/플러그인/템플릿) + 알림 카드 별도 행 (admin_dashboard.json)
## [0.2.21] - 2026-03-28
### Fixed
- FileUploader 업로드 후 'uploading' 항목 영구 잔류 버그 수정 — `response.data?.data` 이중 접근을 `response?.data`로 수정 (ApiClient가 Axios response.data를 이미 언래핑하므로), attachment null 시 에러 상태 전환 방어 로직 추가 (useFileUploader.ts) (#225)
- FileUploader 업로드 후 'uploading' 항목 영구 잔류 버그 수정 — `response.data?.data` 이중 접근을 `response?.data`로 수정 (ApiClient가 Axios response.data를 이미 언래핑하므로), attachment null 시 에러 상태 전환 방어 로직 추가 (useFileUploader.ts)
### Added
- FileUploader 업로드 응답 파싱 테스트 추가 — renderHook 기반 훅 직접 테스트로 정상 파싱 및 null 응답 방어 검증 (FileUploader.test.tsx) (#225)
- FileUploader 업로드 응답 파싱 테스트 추가 — renderHook 기반 훅 직접 테스트로 정상 파싱 및 null 응답 방어 검증 (FileUploader.test.tsx)
## [0.2.20] - 2026-03-27
@@ -297,7 +388,7 @@
### Changed
- Toast 기본 위치를 top-right → bottom-center로 변경 — 우측 상단 버튼과의 겹침 해소 (#148)
- Toast 기본 위치를 top-right → bottom-center로 변경 — 우측 상단 버튼과의 겹침 해소
- Toast 숨김 애니메이션 방향을 position에 따라 분기 처리 (bottom → 아래로, top → 위로)
## [0.2.18] - 2026-03-24
@@ -0,0 +1,27 @@
/**
* @file IconSelectDefaultItemsSync.test.ts
* @description IconSelect 내장 기본 아이콘 목록 ↔ editor-spec defaultItems 동기화 가드
*
*
* 배경: IconSelect 는 options prop 미지정 시 내장 기본 목록(defaultIconOptions)으로
* 렌더한다. 편집기 array 에디터가 빈 목록에서 시작하면 항목 1개 추가가 prop 을
* `[추가분]` 으로 기록해 내장 목록 전체를 교체하는 함정이 있었다. 스펙
* `nodeEditor.params.defaultItems` 가 내장 목록을 그대로 선언해 에디터 시작 목록으로
* 시드한다 — 본 테스트는 두 목록(컴포넌트 SSoT ↔ 스펙 선언)의 드리프트를 차단한다.
*/
import { describe, it, expect } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { defaultIconOptions } from '../../src/components/composite/IconSelect';
describe('IconSelect defaultItems 동기화 가드', () => {
it('editor-spec defaultItems 가 컴포넌트 내장 기본 목록과 1:1 일치한다', () => {
const caps = JSON.parse(
readFileSync(resolve(__dirname, '../../editor-spec/componentCapabilities.json'), 'utf8'),
);
const specItems = caps.IconSelect?.nodeEditor?.params?.defaultItems;
expect(Array.isArray(specItems)).toBe(true);
expect(specItems).toEqual(defaultIconOptions);
});
});
@@ -0,0 +1,50 @@
/**
* SlotContainer.scopeId.test.ts — 슬롯 주입 컴포넌트 root id 스코프
*
* 같은 슬롯 컴포넌트가 여러 SlotContainer(헤더 데스크톱/모바일)에서 렌더되면 주입
* 컴포넌트의 정적 root id 가 컨테이너마다 같은 값으로 중복 출력되어 HTML id 유일성을
* 위반한다(통화 셀렉터 ext_admin_header_currency_selector ×2). scopeSlotChildDef 가
* 컨테이너 고유 id 로 root id 를 스코프해 고유화하는지 검증.
*/
import { describe, it, expect } from 'vitest';
import { scopeSlotChildDef } from '../../src/components/composite/SlotContainer';
describe('scopeSlotChildDef — 슬롯 주입 id 스코프', () => {
it('컨테이너 id + 컴포넌트 id 가 있으면 {id}__{containerId} 로 스코프한다', () => {
const def = { id: 'ext_admin_header_currency_selector', name: 'Div' };
const desktop = scopeSlotChildDef(def, 'header_currency_slot_desktop');
const mobile = scopeSlotChildDef(def, 'header_currency_slot_mobile');
expect(desktop.id).toBe('ext_admin_header_currency_selector__header_currency_slot_desktop');
expect(mobile.id).toBe('ext_admin_header_currency_selector__header_currency_slot_mobile');
// 두 컨테이너 결과가 서로 달라 중복 방지
expect(desktop.id).not.toBe(mobile.id);
});
it('원본 컴포넌트 정의를 변형하지 않는다(불변)', () => {
const def = { id: 'sel', name: 'Div', props: { x: 1 } };
const scoped = scopeSlotChildDef(def, 'slot_a');
expect(def.id).toBe('sel'); // 원본 보존
expect(scoped).not.toBe(def); // 새 객체
expect(scoped.name).toBe('Div');
expect(scoped.props).toEqual({ x: 1 });
});
it('컨테이너 id 가 없으면 원본 그대로 반환(무영향)', () => {
const def = { id: 'sel', name: 'Div' };
expect(scopeSlotChildDef(def, undefined)).toBe(def);
expect(scopeSlotChildDef(def, '')).toBe(def);
});
it('컴포넌트 root id 가 없으면 원본 그대로 반환(무영향)', () => {
const noId = { name: 'Div' };
expect(scopeSlotChildDef(noId, 'slot_a')).toBe(noId);
const emptyId = { id: '', name: 'Div' };
expect(scopeSlotChildDef(emptyId, 'slot_a')).toBe(emptyId);
});
it('id 가 문자열이 아니면 스코프하지 않는다', () => {
const numId = { id: 123 as unknown as string, name: 'Div' };
expect(scopeSlotChildDef(numId, 'slot_a')).toBe(numId);
});
});
@@ -0,0 +1,65 @@
/**
* @file admin-base-header-lang-currency.test.tsx
* @description 관리자 헤더 언어·통화 선택기 패리티 회귀 테스트
*
* 배경(PO 검수 지적):
* - 관리자 데스크톱 언어 버튼이 globe 아이콘만 표시하고 현재 선택 언어를 안 보여줌(유저는 코드 표시).
* → LanguageSelector 에 showCode 도입, _admin_base 가 showCode:true 로 사용.
* - 관리자 모바일 헤더에 언어·통화 버튼이 둘 다 없음(데스크톱에만 존재).
* → mobile_header_right 에 language_selector_mobile + header_currency_slot_mobile 추가.
*
* 합의 정본: 4표면(유저·관리자 × 데스크톱·모바일) 모두 언어+통화가 같은 줄에 현재값과 함께 노출.
*
* @vitest-environment jsdom
*/
import { describe, it, expect } from 'vitest';
import fs from 'node:fs';
import path from 'node:path';
const baseDir = path.resolve(__dirname, '../..');
function loadJson(relPath: string): any {
return JSON.parse(fs.readFileSync(path.resolve(baseDir, relPath), 'utf8'));
}
function find(node: any, id: string): any {
if (!node || typeof node !== 'object') return null;
if (Array.isArray(node)) { for (const n of node) { const r = find(n, id); if (r) return r; } return null; }
if (node.id === id) return node;
for (const k of ['children', 'components']) { if (node[k]) { const r = find(node[k], id); if (r) return r; } }
return null;
}
describe('관리자 헤더 언어·통화 패리티', () => {
const adminBase = loadJson('layouts/_admin_base.json');
it('데스크톱 언어 선택기는 showCode:true 로 현재 로케일 코드를 표시한다', () => {
const node = find(adminBase.components, 'language_selector_desktop');
expect(node).toBeTruthy();
expect(node.name).toBe('LanguageSelector');
expect(node.props?.showCode).toBe(true);
});
it('모바일 헤더에 언어 선택기 + 통화 슬롯이 같은 줄에 노출된다', () => {
const mobileRight = find(adminBase.components, 'mobile_header_right');
expect(mobileRight).toBeTruthy();
const ids = (mobileRight.children ?? []).map((c: any) => c.id);
expect(ids).toContain('language_selector_mobile');
expect(ids).toContain('header_currency_slot_mobile');
});
it('모바일 언어 선택기도 showCode:true (데스크톱과 동일 표기)', () => {
const node = find(adminBase.components, 'language_selector_mobile');
expect(node).toBeTruthy();
expect(node.name).toBe('LanguageSelector');
expect(node.props?.showCode).toBe(true);
});
it('모바일 통화 슬롯은 데스크톱과 동일한 header_currency 슬롯을 공유한다', () => {
const node = find(adminBase.components, 'header_currency_slot_mobile');
expect(node).toBeTruthy();
expect(node.name).toBe('SlotContainer');
expect(node.props?.slotId).toBe('header_currency');
});
});
@@ -0,0 +1,59 @@
/**
* @file admin-base-sidebar-collapse.test.tsx
* @description 데스크톱 사이드바 접기 기능의 레이아웃 정합 테스트.
*
* 배경:
* - 기존 PC 햄버거(menu_toggle_btn)는 _global.sidebarOpen(모바일 슬라이드 상태)만
* 토글해 데스크톱에서는 시각 효과가 없었다(접기 미구현).
* - 데스크톱 사이드바 접기 기능을 추가: 햄버거 → toggleSidebar 핸들러,
* left_sidebar_area 가 _global.sidebarCollapsed 에 반응해 .left_sidebar_area_collapsed
* 변형(width 0)을 받는다. 접힘 상태는 localStorage 로 영속(sidebarHandler).
* - 본 테스트는 레이아웃 JSON 의 배선(햄버거 액션 / 사이드바 조건부 클래스)이
* 유지됨을 보장한다.
*/
import { describe, it, expect } from 'vitest';
import adminBase from '../../layouts/_admin_base.json';
function findById(node: unknown, id: string): any {
if (!node || typeof node !== 'object') return undefined;
const v = node as any;
if (v.id === id) return v;
for (const child of Object.values(v)) {
const found = findById(child, id);
if (found) return found;
}
return undefined;
}
describe('데스크톱 사이드바 접기 레이아웃 정합', () => {
it('PC 햄버거(menu_toggle_btn)가 toggleSidebar 핸들러를 호출한다', () => {
const btn = findById(adminBase, 'menu_toggle_btn');
expect(btn).toBeDefined();
const actions = btn.actions ?? [];
const handlers = actions.map((a: any) => a.handler);
expect(handlers).toContain('toggleSidebar');
// 기존 모바일용 setState(sidebarOpen) 직접 토글이 아니어야 한다
const togglesSidebarOpen = actions.some(
(a: any) => a.handler === 'setState' && a.params?.sidebarOpen !== undefined
);
expect(togglesSidebarOpen).toBe(false);
});
it('left_sidebar_area 가 sidebarCollapsed 에 반응하는 조건부 클래스를 가진다', () => {
const sidebar = findById(adminBase, 'left_sidebar_area');
expect(sidebar).toBeDefined();
const className = sidebar.props?.className ?? '';
expect(className).toContain('left_sidebar_area');
expect(className).toContain('sidebarCollapsed');
expect(className).toContain('left_sidebar_area_collapsed');
});
it('모바일(portable) 사이드바는 기존 sidebarOpen 슬라이드 동작을 유지한다', () => {
const sidebar = findById(adminBase, 'left_sidebar_area');
const portableClass = sidebar.responsive?.portable?.props?.className ?? '';
expect(portableClass).toContain('left_sidebar_area_portable');
expect(portableClass).toContain('sidebarOpen');
expect(portableClass).toContain('left_sidebar_area_portable_open');
});
});
@@ -70,6 +70,28 @@ describe('어드민 베이스 transition_overlay (이슈 #245)', () => {
});
});
describe('어드민 베이스 사이드바 프로필 영역 (이슈 #384)', () => {
it('좌측 사이드바 하단 프로필/링크 영역을 렌더링하지 않는다', () => {
const sidebarFooter = findById((adminBase as any).components, 'sidebar_footer');
const sidebarProfile = findById((adminBase as any).components, 'user_profile');
expect(sidebarFooter).toBeUndefined();
expect(sidebarProfile).toBeUndefined();
});
it('계정 기능은 상단 헤더 드롭다운으로 유지한다', () => {
const headerDropdown = findById((adminBase as any).components, 'user_dropdown');
expect(headerDropdown).toBeDefined();
expect(headerDropdown?.name).toBe('UserProfile');
expect(headerDropdown?.props).toMatchObject({
dropdownOnly: true,
showAvatar: false,
showName: false,
});
});
});
describe('목록 페이지 페이지네이션 transition_overlay_target 가드 (이슈 #245)', () => {
/**
* DataGrid 사용 + `params.query.page` 를 가진 navigate handler 가 있는 페이지에서,
@@ -235,11 +257,16 @@ describe('admin_settings 탭 콘텐츠 영역 spinner (이슈 #245)', () => {
expect(tabContent, 'settings_tab_content wrapper 미존재').toBeDefined();
});
it('settings_tab_content 안에 10개 탭 partial 이 모두 들어 있어야 한다', () => {
it('settings_tab_content 안에 탭 partial 이 모두 들어 있어야 한다', () => {
const settingsContent = findById((adminSettings as any).slots?.content ?? [], 'settings_content');
const tabContent = findById(settingsContent!.children, 'settings_tab_content');
const partials = (tabContent!.children ?? []).filter((c: any) => c.partial?.includes('partials/admin_settings/_tab_'));
expect(partials.length).toBe(10);
// tab_navigation 은 #399 Phase 1.3 에서 sticky 래퍼(sticky_header) 안으로 이동했으므로
// slots.content[0] 의 직접 자식이 아니다. 재귀 findById 로 중첩 깊이와 무관하게 탐색한다.
const tabNav = findById((adminSettings as any).slots?.content ?? [], 'tab_navigation');
const expectedPartials = ((tabNav as any)?.props?.tabs ?? [])
.map((tab: any) => `partials/admin_settings/_tab_${tab.id}.json`);
expect(partials.map((c: any) => c.partial)).toEqual(expectedPartials);
});
});
@@ -270,7 +297,10 @@ describe('어드민 자식 레이아웃 wait_for 일괄 가드 (이슈 #245, eng
.filter((s) => {
const type = s.type ?? 'api';
const strategy = s.loading_strategy ?? 'progressive';
return type !== 'websocket' && strategy !== 'blocking' && strategy !== 'background';
return s.auto_fetch !== false
&& type !== 'websocket'
&& strategy !== 'blocking'
&& strategy !== 'background';
})
.map((s) => s.id as string);
return { name: path.basename(file, '.json'), layout, progressiveIds };
@@ -0,0 +1,305 @@
/**
* @file admin-dashboard-iteration-id-unique.test.tsx
* @description 대시보드 iteration 영역 HTML id 중복 방지 회귀 테스트
*
* 배경:
* - iteration template 안의 id 가 정적 문자열이면 source row 마다 같은 id 가
* N 번 펼쳐져 W3C HTML id 유일성 위반 발생.
* - 정적 분석은 1회 등장 → "중복 아님" 으로 오판하므로 실제 렌더 DOM 으로 검증한다.
*
* 검증 대상 (실제 admin_dashboard.json 의 iteration 영역):
* - 활동 로그 (activity_item / dot / content / title / desc / time)
* - 모듈 카드 (module_item / info / name / version / badge)
* - 플러그인 카드 (plugin_item / info / name / version / badge)
* - 템플릿 카드 (template_item / info / name / version / badge)
* - 최근 알림 (recent_notification_item / dot / content / subject / recipient / time)
* - 시스템 알림 (alert_item / icon / content / title / message / time / actions / buttons)
*
* 수정 전(정적 id): 각 영역 row 2개 이상 mock → 동일 id 가 2회 이상 → 테스트 fail.
* 수정 후(동적 id): id 에 {{$idx}} 접미 → row 별 고유 → 중복 0 → green.
*/
import React from 'react';
import { describe, it, expect, beforeEach } from 'vitest';
import fs from 'fs';
import path from 'path';
import { createLayoutTest } from '@core/template-engine/__tests__/utils/layoutTestUtils';
import { ComponentRegistry } from '@core/template-engine/ComponentRegistry';
// id 를 실제 DOM 속성으로 출력하는 테스트 컴포넌트 (중복 검출 핵심)
const TestDiv: React.FC<{ id?: string; className?: string; children?: React.ReactNode }> = ({
id,
className,
children,
}) => (
<div id={id} className={className}>
{children}
</div>
);
const TestSpan: React.FC<{ id?: string; className?: string; children?: React.ReactNode; text?: string }> = ({
id,
className,
children,
text,
}) => (
<span id={id} className={className}>
{children || text}
</span>
);
const TestP: React.FC<{ id?: string; className?: string; children?: React.ReactNode; text?: string }> = ({
id,
className,
children,
text,
}) => (
<p id={id} className={className}>
{children || text}
</p>
);
const TestH1: React.FC<{ id?: string; className?: string; children?: React.ReactNode; text?: string }> = ({
id,
className,
children,
text,
}) => (
<h1 id={id} className={className}>
{children || text}
</h1>
);
const TestH2: React.FC<{ id?: string; className?: string; children?: React.ReactNode; text?: string }> = ({
id,
className,
children,
text,
}) => (
<h2 id={id} className={className}>
{children || text}
</h2>
);
const TestButton: React.FC<{
id?: string;
className?: string;
type?: string;
children?: React.ReactNode;
text?: string;
}> = ({ id, className, type, children, text }) => (
<button id={id} className={className} type={type as any}>
{children || text}
</button>
);
const TestA: React.FC<{ id?: string; className?: string; href?: string; children?: React.ReactNode; text?: string }> = ({
id,
className,
href,
children,
text,
}) => (
<a id={id} className={className} href={href}>
{children || text}
</a>
);
const TestIcon: React.FC<{ id?: string; name?: string; className?: string }> = ({ id, name, className }) => (
<i id={id} className={className} data-icon={name} />
);
const TestFragment: React.FC<{ children?: React.ReactNode }> = ({ children }) => <>{children}</>;
const TestToast: React.FC = () => null;
const TestModalRoot: React.FC = () => null;
function setupTestRegistry(): ComponentRegistry {
const registry = ComponentRegistry.getInstance();
(registry as any).registry = {
Div: { component: TestDiv, metadata: { name: 'Div', type: 'basic' } },
Span: { component: TestSpan, metadata: { name: 'Span', type: 'basic' } },
P: { component: TestP, metadata: { name: 'P', type: 'basic' } },
H1: { component: TestH1, metadata: { name: 'H1', type: 'basic' } },
H2: { component: TestH2, metadata: { name: 'H2', type: 'basic' } },
Button: { component: TestButton, metadata: { name: 'Button', type: 'basic' } },
A: { component: TestA, metadata: { name: 'A', type: 'basic' } },
Icon: { component: TestIcon, metadata: { name: 'Icon', type: 'basic' } },
Fragment: { component: TestFragment, metadata: { name: 'Fragment', type: 'layout' } },
Toast: { component: TestToast, metadata: { name: 'Toast', type: 'composite' } },
ModalRoot: { component: TestModalRoot, metadata: { name: 'ModalRoot', type: 'composite' } },
};
return registry;
}
// 실제 레이아웃 파일 로드 (extends 제거 — 독립 렌더)
function loadDashboardLayout(): any {
const file = path.resolve(
__dirname,
'../../layouts/admin_dashboard.json'
);
const layout = JSON.parse(fs.readFileSync(file, 'utf8'));
// extends/_admin_base 의존 제거 후 slots.content 를 components 로 승격
delete layout.extends;
layout.components = layout.slots?.content ?? [];
delete layout.slots;
// permissions 게이트 제거 (테스트는 전 카드 렌더 목적)
stripPermissions(layout.components);
return layout;
}
function stripPermissions(nodes: any): void {
if (Array.isArray(nodes)) {
nodes.forEach(stripPermissions);
return;
}
if (!nodes || typeof nodes !== 'object') return;
delete nodes.permissions;
for (const key of Object.keys(nodes)) {
if (key === 'permissions') continue;
stripPermissions(nodes[key]);
}
}
// 여러 row 를 가진 mock 데이터 (정적 id 라면 중복을 유발할 양)
const MULTI_ROW = {
activities: [
{ title: '활동 A', description: '설명 A', time: '1분 전' },
{ title: '활동 B', description: '설명 B', time: '2분 전' },
{ title: '활동 C', description: '설명 C', time: '3분 전' },
],
paginated: (rows: any[]) => ({
data: { data: rows, current_page: 1, last_page: 1, per_page: 5, total: rows.length },
}),
};
describe('대시보드 iteration HTML id 유일성', () => {
beforeEach(() => {
setupTestRegistry();
});
function collectDuplicateIds(): string[] {
const all = Array.from(document.querySelectorAll('[id]')).map((el) => el.id);
const seen = new Set<string>();
const dup = new Set<string>();
for (const id of all) {
if (seen.has(id)) dup.add(id);
else seen.add(id);
}
return Array.from(dup);
}
it('모든 카드가 다중 row 로 채워져도 HTML id 중복이 0건이다', async () => {
const layout = loadDashboardLayout();
const testUtils = createLayoutTest(layout, { componentRegistry: setupTestRegistry() });
testUtils.mockApi('dashboard_stats', {
response: {
data: {
installed_modules: { active: 2, total: 3 },
active_plugins: { active: 1, total: 2 },
installed_templates: { active: 2, total: 2 },
language_packs: { active: 1, total: 1 },
},
},
});
testUtils.mockApi('dashboard_activities', { response: { data: MULTI_ROW.activities } });
testUtils.mockApi('dashboard_modules', {
response: MULTI_ROW.paginated([
{ name: '게시판', version: '0.7.0', status: 'active' },
{ name: '이커머스', version: '0.16.1', status: 'inactive' },
{ name: '결제', version: '1.0.0', status: 'active' },
]),
});
testUtils.mockApi('dashboard_plugins', {
response: MULTI_ROW.paginated([
{ name: '플러그인 A', version: '1.0.0', status: 'active' },
{ name: '플러그인 B', version: '2.0.0', status: 'inactive' },
]),
});
testUtils.mockApi('dashboard_templates', {
response: MULTI_ROW.paginated([
{ name: 'Admin Basic', version: '0.2.21', status: 'active' },
{ name: 'User Basic', version: '0.1.0', status: 'active' },
]),
});
testUtils.mockApi('dashboard_recent_notifications', {
response: {
data: [
{ subject: '알림 1', recipient: 'a@x.com', time: '1분 전', status: 'sent' },
{ subject: '알림 2', recipient: 'b@x.com', time: '2분 전', status: 'failed' },
],
},
});
testUtils.mockApi('dashboard_alerts', {
response: {
data: [
{
subtype: 'recovery_available',
icon: 'check-circle',
title: '복구 가능 1',
message: '메시지 1',
time: '방금',
recover_endpoint: '/api/admin/x/1/recover',
extension_type: 'module',
identifier: 'm1',
},
{
subtype: 'incompatible_core',
icon: 'exclamation',
title: '비호환 1',
message: '메시지 2',
time: '5분 전',
extension_type: 'plugin',
identifier: 'p1',
},
],
},
});
await testUtils.render();
const duplicates = collectDuplicateIds();
expect(duplicates).toEqual([]);
testUtils.cleanup();
});
it('iteration row 가 늘어나도 id 중복이 발생하지 않는다 (활동 로그 단독 검증)', async () => {
const layout = loadDashboardLayout();
const testUtils = createLayoutTest(layout, { componentRegistry: setupTestRegistry() });
// 활동 로그만 다량 채우고 나머지는 빈 배열
testUtils.mockApi('dashboard_stats', { response: { data: {} } });
testUtils.mockApi('dashboard_activities', {
response: {
data: Array.from({ length: 10 }, (_, i) => ({
title: `활동 ${i}`,
description: `설명 ${i}`,
time: `${i}분 전`,
})),
},
});
testUtils.mockApi('dashboard_modules', { response: MULTI_ROW.paginated([]) });
testUtils.mockApi('dashboard_plugins', { response: MULTI_ROW.paginated([]) });
testUtils.mockApi('dashboard_templates', { response: MULTI_ROW.paginated([]) });
testUtils.mockApi('dashboard_recent_notifications', { response: { data: [] } });
testUtils.mockApi('dashboard_alerts', { response: { data: [] } });
await testUtils.render();
// 활동 항목 id 가 row 별로 고유하게 펼쳐졌는지 확인
const activityItems = Array.from(document.querySelectorAll('[id^="activity_item_"]'));
expect(activityItems.length).toBe(10);
const activityIds = activityItems.map((el) => el.id);
expect(new Set(activityIds).size).toBe(10);
expect(collectDuplicateIds()).toEqual([]);
testUtils.cleanup();
});
});
@@ -0,0 +1,148 @@
/**
* @file admin-dashboard-today-badges.test.tsx
* @description 관리자 대시보드 템플릿 레이아웃 검증 — 코어 stats 카드 제거 및 확장 포인트 위임
*
* 이커머스 "오늘" 배지/판매 차트 등 커머스 콘텐츠는 sirsoft-ecommerce 모듈의
* admin_dashboard_commerce.json 확장으로 주입되며, 해당 검증은 모듈 테스트
* (admin_dashboard_commerce_extension.test.tsx) 가 담당한다. 본 템플릿 테스트는
* 템플릿 JSON 에 실제 존재하는 것(코어 카드 제거 + 확장 포인트 존재)만 검증한다.
*/
import React from 'react';
import { describe, it, expect } from 'vitest';
import {
createLayoutTest,
createMockComponentRegistryWithBasics,
screen,
} from '@core/template-engine/__tests__/utils/layoutTestUtils';
import adminDashboardLayout from '../../layouts/admin_dashboard.json';
import adminKo from '../../lang/partial/ko/admin.json';
const TestIcon: React.FC<{ name?: string; className?: string }> = ({ name, className }) => (
<span className={className} data-icon={name} />
);
const TestBarChart: React.FC = () => <div data-testid="bar-chart" />;
function createRegistry() {
const registry = createMockComponentRegistryWithBasics();
registry.register('basic', 'Icon', TestIcon);
registry.register('composite', 'BarChart', TestBarChart);
return registry;
}
function findComponentById(node: unknown, id: string): unknown {
if (!node || typeof node !== 'object') {
return undefined;
}
const value = node as { id?: string; [key: string]: unknown };
if (value.id === id) {
return value;
}
for (const child of Object.values(value)) {
if (Array.isArray(child)) {
for (const item of child) {
const found = findComponentById(item, id);
if (found) {
return found;
}
}
continue;
}
const found = findComponentById(child, id);
if (found) {
return found;
}
}
return undefined;
}
function findExtensionPointByName(node: unknown, name: string): unknown {
if (!node || typeof node !== 'object') {
return undefined;
}
const value = node as { type?: string; name?: string; [key: string]: unknown };
if (value.type === 'extension_point' && value.name === name) {
return value;
}
for (const child of Object.values(value)) {
if (Array.isArray(child)) {
for (const item of child) {
const found = findExtensionPointByName(item, name);
if (found) {
return found;
}
}
continue;
}
const found = findExtensionPointByName(child, name);
if (found) {
return found;
}
}
return undefined;
}
describe('관리자 대시보드 템플릿 — 코어 stats 카드 제거', () => {
it('코어 stats 카드(new_*/전체회원수)와 stats_cards_grid 컨테이너가 모두 제거된다', () => {
// 새게시물/새주문/새리뷰 카드는 제거됨
expect(findComponentById(adminDashboardLayout, 'new_posts_card')).toBeUndefined();
expect(findComponentById(adminDashboardLayout, 'new_orders_card')).toBeUndefined();
expect(findComponentById(adminDashboardLayout, 'new_reviews_card')).toBeUndefined();
// 전체회원수 카드와 이를 담던 stats_cards_grid 컨테이너도 제거됨
expect(findComponentById(adminDashboardLayout, 'total_users_card')).toBeUndefined();
expect(findComponentById(adminDashboardLayout, 'stats_cards_grid')).toBeUndefined();
// 게시판 오늘 요약은 게시판 모듈 extension 으로 이관되어 템플릿에는 없음
expect(findComponentById(adminDashboardLayout, 'post_graph_today_summary')).toBeUndefined();
expect(findComponentById(adminDashboardLayout, 'community_section')).toBeUndefined();
});
it('커머스/커뮤니티 콘텐츠는 확장 포인트로 위임된다', () => {
// 이커머스 "오늘" 배지/판매 차트 등은 admin_dashboard_commerce 확장으로 주입되며
// 템플릿 JSON 에는 확장 포인트만 존재한다 (실제 콘텐츠 검증은 모듈 테스트가 담당).
expect(findExtensionPointByName(adminDashboardLayout, 'admin_dashboard_commerce')).toBeDefined();
expect(findExtensionPointByName(adminDashboardLayout, 'admin_dashboard_community')).toBeDefined();
expect(findExtensionPointByName(adminDashboardLayout, 'admin_dashboard_quick_menu')).toBeDefined();
});
it('전체회원수 카드 라벨/값이 더 이상 렌더되지 않는다', async () => {
const testUtils = createLayoutTest(adminDashboardLayout as any, {
componentRegistry: createRegistry() as any,
translations: { admin: adminKo },
templateId: 'sirsoft-admin_basic',
locale: 'ko',
});
testUtils.mockApi('dashboard_stats', {
response: {
data: {
total_users: { count: 10, change_display: '+0' },
installed_modules: { total: 0, active: 0 },
active_plugins: { total: 0, active: 0 },
installed_templates: { total: 0, active: 0 },
language_packs: { total: 0, active: 0 },
system_status: { label: '정상' },
},
},
});
await testUtils.render();
// 전체회원수 카드 라벨이 렌더되지 않음
expect(screen.queryByText('전체회원수')).not.toBeInTheDocument();
// 제거된 코어 stats 카드 라벨도 렌더되지 않음
expect(screen.queryByText('새주문')).not.toBeInTheDocument();
expect(screen.queryByText('새리뷰')).not.toBeInTheDocument();
testUtils.cleanup();
});
});
@@ -96,8 +96,18 @@ function loadModulePartial(relativePath: string): any {
const path = require('path');
const full = path.resolve(__dirname, '..', '..', 'layouts', relativePath);
const json = JSON.parse(fs.readFileSync(full, 'utf-8'));
const root = json.children?.[0] ?? json;
return (root.children ?? []).find((c: any) => c.id === 'dependencies_section');
return findNodeById(json.children ?? [json], 'dependencies_section');
}
function findNodeById(nodes: any[] | any, id: string): any {
const list = Array.isArray(nodes) ? nodes : [nodes];
for (const node of list) {
if (!node || typeof node !== 'object') continue;
if (node.id === id) return node;
const found = findNodeById(node.children ?? [], id);
if (found) return found;
}
return undefined;
}
function buildLayoutFromSection(section: any, globalKey: string, value: Record<string, any>) {
@@ -0,0 +1,94 @@
/**
* @file admin-identity-challenge-fullpage.test.tsx
* @description admin 풀페이지 IDV 레이아웃의 max_attempts 정합성 회귀 차단 — 이슈 #275
*
* sirsoft-basic 풀페이지와 동일 회귀 패턴을 admin 측에도 차단한다.
*/
import { describe, expect, it } from 'vitest';
import fullPage from '../../layouts/auth/identity_challenge.json';
type Node = {
type?: string;
name?: string;
if?: string;
props?: Record<string, any>;
children?: Node[] | string;
default?: Node[];
slots?: Record<string, Node[]>;
};
function walk(input: Node | Node[] | undefined, visit: (node: Node) => void): void {
if (!input) return;
const nodes = Array.isArray(input) ? input : [input];
for (const node of nodes) {
visit(node);
if (node.default) walk(node.default, visit);
if (node.children && Array.isArray(node.children)) walk(node.children as Node[], visit);
if (node.slots) {
for (const key of Object.keys(node.slots)) walk(node.slots[key], visit);
}
}
}
describe('Admin 본인인증 풀페이지 (sirsoft-admin_basic) — max_attempts 정합 회귀 차단', () => {
const fp = fullPage as any;
it('state.maxAttempts 초기값이 0 (무제한 기본)', () => {
expect(fp.state?.maxAttempts).toBe(0);
});
it('init_actions 의 query.max_attempts fallback 이 ?? 0 으로 정합화', () => {
const initActions = fp.init_actions ?? [];
const setStateInit = initActions.find((a: any) => a.handler === 'setState' && a.params?.maxAttempts);
expect(setStateInit).toBeDefined();
expect(setStateInit.params.maxAttempts).toContain('?? 0');
expect(setStateInit.params.maxAttempts).not.toContain('?? 5');
});
it('init_actions 가 challenge_id 가용 시 GET /api/identity/challenges/{id} 호출 (서버 정합 fetch)', () => {
const initActions = fp.init_actions ?? [];
const apiCall = initActions.find((a: any) => a.handler === 'apiCall');
expect(apiCall).toBeDefined();
expect(apiCall.target).toContain('/api/identity/challenges/');
expect(apiCall.target).toContain('query.challenge_id');
expect(apiCall.params?.method).toBe('GET');
expect(apiCall.if).toContain('query.challenge_id');
});
it('apiCall.onSuccess 가 response.data.max_attempts 로 _local.maxAttempts 를 갱신', () => {
const initActions = fp.init_actions ?? [];
const apiCall = initActions.find((a: any) => a.handler === 'apiCall');
const onSuccess = apiCall.onSuccess ?? [];
const setStateOnSuccess = onSuccess.find((a: any) => a.handler === 'setState');
expect(setStateOnSuccess).toBeDefined();
expect(setStateOnSuccess.params.maxAttempts).toContain('response.data.max_attempts');
});
it('카운트다운 텍스트 + 확인 버튼 disabled 가 maxAttempts ?? 5 하드코딩을 사용하지 않는다', () => {
const offenders: string[] = [];
walk(fp as unknown as Node, (n) => {
const collect = (s: unknown) => {
if (typeof s !== 'string') return;
if (s.includes('maxAttempts ?? 5')) offenders.push(s);
};
collect((n as any).text);
collect(n.props?.disabled);
});
expect(offenders).toEqual([]);
});
it('확인 버튼 disabled 가 maxAttempts=0 (무제한) 케이스 가드를 포함', () => {
let hasUnlimitedGuard = false;
walk(fp as unknown as Node, (n) => {
const disabled = n.props?.disabled;
if (typeof disabled !== 'string') return;
if (!disabled.includes('maxAttempts')) return;
if (disabled.includes('(_local.maxAttempts ?? 0) > 0')) {
hasUnlimitedGuard = true;
}
});
expect(hasUnlimitedGuard).toBe(true);
});
});
@@ -136,3 +136,79 @@ describe('Admin 본인인증 모달 cancel 흐름 (sirsoft-admin_basic)', () =>
expect(handlers).toEqual(['apiCall', 'resolveIdentityChallenge', 'closeModal']);
});
});
describe('Admin 본인인증 모달 Extension Point 구조 (sirsoft-admin_basic) — 이슈 #275 회귀 차단', () => {
const slots: Node[] = [];
walk(identityModal as unknown as Node, (n) => {
if (n.type === 'extension_point') slots.push(n);
});
it('외부 IDV 플러그인 진입점 (identity_provider_ui:provider) 단일 슬롯만 존재 — text_code/link 는 plain Div 로 이동', () => {
// 외부 플러그인이 mode:replace 로 default 코어 UI 를 비워버리던 회귀(빈 모달) 차단.
const providerSlots = slots.filter((s) => s.name === 'identity_provider_ui:provider');
expect(providerSlots).toHaveLength(1);
expect(slots.find((s) => s.name === 'identity_provider_ui:text_code')).toBeUndefined();
expect(slots.find((s) => s.name === 'identity_provider_ui:link')).toBeUndefined();
});
it('외부 provider 슬롯은 코어 mail/미지정 케이스에서 마운트되지 않는다 (if 가드)', () => {
const slot = slots.find((s) => s.name === 'identity_provider_ui:provider');
expect(slot).toBeDefined();
expect(typeof (slot as any).if).toBe('string');
expect((slot as any).if).toContain('_global.identityChallenge?.provider_id');
expect((slot as any).if).toContain("'g7:core.mail'");
});
it('코어 OTP 입력 Div 는 코어 mail/미지정 + text_code 케이스에 if 가드로 노출된다', () => {
const cores: Node[] = [];
walk(identityModal as unknown as Node, (n) => {
if (
n.type === 'basic' &&
n.name === 'Div' &&
typeof (n as any).if === 'string' &&
(n as any).if.includes("'text_code'") &&
(n as any).if.includes("'g7:core.mail'")
) {
cores.push(n);
}
});
expect(cores.length).toBeGreaterThan(0);
});
it('재전송/확인 버튼 if 가드는 mail provider 인 경우에도 노출된다', () => {
// sirsoft-basic 과 동일한 회귀: 정책 provider_id NULL 인 경우 enforce 시 default_provider
// (g7:core.mail) 가 launcher payload 로 전달되는데, 모달 버튼이 !provider_id 만 가드하면
// mail 인증 시 버튼이 사라짐. 가드 패턴은 `!provider_id || === 'g7:core.mail'` 로 통일.
const buttonsWithGuard: Node[] = [];
walk(identityModal as unknown as Node, (n) => {
if (
n.type === 'basic' &&
n.name === 'Button' &&
typeof (n as any).if === 'string' &&
(n as any).if.includes('_global.identityChallenge?.provider_id')
) {
buttonsWithGuard.push(n);
}
});
expect(buttonsWithGuard.length).toBeGreaterThanOrEqual(2);
for (const btn of buttonsWithGuard) {
expect((btn as any).if as string).toContain("'g7:core.mail'");
}
});
it('maxAttempts=0(무제한) 케이스를 정합 처리한다 — disabled 식이 max > 0 가드를 둔다', () => {
// 이슈 #275: backend 응답에 max_attempts=0 (무제한) 일 때 모달 확인 버튼이 disabled 되던 회귀 차단.
// attempts >= max_attempts 비교 전에 max_attempts > 0 가드가 있어야 함.
let disabledHasUnlimitedGuard = false;
walk(identityModal as unknown as Node, (n) => {
const disabled = n.props?.disabled;
if (typeof disabled !== 'string') return;
if (!disabled.includes('maxAttempts')) return;
// 무제한 케이스 (maxAttempts ?? 0) > 0 가드가 있어야 정합
if (disabled.includes('(_global.identityChallenge?.maxAttempts ?? 0) > 0')) {
disabledHasUnlimitedGuard = true;
}
});
expect(disabledHasUnlimitedGuard).toBe(true);
});
});
@@ -11,7 +11,7 @@
* - data_sources: identityLogs 가 search/search_type/sort_by/sort_order 파라미터 전달
* - 응답 바인딩 경로: identityLogs?.data?.data / identityLogs?.data?.pagination?.*
* - named_actions.searchIdentityLogs 정의 + filter partial actionRef 참조
* - Provider 탭 iteration (identityProviders.data)
* - Provider 탭: TabNavigation tabs prop 표현식 (identityProviders.data concat)
* - Filter partial: searchType select(auto/user_id/target_hash) + status/purpose 멀티 체크박스
* - DataGrid composite: serverSidePagination, expandable, selectable=false (감사 로그 무결성)
* - transition_overlay_target: identity_log_datagrid__body 부분 로딩
@@ -93,11 +93,15 @@ describe('본인인증 이력 — 알림 발송 이력과 동일 수준 UI 회
});
describe('Provider 탭 (알림 발송 이력의 채널 탭과 동일 패턴)', () => {
it('전체 탭 + identityProviders.data iteration 으로 동적 탭 렌더', () => {
const tabIters = collectNodes(mainLayout, (n) =>
n.iteration?.source && /identityProviders\?\.data/.test(n.iteration.source)
it('전체 탭 + identityProviders.data 를 concat 한 동적 tabs 표현식으로 탭 렌더', () => {
// 채널/Provider 탭은 iteration 이 아니라 TabNavigation 의 tabs prop 표현식으로 구성된다.
// [{전체 탭}].concat((identityProviders?.data ?? []).map(...)) 형태.
const tabNodes = collectNodes(mainLayout, (n) =>
typeof n.props?.tabs === 'string'
&& /identityProviders\?\.data/.test(n.props.tabs)
&& /concat/.test(n.props.tabs)
);
expect(tabIters.length).toBeGreaterThan(0);
expect(tabNodes.length).toBeGreaterThan(0);
});
});
@@ -300,6 +304,208 @@ describe('본인인증 이력 — 알림 발송 이력과 동일 수준 UI 회
});
});
describe('채널 라벨 다국어 변환 회귀 (#415 — 채널 식별자 raw 노출 버그)', () => {
// 배경: 채널이 'email'/'ipin' 같은 식별자 그대로 표시되던 버그.
// ProviderResource 가 channel_labels(채널키→다국어라벨) 를 내려주고,
// 레이아웃 3곳(필터 체크박스 / DataGrid 채널 컬럼 / 상세 모달)이 이를 변환한다.
// 각 provider 가 getChannelLabels() 로 자기 채널의 다국어 라벨을 제공(언어팩 활성화 대비).
it('필터 채널 체크박스가 channel_labels 맵으로 라벨 변환 (raw {{ch}} 직출력 금지)', () => {
const channelIters = collectNodes(filterPartial, (n) =>
n.iteration?.item_var === 'ch'
);
expect(channelIters.length).toBe(1);
const stringified = JSON.stringify(channelIters[0]);
// channel_labels 맵을 병합해 ch 키로 라벨 조회
expect(stringified).toContain('channel_labels');
// 라벨 부재 시 ch 폴백 유지 (provider 자유 채널 대비)
expect(stringified).toMatch(/\]\s*\?\?\s*ch/);
// raw 식별자 직출력(text === "{{ch}}") 잔재 없음
const rawCh = collectNodes(channelIters[0], (n) => n.text === '{{ch}}');
expect(rawCh.length).toBe(0);
});
it('DataGrid 채널 컬럼이 channel_labels 맵으로 라벨 변환 (raw row.channel 직출력 금지)', () => {
const channelCol = datagridPartial.props.columns.find((c: any) => c.field === 'channel');
expect(channelCol).toBeTruthy();
const stringified = JSON.stringify(channelCol);
expect(stringified).toContain('channel_labels');
// 이전 raw 패턴("{{row.channel ?? '-'}}") 잔재 없음
expect(stringified).not.toContain("{{row.channel ?? '-'}}");
// 폴백: 라벨 부재 시 row.channel, 채널 없으면 '-'
expect(stringified).toContain("'-'");
});
it('상세 모달 채널 필드가 channel_labels 맵으로 라벨 변환', () => {
const stringified = JSON.stringify(modalPartial);
expect(stringified).toContain('channel_labels');
// 이전 raw 패턴 잔재 없음
expect(stringified).not.toContain("identity_log_modal_data?.channel ?? '-'");
});
it('상세 모달 인증수단 필드가 provider label 로 변환 (raw provider_id 직출력 금지)', () => {
// 배경(라이브 증거): DataGrid 컬럼/필터/탭은 provider_id 를 label("KG이니시스 본인확인")로
// 변환하는데, 상세 모달의 "인증 수단" 필드만 raw 'inicis' 를 노출했다.
// 모달 채널 필드가 이미 identityProviders?.data 에 접근하므로(모달 스코프에서 부모 데이터소스 가시),
// provider_id 도 동일하게 identityProviders 의 label 로 변환해야 한다.
const stringified = JSON.stringify(modalPartial);
// identityProviders 의 label 로 변환 (DataGrid 컬럼과 동일 규약)
expect(stringified).toContain('identityProviders');
// 이전 raw 패턴("identity_log_modal_data?.provider_id ?? '-'") 잔재 없음
expect(stringified).not.toContain("identity_log_modal_data?.provider_id ?? '-'");
});
});
describe('배열 필터 query 키 접근 회귀 (#415 — 상태/목적/채널/발생유형 필터 전부 미적용 버그)', () => {
// 배경(라이브 증거): 화면에서 "요청됨" 체크 후 검색 → URL 은 ?statuses[]=requested 로 정상 기록되나,
// 데이터소스가 보낸 실제 API 요청에서 statuses 가 누락되어 필터가 전혀 안 걸러짐(108건 그대로).
// 근본 원인: DataSourceManager.parseQueryParams 가 배열 URL 파라미터를
// query['statuses[]'] (대괄호 포함 키) 로 파싱한다(이커머스 admin_ecommerce_*_list 가 쓰는 정상 규약).
// 그런데 본인인증 이력 레이아웃만 query.statuses (대괄호 없음 → 항상 undefined) 로 읽어 누락됐다.
// 영향 4종: statuses / purposes / channels / origin_types (데이터소스 params 4 + init_actions 5).
const ARRAY_FILTER_QUERY_KEYS = [
'statuses[]', 'purposes[]', 'channels[]', 'origin_types[]',
];
it("데이터소스 identityLogs 가 배열 필터를 query['key[]'] (대괄호 포함 키) 로 읽는다", () => {
const ds = mainLayout.data_sources.find((d: any) => d.id === 'identityLogs');
const params = ds.params;
// 대괄호 포함 키로 접근해야 parseQueryParams 결과와 매칭됨
expect(params.statuses).toContain("query['statuses[]']");
expect(params.purposes).toContain("query['purposes[]']");
expect(params.channels).toContain("query['channels[]']");
expect(params.origin_types).toContain("query['origin_types[]']");
// 대괄호 없는 깨진 접근(query.statuses 등) 잔재 없음
['statuses', 'purposes', 'channels', 'origin_types'].forEach((k) => {
expect(params[k]).not.toMatch(new RegExp(`query\\.${k}(?![\\w'\\[])`));
});
});
it("init_actions(필터 상태 복원) 가 배열 필터를 query['key[]'] 로 복원한다", () => {
const setStateAction = mainLayout.init_actions.find(
(a: any) => a.handler === 'setState' && a.params?.filter
);
expect(setStateAction).toBeTruthy();
const filter = setStateAction.params.filter;
// statuses/purposes/channels/originTypes 복원 표현식이 대괄호 포함 키를 참조
expect(filter.statuses).toContain("query['statuses[]']");
expect(filter.purposes).toContain("query['purposes[]']");
expect(filter.channels).toContain("query['channels[]']");
expect(filter.originTypes).toContain("query['origin_types[]']");
// advancedOpen 도 origin_types 배열 키로 판정
expect(filter.advancedOpen).toContain("query['origin_types[]']");
});
it('레이아웃 어디에도 대괄호 없는 배열 필터 query 접근(query.statuses 등) 이 남아있지 않다', () => {
const allStr = JSON.stringify(mainLayout);
// query.statuses / query.purposes / query.channels / query.origin_types (대괄호/단어경계 직후가 아닌 경우)
['statuses', 'purposes', 'channels', 'origin_types'].forEach((k) => {
// query.<key> 뒤에 [ 나 영문/숫자/' 가 아닌 경계 → 대괄호 없는 깨진 접근
expect(allStr).not.toMatch(new RegExp(`query\\.${k}(?![\\w'\\[])`));
});
});
it('이커머스 정상 규약과 동일하게 || [] 폴백 또는 단일값 처리로 안전하다', () => {
// 배열이 비어있을 때(필터 미선택) undefined 가 아닌 안전한 값으로 처리되는지 — params 는 빈값이면 누락(정상)
const ds = mainLayout.data_sources.find((d: any) => d.id === 'identityLogs');
// init_actions 의 statuses 복원은 Array.isArray 가드를 거쳐 [] 폴백
const filter = mainLayout.init_actions.find(
(a: any) => a.params?.filter
).params.filter;
ARRAY_FILTER_QUERY_KEYS.forEach((qk) => {
const accessor = `query['${qk}']`;
// 적어도 한 곳(init_actions)에서 이 키를 참조
const inFilter = Object.values(filter).some(
(v: any) => typeof v === 'string' && v.includes(accessor)
);
const inParams = Object.values(ds.params).some(
(v: any) => typeof v === 'string' && v.includes(accessor)
);
expect(inFilter || inParams).toBe(true);
});
});
});
describe('인증수단 탭 전환 시 필터 초기화 회귀 (#420-4 — 탭 전환 후 필터 미적용 버그)', () => {
// 배경(라이브 증거): 상태 필터(예: '요청됨') 체크 후 인증수단 탭을 전환하면,
// 체크박스는 체크된 채로 남는데(=_local.filter 유지) 목록은 필터 없는 전체가 노출된다.
// 근본 원인: onTabChange 가 navigate(replace:true)로 URL 쿼리를 {provider_id,page} 로
// 전면 교체(→ 조회는 필터 없는 전체)하지만, _local.filter 는 초기화하지 않는다.
// replace:true 경로(G7Core.updateQueryParams)는 컴포넌트 리마운트/init_actions 재실행이
// 없어 _local.filter 가 그대로 살아남아 "UI 체크 / 조회 미적용" 불일치가 발생한다.
// 수정: onTabChange 를 sequence[ setState(local, filter 리셋) → navigate ] 로 변경
// (admin_settings.json onTabChange 와 동일한 검증된 sequence 패턴).
const FILTER_RESET_KEYS = [
'searchType', 'search', 'statuses', 'purposes', 'channels',
'originTypes', 'dateFrom', 'dateTo', 'sourceType',
'sourceIdentifier', 'advancedOpen',
];
function findTabChangeAction(): any {
const tabActions = collectNodes(mainLayout, (n) => n.event === 'onTabChange');
expect(tabActions.length).toBe(1);
return tabActions[0];
}
it('onTabChange 가 sequence 핸들러로 정의된다 (단일 navigate 아님)', () => {
const action = findTabChangeAction();
expect(action.handler).toBe('sequence');
const subActions = action.actions || action.params?.actions;
expect(Array.isArray(subActions)).toBe(true);
expect(subActions.length).toBeGreaterThanOrEqual(2);
});
it('sequence 첫 단계가 _local.filter 전체를 기본값으로 초기화한다', () => {
const action = findTabChangeAction();
const subActions = action.actions || action.params?.actions;
const resetStep = subActions.find(
(a: any) => a.handler === 'setState'
&& a.params?.target === 'local'
&& a.params?.filter
);
expect(resetStep).toBeTruthy();
const filter = resetStep.params.filter;
// 11개 필터 필드 전부 기본값으로 리셋 (체크박스/검색어/날짜/고급 전부)
FILTER_RESET_KEYS.forEach((k) => {
expect(filter).toHaveProperty(k);
});
// 배열 필드는 빈 배열, 토글은 false 로 초기화
expect(filter.statuses).toEqual([]);
expect(filter.purposes).toEqual([]);
expect(filter.channels).toEqual([]);
expect(filter.originTypes).toEqual([]);
expect(filter.advancedOpen).toBe(false);
});
it('sequence 마지막 단계가 provider_id 로 navigate (replace + transition_overlay 유지)', () => {
const action = findTabChangeAction();
const subActions = action.actions || action.params?.actions;
const navStep = subActions.find((a: any) => a.handler === 'navigate');
expect(navStep).toBeTruthy();
expect(navStep.params.path).toBe('/admin/identity/logs');
expect(navStep.params.replace).toBe(true);
// 탭 id($args[0])를 provider_id 쿼리로 전달, '전체'(빈 id)면 빈 쿼리
expect(navStep.params.query).toContain('$args[0]');
expect(navStep.params.query).toContain('provider_id');
// 부분 로딩 오버레이 타깃 유지
expect(navStep.params.transition_overlay_target).toBe('identity_log_datagrid__body');
});
it('리셋(setState) 이 navigate 보다 먼저 실행된다 (순서 정합)', () => {
const action = findTabChangeAction();
const subActions = action.actions || action.params?.actions;
const resetIdx = subActions.findIndex(
(a: any) => a.handler === 'setState' && a.params?.filter
);
const navIdx = subActions.findIndex((a: any) => a.handler === 'navigate');
expect(resetIdx).toBeGreaterThanOrEqual(0);
expect(navIdx).toBeGreaterThanOrEqual(0);
expect(resetIdx).toBeLessThan(navIdx);
});
});
describe('금지 패턴 회귀', () => {
it('Tailwind 디바이스 분기(hidden md:* / md:hidden) 사용 안 함', () => {
const allStr = JSON.stringify({ mainLayout, filterPartial, datagridPartial, modalPartial });
@@ -165,9 +165,9 @@ describe('IDV 메시지 정의 — 추가 모달 (알림 템플릿 패리티)',
});
describe('IDV 메시지 정의 — 삭제 모달', () => {
it('Modal id + small + 경고 메시지', () => {
it('Modal id + sm + 경고 메시지', () => {
expect(deleteModal.id).toBe('modal_identity_message_definition_delete');
expect(deleteModal.props.size).toBe('small');
expect(deleteModal.props.size).toBe('sm');
const warnings = collectNodes(deleteModal, (n) =>
n.text === '$t:admin.settings.identity.messages.delete_modal.warning_message'
);
@@ -197,9 +197,9 @@ describe('IDV 메시지 정의 — 삭제 모달', () => {
});
describe('IDV 메시지 정의 — 기본값 복원 모달', () => {
it('Modal id + small + 경고 메시지', () => {
it('Modal id + sm + 경고 메시지', () => {
expect(resetModal.id).toBe('modal_identity_message_definition_reset');
expect(resetModal.props.size).toBe('small');
expect(resetModal.props.size).toBe('sm');
});
it('Confirm Button — apiCall POST /reset + onSuccess(refetch+toast+closeModal)', () => {
@@ -191,11 +191,14 @@ describe('IDV 메시지 미리보기 모달', () => {
expect(subjectSpans.length).toBeGreaterThan(0);
});
it('body 영역이 innerHTML 로 렌더된 본문을 표시', () => {
const bodyDivs = collectNodes(previewModal, (n) =>
typeof n.props?.innerHTML === 'string' && n.props.innerHTML.includes('identity_message_template_preview_modal?.body')
it('body 영역이 HtmlContent 로 렌더된 본문을 표시', () => {
const bodyNodes = collectNodes(previewModal, (n) =>
n.name === 'HtmlContent'
&& n.props?.isHtml === true
&& typeof n.props?.content === 'string'
&& n.props.content.includes('identity_message_template_preview_modal?.body')
);
expect(bodyDivs.length).toBeGreaterThan(0);
expect(bodyNodes.length).toBeGreaterThan(0);
});
it('닫기 버튼: closeModal target 패턴', () => {
@@ -0,0 +1,97 @@
/**
* @file admin-identity-message-template-preview-modal.test.tsx
* @description IDV 메시지 템플릿 미리보기 모달 — 정적 회귀 테스트
*
* 회귀 배경 (2026-06-16 Chrome MCP 검수, 20260616_1813 이력):
* - 결함 A: 본문(body)을 basic Div + innerHTML prop 으로 렌더 → React 는 innerHTML 속성을 무시하여
* 본문 영역 완전 공백. 알림 미리보기 모달(_modal_notification_template_preview)과 동일하게
* composite HtmlContent + content + isHtml:true 로 렌더해야 함.
* - 결함 B: 닫기 버튼 라벨이 $t:admin.common.close (미존재 키) 참조 → 키 원문 노출.
* $t:common.close 로 교체해야 함 (알림 미리보기 모달 패리티).
*/
import { describe, it, expect } from 'vitest';
const previewModal = require('../../layouts/partials/admin_settings/_modal_identity_message_template_preview.json');
function collectNodes(node: any, predicate: (n: any) => boolean): any[] {
const result: any[] = [];
const visit = (n: any) => {
if (!n || typeof n !== 'object') return;
if (Array.isArray(n)) {
n.forEach(visit);
return;
}
if (predicate(n)) result.push(n);
if (n.children) visit(n.children);
if (n.actions) visit(n.actions);
if (n.params) visit(n.params);
if (n.onSuccess) visit(n.onSuccess);
if (n.onError) visit(n.onError);
if (n.iteration) visit(n.iteration);
};
visit(node);
return result;
}
describe('IDV 메시지 템플릿 — 미리보기 모달', () => {
it('Modal id + size=lg', () => {
expect(previewModal.id).toBe('modal_identity_message_template_preview');
expect(previewModal.props.size).toBe('lg');
});
it('제목(subject) 미리보기 — 치환 결과 바인딩', () => {
const subjectNodes = collectNodes(previewModal, (n) =>
typeof n.text === 'string' &&
n.text.includes('_global.identity_message_template_preview_modal?.subject')
);
expect(subjectNodes.length).toBe(1);
});
// 결함 A 회귀 — 본문은 HtmlContent 로 렌더되어야 한다 (basic Div + innerHTML 금지)
it('본문(body)은 composite HtmlContent + content + isHtml:true 로 렌더', () => {
const htmlContents = collectNodes(previewModal, (n) =>
n.type === 'composite' &&
n.name === 'HtmlContent' &&
typeof n.props?.content === 'string' &&
n.props.content.includes('_global.identity_message_template_preview_modal?.body') &&
n.props.isHtml === true
);
expect(
htmlContents.length,
'본문은 composite HtmlContent + content + isHtml:true 로 렌더되어야 합니다 (결함 A).'
).toBe(1);
});
it('본문을 basic Div + innerHTML prop 으로 렌더하지 않는다 (결함 A 금지 패턴)', () => {
const innerHtmlDivs = collectNodes(previewModal, (n) =>
n.type === 'basic' &&
n.name === 'Div' &&
typeof n.props?.innerHTML === 'string'
);
expect(
innerHtmlDivs.length,
'basic Div 의 innerHTML prop 은 React 가 무시하여 본문이 렌더되지 않습니다 (결함 A).'
).toBe(0);
});
// 결함 B 회귀 — 닫기 버튼은 $t:common.close 사용 ($t:admin.common.close 미존재 키 금지)
it('닫기 버튼은 $t:common.close 키 사용', () => {
const closeButtons = collectNodes(previewModal, (n) =>
n.name === 'Button' && n.text === '$t:common.close'
);
expect(closeButtons.length).toBe(1);
expect(closeButtons[0].actions?.[0]?.handler).toBe('closeModal');
expect(closeButtons[0].actions?.[0]?.target).toBe('modal_identity_message_template_preview');
});
it('admin.common.* 미존재 키를 참조하지 않는다 (결함 B 금지 패턴)', () => {
const adminCommonRefs = collectNodes(previewModal, (n) =>
typeof n.text === 'string' && n.text.includes('$t:admin.common.')
);
expect(
adminCommonRefs.length,
'admin.common.close 는 미존재 키로 키 원문이 노출됩니다 (결함 B).'
).toBe(0);
});
});
@@ -18,7 +18,28 @@ import { describe, it, expect } from 'vitest';
import fs from 'fs';
import path from 'path';
const repoRoot = path.resolve(__dirname, '../../../../..');
/**
* 저장소 루트를 탐색한다.
*
* 본 테스트 파일은 `_bundled` 와 활성 템플릿 디렉토리(`template:update` 복사본)
* 양쪽에 동일 내용으로 존재하며, 두 위치는 디렉토리 깊이가 다르다
* (`_bundled` 가 한 단계 더 깊음). 따라서 `../` 상대 카운트로는 한쪽에서만
* 맞는다. `artisan` 파일을 마커로 위로 탐색해 깊이와 무관하게 루트를 찾는다.
*/
function findRepoRoot(start: string): string {
let dir = start;
for (let i = 0; i < 12; i++) {
if (fs.existsSync(path.join(dir, 'artisan'))) {
return dir;
}
const parent = path.dirname(dir);
if (parent === dir) break;
dir = parent;
}
throw new Error(`저장소 루트(artisan)를 찾지 못했습니다: ${start}`);
}
const repoRoot = findRepoRoot(__dirname);
interface LayoutNode {
type?: string;
@@ -254,7 +254,7 @@ const mailSendLogListLayout = {
id: 'mail_send_log_list_content',
type: 'basic',
name: 'Div',
props: { className: 'p-6 bg-gray-50 dark:bg-gray-900 min-h-screen' },
props: { className: 'admin-page-content' },
children: [
// page_header
{
@@ -236,7 +236,7 @@ describe('수동 설치 모달 3개 구조 동일성 검증', () => {
(c: any) => c.if && c.if.includes(errorStateKeys[type])
);
expect(errorBanner, `${type}: 에러 배너가 존재해야 함`).toBeDefined();
expect(errorBanner.props.className).toContain('bg-red-50');
expect(errorBanner.props.className).toContain('alert-danger');
}
});
@@ -309,14 +309,14 @@ describe('수동 설치 모달 3개 구조 동일성 검증', () => {
}
});
it('3개 모달 모두 필드별 에러 표시(text-red-500) 포함', () => {
it('3개 모달 모두 필드별 에러 표시(.form-error-xs) 포함 (#408)', () => {
const types = ['module', 'plugin', 'template'] as const;
for (const type of types) {
const json = loadModalJson(type);
const jsonStr = JSON.stringify(json);
// 파일 에러 + URL 에러 모두 적색 텍스트
const redErrorCount = (jsonStr.match(/text-red-500 dark:text-red-400 text-xs/g) || []).length;
// text-red-500 + dark:text-red-400 + text-xs 토큰을 .form-error-xs 자산이 흡수
const redErrorCount = (jsonStr.match(/form-error-xs/g) || []).length;
expect(redErrorCount, `${type}: 필드 에러 2개(file, github_url)`).toBeGreaterThanOrEqual(2);
}
});
@@ -583,7 +583,7 @@ describe('모듈 업데이트 - 업데이트 모달', () => {
name: 'Modal',
props: {
title: '$t:admin.modules.modals.update_title',
size: 'small',
size: 'sm',
},
children: [
{
@@ -769,9 +769,9 @@ describe('모듈 업데이트 - 업데이트 모달', () => {
expect(state._global.isModuleUpdating).toBe(false);
});
it('모달 크기가 small로 설정되어 있다', () => {
it('모달 크기가 sm 으로 설정되어 있다', () => {
const modal = updateModalLayout.modals[0];
expect(modal.props.size).toBe('small');
expect(modal.props.size).toBe('sm');
});
});
@@ -155,7 +155,7 @@ const notificationLogListLayout = {
id: 'notification_log_content',
type: 'basic',
name: 'Div',
props: { className: 'p-6 bg-gray-50 dark:bg-gray-900 min-h-screen' },
props: { className: 'admin-page-content' },
children: [
{
id: 'page_header',
@@ -583,7 +583,7 @@ describe('플러그인 업데이트 - 업데이트 모달', () => {
name: 'Modal',
props: {
title: '$t:admin.plugins.modals.update_title',
size: 'small',
size: 'sm',
},
children: [
{
@@ -769,9 +769,9 @@ describe('플러그인 업데이트 - 업데이트 모달', () => {
expect(state._global.isPluginUpdating).toBe(false);
});
it('모달 크기가 small로 설정되어 있다', () => {
it('모달 크기가 sm 으로 설정되어 있다', () => {
const modal = updateModalLayout.modals[0];
expect(modal.props.size).toBe('small');
expect(modal.props.size).toBe('sm');
});
});
@@ -133,6 +133,94 @@ describe('환경설정 > 본인인증 정책 모달 회귀 테스트 (옵션 K)'
});
});
describe('출처별 편집 제한 — 선언형(코어/모듈/플러그인) 잠금 필드', () => {
/**
* 선언형 정책(source_type != admin) 편집 시 키(key)/시점(scope)/위치(target) 만 잠기고
* 그 외 필드는 운영자가 자유로이 편집할 수 있어야 한다.
*
* 백엔드 화이트리스트: AdminIdentityPolicyController::LIMITED_EDITABLE_FIELDS
* = [enabled, grace_minutes, provider_id, fail_mode, conditions, purpose, applies_to, priority]
* → key/scope/target 만 모달에서 disabled. 인증 목적(purpose)·적용 대상(applies_to) 포함 나머지는
* disabled 미부여(편집 가능). 안내 문구도 "키·시점·위치만 변경 불가" 로 정합.
*
* 배경: 과거 purpose/applies_to 까지 잠겼던 것은 "선언형 readonly" 원칙의 과확장이었으며,
* 인증 목적은 어떤 정책이든 운영자가 자유 부여 가능해야 한다(PO).
*/
const LOCK_PREDICATE = "!_global.identity_policy_form_modal?.isNew && _global.identity_policy_form_modal?.form?.source_type !== 'admin'";
// 컴포넌트 노드를 라벨 i18n 키로 찾는다.
const findFieldControl = (node: AnyJson, labelKey: string): AnyJson | null => {
if (!node || typeof node !== 'object') return null;
if (Array.isArray(node)) {
for (const item of node) { const r = findFieldControl(item, labelKey); if (r) return r; }
return null;
}
// Div(그룹) 안에 Label(text === labelKey) + Input|Select 형제 구조
if (Array.isArray(node.children)) {
const hasLabel = node.children.some((c: AnyJson) => c?.name === 'Label' && c?.text === labelKey);
if (hasLabel) {
const control = node.children.find((c: AnyJson) => c?.name === 'Input' || c?.name === 'Select');
if (control) return control;
}
}
for (const k of Object.keys(node)) { const r = findFieldControl(node[k], labelKey); if (r) return r; }
return null;
};
const lockedFields = [
['정책 키', '$t:admin.identity.policies.form.key'],
['강제 시점', '$t:admin.identity.policies.form.scope'],
['강제 위치', '$t:admin.identity.policies.form.target'],
] as const;
it.each(lockedFields)('선언형 잠금 필드 "%s" 는 disabled 바인딩 보유', (_label, labelKey) => {
const control = findFieldControl(modalPartial, labelKey);
expect(control).not.toBeNull();
expect(control!.props?.disabled).toBe(`{{${LOCK_PREDICATE}}}`);
});
const editableFields = [
['인증 목적', '$t:admin.identity.policies.form.purpose'],
['적용 대상', '$t:admin.identity.policies.form.applies_to'],
['인증 수단', '$t:admin.identity.policies.form.provider_id'],
['재요구 주기', '$t:admin.identity.policies.form.grace_minutes'],
['실패 시 처리', '$t:admin.identity.policies.form.fail_mode'],
] as const;
it.each(editableFields)('편집 가능 필드 "%s" 는 disabled 미부여 (선언형도 편집 가능)', (_label, labelKey) => {
const control = findFieldControl(modalPartial, labelKey);
expect(control).not.toBeNull();
expect(control!.props?.disabled).toBeUndefined();
});
it('인증 목적(purpose) 은 disabled className variant 도 제거 (편집 가능 회귀)', () => {
const purpose = findFieldControl(modalPartial, '$t:admin.identity.policies.form.purpose');
expect(purpose!.props?.className ?? '').not.toContain('disabled:bg-gray-100');
});
it('우선순위(priority) 입력칸 존재 + 편집 가능 + form.priority 바인딩', () => {
const priority = findFieldControl(modalPartial, '$t:admin.identity.policies.form.priority');
expect(priority).not.toBeNull();
expect(priority!.name).toBe('Input');
expect(priority!.props?.type).toBe('number');
expect(priority!.props?.value).toContain('identity_policy_form_modal?.form?.priority');
expect(priority!.props?.disabled).toBeUndefined();
});
});
describe('우선순위 동률 결함 수정', () => {
it('모달에 우선순위 입력 change setState 가 form.priority 경로로 변경', () => {
const modalStr = JSON.stringify(modalPartial);
expect(modalStr).toContain('"identity_policy_form_modal.form.priority"');
});
it('정책 목록(DataGrid) 에 우선순위 컬럼 헤더 + 값 바인딩 노출', () => {
const partialStr = JSON.stringify(policiesPartial);
expect(partialStr).toContain('$t:admin.identity.policies.col.priority');
expect(partialStr).toContain('policy.priority ?? 100');
});
});
describe('conditions 운영자 편집 (B안 리팩토링)', () => {
/**
* 회원가입 단계 등 정책 조건은 폼에서 편집 가능해야 한다.
@@ -0,0 +1,117 @@
/**
* @file admin-settings-identity-providers-tab.test.tsx
* @description 환경설정 > 본인인증 > 목적별 프로바이더 sub-tab 회귀 테스트
*
* 회귀 사례:
* 1. (D1) purpose id 에 점(.)이 포함된 매핑(예: KG이니시스 `inicis.adult_verification`) 저장 시
* 프론트엔드 폼 바인딩이 dot-notation name 을 중첩 객체로 풀어 전송 → 백엔드 422.
* → Select name 은 `identity.purpose_providers.{{purpose.id}}` dot-path 를 유지하되,
* 백엔드 validation 이 nested leaf 를 허용하도록 수정됨 (SaveSettingsRequest).
* 2. (D2) 저장 실패(422) 시 목적별 프로바이더 Select 에 필드별 강조/하단 문구가
* 전혀 없었음. → 기본 sub-tab 과 동일하게 _local.errors 키 기반 강조 + form-error 추가.
*
* 검증 포인트:
* - 각 purpose 행의 Select name 이 `identity.purpose_providers.{{purpose.id}}`
* - 에러 발생 시 className 이 _local.errors 키(`identity.purpose_providers.` + purpose.id)로 분기
* - 에러 메시지 Span(form-error)이 동일 키 + if 조건으로 렌더
* - 에러 키 참조가 백엔드가 반환하는 dot-path 키와 문자 단위로 일치
*/
import { describe, it, expect } from 'vitest';
const providersPartial = require('../../layouts/partials/admin_settings/_tab_identity_providers.json');
/**
* children 트리에서 조건에 맞는 노드를 모두 수집.
*
* @param node 시작 노드
* @param predicate 노드 매칭 조건
* @returns 매칭된 노드 배열
*/
function collectNodes(node: any, predicate: (n: any) => boolean): any[] {
const result: any[] = [];
const visit = (n: any) => {
if (!n || typeof n !== 'object') return;
if (Array.isArray(n)) {
n.forEach(visit);
return;
}
if (predicate(n)) result.push(n);
if (n.children) visit(n.children);
if (n.cellChildren) visit(n.cellChildren);
if (n.actions) visit(n.actions);
if (n.params) visit(n.params);
if (n.onSuccess) visit(n.onSuccess);
if (n.onError) visit(n.onError);
};
visit(node);
return result;
}
describe('환경설정 > 본인인증 > 목적별 프로바이더 sub-tab', () => {
describe('D1: Select name 은 purpose id dot-path 유지', () => {
it('목적별 프로바이더 Select 의 name 이 identity.purpose_providers.{{purpose.id}} 이다', () => {
const selects = collectNodes(
providersPartial,
(n) =>
n.name === 'Select' &&
typeof n?.props?.name === 'string' &&
n.props.name.startsWith('identity.purpose_providers.')
);
expect(selects.length).toBeGreaterThan(0);
const target = selects.find(
(s) => s.props.name === 'identity.purpose_providers.{{purpose.id}}'
);
expect(target).toBeDefined();
});
});
describe('D2: 저장 실패 시 필드별 강조 + 하단 문구', () => {
it('목적별 프로바이더 Select className 이 _local.errors 키 기반으로 빨강 테두리 분기한다', () => {
const select = collectNodes(
providersPartial,
(n) =>
n.name === 'Select' &&
n?.props?.name === 'identity.purpose_providers.{{purpose.id}}'
)[0];
expect(select).toBeDefined();
const className = select.props.className as string;
// _local.errors 의 dot-path 키 참조 + 빨강 테두리 분기
expect(className).toContain("_local.errors?.['identity.purpose_providers.' + purpose.id]");
expect(className).toMatch(/border-red-500/);
});
it('에러 메시지 Span(form-error)이 동일 키 + if 조건으로 존재한다', () => {
const errorSpans = collectNodes(
providersPartial,
(n) =>
n.name === 'Span' &&
n?.props?.className === 'form-error' &&
typeof n?.if === 'string' &&
n.if.includes("_local.errors?.['identity.purpose_providers.' + purpose.id]")
);
expect(errorSpans.length).toBeGreaterThan(0);
const span = errorSpans[0];
// 첫 번째 에러 메시지를 텍스트로 표시
expect(span.text).toContain(
"_local.errors?.['identity.purpose_providers.' + purpose.id]?.[0]"
);
});
it('에러 키 참조가 백엔드 dot-path 키 형식과 일치한다 (점 포함 purpose id 대응)', () => {
// 백엔드(SaveSettingsRequest)가 반환하는 키: identity.purpose_providers.<purpose.id>
// purpose.id 가 inicis.adult_verification 이면
// → identity.purpose_providers.inicis.adult_verification
// 프론트는 'identity.purpose_providers.' + purpose.id 로 동일하게 결합하므로 일치.
const partialStr = JSON.stringify(providersPartial);
expect(partialStr).toContain("'identity.purpose_providers.' + purpose.id");
// 단일 깊이 와일드카드 가정(잘린 키)로 참조하지 않아야 함
expect(partialStr).not.toContain('purpose_providers.inicis]');
});
});
});
@@ -0,0 +1,112 @@
/**
* @file admin-settings-language-pack-scope-leak.test.tsx
* @description 환경설정 통합 화면 — 정책/언어팩 데이터소스가 같은 query.scope 를 공유해 양방향으로
* 422 토스트를 유발하던 회귀 (#415)
*
* 버그 (#415):
* admin_settings.json 에 정책(policies)·언어팩(language_packs) 데이터소스가 공존하며 둘 다
* query.scope 를 읽는다. 두 데이터소스의 scope 값 도메인이 다르다:
* - policies : route / hook / custom
* - language_packs: core / module / plugin / template
* 두 데이터소스가 if 없이 항상 fetch 되므로, 한 탭에서 건 필터의 scope 가 반대쪽 데이터소스로
* 실려 422 ("선택한 scope이(가) 올바르지 않습니다.") 토스트가 양방향으로 발생했다.
* - 본인인증 탭 scope=hook → 언어팩 API 422
* - 언어팩 탭 scope=module → 정책 API 422
*
* 수정 (3안 — 데이터소스 활성 탭 if):
* 각 데이터소스에 활성 탭 if 를 부여해 같은 탭에서 동시에 fetch 되지 않게 한다.
* - policies : if = 활성 탭 === 'identity'
* - language_packs: if = 활성 탭 === 'language_packs'
* 탭 전환은 navigate(?tab=X) 를 동반하므로 if 가 재평가되어 해당 탭 데이터소스만 fetch 된다.
*
* 검증 방식:
* admin_settings.json 의 data_sources 를 실제 DataSourceManager.filterByCondition 에 통과시켜
* 탭별 선택 결과를 단언한다. policies 와 language_packs 가 어떤 탭에서도 동시에 선택되지 않음을 확인.
*/
import { describe, it, expect } from 'vitest';
import { DataSourceManager } from '@core/template-engine/DataSourceManager';
const adminSettings = require('../../layouts/admin_settings.json');
/**
* 활성 탭 컨텍스트로 filterByCondition 을 수행해 선택된 데이터소스 id 집합 반환.
*
* @param tab URL query.tab (navigate 가 갱신 — 항상 정확)
* @param extraQuery 추가 query 파라미터
* @param globalTab _global.activeSettingsTab (탭 클릭 전환 시 navigate 시점에 stale 할 수 있음).
* 미지정 시 tab 과 동일(새로고침/직접진입 경로).
*/
function selectedSourceIds(
tab: string,
extraQuery: Record<string, any> = {},
globalTab: string = tab,
): Set<string> {
const mgr = new DataSourceManager();
const sources = adminSettings.data_sources ?? [];
const ctx = {
query: { tab, ...extraQuery },
route: {},
_global: { activeSettingsTab: globalTab },
};
const selected = mgr.filterByCondition(sources as any, ctx as any);
return new Set(selected.map((s: any) => s.id));
}
describe('환경설정 — 정책/언어팩 데이터소스 탭 격리 (#415)', () => {
it('본인인증 탭에서는 policies 만 선택되고 language_packs 는 제외된다 (scope=hook 누출 차단)', () => {
const ids = selectedSourceIds('identity', { scope: 'hook' });
expect(ids.has('policies'), 'policies 는 본인인증 탭에서 fetch 되어야 함').toBe(true);
expect(ids.has('language_packs'), 'language_packs 는 본인인증 탭에서 fetch 되면 안 됨 (scope=hook 누출)').toBe(false);
});
it('언어팩 탭에서는 language_packs 만 선택되고 policies 는 제외된다 (scope=module 누출 차단)', () => {
const ids = selectedSourceIds('language_packs', { scope: 'module' });
expect(ids.has('language_packs'), 'language_packs 는 언어팩 탭에서 fetch 되어야 함').toBe(true);
expect(ids.has('policies'), 'policies 는 언어팩 탭에서 fetch 되면 안 됨 (scope=module 누출)').toBe(false);
});
it('어떤 탭에서도 policies 와 language_packs 가 동시에 선택되지 않는다 (양방향 누출 원천 차단)', () => {
const tabs = ['general', 'mail', 'identity', 'language_packs', 'info', 'security'];
for (const tab of tabs) {
const ids = selectedSourceIds(tab);
const both = ids.has('policies') && ids.has('language_packs');
expect(both, `탭 "${tab}" 에서 policies 와 language_packs 가 동시에 fetch 되면 안 됨`).toBe(false);
}
});
// 탭 클릭 전환: navigate 는 query.tab 을 갱신하지만, 그 시점의 _global.activeSettingsTab 은
// 직전 탭 값으로 stale 할 수 있다. 데이터소스 if 는 query.tab 을 우선해야 올바른 탭으로 평가된다.
// (회귀: _global 우선 시 본인인증→언어팩 클릭 전환에서 언어팩이 fetch 되지 않고 정책이 잘못 fetch 됨)
it('본인인증→언어팩 탭 클릭 전환(query.tab=language_packs, _global=identity stale)에서 language_packs 만 선택', () => {
const ids = selectedSourceIds('language_packs', { scope: 'module' }, 'identity');
expect(ids.has('language_packs'), 'query.tab=language_packs 면 stale _global 과 무관하게 언어팩이 fetch 되어야 함').toBe(true);
expect(ids.has('policies'), 'stale _global=identity 때문에 정책이 fetch 되면 안 됨').toBe(false);
});
it('언어팩→본인인증 탭 클릭 전환(query.tab=identity, _global=language_packs stale)에서 policies 만 선택', () => {
const ids = selectedSourceIds('identity', { scope: 'hook' }, 'language_packs');
expect(ids.has('policies'), 'query.tab=identity 면 stale _global 과 무관하게 정책이 fetch 되어야 함').toBe(true);
expect(ids.has('language_packs'), 'stale _global=language_packs 때문에 언어팩이 fetch 되면 안 됨').toBe(false);
});
it('일반 탭(general)에서는 policies/language_packs 둘 다 제외된다 (불필요 fetch 방지)', () => {
const ids = selectedSourceIds('general');
expect(ids.has('policies')).toBe(false);
expect(ids.has('language_packs')).toBe(false);
});
it('policies 데이터소스 정의에 활성 탭 if(identity) 가 존재한다', () => {
const policies = (adminSettings.data_sources ?? []).find((s: any) => s.id === 'policies');
expect(policies).toBeTruthy();
expect(typeof policies.if).toBe('string');
expect(policies.if).toMatch(/identity/);
});
it('language_packs 데이터소스 정의에 활성 탭 if(language_packs) 가 존재한다', () => {
const lp = (adminSettings.data_sources ?? []).find((s: any) => s.id === 'language_packs');
expect(lp).toBeTruthy();
expect(typeof lp.if).toBe('string');
expect(lp.if).toMatch(/language_packs/);
});
});
@@ -117,6 +117,27 @@ describe('환경설정 > 알림 템플릿 편집 모달 회귀 (옵션 K)', () =
});
});
// 회귀: 역할/사용자 드롭다운이 저장된 선택값을 표시하지 못하던 버그.
// SearchableDropdown 은 value 를 options 에서 찾아 라벨을 표시하므로,
// 검색 전(roleSearchResults/userSearchResults 빈 배열) 에도 현재 선택값을
// options 에 시드해야 한다(백엔드가 내려준 rcpt.display_name / display_names 사용).
describe('수신자 드롭다운 — 현재 선택값 options 시드', () => {
it('role 드롭다운 options 가 rcpt.value + rcpt.display_name 으로 시드', () => {
const modalStr = JSON.stringify(modalPartial);
// 검색 결과만 바인딩하던 옛 형태가 남아있지 않아야 한다
expect(modalStr).not.toContain('"options":"{{_global.notification_template_form_modal?.roleSearchResults ?? []}}"');
// 현재 선택값 시드 표현식
expect(modalStr).toContain('rcpt.display_name ?? rcpt.value');
expect(modalStr).toContain("String(o.value) !== String(rcpt.value)");
});
it('specific_users 드롭다운 options 가 rcpt.value + rcpt.display_names 로 시드', () => {
const modalStr = JSON.stringify(modalPartial);
expect(modalStr).not.toContain('"options":"{{_global.notification_template_form_modal?.userSearchResults ?? []}}"');
expect(modalStr).toContain('(rcpt.display_names ?? [])[i] ?? uid');
});
});
describe('미리보기 / 저장 흐름', () => {
it('미리보기 onSuccess 가 _global.notification_template_form_modal.preview 에 저장', () => {
const modalStr = JSON.stringify(modalPartial);
@@ -0,0 +1,102 @@
/**
* @file admin-settings-sticky.test.tsx
* @description 관리자 환경설정 화면 상단 탭 / 하단 버튼 sticky 고정 회귀 테스트
*
* 배경:
* - 코어 환경설정(admin_settings.json)의 상단 탭과 하단 저장 버튼에는
* 원래 sticky 고정 스타일이 적용되어 있었으나, 알림 설정 탭 재설계 과정에서
* tab_navigation 컨테이너 교체 + footer_buttons className 평탄화로 소실되었다.
* - 본 테스트는 sticky className 이 다시 존재함을 보장하여 동일 회귀를 차단한다.
*/
import React from 'react';
import fs from 'node:fs';
import path from 'node:path';
import { describe, it, expect } from 'vitest';
import { render } from '@testing-library/react';
import adminSettingsLayout from '../../layouts/admin_settings.json';
import { TabNavigation } from '../../src/components/composite/TabNavigation';
/** 레이아웃 트리에서 주어진 id 의 노드를 찾는다. */
function findById(node: unknown, id: string): Record<string, unknown> | undefined {
if (!node || typeof node !== 'object') {
return undefined;
}
const value = node as Record<string, unknown>;
if (value.id === id) {
return value;
}
for (const child of Object.values(value)) {
const found = findById(child, id);
if (found) {
return found;
}
}
return undefined;
}
function classNameOf(node: Record<string, unknown> | undefined): string {
const props = (node?.props ?? {}) as Record<string, unknown>;
return typeof props.className === 'string' ? props.className : '';
}
describe('admin_settings 환경설정 sticky 고정', () => {
it('상단 탭 컨테이너(sticky_header)에 .sticky-tab-nav 시맨틱 클래스가 적용되어야 한다', () => {
// #399 Phase 1.3: sticky 책임이 TabNavigation 노드 자체가 아니라 그를 감싸는
// 래퍼 Div(sticky_header) 로 이동했다. 래퍼가 .sticky-tab-nav* 자산을 보유하면
// 탭 영역 sticky 고정이 보존된다 (반응형 변형 sticky-tab-nav-responsive 포함).
const stickyHeader = findById(adminSettingsLayout, 'sticky_header');
expect(stickyHeader, 'sticky_header 래퍼 미존재').toBeDefined();
const className = classNameOf(stickyHeader);
expect(className).toContain('sticky-tab-nav');
// 래퍼가 실제로 tab_navigation 을 감싸고 있어야 한다 (sticky 대상 보장).
expect(findById(stickyHeader, 'tab_navigation'), 'sticky_header 가 tab_navigation 을 감싸지 않음').toBeDefined();
});
it('하단 버튼(footer_buttons)에 .sticky-footer-buttons 시맨틱 클래스가 적용되어야 한다', () => {
const footer = findById(adminSettingsLayout, 'footer_buttons');
expect(footer).toBeDefined();
const className = classNameOf(footer);
expect(className).toContain('sticky-footer-buttons');
});
it('상단/하단 sticky 자산 정의가 sticky/top|bottom/z 토큰을 포함 (계층 보장)', () => {
// 시맨틱화 (#399 Phase 1.3 ~ 1.5) 이후 회귀 의도 보존:
// .sticky-tab-nav 안에 sticky/top-0/z-40, .sticky-footer-buttons 안에
// sticky/bottom-0/z-10 토큰이 살아있어야 상단 탭과 하단 저장 버튼이
// 콘텐츠 스크롤 시 가려지지 않고, 헤더 (z-50) 보다 낮은 계층을 유지한다.
const cssPath = path.resolve(__dirname, '../../src/styles/main.css');
const css = fs.readFileSync(cssPath, 'utf-8');
const topNavBlock = css.match(/\.sticky-tab-nav\s*\{[^}]*\}/)?.[0] ?? '';
expect(topNavBlock).toContain('sticky');
expect(topNavBlock).toContain('top-0');
expect(topNavBlock).toContain('z-40');
const footerBlock = css.match(/\.sticky-footer-buttons\s*\{[^}]*\}/)?.[0] ?? '';
expect(footerBlock).toContain('sticky');
expect(footerBlock).toContain('bottom-0');
expect(footerBlock).toContain('z-10');
expect(classNameOf(findById(adminSettingsLayout, 'footer_buttons'))).toContain('sticky-footer-buttons');
});
it('TabNavigation 컴포넌트가 className prop 을 렌더 루트에 전달한다', () => {
// tab_navigation 은 composite TabNavigation 이므로 sticky 가 className prop 으로
// 전달되어 실제 DOM 에 반영되는지 확인 (데스크톱 분기 = <nav>)
const { container } = render(
<TabNavigation
tabs={[{ id: 'a', label: 'A' }]}
activeTabId="a"
className="sticky top-0 z-40"
/>
);
const nav = container.querySelector('nav');
expect(nav).not.toBeNull();
expect(nav?.className).toContain('sticky');
expect(nav?.className).toContain('top-0');
});
});
@@ -0,0 +1,163 @@
/**
* @file admin-template-detail-externals.test.tsx
* @description 템플릿 정보 모달 - 외부 리소스(externals) 섹션 렌더링 테스트
*
* 테스트 대상:
* - partials/admin_template_list/_modal_detail.json (external_resources_section)
*
* 검증:
* - externals 가 비어 있을 때 "외부 리소스가 없습니다" 메시지
* - externals 항목 행 렌더링 — id, type, url
* - id 가 없는 항목은 id 배지를 생략하고 type/url 만 표시
*/
import React from 'react';
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { createLayoutTest, screen } from '@core/template-engine/__tests__/utils/layoutTestUtils';
import { ComponentRegistry } from '@core/template-engine/ComponentRegistry';
const TestDiv: React.FC<any> = ({ className, children }) => (
<div className={className}>{children}</div>
);
const TestSpan: React.FC<any> = ({ className, children, text }) => (
<span className={className}>{children || text}</span>
);
const TestP: React.FC<any> = ({ className, children, text }) => (
<p className={className}>{children || text}</p>
);
const TestIcon: React.FC<any> = ({ name, className }) => (
<i className={className} data-icon={name} />
);
const TestFragment: React.FC<any> = ({ children }) => <>{children}</>;
function setupRegistry(): ComponentRegistry {
const registry = ComponentRegistry.getInstance();
(registry as any).registry = {
Div: { component: TestDiv, metadata: { name: 'Div', type: 'basic' } },
Span: { component: TestSpan, metadata: { name: 'Span', type: 'basic' } },
P: { component: TestP, metadata: { name: 'P', type: 'basic' } },
Icon: { component: TestIcon, metadata: { name: 'Icon', type: 'basic' } },
Fragment: { component: TestFragment, metadata: { name: 'Fragment', type: 'layout' } },
};
return registry;
}
const translations = {
admin: {
templates: {
modals: {
external_resources: '외부 리소스',
external_resources_description: '이 템플릿이 사용하는 외부 스타일·웹폰트·스크립트입니다.',
no_external_resources: '외부 리소스가 없습니다.',
},
},
},
};
function loadSection(): any {
const fs = require('fs');
const path = require('path');
const full = path.resolve(
__dirname,
'..',
'..',
'layouts',
'partials/admin_template_list/_modal_detail.json',
);
const json = JSON.parse(fs.readFileSync(full, 'utf-8'));
return findNodeById(json.children ?? [json], 'external_resources_section');
}
function findNodeById(nodes: any[] | any, id: string): any {
const list = Array.isArray(nodes) ? nodes : [nodes];
for (const node of list) {
if (!node || typeof node !== 'object') continue;
if (node.id === id) return node;
const found = findNodeById(node.children ?? [], id);
if (found) return found;
}
return undefined;
}
function buildLayout(section: any, externals: any[]) {
return {
version: '1.0.0',
layout_name: 'external_resources_section_test',
initGlobal: { selectedTemplate: { externals } },
components: [section],
};
}
describe('템플릿 정보 모달 - 외부 리소스 섹션', () => {
let testUtils: ReturnType<typeof createLayoutTest>;
let registry: ComponentRegistry;
let section: any;
beforeEach(() => {
registry = setupRegistry();
section = loadSection();
});
afterEach(() => {
if (testUtils) testUtils.cleanup();
});
it('external_resources_section 이 template partial 에 존재한다', () => {
expect(section).toBeDefined();
expect(section.id).toBe('external_resources_section');
});
it('externals 가 비어 있으면 "외부 리소스가 없습니다" 메시지가 표시된다', async () => {
testUtils = createLayoutTest(buildLayout(section, []), {
translations,
locale: 'ko',
componentRegistry: registry,
});
await testUtils.render();
expect(screen.getByText('외부 리소스가 없습니다.')).toBeTruthy();
});
it('externals 항목의 id, type, url 이 모두 렌더링된다', async () => {
testUtils = createLayoutTest(
buildLayout(section, [
{
id: 'fontawesome',
type: 'style',
url: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css',
},
{
id: 'pretendard',
type: 'webfont',
url: 'https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css',
},
]),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('fontawesome')).toBeTruthy();
expect(screen.getByText('pretendard')).toBeTruthy();
expect(screen.getByText('style')).toBeTruthy();
expect(screen.getByText('webfont')).toBeTruthy();
expect(
screen.getByText('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css'),
).toBeTruthy();
});
it('id 가 없는 항목은 type 과 url 만 표시된다', async () => {
testUtils = createLayoutTest(
buildLayout(section, [
{
type: 'preconnect',
url: 'https://cdn.example.com',
},
]),
{ translations, locale: 'ko', componentRegistry: registry },
);
await testUtils.render();
expect(screen.getByText('preconnect')).toBeTruthy();
expect(screen.getByText('https://cdn.example.com')).toBeTruthy();
});
});
@@ -32,6 +32,8 @@ function loadLayout(relativePath: string): any {
const layoutEditJson = loadLayout('admin_template_layout_edit.json');
const versionHistoryModalJson = loadLayout('partials/admin_template_layout_edit/_modal_version_history.json');
const extensionVersionHistoryModalJson = loadLayout('partials/admin_template_layout_edit/_modal_extension_version_history.json');
const extensionPreviewLayoutModalJson = loadLayout('partials/admin_template_layout_edit/_modal_extension_preview_layout.json');
// ==============================
// 헬퍼: JSON 구조 내 컴포넌트 검색
@@ -57,6 +59,17 @@ function findAllComponents(node: any, predicate: (n: any) => boolean): any[] {
}
}
// RichSelect 등 component_layout 슬롯(item/selected) 내부도 순회
if (node.component_layout && typeof node.component_layout === 'object') {
for (const slot of Object.values(node.component_layout)) {
if (Array.isArray(slot)) {
for (const child of slot) {
results.push(...findAllComponents(child, predicate));
}
}
}
}
return results;
}
@@ -143,7 +156,7 @@ describe('미리보기 버튼', () => {
// ==============================
describe('버전 히스토리 버튼', () => {
it('sequence → refetchDataSource → openModal 패턴을 사용한다', () => {
it('conditions 핸들러로 일반/확장 모달을 분기한다', () => {
// 버전 히스토리 버튼 찾기 (version_history_modal 을 여는 버튼)
const versionHistoryButton = findComponent(layoutEditJson, (n) => {
if (!n.actions) return false;
@@ -155,23 +168,26 @@ describe('버전 히스토리 버튼', () => {
expect(versionHistoryButton).not.toBeNull();
expect(versionHistoryButton.name).toBe('Button');
const sequenceAction = versionHistoryButton.actions.find(
(a: any) => a.handler === 'sequence'
// conditions 핸들러 사용 (selectedNodeKind 에 따라 분기)
const conditionsAction = versionHistoryButton.actions.find(
(a: any) => a.handler === 'conditions'
);
expect(sequenceAction).toBeDefined();
expect(conditionsAction).toBeDefined();
expect(Array.isArray(conditionsAction.conditions)).toBe(true);
// sequence 의 actions 는 sequenceAction.actions 또는 sequenceAction.params.actions 양쪽 형태 지원
const actions = sequenceAction.actions ?? sequenceAction.params?.actions ?? [];
// extension 분기 — extension_version_history_modal
const extensionBranch = conditionsAction.conditions.find(
(c: any) => c.if && c.if.includes("'extension'")
);
expect(extensionBranch).toBeDefined();
expect(JSON.stringify(extensionBranch.then)).toContain('extension_version_history_modal');
expect(JSON.stringify(extensionBranch.then)).toContain('extension_versions');
// refetchDataSource (layout_versions 갱신)
const refetchAction = actions.find((a: any) => a.handler === 'refetchDataSource');
expect(refetchAction).toBeDefined();
expect(refetchAction.params.dataSourceId).toBe('layout_versions');
// openModal
const openModalAction = actions.find((a: any) => a.handler === 'openModal');
expect(openModalAction).toBeDefined();
expect(openModalAction.target).toBe('version_history_modal');
// 기본 분기 (if 없음) — version_history_modal
const defaultBranch = conditionsAction.conditions.find((c: any) => !c.if);
expect(defaultBranch).toBeDefined();
expect(JSON.stringify(defaultBranch.then)).toContain('version_history_modal');
expect(JSON.stringify(defaultBranch.then)).toContain('layout_versions');
});
});
@@ -249,3 +265,315 @@ describe('어빌리티 기반 조건부 렌더링', () => {
expect(saveButton.if).toContain('can_update');
});
});
// ==============================
// 레이아웃 확장 데이터 소스 테스트
// ==============================
describe('레이아웃 확장 데이터 소스', () => {
it('layout_extensions / current_extension / extension_versions 데이터 소스가 정의되어 있다', () => {
const ids = layoutEditJson.data_sources.map((d: any) => d.id);
expect(ids).toContain('layout_extensions');
expect(ids).toContain('current_extension');
expect(ids).toContain('extension_versions');
});
it('layout_extensions 는 auto_fetch + blocking 으로 트리 초기 로드된다', () => {
const ds = layoutEditJson.data_sources.find((d: any) => d.id === 'layout_extensions');
expect(ds.auto_fetch).toBe(true);
expect(ds.loading_strategy).toBe('blocking');
expect(ds.endpoint).toContain('/layout-extensions');
});
it('transition_overlay.wait_for 에 layout_extensions 가 포함된다', () => {
expect(layoutEditJson.transition_overlay.wait_for).toContain('layout_extensions');
});
it('current_extension 은 selectedExtensionId 의존 + editorContent 로 initGlobal 한다', () => {
const ds = layoutEditJson.data_sources.find((d: any) => d.id === 'current_extension');
expect(ds.auto_fetch).toBe(false);
expect(ds.endpoint).toContain('selectedExtensionId');
expect(ds.initGlobal.key).toBe('editorContent');
});
});
// ==============================
// 좌측 트리 — 확장 섹션 테스트
// ==============================
describe('좌측 트리 확장 섹션', () => {
it('확장 주입 레이아웃 섹션 헤더가 존재한다', () => {
const sectionHeader = findComponent(layoutEditJson, (n) =>
typeof n.text === 'string' && n.text.includes('section_extensions')
);
expect(sectionHeader).not.toBeNull();
});
it('layout_extensions 를 source 별로 그룹 iteration 한다', () => {
const groupIteration = findComponent(layoutEditJson, (n) =>
Boolean(n.iteration?.source?.includes('layout_extensions'))
);
expect(groupIteration).not.toBeNull();
expect(groupIteration.iteration.item_var).toBe('extGroup');
});
it('각 그룹의 extensions 를 ext 로 중첩 iteration 한다', () => {
const extIteration = findComponent(layoutEditJson, (n) =>
Boolean(n.iteration?.source?.includes('extGroup.extensions'))
);
expect(extIteration).not.toBeNull();
expect(extIteration.iteration.item_var).toBe('ext');
});
it('확장 항목 클릭 시 selectedNodeKind=extension 으로 설정한다', () => {
const extIteration = findComponent(layoutEditJson, (n) =>
Boolean(n.iteration?.source?.includes('extGroup.extensions'))
);
const clickAction = extIteration.actions.find((a: any) => a.type === 'click');
expect(JSON.stringify(clickAction)).toContain('"selectedNodeKind":"extension"');
expect(JSON.stringify(clickAction)).toContain('selectedExtensionId');
});
it('그룹 헤더 아이콘이 plugin/module 출처를 구분한다', () => {
// 오버라이드 행도 override_target 의 모듈/플러그인 그룹에 묶이므로
// 그룹 source_type 은 plugin / module 두 가지.
const groupIcon = findComponent(layoutEditJson, (n) =>
n.name === 'Icon' &&
typeof n.props?.name === 'string' &&
n.props.name.includes('extGroup.source_type')
);
expect(groupIcon).not.toBeNull();
expect(groupIcon.props.name).toContain("=== 'plugin'");
expect(groupIcon.props.name).toContain('fa-plug');
expect(groupIcon.props.name).toContain('fa-puzzle-piece');
});
it('오버라이드 확장 항목에 is_override 뱃지를 표시한다', () => {
// 템플릿 오버라이드 행은 출처 기준으로 묶이되, ext.is_override 로
// 오버라이드 상황을 별도 뱃지로 구분 표시한다.
const overrideBadge = findComponent(layoutEditJson, (n) =>
n.name === 'Span' &&
n.if === '{{ext.is_override}}' &&
typeof n.text === 'string' &&
n.text.includes('extension_override_badge')
);
expect(overrideBadge).not.toBeNull();
});
});
// ==============================
// 모바일 셀렉터 테스트
// ==============================
describe('모바일 파일 셀렉터', () => {
function findMobileSelector(): any {
const wrapper = findComponent(layoutEditJson, (n) => n.id === 'mobile_file_selector');
expect(wrapper).not.toBeNull();
return findComponent(wrapper, (n) => n.name === 'RichSelect');
}
it('모바일 셀렉터가 일반 레이아웃과 확장을 모두 옵션에 포함한다', () => {
// 데스크탑 트리(일반 + 확장 2섹션)와 동등하게, 모바일 RichSelect 도
// layout_files 와 layout_extensions 양쪽을 옵션으로 노출해야 한다.
const richSelect = findMobileSelector();
const options = richSelect.props.options;
expect(options).toContain('layout_files');
expect(options).toContain('layout_extensions');
// 확장 그룹 배열을 flatMap 으로 평탄화
expect(options).toContain('flatMap');
});
it('옵션 value 에 layout:/ext: 접두사로 종류를 인코딩한다', () => {
const richSelect = findMobileSelector();
const options = richSelect.props.options;
expect(options).toContain("'layout:'");
expect(options).toContain("'ext:'");
});
it('현재 선택 value 가 selectedNodeKind 에 따라 접두사를 부여한다', () => {
const richSelect = findMobileSelector();
expect(richSelect.props.value).toContain("selectedNodeKind === 'extension'");
expect(richSelect.props.value).toContain("'ext:'");
expect(richSelect.props.value).toContain("'layout:'");
});
it('change 액션이 conditions 로 확장/일반을 분기한다', () => {
const richSelect = findMobileSelector();
const changeAction = richSelect.actions.find((a: any) => a.type === 'change');
expect(changeAction.handler).toBe('conditions');
// 확장 분기: ext: 접두사 → selectedNodeKind=extension + current_extension refetch
const extBranch = changeAction.conditions.find(
(c: any) => typeof c.if === 'string' && c.if.includes("'ext:'")
);
expect(extBranch).toBeDefined();
const extJson = JSON.stringify(extBranch.then);
expect(extJson).toContain('"selectedNodeKind":"extension"');
expect(extJson).toContain('selectedExtensionId');
expect(extJson).toContain('current_extension');
expect(extJson).toContain('extension_versions');
// 일반 분기(default): selectedNodeKind=layout + current_layout refetch
const layoutBranch = changeAction.conditions.find((c: any) => c.if === undefined);
expect(layoutBranch).toBeDefined();
const layoutJson = JSON.stringify(layoutBranch.then);
expect(layoutJson).toContain('"selectedNodeKind":"layout"');
expect(layoutJson).toContain('selectedLayoutName');
expect(layoutJson).toContain('current_layout');
});
it('모바일 셀렉터 항목에 is_override 뱃지를 표시한다', () => {
const wrapper = findComponent(layoutEditJson, (n) => n.id === 'mobile_file_selector');
const overrideBadge = findComponent(wrapper, (n) =>
n.name === 'Span' &&
n.if === '{{item.is_override}}' &&
typeof n.text === 'string' &&
n.text.includes('extension_override_badge')
);
expect(overrideBadge).not.toBeNull();
});
});
// ==============================
// 확장 버전 히스토리 모달 구조 테스트
// ==============================
describe('확장 버전 히스토리 모달 구조', () => {
it('올바른 모달 ID와 구조를 가진다', () => {
expect(extensionVersionHistoryModalJson.id).toBe('extension_version_history_modal');
expect(extensionVersionHistoryModalJson.type).toBe('composite');
expect(extensionVersionHistoryModalJson.name).toBe('Modal');
});
it('extension_versions 를 반복 렌더링하는 iteration 영역이 있다', () => {
const iterationNode = findComponent(extensionVersionHistoryModalJson, (n) =>
Boolean(n.iteration?.source?.includes('extension_versions'))
);
expect(iterationNode).not.toBeNull();
expect(iterationNode.iteration.item_var).toBe('version');
});
it('복원 버튼이 확장 버전 restore 엔드포인트를 호출한다', () => {
const restoreButton = findComponent(extensionVersionHistoryModalJson, (n) =>
n.if === '{{idx !== 0}}' &&
n.name === 'Button' &&
Array.isArray(n.actions) &&
n.actions.some((a: any) => JSON.stringify(a).includes('/layout-extensions/'))
);
expect(restoreButton).not.toBeNull();
expect(JSON.stringify(restoreButton.actions)).toContain('/restore');
});
});
// ==============================
// 확장 미리보기 레이아웃 선택 모달 테스트
// ==============================
describe('확장 미리보기 레이아웃 선택 모달', () => {
it('올바른 모달 ID를 가진다', () => {
expect(extensionPreviewLayoutModalJson.id).toBe('extension_preview_layout_modal');
expect(extensionPreviewLayoutModalJson.name).toBe('Modal');
});
it('미리보기 버튼이 layout-extensions preview 엔드포인트를 preview_layout 과 함께 호출한다', () => {
const previewButton = findComponent(extensionPreviewLayoutModalJson, (n) =>
n.name === 'Button' &&
Array.isArray(n.actions) &&
n.actions.some((a: any) => a.handler === 'apiCall' && String(a.target).includes('/preview'))
);
expect(previewButton).not.toBeNull();
const apiCall = previewButton.actions.find((a: any) => a.handler === 'apiCall');
expect(JSON.stringify(apiCall.params.body)).toContain('preview_layout');
});
});
// ==============================
// modals 섹션 — 확장 모달 등록 테스트
// ==============================
describe('modals 섹션 — 확장 모달', () => {
it('확장 버전 히스토리 / 미리보기 레이아웃 선택 모달이 등록되어 있다', () => {
const partials = layoutEditJson.modals.map((m: any) => m.partial ?? '');
expect(partials.some((p: string) => p.includes('_modal_extension_version_history'))).toBe(true);
expect(partials.some((p: string) => p.includes('_modal_extension_preview_layout'))).toBe(true);
});
});
// ==============================
// kind 분기 — 확장 저장 버튼 테스트
// ==============================
describe('selectedNodeKind 분기', () => {
it('확장 저장 버튼이 layout-extensions PUT 엔드포인트를 호출한다', () => {
const extSaveButton = findComponent(layoutEditJson, (n) =>
n.name === 'Button' &&
typeof n.if === 'string' &&
n.if.includes("selectedNodeKind === 'extension'") &&
Array.isArray(n.actions) &&
JSON.stringify(n.actions).includes('/layout-extensions/') &&
JSON.stringify(n.actions).includes('"method":"PUT"')
);
expect(extSaveButton).not.toBeNull();
// 저장 성공 후 current_extension / layout_extensions 양쪽 refetch
expect(JSON.stringify(extSaveButton.actions)).toContain('current_extension');
expect(JSON.stringify(extSaveButton.actions)).toContain('layout_extensions');
});
});
// ==============================
// 코드 편집기 ?route= URL 동기화 테스트
// ==============================
describe('코드 편집기 ?route= URL 동기화', () => {
it('init_actions 가 query.route 로 selectedLayoutName 을 복원한다', () => {
const initActions = layoutEditJson.init_actions;
expect(Array.isArray(initActions)).toBe(true);
const routeInit = initActions.find(
(a: any) =>
a.handler === 'setState' &&
typeof a.if === 'string' &&
a.if.includes('query.route') &&
JSON.stringify(a.params ?? {}).includes('selectedLayoutName')
);
expect(routeInit).toBeDefined();
// layout_files 의 route_path 로 매칭 (별도 데이터소스 추가 없이 기존 API 보강분 사용)
expect(routeInit.if).toContain('route_path');
expect(JSON.stringify(routeInit.params)).toContain('route_path');
expect(routeInit.params.selectedNodeKind).toBe('layout');
});
it('데스크탑 파일 항목 클릭 시 replaceUrl 로 file.route_path 를 ?route= 에 반영한다', () => {
// 좌측 트리 레이아웃 파일 iteration (file_var) 의 click 시퀀스
const fileIteration = findComponent(layoutEditJson, (n) =>
Boolean(n.iteration?.source?.includes('layout_files')) &&
n.iteration?.item_var === 'file'
);
expect(fileIteration).not.toBeNull();
const clickAction = fileIteration.actions.find((a: any) => a.type === 'click');
const replaceUrl = clickAction.actions.find((a: any) => a.handler === 'replaceUrl');
expect(replaceUrl).toBeDefined();
expect(replaceUrl.params.query.route).toContain('file.route_path');
});
it('모바일 셀렉터 레이아웃 선택 시 replaceUrl 로 route_path 를 반영한다', () => {
const wrapper = findComponent(layoutEditJson, (n) => n.id === 'mobile_file_selector');
const richSelect = findComponent(wrapper, (n) => n.name === 'RichSelect');
const changeAction = richSelect.actions.find((a: any) => a.type === 'change');
const layoutBranch = changeAction.conditions.find((c: any) => c.if === undefined);
const replaceUrl = layoutBranch.then.find((a: any) => a.handler === 'replaceUrl');
expect(replaceUrl).toBeDefined();
expect(replaceUrl.params.query.route).toContain('route_path');
});
it('확장 선택 시 replaceUrl 로 ?route= 를 비운다 (확장은 라우트 없음)', () => {
const extIteration = findComponent(layoutEditJson, (n) =>
Boolean(n.iteration?.source?.includes('extGroup.extensions'))
);
const clickAction = extIteration.actions.find((a: any) => a.type === 'click');
const replaceUrl = clickAction.actions.find((a: any) => a.handler === 'replaceUrl');
expect(replaceUrl).toBeDefined();
expect(replaceUrl.params.query.route).toBe('');
});
});
@@ -569,7 +569,7 @@ describe('템플릿 업데이트 - 업데이트 모달', () => {
name: 'Modal',
props: {
title: '$t:admin.templates.modals.update_title',
size: 'small',
size: 'sm',
},
children: [
{
@@ -864,9 +864,9 @@ describe('템플릿 업데이트 - 업데이트 모달', () => {
expect(state._global.modifiedLayoutsCount).toBe(0);
});
it('모달 크기가 small로 설정되어 있다', () => {
it('모달 크기가 sm 으로 설정되어 있다', () => {
const modal = updateModalLayout.modals[0];
expect(modal.props.size).toBe('small');
expect(modal.props.size).toBe('sm');
});
});
@@ -94,7 +94,8 @@ describe('사용자 삭제 모달 레이아웃 테스트', () => {
);
expect(spinnerIcon).toBeDefined();
expect(spinnerIcon.if).toBe('{{_global.isDeleting}}');
expect(spinnerIcon.props.className).toContain('animate-spin');
// .spinner-sm 시맨틱 자산이 w-4 h-4 + animate-spin 흡수 (#408)
expect(spinnerIcon.props.className).toContain('spinner-sm');
// 텍스트 삼항 연산자
const textSpan = deleteButton.children.find((c: any) => c.name === 'Span');
@@ -111,7 +112,7 @@ describe('사용자 삭제 모달 레이아웃 테스트', () => {
const footerDiv = deleteModal.children[deleteModal.children.length - 1];
const deleteButton = footerDiv.children[1];
expect(deleteButton.props.className).toContain('flex items-center gap-2');
expect(deleteButton.props.className).toContain('flex-center gap-2');
expect(deleteButton.props.className).toContain('disabled:opacity-50');
expect(deleteButton.props.className).toContain('disabled:cursor-not-allowed');
});
@@ -184,15 +185,17 @@ describe('사용자 삭제 모달 레이아웃 테스트', () => {
});
describe('삭제 버튼 스타일 규정 준수', () => {
it('취소 버튼에 disabled:opacity-50 disabled:cursor-not-allowed가 있어야 한다', () => {
it('취소 버튼이 .btn .btn-secondary 표준 시맨틱으로 정렬되어 있다 (.btn 안에 disabled 시각 처리 포함)', () => {
const layout = require('../../layouts/admin_user_list.json');
const modals = layout.modals;
const deleteModal = modals.find((m: any) => m.id === 'delete_confirm_modal');
const footerDiv = deleteModal.children[deleteModal.children.length - 1];
const cancelButton = footerDiv.children[0];
expect(cancelButton.props.className).toContain('disabled:opacity-50');
expect(cancelButton.props.className).toContain('disabled:cursor-not-allowed');
// .btn CSS 시맨틱이 disabled:opacity-50 disabled:cursor-not-allowed 를 흡수.
// 호출처는 시맨틱 클래스만 명시하면 disabled 시각 처리가 자동 적용된다.
expect(cancelButton.props.className).toContain('btn');
expect(cancelButton.props.className).toContain('btn-secondary');
});
it('삭제 버튼은 bg-red-600 스타일이어야 한다 (위험 작업)', () => {
@@ -0,0 +1,72 @@
/**
* @file admin-user-list-bulk-status-i18n.test.tsx
* @description 회원 목록 일괄 작업 바 "상태 변경" 라벨 i18n 키화 검증 (공개#45)
*
* 테스트 대상:
* - templates/.../layouts/admin_user_list.json (status_change_label Span)
*
* 검증 항목:
* - 하드코딩된 "상태 변경" 문자열이 레이아웃에 남아 있지 않음
* - status_change_label 노드가 $t:admin.users.bulk_status_change 키를 사용
* - ko/en partial 에 bulk_status_change 키가 정의됨 (미해석 키 0)
* - TranslationEngine 이 키를 ko/en 으로 해석
*/
import { describe, it, expect } from 'vitest';
import { TranslationEngine } from '@core/template-engine/TranslationEngine';
import userListLayout from '../../layouts/admin_user_list.json';
import adminKo from '../../lang/partial/ko/admin.json';
import adminEn from '../../lang/partial/en/admin.json';
/** 레이아웃 트리에서 id 로 노드를 찾습니다. */
function findById(node: unknown, id: string): any {
if (!node || typeof node !== 'object') return undefined;
const value = node as { id?: string; [key: string]: unknown };
if (value.id === id) return value;
for (const child of Object.values(value)) {
if (Array.isArray(child)) {
for (const item of child) {
const found = findById(item, id);
if (found) return found;
}
continue;
}
const found = findById(child, id);
if (found) return found;
}
return undefined;
}
describe('회원 목록 일괄 작업 "상태 변경" 라벨 i18n (공개#45)', () => {
it('레이아웃에 하드코딩된 "상태 변경" 문자열이 남아 있지 않아야 한다', () => {
const layoutStr = JSON.stringify(userListLayout);
expect(layoutStr).not.toContain('"text":"상태 변경"');
expect(layoutStr).not.toContain('"text": "상태 변경"');
});
it('status_change_label 노드가 $t:admin.users.bulk_status_change 키를 사용해야 한다', () => {
const node = findById(userListLayout, 'status_change_label');
expect(node).toBeDefined();
expect(node.text).toBe('$t:admin.users.bulk_status_change');
});
it('ko/en partial 에 users.bulk_status_change 키가 정의되어야 한다', () => {
expect((adminKo as any).users.bulk_status_change).toBe('상태 변경');
expect((adminEn as any).users.bulk_status_change).toBe('Status Change');
});
it('TranslationEngine 이 키를 ko/en 으로 해석해야 한다', () => {
const engine = TranslationEngine.getInstance();
const templateId = 'sirsoft-admin_basic';
(engine as any).translations.set(`${templateId}:ko`, { admin: adminKo });
(engine as any).translations.set(`${templateId}:en`, { admin: adminEn });
expect(
engine.translate('admin.users.bulk_status_change', { templateId, locale: 'ko' }),
).toBe('상태 변경');
expect(
engine.translate('admin.users.bulk_status_change', { templateId, locale: 'en' }),
).toBe('Status Change');
});
});
@@ -274,7 +274,16 @@ const translations = {
update_guide_title: '업데이트 방법',
update_guide_warning: '서버 터미널에서 실행하세요.',
update_guide_desc: '아래 명령어를 실행하여 업데이트합니다.',
update_guide_cmd_comment: '# 관리자 권한으로 실행 권장 (Linux/macOS)',
update_guide_cmd: '$ sudo php artisan core:update',
update_guide_note: '업데이트 전 백업을 권장합니다.',
upgrade_guide_link_desc: '자세한 절차는 업그레이드 가이드를 확인하세요.',
upgrade_guide_link_label: '업그레이드 가이드',
manual_update_title: '수동 업데이트',
manual_update_desc: '압축 해제한 코어 파일을 직접 지정할 수 있습니다.',
manual_update_step1: '# 업데이트 패키지 압축 해제',
manual_update_step2: '# 경로를 지정해 업데이트',
manual_update_cmd: '$ sudo php artisan core:update --source=/path/to/extracted',
},
},
},
@@ -567,15 +576,15 @@ describe('코어 업데이트 레이아웃 JSON 구조', () => {
it('터미널 명령어 표시 영역이 있다', () => {
const commandText = findInTree(modal.children, (n: any) =>
n.text === '$ php artisan core:update'
n.text === '$t:admin.settings.info.update_guide_cmd'
);
expect(commandText).toBeDefined();
expect(commandText.props.className).toContain('font-mono');
});
it('노란색 경고 배경이 있다', () => {
it('경고 시맨틱 자산(alert-warning)이 있다 (#408)', () => {
const warningDiv = findInTree(modal.children, (n: any) =>
n.props?.className?.includes('bg-yellow-50')
n.props?.className?.includes('alert-warning')
);
expect(warningDiv).toBeDefined();
});
@@ -807,7 +816,7 @@ describe('코어 업데이트 레이아웃 렌더링', () => {
await testUtils.render();
expect(screen.getByText('서버 터미널에서 실행하세요.')).toBeInTheDocument();
expect(screen.getByText('$ php artisan core:update')).toBeInTheDocument();
expect(screen.getByText('$ sudo php artisan core:update')).toBeInTheDocument();
expect(screen.getByTestId('icon-triangle-exclamation')).toBeInTheDocument();
testUtils.cleanup();
@@ -0,0 +1,238 @@
/**
* @file editor-spec-default-node.test.tsx
* @description 레이아웃 편집기 팔레트 defaultNode 공통 디자인 className 회귀 테스트 (sirsoft-admin_basic)
*
* 배경:
* 팔레트에서 컴포넌트를 추가하면 editor-spec.json 의
* componentPalette.entries[name].defaultNode 가 깊은 복사되어 레이아웃 트리에 삽입된다.
* 본 작업에서 각 defaultNode.props.className 을 이 admin 템플릿 운영 레이아웃의 대표
* Tailwind 패턴으로 채우고, 일부 prop 키 불일치 결함(HtmlContent html→content,
* DataGrid columns key/label→field/header, rows→data)을 정정했다.
*
* 본 테스트는:
* 1. defaultNode 가 공통 디자인 className 을 보유함을 JSON 정합성으로 검증
* 2. Button defaultNode 가 variant/size 를 더 이상 사용하지 않고 className 만 씀을 검증
* 3. prop 키 정정(HtmlContent / DataGrid)이 회귀로 되돌아가지 않음을 검증
* 4. A단계 신규 entries(Form/Table/Accordion 등 22개) 등록 + composite 샘플 props 유지
* 5. defaultNode 를 실제 레이아웃으로 렌더했을 때 className 이 DOM 에 적용됨을 검증
*/
import { describe, it, expect } from 'vitest';
import {
createLayoutTest,
createMockComponentRegistryWithBasics,
} from '@core/template-engine/__tests__/utils/layoutTestUtils';
// editor-spec 블록 분할(ce21ab9da) 이후 root editor-spec.json 은 $include 참조만 가지므로
// componentPalette 블록을 분할 파일에서 직접 import 한다(root 스텁엔 .entries 가 없음).
import componentPalette from '../../editor-spec/componentPalette.json';
type DefaultNode = {
type?: string;
name?: string;
props?: Record<string, any>;
text?: string;
children?: DefaultNode[];
};
const entries: Record<string, { defaultNode?: DefaultNode }> = (componentPalette as any)
.entries;
function wrapAsLayout(node: DefaultNode) {
return {
name: 'editor-default-node-probe',
components: [
{
...node,
id: 'probe',
},
],
};
}
describe('sirsoft-admin_basic editor-spec defaultNode 공통 디자인', () => {
describe('JSON 정합성 — defaultNode className 보유', () => {
const designBearingBasics = [
'Button',
'Input',
'Textarea',
'Select',
'Checkbox',
'Label',
'H1',
'H2',
'H3',
'H4',
'P',
'A',
'Code',
'Pre',
'Hr',
'Ul',
'Ol',
'Nav',
'Flex',
'Grid',
'Section',
];
it.each(designBearingBasics)('%s defaultNode 가 비어있지 않은 className 을 보유한다', (name) => {
const node = entries[name]?.defaultNode;
expect(node, `${name} entry 가 존재해야 함`).toBeDefined();
const className = node?.props?.className;
expect(typeof className).toBe('string');
expect((className as string).trim().length).toBeGreaterThan(0);
});
it('className 토큰이 admin 디자인 시스템 토큰을 반영한다', () => {
const button = entries.Button?.defaultNode?.props?.className as string;
expect(button).toContain('rounded-lg');
expect(button).toContain('bg-blue-600');
// Input 은 폼 CRUD 표준 유틸 클래스 "input" 사용
expect(entries.Input?.defaultNode?.props?.className).toBe('input');
});
});
describe('Button — variant/size 제거, className 만 사용', () => {
it('Button defaultNode 가 variant/size props 를 사용하지 않는다', () => {
const props = entries.Button?.defaultNode?.props ?? {};
expect(props.variant).toBeUndefined();
expect(props.size).toBeUndefined();
expect(typeof props.className).toBe('string');
expect(props.type).toBe('button');
});
});
describe('prop 키 정정 — 회귀 차단', () => {
it('HtmlContent 가 composite + content/isHtml 키를 사용한다 (html 키 미사용)', () => {
const node = entries.HtmlContent?.defaultNode;
expect(node?.type).toBe('composite');
expect(node?.props?.content).toBeTruthy();
expect(node?.props?.isHtml).toBe(false);
expect(node?.props?.html).toBeUndefined();
});
it('DataGrid 가 columns[].{field,header} + data 키를 사용한다 (key/label/rows 미사용)', () => {
const node = entries.DataGrid?.defaultNode;
expect(node?.type).toBe('composite');
expect(Array.isArray(node?.props?.data)).toBe(true);
expect(node?.props?.rows).toBeUndefined();
const cols = node?.props?.columns ?? [];
expect(cols.length).toBeGreaterThan(0);
for (const col of cols) {
expect(col.field).toBeTruthy();
expect(col.header).toBeTruthy();
expect(col.key).toBeUndefined();
expect(col.label).toBeUndefined();
}
});
});
describe('A단계 신규 entries — 22개 전체 등록', () => {
const newEntries = [
'Form',
'Table',
'Accordion',
'IconButton',
'Dropdown',
'ActionMenu',
'TagInput',
'SearchableDropdown',
'RichSelect',
'TagSelect',
'IconSelect',
'ChipCheckbox',
'MultilingualInput',
'MultilingualTagInput',
'LanguageSelector',
'PermissionTree',
'CategoryTree',
'ExtensionBadge',
'UserProfile',
'FilterGroup',
'SortableMenuList',
'DynamicFieldList',
];
it.each(newEntries)('%s entry 가 defaultNode 와 함께 등록되어 있다', (name) => {
const node = entries[name]?.defaultNode;
expect(node, `${name} entry 가 존재해야 함`).toBeDefined();
expect(node?.name).toBe(name);
});
it('Form defaultNode 가 admin 폼 표준(FormField + Button)을 동반하고 FormField 가 Input 을 내포한다', () => {
const node = entries.Form?.defaultNode;
expect(node?.props?.className).toBeTruthy();
const childNames = (node?.children ?? []).map((c) => c.name);
expect(childNames).toEqual(expect.arrayContaining(['FormField', 'Button']));
const formField = (node?.children ?? []).find((c) => c.name === 'FormField');
const innerNames = (formField?.children ?? []).map((c) => c.name);
expect(innerNames).toContain('Input');
});
it('Table defaultNode 가 table className 을 보유한다', () => {
const node = entries.Table?.defaultNode;
expect(node?.props?.className).toContain('w-full');
});
});
describe('실제 렌더링 — defaultNode className 이 DOM 에 적용됨', () => {
const renderCases: Array<[string, string]> = [
['Button', 'bg-blue-600'],
['Input', 'input'],
['Label', 'font-medium'],
['H1', 'font-semibold'],
];
it.each(renderCases)('%s defaultNode 렌더 시 className "%s" 가 DOM 에 반영된다', async (name, token) => {
const node = entries[name]?.defaultNode as DefaultNode;
const registry = createMockComponentRegistryWithBasics();
const t = createLayoutTest(wrapAsLayout(node), {
templateId: 'sirsoft-admin_basic',
componentRegistry: registry,
locale: 'ko',
});
const { container } = await t.render();
const el = container.querySelector(`.${CSS.escape(token)}`);
expect(el, `${name} 의 "${token}" className 요소가 렌더되어야 함`).not.toBeNull();
t.cleanup();
});
});
// defaultNode prop shape 결함 회귀 가드.
// 라이브 검증에서 발견한 defaultNode↔컴포넌트 shape 불일치 결함들이 되돌아가지 않게 한다.
describe('defaultNode prop shape 정합', () => {
it('BarChart defaultNode 는 labels + datasets 를 시드한다(data shape 아님)', () => {
const props = entries.BarChart?.defaultNode?.props ?? {};
// 과거 결함: data:[{label,value}] → datasets.map 크래시. 컴포넌트는 labels+datasets 를 읽음.
expect(Array.isArray(props.labels)).toBe(true);
expect(Array.isArray(props.datasets)).toBe(true);
expect(props.data).toBeUndefined();
});
it('DonutChart defaultNode 는 data 항목이 name+color 를 가진다', () => {
const props = entries.DonutChart?.defaultNode?.props ?? {};
expect(Array.isArray(props.data)).toBe(true);
// 과거 결함: {label,value} → 컴포넌트는 item.name/item.color 를 읽어 undefined 라벨/색.
for (const item of props.data) {
expect(item).toHaveProperty('name');
expect(item).toHaveProperty('color');
}
});
it('ExtensionBadge defaultNode type 은 유효 값(module|plugin)이다', () => {
const props = entries.ExtensionBadge?.defaultNode?.props ?? {};
// 과거 결함: type:"core" → ExtensionType 미정의 → typeLabels[type]=undefined 렌더.
expect(['module', 'plugin']).toContain(props.type);
});
it('SortableMenuList / CategoryTree defaultNode 는 가시 시드 데이터를 가진다', () => {
const sml = entries.SortableMenuList?.defaultNode?.props ?? {};
const cat = entries.CategoryTree?.defaultNode?.props ?? {};
// 빈 데이터 → 0×0 비가시(편집기 선택 불가) 방지로 샘플 항목 시드.
expect(Array.isArray(sml.items) && sml.items.length).toBeGreaterThan(0);
expect(Array.isArray(cat.data) && cat.data.length).toBeGreaterThan(0);
});
});
});
@@ -116,26 +116,22 @@ describe('본인인증 공통 모달 (sirsoft-admin_basic) — engine-v1.46.0',
});
});
describe('Extension Point 슬롯', () => {
describe('Extension Point 슬롯 (C안 — provider 단일 슬롯 + 코어 OTP 인라인)', () => {
const slots: Node[] = [];
walk(identityModal as unknown as Node, (n) => {
if (n.type === 'extension_point') slots.push(n);
});
it('render_hint:text_code 슬롯 존재', () => {
const slot = slots.find((s) => s.name === 'identity_provider_ui:text_code');
expect(slot).toBeDefined();
expect(Array.isArray(slot!.default)).toBe(true);
it('provider 슬롯 1개만 존재 (외부 plugin append 전용)', () => {
const providerSlots = slots.filter((s) => s.name === 'identity_provider_ui:provider');
expect(providerSlots).toHaveLength(1);
});
it('render_hint:link 슬롯 존재', () => {
const slot = slots.find((s) => s.name === 'identity_provider_ui:link');
expect(slot).toBeDefined();
});
it('provider 별 슬롯 존재', () => {
const slot = slots.find((s) => s.name === 'identity_provider_ui:provider');
expect(slot).toBeDefined();
it('코어 OTP UI 는 슬롯이 아닌 인라인 Div 로 정의되어 mail/null provider 시 노출', () => {
const otherSlots = slots.filter(
(s) => s.name !== 'identity_provider_ui:provider',
);
expect(otherSlots).toHaveLength(0);
});
});
@@ -716,6 +716,41 @@
}
}
},
{
"name": "UnifiedIcon",
"type": "basic",
"description": "통합 아이콘 컴포넌트 (Font Awesome, SVG, 이미지 지원)",
"path": "src/components/basic/UnifiedIcon.tsx",
"props": {
"icon": {
"type": "string",
"required": true,
"description": "아이콘 지정자 (fa:name | svg:path | img:path | name)"
},
"size": {
"type": "string",
"required": false,
"default": "md",
"description": "크기 (xs | sm | md | lg | xl)"
},
"className": {
"type": "string",
"required": false,
"default": "",
"description": "추가 CSS 클래스"
},
"color": {
"type": "string",
"required": false,
"description": "색상 (Tailwind 클래스)"
},
"ariaLabel": {
"type": "string",
"required": false,
"description": "접근성 레이블"
}
}
},
{
"name": "Code",
"type": "basic",
@@ -1687,13 +1722,13 @@
"type": "string",
"required": false,
"default": "primary",
"description": "버튼 변형 (primary | secondary | danger | ghost)"
"description": "버튼 변형 (primary | secondary | danger | ghost | outline). outline 은 배경 없이 테두리만 있는 정사각 아이콘 버튼 (페이지 헤더 refresh 등)에 사용"
},
"size": {
"type": "string",
"required": false,
"default": "md",
"description": "버튼 크기 (sm | md | lg)"
"description": "버튼 크기 (sm | md | lg). label 미지정 시 정사각 고정 크기 (sm=w-8 h-8, md=w-10 h-10, lg=w-12 h-12)"
},
"disabled": {
"type": "boolean",
@@ -2212,6 +2247,40 @@
}
}
},
{
"name": "SectionHeader",
"type": "composite",
"description": "Lightweight section header — title (좌측) + actions children (우측) 균형 배치. PageHeader 와 달리 페이지 단위가 아닌 카드/탭/폼 그룹 안의 섹션 머리 부분 표준화.",
"path": "src/components/composite/SectionHeader.tsx",
"props": {
"title": {
"type": "string",
"required": false,
"description": "섹션 제목"
},
"description": {
"type": "string",
"required": false,
"description": "섹션 보조 설명 (제목 아래 작은 회색 텍스트)"
},
"className": {
"type": "string",
"required": false,
"default": "",
"description": "사용자 정의 클래스 (mb-4 등 외부 간격 토큰 추가용)"
},
"style": {
"type": "CSSProperties",
"required": false,
"description": "인라인 스타일"
},
"children": {
"type": "ReactNode",
"required": false,
"description": "우측 액션 자식 (Button / IconButton 등)"
}
}
},
{
"name": "TemplateCard",
"type": "composite",
@@ -2521,6 +2590,95 @@
}
}
},
{
"name": "BarChart",
"type": "composite",
"description": "Chart.js 기반 바 차트 컴포넌트",
"path": "src/components/composite/BarChart.tsx",
"props": {
"labels": {
"type": "array",
"required": true,
"description": "X축 라벨 배열"
},
"datasets": {
"type": "array",
"required": true,
"description": "데이터셋 배열 [{ label, data, backgroundColor, borderRadius }]"
},
"height": {
"type": "number",
"required": false,
"default": 200,
"description": "차트 높이 (px)"
},
"showLegend": {
"type": "boolean",
"required": false,
"default": false,
"description": "범례 표시 여부"
},
"showGrid": {
"type": "boolean",
"required": false,
"default": false,
"description": "그리드 표시 여부"
},
"className": {
"type": "string",
"required": false,
"default": "",
"description": "추가 CSS 클래스"
}
}
},
{
"name": "DonutChart",
"type": "composite",
"description": "Chart.js 기반 도넛 차트 컴포넌트",
"path": "src/components/composite/DonutChart.tsx",
"props": {
"data": {
"type": "array",
"required": true,
"description": "데이터 배열 [{ name, value, color }]"
},
"centerLabel": {
"type": "string",
"required": false,
"description": "중앙 라벨 (예: April 2025)"
},
"centerValue": {
"type": "string",
"required": false,
"description": "중앙 값 (예: $14,582.94)"
},
"size": {
"type": "number",
"required": false,
"default": 200,
"description": "차트 크기 (px)"
},
"cutout": {
"type": "string",
"required": false,
"default": "70%",
"description": "도넛 두께 비율"
},
"showLegend": {
"type": "boolean",
"required": false,
"default": false,
"description": "범례 표시 여부"
},
"className": {
"type": "string",
"required": false,
"default": "",
"description": "추가 CSS 클래스"
}
}
},
{
"name": "LayoutEditorHeader",
"type": "composite",
@@ -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.2.2 | 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-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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:"Pretendard", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", 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-greeLine truncated
@@ -1,41 +1,19 @@
var SirsoftAdminBasic=(function(Q,c,b,ar){"use strict";function eg(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=eg(b),tg=()=>window.G7Core,re=b.forwardRef(({children:e,variant:t="primary",size:n="md",className:a="",...r},o)=>{const s="inline-flex items-center justify-center",i=tg()?.style?.mergeClasses?.(s,a)??`${s} ${a}`;return c.jsx("button",{ref:o,className:i,...r,children:e})});re.displayName="Button";const Hi=b.forwardRef(({accept:e,maxSize:t,onChange:n,onError:a,buttonText:r="Browse",placeholder:o="No file selected",className:s="",disabled:i,...l},g)=>{const d=b.useRef(null),u=g||d,[f,h]=b.useState(""),v=b.useCallback(()=>{!i&&u.current&&u.current.click()},[i,u]),p=b.useCallback(m=>{const T=m.target.files?.[0]||null;if(!T){h(""),n?.({target:{value:null,name:""}});return}if(t&&T.size>t*1024*1024){const C=`File size exceeds ${t}MB limit`;a?.(C),u.current&&(u.current.value=""),h("");return}h(T.name),n?.({target:{value:T,name:T.name}})},[t,n,a,u]),x=b.useCallback(m=>{m.stopPropagation(),u.current&&(u.current.value=""),h(""),n?.({target:{value:null,name:""}})},[n,u]);return c.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[c.jsx("input",{ref:u,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"})})})]})});Hi.displayName="FileInput";const ft=b.forwardRef(({label:e,error:t,className:n="",onChange:a,onKeyPress:r,value:o,defaultValue:s,type:i="text",checked:l,defaultChecked:g,...d},u)=>{const f=i==="radio"||i==="checkbox",h=b.useRef(!1),v=b.useRef(null);b.useImperativeHandle(u,()=>v.current);const[p,x]=b.useState(o??s??"");b.useEffect(()=>{if(!f&&!h.current&&o!==void 0){if(v.current&&document.activeElement===v.current)return;x(o)}},[o,f]);const m=b.useCallback(()=>{h.current=!0},[]),T=b.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=b.useCallback(w=>{const A=w.target.value;x(A),!h.current&&a&&a(w)},[a]),S=b.useCallback(w=>{h.current||r&&r(w)},[r]),{loadingactions:N,formdata:E,...k}=d;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:m,onCompositionEnd:T,...y,...k})});ft.displayName="Input";const vr=({label:e,error:t,className:n="",onChange:a,value:r,defaultValue:o,...s})=>{const i=b.useRef(!1),l=b.useRef(null),[g,d]=b.useState(r??o??"");b.useEffect(()=>{!i.current&&r!==void 0&&d(r)},[r]);const u=b.useCallback(()=>{i.current=!0},[]),f=b.useCallback(T=>{if(i.current=!1,a){const C=T.target.value;d(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=b.useCallback(T=>{const C=T.target.value;d(C),!i.current&&a&&a(T)},[a]),{loadingactions:v,formdata:p,...x}=s,m=r!==void 0?{value:g}:{defaultValue:o};return c.jsx("textarea",{ref:l,className:n,onChange:h,onCompositionStart:u,onCompositionEnd:f,...m,...x})},Ft=({children:e,className:t="",...n})=>c.jsx("label",{className:t,...n,children:e}),_=b.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}),ut=({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}),Ao=({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}),ji=({children:e,className:t="",...n})=>c.jsx("h4",{className:t,...Line truncated
var SirsoftAdminBasic=(function(R,h,v,Nn){"use strict";var _T=Object.defineProperty;var ET=(R,h,v)=>h in R?_T(R,h,{enumerable:!0,configurable:!0,writable:!0,value:v}):R[h]=v;var $e=(R,h,v)=>ET(R,typeof h!="symbol"?h+"":h,v);var Na,cr;function Xm(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=Xm(v),Km=()=>window.G7Core,oe=v.forwardRef(({children:t,variant:e="primary",size:n="md",className:r="",...s},o)=>{const i="button",a=Km()?.style?.mergeClasses?.(i,r)??`${i} ${r}`;return h.jsx("button",{ref:o,className:a,...s,children:t})});oe.displayName="Button";const Sd=v.forwardRef(({accept:t,maxSize:e,onChange:n,onError:r,buttonText:s="Browse",placeholder:o="No file selected",className:i="",disabled:a,...l},c)=>{const d=v.useRef(null),u=c||d,[f,g]=v.useState(""),m={},p={};Object.entries(l).forEach(([x,E])=>{x.startsWith("data-editor-")||x==="id"||x==="onMouseMove"||x==="onMouseLeave"?m[x]=E:p[x]=E});const y=v.useCallback(()=>{!a&&u.current&&u.current.click()},[a,u]),b=v.useCallback(x=>{const E=x.target.files?.[0]||null;if(!E){g(""),n?.({target:{value:null,name:""}});return}if(e&&E.size>e*1024*1024){const k=`File size exceeds ${e}MB limit`;r?.(k),u.current&&(u.current.value=""),g("");return}g(E.name),n?.({target:{value:E,name:E.name}})},[e,n,r,u]),S=v.useCallback(x=>{x.stopPropagation(),u.current&&(u.current.value=""),g(""),n?.({target:{value:null,name:""}})},[n,u]);return h.jsxs("div",{className:`flex items-center gap-2 ${i}`,...m,children:[h.jsx("input",{ref:u,type:"file",accept:t,onChange:b,disabled:a,className:"hidden",...p}),h.jsx("button",{type:"button",onClick:y,disabled:a,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:s}),h.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!a&&h.jsx("button",{type:"button",onClick:S,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Sd.displayName="FileInput";const qm=t=>t==="checkbox"?"checkbox":t==="radio"?"radio":"input",Zm=(t,e)=>{const n=qm(t);return e?e.split(/\s+/).filter(Boolean).includes(n)?e:`${n} ${e}`:n},wt=v.forwardRef(({label:t,error:e,className:n="",onChange:r,onKeyPress:s,value:o,defaultValue:i,type:a="text",checked:l,defaultChecked:c,...d},u)=>{const f=a==="radio"||a==="checkbox",g=Zm(a,n),m=v.useRef(!1),p=v.useRef(null);v.useImperativeHandle(u,()=>p.current);const[y,b]=v.useState(o??i??"");v.useEffect(()=>{if(!f&&!m.current&&o!==void 0){if(p.current&&document.activeElement===p.current)return;b(o)}},[o,f]);const S=v.useCallback(()=>{m.current=!0},[]),x=v.useCallback(M=>{if(m.current=!1,r){const O=M.target.value;b(O);const L=new Event("change",{bubbles:!0});Object.defineProperty(L,"target",{writable:!1,value:{value:O}}),Object.defineProperty(L,"currentTarget",{writable:!1,value:{value:O}}),r(L)}},[r]),E=v.useCallback(M=>{const O=M.target.value;b(O),!m.current&&r&&r(M)},[r]),k=v.useCallback(M=>{m.current||s&&s(M)},[s]),{loadingactions:C,formdata:N,..._}=d;if(f)return h.jsx("input",{ref:p,type:a,className:g,onChange:r,checked:l,defaultChecked:c,value:o,..._});const w=o!==void 0?{value:y}:{defaultValue:i};return h.jsx("input",{ref:p,type:a,className:g,onChange:E,onKeyPress:k,onCompositionStart:S,onCompositionEnd:x,...w,..._})});wt.displayName="Input";const qn=({label:t,error:e,className:n="",onChange:r,value:s,defaultValue:o,...i})=>{const a=v.useRef(!1),l=v.useRef(null),[c,d]=v.useState(s??o??"");v.useEffect(()=>{!a.current&&s!==void 0&&d(s)},[s]);const u=v.useCallback(()=>{a.current=!0},[]),f=v.useCallback(E=>{if(a.current=!1,r){const k=E.target.value;d(k);const C=new Event("change",{bubbles:!0});Object.defineProperty(C,"target",{writable:!1,value:{value:k}}),Object.defineProperty(C,"currentTarget",{writable:!1,value:{value:k}}),r(C)}},[r]),g=v.useCallback(E=>{const k=E.target.value;d(k),!a.current&&r&&r(E)},[r]),{loadingactions:m,formdata:p,...y}=i,b=s!==void 0?{value:c}:{defaultValue:o},x=(n??"").split(/\s+/).filter(Boolean).includes("textarea")?n??"":["textarea",n].filter(Boolean).join(" ");return h.jsx("textarea",{ref:l,className:x,onChange:g,onCompositionStart:u,onCompositionEnd:f,...b,...y})},en=({children:t,className:e="",...n})=>h.jsx("label",{className:e,...n,children:t}),I=v.forwardRef(({children:t,className:e="",...n},r)=>h.jsx("div",{ref:r,classNameLine 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(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:()=>O(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:d,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,d,n,I,m,O,$,p]),G=b.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(_,{children:n==="textarea"?c.jsx(vr,{name:`${f}[${V}]`,value:C[V]||"",onChange:ee=>L(V,ee.target.value),placeholder:ae,required:i&&V===m,disabled:l,maxLength:g,rows:d,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===m,disabled:l,maxLength:g,className:R})},V)},[f,C,L,s,i,l,g,d,n,m,I]),j=()=>c.jsx(_,{className:u,children:c.jsx(_,{className:"space-y-4",children:k.map((V,Y)=>z(V,Y===0))})}),W=()=>c.jsxs(_,{className:u,children:[c.jsxs(_,{className:"flex items-center gap-2 mb-3",children:[k.map(V=>c.jsxs(re,{type:"button",className:`
${he?"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:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),H(X),he&&h.jsx(Q,{className:"text-red-500 dark:text-red-400",children:"*"}),!he&&h.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>V(X),disabled:l,children:h.jsx(re,{name:"xmark",className:"w-3 h-3"})})]}),he&&Z&&j()]}),n==="textarea"?h.jsx(qn,{name:`${f}[${X}]`,value:k[X]||"",onChange:ce=>A(X,ce.target.value),placeholder:J,required:a&&he,disabled:l,maxLength:c,rows:d,className:`${ne} resize-vertical`}):h.jsx(wt,{type:"text",name:`${f}[${X}]`,value:k[X]||"",onChange:ce=>A(X,ce.target.value),placeholder:J,required:a&&he,disabled:l,maxLength:c,className:ee})]},X)},[f,k,A,i,a,l,c,d,n,H,x,V,j,b]),B=v.useCallback(X=>{const Z=b?"input input-error":"input",ee=b?"textarea input-error":"textarea",ne=`${i}${i?" (":""}${H(X)}${i?")":""}`;return h.jsx(I,{children:n==="textarea"?h.jsx(qn,{name:`${f}[${X}]`,value:k[X]||"",onChange:he=>A(X,he.target.value),placeholder:ne,required:a&&X===x,disabled:l,maxLength:c,rows:d,className:`${ee} resize-vertical`}):h.jsx(wt,{type:"text",name:`${f}[${X}]`,value:k[X]||"",onChange:he=>A(X,he.target.value),placeholder:ne,required:a&&X===x,disabled:l,maxLength:c,className:Z})},X)},[f,k,A,i,a,l,c,d,n,x,H,b]),G=()=>h.jsx(I,{className:u,children:h.jsx(I,{className:"space-y-4",children:w.map((X,Z)=>U(X,Z===0))})}),z=()=>h.jsxs(I,{className:u,children:[h.jsxs(I,{className:"flex items-center gap-2 mb-3",children:[w.map(X=>h.jsxs(oe,{type:"button",className:`
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
${w===V?V===m?"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===m?"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===m&&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!==m&&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(),O(V)},disabled:l,children:c.jsx(ne,{name:"xmark",className:"w-3 h-3"})})]},V)),$()]}),k.map(V=>c.jsx(_,{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(_,{className:u,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:`
${O===X?X===x?"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":X===x?"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:()=>L(X),children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),g?h.jsxs(h.Fragment,{children:[h.jsx(Q,{className:"hidden md:inline",children:H(X)}),h.jsx(Q,{className:"inline md:hidden",children:X.toUpperCase()})]}):H(X),X===x&&h.jsx(Q,{className:"text-red-500 dark:text-red-400",children:"*"}),W(X)&&O!==X&&h.jsx(re,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),X!==x&&h.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:Z=>{Z.stopPropagation(),V(X)},disabled:l,children:h.jsx(re,{name:"xmark",className:"w-3 h-3"})})]},X)),j()]}),w.map(X=>h.jsx(I,{className:O===X?"block":"hidden",children:B(X)},X))]}),K=()=>{const X=b?"input input-error":"input",Z=b?"textarea input-error":"textarea";return h.jsx(I,{className:u,children:h.jsxs(I,{className:"flex items-center gap-1",children:[h.jsx(I,{className:"flex items-center shrink-0",children:w.map(ee=>h.jsxs(oe,{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===m&&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===m,disabled:l,maxLength:g,rows:d,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===m,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(_,{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})]})};Vo.displayName="MultilingualInput";const pg=()=>window.G7Core,Ho=({checked:e,value:t,onChange:n,disabled:a=!1,label:r,description:o,size:s="md",className:i="",name:l})=>{const[g,d]=b.useState(()=>e??t??!1);b.useEffect(()=>{d(e??t??!1)},[e,t]);const u=p=>{const x=p.target.checked;d(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(d(p),n){const x=pg();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:u,disabled:a,className:"sr-only peer",tabIndex:-1}),c.jsx("div",{className:`
relative ${h.track}
bg-gray-200 dark:bg-gray-700
rounded-full
peer
peer-focus:outline-none
peer-focus:ring-4
peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800
peer-checked:bg-blue-600 dark:peer-checked:bg-blue-500
after:content-['']
after:absolute
after:top-0.5
after:left-0.5
after:bg-white
after:border-gray-300 dark:after:border-gray-600
after:border
after:rounded-full
${h.thumb}
after:transition-all
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})]})},ga=({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:de.CheckCircle,warning:de.ExclamationTriangle,error:de.XCircle,info:de.InfoCircle,pending:de.Clock,default:de.QuestionCircle},l={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},g=a||i[e],d=t||l[e],u=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 ${u} ${r}`,style:o,children:[n&&c.jsx(ne,{name:g,className:"w-4 h-4"}),c.jsx(Z,{children:d})]})},Wi={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"},Yi={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"},qi=({color:e="gray",text:t,size:n="md",className:a="",style:r,children:o})=>{const s=Wi[e]||Wi.gray,i=Yi[n]||Yi.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:Ki,setPrototypeOf:Xi,isFrozen:bg,getPrototypeOf:mg,getOwnPropertyDescriptor:vg}=Object;let{freeze:Tt,seal:zt,create:Zi}=Object,{apply:jo,construct:zo}=typeof Reflect<"u"&&Reflect;Tt||(Tt=function(t){return t}),zt||(zt=function(t){return t}),jo||(jo=function(t,n,a){return t.apply(n,a)}),zo||(zo=function(t,n){return new t(...n)});const ha=Ut(Array.prototype.forEach),Qi=Ut(Array.prototype.pop),vn=Ut(Array.prototype.push),pa=Ut(String.prototype.toLowerCase),Go=Ut(String.prototype.toString),Ji=Ut(String.prototype.match),yn=Ut(String.prototype.replace),yg=Ut(String.prototype.indexOf),xg=Ut(String.prototype.trim),Zt=Ut(Object.prototype.hasOwnProperty),Ot=Ut(RegExp.prototype.test),xn=wg(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 jo(e,t,a)}}function wg(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return zo(e,n)}}function je(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pa;Xi&&Xi(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const o=n(r);o!==r&&(bg(t)||(t[a]=o),r=o)}e[r]=!0}return e}function kg(e){for(let t=0;t<e.length;t++)Zt(e,t)||(e[t]=null);return e}function Nr(e){const t=Zi(null);for(const[n,a]of Ki(e))Zt(e,n)&&(Array.isArray(a)?t[n]=kg(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=vg(e,t);if(a){if(a.get)return Ut(a.get);if(typeof a.value=="function")return Ut(a.value)}e=mg(e)}function n(){return null}return n}const Ri=Tt(["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&&ha([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 ca(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 Qi(D[ke])},t.removeHooks=function(ke){D[ke]&&(D[ke]=[])},t.removeAllHooks=function(){D={}},t}var Pg=sl();const Ko=({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=`
${O===ee?"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:()=>L(ee),title:H(ee),children:[ee.toUpperCase(),ee===x&&h.jsx(Q,{className:"text-red-400 ml-0.5",children:"*"})]},ee))}),h.jsx(I,{className:"flex-1 min-w-0",children:n==="textarea"?h.jsx(qn,{name:`${f}[${O}]`,value:k[O]||"",onChange:ee=>A(O,ee.target.value),placeholder:i,required:a&&O===x,disabled:l,maxLength:c,rows:d,className:Z}):h.jsx(wt,{type:"text",name:`${f}[${O}]`,value:k[O]||"",onChange:ee=>A(O,ee.target.value),placeholder:i,required:a&&O===x,disabled:l,maxLength:c,className:X})})]})})};return h.jsxs(I,{className:l?"opacity-50 cursor-not-allowed":void 0,id:p,...y,children:[r==="compact"?K():r==="tabs"?z():G(),b&&m&&h.jsx(Q,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:m})]})};Va.displayName="MultilingualInput";const fb=()=>window.G7Core,za=({checked:t,value:e,onChange:n,disabled:r=!1,label:s,description:o,size:i="md",className:a="",name:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(()=>t??e??!1);v.useEffect(()=>{f(t??e??!1)},[t,e]);const g=b=>{const S=b.target.checked;f(S),n&&!r&&n(b)},p={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"}}[i],y=()=>{if(!r){const b=!u;if(f(b),n){const S=fb();S?.createChangeEvent&&n(S.createChangeEvent({checked:b,name:l}))}}};return h.jsxs("div",{className:`toggle-container ${a}`,id:c,...d,children:[h.jsxs("div",{className:`toggle-switch-wrapper ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),y()},children:[h.jsx("input",{type:"checkbox",id:l,name:l,checked:u,onChange:g,disabled:r,className:"sr-only peer",tabIndex:-1}),h.jsx("div",{className:`toggle-switch-track ${p.track} ${p.thumb}`})]}),s&&h.jsx("span",{className:`toggle-label ${r?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:y,children:s}),o&&h.jsx("p",{className:"toggle-description",children:o})]})},Po=({status:t,label:e,showIcon:n=!0,iconName:r,className:s="",style:o,id:i,editorAttrs:a})=>{const l={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"},c={success:de.CheckCircle,warning:de.ExclamationTriangle,error:de.XCircle,info:de.InfoCircle,pending:de.Clock,default:de.QuestionCircle},d={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},u=r||c[t],f=e||d[t],g=l[t];return h.jsxs(Q,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${g} ${s}`,style:o,id:i,...a,children:[n&&h.jsx(re,{name:u,className:"w-4 h-4"}),h.jsx(Q,{children:f})]})},Td={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"},hb={success:"green",warning:"yellow",danger:"red",error:"red",info:"blue",primary:"blue",secondary:"gray",text:"gray",default:"gray"},Ad={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"},Dd=({color:t,variant:e,text:n,size:r="md",className:s="",style:o,children:i,id:a,editorAttrs:l})=>{const c=t||(e?hb[e]:void 0)||"gray",d=Td[c]||Td.gray,u=Ad[r]||Ad.md;return h.jsxs(Q,{className:`inline-flex items-center rounded-full font-medium ${u} ${d} ${s}`,style:o,id:a,...l,children:[n,i]})};/*! @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:Id,setPrototypeOf:Ld,isFrozen:gb,getPrototypeOf:pb,getOwnPropertyDescriptor:mb}=Object;let{freeze:Bt,seal:an,create:Pd}=Object,{apply:Ha,construct:Ua}=typeof Reflect<"u"&&Reflect;Bt||(Bt=function(e){return e}),an||(an=function(e){return e}),Ha||(Ha=function(e,n,r){return e.apply(n,r)}),Ua||(Ua=function(e,n){return new e(...n)});const $o=tn(Array.prototype.forEach),$d=tn(Array.prototype.pop),ys=t Line truncated
`+ke),J&&$o([L,$,F],We=>{ke=vs(ke,We," ")}),E&&Se?E.createHTML(ke):ke},e.setConfig=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(Ce),ie=!0},e.clearConfig=function(){Ee=null,ie=!1},e.isValidAttribute=function(Ce,Y,ae){Ee||Re({});const xe=we(Ce),lt=we(Y);return Ao(xe,lt,ae)},e.addHook=function(Ce,Y){typeof Y=="function"&&(O[Ce]=O[Ce]||[],ys(O[Ce],Y))},e.removeHook=function(Ce){if(O[Ce])return $d(O[Ce])},e.removeHooks=function(Ce){O[Ce]&&(O[Ce]=[])},e.removeAllHooks=function(){O={}},e}var Ib=Gd();const Xa=({content:t,text:e,isHtml:n=!0,className:r="",purifyConfig:s,id:o,editorAttrs:i})=>{const a=e??t??"";if(!a||a.trim()==="")return null;if(!n){const u=`
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=b.useMemo(()=>{const g=r?{...s,...r,FORBID_TAGS:[...s.FORBID_TAGS,...r.FORBID_TAGS||[]],FORBID_ATTR:[...s.FORBID_ATTR,...r.FORBID_ATTR||[]]}:s;return Pg.sanitize(o,g).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(u,f,h,v)=>(h.startsWith("http://")||h.startsWith("https://"))&&!u.includes("rel=")?`<a ${f}href="${h}"${v} rel="noopener noreferrer">`:u)},[o,r]),l=`
${r}
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:u,id:o,...i,children:a})}const l={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"]},c=v.useMemo(()=>{const u=s?{...l,...s,FORBID_TAGS:[...l.FORBID_TAGS,...s.FORBID_TAGS||[]],FORBID_ATTR:[...l.FORBID_ATTR,...s.FORBID_ATTR||[]]}:l;return Ib.sanitize(a,u).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(g,m,p,y)=>(p.startsWith("http://")||p.startsWith("https://"))&&!g.includes("rel=")?`<a ${m}href="${p}"${y} rel="noopener noreferrer">`:g)},[a,s]),d=`
prose dark:prose-invert max-w-none
prose-p:my-2
prose-headings:font-bold prose-headings:mt-6 prose-headings:mb-4
@@ -56,87 +34,68 @@ var SirsoftAdminBasic=(function(Q,c,b,ar){"use strict";function eg(e){const t=Ob
dark:[&_td]:border-gray-600
[&_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}})},ma=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,Xo={Div:_,Span:Z,Button:re,Icon:ne,Checkbox:Xt,P:ut,A:jr,Label:Ft,Input:ft,H1:Ao,H2:Er,H3:Hr,H4:ji,Img:or,Select:zr,Textarea:vr,Table:Po,Thead:$o,Tbody:Fo,Tfoot:Uo,Tr:yr,Th:Gr,Td:_t,MultilingualInput:Vo,Toggle:Ho,StatusBadge:ga,Badge:qi,HtmlContent:Ko,ActionMenu:mn},Zo=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=>Zo(t)).join(", ");if(typeof e=="object"){if(b.isValidElement(e))return e;if(Object.keys(e).length===0)return"";try{return JSON.stringify(e)}catch{return ma.warn("객체를 문자열로 변환할 수 없습니다:",e),"[Object]"}}return String(e)},il=(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 ma.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,Xo,a,r?{componentContext:r}:void 0)}return ma.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Qo=(e,t,n="",a)=>{const r=window.G7Core;if(r?.renderItemChildren){const o={row:t,$value:t};return r.renderItemChildren(e,o,Xo,n,a?{componentContext:a}:void 0)}return ma.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:d,onSortChange:u,selectable:f=!1,selectedIds:h=[],onSelectionChange:v,idField:p="id",showColumnSelector:x=!1,visibleColumns:m,onColumnVisibilityChange:T,responsiveBreakpoint:C=768,cardRenderer:S,rowActions:N,onRowAction:E,alwaysShowPagination:k=!1,serverSidePagination:y=!1,serverCurrentPage:w,serverTotalPages:A,onPageChange:D,prevText:F,nextText:M,columnSelectorText:L,emptyMessage:U,actionsColumnHeader:O,requiredText:I,selectedCountText:H,showFirstLast:$=!0,expandable:z=!1,expandedRowIds:G,onExpandChange:j,expandChildren:W,expandedRowRender:B,expandColumnWidth:V="48px",expandIconExpanded:Y=de.ChevronDown,expandIconCollapsed:R=de.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:_e="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"),De=U??Cn("common.no_data"),Ae=O??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&&u?.(K,he)}):[g??null,()=>{}],[he,xe]=$e?$e(d,"asc",K=>{J!==null&&u?.(J,K)}):[d??"asc",()=>{}],[ue,Pe]=b.useState(1),[Ce,Ue]=$e?$e(G,[],j,{isEqual:st}):[G??[],()=>{}],[Oe,Je]=b.useState(!1),qe=b.useRef(null),dt=rt?.useResponsive,fe=dt?.(),Le=fe?fe.width<C:typeof window<"u"&&window.innerWidth<C,He=b.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]=b.useState(()=>m&&m.length>0?m:t.filter(K=>!K.hidden).map(K=>K.field));b.useEffect(()=>{m&&m.length>0&&at(m)},[m]);const tt=b.useRef("");b.useEffect(()=>{const K=t.map(le=>le.field).join(",");tt.current&&K!==tt.current&&(!m||m.length===0)&&at(t.filter(le=>!le.hidden).map(le=>le.field)),tt.current=K},[t,m]);const ot=b.useRef([]),qt=b.useRef(null);b.useEffect(()=>{if(ee&&ee.length>0){const K=ee.map(Ve=>Ve.field);if(qt.current===null&&(qt.current=m!==void 0&&m.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),T?.(Ne)}}ot.current=K}},[ee]),b.useEffect(()=>{y||Pe(1)},[n,y]),b.useEffect(()=>{const K=le=>{qe.current&&!qe.current.contains(le.target)&&Je(!1)};return Oe&&document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[Oe]);const et=b.useMemo(()=>!x&&(!m||m.length===0)?He.filter(K=>!K.hidden):He.filter(K=>Re.includes(K.field)),[He,Re,x,m]),kt=b.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=b.useMemo(()=>{if(y||!r)return kt;const K=(ue-1)*o,le=K+o;return kt.slice(K,le)},[kt,ue,o,r,y]),it=y?w||1:ue,At=y?A||1:Math.ceil((kt?.length||0)/o),nr=b.useCallback(K=>{y&&D?D(K):Pe(K)},[y,D]),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
${u[f.variant||"primary"]}
`,children:[f.iconName&&c.jsx(ne,{name:f.iconName,className:"w-4 h-4 mr-2 inline-block"}),f.label]},h))})]})},rs=(e,t)=>window.G7Core?.t?.(e,t)??e,pl=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,cancelText:o,onConfirm:s,onCancel:i,confirmButtonVariant:l="primary",cancelButtonVariant:g="secondary",width:d="500px",closeOnOverlay:u=!0,isLoading:f=!1,loadingText:h})=>{const v=r??rs("common.confirm"),p=o??rs("common.cancel"),x=h??rs("common.loading"),m=()=>{s()},T=()=>{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(va,{isOpen:e,onClose:C,title:n,width:d,children:[c.jsx(_,{className:"py-2",children:typeof a=="string"?c.jsx(ut,{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:T,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:m,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:de.Spinner,className:"w-4 h-4 animate-spin"}),c.jsx(Z,{children:f?x:v})]})]})]})},n0=(e,t)=>window.G7Core?.t?.(e,t)??e,a0=({isOpen:e,onClose:t,title:n,message:a,confirmText:r,onConfirm:o,confirmButtonVariant:s="primary",width:i="500px",closeOnOverlay:l=!0})=>{const u=[{label:r??n0("common.confirm"),onClick:()=>{o?.(),t()},variant:s}],f=typeof a=="string"?c.jsx(ut,{className:"text-gray-700 dark:text-gray-300",children:a}):a;return c.jsx(hl,{isOpen:e,onClose:t,title:n,content:f,actions:u,width:i,closeOnOverlay:l})},o0=(e,t)=>window.G7Core?.t?.(e,t)??e,s0={success:de.CheckCircle,error:de.XCircle,warning:de.ExclamationTriangle,info:de.InfoCircle},bl={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"}},i0={"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"},l0=({toasts:e,position:t="bottom-center",duration:n=3e3,onRemove:a})=>{const[r,o]=b.useState(new Map),s=b.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(u=>u.id!==i)}))}},300)},[a]);return b.useEffect(()=>{!e||e.length===0||e.forEach(i=>{if(r.has(i.id))return;o(g=>{const d=new Map(g);return d.set(i.id,!0),d});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 ${i0[t]}`,"aria-live":"polite","aria-atomic":"true",children:e.map(i=>c.jsx(c0,{toast:i,position:t,isVisible:r.get(i.id)??!0,onClose:()=>s(i.id)},i.id))})},c0=({toast:e,position:t,isVisible:n,onClose:a})=>{const r=bl[e.type]||bl.info,o=e.icon?e.icon:s0[e.type],s=t.startsWith("bottom")?"translate-y-2":"-translate-y-2";return c.jsxs(_,{className:`
${r}
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:d,dangerouslySetInnerHTML:{__html:c},id:o,...i})},zo=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...t)=>console.log("[Comp:DataGrid]",...t),warn:(...t)=>console.warn("[Comp:DataGrid]",...t),error:(...t)=>console.error("[Comp:DataGrid]",...t)},Cs=(t,e)=>window.G7Core?.t?.(t,e)??t,Ka={Div:I,Span:Q,Button:oe,Icon:re,Checkbox:vn,P:bt,A:Lr,Label:en,Input:wt,H1:Ta,H2:Zn,H3:Ir,H4:_d,Img:yn,Select:Pr,Textarea:qn,Table:La,Thead:Pa,Tbody:$a,Tfoot:Fa,Tr:Qn,Th:$r,Td:Yt,MultilingualInput:Va,Toggle:za,StatusBadge:Po,Badge:Dd,HtmlContent:Xa,ActionMenu:bs},qa=t=>{if(t==null)return"";if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return t.map(e=>qa(e)).join(", ");if(typeof t=="object"){if(v.isValidElement(t))return t;if(Object.keys(t).length===0)return"";try{return JSON.stringify(t)}catch{return zo.warn("객체를 문자열로 변환할 수 없습니다:",t),"[Object]"}}return String(t)},Yd=(t,e)=>{if(!t)return!0;const n=t.match(/^\{\{(.+)\}\}$/);if(!n)return!0;const r=n[1].trim();try{return!!new Function("row",`return ${r}`)(e)}catch(s){return zo.warn("subRow 조건 평가 실패:",t,s),!0}},Ss=(t,e,n,r="",s)=>{const o=window.G7Core;if(o?.renderItemChildren){const i={row:e,value:n,$value:n};return o.renderItemChildren(t,i,Ka,r,s?{componentContext:s}:void 0)}return zo.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Za=(t,e,n="",r)=>{const s=window.G7Core;if(s?.renderItemChildren){const o={row:e,$value:e};return s.renderItemChildren(t,o,Ka,n,r?{componentContext:r}:void 0)}return zo.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Lb=({id:t,columns:e,data:n,sortable:r=!0,pagination:s=!1,pageSize:o=10,onRowClick:i,className:a="",style:l,sortField:c,sortDirection:d,onSortChange:u,selectable:f=!1,selectedIds:g=[],onSelectionChange:m,idField:p="id",showColumnSelector:y=!1,visibleColumns:b,onColumnVisibilityChange:S,responsiveBreakpoint:x=768,cardRenderer:E,rowActions:k,onRowAction:C,alwaysShowPagination:N=!1,serverSidePagination:_=!1,serverCurrentPage:w,serverTotalPages:M,onPageChange:O,prevText:L,nextText:$,columnSelectorText:F,emptyMessage:D,actionsColumnHeader:A,requiredText:T,selectedCountText:V,showFirstLast:H=!0,expandable:W=!1,expandedRowIds:j,onExpandChange:U,expandChildren:B,expandedRowRender:G,expandColumnWidth:z="48px",expandIconExpanded:K=de.ChevronDown,expandIconCollapsed:X=de.ChevronRight,expandConditionField:Z,dynamicColumns:ee,dynamicColumnsInsertAfter:ne,expandContext:he,__componentContext:J,subRowChildren:ce,subRowCondition:ue,subRowClassName:ie="px-6 py-2 bg-gray-50 dark:bg-gray-900",subRowRender:ve,footerCells:fe,footerClassName:ye="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:Se,editorAttrs:He})=>{const se=L||void 0,Ae=$||void 0,Le=F??Cs("common.column_selector"),Ie=D??Cs("common.no_data"),Be=A??Cs("common.actions"),st=T??Cs("common.required"),ft=V??Cs("common.selected_count"),je=window.G7Core,Je=je?.useControllableState,Xe=je?.shallowArrayEqual,[te,ge]=Je?Je(c,null,q=>{q!==null&&u?.(q,pe)}):[c??null,()=>{}],[pe,me]=Je?Je(d,"asc",q=>{te!==null&&u?.(te,q)}):[d??"asc",()=>{}],[be,Ue]=v.useState(1),[Me,Fe]=Je?Je(j,[],U,{isEqual:Xe}):[j??[],()=>{}],[_e,ot]=v.useState(!1),it=v.useRef(null),we=je?.useResponsive,Ee=we?.(),ze=Ee?Ee.width<x:typeof window<"u"&&window.innerWidth<x,qe=v.useMemo(()=>{if(!ee||!Array.isArray(ee)||ee.length===0)return e;if(ne){const q=e.findIndex(le=>le.field===ne);if(q!==-1)return[...e.slice(0,q+1),...ee,...e.slice(q+1)]}return[...e,...ee]},[e,ee,ne]),[Re,nt]=v.useState(()=>b&&b.length>0?b:e.filter(q=>!q.hidden).map(q=>q.field));v.useEffect(()=>{b&&b.length>0&&nt(b)},[b]);const gt=v.useRef("");v.useEffect(()=>{const q=e.map(le=>le.field).join(",");gt.current&&q!==gt.current&&(!b||b.length===0)&&nt(e.filter(le=>!le.hidden).map(le=>le.field)),gt.current=q},[e,b]);const mn=v.useRef([]),mt=v.useRef(null);v.useEffect(()=>{if(ee&&ee.length>0){const q=ee.map(We=>We.field);if(mt.current===null&&(mt.current=b!==void 0&&b.length>0,mt.current)){mn.current=q;return}const le=mn.current,ke=q.filter(We=>!le.includes(We));if(ke.length>0){const We=ke.filter(Pe=>!Re.includes(Pe));if(We.length>0){const Pe=[...Re,...We];nt(Pe),S?.(Pe)}}mn.current=q}},[ee]),v.useEffect(()=>{_||Ue(1)},[n,_]),v.useEffect(()=>{const q=le=>{it.current&&!it.current.contains(le.target)&&ot(!1)};return _e&&document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[_e]);const xt=v.useMemo(()=>!y&&(!b||b.length===0)?qe.filter(q=>!q.hidden):qe.filter(q=>Re.includes(q.field)),[qe,Re,y,b]),Dt=v.useMemo(()=>!te||!r||!n?n||[]:u?n:[...n].sort((q,le)=>{const ke=q[te],We=le[te];if(ke===We)return 0;const Pe=ke>We?1:-1;return pe==="asc"?Pe:-Pe}),[n,te,pe,r,u]),Ve=v.useMemo(()=>{if(_||!s)return Dt;const q=(be-1)*o,le=q+o;return Dt.slice(q,le)},[Dt,be,o,s,_]),sn=_?w||1:be,on=_?M||1:Math.ceil((Dt?.length||0)/o),Rt=v.useCallback(q=>{_&&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
${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":o0("common.close_notification"),children:c.jsx(ne,{name:de.Times,className:"w-4 h-4"})})]})},ml=({items:e,separator:t=c.jsx(ne,{name:de.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 d=i.slice(0,1),u=i.slice(-(r-2));l=[...d,...u]}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((d,u)=>{const f=u===l.length-1,h=u===0;return c.jsxs(b.Fragment,{children:[g&&h&&c.jsxs(c.Fragment,{children:[c.jsx(vl,{item:d,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(vl,{item:d,isLast:f}),!f&&c.jsx(Z,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:t})]})]},u)})})})},vl=({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}),d0=({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(ut,{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:`
${s.bg}
${n?"opacity-100 translate-y-0":`opacity-0 ${i}`}
`,role:"alert",children:[h.jsx(re,{name:o,className:`w-5 h-5 flex-shrink-0 ${s.text}`}),h.jsx(Q,{className:`flex-1 text-sm font-medium ${s.text}`,children:t.message}),h.jsx(oe,{onClick:r,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${s.text} focus:outline-none`,"aria-label":ry("common.close_notification"),children:h.jsx(re,{name:de.Times,className:"w-4 h-4"})})]})},nu=({items:t,separator:e=h.jsx(re,{name:de.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:r="/",maxItems:s,className:o="",id:i,editorAttrs:a})=>{let c=n?[{label:"Home",href:r},...t]:t,d=c,u=!1;if(s&&c.length>s){u=!0;const f=c.slice(0,1),g=c.slice(-(s-2));d=[...f,...g]}return h.jsx(Io,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",id:i,...a,children:h.jsx(I,{className:"flex items-center space-x-2",children:d.map((f,g)=>{const m=g===d.length-1,p=g===0;return h.jsxs(v.Fragment,{children:[u&&p&&h.jsxs(h.Fragment,{children:[h.jsx(ru,{item:f,isLast:!1}),h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e}),h.jsx(Q,{className:"text-gray-500 dark:text-gray-400",children:"..."}),d.length>1&&h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e})]}),(!u||!p)&&h.jsxs(h.Fragment,{children:[h.jsx(ru,{item:f,isLast:m}),!m&&h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e})]})]},g)})})})},ru=({item:t,isLast:e})=>e||!t.href&&!t.onClick?h.jsx(Q,{className:"font-medium text-gray-900 dark:text-white","aria-current":e?"page":void 0,children:t.label}):t.onClick?h.jsx(Lr,{href:"#",onClick:n=>{n.preventDefault(),t.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:t.label}):h.jsx(Lr,{href:t.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:t.label}),ly=({title:t,description:e,iconName:n,illustrationSrc:r,illustrationAlt:s="Empty state illustration",actions:o=[],className:i="",id:a,editorAttrs:l})=>{const c={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 h.jsxs(I,{className:`flex flex-col items-center justify-center p-8 text-center ${i}`,role:"status","aria-live":"polite",id:a,...l,children:[r?h.jsx(yn,{src:r,alt:s,className:"w-48 h-48 mb-6 object-contain"}):n?h.jsx(I,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:h.jsx(re,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,h.jsx(Zn,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t}),e&&h.jsx(bt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:e}),o.length>0&&h.jsx(I,{className:"flex flex-wrap gap-3 justify-center",children:o.map((d,u)=>h.jsxs(oe,{onClick:d.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))})]})},u0=(e,t)=>window.G7Core?.t?.(e,t)??e,f0=({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:`
${s[t]}
${c[d.variant||"primary"]}
`,children:[d.iconName&&h.jsx(re,{name:d.iconName,className:"w-4 h-4 mr-2 inline-block"}),d.label]},u))})]})},cy=(t,e)=>window.G7Core?.t?.(t,e)??t,dy=({id:t,size:e="md",color:n="text-blue-600",fullscreen:r=!1,text:s,className:o="",editorAttrs:i})=>{const a={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"},l={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},c=h.jsxs(I,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[h.jsx(I,{className:`
${a[e]}
border-gray-200 dark:border-gray-700 border-t-current
rounded-full animate-spin
${n}
`,role:"status","aria-label":u0("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,ns=(e,t)=>window.G7Core?.t?.(e,t)??e,g0=({logo:e,logoAlt:t="Logo",menu:n=[],collapsed:a=!1,onToggleCollapse:r,className:o="",currentLocale:s})=>{const[i,l]=b.useState(new Set),[g,d]=b.useState(s||Wr()?.locale?.current?.()||"ko"),[u,f]=b.useState(window.location.pathname),h=b.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=b.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]);b.useEffect(()=>{const k=Wr();return k?.state?.subscribe?k.state.subscribe(w=>{const A=w?._global?.locale||k?.locale?.current?.()||"ko";d(A);const D=w?._global?.currentPath||window.location.pathname;f(D)}):void 0},[]),b.useEffect(()=>{const k=()=>{f(window.location.pathname)};return window.addEventListener("popstate",k),()=>window.removeEventListener("popstate",k)},[]),b.useEffect(()=>{s&&d(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 F of D)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};b.useEffect(()=>{if(n.length>0&&u){const k=x(n,u);k.size>0&&l(y=>new Set([...y,...k]))}},[u,n]);const m=k=>p(k,u),T=k=>k.children?k.children.some(y=>m(y.url)||T(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),D=y*16+16,F=S(k.name),M=m(k.url),L=T(k),U="w-full flex items-center justify-between px-4 py-3 transition-colors",O="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(_,{children:[w&&k.url?c.jsxs(_,{className:`
${U}
${M?O: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:F})]}),!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":ns(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: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:F})]}),!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:`
${U}
${M?O:H}
${a?"justify-center":""}
`,role:"status","aria-label":cy("common.loading")}),s&&h.jsx(Q,{className:`${l[e]} ${n} font-medium`,children:s})]});return r?h.jsx(I,{id:t,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",...i,children:c}):h.jsx(I,{id:t,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",...i,children:c})},Vr=()=>window.G7Core,nl=(t,e)=>window.G7Core?.t?.(t,e)??t,uy=({logo:t,logoAlt:e="Logo",menu:n=[],collapsed:r=!1,onToggleCollapse:s,className:o="",currentLocale:i,id:a,editorAttrs:l})=>{const[c,d]=v.useState(new Set),[u,f]=v.useState(i||Vr()?.locale?.current?.()||"ko"),[g,m]=v.useState(window.location.pathname),p=v.useMemo(()=>{const w=[],M=O=>{for(const L of O)L.url&&w.push(L.url),L.children&&M(L.children)};return M(n),w},[n]),y=v.useCallback(w=>{let M=null;for(const O of p)(w===O||w.startsWith(O+"/"))&&(!M||O.length>M.length)&&(M=O);return M},[p]);v.useEffect(()=>{const w=Vr();return w?.state?.subscribe?w.state.subscribe(O=>{const L=O?._global?.locale||w?.locale?.current?.()||"ko";f(L);const $=O?._global?.currentPath||window.location.pathname;m($)}):void 0},[]),v.useEffect(()=>{const w=()=>{m(window.location.pathname)};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]),v.useEffect(()=>{i&&f(i)},[i]);const b=(w,M)=>!w||typeof M!="string"?!1:M===w?!0:M.startsWith(w+"/")?y(M)===w:!1,S=(w,M)=>{const O=new Set,L=$=>{for(const F of $)if(F.children&&F.children.length>0){if(L(F.children)||b(F.url,M))return O.add(F.id),!0}else if(b(F.url,M))return!0;return!1};return L(w),O};v.useEffect(()=>{if(n.length>0&&g){const w=S(n,g);w.size>0&&d(M=>new Set([...M,...w]))}},[g,n]);const x=w=>b(w,g),E=w=>w.children?w.children.some(M=>x(M.url)||E(M)):!1,k=w=>{d(M=>{const O=new Set(M);return O.has(w)?O.delete(w):O.add(w),O})},C=w=>typeof w=="string"?w:w[u]||w.en||Object.values(w)[0]||"",N=(w,M)=>{Vr()?.dispatch?(w.preventDefault(),Vr().navigation?.onComplete(()=>{Vr().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),Vr().dispatch({handler:"navigate",params:{path:M}})):window.location.href=M},_=(w,M=0,O=!1)=>{const L=w.children&&w.children.length>0,$=c.has(w.id),F=C(w.name),D=M>0,A=x(w.url),T=E(w),V=D?"admin-sidebar-subitem":"admin-sidebar-item",H="admin-sidebar-item-active",W="admin-sidebar-item-active-parent",j="admin-sidebar-item-default";return h.jsxs(I,{className:D?"relative group":"",children:[D&&h.jsxs(h.Fragment,{children:[!O&&h.jsx(I,{className:"admin-sidebar-tree-line-vertical"}),h.jsx(I,{className:"admin-sidebar-tree-line-curve"})]}),L&&w.url?h.jsxs(I,{className:`
${V}
${A?H:T?W:j}
${r?"justify-center":""}
`,children:[h.jsxs(oe,{onClick:B=>N(B,w.url),className:"flex items-center justify-start flex-1 min-w-0",children:[w.icon&&h.jsx(pt,{className:`${w.icon} ${r?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!r&&h.jsx(Q,{className:"truncate",children:F})]}),!r&&h.jsxs(I,{className:"admin-sidebar-chevron-trail",children:[w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"}),h.jsx(oe,{onClick:()=>k(w.id),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600","aria-label":nl($?"common.collapse":"common.expand"),children:h.jsx(pt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${$?"rotate-180":""}`})})]})]}):L?h.jsxs(oe,{onClick:()=>k(w.id),className:`
${V}
${T?W:j}
${r?"justify-center":""}
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:F})]}),!r&&h.jsxs(I,{className:"admin-sidebar-chevron-trail",children:[w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"}),h.jsx(pt,{className:`fas fa-chevron-right w-4 h-4 text-slate-400 transition-transform duration-200 ${$?"rotate-90":""}`})]})]}):w.url?h.jsxs(oe,{onClick:B=>N(B,w.url),className:`
${V}
${A?H:j}
${r?"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: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":""}
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:F})]}),!r&&w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}):h.jsxs(oe,{className:`
${V}
admin-sidebar-item-disabled
${r?"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: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(_,{className:"bg-gray-50 dark:bg-gray-900",children:k.children.map(z=>E(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":ns(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=>E(k))})]})},En=(e,t)=>window.G7Core?.t?.(e,t)??e,h0=({user:e={name:"",email:""},notifications:t=[],onNotificationClick:n,onProfileClick:a,onLogoutClick:r,className:o=""})=>{const[s,i]=b.useState(!1),[l,g]=b.useState(!1),d=b.useRef(null),u=b.useRef(null),f=t.filter(h=>!h.read).length;return b.useEffect(()=>{const h=v=>{d.current&&!d.current.contains(v.target)&&i(!1),u.current&&!u.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),c.jsxs(_,{className:`
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:F})]}),!r&&w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}),L&&!r&&$&&h.jsx(I,{className:"relative ml-2",children:w.children.map((B,G)=>_(B,M+1,G===w.children.length-1))})]},w.id)};return h.jsxs(I,{className:o,id:a,...l,children:[(t||s)&&h.jsxs(I,{className:"admin-sidebar-header",children:[t&&!r&&h.jsx(yn,{src:t,alt:e,className:"h-8"}),s&&h.jsx(oe,{onClick:s,className:"admin-sidebar-collapse-btn","aria-label":nl(r?"common.expand_sidebar":"common.collapse_sidebar"),children:h.jsx(pt,{className:`${r?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-slate-600 dark:text-slate-400`})})]}),h.jsx(I,{className:"admin-sidebar-menu-list",children:n.map((w,M)=>_(w,0,M===n.length-1))})]})},_s=(t,e)=>window.G7Core?.t?.(t,e)??t,fy=({user:t={name:"",email:""},notifications:e=[],onNotificationClick:n,onProfileClick:r,onLogoutClick:s,className:o=""})=>{const[i,a]=v.useState(!1),[l,c]=v.useState(!1),d=v.useRef(null),u=v.useRef(null),f=e.filter(g=>!g.read).length;return v.useEffect(()=>{const g=m=>{d.current&&!d.current.contains(m.target)&&a(!1),u.current&&!u.current.contains(m.target)&&c(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),h.jsxs(I,{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:d,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:de.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:[h.jsxs(I,{ref:d,className:"relative",children:[h.jsxs(oe,{onClick:()=>a(!i),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors","aria-label":_s("common.notifications"),children:[h.jsx(re,{name:de.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),f>0&&h.jsx(Q,{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})]}),i&&h.jsxs(I,{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:[h.jsx(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx(Q,{className:"font-semibold text-gray-900 dark:text-white",children:_s("common.notifications")})}),h.jsx(I,{className:"max-h-96 overflow-y-auto",children:e.length===0?h.jsx(I,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:h.jsx(Q,{children:_s("common.no_notifications")})}):e.map(g=>h.jsx(oe,{onClick:()=>{g.onClick?.(),n?.(g.id),a(!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:u,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:de.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:de.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:de.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:de.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:En("common.logout")})]})]})]})]})]})},p0=({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:d,onClose:u,onLoadMore:f,onMarkAllRead:h,onDeleteAll:v,onDelete:p,onUnreadOnlyToggle:x,dropdownAlign:m="right",className:T=""})=>{const[C,S]=b.useState(!1),N=b.useRef(null),E=b.useRef(null),k=b.useRef(null),y=b.useRef(null),w=b.useRef(new Set),A=b.useRef(f),D=b.useRef(n),F=b.useRef(a),M=b.useRef(e.length),L=b.useRef(-1);b.useEffect(()=>{A.current=f,D.current=n,F.current=a,M.current=e.length}),b.useEffect(()=>{if(!y.current||!k.current||!C)return;L.current=-1;const H=new IntersectionObserver(([$])=>{$.isIntersecting&&(F.current||!D.current||L.current!==M.current&&(L.current=M.current,A.current?.()))},{root:k.current,threshold:.1});return H.observe(y.current),()=>H.disconnect()},[C]),b.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,O=b.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&&u?.(H)}w.current.clear(),S(!1)}},[C,u,U,e]);b.useEffect(()=>{if(!C)return;const H=$=>{N.current&&!N.current.contains($.target)&&O()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[C,O]);const I=b.useCallback(()=>{C?O():S(!0)},[C,O]);return b.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,m,e.length]),c.jsxs(_,{ref:N,className:`relative ${T}`,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:de.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
${g.read?"":"bg-blue-50 dark:bg-blue-900/20"}
`,children:h.jsxs(I,{className:"flex items-start gap-3",children:[g.iconName&&h.jsx(re,{name:g.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),h.jsxs(I,{className:"flex-1",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:g.title}),h.jsx(I,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:g.message}),h.jsx(I,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:g.time})]}),!g.read&&h.jsx(Q,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},g.id))})]})]}),h.jsxs(I,{ref:u,className:"relative",children:[h.jsxs(oe,{onClick:()=>c(!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:[t.avatar?h.jsx(yn,{src:t.avatar,alt:t.name,className:"w-8 h-8 rounded-full object-cover"}):h.jsx(I,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:h.jsx(re,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),h.jsxs(I,{className:"hidden md:block text-left",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:t.name}),t.role&&h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-xs",children:t.role})]}),h.jsx(re,{name:de.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&h.jsxs(I,{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:[h.jsxs(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white",children:t.name}),h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-sm",children:t.email})]}),h.jsxs(I,{className:"py-2",children:[h.jsxs(oe,{onClick:()=>{r?.(),c(!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:[h.jsx(re,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{children:_s("common.profile_settings")})]}),h.jsxs(oe,{onClick:()=>{s?.(),c(!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:[h.jsx(re,{name:de.ArrowRight,className:"w-5 h-5"}),h.jsx(Q,{children:_s("common.logout")})]})]})]})]})]})},hy=({notifications:t=[],unreadCount:e=0,hasMore:n=!1,loading:r=!1,titleText:s="Notifications",emptyText:o="No notifications",markAllReadText:i="Mark all as read",deleteAllText:a="Delete all",unreadOnlyText:l="Unread only",unreadOnly:c=!1,onNotificationClick:d,onClose:u,onLoadMore:f,onMarkAllRead:g,onDeleteAll:m,onDelete:p,onUnreadOnlyToggle:y,dropdownAlign:b="right",className:S="",id:x,editorAttrs:E})=>{const[k,C]=v.useState(!1),N=v.useRef(null),_=v.useRef(null),w=v.useRef(null),M=v.useRef(null),O=v.useRef(new Set),L=v.useRef(f),$=v.useRef(n),F=v.useRef(r),D=v.useRef(t.length),A=v.useRef(-1);v.useEffect(()=>{L.current=f,$.current=n,F.current=r,D.current=t.length}),v.useEffect(()=>{if(!M.current||!w.current||!k)return;A.current=-1;const W=new IntersectionObserver(([j])=>{j.isIntersecting&&(F.current||!$.current||A.current!==D.current&&(A.current=D.current,L.current?.()))},{root:w.current,threshold:.1});return W.observe(M.current),()=>W.disconnect()},[k]),v.useEffect(()=>{if(!w.current||!k)return;const W=new IntersectionObserver(U=>{U.forEach(B=>{const G=B.target.getAttribute("data-notification-id"),z=B.target.getAttribute("data-unread")==="true";G&&z&&B.isIntersecting&&O.current.add(G)})},{root:w.current,threshold:.5});return w.current.querySelectorAll("[data-notification-id]").forEach(U=>W.observe(U)),()=>W.disconnect()},[k,t]);const T=e>0?e:t.filter(W=>!W.read).length,V=v.useCallback(()=>{if(k){if(T>0){const W=Array.from(O.current).filter(j=>{const U=t.find(B=>String(B.id)===String(j));return U&&!U.read});W.length>0&&u?.(W)}O.current.clear(),C(!1)}},[k,u,T,t]);v.useEffect(()=>{if(!k)return;const W=j=>{N.current&&!N.current.contains(j.target)&&V()};return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[k,V]);const H=v.useCallback(()=>{k?V():C(!0)},[k,V]);return v.useLayoutEffect(()=>{const W=_.current;if(!k||!W)return;W.style.transform="";const j=W.getBoundingClientRect(),U=typeof window<"u"?window.innerWidth:0;if(j.width===0&&j.height===0)return;const B=8;let G=0;j.right>U-B?G=-(j.right-(U-B)):j.left<B&&(G=B-j.left),G!==0&&(W.style.transform=`translateX(${G}px)`)},[k,b,t.length]),h.jsxs(I,{ref:N,className:`relative ${S}`,id:x,...E,children:[h.jsxs(oe,{onClick:H,className:"relative w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":s,children:[h.jsx(re,{name:de.Bell,className:"text-sm text-slate-500 dark:text-slate-400"}),T>0&&h.jsx(Q,{clas Line truncated
px-3 py-1.5 text-sm font-medium rounded-md transition-colors
${d===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:yl(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:de.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:`
${g===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"}
${u?"opacity-50 cursor-not-allowed":""}
`,children:ou(x)},x))})]}):h.jsxs(I,{ref:p,className:`relative ${s}`,id:a,...l,children:[h.jsxs(oe,{onClick:()=>d(!c),className:i?"flex items-center gap-1.5 px-2.5 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors cursor-pointer":"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-haspopup":"listbox","aria-expanded":c,"aria-label":e,children:[h.jsx(re,{name:de.Globe,className:i?"w-4 h-4":"w-5 h-5 text-gray-600 dark:text-gray-400"}),i&&h.jsx(Q,{className:"font-medium uppercase",children:g}),i&&h.jsx(re,{name:de.ChevronDown,className:"w-3 h-3"})]}),c&&h.jsx(I,{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:h.jsx(I,{className:"py-2",children:t.map(x=>h.jsxs(oe,{onClick:()=>S(x),disabled:u,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
${d===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:yl(x)}),d===x&&c.jsx(ne,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},wl=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)},b0=({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[d,u]=b.useState(!1),[f,h]=b.useState(!1),v=b.useRef(null);b.useEffect(()=>{const T=C=>{v.current&&!v.current.contains(C.target)&&u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const p=()=>{const C=`; ${document.cookie}`.split("; XSRF-TOKEN=");return C.length===2?decodeURIComponent(C.pop()?.split(";").shift()||""):null},x=()=>localStorage.getItem("auth_token"),m=async()=>{if(!f)try{if(h(!0),u(!1),s){s();return}const T=p(),C=x(),S=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...T&&{"X-XSRF-TOKEN":T},...C&&{Authorization:`Bearer ${C}`}},credentials:"include"});S.ok?(localStorage.removeItem("auth_token"),window.location.href=g):(wl.error("로그아웃 실패:",S.statusText),localStorage.removeItem("auth_token"),window.location.href=g)}catch(T){wl.error("로그아웃 오류:",T),localStorage.removeItem("auth_token"),window.location.href=g}finally{h(!1)}};return c.jsxs(_,{ref:v,className:`relative ${i}`,children:[c.jsxs(re,{onClick:()=>u(!d),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:de.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:de.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),d&&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:()=>{u(!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(xl,{availableLocales:r,languageText:a,inline:!0,onLanguageChange:()=>u(!1)})}),c.jsxs(_,{className:"py-2",children:[c.jsxs(re,{onClick:()=>{u(!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:de.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:m,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:de.ArrowRight,className:"w-5 h-5"}),c.jsx(Z,{children:f?"Logging out...":n})]})]})]})]})},m0=({copyright:e="© 2026 G7",version:t,quickLinks:n=[],className:a="",changelogModalId:r,copyrightModalId:o})=>{const s=b.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=b.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:`
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:de.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))})]})})},v0=({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(ml,{items:n})}),c.jsxs(_,{className:"flex items-center justify-between mb-6",children:[c.jsxs(_,{children:[c.jsx(Ao,{className:"text-xl sm:text-2xl font-semibold text-gray-900 dark:text-white",children:e}),t&&c.jsx(ut,{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:`
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:`
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,y0=({image:e,imageAlt:t,vendor:n,name:a,version:r,status:o,updateAvailable:s=!1,latestVersion:i,dependencies:l=[],showLayoutEditButton:g=!1,actions:d=[],onLayoutEditClick:u,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:`
${g===x?"bg-gray-50 dark:bg-gray-700":""}
${u?"opacity-50 cursor-not-allowed":""}
`,children:[h.jsx(Q,{className:"text-gray-900 dark:text-white flex-1",children:ou(x)}),g===x&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},my=({copyright:t="© 2026 G7",version:e,quickLinks:n=[],className:r="",changelogModalId:s,copyrightModalId:o,id:i,editorAttrs:a})=>{const l=v.useCallback(()=>{s&&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:s}],onError:[{handler:"openModal",target:s}]}]})},[s]),c=v.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 h.jsx(I,{className:`admin-footer ${r}`,id:i,...a,children:h.jsxs(I,{className:"admin-footer-row",children:[h.jsxs(I,{className:"admin-footer-group",children:[h.jsx(Q,{className:o?"admin-footer-link-hover":"",onClick:o?c:void 0,children:t}),e&&h.jsxs(h.Fragment,{children:[h.jsx(Q,{className:"hidden md:inline",children:"•"}),h.jsxs(Q,{className:`flex-center gap-2 ${s?"admin-footer-link-hover":""}`,onClick:s?l:void 0,children:[h.jsx(re,{name:de.Tag,className:"w-4 h-4"}),h.jsxs(Q,{children:["v",e]})]})]})]}),n.length>0&&h.jsx(I,{className:"flex-center gap-4",children:n.map(d=>h.jsxs(Lr,{href:d.url,className:"admin-footer-link",children:[d.iconName&&h.jsx(re,{name:d.iconName,className:"w-4 h-4"}),h.jsx(Q,{children:d.label})]},d.id))})]})})},by=({title:t,description:e,breadcrumbItems:n,tabs:r,onTabChange:s,actions:o,className:i="",children:a,id:l,editorAttrs:c})=>{const d=(u="secondary")=>({primary:"page-action-primary",secondary:"page-action-secondary",danger:"page-action-danger",ghost:"page-action-ghost"})[u];return h.jsxs(I,{className:i,id:l,...c,children:[n&&n.length>0&&h.jsx(I,{className:"mb-md",children:h.jsx(nu,{items:n})}),h.jsxs(I,{className:"flex-between mb-lg",children:[h.jsxs(I,{children:[h.jsx(Ta,{className:"page-title",children:t}),e&&h.jsx(bt,{className:"page-description",children:e})]}),a?h.jsx(I,{className:"page-actions",children:a}):o&&o.length>0?h.jsx(I,{className:"page-actions",children:o.map(u=>h.jsxs(oe,{onClick:u.onClick,disabled:u.disabled,className:d(u.variant),children:[u.iconName&&h.jsx(re,{name:u.iconName,className:"icon-md"}),u.variant!=="ghost"&&u.label&&h.jsx(I,{children:u.label})]},u.id))}):null]}),r&&r.length>0&&h.jsx(I,{className:"tab-container",children:r.map(u=>h.jsxs(oe,{onClick:()=>s?.(u.value),className:u.active?"tab-btn-active":"tab-btn",children:[h.jsx(I,{children:u.label}),u.badge!==void 0&&h.jsx(I,{className:u.active?"tab-badge-active":"tab-badge",children:u.badge})]},u.id))})]})},yy=()=>window.G7Core,vy=({title:t,description:e,className:n="",style:r,children:s,id:o,editorAttrs:i})=>{const a="flex items-center justify-between",l=yy()?.style?.mergeClasses?.(a,n)??`${a} ${n}`;return h.jsxs(I,{className:l,style:r,id:o,...i,children:[h.jsxs(I,{children:[t&&h.jsx(Zn,{className:"text-base font-semibold text-gray-900 dark:text-white",children:t}),e&&h.jsx(bt,{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:e})]}),s&&h.jsx(I,{className:"flex items-center gap-2",children:s})]})},Jn=(t,e)=>window.G7Core?.t?.(t,e)??t,xy=({image:t,imageAlt:e,vendor:n,name:r,version:s,status:o,updateAvailable:i=!1,latestVersion:a,dependencies:l=[],showLayoutEditButton:c=!1,actions:d=[],onLayoutEditClick:u,className:f="",id:g,editorAttrs:m})=>{const p=b=>({active:"success",inactive:"default",pending:"pending",error:"error"})[b],y=b=>({active:Jn("common.status_active"),inactive:Jn("common.status_inactive"),pending:Jn("common.status_pending"),error:Jn("common.status_error")})[b];return h.jsxs(I,{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(ga,{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:de.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(ga,{status:h(o),label:v(o),showIcon:!0})})]}),d.length>0&&c.jsx(mn,{items:d,triggerIconName:de.EllipsisVertical,position:"left"})]}),l.length>0&&c.jsxs(_,{className:"mb-3",children:[c.jsxs(ut,{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&&u&&c.jsxs(re,{onClick:u,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:de.Edit,className:"w-4 h-4"}),c.jsx(Z,{children:xr("common.edit_layout")})]})]})]})},kl=({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:de.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:de.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:de.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:de.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(ut,{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:de.Times,className:s.iconColor,ariaLabel:"Close"})})]})},x0=({layoutName:e,onBack:t,onPreview:n,onSave:a,isSaving:r=!1,className:o=""})=>{const s=`
`,id:g,...m,children:[t&&h.jsxs(I,{className:"relative",children:[h.jsx(yn,{src:t,alt:e||Jn("common.template_preview",{vendor:n,name:r}),className:"w-full h-48 object-cover"}),h.jsx(I,{className:"absolute top-3 right-3",children:h.jsx(Po,{status:p(o),label:y(o),showIcon:!0})}),i&&h.jsx(I,{className:"absolute top-3 left-3",children:h.jsxs(Q,{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:[h.jsx(re,{name:de.ExclamationTriangle,className:"w-3 h-3"}),h.jsx(Q,{children:Jn("common.update_available")})]})})]}),h.jsxs(I,{className:"p-4",children:[h.jsxs(I,{className:"flex items-start justify-between mb-3",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Ir,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",r]}),h.jsxs(I,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[h.jsxs(Q,{children:["v",s]}),i&&a&&h.jsxs(h.Fragment,{children:[h.jsx(Q,{children:"→"}),h.jsxs(Q,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",a]})]})]}),!t&&h.jsx(I,{className:"mt-2",children:h.jsx(Po,{status:p(o),label:y(o),showIcon:!0})})]}),d.length>0&&h.jsx(bs,{items:d,triggerIconName:de.EllipsisVertical,position:"left"})]}),l.length>0&&h.jsxs(I,{className:"mb-3",children:[h.jsxs(bt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[Jn("common.dependencies"),":"]}),h.jsx(I,{className:"flex flex-wrap gap-1",children:l.map((b,S)=>h.jsx(Q,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:b},S))})]}),c&&u&&h.jsxs(oe,{onClick:u,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:[h.jsx(re,{name:de.Edit,className:"w-4 h-4"}),h.jsx(Q,{children:Jn("common.edit_layout")})]})]})]})},iu=({type:t,message:e,dismissible:n=!1,onDismiss:r,className:s="",id:o,editorAttrs:i})=>{const a={info:{containerClass:"alert-info",iconClass:"alert-icon-info",textClass:"alert-text-info",icon:de.InfoCircle},success:{containerClass:"alert-success",iconClass:"alert-icon-success",textClass:"alert-text-success",icon:de.CheckCircle},warning:{containerClass:"alert-warning",iconClass:"alert-icon-warning",textClass:"alert-text-warning",icon:de.ExclamationTriangle},error:{containerClass:"alert-error",iconClass:"alert-icon-error",textClass:"alert-text-error",icon:de.TimesCircle}},l=a[t]??a.info;return h.jsxs(I,{className:`${l.containerClass} ${s}`,role:"alert","aria-live":"polite",id:o,...i,children:[h.jsx(re,{name:l.icon,className:l.iconClass,ariaLabel:`${t} icon`}),h.jsx(bt,{className:l.textClass,children:e}),n&&h.jsx(oe,{onClick:r,className:`alert-dismiss ${l.textClass}`,"aria-label":"Close alert",children:h.jsx(re,{name:de.Times,className:l.iconClass,ariaLabel:"Close"})})]})},wy=({layoutName:t,onBack:e,onPreview:n,onSave:r,isSaving:s=!1,className:o=""})=>{const i=`
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:de.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:de.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 h.jsxs(I,{className:i,children:[h.jsxs(I,{className:"flex items-center gap-3",children:[h.jsx(oe,{onClick:e,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:h.jsx(re,{name:de.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),h.jsx(Zn,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:t})]}),h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(oe,{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:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(re,{name:de.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),h.jsx("span",{children:"미리보기"})]})}),h.jsx(oe,{onClick:r,disabled:s,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"}
${s?"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?de.Spinner:de.Save,className:`text-white ${r?"animate-spin":""}`,ariaLabel:r?"저장 중 아이콘":"저장 아이콘"}),c.jsx("span",{children:r?"저장 중...":"저장"})]})})]})]})},w0=({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(),d=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),h=String(l.getMinutes()).padStart(2,"0");return`${g}-${d}-${u} ${f}:${h}`}catch{return i}},o=i=>{n(i)},s=`
`.trim().replace(/\s+/g," "),"aria-label":s?"저장 중...":"저장",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(re,{name:s?de.Spinner:de.Save,className:`text-white ${s?"animate-spin":""}`,ariaLabel:s?"저장 중 아이콘":"저장 아이콘"}),h.jsx("span",{children:s?"저장 중...":"저장"})]})})]})]})},ky=({files:t,selectedId:e,onSelect:n,className:r=""})=>{const s=a=>{try{const l=new Date(a);if(isNaN(l.getTime()))return a;const c=l.getFullYear(),d=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),g=String(l.getMinutes()).padStart(2,"0");return`${c}-${d}-${u} ${f}:${g}`}catch{return a}},o=a=>{n(a)},i=`
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(Lo,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:e.map(i=>{const l=i.id===t,g=`
${r}
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:i,children:t.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):h.jsx(Aa,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:t.map(a=>{const l=a.id===e,c=`
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,8 +105,8 @@ var SirsoftAdminBasic=(function(Q,c,b,ar){"use strict";function eg(e){const t=Ob
`.trim().replace(/\s+/g," "),u=`
text-sm
${l?"text-blue-700 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}
`.trim().replace(/\s+/g," ");return c.jsx(_o,{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:d,children:i.name}),c.jsx(Z,{className:u,children:r(i.updated_at)})]})},i.id)})})})};function Cl(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 k0(e){if(Array.isArray(e))return e}function C0(e,t,n){return(t=I0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S0(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(d){g=!0,r=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(g)throw r}}return i}}function E0(){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 Sl(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 El(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sl(Object(n),!0).forEach(function(a){C0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function N0(e,t){if(e==null)return{};var n,a,r=T0(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 T0(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 O0(e,t){return k0(e)||S0(e,t)||A0(e,t)||E0()}function M0(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 I0(e){var t=M0(e,"string");return typeof t=="symbol"?t:t+""}function A0(e,t){if(e){if(typeof e=="string")return Cl(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)?Cl(e,t):void 0}}function L0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nl(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 Tl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nl(Object(n),!0).forEach(function(a){L0(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _0(){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 xa(e){return{}.toString.call(e).includes("Object")}function D0(e){return!Object.keys(e).length}function Tn(e){return typeof e=="function"}function P0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $0(e,t){return xa(t)||wr("changeType"),Object.keys(t).some(function(n){return!P0(e,n)})&&wr("changeField"),t}function F0(e){Tn(e)||wr("selectorType")}function U0(e){Tn(e)||xa(e)||wr("handlerType"),xa(e)&&Object.values(e).some(function(t){return!Tn(t)})&&wr("handlersType")}function V0(e){e||wr("initialIsRequired"),xa(e)||wr("initialType"),D0(e)&&wr("initialContent")}function H0(e,t){throw new Error(e[t]||e.default)}var j0={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(H0)(j0),wa={changes:$0,selector:F0,handler:U0,initial:V0};function z0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};wa.initial(e),wa.handler(t);var n={current:e},a=Nn(W0)(n,t),r=Nn(B0)(n),o=Nn(wa.changes)(e),s=Nn(G0)(n);function i(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return wa.selector(g),g(n.current)}function l(g){_0(a,r,o,s)(g)}return[i,l]}function G0(e,t){return Tn(t)?t(e.current):t}function B0(e,t){return e.current=Tl(Tl({},e.current),t),t}function W0(e,t,n){return Tn(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 Y0={create:z0},q0={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function K0(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
`.trim().replace(/\s+/g," ");return h.jsx(Da,{className:c,onClick:()=>o(a.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(a.id))},children:h.jsxs(I,{className:"flex flex-col gap-1",children:[h.jsx(Q,{className:d,children:a.name}),h.jsx(Q,{className:u,children:s(a.updated_at)})]})},a.id)})})})};function au(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Cy(t){if(Array.isArray(t))return t}function Sy(t,e,n){return(e=Ay(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _y(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function Ey(){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 lu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function cu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lu(Object(n),!0).forEach(function(r){Sy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function My(t,e){if(t==null)return{};var n,r,s=Ny(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function Ny(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Oy(t,e){return Cy(t)||_y(t,e)||Dy(t,e)||Ey()}function Ty(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ay(t){var e=Ty(t,"string");return typeof e=="symbol"?e:e+""}function Dy(t,e){if(t){if(typeof t=="string")return au(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?au(t,e):void 0}}function Iy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function du(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function uu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?du(Object(n),!0).forEach(function(r){Iy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):du(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ly(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){return e.reduceRight(function(s,o){return o(s)},r)}}function Es(t){return function e(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=t.length?t.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e.apply(n,[].concat(s,a))}}}function Bo(t){return{}.toString.call(t).includes("Object")}function Py(t){return!Object.keys(t).length}function Ms(t){return typeof t=="function"}function $y(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Fy(t,e){return Bo(e)||Rn("changeType"),Object.keys(e).some(function(n){return!$y(t,n)})&&Rn("changeField"),e}function Vy(t){Ms(t)||Rn("selectorType")}function zy(t){Ms(t)||Bo(t)||Rn("handlerType"),Bo(t)&&Object.values(t).some(function(e){return!Ms(e)})&&Rn("handlersType")}function Hy(t){t||Rn("initialIsRequired"),Bo(t)||Rn("initialType"),Py(t)&&Rn("initialContent")}function Uy(t,e){throw new Error(t[e]||t.default)}var By={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"},Rn=Es(Uy)(By),jo={changes:Fy,selector:Vy,handler:zy,initial:Hy};function jy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};jo.initial(t),jo.handler(e);var n={current:t},r=Es(Yy)(n,e),s=Es(Gy)(n),o=Es(jo.changes)(t),i=Es(Wy)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return jo.selector(c),c(n.current)}function l(c){Ly(r,s,o,i)(c)}return[a,l]}function Wy(t,e){return Ms(e)?e(t.current):e}function Gy(t,e){return t.current=uu(uu({},t.current),e),e}function Yy(t,e,n){return Ms(e)?e(t.current):Object.keys(n).forEach(function(r){var s;return(s=e[r])===null||s===void 0?void 0:s.call(e,t.current[r])}),n}var Xy={create:jy},Ky={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function qy(t){return function e(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=t.length?t.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l]; Line truncated
You are using deprecated way of configuration.
Instead of using
@@ -156,28 +115,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
`},Ml=K0(J0)(Ol),R0={config:Z0},eh=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 Il(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Il(e[n],t[n]))}),El(El({},e),t)}var th={type:"cancelation",msg:"operation is manually canceled"};function as(e){var t=!1,n=new Promise(function(a,r){e.then(function(o){return t?r(th):a(o)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var rh=["monaco"],nh=Y0.create({config:q0,isInitialized:!1,resolve:null,reject:null,monaco:null}),Al=O0(nh,2),On=Al[0],ka=Al[1];function ah(e){var t=R0.config(e),n=t.monaco,a=N0(t,rh);ka(function(r){return{config:Il(r.config,a),monaco:n}})}function oh(){var e=On(function(t){var n=t.monaco,a=t.isInitialized,r=t.resolve;return{monaco:n,isInitialized:a,resolve:r}});if(!e.isInitialized){if(ka({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),as(os);if(window.monaco&&window.monaco.editor)return Ll(window.monaco),e.resolve(window.monaco),as(os);eh(sh,lh)(ch)}return as(os)}function sh(e){return document.body.appendChild(e)}function ih(e){var t=document.createElement("script");return e&&(t.src=e),t}function lh(e){var t=On(function(a){var r=a.config,o=a.reject;return{config:r,reject:o}}),n=ih("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function ch(){var e=On(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;Ll(a),e.resolve(a)},function(n){e.reject(n)})}function Ll(e){On().monaco||ka({monaco:e})}function dh(){return On(function(e){var t=e.monaco;return t})}var os=new Promise(function(e,t){return ka({resolve:e,reject:t})}),_l={config:ah,init:oh,__getMonacoInstance:dh},uh={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ss=uh,fh={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},gh=fh;function hh({children:e}){return b.createElement("div",{style:gh.container},e)}var ph=hh,bh=ph;function mh({width:e,height:t,isEditorReady:n,loading:a,_ref:r,className:o,wrapperProps:s}){return b.createElement("section",{style:{...ss.wrapper,width:e,height:t},...s},!n&&b.createElement(bh,null,a),b.createElement("div",{ref:r,style:{...ss.fullWidth,...!n&&ss.hide},className:o}))}var vh=mh,Dl=b.memo(vh);function yh(e){b.useEffect(e,[])}var Pl=yh;function xh(e,t,n=!0){let a=b.useRef(!0);b.useEffect(a.current||!n?()=>{a.current=!1}:e,t)}var Vt=xh;function Mn(){}function Yr(e,t,n,a){return wh(e,a)||kh(e,t,n,a)}function wh(e,t){return e.editor.getModel($l(e,t))}function kh(e,t,n,a){return e.editor.createModel(t,n,a?$l(e,a):void 0)}function $l(e,t){return e.Uri.parse(t)}function Ch({original:e,modified:t,language:n,originalLanguage:a,modifiedLanguage:r,originalModelPath:o,modifiedModelPath:s,keepCurrentOriginalModel:i=!1,keepCurrentModifiedModel:l=!1,theme:g="light",loading:d="Loading...",options:u={},height:f="100%",width:h="100%",className:v,wrapperProps:p={},beforeMount:x=Mn,onMount:m=Mn}){let[T,C]=b.useState(!1),[S,N]=b.useState(!0),E=b.useRef(null),k=b.useRef(null),y=b.useRef(null),w=b.useRef(m),A=b.useRef(x),D=b.useRef(!1);Pl(()=>{let U=_l.init();return U.then(O=>(k.current=O)&&N(!1)).catch(O=>O?.type!=="cancelation"&&console.error("Monaco initialization: error:",O)),()=>E.current?L():U.cancel()}),Vt(()=>{if(E.current&&k.current){let U=E.current.getOriginalEditor(),O=Yr(k.current,e||"",a||n||"text",o||"");O!==U.getModel()&&U.setModel(O)}},[o],T),Vt(()=>{if(E.current&&k.current){let U=E.current.getModifiedEditor(),O=Yr(k.current,t||"",r||n||"text",s||"");O!==U.getModel()&&U.setModel(O)}},[s],T),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],T),Vt(()=>{E.current?.getModel()?.original.setValue(e||"")},[e],T),Vt(()=>{let{original:U,modified:O}=E.current.getModel();k.current.editor.setModelLanguage(U,a||n||"text"),k.current.editor.setModelLanguage(O,r||n||"text")},[n,a,r],T),Vt(()=>{k.current?.editor.setTheme(g)},[g],T),Vt(()=>{E.current?.updateOptions(u)},[u],T);let F=b.useCallback(()=>{if(!k.current)return;A.current(k.current);let U=Yr(k.current,e||"",a||n||"text",o||""),O=Yr(k.current,t||"",r||n||"text",s||"");E.current?.setModel({original:U,modified:O})},[n,t,r,e,a,o,s]),M=b.useCallback(()=>{!D.current&&y.current&&(E.current=k.current.editor.createDiffEditor(y.current,{automaticLayout:!0,...u}),F(),k.current?.editor.setTheme(g),C(!0),D.current=!0)},[u,g,F]);b.useEffect(()=>{T&&w.current(E.current,k.current)},[T]),b.useEffect(()=>{!S&&!T&&M()},[S,T,M]);function L(){let U=E.current?.getModel();i||U?.original?.disp Line truncated
`},hu=qy(Ry)(fu),ev={config:Qy},tv=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(s){return n.reduceRight(function(o,i){return i(o)},s)}};function gu(t,e){return Object.keys(e).forEach(function(n){e[n]instanceof Object&&t[n]&&Object.assign(e[n],gu(t[n],e[n]))}),cu(cu({},t),e)}var nv={type:"cancelation",msg:"operation is manually canceled"};function rl(t){var e=!1,n=new Promise(function(r,s){t.then(function(o){return e?s(nv):r(o)}),t.catch(s)});return n.cancel=function(){return e=!0},n}var rv=["monaco"],sv=Xy.create({config:Ky,isInitialized:!1,resolve:null,reject:null,monaco:null}),pu=Oy(sv,2),Ns=pu[0],Wo=pu[1];function ov(t){var e=ev.config(t),n=e.monaco,r=My(e,rv);Wo(function(s){return{config:gu(s.config,r),monaco:n}})}function iv(){var t=Ns(function(e){var n=e.monaco,r=e.isInitialized,s=e.resolve;return{monaco:n,isInitialized:r,resolve:s}});if(!t.isInitialized){if(Wo({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),rl(sl);if(window.monaco&&window.monaco.editor)return mu(window.monaco),t.resolve(window.monaco),rl(sl);tv(av,cv)(dv)}return rl(sl)}function av(t){return document.body.appendChild(t)}function lv(t){var e=document.createElement("script");return t&&(e.src=t),e}function cv(t){var e=Ns(function(r){var s=r.config,o=r.reject;return{config:s,reject:o}}),n=lv("".concat(e.config.paths.vs,"/loader.js"));return n.onload=function(){return t()},n.onerror=e.reject,n}function dv(){var t=Ns(function(n){var r=n.config,s=n.resolve,o=n.reject;return{config:r,resolve:s,reject:o}}),e=window.require;e.config(t.config),e(["vs/editor/editor.main"],function(n){var r=n.m;mu(r),t.resolve(r)},function(n){t.reject(n)})}function mu(t){Ns().monaco||Wo({monaco:t})}function uv(){return Ns(function(t){var e=t.monaco;return e})}var sl=new Promise(function(t,e){return Wo({resolve:t,reject:e})}),bu={config:ov,init:iv,__getMonacoInstance:uv},fv={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ol=fv,hv={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},gv=hv;function pv({children:t}){return v.createElement("div",{style:gv.container},t)}var mv=pv,bv=mv;function yv({width:t,height:e,isEditorReady:n,loading:r,_ref:s,className:o,wrapperProps:i}){return v.createElement("section",{style:{...ol.wrapper,width:t,height:e},...i},!n&&v.createElement(bv,null,r),v.createElement("div",{ref:s,style:{...ol.fullWidth,...!n&&ol.hide},className:o}))}var vv=yv,yu=v.memo(vv);function xv(t){v.useEffect(t,[])}var vu=xv;function wv(t,e,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:t,e)}var nn=wv;function Os(){}function zr(t,e,n,r){return kv(t,r)||Cv(t,e,n,r)}function kv(t,e){return t.editor.getModel(xu(t,e))}function Cv(t,e,n,r){return t.editor.createModel(e,n,r?xu(t,r):void 0)}function xu(t,e){return t.Uri.parse(e)}function Sv({original:t,modified:e,language:n,originalLanguage:r,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:i,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:d="Loading...",options:u={},height:f="100%",width:g="100%",className:m,wrapperProps:p={},beforeMount:y=Os,onMount:b=Os}){let[S,x]=v.useState(!1),[E,k]=v.useState(!0),C=v.useRef(null),N=v.useRef(null),_=v.useRef(null),w=v.useRef(b),M=v.useRef(y),O=v.useRef(!1);vu(()=>{let D=bu.init();return D.then(A=>(N.current=A)&&k(!1)).catch(A=>A?.type!=="cancelation"&&console.error("Monaco initialization: error:",A)),()=>C.current?F():D.cancel()}),nn(()=>{if(C.current&&N.current){let D=C.current.getOriginalEditor(),A=zr(N.current,t||"",r||n||"text",o||"");A!==D.getModel()&&D.setModel(A)}},[o],S),nn(()=>{if(C.current&&N.current){let D=C.current.getModifiedEditor(),A=zr(N.current,e||"",s||n||"text",i||"");A!==D.getModel()&&D.setModel(A)}},[i],S),nn(()=>{let D=C.current.getModifiedEditor();D.getOption(N.current.editor.EditorOption.readOnly)?D.setValue(e||""):e!==D.getValue()&&(D.executeEdits("",[{range:D.getModel().getFullModelRange(),text:e||"",forceMoveMarkers:!0}]),D.pushUndoStop())},[e],S),nn(()=>{C.current?.getModel()?.original.setValue(t||"")},[t],S),nn(()=>{let{original:D,modified:A}=C.current.getModel();N.current.editor.setModelLanguage(D,r||n||"text"),N.current.editor.setModelLanguage(A,s||n||"text")},[n,r,s],S),nn(()=>{N.current?.editor.setTheme(c)},[c],S),nn(()=>{C.current?.updateOptions(u)},[u],S);let L=v.useCallback(()=>{if(!N.current)return;M.current(N.current);let D=zr(N.current,t||"",r||n||"text",o||""),A=zr(N.current,e||"",s||n||"text",i||"");C.current?.setModel({original:D,modified:A})},[n,e,s,t,r,o,i]),$=v.useCallback(()=>{!O.current&&_.current&&(C.current=N.current.editor.createDiffEditor(_.current,{automaticLayout:!0,...u}),L(),N.current?.editor.setTheme(c),x(!0),O.current=!0)},[u,c,L]);v.useEffect(()=>{S&&w.current(C.current,N.current)},[S]),v.useEffect(()=>{!E&&!S&&$()},[E,S,$]);function F(){let D=C.current?.getModel();a||D?.original?.disp Line truncated
p-3 rounded-lg border cursor-pointer transition-colors
${t?"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:a,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:["버전 ",e.version]}),c.jsx(Z,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:Lh(e.created_at)})]}),c.jsxs(_,{className:"flex gap-3 text-sm",children:[c.jsxs(Z,{className:"text-green-600 dark:text-green-400",children:["+",e.changes_summary.added]}),c.jsxs(Z,{className:"text-red-600 dark:text-red-400",children:["-",e.changes_summary.removed]})]})]})})});Fl.displayName="VersionListItem";const Ul=({versions:e,selectedId:t,onSelect:n})=>e.length===0?c.jsx(_,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"버전이 없습니다."}):c.jsx(Lo,{role:"list",className:"space-y-2",children:e.map(a=>c.jsx(Fl,{version:a,isSelected:t===a.id,onSelect:n},a.id))}),_h=({layoutId:e,versions:t,onRestore:n})=>{const[a,r]=b.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(Ul,{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:"복원"})})]})},Dh=({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:d="Please enter your password.",onSubmit:u,loadingActions:f={},isLoading:h=!1,disabled:v=!1,apiError:p="",className:x="",style:m})=>{const[T,C]=b.useState(""),[S,N]=b.useState(""),[E,k]=b.useState({}),y=p,w=Object.values(f).some(L=>L===!0),A=h||w,D=v||A,F=()=>{const L={},U=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!T||T.trim()===""?L.email=l:U.test(T)||(L.email=g),(!S||S.trim()==="")&&(L.password=d),k(L),Object.keys(L).length===0},M=async L=>{if(!F()){L.preventDefault();return}k({}),u?await u(L):L.preventDefault()};return c.jsx(_,{className:`w-full ${x}`,style:m,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(ut,{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:T,onChange:L=>C(L.target.value),placeholder:r,disabled:D,className:`
${e?"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:r,children:h.jsxs(I,{className:"flex justify-between items-start",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Q,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",t.version]}),h.jsx(Q,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:Iv(t.created_at)})]}),h.jsxs(I,{className:"flex gap-3 text-sm",children:[h.jsxs(Q,{className:"text-green-600 dark:text-green-400",children:["+",t.changes_summary.added]}),h.jsxs(Q,{className:"text-red-600 dark:text-red-400",children:["-",t.changes_summary.removed]})]})]})})});wu.displayName="VersionListItem";const ku=({versions:t,selectedId:e,onSelect:n})=>t.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"버전이 없습니다."}):h.jsx(Aa,{role:"list",className:"space-y-2",children:t.map(r=>h.jsx(wu,{version:r,isSelected:e===r.id,onSelect:n},r.id))}),Lv=({layoutId:t,versions:e,onRestore:n})=>{const[r,s]=v.useState(),o=l=>{s(l)},i=()=>{r!==void 0&&n(r)},a=r===void 0;return h.jsxs(I,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[h.jsx(I,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:h.jsx(ku,{versions:e,selectedId:r,onSelect:o})}),h.jsx(I,{className:"flex justify-end",children:h.jsx(oe,{variant:"primary",disabled:a,onClick:i,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Pv=({emailLabel:t="Email",passwordLabel:e="Password",submitButtonText:n="Sign In",processingText:r="Processing...",emailPlaceholder:s="Email",passwordPlaceholder:o="Password",forgotPasswordText:i="Forgot your password?",forgotPasswordUrl:a="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:c="Please enter a valid email address.",passwordRequiredError:d="Please enter your password.",onSubmit:u,loadingActions:f={},isLoading:g=!1,disabled:m=!1,apiError:p="",className:y="",style:b})=>{const[S,x]=v.useState(""),[E,k]=v.useState(""),[C,N]=v.useState({}),_=p,w=Object.values(f).some(F=>F===!0),M=g||w,O=m||M,L=()=>{const F={},D=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!S||S.trim()===""?F.email=l:D.test(S)||(F.email=c),(!E||E.trim()==="")&&(F.password=d),N(F),Object.keys(F).length===0},$=async F=>{if(!L()){F.preventDefault();return}N({}),u?await u(F):F.preventDefault()};return h.jsx(I,{className:`w-full ${y}`,style:b,children:h.jsxs(Ia,{onSubmit:$,className:"space-y-6",noValidate:!0,children:[_&&h.jsx(I,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:h.jsx(bt,{className:"text-sm text-red-600 dark:text-red-400",children:_})}),h.jsxs(I,{children:[h.jsx(en,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t}),h.jsx(wt,{id:"email",name:"email",type:"email",value:S,onChange:F=>x(F.target.value),placeholder:s,disabled:O,className:`
w-full px-4 py-3 rounded-lg border
${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"}
${C.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
`}),E.email&&c.jsx(ut,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E.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:S,onChange:L=>N(L.target.value),placeholder:o,disabled:D,className:`
`}),C.email&&h.jsx(bt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C.email})]}),h.jsxs(I,{children:[h.jsx(en,{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),h.jsx(wt,{id:"password",name:"password",type:"password",value:E,onChange:F=>k(F.target.value),placeholder:o,disabled:O,className:`
w-full px-4 py-3 rounded-lg border
${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"}
${C.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
`}),E.password&&c.jsx(ut,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E.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:`
`}),C.password&&h.jsx(bt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C.password})]}),a&&h.jsx(I,{className:"flex items-center justify-end",children:h.jsx(Lr,{href:a,className:"text-sm text-blue-600 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300 transition-colors duration-200",children:i})}),h.jsx(oe,{type:"submit",disabled:O,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,16 +146,16 @@ 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})]})})},Vl=e=>e==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e,is=e=>{const t=Vl(e);document.documentElement.setAttribute("data-theme",t),t==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},Ph=()=>{const e=localStorage.getItem("g7_color_scheme");return e&&["auto","light","dark"].includes(e)?e:"auto"},$h=({onThemeChange:e,className:t="",autoText:n="System",lightText:a="Light",darkText:r="Dark"})=>{const o=Ph(),[s,i]=b.useState(o),[l,g]=b.useState(!1),d=b.useRef(null);b.useEffect(()=>{is(s)},[]),b.useEffect(()=>{if(s!=="auto")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>{is("auto")};return h.addEventListener("change",v),()=>h.removeEventListener("change",v)},[s]),b.useEffect(()=>{const h=v=>{d.current&&!d.current.contains(v.target)&&g(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const u=h=>{i(h),localStorage.setItem("g7_color_scheme",h),is(h),g(!1),e?.(h)},f=()=>Vl(s)==="dark"?de.Moon:de.Sun;return c.jsxs(_,{ref:d,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:()=>u("auto"),className:`
`,children:M?h.jsxs(h.Fragment,{children:[h.jsxs(Hn,{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:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.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"})]}),r]}):n})]})})},Cu=t=>t==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,il=t=>{const e=Cu(t);document.documentElement.setAttribute("data-theme",e),e==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},$v=()=>{const t=localStorage.getItem("g7_color_scheme");return t&&["auto","light","dark"].includes(t)?t:"auto"},Fv=({onThemeChange:t,className:e="",autoText:n="System",lightText:r="Light",darkText:s="Dark",id:o,editorAttrs:i})=>{const a=$v(),[l,c]=v.useState(a),[d,u]=v.useState(!1),f=v.useRef(null);v.useEffect(()=>{il(l)},[]),v.useEffect(()=>{if(l!=="auto")return;const p=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{il("auto")};return p.addEventListener("change",y),()=>p.removeEventListener("change",y)},[l]),v.useEffect(()=>{const p=y=>{f.current&&!f.current.contains(y.target)&&u(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const g=p=>{c(p),localStorage.setItem("g7_color_scheme",p),il(p),u(!1),t?.(p)},m=()=>Cu(l)==="dark"?de.Moon:de.Sun;return h.jsxs(I,{ref:f,className:`relative ${e}`,id:o,...i,children:[h.jsx(oe,{onClick:()=>u(!d),className:"w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors","aria-label":"Toggle theme",children:h.jsx(re,{name:m(),className:"text-sm text-slate-500 dark:text-slate-400"})}),d&&h.jsx(I,{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:h.jsxs(I,{className:"py-2",children:[h.jsxs(oe,{onClick:()=>g("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:de.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:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(re,{onClick:()=>u("light"),className:`
${l==="auto"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[h.jsx(re,{name:de.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),l==="auto"&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),h.jsxs(oe,{onClick:()=>g("light"),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==="light"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[c.jsx(ne,{name:de.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:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),c.jsxs(re,{onClick:()=>u("dark"),className:`
${l==="light"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[h.jsx(re,{name:de.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),l==="light"&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),h.jsxs(oe,{onClick:()=>g("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:de.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:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Hl=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)},jl=(e,t)=>window.G7Core?.t?.(e,t)??e,Fh=()=>window.G7Core,Uh=({id:e,columns:t,visibleColumns:n,onColumnVisibilityChange:a,triggerLabel:r,triggerIconName:o=de.Sliders,position:s="right",className:i="",style:l,requiredText:g,menuTitle:d,menuDescription:u,defaultColumns:f,triggerClassName:h,labelClassName:v,dynamicColumns:p,dynamicColumnsInsertAfter:x})=>{const m=r??jl("common.column_selector"),T=g??jl("common.required"),C=b.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]=b.useState(!1),E=b.useRef(null),k=b.useRef(null),[y,w]=b.useState(!1),[A,D]=b.useState(s),F=b.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){Hl.warn("Failed to load from localStorage:",B)}return null},U=B=>{if(M)try{localStorage.setItem(M,JSON.stringify(B))}catch(V){Hl.warn("Failed to save to localStorage:",V)}},O=()=>{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]=b.useState(O);b.useEffect(()=>{y||(a&&I.length>0&&a(I),w(!0))},[y,a,I]),b.useEffect(()=>{y&&n&&n.length>0&&(L()||H(n))},[n,y]);const $=b.useRef([]),z=b.useRef(null);b.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;b.useEffect(()=>{const B=V=>{E.current&&!E.current.contains(V.target)&&N(!1)};return S&&document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[S]),b.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?D("left"):D("right"):V.left+R>Y?D("right"):D("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(_,{ref:E,className:`relative inline-block ${i}`,style:l,children:[c.jsxs(re,{onClick:()=>N(!S),className:Fh()?.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"}),m&&c.jsx(Z,{className:`${v||"hidden sm:inline"} text-sm`,children:m})]}),S&&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:[(d||u)&&c.jsxs(_,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[d&&c.jsx(Z,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:d}),u&&c.jsx(Z,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:u})]}),c.jsx(_,{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(_,{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&&T&&c.jsx(Z,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:T})]},B.field)})})]})]})},Vh=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)},Hh=({className:e="",style:t})=>{const[n,a]=b.useState(!1);return b.useEffect(()=>{const r=window.G7Core?.Tr Line truncated
${l==="dark"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[h.jsx(re,{name:de.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"flex-1 text-left text-gray-900 dark:text-white",children:s}),l==="dark"&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Su=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...t)=>console.log("[Comp:ColumnSelector]",...t),warn:(...t)=>console.warn("[Comp:ColumnSelector]",...t),error:(...t)=>console.error("[Comp:ColumnSelector]",...t)},_u=(t,e)=>window.G7Core?.t?.(t,e)??t,Vv=()=>window.G7Core,zv=({id:t,columns:e,visibleColumns:n,onColumnVisibilityChange:r,triggerLabel:s,triggerIconName:o=de.Sliders,position:i="right",className:a="",style:l,requiredText:c,menuTitle:d,menuDescription:u,defaultColumns:f,triggerClassName:g,labelClassName:m,dynamicColumns:p,dynamicColumnsInsertAfter:y,editorAttrs:b})=>{const S=s??_u("common.column_selector"),x=c??_u("common.required"),E=v.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return e;if(y){const z=e.findIndex(K=>K.field===y);if(z!==-1)return[...e.slice(0,z+1),...p,...e.slice(z+1)]}return[...e,...p]},[e,p,y]),[k,C]=v.useState(!1),N=v.useRef(null),_=v.useRef(null),[w,M]=v.useState(!1),[O,L]=v.useState(i),$=v.useMemo(()=>{try{const z=window.G7Core?.AuthManager?.getInstance();return z?z.getUser()?.uuid:void 0}catch{return}},[]),F=t?`g7_columns_${t}${$!==void 0?`_${$}`:""}`:null,D=()=>{if(!F)return null;try{const z=localStorage.getItem(F);if(z){const K=JSON.parse(z);if(Array.isArray(K)&&K.length>0)return K}}catch(z){Su.warn("Failed to load from localStorage:",z)}return null},A=z=>{if(F)try{localStorage.setItem(F,JSON.stringify(z))}catch(K){Su.warn("Failed to save to localStorage:",K)}},T=()=>{const z=D();return z||(n&&n.length>0?n:f&&f.length>0?f:E.filter(K=>K.visible!==!1).map(K=>K.field))},[V,H]=v.useState(T);v.useEffect(()=>{w||(r&&V.length>0&&r(V),M(!0))},[w,r,V]),v.useEffect(()=>{w&&n&&n.length>0&&(D()||H(n))},[n,w]);const W=v.useRef([]),j=v.useRef(null);v.useEffect(()=>{if(w&&p&&p.length>0){const z=p.map(Z=>Z.field);if(j.current===null){const Z=D();if(j.current=Z!==null,Z!==null){W.current=z;return}}const K=W.current,X=z.filter(Z=>!K.includes(Z));if(X.length>0){const Z=n&&n.length>0?n:V,ee=X.filter(ne=>!Z.includes(ne));if(ee.length>0){const ne=[...Z,...ee];H(ne),A(ne),r?.(ne)}}W.current=z}},[p,w]);const U=n&&n.length>0?n:V;v.useEffect(()=>{const z=K=>{N.current&&!N.current.contains(K.target)&&C(!1)};return k&&document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[k]),v.useEffect(()=>{if(k&&_.current&&N.current){const z=_.current.getBoundingClientRect(),K=N.current.getBoundingClientRect(),X=window.innerWidth,Z=z.width||256;i==="right"?K.right-Z<0?L("left"):L("right"):K.left+Z>X?L("right"):L("left")}},[k,i]);const B=z=>{if(E.find(Z=>Z.field===z)?.required)return;const X=U.includes(z)?U.filter(Z=>Z!==z):[...U,z];H(X),A(X),r?.(X)},G=O==="left"?"left-0":"right-0";return h.jsxs(I,{ref:N,className:`relative inline-block ${a}`,style:l,id:t,...b,children:[h.jsxs(oe,{onClick:()=>C(!k),className:Vv()?.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",g)??`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 ${g??""}`,children:[h.jsx(re,{name:o,className:"w-5 h-5"}),S&&h.jsx(Q,{className:`${m||"hidden sm:inline"} text-sm`,children:S})]}),k&&h.jsxs(I,{ref:_,className:`absolute ${G} 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:[(d||u)&&h.jsxs(I,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[d&&h.jsx(Q,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:d}),u&&h.jsx(Q,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:u})]}),h.jsx(I,{className:"p-2 max-h-64 overflow-y-auto",children:E.map(z=>{const K=U.includes(z.field),X=z.required===!0;return h.jsxs(I,{onClick:()=>!X&&B(z.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${X?"cursor-default":"cursor-pointer"}`,children:[h.jsx(vn,{checked:K,disabled:X,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),h.jsx(Q,{className:"text-sm text-gray-700 dark:text-gray-300",children:z.header}),X&&x&&h.jsx(Q,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:x})]},z.field)})})]})]})},Hv=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...t)=>console.log("[Comp:PageTransition]",...t),warn:(...t)=>console.warn("[Comp:PageTransition]",...t),error:(...t)=>console.error("[Comp:PageTransition]",...t)},Uv=({className:t="",style:e})=>{const[n,r]=v.useState(!1);return v.useEffect(()=>{c Line truncated
@keyframes loading {
0% {
transform: translateX(-100%);
@@ -208,19 +167,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
transform: translateX(-100%);
}
}
`})]}):null},jh=(e,t)=>window.G7Core?.t?.(e,t)??e,zh=({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||jh("nav.loading")})]})};function Tr(e){"@babel/helpers - typeof";return Tr=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},Tr(e)}function Gh(e,t){if(Tr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Tr(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zl(e){var t=Gh(e,"string");return Tr(t)=="symbol"?t:t+""}function In(e,t,n){return(t=zl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gl(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?Gl(Object(n),!0).forEach(function(a){In(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gl(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Bh(e){if(Array.isArray(e))return e}function Wh(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(d){g=!0,r=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(g)throw r}}return i}}function ls(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 Bl(e,t){if(e){if(typeof e=="string")return ls(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)?ls(e,t):void 0}}function Yh(){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 Bh(e)||Wh(e,t)||Bl(e,t)||Yh()}function qh(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=qh(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 Kh=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Wl(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,d=e.onInputChange,u=e.onMenuClose,f=e.onMenuOpen,h=e.value,v=sr(e,Kh),p=b.useState(i!==void 0?i:n),x=hr(p,2),m=x[0],T=x[1],C=b.useState(l!==void 0?l:r),S=hr(C,2),N=S[0],E=S[1],k=b.useState(h!==void 0?h:s),y=hr(k,2),w=y[0],A=y[1],D=b.useCallback(function(H,$){typeof g=="function"&&g(H,$),A(H)},[g]),F=b.useCallback(function(H,$){var z;typeof d=="function"&&(z=d(H,$)),T(z!==void 0?z:H)},[d]),M=b.useCallback(function(){typeof f=="function"&&f(),E(!0)},[f]),L=b.useCallback(function(){typeof u=="function"&&u(),E(!1)},[u]),U=i!==void 0?i:m,O=l!==void 0?l:N,I=h!==void 0?h:w;return Ee(Ee({},v),{},{inputValue:U,menuIsOpen:O,onChange:D,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 Xh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yl(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,zl(a.key),a)}}function Zh(e,t,n){return t&&Yl(e.prototype,t),n&&Yl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cs(e,t){return cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cs(e,t)}function Qh(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&&cs(e,t)}function Sa(e){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sa(e)}function ql(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ql=function(){return!!e})()}function Jh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rh(e,t){if(t&&(Tr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jh(e)}function ep(e){var t=ql();return function(){var n,a=Sa(e);if(t){var r=Sa(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Rh(this,n)}}function tp(e){if(Array.isArray(e))return ls(e)}function rp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function np(){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 tp(e)||rp(e)||Bl(e)||np()}function ap(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 op(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 sp=(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(op(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ap(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-",Ea="-moz-",Ke="-webkit-",Kl="comm",ds="rule",us="decl",ip="@import",Xl="@keyframes",lp="@layer",cp=Math.abs,Na=String.fromCharCode,dp=Object.assign;function up(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 Zl(e){return e.trim()}function fp(e,t){return(e=t.exec(e))?e[0]:e}function Xe(e,t,n){return e.replace(t,n)}function fs(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 gs(e){return e.length}function Ta(e,t){return t.push(e),e}function gp(e,t){return e.map(t).join("")}var Oa=1,Kr=1,Ql=0,Dt=0,gt=0,Xr="";function Ma(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 dp(Ma("",null,null,"",null,null,0),e,{length:-e.length},t)}function hp(){return gt}function pp(){return gt=Dt>0?yt(Xr,--Dt):0,Kr--,gt===10&&(Kr=1,Oa--),gt}function Ht(){return gt=Dt<Ql?yt(Xr,Dt++):0,Kr++,gt===10&&(Kr=1,Oa++),gt}function lr(){return yt(Xr,Dt)}function Ia(){return Dt}function _n(e,t){return An(Xr,e,t)}function Dn(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 Jl(e){return Oa=Kr=1,Ql=ir(Xr=e),Dt=0,[]}function Rl(e){return Xr="",e}function Aa(e){return Zl(_n(Dt-1,hs(e===91?e+2:e===40?e+1:e)))}function bp(e){for(;(gt=lr())&&gt<33;)Ht();return Dn(e)>2||Dn(gt)>3?"":" "}function mp(e,t){for(;--t&&Ht()&&!(gt<48||gt>102||gt>57&&gt<65||gt>70&&gt<97););return _n(e,Ia()+(t<6&&lr()==32&&Ht()==32))}function hs(e){for(;Ht();)switch(gt){case e:return Dt;case 34:case 39:e!==34&&e!==39&&hs(gt);break;case 40:e===41&&hs(e);break;case 92:Ht();break}return Dt}function vp(e,t){for(;Ht()&&e+gt!==57;)if(e+gt===84&&lr()===47)break;return"/*"+_n(t,Dt-1)+"*"+Na(e===47?e:Ht())}function yp(e){for(;!Dn(lr());)Ht();return _n(e,Dt)}function xp(e){return Rl(La("",null,null,null,[""],e=Jl(e),0,[0],e))}function La(e,t,n,a,r,o,s,i,l){for(var g=0,d=0,u=s,f=0,h=0,v=0,p=1,x=1,m=1,T=0,C="",S=r,N=o,E=a,k=C;x;)switch(v=T,T=Ht()){case 40:if(v!=108&&yt(k,u-1)==58){fs(k+=Xe(Aa(T),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:k+=Aa(T);break;case 9:case 10:case 13:case 32:k+=bp(v);break;case 92:k+=mp(Ia()-1,7);continue;case 47:switch(lr()){case 42:case 47:Ta(wp(vp(Ht(),Ia()),t,n),l);break;default:k+="/"}break;case 123*p:i[g++]=ir(k)*m;case 125*p:case 59:case 0:switch(T){case 0:case 125:x=0;case 59+d:m==-1&&(k=Xe(k,/\f/g,"")),h>0&&ir(k)-u&&Ta(h>32?tc(k+";",a,n,u-1):tc(Xe(k," ","")+";",a,n,u-2),l);break;case 59:k+=";";default:if(Ta(E=ec(k,t,n,g,d,r,i,C,S=[],N=[],u),o),T===123)if(d===0)La(k,t,E,E,S,o,u,i,N);else switch(f===99&&yt(k,3)===110?100:f){case 100:case 108:case 109:case 115:La(e,E,E,a&&Ta(ec(e,E,E,0,0,r,i,C,r,S=[],u),N),r,N,u,i,a?S:N);break;default:La(k,E,E,E,[""],N,0,i,N)}}g=d=h=0,p=m=1,C=k="",u=s;break;case 58:u=1+ir(k),h=v;default:if(p<1){if(T==123)--p;else if(T==125&&p++==0&&pp()==125)continue}switch(k+=Na(T),T*p){case 38:m=d>0?1:(k+="\f",-1);break;case 44:i[g++]=(ir(k)-1)*m,m=1;break;case 64:lr()===45&&(k+=Aa(Ht())),f=lr(),d=u=ir(C=k+=yp(Ia())),T++;break;case 45:v===45&&ir(k)==2&&(p=0)}}return o}function ec(e,t,n,a,r,o,s,i,l,g,d){for(var u=r-1,f=r===0?o:[""],h=gs(f),v=0,p=0,x=0;v<a;++v)for(var m=0,T=An(e,u+1,u=cp(p=s[v])),C=e;m<h;++m)(C=Zl(p>0?f[m]+" "+T:Xe(T,/&\f/g,f[m])))&&(l[x++]=C);retu Line truncated
`})]}):null},Bv=(t,e)=>window.G7Core?.t?.(t,e)??t,jv=({options:t})=>{const e=document.documentElement.classList.contains("dark"),n=e?"rgb(17,24,39)":"rgb(249,250,251)",r=e?"#6b7280":"#9ca3af",s=e?"#9ca3af":"#6b7280";return h.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:[h.jsx("div",{style:{width:"32px",height:"32px",border:`3px solid ${r}`,borderTopColor:"transparent",borderRadius:"50%",animation:"g7-spin 0.8s linear infinite"}}),h.jsx("span",{style:{color:s,fontSize:"14px"},children:t?.text||Bv("nav.loading")})]})};function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function Wv(t,e){if(fr(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(fr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Eu(t){var e=Wv(t,"string");return fr(e)=="symbol"?e:e+""}function Ts(t,e,n){return(e=Eu(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Oe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){Ts(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gv(t){if(Array.isArray(t))return t}function Yv(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function al(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Nu(t,e){if(t){if(typeof t=="string")return al(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?al(t,e):void 0}}function Xv(){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 Un(t,e){return Gv(t)||Yv(t,e)||Nu(t,e)||Xv()}function Kv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function On(t,e){if(t==null)return{};var n,r,s=Kv(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}var qv=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ou(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,s=r===void 0?!1:r,o=t.defaultValue,i=o===void 0?null:o,a=t.inputValue,l=t.menuIsOpen,c=t.onChange,d=t.onInputChange,u=t.onMenuClose,f=t.onMenuOpen,g=t.value,m=On(t,qv),p=v.useState(a!==void 0?a:n),y=Un(p,2),b=y[0],S=y[1],x=v.useState(l!==void 0?l:s),E=Un(x,2),k=E[0],C=E[1],N=v.useState(g!==void 0?g:i),_=Un(N,2),w=_[0],M=_[1],O=v.useCallback(function(V,H){typeof c=="function"&&c(V,H),M(V)},[c]),L=v.useCallback(function(V,H){var W;typeof d=="function"&&(W=d(V,H)),S(W!==void 0?W:V)},[d]),$=v.useCallback(function(){typeof f=="function"&&f(),C(!0)},[f]),F=v.useCallback(function(){typeof u=="function"&&u(),C(!1)},[u]),D=a!==void 0?a:b,A=l!==void 0?l:k,T=g!==void 0?g:w;return Oe(Oe({},m),{},{inputValue:D,menuIsOpen:A,onChange:O,onInputChange:L,onMenuClose:F,onMenuOpen:$,value:T})}function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},De.apply(null,arguments)}function Zv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Eu(r.key),r)}}function Qv(t,e,n){return e&&Tu(t.prototype,e),n&&Tu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ll(t,e){return ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ll(t,e)}function Jv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ll(t,e)}function Yo(t){return Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yo(t)}function Au(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Au=function(){return!!t})()}function Rv(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ex(t,e){if(e&&(fr(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rv(t)}function tx(t){var e=Au();return function(){var n,r=Yo(t);if(e){var s=Yo(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return ex(this,n)}}function nx(t){if(Array.isArray(t))return al(t)}function rx(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sx(){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 Hr(t){return nx(t)||rx(t)||Nu(t)||sx()}function ox(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function ix(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ax=(function(){function t(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},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 e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ix(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ox(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},t})(),$t="-ms-",Xo="-moz-",et="-webkit-",Du="comm",cl="rule",dl="decl",lx="@import",Iu="@keyframes",cx="@layer",dx=Math.abs,Ko=String.fromCharCode,ux=Object.assign;function fx(t,e){return It(t,0)^45?(((e<<2^It(t,0))<<2^It(t,1))<<2^It(t,2))<<2^It(t,3):0}function Lu(t){return t.trim()}function hx(t,e){return(t=e.exec(t))?t[0]:t}function tt(t,e,n){return t.replace(e,n)}function ul(t,e){return t.indexOf(e)}function It(t,e){return t.charCodeAt(e)|0}function As(t,e,n){return t.slice(e,n)}function Tn(t){return t.length}function fl(t){return t.length}function qo(t,e){return e.push(t),t}function gx(t,e){return t.map(e).join("")}var Zo=1,Ur=1,Pu=0,Xt=0,kt=0,Br="";function Qo(t,e,n,r,s,o,i){return{value:t,root:e,parent:n,type:r,props:s,children:o,line:Zo,column:Ur,length:i,return:""}}function Ds(t,e){return ux(Qo("",null,null,"",null,null,0),t,{length:-t.length},e)}function px(){return kt}function mx(){return kt=Xt>0?It(Br,--Xt):0,Ur--,kt===10&&(Ur=1,Zo--),kt}function rn(){return kt=Xt<Pu?It(Br,Xt++):0,Ur++,kt===10&&(Ur=1,Zo++),kt}function An(){return It(Br,Xt)}function Jo(){return Xt}function Is(t,e){return As(Br,t,e)}function Ls(t){switch(t){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 $u(t){return Zo=Ur=1,Pu=Tn(Br=t),Xt=0,[]}function Fu(t){return Br="",t}function Ro(t){return Lu(Is(Xt-1,hl(t===91?t+2:t===40?t+1:t)))}function bx(t){for(;(kt=An())&&kt<33;)rn();return Ls(t)>2||Ls(kt)>3?"":" "}function yx(t,e){for(;--e&&rn()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Is(t,Jo()+(e<6&&An()==32&&rn()==32))}function hl(t){for(;rn();)switch(kt){case t:return Xt;case 34:case 39:t!==34&&t!==39&&hl(kt);break;case 40:t===41&&hl(t);break;case 92:rn();break}return Xt}function vx(t,e){for(;rn()&&t+kt!==57;)if(t+kt===84&&An()===47)break;return"/*"+Is(e,Xt-1)+"*"+Ko(t===47?t:rn())}function xx(t){for(;!Ls(An());)rn();return Is(t,Xt)}function wx(t){return Fu(ei("",null,null,null,[""],t=$u(t),0,[0],t))}function ei(t,e,n,r,s,o,i,a,l){for(var c=0,d=0,u=i,f=0,g=0,m=0,p=1,y=1,b=1,S=0,x="",E=s,k=o,C=r,N=x;y;)switch(m=S,S=rn()){case 40:if(m!=108&&It(N,u-1)==58){ul(N+=tt(Ro(S),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:N+=Ro(S);break;case 9:case 10:case 13:case 32:N+=bx(m);break;case 92:N+=yx(Jo()-1,7);continue;case 47:switch(An()){case 42:case 47:qo(kx(vx(rn(),Jo()),e,n),l);break;default:N+="/"}break;case 123*p:a[c++]=Tn(N)*b;case 125*p:case 59:case 0:switch(S){case 0:case 125:y=0;case 59+d:b==-1&&(N=tt(N,/\f/g,"")),g>0&&Tn(N)-u&&qo(g>32?zu(N+";",r,n,u-1):zu(tt(N," ","")+";",r,n,u-2),l);break;case 59:N+=";";default:if(qo(C=Vu(N,e,n,c,d,s,a,x,E=[],k=[],u),o),S===123)if(d===0)ei(N,e,C,C,E,o,u,a,k);else switch(f===99&&It(N,3)===110?100:f){case 100:case 108:case 109:case 115:ei(t,C,C,r&&qo(Vu(t,C,C,0,0,s,a,x,s,E=[],u),k),s,k,u,a,r?E:k);break;default:ei(N,C,C,C,[""],k,0,a,k)}}c=d=g=0,p=b=1,x=N="",u=i;break;case 58:u=1+Tn(N),g=m;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&mx()==125)continue}switch(N+=Ko(S),S*p){case 38:b=d>0?1:(N+="\f",-1);break;case 44:a[c++]=(Tn(N)-1)*b,b=1;break;case 64:An()===45&&(N+=Ro(rn())),f=An(),d=u=Tn(x=N+=xx(Jo())),S++;break;case 45:m===45&&Tn(N)==2&&(p=0)}}return o}function Vu(t,e,n,r,s,o,i,a,l,c,d){for(var u=s-1,f=s===0?o:[""],g=fl(f),m=0,p=0,y=0;m<r;++m)for(var b=0,S=As(t,u+1,u=dx(p=i[m])),x=t;b<g;++b)(x=Lu(p>0?f[b]+" "+S:tt(S,/&\f/g,f[b])))&&(l[y++]=x);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 ac;function Dp(){if(ac)return Ze;ac=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,d=e?Symbol.for("react.forward_ref"):60112,u=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,m=e?Symbol.for("react.responder"):60118,T=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 u:return N;default:switch(N=N&&N.$$typeof,N){case i:case d: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=d,Ze.Fragment=a,Ze.Lazy=v,Ze.Memo=h,Ze.Portal=n,Ze.Profiler=o,Ze.StrictMode=r,Ze.Suspense=u,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)===d},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)===u},Ze.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===g||N===o||N===r||N===u||N===f||typeof N=="object"&&N!==null&&(N.$$typeof===v||N.$$typeof===h||N.$$typeof===s||N.$$typeof===i||N.$$typeof===d||N.$$typeof===x||N.$$typeof===m||N.$$typeof===T||N.$$typeof===p)},Ze.typeOf=C,Ze}var oc;function Pp(){return oc||(oc=1,ps.exports=Dp()),ps.exports}var bs,sc;function $p(){if(sc)return bs;sc=1;var e=Pp(),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,d=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,f=Object.prototype;function h(v,p,x){if(typeof p!="string"){if(f){var m=u(p);m&&m!==f&&h(v,m,x)}var T=l(p);g&&(T=T.concat(g(p)));for(var C=s(v),S=s(p),N=0;N<T.length;++N){var E=T[N];if(!n[E]&&!(x&&x[E])&&!(S&&S[E])&&!(C&&C[E])){var k=d(p,E);try{i(v,E,k)}catch{}}}}return v}return bs=h,bs}$p();var Fp=!0;function Up(e,t,n){var a="";return n.split(" ").forEach(function(r){e[r]!==void 0?t.push(e[r]+";"):r&&(a+=r+" ")}),a}var ic=function(t,n,a){var r=t.key+"-"+n.name;(a===!1||Fp===!1)&&t.registered[r]===void 0&&(t.registered[r]=n.styles)},Vp=function(t,n,a){ic(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 Hp(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 jp={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},zp=/[A-Z]|^ms/g,Gp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lc=function(t){return t.charCodeAt(1)===45},cc=functioLine truncated
*/var Bu;function Px(){if(Bu)return rt;Bu=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,u=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,p=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function x(k){if(typeof k=="object"&&k!==null){var C=k.$$typeof;switch(C){case e:switch(k=k.type,k){case l:case c:case r:case o:case s:case u:return k;default:switch(k=k&&k.$$typeof,k){case a:case d:case m:case g:case i:return k;default:return C}}case n:return C}}}function E(k){return x(k)===c}return rt.AsyncMode=l,rt.ConcurrentMode=c,rt.ContextConsumer=a,rt.ContextProvider=i,rt.Element=e,rt.ForwardRef=d,rt.Fragment=r,rt.Lazy=m,rt.Memo=g,rt.Portal=n,rt.Profiler=o,rt.StrictMode=s,rt.Suspense=u,rt.isAsyncMode=function(k){return E(k)||x(k)===l},rt.isConcurrentMode=E,rt.isContextConsumer=function(k){return x(k)===a},rt.isContextProvider=function(k){return x(k)===i},rt.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===e},rt.isForwardRef=function(k){return x(k)===d},rt.isFragment=function(k){return x(k)===r},rt.isLazy=function(k){return x(k)===m},rt.isMemo=function(k){return x(k)===g},rt.isPortal=function(k){return x(k)===n},rt.isProfiler=function(k){return x(k)===o},rt.isStrictMode=function(k){return x(k)===s},rt.isSuspense=function(k){return x(k)===u},rt.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===c||k===o||k===s||k===u||k===f||typeof k=="object"&&k!==null&&(k.$$typeof===m||k.$$typeof===g||k.$$typeof===i||k.$$typeof===a||k.$$typeof===d||k.$$typeof===y||k.$$typeof===b||k.$$typeof===S||k.$$typeof===p)},rt.typeOf=x,rt}var ju;function $x(){return ju||(ju=1,gl.exports=Px()),gl.exports}var pl,Wu;function Fx(){if(Wu)return pl;Wu=1;var t=$x(),e={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},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[t.ForwardRef]=r,o[t.Memo]=s;function i(m){return t.isMemo(m)?s:o[m.$$typeof]||e}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,f=Object.prototype;function g(m,p,y){if(typeof p!="string"){if(f){var b=u(p);b&&b!==f&&g(m,b,y)}var S=l(p);c&&(S=S.concat(c(p)));for(var x=i(m),E=i(p),k=0;k<S.length;++k){var C=S[k];if(!n[C]&&!(y&&y[C])&&!(E&&E[C])&&!(x&&x[C])){var N=d(p,C);try{a(m,C,N)}catch{}}}}return m}return pl=g,pl}Fx();var Vx=!0;function zx(t,e,n){var r="";return n.split(" ").forEach(function(s){t[s]!==void 0?e.push(t[s]+";"):s&&(r+=s+" ")}),r}var Gu=function(e,n,r){var s=e.key+"-"+n.name;(r===!1||Vx===!1)&&e.registered[s]===void 0&&(e.registered[s]=n.styles)},Hx=function(e,n,r){Gu(e,n,r);var s=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+s:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function Ux(t){for(var e=0,n,r=0,s=t.length;s>=4;++r,s-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Bx={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},jx=/[A-Z]|^ms/g,Wx=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yu=function(e){return e.charCodeAt(1)===45},Xu=functioLine truncated
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),lm=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})},Ts=function(t){var n=t.delay,a=t.offset;return Se("span",{css:xs({animation:"".concat(im," 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"},"","")})},cm=function(t){var n=t.innerProps,a=t.isRtl,r=t.size,o=r===void 0?4:r,s=sr(t,Rb);return Se("div",Me({},ct(Ee(Ee({},s),{},{innerProps:n,isRtl:a,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Se(Ts,{delay:0,offset:a}),Se(Ts,{delay:160,offset:!0}),Se(Ts,{delay:320,offset:!a}))},dm=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}})},um=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)},fm=um,gm=["data"],hm=function(t,n){var a=t.theme.spacing;return n?{}:{paddingBottom:a.baseUnit*2,paddingTop:a.baseUnit*2}},pm=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,d=t.theme,u=t.selectProps;return Se("div",Me({},ct(t,"group",{group:!0}),l),Se(s,Me({},i,{selectProps:u,theme:d,getStyles:r,getClassNames:o,cx:a}),g),Se("div",null,n))},bm=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"})},mm=function(t){var n=Cc(t);n.data;var a=sr(n,gm);return Se("div",Me({},ct(t,"groupHeading",{"group-heading":!0}),a))},vm=pm,ym=["innerRef","isDisabled","isHidden","inputClassName"],xm=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)":""},wm),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:i.neutral80})},Pc={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},wm={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"},Pc)},km=function(t){return Ee({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Pc)},Cm=function(t){var n=t.cx,a=t.value,r=Cc(t),o=r.innerRef,s=r.isDisabled,i=r.isHidden,l=r.inputClassName,g=sr(r,ym);return Se("div",Me({},ct(t,"input",{"input-container":!0}),{"data-value":a||""}),Se("input",Me({className:n({input:!0},l),ref:o,style:km(i),disabled:s},g)))},Sm=Cm,Em=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})},Nm=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})},Tm=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)},Om=$c,Mm=$c;function Im(e){var t=e.children,n=e.innerProps;return Se("div",Me({role:"button"},n),t||Se(Ns,{size:14}))}var Am=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,d=a.Label,u=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(d,{data:r,innerProps:Ee({},ct(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Se(u,{data:r,innerProps:Ee(Ee({},ct(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),s Line truncated
`]))),c1=function(e,n){var r=e.isFocused,s=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return Oe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:a*2})},El=function(e){var n=e.delay,r=e.offset;return Ne("span",{css:vl({animation:"".concat(l1," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},d1=function(e){var n=e.innerProps,r=e.isRtl,s=e.size,o=s===void 0?4:s,i=On(e,e1);return Ne("div",De({},yt(Oe(Oe({},i),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ne(El,{delay:0,offset:r}),Ne(El,{delay:160,offset:!0}),Ne(El,{delay:320,offset:!r}))},u1=function(e,n){var r=e.isDisabled,s=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius,l=o.spacing;return Oe({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:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:s?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:s?i.primary:i.neutral30}})},f1=function(e){var n=e.children,r=e.isDisabled,s=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ne("div",De({ref:o},yt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":s,"control--menu-is-open":a}),i,{"aria-disabled":r||void 0}),n)},h1=f1,g1=["data"],p1=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},m1=function(e){var n=e.children,r=e.cx,s=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,c=e.label,d=e.theme,u=e.selectProps;return Ne("div",De({},yt(e,"group",{group:!0}),l),Ne(i,De({},a,{selectProps:u,theme:d,getStyles:s,getClassNames:o,cx:r}),c),Ne("div",null,n))},b1=function(e,n){var r=e.theme,s=r.colors,o=r.spacing;return Oe({label:"group",cursor:"default",display:"block"},n?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},y1=function(e){var n=lf(e);n.data;var r=On(n,g1);return Ne("div",De({},yt(e,"groupHeading",{"group-heading":!0}),r))},v1=m1,x1=["innerRef","isDisabled","isHidden","inputClassName"],w1=function(e,n){var r=e.isDisabled,s=e.value,o=e.theme,i=o.spacing,a=o.colors;return Oe(Oe({visibility:r?"hidden":"visible",transform:s?"translateZ(0)":""},k1),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},xf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},k1={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},xf)},C1=function(e){return Oe({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},xf)},S1=function(e){var n=e.cx,r=e.value,s=lf(e),o=s.innerRef,i=s.isDisabled,a=s.isHidden,l=s.inputClassName,c=On(s,x1);return Ne("div",De({},yt(e,"input",{"input-container":!0}),{"data-value":r||""}),Ne("input",De({className:n({input:!0},l),ref:o,style:C1(a),disabled:i},c)))},_1=S1,E1=function(e,n){var r=e.theme,s=r.spacing,o=r.borderRadius,i=r.colors;return Oe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:s.baseUnit/2})},M1=function(e,n){var r=e.theme,s=r.borderRadius,o=r.colors,i=e.cropWithEllipsis;return Oe({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:s/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},N1=function(e,n){var r=e.theme,s=r.spacing,o=r.borderRadius,i=r.colors,a=e.isFocused;return Oe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},wf=function(e){var n=e.children,r=e.innerProps;return Ne("div",r,n)},O1=wf,T1=wf;function A1(t){var e=t.children,n=t.innerProps;return Ne("div",De({role:"button"},n),e||Ne(_l,{size:14}))}var D1=function(e){var n=e.children,r=e.components,s=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,c=r.Container,d=r.Label,u=r.Remove;return Ne(c,{data:s,innerProps:Oe(Oe({},yt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ne(d,{data:s,innerProps:Oe({},yt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Ne(u,{data:s,innerProps:Oe(Oe({},yt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),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 +188,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:T,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}),F&&c.jsx(_,{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:`
`,"aria-haspopup":"listbox","aria-expanded":m,children:[h.jsxs(I,{className:"flex items-center gap-2",children:[c,h.jsx(Q,{className:"truncate",children:N})]}),h.jsx(Hn,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&h.jsxs(I,{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:[h.jsx(I,{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx("input",{id:E,type:"text",value:y,onChange:w,placeholder:s,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"})}),h.jsxs(I,{className:"max-h-80 overflow-auto",children:[L&&h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:a}),$&&h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:i}),F&&h.jsx(I,{className:"py-2",children:C.map(D=>{const A=O(D.value);return h.jsxs(oe,{type:"button",onClick:()=>!D.disabled&&M(D.value),disabled:D.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"},Vv=({options:e=[],value:t=[],onChange:n,placeholder:a="No items selected",disabled:r=!1,className:o=""})=>{const s=b.useCallback(d=>e.find(f=>String(f.value)===String(d))?.label||String(d),[e]),i=b.useCallback(d=>{if(r)return;const u=t.filter(f=>String(f)!==String(d));n?.(u)},[t,n,r]),l=b.useMemo(()=>t.map(d=>({value:d,label:s(d)})),[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(d=>c.jsxs(Z,{className:Un.tag,children:[d.label,!r&&c.jsx(Z,{className:Un.tagRemove,onClick:()=>i(d.value),role:"button","aria-label":`Remove ${d.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"})})})]},d.value))})};function Hv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return b.useMemo(()=>a=>{t.forEach(r=>r(a))},t)}const qa=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 Us(e){return"nodeType"in e}function Mt(e){var t,n;return e?Rr(e)?e:Us(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Vs(e){const{Document:t}=Mt(e);return e instanceof t}function Vn(e){return Rr(e)?!1:e instanceof Mt(e).HTMLElement}function pd(e){return e instanceof Mt(e).SVGElement}function en(e){return e?Rr(e)?e.document:Us(e)?Vs(e)?e:Vn(e)||pd(e)?e.ownerDocument:document:document:document}const Qt=qa?b.useLayoutEffect:b.useEffect;function Ka(e){const t=b.useRef(e);return Qt(()=>{t.current=e}),b.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 jv(){const e=b.useRef(null),t=b.useCallback((a,r)=>{e.current=setInterval(a,r)},[]),n=b.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Hn(e,t){t===void 0&&(t=[e]);const n=b.useRef(e);return Qt(()=>{n.current!==e&&(n.current=e)},t),n}function jn(e,t){const n=b.useRef();return b.useMemo(()=>{const a=e(n.current);return n.current=a,a},[...t])}function Xa(e){const t=Ka(e),n=b.useRef(null),a=b.useCallback(r=>{r!==n.current&&t?.(r,n.current),n.current=r},[]);return[n,a]}function Za(e){const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}let Hs={};function zn(e,t){return b.useMemo(()=>{if(t)return t;const n=Hs[e]==null?0:Hs[e]+1;return Hs[e]=n,e+"-"+n},[e,t])}function bd(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 d=o[l];d!=null&&(o[l]=d+e*g)}return o},{...t})}}const tn=bd(1),Gn=bd(-1);function zv(e){return"clientX"in e&&"clientY"in e}function Qa(e){if(!e)return!1;const{KeyboardEvent:t}=Mt(e.target);return t&&e instanceof t}function Gv(e){if(!e)return!1;const{TouchEvent:t}=Mt(e.target);return t&&e instanceof t}function Ja(e){if(Gv(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 zv(e)?{x:e.clientX,y:e.clientY}:null}const dr=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[dr.Translate.toString(e),dr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:a}=e;return t+" "+n+"ms "+a}}}),md="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Bv(e){return e.matches(md)?e:e.querySelector(md)}const Wv={display:"none"};function Yv(e){let{id:t,value:n}=e;return b.createElement("div",{id:t,style:Wv},n)}function qv(e){le Line truncated
${D.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":A,children:[h.jsx(I,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:A&&h.jsx(Hn,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),h.jsxs(I,{className:"flex-1 min-w-0",children:[h.jsx(I,{className:`font-medium ${A?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:D.label}),D.description&&h.jsx(I,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:D.description})]})]},D.value)})})]})]})]})},Vs={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},Hk=({options:t=[],value:e=[],onChange:n,placeholder:r="No items selected",disabled:s=!1,className:o="",id:i,editorAttrs:a})=>{const l=v.useCallback(f=>t.find(m=>String(m.value)===String(f))?.label||String(f),[t]),c=v.useCallback(f=>{if(s)return;const g=e.filter(m=>String(m)!==String(f));n?.(g)},[e,n,s]),d=v.useMemo(()=>e.map(f=>({value:f,label:l(f)})),[e,l]),u=`${Vs.container.base} ${s?Vs.container.disabled:""} ${o}`.trim();return h.jsx(I,{className:u,id:i,...a,children:d.length===0?h.jsx(Q,{className:Vs.placeholder,children:r}):d.map(f=>h.jsxs(Q,{className:Vs.tag,children:[f.label,!s&&h.jsx(Q,{className:Vs.tagRemove,onClick:()=>c(f.value),role:"button","aria-label":`Remove ${f.label}`,children:h.jsx(Hn,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},f.value))})};function Uk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v.useMemo(()=>r=>{e.forEach(s=>s(r))},e)}const pi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yr(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Fl(t){return"nodeType"in t}function Wt(t){var e,n;return t?Yr(t)?t:Fl(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Vl(t){const{Document:e}=Wt(t);return t instanceof e}function zs(t){return Yr(t)?!1:t instanceof Wt(t).HTMLElement}function eh(t){return t instanceof Wt(t).SVGElement}function Xr(t){return t?Yr(t)?t.document:Fl(t)?Vl(t)?t:zs(t)||eh(t)?t.ownerDocument:document:document:document}const wn=pi?v.useLayoutEffect:v.useEffect;function mi(t){const e=v.useRef(t);return wn(()=>{e.current=t}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function Bk(){const t=v.useRef(null),e=v.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=v.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function Hs(t,e){e===void 0&&(e=[t]);const n=v.useRef(t);return wn(()=>{n.current!==t&&(n.current=t)},e),n}function Us(t,e){const n=v.useRef();return v.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function bi(t){const e=mi(t),n=v.useRef(null),r=v.useCallback(s=>{s!==n.current&&e?.(s,n.current),n.current=s},[]);return[n,r]}function yi(t){const e=v.useRef();return v.useEffect(()=>{e.current=t},[t]),e.current}let zl={};function Bs(t,e){return v.useMemo(()=>{if(e)return e;const n=zl[t]==null?0:zl[t]+1;return zl[t]=n,t+"-"+n},[t,e])}function th(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,i)=>{const a=Object.entries(i);for(const[l,c]of a){const d=o[l];d!=null&&(o[l]=d+t*c)}return o},{...e})}}const Kr=th(1),js=th(-1);function jk(t){return"clientX"in t&&"clientY"in t}function vi(t){if(!t)return!1;const{KeyboardEvent:e}=Wt(t.target);return e&&t instanceof e}function Wk(t){if(!t)return!1;const{TouchEvent:e}=Wt(t.target);return e&&t instanceof e}function xi(t){if(Wk(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return jk(t)?{x:t.clientX,y:t.clientY}:null}const In=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[In.Translate.toString(t),In.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),nh="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Gk(t){return t.matches(nh)?t:t.querySelector(nh)}const Yk={display:"none"};function Xk(t){let{id:e,value:n}=t;return v.createElement("div",{id:e,s 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.
`},Jv={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 Rv(e){let{announcements:t=Jv,container:n,hiddenTextDescribedById:a,screenReaderInstructions:r=Qv}=e;const{announce:o,announcement:s}=Kv(),i=zn("DndLiveRegion"),[l,g]=b.useState(!1);if(b.useEffect(()=>{g(!0)},[]),Xv(b.useMemo(()=>({onDragStart(u){let{active:f}=u;o(t.onDragStart({active:f}))},onDragMove(u){let{active:f,over:h}=u;t.onDragMove&&o(t.onDragMove({active:f,over:h}))},onDragOver(u){let{active:f,over:h}=u;o(t.onDragOver({active:f,over:h}))},onDragEnd(u){let{active:f,over:h}=u;o(t.onDragEnd({active:f,over:h}))},onDragCancel(u){let{active:f,over:h}=u;o(t.onDragCancel({active:f,over:h}))}}),[o,t])),!l)return null;const d=b.createElement(b.Fragment,null,b.createElement(Yv,{id:a,value:r.draggable}),b.createElement(qv,{id:i,announcement:s}));return n?ar.createPortal(d,n):d}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 Ra(){}function rn(e,t){return b.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function js(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return b.useMemo(()=>[...t].filter(a=>a!=null),[...t])}const Jt=Object.freeze({x:0,y:0});function yd(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ey(e,t){const n=Ja(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 xd(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return n-a}function ty(e,t){let{data:{value:n}}=e,{data:{value:a}}=t;return a-n}function wd(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 kd(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Cd(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 zs=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=Cd(t,t.left,t.top),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=yd(Cd(l),r);o.push({id:i,data:{droppableContainer:s,value:g}})}}return o.sort(xd)},ry=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:a}=e;const r=wd(t),o=[];for(const s of a){const{id:i}=s,l=n.get(i);if(l){const g=wd(l),d=r.reduce((f,h,v)=>f+yd(g[v],h),0),u=Number((d/4).toFixed(4));o.push({id:i,data:{droppableContainer:s,value:u}})}}return o.sort(xd)};function ny(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,d=s*i,u=d/(l+g-d);return Number(u.toFixed(4))}return 0}const ay=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=ny(i,t);l>0&&r.push({id:s,data:{droppableContainer:o,value:l}})}}return r.sort(ty)};function oy(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Sd(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Jt}function sy(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 iy=sy(1);function Ed(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 ly(e,t,n){const a=Ed(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)),d=r?e.width/r:e.width,u=o?e.height/o:e.height;return{width:d,height:u,top:g,right:l+d,bottom:g+u,left:l}}const cy={ignoreTransform:!1};function nn(e,t){t===void 0&&(t=cy);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:d}=Mt(e).getComputedStyle(e);g&&(n=ly(n,g,d))}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 Nd(e){return nn(e,{ignoreTransform:!0})}function dy(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function uy(e,t){return t===void 0&&(t=Mt(e).getComputedStyle(e)),t.posit Line truncated
`},Rk={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function eC(t){let{announcements:e=Rk,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=Jk}=t;const{announce:o,announcement:i}=qk(),a=Bs("DndLiveRegion"),[l,c]=v.useState(!1);if(v.useEffect(()=>{c(!0)},[]),Zk(v.useMemo(()=>({onDragStart(u){let{active:f}=u;o(e.onDragStart({active:f}))},onDragMove(u){let{active:f,over:g}=u;e.onDragMove&&o(e.onDragMove({active:f,over:g}))},onDragOver(u){let{active:f,over:g}=u;o(e.onDragOver({active:f,over:g}))},onDragEnd(u){let{active:f,over:g}=u;o(e.onDragEnd({active:f,over:g}))},onDragCancel(u){let{active:f,over:g}=u;o(e.onDragCancel({active:f,over:g}))}}),[o,e])),!l)return null;const d=v.createElement(v.Fragment,null,v.createElement(Xk,{id:r,value:s.draggable}),v.createElement(Kk,{id:a,announcement:i}));return n?Nn.createPortal(d,n):d}var St;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(St||(St={}));function wi(){}function qr(t,e){return v.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Hl(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const kn=Object.freeze({x:0,y:0});function sh(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function tC(t,e){const n=xi(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function oh(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function nC(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function ih(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function ah(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function lh(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const Ul=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=lh(e,e.left,e.top),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=sh(lh(l),s);o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(oh)},rC=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=ih(e),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=ih(l),d=s.reduce((f,g,m)=>f+sh(c[m],g),0),u=Number((d/4).toFixed(4));o.push({id:a,data:{droppableContainer:i,value:u}})}}return o.sort(oh)};function sC(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height),i=s-r,a=o-n;if(r<s&&n<o){const l=e.width*e.height,c=t.width*t.height,d=i*a,u=d/(l+c-d);return Number(u.toFixed(4))}return 0}const oC=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const o of r){const{id:i}=o,a=n.get(i);if(a){const l=sC(a,e);l>0&&s.push({id:i,data:{droppableContainer:o,value:l}})}}return s.sort(nC)};function iC(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function ch(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:kn}function aC(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,a)=>({...i,top:i.top+t*a.y,bottom:i.bottom+t*a.y,left:i.left+t*a.x,right:i.right+t*a.x}),{...n})}}const lC=aC(1);function dh(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function cC(t,e,n){const r=dh(e);if(!r)return t;const{scaleX:s,scaleY:o,x:i,y:a}=r,l=t.left-i-(1-s)*parseFloat(n),c=t.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?t.width/s:t.width,u=o?t.height/o:t.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}const dC={ignoreTransform:!1};function Zr(t,e){e===void 0&&(e=dC);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:d}=Wt(t).getComputedStyle(t);c&&(n=cC(n,c,d))}const{top:r,left:s,width:o,height:i,bottom:a,right:l}=n;return{top:r,left:s,width:o,height:i,bottom:a,right:l}}function uh(t){return Zr(t,{ignoreTransform:!0})}function uC(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function fC(t,e){return e===void 0&&(e=Wt(t).getComputedStyle(t)),e.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"}
${a?"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:u,onChange:m=>f(m.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(m=>c.jsxs(re,{type:"button",onClick:()=>x(m),className:`
`,children:[h.jsx(I,{className:"flex items-center gap-2",children:y?h.jsxs(h.Fragment,{children:[h.jsx(re,{name:y.faIcon,className:"w-4 h-4 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"text-gray-900 dark:text-white",children:y.label})]}):h.jsx(Q,{className:"text-gray-500 dark:text-gray-400",children:r})}),h.jsx(re,{name:"chevron-down",className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${u?"rotate-180":""}`})]}),l&&h.jsx("input",{type:"hidden",name:l,value:t||""}),u&&h.jsxs(I,{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:[h.jsx(I,{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:h.jsx(wt,{type:"text",value:g,onChange:x=>m(x.target.value),placeholder:s,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})}),h.jsx(I,{className:"max-h-56 overflow-y-auto",children:b.length>0?b.map(x=>h.jsxs(oe,{type:"button",onClick:()=>S(x),className:`
w-full flex items-center gap-3 px-3 py-2 text-left text-sm
${v?.faIcon===m.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:m.faIcon,className:"w-4 h-4"}),c.jsx(Z,{children:m.label}),v?.faIcon===m.faIcon&&c.jsx(ne,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},m.value)):c.jsx(_,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},ti=({defaultOpen:e=!1,isOpen:t,onToggle:n,className:a="",style:r,children:o,disabled:s=!1})=>{const[i,l]=b.useState(e),g=t!==void 0,d=g?t:i,u=b.useRef(null),[f,h]=b.useState(e?void 0:0),v=()=>{if(s)return;const x=!d;g||l(x),n?.(x)};b.useEffect(()=>{if(u.current)if(d){h(u.current.scrollHeight);const x=setTimeout(()=>{h(void 0)},300);return()=>clearTimeout(x)}else h(u.current.scrollHeight),requestAnimationFrame(()=>{h(0)})},[d]);const p={};if(b.Children.forEach(o,x=>{if(b.isValidElement(x)){const m=x.props?.slot;m==="trigger"?p.trigger=x:m==="content"&&(p.content=x)}}),!p.trigger&&!p.content){const x=b.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":""} ${d?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":d,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 ${d?"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:u,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,du=Jn?.useControllableState,Ix=(e,t)=>window.G7Core?.t?.(e,t)??e,Ax={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},Lx=({options:e,value:t,onChange:n,disabled:a=!1})=>{const[r,o]=b.useState(!1),[s,i]=b.useState({}),l=b.useRef(null),g=e.find(u=>u.value===t)??e[0];b.useEffect(()=>{if(!r)return;const u=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",u),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",u),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[r]);const d=b.useCallback(()=>{if(a||!l.current)return;const u=l.current.getBoundingClientRect();i({position:"fixed",top:u.bottom+4,right:window.innerWidth-u.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:u=>{u.stopPropagation(),u.preventDefault(),d()},onMouseDown:u=>u.stopPropagation(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),u.preventDefault(),d()),u.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:de.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(u=>{const f=u.value??"",h=Ax[f],v=h?Ix(h):"",p=u.value===t;return c.jsxs(_,{role:"option","aria-selected":p,onClick:x=>{x.stopPropagation(),x.preventDefault(),n(u.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:u.label}),p&&c.jsx(ne,{name:de.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__")})})]})},_x=(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)},Dx=({data:e=[],value:t=[],onChange:n,scopeOptions:a=[],className:r="",disabled:o=!1,desktopColumns:s=2,installedModules:i=[],installedPl Line truncated
${y?.faIcon===x.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:[h.jsx(re,{name:x.faIcon,className:"w-4 h-4"}),h.jsx(Q,{children:x.label}),y?.faIcon===x.faIcon&&h.jsx(re,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},x.value)):h.jsx(I,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},ec=({defaultOpen:t=!1,isOpen:e,onToggle:n,className:r="",style:s,children:o,disabled:i=!1,id:a,editorAttrs:l})=>{const[c,d]=v.useState(t),u=e!==void 0,f=u?e:c,g=v.useRef(null),[m,p]=v.useState(t?void 0:0),y=()=>{if(i)return;const S=!f;u||d(S),n?.(S)};v.useEffect(()=>{if(g.current)if(f){p(g.current.scrollHeight);const S=setTimeout(()=>{p(void 0)},300);return()=>clearTimeout(S)}else p(g.current.scrollHeight),requestAnimationFrame(()=>{p(0)})},[f]);const b={};if(v.Children.forEach(o,S=>{if(v.isValidElement(S)){const x=S.props?.slot;x==="trigger"?b.trigger=S:x==="content"&&(b.content=S)}}),!b.trigger&&!b.content){const S=v.Children.toArray(o);S.length>=2?(b.trigger=S[0],b.content=S.slice(1)):S.length===1&&(b.content=S[0])}return h.jsxs(I,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${r}`,style:s,id:a,...l,children:[h.jsxs(oe,{type:"button",onClick:y,disabled:i,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 ${i?"opacity-50 cursor-not-allowed":""} ${f?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":f,children:[h.jsx(I,{className:"flex-1",children:b.trigger}),!b.trigger&&h.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h.jsx(I,{ref:g,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:m!==void 0?`${m}px`:"auto"},children:h.jsx(I,{className:"bg-white dark:bg-gray-800",children:b.content})})]})},Js=window.G7Core,qh=Js?.useControllableState,Zh=(t,e)=>window.G7Core?.t?.(t,e)??t,AS={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},DS=({options:t,value:e,onChange:n,disabled:r=!1})=>{const[s,o]=v.useState(!1),[i,a]=v.useState({}),l=v.useRef(null),c=t.find(u=>u.value===e)??t[0];v.useEffect(()=>{if(!s)return;const u=g=>{l.current&&!l.current.contains(g.target)&&o(!1)},f=()=>{if(!l.current)return;const g=l.current.getBoundingClientRect();a({position:"fixed",top:g.bottom+4,right:window.innerWidth-g.right,zIndex:9999})};return document.addEventListener("mousedown",u),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",u),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[s]);const d=v.useCallback(()=>{if(r||!l.current)return;const u=l.current.getBoundingClientRect();a({position:"fixed",top:u.bottom+4,right:window.innerWidth-u.right,zIndex:9999}),o(f=>!f)},[r]);return h.jsxs(I,{ref:l,className:"relative flex-shrink-0",children:[h.jsxs(I,{role:"button",tabIndex:0,onClick:u=>{u.stopPropagation(),u.preventDefault(),d()},onMouseDown:u=>u.stopPropagation(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),u.preventDefault(),d()),u.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 ${r?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[h.jsx(Q,{children:c?.label??""}),h.jsx(re,{name:de.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),s&&h.jsx(I,{style:i,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:t.map(u=>{const f=u.value??"",g=AS[f],m=g?Zh(g):"",p=u.value===e;return h.jsxs(I,{role:"option","aria-selected":p,onClick:y=>{y.stopPropagation(),y.preventDefault(),n(u.value),o(!1)},onMouseDown:y=>y.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:[h.jsxs(I,{className:"flex items-center justify-between",children:[h.jsx(Q,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:u.label}),p&&h.jsx(re,{name:de.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),m&&h.jsx(Q,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:m})]},f||"__null__")})})]})},IS=(t,e)=>{if(t.length!==e.length)return!1;const n=[...t].sort((s,o)=>s.id-o.id),r=[...e].sort((s,o)=>s.id-o.id);return n.every((s,o)=>s.id===r[o].id&&s.scope_type===r[o].scope_type)},LS=({data:t=[],value:e=[],onChange:n,scopeOptions:r=[],className:s="",disabled:o=!1,desktopColumns:i=2,inst Line truncated
let scriptImported = false
self.addEventListener('message', async (e) => {
const { file, id, imageCompressionLibUrl, options } = e.data
@@ -268,40 +227,57 @@ self.addEventListener('message', async (e) => {
self.postMessage({ error: e.message + '\\n' + e.stack, id })
}
})
`;let Li;function Q1(e,t){return new Promise(((n,a)=>{Li||(Li=(function(s){const i=[];return i.push(s),URL.createObjectURL(new Blob(i))})(Z1));const r=new Worker(Li);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 X1))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 Df(e,r).then(function(h){try{return o=h,f.call(this)}catch(v){return a(v)}}.bind(this),a);var d=function(){try{return f.call(this)}catch(h){return a(h)}}.bind(this),u=function(h){try{return Df(e,r).then((function(v){try{return o=v,d()}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",Q1(e,r).then((function(h){try{return o=h,d()}catch{return u()}}),u)}catch{u()}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=Cf(e,o))}catch{}return n(o)}}))}Nt.getDataUrlFromFile=Tf,Nt.getFilefromDataUrl=Ai,Nt.loadImage=Of,Nt.drawImageInCanvas=If,Nt.drawFileInCanvas=So,Nt.canvasToFile=Eo,Nt.getExifOrientation=Af,Nt.handleMaxWidthOrHeight=Lf,Nt.followExifOrientation=_f,Nt.cleanupCanvasMemory=ur,Nt.isAutoOrientationInBrowser=hn,Nt.approximateBelowMaximumCanvasSizeOfBrowser=Mf,Nt.copyExifWithoutOrientation=Cf,Nt.getBrowserName=$r,Nt.version="2.0.2";const J1=window.G7Core,_i=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]}`},R1=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:"업로드 실패"},ek=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)=>J1?.t?.(e,t)??e,Pf=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 tk(e){const{attachmentableType:t,attachmentableId:n,collection:a,maxFiles:r,maxSize:o,maxConcurrentUploads:s,accept:i,imageCompression:l,roleIds:g,autoUpload:d,initialFiles:u,endpoints:f,onFilesChange:h,onUploadComplete:v,onUploadError:p,onRemove:x,onReorder:m,uploadTriggerEvent:T,confirmBeforeRemove:C,uploadParams:S}=e,[N,E]=b.useState(u),[k,y]=b.useState([]),[w,A]=b.useState(!1),D=b.useRef(null),F=b.useRef(0),M=b.useRef(new Set),L=b.useRef(new Map),[U,O]=b.useState(!1),[I,H]=b.useState(null),[$,z]=b.useState(!1),G=b.useRef(!1),[j,W]=b.useState([]),[B,V]=b.useState(!1),[Y,R]=b.useState(0),ae=b.useRef(0),[ee,X]=b.useState(new Map),oe=b.useRef(new Map),se=b.useRef(h);se.current=h,b.useEffect(()=>{se.current?.(k)},[k]),b.useEffect(()=>{if(G.current)return;const J=u.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])},[u]);const pe=b.useCallback(async J=>{const be={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await Nt(J,be)},[l]),we=b.useCallback(async J=>{const be=N.length+k.length,he=r-be,xe=Array.from(J).slice(0,he);for(const ue of xe){if(ue.size>o*1024*1024){p?.(`[${ue.name}] 파일 크기(${_i(ue.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,ue);continue}if(i){const Ce="."+ue.name.split(".").pop()?.toLowerCase();if(!i.split(",").map(Oe=>Oe.trim().toLowerCase()).includes(Ce)){p?.(`[${ue.name}] 허용되지 않는 파일 형식입니다. (허용: ${i})`,ue);continue}}const Pe={id:`pendinLine truncated
`;let Tc;function Q2(t,e){return new Promise(((n,r)=>{Tc||(Tc=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(Z2));const s=new Worker(Tc);s.addEventListener("message",(function(i){if(e.signal&&e.signal.aborted)s.terminate();else if(i.data.progress===void 0){if(i.data.error)return r(new Error(i.data.error)),void s.terminate();n(i.data.file),s.terminate()}else e.onProgress(i.data.progress)})),s.addEventListener("error",r),e.signal&&e.signal.addEventListener("abort",(()=>{r(e.signal.reason),s.terminate()})),s.postMessage({file:t,imageCompressionLibUrl:e.libURL,options:{...e,onProgress:void 0,signal:void 0}})}))}function zt(t,e){return new Promise((function(n,r){let s,o,i,a,l,c;if(s={...e},i=0,{onProgress:a}=s,s.maxSizeMB=s.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof s.useWebWorker!="boolean"||s.useWebWorker,delete s.useWebWorker,s.onProgress=g=>{i=g,typeof a=="function"&&a(i)},!(t instanceof Blob||t instanceof q2))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return r(new Error("The file given is not an image"));if(c=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||c)return vp(t,s).then(function(g){try{return o=g,f.call(this)}catch(m){return r(m)}}.bind(this),r);var d=function(){try{return f.call(this)}catch(g){return r(g)}}.bind(this),u=function(g){try{return vp(t,s).then((function(m){try{return o=m,d()}catch(p){return r(p)}}),r)}catch(m){return r(m)}};try{return s.libURL=s.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Q2(t,s).then((function(g){try{return o=g,d()}catch{return u()}}),u)}catch{u()}function f(){try{o.name=t.name,o.lastModified=t.lastModified}catch{}try{s.preserveExif&&t.type==="image/jpeg"&&(!s.fileType||s.fileType&&s.fileType===t.type)&&(o=lp(t,o))}catch{}return n(o)}}))}zt.getDataUrlFromFile=fp,zt.getFilefromDataUrl=Oc,zt.loadImage=hp,zt.drawImageInCanvas=pp,zt.drawFileInCanvas=Yi,zt.canvasToFile=Xi,zt.getExifOrientation=mp,zt.handleMaxWidthOrHeight=bp,zt.followExifOrientation=yp,zt.cleanupCanvasMemory=Ln,zt.isAutoOrientationInBrowser=is,zt.approximateBelowMaximumCanvasSizeOfBrowser=gp,zt.copyExifWithoutOrientation=lp,zt.getBrowserName=wr,zt.version="2.0.2";const J2=window.G7Core,Ac=t=>{const e=["B","KB","MB","GB"];let n=0,r=t;for(;r>=1024&&n<e.length-1;)r/=1024,n++;return`${r.toFixed(2)} ${e[n]}`},R2=t=>{if(t&&typeof t=="object"){const e=t;if(e.response?.data?.message)return e.response.data.message;if(e.response?.data?.errors){const n=Object.values(e.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(e.message)return e.message}return t instanceof Error?t.message:"업로드 실패"},eE=t=>t?t.startsWith("image/")?"fa-file-image":t.startsWith("video/")?"fa-file-video":t.startsWith("audio/")?"fa-file-audio":t==="application/pdf"?"fa-file-pdf":t.includes("word")||t.includes("document")?"fa-file-word":t.includes("excel")||t.includes("spreadsheet")?"fa-file-excel":t.includes("zip")||t.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",At=(t,e)=>J2?.t?.(t,e)??t,xp=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...t)=>console.log("[Comp:FileUploader]",...t),warn:(...t)=>console.warn("[Comp:FileUploader]",...t),error:(...t)=>console.error("[Comp:FileUploader]",...t)},kr=window.G7Core;function tE(t){const{attachmentableType:e,attachmentableId:n,collection:r,maxFiles:s,maxSize:o,maxConcurrentUploads:i,accept:a,imageCompression:l,roleIds:c,autoUpload:d,initialFiles:u,endpoints:f,onFilesChange:g,onUploadComplete:m,onUploadError:p,onRemove:y,onReorder:b,uploadTriggerEvent:S,confirmBeforeRemove:x,uploadParams:E}=t,[k,C]=v.useState(u),[N,_]=v.useState([]),[w,M]=v.useState(!1),O=v.useRef(null),L=v.useRef(0),$=v.useRef(new Set),F=v.useRef(new Map),D=v.useRef(null),[A,T]=v.useState(!1),[V,H]=v.useState(null),[W,j]=v.useState(!1),U=v.useRef(!1),[B,G]=v.useState([]),[z,K]=v.useState(!1),[X,Z]=v.useState(0),ee=v.useRef(0),[ne,he]=v.useState(new Map),J=v.useRef(new Map),ce=v.useRef(g);ce.current=g,v.useEffect(()=>{ce.current?.(N)},[N]),v.useEffect(()=>{if(U.current)return;const te=u.filter(me=>!$.current.has(me.id)&&(!me.hash||!$.current.has(me.hash))),ge=new Set(te.map(me=>me.id)),pe=Array.from(F.current.values()).filter(me=>!ge.has(me.id)&&!$.current.has(me.id));C([...te,...pe])},[u]);const ue=v.useCallback(async te=>{const ge={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await zt(te,ge)},[l]),ie=v.useCallback(async te=>{const ge=k.length+N.length,pe=Math.max(0,s-ge),me=Array.from(te).slice(0,pe);if(te.length>pe){const be=Array.from(te).slice(pe),Ue=At("attachment.upload_limit_exceeded",{max:s});p?.(Ue,be[0]??te[0])}for(const be of me){if(be.size>o*1024*1024){p?.(`[${be.name}] 파일 크기(${Ac(be.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,be);continue}if(a){const Me="."+be.name.split(".").pop()?.toLowerCase();if(!a.split(",").m Line 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:u=>{u.preventDefault(),d&&a(!0)},onDragLeave:()=>a(!1),onDrop:u=>{u.preventDefault(),a(!1),d&&n(u.dataTransfer.files)},children:[c.jsx("input",{ref:r,type:"file",multiple:!0,accept:o,onChange:u=>u.target.files&&!l&&n(u.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(ut,{className:"text-sm text-gray-600 dark:text-gray-400",children:wt("attachment.drop_or_click")}),c.jsxs(ut,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[wt("attachment.upload_limit",{maxFiles:s,maxSize:i}),o&&` (${o})`]})]}),g]})},nk=window.G7Core,ak=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)},ok=({file:e,onRemove:t,onRetry:n,onImageClick:a,onDownload:r,isPrimary:o,onPrimaryClick:s,disabled:i})=>{const{attributes:l,listeners:g,setNodeRef:d,transform:u,transition:f,isDragging:h}=co({id:"hash"in e?e.hash:e.id}),v={transform:dr.Transform.toString(u),transition:f,opacity:h?.5:1},p="status"in e&&e.status!==void 0,x=p?e.status:"done",m=x==="uploading",T=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]=b.useState(void 0),w=!p&&E?e.download_url:void 0;b.useEffect(()=>{if(!w){y(void 0);return}let D=!0,F;return(async()=>{try{const L=await nk.api.get(w,{responseType:"blob"});D&&L&&(F=URL.createObjectURL(L),y(F))}catch(L){ak.error("Failed to load authenticated image:",L)}})(),()=>{D=!1,F&&URL.revokeObjectURL(F)}},[w]);const A=k;return c.jsxs(_,{ref:d,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 ${E||!p?"cursor-pointer":""}`,onClick:()=>{m||T||(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 ${ek(e.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(m||T)&&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:`${S}%`}})}),c.jsxs(Z,{className:"text-white text-xs mt-1",children:[S,"%"]})]}),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:m||T,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(ut,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:e.original_filename,children:e.original_filename}),c.jsx(ut,{className:"text-xs text-gray-500 dark:text-gray-400",children:e.siz Line truncated
${v.radio}
${t&&!l?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600"}
`,onDragOver:u=>{u.preventDefault(),d&&r(!0)},onDragLeave:()=>r(!1),onDrop:u=>{u.preventDefault(),r(!1),d&&n(u.dataTransfer.files)},children:[h.jsx("input",{ref:s,type:"file",multiple:!0,accept:o,onChange:u=>u.target.files&&!l&&n(u.target.files),className:"hidden",disabled:l}),!c&&h.jsxs(I,{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&&s.current?.click(),children:[h.jsx(pt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),h.jsx(bt,{className:"text-sm text-gray-600 dark:text-gray-400",children:At("attachment.drop_or_click")}),h.jsxs(bt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[At("attachment.upload_limit",{maxFiles:i,maxSize:a}),o&&` (${o})`]})]}),c]})},rE=window.G7Core,sE=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...t)=>console.log("[Comp:SortableThumbnail]",...t),warn:(...t)=>console.warn("[Comp:SortableThumbnail]",...t),error:(...t)=>console.error("[Comp:SortableThumbnail]",...t)},oE=({file:t,onRemove:e,onRetry:n,onImageClick:r,onDownload:s,isPrimary:o,onPrimaryClick:i,disabled:a})=>{const{attributes:l,listeners:c,setNodeRef:d,transform:u,transition:f,isDragging:g}=Ai({id:"hash"in t?t.hash:t.id}),m={transform:In.Transform.toString(u),transition:f,opacity:g?.5:1},p="status"in t&&t.status!==void 0,y=p?t.status:"done",b=y==="uploading",S=y==="compressing",x=y==="error",E=p?t.progress:100,k=p?t.preview:void 0,C=p?t.mime_type?.startsWith("image/")??!1:t.is_image,[N,_]=v.useState(void 0),w=!p&&C?t.download_url:void 0;v.useEffect(()=>{if(!w){_(void 0);return}let O=!0,L;return(async()=>{try{const F=await rE.api.get(w,{responseType:"blob"});O&&F&&(L=URL.createObjectURL(F),_(L))}catch(F){sE.error("Failed to load authenticated image:",F)}})(),()=>{O=!1,L&&URL.revokeObjectURL(L)}},[w]);const M=N;return h.jsxs(I,{ref:d,style:m,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[h.jsxs(I,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${C||!p?"cursor-pointer":""}`,onClick:()=>{b||S||(C&&r?r():!p&&s&&s())},children:[k||M?h.jsx(yn,{src:k||M,alt:t.original_filename,className:"w-full h-full object-cover"}):h.jsx(pt,{className:`fa-solid ${eE(t.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||S)&&h.jsxs(I,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[h.jsx(I,{className:"w-3/4 h-2 bg-gray-700 rounded-full overflow-hidden",children:h.jsx(I,{className:"h-full bg-blue-500 transition-all",style:{width:`${E}%`}})}),h.jsxs(Q,{className:"text-white text-xs mt-1",children:[E,"%"]})]}),x&&h.jsx(I,{className:"absolute inset-0 bg-red-500/50 flex items-center justify-center",children:h.jsx(pt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),i&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),i()},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:At(o?"attachment.primary_image":"attachment.set_as_primary"),children:h.jsx(pt,{className:"fa-solid fa-star text-xs"})}),h.jsxs(I,{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 ${a?"hidden":""}`,children:[h.jsx(oe,{type:"button",...l,...c,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:At("attachment.drag_to_reorder"),onClick:O=>O.stopPropagation(),children:h.jsx(pt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&s&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),s()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:At("common.download"),children:h.jsx(pt,{className:"fa-solid fa-download text-sm"})}),x&&n&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:At("common.retry"),children:h.jsx(pt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),e()},disabled:b||S,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:At("common.delete"),children:h.jsx(pt,{className:"fa-solid fa-times text-sm"})})]})]}),h.jsxs(I,{className:`p-2 ${!p&&s?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&s&&s()},children:[h.jsx(bt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:t.original_filename,children:t.original_filename}),h.jsx(bt,{className:"text-xs text-gray-500 dark:text-gray-400",children:t.siz Line truncated
${y.radio}
text-blue-600
bg-gray-100 dark:bg-gray-700
border-gray-300 dark:border-gray-600
focus:ring-blue-500 dark:focus:ring-blue-600
focus:ring-2
dark:ring-offset-gray-800
${T?"cursor-not-allowed":"cursor-pointer"}
`}),c.jsx(Z,{className:`
${v.label}
${E?"cursor-not-allowed":"cursor-pointer"}
`}),h.jsx(Q,{className:`
${y.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,No=(e,t)=>pn()?.t?.(e,t)??e,lk=()=>pn()?.locale?.supported?.()??["ko","en"],ck=()=>pn()?.locale?.current?.()??"ko",Ff=e=>{const t=No(`common.language_${e}`);return t===`common.language_${e}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[e]||e.toUpperCase():t},dk=({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:d="",purifyConfig:u,className:f="",name:h="content",htmlFieldName:v="content_mode",readOnly:p=!1})=>{const x=b.useMemo(()=>lk(),[]),m=b.useMemo(()=>ck(),[]),[T,C]=b.useState(m),[S,N]=b.useState(r),[E,k]=b.useState(e),[y,w]=b.useState(t??{}),[A,D]=b.useState(!1);b.useEffect(()=>{N(r)},[r]),b.useEffect(()=>{a||k(e)},[e,a]),b.useEffect(()=>{a&&t&&w(t)},[t,a]);const F=b.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=b.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=b.useCallback($=>{const z=$.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=b.useCallback(()=>{D($=>!$)},[]),O=a?y[T]??"":E,I=b.useCallback($=>!!y[$]?.trim(),[y]),H=()=>c.jsx(_,{className:"flex items-center gap-2 mb-3",children:x.map($=>{const z=$===m,G=T===$;return c.jsxs(re,{type:"button",className:`
`,children:S.label})]},S.value)})}),c&&h.jsx(Q,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:c})]})},as=()=>window.G7Core,Ki=(t,e)=>as()?.t?.(t,e)??t,lE=()=>as()?.locale?.supported?.()??["ko","en"],cE=()=>as()?.locale?.current?.()??"ko",kp=t=>{const e=Ki(`common.language_${t}`);return e===`common.language_${t}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[t]||t.toUpperCase():e},dE=({content:t="",value:e,onChange:n,multilingual:r=!1,isHtml:s=!1,onIsHtmlChange:o,rows:i=15,placeholder:a="",label:l,showHtmlModeToggle:c=!0,contentClassName:d="",purifyConfig:u,className:f="",name:g="content",htmlFieldName:m="content_mode",readOnly:p=!1,id:y,editorAttrs:b})=>{const S=v.useMemo(()=>lE(),[]),x=v.useMemo(()=>cE(),[]),[E,k]=v.useState(x),[C,N]=v.useState(s),[_,w]=v.useState(t),[M,O]=v.useState(e??{}),[L,$]=v.useState(!1);v.useEffect(()=>{N(s)},[s]),v.useEffect(()=>{r||w(t)},[t,r]),v.useEffect(()=>{r&&e&&O(e)},[e,r]);const F=v.useCallback(j=>{const U=j.target.value;if(w(U),n){const B=as()?.createChangeEvent?.({value:U,name:g,type:"textarea"})??{target:{name:g,value:U}};n(B)}},[n,g]),D=v.useCallback((j,U)=>{const B={...M,[j]:U};if(O(B),n){const G=as()?.createChangeEvent?.({value:B,name:g,type:"multilingual"})??{target:{name:g,value:B}};n(G)}},[n,g,M]),A=v.useCallback(j=>{const U=j.target.checked;if(N(U),U||$(!1),o){const B=as()?.createChangeEvent?.({checked:U,name:m,type:"checkbox"})??{target:{name:m,checked:U}};o(B)}},[o,m]),T=v.useCallback(()=>{$(j=>!j)},[]),V=r?M[E]??"":_,H=v.useCallback(j=>!!M[j]?.trim(),[M]),W=()=>h.jsx(I,{className:"flex items-center gap-2 mb-3",children:S.map(j=>{const U=j===x,B=E===j;return h.jsxs(oe,{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($),children:[c.jsx(ne,{name:"globe",className:"w-3 h-3"}),c.jsx(Z,{children:Ff($)}),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(_,{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:[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:No(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(_,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:No("common.html_mode")})]})]})]}),a&&H(),!A&&(a?x.map($=>c.jsx(_,{className:T===$?"block":"hidden",children:c.jsx(vr,{name:`${h}[${$}]`,value:y[$]??"",onChange:z=>M($,z.target.value),placeholder:`${i} (${Ff($)})`,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(_,{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(Ko,{content:O,isHtml:!0,className:d||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:u})})]})},Uf="g7_dismissed_warnings";function Vf(){try{const e=sessionStorage.getItem(Uf);return e?JSON.parse(e):[]}catch{return[]}}function uk(e){try{const t=Vf();t.includes(e)||(t.push(e),sessionStorage.setItem(Uf,JSON.stringify(t)))}catch{}}function fk(e){switch(e){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const gk=({warnings:e,className:t=""})=>{const[n,a]=b.useState([]);b.useEffect(()=>{a(Vf())},[]);const r=b.useCallback(s=>{uk(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(kl,{type:fk(s.level),message:s.message,dismissible:!0,onDismiss:()=>r(s.id)},s.id))})},Hf=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)},hk=({id:e,visibleFilters:t,defaultFilters:n=[],onFilterVisibilityChange:a})=>{const[r,o]=b.useState(!1),s=b.useRef(!0),i=b.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=b.useMemo(()=>`g7_filters_${e}${i!==void 0?`_${i}`:""}`,[e,i]),g=b.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const h=JSON.parse(f);if(Array.isArray(h))return h}}catch(f){Hf.warn("Failed to load from localStorage:",f)}return null},[l]),d=b.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(h){Hf.warn("Failed to save to localStorage:",h)}},[l]),u=b.useCallback(()=>{const f=g();return f||(t&&t.length>0?t:n)},[g,t,n]);return b.useEffect(()=>{if(!r){const f=u();a&&f.length>0&&a(f),o(!0)}},[r,a,u]),b.useEffect(()=>{if(r&&t&&t.length>0){if(s.current){s.current=!1;return}d(t)}},[r,t,d]),null},pk=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...e)=>console.log Line truncated
${B?U?"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":U?"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:()=>k(j),children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),h.jsx(Q,{children:kp(j)}),U&&h.jsx(Q,{className:"text-red-500",children:"*"}),H(j)&&!B&&h.jsx(re,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},j)})});return h.jsxs(I,{className:`space-y-2 ${f}`,id:y,...b,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[l&&h.jsx(en,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),h.jsxs(I,{className:"flex items-center gap-3",children:[C&&!p&&h.jsx(oe,{type:"button",onClick:T,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:Ki(L?"common.preview_off":"common.preview")}),c&&h.jsxs(en,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[h.jsx(wt,{type:"checkbox",name:m,checked:C,onChange:A,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"}),h.jsx(I,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Ki("common.html_mode")})]})]})]}),r&&W(),!L&&(r?S.map(j=>h.jsx(I,{className:E===j?"block":"hidden",children:h.jsx(qn,{name:`${g}[${j}]`,value:M[j]??"",onChange:U=>D(j,U.target.value),placeholder:`${a} (${kp(j)})`,rows:i,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 ${C?"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"}`})},j)):h.jsx(qn,{name:g,value:_,onChange:F,placeholder:a,rows:i,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 ${C?"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&&h.jsx(I,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:h.jsx(Xa,{content:V,isHtml:!0,className:d||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:u})})]})},Cp="g7_dismissed_warnings";function Sp(){try{const t=sessionStorage.getItem(Cp);return t?JSON.parse(t):[]}catch{return[]}}function uE(t){try{const e=Sp();e.includes(t)||(e.push(t),sessionStorage.setItem(Cp,JSON.stringify(e)))}catch{}}function fE(t){switch(t){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const hE=({warnings:t,className:e=""})=>{const[n,r]=v.useState([]);v.useEffect(()=>{r(Sp())},[]);const s=v.useCallback(i=>{uE(i),r(a=>[...a,i])},[]);if(!t||t.length===0)return null;const o=t.filter(i=>!n.includes(i.id));return o.length===0?null:h.jsx(I,{className:`space-y-2 ${e}`.trim(),children:o.map(i=>h.jsx(iu,{type:fE(i.level),message:i.message,dismissible:!0,onDismiss:()=>s(i.id)},i.id))})},_p=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...t)=>console.log("[Comp:FilterVisibility]",...t),warn:(...t)=>console.warn("[Comp:FilterVisibility]",...t),error:(...t)=>console.error("[Comp:FilterVisibility]",...t)},gE=({id:t,visibleFilters:e,defaultFilters:n=[],onFilterVisibilityChange:r})=>{const[s,o]=v.useState(!1),i=v.useRef(!0),a=v.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=v.useMemo(()=>`g7_filters_${t}${a!==void 0?`_${a}`:""}`,[t,a]),c=v.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const g=JSON.parse(f);if(Array.isArray(g))return g}}catch(f){_p.warn("Failed to load from localStorage:",f)}return null},[l]),d=v.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(g){_p.warn("Failed to save to localStorage:",g)}},[l]),u=v.useCallback(()=>{const f=c();return f||(e&&e.length>0?e:n)},[c,e,n]);return v.useEffect(()=>{if(!s){const f=u();r&&f.length>0&&r(f),o(!0)}},[s,r,u]),v.useEffect(()=>{if(s&&e&&e.length>0){if(i.current){i.current=!1;return}d(e)}},[s,e,d]),null},pE=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...t)=>c Line truncated
w-full 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
text-sm text-gray-700 dark:text-gray-200 font-medium
focus:ring-2 focus:ring-blue-500 focus:outline-none
flex items-center justify-between gap-2
text-left cursor-pointer
disabled:opacity-50 disabled:cursor-not-allowed
`,"aria-haspopup":"listbox","aria-expanded":d,children:[c.jsx(_,{className:"flex-1 min-w-0",children:T()}),c.jsx(gr,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${d?"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"})})]}),d&&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:jf("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
`,"aria-haspopup":"listbox","aria-expanded":f,children:[h.jsx(I,{className:"flex-1 min-w-0",children:E()}),h.jsx(Hn,{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:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&h.jsx(I,{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:h.jsx(I,{className:"overflow-auto",style:{maxHeight:i},children:t.length===0?h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:Ep("common.no_options")}):t.map((C,N)=>{const _=String(C.value)===String(e);return h.jsx(oe,{type:"button",onClick:()=>!C.disabled&&S(C.value),disabled:C.disabled,className:`
w-full px-4 py-3 text-left text-sm
hover:bg-gray-100 dark:hover:bg-gray-700
transition-colors
${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?zf(g.item,{item:S,index:N,isSelected:E},`item-${N}`):i||C(S,E)},S.value)})})})]})};function vk(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 yk=({value:e,checked:t=!1,icon:n,label:a,variant:r="blue",customColor:o,className:s="",style:i,onChange:l})=>{const[g,d]=b.useState(!1),u="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=vk(o),x=document.documentElement.classList.contains("dark");let m;return t?m={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:g?.85:1}:m=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:`${u} ${s}`,style:{...m,...i},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[c.jsx(ft,{type:"checkbox",value:e,checked:t,onChange:T=>{l?.(T)},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:`${u} ${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})]})},xk=({label:e,icon:t,iconPosition:n="left",position:a="right",className:r="",style:o,children:s})=>{const[i,l]=b.useState(!1),[g,d]=b.useState({top:0,left:0}),u=b.useRef(null),f=b.useRef(null),h=b.useCallback(()=>{if(!u.current)return;const p=u.current.getBoundingClientRect(),x=224;let m=a==="right"?p.right-x:p.left;const T=p.bottom+8;m<8&&(m=8),m+x>window.innerWidth-8&&(m=window.innerWidth-x-8),d({top:T,left:m})},[a]);b.useEffect(()=>{i&&h()},[i,h]),b.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]),b.useEffect(()=>{const p=x=>{const m=x.target,T=u.current?.contains(m),C=f.current?.contains(m);!T&&!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:u,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]})},wk=({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",d=()=>{!a&&i&&i()};return c.jsxs(_,{onClick:d,className:`flex items-center gap-3 px-4 py-3 transition-colors ${l} ${g} ${o}`,styl Line truncated
${_?"bg-blue-50 dark:bg-blue-900/20":""}
${C.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":_,"data-item-value":C.value,"data-item-index":N,"data-item-selected":_,children:c?.item?Mp(c.item,{item:C,index:N,isSelected:_},`item-${N}`):a||k(C,_)},C.value)})})})]})};function vE(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}const xE=({value:t,checked:e=!1,icon:n,label:r,variant:s="blue",customColor:o,className:i="",style:a,onChange:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(!1),g="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 b=vE(o),S=document.documentElement.classList.contains("dark");let x;return e?x={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:u?.85:1}:x=b?{backgroundColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${u?S?.25:.12:S?.15:.06})`,color:o,borderColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${S?.3:.2})`}:{},h.jsxs(en,{className:`${g} ${i}`,style:{...x,...a},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),id:c,...d,children:[h.jsx(wt,{type:"checkbox",value:t,checked:e,onChange:E=>{l?.(E)},className:"hidden"}),n&&h.jsx(re,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})}const y=e?{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"}[s]:{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"}[s];return h.jsxs(en,{className:`${g} ${y} ${i}`,style:a,id:c,...d,children:[h.jsx(wt,{type:"checkbox",value:t,checked:e,onChange:b=>{l?.(b)},className:"hidden"}),n&&h.jsx(re,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})},wE=({label:t,icon:e,iconPosition:n="left",position:r="right",className:s="",style:o,children:i})=>{const[a,l]=v.useState(!1),[c,d]=v.useState({top:0,left:0}),u=v.useRef(null),f=v.useRef(null),g=v.useCallback(()=>{if(!u.current)return;const p=u.current.getBoundingClientRect(),y=224;let b=r==="right"?p.right-y:p.left;const S=p.bottom+8;b<8&&(b=8),b+y>window.innerWidth-8&&(b=window.innerWidth-y-8),d({top:S,left:b})},[r]);v.useEffect(()=>{a&&g()},[a,g]),v.useEffect(()=>{if(!a)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[a]),v.useEffect(()=>{const p=y=>{const b=y.target,S=u.current?.contains(b),x=f.current?.contains(b);!S&&!x&&l(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const m=a?Nn.createPortal(h.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:c.top,left:c.left},onClick:()=>l(!1),children:i}),document.body):null;return h.jsxs(I,{className:`relative inline-block ${s}`,style:o,children:[h.jsxs(oe,{ref:u,onClick:()=>l(!a),className:"flex items-center gap-2",children:[n==="left"&&e&&h.jsx(re,{name:e,className:"w-4 h-4"}),t&&h.jsx(Q,{className:"text-sm font-medium",children:t}),n==="right"&&e&&h.jsx(re,{name:e,className:"w-4 h-4"})]}),m]})},kE=({label:t,icon:e,variant:n="default",disabled:r=!1,divider:s=!1,className:o="",style:i,onClick:a})=>{if(s)return h.jsx(I,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:i});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",c=r?"opacity-50 cursor-not-allowed":"cursor-pointer",d=()=>{!r&&a&&a()};return h.jsxs(I,{onClick:d,className:`flex items-center gap-3 px-4 py-3Line truncated
* @kurkle/color v0.3.4
* https://github.com/kurkle/color#readme
* (c) 2024 Jukka Kurkela
* Released under the MIT License
*/function io(t){return t+.5|0}const rr=(t,e,n)=>Math.max(Math.min(t,n),e);function ao(t){return rr(io(t*2.55),0,255)}function sr(t){return rr(io(t*255),0,255)}function jn(t){return rr(io(t/2.55)/100,0,1)}function Ap(t){return rr(io(t*100),0,100)}const fn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Lc=[..."0123456789ABCDEF"],VE=t=>Lc[t&15],zE=t=>Lc[(t&240)>>4]+Lc[t&15],qi=t=>(t&240)>>4===(t&15),HE=t=>qi(t.r)&&qi(t.g)&&qi(t.b)&&qi(t.a);function UE(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&fn[t[1]]*17,g:255&fn[t[2]]*17,b:255&fn[t[3]]*17,a:e===5?fn[t[4]]*17:255}:(e===7||e===9)&&(n={r:fn[t[1]]<<4|fn[t[2]],g:fn[t[3]]<<4|fn[t[4]],b:fn[t[5]]<<4|fn[t[6]],a:e===9?fn[t[7]]<<4|fn[t[8]]:255})),n}const BE=(t,e)=>t<255?e(t):"";function jE(t){var e=HE(t)?VE:zE;return t?"#"+e(t.r)+e(t.g)+e(t.b)+BE(t.a,e):void 0}const WE=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Dp(t,e,n){const r=e*Math.min(n,1-n),s=(o,i=(o+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[s(0),s(8),s(4)]}function GE(t,e,n){const r=(s,o=(s+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function YE(t,e,n){const r=Dp(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)r[s]*=1-e-n,r[s]+=e;return r}function XE(t,e,n,r,s){return t===s?(e-n)/r+(e<n?6:0):e===s?(n-t)/r+2:(t-e)/r+4}function Pc(t){const n=t.r/255,r=t.g/255,s=t.b/255,o=Math.max(n,r,s),i=Math.min(n,r,s),a=(o+i)/2;let l,c,d;return o!==i&&(d=o-i,c=a>.5?d/(2-o-i):d/(o+i),l=XE(n,r,s,d,o),l=l*60+.5),[l|0,c||0,a]}function $c(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(sr)}function Fc(t,e,n){return $c(Dp,t,e,n)}function KE(t,e,n){return $c(YE,t,e,n)}function qE(t,e,n){return $c(GE,t,e,n)}function Ip(t){return(t%360+360)%360}function ZE(t){const e=WE.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?ao(+e[5]):sr(+e[5]));const s=Ip(+e[2]),o=+e[3]/100,i=+e[4]/100;return e[1]==="hwb"?r=KE(s,o,i):e[1]==="hsv"?r=qE(s,o,i):r=Fc(s,o,i),{r:r[0],g:r[1],b:r[2],a:n}}function QE(t,e){var n=Pc(t);n[0]=Ip(n[0]+e),n=Fc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function JE(t){if(!t)return;const e=Pc(t),n=e[0],r=Ap(e[1]),s=Ap(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${s}%, ${jn(t.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const Lp={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Pp={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function RE(){const t={},e=Object.keys(Pp),n=Object.keys(Lp);let r,s,o,i,a;for(r=0;r<e.length;r++){for(i=a=e[r],s=0;s<n.length;s++)o=n[s]Line truncated
* Chart.js v4.5.1
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/function Wn(){}const iM=(()=>{let t=0;return()=>t++})();function ct(t){return t==null}function _t(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ze(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function hn(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Pn(t,e){return hn(t)?t:e}function Qe(t,e){return typeof t>"u"?e:t}const aM=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Vp=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ht(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function at(t,e,n,r){let s,o,i;if(_t(t))for(o=t.length,s=0;s<o;s++)e.call(n,t[s],s);else if(Ze(t))for(i=Object.keys(t),o=i.length,s=0;s<o;s++)e.call(n,t[i[s]],i[s])}function Ji(t,e){let n,r,s,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(s=t[n],o=e[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Ri(t){if(_t(t))return t.map(Ri);if(Ze(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let s=0;for(;s<r;++s)e[n[s]]=Ri(t[n[s]]);return e}return t}function zp(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function lM(t,e,n,r){if(!zp(t))return;const s=e[t],o=n[t];Ze(s)&&Ze(o)?co(s,o,r):e[t]=Ri(o)}function co(t,e,n){const r=_t(e)?e:[e],s=r.length;if(!Ze(t))return t;n=n||{};const o=n.merger||lM;let i;for(let a=0;a<s;++a){if(i=r[a],!Ze(i))continue;const l=Object.keys(i);for(let c=0,d=l.length;c<d;++c)o(l[c],t,i,n)}return t}function uo(t,e){return co(t,e,{merger:cM})}function cM(t,e,n){if(!zp(t))return;const r=e[t],s=n[t];Ze(r)&&Ze(s)?uo(r,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Ri(s))}const Hp={"":t=>t,x:t=>t.x,y:t=>t.y};function dM(t){const e=t.split("."),n=[];let r="";for(const s of e)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function uM(t){const e=dM(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function Cr(t,e){return(Hp[e]||(Hp[e]=uM(e)))(t)}function zc(t){return t.charAt(0).toUpperCase()+t.slice(1)}const fo=t=>typeof t<"u",or=t=>typeof t=="function",Up=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function fM(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const dt=Math.PI,Ct=2*dt,ea=Number.POSITIVE_INFINITY,hM=dt/180,Et=dt/2,Sr=dt/4,Bp=dt*2/3,jp=Math.log10,ir=Math.sign;function ta(t,e,n){return Math.abs(t-e)<n}function Wp(t){const e=Math.round(t);t=ta(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(jp(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function gM(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((s,o)=>s-o).pop(),e}function pM(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function na(t){return!pM(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function mM(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function bM(t,e,n){let r,s,o;for(r=0,s=t.length;r<s;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Gn(t){return t*(dt/180)}function yM(t){return t*(180/dt)}function Gp(t){if(!hn(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Yp(t,e){const n=e.x-t.x,r=e.y-t.y,s=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*dt&&(o+=Ct),{angle:o,distance:s}}function vM(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $n(t){return(t%Ct+Ct)%Ct}function ra(t,e,n,r){const s=$n(t),o=$n(e),i=$n(n),a=$n(o-s),l=$n(i-s),c=$n(s-o),d=$n(s-i);return s===o||s===i||r&&o===i||a>l&&c<d}function Zt(t,e,n){return Math.max(e,Math.min(n,t))}function xM(t){return Zt(t,-32768,32767)}function _r(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function Hc(t,e,n){n=n||(i=>t[i]<e);let r=t.length-1,s=0,o;for(;r-s>1;)o=s+r>>1,n(o)?s=o:r=o;return{lo:s,hi:r}}const Uc=(t,e,n,r)=>Hc(t,n,r?s=>{const o=t[s][e];return o<n||o===n&&t[s+1][e]===n}:s=>t[s][e]<n),wM=(t,e,n)=>Hc(t,n,r=>t[r][e]>=n);function kM(t,e,n){let r=0,s=t.length;for(;r<s&&t[r]<e;)r++;for(;s>r&&t[s-1]>n;)s--;return r>0||s<t.length?t.slice(r,s):t}const Xp=["push","pop","shift","splice","unshift"];function CM(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Xp.forEach(n=>{const r="_onData"+zc(n),s=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const i=s.apply(this,o);return t._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),i}})})}function Kp(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(e);s!==-1&&r.splice(s,1),!(r.length>0)&&(Xp.forEach(o=>{delete t[o]}),delete t._chartjs)}function qp(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Zp=(function(){return typeof window>"u"?functionLine truncated
* Chart.js v4.5.1
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/class dN{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,s){const o=n.listeners[s],i=n.duration;o.forEach(a=>a({chart:e,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=Zp.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const o=r.items;let i=o.length-1,a=!1,l;for(;i>=0;--i)l=o[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(o[i]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,r,e,"progress")),o.length||(r.running=!1,this._notify(s,r,e,"complete"),r.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yn=new dN;const x0="transparent",uN={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=t0(t||x0),s=r.valid&&t0(e||x0);return s&&s.valid?s.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class fN{constructor(e,n,r,s){const o=n[r];s=ia([e.to,s,o,e.from]);const i=ia([e.from,o,s]);this._active=!0,this._fn=e.fn||uN[e.type||typeof i],this._easing=ho[e.easing]||ho.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=i,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],o=r-this._start,i=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=ia([e.to,n,s,e.from]),this._from=ia([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,s=this._prop,o=this._from,i=this._loop,a=this._to;let l;if(this._active=o!==a&&(i||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class w0{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Ze(e))return;const n=Object.keys(vt.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!Ze(o))return;const i={};for(const a of n)i[a]=o[a];(_t(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,i)})})}_animateOptions(e,n){const r=n.options,s=gN(e,r);if(!s)return[];const o=this._createAnimations(s,r);return r.$shared&&hN(e.options.$animations,r).then(()=>{e.options=r},()=>{}),o}_createAnimations(e,n){const r=this._properties,s=[],o=e.$animations||(e.$animations={}),i=Object.keys(n),a=Date.now();let l;for(l=i.length-1;l>=0;--l){const c=i[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,n));continue}const d=n[c];let u=o[c];const f=r.get(c);if(u)if(f&&u.active()){u.update(f,d,a);continue}else u.cancel();if(!f||!f.duration){e[c]=d;continue}o[c]=u=new fN(f,e,c,d),s.push(u)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Yn.add(this._chart,r),!0}}function hN(t,e){const n=[],r=Object.keys(e);for(let s=0;s<r.length;s++){const o=t[r[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function gN(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function k0(t,e){const n=t&&t.options||{},r=n.reverse,s=n.min===void 0?e:0,o=n.max===void 0?e:0;return{start:r?o:s,end:r?s:o}}function pN(t,e,n){if(n===!1)return!1;const r=k0(t,n),s=k0(e,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function mN(t){let e,n,r,s;return Ze(t)?(e=t.top,n=t.right,r=t.bottom,s=t.left):e=n=r=s=t,{top:e,right:n,bottom:r,left:s,disabled:t===!1}}function C0(t,e){const n=[],r=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=r.length;s<o;++s)n.push(r[s].indLine truncated
`)>-1?t.split(`
`):t}function l5(t,e){const{element:n,datasetIndex:r,index:s}=e,o=t.getDatasetMeta(r).controller,{label:i,value:a}=o.getLabelAndValue(s);return{chart:t,label:i,parsed:o.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function fm(t,e){const n=t.chart.ctx,{body:r,footer:s,title:o}=t,{boxWidth:i,boxHeight:a}=e,l=Ut(e.bodyFont),c=Ut(e.titleFont),d=Ut(e.footerFont),u=o.length,f=s.length,g=r.length,m=gn(e.padding);let p=m.height,y=0,b=r.reduce((E,k)=>E+k.before.length+k.lines.length+k.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=g*E+(b-g)*l.lineHeight+(b-1)*e.bodySpacing}f&&(p+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let S=0;const x=function(E){y=Math.max(y,n.measureText(E).width+S)};return n.save(),n.font=c.string,at(t.title,x),n.font=l.string,at(t.beforeBody.concat(t.afterBody),x),S=e.displayColors?i+2+e.boxPadding:0,at(r,E=>{at(E.before,x),at(E.lines,x),at(E.after,x)}),S=0,n.font=d.string,at(t.footer,x),n.restore(),y+=m.width,{width:y,height:p}}function c5(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function d5(t,e,n,r){const{x:s,width:o}=r,i=n.caretSize+n.caretPadding;if(t==="left"&&s+o+i>e.width||t==="right"&&s-o-i<0)return!0}function u5(t,e,n,r){const{x:s,width:o}=n,{width:i,chartArea:{left:a,right:l}}=t;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=i-o/2&&(c="right"),d5(c,t,e,n)&&(c="center"),c}function hm(t,e,n){const r=n.yAlign||e.yAlign||c5(t,n);return{xAlign:n.xAlign||e.xAlign||u5(t,e,n,r),yAlign:r}}function f5(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function h5(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function gm(t,e,n,r){const{caretSize:s,caretPadding:o,cornerRadius:i}=t,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=cs(i);let m=f5(e,a);const p=h5(e,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+s:a==="right"&&(m+=Math.max(u,g)+s),{x:Zt(m,0,r.width-e.width),y:Zt(p,0,r.height-e.height)}}function wa(t,e,n){const r=gn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function pm(t){return Vn([],Xn(t))}function g5(t,e,n){return ds(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function mm(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const bm={beforeTitle:Wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Wn,beforeBody:Wn,beforeLabel:Wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ct(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Wn,afterBody:Wn,beforeFooter:Wn,footer:Wn,afterFooter:Wn};function Qt(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?bm[e].call(n,r):s}class hd extends Ar{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new w0(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=g5(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=Qt(r,"beforeTitle",this,e),o=Qt(r,"title",this,e),i=Qt(r,"afterTitle",this,e);let a=[];return a=Vn(a,Xn(s)),a=Vn(a,Xn(o)),a=Vn(a,Xn(i)),a}getBeforeBody(e,n){return pm(Qt(n.call 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/UnifiedIcon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/I.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/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/SectionHeader.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.jsLine truncated
@@ -17,6 +17,12 @@ export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectE
searchable?: boolean;
/** 검색 input placeholder */
searchPlaceholder?: string;
/**
* 레이아웃 편집기 주입 속성 (편집 모드 전용). Select 는 커스텀 드롭다운 루트에
* 개별 data-editor-* 키를 spread 해야 선택/편집이 닿는다(커스텀 루트
* passthrough). basic 컴포넌트라 `{...props}` 로 DOM 표준 속성(id 등)도 함께 흐른다.
*/
editorAttrs?: Record<string, unknown>;
}
/**
* 커스텀 Select 컴포넌트
@@ -0,0 +1,70 @@
import { default as React } from 'react';
/**
* UnifiedIcon 크기 타입
*/
export type UnifiedIconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
/**
* UnifiedIcon Props
*/
export interface UnifiedIconProps {
/**
* 아이콘 지정자
*
* @example
* // Font Awesome (기본)
* "fa:cart-shopping"
* "fa-solid fa-cart-shopping"
* "cart-shopping" // 접두사 없으면 FA 기본
*
* // 외부 SVG 파일
* "svg:/modules/my-module/assets/icon.svg"
*
* // 이미지 파일
* "img:/images/custom-icon.png"
*/
icon: string;
/**
* 아이콘 크기
* - xs: 12px (w-3 h-3)
* - sm: 16px (w-4 h-4)
* - md: 20px (w-5 h-5) - 기본값
* - lg: 24px (w-6 h-6)
* - xl: 32px (w-8 h-8)
*
* @default 'md'
*/
size?: UnifiedIconSize;
/**
* 추가 CSS 클래스
*/
className?: string;
/**
* 색상 (Tailwind 클래스)
*
* @example
* "text-blue-500"
* "text-slate-600 dark:text-slate-300"
*/
color?: string;
/**
* 접근성 레이블
*/
ariaLabel?: string;
}
/**
* UnifiedIcon 컴포넌트
*
* 다양한 아이콘 소스(Font Awesome, SVG, 이미지)를 통합하여 렌더링하는 컴포넌트입니다.
*
* @example
* // Font Awesome 아이콘 (기본)
* <UnifiedIcon icon="fa:cart-shopping" size="md" />
* <UnifiedIcon icon="cart-shopping" /> // 접두사 없으면 FA 기본
*
* // 외부 SVG 파일
* <UnifiedIcon icon="svg:/modules/my-module/assets/icon.svg" size="lg" />
*
* // 이미지 파일
* <UnifiedIcon icon="img:/images/custom-icon.png" size="sm" />
*/
export declare const UnifiedIcon: React.FC<UnifiedIconProps>;
@@ -36,8 +36,10 @@ export { Nav, type NavProps } from './Nav';
export { Section, type SectionProps } from './Section';
export { Svg, type SvgProps } from './Svg';
export { Icon, type IconProps } from './Icon';
export { UnifiedIcon, type UnifiedIconProps, type UnifiedIconSize } from './UnifiedIcon';
export { Code, type CodeProps } from './Code';
export { Pre, type PreProps } from './Pre';
export { Fragment, type FragmentProps } from './Fragment';
export { Hr, type HrProps } from './Hr';
export { I, type IProps } from './I';
export { IconName, type IconStyle, type IconSize } from './IconTypes';
@@ -1,4 +1,5 @@
import { default as React, ReactNode } from 'react';
import { EditorAttrs } from '../../types';
export interface AccordionProps {
/** 기본 열림 상태 */
defaultOpen?: boolean;
@@ -14,6 +15,12 @@ export interface AccordionProps {
children?: ReactNode;
/** 비활성화 여부 */
disabled?: boolean;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* Accordion 집합 컴포넌트
@@ -1,5 +1,6 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { EditorAttrs } from '../../types';
export interface ActionMenuItem {
id: string | number;
label?: string;
@@ -36,6 +37,12 @@ export interface ActionMenuProps {
* @param item - 클릭된 아이템 전체 객체
*/
onItemClick?: (itemId: string | number, item: ActionMenuItem) => void;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* ActionMenu 집합 컴포넌트
@@ -1,5 +1,6 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { EditorAttrs } from '../../types';
/**
* 빠른 링크 인터페이스
*/
@@ -19,6 +20,12 @@ export interface AdminFooterProps {
className?: string;
copyrightModalId?: string;
changelogModalId?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* AdminFooter 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
/**
* 메뉴 아이템 인터페이스 (API 응답 구조)
*/
@@ -27,6 +28,12 @@ export interface AdminSidebarProps {
className?: string;
/** 현재 로케일 (다국어 메뉴 이름 표시용). 미지정 시 G7Core.locale.current() 자동 사용 */
currentLocale?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* AdminSidebar 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
/**
* 알림 타입
*/
@@ -24,6 +25,14 @@ export interface AlertProps {
* 사용자 정의 클래스
*/
className?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/**
* 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread)
*/
editorAttrs?: EditorAttrs;
}
/**
* Alert 알림 컴포넌트
@@ -1,10 +1,20 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface BadgeProps {
/** 색상명 직접 지정 (blue/green/red/gray/yellow/... ). variant 보다 우선 적용 */
color?: string;
/** 의미 기반 변형 (success/warning/danger/info/primary/secondary/text). 백엔드 Enum variant() 출력과 매핑 */
variant?: string;
text?: string;
size?: 'sm' | 'md' | 'lg';
className?: string;
style?: React.CSSProperties;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* Badge 집합 컴포넌트
@@ -14,13 +24,16 @@ export interface BadgeProps {
* 기본 컴포넌트 조합: Span
*
* @example
* // 레이아웃 JSON 사용 예시
* // 레이아웃 JSON 사용 예시 — 색상 직접 지정
* {
* "name": "Badge",
* "props": {
* "color": "blue",
* "text": "활성"
* }
* "props": { "color": "blue", "text": "활성" }
* }
* @example
* // 의미 기반 variant (백엔드 Enum variant() 출력 바인딩)
* {
* "name": "Badge",
* "props": { "variant": "{{row.option_status_variant}}", "text": "{{row.option_status_label}}" }
* }
*/
export declare const Badge: React.FC<React.PropsWithChildren<BadgeProps>>;
@@ -0,0 +1,43 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface BarChartDataset {
label: string;
data: number[];
backgroundColor?: string;
borderRadius?: number;
/**
* 사용할 Y축 ID. 'y'(기본, 좌측) 또는 'y1'(보조, 우측).
* 단위/규모가 크게 다른 두 계열(예: 판매 수량 vs 매출액)을 한 차트에 그릴 때,
* 한 계열을 'y1' 로 지정하면 각자 스케일로 그려져 작은 값 계열이 묻히지 않는다.
*/
yAxisID?: 'y' | 'y1';
}
export interface BarChartProps {
/** X축 라벨 배열 */
labels: string[];
/** 데이터셋 배열 */
datasets: BarChartDataset[];
/** 차트 높이 (px 숫자, 또는 단위 포함 문자열 — 편집기 text 위젯은 숫자 문자열 전달) */
height?: number | string;
/** 범례 표시 여부 */
showLegend?: boolean;
/** X축 그리드(세로선) 표시 여부 */
showGrid?: boolean;
/** Y축 그리드(가로선) 표시 여부 */
showYGrid?: boolean;
/** Y축 눈금 표시 여부 */
showYAxis?: boolean;
/** 추가 CSS 클래스 */
className?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* React.memo로 감싸서 props가 같으면 re-render 스킵
* 페이지 로딩바 완료 시 불필요한 리렌더링 방지
*/
export declare const BarChart: React.NamedExoticComponent<BarChartProps>;
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface BreadcrumbItem {
label: string;
href?: string;
@@ -11,6 +12,12 @@ export interface BreadcrumbProps {
homeHref?: string;
maxItems?: number;
className?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* Breadcrumb 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface CardProps {
title?: string;
content?: string;
@@ -7,6 +8,12 @@ export interface CardProps {
className?: string;
onClick?: () => void;
style?: React.CSSProperties;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* Card 집합 컴포넌트
@@ -1,5 +1,6 @@
import { default as React } from 'react';
import { ActionMenuItem } from './ActionMenu';
import { EditorAttrs } from '../../types';
/**
* CardGrid 셀 자식 요소 타입
*/
@@ -60,6 +61,12 @@ export interface CardGridProps {
showSkeleton?: boolean;
skeletonCount?: number;
skeletonCellChildren?: CardGridCellChild[];
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* CardGrid 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
/**
* 카테고리 노드 인터페이스 (CategoryResource API 응답 기반)
*/
@@ -30,6 +31,12 @@ export interface CategoryTreeProps {
onToggle?: (expandedIds: number[]) => void;
/** 선택 변경 콜백: (selectedIds: number[]) => void */
onSelectionChange?: (selectedIds: number[]) => void;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* CategoryTree 집합 컴포넌트
@@ -1,5 +1,6 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { EditorAttrs } from '../../types';
export interface ChipCheckboxProps {
value: string;
checked?: boolean;
@@ -10,6 +11,12 @@ export interface ChipCheckboxProps {
className?: string;
style?: React.CSSProperties;
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* ChipCheckbox 집합 컴포넌트
@@ -1,5 +1,6 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { EditorAttrs } from '../../types';
/**
* 전역 window 타입 확장
* 그누보드7 Core의 AuthManager에 접근하기 위한 타입 선언
@@ -60,6 +61,8 @@ export interface ColumnSelectorProps {
* 지정하지 않으면 columns 끝에 추가됩니다.
*/
dynamicColumnsInsertAfter?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* ColumnSelector 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
import { IconName } from '../basic/IconTypes';
import { ActionMenuItem } from './ActionMenu';
export interface DataGridCellChild {
@@ -231,7 +232,7 @@ export interface DataGridProps {
/**
* 서브 행 셀의 CSS 클래스 (선택적)
*
* @default "px-6 py-2 bg-gray-50 dark:bg-gray-750"
* @default "px-6 py-2 bg-gray-50 dark:bg-gray-900"
*/
subRowClassName?: string;
/**
@@ -269,6 +270,8 @@ export interface DataGridProps {
* 미지정 시 footerCells를 key-value 형태로 자동 렌더링합니다.
*/
footerCardChildren?: DataGridCellChild[];
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* DataGrid 집합 컴포넌트
@@ -0,0 +1,55 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface DonutChartDataItem {
/** 항목 이름 */
name: string;
/** 값 */
value: number;
/** 색상 (hex) */
color: string;
}
export interface DonutChartProps {
/** 데이터 배열 */
data: DonutChartDataItem[];
/** 중앙 라벨 (예: "April 2025") */
centerLabel?: string;
/** 중앙 값 (예: "$14,582.94") */
centerValue?: string;
/** 차트 크기 (px 숫자, 또는 단위 포함 문자열 — 편집기 text 위젯은 숫자 문자열 전달) */
size?: number | string;
/** 도넛 두께 비율 (0-1) */
cutout?: string;
/** 범례 표시 여부 */
showLegend?: boolean;
/** 추가 CSS 클래스 */
className?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* DonutChart 컴포넌트
*
* Chart.js 기반 도넛 차트 컴포넌트입니다.
* 중앙에 총액이나 기간을 표시할 수 있습니다.
*
* @example
* // 레이아웃 JSON 사용 예시
* {
* "name": "DonutChart",
* "props": {
* "data": [
* { "name": "Direct link", "value": 1600, "color": "#8B5CF6" },
* { "name": "Advertising", "value": 1900, "color": "#EC4899" },
* { "name": "Email", "value": 2096, "color": "#3B82F6" }
* ],
* "centerLabel": "April 2025",
* "centerValue": "$14,582.94",
* "size": 200
* }
* }
*/
export declare const DonutChart: React.FC<DonutChartProps>;
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface DropdownItem {
label: string;
value: string;
@@ -15,6 +16,12 @@ export interface DropdownProps {
variant?: 'default' | 'text';
className?: string;
style?: React.CSSProperties;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* Dropdown 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../../types';
/**
* 컬럼 타입
*/
@@ -115,6 +116,10 @@ export interface DynamicFieldListProps {
itemIdKey?: string;
/** 검증 에러 객체 (예: {"fields.0.name.ko": ["에러 메시지"], "fields.1.content.ko": ["에러 메시지"]}) */
errors?: Record<string, string[]>;
/** DOM id 속성 (레이아웃 편집기 코어 일괄 ID) */
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* DynamicFieldListItem Props
@@ -1,5 +1,6 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { EditorAttrs } from '../../types';
export interface EmptyStateAction {
label: string;
onClick: () => void;
@@ -14,6 +15,12 @@ export interface EmptyStateProps {
illustrationAlt?: string;
actions?: EmptyStateAction[];
className?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* EmptyState 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export type ExtensionType = 'module' | 'plugin';
/**
* 설치된 모듈/플러그인 정보 인터페이스
@@ -25,6 +26,12 @@ export interface ExtensionBadgeProps {
className?: string;
/** 인라인 스타일 */
style?: React.CSSProperties;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* ExtensionBadge 집합 컴포넌트
@@ -1,8 +1,4 @@
/**
* FileUploader 타입 정의
*
* @module composite/FileUploader/types
*/
import { EditorAttrs } from '../../../types';
export interface Attachment {
id: number;
hash: string;
@@ -159,6 +155,10 @@ export interface FileUploaderProps {
/** 순서 변경 API (기본값: /api/admin/attachments/reorder) */
reorder?: string;
};
/** DOM id 속성 (레이아웃 편집기 코어 일괄 ID) */
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
export interface FileUploaderRef {
/** 모든 대기 파일 업로드 */
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface FilterOption {
id: string | number;
label: string;
@@ -19,6 +20,12 @@ export interface FilterGroupProps {
showResetButton?: boolean;
className?: string;
style?: React.CSSProperties;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* FilterGroup 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface FormFieldProps {
/** 필드 레이블 */
label?: string;
@@ -18,6 +19,12 @@ export interface FormFieldProps {
horizontal?: boolean;
/** 레이블 너비 (수평 레이아웃 시) */
labelWidth?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* FormField 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface HtmlContentProps {
/**
* 콘텐츠 (HTML 또는 일반 텍스트)
@@ -24,6 +25,12 @@ export interface HtmlContentProps {
* content보다 우선순위가 높음
*/
text?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* HtmlContent 콘텐츠 렌더링 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface MultilingualValue {
[locale: string]: string;
}
@@ -88,6 +89,12 @@ export interface HtmlEditorProps {
* 읽기 전용 모드
*/
readOnly?: boolean;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* HtmlEditor 컴포넌트
@@ -1,14 +1,21 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { EditorAttrs } from '../../types';
export interface IconButtonProps {
iconName: IconName;
label?: string;
onClick?: () => void;
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
variant?: 'primary' | 'secondary' | 'danger' | 'ghost' | 'outline';
size?: 'sm' | 'md' | 'lg';
disabled?: boolean;
className?: string;
style?: React.CSSProperties;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* IconButton 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface IconOption {
value: string;
label: string;
@@ -14,7 +15,14 @@ export interface IconSelectProps {
className?: string;
disabled?: boolean;
name?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
export declare const defaultIconOptions: IconOption[];
/**
* IconSelect 컴포넌트
* 아이콘 선택 드롭다운
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface GalleryImage {
/** 이미지 표시용 URL (라이트박스에서 보여줄 이미지) */
src: string;
@@ -38,6 +39,17 @@ export interface ImageGalleryProps {
showThumbnails?: boolean;
/** 커스텀 다운로드 핸들러 (제공 시 기본 다운로드 로직 대신 실행) */
onDownload?: (image: GalleryImage, index: number) => void;
/**
* 레이아웃 편집기 주입 속성 (편집 모드 전용).
* 본 컴포넌트는 서드파티 Lightbox 모달(`createPortal` 로 body 렌더)이라 런타임에는
* 인라인 DOM 이 없다. 편집 모드(editorAttrs 존재)에서는 캔버스 선택·속성 편집이
* 가능하도록 인라인 placeholder(이미지 썸네일 그리드)를 대신 렌더하고 거기에
* editorAttrs·id 를 부착한다. 런타임(editorAttrs 미주입)은 종전 Lightbox 동작 그대로.
*
*/
editorAttrs?: EditorAttrs;
/** DOM id 속성 (레이아웃 편집기 코어 일괄 ID — 편집 placeholder 루트에 부착) */
id?: string;
}
/**
* 이미지 다운로드 실행
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
/**
* LanguageSelector Props
*/
@@ -15,6 +16,17 @@ export interface LanguageSelectorProps {
className?: string;
/** 인라인 모드 (드롭다운 메뉴 내에서 사용) */
inline?: boolean;
/**
* 독립 모드 버튼에 현재 선택 언어 코드를 globe 아이콘 옆에 표시한다.
* 유저 템플릿 헤더 언어 버튼과 동일한 표기(아이콘 + 로케일 코드)를 위해 사용.
*/
showCode?: boolean;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* LanguageSelector 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export type SpinnerSize = 'sm' | 'md' | 'lg' | 'xl';
export interface LoadingSpinnerProps {
id?: string;
@@ -7,6 +8,8 @@ export interface LoadingSpinnerProps {
fullscreen?: boolean;
text?: string;
className?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* LoadingSpinner 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface MultilingualValue {
[locale: string]: string;
}
@@ -40,6 +41,12 @@ export interface MultilingualInputProps {
showCodeOnMobile?: boolean;
/** 에러 메시지 (입력 필드에 적색 테두리 표시) */
error?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* 다국어 입력 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
/** 다국어 값 객체 */
export interface MultilingualValue {
[locale: string]: string;
@@ -46,6 +47,12 @@ export interface MultilingualTagInputProps {
state: Record<string, any>;
setState: (updates: any) => void;
};
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* 다국어 태그 입력 컴포넌트
@@ -1,5 +1,6 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { EditorAttrs } from '../../types';
/**
* 알림 아이템 인터페이스
*/
@@ -54,6 +55,12 @@ export interface NotificationCenterProps {
/** 드롭다운 정렬 방향 — "right"(기본): 우측 정렬되어 좌측으로 확장 / "left": 좌측 정렬되어 우측으로 확장 */
dropdownAlign?: 'left' | 'right';
className?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* NotificationCenter 컴포넌트
@@ -1,6 +1,7 @@
import { default as React } from 'react';
import { IconName } from '../basic/IconTypes';
import { BreadcrumbItem } from './Breadcrumb';
import { EditorAttrs } from '../../types';
/**
* 탭 아이템 인터페이스
*/
@@ -34,6 +35,12 @@ export interface PageHeaderProps {
actions?: ActionButton[];
className?: string;
children?: React.ReactNode;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* PageHeader 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface PaginationProps {
currentPage: number;
totalPages: number;
@@ -9,6 +10,12 @@ export interface PaginationProps {
style?: React.CSSProperties;
prevText?: string;
nextText?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* Pagination 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
import { ExtensionInfo } from './ExtensionBadge';
/**
* 권한 값 인터페이스 (id + scope_type)
@@ -54,6 +55,12 @@ export interface PermissionTreeProps {
installedModules?: ExtensionInfo[];
/** 설치된 플러그인 목록 (_global.installedPlugins에서 전달) */
installedPlugins?: ExtensionInfo[];
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* PermissionTree 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface ProductCardProps {
imageUrl?: string;
imageAlt?: string;
@@ -13,6 +14,12 @@ export interface ProductCardProps {
onButtonClick?: () => void;
className?: string;
style?: React.CSSProperties;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* ProductCard 집합 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface RadioOption {
/** 라디오 버튼의 값 */
value: string;
@@ -28,6 +29,12 @@ export interface RadioGroupProps {
label?: string;
/** 에러 메시지 */
error?: string;
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* RadioGroup 컴포넌트
@@ -1,4 +1,5 @@
import { default as React } from 'react';
import { EditorAttrs } from '../../types';
export interface RichSelectOption {
/** 옵션 고유 값 */
value: string | number;
@@ -48,6 +49,12 @@ export interface RichSelectProps {
/** 선택된 항목 표시용 레이아웃 정의 */
selected?: any[];
};
/**
* DOM id 속성 (레이아웃 편집기 코어 일괄 ID)
*/
id?: string;
/** 레이아웃 편집기 주입 속성 (편집 모드 전용, 루트에 spread) */
editorAttrs?: EditorAttrs;
}
/**
* 리치 셀렉트 컴포넌트
Loaded 100 of 3582 files, more files were not shown because too many files have changed in this diff. Show more