Merge pull request from gnuboard:HeuJung/issue644

HeuJung/issue644
This commit is contained in:
정정홍 authored and GitHub committed 2026-09-04 15:38:16 +09:00
commit f417488816
42 files changed
+1207 -90

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@
- 초기 화면 파일을 새로 만드는 도중 짧은 시간 동안 기존 파일을 찾지 못할 수 있던 문제를 수정했습니다. 새 파일이 완성된 뒤에야 이전 파일을 정리합니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
- 캐시를 비운 뒤 정리 작업이 먼저 실행되면 아직 사용 중인 직전 초기 화면 파일이 삭제될 수 있던 문제를 수정했습니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
- 확장 프로그램의 스크립트·스타일 묶음을 저장하지 못하는 환경에서 해당 요청이 서버 오류(500)가 되던 문제를 수정했습니다. 저장에 실패해도 화면에는 정상적으로 전달됩니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
- 배포 도중 확장 파일이 잠시 비면 내용이 빠진 빈 묶음이 정상 응답으로 전달되어, 한참 뒤 기능이 동작하지 않는 형태로만 드러나던 문제를 수정했습니다. 이제 그 상태를 오류로 알립니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
- 배포 도중 확장 파일이 잠시 비면 내용이 빠진 빈 묶음이 정상 응답으로 전달되어, 한참 뒤 기능이 동작하지 않는 형태로만 드러나던 문제를 수정했습니다. 이제 그 상태를 오류로 알립니다. 스타일이 비어 있는 확장만 설치된 사이트처럼 내용이 원래 없는 경우는 오류로 보지 않습니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
- 일부 확장자(`.mjs`, `.webp`, `.otf`) 의 없는 파일을 요청하면 파일 대신 페이지 내용이 전달되어 화면이 깨지던 문제를 수정했습니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
- 초기 화면 파일을 새로 만들 때 파일 시스템이 일시적으로 이동을 거부하면 그 한 번으로 생성이 실패하던 문제를 수정했습니다. 이제 잠시 후 다시 시도하며, 사이트 동작에는 영향이 없지만 불필요한 실패 알림이 뜨던 상황이 사라집니다. (#122 @glitter-gim 님께서 건의해주셨습니다.)
- 설치 마법사 2단계(설치 환경 확인)가 Windows 사용자 계정 이름에 한글이 포함되어 있으면 빈 응답을 받아 `Unexpected end of JSON input` 오류로 더 진행되지 않던 문제를 수정했습니다. 계정 이름을 영문으로 바꾸지 않아도 설치할 수 있습니다. (sir.kr 커뮤니티의 FreeMax 님께서 제보해주셨습니다.)
+23
View File
@@ -1304,6 +1304,29 @@ abstract class AbstractModule implements CacheableExtensionInterface, ModuleInte
return $result;
}
/**
* 매니페스트가 **선언한** 프론트엔드 자산의 절대 경로를 반환합니다 (파일 존재 여부 무관).
*
* `getBuiltAssetAbsolutePaths()` 는 `file_exists()` 게이트라 소실된 산출물이 목록에서
* 사라진다. 배포 중 `dist` 가 잠깐 비는 상태를 "선언은 있는데 파일이 없다" 로 세려면
* 선언 축을 그대로 돌려주는 통로가 필요하다 — 이 메서드가 그 축이다.
*
* @return array<string, string> kind('js'|'css') => 절대 경로 (선언된 kind 만)
*/
public function getDeclaredAssetAbsolutePaths(): array
{
$assets = $this->getAssets();
$result = [];
foreach (['js', 'css'] as $kind) {
if (! empty($assets[$kind]['output'])) {
$result[$kind] = $this->getModulePath().'/'.$assets[$kind]['output'];
}
}
return $result;
}
/**
* 모듈 스토리지 드라이버 인스턴스 반환
*
+23
View File
@@ -1126,6 +1126,29 @@ abstract class AbstractPlugin implements CacheableExtensionInterface, PluginInte
return $result;
}
/**
* 매니페스트가 **선언한** 프론트엔드 자산의 절대 경로를 반환합니다 (파일 존재 여부 무관).
*
* `getBuiltAssetAbsolutePaths()` 는 `file_exists()` 게이트라 소실된 산출물이 목록에서
* 사라진다. 배포 중 `dist` 가 잠깐 비는 상태를 "선언은 있는데 파일이 없다" 로 세려면
* 선언 축을 그대로 돌려주는 통로가 필요하다 — 이 메서드가 그 축이다.
*
* @return array<string, string> kind('js'|'css') => 절대 경로 (선언된 kind 만)
*/
public function getDeclaredAssetAbsolutePaths(): array
{
$assets = $this->getAssets();
$result = [];
foreach (['js', 'css'] as $kind) {
if (! empty($assets[$kind]['output'])) {
$result[$kind] = $this->getPluginPath().'/'.$assets[$kind]['output'];
}
}
return $result;
}
/**
* 플러그인이 설정 페이지를 가지고 있는지 확인합니다.
*
@@ -34,7 +34,7 @@ class PublicModuleController extends PublicBaseController
*
* 병합 파일을 fileResponse 로 서빙한다(ETag/304/환경별 Cache-Control 재사용).
* 디스크 캐시가 실패하면 메모리 병합 결과로 200 을 낸다(캐시는 최적화일 뿐이다).
* 에셋을 선언한 활성 확장이 0개면 빈 200, 선언은 있는데 결과가 비면 503 —
* 선언한 산출물이 소실·판독 불가면 503, 존재하되 비었으면(또는 선언 0) 빈 200 —
* 판정은 ServesExtensionBundles::bundleResponse() 단일 지점.
*
* @return BinaryFileResponse|Response 병합 JS 파일 응답 또는 빈 응답
@@ -34,7 +34,7 @@ class PublicPluginController extends PublicBaseController
*
* 병합 파일을 fileResponse 로 서빙한다(ETag/304/환경별 Cache-Control 재사용).
* 디스크 캐시가 실패하면 메모리 병합 결과로 200 을 낸다(캐시는 최적화일 뿐이다).
* 에셋을 선언한 활성 확장이 0개면 빈 200, 선언은 있는데 결과가 비면 503 —
* 선언한 산출물이 소실·판독 불가면 503, 존재하되 비었으면(또는 선언 0) 빈 200 —
* 판정은 ServesExtensionBundles::bundleResponse() 단일 지점.
*
* @return BinaryFileResponse|Response 병합 JS 파일 응답 또는 빈 응답
@@ -20,10 +20,13 @@ use Symfony\Component\HttpFoundation\BinaryFileResponse;
* 2. 병합 결과는 있는데 디스크 캐시가 실패 → **메모리 결과를 그대로 200** 으로 서빙.
* 디스크 캐시는 최적화이므로 쓰기 실패가 공개 엔드포인트의 500 이 되면 안 된다.
* 3. 병합 결과가 비었음 →
* - 에셋을 선언한 활성 확장이 **0개**면 정상 → 빈 200
* - 선언은 있는데 결과가 0 이면 장애(배포 중 `dist` 가 잠깐 빔, 경로 어긋남) →
* **503**. 빈 200 으로 내보내면 프론트는 404 도 오류도 받지 못한 채 한참 뒤
* "Unknown action handler" 로 죽어, 원인이 번들이라는 사실이 드러나지 않는다.
* - 선언한 산출물이 **소실·판독 불가**면 장애(배포 중 `dist` 가 잠깐 빔, 경로
* 어긋남) → **503**. 빈 200 으로 내보내면 프론트는 404 도 오류도 받지 못한 채
* 한참 뒤 "Unknown action handler" 로 죽어, 원인이 번들이라는 사실이 드러나지 않는다.
* - 산출물이 **존재하되 비어 있으면** 정상 → 빈 200. 스타일 소스가 자리표시 주석뿐이라
* 0바이트 CSS 를 내보내는 확장은 정당한 상태다. 선언 축만으로 판정하면 그런 확장만
* 설치된 기본 구성이 통째로 503 이 되어 사용자 화면마다 실패 안내가 뜬다.
* - 선언이 **0개**여도 정상 → 빈 200
*/
trait ServesExtensionBundles
{
@@ -61,15 +64,17 @@ trait ServesExtensionBundles
->header('Cache-Control', 'no-cache, private');
}
$declared = $bundleService->countAssetDeclaringExtensions($type, $kind);
$missing = $bundleService->findMissingDeclaredAssets($type, $kind);
if ($declared > 0) {
// (3) 장애 — 선언은 있는데 결과가 0
Log::error('확장 번들 병합 결과가 비었습니다 — 에셋을 선언한 활성 확장이 있습니다', [
if ($missing !== []) {
// (3) 장애 — 선언한 산출물이 소실·판독 불가 (배포 중 dist 가 잠깐 빔, 경로 어긋남).
// 어느 파일이 없는지를 함께 남긴다 — 선언 수만으로는 운영자가 조치 대상을 짚을 수 없다.
Log::error('확장 번들 병합 결과가 비었습니다 — 선언된 산출물이 없거나 읽을 수 없습니다', [
'type' => $type,
'kind' => $kind,
'version' => $version,
'declared_extensions' => $declared,
'declared_extensions' => $bundleService->countAssetDeclaringExtensions($type, $kind),
'missing' => $missing,
]);
return response('', 503)
@@ -77,7 +82,8 @@ trait ServesExtensionBundles
->header('Cache-Control', 'no-cache, private');
}
// (3) 정상 — 선언이 0개면 빈 번들이 맞다
// (3) 정상 — 선언이 0 이거나, 선언된 산출물이 전부 존재하되 비어 있다
// (스타일이 비어 있는 확장). 빈 번들이 맞다.
return response('', 200)->header('Content-Type', $mimeType);
}
}
+25 -1
View File
@@ -739,18 +739,36 @@ class SeoRenderer implements SeoRendererInterface
return $resolved;
}
/**
* 템플릿 디렉토리의 절대 경로를 반환합니다.
*
* 테스트가 임시 디렉토리를 템플릿 루트로 쓸 수 있도록 분리한 seam 이다.
*
* @param string $identifier 템플릿 식별자
* @return string 템플릿 루트 절대 경로
*/
protected function templateRootPath(string $identifier): string
{
return base_path("templates/{$identifier}");
}
/**
* 템플릿의 CSS 에셋 URL 목록을 반환합니다.
*
* template.json의 assets.css 경로를 서빙 URL로 변환합니다.
* 예: "dist/css/components.css" → "/api/templates/assets/{id}/css/components.css"
*
* `assets.css` 는 **선언**일 뿐이라 산출물이 없을 수 있다. 없는 경로를 그대로 링크하면
* 봇 화면에서만 404 가 나고 일반 화면에는 흔적이 없다 — 서버 로그에도 남지 않아
* 운영자가 알 방법이 없다. 그래서 파일이 실재하는 경로만 싣는다(0바이트는 정상).
*
* @param string $templateIdentifier 템플릿 식별자
* @return array CSS URL 배열
*/
private function getTemplateCssUrls(string $templateIdentifier): array
{
$templateJsonPath = base_path("templates/{$templateIdentifier}/template.json");
$templateRoot = $this->templateRootPath($templateIdentifier);
$templateJsonPath = $templateRoot.'/template.json';
if (! file_exists($templateJsonPath)) {
return [];
}
@@ -767,6 +785,12 @@ class SeoRenderer implements SeoRendererInterface
$urls = [];
foreach ($cssPaths as $cssPath) {
// 선언한 파일이 실재할 때만 링크한다 — 없는 경로의 <link> 는 봇 화면에서만
// 404 가 되고 어디에도 흔적을 남기지 않는다
if (! is_file($templateRoot.'/'.$cssPath)) {
continue;
}
// dist/ 접두사 제거 (서빙 경로에서는 dist가 자동 추가됨)
$servePath = preg_replace('#^dist/#', '', $cssPath);
+60 -4
View File
@@ -26,6 +26,8 @@ use Illuminate\Support\Facades\Log;
* 경로는 절대경로 게터(`getBuiltAssetAbsolutePaths()`)를 재사용한다 —
* `ModuleService::getAssetFilePath()` 의 `base_path("modules/{id}/...")`
* 하드코딩을 복제하지 않아야 `_bundled` 확장에서도 정확히 읽는다(제약 4).
* 소실 판정만 선언 축 게터(`getDeclaredAssetAbsolutePaths()`)를 쓴다 — 그 게터는
* `file_exists()` 게이트를 타지 않아 "선언은 있는데 파일이 없다" 를 셀 수 있다.
*
* @see TemplateComposer
*/
@@ -315,10 +317,13 @@ class ExtensionBundleService
/**
* 해당 타입에서 프론트엔드 에셋을 **선언한** 활성 확장 수를 반환합니다.
*
* "선언이 0 이라 빈 번들" (정상)과 "선언은 있는데 병합 결과가 0" (장애 — 배포 중
* `dist` 가 잠깐 비었거나 경로가 어긋났다)을 구분하는 유일한 근거다. 구분하지 않으면
* 후자가 빈 200 으로 나가고, 프론트는 404 도 오류도 받지 못한 채 한참 뒤
* "Unknown action handler" 로 죽는다.
* 이 값은 **선언 축**이다 — 503 의 판정은 소실 축(`findMissingDeclaredAssets()`)이
* 한다. 선언 축만으로 "선언 > 0 && 병합 결과 0 = 장애" 로 등치하면, 산출물이 존재하되
* 비어 있는 정당한 상태(스타일이 비어 있는 확장)까지 배포 장애로 잡혀 그 확장만
* 설치된 기본 구성이 통째로 503 이 된다.
*
* 선언 축은 로그 컨텍스트(운영자가 보는 "선언한 확장이 몇 개인가")와 화면 진단이
* 근거로 삼는다.
*
* 판정은 **kind 별**이다 — js 만 선언한 확장이 있는 상태에서 css 번들이 비는 것은
* 정상이므로, 그 경우까지 장애로 보면 정상 구성이 503 이 된다.
@@ -365,6 +370,57 @@ class ExtensionBundleService
}
}
/**
* 선언된 산출물 중 **소실·판독 불가**한 것의 절대 경로 목록을 반환합니다.
*
* 503 의 근거는 선언이 아니라 이 소실 축이다. 선언만으로 판정하면 "선언됨 + 산출물이 존재하지만
* 0바이트"(스타일이 비어 있는 확장의 정당한 상태) 와 "선언됨 + 산출물 소실"(배포 중 dist 가 잠깐 빔)
* 이 구분되지 않아 정상 구성이 503 이 된다 — 번들 확장만 설치한 기본 구성 전부가 그랬다.
*
* 모집단은 countAssetDeclaringExtensions() 와 같다. 경로는 확장의 선언 축 게터로만 얻는다 —
* getBuiltAssetAbsolutePaths() 는 file_exists() 게이트라 부재를 셀 수 없고, base_path("modules"…)
* 직접 조립은 _bundled 확장에서 어긋난다.
*
* @param string $type 'module' | 'plugin'
* @param string $kind 'js' | 'css'
* @return list<string> 소실·판독 불가 산출물의 절대 경로 (없으면 빈 배열)
*/
public function findMissingDeclaredAssets(string $type, string $kind): array
{
try {
$extensions = $type === 'plugin'
? $this->pluginManager->getActivePlugins()
: $this->moduleManager->getActiveModules();
$missing = [];
foreach ($extensions as $extension) {
// global 전략만 번들 대상 — 병합 대상 모집단과 동일한 필터를 쓴다
if (($extension->getAssetLoadingConfig()['strategy'] ?? 'global') !== 'global') {
continue;
}
$path = $extension->getDeclaredAssetAbsolutePaths()[$kind] ?? null;
if ($path !== null && (! is_file($path) || ! is_readable($path))) {
$missing[] = $path;
}
}
return $missing;
} catch (\Throwable $e) {
// 판정 자체가 실패하면 장애로 단정하지 않는다(선언 축 카운트와 같은 fail-open). 흔적은 error 로 —
// 출하 기본 로그 수준이 error 라 warning 은 기록되지 않는다.
Log::error('확장 에셋 소실 판정 실패', [
'type' => $type,
'kind' => $kind,
'error' => $e->getMessage(),
]);
return [];
}
}
/**
* 현재 version 외의 오래된 번들 파일을 삭제하고 삭제 건수를 반환합니다.
*
+4 -4
View File
@@ -2098,11 +2098,11 @@ Cache-Control: public, max-age=31536000
**에러 응답**
_에러 응답 없음 — 공개 엔드포인트이며, 병합 대상이 없어도 빈 본문의 200(text/css)을 반환합니다._
_선언한 산출물이 소실·판독 불가일 때 **503**(빈 본문, `Cache-Control: no-cache, private`) — 배포 중 `dist` 가 잠깐 비었거나 경로가 어긋난 상태입니다. 에셋을 선언한 활성 확장이 없거나, 선언한 산출물이 전부 존재하되 비어 있으면(스타일 규칙이 아직 없는 확장) 정상 빈 200 입니다._
<!-- @generated:end -->
**설명** 활성 모듈들의 프론트엔드 CSS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 활성 global 모듈 에셋이 없으면 빈 200(text/css) 응답을 반환하고, 있으면 병합 파일을 ETag·환경별 Cache-Control 과 함께 서빙합니다. 페이지가 모듈 스타일을 요청 1건으로 로드하도록 합니다.
**설명** 활성 모듈들의 프론트엔드 CSS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 병합 결과가 있으면 ETag·환경별 Cache-Control 과 함께 서빙하고, 비어 있으면 그 이유에 따라 갈립니다 — 선언이 0 이거나 선언한 산출물이 전부 존재하되 비어 있으면 빈 200(text/css), 선언한 산출물이 소실·판독 불가면 503 입니다. 0바이트 CSS 는 스타일 규칙이 아직 없는 확장의 정당한 상태이므로 장애로 보지 않습니다. 페이지가 모듈 스타일을 요청 1건으로 로드하도록 합니다.
### GET /api/modules/bundle.js
@@ -2140,11 +2140,11 @@ Cache-Control: public, max-age=31536000
**에러 응답**
_에러 응답 없음 — 공개 엔드포인트이며, 병합 대상이 없어도 빈 본문의 200(text/javascript)을 반환합니다._
_선언한 산출물이 소실·판독 불가일 때 **503**(빈 본문, `Cache-Control: no-cache, private`) — 배포 중 `dist` 가 잠깐 비었거나 경로가 어긋난 상태입니다. 에셋을 선언한 활성 확장이 없거나, 선언한 산출물이 전부 존재하되 비어 있으면(스타일 규칙이 아직 없는 확장) 정상 빈 200 입니다._
<!-- @generated:end -->
**설명** 활성 모듈들의 프론트엔드 IIFE JS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 활성 global 모듈 에셋이 없으면 빈 200(text/javascript) 응답을 반환하고(프론트는 빈 스크립트 로드로 무해), 있으면 병합 파일을 ETag·환경별 Cache-Control 과 함께 서빙합니다. 프론트는 `G7Config.bundleUrls` 를 읽어 이 번들을 로드합니다.
**설명** 활성 모듈들의 프론트엔드 IIFE JS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 병합 결과가 있으면 ETag·환경별 Cache-Control 과 함께 서빙하고, 비어 있으면 그 이유에 따라 갈립니다 — 선언이 0 이거나 선언한 산출물이 전부 존재하되 비어 있으면 빈 200(text/javascript, 프론트는 빈 스크립트 로드로 무해), 선언한 산출물이 소실·판독 불가면 503 입니다. 프론트는 `G7Config.bundleUrls` 를 읽어 이 번들을 로드합니다.
### GET /api/modules/bundle/css
+4 -4
View File
@@ -2382,11 +2382,11 @@ Cache-Control: public, max-age=31536000
**에러 응답**
_에러 응답 없음 — 공개 조회이며 요청 파라미터가 없고, 활성 에셋이 하나도 없는 경우에도 빈 200 을 반환합니다._
_선언한 산출물이 소실·판독 불가일 때 **503**(빈 본문, `Cache-Control: no-cache, private`) — 배포 중 `dist` 가 잠깐 비었거나 경로가 어긋난 상태입니다. 에셋을 선언한 활성 확장이 없거나, 선언한 산출물이 전부 존재하되 비어 있으면(스타일 규칙이 아직 없는 확장) 정상 빈 200 입니다._
<!-- @generated:end -->
**설명** 활성 플러그인들의 프론트엔드 CSS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 활성 global 플러그인 에셋이 없으면 빈 200(text/css) 응답을 반환하고, 있으면 병합 파일을 ETag·환경별 Cache-Control 과 함께 서빙합니다. 페이지가 플러그인 스타일을 요청 1건으로 로드하도록 합니다.
**설명** 활성 플러그인들의 프론트엔드 CSS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 판정은 모듈 번들과 같은 단일 지점을 공유합니다 — 선언이 0 이거나 선언한 산출물이 전부 존재하되 비어 있으면 빈 200(text/css), 선언한 산출물이 소실·판독 불가면 503, 병합 결과가 있으면 ETag·환경별 Cache-Control 과 함께 서빙합니다. 페이지가 플러그인 스타일을 요청 1건으로 로드하도록 합니다.
### GET /api/plugins/bundle.js
@@ -2433,11 +2433,11 @@ Cache-Control: public, max-age=31536000
**에러 응답**
_에러 응답 없음 — 공개 조회이며 요청 파라미터가 없고, 활성 에셋이 하나도 없는 경우에도 빈 200 을 반환합니다._
_선언한 산출물이 소실·판독 불가일 때 **503**(빈 본문, `Cache-Control: no-cache, private`) — 배포 중 `dist` 가 잠깐 비었거나 경로가 어긋난 상태입니다. 에셋을 선언한 활성 확장이 없거나, 선언한 산출물이 전부 존재하되 비어 있으면(스타일 규칙이 아직 없는 확장) 정상 빈 200 입니다._
<!-- @generated:end -->
**설명** 활성 플러그인들의 프론트엔드 IIFE JS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 활성 global 플러그인 에셋이 없으면 빈 200(text/javascript) 응답을 반환하고, 있으면 병합 파일을 ETag·환경별 Cache-Control 과 함께 서빙합니다. 프론트는 `G7Config.bundleUrls` 를 읽어 이 번들을 로드합니다.
**설명** 활성 플러그인들의 프론트엔드 IIFE JS 를 서버에서 하나로 병합한 번들을 서빙하는 공개 엔드포인트입니다. 인증이 필요하지 않습니다. 판정은 모듈 번들과 같은 단일 지점을 공유합니다 — 선언이 0 이거나 선언한 산출물이 전부 존재하되 비어 있으면 빈 200(text/javascript), 선언한 산출물이 소실·판독 불가면 503, 병합 결과가 있으면 ETag·환경별 Cache-Control 과 함께 서빙합니다. 프론트는 `G7Config.bundleUrls` 를 읽어 이 번들을 로드합니다.
### GET /api/plugins/bundle/css
+6 -1
View File
@@ -823,7 +823,7 @@ SEO 엔진은 컴포넌트 지식을 갖지 않습니다. 모든 컴포넌트→
| `text_props` | string[] | 텍스트 추출 우선순위 (예: `["text", "label", "value", "title"]`) |
| `attr_map` | object | props→HTML 속성 매핑 (예: `{"className": "class", "htmlFor": "for"}`) |
| `allowed_attrs` | string[] | 허용 HTML 속성 목록 (목록에 없는 속성은 출력 안됨) |
| `stylesheets` | string[] | 외부 CSS URL (예: Font Awesome CDN) |
| `stylesheets` | string[] | 추가 CSS URL |
| `self_closing` | string[] | 셀프 클로징 태그 목록 (예: `["img", "input", "hr", "br"]`) |
| `component_map` | object | 컴포넌트명 → HTML 태그 매핑 |
| `render_modes` | object | 렌더 모드 정의 |
@@ -1490,6 +1490,11 @@ SeoRenderer.render()
└─ View::make('seo', [..., 'stylesheets' => config.stylesheets])
```
봇 화면의 `<link>` 에는 활성 사용자 템플릿의 `template.json` `assets.css` 도 실린다. 그 선언은
**파일이 실재할 때만** 링크한다 — 선언은 있는데 산출물이 없는 경로를 그대로 실으면 봇 화면에서만
404 가 나고 일반 화면에는 흔적이 없다. 서버 로그에도 남지 않으므로 운영자가 알 방법이 없다.
내용이 비어 있는 파일(0바이트)은 실재하므로 링크한다.
### navigate 핸들러 링크 자동 생성
SEO 렌더링 시 `navigate`/`openWindow` 핸들러가 정의된 컴포넌트에 `<a href="...">` 하이퍼링크를 자동 생성합니다. 검색 엔진 봇이 내부 페이지를 발견할 수 있도록 링크 구조를 자동 형성합니다.
+20 -5
View File
@@ -185,6 +185,13 @@ manifest 는 배포물), 코어가 활성 확장 전체의 선언을 모아 allo
| `loading.strategy` | 로딩 전략 (global, layout, lazy) |
| `loading.priority` | 로드 우선순위 (낮을수록 먼저) |
`assets.js` · `assets.css` 는 **객체**이며 `output` 을 가져야 합니다. 목록형(`"js": ["dist/js/module.iife.js"]`)은
어느 소비자도 읽지 않아 **그 자산이 영영 로드되지 않는데, 오류도 경고도 남지 않습니다.**
선언한 `output` 이 가리키는 파일은 디스크에 실재해야 합니다. 내용이 비어 있는 것(0바이트)은
정상입니다 — 스타일 규칙이 아직 없는 확장이 CSS 를 선언하는 것은 어긋남이 아닙니다. 정적 검사가
번들 확장 전수를 대상으로 두 조건(객체 형식 · 산출물 실재)을 확인합니다.
---
## 모듈 프론트엔드 구조
@@ -508,11 +515,11 @@ GET /api/plugins/bundle.css?v={version}
| `\n;\n` 구분자 | IIFE 사이는 `\n;\n`(JS)/`\n`(CSS). 미사용 시 ASI 붕괴 → 전체 파싱 에러 | `extension-bundle-concat-separator` |
| 소스맵 | prod strip, dev 는 개별 에셋 서빙 절대 URL 로 rewrite | - |
| same-origin | 번들 URL 은 `/api/...` 만 (CDN 금지 — gdpr preblocker 자기차단 방지) | `extension-bundle-url-same-origin` |
| 절대경로 게터 | `getBuiltAssetAbsolutePaths()` 사용. `base_path("modules"\|"plugins")` 직접 조립 금지 | `extension-bundle-asset-path-getter` |
| 절대경로 게터 | `getBuiltAssetAbsolutePaths()` 사용. `base_path("modules"\|"plugins")` 직접 조립 금지. 소실 판정만 선언 축 게터 `getDeclaredAssetAbsolutePaths()` | `extension-bundle-asset-path-getter` |
| 확장별 try/catch | 파일 읽기 실패 시 해당 확장만 skip, 나머지 병합 지속 | (메모리+회귀테스트) |
| CSS url() | 상대 `url()`·`@import` 참조는 그 확장의 절대 자산 URL 로 **치환**해 병합. 병합본의 주소는 어느 확장의 dist 디렉토리도 아니라 상대 해석이 반드시 어긋난다 | (계약 테스트) |
| 디스크 캐시 fail-soft | 캐시 쓰기 실패는 **500 이 아니다** — 메모리 병합 결과를 그대로 200 으로 서빙 | (계약 테스트) |
| 빈 번들 판정 | 선언 0개면 빈 200, 선언은 있는데 결과가 0이면 **503** | (계약 테스트) |
| 빈 번들 판정 | 선언한 산출물이 소실·판독 불가면 **503**, 존재하되 비었으면 빈 200 (선언 0 도 빈 200) | (계약 테스트) |
### 병합 CSS 의 상대 참조
@@ -531,11 +538,19 @@ GET /api/plugins/bundle.css?v={version}
| 상태 | 판정 | 응답 |
|---|---|---|
| 에셋을 선언한 활성 확장이 0개 | 정상 | 빈 200 |
| 선언은 있는데 병합 결과가 0 | 장애 (배포 중 `dist` 가 잠깐 빔, 경로 어긋남) | **503** + `Log::error` |
| 선언은 있고 그 산출물이 **전부 존재**하되 비어 있음 | 정상 (스타일이 비어 있는 확장) | 빈 200 |
| 선언한 산출물이 **소실·판독 불가** | 장애 (배포 중 `dist` 가 잠깐 빔, 경로 어긋남) | **503** + `Log::error`(소실 경로 목록) |
구분하지 않으면 후자가 빈 200 으로 나가고, 프론트는 404 도 오류도 받지 못한 채 한참 뒤 "Unknown action handler" 로 죽는다 — 그 시점에는 원인이 번들이라는 사실이 화면에도 로그에도 남아 있지 않다. 판정은 **kind 별**이다(js 만 선언한 확장이 있는 상태에서 css 번들이 비는 것은 정상).
장애를 정상으로 흘리면 프론트는 404 도 오류도 받지 못한 채 한참 뒤 "Unknown action handler" 로 죽는다 — 그 시점에는 원인이 번들이라는 사실이 화면에도 로그에도 남아 있지 않다. 반대로 정상을 장애로 잡으면 스타일 소스가 자리표시 주석뿐인 확장만 설치된 기본 구성이 통째로 503 이 되어 **사용자 화면마다 실패 안내가 뜬다.** 판정은 **kind 별**이다(js 만 선언한 확장이 있는 상태에서 css 번들이 비는 것은 정상).
"선언" 의 근거는 manifest 의 `assets.{kind}.output` 이며 **산출물 파일의 존재를 보지 않는다.** 병합 경로가 쓰는 게터들(`getOrderedGlobalAssetPaths()` · `hasAssets()` · `getBuiltAssetPaths()`)은 모두 `file_exists()` 로 거르므로, 그 경로로 선언 수를 세면 "`dist` 가 잠깐 빔" 이 곧 "선언 0" 이 되어 **막으려던 상태가 정상(빈 200)으로 판정된다.** 선언과 산출은 다른 축이고, 이 판정이 재는 것은 선언 축이다.
두 축이 다르다는 점이 핵심이다.
- **선언 축**의 근거는 manifest 의 `assets.{kind}.output` 이며 **산출물 파일의 존재를 보지 않는다.** 병합 경로가 쓰는 게터들(`getOrderedGlobalAssetPaths()` · `hasAssets()` · `getBuiltAssetPaths()`)은 모두 `file_exists()` 로 거르므로, 그 경로로 선언 수를 세면 "`dist` 가 잠깐 빔" 이 곧 "선언 0" 이 된다. 이 축은 로그 컨텍스트와 진단이 근거로 삼는다.
- **소실 축**은 선언된 산출물 중 실제로 없거나 읽을 수 없는 것을 센다. 경로는 `getDeclaredAssetAbsolutePaths()` 로 얻는다 — 존재 게이트가 없어야 부재를 셀 수 있다. **503 의 판정은 이 축이 한다.**
0바이트 산출물은 정당한 상태다. 스타일 규칙이 아직 없는 확장이 CSS 를 선언하는 것은 어긋남이 아니며, 그 상태를 배포 장애로 등치하면 정상 사이트가 서비스 불능으로 보고된다.
빈 번들은 정적 게시 대상이 아니다(게시할 사본이 없다). 그 결과 `AssetUrl::extensionBundle()` 이 정적 URL 대신 API URL 을 방출하므로 브라우저에는 정적 404 폴백이 생기지 않고, 그 API 가 위 표대로 빈 200 을 낸다.
두 판정은 모듈·플러그인 컨트롤러가 **공유하는 단일 지점**(`ServesExtensionBundles::bundleResponse()`)에 둔다. 각자 구현하면 한쪽만 고쳐진 채 다른 쪽이 옛 동작으로 남는다.
+1 -1
View File
@@ -885,7 +885,7 @@ loader.config({
| 필드 | 타입 | 설명 |
|------|------|------|
| `id` | `string` | 중복 누적을 막는 식별자 (필수) |
| `label` | `string` | 짧은 항목명 — 여러 건 합산 표시에 쓰인다 |
| `label` | `string` | 짧은 항목명 — 여러 건 합산 표시에 쓰인다. **사용자 어휘**여야 한다: 내부 구분 키·식별자를 그대로 넘기면 배너에 「module을(를) 불러오지 못했습니다」처럼 해석 불가한 문구가 노출된다 |
| `message` | `string?` | 사용자에게 보일 안내 문장. 생략하면 `label` 기반 기본 문구 |
| `retry` | `() => Promise<void> \| void` | 생략하면 [다시 시도] 버튼을 렌더하지 않는다 |
@@ -16,6 +16,7 @@
- 초기 화면 파일 생성이 거듭 실패할 때 관리자 대시보드에 표시되는 안내의 일본어 번역을 추가했습니다 — 폴더 권한·디스크 공간·캐시 저장소 중 어느 쪽이 원인인지에 따라 다른 안내가 일본어 로케일에서 표시됩니다.
- 리버스 프록시 뒤에서 신뢰 프록시가 지정되지 않았을 때 관리자 대시보드에 표시되는 안내의 일본어 번역을 추가했습니다.
- 사이트 설정 문제로 화면 구성 파일이 차단됐을 때 표시되는 안내 문구의 일본어 번역을 추가했습니다 — 방문자 쪽 문제가 아니라는 안내가 일본어 로케일에서 표시됩니다.
- 확장 프로그램의 스타일 묶음을 끝내 불러오지 못했을 때 안내에 표시되는 항목명의 일본어 번역을 추가했습니다 — 종전에는 그 자리에 내부 구분 이름이 그대로 보였고, 이제 「모듈 스타일」·「플러그인 스타일」에 해당하는 일본어가 표시됩니다.
## [1.0.8] - 2026-08-24
@@ -4,5 +4,7 @@
"retry": "再試行",
"retrying": "再試行中...",
"close": "閉じる",
"retry_failed": "再試行しましたが失敗しました。しばらく後に再度お試しください。"
"retry_failed": "再試行しましたが失敗しました。しばらく後に再度お試しください。",
"module_styles": "モジュールスタイル",
"plugin_styles": "プラグインスタイル"
}
+2
View File
@@ -1,6 +1,8 @@
{
"load_failed": "Could not load {label}.",
"load_failed_multiple": "Could not load {count} items.",
"module_styles": "module styles",
"plugin_styles": "plugin styles",
"retry": "Retry",
"retrying": "Retrying...",
"close": "Close",
+2
View File
@@ -1,6 +1,8 @@
{
"load_failed": "{label}을(를) 불러오지 못했습니다.",
"load_failed_multiple": "{count}개 항목을 불러오지 못했습니다.",
"module_styles": "모듈 스타일",
"plugin_styles": "플러그인 스타일",
"retry": "다시 시도",
"retrying": "다시 시도 중...",
"close": "닫기",
@@ -12,6 +12,10 @@
- 확장 문서에 「레이아웃 편집기 스펙」 항목을 추가했습니다. 이 확장이 레이아웃 편집기에 무엇을 선언했는지와, 화면 요소나 데이터를 추가할 때 편집기 쪽에서 함께 해야 할 일을 담습니다.
- 문서의 제품 표기를 「그누보드7」로 통일했습니다.
### Fixed
- 설정 파일의 프론트엔드 자산 항목이 문서화된 형식과 다른 목록형으로 적혀 있어 예제로 삼으면 스크립트가 로드되지 않는 형태였습니다. 선언할 자산이 없어 항목을 제거했습니다.
## [0.1.1] - 2026-08-10
### Fixed
@@ -79,7 +79,10 @@ _프론트 에셋이 없습니다._
그래서 반영이 `php artisan module:update gnuboard7-hello_module --force` 하나로 끝납니다.
JS 를 더하면 그때 빌드(`module:build --production`)·`dist/` 커밋·전역 진입점 셋이 함께
필요해집니다.
필요해집니다. 그때 `module.json` 에는 `assets.js.output` **객체 형식**으로 선언합니다
(`"assets": { "js": { "entry": "resources/js/index.ts", "output": "dist/js/....iife.js" } }`).
목록형(`"js": ["..."]`)은 어느 소비자도 읽지 않아 그 스크립트가 영영 로드되지 않는데,
오류도 경고도 남지 않습니다.
구동에 필요한 제3자 자산은 외부 CDN 에서 받지 않고 확장이 동봉합니다 — CDN 도달 실패는 예외도
서버 로그도 남기지 않고 화면 기능만 조용히 사라지기 때문입니다.
@@ -16,9 +16,5 @@
"dependencies": {
"modules": {},
"plugins": {}
},
"assets": {
"js": [],
"css": []
}
}
+14 -14
View File
@@ -1,23 +1,23 @@
var SR=Object.defineProperty;var wR=(tn,na,ra)=>na in tn?SR(tn,na,{enumerable:!0,configurable:!0,writable:!0,value:ra}):tn[na]=ra;var M=(tn,na,ra)=>wR(tn,typeof na!="symbol"?na+"":na,ra);(function(tn){"use strict";function na(s,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in s)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(s,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}function ra(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ad={exports:{}},Ye={};var Mg;function r0(){if(Mg)return Ye;Mg=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function S(H){return H===null||typeof H!="object"?null:(H=v&&H[v]||H["@@iterator"],typeof H=="function"?H:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,A={};function D(H,T,fe){this.props=H,this.context=T,this.refs=A,this.updater=fe||_}D.prototype.isReactComponent={},D.prototype.setState=function(H,T){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,T,"setState")},D.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function O(){}O.prototype=D.prototype;function k(H,T,fe){this.props=H,this.context=T,this.refs=A,this.updater=fe||_}var L=k.prototype=new O;L.constructor=k,x(L,D.prototype),L.isPureReactComponent=!0;var B=Array.isArray;function q(){}var z={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function de(H,T,fe){var he=fe.ref;return{$$typeof:s,type:H,key:T,ref:he!==void 0?he:null,props:fe}}function _e(H,T){return de(H.type,T,H.props)}function Se(H){return typeof H=="object"&&H!==null&&H.$$typeof===s}function Ie(H){var T={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(fe){return T[fe]})}var Fe=/\/+/g;function ze(H,T){return typeof H=="object"&&H!==null&&H.key!=null?Ie(""+H.key):T.toString(36)}function Et(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(q,q):(H.status="pending",H.then(function(T){H.status==="pending"&&(H.status="fulfilled",H.value=T)},function(T){H.status==="pending"&&(H.status="rejected",H.reason=T)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function Q(H,T,fe,he,Ae){var se=typeof H;(se==="undefined"||se==="boolean")&&(H=null);var ge=!1;if(H===null)ge=!0;else switch(se){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(H.$$typeof){case s:case e:ge=!0;break;case m:return ge=H._init,Q(ge(H._payload),T,fe,he,Ae)}}if(ge)return Ae=Ae(H),ge=he===""?"."+ze(H,0):he,B(Ae)?(fe="",ge!=null&&(fe=ge.replace(Fe,"$&/")+"/"),Q(Ae,T,fe,"",function(je){return je})):Ae!=null&&(Se(Ae)&&(Ae=_e(Ae,fe+(Ae.key==null||H&&H.key===Ae.key?"":(""+Ae.key).replace(Fe,"$&/")+"/")+ge)),T.push(Ae)),1;ge=0;var $e=he===""?".":he+":";if(B(H))for(var Te=0;Te<H.length;Te++)he=H[Te],se=$e+ze(he,Te),ge+=Q(he,T,fe,se,Ae);else if(Te=S(H),typeof Te=="function")for(H=Te.call(H),Te=0;!(he=H.next()).done;)he=he.value,se=$e+ze(he,Te++),ge+=Q(he,T,fe,se,Ae);else if(se==="object"){if(typeof H.then=="function")return Q(Et(H),T,fe,he,Ae);throw T=String(H),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return ge}function ue(H,T,fe){if(H==null)return H;var he=[],Ae=0;return Q(H,he,"","",function(se){return T.call(fe,se,Ae++)}),he}function De(H){if(H._status===-1){var T=H._result;T=T(),T.then(function(fe){(H._status===0||H._status===-1)&&(H._status=1,H._result=fe)},function(fe){(H._status===0||H._status===-1)&&(H._status=2,H._result=fe)}),H._status===-1&&(H._status=0,H._result=T)}if(H._status===1)return H._result.default;throw H._result}var ee=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},me={map:ue,forEach:function(H,TLine truncated
var CR=Object.defineProperty;var ER=(tn,na,ra)=>na in tn?CR(tn,na,{enumerable:!0,configurable:!0,writable:!0,value:ra}):tn[na]=ra;var M=(tn,na,ra)=>ER(tn,typeof na!="symbol"?na+"":na,ra);(function(tn){"use strict";function na(s,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in s)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(s,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}function ra(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ad={exports:{}},Ye={};var Mg;function a0(){if(Mg)return Ye;Mg=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function S(H){return H===null||typeof H!="object"?null:(H=v&&H[v]||H["@@iterator"],typeof H=="function"?H:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,A={};function D(H,T,fe){this.props=H,this.context=T,this.refs=A,this.updater=fe||_}D.prototype.isReactComponent={},D.prototype.setState=function(H,T){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,T,"setState")},D.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function O(){}O.prototype=D.prototype;function k(H,T,fe){this.props=H,this.context=T,this.refs=A,this.updater=fe||_}var L=k.prototype=new O;L.constructor=k,x(L,D.prototype),L.isPureReactComponent=!0;var B=Array.isArray;function q(){}var z={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function de(H,T,fe){var he=fe.ref;return{$$typeof:s,type:H,key:T,ref:he!==void 0?he:null,props:fe}}function _e(H,T){return de(H.type,T,H.props)}function Se(H){return typeof H=="object"&&H!==null&&H.$$typeof===s}function Ie(H){var T={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(fe){return T[fe]})}var Fe=/\/+/g;function ze(H,T){return typeof H=="object"&&H!==null&&H.key!=null?Ie(""+H.key):T.toString(36)}function Et(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(q,q):(H.status="pending",H.then(function(T){H.status==="pending"&&(H.status="fulfilled",H.value=T)},function(T){H.status==="pending"&&(H.status="rejected",H.reason=T)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function Q(H,T,fe,he,Ae){var se=typeof H;(se==="undefined"||se==="boolean")&&(H=null);var ge=!1;if(H===null)ge=!0;else switch(se){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(H.$$typeof){case s:case e:ge=!0;break;case m:return ge=H._init,Q(ge(H._payload),T,fe,he,Ae)}}if(ge)return Ae=Ae(H),ge=he===""?"."+ze(H,0):he,B(Ae)?(fe="",ge!=null&&(fe=ge.replace(Fe,"$&/")+"/"),Q(Ae,T,fe,"",function(je){return je})):Ae!=null&&(Se(Ae)&&(Ae=_e(Ae,fe+(Ae.key==null||H&&H.key===Ae.key?"":(""+Ae.key).replace(Fe,"$&/")+"/")+ge)),T.push(Ae)),1;ge=0;var $e=he===""?".":he+":";if(B(H))for(var Te=0;Te<H.length;Te++)he=H[Te],se=$e+ze(he,Te),ge+=Q(he,T,fe,se,Ae);else if(Te=S(H),typeof Te=="function")for(H=Te.call(H),Te=0;!(he=H.next()).done;)he=he.value,se=$e+ze(he,Te++),ge+=Q(he,T,fe,se,Ae);else if(se==="object"){if(typeof H.then=="function")return Q(Et(H),T,fe,he,Ae);throw T=String(H),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return ge}function ue(H,T,fe){if(H==null)return H;var he=[],Ae=0;return Q(H,he,"","",function(se){return T.call(fe,se,Ae++)}),he}function De(H){if(H._status===-1){var T=H._result;T=T(),T.then(function(fe){(H._status===0||H._status===-1)&&(H._status=1,H._result=fe)},function(fe){(H._status===0||H._status===-1)&&(H._status=2,H._result=fe)}),H._status===-1&&(H._status=0,H._result=T)}if(H._status===1)return H._result.default;throw H._result}var ee=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},me={map:ue,forEach:function(H,TLine truncated
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
`+rt+t+gt}var Yt=!1;function Ht(t,a){if(!t||Yt)return"";Yt=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(te){var J=te}Reflect.construct(t,[],le)}else{try{le.call()}catch(te){J=te}t.call(le.prototype)}}else{try{throw Error()}catch(te){J=te}(le=t())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=u.DetermineComponentFrameRoot(),C=g[0],R=g[1];if(C&&R){var P=C.split(`
`),X=R.split(`
`);for(p=u=0;u<P.length&&!P[u].includes("DetermineComponentFrameRoot");)u++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(u===P.length||p===X.length)for(u=P.length-1,p=X.length-1;1<=u&&0<=p&&P[u]!==X[p];)p--;for(;1<=u&&0<=p;u--,p--)if(P[u]!==X[p]){if(u!==1||p!==1)do if(u--,p--,0>p||P[u]!==X[p]){var re=`
`+P[u].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),re}while(1<=u&&0<=p);break}}}finally{Yt=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?at(o):""}function bt(t,a){switch(t.tag){case 26:case 27:case 5:return at(t.type);case 16:return at("Lazy");case 13:return t.child!==a&&a!==null?at("Suspense Fallback"):at("Suspense");case 19:return at("SuspenseList");case 0:case 15:return Ht(t.type,!1);case 11:return Ht(t.type.render,!1);case 1:return Ht(t.type,!0);case 31:return at("Activity");default:return""}}function qe(t){try{var a="",o=null;do a+=bt(t,o),o=t,t=t.return;while(t);return a}catch(u){return`
Error generating stack: `+u.message+`
`+u.stack}}var mt=Object.prototype.hasOwnProperty,Dt=s.unstable_scheduleCallback,zt=s.unstable_cancelCallback,kn=s.unstable_shouldYield,dr=s.unstable_requestPaint,Ot=s.unstable_now,Li=s.unstable_getCurrentPriorityLevel,ua=s.unstable_ImmediatePriority,bn=s.unstable_UserBlockingPriority,Mn=s.unstable_NormalPriority,it=s.unstable_LowPriority,Pn=s.unstable_IdlePriority,vn=s.log,da=s.unstable_setDisableYieldValue,fr=null,un=null;function Rn(t){if(typeof vn=="function"&&da(t),un&&typeof un.setStrictMode=="function")try{un.setStrictMode(fr,t)}catch{}}var dn=Math.clz32?Math.clz32:ce,V=Math.log,ie=Math.LN2;function ce(t){return t>>>=0,t===0?32:31-(V(t)/ie|0)|0}var Z=256,ve=262144,pe=4194304;function Ee(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function xe(t,a,o){var u=t.pendingLanes;if(u===0)return 0;var p=0,g=t.suspendedLanes,C=t.pingedLanes;t=t.warmLanes;var R=u&134217727;return R!==0?(u=R&~g,u!==0?p=Ee(u):(C&=R,C!==0?p=Ee(C):o||(o=R&~t,o!==0&&(p=Ee(o))))):(R=u&~g,R!==0?p=Ee(R):C!==0?p=Ee(C):o||(o=u&~t,o!==0&&(p=Ee(o)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,o=a&-a,g>=o||g===32&&(o&4194048)!==0)?a:p}function Ke(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function ke(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Me(){var t=pe;return pe<<=1,(pe&62914560)===0&&(pe=4194304),t}function Re(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function tt(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Pe(t,a,o,u,p,g){var C=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var R=t.entanglements,P=t.expirationTimes,X=t.hiddenUpdates;for(o=C&~o;0<o;){var re=31-dn(o),le=1<<re;R[re]=0,P[re]=-1;var J=X[re];if(J!==null)for(X[re]=null,re=0;re<J.length;re++){var te=J[re];te!==null&&(te.lane&=-536870913)}o&=~le}u!==0&&Ve(t,u,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(C&~a))}function Ve(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var u=31-dn(a);t.entangledLanes|=a,t.entanglements[u]=t.entanglements[u]|1073741824|o&261930}function Ce(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var u=31-dn(o),p=1<<u;p&a|t[u]&a&&(t[u]|=a),o&=~p}}function He(t,a){var o=a&-a;return o=(o&42)!==0?1:nt(o),(o&(t.suspendedLanes|a))!==0?0:o}function nt(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Lt(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Bt(){var t=ue.p;return t!==0?t:(t=window.event,t===void 0?32:Ww(t.type))}function Nn(t,a){var o=ue.p;try{return ue.p=t,a()}finally{ue.p=o}}var Gt=Math.random().toString(36).slice(2),Ft="__reactFiber$"+Gt,Dn="__reactProps$"+Gt,Ba="__reactContainer$"+Gt,rl="__reactEvents$"+Gt,mh="__reactListeners$"+Gt,Zc="__reactHandles$"+Gt,Yr="__reactResources$"+Gt,$i="__reactMarker$"+Gt;function al(t){delete t[Ft],delete t[Dn],delete t[rl],delete t[mh],delete t[Zc]}function qa(t){var a=t[Ft];if(a)return a;for(var o=t.parentNode;o;){if(a=o[Ba]||o[Ft]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=Lw(t);t!==null;){if(o=t[Ft])return o;t=Lw(t)}return a}t=o,o=t.parentNode}return null}function Xr(t){if(t=t[Ft]||t[Ba]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function fa(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function Ga(t){var a=t[Yr];return a||(a=t[Yr]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function nn(t){t[$i]=!0}var eu=new Set,tu={};function $r(t,a){Fa(t,a),Fa(t+"Capture",a)}function Fa(t,a){for(tu[t]=a,t=0;t<a.length;t++)eu.add(a[t])}var yh=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u2 Line truncated
`).replace(Bk,"")}function Cw(t,a){return a=ww(a),ww(t)===a}function Mt(t,a,o,u,p,g){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Ya(t,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Ya(t,""+u);break;case"className":Mi(t,"class",u);break;case"tabIndex":Mi(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Mi(t,o,u);break;case"style":lu(t,u,g);break;case"data":if(a!=="object"){Mi(t,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=hr(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(o==="formAction"?(a!=="input"&&Mt(t,a,"name",p.name,p,null),Mt(t,a,"formEncType",p.formEncType,p,null),Mt(t,a,"formMethod",p.formMethod,p,null),Mt(t,a,"formTarget",p.formTarget,p,null)):(Mt(t,a,"encType",p.encType,p,null),Mt(t,a,"method",p.method,p,null),Mt(t,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=hr(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Mr);break;case"onScroll":u!=null&&ot("scroll",t);break;case"onScrollEnd":u!=null&&ot("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=hr(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":ot("beforetoggle",t),ot("toggle",t),Un(t,"popover",u);break;case"xlinkActuate":Sn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Sn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Sn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Sn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Sn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Sn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Un(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Ch.get(o)||o,Un(t,o,u))}}function mg(t,a,o,u,p,g){switch(o){case"style":lu(t,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"children":typeof u=="string"?Ya(t,u):(typeof u=="number"||typeof u=="bigint")&&Ya(t,""+u);break;case"onScroll":u!=null&&ot("scroll",t);break;case"onScrollEnd":u!=null&&ot("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`;break;case"t":l+=" ";break;case"r":l+="\r";break;case"b":l+="\b";break;case"f":l+="\f";break;case"v":l+="\v";break;case"0":l+="\0";break;case"\\":l+="\\";break;case"`":l+="`";break;case"$":l+="$";break;default:l+=d;break}n+=2;continue}if(c==="`")return r.push(l),{quasis:r,exprs:i,end:n+1};if(c==="$"&&s[n+1]==="{"){r.push(l),l="",n+=2;const d=n;let f=1;for(;n<s.length&&f>0;){const h=s[n];if(h==="{")f++,n++;else if(h==="}"){if(f--,f===0)break;n++}else h==='"'||h==="'"?n=$0(s,n,h):h==="`"?n=am(s,n).end:n++}if(f!==0)throw new Error("Unterminated ${...} in template literal");i.push(s.slice(d,n)),n++;continue}l+=c,n++}throw new Error(`Unterminated template literal at position ${e}`)}function M0(s){const e=[];let n=0;const r=s.length,i=l=>n+l<r?s[n+l]:"";for(;n<r;){const l=s[n];if(l===" "||l===" "||l===`
`+u.stack}}var mt=Object.prototype.hasOwnProperty,Dt=s.unstable_scheduleCallback,zt=s.unstable_cancelCallback,kn=s.unstable_shouldYield,dr=s.unstable_requestPaint,Ot=s.unstable_now,$i=s.unstable_getCurrentPriorityLevel,ua=s.unstable_ImmediatePriority,bn=s.unstable_UserBlockingPriority,Mn=s.unstable_NormalPriority,it=s.unstable_LowPriority,Pn=s.unstable_IdlePriority,vn=s.log,da=s.unstable_setDisableYieldValue,fr=null,un=null;function Rn(t){if(typeof vn=="function"&&da(t),un&&typeof un.setStrictMode=="function")try{un.setStrictMode(fr,t)}catch{}}var dn=Math.clz32?Math.clz32:ce,V=Math.log,ie=Math.LN2;function ce(t){return t>>>=0,t===0?32:31-(V(t)/ie|0)|0}var Z=256,ve=262144,pe=4194304;function Ee(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function xe(t,a,o){var u=t.pendingLanes;if(u===0)return 0;var p=0,g=t.suspendedLanes,C=t.pingedLanes;t=t.warmLanes;var R=u&134217727;return R!==0?(u=R&~g,u!==0?p=Ee(u):(C&=R,C!==0?p=Ee(C):o||(o=R&~t,o!==0&&(p=Ee(o))))):(R=u&~g,R!==0?p=Ee(R):C!==0?p=Ee(C):o||(o=u&~t,o!==0&&(p=Ee(o)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,o=a&-a,g>=o||g===32&&(o&4194048)!==0)?a:p}function Ke(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function ke(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Me(){var t=pe;return pe<<=1,(pe&62914560)===0&&(pe=4194304),t}function Re(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function tt(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Pe(t,a,o,u,p,g){var C=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var R=t.entanglements,P=t.expirationTimes,X=t.hiddenUpdates;for(o=C&~o;0<o;){var re=31-dn(o),le=1<<re;R[re]=0,P[re]=-1;var J=X[re];if(J!==null)for(X[re]=null,re=0;re<J.length;re++){var te=J[re];te!==null&&(te.lane&=-536870913)}o&=~le}u!==0&&Ve(t,u,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(C&~a))}function Ve(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var u=31-dn(a);t.entangledLanes|=a,t.entanglements[u]=t.entanglements[u]|1073741824|o&261930}function Ce(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var u=31-dn(o),p=1<<u;p&a|t[u]&a&&(t[u]|=a),o&=~p}}function He(t,a){var o=a&-a;return o=(o&42)!==0?1:nt(o),(o&(t.suspendedLanes|a))!==0?0:o}function nt(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Lt(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Bt(){var t=ue.p;return t!==0?t:(t=window.event,t===void 0?32:Yw(t.type))}function Nn(t,a){var o=ue.p;try{return ue.p=t,a()}finally{ue.p=o}}var Gt=Math.random().toString(36).slice(2),Ft="__reactFiber$"+Gt,Dn="__reactProps$"+Gt,Ba="__reactContainer$"+Gt,rl="__reactEvents$"+Gt,mh="__reactListeners$"+Gt,Zc="__reactHandles$"+Gt,Yr="__reactResources$"+Gt,Mi="__reactMarker$"+Gt;function al(t){delete t[Ft],delete t[Dn],delete t[rl],delete t[mh],delete t[Zc]}function qa(t){var a=t[Ft];if(a)return a;for(var o=t.parentNode;o;){if(a=o[Ba]||o[Ft]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=$w(t);t!==null;){if(o=t[Ft])return o;t=$w(t)}return a}t=o,o=t.parentNode}return null}function Xr(t){if(t=t[Ft]||t[Ba]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function fa(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function Ga(t){var a=t[Yr];return a||(a=t[Yr]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function nn(t){t[Mi]=!0}var eu=new Set,tu={};function $r(t,a){Fa(t,a),Fa(t+"Capture",a)}function Fa(t,a){for(tu[t]=a,t=0;t<a.length;t++)eu.add(a[t])}var yh=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u2 Line truncated
`).replace(Gk,"")}function Ew(t,a){return a=Cw(a),Cw(t)===a}function Mt(t,a,o,u,p,g){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Ya(t,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Ya(t,""+u);break;case"className":Ni(t,"class",u);break;case"tabIndex":Ni(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ni(t,o,u);break;case"style":lu(t,u,g);break;case"data":if(a!=="object"){Ni(t,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=hr(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(o==="formAction"?(a!=="input"&&Mt(t,a,"name",p.name,p,null),Mt(t,a,"formEncType",p.formEncType,p,null),Mt(t,a,"formMethod",p.formMethod,p,null),Mt(t,a,"formTarget",p.formTarget,p,null)):(Mt(t,a,"encType",p.encType,p,null),Mt(t,a,"method",p.method,p,null),Mt(t,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=hr(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Mr);break;case"onScroll":u!=null&&ot("scroll",t);break;case"onScrollEnd":u!=null&&ot("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=hr(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":ot("beforetoggle",t),ot("toggle",t),Un(t,"popover",u);break;case"xlinkActuate":Sn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Sn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Sn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Sn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Sn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Sn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Sn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Un(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Ch.get(o)||o,Un(t,o,u))}}function mg(t,a,o,u,p,g){switch(o){case"style":lu(t,u,g);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"children":typeof u=="string"?Ya(t,u):(typeof u=="number"||typeof u=="bigint")&&Ya(t,""+u);break;case"onScroll":u!=null&&ot("scroll",t);break;case"onScrollEnd":u!=null&&ot("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Mr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`;break;case"t":l+=" ";break;case"r":l+="\r";break;case"b":l+="\b";break;case"f":l+="\f";break;case"v":l+="\v";break;case"0":l+="\0";break;case"\\":l+="\\";break;case"`":l+="`";break;case"$":l+="$";break;default:l+=d;break}n+=2;continue}if(c==="`")return r.push(l),{quasis:r,exprs:i,end:n+1};if(c==="$"&&s[n+1]==="{"){r.push(l),l="",n+=2;const d=n;let f=1;for(;n<s.length&&f>0;){const h=s[n];if(h==="{")f++,n++;else if(h==="}"){if(f--,f===0)break;n++}else h==='"'||h==="'"?n=M0(s,n,h):h==="`"?n=am(s,n).end:n++}if(f!==0)throw new Error("Unterminated ${...} in template literal");i.push(s.slice(d,n)),n++;continue}l+=c,n++}throw new Error(`Unterminated template literal at position ${e}`)}function N0(s){const e=[];let n=0;const r=s.length,i=l=>n+l<r?s[n+l]:"";for(;n<r;){const l=s[n];if(l===" "||l===" "||l===`
`||l==="\r"||l==="\f"||l==="\v"){n++;continue}if(wi(l)||l==="."&&wi(i(1))){const h=n;for(;n<r&&wi(s[n]);)n++;if(s[n]===".")for(n++;n<r&&wi(s[n]);)n++;if(s[n]==="e"||s[n]==="E"){if(n++,(s[n]==="+"||s[n]==="-")&&n++,!wi(s[n]))throw new Error(`Invalid number literal at position ${h}`);for(;n<r&&wi(s[n]);)n++}const m=s.slice(h,n);e.push({type:"num",value:Number(m),pos:h});continue}if(l==='"'||l==="'"){const h=n,m=l;n++;let y="";for(;n<r&&s[n]!==m;)if(s[n]==="\\"){n++;const v=s[n];switch(v){case"n":y+=`
`;break;case"t":y+=" ";break;case"r":y+="\r";break;case"b":y+="\b";break;case"f":y+="\f";break;case"v":y+="\v";break;case"0":y+="\0";break;case"\\":y+="\\";break;case"'":y+="'";break;case'"':y+='"';break;case"`":y+="`";break;default:y+=v;break}n++}else y+=s[n],n++;if(n>=r)throw new Error(`Unterminated string literal at position ${h}`);n++,e.push({type:"str",value:y,pos:h});continue}if(O0(l)){const h=n;for(n++;n<r&&L0(s[n]);)n++;e.push({type:"ident",value:s.slice(h,n),pos:h});continue}if(l==="`"){const h=am(s,n);e.push({type:"template",value:"",pos:n,quasis:h.quasis,exprs:h.exprs}),n=h.end;continue}const c=n,d=s.substr(n,2);if(s.substr(n,3)==="..."){e.push({type:"punct",value:"...",pos:c}),n+=3;continue}switch(l){case"=":{i(1)===">"?(e.push({type:"punct",value:"=>",pos:c}),n+=2):i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"===",pos:c}),n+=3):(e.push({type:"punct",value:"==",pos:c}),n+=2):(e.push({type:"punct",value:"=",pos:c}),n+=1);continue}case"!":{i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"!==",pos:c}),n+=3):(e.push({type:"punct",value:"!=",pos:c}),n+=2):(e.push({type:"punct",value:"!",pos:c}),n+=1);continue}case"<":{if(i(1)==="=")e.push({type:"punct",value:"<=",pos:c}),n+=2;else{if(i(1)==="<")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:"<",pos:c}),n+=1}continue}case">":{if(i(1)==="=")e.push({type:"punct",value:">=",pos:c}),n+=2;else{if(i(1)===">")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:">",pos:c}),n+=1}continue}case"&":{if(i(1)==="&")e.push({type:"punct",value:"&&",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"|":{if(i(1)==="|")e.push({type:"punct",value:"||",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"?":{i(1)==="."&&!wi(i(2))?(e.push({type:"punct",value:"?.",pos:c}),n+=2):i(1)==="?"?(e.push({type:"punct",value:"??",pos:c}),n+=2):(e.push({type:"punct",value:"?",pos:c}),n+=1);continue}case"+":{if(i(1)==="+")throw new Error("Increment operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"+",pos:c}),n+=1;continue}case"-":{if(i(1)==="-")throw new Error("Decrement operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"-",pos:c}),n+=1;continue}case"*":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");if(i(1)==="*")throw new Error("Exponentiation operator is not supported");e.push({type:"punct",value:"*",pos:c}),n+=1;continue}case"/":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"/",pos:c}),n+=1;continue}case"%":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"%",pos:c}),n+=1;continue}case"~":case"^":throw new Error("Bitwise operators are not allowed");case".":case":":case"(":case")":case"[":case"]":case"{":case"}":case",":e.push({type:"punct",value:l,pos:c}),n+=1;continue;case";":e.push({type:"punct",value:";",pos:c}),n+=1;continue;default:throw new Error(`Unexpected character "${l}" at position ${c}`)}}return e}const N0={"??":1,"||":1,"&&":2,"===":3,"!==":3,"==":3,"!=":3,"<":4,">":4,"<=":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6},I0=new Set(["??","||","&&"]);class j0{constructor(e){M(this,"tokens");M(this,"pos",0);this.tokens=e}atEnd(){return this.pos>=this.tokens.length}peek(e=0){const n=this.pos+e;return n<this.tokens.length?this.tokens[n]:null}next(){if(this.atEnd())throw new Error("Unexpected end of expression");return this.tokens[this.pos++]}isPunct(e,n=0){const r=this.peek(n);return!!r&&r.type==="punct"&&r.value===e}expectPunct(e){const n=this.peek();if(!n||n.type!=="punct"||n.value!==e)throw new Error(`Expected "${e}" but found "${n?n.value:"<end>"}"`);this.pos++}parseExpression(){const e=this.tryParseArrow();return e||this.parseTernary()}tryParseArrow(){const e=this.pos,n=this.peek();if(!n)return null;if(n.type==="ident"&&this.isPunct("=>",1)&&!oc.has(String(n.value))){this.pos+=1,this.pos+=1;const{body:r,isBlock:i}=this.parseArrowBody();return{type:"Arrow",params:[{name:String(n.value),default:null}],body:r,isBlock:i}}if(n.type==="punct"&&n.value==="("){this.pos+=1;const r=this.tryParseParamList();if(r&&this.isPunct(")")&&(this.pos+=1,this.isPunct("=>"))){this.pos+=1;const{body:i,isBlock:l}=this.parseArrowBody();return{type:"Arrow",params:r,body:i,isBlock:l}}return this.pos=e,null}return this.pos=e,null}tryParseParamList(){const e=[];if(this.isPunct(")"))return e;for(;;){const n=this.peek();let r=null,i;if(n&&n.type==="punct"&&n.value==="["){const c=this.tryParseArrayPattern();if(!c)return null;i=c}else if(n&&n.type==="ident"&&!oc.has(String(n.value)))r=String(n.value),this.pos+=1;else return null;let l=null;if(this.isPunct("=")&&(this.pos+=1,l=this.parseExpression()),e.push(i?{name:r,elements:i,default:l}:{name:r,default:l}),this.isPunct(",")){this.pos+=1;continue}Line truncated
`).forEach(function(c){i=c.indexOf(":"),n=c.substring(0,i).trim().toLowerCase(),r=c.substring(i+1).trim();const d=G.hasOwnProp(e,n);!n||d&&G.hasOwnProp(zC,n)||(n==="set-cookie"?d?e[n].push(r):e[n]=[r]:e[n]=d?e[n]+", "+r:r)}),e};function UC(s){let e=0,n=s.length;for(;e<n;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=s.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===s.length?s:s.slice(e,n)}const BC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),qC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ff(s,e){return G.isArray(s)?s.map(n=>ff(n,e)):UC(String(s).replace(e,""))}const GC=s=>ff(s,BC),FC=s=>ff(s,qC);function Om(s){const e=Object.create(null);return G.forEach(s.toJSON(),(n,r)=>{e[r]=FC(n)}),e}const Lm=Symbol("internals");function ko(s){return s&&String(s).trim().toLowerCase()}function hc(s){return s===!1||s==null?s:G.isArray(s)?s.map(hc):GC(String(s))}function VC(s){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(s);)e[r[1]]=r[2];return e}const KC=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function hf(s){let e=0,n=s.length;for(;e<n;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=s.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===s.length?s:s.slice(e,n)}function WC(s){const e=s.length-1;if(e<1||s.charCodeAt(0)!==34||s.charCodeAt(e)!==34)return s;let n="";for(let r=1;r<e;r++){const i=s.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=e))return s;n+=s[r]}return n}function YC(s){const e=Object.create(null),n=String(s);let r=0,i=!1,l=!1;function c(d){const f=hf(n.slice(r,d)),h=f.indexOf("=");if(h<1)return;const m=hf(f.slice(0,h));if(!KC.test(m))return;const y=m.toLowerCase();if(y==="__proto__"||y==="constructor"||y==="prototype")return;const v=hf(f.slice(h+1));e[y]=WC(v)}for(let d=0;d<n.length;d++){const f=n.charCodeAt(d);i?l?l=!1:f===92?l=!0:f===34&&(i=!1):f===34?i=!0:(f===44||f===59)&&(c(d),r=d+1)}return c(n.length),e}const XC=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function pf(s,e,n,r,i){if(G.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!G.isString(e)){if(G.isString(r))return e.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(e)}}function JC(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function QC(s,e){const n=G.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(s,r+n,{__proto__:null,value:function(i,l,c){return this[r].call(this,e,i,l,c)},configurable:!0})})}let xn=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function l(d,f,h){const m=ko(f);if(!m)return;const y=G.findKey(i,m);(!y||i[y]===void 0||h===!0||h===void 0&&i[y]!==!1)&&(i[y||f]=hc(d))}const c=(d,f)=>G.forEach(d,(h,m)=>l(h,m,f));if(G.isPlainObject(e)||e instanceof this.constructor)c(e,n);else if(G.isString(e)&&(e=e.trim())&&!XC(e))c(PC(e),n);else if(G.isObject(e)&&G.isSafeIterable(e)){let d=Object.create(null),f,h;for(const m of e){if(!G.isArray(m))throw new TypeError("Object iterator must return a key-value pair");h=m[0],G.hasOwnProp(d,h)?(f=d[h],d[h]=G.isArray(f)?[...f,m[1]]:[f,m[1]]):d[h]=m[1]}c(d,n)}else e!=null&&l(n,e,r);return this}get(e,n){if(e=ko(e),e){const r=G.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return VC(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ko(e),e){const r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||pf(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function l(c){if(c=ko(c),c){const d=G.findKey(r,c);d&&(!n||pf(r,r[d],d,n))&&(delete r[d],i=!0)}}return G.isArray(e)?e.forEach(l):l(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const l=n[r];(!e||pf(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){const n=this,r={};return G.forEach(this,(i,l)=>{const c=G.findKey(r,l);if(c){n[c]=hc(i),delete n[l];return}const d=e?JC(l):String(l).trim();d!==l&&delete n[l],n[d]=hc(i),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){const e=this.get("set-cookie");return G.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return YC(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Lm]=this[Lm]={accessors:{}}).accessors,i=this.prototype;function l(c){const d=ko(c);r[d]||(QC(i,c),r[d]=!0)}return G.isArray(e)?e.forEach(l):l(e),this}};xn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(xn.prototype,({value:s},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(r){this[n]=r}}}),G.freezeMethods(xn);const pc="[REDACTED ****]";function ZC(s){if(G.hasOwnProp(s,"toJSON"))return!0;let e=Object.getPrototypeOf(s);for(;e&&e!==Object.prototype;){if(G.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function eE(s,e){const n=new Set(e.map(l=>String(l).toLowerCase())),r=[],i=l=>{if(l===null||typeof l!="object"||G.isBuffer(l))return l;if(r.indexOf(l)!==-1)return;l instanceof xn&&(l=l.toJSON()),r.push(l);let c;if(G.isArray(l))c=[],l.forEach((d,f)=>{const h=i(d);G.isUndefined(h)||(c[f]=h)});else{if(!G.isPlainObject(l)&&ZC(l))return r.pop(),l;c=Object.create(null);for(const[d,f]of Object.entries(l)){const h=n.has(d.toLowerCase())?pc:i(f);G.isUndefined(h)||(c[d]=h)}}return r.pop(),c};return i(s)}function $m(s){try{return String(s)}catch{return""}}function tE(s){return s.errors.map(n=>{try{return n&&n.message?$m(n.message):$m(n)}catch{return""}}).filter(Boolean).join("; ")||s.name||"AggregateError"}let we=class t0 extends Error{static from(e,n,r,i,l,c){let d=e.message;!d&&G.isArray(e.errors)&&e.errors.length&&(d=tE(e));const f=new t0(d,n||e.code,r,i,l);return Object.defineProperty(f,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),f.name=e.name,e.status!=null&&f.status==null&&(f.status=e.status),c&&Object.assign(f,c),f}constructor(e,n,r,i,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&G.hasOwnProp(e,"redact")?e.redact:void 0,r=G.isArray(n)&&n.length>0?eE(e,n):G.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};we.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",we.ERR_BAD_OPTION="ERR_BAD_OPTION",we.ECONNABORTED="ECONNABORTED",we.ETIMEDOUT="ETIMEDOUT",we.ECONNREFUSED="ECONNREFUSED",we.ERR_NETWORK="ERR_NETWORK",we.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",we.ERR_DEPRECATED="ERR_DEPRECATED",we.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",we.ERR_BAD_REQUEST="ERR_BAD_REQUEST",we.ERR_CANCELED="ERR_CANCELED",we.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",we.ERR_INVALID_URL="ERR_INVALID_URL",we.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const nE=null,Mm=100;function gf(s){return G.isPlainObject(s)||G.isArray(s)}function Nm(s){return G.endsWith(s,"[]")?s.slice(0,-2):s}function mf(s,e,n){return s?s.concat(e).map(function(i,l){return i=Nm(i),!n&&l?"["+i+"]":i}).join(n?".":""):e}function rE(s){return G.isArray(s)&&!s.some(gf)}const aE=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)});function gc(s,e,n){if(!G.isObject(s))throw new TypeError("target must be an object");e=e||new FormData;const r=(O,k)=>{const L=G.getSafeProp(n,O);return G.isUndefined(L)?k:L},i=r("metaTokens",!0),l=r("visitor")||x,c=r("dots",!1),d=r("indexes",!1),f=r("Blob")||typeof Blob<"u"&&Blob,h=r("maxDepth",Mm),m=f&&G.isSpecCompliantForm(e),y=[];if(!G.isFunction(l))throw new TypeError("visitor must be a function");function v(O){if(O===null)return"";if(G.isDate(O))return O.toISOString();if(G.isBoolean(O))return O.toString();if(!m&&G.isBlob(O))throw new we("Blob is not supported. Use a Buffer instead.");if(G.isArrayBuffer(O)||G.isTypedArray(O)){if(m&&typeof f=="function")return new f([O]);throw new we("Blob is not supported. Use a Buffer instead.",we.ERR_NOT_SUPPORT)}return O}function S(O){if(O>h)throw new we("Object is too deeply nested ("+O+" levels). Max depth: "+h,we.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(O,k){if(h===1/0)return JSON.stringify(O);const L=[];return JSON.stringify(O,function(q,z){if(!G.isObject(z))return z;for(;L.length&&L[L.length-1]!==this;)L.pop();return L.push(z),S(k+L.length-1),z})}function x(O,k,L){let B=O;if(G.isReactNative(e)&&G.isReactNativeBlob(O))return e.append(mf(L,k,c),v(O)),!1;if(O&&!L&&typeof O=="object"){if(G.endsWith(k,"{}"))k=i?k:k.slice(0,-2),O=_(O,1);else if(G.isArray(O)&&rE(O)||(G.isFileList(O)||G.endsWith(k,"[]"))&&(B=G.toArray(O)))return k=Nm(k),B.forEach(function(z,W){!(G.isUndefined(z)||z=== Line truncated
`;break;case"t":y+=" ";break;case"r":y+="\r";break;case"b":y+="\b";break;case"f":y+="\f";break;case"v":y+="\v";break;case"0":y+="\0";break;case"\\":y+="\\";break;case"'":y+="'";break;case'"':y+='"';break;case"`":y+="`";break;default:y+=v;break}n++}else y+=s[n],n++;if(n>=r)throw new Error(`Unterminated string literal at position ${h}`);n++,e.push({type:"str",value:y,pos:h});continue}if(L0(l)){const h=n;for(n++;n<r&&$0(s[n]);)n++;e.push({type:"ident",value:s.slice(h,n),pos:h});continue}if(l==="`"){const h=am(s,n);e.push({type:"template",value:"",pos:n,quasis:h.quasis,exprs:h.exprs}),n=h.end;continue}const c=n,d=s.substr(n,2);if(s.substr(n,3)==="..."){e.push({type:"punct",value:"...",pos:c}),n+=3;continue}switch(l){case"=":{i(1)===">"?(e.push({type:"punct",value:"=>",pos:c}),n+=2):i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"===",pos:c}),n+=3):(e.push({type:"punct",value:"==",pos:c}),n+=2):(e.push({type:"punct",value:"=",pos:c}),n+=1);continue}case"!":{i(1)==="="?i(2)==="="?(e.push({type:"punct",value:"!==",pos:c}),n+=3):(e.push({type:"punct",value:"!=",pos:c}),n+=2):(e.push({type:"punct",value:"!",pos:c}),n+=1);continue}case"<":{if(i(1)==="=")e.push({type:"punct",value:"<=",pos:c}),n+=2;else{if(i(1)==="<")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:"<",pos:c}),n+=1}continue}case">":{if(i(1)==="=")e.push({type:"punct",value:">=",pos:c}),n+=2;else{if(i(1)===">")throw new Error("Bitwise/shift operators are not allowed");e.push({type:"punct",value:">",pos:c}),n+=1}continue}case"&":{if(i(1)==="&")e.push({type:"punct",value:"&&",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"|":{if(i(1)==="|")e.push({type:"punct",value:"||",pos:c}),n+=2;else throw new Error("Bitwise operators are not allowed");continue}case"?":{i(1)==="."&&!wi(i(2))?(e.push({type:"punct",value:"?.",pos:c}),n+=2):i(1)==="?"?(e.push({type:"punct",value:"??",pos:c}),n+=2):(e.push({type:"punct",value:"?",pos:c}),n+=1);continue}case"+":{if(i(1)==="+")throw new Error("Increment operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"+",pos:c}),n+=1;continue}case"-":{if(i(1)==="-")throw new Error("Decrement operator is not allowed");if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"-",pos:c}),n+=1;continue}case"*":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");if(i(1)==="*")throw new Error("Exponentiation operator is not supported");e.push({type:"punct",value:"*",pos:c}),n+=1;continue}case"/":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"/",pos:c}),n+=1;continue}case"%":{if(i(1)==="=")throw new Error("Assignment operators are not allowed");e.push({type:"punct",value:"%",pos:c}),n+=1;continue}case"~":case"^":throw new Error("Bitwise operators are not allowed");case".":case":":case"(":case")":case"[":case"]":case"{":case"}":case",":e.push({type:"punct",value:l,pos:c}),n+=1;continue;case";":e.push({type:"punct",value:";",pos:c}),n+=1;continue;default:throw new Error(`Unexpected character "${l}" at position ${c}`)}}return e}const I0={"??":1,"||":1,"&&":2,"===":3,"!==":3,"==":3,"!=":3,"<":4,">":4,"<=":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6},j0=new Set(["??","||","&&"]);class H0{constructor(e){M(this,"tokens");M(this,"pos",0);this.tokens=e}atEnd(){return this.pos>=this.tokens.length}peek(e=0){const n=this.pos+e;return n<this.tokens.length?this.tokens[n]:null}next(){if(this.atEnd())throw new Error("Unexpected end of expression");return this.tokens[this.pos++]}isPunct(e,n=0){const r=this.peek(n);return!!r&&r.type==="punct"&&r.value===e}expectPunct(e){const n=this.peek();if(!n||n.type!=="punct"||n.value!==e)throw new Error(`Expected "${e}" but found "${n?n.value:"<end>"}"`);this.pos++}parseExpression(){const e=this.tryParseArrow();return e||this.parseTernary()}tryParseArrow(){const e=this.pos,n=this.peek();if(!n)return null;if(n.type==="ident"&&this.isPunct("=>",1)&&!oc.has(String(n.value))){this.pos+=1,this.pos+=1;const{body:r,isBlock:i}=this.parseArrowBody();return{type:"Arrow",params:[{name:String(n.value),default:null}],body:r,isBlock:i}}if(n.type==="punct"&&n.value==="("){this.pos+=1;const r=this.tryParseParamList();if(r&&this.isPunct(")")&&(this.pos+=1,this.isPunct("=>"))){this.pos+=1;const{body:i,isBlock:l}=this.parseArrowBody();return{type:"Arrow",params:r,body:i,isBlock:l}}return this.pos=e,null}return this.pos=e,null}tryParseParamList(){const e=[];if(this.isPunct(")"))return e;for(;;){const n=this.peek();let r=null,i;if(n&&n.type==="punct"&&n.value==="["){const c=this.tryParseArrayPattern();if(!c)return null;i=c}else if(n&&n.type==="ident"&&!oc.has(String(n.value)))r=String(n.value),this.pos+=1;else return null;let l=null;if(this.isPunct("=")&&(this.pos+=1,l=this.parseExpression()),e.push(i?{name:r,elements:i,default:l}:{name:r,default:l}),this.isPunct(",")){this.pos+=1;continue}Line truncated
`).forEach(function(c){i=c.indexOf(":"),n=c.substring(0,i).trim().toLowerCase(),r=c.substring(i+1).trim();const d=G.hasOwnProp(e,n);!n||d&&G.hasOwnProp(PC,n)||(n==="set-cookie"?d?e[n].push(r):e[n]=[r]:e[n]=d?e[n]+", "+r:r)}),e};function BC(s){let e=0,n=s.length;for(;e<n;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=s.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===s.length?s:s.slice(e,n)}const qC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),GC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ff(s,e){return G.isArray(s)?s.map(n=>ff(n,e)):BC(String(s).replace(e,""))}const FC=s=>ff(s,qC),VC=s=>ff(s,GC);function Om(s){const e=Object.create(null);return G.forEach(s.toJSON(),(n,r)=>{e[r]=VC(n)}),e}const Lm=Symbol("internals");function ko(s){return s&&String(s).trim().toLowerCase()}function hc(s){return s===!1||s==null?s:G.isArray(s)?s.map(hc):FC(String(s))}function KC(s){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(s);)e[r[1]]=r[2];return e}const WC=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function hf(s){let e=0,n=s.length;for(;e<n;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=s.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===s.length?s:s.slice(e,n)}function YC(s){const e=s.length-1;if(e<1||s.charCodeAt(0)!==34||s.charCodeAt(e)!==34)return s;let n="";for(let r=1;r<e;r++){const i=s.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=e))return s;n+=s[r]}return n}function XC(s){const e=Object.create(null),n=String(s);let r=0,i=!1,l=!1;function c(d){const f=hf(n.slice(r,d)),h=f.indexOf("=");if(h<1)return;const m=hf(f.slice(0,h));if(!WC.test(m))return;const y=m.toLowerCase();if(y==="__proto__"||y==="constructor"||y==="prototype")return;const v=hf(f.slice(h+1));e[y]=YC(v)}for(let d=0;d<n.length;d++){const f=n.charCodeAt(d);i?l?l=!1:f===92?l=!0:f===34&&(i=!1):f===34?i=!0:(f===44||f===59)&&(c(d),r=d+1)}return c(n.length),e}const JC=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function pf(s,e,n,r,i){if(G.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!G.isString(e)){if(G.isString(r))return e.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(e)}}function QC(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function ZC(s,e){const n=G.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(s,r+n,{__proto__:null,value:function(i,l,c){return this[r].call(this,e,i,l,c)},configurable:!0})})}let xn=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function l(d,f,h){const m=ko(f);if(!m)return;const y=G.findKey(i,m);(!y||i[y]===void 0||h===!0||h===void 0&&i[y]!==!1)&&(i[y||f]=hc(d))}const c=(d,f)=>G.forEach(d,(h,m)=>l(h,m,f));if(G.isPlainObject(e)||e instanceof this.constructor)c(e,n);else if(G.isString(e)&&(e=e.trim())&&!JC(e))c(UC(e),n);else if(G.isObject(e)&&G.isSafeIterable(e)){let d=Object.create(null),f,h;for(const m of e){if(!G.isArray(m))throw new TypeError("Object iterator must return a key-value pair");h=m[0],G.hasOwnProp(d,h)?(f=d[h],d[h]=G.isArray(f)?[...f,m[1]]:[f,m[1]]):d[h]=m[1]}c(d,n)}else e!=null&&l(n,e,r);return this}get(e,n){if(e=ko(e),e){const r=G.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return KC(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ko(e),e){const r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||pf(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function l(c){if(c=ko(c),c){const d=G.findKey(r,c);d&&(!n||pf(r,r[d],d,n))&&(delete r[d],i=!0)}}return G.isArray(e)?e.forEach(l):l(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const l=n[r];(!e||pf(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){const n=this,r={};return G.forEach(this,(i,l)=>{const c=G.findKey(r,l);if(c){n[c]=hc(i),delete n[l];return}const d=e?QC(l):String(l).trim();d!==l&&delete n[l],n[d]=hc(i),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){const e=this.get("set-cookie");return G.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return XC(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Lm]=this[Lm]={accessors:{}}).accessors,i=this.prototype;function l(c){const d=ko(c);r[d]||(ZC(i,c),r[d]=!0)}return G.isArray(e)?e.forEach(l):l(e),this}};xn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(xn.prototype,({value:s},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(r){this[n]=r}}}),G.freezeMethods(xn);const pc="[REDACTED ****]";function eE(s){if(G.hasOwnProp(s,"toJSON"))return!0;let e=Object.getPrototypeOf(s);for(;e&&e!==Object.prototype;){if(G.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function tE(s,e){const n=new Set(e.map(l=>String(l).toLowerCase())),r=[],i=l=>{if(l===null||typeof l!="object"||G.isBuffer(l))return l;if(r.indexOf(l)!==-1)return;l instanceof xn&&(l=l.toJSON()),r.push(l);let c;if(G.isArray(l))c=[],l.forEach((d,f)=>{const h=i(d);G.isUndefined(h)||(c[f]=h)});else{if(!G.isPlainObject(l)&&eE(l))return r.pop(),l;c=Object.create(null);for(const[d,f]of Object.entries(l)){const h=n.has(d.toLowerCase())?pc:i(f);G.isUndefined(h)||(c[d]=h)}}return r.pop(),c};return i(s)}function $m(s){try{return String(s)}catch{return""}}function nE(s){return s.errors.map(n=>{try{return n&&n.message?$m(n.message):$m(n)}catch{return""}}).filter(Boolean).join("; ")||s.name||"AggregateError"}let we=class n0 extends Error{static from(e,n,r,i,l,c){let d=e.message;!d&&G.isArray(e.errors)&&e.errors.length&&(d=nE(e));const f=new n0(d,n||e.code,r,i,l);return Object.defineProperty(f,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),f.name=e.name,e.status!=null&&f.status==null&&(f.status=e.status),c&&Object.assign(f,c),f}constructor(e,n,r,i,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&G.hasOwnProp(e,"redact")?e.redact:void 0,r=G.isArray(n)&&n.length>0?tE(e,n):G.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};we.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",we.ERR_BAD_OPTION="ERR_BAD_OPTION",we.ECONNABORTED="ECONNABORTED",we.ETIMEDOUT="ETIMEDOUT",we.ECONNREFUSED="ECONNREFUSED",we.ERR_NETWORK="ERR_NETWORK",we.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",we.ERR_DEPRECATED="ERR_DEPRECATED",we.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",we.ERR_BAD_REQUEST="ERR_BAD_REQUEST",we.ERR_CANCELED="ERR_CANCELED",we.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",we.ERR_INVALID_URL="ERR_INVALID_URL",we.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const rE=null,Mm=100;function gf(s){return G.isPlainObject(s)||G.isArray(s)}function Nm(s){return G.endsWith(s,"[]")?s.slice(0,-2):s}function mf(s,e,n){return s?s.concat(e).map(function(i,l){return i=Nm(i),!n&&l?"["+i+"]":i}).join(n?".":""):e}function aE(s){return G.isArray(s)&&!s.some(gf)}const iE=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)});function gc(s,e,n){if(!G.isObject(s))throw new TypeError("target must be an object");e=e||new FormData;const r=(O,k)=>{const L=G.getSafeProp(n,O);return G.isUndefined(L)?k:L},i=r("metaTokens",!0),l=r("visitor")||x,c=r("dots",!1),d=r("indexes",!1),f=r("Blob")||typeof Blob<"u"&&Blob,h=r("maxDepth",Mm),m=f&&G.isSpecCompliantForm(e),y=[];if(!G.isFunction(l))throw new TypeError("visitor must be a function");function v(O){if(O===null)return"";if(G.isDate(O))return O.toISOString();if(G.isBoolean(O))return O.toString();if(!m&&G.isBlob(O))throw new we("Blob is not supported. Use a Buffer instead.");if(G.isArrayBuffer(O)||G.isTypedArray(O)){if(m&&typeof f=="function")return new f([O]);throw new we("Blob is not supported. Use a Buffer instead.",we.ERR_NOT_SUPPORT)}return O}function S(O){if(O>h)throw new we("Object is too deeply nested ("+O+" levels). Max depth: "+h,we.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(O,k){if(h===1/0)return JSON.stringify(O);const L=[];return JSON.stringify(O,function(q,z){if(!G.isObject(z))return z;for(;L.length&&L[L.length-1]!==this;)L.pop();return L.push(z),S(k+L.length-1),z})}function x(O,k,L){let B=O;if(G.isReactNative(e)&&G.isReactNativeBlob(O))return e.append(mf(L,k,c),v(O)),!1;if(O&&!L&&typeof O=="object"){if(G.endsWith(k,"{}"))k=i?k:k.slice(0,-2),O=_(O,1);else if(G.isArray(O)&&aE(O)||(G.isFileList(O)||G.endsWith(k,"[]"))&&(B=G.toArray(O)))return k=Nm(k),B.forEach(function(z,W){!(G.isUndefined(z)||z=== Line truncated
`+c.map(cy).join(`
`):" "+cy(c[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+d,we.ERR_NOT_SUPPORT)}return i}const uy={getAdapter:VE,adapters:_f};function Af(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Lo(null,s)}function xf(s){const e=G.toSafeFlatObject(s);return Af(e),e.headers=xn.from(G.getSafeProp(e,"headers")),e.data=wf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),uy.getAdapter(e.adapter||Oo.adapter,e)(e).then(function(i){Af(e),e.response=i;try{i.data=wf.call(e,e.transformResponse,i)}finally{delete e.response}return i.headers=xn.from(i.headers),i},function(i){if(!Vm(i)&&(Af(e),i&&i.response)){e.response=i.response;try{i.response.data=wf.call(e,e.transformResponse,i.response)}finally{delete e.response}i.response.headers=xn.from(i.response.headers)}return Promise.reject(i)})}const bc={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{bc[s]=function(r){return typeof r===s||"a"+(e<1?"n ":" ")+s}});const dy={};bc.transitional=function(e,n,r){function i(l,c){return"[Axios v"+Ef+"] Transitional option '"+l+"'"+c+(r?". "+r:"")}return(l,c,d)=>{if(e===!1)throw new we(i(c," has been removed"+(n?" in "+n:"")),we.ERR_DEPRECATED);return n&&!dy[c]&&(dy[c]=!0,console.warn(i(c," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,c,d):!0}},bc.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function KE(s,e,n){if(typeof s!="object"||s===null)throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const r=Object.keys(s);let i=r.length;for(;i-- >0;){const l=r[i],c=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(c){const d=s[l],f=d===void 0||c(d,l,s);if(f!==!0)throw new we("option "+l+" must be "+f,we.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new we("Unknown option "+l,we.ERR_BAD_OPTION)}}const vc={assertOptions:KE,validators:bc},Tn=vc.validators;let Ti=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Um,response:new Um}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack;let c="";if(typeof l=="string"){const d=l.indexOf(`
`):" "+cy(c[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+d,we.ERR_NOT_SUPPORT)}return i}const uy={getAdapter:KE,adapters:_f};function Af(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Lo(null,s)}function xf(s){const e=G.toSafeFlatObject(s);return Af(e),e.headers=xn.from(G.getSafeProp(e,"headers")),e.data=wf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),uy.getAdapter(e.adapter||Oo.adapter,e)(e).then(function(i){Af(e),e.response=i;try{i.data=wf.call(e,e.transformResponse,i)}finally{delete e.response}return i.headers=xn.from(i.headers),i},function(i){if(!Vm(i)&&(Af(e),i&&i.response)){e.response=i.response;try{i.response.data=wf.call(e,e.transformResponse,i.response)}finally{delete e.response}i.response.headers=xn.from(i.response.headers)}return Promise.reject(i)})}const bc={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{bc[s]=function(r){return typeof r===s||"a"+(e<1?"n ":" ")+s}});const dy={};bc.transitional=function(e,n,r){function i(l,c){return"[Axios v"+Ef+"] Transitional option '"+l+"'"+c+(r?". "+r:"")}return(l,c,d)=>{if(e===!1)throw new we(i(c," has been removed"+(n?" in "+n:"")),we.ERR_DEPRECATED);return n&&!dy[c]&&(dy[c]=!0,console.warn(i(c," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,c,d):!0}},bc.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function WE(s,e,n){if(typeof s!="object"||s===null)throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const r=Object.keys(s);let i=r.length;for(;i-- >0;){const l=r[i],c=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(c){const d=s[l],f=d===void 0||c(d,l,s);if(f!==!0)throw new we("option "+l+" must be "+f,we.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new we("Unknown option "+l,we.ERR_BAD_OPTION)}}const vc={assertOptions:WE,validators:bc},Tn=vc.validators;let Ti=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Um,response:new Um}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack;let c="";if(typeof l=="string"){const d=l.indexOf(`
`);c=d===-1?"":l.slice(d+1)}if(!r.stack)r.stack=c;else if(c){const d=c.indexOf(`
`),f=d===-1?-1:c.indexOf(`
`,d+1),h=f===-1?"":c.slice(f+1);String(r.stack).endsWith(h)||(r.stack+=`
`+c)}}catch{}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xi(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&vc.assertOptions(r,{silentJSONParsing:Tn.transitional(Tn.boolean),forcedJSONParsing:Tn.transitional(Tn.boolean),clarifyTimeoutError:Tn.transitional(Tn.boolean),legacyInterceptorReqResOrdering:Tn.transitional(Tn.boolean),advertiseZstdAcceptEncoding:Tn.transitional(Tn.boolean),validateStatusUndefinedResolves:Tn.transitional(Tn.boolean)},!1),i!=null&&(G.isFunction(i)?n.paramsSerializer={serialize:i}:vc.assertOptions(i,{encode:Tn.function,serialize:Tn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),vc.assertOptions(n,{baseUrl:Tn.spelling("baseURL"),withXsrfToken:Tn.spelling("withXSRFToken")},!0),n.method=(G.getSafeProp(n,"method")||G.getSafeProp(this.defaults,"method")||"get").toLowerCase();let c=l&&G.merge(l.common,l[n.method]);l&&G.forEach(Fm.concat("common"),_=>{delete l[_]}),n.headers=xn.concat(c,l);const d=[];let f=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;f=f&&x.synchronous;const A=n.transitional||bf;A&&A.legacyInterceptorReqResOrdering?d.unshift(x.fulfilled,x.rejected):d.push(x.fulfilled,x.rejected)});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let m,y=0,v;if(!f){const _=[xf.bind(this),void 0];for(_.unshift(...d),_.push(...h),v=_.length,m=Promise.resolve(n);y<v;)m=m.then(_[y++],_[y++]);return m}v=d.length;let S=n;for(;y<v;){const _=d[y++],x=d[y++];try{S=_?_(S):S}catch(A){if(!x){m=Promise.reject(A);break}try{const D=x.call(this,A);G.isThenable(D)&&(m=Promise.resolve(D).then(()=>xf.call(this,S)))}catch(D){m=Promise.reject(D)}break}}if(!m)try{m=xf.call(this,S)}catch(_){m=Promise.reject(_)}for(y=0,v=h.length;y<v;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=xi(this.defaults,e);const n=Qm(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Hm(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){Ti.prototype[e]=function(n,r){return this.request(xi(r||{},{method:e,url:n,data:r&&G.hasOwnProp(r,"data")?r.data:void 0}))}}),G.forEach(["post","put","patch","query"],function(e){function n(r){return function(l,c,d){return this.request(xi(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Ti.prototype[e]=n(),e!=="query"&&(Ti.prototype[e+"Form"]=n(!0))});let WE=class n0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const c=new Promise(d=>{r.subscribe(d),l=d}).then(i);return c.cancel=function(){r.unsubscribe(l)},c},e(function(l,c,d){r.reason||(r.reason=new Lo(l,c,d),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new n0(function(i){e=i}),cancel:e}}};function YE(s){return function(n){return s.apply(null,n)}}function XE(s){return G.isObject(s)&&s.isAxiosError===!0}const Sc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524 Line truncated
`+c)}}catch{}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xi(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&vc.assertOptions(r,{silentJSONParsing:Tn.transitional(Tn.boolean),forcedJSONParsing:Tn.transitional(Tn.boolean),clarifyTimeoutError:Tn.transitional(Tn.boolean),legacyInterceptorReqResOrdering:Tn.transitional(Tn.boolean),advertiseZstdAcceptEncoding:Tn.transitional(Tn.boolean),validateStatusUndefinedResolves:Tn.transitional(Tn.boolean)},!1),i!=null&&(G.isFunction(i)?n.paramsSerializer={serialize:i}:vc.assertOptions(i,{encode:Tn.function,serialize:Tn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),vc.assertOptions(n,{baseUrl:Tn.spelling("baseURL"),withXsrfToken:Tn.spelling("withXSRFToken")},!0),n.method=(G.getSafeProp(n,"method")||G.getSafeProp(this.defaults,"method")||"get").toLowerCase();let c=l&&G.merge(l.common,l[n.method]);l&&G.forEach(Fm.concat("common"),_=>{delete l[_]}),n.headers=xn.concat(c,l);const d=[];let f=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;f=f&&x.synchronous;const A=n.transitional||bf;A&&A.legacyInterceptorReqResOrdering?d.unshift(x.fulfilled,x.rejected):d.push(x.fulfilled,x.rejected)});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let m,y=0,v;if(!f){const _=[xf.bind(this),void 0];for(_.unshift(...d),_.push(...h),v=_.length,m=Promise.resolve(n);y<v;)m=m.then(_[y++],_[y++]);return m}v=d.length;let S=n;for(;y<v;){const _=d[y++],x=d[y++];try{S=_?_(S):S}catch(A){if(!x){m=Promise.reject(A);break}try{const D=x.call(this,A);G.isThenable(D)&&(m=Promise.resolve(D).then(()=>xf.call(this,S)))}catch(D){m=Promise.reject(D)}break}}if(!m)try{m=xf.call(this,S)}catch(_){m=Promise.reject(_)}for(y=0,v=h.length;y<v;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=xi(this.defaults,e);const n=Qm(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Hm(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){Ti.prototype[e]=function(n,r){return this.request(xi(r||{},{method:e,url:n,data:r&&G.hasOwnProp(r,"data")?r.data:void 0}))}}),G.forEach(["post","put","patch","query"],function(e){function n(r){return function(l,c,d){return this.request(xi(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Ti.prototype[e]=n(),e!=="query"&&(Ti.prototype[e+"Form"]=n(!0))});let YE=class r0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const c=new Promise(d=>{r.subscribe(d),l=d}).then(i);return c.cancel=function(){r.unsubscribe(l)},c},e(function(l,c,d){r.reason||(r.reason=new Lo(l,c,d),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new r0(function(i){e=i}),cancel:e}}};function XE(s){return function(n){return s.apply(null,n)}}function JE(s){return G.isObject(s)&&s.isAxiosError===!0}const Sc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524 Line truncated
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
@@ -50,11 +50,11 @@ Error generating stack: `+u.message+`
justify-content: center;
color: #666;
transition: background-color 0.2s;
`,i.onmouseenter=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.2)"},i.onmouseleave=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.1)"};const l=()=>{n.parentNode&&n.parentNode.removeChild(n)};i.onclick=l;const c=d=>{this.isImeComposing(d)||d.key==="Escape"&&(l(),document.removeEventListener("keydown",c))};return document.addEventListener("keydown",c),n.onclick=d=>{d.target===n&&l()},r.appendChild(i),n.appendChild(r),document.body.appendChild(n),{overlay:n,layer:r,closeLayer:l}}static isPrototypePathSegment(e){return cn.PROTOTYPE_PATH_SEGMENTS.includes(e)}getNestedProperty(e,n){return n.split(".").reduce((r,i)=>{if(!cn.isPrototypePathSegment(i))return r&&r[i]!==void 0?r[i]:void 0},e)}assertCallableExternalConstructor(e,n,r){if(typeof window>"u")return;if([window.Function,window.eval,window.setTimeout,window.setInterval].some(l=>l!==void 0&&l===e))throw j.error(`callExternal: blocked arbitrary code execution seam: ${n}`),new jt(`Blocked constructor (arbitrary code execution): ${n}`,r)}async handleSaveToLocalStorage(e,n){const{key:r,value:i}=e;if(!r)return j.error("saveToLocalStorage: key parameter is required"),!1;try{const l=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(r,l),j.log(`saveToLocalStorage: saved ${r}`,i),!0}catch(l){return j.error("saveToLocalStorage: failed to save",{key:r,error:l}),!1}}async handleLoadFromLocalStorage(e,n){const{key:r,target:i,stateKey:l,defaultValue:c}=e;if(!r)return j.error("loadFromLocalStorage: key parameter is required"),c;try{const d=localStorage.getItem(r);if(d===null)return j.log(`loadFromLocalStorage: no value found for ${r}, using default`),l&&n.setState&&this.writeLocalState(n,{[l]:c}),c;let f;try{f=JSON.parse(d)}catch{f=d}return j.log(`loadFromLocalStorage: loaded ${r}`,f),l&&n.setState&&this.writeLocalState(n,{[l]:f}),f}catch(d){return j.error("loadFromLocalStorage: failed to load",{key:r,error:d}),c}}writeLocalState(e,n,r,i){const l=r||e.setState;if(!l)return;if(typeof n=="function"){j.warn("[writeLocalState] 함수형 업데이터는 저장소 B 미러 대상이 아닙니다 (payload 추출 불가). 저장소 A 만 갱신합니다."),l(n);return}if(i?.scope==="parent"||i?.scope==="root"){l(n);return}if(this.localMirrorDepth>0||l?.__g7CanonicalWriter){l(n);return}const c=n&&typeof n=="object"?n:{},d=c.__mergeMode;if(d==="replace"){l(n);return}const{__mergeMode:f,__setStateId:h,...m}=c;if("errors"in m||!cn.isMirrorSafePayload(m)){l(n);return}const y=window;if((y.__g7LayoutContextStack||[]).length>0){l(n);return}const v=y.G7Core?.state?.setLocal;if(!y.__templateApp||typeof v!="function"){l(n);return}const S=this.deepMergeWithState(m,{});this.localMirrorDepth++;try{v(S,{render:!1,merge:d??"deep"}),y.__g7ActionContext?.setState!==l&&l(n),d&&(y.__g7ForcedLocalFields={...y.__g7ForcedLocalFields||{},...S})}finally{this.localMirrorDepth--}}static isMirrorSafePayload(e,n=0){if(e===null||typeof e!="object"||n>=8)return!0;if(Array.isArray(e))return e.every(i=>cn.isMirrorSafePayload(i,n+1));const r=Object.getPrototypeOf(e);return r!==Object.prototype&&r!==null?!1:Object.values(e).every(i=>cn.isMirrorSafePayload(i,n+1))}makeLocalSetStateProxy(e){const n=e.setState;if(!n)return;if(n.__g7CanonicalWriter)return n;const r=i=>{this.writeLocalState(e,i,n)};return r.__g7CanonicalWriter=!0,r}async handleCustomAction(e,n){const r=this.customHandlers.get(e.handler);if(!r){if(this.previewMode){j.warn(`[Preview] Unknown action handler "${e.handler}" — skipped (preview mode)`);return}const c=new jt(`Unknown action handler: ${e.handler}`,e);throw c.unknownHandler=!0,c}const i=this.makeLocalSetStateProxy(n),l=i&&i!==n.setState?{...n,setState:i}:n;return await r(e,l)}resolveParams(e,n){if(!e)return{};const r={};for(const[i,l]of Object.entries(e))i.includes("{{")&&j.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="string"?r[i]=l:Array.isArray(l)?r[i]=l.map(c=>typeof c=="string"&&c.includes("{{")?this.evaluateExpression(c,n):c):typeof l=="object"&&l!==null&&!Array.isArray(l)&&Object.getPrototypeOf(l)!==Object.prototype&&Object.getPrototypeOf(l)!==null?r[i]=l:typeof l=="object"&&l!==null?r[i]=this.resolveParams(l,n):r[i]=l;return r}resolveValue(e,n){return n?this.bindingEngine.resolveBindings(e,n,{skipCache:!0}):e}evaluateExpressions(e,n){let r={};for(const[i,l]of Object.entries(e))if(i==="..."){let c=l;typeof l=="string"&&l.includes("{{")&&(c=this.evaluateExpression(l,n)),c&&typeof c=="object"&&!Array.isArray(c)&&(r={...r,...c})}else typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="object"&&l!==null&&!Array.isArray(l)?r[i]=this.evaluateExpressions(l,n):r[i]=l;return r}evaluateExpressionsIfNeeded(e,n){const r={};for(const[i,l]of Object.entries(e))typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpressi Line truncated
`,i.onmouseenter=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.2)"},i.onmouseleave=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.1)"};const l=()=>{n.parentNode&&n.parentNode.removeChild(n)};i.onclick=l;const c=d=>{this.isImeComposing(d)||d.key==="Escape"&&(l(),document.removeEventListener("keydown",c))};return document.addEventListener("keydown",c),n.onclick=d=>{d.target===n&&l()},r.appendChild(i),n.appendChild(r),document.body.appendChild(n),{overlay:n,layer:r,closeLayer:l}}static isPrototypePathSegment(e){return cn.PROTOTYPE_PATH_SEGMENTS.includes(e)}getNestedProperty(e,n){return n.split(".").reduce((r,i)=>{if(!cn.isPrototypePathSegment(i))return r&&r[i]!==void 0?r[i]:void 0},e)}assertCallableExternalConstructor(e,n,r){if(typeof window>"u")return;if([window.Function,window.eval,window.setTimeout,window.setInterval].some(l=>l!==void 0&&l===e))throw j.error(`callExternal: blocked arbitrary code execution seam: ${n}`),new jt(`Blocked constructor (arbitrary code execution): ${n}`,r)}async handleSaveToLocalStorage(e,n){const{key:r,value:i}=e;if(!r)return j.error("saveToLocalStorage: key parameter is required"),!1;try{const l=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(r,l),j.log(`saveToLocalStorage: saved ${r}`,i),!0}catch(l){return j.error("saveToLocalStorage: failed to save",{key:r,error:l}),!1}}async handleLoadFromLocalStorage(e,n){const{key:r,target:i,stateKey:l,defaultValue:c}=e;if(!r)return j.error("loadFromLocalStorage: key parameter is required"),c;try{const d=localStorage.getItem(r);if(d===null)return j.log(`loadFromLocalStorage: no value found for ${r}, using default`),l&&n.setState&&this.writeLocalState(n,{[l]:c}),c;let f;try{f=JSON.parse(d)}catch{f=d}return j.log(`loadFromLocalStorage: loaded ${r}`,f),l&&n.setState&&this.writeLocalState(n,{[l]:f}),f}catch(d){return j.error("loadFromLocalStorage: failed to load",{key:r,error:d}),c}}writeLocalState(e,n,r,i){const l=r||e.setState;if(!l)return;if(typeof n=="function"){j.warn("[writeLocalState] 함수형 업데이터는 저장소 B 미러 대상이 아닙니다 (payload 추출 불가). 저장소 A 만 갱신합니다."),l(n);return}if(i?.scope==="parent"||i?.scope==="root"){l(n);return}if(this.localMirrorDepth>0||l?.__g7CanonicalWriter){l(n);return}const c=n&&typeof n=="object"?n:{},d=c.__mergeMode;if(d==="replace"){l(n);return}const{__mergeMode:f,__setStateId:h,...m}=c;if("errors"in m||!cn.isMirrorSafePayload(m)){l(n);return}const y=window;if((y.__g7LayoutContextStack||[]).length>0){l(n);return}const v=y.G7Core?.state?.setLocal;if(!y.__templateApp||typeof v!="function"){l(n);return}const S=this.deepMergeWithState(m,{});this.localMirrorDepth++;try{v(S,{render:!1,merge:d??"deep"}),y.__g7ActionContext?.setState!==l&&l(n),d&&(y.__g7ForcedLocalFields={...y.__g7ForcedLocalFields||{},...S})}finally{this.localMirrorDepth--}}static isMirrorSafePayload(e,n=0){if(e===null||typeof e!="object"||n>=8)return!0;if(Array.isArray(e))return e.every(i=>cn.isMirrorSafePayload(i,n+1));const r=Object.getPrototypeOf(e);return r!==Object.prototype&&r!==null?!1:Object.values(e).every(i=>cn.isMirrorSafePayload(i,n+1))}makeLocalSetStateProxy(e){const n=e.setState;if(!n)return;if(n.__g7CanonicalWriter)return n;const r=i=>{this.writeLocalState(e,i,n)};return r.__g7CanonicalWriter=!0,r}async handleCustomAction(e,n){const r=this.customHandlers.get(e.handler);if(!r){if(this.previewMode){j.warn(`[Preview] Unknown action handler "${e.handler}" — skipped (preview mode)`);return}const c=new jt(`Unknown action handler: ${e.handler}`,e);throw c.unknownHandler=!0,c}const i=this.makeLocalSetStateProxy(n),l=i&&i!==n.setState?{...n,setState:i}:n;return await r(e,l)}resolveParams(e,n){if(!e)return{};const r={};for(const[i,l]of Object.entries(e))i.includes("{{")&&j.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="string"?r[i]=l:Array.isArray(l)?r[i]=l.map(c=>typeof c=="string"&&c.includes("{{")?this.evaluateExpression(c,n):c):typeof l=="object"&&l!==null&&!Array.isArray(l)&&Object.getPrototypeOf(l)!==Object.prototype&&Object.getPrototypeOf(l)!==null?r[i]=l:typeof l=="object"&&l!==null?r[i]=this.resolveParams(l,n):r[i]=l;return r}resolveValue(e,n){return n?this.bindingEngine.resolveBindings(e,n,{skipCache:!0}):e}evaluateExpressions(e,n){let r={};for(const[i,l]of Object.entries(e))if(i==="..."){let c=l;typeof l=="string"&&l.includes("{{")&&(c=this.evaluateExpression(l,n)),c&&typeof c=="object"&&!Array.isArray(c)&&(r={...r,...c})}else typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpression(l,n):typeof l=="object"&&l!==null&&!Array.isArray(l)?r[i]=this.evaluateExpressions(l,n):r[i]=l;return r}evaluateExpressionsIfNeeded(e,n){const r={};for(const[i,l]of Object.entries(e))typeof l=="string"&&l.includes("{{")?r[i]=this.evaluateExpressi 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.
`},P_={onDragStart(s){let{active:e}=s;return"Picked up draggable item "+e.id+"."},onDragOver(s){let{active:e,over:n}=s;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(s){let{active:e,over:n}=s;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(s){let{active:e}=s;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function U_(s){let{announcements:e=P_,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=z_}=s;const{announce:l,announcement:c}=I_(),d=Uo("DndLiveRegion"),[f,h]=I.useState(!1);if(I.useEffect(()=>{h(!0)},[]),j_(I.useMemo(()=>({onDragStart(y){let{active:v}=y;l(e.onDragStart({active:v}))},onDragMove(y){let{active:v,over:S}=y;e.onDragMove&&l(e.onDragMove({active:v,over:S}))},onDragOver(y){let{active:v,over:S}=y;l(e.onDragOver({active:v,over:S}))},onDragEnd(y){let{active:v,over:S}=y;l(e.onDragEnd({active:v,over:S}))},onDragCancel(y){let{active:v,over:S}=y;l(e.onDragCancel({active:v,over:S}))}}),[l,e])),!f)return null;const m=Xe.createElement(Xe.Fragment,null,Xe.createElement(M_,{id:r,value:i.draggable}),Xe.createElement(N_,{id:d,announcement:c}));return n?ja.createPortal(m,n):m}var ln;(function(s){s.DragStart="dragStart",s.DragMove="dragMove",s.DragEnd="dragEnd",s.DragCancel="dragCancel",s.DragOver="dragOver",s.RegisterDroppable="registerDroppable",s.SetDroppableDisabled="setDroppableDisabled",s.UnregisterDroppable="unregisterDroppable"})(ln||(ln={}));function Dc(){}function Iy(s,e){return I.useMemo(()=>({sensor:s,options:e??{}}),[s,e])}function B_(){for(var s=arguments.length,e=new Array(s),n=0;n<s;n++)e[n]=arguments[n];return I.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const kr=Object.freeze({x:0,y:0});function jy(s,e){return Math.sqrt(Math.pow(s.x-e.x,2)+Math.pow(s.y-e.y,2))}function Hy(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return n-r}function q_(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return r-n}function zy(s){let{left:e,top:n,height:r,width:i}=s;return[{x:e,y:n},{x:e+i,y:n},{x:e,y:n+r},{x:e+i,y:n+r}]}function Py(s,e){if(!s||s.length===0)return null;const[n]=s;return n[e]}function Uy(s,e,n){return e===void 0&&(e=s.left),n===void 0&&(n=s.top),{x:e+s.width*.5,y:n+s.height*.5}}const G_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=Uy(e,e.left,e.top),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=jy(Uy(f),i);l.push({id:d,data:{droppableContainer:c,value:h}})}}return l.sort(Hy)},F_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=zy(e),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=zy(f),m=i.reduce((v,S,_)=>v+jy(h[_],S),0),y=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:c,value:y}})}}return l.sort(Hy)};function V_(s,e){const n=Math.max(e.top,s.top),r=Math.max(e.left,s.left),i=Math.min(e.left+e.width,s.left+s.width),l=Math.min(e.top+e.height,s.top+s.height),c=i-r,d=l-n;if(r<i&&n<l){const f=e.width*e.height,h=s.width*s.height,m=c*d,y=m/(f+h-m);return Number(y.toFixed(4))}return 0}const K_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=[];for(const l of r){const{id:c}=l,d=n.get(c);if(d){const f=V_(d,e);f>0&&i.push({id:c,data:{droppableContainer:l,value:f}})}}return i.sort(q_)};function W_(s,e,n){return{...s,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function By(s,e){return s&&e?{x:s.left-e.left,y:s.top-e.top}:kr}function Y_(s){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),l=1;l<r;l++)i[l-1]=arguments[l];return i.reduce((c,d)=>({...c,top:c.top+s*d.y,bottom:c.bottom+s*d.y,left:c.left+s*d.x,right:c.right+s*d.x}),{...n})}}const X_=Y_(1);function J_(s){if(s.startsWith("matrix3d(")){const e=s.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(s.startsWith("matrix(")){const e=s.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function Q_(s,e,n){const r=J_(e);if(!r)return s;const{scaleX:i,scaleY:l,x:c,y:d}=r,f=s.left-c-(1-i)*parseFloat(n),h=s.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?s.width/i:s.width,y=l?s.height/l:s.height;return{width:m,height:y,top:h,right:f+m,bottom:h+y,left:f}}const Z_={ignoreTransform:!1};function Cs(s,e){e===void 0&&(e=Z_);let n=s.getBoundingClientRect();if(e.ignoreTransform){const{transform:h,transformOrigin:m}=Hn(s).getComputedStyle(s);h&&(n=Q_(n,h,m))}const{top:r,left:i,width:l,height:c,bottom:d,right:f}=n;return{top:r,left:i,width:l,height:c,bottom:d,right:f}}function qy(s){return Cs(s,{ignoreTransform:!0})}function eA(s){const e=s.innerWidth,n=s.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function tA(s,e){return e===void 0&&(e=Hn(s).getComputedStyle(s)),e.position==="fixed"}function nA(s,e){e===void 0&&(e=Hn(s).getComputedStyle(s));const n=/(auto|scroll|overlay)/;return["overflow","overflowX Line truncated
`},U_={onDragStart(s){let{active:e}=s;return"Picked up draggable item "+e.id+"."},onDragOver(s){let{active:e,over:n}=s;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(s){let{active:e,over:n}=s;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(s){let{active:e}=s;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function B_(s){let{announcements:e=U_,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=P_}=s;const{announce:l,announcement:c}=j_(),d=Uo("DndLiveRegion"),[f,h]=I.useState(!1);if(I.useEffect(()=>{h(!0)},[]),H_(I.useMemo(()=>({onDragStart(y){let{active:v}=y;l(e.onDragStart({active:v}))},onDragMove(y){let{active:v,over:S}=y;e.onDragMove&&l(e.onDragMove({active:v,over:S}))},onDragOver(y){let{active:v,over:S}=y;l(e.onDragOver({active:v,over:S}))},onDragEnd(y){let{active:v,over:S}=y;l(e.onDragEnd({active:v,over:S}))},onDragCancel(y){let{active:v,over:S}=y;l(e.onDragCancel({active:v,over:S}))}}),[l,e])),!f)return null;const m=Xe.createElement(Xe.Fragment,null,Xe.createElement(N_,{id:r,value:i.draggable}),Xe.createElement(I_,{id:d,announcement:c}));return n?ja.createPortal(m,n):m}var ln;(function(s){s.DragStart="dragStart",s.DragMove="dragMove",s.DragEnd="dragEnd",s.DragCancel="dragCancel",s.DragOver="dragOver",s.RegisterDroppable="registerDroppable",s.SetDroppableDisabled="setDroppableDisabled",s.UnregisterDroppable="unregisterDroppable"})(ln||(ln={}));function Dc(){}function Iy(s,e){return I.useMemo(()=>({sensor:s,options:e??{}}),[s,e])}function q_(){for(var s=arguments.length,e=new Array(s),n=0;n<s;n++)e[n]=arguments[n];return I.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const kr=Object.freeze({x:0,y:0});function jy(s,e){return Math.sqrt(Math.pow(s.x-e.x,2)+Math.pow(s.y-e.y,2))}function Hy(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return n-r}function G_(s,e){let{data:{value:n}}=s,{data:{value:r}}=e;return r-n}function zy(s){let{left:e,top:n,height:r,width:i}=s;return[{x:e,y:n},{x:e+i,y:n},{x:e,y:n+r},{x:e+i,y:n+r}]}function Py(s,e){if(!s||s.length===0)return null;const[n]=s;return n[e]}function Uy(s,e,n){return e===void 0&&(e=s.left),n===void 0&&(n=s.top),{x:e+s.width*.5,y:n+s.height*.5}}const F_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=Uy(e,e.left,e.top),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=jy(Uy(f),i);l.push({id:d,data:{droppableContainer:c,value:h}})}}return l.sort(Hy)},V_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=zy(e),l=[];for(const c of r){const{id:d}=c,f=n.get(d);if(f){const h=zy(f),m=i.reduce((v,S,_)=>v+jy(h[_],S),0),y=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:c,value:y}})}}return l.sort(Hy)};function K_(s,e){const n=Math.max(e.top,s.top),r=Math.max(e.left,s.left),i=Math.min(e.left+e.width,s.left+s.width),l=Math.min(e.top+e.height,s.top+s.height),c=i-r,d=l-n;if(r<i&&n<l){const f=e.width*e.height,h=s.width*s.height,m=c*d,y=m/(f+h-m);return Number(y.toFixed(4))}return 0}const W_=s=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=s;const i=[];for(const l of r){const{id:c}=l,d=n.get(c);if(d){const f=K_(d,e);f>0&&i.push({id:c,data:{droppableContainer:l,value:f}})}}return i.sort(G_)};function Y_(s,e,n){return{...s,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function By(s,e){return s&&e?{x:s.left-e.left,y:s.top-e.top}:kr}function X_(s){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),l=1;l<r;l++)i[l-1]=arguments[l];return i.reduce((c,d)=>({...c,top:c.top+s*d.y,bottom:c.bottom+s*d.y,left:c.left+s*d.x,right:c.right+s*d.x}),{...n})}}const J_=X_(1);function Q_(s){if(s.startsWith("matrix3d(")){const e=s.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(s.startsWith("matrix(")){const e=s.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function Z_(s,e,n){const r=Q_(e);if(!r)return s;const{scaleX:i,scaleY:l,x:c,y:d}=r,f=s.left-c-(1-i)*parseFloat(n),h=s.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=i?s.width/i:s.width,y=l?s.height/l:s.height;return{width:m,height:y,top:h,right:f+m,bottom:h+y,left:f}}const eA={ignoreTransform:!1};function Es(s,e){e===void 0&&(e=eA);let n=s.getBoundingClientRect();if(e.ignoreTransform){const{transform:h,transformOrigin:m}=Hn(s).getComputedStyle(s);h&&(n=Z_(n,h,m))}const{top:r,left:i,width:l,height:c,bottom:d,right:f}=n;return{top:r,left:i,width:l,height:c,bottom:d,right:f}}function qy(s){return Es(s,{ignoreTransform:!0})}function tA(s){const e=s.innerWidth,n=s.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function nA(s,e){return e===void 0&&(e=Hn(s).getComputedStyle(s)),e.position==="fixed"}function rA(s,e){e===void 0&&(e=Hn(s).getComputedStyle(s));const n=/(auto|scroll|overlay)/;return["overflow","overflowX Line truncated
<div style="padding: 1rem; border: 2px dashed #ccc; background: #f9f9f9; text-align: center;">
<p style="margin: 0; color: #666;">Component not found: <strong>${e}</strong></p>
</div>
@@ -105,8 +105,8 @@ Error generating stack: `+u.message+`
"
>페이지 새로고침</button>
</div>
`,Xn.error("Error state rendered:",i,r)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Xn.log("Layout data and cache cleared")}}const kx=pt("TranslationContext"),ih=I.createContext(null),Uc=({children:s,translationEngine:e,translationContext:n})=>{const r=I.useMemo(()=>(l,c)=>{if(c){const d="|"+Object.entries(c).map(([f,h])=>`${f}=${h}`).join("|");return e.translate(l,n,d)}return e.translate(l,n)},[e,n]),i=I.useMemo(()=>({translationEngine:e,translationContext:n,t:r}),[e,n,r]);return yt.jsx(ih.Provider,{value:i,children:s})},gb=()=>{const s=I.useContext(ih);return s||(kx.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},Pa=pt("SlotContext"),Rx={registerToSlot:()=>{Pa.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{Pa.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},Dx=I.createContext(Rx),sh=({children:s})=>{const e=I.useRef(new Map),n=I.useRef(new Map),r=I.useCallback(m=>{const y=n.current.get(m);y&&y.forEach(v=>{try{v()}catch(S){Pa.error(`Slot subscriber error (slotId: ${m}):`,S)}})},[]),i=I.useCallback((m,y,v)=>{if(!m||!y){Pa.warn("registerToSlot: slotId and componentId are required");return}e.current.has(m)||e.current.set(m,new Map);const S=e.current.get(m),_=S.get(y);_&&_.registrationKey===v.registrationKey||(S.set(y,v),Pa.log(`Component registered to slot: ${y} -> ${m} (order: ${v.order})`),r(m))},[r]),l=I.useCallback((m,y)=>{const v=e.current.get(m);v&&v.has(y)&&(v.delete(y),Pa.log(`Component unregistered from slot: ${y} <- ${m}`),v.size===0&&e.current.delete(m),r(m))},[r]),c=I.useCallback(m=>{const y=e.current.get(m);return y?Array.from(y.values()).sort((v,S)=>v.order-S.order):[]},[]),d=I.useCallback((m,y)=>{n.current.has(m)||n.current.set(m,new Set);const v=n.current.get(m);return v.add(y),()=>{v.delete(y),v.size===0&&n.current.delete(m)}},[]),f=I.useCallback(()=>{e.current.forEach((m,y)=>{r(y)}),e.current.clear(),n.current.clear(),Pa.log("All slots cleared")},[r]),h=I.useMemo(()=>({registerToSlot:i,unregisterFromSlot:l,getSlotComponents:c,subscribeToSlot:d,clearAllSlots:f,isEnabled:!0}),[i,l,c,d,f]);return I.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=h,Pa.log("SlotContext exposed to window.__slotContextValue"))},[h]),yt.jsx(Dx.Provider,{value:h,children:s})};class oh{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,n){return this.listen(".client-"+e,n)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,n){return this.stopListening(".client-"+e,n)}}class mb{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}function Ox(s){try{return Reflect.construct(String,[],s),!0}catch{return!1}}class lh extends oh{constructor(e,n,r){super(),this.name=n,this.pusher=e,this.options=r,this.eventFormatter=new mb(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,n){return this.on(this.eventFormatter.format(e),n),this}listenToAll(e){return this.subscription.bind_global((n,r)=>{if(n.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),l=n.startsWith(i)?n.substring(i.length+1):"."+n;e(l,r)}),this}stopListening(e,n){return n?this.subscription.unbind(this.eventFormatter.format(e),n):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",n=>{e(n)}),this}on(e,n){return this.subscription.bind(e,n),this}}class yb extends lh{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class Lx extends lh{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class $x extends yb{here(e){return this.on("pusher:subscription_succeeded",n=>{e(Object.keys(n.members).map(r=>n.members[r]))}),this}joining(e){return this.on("pusher:member_added",n=>{e(n.info)}),this}whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}leaving(e){return this.on("pusher:member_removed",n=>{e(n.info)}),this}}class bb extends oh{constructor(e,n,r){super(),this.events={},this.listeners={},this.name=n,this.socket=e,this.options=r,this.eventFormatter=new mb(this.op Line truncated
`);return $!==-1?(this.position+=$+1,w.slice(0,$)):null}isBufferTooLong(b){return this.position===b.length&&b.length>sl}}var ol;(function(E){E[E.CONNECTING=0]="CONNECTING",E[E.OPEN=1]="OPEN",E[E.CLOSED=3]="CLOSED"})(ol||(ol={}));const hr=ol;var Mr=1;class ll{constructor(b,w){this.hooks=b,this.session=Ls(1e3)+"/"+uu(8),this.location=cl(w),this.readyState=hr.CONNECTING,this.openStream()}send(b){return this.sendRaw(JSON.stringify([b]))}ping(){this.hooks.sendHeartbeat(this)}close(b,w){this.onClose(b,w,!0)}sendRaw(b){if(this.readyState===hr.OPEN)try{return Ue.createSocketRequest("POST",pa(Xa(this.location,this.session))).start(b),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(b,w,$){this.closeStream(),this.readyState=hr.CLOSED,this.onclose&&this.onclose({code:b,reason:w,wasClean:$})}onChunk(b){if(b.status===200){this.readyState===hr.OPEN&&this.onActivity();var w,$=b.data.slice(0,1);switch($){case"o":w=JSON.parse(b.data.slice(1)||"{}"),this.onOpen(w);break;case"a":w=JSON.parse(b.data.slice(1)||"[]");for(var N=0;N<w.length;N++)this.onEvent(w[N]);break;case"m":w=JSON.parse(b.data.slice(1)||"null"),this.onEvent(w);break;case"h":this.hooks.onHeartbeat(this);break;case"c":w=JSON.parse(b.data.slice(1)||"[]"),this.onClose(w[0],w[1],!0);break}}}onOpen(b){this.readyState===hr.CONNECTING?(b&&b.hostname&&(this.location.base=cu(this.location.base,b.hostname)),this.readyState=hr.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(b){this.readyState===hr.OPEN&&this.onmessage&&this.onmessage({data:b})}onActivity(){this.onactivity&&this.onactivity()}onError(b){this.onerror&&this.onerror(b)}openStream(){this.stream=Ue.createSocketRequest("POST",pa(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",b=>{this.onChunk(b)}),this.stream.bind("finished",b=>{this.hooks.onFinished(this,b)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(b){Te.defer(()=>{this.onError(b),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function cl(E){var b=/([^\?]*)\/*(\??.*)/.exec(E);return{base:b[1],queryString:b[2]}}function Xa(E,b){return E.base+"/"+b+"/xhr_send"}function pa(E){var b=E.indexOf("?")===-1?"?":"&";return E+b+"t="+ +new Date+"&n="+Mr++}function cu(E,b){var w=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(E);return w[1]+b+w[3]}function Ls(E){return Ue.randomInt(E)}function uu(E){for(var b=[],w=0;w<E;w++)b.push(Ls(32).toString(32));return b.join("")}const Ii=ll;var Nr={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr_streaming"+E.queryString},onHeartbeat:function(E){E.sendRaw("[]")},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const ul=Nr;var ji={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr"+E.queryString},onHeartbeat:function(){},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){b===200?E.reconnect():E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const Jr=ji;var dl={getRequest:function(E){var b=Ue.getXHRAPI(),w=new b;return w.onreadystatechange=w.onprogress=function(){switch(w.readyState){case 3:w.responseText&&w.responseText.length>0&&E.onChunk(w.status,w.responseText);break;case 4:w.responseText&&w.responseText.length>0&&E.onChunk(w.status,w.responseText),E.emit("finished",w.status),E.close();break}},w},abortRequest:function(E){E.onreadystatechange=null,E.abort()}};const $s=dl;var du={createStreamingSocket(E){return this.createSocket(ul,E)},createPollingSocket(E){return this.createSocket(Jr,E)},createSocket(E,b){return new Ii(E,b)},createXHR(E,b){return this.createRequest($s,E,b)},createRequest(E,b,w){return new Ch(E,b,w)}};const Hi=du;Hi.createXDR=function(E,b){return this.createRequest(lu,E,b)};var fu={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:m,DependenciesReceivers:_,getDefaultStrategy:Ya,Transports:Dn,transportConnectionInitializer:wh,HTTPFactory:Hi,TimelineTransport:dn,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(E){if(typeof window<"u"){window.Pusher=E;var b=()=>{this.onDocumentBody(E.ready)};window.JSON?b():x.load("json2",{},b)}},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:ze,jsonp:vn}},onDocumentBody(E){document.body?E():setTimeout(()=>{this.onDocumentBody(E)},0)},createJSONPRequest(E,b){return new fr(E,b)},createScriptRequest(E){return new da(E)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var E=this.getXHRAPI();return new E},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return rl},createWebSocket(E){var b=this.getWebSocketAPI();return new b(E)},createSocketRequest( Line truncated
`,Xn.error("Error state rendered:",i,r)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Xn.log("Layout data and cache cleared")}}const Rx=pt("TranslationContext"),ih=I.createContext(null),Uc=({children:s,translationEngine:e,translationContext:n})=>{const r=I.useMemo(()=>(l,c)=>{if(c){const d="|"+Object.entries(c).map(([f,h])=>`${f}=${h}`).join("|");return e.translate(l,n,d)}return e.translate(l,n)},[e,n]),i=I.useMemo(()=>({translationEngine:e,translationContext:n,t:r}),[e,n,r]);return yt.jsx(ih.Provider,{value:i,children:s})},gb=()=>{const s=I.useContext(ih);return s||(Rx.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},Pa=pt("SlotContext"),Dx={registerToSlot:()=>{Pa.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{Pa.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},Ox=I.createContext(Dx),sh=({children:s})=>{const e=I.useRef(new Map),n=I.useRef(new Map),r=I.useCallback(m=>{const y=n.current.get(m);y&&y.forEach(v=>{try{v()}catch(S){Pa.error(`Slot subscriber error (slotId: ${m}):`,S)}})},[]),i=I.useCallback((m,y,v)=>{if(!m||!y){Pa.warn("registerToSlot: slotId and componentId are required");return}e.current.has(m)||e.current.set(m,new Map);const S=e.current.get(m),_=S.get(y);_&&_.registrationKey===v.registrationKey||(S.set(y,v),Pa.log(`Component registered to slot: ${y} -> ${m} (order: ${v.order})`),r(m))},[r]),l=I.useCallback((m,y)=>{const v=e.current.get(m);v&&v.has(y)&&(v.delete(y),Pa.log(`Component unregistered from slot: ${y} <- ${m}`),v.size===0&&e.current.delete(m),r(m))},[r]),c=I.useCallback(m=>{const y=e.current.get(m);return y?Array.from(y.values()).sort((v,S)=>v.order-S.order):[]},[]),d=I.useCallback((m,y)=>{n.current.has(m)||n.current.set(m,new Set);const v=n.current.get(m);return v.add(y),()=>{v.delete(y),v.size===0&&n.current.delete(m)}},[]),f=I.useCallback(()=>{e.current.forEach((m,y)=>{r(y)}),e.current.clear(),n.current.clear(),Pa.log("All slots cleared")},[r]),h=I.useMemo(()=>({registerToSlot:i,unregisterFromSlot:l,getSlotComponents:c,subscribeToSlot:d,clearAllSlots:f,isEnabled:!0}),[i,l,c,d,f]);return I.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=h,Pa.log("SlotContext exposed to window.__slotContextValue"))},[h]),yt.jsx(Ox.Provider,{value:h,children:s})};class oh{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,n){return this.listen(".client-"+e,n)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,n){return this.stopListening(".client-"+e,n)}}class mb{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}function Lx(s){try{return Reflect.construct(String,[],s),!0}catch{return!1}}class lh extends oh{constructor(e,n,r){super(),this.name=n,this.pusher=e,this.options=r,this.eventFormatter=new mb(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,n){return this.on(this.eventFormatter.format(e),n),this}listenToAll(e){return this.subscription.bind_global((n,r)=>{if(n.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),l=n.startsWith(i)?n.substring(i.length+1):"."+n;e(l,r)}),this}stopListening(e,n){return n?this.subscription.unbind(this.eventFormatter.format(e),n):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",n=>{e(n)}),this}on(e,n){return this.subscription.bind(e,n),this}}class yb extends lh{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class $x extends lh{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class Mx extends yb{here(e){return this.on("pusher:subscription_succeeded",n=>{e(Object.keys(n.members).map(r=>n.members[r]))}),this}joining(e){return this.on("pusher:member_added",n=>{e(n.info)}),this}whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}leaving(e){return this.on("pusher:member_removed",n=>{e(n.info)}),this}}class bb extends oh{constructor(e,n,r){super(),this.events={},this.listeners={},this.name=n,this.socket=e,this.options=r,this.eventFormatter=new mb(this.op Line truncated
`);return $!==-1?(this.position+=$+1,w.slice(0,$)):null}isBufferTooLong(b){return this.position===b.length&&b.length>sl}}var ol;(function(E){E[E.CONNECTING=0]="CONNECTING",E[E.OPEN=1]="OPEN",E[E.CLOSED=3]="CLOSED"})(ol||(ol={}));const hr=ol;var Mr=1;class ll{constructor(b,w){this.hooks=b,this.session=Ls(1e3)+"/"+uu(8),this.location=cl(w),this.readyState=hr.CONNECTING,this.openStream()}send(b){return this.sendRaw(JSON.stringify([b]))}ping(){this.hooks.sendHeartbeat(this)}close(b,w){this.onClose(b,w,!0)}sendRaw(b){if(this.readyState===hr.OPEN)try{return Ue.createSocketRequest("POST",pa(Xa(this.location,this.session))).start(b),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(b,w,$){this.closeStream(),this.readyState=hr.CLOSED,this.onclose&&this.onclose({code:b,reason:w,wasClean:$})}onChunk(b){if(b.status===200){this.readyState===hr.OPEN&&this.onActivity();var w,$=b.data.slice(0,1);switch($){case"o":w=JSON.parse(b.data.slice(1)||"{}"),this.onOpen(w);break;case"a":w=JSON.parse(b.data.slice(1)||"[]");for(var N=0;N<w.length;N++)this.onEvent(w[N]);break;case"m":w=JSON.parse(b.data.slice(1)||"null"),this.onEvent(w);break;case"h":this.hooks.onHeartbeat(this);break;case"c":w=JSON.parse(b.data.slice(1)||"[]"),this.onClose(w[0],w[1],!0);break}}}onOpen(b){this.readyState===hr.CONNECTING?(b&&b.hostname&&(this.location.base=cu(this.location.base,b.hostname)),this.readyState=hr.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(b){this.readyState===hr.OPEN&&this.onmessage&&this.onmessage({data:b})}onActivity(){this.onactivity&&this.onactivity()}onError(b){this.onerror&&this.onerror(b)}openStream(){this.stream=Ue.createSocketRequest("POST",pa(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",b=>{this.onChunk(b)}),this.stream.bind("finished",b=>{this.hooks.onFinished(this,b)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(b){Te.defer(()=>{this.onError(b),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function cl(E){var b=/([^\?]*)\/*(\??.*)/.exec(E);return{base:b[1],queryString:b[2]}}function Xa(E,b){return E.base+"/"+b+"/xhr_send"}function pa(E){var b=E.indexOf("?")===-1?"?":"&";return E+b+"t="+ +new Date+"&n="+Mr++}function cu(E,b){var w=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(E);return w[1]+b+w[3]}function Ls(E){return Ue.randomInt(E)}function uu(E){for(var b=[],w=0;w<E;w++)b.push(Ls(32).toString(32));return b.join("")}const ji=ll;var Nr={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr_streaming"+E.queryString},onHeartbeat:function(E){E.sendRaw("[]")},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const ul=Nr;var Hi={getReceiveURL:function(E,b){return E.base+"/"+b+"/xhr"+E.queryString},onHeartbeat:function(){},sendHeartbeat:function(E){E.sendRaw("[]")},onFinished:function(E,b){b===200?E.reconnect():E.onClose(1006,"Connection interrupted ("+b+")",!1)}};const Jr=Hi;var dl={getRequest:function(E){var b=Ue.getXHRAPI(),w=new b;return w.onreadystatechange=w.onprogress=function(){switch(w.readyState){case 3:w.responseText&&w.responseText.length>0&&E.onChunk(w.status,w.responseText);break;case 4:w.responseText&&w.responseText.length>0&&E.onChunk(w.status,w.responseText),E.emit("finished",w.status),E.close();break}},w},abortRequest:function(E){E.onreadystatechange=null,E.abort()}};const $s=dl;var du={createStreamingSocket(E){return this.createSocket(ul,E)},createPollingSocket(E){return this.createSocket(Jr,E)},createSocket(E,b){return new ji(E,b)},createXHR(E,b){return this.createRequest($s,E,b)},createRequest(E,b,w){return new Ch(E,b,w)}};const zi=du;zi.createXDR=function(E,b){return this.createRequest(lu,E,b)};var fu={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:m,DependenciesReceivers:_,getDefaultStrategy:Ya,Transports:Dn,transportConnectionInitializer:wh,HTTPFactory:zi,TimelineTransport:dn,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(E){if(typeof window<"u"){window.Pusher=E;var b=()=>{this.onDocumentBody(E.ready)};window.JSON?b():x.load("json2",{},b)}},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:ze,jsonp:vn}},onDocumentBody(E){document.body?E():setTimeout(()=>{this.onDocumentBody(E)},0)},createJSONPRequest(E,b){return new fr(E,b)},createScriptRequest(E){return new da(E)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var E=this.getXHRAPI();return new E},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return rl},createWebSocket(E){var b=this.getWebSocketAPI();return new b(E)},createSocketRequest( Line truncated
display: flex;
align-items: center;
justify-content: center;
@@ -227,4 +227,4 @@ Error generating stack: `+u.message+`
`:""}
</div>
</div>
`}static renderFromError(e,n,r,i=!1,l,c,d){let f,h;if(n.userMessageKey.startsWith("$t:"))if(c&&l)try{f=c.translate(n.userMessageKey,l)}catch{f=n.userMessageKey.replace("$t:","")}else f=n.userMessageKey.replace("$t:","");else f=n.userMessageKey;if(d){const m=d;m.details?.apiMessage?h=m.details.apiMessage:m.response?.data?.message&&(h=m.response.data.message)}this.render(e,{title:r,message:f,detailMessage:h,icon:n.icon,showStack:n.showStack,stackTrace:n.stack,showReloadButton:n.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const n=document.createElement("div");return n.textContent=e,n.innerHTML}}const Es=pt("Router");class Kx{constructor(e){M(this,"routes",[]);M(this,"templateIdentifier");M(this,"eventHandlers",new Map);M(this,"pendingNavigation",null);M(this,"isNavigating",!1);M(this,"handlePopState",()=>{this.navigateToCurrentPath()});this.templateIdentifier=e,this.initPopstateListener()}initPopstateListener(){window.addEventListener("popstate",this.handlePopState)}on(e,n){this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),this.eventHandlers.get(e).push(n)}async emit(e,...n){const r=this.eventHandlers.get(e);r&&await Promise.all(r.map(i=>i(...n)))}async loadRoutes(e){try{const n=e!==void 0&&e>0?e:null,r=await fetch(Ur(`/api/templates/${this.templateIdentifier}/routes`,"json",n));if(!r.ok)throw new Error(`Failed to load routes: ${r.statusText}`);const i=await r.json();if(!i.success)throw new Error("Failed to load routes from API");if(i.data&&Array.isArray(i.data.routes))this.routes=i.data.routes,Es.log(`Loaded ${this.routes.length} routes${e?` (v=${e})`:""}`);else throw new Error("Invalid routes data format")}catch(n){throw Es.error("Error loading routes:",n),n}}setRoutes(e){this.routes=e,Es.log(`Set ${this.routes.length} routes`)}match(e){const n=this.normalizePathname(e);for(const r of this.routes){const i=this.matchPattern(r.path,n);if(i!==null)return{route:r,params:i}}return null}normalizePathname(e){return e.length>1&&e.endsWith("/")?e.replace(/\/+$/,"")||"/":e}matchPattern(e,n){const r=[];let i=e.replace(/:([^/]+)/g,(f,h)=>(r.push(h),"([^/]+)"));i.startsWith("*/")&&(i="(?:/[^/]+)?"+i.slice(1)),i=i.replace(/\//g,"\\/");const l=new RegExp(`^${i}$`),c=n.match(l);if(!c)return null;const d={};return r.forEach((f,h)=>{d[f]=c[h+1]}),d}getRoutes(){return[...this.routes]}getAuthType(e,n){return e.auth_type?e.auth_type:n.startsWith("/admin")?"admin":"user"}async navigateToCurrentPath(){const e=window.location.pathname,n=window.location.search,r=this.match(e);if(!r){Es.warn(`No route matched for path: ${e}`),this.emit("routeNotFound",e);return}if(r.route.redirect){Es.log(`Redirecting from ${e} to ${r.route.redirect}`),this.navigate(r.route.redirect);return}if(r.route.auth_required){const c=this.getAuthType(r.route,e),d=Ar.getInstance();let f=d.isAuthenticated()&&d.getAuthType()===c;if(f||(f=await d.checkAuth(c)),!f){const h=d.getLoginRedirectUrl(c,e+n);Es.log(`Not authenticated, redirecting to: ${h}`),window.location.href=h;return}}const i=new URLSearchParams(n),l={};for(const c of i.keys()){if(c in l)continue;const d=i.getAll(c);d.length>1?l[c]=d:d.length===1&&(c.endsWith("[]")?l[c]=d:l[c]=d[0])}await this.emit("routeChange",{path:e,layout:r.route.layout,endpoint:r.route.endpoint,params:{...r.route.params||{},...r.params},query:l,auth_required:r.route.auth_required,auth_type:r.route.auth_type,meta:r.route.meta})}navigate(e){if(this.isNavigating){this.pendingNavigation=e;return}this.executeNavigation(e)}async executeNavigation(e){this.isNavigating=!0,this.pendingNavigation=null;try{window.history.pushState({},"",e),await this.navigateToCurrentPath()}finally{if(this.isNavigating=!1,this.pendingNavigation){const n=this.pendingNavigation;this.executeNavigation(n)}}}}const Wx=/^\/admin\/layout-editor\/([^/?#]+)\/?$/;function kb(s){const e=Wx.exec(s);return e?{templateIdentifier:e[1]}:null}const Wt=pt("ErrorPageHandler");class Yx{constructor(e){M(this,"templateId");M(this,"layoutLoader");M(this,"locale");M(this,"debug");M(this,"renderFunction");M(this,"dataSourceManager");M(this,"globalState");M(this,"errorConfig",null);M(this,"configLoaded",!1);this.templateId=e.templateId,this.layoutLoader=e.layoutLoader,this.locale=e.locale,this.debug=e.debug,this.renderFunction=e.renderFunction,this.dataSourceManager=e.dataSourceManager,this.globalState=e.globalState||{}}async loadConfig(){if(this.configLoaded)return this.errorConfig;try{const e=await fetch(Ur(`/api/templates/${this.templateId}/config`,"json"));if(!e.ok)return this.debug&&Wt.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const n=await e.json();if(!n.success||!n.data)return this.debug&&Wt.warn("Invalid template config response"),this.configLoaded=!0,null;const r=n.data;return!r.error_config||!r.error_config.layouts?(this.debug&&Wt.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=r.error_config,this.configLoaded=!0,this.debug&&Wt.log("Error config loaded:",this.error Line truncated
`}static renderFromError(e,n,r,i=!1,l,c,d){let f,h;if(n.userMessageKey.startsWith("$t:"))if(c&&l)try{f=c.translate(n.userMessageKey,l)}catch{f=n.userMessageKey.replace("$t:","")}else f=n.userMessageKey.replace("$t:","");else f=n.userMessageKey;if(d){const m=d;m.details?.apiMessage?h=m.details.apiMessage:m.response?.data?.message&&(h=m.response.data.message)}this.render(e,{title:r,message:f,detailMessage:h,icon:n.icon,showStack:n.showStack,stackTrace:n.stack,showReloadButton:n.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const n=document.createElement("div");return n.textContent=e,n.innerHTML}}const _s=pt("Router");class Wx{constructor(e){M(this,"routes",[]);M(this,"templateIdentifier");M(this,"eventHandlers",new Map);M(this,"pendingNavigation",null);M(this,"isNavigating",!1);M(this,"handlePopState",()=>{this.navigateToCurrentPath()});this.templateIdentifier=e,this.initPopstateListener()}initPopstateListener(){window.addEventListener("popstate",this.handlePopState)}on(e,n){this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),this.eventHandlers.get(e).push(n)}async emit(e,...n){const r=this.eventHandlers.get(e);r&&await Promise.all(r.map(i=>i(...n)))}async loadRoutes(e){try{const n=e!==void 0&&e>0?e:null,r=await fetch(Ur(`/api/templates/${this.templateIdentifier}/routes`,"json",n));if(!r.ok)throw new Error(`Failed to load routes: ${r.statusText}`);const i=await r.json();if(!i.success)throw new Error("Failed to load routes from API");if(i.data&&Array.isArray(i.data.routes))this.routes=i.data.routes,_s.log(`Loaded ${this.routes.length} routes${e?` (v=${e})`:""}`);else throw new Error("Invalid routes data format")}catch(n){throw _s.error("Error loading routes:",n),n}}setRoutes(e){this.routes=e,_s.log(`Set ${this.routes.length} routes`)}match(e){const n=this.normalizePathname(e);for(const r of this.routes){const i=this.matchPattern(r.path,n);if(i!==null)return{route:r,params:i}}return null}normalizePathname(e){return e.length>1&&e.endsWith("/")?e.replace(/\/+$/,"")||"/":e}matchPattern(e,n){const r=[];let i=e.replace(/:([^/]+)/g,(f,h)=>(r.push(h),"([^/]+)"));i.startsWith("*/")&&(i="(?:/[^/]+)?"+i.slice(1)),i=i.replace(/\//g,"\\/");const l=new RegExp(`^${i}$`),c=n.match(l);if(!c)return null;const d={};return r.forEach((f,h)=>{d[f]=c[h+1]}),d}getRoutes(){return[...this.routes]}getAuthType(e,n){return e.auth_type?e.auth_type:n.startsWith("/admin")?"admin":"user"}async navigateToCurrentPath(){const e=window.location.pathname,n=window.location.search,r=this.match(e);if(!r){_s.warn(`No route matched for path: ${e}`),this.emit("routeNotFound",e);return}if(r.route.redirect){_s.log(`Redirecting from ${e} to ${r.route.redirect}`),this.navigate(r.route.redirect);return}if(r.route.auth_required){const c=this.getAuthType(r.route,e),d=Ar.getInstance();let f=d.isAuthenticated()&&d.getAuthType()===c;if(f||(f=await d.checkAuth(c)),!f){const h=d.getLoginRedirectUrl(c,e+n);_s.log(`Not authenticated, redirecting to: ${h}`),window.location.href=h;return}}const i=new URLSearchParams(n),l={};for(const c of i.keys()){if(c in l)continue;const d=i.getAll(c);d.length>1?l[c]=d:d.length===1&&(c.endsWith("[]")?l[c]=d:l[c]=d[0])}await this.emit("routeChange",{path:e,layout:r.route.layout,endpoint:r.route.endpoint,params:{...r.route.params||{},...r.params},query:l,auth_required:r.route.auth_required,auth_type:r.route.auth_type,meta:r.route.meta})}navigate(e){if(this.isNavigating){this.pendingNavigation=e;return}this.executeNavigation(e)}async executeNavigation(e){this.isNavigating=!0,this.pendingNavigation=null;try{window.history.pushState({},"",e),await this.navigateToCurrentPath()}finally{if(this.isNavigating=!1,this.pendingNavigation){const n=this.pendingNavigation;this.executeNavigation(n)}}}}const Yx=/^\/admin\/layout-editor\/([^/?#]+)\/?$/;function kb(s){const e=Yx.exec(s);return e?{templateIdentifier:e[1]}:null}const Wt=pt("ErrorPageHandler");class Xx{constructor(e){M(this,"templateId");M(this,"layoutLoader");M(this,"locale");M(this,"debug");M(this,"renderFunction");M(this,"dataSourceManager");M(this,"globalState");M(this,"errorConfig",null);M(this,"configLoaded",!1);this.templateId=e.templateId,this.layoutLoader=e.layoutLoader,this.locale=e.locale,this.debug=e.debug,this.renderFunction=e.renderFunction,this.dataSourceManager=e.dataSourceManager,this.globalState=e.globalState||{}}async loadConfig(){if(this.configLoaded)return this.errorConfig;try{const e=await fetch(Ur(`/api/templates/${this.templateId}/config`,"json"));if(!e.ok)return this.debug&&Wt.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const n=await e.json();if(!n.success||!n.data)return this.debug&&Wt.warn("Invalid template config response"),this.configLoaded=!0,null;const r=n.data;return!r.error_config||!r.error_config.layouts?(this.debug&&Wt.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=r.error_config,this.configLoaded=!0,this.debug&&Wt.log("Error config loaded:",this.error Line truncated
@@ -174,6 +174,22 @@ export function getAssetFailures(): AssetFailure[] {
return Array.from(failures.values());
}
/**
* 자산 실패 안내에 쓰는 사용자 어휘를 번역합니다 (배너 밖 호출자용).
*
* 항목명(label)은 사용자 어휘여야 한다 — 내부 구분 키·식별자를 그대로 넘기면 배너에
* "module을(를) 불러오지 못했습니다" 처럼 내부 이름이 노출된다.
*
* @param key 번역 키
* @param fallback 번역 엔진 부재 시 사용할 문구
* @param params 치환 파라미터
* @return string 번역된 문자열
* @since engine-v1.64.7
*/
export function assetText(key: string, fallback: string, params?: Record<string, string | number>): string {
return t(key, fallback, params);
}
/**
* 등록된 실패 중 재시도 가능한 것을 모두 재시도합니다.
*
+18 -2
View File
@@ -9,10 +9,26 @@
import { createLogger } from '../utils/Logger';
import { loadScriptWithRetry, loadStylesheetWithRetry } from '../template-engine/networkResilience';
import { convertToCurrentMode, staticToLegacy } from '../support/assetUrl';
import { notifyAssetFailure } from '../assets/AssetFailureNotice';
import { assetText, notifyAssetFailure } from '../assets/AssetFailureNotice';
const logger = createLogger('ModuleAssetLoader');
/**
* 병합 CSS 번들의 실패 안내 항목명 (사용자 어휘).
*
* 번들 구분 키(`module`/`plugin`)는 내부 이름이다. 그대로 배너에 넘기면
* "module을(를) 불러오지 못했습니다" 처럼 사용자가 해석할 수 없는 문구가 된다.
*
* @param key 번들 구분 키 ('module' | 'plugin')
* @return string 사용자 어휘 항목명
* @since engine-v1.64.7
*/
function bundleCssLabel(key: string): string {
return key === 'plugin'
? assetText('core.assets.plugin_styles', '플러그인 스타일')
: assetText('core.assets.module_styles', '모듈 스타일');
}
/**
* 모듈 에셋 정보 인터페이스
*/
@@ -321,7 +337,7 @@ export class ModuleAssetLoader {
// 항상 실패한다 — 버튼은 있는데 아무것도 고치지 못하는 상태가 된다.
this.surfaceCssFailure(
`bundle-${key}`,
key,
bundleCssLabel(key),
legacyUrl !== null ? convertToCurrentMode(legacyUrl) : url,
error
);
@@ -5,7 +5,8 @@
*/
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { ModuleAssetLoader, type ModuleAsset } from '../ModuleAssetLoader';
import { ModuleAssetLoader, parseBundleUrlsFromConfig, type ModuleAsset } from '../ModuleAssetLoader';
import { clearAllAssetFailures, getAssetFailures } from '../../assets/AssetFailureNotice';
describe('ModuleAssetLoader', () => {
let loader: ModuleAssetLoader;
@@ -310,6 +311,9 @@ describe('ModuleAssetLoader', () => {
});
describe('loadBundle (서버측 병합 번들)', () => {
/**
* @effects loadbundle_single_script_single_link_append
*/
it('단일 script + 단일 link 를 1개씩만 append 한다', async () => {
const scriptAppends: string[] = [];
const linkAppends: string[] = [];
@@ -350,6 +354,9 @@ describe('ModuleAssetLoader', () => {
appendSpy.mockRestore();
});
/**
* @effects loadbundle_dedup_guard_no_double_load
*/
it('같은 key 를 중복 로드하지 않는다 (중복 가드)', async () => {
let scriptCount = 0;
// 실제 DOM 에 삽입해 element id 가 등록되어야 getElementById 중복 가드가 동작
@@ -370,6 +377,9 @@ describe('ModuleAssetLoader', () => {
appendSpy.mockRestore();
});
/**
* @effects loadbundle_null_urls_noop
*/
it('jsUrl/cssUrl 모두 null 이면 no-op', async () => {
const appendSpy = vi.spyOn(document.head, 'appendChild');
await expect(loader.loadBundle('module', null, null)).resolves.toBeUndefined();
@@ -379,6 +389,9 @@ describe('ModuleAssetLoader', () => {
});
describe('concat 자가등록 (IIFE 병합 계약)', () => {
/**
* @effects concat_iife_self_registration_preserved
*/
it(';\\n 로 이어붙인 2개 IIFE 가 모두 실행되어 레지스트리에 자가등록된다', () => {
// 모의 IIFE 2개 — ecommerce IIFE 처럼 세미콜론 없이 끝나도 `\n;\n` 구분자로 ASI 경계 보호
const registry: Record<string, unknown> = {};
@@ -478,6 +491,83 @@ describe('ModuleAssetLoader', () => {
loader.loadBundle('module', null, '/api/modules/bundle.css')
).resolves.toBeUndefined();
});
/**
* 배너 항목명은 사용자 어휘여야 한다 — 내부 구분 키(module/plugin)를 그대로
* 넘기면 "module을(를) 불러오지 못했습니다" 처럼 해석 불가한 문구가 노출된다.
*
* 테스트 환경에는 G7Core.t 가 없으므로 폴백 문구가 쓰인다.
*
* @effects bundle_css_failure_banner_uses_user_vocabulary
* @since engine-v1.64.7
*/
it('번들 CSS 실패 안내 항목명이 사용자 어휘다 (모듈)', async () => {
clearAllAssetFailures();
stubAssetLoading(['error', 'error', 'error']);
await loader.loadBundle('module', null, '/api/modules/bundle.css');
const failure = getAssetFailures().find(f => f.id === 'ext-css:bundle-module');
expect(failure).toBeDefined();
expect(failure!.label).toBe('모듈 스타일');
expect(failure!.label).not.toBe('module');
});
/**
* @effects bundle_css_failure_banner_uses_user_vocabulary
* @since engine-v1.64.7
*/
it('번들 CSS 실패 안내 항목명이 사용자 어휘다 (플러그인)', async () => {
clearAllAssetFailures();
stubAssetLoading(['error', 'error', 'error']);
await loader.loadBundle('plugin', null, '/api/plugins/bundle.css');
const failure = getAssetFailures().find(f => f.id === 'ext-css:bundle-plugin');
expect(failure).toBeDefined();
expect(failure!.label).toBe('플러그인 스타일');
expect(failure!.label).not.toBe('plugin');
});
});
/**
* bundleUrls 부재(구버전 blade) 시 개별 로딩으로 폴백한다.
*
* 폴백 판정은 파싱 결과가 null 인지로 이뤄진다(TemplateApp.loadExtensionAssets).
* null 이 아닌데 폴백하거나 그 반대면 확장 에셋이 통째로 로드되지 않는데, 오류도
* 경고도 남지 않는다.
*
* @effects missing_bundle_urls_falls_back_to_individual_loading
*/
describe('bundleUrls 부재 폴백 판정', () => {
afterEach(() => {
delete (window as any).G7Config;
});
it('G7Config 자체가 없으면 null 이다 (개별 로딩 폴백)', () => {
delete (window as any).G7Config;
expect(parseBundleUrlsFromConfig()).toBeNull();
});
it('G7Config 는 있으나 bundleUrls 가 없으면 null 이다 (개별 로딩 폴백)', () => {
(window as any).G7Config = { moduleAssets: [] };
expect(parseBundleUrlsFromConfig()).toBeNull();
});
it('bundleUrls 가 있으면 폴백하지 않는다 (번들 경로)', () => {
(window as any).G7Config = {
bundleUrls: { moduleJs: '/api/modules/bundle.js', moduleCss: null, pluginJs: null, pluginCss: null },
};
const urls = parseBundleUrlsFromConfig();
expect(urls).not.toBeNull();
expect(urls!.moduleJs).toContain('/api/modules/bundle');
});
});
describe('loadCSS in-flight Promise 공유', () => {
@@ -5,6 +5,14 @@
>
> 형식: [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)
## [engine-v1.64.7] - 2026-09-04
### Fixed
#### 확장 번들 스타일 실패 안내에 내부 구분 이름이 노출되던 문제
- 병합 CSS 번들 로드에 끝내 실패했을 때 안내 배너의 항목명이 번들 구분 키(`module`/`plugin`)였다. 사용자 어휘(`core.assets.module_styles` · `core.assets.plugin_styles`, 번역 미적재 시 폴백 문구)로 바꾼다 (ModuleAssetLoader.ts, AssetFailureNotice.ts)
## [engine-v1.64.0] - 2026-09-02
### Security
@@ -107,6 +107,7 @@ SSoT 는 코어 `config/template.php` 의 `required_admin_components` 입니다.
- [ ] `_bundled` 에서만 수정하고 `php artisan template:update gnuboard7-hello_admin_template --force` 로 반영
- [ ] manifest version 상향 시 `package.json` · `package-lock.json` 동기화 + CHANGELOG 기재
- [ ] `template.json` 의 `assets` 경로는 실제 산출물을 가리켜야 한다 — 없는 경로를 선언하면 검색엔진용(봇) 화면이 404 를 가리키는 `<link>` 를 싣고, 일반 화면에는 흔적이 남지 않는다
- [ ] 레이아웃 JSON 변경 시 빌드 없이 update 만 — 신규 Tailwind 클래스는 빌드된 CSS 에 존재하는지 확인
- [ ] TSX/TS 변경 시 `--production` 재빌드 후 `dist/` 커밋 (sourceMappingURL 잔존 금지)
- [ ] 다국어 키 추가 시 ko·en 동시 반영 + 번들 ja 언어팩 증분 동기화
@@ -13,6 +13,10 @@
- 확장 문서에 「레이아웃 편집기 스펙」 항목을 추가했습니다. 이 확장이 레이아웃 편집기에 무엇을 선언했는지와, 화면 요소나 데이터를 추가할 때 편집기 쪽에서 함께 해야 할 일을 담습니다.
- 문서의 제품 표기를 「그누보드7」로 통일했습니다.
### Fixed
- 설정 파일의 스크립트 경로가 실제 빌드 산출물과 달랐던 것을 정정했습니다.
## [0.1.0] - 2026-07-01
### Changed
@@ -30,7 +30,7 @@
},
"assets": {
"js": [
"dist/components.js"
"dist/js/components.iife.js"
]
},
"components": {
@@ -107,6 +107,7 @@ User 템플릿은 자기가 그리고 싶은 화면에 필요한 API 를 `data_s
- [ ] `_bundled` 에서만 수정하고 `php artisan template:update gnuboard7-hello_user_template --force` 로 반영
- [ ] manifest version 상향 시 `package.json` · `package-lock.json` 동기화 + CHANGELOG 기재
- [ ] `template.json` 의 `assets` 경로는 실제 산출물을 가리켜야 한다 — 없는 경로를 선언하면 검색엔진용(봇) 화면이 404 를 가리키는 `<link>` 를 싣고, 일반 화면에는 흔적이 남지 않는다
- [ ] 레이아웃 JSON 변경 시 빌드 없이 update 만 — 신규 Tailwind 클래스는 빌드된 CSS 에 존재하는지 확인
- [ ] TSX/TS 변경 시 `--production` 재빌드 후 `dist/` 커밋 (sourceMappingURL 잔존 금지)
- [ ] 다국어 키 추가 시 ko·en 동시 반영 + 번들 ja 언어팩 증분 동기화
@@ -13,6 +13,10 @@
- 확장 문서에 「레이아웃 편집기 스펙」 항목을 추가했습니다. 이 확장이 레이아웃 편집기에 무엇을 선언했는지와, 화면 요소나 데이터를 추가할 때 편집기 쪽에서 함께 해야 할 일을 담습니다.
- 문서의 제품 표기를 「그누보드7」로 통일했습니다.
### Fixed
- 설정 파일이 존재하지 않는 스타일 파일을 선언해 검색엔진용 화면이 없는 주소를 참조하던 문제를 수정했습니다.
## [0.1.0] - 2026-07-01
### Changed
@@ -31,9 +31,7 @@
"plugins": {}
},
"assets": {
"css": [
"dist/css/components.css"
],
"css": [],
"js": [
"dist/js/components.iife.js"
],
@@ -96,6 +96,7 @@ admin/`)이 이 템플릿의 베이스(`_admin_base`)를 extends 하고 이 템
- [ ] `_bundled` 에서만 수정하고 `php artisan template:update sirsoft-admin_basic --force` 로 반영
- [ ] manifest version 상향 시 `package.json` · `package-lock.json` 동기화 + CHANGELOG 기재
- [ ] `template.json` 의 `assets` 경로는 실제 산출물을 가리켜야 한다 — 없는 경로를 선언하면 검색엔진용(봇) 화면이 404 를 가리키는 `<link>` 를 싣고, 일반 화면에는 흔적이 남지 않는다
- [ ] 레이아웃 JSON 변경 시 빌드 없이 update 만 — 신규 Tailwind 클래스는 빌드된 CSS 에 존재하는지 확인
- [ ] TSX/TS 변경 시 `--production` 재빌드 후 `dist/` 커밋 (sourceMappingURL 잔존 금지)
- [ ] 다국어 키 추가 시 ko·en 동시 반영 + 번들 ja 언어팩 증분 동기화
@@ -25,6 +25,7 @@
### Fixed
- 설정 파일의 자산 항목이 실제 파일 위치와 달랐던 것을 정정했습니다. 존재하지 않는 글꼴·이미지 폴더 항목은 제거했습니다.
- 환경설정 > 일반의 「자산 URL 방식 자동 감지」가 감지 결과를 선택 항목과 저장 내용에 반영합니다. 종전에는 버튼을 눌러도 선택이 그대로였고 진행·결과 안내도 표시되지 않았습니다.
- 대시보드 알림 중 일부 경고가 일반 안내와 같은 회색으로 표시되어 경고로 보이지 않던 문제를 수정했습니다. 이제 알림의 심각도에 따라 색이 정해집니다.
- 경고 등급 알림을 대시보드 맨 아래 「시스템 알림」 칸이 아니라 **화면 상단**에 표시합니다. 종전에는 스크롤을 끝까지 내려야 보여, 화면이 정상으로 보이는 상황에서는 조치가 필요하다는 사실을 지나치기 쉬웠습니다. 경고가 아닌 안내는 종전대로 하단에 남으며, 같은 알림이 두 곳에 중복으로 뜨지 않습니다.
@@ -29,18 +29,13 @@
},
"assets": {
"css": [
"assets/css/main.css",
"assets/css/ui-system.css"
"dist/css/components.css"
],
"js": [
"dist/components.js"
"dist/js/components.iife.js"
],
"fonts": [
"assets/fonts/"
],
"images": [
"assets/images/"
]
"fonts": [],
"images": []
},
"components": {
"basic": [
@@ -4,6 +4,7 @@ namespace Tests\Feature\Api\Public;
use App\Services\ExtensionBundleService;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Log;
use Mockery;
use Tests\TestCase;
@@ -40,24 +41,37 @@ class ExtensionBundleServingTest extends TestCase
/**
* 번들 서비스를 모킹합니다.
*
* `$memoryContent` / `$declaredCount` 는 빈 경로(`$returnPath === ''`)일 때의 분기를
* 정한다 — 디스크 캐시 실패(메모리 폴백)인지, 선언 0개(정상 빈 번들)인지,
* 선언은 있는데 결과가 0인지(장애)를 컨트롤러가 이 둘로 가른다.
* `$memoryContent` / `$declaredCount` / `$missing` 은 빈 경로(`$returnPath === ''`)일 때의
* 분기를 정한다 — 디스크 캐시 실패(메모리 폴백)인지, 병합 결과가 정당하게 비었는지
* (선언 0 이거나 선언한 산출물이 전부 존재하되 비어 있음), 선언한 산출물이 소실됐는지
* (장애)를 컨트롤러가 이 셋으로 가른다.
*
* 503 의 근거는 `$declaredCount` 가 아니라 `$missing` 이다. 선언만으로 판정하면
* "스타일이 비어 있는 확장" 의 정당한 상태가 배포 장애와 구분되지 않는다.
*
* @param string $returnPath getBundleFilePath 반환값
* @param string $memoryContent buildBundleContent 반환값
* @param int $declaredCount countAssetDeclaringExtensions 반환값
* @param list<string> $missing findMissingDeclaredAssets 반환값 (소실 산출물 절대 경로)
*/
private function bindBundleService(string $returnPath, string $memoryContent = '', int $declaredCount = 0): void
{
private function bindBundleService(
string $returnPath,
string $memoryContent = '',
int $declaredCount = 0,
array $missing = []
): void {
$mock = Mockery::mock(ExtensionBundleService::class);
$mock->shouldReceive('getCurrentVersion')->andReturn(777);
$mock->shouldReceive('getBundleFilePath')->andReturn($returnPath);
$mock->shouldReceive('buildBundleContent')->andReturn($memoryContent);
$mock->shouldReceive('countAssetDeclaringExtensions')->andReturn($declaredCount);
$mock->shouldReceive('findMissingDeclaredAssets')->andReturn($missing);
$this->app->instance(ExtensionBundleService::class, $mock);
}
/**
* @effects bundle_endpoint_serves_with_etag_and_304
*/
public function test_module_bundle_js_serves_merged_file_with_etag(): void
{
$path = $this->fixtureDir.'/module.777.js';
@@ -73,6 +87,9 @@ class ExtensionBundleServingTest extends TestCase
$this->assertStringContainsString("\n;\n", $response->streamedContent() ?? $response->getContent());
}
/**
* @effects bundle_endpoint_serves_with_etag_and_304
*/
public function test_bundle_returns_304_on_matching_etag(): void
{
$path = $this->fixtureDir.'/plugin.777.js';
@@ -88,6 +105,9 @@ class ExtensionBundleServingTest extends TestCase
$second->assertStatus(304);
}
/**
* @effects empty_bundle_returns_empty_path_and_empty_ok_response
*/
public function test_empty_bundle_returns_empty_ok_response(): void
{
// 에셋을 선언한 활성 확장이 0개 → 빈 번들이 정상이다 → 빈 200
@@ -125,23 +145,90 @@ class ExtensionBundleServingTest extends TestCase
}
/**
* 선언은 있는데 병합 결과가 비면 503 이다 (E2).
* 선언한 산출물이 소실됐는데 병합 결과가 비면 503 이다 (E2).
*
* 배포 중 `dist` 가 잠깐 비면 **모든 확장이 빠진 빈 번들**이 200 으로 나가고, 프론트는
* 404 도 오류도 받지 못한 채 한참 뒤 "Unknown action handler" 로 죽는다 — 그 시점에는
* 원인이 번들이라는 사실이 화면에도 로그에도 남아 있지 않다.
*
* @effects bundle_empty_with_declared_assets_returns_503
* 판정 근거는 선언 축이 아니라 **소실 축**이다. 선언 축만 보면 스타일이 비어 있는
* 확장(정당한 0바이트 산출물)까지 장애로 잡혀 기본 구성이 503 이 된다.
*
* // @scenario ext_type=module, asset_kind=js, active_combo=multiple, file_state=one_missing
*
* @effects bundle_empty_with_declared_assets_returns_503, empty_result_with_missing_declared_artifact_returns_503
*/
public function test_empty_bundle_with_declared_assets_returns_503(): void
{
$this->bindBundleService('', memoryContent: '', declaredCount: 3);
$this->bindBundleService('', memoryContent: '', declaredCount: 3, missing: ['/x/dist/js/a.js']);
$response = $this->get('/api/modules/bundle.js?v=777');
$response->assertStatus(503);
}
/**
* 선언한 산출물이 **존재하되 비어 있으면** 정상 빈 200 이다 (이 이슈의 재현).
*
* 스타일 소스가 자리표시 주석뿐이라 0바이트 CSS 를 내보내는 확장은 정당한 상태다.
* 종전 판정은 "선언 > 0 && 병합 결과 0" 을 곧 배포 장애로 등치해, 그런 확장만 설치된
* 기본 구성의 사용자 화면마다 실패 안내가 떴다.
*
* // @scenario ext_type=module, asset_kind=css, active_combo=one, file_state=present_empty
*
* @effects empty_result_with_present_empty_artifacts_returns_200
*/
public function test_empty_result_with_present_empty_artifacts_returns_200(): void
{
$this->bindBundleService('', memoryContent: '', declaredCount: 1, missing: []);
$response = $this->get('/api/modules/bundle.css?v=777');
$response->assertOk();
$this->assertStringStartsWith('text/css', $response->headers->get('Content-Type'));
$this->assertSame('', $response->getContent());
}
/**
* 플러그인 경로도 같은 판정을 쓴다 — 존재하되 비어 있으면 빈 200.
*
* // @scenario ext_type=plugin, asset_kind=css, active_combo=one, file_state=present_empty
*
* @effects bundle_decision_is_shared_across_extension_types, empty_result_with_present_empty_artifacts_returns_200
*/
public function test_plugin_bundle_returns_200_when_declared_artifacts_present_but_empty(): void
{
$this->bindBundleService('', memoryContent: '', declaredCount: 1, missing: []);
$response = $this->get('/api/plugins/bundle.css?v=777');
$response->assertOk();
$this->assertSame('', $response->getContent());
}
/**
* 503 로그가 **어느 산출물이 없는지**를 싣는다.
*
* 경로가 없으면 운영자는 조치 대상을 짚을 수 없다 — 선언 수만으로는 어느 확장의
* 어느 파일인지 알 수 없다.
*
* // @scenario ext_type=module, asset_kind=css, active_combo=one, file_state=one_missing
*
* @effects missing_artifact_paths_are_logged
*/
public function test_503_log_lists_missing_artifact_paths(): void
{
Log::spy();
$this->bindBundleService('', memoryContent: '', declaredCount: 1, missing: ['/x/dist/css/a.css']);
$this->get('/api/modules/bundle.css?v=777')->assertStatus(503);
Log::shouldHaveReceived('error')->withArgs(
fn ($message, $context) => ($context['missing'] ?? null) === ['/x/dist/css/a.css']
)->once();
}
/**
* 플러그인 경로도 같은 판정을 쓴다 — 두 컨트롤러가 갈라지지 않는다 (장애 쪽).
*
@@ -149,7 +236,7 @@ class ExtensionBundleServingTest extends TestCase
*/
public function test_plugin_bundle_returns_503_when_declared_but_empty(): void
{
$this->bindBundleService('', memoryContent: '', declaredCount: 1);
$this->bindBundleService('', memoryContent: '', declaredCount: 1, missing: ['/x/dist/css/a.css']);
$this->get('/api/plugins/bundle.css?v=777')->assertStatus(503);
}
@@ -2,8 +2,8 @@
* E2E: 확장 프론트엔드 병합 번들 로딩 회귀 검증
*
* @scenario extension-bundle-loading
* @effects bundle_js_requested_once_per_type, individual_iife_requests_absent,
* gdpr_interceptor_still_active, extension_handlers_registered
* @effects individual_iife_requests_absent_in_browser, bundle_url_same_origin_only,
* gdpr_interceptor_still_active_after_merge, extension_handlers_registered_no_console_error
*
* 배경: 활성 모듈/플러그인 IIFE 를 서버측에서 종류별 1개 번들로 병합 서빙한다.
* 실제 페이지 로드 시 (1) 개별 `*.iife.js` 요청이 사라지고 `bundle.js` 로 대체되는지,
@@ -22,8 +22,8 @@ test.describe('확장 병합 번들 로딩', () => {
await page.goto('/');
await page.waitForLoadState('networkidle', { timeout: 30_000 });
const moduleBundle = requestedUrls.filter((u) => /\/api\/modules\/bundle\.js/.test(u));
const pluginBundle = requestedUrls.filter((u) => /\/api\/plugins\/bundle\.js/.test(u));
const moduleBundle = requestedUrls.filter((u) => /\/api\/modules\/bundle[./]js/.test(u));
const pluginBundle = requestedUrls.filter((u) => /\/api\/plugins\/bundle[./]js/.test(u));
// 활성 확장이 있으면 번들이 요청되고, 종류별로 1건씩만 나가야 한다
const individualIife = requestedUrls.filter((u) => /\/api\/(modules|plugins)\/assets\/.*\.iife\.js/.test(u));
@@ -39,7 +39,7 @@ test.describe('확장 병합 번들 로딩', () => {
test('@smoke 병합 번들 응답이 정상(200/304)이고 same-origin 이다', async ({ page }) => {
const bundleResponses: { url: string; status: number }[] = [];
page.on('response', (res) => {
if (/\/api\/(modules|plugins)\/bundle\.(js|css)/.test(res.url())) {
if (/\/api\/(modules|plugins)\/bundle[./](js|css)/.test(res.url())) {
bundleResponses.push({ url: res.url(), status: res.status() });
}
});
@@ -75,4 +75,51 @@ test.describe('확장 병합 번들 로딩', () => {
);
expect(parseErrors, `번들 실행 관련 콘솔 에러: ${parseErrors.join(' | ')}`).toHaveLength(0);
});
/**
* 정상 구성에서는 자산 실패 안내가 뜨지 않는다.
*
* 스타일이 비어 있는 확장(0바이트 CSS)만 설치된 기본 구성에서 번들 CSS 가 503 이 되어
* 사용자 화면마다 안내 배너가 떴다. 서버가 그 상태를 정상 빈 200 으로 판정한 뒤로는
* 배너가 없어야 한다.
*
* // @scenario ext_type=module, asset_kind=css, active_combo=one, file_state=present_empty
*
* @effects empty_result_with_present_empty_artifacts_returns_200
*/
test('@smoke 정상 로드 시 자산 실패 안내가 없다', async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle', { timeout: 30_000 });
await expect(page.locator('#g7-asset-failure-notice')).toHaveCount(0);
const failures = await page.evaluate(
() => (window as any).G7Core?.assets?.getFailures?.() ?? [],
);
expect(failures, `자산 실패가 남아있음: ${JSON.stringify(failures)}`).toHaveLength(0);
});
/**
* 진짜 소실(503)일 때의 안내 항목명은 사용자 어휘여야 한다.
*
* 종전에는 번들 구분 키가 그대로 나와 "module을(를) 불러오지 못했습니다" 로 보였다.
*
* // @scenario ext_type=module, asset_kind=css, active_combo=one, file_state=one_missing
*
* @effects bundle_css_failure_banner_uses_user_vocabulary
*/
test('번들 CSS 가 503 이면 안내 항목명이 사용자 어휘다', async ({ page }) => {
await page.route(/\/api\/(modules|plugins)\/bundle[./]css/, (route) =>
route.fulfill({ status: 503, contentType: 'text/css', body: '' }),
);
await page.goto('/');
const notice = page.locator('#g7-asset-failure-notice');
await expect(notice).toBeVisible({ timeout: 30_000 });
const text = (await notice.innerText()).replace(/\s+/g, ' ');
expect(text, `배너 문구: ${text}`).toContain('모듈 스타일');
expect(text, `내부 구분 키가 노출됨: ${text}`).not.toContain('module을(를)');
});
});
@@ -0,0 +1,122 @@
<?php
namespace Tests\Unit\Extension;
use App\Extension\AbstractModule;
use Illuminate\Support\Facades\File;
use Tests\TestCase;
/**
* AbstractModule::getDeclaredAssetAbsolutePaths() 단위 테스트
*
* 이 게터는 **선언 축**이다 — 매니페스트가 선언한 산출물의 절대 경로를 파일 존재와
* 무관하게 돌려준다. `getBuiltAssetAbsolutePaths()` 는 `file_exists()` 게이트라
* 소실된 산출물이 목록에서 사라져 "선언은 있는데 파일이 없다" 를 셀 수 없다.
*/
class AbstractModuleDeclaredAssetsTest extends TestCase
{
private string $moduleDir;
protected function setUp(): void
{
parent::setUp();
$this->moduleDir = storage_path('framework/testing/declared-assets-module/vendor-sample');
File::ensureDirectoryExists($this->moduleDir);
}
protected function tearDown(): void
{
File::deleteDirectory(dirname($this->moduleDir));
parent::tearDown();
}
/**
* 임시 디렉토리를 모듈 루트로 쓰는 익명 서브클래스를 만든다.
*
* @param array<string, mixed> $assets 매니페스트 assets 선언
*/
private function moduleWithAssets(array $assets): AbstractModule
{
File::put(
$this->moduleDir.'/module.json',
json_encode(['name' => 'sample', 'version' => '1.0.0', 'assets' => $assets], JSON_UNESCAPED_UNICODE)
);
$root = $this->moduleDir;
return new class($root) extends AbstractModule
{
public function __construct(private readonly string $root) {}
protected function getModulePath(): string
{
return $this->root;
}
};
}
/**
* 산출물이 하나도 없어도 선언한 kind 마다 절대 경로가 나온다.
*/
public function test_returns_declared_paths_even_when_files_are_absent(): void
{
$module = $this->moduleWithAssets([
'js' => ['output' => 'dist/js/module.iife.js'],
'css' => ['output' => 'dist/css/module.css'],
]);
$declared = $module->getDeclaredAssetAbsolutePaths();
$this->assertSame(
[
'js' => $this->moduleDir.'/dist/js/module.iife.js',
'css' => $this->moduleDir.'/dist/css/module.css',
],
$declared
);
// 존재 게이트를 타는 게터는 같은 상태에서 비어 있다 — 두 축이 다르다
$this->assertSame([], $module->getBuiltAssetAbsolutePaths());
}
/**
* 선언하지 않은 kind 는 키 자체가 없다.
*/
public function test_omits_undeclared_kinds(): void
{
$module = $this->moduleWithAssets(['js' => ['output' => 'dist/js/module.iife.js']]);
$declared = $module->getDeclaredAssetAbsolutePaths();
$this->assertArrayHasKey('js', $declared);
$this->assertArrayNotHasKey('css', $declared);
}
/**
* `output` 이 비어 있으면 선언으로 보지 않는다 (빈 문자열·빈 배열).
*/
public function test_treats_empty_output_as_undeclared(): void
{
$module = $this->moduleWithAssets([
'js' => ['output' => ''],
'css' => [],
]);
$this->assertSame([], $module->getDeclaredAssetAbsolutePaths());
}
/**
* 산출물이 존재하되 0바이트여도 경로는 그대로 나온다 — 존재 판정은 호출자 몫이다.
*/
public function test_returns_path_for_present_zero_byte_artifact(): void
{
$module = $this->moduleWithAssets(['css' => ['output' => 'dist/css/module.css']]);
File::ensureDirectoryExists($this->moduleDir.'/dist/css');
File::put($this->moduleDir.'/dist/css/module.css', '');
$path = $module->getDeclaredAssetAbsolutePaths()['css'];
$this->assertSame($this->moduleDir.'/dist/css/module.css', $path);
$this->assertTrue(is_file($path));
$this->assertSame(0, filesize($path));
}
}
@@ -0,0 +1,119 @@
<?php
namespace Tests\Unit\Extension;
use App\Extension\AbstractPlugin;
use Illuminate\Support\Facades\File;
use Tests\TestCase;
/**
* AbstractPlugin::getDeclaredAssetAbsolutePaths() 단위 테스트
*
* 모듈 축과 동형이다 — 한쪽만 고쳐지면 플러그인 번들의 소실 판정이 조용히 침묵한다.
*
* @see AbstractModuleDeclaredAssetsTest
*/
class AbstractPluginDeclaredAssetsTest extends TestCase
{
private string $pluginDir;
protected function setUp(): void
{
parent::setUp();
$this->pluginDir = storage_path('framework/testing/declared-assets-plugin/vendor-sample');
File::ensureDirectoryExists($this->pluginDir);
}
protected function tearDown(): void
{
File::deleteDirectory(dirname($this->pluginDir));
parent::tearDown();
}
/**
* 임시 디렉토리를 플러그인 루트로 쓰는 익명 서브클래스를 만든다.
*
* @param array<string, mixed> $assets 매니페스트 assets 선언
*/
private function pluginWithAssets(array $assets): AbstractPlugin
{
File::put(
$this->pluginDir.'/plugin.json',
json_encode(['name' => 'sample', 'version' => '1.0.0', 'assets' => $assets], JSON_UNESCAPED_UNICODE)
);
$root = $this->pluginDir;
return new class($root) extends AbstractPlugin
{
public function __construct(private readonly string $root) {}
protected function getPluginPath(): string
{
return $this->root;
}
};
}
/**
* 산출물이 하나도 없어도 선언한 kind 마다 절대 경로가 나온다.
*/
public function test_returns_declared_paths_even_when_files_are_absent(): void
{
$plugin = $this->pluginWithAssets([
'js' => ['output' => 'dist/js/plugin.iife.js'],
'css' => ['output' => 'dist/css/plugin.css'],
]);
$this->assertSame(
[
'js' => $this->pluginDir.'/dist/js/plugin.iife.js',
'css' => $this->pluginDir.'/dist/css/plugin.css',
],
$plugin->getDeclaredAssetAbsolutePaths()
);
$this->assertSame([], $plugin->getBuiltAssetAbsolutePaths());
}
/**
* 선언하지 않은 kind 는 키 자체가 없다.
*/
public function test_omits_undeclared_kinds(): void
{
$plugin = $this->pluginWithAssets(['css' => ['output' => 'dist/css/plugin.css']]);
$declared = $plugin->getDeclaredAssetAbsolutePaths();
$this->assertArrayHasKey('css', $declared);
$this->assertArrayNotHasKey('js', $declared);
}
/**
* `output` 이 비어 있으면 선언으로 보지 않는다.
*/
public function test_treats_empty_output_as_undeclared(): void
{
$plugin = $this->pluginWithAssets([
'js' => ['output' => ''],
'css' => [],
]);
$this->assertSame([], $plugin->getDeclaredAssetAbsolutePaths());
}
/**
* 산출물이 존재하되 0바이트여도 경로는 그대로 나온다.
*/
public function test_returns_path_for_present_zero_byte_artifact(): void
{
$plugin = $this->pluginWithAssets(['css' => ['output' => 'dist/css/plugin.css']]);
File::ensureDirectoryExists($this->pluginDir.'/dist/css');
File::put($this->pluginDir.'/dist/css/plugin.css', '');
$path = $plugin->getDeclaredAssetAbsolutePaths()['css'];
$this->assertSame($this->pluginDir.'/dist/css/plugin.css', $path);
$this->assertTrue(is_file($path));
$this->assertSame(0, filesize($path));
}
}
@@ -0,0 +1,133 @@
<?php
namespace Tests\Unit\Extension;
use Tests\TestCase;
/**
* 번들 확장 매니페스트의 자산 선언 계약 테스트
*
* 매니페스트가 선언한 산출물 경로는 **디스크에 실재해야 한다**. 어긋나면 증상이
* 종류마다 다르고 전부 조용하다:
*
* - 모듈/플러그인의 `assets.{js,css}` 가 배열형이면 어느 소비자도 읽지 못해
* 그 확장의 스크립트·스타일이 영영 로드되지 않는다 (오류 없음).
* - 템플릿의 `assets.css` 가 없는 파일을 가리키면 봇 화면(SeoRenderer)이 404 를
* 가리키는 `<link>` 를 싣는다 — 일반 화면에는 흔적이 없다.
*
* 0바이트 산출물은 **정당한 상태**다(스타일이 비어 있는 확장). 이 테스트는 존재만
* 본다 — 크기를 보면 그 확장이 다시 배포 장애로 오판된다.
*
* 모집단은 glob 으로 파생한다. 손으로 적은 목록은 확장이 늘어날 때 조용히 낡는다.
*/
class BundledManifestAssetDeclarationTest extends TestCase
{
/**
* 모듈·플러그인 매니페스트의 `assets.{js,css}` 는 객체이며 산출물이 실재해야 한다.
*/
public function test_module_and_plugin_asset_declarations_are_objects_pointing_to_existing_files(): void
{
$manifests = [];
foreach ([['module', 'modules/_bundled'], ['plugin', 'plugins/_bundled']] as [$type, $root]) {
foreach (glob(base_path($root).'/*/'.$type.'.json') as $manifestPath) {
$manifests[] = [$manifestPath, dirname($manifestPath)];
}
}
// 모집단 하한 가드 — glob 이 0건이면 이 테스트는 아무것도 잠그지 않는다
$this->assertGreaterThanOrEqual(
10,
count($manifests),
'번들 모듈/플러그인 매니페스트 모집단이 비었거나 지나치게 작다 — 경로 규약이 바뀐 것이 아닌지 확인하라'
);
$violations = [];
foreach ($manifests as [$manifestPath, $extensionDir]) {
$manifest = json_decode((string) file_get_contents($manifestPath), true) ?? [];
$assets = $manifest['assets'] ?? null;
if ($assets === null) {
continue;
}
$this->assertIsArray($assets, $manifestPath.': assets 는 객체여야 한다');
foreach (['js', 'css'] as $kind) {
if (! array_key_exists($kind, $assets)) {
continue;
}
$declaration = $assets[$kind];
$relative = base_path().DIRECTORY_SEPARATOR;
$shortManifest = str_replace($relative, '', $manifestPath);
if (! is_array($declaration) || ! isset($declaration['output']) || ! is_string($declaration['output']) || $declaration['output'] === '') {
$violations[] = sprintf(
'%s: assets.%s 는 { "output": "..." } 객체여야 한다 (현재: %s)',
$shortManifest,
$kind,
json_encode($declaration, JSON_UNESCAPED_UNICODE)
);
continue;
}
$artifact = $extensionDir.'/'.$declaration['output'];
if (! is_file($artifact)) {
$violations[] = sprintf(
'%s: assets.%s.output 이 가리키는 산출물이 없다 — %s',
$shortManifest,
$kind,
$declaration['output']
);
}
}
}
$this->assertSame([], $violations, "번들 확장 매니페스트 자산 선언 위반:\n".implode("\n", $violations));
}
/**
* 템플릿 매니페스트의 `assets` 경로도 실재해야 한다.
*
* `css`/`js` 는 파일, `fonts`/`images` 는 디렉토리로 본다. 빈 배열은 "선언 없음" 이라
* 정상이다.
*/
public function test_template_asset_declarations_point_to_existing_files(): void
{
$manifests = glob(base_path('templates/_bundled').'/*/template.json');
$this->assertGreaterThanOrEqual(
3,
count($manifests),
'번들 템플릿 매니페스트 모집단이 비었거나 지나치게 작다'
);
$violations = [];
$directoryKinds = ['fonts', 'images'];
foreach ($manifests as $manifestPath) {
$manifest = json_decode((string) file_get_contents($manifestPath), true) ?? [];
$templateDir = dirname($manifestPath);
$shortManifest = str_replace(base_path().DIRECTORY_SEPARATOR, '', $manifestPath);
foreach (($manifest['assets'] ?? []) as $kind => $paths) {
foreach ((array) $paths as $candidate) {
$absolute = $templateDir.'/'.$candidate;
$exists = in_array($kind, $directoryKinds, true)
? is_dir($absolute)
: is_file($absolute);
if (! $exists) {
$violations[] = sprintf('%s: assets.%s 의 %s 가 없다', $shortManifest, $kind, $candidate);
}
}
}
}
$this->assertSame([], $violations, "번들 템플릿 매니페스트 자산 선언 위반:\n".implode("\n", $violations));
}
}
@@ -0,0 +1,105 @@
<?php
namespace Tests\Unit\Seo;
use App\Seo\SeoRenderer;
use Illuminate\Support\Facades\File;
use ReflectionMethod;
use Tests\TestCase;
/**
* SeoRenderer 가 봇 화면에 싣는 템플릿 CSS 는 파일이 있을 때만 링크한다.
*
* `template.json` 의 `assets.css` 는 선언일 뿐이라 산출물이 없을 수 있다. 그 경로를
* 그대로 `<link>` 로 실으면 봇 화면에서만 404 가 나고 일반 화면에는 흔적이 없다 —
* 서버 로그에도 남지 않으므로 운영자가 알 방법이 없다.
*/
class SeoRendererTemplateCssGateTest extends TestCase
{
private string $templateRoot;
protected function setUp(): void
{
parent::setUp();
$this->templateRoot = storage_path('framework/testing/seo-template-css/vendor-sample');
File::ensureDirectoryExists($this->templateRoot);
}
protected function tearDown(): void
{
File::deleteDirectory(dirname($this->templateRoot));
parent::tearDown();
}
/**
* 임시 디렉토리를 템플릿 루트로 쓰는 익명 서브클래스를 만든다.
*
* @param list<string> $cssPaths template.json 의 assets.css 선언
*/
private function rendererWithTemplateCss(array $cssPaths): SeoRenderer
{
File::put(
$this->templateRoot.'/template.json',
json_encode(['name' => 'sample', 'assets' => ['css' => $cssPaths]], JSON_UNESCAPED_UNICODE)
);
$root = $this->templateRoot;
// 부모 생성자(의존 12개)는 호출하지 않는다 — getTemplateCssUrls 는 그 의존을
// 하나도 쓰지 않으므로 미초기화 프로퍼티에 닿지 않는다.
return new class($root) extends SeoRenderer
{
public function __construct(private readonly string $root) {}
protected function templateRootPath(string $identifier): string
{
return $this->root;
}
};
}
/**
* @param list<string> $cssPaths
* @return list<string>
*/
private function cssUrls(array $cssPaths): array
{
$renderer = $this->rendererWithTemplateCss($cssPaths);
$method = new ReflectionMethod(SeoRenderer::class, 'getTemplateCssUrls');
return $method->invoke($renderer, 'vendor-sample');
}
/**
* 존재하는 CSS 만 URL 로 나온다 — 없는 경로는 조용히 빠진다.
*/
public function test_only_existing_css_paths_become_urls(): void
{
File::ensureDirectoryExists($this->templateRoot.'/dist/css');
File::put($this->templateRoot.'/dist/css/components.css', '.a{color:red}');
$urls = $this->cssUrls(['dist/css/components.css', 'dist/css/absent.css']);
$this->assertCount(1, $urls);
$this->assertStringContainsString('css/components.css', $urls[0]);
}
/**
* 선언한 CSS 가 하나도 없으면 빈 배열이다 (404 링크를 만들지 않는다).
*/
public function test_absent_css_declaration_yields_no_urls(): void
{
$this->assertSame([], $this->cssUrls(['dist/css/components.css']));
}
/**
* 0바이트 CSS 는 존재하므로 링크한다 — 존재 여부만 본다.
*/
public function test_present_zero_byte_css_is_still_linked(): void
{
File::ensureDirectoryExists($this->templateRoot.'/dist/css');
File::put($this->templateRoot.'/dist/css/components.css', '');
$this->assertCount(1, $this->cssUrls(['dist/css/components.css']));
}
}
@@ -110,16 +110,26 @@ class ExtensionBundleServiceTest extends TestCase
/**
* 에셋 **매니페스트 선언**(`getAssets()`)을 노출하는 가짜 확장 인스턴스를 만든다.
*
* 산출물 경로(`getBuiltAssetAbsolutePaths`)는 존재하지 않는 파일을 가리킨다 —
* 산출물 경로(`getBuiltAssetAbsolutePaths`)는 기본적으로 존재하지 않는 파일을 가리킨다 —
* "선언은 있는데 산출물이 없다"(dist 소실) 상태를 그대로 재현하기 위해서다.
*
* 선언 축 게터(`getDeclaredAssetAbsolutePaths`)는 파일 존재와 무관하게 선언된 kind 마다
* 경로를 돌려준다. `$declaredPaths` 로 그 경로를 지정하면 실제로 만들어 둔 fixture 파일을
* 가리키게 해 "존재하되 비어 있음" 상태를 만들 수 있다.
*
* @param string $identifier 확장 식별자
* @param int $priority 로딩 우선순위
* @param array<string, mixed> $assets 매니페스트 assets 선언
* @param string $strategy 로딩 전략
* @param array<string, string>|null $declaredPaths kind => 절대 경로 (미지정 시 fixtureDir 의 부재 경로)
*/
private function fakeExtensionWithAssets(string $identifier, int $priority, array $assets, string $strategy = 'global'): object
{
private function fakeExtensionWithAssets(
string $identifier,
int $priority,
array $assets,
string $strategy = 'global',
?array $declaredPaths = null
): object {
$ext = Mockery::mock();
$ext->shouldReceive('hasAssets')->andReturn($assets !== []);
$ext->shouldReceive('getIdentifier')->andReturn($identifier);
@@ -136,6 +146,12 @@ class ExtensionBundleServiceTest extends TestCase
array_map(fn () => 'dist/css/module.css', $assets)
);
$declared = $declaredPaths ?? array_combine(
array_keys($assets),
array_map(fn ($kind) => $this->fixtureDir.'/declared-'.$identifier.'.'.$kind, array_keys($assets))
);
$ext->shouldReceive('getDeclaredAssetAbsolutePaths')->andReturn($declared);
return $ext;
}
@@ -174,10 +190,17 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertSame(1, $service->countAssetDeclaringExtensions('module', 'css'));
// 산출물은 하나도 존재하지 않는다 → 병합 결과는 빈 문자열.
// "선언 > 0 && 결과 0" 이 곧 컨트롤러의 503 조건이다.
// 이 값은 **선언 축**이다 — 컨트롤러의 503 판정은 소실 축(findMissingDeclaredAssets)이
// 한다. 선언 > 0 그 자체는 장애 조건이 아니다(존재하되 비어 있으면 정상 빈 200).
$this->assertSame('', $service->getBundleFilePath('module', 'js', 12345));
}
/**
* 실행 순서는 오직 manifest `loading.priority` 오름차순이다 — 확장 이름을 지목하는
* 분기를 두지 않는다.
*
* @effects ordered_by_priority_ascending_only_no_name_hardcode
*/
public function test_orders_global_assets_by_priority_ascending(): void
{
$a = $this->writeFixture('a.js', '(function(){})()');
@@ -195,6 +218,11 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertSame(['ext-a', 'ext-b', 'ext-c'], array_keys($ordered));
}
/**
* global 전략이 아닌 확장은 번들 모집단이 아니다 (레이아웃/지연 로딩이 따로 처리한다).
*
* @effects non_global_strategy_excluded_from_bundle
*/
public function test_skips_non_global_strategy(): void
{
$g = $this->writeFixture('g.js', '(function(){})()');
@@ -211,6 +239,11 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertArrayNotHasKey('ext-layout', $ordered);
}
/**
* IIFE 사이는 `\n;\n` 로 잇는다 — 구분자가 없으면 ASI 경계가 깨져 번들 전체가 죽는다.
*
* @effects js_iife_joined_with_semicolon_newline_separator
*/
public function test_js_bundle_joins_iife_with_semicolon_newline_separator(): void
{
// 세미콜론 없이 끝나는 IIFE 2개 (ecommerce 형태)
@@ -232,6 +265,9 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertLessThan(strpos($js, 'window.B=2'), strpos($js, 'window.A=1'));
}
/**
* @effects prod_strips_source_mapping_url
*/
public function test_prod_strips_source_mapping_url(): void
{
$this->app['env'] = 'production';
@@ -248,6 +284,9 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertStringNotContainsString('sourceMappingURL', $js);
}
/**
* @effects dev_rewrites_source_mapping_url_to_asset_serving_path
*/
public function test_dev_rewrites_source_mapping_url_to_asset_serving_path(): void
{
// 자산 URL 표기(경로형 vs `?file=` 쿼리형)는 사이트 설정이 정한다. 이 테스트가 보려는
@@ -300,6 +339,11 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertStringContainsString('sourceMappingURL', $bundle);
}
/**
* 한 확장의 읽기 실패가 번들 전체를 소실시키지 않는다 — 그 확장만 빠지고 나머지는 병합된다.
*
* @effects per_extension_fault_tolerance_skips_missing_file_keeps_rest
*/
public function test_per_extension_fault_tolerance_skips_missing_file(): void
{
$good = $this->writeFixture('good.js', '(function(){window.GOOD=1})()');
@@ -323,6 +367,8 @@ class ExtensionBundleServiceTest extends TestCase
* 적었지만, 번들 URL 이 내려오면 프론트는 개별 로딩을 아예 타지 않는다
* (TemplateApp.loadExtensionAssets). 즉 제외 = 그 확장 스타일이 하나도 적용되지 않음
* 이었고, 오류도 로그 흔적도 화면 경고도 남지 않았다.
*
* @effects css_with_relative_url_rewritten_not_excluded
*/
public function test_css_with_relative_url_is_rewritten_not_excluded(): void
{
@@ -370,6 +416,9 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertStringContainsString('url(data:image/gif;base64,AA==)', $css);
}
/**
* @effects empty_bundle_returns_empty_path_and_empty_ok_response
*/
public function test_empty_bundle_returns_empty_path(): void
{
$this->moduleManager->shouldReceive('getActiveModules')->andReturn([]);
@@ -379,6 +428,9 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertSame('', $path);
}
/**
* @effects prod_writes_versioned_cache_file_and_reuses_on_same_version
*/
public function test_prod_writes_versioned_cache_file_and_reuses_it(): void
{
$this->app['env'] = 'production';
@@ -402,6 +454,42 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertSame($path1, $path2);
}
/**
* 비프로덕션은 같은 version 이어도 매 요청 다시 병합한다 (캐시 재사용 없음).
*
* 프로덕션은 같은 version 캐시가 있으면 그대로 재사용하지만, 비프로덕션에서 그러면
* 개발 중 rebuild 가 반영되지 않는다. 소스를 바꿨는데 화면이 그대로인 상태는 오류도
* 로그도 남지 않아 원인을 짚을 수 없다.
*
* @effects non_production_rebuilds_every_request_no_disk_cache
*/
public function test_non_production_rebuilds_every_request_without_cache_reuse(): void
{
$this->assertFalse(app()->environment('production'));
$a = $this->writeFixture('nonprod.js', '(function(){window.A=1})()');
$this->moduleManager->shouldReceive('getActiveModules')->andReturn([
'ext-a' => $this->fakeExtension('ext-a', 10, $a, null),
]);
$svc = $this->service();
$path1 = $svc->getBundleFilePath('module', 'js', 4242);
$this->assertStringContainsString('window.A=1', (string) file_get_contents($path1));
// 소스를 바꾸고 **같은 version** 으로 다시 요청 → 재병합되어야 한다
File::put($a, '(function(){window.A=2})()');
$path2 = $svc->getBundleFilePath('module', 'js', 4242);
$this->assertSame($path1, $path2);
$this->assertStringContainsString('window.A=2', (string) file_get_contents($path2));
@unlink($path1);
}
/**
* @effects cleanup_removes_stale_version_bundles_only
*/
public function test_cleanup_removes_stale_version_bundles_only(): void
{
$bundleDir = storage_path('app/ext-bundles');
@@ -421,6 +509,9 @@ class ExtensionBundleServiceTest extends TestCase
$this->assertFileDoesNotExist($bundleDir.'/plugin.100.css');
}
/**
* @effects clear_bundles_by_type_scopes_to_prefix
*/
public function test_clear_bundles_by_type(): void
{
$bundleDir = storage_path('app/ext-bundles');
@@ -498,6 +589,9 @@ class ExtensionBundleServiceTest extends TestCase
}
}
/**
* @effects plugin_bundle_gdpr_first_when_priority_lowest
*/
public function test_plugin_bundle_orders_by_priority_gdpr_first_when_lowest(): void
{
// gdpr 가 priority 50 으로 최상단(제약 1 회귀 가드) — 이름 하드코딩 아닌 선언 결과
@@ -516,4 +610,105 @@ class ExtensionBundleServiceTest extends TestCase
$js = $this->service()->buildJsBundle('plugin');
$this->assertLessThan(strpos($js, 'window.OTHER=1'), strpos($js, 'window.GDPR=1'));
}
/**
* 선언한 산출물이 **존재하되 0바이트**면 소실 목록에 넣지 않는다.
*
* 스타일 소스가 자리표시 주석뿐인 확장은 0바이트 CSS 를 내보내는 정당한 상태다.
* 이것을 소실로 세면 그 확장만 설치된 기본 구성이 통째로 503 이 된다.
*
* @effects empty_result_with_present_empty_artifacts_returns_200
*/
public function test_find_missing_declared_assets_ignores_present_zero_byte_files(): void
{
$cssPath = $this->writeFixture('present-empty.css', '');
$this->moduleManager->shouldReceive('getActiveModules')->andReturn([
'ext-empty-css' => $this->fakeExtensionWithAssets(
'ext-empty-css',
100,
['css' => ['output' => 'dist/css/module.css']],
'global',
['css' => $cssPath]
),
]);
$service = $this->service();
$this->assertSame(0, filesize($cssPath));
$this->assertSame([], $service->findMissingDeclaredAssets('module', 'css'));
// 선언 축은 그대로 1 — 두 축이 다른 것을 잰다
$this->assertSame(1, $service->countAssetDeclaringExtensions('module', 'css'));
// 병합 결과는 빈 문자열이지만 장애가 아니다
$this->assertSame('', $service->buildCssBundle('module'));
}
/**
* 선언한 산출물이 **없으면** 그 절대 경로를 소실 목록으로 돌려준다.
*
* non-global 전략 확장은 병합 모집단이 아니므로 소실 판정에서도 제외된다 —
* 두 판정이 같은 모집단을 써야 한쪽만 장애로 보는 어긋남이 생기지 않는다.
*
* @effects empty_result_with_missing_declared_artifact_returns_503
*/
public function test_find_missing_declared_assets_lists_absent_files(): void
{
$absent = $this->fixtureDir.'/absent-module.css';
$absentLayout = $this->fixtureDir.'/absent-layout.css';
@unlink($absent);
@unlink($absentLayout);
$this->moduleManager->shouldReceive('getActiveModules')->andReturn([
'ext-gone' => $this->fakeExtensionWithAssets(
'ext-gone',
100,
['css' => ['output' => 'dist/css/module.css']],
'global',
['css' => $absent]
),
'ext-layout' => $this->fakeExtensionWithAssets(
'ext-layout',
100,
['css' => ['output' => 'dist/css/module.css']],
'layout',
['css' => $absentLayout]
),
]);
$missing = $this->service()->findMissingDeclaredAssets('module', 'css');
$this->assertSame([$absent], $missing);
$this->assertNotContains($absentLayout, $missing);
}
/**
* 플러그인 축도 같은 판정을 쓴다 — 모집단만 다르다.
*
* @effects bundle_decision_is_shared_across_extension_types
*/
public function test_find_missing_declared_assets_covers_plugins(): void
{
$absent = $this->fixtureDir.'/absent-plugin.js';
@unlink($absent);
$present = $this->writeFixture('present-plugin.js', '');
$this->pluginManager->shouldReceive('getActivePlugins')->andReturn([
'plg-gone' => $this->fakeExtensionWithAssets(
'plg-gone',
100,
['js' => ['output' => 'dist/js/plugin.iife.js']],
'global',
['js' => $absent]
),
'plg-empty' => $this->fakeExtensionWithAssets(
'plg-empty',
100,
['js' => ['output' => 'dist/js/plugin.iife.js']],
'global',
['js' => $present]
),
]);
$this->assertSame([$absent], $this->service()->findMissingDeclaredAssets('plugin', 'js'));
}
}
+15 -3
View File
@@ -1,4 +1,4 @@
# audit:allow test-scenario-coverage reason: 서버측 확장 번들 병합 도입 회귀 가드. 입력 axis(활성 조합·환경·에셋 종류)의 cross-product 는 test_files 의 Unit/Feature 가 cover 하고, effects 는 병합 계약(순서/구분자/소스맵/캐시/폴백)과 브라우저 실측(요청수/gdpr race)을 enumerate.
# audit:allow test-scenario-coverage[cross_product] reason: 입력 axis 의 완전 cross-product(11축)는 조합 폭발이라 대표 조합만 마킹한다. effects 축은 면제하지 않는다 — 모든 effect 가 테스트 마킹으로 도달해야 한다.
feature: 확장(모듈/플러그인) 프론트엔드 IIFE/CSS 서버측 번들 병합
@@ -24,7 +24,7 @@ axes:
version_state: [first_request, cache_hit, version_bumped]
source_map_state: [present, absent]
css_url_state: [no_url, absolute_url, relative_url]
file_state: [all_present, one_missing]
file_state: [all_present, present_empty, one_missing]
priority_order: [ascending, gdpr_lowest]
bundle_urls_present: [present, absent_fallback]
@@ -39,7 +39,7 @@ effects:
- prod_strips_source_mapping_url
- dev_rewrites_source_mapping_url_to_asset_serving_path
- per_extension_fault_tolerance_skips_missing_file_keeps_rest
- css_with_relative_url_excluded_from_bundle
- css_with_relative_url_rewritten_not_excluded
- empty_bundle_returns_empty_path_and_empty_ok_response
- prod_writes_versioned_cache_file_and_reuses_on_same_version
- non_production_rebuilds_every_request_no_disk_cache
@@ -56,9 +56,21 @@ effects:
- individual_iife_requests_absent_in_browser
- gdpr_interceptor_still_active_after_merge
- extension_handlers_registered_no_console_error
- bundle_empty_with_declared_assets_returns_503
- asset_declaration_count_reads_manifest_not_built_files
- bundle_decision_is_shared_across_extension_types
- bundle_disk_write_failure_falls_back_to_memory
- bundle_script_static_miss_falls_back_to_api
- empty_result_with_present_empty_artifacts_returns_200
- empty_result_with_missing_declared_artifact_returns_503
- missing_artifact_paths_are_logged
- bundle_css_failure_banner_uses_user_vocabulary
test_files:
- tests/Unit/Services/ExtensionBundleServiceTest.php
- tests/Unit/Extension/AbstractModuleDeclaredAssetsTest.php
- tests/Unit/Extension/AbstractPluginDeclaredAssetsTest.php
- tests/Unit/Extension/BundledManifestAssetDeclarationTest.php
- tests/Feature/Api/Public/ExtensionBundleServingTest.php
- resources/js/core/modules/__tests__/ModuleAssetLoader.test.ts
- tests/Playwright/specs/extension-bundle-loading.spec.ts