chore(payment): NHN KCP와 NICE 결제 플러그인 개발 브랜치 분리

정식 develop에서는 기본 번들 정책에 따라 제거된 결제 플러그인을 별도 개발 브랜치에서 계속 유지보수할 수 있도록 복원한다.
This commit is contained in:
thisgun committed 2026-07-02 20:03:22 +09:00
1 parent 49b21e788c
commit 657f546efc
651 files changed
+49118 -20476

No files matched your search

+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"devtools.min.js","sources":["../../../resources/js/core/devtools/__runtime-shims/G7DevToolsCore.ts","../../../resources/js/core/devtools/DiagnosticEngine.ts","../../../resources/js/core/devtools/ServerConnector.ts","../../../resources/js/core/devtools/StyleTracker.ts","../../../resources/js/core/devtools/ui/styles.ts","../../../resources/js/core/devtools/ui/constants.ts","../../../resources/js/core/devtools/ui/utils.ts","../../../resources/js/core/devtools/ui/components/JsonTreeNode.tsx","../../../resources/js/core/devtools/ui/tabs/StateTab.tsx","../../../resources/js/core/devtools/ui/tabs/ActionsTab.tsx","../../../resources/js/core/devtools/ui/tabs/CacheTab.tsx","../../../resources/js/core/devtools/ui/tabs/DiagnoseTab.tsx","../../../resources/js/core/devtools/ui/tabs/PerformanceTab.tsx","../../../resources/js/core/devtools/ui/tabs/LifecycleTab.tsx","../../../resources/js/core/devtools/ui/tabs/NetworkTab.tsx","../../../resources/js/core/devtools/ui/tabs/FormTab.tsx","../../../resources/js/core/devtools/ui/tabs/ConditionalTab.tsx","../../../resources/js/core/devtools/ui/tabs/ExpressionTab.tsx","../../../resources/js/core/devtools/ui/tabs/HandlersTab.tsx","../../../resources/js/core/devtools/ui/tabs/EventsTab.tsx","../../../resources/js/core/devtools/ui/tabs/DataSourcesTab.tsx","../../../resources/js/core/devtools/ui/tabs/RendersTab.tsx","../../../resources/js/core/devtools/ui/tabs/StylesTab.tsx","../../../resources/js/core/devtools/ui/tabs/AuthTab.tsx","../../../resources/js/core/devtools/ui/tabs/LogsTab.tsx","../../../resources/js/core/devtools/ui/tabs/LayoutTab.tsx","../../../resources/js/core/devtools/ui/tabs/ChangeDetectionTab.tsx","../../../resources/js/core/devtools/ui/tabs/StaleClosureTab.tsx","../../../resources/js/core/devtools/ui/tabs/NestedContextTab.tsx","../../../resources/js/core/devtools/ui/tabs/ModalScopeTab.tsx","../../../resources/js/core/devtools/ui/tabs/NamedActionsTab.tsx","../../../resources/js/core/devtools/ui/DevToolsPanel.tsx","../../../resources/js/core/devtools-entry.ts"],"sourcesContent":["/**\n * G7DevToolsCore 런타임 shim — DevTools lazy 번들 전용 (vite.config.devtools.js alias 대상)\n * @since engine-v1.51.0\n *\n * DevTools 추적 코어는 디버그 무관 항상 필요해 메인 번들에 남는다. 디버그 lazy 번들\n * (DevToolsPanel 등)은 이 shim 으로 메인 번들의 단일 인스턴스를 빌려 쓴다(싱글톤 동일성).\n * 값은 window.G7Core.__runtime, 타입은 원본에서 재export.\n */\n\nconst runtime = (typeof window !== 'undefined'\n ? (window as any).G7Core?.__runtime\n : undefined) as { G7DevToolsCore?: unknown } | undefined;\n\nif (!runtime?.G7DevToolsCore) {\n throw new Error(\n '[devtools] window.G7Core.__runtime.G7DevToolsCore 이 없습니다. ' +\n '코어 번들(template-engine.min.js)이 devtools 번들보다 먼저 로드되어야 합니다.'\n );\n}\n\nexport const G7DevToolsCore = runtime.G7DevToolsCore as typeof import('../G7DevToolsCore').G7DevToolsCore;\nexport default G7DevToolsCore;\n","/**\n * G7 DevTools 진단 엔진\n *\n * 증상 기반으로 템플릿 엔진 문제를 자동 진단하는 규칙 엔진\n *\n * @module DiagnosticEngine\n */\n\nimport type {\n DiagnosticRule,\n DiagnosticCategory,\n DiagnosticContext,\n DiagnosisResult,\n FixSuggestion,\n CommonIssue,\n StateSnapshot,\n ActionLog,\n CacheStats,\n StateView,\n LifecycleInfo,\n PerformanceInfo,\n NetworkInfo,\n ConditionalInfo,\n FormInfo,\n WebSocketInfo,\n} from './types';\nimport { G7DevToolsCore } from './G7DevToolsCore';\n\n/**\n * 진단 규칙 정의\n *\n * 트러블슈팅 가이드의 주요 이슈를 규칙으로 정의\n */\nconst diagnosticRules: DiagnosticRule[] = [\n // ============================================\n // 상태 관련 문제\n // ============================================\n {\n id: 'stale-closure',\n name: 'Stale Closure',\n category: 'state',\n symptoms: [\n '이전 값이 전송됨',\n '저장 시 오래된 데이터',\n 'API 호출 시 첫 값만 전송',\n '클릭할 때마다 같은 값',\n ],\n detector: (ctx) => {\n // 액션 이력에서 동일한 값이 반복되는 패턴 감지\n const recentActions = ctx.actionHistory.slice(-10);\n const apiCalls = recentActions.filter(a => a.type === 'apiCall');\n if (apiCalls.length < 2) return false;\n\n // 연속된 API 호출에서 동일한 파라미터가 사용되는지 확인\n for (let i = 1; i < apiCalls.length; i++) {\n const prevParams = JSON.stringify(apiCalls[i - 1].params);\n const currParams = JSON.stringify(apiCalls[i].params);\n if (prevParams === currParams && apiCalls[i].params) {\n return true;\n }\n }\n return fLine truncated
{"version":3,"file":"devtools.min.js","sources":["../../../resources/js/core/devtools/__runtime-shims/G7DevToolsCore.ts","../../../resources/js/core/devtools/DiagnosticEngine.ts","../../../resources/js/core/devtools/ServerConnector.ts","../../../resources/js/core/devtools/StyleTracker.ts","../../../resources/js/core/devtools/ui/styles.ts","../../../resources/js/core/devtools/ui/constants.ts","../../../resources/js/core/devtools/ui/utils.ts","../../../resources/js/core/devtools/ui/components/JsonTreeNode.tsx","../../../resources/js/core/devtools/ui/tabs/StateTab.tsx","../../../resources/js/core/devtools/ui/tabs/ActionsTab.tsx","../../../resources/js/core/devtools/ui/tabs/CacheTab.tsx","../../../resources/js/core/devtools/ui/tabs/DiagnoseTab.tsx","../../../resources/js/core/devtools/ui/tabs/PerformanceTab.tsx","../../../resources/js/core/devtools/ui/tabs/LifecycleTab.tsx","../../../resources/js/core/devtools/ui/tabs/NetworkTab.tsx","../../../resources/js/core/devtools/ui/tabs/FormTab.tsx","../../../resources/js/core/devtools/ui/tabs/ConditionalTab.tsx","../../../resources/js/core/devtools/ui/tabs/ExpressionTab.tsx","../../../resources/js/core/devtools/ui/tabs/HandlersTab.tsx","../../../resources/js/core/devtools/ui/tabs/EventsTab.tsx","../../../resources/js/core/devtools/ui/tabs/DataSourcesTab.tsx","../../../resources/js/core/devtools/ui/tabs/RendersTab.tsx","../../../resources/js/core/devtools/ui/tabs/StylesTab.tsx","../../../resources/js/core/devtools/ui/tabs/AuthTab.tsx","../../../resources/js/core/devtools/ui/tabs/LogsTab.tsx","../../../resources/js/core/devtools/ui/tabs/LayoutTab.tsx","../../../resources/js/core/devtools/ui/tabs/ChangeDetectionTab.tsx","../../../resources/js/core/devtools/ui/tabs/StaleClosureTab.tsx","../../../resources/js/core/devtools/ui/tabs/NestedContextTab.tsx","../../../resources/js/core/devtools/ui/tabs/ModalScopeTab.tsx","../../../resources/js/core/devtools/ui/tabs/NamedActionsTab.tsx","../../../resources/js/core/devtools/ui/DevToolsPanel.tsx","../../../resources/js/core/devtools-entry.ts"],"sourcesContent":["/**\n * G7DevToolsCore 런타임 shim — DevTools lazy 번들 전용 (vite.config.devtools.js alias 대상)\n * @since engine-v1.52.0\n *\n * DevTools 추적 코어는 디버그 무관 항상 필요해 메인 번들에 남는다. 디버그 lazy 번들\n * (DevToolsPanel 등)은 이 shim 으로 메인 번들의 단일 인스턴스를 빌려 쓴다(싱글톤 동일성).\n * 값은 window.G7Core.__runtime, 타입은 원본에서 재export.\n */\n\nconst runtime = (typeof window !== 'undefined'\n ? (window as any).G7Core?.__runtime\n : undefined) as { G7DevToolsCore?: unknown } | undefined;\n\nif (!runtime?.G7DevToolsCore) {\n throw new Error(\n '[devtools] window.G7Core.__runtime.G7DevToolsCore 이 없습니다. ' +\n '코어 번들(template-engine.min.js)이 devtools 번들보다 먼저 로드되어야 합니다.'\n );\n}\n\nexport const G7DevToolsCore = runtime.G7DevToolsCore as typeof import('../G7DevToolsCore').G7DevToolsCore;\nexport default G7DevToolsCore;\n","/**\n * G7 DevTools 진단 엔진\n *\n * 증상 기반으로 템플릿 엔진 문제를 자동 진단하는 규칙 엔진\n *\n * @module DiagnosticEngine\n */\n\nimport type {\n DiagnosticRule,\n DiagnosticCategory,\n DiagnosticContext,\n DiagnosisResult,\n FixSuggestion,\n CommonIssue,\n StateSnapshot,\n ActionLog,\n CacheStats,\n StateView,\n LifecycleInfo,\n PerformanceInfo,\n NetworkInfo,\n ConditionalInfo,\n FormInfo,\n WebSocketInfo,\n} from './types';\nimport { G7DevToolsCore } from './G7DevToolsCore';\n\n/**\n * 진단 규칙 정의\n *\n * 트러블슈팅 가이드의 주요 이슈를 규칙으로 정의\n */\nconst diagnosticRules: DiagnosticRule[] = [\n // ============================================\n // 상태 관련 문제\n // ============================================\n {\n id: 'stale-closure',\n name: 'Stale Closure',\n category: 'state',\n symptoms: [\n '이전 값이 전송됨',\n '저장 시 오래된 데이터',\n 'API 호출 시 첫 값만 전송',\n '클릭할 때마다 같은 값',\n ],\n detector: (ctx) => {\n // 액션 이력에서 동일한 값이 반복되는 패턴 감지\n const recentActions = ctx.actionHistory.slice(-10);\n const apiCalls = recentActions.filter(a => a.type === 'apiCall');\n if (apiCalls.length < 2) return false;\n\n // 연속된 API 호출에서 동일한 파라미터가 사용되는지 확인\n for (let i = 1; i < apiCalls.length; i++) {\n const prevParams = JSON.stringify(apiCalls[i - 1].params);\n const currParams = JSON.stringify(apiCalls[i].params);\n if (prevParams === currParams && apiCalls[i].params) {\n return true;\n }\n }\n return fLine truncated
+1 -1
View File
@@ -1,4 +1,4 @@
var Rz=Object.defineProperty;var eM=(ln,i,u)=>i in ln?Rz(ln,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):ln[i]=u;var Ii=(ln,i,u)=>eM(ln,typeof i!="symbol"?i+"":i,u);(function(ln,i,u,Sn){"use strict";function Lt(){const e=typeof window<"u"?window.G7Core?.__runtime:void 0;if(!e)throw new Error("[layout-editor] window.G7Core.__runtime 이 없습니다. 코어 번들(template-engine.min.js)이 편집기 번들보다 먼저 로드되어야 합니다.");return e}const Ai=Lt();Ai.TranslationProvider;const tt=Ai.useTranslation;Ai.TranslationReactContext;function rt(){return typeof window>"u"?null:window.__g7Devtools??null}function wl(e,t){const n=rt();if(!n?.trackEditorState)return;const o={templateIdentifier:e.templateIdentifier,editMode:e.editMode,selectedRoutePath:e.selectedRoute?.path??null,selectedLayoutName:e.selectedRoute?.layoutName??null,routeTreeSize:e.routeTree.length,isRouteTreeCollapsed:e.isRouteTreeCollapsed,locale:e.locale,previewDevice:e.previewDevice,previewZoom:e.previewZoom,lastAction:t,timestamp:Date.now()};try{n.trackEditorState(o)}catch{}}function Bh(){const e=rt();if(e?.clearEditorStateData)try{e.clearEditorStateData()}catch{}}function Wh(e){const t=rt();if(t?.trackEditorSampleMatch)try{t.trackEditorSampleMatch(e)}catch{}}function jh(){const e=rt();if(e?.clearEditorSampleData)try{e.clearEditorSampleData()}catch{}}function Hh(e){const t=rt();if(t?.trackEditorHistoryEntry)try{t.trackEditorHistoryEntry(e)}catch{}}function Fh(){const e=rt();if(e?.clearEditorHistoryData)try{e.clearEditorHistoryData()}catch{}}function kl(e){const t=rt();if(t?.trackEditorSelection)try{t.trackEditorSelection(e)}catch{}}function Kh(){const e=rt();if(e?.clearEditorSelectionData)try{e.clearEditorSelectionData()}catch{}}function or(e){const t=rt();if(t?.trackEditorPropertyPatch)try{t.trackEditorPropertyPatch(e)}catch{}}function Cn(e){const t=rt();if(t?.trackEditorDnd)try{t.trackEditorDnd(e)}catch{}}function Vh(){const e=rt();if(e?.clearEditorDndData)try{e.clearEditorDndData()}catch{}}function st(e){const t=rt();if(t?.trackEditorDocument)try{t.trackEditorDocument(e)}catch{}}function Uh(){const e=rt();if(e?.clearEditorDocumentData)try{e.clearEditorDocumentData()}catch{}}function qh(e){const t=rt();if(t?.trackEditorSpecMerge)try{t.trackEditorSpecMerge(e)}catch{}}function Gh(){const e=rt();if(e?.clearEditorSpecMergeData)try{e.clearEditorSpecMergeData()}catch{}}function Ti(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return t}function Et(e){const t=rt();if(t?.trackEditorI18n)try{t.trackEditorI18n(e)}catch{}}function Yh(){const e=rt();if(e?.clearEditorI18nData)try{e.clearEditorI18nData()}catch{}}function Sl(e){const t=rt();if(t?.trackPageState)try{t.trackPageState(e)}catch{}}function Xh(){const e=rt();if(e?.clearPageStateData)try{e.clearPageStateData()}catch{}}const Cl="g7le.routeTree.collapsed";function Jh(){if(typeof window>"u")return!1;try{return window.localStorage?.getItem(Cl)==="1"}catch{return!1}}function Zh(e){if(!(typeof window>"u"))try{window.localStorage?.setItem(Cl,e?"1":"0")}catch{}}function Qh(e,t){return{templateIdentifier:e,routeTree:[],routesError:null,selectedRoute:null,isRouteTreeCollapsed:Jh(),editMode:"route",returnRoute:null,returnEditMode:null,locale:t,previewDevice:"desktop",previewZoom:1,previewCustomWidth:1024,previewColorScheme:"light",history:{canUndo:!1,canRedo:!1},isPaletteOpen:!1,availableStates:[],activeStateId:null,layoutVersions:{},extensionVersions:{}}}function Rh(e,t){switch(t.type){case"SET_ROUTE_TREE":return{...e,routeTree:t.tree,routesError:null};case"SET_ROUTES_ERROR":return{...e,routesError:t.error};case"SELECT_ROUTE":return{...e,editMode:"route",selectedRoute:t.route,returnRoute:null,returnEditMode:null};case"TOGGLE_ROUTE_TREE":return{...e,isRouteTreeCollapsed:!e.isRouteTreeCollapsed};case"SET_LOCALE":return{...e,locale:t.locale};case"ENTER_BASE_EDIT":return{...e,editMode:"base",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__base__/${t.layoutName}`,layoutName:t.layoutName}};case"EXIT_BASE_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_MODAL_EDIT":return{...e,editMode:"modal",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__modal__/${t.modalId}`,layoutName:t.hostLayout}};case"EXIT_MODAL_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_EXTENSION_EDIT":return{...e,editMode:"extension",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__extension__/${t.extensionId}`,layoutName:t.extensionHost??null}};case"SET_RETURN_ROUTE":return e.editMode==="route"||e.returnRoute!==null?e:{...e,returnRoute:t.route};case"EXIT_EXTENSION_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_ITERATION_ITEM_EDIT":return{...e,editMode:"iteration_item",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,returnEditMode:e.ediLine truncated
var Rz=Object.defineProperty;var eM=(ln,i,u)=>i in ln?Rz(ln,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):ln[i]=u;var Ii=(ln,i,u)=>eM(ln,typeof i!="symbol"?i+"":i,u);(function(ln,i,u,Sn){"use strict";function Lt(){const e=typeof window<"u"?window.G7Core?.__runtime:void 0;if(!e)throw new Error("[layout-editor] window.G7Core.__runtime 이 없습니다. 코어 번들(template-engine.min.js)이 편집기 번들보다 먼저 로드되어야 합니다.");return e}const Ai=Lt();Ai.TranslationProvider;const tt=Ai.useTranslation;Ai.TranslationReactContext;function rt(){return typeof window>"u"?null:window.__g7Devtools??null}function wl(e,t){const n=rt();if(!n?.trackEditorState)return;const o={templateIdentifier:e.templateIdentifier,editMode:e.editMode,selectedRoutePath:e.selectedRoute?.path??null,selectedLayoutName:e.selectedRoute?.layoutName??null,routeTreeSize:e.routeTree.length,isRouteTreeCollapsed:e.isRouteTreeCollapsed,locale:e.locale,previewDevice:e.previewDevice,previewZoom:e.previewZoom,lastAction:t,timestamp:Date.now()};try{n.trackEditorState(o)}catch{}}function Bh(){const e=rt();if(e?.clearEditorStateData)try{e.clearEditorStateData()}catch{}}function Wh(e){const t=rt();if(t?.trackEditorSampleMatch)try{t.trackEditorSampleMatch(e)}catch{}}function jh(){const e=rt();if(e?.clearEditorSampleData)try{e.clearEditorSampleData()}catch{}}function Hh(e){const t=rt();if(t?.trackEditorHistoryEntry)try{t.trackEditorHistoryEntry(e)}catch{}}function Fh(){const e=rt();if(e?.clearEditorHistoryData)try{e.clearEditorHistoryData()}catch{}}function kl(e){const t=rt();if(t?.trackEditorSelection)try{t.trackEditorSelection(e)}catch{}}function Kh(){const e=rt();if(e?.clearEditorSelectionData)try{e.clearEditorSelectionData()}catch{}}function or(e){const t=rt();if(t?.trackEditorPropertyPatch)try{t.trackEditorPropertyPatch(e)}catch{}}function Cn(e){const t=rt();if(t?.trackEditorDnd)try{t.trackEditorDnd(e)}catch{}}function Vh(){const e=rt();if(e?.clearEditorDndData)try{e.clearEditorDndData()}catch{}}function st(e){const t=rt();if(t?.trackEditorDocument)try{t.trackEditorDocument(e)}catch{}}function Uh(){const e=rt();if(e?.clearEditorDocumentData)try{e.clearEditorDocumentData()}catch{}}function qh(e){const t=rt();if(t?.trackEditorSpecMerge)try{t.trackEditorSpecMerge(e)}catch{}}function Gh(){const e=rt();if(e?.clearEditorSpecMergeData)try{e.clearEditorSpecMergeData()}catch{}}function Ti(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return t}function Et(e){const t=rt();if(t?.trackEditorI18n)try{t.trackEditorI18n(e)}catch{}}function Yh(){const e=rt();if(e?.clearEditorI18nData)try{e.clearEditorI18nData()}catch{}}function Sl(e){const t=rt();if(t?.trackPageState)try{t.trackPageState(e)}catch{}}function Xh(){const e=rt();if(e?.clearPageStateData)try{e.clearPageStateData()}catch{}}const Cl="g7le.routeTree.collapsed";function Jh(){if(typeof window>"u")return!1;try{return window.localStorage?.getItem(Cl)==="1"}catch{return!1}}function Zh(e){if(!(typeof window>"u"))try{window.localStorage?.setItem(Cl,e?"1":"0")}catch{}}function Qh(e,t){return{templateIdentifier:e,routeTree:[],routesError:null,selectedRoute:null,isRouteTreeCollapsed:Jh(),editMode:"route",returnRoute:null,returnEditMode:null,locale:t,previewDevice:"desktop",previewZoom:1,previewCustomWidth:1024,previewColorScheme:"light",history:{canUndo:!1,canRedo:!1},isPaletteOpen:!1,availableStates:[],activeStateId:null,layoutVersions:{},extensionVersions:{}}}function Rh(e,t){switch(t.type){case"SET_ROUTE_TREE":return{...e,routeTree:t.tree,routesError:null};case"SET_ROUTES_ERROR":return{...e,routesError:t.error};case"SELECT_ROUTE":return{...e,editMode:"route",selectedRoute:t.route,returnRoute:null,returnEditMode:null};case"TOGGLE_ROUTE_TREE":return{...e,isRouteTreeCollapsed:!e.isRouteTreeCollapsed};case"SET_LOCALE":return{...e,locale:t.locale};case"ENTER_BASE_EDIT":return{...e,editMode:"base",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__base__/${t.layoutName}`,layoutName:t.layoutName}};case"EXIT_BASE_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_MODAL_EDIT":return{...e,editMode:"modal",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__modal__/${t.modalId}`,layoutName:t.hostLayout}};case"EXIT_MODAL_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_EXTENSION_EDIT":return{...e,editMode:"extension",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,selectedRoute:{path:`__extension__/${t.extensionId}`,layoutName:t.extensionHost??null}};case"SET_RETURN_ROUTE":return e.editMode==="route"||e.returnRoute!==null?e:{...e,returnRoute:t.route};case"EXIT_EXTENSION_EDIT":return{...e,editMode:"route",selectedRoute:e.returnRoute,returnRoute:null};case"ENTER_ITERATION_ITEM_EDIT":return{...e,editMode:"iteration_item",returnRoute:t.returnRoute!==void 0?t.returnRoute:e.selectedRoute,returnEditMode:e.ediLine truncated
"keyword": "",
"page": 1
}`,shapeErrorKey:"layout_editor.json_block.must_be_object",validate:_=>{const S=Object.keys(_??{}).filter(E=>!$s(E));return S.length?a("layout_editor.json_block.invalid_keys",{keys:S.join(", ")}):null}}):i.jsxs(i.Fragment,{children:[v.length===0?i.jsx("p",{"data-testid":`g7le-initstate-${e}-empty`,style:ES,children:a("layout_editor.initstate.no_values")}):v.map(_=>{const E=Ew(b,r,_)==="inherited",C=e==="isolated"&&l[_];return i.jsx(aS,{scope:e,itemKey:_,value:o[_],inherited:E,isOrphan:!!C,onChangeValue:N=>x(_,N),onRemove:()=>k(_),t:a},_)}),i.jsxs("div",{style:xS,children:[i.jsx("input",{type:"text","data-testid":`g7le-initstate-${e}-add-name`,value:d,placeholder:a("layout_editor.initstate.value_name"),onChange:_=>{c(_.target.value),y&&g(null)},onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),w())},"aria-invalid":y?!0:void 0,style:{...wS,...y?kS:null}}),i.jsx("select",{"data-testid":`g7le-initstate-${e}-add-kind`,value:p,onChange:_=>f(_.target.value),"aria-label":a("layout_editor.initstate.value_kind"),style:CS,children:iS.map(_=>i.jsx("option",{value:_.kind,children:a(_.labelKey)},_.kind))}),i.jsxs("button",{type:"button","data-testid":`g7le-initstate-${e}-add`,onClick:w,style:$S,children:["+ ",a("layout_editor.initstate.add_value")]})]}),y?i.jsx("p",{"data-testid":`g7le-initstate-${e}-add-error`,style:SS,children:y}):null]})]})}function aS({scope:e,itemKey:t,value:n,inherited:o,isOrphan:r,onChangeValue:s,onRemove:a,t:l}){const[d,c]=u.useState(!1);let p;try{p=JSON.stringify(n,null,2)??String(n)}catch{p=String(n)}return i.jsxs("div",{"data-testid":`g7le-initstate-${e}-item-${t}`,style:yS,children:[i.jsxs("div",{style:bS,children:[o?i.jsx("span",{"data-testid":`g7le-initstate-inherited-${t}`,style:mS,children:"🔗"}):null,i.jsx("code",{style:vS,children:t}),i.jsx("span",{style:{flex:1}}),i.jsx("button",{type:"button","data-testid":`g7le-initstate-code-${t}`,onClick:()=>c(f=>!f),style:Ws,"aria-label":l("layout_editor.value_tree.show_source"),title:l("layout_editor.value_tree.show_source"),children:"</>"}),o?i.jsx("button",{type:"button","data-testid":`g7le-initstate-revert-${t}`,onClick:a,style:Ws,children:l("layout_editor.initstate.revert")}):i.jsx("button",{type:"button","data-testid":`g7le-initstate-remove-${t}`,onClick:a,style:Ws,"aria-label":l("layout_editor.init_actions.remove"),children:"✕"})]}),d?i.jsx("pre",{"data-testid":`g7le-initstate-code-block-${t}`,style:AS,children:p}):null,i.jsx(Dn,{value:n,onChange:s,t:l,path:t,scope:e}),r?i.jsxs("p",{"data-testid":`g7le-initstate-isolated-orphan-${t}`,style:_S,children:["⚠ ",l("layout_editor.initstate.isolated_orphan")]}):null]})}const lS={display:"flex",flexDirection:"column",gap:14,minWidth:0},dS={margin:0,fontSize:13,fontWeight:700,color:"#0f172a"},cS={margin:0,fontSize:11,color:"#1d4ed8",background:"#eff6ff",padding:"6px 8px",borderRadius:6},uS={display:"flex",flexDirection:"column",gap:8,padding:10,border:"1px solid #e2e8f0",borderRadius:10,minWidth:0},pS={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},fS={fontSize:12,fontWeight:700,color:"#475569"},gS={margin:0,fontSize:11,color:"#94a3b8"},hS={padding:"2px 8px",fontSize:11,border:"1px solid #cbd5e1",borderRadius:6,background:"#fff",color:"#475569",cursor:"pointer"},yS={display:"flex",flexDirection:"column",gap:4,padding:"6px 8px",border:"1px solid #f1f5f9",borderRadius:6,minWidth:0},bS={display:"flex",alignItems:"center",gap:6},mS={fontSize:12},vS={fontSize:12,color:"#0f172a",fontFamily:"monospace"},Ws={border:"1px solid #cbd5e1",borderRadius:6,background:"#fff",color:"#475569",cursor:"pointer",fontSize:11,padding:"2px 6px"},_S={margin:0,fontSize:11,color:"#b45309",background:"#fef3c7",padding:"4px 6px",borderRadius:6},xS={display:"flex",gap:6,alignItems:"center"},wS={padding:"4px 8px",fontSize:12,border:"1px solid #cbd5e1",borderRadius:6},kS={border:"1px solid #dc2626"},SS={margin:0,fontSize:11,color:"#dc2626"},CS={padding:"4px 8px",fontSize:12,border:"1px solid #cbd5e1",borderRadius:6,background:"#fff",color:"#0f172a"},$S={padding:"2px 10px",fontSize:11,border:"1px dashed #94a3b8",borderRadius:6,background:"#fff",color:"#475569",cursor:"pointer"},ES={margin:0,fontSize:12,color:"#94a3b8"},IS={margin:0,fontSize:11,color:"#94a3b8"},AS={margin:"2px 0",padding:"6px 8px",fontSize:11,fontFamily:"monospace",color:"#0f172a",background:"#f1f5f9",border:"1px solid #e2e8f0",borderRadius:6,whiteSpace:"pre-wrap",wordBreak:"break-all",overflowX:"auto"},TS={self:"layout_editor.error_rows.source_self",inherited:"layout_editor.error_rows.source_inherited",template:"layout_editor.error_rows.source_template",none:"layout_editor.error_rows.source_none"};function js({value:e,onChange:t,t:n,codes:o,mode:r="local",sourceOf:s,renderActionList:a,testIdPrefix:l="g7le-error-rows"}){const d=o??Object.keys(e),c=u.useCallback((f,y)=>{t({...e,[f]:y})},[e,t]),p=u.useCallback(f=>{const y={...e};delete y[f],t(y)},[e,t]);return i.jsx("div",{className:l,"data-testid":l,children:d.map(f=>{const y=e[f],g= Line truncated
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"layout-editor.min.js","sources":["../../../resources/js/core/template-engine/layout-editor/__runtime-shims/runtime.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/TranslationContext.ts","../../../resources/js/core/template-engine/layout-editor/devtools/editorTrackers.ts","../../../resources/js/core/template-engine/layout-editor/LayoutEditorContext.tsx","../../../resources/js/core/template-engine/layout-editor/LayoutDocumentContext.tsx","../../../resources/js/core/template-engine/layout-editor/EditorModalContext.tsx","../../../resources/js/core/template-engine/layout-editor/components/EditorToolbar.tsx","../../../resources/js/core/template-engine/layout-editor/utils/authToken.ts","../../../resources/js/core/template-engine/layout-editor/utils/layoutAttachments.ts","../../../resources/js/core/template-engine/layout-editor/components/property-controls/LayoutAttachmentManager.tsx","../../../resources/js/core/template-engine/layout-editor/utils/customTranslations.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/TranslationEngine.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/Logger.ts","../../../resources/js/core/template-engine/layout-editor/spec/editorSpecLoader.ts","../../../resources/js/core/template-engine/layout-editor/spec/bindingCandidates.ts","../../../resources/js/core/template-engine/layout-editor/spec/inlineBindingUtils.ts","../../../resources/js/core/template-engine/layout-editor/utils/layoutTreeUtils.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useInlineEdit.ts","../../../resources/js/core/template-engine/layout-editor/hooks/pendingCustomTranslations.ts","../../../resources/js/core/template-engine/layout-editor/components/LocaleSwitcher.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/PlaceholderChipInput.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/CustomTranslationManager.tsx","../../../resources/js/core/template-engine/layout-editor/hooks/usePageSettings.ts","../../../resources/js/core/template-engine/layout-editor/sample-data/sampleDataProvider.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/DataBindingEngine.ts","../../../resources/js/core/template-engine/layout-editor/spec/computedRecipeEngine.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useBindingCandidates.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useSeoBindingCandidates.ts","../../../resources/js/core/template-engine/layout-editor/spec/candidatePools.ts","../../../resources/js/core/template-engine/layout-editor/spec/actionRecipeEngine.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useCustomTranslation.ts","../../../resources/js/core/template-engine/layout-editor/components/property-controls/inlineBindingApi.ts","../../../resources/js/core/template-engine/layout-editor/components/property-controls/TranslationField.tsx","../../../resources/js/core/template-engine/layout-editor/components/shared/FloatingDropdown.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/InlineBindingScalarPicker.tsx","../../../resources/js/core/template-engine/layout-editor/spec/expressionValueTree.ts","../../../resources/js/core/template-engine/layout-editor/components/DropLine.tsx","../../../resources/js/core/template-engine/layout-editor/hooks/useListDragReorder.ts","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SegmentedValueEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/ConditionalValueEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/I18nTextField.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/TagInputControl.tsx","../../../resources/js/core/template-engine/layout-editor/spec/widgetRegistry.ts","../../../resources/js/core/template-engine/layout-editor/components/page-settings/MetaForm.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/FormPrimitives.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/BindingChipTextInput.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/DataChipValueInput.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/KeyValueChipEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoOgForm.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoStructuredDataEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoVarsEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoBotPreviewPanel.tsx","../../..Line truncated
{"version":3,"file":"layout-editor.min.js","sources":["../../../resources/js/core/template-engine/layout-editor/__runtime-shims/runtime.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/TranslationContext.ts","../../../resources/js/core/template-engine/layout-editor/devtools/editorTrackers.ts","../../../resources/js/core/template-engine/layout-editor/LayoutEditorContext.tsx","../../../resources/js/core/template-engine/layout-editor/LayoutDocumentContext.tsx","../../../resources/js/core/template-engine/layout-editor/EditorModalContext.tsx","../../../resources/js/core/template-engine/layout-editor/components/EditorToolbar.tsx","../../../resources/js/core/template-engine/layout-editor/utils/authToken.ts","../../../resources/js/core/template-engine/layout-editor/utils/layoutAttachments.ts","../../../resources/js/core/template-engine/layout-editor/components/property-controls/LayoutAttachmentManager.tsx","../../../resources/js/core/template-engine/layout-editor/utils/customTranslations.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/TranslationEngine.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/Logger.ts","../../../resources/js/core/template-engine/layout-editor/spec/editorSpecLoader.ts","../../../resources/js/core/template-engine/layout-editor/spec/bindingCandidates.ts","../../../resources/js/core/template-engine/layout-editor/spec/inlineBindingUtils.ts","../../../resources/js/core/template-engine/layout-editor/utils/layoutTreeUtils.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useInlineEdit.ts","../../../resources/js/core/template-engine/layout-editor/hooks/pendingCustomTranslations.ts","../../../resources/js/core/template-engine/layout-editor/components/LocaleSwitcher.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/PlaceholderChipInput.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/CustomTranslationManager.tsx","../../../resources/js/core/template-engine/layout-editor/hooks/usePageSettings.ts","../../../resources/js/core/template-engine/layout-editor/sample-data/sampleDataProvider.ts","../../../resources/js/core/template-engine/layout-editor/__runtime-shims/DataBindingEngine.ts","../../../resources/js/core/template-engine/layout-editor/spec/computedRecipeEngine.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useBindingCandidates.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useSeoBindingCandidates.ts","../../../resources/js/core/template-engine/layout-editor/spec/candidatePools.ts","../../../resources/js/core/template-engine/layout-editor/spec/actionRecipeEngine.ts","../../../resources/js/core/template-engine/layout-editor/hooks/useCustomTranslation.ts","../../../resources/js/core/template-engine/layout-editor/components/property-controls/inlineBindingApi.ts","../../../resources/js/core/template-engine/layout-editor/components/property-controls/TranslationField.tsx","../../../resources/js/core/template-engine/layout-editor/components/shared/FloatingDropdown.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/InlineBindingScalarPicker.tsx","../../../resources/js/core/template-engine/layout-editor/spec/expressionValueTree.ts","../../../resources/js/core/template-engine/layout-editor/components/DropLine.tsx","../../../resources/js/core/template-engine/layout-editor/hooks/useListDragReorder.ts","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SegmentedValueEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/ConditionalValueEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/I18nTextField.tsx","../../../resources/js/core/template-engine/layout-editor/components/property-controls/TagInputControl.tsx","../../../resources/js/core/template-engine/layout-editor/spec/widgetRegistry.ts","../../../resources/js/core/template-engine/layout-editor/components/page-settings/MetaForm.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/FormPrimitives.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/BindingChipTextInput.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/DataChipValueInput.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/KeyValueChipEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoOgForm.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoStructuredDataEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoVarsEditor.tsx","../../../resources/js/core/template-engine/layout-editor/components/page-settings/SeoBotPreviewPanel.tsx","../../..Line truncated
+22 -22
View File
@@ -1,4 +1,4 @@
var tx=Object.defineProperty;var nx=(Vt,Ka,Wa)=>Ka in Vt?tx(Vt,Ka,{enumerable:!0,configurable:!0,writable:!0,value:Wa}):Vt[Ka]=Wa;var $=(Vt,Ka,Wa)=>nx(Vt,typeof Ka!="symbol"?Ka+"":Ka,Wa);(function(Vt){"use strict";function Ka(l,e){for(var a=0;a<e.length;a++){const r=e[a];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in l)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(l,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}function Wa(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var zu={exports:{}},Fe={};/**
var ex=Object.defineProperty;var tx=(Gt,Ka,Wa)=>Ka in Gt?ex(Gt,Ka,{enumerable:!0,configurable:!0,writable:!0,value:Wa}):Gt[Ka]=Wa;var $=(Gt,Ka,Wa)=>tx(Gt,typeof Ka!="symbol"?Ka+"":Ka,Wa);(function(Gt){"use strict";function Ka(l,e){for(var a=0;a<e.length;a++){const r=e[a];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in l)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(l,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}function Wa(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var zu={exports:{}},Fe={};/**
* @license React
* react.production.js
*
@@ -6,7 +6,7 @@ var tx=Object.defineProperty;var nx=(Vt,Ka,Wa)=>Ka in Vt?tx(Vt,Ka,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var dg;function iS(){if(dg)return Fe;dg=1;var l=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function E(x){return x===null||typeof x!="object"?null:(x=v&&x[v]||x["@@iterator"],typeof x=="function"?x:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,T={};function D(x,F,ue){this.props=x,this.context=F,this.refs=T,this.updater=ue||S}D.prototype.isReactComponent={},D.prototype.setState=function(x,F){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,F,"setState")},D.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function M(){}M.prototype=D.prototype;function O(x,F,ue){this.props=x,this.context=F,this.refs=T,this.updater=ue||S}var L=O.prototype=new M;L.constructor=O,A(L,D.prototype),L.isPureReactComponent=!0;var P=Array.isArray;function U(){}var B={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function ge(x,F,ue){var fe=ue.ref;return{$$typeof:l,type:x,key:F,ref:fe!==void 0?fe:null,props:ue}}function Ae(x,F){return ge(x.type,F,x.props)}function Oe(x){return typeof x=="object"&&x!==null&&x.$$typeof===l}function Ne(x){var F={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(ue){return F[ue]})}var He=/\/+/g;function Ze(x,F){return typeof x=="object"&&x!==null&&x.key!=null?Ne(""+x.key):F.toString(36)}function pt(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(U,U):(x.status="pending",x.then(function(F){x.status==="pending"&&(x.status="fulfilled",x.value=F)},function(F){x.status==="pending"&&(x.status="rejected",x.reason=F)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function Q(x,F,ue,fe,te){var ye=typeof x;(ye==="undefined"||ye==="boolean")&&(x=null);var je=!1;if(x===null)je=!0;else switch(ye){case"bigint":case"string":case"number":je=!0;break;case"object":switch(x.$$typeof){case l:case e:je=!0;break;case m:return je=x._init,Q(je(x._payload),F,ue,fe,te)}}if(je)return te=te(x),je=fe===""?"."+Ze(x,0):fe,P(te)?(ue="",je!=null&&(ue=je.replace(He,"$&/")+"/"),Q(te,F,ue,"",function(Ie){return Ie})):te!=null&&(Oe(te)&&(te=Ae(te,ue+(te.key==null||x&&x.key===te.key?"":(""+te.key).replace(He,"$&/")+"/")+je)),F.push(te)),1;je=0;var Me=fe===""?".":fe+":";if(P(x))for(var Pe=0;Pe<x.length;Pe++)fe=x[Pe],ye=Me+Ze(fe,Pe),je+=Q(fe,F,ue,ye,te);else if(Pe=E(x),typeof Pe=="function")for(x=Pe.call(x),Pe=0;!(fe=x.next()).done;)fe=fe.value,ye=Me+Ze(fe,Pe++),je+=Q(fe,F,ue,ye,te);else if(ye==="object"){if(typeof x.then=="function")return Q(pt(x),F,ue,fe,te);throw F=String(x),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return je}function de(x,F,ue){if(x==null)return x;var fe=[],te=0;return Q(x,fe,"","",function(ye){return F.call(ue,ye,te++)}),fe}function me(x){if(x._status===-1){var F=x._result;F=F(),F.then(function(ue){(x._status===0||x._status===-1)&&(x._status=1,x._result=ue)},function(ue){(x._status===0||x._status===-1)&&(x._status=2,x._result=ue)}),x._status===-1&&(x._status=0,x._result=F)}if(x._status===1)return x._result.default;throw x._result}var ne=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},pe={map:de,forEach:function(x,F,ue){de(x,function(){F.apply(this,arguments)},ue)},count:function(x){var F=0;return de(x,function(){F++}),F},toArray:function(x){return de(x,function(F){return F})||[]},only:function(x){if(!Oe(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Fe.Activity=b,Fe.Children=pe,Fe.Component=D,Fe.Fragment=a,Fe.Profiler=i,Fe.PureComponent=O,Fe.StrictMode=r,Fe.Suspense=f,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(x){return B.H.useMemoCache(x)}},Fe.cache=function(x){return function(){return x.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Line truncated
*/var dg;function rS(){if(dg)return Fe;dg=1;var l=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function E(x){return x===null||typeof x!="object"?null:(x=v&&x[v]||x["@@iterator"],typeof x=="function"?x:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,T={};function D(x,F,ue){this.props=x,this.context=F,this.refs=T,this.updater=ue||S}D.prototype.isReactComponent={},D.prototype.setState=function(x,F){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,F,"setState")},D.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function M(){}M.prototype=D.prototype;function O(x,F,ue){this.props=x,this.context=F,this.refs=T,this.updater=ue||S}var L=O.prototype=new M;L.constructor=O,A(L,D.prototype),L.isPureReactComponent=!0;var P=Array.isArray;function U(){}var B={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function ge(x,F,ue){var fe=ue.ref;return{$$typeof:l,type:x,key:F,ref:fe!==void 0?fe:null,props:ue}}function Ae(x,F){return ge(x.type,F,x.props)}function Oe(x){return typeof x=="object"&&x!==null&&x.$$typeof===l}function Ne(x){var F={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(ue){return F[ue]})}var He=/\/+/g;function Ze(x,F){return typeof x=="object"&&x!==null&&x.key!=null?Ne(""+x.key):F.toString(36)}function pt(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(U,U):(x.status="pending",x.then(function(F){x.status==="pending"&&(x.status="fulfilled",x.value=F)},function(F){x.status==="pending"&&(x.status="rejected",x.reason=F)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function J(x,F,ue,fe,te){var ye=typeof x;(ye==="undefined"||ye==="boolean")&&(x=null);var je=!1;if(x===null)je=!0;else switch(ye){case"bigint":case"string":case"number":je=!0;break;case"object":switch(x.$$typeof){case l:case e:je=!0;break;case m:return je=x._init,J(je(x._payload),F,ue,fe,te)}}if(je)return te=te(x),je=fe===""?"."+Ze(x,0):fe,P(te)?(ue="",je!=null&&(ue=je.replace(He,"$&/")+"/"),J(te,F,ue,"",function(Ie){return Ie})):te!=null&&(Oe(te)&&(te=Ae(te,ue+(te.key==null||x&&x.key===te.key?"":(""+te.key).replace(He,"$&/")+"/")+je)),F.push(te)),1;je=0;var Me=fe===""?".":fe+":";if(P(x))for(var Pe=0;Pe<x.length;Pe++)fe=x[Pe],ye=Me+Ze(fe,Pe),je+=J(fe,F,ue,ye,te);else if(Pe=E(x),typeof Pe=="function")for(x=Pe.call(x),Pe=0;!(fe=x.next()).done;)fe=fe.value,ye=Me+Ze(fe,Pe++),je+=J(fe,F,ue,ye,te);else if(ye==="object"){if(typeof x.then=="function")return J(pt(x),F,ue,fe,te);throw F=String(x),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return je}function de(x,F,ue){if(x==null)return x;var fe=[],te=0;return J(x,fe,"","",function(ye){return F.call(ue,ye,te++)}),fe}function me(x){if(x._status===-1){var F=x._result;F=F(),F.then(function(ue){(x._status===0||x._status===-1)&&(x._status=1,x._result=ue)},function(ue){(x._status===0||x._status===-1)&&(x._status=2,x._result=ue)}),x._status===-1&&(x._status=0,x._result=F)}if(x._status===1)return x._result.default;throw x._result}var ne=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},pe={map:de,forEach:function(x,F,ue){de(x,function(){F.apply(this,arguments)},ue)},count:function(x){var F=0;return de(x,function(){F++}),F},toArray:function(x){return de(x,function(F){return F})||[]},only:function(x){if(!Oe(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Fe.Activity=b,Fe.Children=pe,Fe.Component=D,Fe.Fragment=a,Fe.Profiler=i,Fe.PureComponent=O,Fe.StrictMode=r,Fe.Suspense=f,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(x){return B.H.useMemoCache(x)}},Fe.cache=function(x){return function(){return x.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Line truncated
* @license React
* scheduler.production.js
*
@@ -14,7 +14,7 @@ var tx=Object.defineProperty;var nx=(Vt,Ka,Wa)=>Ka in Vt?tx(Vt,Ka,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var hg;function sS(){return hg||(hg=1,(function(l){function e(Q,de){var me=Q.length;Q.push(de);e:for(;0<me;){var ne=me-1>>>1,pe=Q[ne];if(0<i(pe,de))Q[ne]=de,Q[me]=pe,me=ne;else break e}}function a(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var de=Q[0],me=Q.pop();if(me!==de){Q[0]=me;e:for(var ne=0,pe=Q.length,x=pe>>>1;ne<x;){var F=2*(ne+1)-1,ue=Q[F],fe=F+1,te=Q[fe];if(0>i(ue,me))fe<pe&&0>i(te,ue)?(Q[ne]=te,Q[fe]=me,ne=fe):(Q[ne]=ue,Q[F]=me,ne=F);else if(fe<pe&&0>i(te,me))Q[ne]=te,Q[fe]=me,ne=fe;else break e}}return de}function i(Q,de){var me=Q.sortIndex-de.sortIndex;return me!==0?me:Q.id-de.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;l.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();l.unstable_now=function(){return u.now()-d}}var f=[],g=[],m=1,b=null,v=3,E=!1,S=!1,A=!1,T=!1,D=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function L(Q){for(var de=a(g);de!==null;){if(de.callback===null)r(g);else if(de.startTime<=Q)r(g),de.sortIndex=de.expirationTime,e(f,de);else break;de=a(g)}}function P(Q){if(A=!1,L(Q),!S)if(a(f)!==null)S=!0,U||(U=!0,Ne());else{var de=a(g);de!==null&&pt(P,de.startTime-Q)}}var U=!1,B=-1,Y=5,ge=-1;function Ae(){return T?!0:!(l.unstable_now()-ge<Y)}function Oe(){if(T=!1,U){var Q=l.unstable_now();ge=Q;var de=!0;try{e:{S=!1,A&&(A=!1,M(B),B=-1),E=!0;var me=v;try{t:{for(L(Q),b=a(f);b!==null&&!(b.expirationTime>Q&&Ae());){var ne=b.callback;if(typeof ne=="function"){b.callback=null,v=b.priorityLevel;var pe=ne(b.expirationTime<=Q);if(Q=l.unstable_now(),typeof pe=="function"){b.callback=pe,L(Q),de=!0;break t}b===a(f)&&r(f),L(Q)}else r(f);b=a(f)}if(b!==null)de=!0;else{var x=a(g);x!==null&&pt(P,x.startTime-Q),de=!1}}break e}finally{b=null,v=me,E=!1}de=void 0}}finally{de?Ne():U=!1}}}var Ne;if(typeof O=="function")Ne=function(){O(Oe)};else if(typeof MessageChannel<"u"){var He=new MessageChannel,Ze=He.port2;He.port1.onmessage=Oe,Ne=function(){Ze.postMessage(null)}}else Ne=function(){D(Oe,0)};function pt(Q,de){B=D(function(){Q(l.unstable_now())},de)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(Q){Q.callback=null},l.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<Q?Math.floor(1e3/Q):5},l.unstable_getCurrentPriorityLevel=function(){return v},l.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var de=3;break;default:de=v}var me=v;v=de;try{return Q()}finally{v=me}},l.unstable_requestPaint=function(){T=!0},l.unstable_runWithPriority=function(Q,de){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var me=v;v=Q;try{return de()}finally{v=me}},l.unstable_scheduleCallback=function(Q,de,me){var ne=l.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?ne+me:ne):me=ne,Q){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=me+pe,Q={id:m++,callback:de,priorityLevel:Q,startTime:me,expirationTime:pe,sortIndex:-1},me>ne?(Q.sortIndex=me,e(g,Q),a(f)===null&&Q===a(g)&&(A?(M(B),B=-1):A=!0,pt(P,me-ne))):(Q.sortIndex=pe,e(f,Q),S||E||(S=!0,U||(U=!0,Ne()))),Q},l.unstable_shouldYield=Ae,l.unstable_wrapCallback=function(Q){var de=v;return function(){var me=v;v=de;try{return Q.apply(this,arguments)}finally{v=me}}}})(Bu)),Bu}var gg;function oS(){return gg||(gg=1,Uu.exports=sS()),Uu.exports}var qu={exports:{}},pn={};/**
*/var hg;function iS(){return hg||(hg=1,(function(l){function e(J,de){var me=J.length;J.push(de);e:for(;0<me;){var ne=me-1>>>1,pe=J[ne];if(0<i(pe,de))J[ne]=de,J[me]=pe,me=ne;else break e}}function a(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var de=J[0],me=J.pop();if(me!==de){J[0]=me;e:for(var ne=0,pe=J.length,x=pe>>>1;ne<x;){var F=2*(ne+1)-1,ue=J[F],fe=F+1,te=J[fe];if(0>i(ue,me))fe<pe&&0>i(te,ue)?(J[ne]=te,J[fe]=me,ne=fe):(J[ne]=ue,J[F]=me,ne=F);else if(fe<pe&&0>i(te,me))J[ne]=te,J[fe]=me,ne=fe;else break e}}return de}function i(J,de){var me=J.sortIndex-de.sortIndex;return me!==0?me:J.id-de.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;l.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();l.unstable_now=function(){return u.now()-d}}var f=[],g=[],m=1,b=null,v=3,E=!1,S=!1,A=!1,T=!1,D=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function L(J){for(var de=a(g);de!==null;){if(de.callback===null)r(g);else if(de.startTime<=J)r(g),de.sortIndex=de.expirationTime,e(f,de);else break;de=a(g)}}function P(J){if(A=!1,L(J),!S)if(a(f)!==null)S=!0,U||(U=!0,Ne());else{var de=a(g);de!==null&&pt(P,de.startTime-J)}}var U=!1,B=-1,Y=5,ge=-1;function Ae(){return T?!0:!(l.unstable_now()-ge<Y)}function Oe(){if(T=!1,U){var J=l.unstable_now();ge=J;var de=!0;try{e:{S=!1,A&&(A=!1,M(B),B=-1),E=!0;var me=v;try{t:{for(L(J),b=a(f);b!==null&&!(b.expirationTime>J&&Ae());){var ne=b.callback;if(typeof ne=="function"){b.callback=null,v=b.priorityLevel;var pe=ne(b.expirationTime<=J);if(J=l.unstable_now(),typeof pe=="function"){b.callback=pe,L(J),de=!0;break t}b===a(f)&&r(f),L(J)}else r(f);b=a(f)}if(b!==null)de=!0;else{var x=a(g);x!==null&&pt(P,x.startTime-J),de=!1}}break e}finally{b=null,v=me,E=!1}de=void 0}}finally{de?Ne():U=!1}}}var Ne;if(typeof O=="function")Ne=function(){O(Oe)};else if(typeof MessageChannel<"u"){var He=new MessageChannel,Ze=He.port2;He.port1.onmessage=Oe,Ne=function(){Ze.postMessage(null)}}else Ne=function(){D(Oe,0)};function pt(J,de){B=D(function(){J(l.unstable_now())},de)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(J){J.callback=null},l.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<J?Math.floor(1e3/J):5},l.unstable_getCurrentPriorityLevel=function(){return v},l.unstable_next=function(J){switch(v){case 1:case 2:case 3:var de=3;break;default:de=v}var me=v;v=de;try{return J()}finally{v=me}},l.unstable_requestPaint=function(){T=!0},l.unstable_runWithPriority=function(J,de){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var me=v;v=J;try{return de()}finally{v=me}},l.unstable_scheduleCallback=function(J,de,me){var ne=l.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?ne+me:ne):me=ne,J){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=me+pe,J={id:m++,callback:de,priorityLevel:J,startTime:me,expirationTime:pe,sortIndex:-1},me>ne?(J.sortIndex=me,e(g,J),a(f)===null&&J===a(g)&&(A?(M(B),B=-1):A=!0,pt(P,me-ne))):(J.sortIndex=pe,e(f,J),S||E||(S=!0,U||(U=!0,Ne()))),J},l.unstable_shouldYield=Ae,l.unstable_wrapCallback=function(J){var de=v;return function(){var me=v;v=de;try{return J.apply(this,arguments)}finally{v=me}}}})(Bu)),Bu}var gg;function sS(){return gg||(gg=1,Uu.exports=iS()),Uu.exports}var qu={exports:{}},gn={};/**
* @license React
* react-dom.production.js
*
@@ -22,7 +22,7 @@ var tx=Object.defineProperty;var nx=(Vt,Ka,Wa)=>Ka in Vt?tx(Vt,Ka,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var pg;function lS(){if(pg)return pn;pg=1;var l=Iu();function e(f){var g="https://react.dev/errors/"+f;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)g+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(e(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,g,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:b==null?null:""+b,children:f,containerInfo:g,implementation:m}}var u=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,g){if(f==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pn.createPortal=function(f,g){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return o(f,g,null,m)},pn.flushSync=function(f){var g=u.T,m=r.p;try{if(u.T=null,r.p=2,f)return f()}finally{u.T=g,r.p=m,r.d.f()}},pn.preconnect=function(f,g){typeof f=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(f,g))},pn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},pn.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var m=g.as,b=d(m,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,E=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;m==="style"?r.d.S(f,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:E}):m==="script"&&r.d.X(f,{crossOrigin:b,integrity:v,fetchPriority:E,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},pn.preinitModule=function(f,g){if(typeof f=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var m=d(g.as,g.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(f)},pn.preload=function(f,g){if(typeof f=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var m=g.as,b=d(m,g.crossOrigin);r.d.L(f,m,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},pn.preloadModule=function(f,g){if(typeof f=="string")if(g){var m=d(g.as,g.crossOrigin);r.d.m(f,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(f)},pn.requestFormReset=function(f){r.d.r(f)},pn.unstable_batchedUpdates=function(f,g){return f(g)},pn.useFormState=function(f,g,m){return u.H.useFormState(f,g,m)},pn.useFormStatus=function(){return u.H.useHostTransitionStatus()},pn.version="19.2.0",pn}var mg;function yg(){if(mg)return qu.exports;mg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(e){console.error(e)}}return l(),qu.exports=lS(),qu.exports}/**
*/var pg;function oS(){if(pg)return gn;pg=1;var l=Iu();function e(f){var g="https://react.dev/errors/"+f;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)g+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(e(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,g,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:b==null?null:""+b,children:f,containerInfo:g,implementation:m}}var u=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,g){if(f==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,gn.createPortal=function(f,g){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return o(f,g,null,m)},gn.flushSync=function(f){var g=u.T,m=r.p;try{if(u.T=null,r.p=2,f)return f()}finally{u.T=g,r.p=m,r.d.f()}},gn.preconnect=function(f,g){typeof f=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(f,g))},gn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},gn.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var m=g.as,b=d(m,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,E=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;m==="style"?r.d.S(f,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:E}):m==="script"&&r.d.X(f,{crossOrigin:b,integrity:v,fetchPriority:E,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},gn.preinitModule=function(f,g){if(typeof f=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var m=d(g.as,g.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(f)},gn.preload=function(f,g){if(typeof f=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var m=g.as,b=d(m,g.crossOrigin);r.d.L(f,m,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},gn.preloadModule=function(f,g){if(typeof f=="string")if(g){var m=d(g.as,g.crossOrigin);r.d.m(f,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(f)},gn.requestFormReset=function(f){r.d.r(f)},gn.unstable_batchedUpdates=function(f,g){return f(g)},gn.useFormState=function(f,g,m){return u.H.useFormState(f,g,m)},gn.useFormStatus=function(){return u.H.useHostTransitionStatus()},gn.version="19.2.0",gn}var mg;function yg(){if(mg)return qu.exports;mg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(e){console.error(e)}}return l(),qu.exports=oS(),qu.exports}/**
* @license React
* react-dom-client.production.js
*
@@ -30,20 +30,20 @@ var tx=Object.defineProperty;var nx=(Vt,Ka,Wa)=>Ka in Vt?tx(Vt,Ka,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var bg;function cS(){if(bg)return qs;bg=1;var l=oS(),e=Iu(),a=yg();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var n=t,s=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(s=n.return),t=n.return;while(t)}return n.tag===3?s:null}function u(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function d(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(r(188))}function g(t){var n=t.alternate;if(!n){if(n=o(t),n===null)throw Error(r(188));return n!==t?null:t}for(var s=t,c=n;;){var h=s.return;if(h===null)break;var p=h.alternate;if(p===null){if(c=h.return,c!==null){s=c;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===s)return f(h),t;if(p===c)return f(h),n;p=p.sibling}throw Error(r(188))}if(s.return!==c.return)s=h,c=p;else{for(var w=!1,k=h.child;k;){if(k===s){w=!0,s=h,c=p;break}if(k===c){w=!0,c=h,s=p;break}k=k.sibling}if(!w){for(k=p.child;k;){if(k===s){w=!0,s=p,c=h;break}if(k===c){w=!0,c=p,s=h;break}k=k.sibling}if(!w)throw Error(r(189))}}if(s.alternate!==c)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:n}function m(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=m(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),O=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),Ae=Symbol.for("react.memo_cache_sentinel"),Oe=Symbol.iterator;function Ne(t){return t===null||typeof t!="object"?null:(t=Oe&&t[Oe]||t["@@iterator"],typeof t=="function"?t:null)}var He=Symbol.for("react.client.reference");function Ze(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===He?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case A:return"Fragment";case D:return"Profiler";case T:return"StrictMode";case P:return"Suspense";case U:return"SuspenseList";case ge:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case O:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case L:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return n=t.displayName||null,n!==null?n:Ze(t.type)||"Memo";case Y:n=t._payload,t=t._init;try{return Ze(t(n))}catch{}}return null}var pt=Array.isArray,Q=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},ne=[],pe=-1;function x(t){return{current:t}}function F(t){0>pe||(t.current=ne[pe],ne[pe]=null,pe--)}function ue(t,n){pe++,ne[pe]=t.current,t.current=n}var fe=x(null),te=x(null),ye=x(null),je=x(null);function Me(t,n){switch(ue(ye,n),ue(te,t),ue(fe,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?xv(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=xv(n),t=Tv(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}F(fe),ue(fe,t)}function Pe(){F(fe),F(te),F(ye)}function Ie(t){t.memoizedState!==null&&ue(je,t);var n=fe.current,s=Tv(n,t.type);n!==s&&(ue(te,t),ue(fe,s))}function Lt(t){te.current===t&&(F(fe),F(te)),je.current===t&&(F(je),Al._currentValue=me)}var At,en;function Tt(t){if(At===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);At=n&&n[1]||"",en=-1<s.stack.indexOf(`
*/var bg;function lS(){if(bg)return qs;bg=1;var l=sS(),e=Iu(),a=yg();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var n=t,s=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(s=n.return),t=n.return;while(t)}return n.tag===3?s:null}function u(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function d(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(r(188))}function g(t){var n=t.alternate;if(!n){if(n=o(t),n===null)throw Error(r(188));return n!==t?null:t}for(var s=t,c=n;;){var h=s.return;if(h===null)break;var p=h.alternate;if(p===null){if(c=h.return,c!==null){s=c;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===s)return f(h),t;if(p===c)return f(h),n;p=p.sibling}throw Error(r(188))}if(s.return!==c.return)s=h,c=p;else{for(var w=!1,k=h.child;k;){if(k===s){w=!0,s=h,c=p;break}if(k===c){w=!0,c=h,s=p;break}k=k.sibling}if(!w){for(k=p.child;k;){if(k===s){w=!0,s=p,c=h;break}if(k===c){w=!0,c=p,s=h;break}k=k.sibling}if(!w)throw Error(r(189))}}if(s.alternate!==c)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:n}function m(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=m(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),O=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),Ae=Symbol.for("react.memo_cache_sentinel"),Oe=Symbol.iterator;function Ne(t){return t===null||typeof t!="object"?null:(t=Oe&&t[Oe]||t["@@iterator"],typeof t=="function"?t:null)}var He=Symbol.for("react.client.reference");function Ze(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===He?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case A:return"Fragment";case D:return"Profiler";case T:return"StrictMode";case P:return"Suspense";case U:return"SuspenseList";case ge:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case O:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case L:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return n=t.displayName||null,n!==null?n:Ze(t.type)||"Memo";case Y:n=t._payload,t=t._init;try{return Ze(t(n))}catch{}}return null}var pt=Array.isArray,J=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},ne=[],pe=-1;function x(t){return{current:t}}function F(t){0>pe||(t.current=ne[pe],ne[pe]=null,pe--)}function ue(t,n){pe++,ne[pe]=t.current,t.current=n}var fe=x(null),te=x(null),ye=x(null),je=x(null);function Me(t,n){switch(ue(ye,n),ue(te,t),ue(fe,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Av(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Av(n),t=xv(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}F(fe),ue(fe,t)}function Pe(){F(fe),F(te),F(ye)}function Ie(t){t.memoizedState!==null&&ue(je,t);var n=fe.current,s=xv(n,t.type);n!==s&&(ue(te,t),ue(fe,s))}function Lt(t){te.current===t&&(F(fe),F(te)),je.current===t&&(F(je),Al._currentValue=me)}var At,Zt;function Tt(t){if(At===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);At=n&&n[1]||"",Zt=-1<s.stack.indexOf(`
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
`+At+t+en}var ln=!1;function vt(t,n){if(!t||ln)return"";ln=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ee){var X=ee}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ee){X=ee}t.call(ce.prototype)}}else{try{throw Error()}catch(ee){X=ee}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ee){if(ee&&X&&typeof ee.stack=="string")return[ee.stack,X.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),w=p[0],k=p[1];if(w&&k){var I=w.split(`
`+At+t+Zt}var on=!1;function vt(t,n){if(!t||on)return"";on=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ee){var X=ee}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ee){X=ee}t.call(ce.prototype)}}else{try{throw Error()}catch(ee){X=ee}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ee){if(ee&&X&&typeof ee.stack=="string")return[ee.stack,X.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),w=p[0],k=p[1];if(w&&k){var I=w.split(`
`),W=k.split(`
`);for(h=c=0;c<I.length&&!I[c].includes("DetermineComponentFrameRoot");)c++;for(;h<W.length&&!W[h].includes("DetermineComponentFrameRoot");)h++;if(c===I.length||h===W.length)for(c=I.length-1,h=W.length-1;1<=c&&0<=h&&I[c]!==W[h];)h--;for(;1<=c&&0<=h;c--,h--)if(I[c]!==W[h]){if(c!==1||h!==1)do if(c--,h--,0>h||I[c]!==W[h]){var ae=`
`+I[c].replace(" at new "," at ");return t.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",t.displayName)),ae}while(1<=c&&0<=h);break}}}finally{ln=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Tt(s):""}function Za(t,n){switch(t.tag){case 26:case 27:case 5:return Tt(t.type);case 16:return Tt("Lazy");case 13:return t.child!==n&&n!==null?Tt("Suspense Fallback"):Tt("Suspense");case 19:return Tt("SuspenseList");case 0:case 15:return vt(t.type,!1);case 11:return vt(t.type.render,!1);case 1:return vt(t.type,!0);case 31:return Tt("Activity");default:return""}}function wn(t){try{var n="",s=null;do n+=Za(t,s),s=t,t=t.return;while(t);return n}catch(c){return`
`+I[c].replace(" at new "," at ");return t.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",t.displayName)),ae}while(1<=c&&0<=h);break}}}finally{on=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Tt(s):""}function Za(t,n){switch(t.tag){case 26:case 27:case 5:return Tt(t.type);case 16:return Tt("Lazy");case 13:return t.child!==n&&n!==null?Tt("Suspense Fallback"):Tt("Suspense");case 19:return Tt("SuspenseList");case 0:case 15:return vt(t.type,!1);case 11:return vt(t.type.render,!1);case 1:return vt(t.type,!0);case 31:return Tt("Activity");default:return""}}function Sn(t){try{var n="",s=null;do n+=Za(t,s),s=t,t=t.return;while(t);return n}catch(c){return`
Error generating stack: `+c.message+`
`+c.stack}}var qn=Object.prototype.hasOwnProperty,Bt=l.unstable_scheduleCallback,Rn=l.unstable_cancelCallback,_a=l.unstable_shouldYield,Pn=l.unstable_requestPaint,Ft=l.unstable_now,yt=l.unstable_getCurrentPriorityLevel,er=l.unstable_ImmediatePriority,Gn=l.unstable_UserBlockingPriority,tn=l.unstable_NormalPriority,yn=l.unstable_LowPriority,ta=l.unstable_IdlePriority,Cn=l.log,tr=l.unstable_setDisableYieldValue,Vn=null,qt=null;function En(t){if(typeof Cn=="function"&&tr(t),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(Vn,t)}catch{}}var q=Math.clz32?Math.clz32:J,le=Math.log,oe=Math.LN2;function J(t){return t>>>=0,t===0?32:31-(le(t)/oe|0)|0}var he=256,ve=262144,we=4194304;function _e(t){var n=t&42;if(n!==0)return n;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 Be(t,n,s){var c=t.pendingLanes;if(c===0)return 0;var h=0,p=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var k=c&134217727;return k!==0?(c=k&~p,c!==0?h=_e(c):(w&=k,w!==0?h=_e(w):s||(s=k&~t,s!==0&&(h=_e(s))))):(k=c&~p,k!==0?h=_e(k):w!==0?h=_e(w):s||(s=c&~t,s!==0&&(h=_e(s)))),h===0?0:n!==0&&n!==h&&(n&p)===0&&(p=h&-h,s=n&-n,p>=s||p===32&&(s&4194048)!==0)?n:h}function $e(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Re(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 xe(){var t=we;return we<<=1,(we&62914560)===0&&(we=4194304),t}function Ke(t){for(var n=[],s=0;31>s;s++)n.push(t);return n}function qe(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ce(t,n,s,c,h,p){var w=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var k=t.entanglements,I=t.expirationTimes,W=t.hiddenUpdates;for(s=w&~s;0<s;){var ae=31-q(s),ce=1<<ae;k[ae]=0,I[ae]=-1;var X=W[ae];if(X!==null)for(W[ae]=null,ae=0;ae<X.length;ae++){var ee=X[ae];ee!==null&&(ee.lane&=-536870913)}s&=~ce}c!==0&&Ee(t,c,0),p!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=p&~(w&~n))}function Ee(t,n,s){t.pendingLanes|=n,t.suspendedLanes&=~n;var c=31-q(n);t.entangledLanes|=n,t.entanglements[c]=t.entanglements[c]|1073741824|s&261930}function Le(t,n){var s=t.entangledLanes|=n;for(t=t.entanglements;s;){var c=31-q(s),h=1<<c;h&n|t[c]&n&&(t[c]|=n),s&=~h}}function nt(t,n){var s=n&-n;return s=(s&42)!==0?1:kt(s),(s&(t.suspendedLanes|n))!==0?0:s}function kt(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 bn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Kt(){var t=de.p;return t!==0?t:(t=window.event,t===void 0?32:Xv(t.type))}function na(t,n){var s=de.p;try{return de.p=t,n()}finally{de.p=s}}var Dn=Math.random().toString(36).slice(2),nn="__reactFiber$"+Dn,un="__reactProps$"+Dn,On="__reactContainer$"+Dn,_o="__reactEvents$"+Dn,Qd="__reactListeners$"+Dn,Zd="__reactHandles$"+Dn,as="__reactResources$"+Dn,nr="__reactMarker$"+Dn;function Ao(t){delete t[nn],delete t[un],delete t[_o],delete t[Qd],delete t[Zd]}function Dr(t){var n=t[nn];if(n)return n;for(var s=t.parentNode;s;){if(n=s[On]||s[nn]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(t=$v(t);t!==null;){if(s=t[nn])return s;t=$v(t)}return n}t=s,s=t.parentNode}return null}function Or(t){if(t=t[nn]||t[On]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function yi(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function ja(t){var n=t[as];return n||(n=t[as]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Wt(t){t[nr]=!0}var vc=new Set,Sc={};function ar(t,n){Lr(t,n),Lr(t+"Capture",n)}function Lr(t,n){for(Sc[t]=n,t=0;t<n.length;t++)vc.add(n[t])}var Aa=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D Line truncated
`).replace(EA,"")}function _v(t,n){return n=Ev(n),Ev(t)===n}function Et(t,n,s,c,h,p){switch(s){case"children":typeof c=="string"?n==="body"||n==="textarea"&&c===""||$r(t,c):(typeof c=="number"||typeof c=="bigint")&&n!=="body"&&$r(t,""+c);break;case"className":is(t,"class",c);break;case"tabIndex":is(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":is(t,s,c);break;case"style":Ba(t,c,p);break;case"data":if(n!=="object"){is(t,"data",c);break}case"src":case"href":if(c===""&&(n!=="a"||s!=="href")){t.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=ls(""+c),t.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(s,"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 p=="function"&&(s==="formAction"?(n!=="input"&&Et(t,n,"name",h.name,h,null),Et(t,n,"formEncType",h.formEncType,h,null),Et(t,n,"formMethod",h.formMethod,h,null),Et(t,n,"formTarget",h.formTarget,h,null)):(Et(t,n,"encType",h.encType,h,null),Et(t,n,"method",h.method,h,null),Et(t,n,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=ls(""+c),t.setAttribute(s,c);break;case"onClick":c!=null&&(t.onclick=aa);break;case"onScroll":c!=null&&tt("scroll",t);break;case"onScrollEnd":c!=null&&tt("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(s=c.__html,s!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}s=ls(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""+c):t.removeAttribute(s);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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":c===!0?t.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,c):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(s,c):t.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(s):t.setAttribute(s,c);break;case"popover":tt("beforetoggle",t),tt("toggle",t),rs(t,"popover",c);break;case"xlinkActuate":xa(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":xa(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":xa(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":xa(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":xa(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":xa(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":xa(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":xa(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":xa(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":rs(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=nf.get(s)||s,rs(t,s,c))}}function Kh(t,n,s,c,h,p){switch(s){case"style":Ba(t,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(s=c.__html,s!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"children":typeof c=="string"?$r(t,c):(typeof c=="number"||typeof c=="bigint")&&$r(t,""+c);break;case"onScroll":c!=null&&tt("scroll",t);break;case"onScrollEnd":c!=null&&tt("scrollend",t);break;case"onClick":c!=null&&(t.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`).forEach(function(u){i=u.indexOf(":"),a=u.substring(0,i).trim().toLowerCase(),r=u.substring(i+1).trim(),!(!a||e[a]&&_w[a])&&(a==="set-cookie"?e[a]?e[a].push(r):e[a]=[r]:e[a]=e[a]?e[a]+", "+r:r)}),e},ep=Symbol("internals");function to(l){return l&&String(l).trim().toLowerCase()}function Bl(l){return l===!1||l==null?l:Z.isArray(l)?l.map(Bl):String(l)}function xw(l){const e=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=a.exec(l);)e[r[1]]=r[2];return e}const Tw=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function id(l,e,a,r,i){if(Z.isFunction(r))return r.call(this,e,a);if(i&&(e=a),!!Z.isString(e)){if(Z.isString(r))return e.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(e)}}function kw(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,r)=>a.toUpperCase()+r)}function Rw(l,e){const a=Z.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(l,r+a,{value:function(i,o,u){return this[r].call(this,e,i,o,u)},configurable:!0})})}let xn=class{constructor(e){e&&this.set(e)}set(e,a,r){const i=this;function o(d,f,g){const m=to(f);if(!m)throw new Error("header name must be a non-empty string");const b=Z.findKey(i,m);(!b||i[b]===void 0||g===!0||g===void 0&&i[b]!==!1)&&(i[b||f]=Bl(d))}const u=(d,f)=>Z.forEach(d,(g,m)=>o(g,m,f));if(Z.isPlainObject(e)||e instanceof this.constructor)u(e,a);else if(Z.isString(e)&&(e=e.trim())&&!Tw(e))u(Aw(e),a);else if(Z.isObject(e)&&Z.isIterable(e)){let d={},f,g;for(const m of e){if(!Z.isArray(m))throw TypeError("Object iterator must return a key-value pair");d[g=m[0]]=(f=d[g])?Z.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}u(d,a)}else e!=null&&o(a,e,r);return this}get(e,a){if(e=to(e),e){const r=Z.findKey(this,e);if(r){const i=this[r];if(!a)return i;if(a===!0)return xw(i);if(Z.isFunction(a))return a.call(this,i,r);if(Z.isRegExp(a))return a.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=to(e),e){const r=Z.findKey(this,e);return!!(r&&this[r]!==void 0&&(!a||id(this,this[r],r,a)))}return!1}delete(e,a){const r=this;let i=!1;function o(u){if(u=to(u),u){const d=Z.findKey(r,u);d&&(!a||id(r,r[d],d,a))&&(delete r[d],i=!0)}}return Z.isArray(e)?e.forEach(o):o(e),i}clear(e){const a=Object.keys(this);let r=a.length,i=!1;for(;r--;){const o=a[r];(!e||id(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const a=this,r={};return Z.forEach(this,(i,o)=>{const u=Z.findKey(r,o);if(u){a[u]=Bl(i),delete a[o];return}const d=e?kw(o):String(o).trim();d!==o&&delete a[o],a[d]=Bl(i),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const a=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(a[i]=e&&Z.isArray(r)?r.join(", "):r)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...a){const r=new this(e);return a.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ep]=this[ep]={accessors:{}}).accessors,i=this.prototype;function o(u){const d=to(u);r[d]||(Rw(i,u),r[d]=!0)}return Z.isArray(e)?e.forEach(o):o(e),this}};xn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(xn.prototype,({value:l},e)=>{let a=e[0].toUpperCase()+e.slice(1);return{get:()=>l,set(r){this[a]=r}}}),Z.freezeMethods(xn);function sd(l,e){const a=this||eo,r=e||a,i=xn.from(r.headers);let o=r.data;return Z.forEach(l,function(d){o=d.call(a,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function tp(l){return!!(l&&l.__CANCEL__)}function Fi(l,e,a){Ye.call(this,l??"canceled",Ye.ERR_CANCELED,e,a),this.name="CanceledError"}Z.inherits(Fi,Ye,{__CANCEL__:!0});function np(l,e,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?l(a):e(new Ye("Request failed with status code "+a.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function Dw(l){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(l);return e&&e[1]||""}function Ow(l,e){l=l||10;const a=new Array(l),r=new Array(l);let i=0,o=0,u;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),m=r[o];u||(u=g),a[i]=f,r[i]=g;let b=o,v=0;for(;b!==i;)v+=a[b++],b=b%l;if(i=(i+1)%l,i===o&&(o=(o+1)%l),g-u<e)return;const E=m&&g-m;return E?Math.round(v*1e3/E):void 0}}function Lw(l,e){let a=0,r=1e3/e,i,o;const u=(g,m=Date.now())=>{a=m,i=null,o&&(clearTimeout(o),o=null),l(...g)};return[(...g)=>{const m=Date.now(),b=m-a;b>=r?u(g,m):(i=g,o||(o=setTimeout(()=>{o=null,u(i)},r-b)))},()=>i&&u(i)]}const ql=(l,e,a=3)=>{let r=0;const i=Ow(50,250);return Lw(o=>{const u=o.loaded,d=o.lengthComputable?o.total:void 0,f=u-r,g=i(f),m=u<=d;r=u;const b={loaded:u,total:d,progress:d?u/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&m?(d-u)/g:void 0,event:o,lengthComputable:d!=null,[e?"download":"upload"]:!0};l(b)},a)},ap=(l,e)=>{const a=l!=null;return[r=>e[0]({lengthComputable:a,total:l,loaded:r}),e[1]]},rp=l=>(...e)=>Z.asap(()=>l(...e)),Mw=mn.hasStandardBrowserEnv?((l,e)=>a=>(a=new URL(a,mn.origin),l.protocol===a.protocol&&l.host===a.host&&(e||l.port===a.port)))(new URL(mn.origin),mn.navigator&&/(msie|trident)/i.test(mn.navigator.userAgent)):()=>!0,$w=mn.hasStandardBrowserEnv?{write(l,e,a,r,i,o){const u=[l+"="+encodeURIComponent(e)];Z.isNumber(a)&&u.push("expires="+new Date(a).toGMTString()),Z.isString(r)&&u.push("path="+r),Z.isString(i)&&u.push("domain="+i),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read(l){const e=document.cookie.match(new RegExp("(^|;\\s*)("+l+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(l){this.write(l,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Nw(l){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(l)}function Hw(l,e){return e?l.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):l}function ip(l,e,a){let r=!Nw(e);return l&&(r||a==!1)?Hw(l,e):e}const sp=l=>l instanceof xn?{...l}:l;function di(l,e){e=e||{};const a={};function r(g,m,b,v){return Z.isPlainObject(g)&&Z.isPlainObject(m)?Z.merge.call({caseless:v},g,m):Z.isPlainObject(m)?Z.merge({},m):Z.isArray(m)?m.slice():m}function i(g,m,b,v){if(Z.isUndefined(m)){if(!Z.isUndefined(g))return r(void 0,g,b,v)}else return r(g,m,b,v)}function o(g,m){if(!Z.isUndefined(m))return r(void 0,m)}function u(g,m){if(Z.isUndefined(m)){if(!Z.isUndefined(g))return r(void 0,g)}else return r(void 0,m)}function d(g,m,b){if(b in e)return r(g,m);if(b in l)return r(void 0,g)}const f={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(g,m,b)=>i(sp(g),sp(m),b,!0)};return Z.forEach(Object.keys({...l,...e}),function(m){const b=f[m]||i,v=b(l[m],e[m],m);Z.isUndefined(v)&&b!==d||(a[m]=v)}),a}const op=l=>{const e=di({},l);let{data:a,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:u,auth:d}=e;if(e.headers=u=xn.from(u),e.url=Xg(ip(e.baseURL,e.url,e.allowAbsoluteUrls),l.params,l.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),Z.isFormData(a)){if(mn.hasStandardBrowserEnv||mn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Z.isFunction(a.getHeaders)){const f=a.getHeaders(),g=["content-type","content-length"];Object.entries(f).forEach(([m,b])=>{g.includes(m.toLowerCase())&&u.set(m,b)})}}if(mn.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(e)),r||r!==!1&&Mw(e.url))) Line truncated
`+c.stack}}var qn=Object.prototype.hasOwnProperty,Ut=l.unstable_scheduleCallback,Rn=l.unstable_cancelCallback,_a=l.unstable_shouldYield,Pn=l.unstable_requestPaint,Vt=l.unstable_now,yt=l.unstable_getCurrentPriorityLevel,er=l.unstable_ImmediatePriority,Gn=l.unstable_UserBlockingPriority,en=l.unstable_NormalPriority,mn=l.unstable_LowPriority,ta=l.unstable_IdlePriority,wn=l.log,tr=l.unstable_setDisableYieldValue,Vn=null,Bt=null;function Cn(t){if(typeof wn=="function"&&tr(t),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(Vn,t)}catch{}}var q=Math.clz32?Math.clz32:Q,le=Math.log,oe=Math.LN2;function Q(t){return t>>>=0,t===0?32:31-(le(t)/oe|0)|0}var he=256,ve=262144,we=4194304;function _e(t){var n=t&42;if(n!==0)return n;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 Be(t,n,s){var c=t.pendingLanes;if(c===0)return 0;var h=0,p=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var k=c&134217727;return k!==0?(c=k&~p,c!==0?h=_e(c):(w&=k,w!==0?h=_e(w):s||(s=k&~t,s!==0&&(h=_e(s))))):(k=c&~p,k!==0?h=_e(k):w!==0?h=_e(w):s||(s=c&~t,s!==0&&(h=_e(s)))),h===0?0:n!==0&&n!==h&&(n&p)===0&&(p=h&-h,s=n&-n,p>=s||p===32&&(s&4194048)!==0)?n:h}function $e(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Re(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 xe(){var t=we;return we<<=1,(we&62914560)===0&&(we=4194304),t}function Ke(t){for(var n=[],s=0;31>s;s++)n.push(t);return n}function qe(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ce(t,n,s,c,h,p){var w=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var k=t.entanglements,I=t.expirationTimes,W=t.hiddenUpdates;for(s=w&~s;0<s;){var ae=31-q(s),ce=1<<ae;k[ae]=0,I[ae]=-1;var X=W[ae];if(X!==null)for(W[ae]=null,ae=0;ae<X.length;ae++){var ee=X[ae];ee!==null&&(ee.lane&=-536870913)}s&=~ce}c!==0&&Ee(t,c,0),p!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=p&~(w&~n))}function Ee(t,n,s){t.pendingLanes|=n,t.suspendedLanes&=~n;var c=31-q(n);t.entangledLanes|=n,t.entanglements[c]=t.entanglements[c]|1073741824|s&261930}function Le(t,n){var s=t.entangledLanes|=n;for(t=t.entanglements;s;){var c=31-q(s),h=1<<c;h&n|t[c]&n&&(t[c]|=n),s&=~h}}function nt(t,n){var s=n&-n;return s=(s&42)!==0?1:kt(s),(s&(t.suspendedLanes|n))!==0?0:s}function kt(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 yn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ft(){var t=de.p;return t!==0?t:(t=window.event,t===void 0?32:Yv(t.type))}function na(t,n){var s=de.p;try{return de.p=t,n()}finally{de.p=s}}var Dn=Math.random().toString(36).slice(2),tn="__reactFiber$"+Dn,cn="__reactProps$"+Dn,On="__reactContainer$"+Dn,_o="__reactEvents$"+Dn,Jd="__reactListeners$"+Dn,Zd="__reactHandles$"+Dn,as="__reactResources$"+Dn,nr="__reactMarker$"+Dn;function Ao(t){delete t[tn],delete t[cn],delete t[_o],delete t[Jd],delete t[Zd]}function Dr(t){var n=t[tn];if(n)return n;for(var s=t.parentNode;s;){if(n=s[On]||s[tn]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(t=Mv(t);t!==null;){if(s=t[tn])return s;t=Mv(t)}return n}t=s,s=t.parentNode}return null}function Or(t){if(t=t[tn]||t[On]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function yi(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function ja(t){var n=t[as];return n||(n=t[as]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Kt(t){t[nr]=!0}var vc=new Set,Sc={};function ar(t,n){Lr(t,n),Lr(t+"Capture",n)}function Lr(t,n){for(Sc[t]=n,t=0;t<n.length;t++)vc.add(n[t])}var Aa=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D Line truncated
`).replace(CA,"")}function Ev(t,n){return n=Cv(n),Cv(t)===n}function Et(t,n,s,c,h,p){switch(s){case"children":typeof c=="string"?n==="body"||n==="textarea"&&c===""||$r(t,c):(typeof c=="number"||typeof c=="bigint")&&n!=="body"&&$r(t,""+c);break;case"className":is(t,"class",c);break;case"tabIndex":is(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":is(t,s,c);break;case"style":Ba(t,c,p);break;case"data":if(n!=="object"){is(t,"data",c);break}case"src":case"href":if(c===""&&(n!=="a"||s!=="href")){t.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=ls(""+c),t.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(s,"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 p=="function"&&(s==="formAction"?(n!=="input"&&Et(t,n,"name",h.name,h,null),Et(t,n,"formEncType",h.formEncType,h,null),Et(t,n,"formMethod",h.formMethod,h,null),Et(t,n,"formTarget",h.formTarget,h,null)):(Et(t,n,"encType",h.encType,h,null),Et(t,n,"method",h.method,h,null),Et(t,n,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=ls(""+c),t.setAttribute(s,c);break;case"onClick":c!=null&&(t.onclick=aa);break;case"onScroll":c!=null&&tt("scroll",t);break;case"onScrollEnd":c!=null&&tt("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(s=c.__html,s!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}s=ls(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""+c):t.removeAttribute(s);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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":c===!0?t.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,c):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(s,c):t.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(s):t.setAttribute(s,c);break;case"popover":tt("beforetoggle",t),tt("toggle",t),rs(t,"popover",c);break;case"xlinkActuate":xa(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":xa(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":xa(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":xa(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":xa(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":xa(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":xa(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":xa(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":xa(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":rs(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=nf.get(s)||s,rs(t,s,c))}}function Kh(t,n,s,c,h,p){switch(s){case"style":Ba(t,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(s=c.__html,s!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"children":typeof c=="string"?$r(t,c):(typeof c=="number"||typeof c=="bigint")&&$r(t,""+c);break;case"onScroll":c!=null&&tt("scroll",t);break;case"onScrollEnd":c!=null&&tt("scrollend",t);break;case"onClick":c!=null&&(t.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`).forEach(function(u){i=u.indexOf(":"),a=u.substring(0,i).trim().toLowerCase(),r=u.substring(i+1).trim(),!(!a||e[a]&&Ew[a])&&(a==="set-cookie"?e[a]?e[a].push(r):e[a]=[r]:e[a]=e[a]?e[a]+", "+r:r)}),e},ep=Symbol("internals");function to(l){return l&&String(l).trim().toLowerCase()}function Bl(l){return l===!1||l==null?l:Z.isArray(l)?l.map(Bl):String(l)}function Aw(l){const e=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=a.exec(l);)e[r[1]]=r[2];return e}const xw=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function id(l,e,a,r,i){if(Z.isFunction(r))return r.call(this,e,a);if(i&&(e=a),!!Z.isString(e)){if(Z.isString(r))return e.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(e)}}function Tw(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,r)=>a.toUpperCase()+r)}function kw(l,e){const a=Z.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(l,r+a,{value:function(i,o,u){return this[r].call(this,e,i,o,u)},configurable:!0})})}let An=class{constructor(e){e&&this.set(e)}set(e,a,r){const i=this;function o(d,f,g){const m=to(f);if(!m)throw new Error("header name must be a non-empty string");const b=Z.findKey(i,m);(!b||i[b]===void 0||g===!0||g===void 0&&i[b]!==!1)&&(i[b||f]=Bl(d))}const u=(d,f)=>Z.forEach(d,(g,m)=>o(g,m,f));if(Z.isPlainObject(e)||e instanceof this.constructor)u(e,a);else if(Z.isString(e)&&(e=e.trim())&&!xw(e))u(_w(e),a);else if(Z.isObject(e)&&Z.isIterable(e)){let d={},f,g;for(const m of e){if(!Z.isArray(m))throw TypeError("Object iterator must return a key-value pair");d[g=m[0]]=(f=d[g])?Z.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}u(d,a)}else e!=null&&o(a,e,r);return this}get(e,a){if(e=to(e),e){const r=Z.findKey(this,e);if(r){const i=this[r];if(!a)return i;if(a===!0)return Aw(i);if(Z.isFunction(a))return a.call(this,i,r);if(Z.isRegExp(a))return a.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=to(e),e){const r=Z.findKey(this,e);return!!(r&&this[r]!==void 0&&(!a||id(this,this[r],r,a)))}return!1}delete(e,a){const r=this;let i=!1;function o(u){if(u=to(u),u){const d=Z.findKey(r,u);d&&(!a||id(r,r[d],d,a))&&(delete r[d],i=!0)}}return Z.isArray(e)?e.forEach(o):o(e),i}clear(e){const a=Object.keys(this);let r=a.length,i=!1;for(;r--;){const o=a[r];(!e||id(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const a=this,r={};return Z.forEach(this,(i,o)=>{const u=Z.findKey(r,o);if(u){a[u]=Bl(i),delete a[o];return}const d=e?Tw(o):String(o).trim();d!==o&&delete a[o],a[d]=Bl(i),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const a=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(a[i]=e&&Z.isArray(r)?r.join(", "):r)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...a){const r=new this(e);return a.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ep]=this[ep]={accessors:{}}).accessors,i=this.prototype;function o(u){const d=to(u);r[d]||(kw(i,u),r[d]=!0)}return Z.isArray(e)?e.forEach(o):o(e),this}};An.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(An.prototype,({value:l},e)=>{let a=e[0].toUpperCase()+e.slice(1);return{get:()=>l,set(r){this[a]=r}}}),Z.freezeMethods(An);function sd(l,e){const a=this||eo,r=e||a,i=An.from(r.headers);let o=r.data;return Z.forEach(l,function(d){o=d.call(a,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function tp(l){return!!(l&&l.__CANCEL__)}function Fi(l,e,a){Ye.call(this,l??"canceled",Ye.ERR_CANCELED,e,a),this.name="CanceledError"}Z.inherits(Fi,Ye,{__CANCEL__:!0});function np(l,e,a){const r=a.config.validateStatus;!a.status||!r||r(a.status)?l(a):e(new Ye("Request failed with status code "+a.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function Rw(l){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(l);return e&&e[1]||""}function Dw(l,e){l=l||10;const a=new Array(l),r=new Array(l);let i=0,o=0,u;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),m=r[o];u||(u=g),a[i]=f,r[i]=g;let b=o,v=0;for(;b!==i;)v+=a[b++],b=b%l;if(i=(i+1)%l,i===o&&(o=(o+1)%l),g-u<e)return;const E=m&&g-m;return E?Math.round(v*1e3/E):void 0}}function Ow(l,e){let a=0,r=1e3/e,i,o;const u=(g,m=Date.now())=>{a=m,i=null,o&&(clearTimeout(o),o=null),l(...g)};return[(...g)=>{const m=Date.now(),b=m-a;b>=r?u(g,m):(i=g,o||(o=setTimeout(()=>{o=null,u(i)},r-b)))},()=>i&&u(i)]}const ql=(l,e,a=3)=>{let r=0;const i=Dw(50,250);return Ow(o=>{const u=o.loaded,d=o.lengthComputable?o.total:void 0,f=u-r,g=i(f),m=u<=d;r=u;const b={loaded:u,total:d,progress:d?u/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&m?(d-u)/g:void 0,event:o,lengthComputable:d!=null,[e?"download":"upload"]:!0};l(b)},a)},ap=(l,e)=>{const a=l!=null;return[r=>e[0]({lengthComputable:a,total:l,loaded:r}),e[1]]},rp=l=>(...e)=>Z.asap(()=>l(...e)),Lw=pn.hasStandardBrowserEnv?((l,e)=>a=>(a=new URL(a,pn.origin),l.protocol===a.protocol&&l.host===a.host&&(e||l.port===a.port)))(new URL(pn.origin),pn.navigator&&/(msie|trident)/i.test(pn.navigator.userAgent)):()=>!0,Mw=pn.hasStandardBrowserEnv?{write(l,e,a,r,i,o){const u=[l+"="+encodeURIComponent(e)];Z.isNumber(a)&&u.push("expires="+new Date(a).toGMTString()),Z.isString(r)&&u.push("path="+r),Z.isString(i)&&u.push("domain="+i),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read(l){const e=document.cookie.match(new RegExp("(^|;\\s*)("+l+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(l){this.write(l,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $w(l){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(l)}function Nw(l,e){return e?l.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):l}function ip(l,e,a){let r=!$w(e);return l&&(r||a==!1)?Nw(l,e):e}const sp=l=>l instanceof An?{...l}:l;function di(l,e){e=e||{};const a={};function r(g,m,b,v){return Z.isPlainObject(g)&&Z.isPlainObject(m)?Z.merge.call({caseless:v},g,m):Z.isPlainObject(m)?Z.merge({},m):Z.isArray(m)?m.slice():m}function i(g,m,b,v){if(Z.isUndefined(m)){if(!Z.isUndefined(g))return r(void 0,g,b,v)}else return r(g,m,b,v)}function o(g,m){if(!Z.isUndefined(m))return r(void 0,m)}function u(g,m){if(Z.isUndefined(m)){if(!Z.isUndefined(g))return r(void 0,g)}else return r(void 0,m)}function d(g,m,b){if(b in e)return r(g,m);if(b in l)return r(void 0,g)}const f={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(g,m,b)=>i(sp(g),sp(m),b,!0)};return Z.forEach(Object.keys({...l,...e}),function(m){const b=f[m]||i,v=b(l[m],e[m],m);Z.isUndefined(v)&&b!==d||(a[m]=v)}),a}const op=l=>{const e=di({},l);let{data:a,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:u,auth:d}=e;if(e.headers=u=An.from(u),e.url=Xg(ip(e.baseURL,e.url,e.allowAbsoluteUrls),l.params,l.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),Z.isFormData(a)){if(pn.hasStandardBrowserEnv||pn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Z.isFunction(a.getHeaders)){const f=a.getHeaders(),g=["content-type","content-length"];Object.entries(f).forEach(([m,b])=>{g.includes(m.toLowerCase())&&u.set(m,b)})}}if(pn.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(e)),r||r!==!1&&Lw(e.url))) Line truncated
`+u.map(gp).join(`
`):" "+gp(u[0]):"as no adapter specified";throw new Ye("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return i},adapters:od};function ld(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new Fi(null,l)}function mp(l){return ld(l),l.headers=xn.from(l.headers),l.data=sd.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),pp.getAdapter(l.adapter||eo.adapter,l)(l).then(function(r){return ld(l),r.data=sd.call(l,l.transformResponse,r),r.headers=xn.from(r.headers),r},function(r){return tp(r)||(ld(l),r&&r.response&&(r.response.data=sd.call(l,l.transformResponse,r.response),r.response.headers=xn.from(r.response.headers))),Promise.reject(r)})}const yp="1.12.2",Gl={};["object","boolean","number","function","string","symbol"].forEach((l,e)=>{Gl[l]=function(r){return typeof r===l||"a"+(e<1?"n ":" ")+l}});const bp={};Gl.transitional=function(e,a,r){function i(o,u){return"[Axios v"+yp+"] Transitional option '"+o+"'"+u+(r?". "+r:"")}return(o,u,d)=>{if(e===!1)throw new Ye(i(u," has been removed"+(a?" in "+a:"")),Ye.ERR_DEPRECATED);return a&&!bp[u]&&(bp[u]=!0,console.warn(i(u," has been deprecated since v"+a+" and will be removed in the near future"))),e?e(o,u,d):!0}},Gl.spelling=function(e){return(a,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Fw(l,e,a){if(typeof l!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(l);let i=r.length;for(;i-- >0;){const o=r[i],u=e[o];if(u){const d=l[o],f=d===void 0||u(d,o,l);if(f!==!0)throw new Ye("option "+o+" must be "+f,Ye.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new Ye("Unknown option "+o,Ye.ERR_BAD_OPTION)}}const Vl={assertOptions:Fw,validators:Gl},Ma=Vl.validators;let fi=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Jg,response:new Jg}}async request(e,a){try{return await this._request(e,a)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(e,a){typeof e=="string"?(a=a||{},a.url=e):a=e||{},a=di(this.defaults,a);const{transitional:r,paramsSerializer:i,headers:o}=a;r!==void 0&&Vl.assertOptions(r,{silentJSONParsing:Ma.transitional(Ma.boolean),forcedJSONParsing:Ma.transitional(Ma.boolean),clarifyTimeoutError:Ma.transitional(Ma.boolean)},!1),i!=null&&(Z.isFunction(i)?a.paramsSerializer={serialize:i}:Vl.assertOptions(i,{encode:Ma.function,serialize:Ma.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),Vl.assertOptions(a,{baseUrl:Ma.spelling("baseURL"),withXsrfToken:Ma.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let u=o&&Z.merge(o.common,o[a.method]);o&&Z.forEach(["delete","get","head","post","put","patch","common"],S=>{delete o[S]}),a.headers=xn.concat(u,o);const d=[];let f=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(a)===!1||(f=f&&A.synchronous,d.unshift(A.fulfilled,A.rejected))});const g=[];this.interceptors.response.forEach(function(A){g.push(A.fulfilled,A.rejected)});let m,b=0,v;if(!f){const S=[mp.bind(this),void 0];for(S.unshift(...d),S.push(...g),v=S.length,m=Promise.resolve(a);b<v;)m=m.then(S[b++],S[b++]);return m}v=d.length;let E=a;for(;b<v;){const S=d[b++],A=d[b++];try{E=S(E)}catch(T){A.call(this,T);break}}try{m=mp.call(this,E)}catch(S){return Promise.reject(S)}for(b=0,v=g.length;b<v;)m=m.then(g[b++],g[b++]);return m}getUri(e){e=di(this.defaults,e);const a=ip(e.baseURL,e.url,e.allowAbsoluteUrls);return Xg(a,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){fi.prototype[e]=function(a,r){return this.request(di(r||{},{method:e,url:a,data:(r||{}).data}))}}),Z.forEach(["post","put","patch"],function(e){function a(r){return function(o,u,d){return this.request(di(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:u}))}}fi.prototype[e]=a(),fi.prototype[e+"Form"]=a(!0)});let Kw=class aS{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(o){a=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const u=new Promise(d=>{r.subscribe(d),o=d}).then(i);return u.cancel=function(){r.unsubscribe(o)},u},e(function(o,u,d){r.reason||(r.reason=new Fi(o,u,d),a(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 a=this._listeners.indexOf(e);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const e=new AbortController,a=r=>{e.abort(r)};return this.subscribe(a),e.signal.unsubscribe=()=>this.unsubscribe(a),e.signal}static source(){let e;return{token:new aS(function(i){e=i}),cancel:e}}};function Ww(l){return function(a){return l.apply(null,a)}}function Yw(l){return Z.isObject(l)&&l.isAxiosError===!0}const cd={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,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity: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};Object.entries(cd).forEach(([l,e])=>{cd[e]=l});function vp(l){const e=new fi(l),a=Ng(fi.prototype.request,e);return Z.extend(a,fi.prototype,e,{allOwnKeys:!0}),Z.extend(a,e,null,{allOwnKeys:!0}),a.create=function(i){return vp(di(l,i))},a}const Ut=vp(eo);Ut.Axios=fi,Ut.CanceledError=Fi,Ut.CancelToken=Kw,Ut.isCancel=tp,Ut.VERSION=yp,Ut.toFormData=Ul,Ut.AxiosError=Ye,Ut.Cancel=Ut.CanceledError,Ut.all=function(e){return Promise.all(e)},Ut.spread=Ww,Ut.isAxiosError=Yw,Ut.mergeConfig=di,Ut.AxiosHeaders=xn,Ut.formToJSON=l=>Zg(Z.isHTMLForm(l)?new FormData(l):l),Ut.getAdapter=pp.getAdapter,Ut.HttpStatusCode=cd,Ut.default=Ut;const{Ax Line truncated
`):" "+gp(u[0]):"as no adapter specified";throw new Ye("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return i},adapters:od};function ld(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new Fi(null,l)}function mp(l){return ld(l),l.headers=An.from(l.headers),l.data=sd.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),pp.getAdapter(l.adapter||eo.adapter,l)(l).then(function(r){return ld(l),r.data=sd.call(l,l.transformResponse,r),r.headers=An.from(r.headers),r},function(r){return tp(r)||(ld(l),r&&r.response&&(r.response.data=sd.call(l,l.transformResponse,r.response),r.response.headers=An.from(r.response.headers))),Promise.reject(r)})}const yp="1.12.2",Gl={};["object","boolean","number","function","string","symbol"].forEach((l,e)=>{Gl[l]=function(r){return typeof r===l||"a"+(e<1?"n ":" ")+l}});const bp={};Gl.transitional=function(e,a,r){function i(o,u){return"[Axios v"+yp+"] Transitional option '"+o+"'"+u+(r?". "+r:"")}return(o,u,d)=>{if(e===!1)throw new Ye(i(u," has been removed"+(a?" in "+a:"")),Ye.ERR_DEPRECATED);return a&&!bp[u]&&(bp[u]=!0,console.warn(i(u," has been deprecated since v"+a+" and will be removed in the near future"))),e?e(o,u,d):!0}},Gl.spelling=function(e){return(a,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Vw(l,e,a){if(typeof l!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const r=Object.keys(l);let i=r.length;for(;i-- >0;){const o=r[i],u=e[o];if(u){const d=l[o],f=d===void 0||u(d,o,l);if(f!==!0)throw new Ye("option "+o+" must be "+f,Ye.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new Ye("Unknown option "+o,Ye.ERR_BAD_OPTION)}}const Vl={assertOptions:Vw,validators:Gl},Ma=Vl.validators;let fi=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Qg,response:new Qg}}async request(e,a){try{return await this._request(e,a)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(e,a){typeof e=="string"?(a=a||{},a.url=e):a=e||{},a=di(this.defaults,a);const{transitional:r,paramsSerializer:i,headers:o}=a;r!==void 0&&Vl.assertOptions(r,{silentJSONParsing:Ma.transitional(Ma.boolean),forcedJSONParsing:Ma.transitional(Ma.boolean),clarifyTimeoutError:Ma.transitional(Ma.boolean)},!1),i!=null&&(Z.isFunction(i)?a.paramsSerializer={serialize:i}:Vl.assertOptions(i,{encode:Ma.function,serialize:Ma.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),Vl.assertOptions(a,{baseUrl:Ma.spelling("baseURL"),withXsrfToken:Ma.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let u=o&&Z.merge(o.common,o[a.method]);o&&Z.forEach(["delete","get","head","post","put","patch","common"],S=>{delete o[S]}),a.headers=An.concat(u,o);const d=[];let f=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(a)===!1||(f=f&&A.synchronous,d.unshift(A.fulfilled,A.rejected))});const g=[];this.interceptors.response.forEach(function(A){g.push(A.fulfilled,A.rejected)});let m,b=0,v;if(!f){const S=[mp.bind(this),void 0];for(S.unshift(...d),S.push(...g),v=S.length,m=Promise.resolve(a);b<v;)m=m.then(S[b++],S[b++]);return m}v=d.length;let E=a;for(;b<v;){const S=d[b++],A=d[b++];try{E=S(E)}catch(T){A.call(this,T);break}}try{m=mp.call(this,E)}catch(S){return Promise.reject(S)}for(b=0,v=g.length;b<v;)m=m.then(g[b++],g[b++]);return m}getUri(e){e=di(this.defaults,e);const a=ip(e.baseURL,e.url,e.allowAbsoluteUrls);return Xg(a,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){fi.prototype[e]=function(a,r){return this.request(di(r||{},{method:e,url:a,data:(r||{}).data}))}}),Z.forEach(["post","put","patch"],function(e){function a(r){return function(o,u,d){return this.request(di(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:u}))}}fi.prototype[e]=a(),fi.prototype[e+"Form"]=a(!0)});let Fw=class nS{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(o){a=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const u=new Promise(d=>{r.subscribe(d),o=d}).then(i);return u.cancel=function(){r.unsubscribe(o)},u},e(function(o,u,d){r.reason||(r.reason=new Fi(o,u,d),a(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 a=this._listeners.indexOf(e);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const e=new AbortController,a=r=>{e.abort(r)};return this.subscribe(a),e.signal.unsubscribe=()=>this.unsubscribe(a),e.signal}static source(){let e;return{token:new nS(function(i){e=i}),cancel:e}}};function Kw(l){return function(a){return l.apply(null,a)}}function Ww(l){return Z.isObject(l)&&l.isAxiosError===!0}const cd={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,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity: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};Object.entries(cd).forEach(([l,e])=>{cd[e]=l});function vp(l){const e=new fi(l),a=Ng(fi.prototype.request,e);return Z.extend(a,fi.prototype,e,{allOwnKeys:!0}),Z.extend(a,e,null,{allOwnKeys:!0}),a.create=function(i){return vp(di(l,i))},a}const jt=vp(eo);jt.Axios=fi,jt.CanceledError=Fi,jt.CancelToken=Fw,jt.isCancel=tp,jt.VERSION=yp,jt.toFormData=Ul,jt.AxiosError=Ye,jt.Cancel=jt.CanceledError,jt.all=function(e){return Promise.all(e)},jt.spread=Kw,jt.isAxiosError=Ww,jt.mergeConfig=di,jt.AxiosHeaders=An,jt.formToJSON=l=>Zg(Z.isHTMLForm(l)?new FormData(l):l),jt.getAdapter=pp.getAdapter,jt.HttpStatusCode=cd,jt.default=jt;const{Ax Line truncated
* @license React
* react-jsx-runtime.production.js
*
@@ -51,7 +51,7 @@ Error generating stack: `+c.message+`
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var wp;function e0(){if(wp)return ao;wp=1;var l=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(r,i,o){var u=null;if(o!==void 0&&(u=""+o),i.key!==void 0&&(u=""+i.key),"key"in i){o={};for(var d in i)d!=="key"&&(o[d]=i[d])}else o=i;return i=o.ref,{$$typeof:l,type:r,key:u,ref:i!==void 0?i:null,props:o}}return ao.Fragment=e,ao.jsx=a,ao.jsxs=a,ao}var Cp;function t0(){return Cp||(Cp=1,gd.exports=e0()),gd.exports}var ct=t0();const n0=Ka({__proto__:null,default:Wa(ct)},[ct]),pd=dt("ParentContextProvider"),Ep=N.createContext(null);let Wl=null;function md(){Wl?(pd.log("[triggerModalParentUpdate] 모달 부모 컨텍스트 업데이트 트리거"),Wl()):pd.warn("[triggerModalParentUpdate] Provider가 아직 마운트되지 않음")}const _p=({children:l})=>{const[e,a]=N.useState(0),r=N.useRef(!0),i=N.useCallback(()=>{const u=window.__g7LayoutContextStack||[];return u[u.length-1]?.dataContext},[]);N.useEffect(()=>(r.current=!0,Wl=()=>{r.current&&(a(u=>u+1),pd.log("[ParentContextProvider] 버전 업데이트됨"))},()=>{r.current=!1,Wl=null}),[]);const o={version:e,getParentDataContext:i};return ct.jsx(Ep.Provider,{value:o,children:l})};function a0(){return N.useContext(Ep)}const z=dt("ActionDispatcher"),Ap=new Set(["navigate","navigateBack","navigateForward","replaceUrl","refresh","logout"]),r0=new Set(["redirect"]);function jn(){try{return window.G7Core?.devTools}catch{return}}class Mt extends Error{constructor(e,a,r){super(e),this.action=a,this.originalError=r,this.name="ActionError"}}const ns=class ns{constructor(e={},a,r){$(this,"bindingEngine");$(this,"translationEngine");$(this,"translationContext");$(this,"customHandlers",new Map);$(this,"defaultContext");$(this,"globalStateUpdater");$(this,"errorHandlingSetup",!1);$(this,"debounceTimers",new Map);$(this,"pendingDebounceFlushers",new Map);$(this,"debounceAccumulatedValues",new Map);$(this,"globalHeaders",[]);$(this,"namedActions",{});$(this,"previewMode",!1);$(this,"intervals",new Map);this.bindingEngine=new Sn,this.translationEngine=a,this.translationContext=r,this.defaultContext=e,this.registerDefaultHandlers(),this.setupErrorHandling()}setGlobalHeaders(e){this.globalHeaders=e||[]}setNamedActions(e){this.namedActions=e||{};const a=jn();a?.isEnabled?.()&&a.setNamedActionDefinitions?.(this.namedActions),z.log("[setNamedActions] registered:",Object.keys(this.namedActions))}getNamedActions(){return this.namedActions}setPreviewMode(e){this.previewMode=e,z.log("Preview mode:",e?"enabled":"disabled")}isPreviewMode(){return this.previewMode}static getPreviewSuppressedHandlers(){return Ap}static getPreviewSuppressedLayoutFeatures(){return r0}resolveActionRef(e){if(!e.actionRef)return e;const a=this.namedActions[e.actionRef];if(!a)return z.warn(`[resolveActionRef] named action not found: "${e.actionRef}"`),e;const r=jn();r?.isEnabled?.()&&r.trackNamedActionRef?.({actionRefName:e.actionRef,resolvedHandler:a.handler,timestamp:Date.now()});const{actionRef:i,type:o,key:u,event:d,...f}=e,g={...a,...Object.fromEntries(Object.entries(f).filter(([,m])=>m!==void 0)),type:o??a.type};return u!==void 0&&(g.key=u),d!==void 0&&(g.event=d),g}matchesPattern(e,a){if(a==="*")return!0;const r=a.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${r}$`).test(e)}getMatchingGlobalHeaders(e,a){const r={};for(const i of this.globalHeaders)this.matchesPattern(e,i.pattern)&&Object.entries(i.headers).forEach(([o,u])=>{const d=Pi(u,a,{skipCache:!0});d!=null&&d!==""&&(r[o]=String(d))});return r}setupErrorHandling(){if(this.errorHandlingSetup)return;ma().setActionExecutor(async(a,r)=>{const i={type:"click",handler:a.handler,target:a.target,params:a.params,actions:a.actions},o={data:{...this.defaultContext.data,error:r.error}};return await this.dispatchAction(i,o)}),this.errorHandlingSetup=!0}registerDefaultHandlers(){this.registerHandler("refetchDataSource",async(a,r)=>{const i=a.params?.dataSourceId,o=a.params?.sync;if(!i){z.warn("refetchDataSource: dataSourceId is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.refetch){const u=window.G7Core?.state?.get?.()||{},d={...r.state?._global,...u},f=window.G7Core?.state?.getLocal?.()||{},g=r.data?._local||r.state||{},m={...f,...g},b=r.isolatedContext?.state;z.log("[refetchDataSource] localStateOverride:",m),await window.G7Core.dataSource.refetch(i,{...o?{sync:!0}:{},...d?{globalStateOverride:d}:{},...m?{localStateOverride:m}:{},...b?{isolatedStateOverride:b}:{}})}else z.warn("refetchDataSource: G7Core.dataSource.refetch is not available")}),this.registerHandler("appendDataSource",async(a,r)=>{const{dataSourceId:i,dataPath:o,newData:u}=a.params||{};if(!i){z.warn("appendDataSource: dataSourceId is required");return}if(u===void 0){z.warn("appendDataSource: newData is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.updateData){if(!Array.isArray(u)){z.warn("appendDataSource: newData must be an array, got:",typeof u,u);return}await window.G7Core.dataSource.updLine truncated
*/var wp;function Zw(){if(wp)return ao;wp=1;var l=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(r,i,o){var u=null;if(o!==void 0&&(u=""+o),i.key!==void 0&&(u=""+i.key),"key"in i){o={};for(var d in i)d!=="key"&&(o[d]=i[d])}else o=i;return i=o.ref,{$$typeof:l,type:r,key:u,ref:i!==void 0?i:null,props:o}}return ao.Fragment=e,ao.jsx=a,ao.jsxs=a,ao}var Cp;function e0(){return Cp||(Cp=1,gd.exports=Zw()),gd.exports}var ct=e0();const t0=Ka({__proto__:null,default:Wa(ct)},[ct]),pd=dt("ParentContextProvider"),Ep=N.createContext(null);let Wl=null;function md(){Wl?(pd.log("[triggerModalParentUpdate] 모달 부모 컨텍스트 업데이트 트리거"),Wl()):pd.warn("[triggerModalParentUpdate] Provider가 아직 마운트되지 않음")}const _p=({children:l})=>{const[e,a]=N.useState(0),r=N.useRef(!0),i=N.useCallback(()=>{const u=window.__g7LayoutContextStack||[];return u[u.length-1]?.dataContext},[]);N.useEffect(()=>(r.current=!0,Wl=()=>{r.current&&(a(u=>u+1),pd.log("[ParentContextProvider] 버전 업데이트됨"))},()=>{r.current=!1,Wl=null}),[]);const o={version:e,getParentDataContext:i};return ct.jsx(Ep.Provider,{value:o,children:l})};function n0(){return N.useContext(Ep)}const z=dt("ActionDispatcher"),Ap=new Set(["navigate","navigateBack","navigateForward","replaceUrl","refresh","logout"]),a0=new Set(["redirect"]);function jn(){try{return window.G7Core?.devTools}catch{return}}class Mt extends Error{constructor(e,a,r){super(e),this.action=a,this.originalError=r,this.name="ActionError"}}const ns=class ns{constructor(e={},a,r){$(this,"bindingEngine");$(this,"translationEngine");$(this,"translationContext");$(this,"customHandlers",new Map);$(this,"defaultContext");$(this,"globalStateUpdater");$(this,"errorHandlingSetup",!1);$(this,"debounceTimers",new Map);$(this,"pendingDebounceFlushers",new Map);$(this,"debounceAccumulatedValues",new Map);$(this,"globalHeaders",[]);$(this,"namedActions",{});$(this,"previewMode",!1);$(this,"intervals",new Map);this.bindingEngine=new vn,this.translationEngine=a,this.translationContext=r,this.defaultContext=e,this.registerDefaultHandlers(),this.setupErrorHandling()}setGlobalHeaders(e){this.globalHeaders=e||[]}setNamedActions(e){this.namedActions=e||{};const a=jn();a?.isEnabled?.()&&a.setNamedActionDefinitions?.(this.namedActions),z.log("[setNamedActions] registered:",Object.keys(this.namedActions))}getNamedActions(){return this.namedActions}setPreviewMode(e){this.previewMode=e,z.log("Preview mode:",e?"enabled":"disabled")}isPreviewMode(){return this.previewMode}static getPreviewSuppressedHandlers(){return Ap}static getPreviewSuppressedLayoutFeatures(){return a0}resolveActionRef(e){if(!e.actionRef)return e;const a=this.namedActions[e.actionRef];if(!a)return z.warn(`[resolveActionRef] named action not found: "${e.actionRef}"`),e;const r=jn();r?.isEnabled?.()&&r.trackNamedActionRef?.({actionRefName:e.actionRef,resolvedHandler:a.handler,timestamp:Date.now()});const{actionRef:i,type:o,key:u,event:d,...f}=e,g={...a,...Object.fromEntries(Object.entries(f).filter(([,m])=>m!==void 0)),type:o??a.type};return u!==void 0&&(g.key=u),d!==void 0&&(g.event=d),g}matchesPattern(e,a){if(a==="*")return!0;const r=a.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${r}$`).test(e)}getMatchingGlobalHeaders(e,a){const r={};for(const i of this.globalHeaders)this.matchesPattern(e,i.pattern)&&Object.entries(i.headers).forEach(([o,u])=>{const d=Pi(u,a,{skipCache:!0});d!=null&&d!==""&&(r[o]=String(d))});return r}setupErrorHandling(){if(this.errorHandlingSetup)return;ma().setActionExecutor(async(a,r)=>{const i={type:"click",handler:a.handler,target:a.target,params:a.params,actions:a.actions},o={data:{...this.defaultContext.data,error:r.error}};return await this.dispatchAction(i,o)}),this.errorHandlingSetup=!0}registerDefaultHandlers(){this.registerHandler("refetchDataSource",async(a,r)=>{const i=a.params?.dataSourceId,o=a.params?.sync;if(!i){z.warn("refetchDataSource: dataSourceId is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.refetch){const u=window.G7Core?.state?.get?.()||{},d={...r.state?._global,...u},f=window.G7Core?.state?.getLocal?.()||{},g=r.data?._local||r.state||{},m={...f,...g},b=r.isolatedContext?.state;z.log("[refetchDataSource] localStateOverride:",m),await window.G7Core.dataSource.refetch(i,{...o?{sync:!0}:{},...d?{globalStateOverride:d}:{},...m?{localStateOverride:m}:{},...b?{isolatedStateOverride:b}:{}})}else z.warn("refetchDataSource: G7Core.dataSource.refetch is not available")}),this.registerHandler("appendDataSource",async(a,r)=>{const{dataSourceId:i,dataPath:o,newData:u}=a.params||{};if(!i){z.warn("appendDataSource: dataSourceId is required");return}if(u===void 0){z.warn("appendDataSource: newData is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.updateData){if(!Array.isArray(u)){z.warn("appendDataSource: newData must be an array, got:",typeof u,u);return}await window.G7Core.dataSource.updLine truncated
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
@@ -84,11 +84,11 @@ Error generating stack: `+c.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 o=()=>{a.parentNode&&a.parentNode.removeChild(a)};i.onclick=o;const u=d=>{this.isImeComposing(d)||d.key==="Escape"&&(o(),document.removeEventListener("keydown",u))};return document.addEventListener("keydown",u),a.onclick=d=>{d.target===a&&o()},r.appendChild(i),a.appendChild(r),document.body.appendChild(a),{overlay:a,layer:r,closeLayer:o}}getNestedProperty(e,a){return a.split(".").reduce((r,i)=>r&&r[i]!==void 0?r[i]:void 0,e)}async handleSaveToLocalStorage(e,a){const{key:r,value:i}=e;if(!r)return z.error("saveToLocalStorage: key parameter is required"),!1;try{const o=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(r,o),z.log(`saveToLocalStorage: saved ${r}`,i),!0}catch(o){return z.error("saveToLocalStorage: failed to save",{key:r,error:o}),!1}}async handleLoadFromLocalStorage(e,a){const{key:r,target:i,stateKey:o,defaultValue:u}=e;if(!r)return z.error("loadFromLocalStorage: key parameter is required"),u;try{const d=localStorage.getItem(r);if(d===null)return z.log(`loadFromLocalStorage: no value found for ${r}, using default`),o&&a.setState&&a.setState({[o]:u}),u;let f;try{f=JSON.parse(d)}catch{f=d}return z.log(`loadFromLocalStorage: loaded ${r}`,f),o&&a.setState&&a.setState({[o]:f}),f}catch(d){return z.error("loadFromLocalStorage: failed to load",{key:r,error:d}),u}}async handleCustomAction(e,a){const r=this.customHandlers.get(e.handler);if(!r){if(this.previewMode){z.warn(`[Preview] Unknown action handler "${e.handler}" — skipped (preview mode)`);return}throw new Mt(`Unknown action handler: ${e.handler}`,e)}return await r(e,a)}resolveParams(e,a){if(!e)return{};const r={};for(const[i,o]of Object.entries(e))i.includes("{{")&&z.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof o=="string"&&o.includes("{{")?r[i]=this.evaluateExpression(o,a):typeof o=="string"?r[i]=o:Array.isArray(o)?r[i]=o.map(u=>typeof u=="string"&&u.includes("{{")?this.evaluateExpression(u,a):u):typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null?r[i]=o:typeof o=="object"&&o!==null?r[i]=this.resolveParams(o,a):r[i]=o;return r}resolveValue(e,a){return a?this.bindingEngine.resolveBindings(e,a,{skipCache:!0}):e}evaluateExpressions(e,a){let r={};for(const[i,o]of Object.entries(e))if(i==="..."){let u=o;typeof o=="string"&&o.includes("{{")&&(u=this.evaluateExpression(o,a)),u&&typeof u=="object"&&!Array.isArray(u)&&(r={...r,...u})}else typeof o=="string"&&o.includes("{{")?r[i]=this.evaluateExpression(o,a):typeof o=="object"&&o!==null&&!Array.isArray(o)?r[i]=this.evaluateExpressions(o,a):r[i]=o;return r}evaluateExpressionsIfNeeded(e,a){const r={};for(const[i,o]of Object.entries(e))typeof o=="string"&&o.includes("{{")?r[i]=this.evaluateExpression(o,a):r[i]=o;return r}evaluateExpression(e,a){if(!a)return e;const r=e.match(/^\{\{(.+)\}\}$/);if(!(r&&!r[1].includes("}}")&&!r[1].includes("{{"))){let d=a;if(e.includes("_global")){const g=window.G7Core?.state?.get()?._global;g&&(d={...a,_global:g})}if(e.includes("_computed")||e.includes("$computed")){const g=window.__g7ActionContext?.computedRef?.current;g&&Object.keys(g).length>0&&(d={...d,_computed:g,$computed:g})}return this.bindingEngine.resolveBindings(e,d,{skipCache:!0})}let o=r[1].trim();o=o.replace(/\$args\.(\d+)/g,"$args[$1]");let u=a;if(o.includes("_global")){const f=window.G7Core?.state?.get()?._global;f&&(u={...a,_global:f})}if(o.includes("_computed")||o.includes("$computed")){const f=window.__g7ActionContext?.computedRef?.current;f&&Object.keys(f).length>0&&(u={...u,_computed:f,$computed:f})}o.includes("_global.modules")&&(z.log("[evaluateExpression] expression:",o),z.log("[evaluateExpression] dataContext._global:",u._global),z.log("[evaluateExpression] dataContext._global?.modules:",u._global?.modules));try{const d=this.bindingEngine.evaluateExpression(o,u);return o.includes("_global.modules")&&z.log("[evaluateExpression] result:",d),typeof d=="string"&&d.startsWith("$t:")&&this.translationEngine&&this.translationContext?this.translationEngine.resolveTranslations(d,this.translationContext,a):d}catch(d){return z.error("Expression evaluation failed:",e,d),e}}setDefaultContext(e){this.defaultContext={...this.defaultContext,...e}}setGlobalStateUpdater(e){this.globalStateUpdater=e}getGlobalStateUpdater(){return this.globalStateUpdater}async dispatchAction(e,a){const r={...this.defaultContext,...a,data:{...this.defaultContext.data,...a?.data}};if(e.confirm){let i=this.resolveValue(e.confirm,r.data);if(this.translationEngine&&this.translationContext&&i.startsWith("$t:")&&(i=this.translationEngine.resolveTranslations(i,this.translationContext,r.data)),!confirm(i))return{success:!1}}try{return await this.executeActi 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 o=()=>{a.parentNode&&a.parentNode.removeChild(a)};i.onclick=o;const u=d=>{this.isImeComposing(d)||d.key==="Escape"&&(o(),document.removeEventListener("keydown",u))};return document.addEventListener("keydown",u),a.onclick=d=>{d.target===a&&o()},r.appendChild(i),a.appendChild(r),document.body.appendChild(a),{overlay:a,layer:r,closeLayer:o}}getNestedProperty(e,a){return a.split(".").reduce((r,i)=>r&&r[i]!==void 0?r[i]:void 0,e)}async handleSaveToLocalStorage(e,a){const{key:r,value:i}=e;if(!r)return z.error("saveToLocalStorage: key parameter is required"),!1;try{const o=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(r,o),z.log(`saveToLocalStorage: saved ${r}`,i),!0}catch(o){return z.error("saveToLocalStorage: failed to save",{key:r,error:o}),!1}}async handleLoadFromLocalStorage(e,a){const{key:r,target:i,stateKey:o,defaultValue:u}=e;if(!r)return z.error("loadFromLocalStorage: key parameter is required"),u;try{const d=localStorage.getItem(r);if(d===null)return z.log(`loadFromLocalStorage: no value found for ${r}, using default`),o&&a.setState&&a.setState({[o]:u}),u;let f;try{f=JSON.parse(d)}catch{f=d}return z.log(`loadFromLocalStorage: loaded ${r}`,f),o&&a.setState&&a.setState({[o]:f}),f}catch(d){return z.error("loadFromLocalStorage: failed to load",{key:r,error:d}),u}}async handleCustomAction(e,a){const r=this.customHandlers.get(e.handler);if(!r){if(this.previewMode){z.warn(`[Preview] Unknown action handler "${e.handler}" — skipped (preview mode)`);return}throw new Mt(`Unknown action handler: ${e.handler}`,e)}return await r(e,a)}resolveParams(e,a){if(!e)return{};const r={};for(const[i,o]of Object.entries(e))i.includes("{{")&&z.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof o=="string"&&o.includes("{{")?r[i]=this.evaluateExpression(o,a):typeof o=="string"?r[i]=o:Array.isArray(o)?r[i]=o.map(u=>typeof u=="string"&&u.includes("{{")?this.evaluateExpression(u,a):u):typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null?r[i]=o:typeof o=="object"&&o!==null?r[i]=this.resolveParams(o,a):r[i]=o;return r}resolveValue(e,a){return a?this.bindingEngine.resolveBindings(e,a,{skipCache:!0}):e}evaluateExpressions(e,a){let r={};for(const[i,o]of Object.entries(e))if(i==="..."){let u=o;typeof o=="string"&&o.includes("{{")&&(u=this.evaluateExpression(o,a)),u&&typeof u=="object"&&!Array.isArray(u)&&(r={...r,...u})}else typeof o=="string"&&o.includes("{{")?r[i]=this.evaluateExpression(o,a):typeof o=="object"&&o!==null&&!Array.isArray(o)?r[i]=this.evaluateExpressions(o,a):r[i]=o;return r}evaluateExpressionsIfNeeded(e,a){const r={};for(const[i,o]of Object.entries(e))typeof o=="string"&&o.includes("{{")?r[i]=this.evaluateExpression(o,a):r[i]=o;return r}evaluateExpression(e,a){if(!a)return e;const r=e.match(/^\{\{(.+)\}\}$/);if(!(r&&!r[1].includes("}}")&&!r[1].includes("{{"))){let d=a;if(e.includes("_global")){const g=window.G7Core?.state?.get()?._global;g&&(d={...a,_global:g})}if(e.includes("_computed")||e.includes("$computed")){const g=window.__g7ActionContext?.computedRef?.current;g&&Object.keys(g).length>0&&(d={...d,_computed:g,$computed:g})}return this.bindingEngine.resolveBindings(e,d,{skipCache:!0})}let o=r[1].trim();o=o.replace(/\$args\.(\d+)/g,"$args[$1]");let u=a;if(o.includes("_global")){const f=window.G7Core?.state?.get()?._global;f&&(u={...a,_global:f})}if(o.includes("_computed")||o.includes("$computed")){const f=window.__g7ActionContext?.computedRef?.current;f&&Object.keys(f).length>0&&(u={...u,_computed:f,$computed:f})}o.includes("_global.modules")&&(z.log("[evaluateExpression] expression:",o),z.log("[evaluateExpression] dataContext._global:",u._global),z.log("[evaluateExpression] dataContext._global?.modules:",u._global?.modules));try{const d=this.bindingEngine.evaluateExpression(o,u);return o.includes("_global.modules")&&z.log("[evaluateExpression] result:",d),typeof d=="string"&&d.startsWith("$t:")&&this.translationEngine&&this.translationContext?this.translationEngine.resolveTranslations(d,this.translationContext,a):d}catch(d){return z.error("Expression evaluation failed:",e,d),e}}setDefaultContext(e){this.defaultContext={...this.defaultContext,...e}}setGlobalStateUpdater(e){this.globalStateUpdater=e}getGlobalStateUpdater(){return this.globalStateUpdater}async dispatchAction(e,a){const r={...this.defaultContext,...a,data:{...this.defaultContext.data,...a?.data}};if(e.confirm){let i=this.resolveValue(e.confirm,r.data);if(this.translationEngine&&this.translationContext&&i.startsWith("$t:")&&(i=this.translationEngine.resolveTranslations(i,this.translationContext,r.data)),!confirm(i))return{success:!1}}try{return await this.executeActi 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.
`},M0={onDragStart(l){let{active:e}=l;return"Picked up draggable item "+e.id+"."},onDragOver(l){let{active:e,over:a}=l;return a?"Draggable item "+e.id+" was moved over droppable area "+a.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(l){let{active:e,over:a}=l;return a?"Draggable item "+e.id+" was dropped over droppable area "+a.id:"Draggable item "+e.id+" was dropped."},onDragCancel(l){let{active:e}=l;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function $0(l){let{announcements:e=M0,container:a,hiddenTextDescribedById:r,screenReaderInstructions:i=L0}=l;const{announce:o,announcement:u}=R0(),d=lo("DndLiveRegion"),[f,g]=N.useState(!1);if(N.useEffect(()=>{g(!0)},[]),D0(N.useMemo(()=>({onDragStart(b){let{active:v}=b;o(e.onDragStart({active:v}))},onDragMove(b){let{active:v,over:E}=b;e.onDragMove&&o(e.onDragMove({active:v,over:E}))},onDragOver(b){let{active:v,over:E}=b;o(e.onDragOver({active:v,over:E}))},onDragEnd(b){let{active:v,over:E}=b;o(e.onDragEnd({active:v,over:E}))},onDragCancel(b){let{active:v,over:E}=b;o(e.onDragCancel({active:v,over:E}))}}),[o,e])),!f)return null;const m=We.createElement(We.Fragment,null,We.createElement(T0,{id:r,value:i.draggable}),We.createElement(k0,{id:d,announcement:u}));return a?Ar.createPortal(m,a):m}var Zt;(function(l){l.DragStart="dragStart",l.DragMove="dragMove",l.DragEnd="dragEnd",l.DragCancel="dragCancel",l.DragOver="dragOver",l.RegisterDroppable="registerDroppable",l.SetDroppableDisabled="setDroppableDisabled",l.UnregisterDroppable="unregisterDroppable"})(Zt||(Zt={}));function ec(){}function jp(l,e){return N.useMemo(()=>({sensor:l,options:e??{}}),[l,e])}function N0(){for(var l=arguments.length,e=new Array(l),a=0;a<l;a++)e[a]=arguments[a];return N.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const ya=Object.freeze({x:0,y:0});function Up(l,e){return Math.sqrt(Math.pow(l.x-e.x,2)+Math.pow(l.y-e.y,2))}function Bp(l,e){let{data:{value:a}}=l,{data:{value:r}}=e;return a-r}function H0(l,e){let{data:{value:a}}=l,{data:{value:r}}=e;return r-a}function qp(l){let{left:e,top:a,height:r,width:i}=l;return[{x:e,y:a},{x:e+i,y:a},{x:e,y:a+r},{x:e+i,y:a+r}]}function Pp(l,e){if(!l||l.length===0)return null;const[a]=l;return a[e]}function Gp(l,e,a){return e===void 0&&(e=l.left),a===void 0&&(a=l.top),{x:e+l.width*.5,y:a+l.height*.5}}const z0=l=>{let{collisionRect:e,droppableRects:a,droppableContainers:r}=l;const i=Gp(e,e.left,e.top),o=[];for(const u of r){const{id:d}=u,f=a.get(d);if(f){const g=Up(Gp(f),i);o.push({id:d,data:{droppableContainer:u,value:g}})}}return o.sort(Bp)},I0=l=>{let{collisionRect:e,droppableRects:a,droppableContainers:r}=l;const i=qp(e),o=[];for(const u of r){const{id:d}=u,f=a.get(d);if(f){const g=qp(f),m=i.reduce((v,E,S)=>v+Up(g[S],E),0),b=Number((m/4).toFixed(4));o.push({id:d,data:{droppableContainer:u,value:b}})}}return o.sort(Bp)};function j0(l,e){const a=Math.max(e.top,l.top),r=Math.max(e.left,l.left),i=Math.min(e.left+e.width,l.left+l.width),o=Math.min(e.top+e.height,l.top+l.height),u=i-r,d=o-a;if(r<i&&a<o){const f=e.width*e.height,g=l.width*l.height,m=u*d,b=m/(f+g-m);return Number(b.toFixed(4))}return 0}const U0=l=>{let{collisionRect:e,droppableRects:a,droppableContainers:r}=l;const i=[];for(const o of r){const{id:u}=o,d=a.get(u);if(d){const f=j0(d,e);f>0&&i.push({id:u,data:{droppableContainer:o,value:f}})}}return i.sort(H0)};function B0(l,e,a){return{...l,scaleX:e&&a?e.width/a.width:1,scaleY:e&&a?e.height/a.height:1}}function Vp(l,e){return l&&e?{x:l.left-e.left,y:l.top-e.top}:ya}function q0(l){return function(a){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((u,d)=>({...u,top:u.top+l*d.y,bottom:u.bottom+l*d.y,left:u.left+l*d.x,right:u.right+l*d.x}),{...a})}}const P0=q0(1);function G0(l){if(l.startsWith("matrix3d(")){const e=l.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(l.startsWith("matrix(")){const e=l.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function V0(l,e,a){const r=G0(e);if(!r)return l;const{scaleX:i,scaleY:o,x:u,y:d}=r,f=l.left-u-(1-i)*parseFloat(a),g=l.top-d-(1-o)*parseFloat(a.slice(a.indexOf(" ")+1)),m=i?l.width/i:l.width,b=o?l.height/o:l.height;return{width:m,height:b,top:g,right:f+m,bottom:g+b,left:f}}const F0={ignoreTransform:!1};function Qi(l,e){e===void 0&&(e=F0);let a=l.getBoundingClientRect();if(e.ignoreTransform){const{transform:g,transformOrigin:m}=Tn(l).getComputedStyle(l);g&&(a=V0(a,g,m))}const{top:r,left:i,width:o,height:u,bottom:d,right:f}=a;return{top:r,left:i,width:o,height:u,bottom:d,right:f}}function Fp(l){return Qi(l,{ignoreTransform:!0})}function K0(l){const e=l.innerWidth,a=l.innerHeight;return{top:0,left:0,right:e,bottom:a,width:e,height:a}}function W0(l,e){return e===void 0&&(e=Tn(l).getComputedStyle(l)),e.position==="fixed"}function Y0(l,e){e===void 0&&(e=Tn(l).getComputedStyle(l));const a=/(auto|scroll|overlay)/;return["overflow","overflowX Line truncated
`},L0={onDragStart(l){let{active:e}=l;return"Picked up draggable item "+e.id+"."},onDragOver(l){let{active:e,over:a}=l;return a?"Draggable item "+e.id+" was moved over droppable area "+a.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(l){let{active:e,over:a}=l;return a?"Draggable item "+e.id+" was dropped over droppable area "+a.id:"Draggable item "+e.id+" was dropped."},onDragCancel(l){let{active:e}=l;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function M0(l){let{announcements:e=L0,container:a,hiddenTextDescribedById:r,screenReaderInstructions:i=O0}=l;const{announce:o,announcement:u}=k0(),d=lo("DndLiveRegion"),[f,g]=N.useState(!1);if(N.useEffect(()=>{g(!0)},[]),R0(N.useMemo(()=>({onDragStart(b){let{active:v}=b;o(e.onDragStart({active:v}))},onDragMove(b){let{active:v,over:E}=b;e.onDragMove&&o(e.onDragMove({active:v,over:E}))},onDragOver(b){let{active:v,over:E}=b;o(e.onDragOver({active:v,over:E}))},onDragEnd(b){let{active:v,over:E}=b;o(e.onDragEnd({active:v,over:E}))},onDragCancel(b){let{active:v,over:E}=b;o(e.onDragCancel({active:v,over:E}))}}),[o,e])),!f)return null;const m=We.createElement(We.Fragment,null,We.createElement(x0,{id:r,value:i.draggable}),We.createElement(T0,{id:d,announcement:u}));return a?Ar.createPortal(m,a):m}var Jt;(function(l){l.DragStart="dragStart",l.DragMove="dragMove",l.DragEnd="dragEnd",l.DragCancel="dragCancel",l.DragOver="dragOver",l.RegisterDroppable="registerDroppable",l.SetDroppableDisabled="setDroppableDisabled",l.UnregisterDroppable="unregisterDroppable"})(Jt||(Jt={}));function ec(){}function jp(l,e){return N.useMemo(()=>({sensor:l,options:e??{}}),[l,e])}function $0(){for(var l=arguments.length,e=new Array(l),a=0;a<l;a++)e[a]=arguments[a];return N.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const ya=Object.freeze({x:0,y:0});function Up(l,e){return Math.sqrt(Math.pow(l.x-e.x,2)+Math.pow(l.y-e.y,2))}function Bp(l,e){let{data:{value:a}}=l,{data:{value:r}}=e;return a-r}function N0(l,e){let{data:{value:a}}=l,{data:{value:r}}=e;return r-a}function qp(l){let{left:e,top:a,height:r,width:i}=l;return[{x:e,y:a},{x:e+i,y:a},{x:e,y:a+r},{x:e+i,y:a+r}]}function Pp(l,e){if(!l||l.length===0)return null;const[a]=l;return a[e]}function Gp(l,e,a){return e===void 0&&(e=l.left),a===void 0&&(a=l.top),{x:e+l.width*.5,y:a+l.height*.5}}const H0=l=>{let{collisionRect:e,droppableRects:a,droppableContainers:r}=l;const i=Gp(e,e.left,e.top),o=[];for(const u of r){const{id:d}=u,f=a.get(d);if(f){const g=Up(Gp(f),i);o.push({id:d,data:{droppableContainer:u,value:g}})}}return o.sort(Bp)},z0=l=>{let{collisionRect:e,droppableRects:a,droppableContainers:r}=l;const i=qp(e),o=[];for(const u of r){const{id:d}=u,f=a.get(d);if(f){const g=qp(f),m=i.reduce((v,E,S)=>v+Up(g[S],E),0),b=Number((m/4).toFixed(4));o.push({id:d,data:{droppableContainer:u,value:b}})}}return o.sort(Bp)};function I0(l,e){const a=Math.max(e.top,l.top),r=Math.max(e.left,l.left),i=Math.min(e.left+e.width,l.left+l.width),o=Math.min(e.top+e.height,l.top+l.height),u=i-r,d=o-a;if(r<i&&a<o){const f=e.width*e.height,g=l.width*l.height,m=u*d,b=m/(f+g-m);return Number(b.toFixed(4))}return 0}const j0=l=>{let{collisionRect:e,droppableRects:a,droppableContainers:r}=l;const i=[];for(const o of r){const{id:u}=o,d=a.get(u);if(d){const f=I0(d,e);f>0&&i.push({id:u,data:{droppableContainer:o,value:f}})}}return i.sort(N0)};function U0(l,e,a){return{...l,scaleX:e&&a?e.width/a.width:1,scaleY:e&&a?e.height/a.height:1}}function Vp(l,e){return l&&e?{x:l.left-e.left,y:l.top-e.top}:ya}function B0(l){return function(a){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((u,d)=>({...u,top:u.top+l*d.y,bottom:u.bottom+l*d.y,left:u.left+l*d.x,right:u.right+l*d.x}),{...a})}}const q0=B0(1);function P0(l){if(l.startsWith("matrix3d(")){const e=l.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(l.startsWith("matrix(")){const e=l.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function G0(l,e,a){const r=P0(e);if(!r)return l;const{scaleX:i,scaleY:o,x:u,y:d}=r,f=l.left-u-(1-i)*parseFloat(a),g=l.top-d-(1-o)*parseFloat(a.slice(a.indexOf(" ")+1)),m=i?l.width/i:l.width,b=o?l.height/o:l.height;return{width:m,height:b,top:g,right:f+m,bottom:g+b,left:f}}const V0={ignoreTransform:!1};function Ji(l,e){e===void 0&&(e=V0);let a=l.getBoundingClientRect();if(e.ignoreTransform){const{transform:g,transformOrigin:m}=xn(l).getComputedStyle(l);g&&(a=G0(a,g,m))}const{top:r,left:i,width:o,height:u,bottom:d,right:f}=a;return{top:r,left:i,width:o,height:u,bottom:d,right:f}}function Fp(l){return Ji(l,{ignoreTransform:!0})}function F0(l){const e=l.innerWidth,a=l.innerHeight;return{top:0,left:0,right:e,bottom:a,width:e,height:a}}function K0(l,e){return e===void 0&&(e=xn(l).getComputedStyle(l)),e.position==="fixed"}function W0(l,e){e===void 0&&(e=xn(l).getComputedStyle(l));const a=/(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>
@@ -139,14 +139,14 @@ Error generating stack: `+c.message+`
"
>페이지 새로고침</button>
</div>
`,Un.error("Error state rendered:",i,r)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Un.log("Layout data and cache cleared")}}const SE=dt("TranslationContext"),Bd=N.createContext(null),uc=({children:l,translationEngine:e,translationContext:a})=>{const r=N.useMemo(()=>(o,u)=>{if(u){const d="|"+Object.entries(u).map(([f,g])=>`${f}=${g}`).join("|");return e.translate(o,a,d)}return e.translate(o,a)},[e,a]),i=N.useMemo(()=>({translationEngine:e,translationContext:a,t:r}),[e,a,r]);return ct.jsx(Bd.Provider,{value:i,children:l})},vm=()=>{const l=N.useContext(Bd);return l||(SE.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},kr=dt("SlotContext"),wE={registerToSlot:()=>{kr.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{kr.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},CE=N.createContext(wE),qd=({children:l})=>{const e=N.useRef(new Map),a=N.useRef(new Map),r=N.useCallback(m=>{const b=a.current.get(m);b&&b.forEach(v=>{try{v()}catch(E){kr.error(`Slot subscriber error (slotId: ${m}):`,E)}})},[]),i=N.useCallback((m,b,v)=>{if(!m||!b){kr.warn("registerToSlot: slotId and componentId are required");return}e.current.has(m)||e.current.set(m,new Map);const E=e.current.get(m),S=E.get(b);S&&S.registrationKey===v.registrationKey||(E.set(b,v),kr.log(`Component registered to slot: ${b} -> ${m} (order: ${v.order})`),r(m))},[r]),o=N.useCallback((m,b)=>{const v=e.current.get(m);v&&v.has(b)&&(v.delete(b),kr.log(`Component unregistered from slot: ${b} <- ${m}`),v.size===0&&e.current.delete(m),r(m))},[r]),u=N.useCallback(m=>{const b=e.current.get(m);return b?Array.from(b.values()).sort((v,E)=>v.order-E.order):[]},[]),d=N.useCallback((m,b)=>{a.current.has(m)||a.current.set(m,new Set);const v=a.current.get(m);return v.add(b),()=>{v.delete(b),v.size===0&&a.current.delete(m)}},[]),f=N.useCallback(()=>{e.current.forEach((m,b)=>{r(b)}),e.current.clear(),a.current.clear(),kr.log("All slots cleared")},[r]),g=N.useMemo(()=>({registerToSlot:i,unregisterFromSlot:o,getSlotComponents:u,subscribeToSlot:d,clearAllSlots:f,isEnabled:!0}),[i,o,u,d,f]);return N.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=g,kr.log("SlotContext exposed to window.__slotContextValue"))},[g]),ct.jsx(CE.Provider,{value:g,children:l})};class Pd{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,a){return this.listen(".client-"+e,a)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,a){return this.stopListening(".client-"+e,a)}}class Sm{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 EE(l){try{new l}catch(e){if(e instanceof Error&&e.message.includes("is not a constructor"))return!1}return!0}class Gd extends Pd{constructor(e,a,r){super(),this.name=a,this.pusher=e,this.options=r,this.eventFormatter=new Sm(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,a){return this.on(this.eventFormatter.format(e),a),this}listenToAll(e){return this.subscription.bind_global((a,r)=>{if(a.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),o=a.startsWith(i)?a.substring(i.length+1):"."+a;e(o,r)}),this}stopListening(e,a){return a?this.subscription.unbind(this.eventFormatter.format(e),a):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",a=>{e(a)}),this}on(e,a){return this.subscription.bind(e,a),this}}class wm extends Gd{whisper(e,a){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,a),this}}class _E extends Gd{whisper(e,a){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,a),this}}class AE extends wm{here(e){return this.on("pusher:subscription_succeeded",a=>{e(Object.keys(a.members).map(r=>a.members[r]))}),this}joining(e){return this.on("pusher:member_added",a=>{e(a.info)}),this}whisper(e,a){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,a),this}leaving(e){return this.on("pusher:member_removed",a=>{e(a.info)}),this}}class Cm extends Pd{constructor(e,a,r){super(),this.events={},this.listeners={},this.name=a,this.socket=e,this.op Line truncated
`,Un.error("Error state rendered:",i,r)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Un.log("Layout data and cache cleared")}}const vE=dt("TranslationContext"),Bd=N.createContext(null),uc=({children:l,translationEngine:e,translationContext:a})=>{const r=N.useMemo(()=>(o,u)=>{if(u){const d="|"+Object.entries(u).map(([f,g])=>`${f}=${g}`).join("|");return e.translate(o,a,d)}return e.translate(o,a)},[e,a]),i=N.useMemo(()=>({translationEngine:e,translationContext:a,t:r}),[e,a,r]);return ct.jsx(Bd.Provider,{value:i,children:l})},vm=()=>{const l=N.useContext(Bd);return l||(vE.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},kr=dt("SlotContext"),SE={registerToSlot:()=>{kr.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{kr.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},wE=N.createContext(SE),qd=({children:l})=>{const e=N.useRef(new Map),a=N.useRef(new Map),r=N.useCallback(m=>{const b=a.current.get(m);b&&b.forEach(v=>{try{v()}catch(E){kr.error(`Slot subscriber error (slotId: ${m}):`,E)}})},[]),i=N.useCallback((m,b,v)=>{if(!m||!b){kr.warn("registerToSlot: slotId and componentId are required");return}e.current.has(m)||e.current.set(m,new Map);const E=e.current.get(m),S=E.get(b);S&&S.registrationKey===v.registrationKey||(E.set(b,v),kr.log(`Component registered to slot: ${b} -> ${m} (order: ${v.order})`),r(m))},[r]),o=N.useCallback((m,b)=>{const v=e.current.get(m);v&&v.has(b)&&(v.delete(b),kr.log(`Component unregistered from slot: ${b} <- ${m}`),v.size===0&&e.current.delete(m),r(m))},[r]),u=N.useCallback(m=>{const b=e.current.get(m);return b?Array.from(b.values()).sort((v,E)=>v.order-E.order):[]},[]),d=N.useCallback((m,b)=>{a.current.has(m)||a.current.set(m,new Set);const v=a.current.get(m);return v.add(b),()=>{v.delete(b),v.size===0&&a.current.delete(m)}},[]),f=N.useCallback(()=>{e.current.forEach((m,b)=>{r(b)}),e.current.clear(),a.current.clear(),kr.log("All slots cleared")},[r]),g=N.useMemo(()=>({registerToSlot:i,unregisterFromSlot:o,getSlotComponents:u,subscribeToSlot:d,clearAllSlots:f,isEnabled:!0}),[i,o,u,d,f]);return N.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=g,kr.log("SlotContext exposed to window.__slotContextValue"))},[g]),ct.jsx(wE.Provider,{value:g,children:l})};class Pd{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,a){return this.listen(".client-"+e,a)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,a){return this.stopListening(".client-"+e,a)}}class Sm{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 CE(l){try{new l}catch(e){if(e instanceof Error&&e.message.includes("is not a constructor"))return!1}return!0}class Gd extends Pd{constructor(e,a,r){super(),this.name=a,this.pusher=e,this.options=r,this.eventFormatter=new Sm(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,a){return this.on(this.eventFormatter.format(e),a),this}listenToAll(e){return this.subscription.bind_global((a,r)=>{if(a.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),o=a.startsWith(i)?a.substring(i.length+1):"."+a;e(o,r)}),this}stopListening(e,a){return a?this.subscription.unbind(this.eventFormatter.format(e),a):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",a=>{e(a)}),this}on(e,a){return this.subscription.bind(e,a),this}}class wm extends Gd{whisper(e,a){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,a),this}}class EE extends Gd{whisper(e,a){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,a),this}}class _E extends wm{here(e){return this.on("pusher:subscription_succeeded",a=>{e(Object.keys(a.members).map(r=>a.members[r]))}),this}joining(e){return this.on("pusher:member_added",a=>{e(a.info)}),this}whisper(e,a){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,a),this}leaving(e){return this.on("pusher:member_removed",a=>{e(a.info)}),this}}class Cm extends Pd{constructor(e,a,r){super(),this.events={},this.listeners={},this.name=a,this.socket=e,this.op Line truncated
* Pusher JavaScript Library v8.4.0
* https://pusher.com/
*
* Copyright 2020, Pusher
* Released under the MIT licence.
*/var Tm;function OE(){return Tm||(Tm=1,(function(l,e){(function(r,i){l.exports=i()})(window,function(){return(function(a){var r={};function i(o){if(r[o])return r[o].exports;var u=r[o]={i:o,l:!1,exports:{}};return a[o].call(u.exports,u,u.exports,i),u.l=!0,u.exports}return i.m=a,i.c=r,i.d=function(o,u,d){i.o(o,u)||Object.defineProperty(o,u,{enumerable:!0,get:d})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,u){if(u&1&&(o=i(o)),u&8||u&4&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(i.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),u&2&&typeof o!="string")for(var f in o)i.d(d,f,function(g){return o[g]}.bind(null,f));return d},i.n=function(o){var u=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(u,"a",u),u},i.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)},i.p="",i(i.s=2)})([(function(a,r,i){var o=this&&this.__extends||(function(){var A=function(T,D){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,O){M.__proto__=O}||function(M,O){for(var L in O)O.hasOwnProperty(L)&&(M[L]=O[L])},A(T,D)};return function(T,D){A(T,D);function M(){this.constructor=T}T.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})();Object.defineProperty(r,"__esModule",{value:!0});var u=256,d=(function(){function A(T){T===void 0&&(T="="),this._paddingCharacter=T}return A.prototype.encodedLength=function(T){return this._paddingCharacter?(T+2)/3*4|0:(T*8+5)/6|0},A.prototype.encode=function(T){for(var D="",M=0;M<T.length-2;M+=3){var O=T[M]<<16|T[M+1]<<8|T[M+2];D+=this._encodeByte(O>>>18&63),D+=this._encodeByte(O>>>12&63),D+=this._encodeByte(O>>>6&63),D+=this._encodeByte(O>>>0&63)}var L=T.length-M;if(L>0){var O=T[M]<<16|(L===2?T[M+1]<<8:0);D+=this._encodeByte(O>>>18&63),D+=this._encodeByte(O>>>12&63),L===2?D+=this._encodeByte(O>>>6&63):D+=this._paddingCharacter||"",D+=this._paddingCharacter||""}return D},A.prototype.maxDecodedLength=function(T){return this._paddingCharacter?T/4*3|0:(T*6+7)/8|0},A.prototype.decodedLength=function(T){return this.maxDecodedLength(T.length-this._getPaddingLength(T))},A.prototype.decode=function(T){if(T.length===0)return new Uint8Array(0);for(var D=this._getPaddingLength(T),M=T.length-D,O=new Uint8Array(this.maxDecodedLength(M)),L=0,P=0,U=0,B=0,Y=0,ge=0,Ae=0;P<M-4;P+=4)B=this._decodeChar(T.charCodeAt(P+0)),Y=this._decodeChar(T.charCodeAt(P+1)),ge=this._decodeChar(T.charCodeAt(P+2)),Ae=this._decodeChar(T.charCodeAt(P+3)),O[L++]=B<<2|Y>>>4,O[L++]=Y<<4|ge>>>2,O[L++]=ge<<6|Ae,U|=B&u,U|=Y&u,U|=ge&u,U|=Ae&u;if(P<M-1&&(B=this._decodeChar(T.charCodeAt(P)),Y=this._decodeChar(T.charCodeAt(P+1)),O[L++]=B<<2|Y>>>4,U|=B&u,U|=Y&u),P<M-2&&(ge=this._decodeChar(T.charCodeAt(P+2)),O[L++]=Y<<4|ge>>>2,U|=ge&u),P<M-3&&(Ae=this._decodeChar(T.charCodeAt(P+3)),O[L++]=ge<<6|Ae,U|=Ae&u),U!==0)throw new Error("Base64Coder: incorrect characters for decoding");return O},A.prototype._encodeByte=function(T){var D=T;return D+=65,D+=25-T>>>8&6,D+=51-T>>>8&-75,D+=61-T>>>8&-15,D+=62-T>>>8&3,String.fromCharCode(D)},A.prototype._decodeChar=function(T){var D=u;return D+=(42-T&T-44)>>>8&-u+T-43+62,D+=(46-T&T-48)>>>8&-u+T-47+63,D+=(47-T&T-58)>>>8&-u+T-48+52,D+=(64-T&T-91)>>>8&-u+T-65+0,D+=(96-T&T-123)>>>8&-u+T-97+26,D},A.prototype._getPaddingLength=function(T){var D=0;if(this._paddingCharacter){for(var M=T.length-1;M>=0&&T[M]===this._paddingCharacter;M--)D++;if(T.length<4||D>2)throw new Error("Base64Coder: incorrect padding")}return D},A})();r.Coder=d;var f=new d;function g(A){return f.encode(A)}r.encode=g;function m(A){return f.decode(A)}r.decode=m;var b=(function(A){o(T,A);function T(){return A!==null&&A.apply(this,arguments)||this}return T.prototype._encodeByte=function(D){var M=D;return M+=65,M+=25-D>>>8&6,M+=51-D>>>8&-75,M+=61-D>>>8&-13,M+=62-D>>>8&49,String.fromCharCode(M)},T.prototype._decodeChar=function(D){var M=u;return M+=(44-D&D-46)>>>8&-u+D-45+62,M+=(94-D&D-96)>>>8&-u+D-95+63,M+=(47-D&D-58)>>>8&-u+D-48+52,M+=(64-D&D-91)>>>8&-u+D-65+0,M+=(96-D&D-123)>>>8&-u+D-97+26,M},T})(d);r.URLSafeCoder=b;var v=new b;function E(A){return v.encode(A)}r.encodeURLSafe=E;function S(A){return v.decode(A)}r.decodeURLSafe=S,r.encodedLength=function(A){return f.encodedLength(A)},r.maxDecodedLength=function(A){return f.maxDecodedLength(A)},r.decodedLength=function(A){return f.decodedLength(A)}}),(function(a,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o="utf8: invalid string",u="utf8: invalid source encoding";function d(m){for(var b=new Uint8Array(f(m)),v=0,E=0;E<m.length;E++){var S=m.charCodeAt(E);S<128?b[v++]=S:S<2048?(b[v++]=192|S>>6,b[v++]=128|S&63):S<55296?(b[v++]=224|S>>12,b[v++]=128|S>>6&63,b[v++]=128|S&63):(E++,S=(S&1023)<<10,S|=m.charCodeAt(E)&1023,S+=65536,b[v++]=240|S>>18,b[v++]=128|S>>12&63,b[v++]=128|S>>6&63,b[v++]=128|S&63)}return b}r.encode=d;function f(m){for(var b=0,v=0Line truncated
`);return R!==-1?(this.position+=R+1,C.slice(0,R)):null}isBufferTooLong(y){return this.position===y.length&&y.length>$r}}var os;(function(_){_[_.CONNECTING=0]="CONNECTING",_[_.OPEN=1]="OPEN",_[_.CLOSED=3]="CLOSED"})(os||(os={}));var Ba=os,Oo=1;class nf{constructor(y,C){this.hooks=y,this.session=cs(1e3)+"/"+Nr(8),this.location=af(C),this.readyState=Ba.CONNECTING,this.openStream()}send(y){return this.sendRaw(JSON.stringify([y]))}ping(){this.hooks.sendHeartbeat(this)}close(y,C){this.onClose(y,C,!0)}sendRaw(y){if(this.readyState===Ba.OPEN)try{return Ge.createSocketRequest("POST",aa(ls(this.location,this.session))).start(y),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(y,C,R){this.closeStream(),this.readyState=Ba.CLOSED,this.onclose&&this.onclose({code:y,reason:C,wasClean:R})}onChunk(y){if(y.status===200){this.readyState===Ba.OPEN&&this.onActivity();var C,R=y.data.slice(0,1);switch(R){case"o":C=JSON.parse(y.data.slice(1)||"{}"),this.onOpen(C);break;case"a":C=JSON.parse(y.data.slice(1)||"[]");for(var H=0;H<C.length;H++)this.onEvent(C[H]);break;case"m":C=JSON.parse(y.data.slice(1)||"null"),this.onEvent(C);break;case"h":this.hooks.onHeartbeat(this);break;case"c":C=JSON.parse(y.data.slice(1)||"[]"),this.onClose(C[0],C[1],!0);break}}}onOpen(y){this.readyState===Ba.CONNECTING?(y&&y.hostname&&(this.location.base=Lo(this.location.base,y.hostname)),this.readyState=Ba.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(y){this.readyState===Ba.OPEN&&this.onmessage&&this.onmessage({data:y})}onActivity(){this.onactivity&&this.onactivity()}onError(y){this.onerror&&this.onerror(y)}openStream(){this.stream=Ge.createSocketRequest("POST",aa(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",y=>{this.onChunk(y)}),this.stream.bind("finished",y=>{this.hooks.onFinished(this,y)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(y){te.defer(()=>{this.onError(y),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function af(_){var y=/([^\?]*)\/*(\??.*)/.exec(_);return{base:y[1],queryString:y[2]}}function ls(_,y){return _.base+"/"+y+"/xhr_send"}function aa(_){var y=_.indexOf("?")===-1?"?":"&";return _+y+"t="+ +new Date+"&n="+Oo++}function Lo(_,y){var C=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(_);return C[1]+y+C[3]}function cs(_){return Ge.randomInt(_)}function Nr(_){for(var y=[],C=0;C<_;C++)y.push(cs(32).toString(32));return y.join("")}var Hr=nf,_c={getReceiveURL:function(_,y){return _.base+"/"+y+"/xhr_streaming"+_.queryString},onHeartbeat:function(_){_.sendRaw("[]")},sendHeartbeat:function(_){_.sendRaw("[]")},onFinished:function(_,y){_.onClose(1006,"Connection interrupted ("+y+")",!1)}},Mo=_c,Ac={getReceiveURL:function(_,y){return _.base+"/"+y+"/xhr"+_.queryString},onHeartbeat:function(){},sendHeartbeat:function(_){_.sendRaw("[]")},onFinished:function(_,y){y===200?_.reconnect():_.onClose(1006,"Connection interrupted ("+y+")",!1)}},vi=Ac,Ta={getRequest:function(_){var y=Ge.getXHRAPI(),C=new y;return C.onreadystatechange=C.onprogress=function(){switch(C.readyState){case 3:C.responseText&&C.responseText.length>0&&_.onChunk(C.status,C.responseText);break;case 4:C.responseText&&C.responseText.length>0&&_.onChunk(C.status,C.responseText),_.emit("finished",C.status),_.close();break}},C},abortRequest:function(_){_.onreadystatechange=null,_.abort()}},$o=Ta,Si={createStreamingSocket(_){return this.createSocket(Mo,_)},createPollingSocket(_){return this.createSocket(vi,_)},createSocket(_,y){return new Hr(_,y)},createXHR(_,y){return this.createRequest($o,_,y)},createRequest(_,y,C){return new tf(_,y,C)}},ka=Si;ka.createXDR=function(_,y){return this.createRequest(Ec,_,y)};var No=ka,us={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:u,DependenciesReceivers:m,getDefaultStrategy:Do,Transports:Kt,transportConnectionInitializer:Mr,HTTPFactory:No,TimelineTransport:tr,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(_){window.Pusher=_;var y=()=>{this.onDocumentBody(_.ready)};window.JSON?y():b.load("json2",{},y)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:Ae,jsonp:Gn}},onDocumentBody(_){document.body?_():setTimeout(()=>{this.onDocumentBody(_)},0)},createJSONPRequest(_,y){return new yn(_,y)},createScriptRequest(_){return new tn(_)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var _=this.getXHRAPI();return new _},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return Dn},createWebSocket(_){var y=this.getWebSocketAPI();return new y(_)},createSocketRequest(_,y){if(this.isXHRSupported())return this.HTTPFactory.createXHR(_ Line truncated
*/var Tm;function DE(){return Tm||(Tm=1,(function(l,e){(function(r,i){l.exports=i()})(window,function(){return(function(a){var r={};function i(o){if(r[o])return r[o].exports;var u=r[o]={i:o,l:!1,exports:{}};return a[o].call(u.exports,u,u.exports,i),u.l=!0,u.exports}return i.m=a,i.c=r,i.d=function(o,u,d){i.o(o,u)||Object.defineProperty(o,u,{enumerable:!0,get:d})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,u){if(u&1&&(o=i(o)),u&8||u&4&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(i.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),u&2&&typeof o!="string")for(var f in o)i.d(d,f,function(g){return o[g]}.bind(null,f));return d},i.n=function(o){var u=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(u,"a",u),u},i.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)},i.p="",i(i.s=2)})([(function(a,r,i){var o=this&&this.__extends||(function(){var A=function(T,D){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,O){M.__proto__=O}||function(M,O){for(var L in O)O.hasOwnProperty(L)&&(M[L]=O[L])},A(T,D)};return function(T,D){A(T,D);function M(){this.constructor=T}T.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}})();Object.defineProperty(r,"__esModule",{value:!0});var u=256,d=(function(){function A(T){T===void 0&&(T="="),this._paddingCharacter=T}return A.prototype.encodedLength=function(T){return this._paddingCharacter?(T+2)/3*4|0:(T*8+5)/6|0},A.prototype.encode=function(T){for(var D="",M=0;M<T.length-2;M+=3){var O=T[M]<<16|T[M+1]<<8|T[M+2];D+=this._encodeByte(O>>>18&63),D+=this._encodeByte(O>>>12&63),D+=this._encodeByte(O>>>6&63),D+=this._encodeByte(O>>>0&63)}var L=T.length-M;if(L>0){var O=T[M]<<16|(L===2?T[M+1]<<8:0);D+=this._encodeByte(O>>>18&63),D+=this._encodeByte(O>>>12&63),L===2?D+=this._encodeByte(O>>>6&63):D+=this._paddingCharacter||"",D+=this._paddingCharacter||""}return D},A.prototype.maxDecodedLength=function(T){return this._paddingCharacter?T/4*3|0:(T*6+7)/8|0},A.prototype.decodedLength=function(T){return this.maxDecodedLength(T.length-this._getPaddingLength(T))},A.prototype.decode=function(T){if(T.length===0)return new Uint8Array(0);for(var D=this._getPaddingLength(T),M=T.length-D,O=new Uint8Array(this.maxDecodedLength(M)),L=0,P=0,U=0,B=0,Y=0,ge=0,Ae=0;P<M-4;P+=4)B=this._decodeChar(T.charCodeAt(P+0)),Y=this._decodeChar(T.charCodeAt(P+1)),ge=this._decodeChar(T.charCodeAt(P+2)),Ae=this._decodeChar(T.charCodeAt(P+3)),O[L++]=B<<2|Y>>>4,O[L++]=Y<<4|ge>>>2,O[L++]=ge<<6|Ae,U|=B&u,U|=Y&u,U|=ge&u,U|=Ae&u;if(P<M-1&&(B=this._decodeChar(T.charCodeAt(P)),Y=this._decodeChar(T.charCodeAt(P+1)),O[L++]=B<<2|Y>>>4,U|=B&u,U|=Y&u),P<M-2&&(ge=this._decodeChar(T.charCodeAt(P+2)),O[L++]=Y<<4|ge>>>2,U|=ge&u),P<M-3&&(Ae=this._decodeChar(T.charCodeAt(P+3)),O[L++]=ge<<6|Ae,U|=Ae&u),U!==0)throw new Error("Base64Coder: incorrect characters for decoding");return O},A.prototype._encodeByte=function(T){var D=T;return D+=65,D+=25-T>>>8&6,D+=51-T>>>8&-75,D+=61-T>>>8&-15,D+=62-T>>>8&3,String.fromCharCode(D)},A.prototype._decodeChar=function(T){var D=u;return D+=(42-T&T-44)>>>8&-u+T-43+62,D+=(46-T&T-48)>>>8&-u+T-47+63,D+=(47-T&T-58)>>>8&-u+T-48+52,D+=(64-T&T-91)>>>8&-u+T-65+0,D+=(96-T&T-123)>>>8&-u+T-97+26,D},A.prototype._getPaddingLength=function(T){var D=0;if(this._paddingCharacter){for(var M=T.length-1;M>=0&&T[M]===this._paddingCharacter;M--)D++;if(T.length<4||D>2)throw new Error("Base64Coder: incorrect padding")}return D},A})();r.Coder=d;var f=new d;function g(A){return f.encode(A)}r.encode=g;function m(A){return f.decode(A)}r.decode=m;var b=(function(A){o(T,A);function T(){return A!==null&&A.apply(this,arguments)||this}return T.prototype._encodeByte=function(D){var M=D;return M+=65,M+=25-D>>>8&6,M+=51-D>>>8&-75,M+=61-D>>>8&-13,M+=62-D>>>8&49,String.fromCharCode(M)},T.prototype._decodeChar=function(D){var M=u;return M+=(44-D&D-46)>>>8&-u+D-45+62,M+=(94-D&D-96)>>>8&-u+D-95+63,M+=(47-D&D-58)>>>8&-u+D-48+52,M+=(64-D&D-91)>>>8&-u+D-65+0,M+=(96-D&D-123)>>>8&-u+D-97+26,M},T})(d);r.URLSafeCoder=b;var v=new b;function E(A){return v.encode(A)}r.encodeURLSafe=E;function S(A){return v.decode(A)}r.decodeURLSafe=S,r.encodedLength=function(A){return f.encodedLength(A)},r.maxDecodedLength=function(A){return f.maxDecodedLength(A)},r.decodedLength=function(A){return f.decodedLength(A)}}),(function(a,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o="utf8: invalid string",u="utf8: invalid source encoding";function d(m){for(var b=new Uint8Array(f(m)),v=0,E=0;E<m.length;E++){var S=m.charCodeAt(E);S<128?b[v++]=S:S<2048?(b[v++]=192|S>>6,b[v++]=128|S&63):S<55296?(b[v++]=224|S>>12,b[v++]=128|S>>6&63,b[v++]=128|S&63):(E++,S=(S&1023)<<10,S|=m.charCodeAt(E)&1023,S+=65536,b[v++]=240|S>>18,b[v++]=128|S>>12&63,b[v++]=128|S>>6&63,b[v++]=128|S&63)}return b}r.encode=d;function f(m){for(var b=0,v=0Line truncated
`);return R!==-1?(this.position+=R+1,C.slice(0,R)):null}isBufferTooLong(y){return this.position===y.length&&y.length>$r}}var os;(function(_){_[_.CONNECTING=0]="CONNECTING",_[_.OPEN=1]="OPEN",_[_.CLOSED=3]="CLOSED"})(os||(os={}));var Ba=os,Oo=1;class nf{constructor(y,C){this.hooks=y,this.session=cs(1e3)+"/"+Nr(8),this.location=af(C),this.readyState=Ba.CONNECTING,this.openStream()}send(y){return this.sendRaw(JSON.stringify([y]))}ping(){this.hooks.sendHeartbeat(this)}close(y,C){this.onClose(y,C,!0)}sendRaw(y){if(this.readyState===Ba.OPEN)try{return Ge.createSocketRequest("POST",aa(ls(this.location,this.session))).start(y),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(y,C,R){this.closeStream(),this.readyState=Ba.CLOSED,this.onclose&&this.onclose({code:y,reason:C,wasClean:R})}onChunk(y){if(y.status===200){this.readyState===Ba.OPEN&&this.onActivity();var C,R=y.data.slice(0,1);switch(R){case"o":C=JSON.parse(y.data.slice(1)||"{}"),this.onOpen(C);break;case"a":C=JSON.parse(y.data.slice(1)||"[]");for(var H=0;H<C.length;H++)this.onEvent(C[H]);break;case"m":C=JSON.parse(y.data.slice(1)||"null"),this.onEvent(C);break;case"h":this.hooks.onHeartbeat(this);break;case"c":C=JSON.parse(y.data.slice(1)||"[]"),this.onClose(C[0],C[1],!0);break}}}onOpen(y){this.readyState===Ba.CONNECTING?(y&&y.hostname&&(this.location.base=Lo(this.location.base,y.hostname)),this.readyState=Ba.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(y){this.readyState===Ba.OPEN&&this.onmessage&&this.onmessage({data:y})}onActivity(){this.onactivity&&this.onactivity()}onError(y){this.onerror&&this.onerror(y)}openStream(){this.stream=Ge.createSocketRequest("POST",aa(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",y=>{this.onChunk(y)}),this.stream.bind("finished",y=>{this.hooks.onFinished(this,y)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(y){te.defer(()=>{this.onError(y),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function af(_){var y=/([^\?]*)\/*(\??.*)/.exec(_);return{base:y[1],queryString:y[2]}}function ls(_,y){return _.base+"/"+y+"/xhr_send"}function aa(_){var y=_.indexOf("?")===-1?"?":"&";return _+y+"t="+ +new Date+"&n="+Oo++}function Lo(_,y){var C=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(_);return C[1]+y+C[3]}function cs(_){return Ge.randomInt(_)}function Nr(_){for(var y=[],C=0;C<_;C++)y.push(cs(32).toString(32));return y.join("")}var Hr=nf,_c={getReceiveURL:function(_,y){return _.base+"/"+y+"/xhr_streaming"+_.queryString},onHeartbeat:function(_){_.sendRaw("[]")},sendHeartbeat:function(_){_.sendRaw("[]")},onFinished:function(_,y){_.onClose(1006,"Connection interrupted ("+y+")",!1)}},Mo=_c,Ac={getReceiveURL:function(_,y){return _.base+"/"+y+"/xhr"+_.queryString},onHeartbeat:function(){},sendHeartbeat:function(_){_.sendRaw("[]")},onFinished:function(_,y){y===200?_.reconnect():_.onClose(1006,"Connection interrupted ("+y+")",!1)}},vi=Ac,Ta={getRequest:function(_){var y=Ge.getXHRAPI(),C=new y;return C.onreadystatechange=C.onprogress=function(){switch(C.readyState){case 3:C.responseText&&C.responseText.length>0&&_.onChunk(C.status,C.responseText);break;case 4:C.responseText&&C.responseText.length>0&&_.onChunk(C.status,C.responseText),_.emit("finished",C.status),_.close();break}},C},abortRequest:function(_){_.onreadystatechange=null,_.abort()}},$o=Ta,Si={createStreamingSocket(_){return this.createSocket(Mo,_)},createPollingSocket(_){return this.createSocket(vi,_)},createSocket(_,y){return new Hr(_,y)},createXHR(_,y){return this.createRequest($o,_,y)},createRequest(_,y,C){return new tf(_,y,C)}},ka=Si;ka.createXDR=function(_,y){return this.createRequest(Ec,_,y)};var No=ka,us={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:u,DependenciesReceivers:m,getDefaultStrategy:Do,Transports:Ft,transportConnectionInitializer:Mr,HTTPFactory:No,TimelineTransport:tr,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(_){window.Pusher=_;var y=()=>{this.onDocumentBody(_.ready)};window.JSON?y():b.load("json2",{},y)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:Ae,jsonp:Gn}},onDocumentBody(_){document.body?_():setTimeout(()=>{this.onDocumentBody(_)},0)},createJSONPRequest(_,y){return new mn(_,y)},createScriptRequest(_){return new en(_)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var _=this.getXHRAPI();return new _},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return Dn},createWebSocket(_){var y=this.getWebSocketAPI();return new y(_)},createSocketRequest(_,y){if(this.isXHRSupported())return this.HTTPFactory.createXHR(_ Line truncated
display: flex;
align-items: center;
justify-content: center;
@@ -267,7 +267,7 @@ Error generating stack: `+c.message+`
`:""}
</div>
</div>
`}static renderFromError(e,a,r,i=!1,o,u,d){let f,g;if(a.userMessageKey.startsWith("$t:"))if(u&&o)try{f=u.translate(a.userMessageKey,o)}catch{f=a.userMessageKey.replace("$t:","")}else f=a.userMessageKey.replace("$t:","");else f=a.userMessageKey;if(d){const m=d;m.details?.apiMessage?g=m.details.apiMessage:m.response?.data?.message&&(g=m.response.data.message)}this.render(e,{title:r,message:f,detailMessage:g,icon:a.icon,showStack:a.showStack,stackTrace:a.stack,showReloadButton:a.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const a=document.createElement("div");return a.textContent=e,a.innerHTML}}const Zi=dt("Router");class UE{constructor(e){$(this,"routes",[]);$(this,"templateIdentifier");$(this,"eventHandlers",new Map);$(this,"pendingNavigation",null);$(this,"isNavigating",!1);$(this,"handlePopState",()=>{this.navigateToCurrentPath()});this.templateIdentifier=e,this.initPopstateListener()}initPopstateListener(){window.addEventListener("popstate",this.handlePopState)}on(e,a){this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),this.eventHandlers.get(e).push(a)}async emit(e,...a){const r=this.eventHandlers.get(e);r&&await Promise.all(r.map(i=>i(...a)))}async loadRoutes(e){try{const a=e!==void 0&&e>0?`?v=${e}`:"",r=await fetch(`/api/templates/${this.templateIdentifier}/routes.json${a}`);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,Zi.log(`Loaded ${this.routes.length} routes${e?` (v=${e})`:""}`);else throw new Error("Invalid routes data format")}catch(a){throw Zi.error("Error loading routes:",a),a}}setRoutes(e){this.routes=e,Zi.log(`Set ${this.routes.length} routes`)}match(e){for(const a of this.routes){const r=this.matchPattern(a.path,e);if(r!==null)return{route:a,params:r}}return null}matchPattern(e,a){const r=[];let i=e.replace(/:([^/]+)/g,(f,g)=>(r.push(g),"([^/]+)"));i.startsWith("*/")&&(i="(?:/[^/]+)?"+i.slice(1)),i=i.replace(/\//g,"\\/");const o=new RegExp(`^${i}$`),u=a.match(o);if(!u)return null;const d={};return r.forEach((f,g)=>{d[f]=u[g+1]}),d}getRoutes(){return[...this.routes]}getAuthType(e,a){return e.auth_type?e.auth_type:a.startsWith("/admin")?"admin":"user"}async navigateToCurrentPath(){const e=window.location.pathname,a=window.location.search,r=this.match(e);if(!r){Zi.warn(`No route matched for path: ${e}`),this.emit("routeNotFound",e);return}if(r.route.redirect){Zi.log(`Redirecting from ${e} to ${r.route.redirect}`),this.navigate(r.route.redirect);return}if(r.route.auth_required){const u=this.getAuthType(r.route,e),d=ga.getInstance();let f=d.isAuthenticated()&&d.getAuthType()===u;if(f||(f=await d.checkAuth(u)),!f){const g=d.getLoginRedirectUrl(u,e+a);Zi.log(`Not authenticated, redirecting to: ${g}`),window.location.href=g;return}}const i=new URLSearchParams(a),o={};for(const u of i.keys()){if(u in o)continue;const d=i.getAll(u);d.length>1?o[u]=d:d.length===1&&(u.endsWith("[]")?o[u]=d:o[u]=d[0])}await this.emit("routeChange",{path:e,layout:r.route.layout,endpoint:r.route.endpoint,params:{...r.route.params||{},...r.params},query:o,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 a=this.pendingNavigation;this.executeNavigation(a)}}}}const BE=/^\/admin\/layout-editor\/([^/?#]+)\/?$/;function Lm(l){const e=BE.exec(l);return e?{templateIdentifier:e[1]}:null}const Nt=dt("ErrorPageHandler");class qE{constructor(e){$(this,"templateId");$(this,"layoutLoader");$(this,"locale");$(this,"debug");$(this,"renderFunction");$(this,"dataSourceManager");$(this,"globalState");$(this,"errorConfig",null);$(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(`/api/templates/${this.templateId}/config.json`);if(!e.ok)return this.debug&&Nt.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const a=await e.json();if(!a.success||!a.data)return this.debug&&Nt.warn("Invalid template config response"),this.configLoaded=!0,null;const r=a.data;return!r.error_config||!r.error_config.layouts?(this.debug&&Nt.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=r.error_config,this.configLoaded=!0,this.debug&&Nt.log("Error config loaded:",this.errorConfig),this.errorConfig)}catch(e){return Nt.error("Failed to load error config:",e),this.configLoaded=!0,null}}async rend Line truncated
`}static renderFromError(e,a,r,i=!1,o,u,d){let f,g;if(a.userMessageKey.startsWith("$t:"))if(u&&o)try{f=u.translate(a.userMessageKey,o)}catch{f=a.userMessageKey.replace("$t:","")}else f=a.userMessageKey.replace("$t:","");else f=a.userMessageKey;if(d){const m=d;m.details?.apiMessage?g=m.details.apiMessage:m.response?.data?.message&&(g=m.response.data.message)}this.render(e,{title:r,message:f,detailMessage:g,icon:a.icon,showStack:a.showStack,stackTrace:a.stack,showReloadButton:a.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const a=document.createElement("div");return a.textContent=e,a.innerHTML}}const Zi=dt("Router");class jE{constructor(e){$(this,"routes",[]);$(this,"templateIdentifier");$(this,"eventHandlers",new Map);$(this,"pendingNavigation",null);$(this,"isNavigating",!1);$(this,"handlePopState",()=>{this.navigateToCurrentPath()});this.templateIdentifier=e,this.initPopstateListener()}initPopstateListener(){window.addEventListener("popstate",this.handlePopState)}on(e,a){this.eventHandlers.has(e)||this.eventHandlers.set(e,[]),this.eventHandlers.get(e).push(a)}async emit(e,...a){const r=this.eventHandlers.get(e);r&&await Promise.all(r.map(i=>i(...a)))}async loadRoutes(e){try{const a=e!==void 0&&e>0?`?v=${e}`:"",r=await fetch(`/api/templates/${this.templateIdentifier}/routes.json${a}`);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,Zi.log(`Loaded ${this.routes.length} routes${e?` (v=${e})`:""}`);else throw new Error("Invalid routes data format")}catch(a){throw Zi.error("Error loading routes:",a),a}}setRoutes(e){this.routes=e,Zi.log(`Set ${this.routes.length} routes`)}match(e){for(const a of this.routes){const r=this.matchPattern(a.path,e);if(r!==null)return{route:a,params:r}}return null}matchPattern(e,a){const r=[];let i=e.replace(/:([^/]+)/g,(f,g)=>(r.push(g),"([^/]+)"));i.startsWith("*/")&&(i="(?:/[^/]+)?"+i.slice(1)),i=i.replace(/\//g,"\\/");const o=new RegExp(`^${i}$`),u=a.match(o);if(!u)return null;const d={};return r.forEach((f,g)=>{d[f]=u[g+1]}),d}getRoutes(){return[...this.routes]}getAuthType(e,a){return e.auth_type?e.auth_type:a.startsWith("/admin")?"admin":"user"}async navigateToCurrentPath(){const e=window.location.pathname,a=window.location.search,r=this.match(e);if(!r){Zi.warn(`No route matched for path: ${e}`),this.emit("routeNotFound",e);return}if(r.route.redirect){Zi.log(`Redirecting from ${e} to ${r.route.redirect}`),this.navigate(r.route.redirect);return}if(r.route.auth_required){const u=this.getAuthType(r.route,e),d=ga.getInstance();let f=d.isAuthenticated()&&d.getAuthType()===u;if(f||(f=await d.checkAuth(u)),!f){const g=d.getLoginRedirectUrl(u,e+a);Zi.log(`Not authenticated, redirecting to: ${g}`),window.location.href=g;return}}const i=new URLSearchParams(a),o={};for(const u of i.keys()){if(u in o)continue;const d=i.getAll(u);d.length>1?o[u]=d:d.length===1&&(u.endsWith("[]")?o[u]=d:o[u]=d[0])}await this.emit("routeChange",{path:e,layout:r.route.layout,endpoint:r.route.endpoint,params:{...r.route.params||{},...r.params},query:o,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 a=this.pendingNavigation;this.executeNavigation(a)}}}}const UE=/^\/admin\/layout-editor\/([^/?#]+)\/?$/;function Lm(l){const e=UE.exec(l);return e?{templateIdentifier:e[1]}:null}const Nt=dt("ErrorPageHandler");class BE{constructor(e){$(this,"templateId");$(this,"layoutLoader");$(this,"locale");$(this,"debug");$(this,"renderFunction");$(this,"dataSourceManager");$(this,"globalState");$(this,"errorConfig",null);$(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(`/api/templates/${this.templateId}/config.json`);if(!e.ok)return this.debug&&Nt.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const a=await e.json();if(!a.success||!a.data)return this.debug&&Nt.warn("Invalid template config response"),this.configLoaded=!0,null;const r=a.data;return!r.error_config||!r.error_config.layouts?(this.debug&&Nt.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=r.error_config,this.configLoaded=!0,this.debug&&Nt.log("Error config loaded:",this.errorConfig),this.errorConfig)}catch(e){return Nt.error("Failed to load error config:",e),this.configLoaded=!0,null}}async rend Line truncated
with(ctx) {
try {
return Boolean(${r});
@@ -275,7 +275,7 @@ Error generating stack: `+c.message+`
return false;
}
}
`)(a)}return!!e}catch(r){return j.warn(`Failed to evaluate script condition: ${e}`,r),!1}}showInitError(e){const a=Om(e);Kd.renderFromError("app",a,"초기화 실패",this.config.debug,{templateId:this.config.templateId,locale:this.config.locale},void 0,e)}showTransitionOverlay(e,a){const r=typeof e=="boolean"?{enabled:e,style:"opaque",target:void 0,skeleton:void 0,spinner:void 0}:{enabled:e.enabled,style:e.style||"opaque",target:e.target,skeleton:e.skeleton,spinner:e.spinner,fallback_target:e.fallback_target};if(!r.enabled)return;if(this.hideTransitionOverlay(),r.style==="skeleton"&&r.skeleton?.component&&r.target&&a){this.renderSkeletonOverlay(r.target,r.skeleton,a,r.fallback_target);return}if(r.style==="spinner"&&r.target){this.renderSpinnerOverlay(r.target,r.spinner,r.fallback_target);return}const i=document.documentElement.classList.contains("dark");let o,u="";switch(r.style){case"blur":o=i?"rgba(17,24,39,0.3)":"rgba(255,255,255,0.3)",u="backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);";break;case"fade":o=i?"rgba(17,24,39,0.8)":"rgba(255,255,255,0.8)";break;case"skeleton":o=i?"rgb(17,24,39)":"rgb(249,250,251)";break;case"opaque":default:o=i?"rgb(17,24,39)":"rgb(249,250,251)";break}if(r.target){const d=`#${CSS.escape(r.target)}`,f=document.createElement("style");f.id="g7-transition-overlay",f.textContent=`${d}{position:relative;z-index:0;}${d}::after{content:'';position:absolute;inset:0;background:${o};${u}z-index:2147483647;pointer-events:none;}`,document.head.appendChild(f),this.transitionOverlayEl=f}else{const d=document.createElement("div");d.id="g7-transition-overlay",d.setAttribute("aria-hidden","true"),d.style.position="fixed",d.style.inset="0",d.style.zIndex="9999",d.style.pointerEvents="none",d.style.background=o;for(const f of u.split(";")){const g=f.indexOf(":");g!==-1&&d.style.setProperty(f.slice(0,g).trim(),f.slice(g+1).trim())}document.body.appendChild(d),this.transitionOverlayEl=d}}hideTransitionOverlay(){this.transitionOverlayEl&&(this.transitionOverlayEl.remove(),this.transitionOverlayEl=null),this.hideSkeletonOverlay()}renderSkeletonOverlay(e,a,r,i){const u=fa.getInstance().getComponent(a.component);if(!u){j.log(`Skeleton component "${a.component}" not found in registry, falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}let d=document.getElementById(e),f="target";if(!d&&i&&(d=document.getElementById(i),f="fallback"),d||(d=document.getElementById("app"),f="fullpage"),!d){j.log(`Skeleton overlay: no target found (target="#${e}", fallback="${i||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkeletonOverlay();const m=document.documentElement.classList.contains("dark")?"rgb(17,24,39)":"rgb(249,250,251)",b=f==="fullpage"?"app":f==="fallback"?i:e,v=`#${CSS.escape(b)}`,E=document.createElement("style");E.id="g7-skeleton-overlay-style",E.textContent=`${v}{position:relative;z-index:0;}${v}::after{content:'';position:absolute;inset:0;background:${m};z-index:2147483646;pointer-events:none;}`,document.head.appendChild(E),this.transitionOverlayEl=E;const S=document.createElement("div");if(S.id="g7-skeleton-overlay",S.setAttribute("role","status"),S.setAttribute("aria-busy","true"),S.setAttribute("aria-label","Loading..."),f==="fullpage")S.style.cssText=["position:fixed","inset:0","z-index:20","overflow:hidden","pointer-events:none",`background:${m}`].join(";")+";";else{const O=d.getBoundingClientRect(),L=window.scrollX||document.documentElement.scrollLeft,P=window.scrollY||document.documentElement.scrollTop;S.style.cssText=["position:absolute",`top:${O.top+P}px`,`left:${O.left+L}px`,`width:${O.width}px`,`height:${O.height}px`,"z-index:20","overflow:hidden","pointer-events:none",`background:${m}`].join(";")+";"}document.body.appendChild(S),this.skeletonOverlayContainer=S;const A=r.components||[];let T;if(f==="fullpage")T=A;else{const O=f==="fallback"?i:e;T=this.findComponentChildrenById(A,O)}const D=Pu.createRoot(S);this.skeletonOverlayRoot=D,Ar.flushSync(()=>{D.render(We.createElement(u,{components:T,options:{animation:a.animation||"pulse",iteration_count:a.iteration_count||5}}))});const M=f==="fullpage"?"fullpage (#app)":f==="fallback"?`fallback (#${i})`:`target (#${e})`;j.log(`Skeleton overlay rendered [${M}] with "${a.component}" (${T.length} components)`)}findComponentChildrenById(e,a){const r=i=>{for(const o of i){if(o.id===a)return o.children||[];if(o.children&&Array.isArray(o.children)){const u=r(o.children);if(u!==null)return u}}return null};return r(e)||e}renderSpinnerOverlay(e,a,r){let i=document.getElementById(e),o="target";if(!i&&r&&(i=document.getElementById(r),o="fallback"),i||(i=document.getElementById("app"),o="fullpage"),!i){j.log(`Spinner overlay: no target found (target="#${e}", fallback="${r||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkele Line truncated
`)(a)}return!!e}catch(r){return j.warn(`Failed to evaluate script condition: ${e}`,r),!1}}showInitError(e){const a=Om(e);Kd.renderFromError("app",a,"초기화 실패",this.config.debug,{templateId:this.config.templateId,locale:this.config.locale},void 0,e)}showTransitionOverlay(e,a){const r=typeof e=="boolean"?{enabled:e,style:"opaque",target:void 0,skeleton:void 0,spinner:void 0}:{enabled:e.enabled,style:e.style||"opaque",target:e.target,skeleton:e.skeleton,spinner:e.spinner,fallback_target:e.fallback_target};if(!r.enabled)return;if(this.hideTransitionOverlay(),r.style==="skeleton"&&r.skeleton?.component&&r.target&&a){this.renderSkeletonOverlay(r.target,r.skeleton,a,r.fallback_target);return}if(r.style==="spinner"&&r.target){this.renderSpinnerOverlay(r.target,r.spinner,r.fallback_target);return}const i=document.documentElement.classList.contains("dark");let o,u="";switch(r.style){case"blur":o=i?"rgba(17,24,39,0.3)":"rgba(255,255,255,0.3)",u="backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);";break;case"fade":o=i?"rgba(17,24,39,0.8)":"rgba(255,255,255,0.8)";break;case"skeleton":o=i?"rgb(17,24,39)":"rgb(249,250,251)";break;case"opaque":default:o=i?"rgb(17,24,39)":"rgb(249,250,251)";break}if(r.target){const d=`#${CSS.escape(r.target)}`,f=document.createElement("style");f.id="g7-transition-overlay",f.textContent=`${d}{position:relative;z-index:0;}${d}::after{content:'';position:absolute;inset:0;background:${o};${u}z-index:2147483647;pointer-events:none;}`,document.head.appendChild(f),this.transitionOverlayEl=f}else{const d=document.createElement("div");d.id="g7-transition-overlay",d.setAttribute("aria-hidden","true"),d.style.position="fixed",d.style.inset="0",d.style.zIndex="9999",d.style.pointerEvents="none",d.style.background=o;for(const f of u.split(";")){const g=f.indexOf(":");g!==-1&&d.style.setProperty(f.slice(0,g).trim(),f.slice(g+1).trim())}document.body.appendChild(d),this.transitionOverlayEl=d}}hideTransitionOverlay(){this.transitionOverlayEl&&(this.transitionOverlayEl.remove(),this.transitionOverlayEl=null),this.hideSkeletonOverlay()}renderSkeletonOverlay(e,a,r,i){const u=fa.getInstance().getComponent(a.component);if(!u){j.log(`Skeleton component "${a.component}" not found in registry, falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}let d=document.getElementById(e),f="target";if(!d&&i&&(d=document.getElementById(i),f="fallback"),d||(d=document.getElementById("app"),f="fullpage"),!d){j.log(`Skeleton overlay: no target found (target="#${e}", fallback="${i||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkeletonOverlay();const m=document.documentElement.classList.contains("dark")?"rgb(17,24,39)":"rgb(249,250,251)",b=f==="fullpage"?"app":f==="fallback"?i:e,v=`#${CSS.escape(b)}`,E=document.createElement("style");E.id="g7-skeleton-overlay-style",E.textContent=`${v}{position:relative;z-index:0;}${v}::after{content:'';position:absolute;inset:0;background:${m};z-index:2147483646;pointer-events:none;}`,document.head.appendChild(E),this.transitionOverlayEl=E;const S=document.createElement("div");if(S.id="g7-skeleton-overlay",S.setAttribute("role","status"),S.setAttribute("aria-busy","true"),S.setAttribute("aria-label","Loading..."),f==="fullpage")S.style.cssText=["position:fixed","inset:0","z-index:20","overflow:hidden","pointer-events:none",`background:${m}`].join(";")+";";else{const O=d.getBoundingClientRect(),L=window.scrollX||document.documentElement.scrollLeft,P=window.scrollY||document.documentElement.scrollTop;S.style.cssText=["position:absolute",`top:${O.top+P}px`,`left:${O.left+L}px`,`width:${O.width}px`,`height:${O.height}px`,"z-index:20","overflow:hidden","pointer-events:none",`background:${m}`].join(";")+";"}document.body.appendChild(S),this.skeletonOverlayContainer=S;const A=r.components||[];let T;if(f==="fullpage")T=A;else{const O=f==="fallback"?i:e;T=this.findComponentChildrenById(A,O)}const D=Pu.createRoot(S);this.skeletonOverlayRoot=D,Ar.flushSync(()=>{D.render(We.createElement(u,{components:T,options:{animation:a.animation||"pulse",iteration_count:a.iteration_count||5}}))});const M=f==="fullpage"?"fullpage (#app)":f==="fallback"?`fallback (#${i})`:`target (#${e})`;j.log(`Skeleton overlay rendered [${M}] with "${a.component}" (${T.length} components)`)}findComponentChildrenById(e,a){const r=i=>{for(const o of i){if(o.id===a)return o.children||[];if(o.children&&Array.isArray(o.children)){const u=r(o.children);if(u!==null)return u}}return null};return r(e)||e}renderSpinnerOverlay(e,a,r){let i=document.getElementById(e),o="target";if(!i&&r&&(i=document.getElementById(r),o="fallback"),i||(i=document.getElementById("app"),o="fullpage"),!i){j.log(`Spinner overlay: no target found (target="#${e}", fallback="${r||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkele Line truncated
with(ctx) {
try {
return ${e};
@@ -283,5 +283,5 @@ Error generating stack: `+c.message+`
return undefined;
}
}
`)(a)}catch(r){j.warn(`Expression evaluation failed: ${e}`,r);return}}async executeInitActions(e,a={}){const{getActionDispatcher:r}=await Promise.resolve().then(()=>Ia),i=r();if(!i){j.warn("ActionDispatcher not available for init_actions");return}j.log("Executing init_actions:",e.map(d=>d.handler)),j.log("Init actions dataContext:",a),j.log("Init actions dataContext._global:",a._global);const o=e.map(d=>d.handler).filter(d=>d.includes("."));o.length>0&&await this.waitForHandlers(i,o);let u={...a};for(const d of e)try{const f={type:"click",handler:d.handler,target:d.target,params:d.params,resultTo:d.resultTo,onSuccess:d.onSuccess,onError:d.onError,if:d.if,conditions:d.conditions,auth_mode:d.auth_mode,auth_required:d.auth_required},g=i.createHandler(f,u),m=new Event("init");await g(m),j.log(`Init action executed: ${d.handler}`);const b=this.globalState;u={...u,_global:{...b},_local:b._local||u._local||{}},j.log(`Data context refreshed after ${d.handler}:`,{cartKey:u._global?.cartKey})}catch(f){j.error(`Failed to execute init action: ${d.handler}`,f)}}async waitForHandlers(e,a,r=5e3){const i=Date.now(),o=50,u=()=>a.every(d=>e.customHandlers?.has(d));if(u()){j.log("All module handlers already registered");return}return j.log("Waiting for module handlers:",a),new Promise(d=>{const f=()=>{if(u()){j.log("All module handlers now registered"),d();return}if(Date.now()-i>=r){const g=a.filter(m=>!e.customHandlers?.has(m));j.warn("Timeout waiting for handlers:",g),d();return}setTimeout(f,o)};f()})}};$(Ea,"LOCALE_STORAGE_KEY","g7_locale"),$(Ea,"CACHE_VERSION_STORAGE_KEY","g7_cache_version");let mo=Ea;function Xd(l){const e=new mo(l);return l.websocket&&(hc.configure(l.websocket),j.log("WebSocket 설정 완료")),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{e.init(),window.__templateApp=e}):(e.init(),window.__templateApp=e),e}typeof window<"u"&&(window.G7Core=window.G7Core||{},window.G7Core.initTemplateApp=Xd,window.G7Core.dataSource={refetch:async(l,e)=>{const a=window.__templateApp;if(!a){j.warn("TemplateApp not initialized (G7Core.dataSource.refetch)");return}return a.refetchDataSource(l,e)},get:l=>{const e=window.__templateApp;if(!e){j.warn("TemplateApp not initialized (G7Core.dataSource.get)");return}return e.getDataSource(l)}});function KE(l={}){const{checked:e,value:a,name:r,type:i="checkbox"}=l,u=a!==void 0?a:i==="checkbox"||i==="radio"?e??!1:String(e??""),d={checked:e??!1,value:u,name:r??"",type:i};return{target:d,currentTarget:d,preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new Event("change"),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:"change",isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{}}}function WE(l={}){const{button:e=0,clientX:a=0,clientY:r=0}=l;return{button:e,clientX:a,clientY:r,preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new MouseEvent("click"),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:"click",isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{},target:document.createElement("div"),currentTarget:document.createElement("div")}}function YE(){return{preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new Event("submit"),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:"submit",isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{},target:document.createElement("form"),currentTarget:document.createElement("form")}}function XE(l,e="keydown"){return{key:l,code:l.length===1?`Key${l.toUpperCase()}`:l,preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new KeyboardEvent(e,{key:l}),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:e,isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{},target:document.createElement("div"),currentTarget:document.createElement("div"),altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,repeat:!1}}const JE={justify:/^justify-(start|end|center|between|around|evenly)$/,items:/^items-(start|end|center|baseline|stretch)$/,content:/^content-(start|end|center|between|around|evenly|stretch)$/,self:/^self-(auto|start|end|center|stretch|baseline)$/,flex:/^flex-(row|row-reverse|col|col-reverse|wrap|wrap-reverse|nowrap|1|auto|initial|none)$/,grow:/^(grow|grow-0)$/,shrink:/^(shrink|shrink-0)$/,basis:/^basis-/,order:/^(order-|-)order-/,gap:/^gap(-x|-y)?-/,gridCols:/^grid-cols-/,gridRows:/^grid-rows-/,colSpan:/^col-(span-|start-|end-)/,rowSpan:/^row-(span-|start-|end-)/,display:/^(block|inline-block|inline|flex|inline-flex|table|inline-table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row-group|table-row|flow-root|grid|inline-grid|contents|list-item|hidden)$/,position:/^(static|fixed|absolute|relative|sticky)$/,inset:/^(inset|top|right|bottom|le Line truncated
`)(a)}catch(r){j.warn(`Expression evaluation failed: ${e}`,r);return}}async executeInitActions(e,a={}){const{getActionDispatcher:r}=await Promise.resolve().then(()=>Ia),i=r();if(!i){j.warn("ActionDispatcher not available for init_actions");return}j.log("Executing init_actions:",e.map(d=>d.handler)),j.log("Init actions dataContext:",a),j.log("Init actions dataContext._global:",a._global);const o=e.map(d=>d.handler).filter(d=>d.includes("."));o.length>0&&await this.waitForHandlers(i,o);let u={...a};for(const d of e)try{const f={type:"click",handler:d.handler,target:d.target,params:d.params,resultTo:d.resultTo,onSuccess:d.onSuccess,onError:d.onError,if:d.if,conditions:d.conditions,auth_mode:d.auth_mode,auth_required:d.auth_required},g=i.createHandler(f,u),m=new Event("init");await g(m),j.log(`Init action executed: ${d.handler}`);const b=this.globalState;u={...u,_global:{...b},_local:b._local||u._local||{}},j.log(`Data context refreshed after ${d.handler}:`,{cartKey:u._global?.cartKey})}catch(f){j.error(`Failed to execute init action: ${d.handler}`,f)}}async waitForHandlers(e,a,r=5e3){const i=Date.now(),o=50,u=()=>a.every(d=>e.customHandlers?.has(d));if(u()){j.log("All module handlers already registered");return}return j.log("Waiting for module handlers:",a),new Promise(d=>{const f=()=>{if(u()){j.log("All module handlers now registered"),d();return}if(Date.now()-i>=r){const g=a.filter(m=>!e.customHandlers?.has(m));j.warn("Timeout waiting for handlers:",g),d();return}setTimeout(f,o)};f()})}};$(Ea,"LOCALE_STORAGE_KEY","g7_locale"),$(Ea,"CACHE_VERSION_STORAGE_KEY","g7_cache_version");let mo=Ea;function Xd(l){const e=new mo(l);return l.websocket&&(hc.configure(l.websocket),j.log("WebSocket 설정 완료")),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{e.init(),window.__templateApp=e}):(e.init(),window.__templateApp=e),e}typeof window<"u"&&(window.G7Core=window.G7Core||{},window.G7Core.initTemplateApp=Xd,window.G7Core.dataSource={refetch:async(l,e)=>{const a=window.__templateApp;if(!a){j.warn("TemplateApp not initialized (G7Core.dataSource.refetch)");return}return a.refetchDataSource(l,e)},get:l=>{const e=window.__templateApp;if(!e){j.warn("TemplateApp not initialized (G7Core.dataSource.get)");return}return e.getDataSource(l)}});function FE(l={}){const{checked:e,value:a,name:r,type:i="checkbox"}=l,u=a!==void 0?a:i==="checkbox"||i==="radio"?e??!1:String(e??""),d={checked:e??!1,value:u,name:r??"",type:i};return{target:d,currentTarget:d,preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new Event("change"),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:"change",isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{}}}function KE(l={}){const{button:e=0,clientX:a=0,clientY:r=0}=l;return{button:e,clientX:a,clientY:r,preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new MouseEvent("click"),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:"click",isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{},target:document.createElement("div"),currentTarget:document.createElement("div")}}function WE(){return{preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new Event("submit"),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:"submit",isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{},target:document.createElement("form"),currentTarget:document.createElement("form")}}function YE(l,e="keydown"){return{key:l,code:l.length===1?`Key${l.toUpperCase()}`:l,preventDefault:()=>{},stopPropagation:()=>{},nativeEvent:new KeyboardEvent(e,{key:l}),bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:Event.AT_TARGET,isTrusted:!1,timeStamp:Date.now(),type:e,isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,persist:()=>{},target:document.createElement("div"),currentTarget:document.createElement("div"),altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,repeat:!1}}const XE={justify:/^justify-(start|end|center|between|around|evenly)$/,items:/^items-(start|end|center|baseline|stretch)$/,content:/^content-(start|end|center|between|around|evenly|stretch)$/,self:/^self-(auto|start|end|center|stretch|baseline)$/,flex:/^flex-(row|row-reverse|col|col-reverse|wrap|wrap-reverse|nowrap|1|auto|initial|none)$/,grow:/^(grow|grow-0)$/,shrink:/^(shrink|shrink-0)$/,basis:/^basis-/,order:/^(order-|-)order-/,gap:/^gap(-x|-y)?-/,gridCols:/^grid-cols-/,gridRows:/^grid-rows-/,colSpan:/^col-(span-|start-|end-)/,rowSpan:/^row-(span-|start-|end-)/,display:/^(block|inline-block|inline|flex|inline-flex|table|inline-table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row-group|table-row|flow-root|grid|inline-grid|contents|list-item|hidden)$/,position:/^(static|fixed|absolute|relative|sticky)$/,inset:/^(inset|top|right|bottom|le Line truncated
//# sourceMappingURL=template-engine.min.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"template-engine.min.js","sources":["../../../node_modules/react/cjs/react.production.js","../../../node_modules/react/index.js","../../../node_modules/scheduler/cjs/scheduler.production.js","../../../node_modules/scheduler/index.js","../../../node_modules/react-dom/cjs/react-dom.production.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/cjs/react-dom-client.production.js","../../../node_modules/react-dom/client.js","../../../resources/js/core/utils/Logger.ts","../../../resources/js/core/template-engine/ComponentRegistry.ts","../../../resources/js/core/template-engine/TranslationEngine.ts","../../../resources/js/core/template-engine/PipeRegistry.ts","../../../resources/js/core/template-engine/rawMarkers.ts","../../../resources/js/core/template-engine/DataBindingEngine.ts","../../../resources/js/core/template-engine/ResponsiveManager.ts","../../../resources/js/core/template-engine/helpers/ConditionEvaluator.ts","../../../resources/js/core/template-engine/helpers/RenderHelpers.ts","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/helpers/null.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/platform/browser/index.js","../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/helpers/throttle.js","../../../node_modules/axios/lib/helpers/progressEventReducer.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/helpers/resolveConfig.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/helpers/composeSignals.js","../../../node_modules/axios/lib/helpers/trackStream.js","../../../node_modules/axios/lib/adapters/fetch.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/axios/index.js","../../../resources/js/core/identity/types.ts","../../../resources/js/core/identity/IdentityGuardInterceptor.ts","../../../resources/js/core/api/ApiClient.ts","../../../resources/js/core/auth/AuthManager.ts","../../../resources/js/core/types/ErrorHandling.ts","../../../resources/js/core/error/ErrorHandlingResolver.ts","../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/jsx-runtime.js","../../../resources/js/core/template-engine/ParentContextProvider.tsx","../../../resources/js/core/template-engine/ActionDispatcher.ts","../../../resources/js/core/template-engine/TransitionManager.ts","../../../resources/js/core/template-engine/TransitionContext.tsx","../../../resources/js/core/template-engine/ResponsiveContext.tsx","../../../resources/js/core/hooks/useControllableState.ts","../../../resources/js/core/template-engine/FormContext.tsx","../../../resources/js/core/template-engine/IsolatedStateContext.tsx","../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../../node_modules/@dnd-kit/core/dist/core.esm.jLine truncated
{"version":3,"file":"template-engine.min.js","sources":["../../../node_modules/react/cjs/react.production.js","../../../node_modules/react/index.js","../../../node_modules/scheduler/cjs/scheduler.production.js","../../../node_modules/scheduler/index.js","../../../node_modules/react-dom/cjs/react-dom.production.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/cjs/react-dom-client.production.js","../../../node_modules/react-dom/client.js","../../../resources/js/core/utils/Logger.ts","../../../resources/js/core/template-engine/ComponentRegistry.ts","../../../resources/js/core/template-engine/TranslationEngine.ts","../../../resources/js/core/template-engine/PipeRegistry.ts","../../../resources/js/core/template-engine/rawMarkers.ts","../../../resources/js/core/template-engine/DataBindingEngine.ts","../../../resources/js/core/template-engine/ResponsiveManager.ts","../../../resources/js/core/template-engine/helpers/ConditionEvaluator.ts","../../../resources/js/core/template-engine/helpers/RenderHelpers.ts","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/helpers/null.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/platform/browser/index.js","../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/helpers/throttle.js","../../../node_modules/axios/lib/helpers/progressEventReducer.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/helpers/resolveConfig.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/helpers/composeSignals.js","../../../node_modules/axios/lib/helpers/trackStream.js","../../../node_modules/axios/lib/adapters/fetch.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/axios/index.js","../../../resources/js/core/identity/types.ts","../../../resources/js/core/identity/IdentityGuardInterceptor.ts","../../../resources/js/core/api/ApiClient.ts","../../../resources/js/core/auth/AuthManager.ts","../../../resources/js/core/types/ErrorHandling.ts","../../../resources/js/core/error/ErrorHandlingResolver.ts","../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/jsx-runtime.js","../../../resources/js/core/template-engine/ParentContextProvider.tsx","../../../resources/js/core/template-engine/ActionDispatcher.ts","../../../resources/js/core/template-engine/TransitionManager.ts","../../../resources/js/core/template-engine/TransitionContext.tsx","../../../resources/js/core/template-engine/ResponsiveContext.tsx","../../../resources/js/core/hooks/useControllableState.ts","../../../resources/js/core/template-engine/FormContext.tsx","../../../resources/js/core/template-engine/IsolatedStateContext.tsx","../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../../node_modules/@dnd-kit/core/dist/core.esm.jLine truncated
+9 -22
View File
@@ -1,8 +1,8 @@
<?php
// 설치 완료 여부 확인
$installedFlagPath = __DIR__.'/../storage/app/g7_installed';
$envPath = __DIR__.'/../.env';
$installedFlagPath = __DIR__ . '/../storage/app/g7_installed';
$envPath = __DIR__ . '/../.env';
// 설치 확인: g7_installed 파일 또는 .env의 INSTALLER_COMPLETED
$isInstalled = file_exists($installedFlagPath) || (
@@ -11,11 +11,11 @@ $isInstalled = file_exists($installedFlagPath) || (
);
// 미설치 시 /install로 리다이렉트
if (! $isInstalled) {
$installUrl = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/install';
if (!$isInstalled) {
$installUrl = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/install';
echo '<script>
alert("G7 최초 사용을 위해 설치 절차가 필요합니다. 설치 화면으로 이동합니다.");
window.location.href="'.htmlspecialchars($installUrl).'";
window.location.href="' . htmlspecialchars($installUrl) . '";
</script>';
exit;
}
@@ -42,7 +42,7 @@ if (file_exists($extensionAutoloadFile)) {
$extensionAutoloads = require $extensionAutoloadFile;
// PSR-4 네임스페이스 등록
if (! empty($extensionAutoloads['psr4'])) {
if (!empty($extensionAutoloads['psr4'])) {
foreach ($extensionAutoloads['psr4'] as $namespace => $paths) {
// 경로가 배열인 경우와 문자열인 경우 모두 처리
$paths = (array) $paths;
@@ -55,21 +55,8 @@ if (file_exists($extensionAutoloadFile)) {
}
}
// 확장 소스 classmap 등록 (FQCN → 절대경로).
// findFile 이 파일시스템 스캔(is_dir/file_exists stat) 없이 in-memory 맵에서 즉시
// 경로를 반환하도록 한다. cold OPcache / 느린 파일시스템 환경의 findFile 비용 제거.
// 클래스 로딩은 여전히 lazy — 실제 사용 시점에만 include. classmap 미포함 클래스는
// 위 PSR-4 등록으로 폴백(안전망).
if (! empty($extensionAutoloads['src_classmap'])) {
$absoluteClassmap = [];
foreach ($extensionAutoloads['src_classmap'] as $fqcn => $relPath) {
$absoluteClassmap[$fqcn] = __DIR__.'/../'.$relPath;
}
$loader->addClassMap($absoluteClassmap);
}
// Classmap 파일 로드 (module.php, plugin.php)
if (! empty($extensionAutoloads['classmap'])) {
if (!empty($extensionAutoloads['classmap'])) {
foreach ($extensionAutoloads['classmap'] as $file) {
$absolutePath = __DIR__.'/../'.$file;
if (file_exists($absolutePath)) {
@@ -79,7 +66,7 @@ if (file_exists($extensionAutoloadFile)) {
}
// Files 로드 (헬퍼 함수 등)
if (! empty($extensionAutoloads['files'])) {
if (!empty($extensionAutoloads['files'])) {
foreach ($extensionAutoloads['files'] as $file) {
$absolutePath = __DIR__.'/../'.$file;
if (file_exists($absolutePath)) {
@@ -89,7 +76,7 @@ if (file_exists($extensionAutoloadFile)) {
}
// Vendor autoloads 로드 (모듈/플러그인의 composer 의존성)
if (! empty($extensionAutoloads['vendor_autoloads'])) {
if (!empty($extensionAutoloads['vendor_autoloads'])) {
foreach ($extensionAutoloads['vendor_autoloads'] as $vendorAutoload) {
$absolutePath = __DIR__.'/../'.$vendorAutoload;
if (file_exists($absolutePath)) {
+1 -22
View File
@@ -138,28 +138,7 @@ class StateManagementApi
];
// JSON 응답 반환
//
// 최종 안전망 (gnuboard/g7#62): $response['logs'] 에 invalid UTF-8 바이트가
// 섞이면 json_encode 가 false 를 반환하고 echo false = 빈 본문(HTTP 200) 이 되어
// 프론트 폴링(res.json())이 "Unexpected end of JSON input" 으로 폭주한다.
// 로그는 addLog / task-runner 에서 이미 scrub 되지만, 어떤 경로로도 응답이
// 빈 본문이 되지 않도록 JSON_INVALID_UTF8_SUBSTITUTE 로 치환하고 false 를 가드한다.
$encoded = json_encode(
$response,
JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_INVALID_UTF8_SUBSTITUTE
);
if ($encoded === false) {
// substitute 플래그로도 인코딩 실패한 극단적 케이스 — 폴링이 파싱 가능한
// 최소 유효 JSON 을 반환해 프론트가 다음 tick 에서 정상 복구되도록 한다.
$encoded = json_encode([
'status' => $status,
'logs' => [],
'log_total' => $logTotal,
], JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE);
}
echo $encoded;
echo json_encode($response, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
}
/**
+146 -159
View File
@@ -5,6 +5,8 @@
*
* HTML/JavaScript 이스케이프, 데이터베이스 연결, 권한 검증, 에러 로깅 등의
* 공통 유틸리티 함수를 제공합니다.
*
* @package G7\Installer
*/
/**
@@ -43,9 +45,8 @@ function js_escape(mixed $value): string
/**
* 데이터베이스 연결 생성
*
* @param array $config 데이터베이스 연결 정보 배열
* @param bool $isReadDb Read DB 여부 (true: read, false: write)
*
* @param array $config 데이터베이스 연결 정보 배열
* @param bool $isReadDb Read DB 여부 (true: read, false: write)
* @throws PDOException 연결 실패 시
*/
function getDatabaseConnection(array $config, bool $isReadDb = false): PDO
@@ -96,9 +97,9 @@ function getDatabaseConnection(array $config, bool $isReadDb = false): PDO
/**
* 데이터베이스 권한 검증
*
* @param PDO $pdo PDO 연결 객체
* @param string $database 데이터베이스명
* @param bool $isReadDb Read DB 여부 (true: read, false: write)
* @param PDO $pdo PDO 연결 객체
* @param string $database 데이터베이스명
* @param bool $isReadDb Read DB 여부 (true: read, false: write)
* @return array{has_all: bool, required: array<string>, found: array<string>, missing: array<string>}
*/
function checkDatabasePrivileges(PDO $pdo, string $database, bool $isReadDb = false): array
@@ -164,7 +165,7 @@ function checkDatabasePrivileges(PDO $pdo, string $database, bool $isReadDb = fa
*
* Synology DSM 등 PHP-FPM root 실행 환경 + 비대화형 컨텍스트 대응.
*/
if (! function_exists('applyInstallerComposerEnvVars')) {
if (!function_exists('applyInstallerComposerEnvVars')) {
function applyInstallerComposerEnvVars(): void
{
putenv('COMPOSER_ALLOW_SUPERUSER=1');
@@ -179,7 +180,7 @@ if (! function_exists('applyInstallerComposerEnvVars')) {
*
* @return array<string, string>
*/
if (! function_exists('buildInstallerComposerEnv')) {
if (!function_exists('buildInstallerComposerEnv')) {
function buildInstallerComposerEnv(): array
{
return [
@@ -192,13 +193,13 @@ if (! function_exists('buildInstallerComposerEnv')) {
/**
* 인스톨러 에러 로깅
*
* @param string $message 에러 메시지
* @param Throwable|null $exception 예외 객체 (선택)
* @param string $message 에러 메시지
* @param Throwable|null $exception 예외 객체 (선택)
*/
function logInstallationError(string $message, ?Throwable $exception = null): void
{
$logDir = BASE_PATH.'/storage/logs';
$logFile = $logDir.'/installer.log';
$logDir = BASE_PATH . '/storage/logs';
$logFile = $logDir . '/installer.log';
// 로그 디렉토리 생성
if (! is_dir($logDir)) {
@@ -211,13 +212,13 @@ function logInstallationError(string $message, ?Throwable $exception = null): vo
if ($exception !== null) {
$logMessage .= "\n";
$logMessage .= 'Exception: '.get_class($exception)."\n";
$logMessage .= "Exception: " . get_class($exception) . "\n";
$logMessage .= "Message: {$exception->getMessage()}\n";
$logMessage .= "File: {$exception->getFile()}:{$exception->getLine()}\n";
$logMessage .= "Trace:\n{$exception->getTraceAsString()}\n";
}
$logMessage .= "\n".str_repeat('-', 80)."\n\n";
$logMessage .= "\n" . str_repeat('-', 80) . "\n\n";
// 로그 파일에 기록
@file_put_contents($logFile, $logMessage, FILE_APPEND | LOCK_EX);
@@ -231,7 +232,7 @@ function logInstallationError(string $message, ?Throwable $exception = null): vo
function detectBrowserLanguage(): ?string
{
// HTTP_ACCEPT_LANGUAGE 헤더가 없으면 null 반환
if (! isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
return null;
}
@@ -285,14 +286,14 @@ function getCurrentLanguage(): string
/**
* 지정된 언어의 번역 파일을 로드합니다.
*
* @param string $lang 언어 코드 (예: 'ko', 'en')
* @param string $lang 언어 코드 (예: 'ko', 'en')
* @return array<string, mixed> 번역 배열, 파일이 없으면 빈 배열
*/
function loadTranslations(string $lang): array
{
$langFile = __DIR__."/../lang/{$lang}.php";
$langFile = __DIR__ . "/../lang/{$lang}.php";
if (! file_exists($langFile)) {
if (!file_exists($langFile)) {
return [];
}
@@ -307,15 +308,15 @@ function loadTranslations(string $lang): array
* global $translations 배열에서 키에 해당하는 값을 찾아 반환합니다.
* 키가 존재하지 않으면 키 자체를 반환합니다.
*
* @param string $key 번역 키 (예: 'welcome_title', 'next_step')
* @param array $replace 치환할 플레이스홀더 배열 (예: ['current' => '8.2', 'min' => '8.2'])
* @param string $key 번역 키 (예: 'welcome_title', 'next_step')
* @param array $replace 치환할 플레이스홀더 배열 (예: ['current' => '8.2', 'min' => '8.2'])
*/
if (! function_exists('lang')) {
function lang(string $key, array $replace = []): string
{
global $translations;
if (! isset($translations) || ! is_array($translations)) {
if (!isset($translations) || !is_array($translations)) {
return $key;
}
@@ -333,7 +334,7 @@ if (! function_exists('lang')) {
/**
* 설치 단계 이름을 반환합니다.
*
* @param int $step 단계 번호 (0~5, 6은 예약됨)
* @param int $step 단계 번호 (0~5, 6은 예약됨)
* @return string 단계명 번역 키
*/
function getStepName(int $step): string
@@ -354,7 +355,7 @@ function getStepName(int $step): string
/**
* 설치 작업 이름을 반환합니다.
*
* @param string $task 작업 ID (예: 'composer_check', 'env_create')
* @param string $task 작업 ID (예: 'composer_check', 'env_create')
* @return string 작업명 번역 키
*/
function getTaskName(string $task): string
@@ -393,12 +394,12 @@ function getTaskName(string $task): string
/**
* 지정한 Step으로 리다이렉트합니다.
*
* @param int $step 이동할 단계 번호
* @param int $step 이동할 단계 번호
*/
function redirectToStep(int $step): void
{
$_SESSION['installer_current_step'] = $step;
header('Location: '.INSTALLER_BASE_URL.'/');
header("Location: " . INSTALLER_BASE_URL . "/");
exit;
}
@@ -410,12 +411,12 @@ function redirectToStep(int $step): void
* - state.json: 다른 브라우저에서 재개 시 사용, 설치 완료 후 Laravel 본체에 전달
* - localStorage: JavaScript에서 직접 관리 (0-welcome.php에서 처리)
*
* @param string $lang 언어 코드 ('ko' 또는 'en')
* @param string $lang 언어 코드 ('ko' 또는 'en')
*/
function handleLanguageChange(string $lang): void
{
// 지원하는 언어만 허용
if (! array_key_exists($lang, SUPPORTED_LANGUAGES)) {
if (!array_key_exists($lang, SUPPORTED_LANGUAGES)) {
return;
}
@@ -431,9 +432,9 @@ function handleLanguageChange(string $lang): void
/**
* 현재 단계의 상태를 업데이트합니다.
*
* @param int $step 완료할 단계 번호
* @param int $nextStep 다음 단계 번호
* @param array $additionalData 추가로 저장할 state 데이터 (예: ['config' => $data])
* @param int $step 완료할 단계 번호
* @param int $nextStep 다음 단계 번호
* @param array $additionalData 추가로 저장할 state 데이터 (예: ['config' => $data])
*/
function updateStepStatus(int $step, int $nextStep, array $additionalData = []): void
{
@@ -441,7 +442,7 @@ function updateStepStatus(int $step, int $nextStep, array $additionalData = []):
$state['current_step'] = $nextStep;
$state['step_status'][$step] = 'completed';
if (! empty($additionalData)) {
if (!empty($additionalData)) {
$state = array_merge($state, $additionalData);
}
@@ -454,7 +455,6 @@ function updateStepStatus(int $step, int $nextStep, array $additionalData = []):
function isInstallationRunning(): bool
{
$state = getInstallationState();
return isset($state['installation_status']) && $state['installation_status'] === 'running';
}
@@ -466,7 +466,7 @@ function showInstallationRunningAlert(): void
global $translations;
// 번역이 로드되지 않은 경우 로드
if (! isset($translations)) {
if (!isset($translations)) {
$translations = loadTranslations(getCurrentLanguage());
}
@@ -474,7 +474,7 @@ function showInstallationRunningAlert(): void
showAlertAndRedirect(
lang('installation_in_progress'),
lang('installation_in_progress_message'),
INSTALLER_BASE_URL.'/'
INSTALLER_BASE_URL . '/'
);
}
@@ -486,7 +486,7 @@ function showInstallationCompletedAlert(): void
global $translations;
// 번역이 로드되지 않은 경우 로드
if (! isset($translations)) {
if (!isset($translations)) {
$translations = loadTranslations(getCurrentLanguage());
}
@@ -500,15 +500,15 @@ function showInstallationCompletedAlert(): void
/**
* 알럿을 표시하고 지정된 URL로 리다이렉트합니다.
*
* @param string $title 페이지 제목
* @param string $message 알럿 메시지
* @param string $redirectUrl 리다이렉트 URL
* @param string $title 페이지 제목
* @param string $message 알럿 메시지
* @param string $redirectUrl 리다이렉트 URL
*/
function showAlertAndRedirect(string $title, string $message, string $redirectUrl): void
{
global $translations;
if (! isset($translations)) {
if (!isset($translations)) {
$translations = loadTranslations(getCurrentLanguage());
}
@@ -518,16 +518,16 @@ function showAlertAndRedirect(string $title, string $message, string $redirectUr
$redirectUrl = htmlspecialchars($redirectUrl);
echo '<!DOCTYPE html>';
echo '<html lang="'.$lang.'">';
echo '<html lang="' . $lang . '">';
echo '<head>';
echo '<meta charset="UTF-8">';
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
echo '<title>'.$title.'</title>';
echo '<title>' . $title . '</title>';
echo '</head>';
echo '<body>';
echo '<script>';
echo 'alert("'.$message.'");';
echo 'window.location.href = "'.$redirectUrl.'";';
echo 'alert("' . $message . '");';
echo 'window.location.href = "' . $redirectUrl . '";';
echo '</script>';
echo '</body>';
echo '</html>';
@@ -537,7 +537,7 @@ function showAlertAndRedirect(string $title, string $message, string $redirectUr
/**
* 단계 파일을 찾을 수 없을 때 에러 페이지를 표시합니다.
*
* @param int $currentStep 현재 단계 번호
* @param int $currentStep 현재 단계 번호
*/
function showStepFileNotFoundError(int $currentStep): void
{
@@ -553,9 +553,9 @@ function showStepFileNotFoundError(int $currentStep): void
echo '</span>';
echo lang('error');
echo '</h1>';
echo '<p class="installer-description">'.lang('error_step_file_not_found').'</p>';
echo '<p class="installer-description">' . lang('error_step_file_not_found') . '</p>';
echo '<div class="btn-group">';
echo '<a href="'.INSTALLER_BASE_URL.'/" class="btn btn-secondary">← '.lang('previous').'</a>';
echo '<a href="' . INSTALLER_BASE_URL . '/" class="btn btn-secondary">← ' . lang('previous') . '</a>';
echo '</div>';
echo '</div>';
}
@@ -565,8 +565,8 @@ function showStepFileNotFoundError(int $currentStep): void
*
* DB 연결 정보가 변경되었는지 감지하기 위해 사용됩니다.
*
* @param array $config 폼 데이터 배열
* @param string $prefix DB 접두사 ('db_write' 또는 'db_read')
* @param array $config 폼 데이터 배열
* @param string $prefix DB 접두사 ('db_write' 또는 'db_read')
* @return string MD5 해시값
*/
function getDatabaseFieldHash(array $config, string $prefix): string
@@ -575,14 +575,14 @@ function getDatabaseFieldHash(array $config, string $prefix): string
$config["{$prefix}_host"] ?? '',
$config["{$prefix}_port"] ?? '',
$config["{$prefix}_database"] ?? '',
$config["{$prefix}_username"] ?? '',
$config["{$prefix}_username"] ?? ''
]));
}
/**
* SVG 아이콘을 반환합니다.
*
* @param string $type 아이콘 타입 ('success', 'warning', 'error')
* @param string $type 아이콘 타입 ('success', 'warning', 'error')
* @return string SVG HTML
*/
function getSvgIcon(string $type): string
@@ -609,12 +609,12 @@ function getSvgIcon(string $type): string
/**
* 설치 결과 섹션 HTML을 렌더링합니다.
*
* @param string $sectionId 섹션 ID ('completion', 'aborted', 'failure')
* @param string $iconType 아이콘 타입 ('success', 'warning', 'error')
* @param string $titleKey 제목 번역 키
* @param string $messageKey 메시지 번역 키 (failure인 경우 동적)
* @param string $buttonsHtml 버튼 HTML
* @param string $extraHtml 메시지 하단에 추가로 렌더링할 HTML (이미 escape 된 상태로 전달)
* @param string $sectionId 섹션 ID ('completion', 'aborted', 'failure')
* @param string $iconType 아이콘 타입 ('success', 'warning', 'error')
* @param string $titleKey 제목 번역 키
* @param string $messageKey 메시지 번역 키 (failure인 경우 동적)
* @param string $buttonsHtml 버튼 HTML
* @param string $extraHtml 메시지 하단에 추가로 렌더링할 HTML (이미 escape 된 상태로 전달)
* @return string 결과 섹션 HTML
*/
function renderInstallResultSection(string $sectionId, string $iconType, string $titleKey, string $messageKey, string $buttonsHtml, string $extraHtml = ''): string
@@ -625,7 +625,7 @@ function renderInstallResultSection(string $sectionId, string $iconType, string
// failure는 동적 메시지이므로 번역하지 않음
$message = $sectionId === 'failure'
? '<div class="result-message" id="failure-message"></div>'
: '<p class="result-message">'.htmlspecialchars(lang($messageKey)).'</p>';
: '<p class="result-message">' . htmlspecialchars(lang($messageKey)) . '</p>';
return <<<HTML
<div id="{$sectionId}-section" class="result-section hidden">
@@ -657,8 +657,8 @@ function renderInstallResultSection(string $sectionId, string $iconType, string
function getCoreAppVersion(): string
{
foreach (['/.env', '/.env.example'] as $relative) {
$path = BASE_PATH.$relative;
if (! is_readable($path)) {
$path = BASE_PATH . $relative;
if (!is_readable($path)) {
continue;
}
$content = @file_get_contents($path);
@@ -676,8 +676,8 @@ function getCoreAppVersion(): string
/**
* Progress indicator HTML을 렌더링합니다.
*
* @param int $currentStep 현재 단계 번호
* @param int $totalSteps 전체 단계 수 (기본값: 7, Step 0~6)
* @param int $currentStep 현재 단계 번호
* @param int $totalSteps 전체 단계 수 (기본값: 7, Step 0~6)
* @return string Progress indicator HTML
*/
function renderProgressIndicator(int $currentStep, int $totalSteps = 7): string
@@ -690,10 +690,9 @@ function renderProgressIndicator(int $currentStep, int $totalSteps = 7): string
} elseif ($i === $currentStep) {
$class .= ' active';
}
$html .= '<div class="'.$class.'"></div>';
$html .= '<div class="' . $class . '"></div>';
}
$html .= '</div>';
return $html;
}
@@ -710,7 +709,7 @@ function getWebServerUser(): ?string
// 1. posix 확장 (가장 신뢰도 높음)
if (function_exists('posix_geteuid') && function_exists('posix_getpwuid')) {
$info = posix_getpwuid(posix_geteuid());
if ($info && ! empty($info['name'])) {
if ($info && !empty($info['name'])) {
return $info['name'];
}
}
@@ -718,14 +717,14 @@ function getWebServerUser(): ?string
// 2. exec('whoami')
if (function_exists('exec')) {
$user = @exec('whoami');
if (! empty($user)) {
if (!empty($user)) {
return trim($user);
}
}
// 3. 환경변수
$envUser = getenv('USER') ?: getenv('APACHE_RUN_USER') ?: null;
if (! empty($envUser)) {
if (!empty($envUser)) {
return $envUser;
}
@@ -741,13 +740,13 @@ function getWebServerGroup(): ?string
{
if (function_exists('posix_getegid') && function_exists('posix_getgrgid')) {
$info = posix_getgrgid(posix_getegid());
if ($info && ! empty($info['name'])) {
if ($info && !empty($info['name'])) {
return $info['name'];
}
}
$envGroup = getenv('APACHE_RUN_GROUP') ?: null;
if (! empty($envGroup)) {
if (!empty($envGroup)) {
return $envGroup;
}
@@ -759,7 +758,7 @@ function getWebServerGroup(): ?string
*
* posix 확장이 없거나 확인할 수 없는 경우 null을 반환합니다.
*
* @param string $path 파일/디렉토리 경로
* @param string $path 파일/디렉토리 경로
* @return string|null 소유자 이름 또는 null
*/
function getFileOwnerName(string $path): ?string
@@ -771,7 +770,7 @@ function getFileOwnerName(string $path): ?string
if (function_exists('posix_getpwuid')) {
$info = @posix_getpwuid($uid);
if ($info && ! empty($info['name'])) {
if ($info && !empty($info['name'])) {
return $info['name'];
}
}
@@ -785,7 +784,7 @@ function getFileOwnerName(string $path): ?string
*
* posix 확장이 없거나 확인할 수 없는 경우 null을 반환합니다.
*
* @param string $path 파일/디렉토리 경로
* @param string $path 파일/디렉토리 경로
* @return string|null 그룹 이름 또는 null
*/
function getFileGroupName(string $path): ?string
@@ -797,7 +796,7 @@ function getFileGroupName(string $path): ?string
if (function_exists('posix_getgrgid')) {
$info = @posix_getgrgid($gid);
if ($info && ! empty($info['name'])) {
if ($info && !empty($info['name'])) {
return $info['name'];
}
}
@@ -818,7 +817,7 @@ function getChownTarget(): string
$user = getWebServerUser() ?? 'www-data';
$group = getWebServerGroup() ?? $user;
return $user.':'.$group;
return $user . ':' . $group;
}
/**
@@ -827,7 +826,7 @@ function getChownTarget(): string
* Step 0과 Step 2에서 재사용 가능한 공통 함수입니다.
* 디렉토리를 생성하지 않고 존재 여부와 권한만 체크합니다.
*
* @param array<string, bool> $directories 체크할 디렉토리 경로 배열 (키: 경로, 값: 재귀 체크 여부)
* @param array<string, bool> $directories 체크할 디렉토리 경로 배열 (키: 경로, 값: 재귀 체크 여부)
* @return array{all_passed: bool, results: array<string, array{exists: bool, writable: bool, permissions: string, required_permissions: string, passed: bool, has_subdirectory_issues: bool, failed_subdirectories: array<string>}>}
*/
function checkDirectoryPermissions(array $directories): array
@@ -843,7 +842,7 @@ function checkDirectoryPermissions(array $directories): array
$webServerUser = getWebServerUser();
foreach ($directories as $path => $checkRecursive) {
$fullPath = BASE_PATH.'/'.$path;
$fullPath = BASE_PATH . '/' . $path;
// 디렉토리 존재 여부 확인 (생성하지 않음)
$exists = is_dir($fullPath);
@@ -884,22 +883,22 @@ function checkDirectoryPermissions(array $directories): array
$parentPassed = $writable && $readable;
// 최종 통과 여부: 상위 + 하위 모두 통과해야 함
$passed = $parentPassed && ! $hasSubdirectoryIssues;
$passed = $parentPassed && !$hasSubdirectoryIssues;
// 에러 타입 구분
// ownership_mismatch: 권한 비트는 0755 이상이지만 소유자가 웹서버 사용자와 달라
// 실제 쓰기 불가 (전통적 Apache: 파일 소유자 != www-data)
$errorType = null;
if (! $exists) {
if (!$exists) {
$errorType = 'not_exists';
} elseif (! $writable) {
} elseif (!$writable) {
// 권한 비트가 충분(0755+)한데도 쓰기 불가 → 소유권 불일치 가능성
if ($permsOctal >= 0755 && $webServerUser && $owner && $owner !== $webServerUser) {
$errorType = 'ownership_mismatch';
} else {
$errorType = 'not_writable';
}
} elseif (! $readable) {
} elseif (!$readable) {
$errorType = 'not_readable';
} elseif ($hasSubdirectoryIssues) {
// 상위는 OK, 하위 디렉토리만 문제
@@ -921,7 +920,7 @@ function checkDirectoryPermissions(array $directories): array
'failed_subdirectories' => $failedSubdirectories,
];
if (! $passed) {
if (!$passed) {
$allPassed = false;
}
}
@@ -935,22 +934,14 @@ function checkDirectoryPermissions(array $directories): array
/**
* 디렉토리의 하위를 재귀적으로 체크하여 권한이 없는 경로와 권한 정보 반환
*
* 깊이 제한(maxDepth)을 둔다 (dev-g7#445 후속): storage 처럼 하위에 수만 개
* 디렉토리가 누적되는 경로(예: storage/framework/testing/)를 무한 재귀로 순회하면
* 인스톨러 2단계(요구사항 검증) 응답이 수 초 이상 지연된다. 쓰기 권한 문제는 트리
* 상위 얕은 깊이에서 결정되므로(상위가 쓰기 가능하면 하위도 통상 상속), 제한 깊이까지만
* 검사해 성능과 안내 유효성을 모두 확보한다.
*
* @param string $path 체크할 디렉토리 경로
* @param int $maxDepth 재귀 최대 깊이 (0 = 현재 디렉토리의 직속 하위만). 기본 1
* @param int $currentDepth 내부 재귀용 현재 깊이 (호출자는 지정하지 않음)
* @param string $path 체크할 디렉토리 경로
* @return array<array{path: string, permissions: string}> 권한이 없는 하위 디렉토리 정보 배열
*/
function checkSubdirectoriesRecursive(string $path, int $maxDepth = 1, int $currentDepth = 0): array
function checkSubdirectoriesRecursive(string $path): array
{
$failedPaths = [];
if (! is_dir($path)) {
if (!is_dir($path)) {
return $failedPaths;
}
@@ -971,21 +962,21 @@ function checkSubdirectoriesRecursive(string $path, int $maxDepth = 1, int $curr
continue;
}
$itemPath = $path.DIRECTORY_SEPARATOR.$item;
$itemPath = $path . DIRECTORY_SEPARATOR . $item;
// 디렉토리인지 확인 (심볼릭 링크 제외)
if (! is_dir($itemPath) || is_link($itemPath)) {
if (!is_dir($itemPath) || is_link($itemPath)) {
continue;
}
// 절대 경로를 상대 경로로 변환
$relativePath = str_replace(BASE_PATH.'/', '', $itemPath);
$relativePath = str_replace(BASE_PATH . '/', '', $itemPath);
$relativePath = str_replace('\\', '/', $relativePath);
// 쓰기 권한 체크
$isWritable = is_writable($itemPath);
if (! $isWritable) {
if (!$isWritable) {
// 권한 코드 가져오기
$perms = fileperms($itemPath);
$permissions = substr(sprintf('%o', $perms), -3);
@@ -997,15 +988,11 @@ function checkSubdirectoriesRecursive(string $path, int $maxDepth = 1, int $curr
}
// 재귀적으로 하위 디렉토리 체크 (권한 없어도 계속 진행)
// 깊이 제한 도달 시 더 내려가지 않는다 — storage/framework/testing 등에 누적된
// 수만 개 하위 디렉토리를 순회해 인스톨러 2단계가 지연되던 문제 차단 (dev-g7#445 후속).
if ($currentDepth < $maxDepth) {
try {
$subFailed = checkSubdirectoriesRecursive($itemPath, $maxDepth, $currentDepth + 1);
$failedPaths = array_merge($failedPaths, $subFailed);
} catch (Exception $e) {
// 하위 디렉토리 체크 실패해도 계속 진행
}
try {
$subFailed = checkSubdirectoriesRecursive($itemPath);
$failedPaths = array_merge($failedPaths, $subFailed);
} catch (Exception $e) {
// 하위 디렉토리 체크 실패해도 계속 진행
}
}
@@ -1017,12 +1004,12 @@ function checkSubdirectoriesRecursive(string $path, int $maxDepth = 1, int $curr
*
* 루트 LICENSE 파일을 읽습니다. (한국어 번역 + 영문 원문 통합)
*
* @param string $lang 언어 코드 (미사용, 하위 호환성 유지)
* @param string $lang 언어 코드 (미사용, 하위 호환성 유지)
* @return string 라이선스 파일 내용
*/
function loadLicenseFile(string $lang): string
{
$licenseFile = __DIR__.'/../../../LICENSE';
$licenseFile = __DIR__ . '/../../../LICENSE';
if (file_exists($licenseFile)) {
return file_get_contents($licenseFile);
@@ -1037,7 +1024,7 @@ function loadLicenseFile(string $lang): string
* 특수 문자가 포함된 값을 .env 파일에 안전하게 기록할 수 있도록 큰따옴표로 감싸고
* 내부 큰따옴표와 백슬래시를 이스케이프합니다.
*
* @param string $value 이스케이프할 값
* @param string $value 이스케이프할 값
* @return string 큰따옴표로 감싸고 내부 큰따옴표와 백슬래시를 이스케이프한 값
*/
function escapeEnvValue(string $value): string
@@ -1057,7 +1044,7 @@ function escapeEnvValue(string $value): string
$escaped = str_replace(['\\', '"'], ['\\\\', '\\"'], $value);
// 큰따옴표로 감싸기
return '"'.$escaped.'"';
return '"' . $escaped . '"';
}
/**
@@ -1070,8 +1057,8 @@ function escapeEnvValue(string $value): string
*/
function generateEnvContent(): ?string
{
$envExamplePath = BASE_PATH.'/.env.example';
if (! file_exists($envExamplePath)) {
$envExamplePath = BASE_PATH . '/.env.example';
if (!file_exists($envExamplePath)) {
return null;
}
@@ -1082,41 +1069,39 @@ function generateEnvContent(): ?string
// 데이터베이스 설정 치환
$replacements = [
'DB_CONNECTION=mysql' => 'DB_CONNECTION=mysql',
'DB_WRITE_HOST=127.0.0.1' => 'DB_WRITE_HOST='.($config['db_write_host'] ?? '127.0.0.1'),
'DB_WRITE_PORT=3306' => 'DB_WRITE_PORT='.($config['db_write_port'] ?? '3306'),
'DB_WRITE_DATABASE=g7' => 'DB_WRITE_DATABASE='.($config['db_write_database'] ?? 'g7'),
'DB_WRITE_USERNAME=root' => 'DB_WRITE_USERNAME='.($config['db_write_username'] ?? 'root'),
'DB_WRITE_PASSWORD=' => 'DB_WRITE_PASSWORD='.escapeEnvValue($config['db_write_password'] ?? ''),
'DB_PREFIX=g7_' => 'DB_PREFIX='.($config['db_prefix'] ?? 'g7_'),
'DB_WRITE_HOST=127.0.0.1' => 'DB_WRITE_HOST=' . ($config['db_write_host'] ?? '127.0.0.1'),
'DB_WRITE_PORT=3306' => 'DB_WRITE_PORT=' . ($config['db_write_port'] ?? '3306'),
'DB_WRITE_DATABASE=g7' => 'DB_WRITE_DATABASE=' . ($config['db_write_database'] ?? 'g7'),
'DB_WRITE_USERNAME=root' => 'DB_WRITE_USERNAME=' . ($config['db_write_username'] ?? 'root'),
'DB_WRITE_PASSWORD=' => 'DB_WRITE_PASSWORD=' . escapeEnvValue($config['db_write_password'] ?? ''),
'DB_PREFIX=g7_' => 'DB_PREFIX=' . ($config['db_prefix'] ?? 'g7_'),
];
// Read DB 설정
if (! empty($config['use_read_db']) && $config['use_read_db']) {
$replacements['DB_READ_HOST='] = 'DB_READ_HOST='.($config['db_read_host'] ?? '127.0.0.1');
$replacements['DB_READ_PORT='] = 'DB_READ_PORT='.($config['db_read_port'] ?? '3306');
$replacements['DB_READ_DATABASE='] = 'DB_READ_DATABASE='.($config['db_read_database'] ?? 'g7');
$replacements['DB_READ_USERNAME='] = 'DB_READ_USERNAME='.($config['db_read_username'] ?? 'root');
$replacements['DB_READ_PASSWORD='] = 'DB_READ_PASSWORD='.escapeEnvValue($config['db_read_password'] ?? '');
if (!empty($config['use_read_db']) && $config['use_read_db']) {
$replacements['DB_READ_HOST='] = 'DB_READ_HOST=' . ($config['db_read_host'] ?? '127.0.0.1');
$replacements['DB_READ_PORT='] = 'DB_READ_PORT=' . ($config['db_read_port'] ?? '3306');
$replacements['DB_READ_DATABASE='] = 'DB_READ_DATABASE=' . ($config['db_read_database'] ?? 'g7');
$replacements['DB_READ_USERNAME='] = 'DB_READ_USERNAME=' . ($config['db_read_username'] ?? 'root');
$replacements['DB_READ_PASSWORD='] = 'DB_READ_PASSWORD=' . escapeEnvValue($config['db_read_password'] ?? '');
} else {
// Read DB를 사용하지 않는 경우 DB_READ_* 를 빈 값으로 둔다.
// config/database.php 의 write fallback(Elvis) 이 SELECT 를 write DB 로 넘기므로
// .env 에 write 값을 중복 기록하지 않는다 (write 변경 시 read stale 방지). (이슈 #63)
$replacements['DB_READ_HOST='] = 'DB_READ_HOST=';
$replacements['DB_READ_PORT='] = 'DB_READ_PORT=';
$replacements['DB_READ_DATABASE='] = 'DB_READ_DATABASE=';
$replacements['DB_READ_USERNAME='] = 'DB_READ_USERNAME=';
$replacements['DB_READ_PASSWORD='] = 'DB_READ_PASSWORD=';
// Read DB를 사용하지 않는 경우 Write DB 정보와 동일하게 설정
$replacements['DB_READ_HOST='] = 'DB_READ_HOST=' . ($config['db_write_host'] ?? '127.0.0.1');
$replacements['DB_READ_PORT='] = 'DB_READ_PORT=' . ($config['db_write_port'] ?? '3306');
$replacements['DB_READ_DATABASE='] = 'DB_READ_DATABASE=' . ($config['db_write_database'] ?? 'g7');
$replacements['DB_READ_USERNAME='] = 'DB_READ_USERNAME=' . ($config['db_write_username'] ?? 'root');
$replacements['DB_READ_PASSWORD='] = 'DB_READ_PASSWORD=' . escapeEnvValue($config['db_write_password'] ?? '');
}
// 앱 설정 치환
$replacements['APP_NAME=그누보드7'] = 'APP_NAME="'.($config['app_name'] ?? '그누보드7').'"';
$replacements['APP_ENV=production'] = 'APP_ENV='.($config['app_env'] ?? 'production');
$replacements['APP_URL=http://localhost'] = 'APP_URL='.($config['app_url'] ?? 'http://localhost');
$replacements['APP_NAME=그누보드7'] = 'APP_NAME="' . ($config['app_name'] ?? '그누보드7') . '"';
$replacements['APP_ENV=production'] = 'APP_ENV=' . ($config['app_env'] ?? 'production');
$replacements['APP_URL=http://localhost'] = 'APP_URL=' . ($config['app_url'] ?? 'http://localhost');
// 언어 설정
$currentLang = getCurrentLanguage();
$replacements['APP_LOCALE=ko'] = 'APP_LOCALE='.$currentLang;
$replacements['APP_FAKER_LOCALE=ko_KR'] = 'APP_FAKER_LOCALE='.($currentLang === 'ko' ? 'ko_KR' : 'en_US');
$replacements['APP_LOCALE=ko'] = 'APP_LOCALE=' . $currentLang;
$replacements['APP_FAKER_LOCALE=ko_KR'] = 'APP_FAKER_LOCALE=' . ($currentLang === 'ko' ? 'ko_KR' : 'en_US');
if (isset($config['app_env']) && $config['app_env'] !== 'production') {
$replacements['APP_DEBUG=false'] = 'APP_DEBUG=true';
@@ -1127,15 +1112,15 @@ function generateEnvContent(): ?string
$coreGithubUrl = $config['core_update_github_url'] ?? 'https://github.com/gnuboard/g7';
$coreGithubToken = $config['core_update_github_token'] ?? '';
$replacements['G7_UPDATE_PENDING_PATH='] = 'G7_UPDATE_PENDING_PATH='.escapeEnvValue($corePendingPath);
$replacements['G7_UPDATE_GITHUB_URL=https://github.com/gnuboard/g7'] = 'G7_UPDATE_GITHUB_URL='.$coreGithubUrl;
$replacements['G7_UPDATE_GITHUB_TOKEN='] = 'G7_UPDATE_GITHUB_TOKEN='.escapeEnvValue($coreGithubToken);
$replacements['G7_UPDATE_PENDING_PATH='] = 'G7_UPDATE_PENDING_PATH=' . escapeEnvValue($corePendingPath);
$replacements['G7_UPDATE_GITHUB_URL=https://github.com/gnuboard/g7'] = 'G7_UPDATE_GITHUB_URL=' . $coreGithubUrl;
$replacements['G7_UPDATE_GITHUB_TOKEN='] = 'G7_UPDATE_GITHUB_TOKEN=' . escapeEnvValue($coreGithubToken);
// PHP CLI / Composer 바이너리 경로 치환
$phpBinary = $config['php_binary'] ?? 'php';
$composerBinary = $config['composer_binary'] ?? '';
$replacements['PHP_BINARY=php'] = 'PHP_BINARY='.escapeEnvValue($phpBinary);
$replacements['COMPOSER_BINARY='] = 'COMPOSER_BINARY='.escapeEnvValue($composerBinary);
$replacements['PHP_BINARY=php'] = 'PHP_BINARY=' . escapeEnvValue($phpBinary);
$replacements['COMPOSER_BINARY='] = 'COMPOSER_BINARY=' . escapeEnvValue($composerBinary);
foreach ($replacements as $search => $replace) {
$envContent = str_replace($search, $replace, $envContent);
@@ -1157,22 +1142,22 @@ function isWindows(): bool
/**
* OS에 맞는 .env 파일 복사 명령어를 반환합니다.
*
* @param string $basePath 프로젝트 루트 경로 (빈 문자열이면 상대 경로 사용)
* @param string $basePath 프로젝트 루트 경로 (빈 문자열이면 상대 경로 사용)
* @return string 복사 명령어
*/
function getEnvCopyCommand(string $basePath = ''): string
{
if (isWindows()) {
$source = $basePath ? $basePath.'\\.env.example' : '.env.example';
$dest = $basePath ? $basePath.'\\.env' : '.env';
$source = $basePath ? $basePath . '\\.env.example' : '.env.example';
$dest = $basePath ? $basePath . '\\.env' : '.env';
return 'copy '.str_replace('/', '\\', $source).' '.str_replace('/', '\\', $dest);
return 'copy ' . str_replace('/', '\\', $source) . ' ' . str_replace('/', '\\', $dest);
}
$source = $basePath ? $basePath.'/.env.example' : '.env.example';
$dest = $basePath ? $basePath.'/.env' : '.env';
$source = $basePath ? $basePath . '/.env.example' : '.env.example';
$dest = $basePath ? $basePath . '/.env' : '.env';
return 'cp '.$source.' '.$dest;
return 'cp ' . $source . ' ' . $dest;
}
/**
@@ -1182,8 +1167,8 @@ function getEnvCopyCommand(string $basePath = ''): string
* chown/setgid 의존성을 제거하여 공유호스팅 호환성 확보.
* 실제 통과 기준은 is_writable() && is_readable()이므로 비트 값은 참고용.
*
* @param string $pathList 대상 경로 (공백 구분)
* @param string $mode 'ownership' (디렉토리) 또는 'file' (파일)
* @param string $pathList 대상 경로 (공백 구분)
* @param string $mode 'ownership' (디렉토리) 또는 'file' (파일)
* @return string 권한 수정 명령어
*/
function getPermissionFixCommand(string $pathList, string $mode = 'ownership'): string
@@ -1191,19 +1176,20 @@ function getPermissionFixCommand(string $pathList, string $mode = 'ownership'):
if (isWindows()) {
$winPath = str_replace('/', '\\', $pathList);
if ($mode === 'file') {
return 'icacls '.$winPath.' /grant Everyone:F';
return 'icacls ' . $winPath . ' /grant Everyone:F';
}
return 'icacls '.$winPath.' /grant Everyone:(OI)(CI)F /T';
return 'icacls ' . $winPath . ' /grant Everyone:(OI)(CI)F /T';
}
if ($mode === 'file') {
return 'chmod 644 '.$pathList;
return 'chmod 644 ' . $pathList;
}
return 'chmod -R 755 '.$pathList;
return 'chmod -R 755 ' . $pathList;
}
/**
* 기존 DB 테이블 감지.
*
@@ -1216,8 +1202,9 @@ function getPermissionFixCommand(string $pathList, string $mode = 'ownership'):
* - 'mixed' : G7 일부 + 기타 혼재
* - 'foreign_data' : G7 시그니처 없음 + 기타 테이블 존재
*
* @param PDO $pdo 연결된 PDO 인스턴스
* @param string $database 대상 데이터베이스명
* @param PDO $pdo 연결된 PDO 인스턴스
* @param string $database 대상 데이터베이스명
* @return array
*/
function checkExistingTables(PDO $pdo, string $database, string $tablePrefix = ''): array
{
@@ -1250,7 +1237,7 @@ function checkExistingTables(PDO $pdo, string $database, string $tablePrefix = '
// G7 핵심 시그니처 테이블 — 정책 결정: 4개 모두 일치 시 "G7 설치됨"으로 판단
// 테이블 prefix를 적용하여 비교 (예: prefix='g7_'이면 'g7_users', 'g7_migrations' 등)
$coreSignatures = ['users', 'migrations', 'roles', 'permissions'];
$g7Signatures = array_map(fn ($t) => $tablePrefix.$t, $coreSignatures);
$g7Signatures = array_map(fn ($t) => $tablePrefix . $t, $coreSignatures);
$g7TablesFound = array_values(array_intersect($g7Signatures, $tables));
$severity = 'foreign_data';
@@ -1270,7 +1257,7 @@ function checkExistingTables(PDO $pdo, string $database, string $tablePrefix = '
];
}
if (! function_exists('filterTablesByPrefix')) {
if (!function_exists('filterTablesByPrefix')) {
/**
* 기존 테이블 목록을 db_prefix 로 필터링합니다.
*
@@ -1281,8 +1268,8 @@ if (! function_exists('filterTablesByPrefix')) {
* 빈 prefix 는 전체 일치가 되어 모든 테이블이 삭제되는 위험이 있으므로,
* 데이터 손실 방어를 위해 빈 목록(삭제 대상 없음)을 반환합니다.
*
* @param array $tables SHOW TABLES 로 조회한 전체 테이블 목록
* @param string $prefix 사용자가 입력한 테이블 prefix (예: 'g7_')
* @param array $tables SHOW TABLES 로 조회한 전체 테이블 목록
* @param string $prefix 사용자가 입력한 테이블 prefix (예: 'g7_')
* @return array prefix 로 시작하는 테이블만 담은 목록
*/
function filterTablesByPrefix(array $tables, string $prefix): array
+13 -27
View File
@@ -15,12 +15,13 @@
*
* @see https://github.com/gnuboard/g7/issues/23
*/
if (! defined('BASE_PATH')) {
throw new RuntimeException('installer-runtime.php requires BASE_PATH constant.');
}
if (! defined('INSTALLER_RUNTIME_PATH')) {
define('INSTALLER_RUNTIME_PATH', BASE_PATH.'/storage/installer/runtime.php');
define('INSTALLER_RUNTIME_PATH', BASE_PATH . '/storage/installer/runtime.php');
}
if (! function_exists('readInstallerRuntime')) {
@@ -58,9 +59,9 @@ if (! function_exists('writeInstallerRuntime')) {
return false;
}
$php = "<?php\n\nreturn ".var_export($data, true).";\n";
$php = "<?php\n\nreturn " . var_export($data, true) . ";\n";
$tmp = INSTALLER_RUNTIME_PATH.'.tmp';
$tmp = INSTALLER_RUNTIME_PATH . '.tmp';
if (@file_put_contents($tmp, $php, LOCK_EX) === false) {
return false;
}
@@ -106,7 +107,7 @@ if (! function_exists('generateAppKeyInline')) {
*/
function generateAppKeyInline(): string
{
return 'base64:'.base64_encode(random_bytes(32));
return 'base64:' . base64_encode(random_bytes(32));
}
}
@@ -137,23 +138,13 @@ if (! function_exists('mergeRuntimeIntoEnv')) {
$envContent = replaceEnvLine($envContent, 'DB_WRITE_PASSWORD', escapeEnvValue((string) ($write['password'] ?? '')));
}
// Read DB — runtime 에 read 키가 있을 때(use_read_db=true)만 명시 기록한다.
// 미지정 시 DB_READ_* 를 빈 값으로 남겨 config/database.php 의 write fallback(Elvis)
// 에 위임 → .env 에 write 값이 중복 기록되지 않고, write 변경 시 read stale 위험 제거.
// (이슈 #63)
$read = $runtime['db']['read'] ?? null;
$read = $runtime['db']['read'] ?? $write; // read 미지정 시 write 와 동기화
if (is_array($read)) {
$envContent = replaceEnvLine($envContent, 'DB_READ_HOST', (string) ($read['host'] ?? ''));
$envContent = replaceEnvLine($envContent, 'DB_READ_PORT', (string) ($read['port'] ?? ''));
$envContent = replaceEnvLine($envContent, 'DB_READ_DATABASE', (string) ($read['database'] ?? ''));
$envContent = replaceEnvLine($envContent, 'DB_READ_USERNAME', (string) ($read['username'] ?? ''));
$envContent = replaceEnvLine($envContent, 'DB_READ_PASSWORD', escapeEnvValue((string) ($read['password'] ?? '')));
} else {
$envContent = replaceEnvLine($envContent, 'DB_READ_HOST', '');
$envContent = replaceEnvLine($envContent, 'DB_READ_PORT', '');
$envContent = replaceEnvLine($envContent, 'DB_READ_DATABASE', '');
$envContent = replaceEnvLine($envContent, 'DB_READ_USERNAME', '');
$envContent = replaceEnvLine($envContent, 'DB_READ_PASSWORD', '');
}
if (isset($runtime['db']['prefix'])) {
@@ -168,7 +159,7 @@ if (! function_exists('mergeRuntimeIntoEnv')) {
// INSTALLER_COMPLETED 플래그 추가 (CachesModuleStatus 등이 사용)
if (! preg_match('/^INSTALLER_COMPLETED=/m', $envContent)) {
$envContent = rtrim($envContent)."\n\n# Installation Status\nINSTALLER_COMPLETED=true\n";
$envContent = rtrim($envContent) . "\n\n# Installation Status\nINSTALLER_COMPLETED=true\n";
}
return $envContent;
@@ -199,7 +190,7 @@ if (! function_exists('escapeEnvValue')) {
$escaped = str_replace(['\\', '"'], ['\\\\', '\\"'], $value);
return '"'.$escaped.'"';
return '"' . $escaped . '"';
}
}
@@ -217,13 +208,13 @@ if (! function_exists('replaceEnvLine')) {
*/
function replaceEnvLine(string $envContent, string $key, string $value): string
{
$line = $key.'='.$value;
$pattern = '/^'.preg_quote($key, '/').'=.*$/m';
$line = $key . '=' . $value;
$pattern = '/^' . preg_quote($key, '/') . '=.*$/m';
$replaced = preg_replace($pattern, $line, $envContent, 1, $count);
if ($count === 0) {
return rtrim($envContent)."\n".$line."\n";
return rtrim($envContent) . "\n" . $line . "\n";
}
return $replaced;
@@ -266,13 +257,8 @@ if (! function_exists('buildInstallerRuntimeFromState')) {
'created_at' => date('c'),
];
// Read 커넥션은 use_read_db 플래그가 켜진 경우에만 포함한다 (판정 SSoT).
// 플래그가 꺼져 있으면 db_read_host 에 잔존 값이 있어도 무시 → runtime 에 read 키
// 미생성 → 하류(mergeRuntimeIntoEnv / InstallerRuntimeServiceProvider)가 write 로
// 자동 동기화. (이슈 #63: use_read_db=false 인데 db_read_host 를 참조하던 회귀 차단)
if (! empty($stateConfig['use_read_db'])
&& ! empty($stateConfig['db_read_host'])
&& $stateConfig['db_read_host'] !== ($stateConfig['db_write_host'] ?? null)) {
// Read 커넥션이 별도로 지정된 경우만 포함 (그렇지 않으면 Laravel 이 write 사용)
if (! empty($stateConfig['db_read_host']) && $stateConfig['db_read_host'] !== ($stateConfig['db_write_host'] ?? null)) {
$runtime['db']['read'] = [
'host' => $stateConfig['db_read_host'],
'port' => $stateConfig['db_read_port'] ?? $runtime['db']['write']['port'],
+50 -77
View File
@@ -5,15 +5,16 @@
*
* 설치 진행 상태를 storage/installer-state.json에 저장하고 조회합니다.
*/
if (! defined('BASE_PATH')) {
if (!defined('BASE_PATH')) {
define('BASE_PATH', realpath(dirname(__DIR__, 3)) ?: dirname(__DIR__, 3)); // public/install/includes에서 프로젝트 루트로
}
if (! defined('STATE_PATH')) {
define('STATE_PATH', BASE_PATH.'/storage/installer-state.json');
define('STATE_PATH', BASE_PATH . '/storage/installer-state.json');
}
if (! defined('INSTALLER_DIR')) {
define('INSTALLER_DIR', BASE_PATH.'/storage/installer');
define('INSTALLER_DIR', BASE_PATH . '/storage/installer');
}
/**
@@ -35,16 +36,15 @@ function getInstallationState(): array
// state.json 파일이 없으면 기본 상태 반환
// (설치 완료 후 워커가 DELETE_INSTALLER_AFTER_COMPLETE로 정상 삭제하는 경우가 있으므로
// 부재 자체는 에러가 아님. 호출자가 g7_installed 플래그 등으로 완료 여부 판정)
if (! file_exists(STATE_PATH)) {
if (!file_exists(STATE_PATH)) {
return $defaultState;
}
// 파일 읽기 권한 체크
if (! is_readable(STATE_PATH)) {
$msg = '[installer-state] State file is not readable: '.STATE_PATH;
if (!is_readable(STATE_PATH)) {
$msg = "[installer-state] State file is not readable: " . STATE_PATH;
error_log($msg);
addLog($msg);
return $defaultState;
}
@@ -53,10 +53,9 @@ function getInstallationState(): array
// 파일 읽기 실패 시 기본 상태 반환
if ($content === false) {
$msg = '[installer-state] Failed to read state file: '.STATE_PATH;
$msg = "[installer-state] Failed to read state file: " . STATE_PATH;
error_log($msg);
addLog($msg);
return $defaultState;
}
@@ -66,10 +65,9 @@ function getInstallationState(): array
if (json_last_error() !== JSON_ERROR_NONE) {
$contentLen = strlen($content);
$preview = substr($content, 0, 200);
$msg = "[installer-state] Failed to parse state file JSON (length={$contentLen}): ".json_last_error_msg().' / preview: '.$preview;
$msg = "[installer-state] Failed to parse state file JSON (length={$contentLen}): " . json_last_error_msg() . " / preview: " . $preview;
error_log($msg);
addLog($msg);
return $defaultState;
}
@@ -79,27 +77,25 @@ function getInstallationState(): array
/**
* 설치 상태 저장
*
* @param array $state 저장할 상태 배열
* @param array $state 저장할 상태 배열
* @return bool 저장 성공 여부
*/
function saveInstallationState(array $state): bool
{
// storage 디렉토리 존재 여부 확인 (생성하지 않음)
$storageDir = BASE_PATH.'/storage';
if (! is_dir($storageDir)) {
$storageDir = BASE_PATH . '/storage';
if (!is_dir($storageDir)) {
$msg = "[installer-state] Storage directory does not exist: {$storageDir}";
error_log($msg);
addLog($msg);
return false;
}
// 디렉토리 쓰기 권한 확인
if (! is_writable($storageDir)) {
if (!is_writable($storageDir)) {
$msg = "[installer-state] Storage directory is not writable: {$storageDir}";
error_log($msg);
addLog($msg);
return false;
}
@@ -110,36 +106,33 @@ function saveInstallationState(array $state): bool
$content = json_encode($state, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
if ($content === false) {
$msg = '[installer-state] Failed to encode state as JSON: '.json_last_error_msg();
$msg = "[installer-state] Failed to encode state as JSON: " . json_last_error_msg();
error_log($msg);
addLog($msg);
return false;
}
// 원자적 쓰기: tmp 파일에 쓰고 rename으로 교체
// 동시 쓰기 경쟁 상황에서 부분 쓰기(half-written file)로 인한 JSON 손상 방지.
// Linux에서 rename()은 atomic syscall이므로 다른 리더가 항상 완전한 파일만 읽는다.
$tmpPath = STATE_PATH.'.tmp.'.getmypid().'.'.uniqid();
$tmpPath = STATE_PATH . '.tmp.' . getmypid() . '.' . uniqid();
$result = @file_put_contents($tmpPath, $content, LOCK_EX);
if ($result === false || $result !== strlen($content)) {
$msg = '[installer-state] Failed to write state tmp file: '.$tmpPath;
$msg = "[installer-state] Failed to write state tmp file: " . $tmpPath;
error_log($msg);
addLog($msg);
@unlink($tmpPath);
return false;
}
@chmod($tmpPath, 0664);
if (! @rename($tmpPath, STATE_PATH)) {
$msg = '[installer-state] Failed to rename state tmp file: '.$tmpPath.' → '.STATE_PATH;
if (!@rename($tmpPath, STATE_PATH)) {
$msg = "[installer-state] Failed to rename state tmp file: " . $tmpPath . ' → ' . STATE_PATH;
error_log($msg);
addLog($msg);
@unlink($tmpPath);
return false;
}
@@ -168,13 +161,13 @@ function isInstallationCompleted(): bool
}
// g7_installed 파일 존재 여부 확인 (추가 안전장치)
$installedFlagPath = BASE_PATH.'/storage/app/g7_installed';
$installedFlagPath = BASE_PATH . '/storage/app/g7_installed';
if (file_exists($installedFlagPath)) {
return true;
}
// .env 파일의 INSTALLER_COMPLETED 플래그 확인
$envPath = BASE_PATH.'/.env';
$envPath = BASE_PATH . '/.env';
if (file_exists($envPath)) {
$envContent = file_get_contents($envPath);
if (strpos($envContent, 'INSTALLER_COMPLETED=true') !== false) {
@@ -188,7 +181,7 @@ function isInstallationCompleted(): bool
/**
* 특정 작업을 완료로 표시
*
* @param string $task 작업 식별자
* @param string $task 작업 식별자
* @return bool 업데이트 성공 여부
*/
function markTaskCompleted(string $task): bool
@@ -196,7 +189,7 @@ function markTaskCompleted(string $task): bool
$state = getInstallationState();
// completed_tasks 배열에 추가 (중복 방지)
if (! in_array($task, $state['completed_tasks'])) {
if (!in_array($task, $state['completed_tasks'])) {
$state['completed_tasks'][] = $task;
}
@@ -212,7 +205,7 @@ function markTaskCompleted(string $task): bool
/**
* 특정 작업을 완료 목록에서 제거
*
* @param string $task 작업 식별자
* @param string $task 작업 식별자
* @return bool 업데이트 성공 여부
*/
function removeTaskCompleted(string $task): bool
@@ -220,7 +213,7 @@ function removeTaskCompleted(string $task): bool
$state = getInstallationState();
$state['completed_tasks'] = array_values(
array_filter($state['completed_tasks'], fn ($t) => $t !== $task)
array_filter($state['completed_tasks'], fn($t) => $t !== $task)
);
return saveInstallationState($state);
@@ -258,7 +251,7 @@ function removeTaskCompleted(string $task): bool
*
* @param int $staleSeconds heartbeat 가 이 시간 이상 갱신 안 되면 stale 판정 (default 15초)
* @return array{acquired: bool, worker_id: string|null, reason: string}
* reason: 'available' | 'takeover_stale' | 'busy'
* reason: 'available' | 'takeover_stale' | 'busy'
*/
function acquireWorkerLock(int $staleSeconds = 15): array
{
@@ -344,7 +337,7 @@ function applyExistingDbActionStateGuard(array $state, string $newAction): array
$resetTasks = ['db_cleanup', 'db_migrate', 'db_seed'];
$state['completed_tasks'] = array_values(array_filter(
$state['completed_tasks'] ?? [],
fn ($t) => ! in_array($t, $resetTasks, true)
fn($t) => !in_array($t, $resetTasks, true)
));
} else {
// 키 정규화 — completed_tasks 가 부재인 경우 빈 배열 보장
@@ -357,7 +350,7 @@ function applyExistingDbActionStateGuard(array $state, string $newAction): array
/**
* 현재 진행 중인 작업 업데이트
*
* @param string $task 작업 식별자
* @param string $task 작업 식별자
* @return bool 업데이트 성공 여부
*/
function updateCurrentTask(string $task): bool
@@ -376,7 +369,7 @@ function updateCurrentTask(string $task): bool
* 페이지 새로고침/재시작 시 로그가 즉시 표시되도록
* fflush() + clearstatcache()를 적용합니다.
*
* @param string $message 로그 메시지
* @param string $message 로그 메시지
* @return bool 저장 성공 여부
*/
/**
@@ -396,25 +389,23 @@ function addLogBatch(array $messages): bool
return true;
}
$logDir = BASE_PATH.'/storage/logs';
$logFile = $logDir.'/installation.log';
$logDir = BASE_PATH . '/storage/logs';
$logFile = $logDir . '/installation.log';
if (! is_dir($logDir)) {
if (!is_dir($logDir)) {
$created = @mkdir($logDir, 0775, true);
if (! $created) {
if (!$created) {
$msg = "[addLogBatch] Failed to create log directory: {$logDir}";
error_log($msg);
addLog($msg); // 재귀 가드가 차단하므로 안전 — error_log fallback 만 수행
return false;
}
}
if (! is_writable($logDir)) {
if (!is_writable($logDir)) {
$msg = "[addLogBatch] Log directory is not writable: {$logDir}";
error_log($msg);
addLog($msg); // 재귀 가드가 차단
return false;
}
@@ -434,9 +425,9 @@ function addLogBatch(array $messages): bool
}
clearstatcache(true, $logFile);
$isNewFile = ! file_exists($logFile) || filesize($logFile) === 0;
$isNewFile = !file_exists($logFile) || filesize($logFile) === 0;
if ($isNewFile) {
$entries = "\xEF\xBB\xBF".$entries;
$entries = "\xEF\xBB\xBF" . $entries;
}
$handle = @fopen($logFile, 'a');
@@ -444,7 +435,6 @@ function addLogBatch(array $messages): bool
$msg = "[addLogBatch] Failed to open log file: {$logFile}";
error_log($msg);
addLog($msg); // 재귀 가드가 차단
return false;
}
flock($handle, LOCK_EX);
@@ -465,8 +455,7 @@ function addLog(string $message): bool
static $inAddLog = false;
if ($inAddLog) {
// 재진입: installation.log 시도 skip, PHP error_log 만 호출하고 즉시 종료
error_log('[addLog reentrant] '.$message);
error_log("[addLog reentrant] " . $message);
return false;
}
$inAddLog = true;
@@ -489,27 +478,25 @@ function addLog(string $message): bool
*/
function _addLogInternal(string $message): bool
{
$logDir = BASE_PATH.'/storage/logs';
$logFile = $logDir.'/installation.log';
$logDir = BASE_PATH . '/storage/logs';
$logFile = $logDir . '/installation.log';
// 로그 디렉토리 확인 및 생성 시도
if (! is_dir($logDir)) {
if (!is_dir($logDir)) {
$created = @mkdir($logDir, 0775, true);
if (! $created) {
if (!$created) {
$msg = "[addLog] Failed to create log directory: {$logDir} (storage 권한 확인 필요)";
error_log($msg);
addLog($msg); // 재귀 가드가 차단 (본 함수는 이미 가드 안)
return false;
}
}
// 로그 디렉토리 쓰기 권한 확인
if (! is_writable($logDir)) {
if (!is_writable($logDir)) {
$msg = "[addLog] Log directory is not writable: {$logDir}";
error_log($msg);
addLog($msg); // 재귀 가드가 차단
return false;
}
@@ -521,17 +508,6 @@ function _addLogInternal(string $message): bool
}
}
// OS 무관 최종 방어 — 항상 유효 UTF-8 만 로그에 저장한다 (gnuboard/g7#62).
// composer install 등 외부 프로세스 stdout 이 시스템 코드페이지로 출력되거나
// 진행바(\r 갱신)가 임의 바이트 경계에서 잘려 mb_detect_encoding 이 확정 감지에
// 실패한 경우(위 분기 미적용), invalid 바이트가 그대로 로그에 남으면
// 폴링 응답 state-management.php 의 json_encode 가 false 를 반환해 빈 본문(HTTP 200)
// → 프론트 res.json() 이 "Unexpected end of JSON input" 으로 폭주한다.
// mb_scrub 은 invalid 바이트를 U+FFFD 로 치환해 응답 무력화를 원천 차단한다.
if (! mb_check_encoding($message, 'UTF-8')) {
$message = mb_scrub($message, 'UTF-8');
}
// 타임스탬프와 함께 로그 작성 — millisecond 정밀도 (hang 진단 시 정확한 timing 필요)
$microtime = microtime(true);
$ms = sprintf('%03d', (int) (($microtime - floor($microtime)) * 1000));
@@ -542,10 +518,10 @@ function _addLogInternal(string $message): bool
clearstatcache(true, $logFile);
// 파일이 없거나 빈 파일이면 UTF-8 BOM 추가 (Windows 텍스트 편집기 호환성)
$isNewFile = ! file_exists($logFile) || filesize($logFile) === 0;
$isNewFile = !file_exists($logFile) || filesize($logFile) === 0;
if ($isNewFile) {
$utf8Bom = "\xEF\xBB\xBF";
$logEntry = $utf8Bom.$logEntry;
$logEntry = $utf8Bom . $logEntry;
}
// 파일 핸들 열기 (append 모드)
@@ -554,7 +530,6 @@ function _addLogInternal(string $message): bool
$msg = "[addLog] Failed to open log file: {$logFile}";
error_log($msg);
addLog($msg); // 재귀 가드가 차단
return false;
}
@@ -578,7 +553,6 @@ function _addLogInternal(string $message): bool
$msg = "[addLog] Failed to write log file: {$logFile}";
error_log($msg);
addLog($msg); // 재귀 가드가 차단
return false;
}
@@ -591,16 +565,16 @@ function _addLogInternal(string $message): bool
* 페이지 새로고침 시 최신 로그를 즉시 표시하기 위해
* clearstatcache()를 적용합니다.
*
* @param int $offset 건너뛸 로그 줄 수 (폴링 모드 증분 조회용, 기본 0)
* @param int $offset 건너뛸 로그 줄 수 (폴링 모드 증분 조회용, 기본 0)
* @return array 로그 배열 [{timestamp, message}, ...]
*/
function getInstallationLogs(int $offset = 0): array
{
$logFile = BASE_PATH.'/storage/logs/installation.log';
$logFile = BASE_PATH . '/storage/logs/installation.log';
clearstatcache(true, $logFile);
if (! file_exists($logFile)) {
if (!file_exists($logFile)) {
return [];
}
@@ -647,11 +621,11 @@ function getInstallationLogs(int $offset = 0): array
*/
function getInstallationLogCount(): int
{
$logFile = BASE_PATH.'/storage/logs/installation.log';
$logFile = BASE_PATH . '/storage/logs/installation.log';
clearstatcache(true, $logFile);
if (! file_exists($logFile)) {
if (!file_exists($logFile)) {
return 0;
}
@@ -663,11 +637,10 @@ function getInstallationLogCount(): int
$lines = explode("\n", trim($content));
$count = 0;
foreach ($lines as $line) {
if (! empty($line)) {
if (!empty($line)) {
$count++;
}
}
return $count;
}
@@ -682,7 +655,7 @@ function getLastCompletedStep(): int
// step_status를 역순으로 확인
for ($step = 5; $step >= 0; $step--) {
$stepKey = (string) $step;
$stepKey = (string)$step;
if (isset($state['step_status'][$stepKey]) && $state['step_status'][$stepKey] === 'completed') {
return $step;
}
+9 -21
View File
@@ -6,8 +6,11 @@
* SSE/폴링 듀얼 모드 지원을 위한 진행 상황 보고 인터페이스.
* - SseEmitter: 실시간 SSE 스트리밍 + addLog
* - NullEmitter: addLog만 수행 (폴링 모드, state.json 기반 조회)
*
* @package G7\Installer
*/
if (! defined('BASE_PATH')) {
if (!defined('BASE_PATH')) {
define('BASE_PATH', realpath(dirname(__DIR__, 3)) ?: dirname(__DIR__, 3));
}
@@ -16,8 +19,8 @@ interface ProgressEmitter
/**
* 임의 이벤트 송출 (SSE 이벤트 타입과 데이터 배열).
*
* @param string $event 이벤트 타입 (connected, task_start, task_complete, log, completed, error, aborted, rollback_failed)
* @param array $data 이벤트 데이터
* @param string $event 이벤트 타입 (connected, task_start, task_complete, log, completed, error, aborted, rollback_failed)
* @param array $data 이벤트 데이터
*/
public function emit(string $event, array $data): void;
@@ -54,22 +57,8 @@ class SseEmitter implements ProgressEmitter
public function emit(string $event, array $data): void
{
// SSE data 라인은 항상 유효 JSON 이어야 한다 (gnuboard/g7#62).
// composer install 등 외부 프로세스 로그에 invalid UTF-8 바이트가 섞이면
// json_encode 가 false 를 반환해 "data: \n\n" (빈 값) 이 송출되고,
// 프론트 EventSource 리스너의 JSON.parse(e.data) 가 throw 되어 로그 이벤트가 유실된다.
// 폴링 응답(state-management)과 동일하게 JSON_INVALID_UTF8_SUBSTITUTE 로 치환하고
// false 를 가드한다. (task-runner 의 스트림 scrub 과 이중 안전망)
$payload = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE);
if ($payload === false) {
$payload = json_encode(
['message' => '(log line dropped: encoding error)'],
JSON_UNESCAPED_UNICODE
);
}
echo "event: {$event}\n";
echo 'data: '.$payload."\n\n";
echo "data: " . json_encode($data, JSON_UNESCAPED_UNICODE) . "\n\n";
if (ob_get_level()) {
@ob_flush();
}
@@ -206,10 +195,9 @@ class NullEmitter implements ProgressEmitter
*/
function getProgressEmitter(): ProgressEmitter
{
if (! isset($GLOBALS['g7_progress_emitter']) || ! ($GLOBALS['g7_progress_emitter'] instanceof ProgressEmitter)) {
$GLOBALS['g7_progress_emitter'] = new SseEmitter;
if (!isset($GLOBALS['g7_progress_emitter']) || !($GLOBALS['g7_progress_emitter'] instanceof ProgressEmitter)) {
$GLOBALS['g7_progress_emitter'] = new SseEmitter();
}
return $GLOBALS['g7_progress_emitter'];
}
+30 -40
View File
@@ -4,13 +4,15 @@
* 그누보드7 웹 인스톨러 요청 처리 핸들러
*
* 모든 POST 요청 및 비즈니스 로직을 처리합니다.
*
* @package G7\Installer
*/
/**
* 설치 흐름 검증 및 리다이렉트
*
* @param int $currentStep 현재 단계
* @param array $state 설치 상태
* @param int $currentStep 현재 단계
* @param array $state 설치 상태
*/
function validateInstallationFlow(int $currentStep, array $state): void
{
@@ -40,14 +42,14 @@ function validateInstallationFlow(int $currentStep, array $state): void
/**
* 잘못된 단계 접근 시 알림 표시
*
* @param int $correctStep 올바른 단계 번호
* @param int $correctStep 올바른 단계 번호
*/
function showInvalidStepAccessAlert(int $correctStep): void
{
global $translations;
// 번역이 로드되지 않은 경우 로드
if (! isset($translations)) {
if (!isset($translations)) {
$translations = loadTranslations(getCurrentLanguage());
}
@@ -57,7 +59,7 @@ function showInvalidStepAccessAlert(int $correctStep): void
showAlertAndRedirect(
lang('error_invalid_step_access'),
lang('error_invalid_step_access_message'),
INSTALLER_BASE_URL.'/'
INSTALLER_BASE_URL . '/'
);
}
@@ -71,7 +73,7 @@ function handleStep0Post(): void
}
// 다음 버튼 클릭 시 (언어 선택 변경이 아닌 경우)
if (! isset($_POST['language_change_only'])) {
if (!isset($_POST['language_change_only'])) {
unset($_SESSION['license_agreed']);
updateStepStatus(0, 1);
redirectToStep(1);
@@ -83,14 +85,14 @@ function handleStep0Post(): void
/**
* Step 1 POST 처리 (라이선스 동의)
*
* @param string $currentLang 현재 언어
* @param string|null &$error 에러 메시지 (참조)
* @param string $currentLang 현재 언어
* @param string|null &$error 에러 메시지 (참조)
*/
function handleStep1Post(string $currentLang, ?string &$error = null): void
{
$translations = loadTranslations($currentLang);
if (! isset($_POST['agree']) || $_POST['agree'] !== '1') {
if (!isset($_POST['agree']) || $_POST['agree'] !== '1') {
$error = lang('must_agree');
} else {
$_SESSION['license_agreed'] = true;
@@ -113,9 +115,9 @@ function handleStep2Post(): void
/**
* Step 3 POST 처리 (데이터베이스 및 사이트 설정)
*
* @param string $currentLang 현재 언어
* @param array &$formData 폼 데이터 (참조)
* @param array &$errors 에러 배열 (참조)
* @param string $currentLang 현재 언어
* @param array &$formData 폼 데이터 (참조)
* @param array &$errors 에러 배열 (참조)
*/
function handleStep3Post(string $currentLang, array &$formData, array &$errors): void
{
@@ -133,7 +135,7 @@ function handleStep3Post(string $currentLang, array &$formData, array &$errors):
}
// Read DB 검증 (사용하는 경우)
if (! empty($formData['use_read_db'])) {
if (!empty($formData['use_read_db'])) {
if (empty($formData['db_read_host'])) {
$errors['db_read_host'] = lang('error_db_host_required');
}
@@ -143,10 +145,10 @@ function handleStep3Post(string $currentLang, array &$formData, array &$errors):
}
// 관리자 정보 검증
if (empty($formData['admin_email']) || ! filter_var($formData['admin_email'], FILTER_VALIDATE_EMAIL)) {
if (empty($formData['admin_email']) || !filter_var($formData['admin_email'], FILTER_VALIDATE_EMAIL)) {
$errors['admin_email'] = lang('error_admin_email_invalid');
}
if (! array_key_exists($formData['admin_language'] ?? '', SUPPORTED_LANGUAGES)) {
if (!array_key_exists($formData['admin_language'] ?? '', SUPPORTED_LANGUAGES)) {
$errors['admin_language'] = lang('error_admin_language_invalid');
}
if (empty($formData['admin_password']) || strlen($formData['admin_password']) < 8) {
@@ -174,19 +176,19 @@ function handleStep3Post(string $currentLang, array &$formData, array &$errors):
// 절대 경로 변환
$absolutePath = str_starts_with($corePendingPath, '/')
? $corePendingPath
: BASE_PATH.'/'.$corePendingPath;
: BASE_PATH . '/' . $corePendingPath;
if (file_exists($absolutePath) && ! is_dir($absolutePath)) {
if (file_exists($absolutePath) && !is_dir($absolutePath)) {
$errors['core_update_pending_path'] = lang('error_core_pending_not_directory');
}
}
// DB 테스트 완료 확인
if (empty($errors) && ! isset($_SESSION['db_write_tested'])) {
if (empty($errors) && !isset($_SESSION['db_write_tested'])) {
$errors['db_test'] = lang('error_db_not_tested');
}
if (empty($errors) && ! empty($formData['use_read_db']) && ! isset($_SESSION['db_read_tested'])) {
if (empty($errors) && !empty($formData['use_read_db']) && !isset($_SESSION['db_read_tested'])) {
$errors['db_test'] = lang('error_db_not_tested');
}
@@ -198,21 +200,9 @@ function handleStep3Post(string $currentLang, array &$formData, array &$errors):
$safeFormData = $formData;
unset($safeFormData['db_write_password'], $safeFormData['db_read_password']);
// Read DB 미사용 시 read 필드 잔존값을 제거한다 (이슈 #63 2단계 방어).
// use_read_db=false 인데 db_read_host 등이 남아 있으면 하류(installer-runtime.php)
// 로 유입되어 잘못된 read 커넥션을 만들 수 있으므로 원천 차단한다.
if (empty($safeFormData['use_read_db'])) {
unset(
$safeFormData['db_read_host'],
$safeFormData['db_read_port'],
$safeFormData['db_read_database'],
$safeFormData['db_read_username']
);
}
updateStepStatus(3, 4, [
'config' => $safeFormData,
'installation_status' => 'ready',
'installation_status' => 'ready'
]);
redirectToStep(4);
@@ -222,21 +212,21 @@ function handleStep3Post(string $currentLang, array &$formData, array &$errors):
/**
* POST 요청 라우팅
*
* @param int $currentStep 현재 단계
* @param string $currentLang 현재 언어
* @param array &$formData 폼 데이터 (참조)
* @param array &$errors 에러 배열 (참조)
* @param string|null &$error 에러 메시지 (참조)
* @param int $currentStep 현재 단계
* @param string $currentLang 현재 언어
* @param array &$formData 폼 데이터 (참조)
* @param array &$errors 에러 배열 (참조)
* @param string|null &$error 에러 메시지 (참조)
*/
function handlePostRequest(int $currentStep, string $currentLang, array &$formData = [], array &$errors = [], ?string &$error = null): void
{
// 단계 이동 처리 (go_to_step POST 파라미터)
if (isset($_POST['go_to_step'])) {
$step = (int) $_POST['go_to_step'];
$step = (int)$_POST['go_to_step'];
if ($step >= 0 && $step <= 5) {
$_SESSION['installer_current_step'] = $step;
}
header('Location: '.INSTALLER_BASE_URL.'/');
header('Location: ' . INSTALLER_BASE_URL . '/');
exit;
}
@@ -248,7 +238,7 @@ function handlePostRequest(int $currentStep, string $currentLang, array &$formDa
}
// Step별 POST 처리
match ($currentStep) {
match($currentStep) {
0 => handleStep0Post(),
1 => handleStep1Post($currentLang, $error),
2 => handleStep2Post(),
File diff suppressed because it is too large. Load diff
-3
View File
@@ -270,7 +270,6 @@ return [
'task_cache_clear' => 'Cleaning Up Temporary Files',
'task_create_settings_json' => 'Creating Settings Files',
'task_complete_flag' => 'Finalizing Installation',
'task_config_cache' => 'Building Configuration Cache',
'task_unknown' => 'Unknown Task',
// Task Group Names
@@ -372,11 +371,9 @@ return [
// Error Messages - Worker (Cache)
'error_cache_clear_failed' => 'Cache clearing failed',
'error_config_cache_failed' => 'Configuration cache build failed',
// Log Messages - Worker (Cache)
'log_cache_clear_success' => 'Cache clearing completed',
'log_config_cache_success' => 'Configuration cache built',
// Error Messages - Worker (Settings JSON)
'error_settings_json_failed' => 'Settings file creation failed',
-3
View File
@@ -270,7 +270,6 @@ return [
'task_cache_clear' => '임시 파일 정리',
'task_create_settings_json' => '설정 파일 생성',
'task_complete_flag' => '설치 완료 처리',
'task_config_cache' => '설정 캐시 생성',
'task_unknown' => '알 수 없는 작업',
// 작업 그룹명
@@ -372,11 +371,9 @@ return [
// 에러 메시지 - Worker (Cache)
'error_cache_clear_failed' => '캐시 클리어에 실패했습니다',
'error_config_cache_failed' => '설정 캐시 생성에 실패했습니다',
// 로그 메시지 - Worker (Cache)
'log_cache_clear_success' => '캐시 클리어 완료',
'log_config_cache_success' => '설정 캐시 생성 완료',
// 에러 메시지 - Worker (Settings JSON)
'error_settings_json_failed' => '설정 파일 생성에 실패했습니다',