@weppy/roblox-mcp 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +11 -0
  3. package/package.json +1 -1
  4. package/plugins/weppy-roblox-mcp/.claude-plugin/plugin.json +1 -1
  5. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ChangelogDetailPage-DxktONbL.js → ChangelogDetailPage-BWM0bhGw.js} +1 -1
  6. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-DOXmMWDc.js +1 -0
  7. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{ConfirmModal-CmJCz5rg.js → ConfirmModal-Dak7jVJo.js} +1 -1
  8. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-CNtjimlm.css +1 -0
  9. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-Cds2YIvI.js +1 -0
  10. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{GameChangeDetail-Be32PRgR.css → GameChangeDetail-C1XtdYwk.css} +1 -1
  11. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{GameChangeDetail-D1kE2L_v.js → GameChangeDetail-MfVogSqQ.js} +5 -5
  12. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{InfoLabel-B9KT3kfU.js → InfoLabel-BDieYXVe.js} +1 -1
  13. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{OverviewPage-T2WCTHpo.js → OverviewPage-CTH7jUzQ.js} +1 -1
  14. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-BHQoeC4V.js +11 -0
  15. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-DjjsIkke.css +1 -0
  16. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-BL3qgVfn.js +1 -0
  17. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-Du8-FZAO.css +1 -0
  18. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{StatusBadge-Bxe88ki2.js → StatusBadge-MxsMOCZ3.js} +1 -1
  19. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-Dm7Ni3j_.css +1 -0
  20. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-IZEcPmIw.js +4 -0
  21. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{Tabs-BNtOqYlc.js → Tabs-CuTJuL80.js} +1 -1
  22. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TierComparison-Dyf-knpe.js → TierComparison-DvuMctLJ.js} +1 -1
  23. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-ByA_a1TP.js +1 -0
  24. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-Dq7uIer6.css +1 -0
  25. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{TooltipText-Baw38jOU.js → TooltipText-DgxJjq91.js} +1 -1
  26. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-DVFz_q9v.js +16 -0
  27. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-eSinjpOX.css +1 -0
  28. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{WhatsNewPage-BlOSWgSn.js → WhatsNewPage-CcELayE3.js} +1 -1
  29. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-CX4MHzNt.css +1 -0
  30. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{index-FfT2oWAB.js → index-CjBiayQg.js} +37 -37
  31. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{sample-requests-X_hsWdLX.js → sample-requests-BrVQkhcR.js} +1 -1
  32. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/sample-requests-CygerZZ_.css +1 -0
  33. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/{useLiveUptime-DhJz484L.js → useLiveUptime-s_CjVcUM.js} +1 -1
  34. package/plugins/weppy-roblox-mcp/dashboard/dist/index.html +2 -2
  35. package/plugins/weppy-roblox-mcp/dist/index.js +74 -74
  36. package/plugins/weppy-roblox-mcp/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  37. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ChangelogPage-DOY-SmWM.js +0 -1
  38. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-BiiIQs7f.js +0 -1
  39. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ConnectionPage-D_mEFudd.css +0 -1
  40. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-CW8Xfp6b.js +0 -11
  41. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/PlaytestPage-CYSu0pfO.css +0 -1
  42. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-Cc9Wnj8M.css +0 -1
  43. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SettingsPage-DcUt5qjG.js +0 -1
  44. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-BmMeN4N9.css +0 -1
  45. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/SyncPage-C09YF6D5.js +0 -4
  46. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-B3fMk-22.css +0 -1
  47. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/ToolsPage-HKbmsKMQ.js +0 -1
  48. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-Cbgl7xIC.js +0 -16
  49. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/UiStudioPage-DQOd5VrU.css +0 -1
  50. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/index-Gu7et1DX.css +0 -1
  51. package/plugins/weppy-roblox-mcp/dashboard/dist/assets/sample-requests-Bx1zpYdG.css +0 -1
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Weppy Roblox MCP — MCP server that lets AI coding agents control a live Roblox Studio session with 21 tools, 140+ actions, bidirectional sync, automated playtest, and multi-place support",
9
- "version": "2.7.1"
9
+ "version": "2.7.2"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "weppy-roblox-mcp",
14
14
  "source": "./plugins/weppy-roblox-mcp",
15
15
  "description": "Weppy Roblox MCP — MCP server that lets AI coding agents control a live Roblox Studio session with 21 tools, 140+ actions, bidirectional sync, automated playtest, and multi-place support",
16
- "version": "2.7.1",
16
+ "version": "2.7.2",
17
17
  "author": {
18
18
  "name": "hope1026"
19
19
  },
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
5
 
6
+
7
+ ## [2.7.2] - 2026-05-06
8
+
9
+ ### Stability
10
+
11
+ - **Stability hardening** — Internal reliability improvements across the MCP server and Roblox Studio plugin, including more robust instance resolution, unified metadata serialization, and structured error classification with clearer origin and recoverability information. No behavior changes for existing workflows.
12
+
13
+ ### Improvements
14
+
15
+ - **Dashboard UI polish** — The dashboard has been refreshed with a consolidated semantic color system and refined analytics event tracking, giving a more consistent look-and-feel across pages and cleaner navigation context.
16
+
6
17
  ## [2.7.1] - 2026-05-05
7
18
 
8
19
  ### Improvements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weppy/roblox-mcp",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "MCP (Model Context Protocol) server for Roblox Studio integration - enables AI coding agents to interact with Roblox Studio in real-time",
5
5
  "main": "plugins/weppy-roblox-mcp/dist/index.js",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weppy-roblox-mcp",
3
3
  "description": "MCP server for Roblox Studio integration - AI-powered game development with specialized agents and skills",
4
- "version": "2.7.1",
4
+ "version": "2.7.2",
5
5
  "author": {
6
6
  "name": "hope1026"
7
7
  },
@@ -1 +1 @@
1
- import{r,a as R,u as M,b as B,c as V,j as e}from"./index-FfT2oWAB.js";import{I as G}from"./InfoLabel-B9KT3kfU.js";import{G as D}from"./GameChangeDetail-D1kE2L_v.js";import{T as m}from"./TooltipText-Baw38jOU.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
1
+ import{r,a as R,u as M,b as B,c as V,j as e}from"./index-CjBiayQg.js";import{I as G}from"./InfoLabel-BDieYXVe.js";import{G as D}from"./GameChangeDetail-MfVogSqQ.js";import{T as m}from"./TooltipText-DgxJjq91.js";function F(n){const s={scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0};for(const l of n)switch(l.category){case"script":l.changeType==="create"?s.scriptsCreated++:s.scriptsModified++;break;case"instance":l.changeType==="create"?s.instancesCreated++:l.changeType==="delete"?s.instancesDeleted++:l.changeType==="move"&&s.instancesMoved++;break;case"property":s.propertiesChanged++;break;case"lighting":s.lightingChanged=!0;break;case"terrain":s.terrainChanged=!0;break;case"asset":s.assetsInserted++;break}return s}function P(n){const[s,l]=r.useState(""),[a,d]=r.useState(""),[u,q]=r.useState(),[w,y]=r.useState("completed"),[I,E]=r.useState([]),[L,O]=r.useState([]),[x,f]=r.useState([]),[p,_]=r.useState(),[j,b]=r.useState(),[v,S]=r.useState(),[C,N]=r.useState({scriptsModified:0,scriptsCreated:0,instancesCreated:0,instancesDeleted:0,instancesMoved:0,propertiesChanged:0,lightingChanged:!1,terrainChanged:!1,assetsInserted:0}),[T,g]=r.useState(!0),[k,h]=r.useState(null),i=r.useCallback(async()=>{if(n){g(!0),h(null);try{const[c,o]=await Promise.all([R.get(`/api/dashboard/changelog/${n}`),R.get(`/api/dashboard/changelog/${n}/changes`)]);l(c.entryId),d(c.startTime),q(c.endTime),y(c.status),E(c.entries),O(c.failures),_(c.contextSummary),b(c.replayMetadata),S(c.verificationSummary),f(o.changes),N(F(o.changes))}catch(c){h(c instanceof Error?c.message:"Failed to load changelog detail")}finally{g(!1)}}},[n]);return r.useEffect(()=>{i()},[i]),{entryId:s,startTime:a,endTime:u,status:w,entries:I,failures:L,changes:x,changeSummary:C,contextSummary:p,replayMetadata:j,verificationSummary:v,loading:T,error:k,refresh:i}}const U={script:"📝",instance:"🧱",property:"🎨",lighting:"🌅",terrain:"⛰️",asset:"📦"};function H(n){return U[n]??"❓"}const W="_page_q2jbi_2",Y="_header_q2jbi_10",z="_backLink_q2jbi_16",J="_headerTitle_q2jbi_29",Q="_headerTime_q2jbi_37",X="_statusActive_q2jbi_44",Z="_statusCompleted_q2jbi_49",ee="_section_q2jbi_54",te="_sectionTitle_q2jbi_61",ne="_summaryGrid_q2jbi_74",ae="_summaryCard_q2jbi_80",ie="_summaryCardActive_q2jbi_94",se="_summaryIcon_q2jbi_99",ce="_summaryCount_q2jbi_105",re="_summaryLabel_q2jbi_112",oe="_contextGrid_q2jbi_121",le="_contextRow_q2jbi_127",de="_contextKey_q2jbi_133",me="_contextValue_q2jbi_141",ge="_timelineFilter_q2jbi_149",he="_filterLabel_q2jbi_156",ue="_filterSelect_q2jbi_162",ye="_timeline_q2jbi_149",xe="_timelineEntry_q2jbi_182",fe="_timelineTime_q2jbi_199",pe="_timelineIcon_q2jbi_207",_e="_timelineBody_q2jbi_212",je="_timelineSummary_q2jbi_217",be="_timelineTarget_q2jbi_224",ve="_timelineConfidence_q2jbi_231",Se="_confidenceExact_q2jbi_240",Ce="_confidencePartial_q2jbi_245",Ne="_confidenceAfterOnly_q2jbi_250",Te="_confidenceIntentOnly_q2jbi_255",ke="_confidenceUnknown_q2jbi_260",qe="_timelineExpanded_q2jbi_266",we="_empty_q2jbi_338",Ie="_loading_q2jbi_347",Ee="_error_q2jbi_356",t={page:W,header:Y,backLink:z,headerTitle:J,headerTime:Q,statusActive:X,statusCompleted:Z,section:ee,sectionTitle:te,summaryGrid:ne,summaryCard:ae,summaryCardActive:ie,summaryIcon:se,summaryCount:ce,summaryLabel:re,contextGrid:oe,contextRow:le,contextKey:de,contextValue:me,timelineFilter:ge,filterLabel:he,filterSelect:ue,timeline:ye,timelineEntry:xe,timelineTime:fe,timelineIcon:pe,timelineBody:_e,timelineSummary:je,timelineTarget:be,timelineConfidence:ve,confidenceExact:Se,confidencePartial:Ce,confidenceAfterOnly:Ne,confidenceIntentOnly:Te,confidenceUnknown:ke,timelineExpanded:qe,empty:we,loading:Ie,error:Ee},$=[{key:"script",icon:"📝",labelKey:"changelog.category.script"},{key:"instance",icon:"🧱",labelKey:"changelog.category.instance"},{key:"property",icon:"🎨",labelKey:"changelog.category.property"},{key:"lighting",icon:"🌅",labelKey:"changelog.category.lighting"},{key:"terrain",icon:"⛰️",labelKey:"changelog.category.terrain"},{key:"asset",icon:"📦",labelKey:"changelog.category.asset"}];function A(n){if(!n)return"--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function Le(n){if(!n)return"--:--:--";const s=new Date(n);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}:${String(s.getSeconds()).padStart(2,"0")}`}function Oe(n,s){if(!n||!s)return"";const l=new Date(s).getTime()-new Date(n).getTime();return l<0?"":`${Math.round(l/6e4)}min`}function Ae(n){switch(n){case"exact":return t.confidenceExact;case"partial":return t.confidencePartial;case"after-only":return t.confidenceAfterOnly;case"intent-only":return t.confidenceIntentOnly;default:return t.confidenceUnknown}}function Ke(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact","Exact");case"partial":return n("changelog.detail.confidence.partial","Partial");case"after-only":return n("changelog.detail.confidence.afterOnly","After only");case"intent-only":return n("changelog.detail.confidence.intentOnly","Intent only");default:return n("changelog.detail.confidence.unknown","Unknown")}}function Re(n,s){switch(s){case"exact":return n("changelog.detail.confidence.exact.tooltip","Both the before and after state were confirmed for this change.");case"partial":return n("changelog.detail.confidence.partial.tooltip","Only part of the before and after state could be confirmed for this change.");case"after-only":return n("changelog.detail.confidence.afterOnly.tooltip","Only the resulting state after the change could be confirmed.");case"intent-only":return n("changelog.detail.confidence.intentOnly.tooltip","Only the requested action was recorded, not the resulting state.");default:return n("changelog.detail.confidence.unknown.tooltip","This change could not be confidently classified from the available data.")}}function Ge(){var x,f,p,_,j,b,v,S,C,N,T,g,k,h;const{t:n}=M(),{id:s}=B(),l=V(),a=P(s),[d,u]=r.useState("all"),[q,w]=r.useState(null),y=r.useMemo(()=>[...d==="all"?a.changes:a.changes.filter(c=>c.category===d)].reverse(),[a.changes,d]);if(a.loading)return e.jsx("div",{className:t.loading,children:n("common.loading","Loading...")});if(a.error)return e.jsxs("div",{className:t.error,children:[a.error,e.jsx("br",{}),e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("changelog.detail.backToList","Back to list")]})]});const I=Oe(a.startTime,a.endTime),E=a.endTime?`${A(a.startTime)} → ${A(a.endTime)} (${I})`:`${A(a.startTime)} → ${n("changelog.card.inProgress","in progress")}`,L=!!((x=a.contextSummary)!=null&&x.intent||(f=a.contextSummary)!=null&&f.testScenario||(p=a.contextSummary)!=null&&p.expectedBehavior||(_=a.contextSummary)!=null&&_.observedBehavior),O=!!((j=a.verificationSummary)!=null&&j.label||(b=a.verificationSummary)!=null&&b.status||(v=a.verificationSummary)!=null&&v.testTimestamp);return e.jsxs("div",{className:t.page,children:[e.jsxs("div",{className:t.header,children:[e.jsxs("span",{className:t.backLink,onClick:()=>l("/changelog"),children:["←"," ",n("sidebar.changelog","Changelog")]}),e.jsx("span",{className:t.headerTitle,children:"|"}),e.jsx("span",{className:t.headerTime,children:E}),e.jsx(m,{text:a.status==="active"?n("changelog.card.active.tooltip","This session is still receiving new game changes."):n("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),children:e.jsx("span",{className:a.status==="active"?t.statusActive:t.statusCompleted,children:a.status==="active"?n("changelog.card.active","Active"):n("changelog.card.completed","Completed")})})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeSummary.tooltip","Counts of extracted game changes grouped by category for this session."),children:e.jsx("span",{children:n("changelog.detail.changeSummary","Change Summary")})})}),e.jsx("div",{className:t.summaryGrid,children:$.map(i=>{const c=a.changeSummary;let o;switch(i.key){case"script":o=c.scriptsModified+c.scriptsCreated;break;case"instance":o=c.instancesCreated+c.instancesDeleted+c.instancesMoved;break;case"property":o=c.propertiesChanged;break;case"lighting":o=c.lightingChanged?1:0;break;case"terrain":o=c.terrainChanged?1:0;break;case"asset":o=c.assetsInserted;break;default:o=0}const K=d===i.key;return e.jsxs("div",{className:`${t.summaryCard} ${K?t.summaryCardActive:""}`,onClick:()=>u(K?"all":i.key),children:[e.jsx("span",{className:t.summaryIcon,children:i.icon}),e.jsx("div",{className:t.summaryCount,children:o}),e.jsx("div",{className:t.summaryLabel,children:n(i.labelKey,i.key)})]},i.key)})})]}),L&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.context.tooltip","Structured execution context captured for this changelog session."),children:e.jsx("span",{children:n("changelog.detail.context.title","Context Summary")})})}),e.jsxs("div",{className:t.contextGrid,children:[((S=a.contextSummary)==null?void 0:S.intent)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.intent})]}),((C=a.contextSummary)==null?void 0:C.testScenario)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.why","Why this test ran")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.testScenario})]}),((N=a.contextSummary)==null?void 0:N.expectedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.expected","Expected")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.expectedBehavior})]}),((T=a.contextSummary)==null?void 0:T.observedBehavior)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("playtest.context.observed","Observed")}),e.jsx("span",{className:t.contextValue,children:a.contextSummary.observedBehavior})]})]})]}),O&&e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.verification.tooltip","Verification signals linked to this changelog session."),children:e.jsx("span",{children:n("changelog.detail.verification.title","Verification")})})}),e.jsxs("div",{className:t.contextGrid,children:[((g=a.verificationSummary)==null?void 0:g.label)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.label","Result")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.label})]}),((k=a.verificationSummary)==null?void 0:k.status)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.status","Status")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.status})]}),((h=a.verificationSummary)==null?void 0:h.testTimestamp)&&e.jsxs("div",{className:t.contextRow,children:[e.jsx("span",{className:t.contextKey,children:n("changelog.detail.verification.timestamp","Recorded at")}),e.jsx("span",{className:t.contextValue,children:a.verificationSummary.testTimestamp})]})]})]}),e.jsxs("div",{className:t.section,children:[e.jsx("div",{className:t.sectionTitle,children:e.jsx(m,{text:n("changelog.detail.changeTimeline.tooltip","Chronological list of extracted game changes for this session."),children:e.jsx("span",{children:n("changelog.detail.changeTimeline","Change Timeline")})})}),e.jsxs("div",{className:t.timelineFilter,children:[e.jsx("span",{className:t.filterLabel,children:e.jsx(G,{label:`${n("changelog.detail.filterCategory","Category")}:`,tooltip:n("changelog.detail.filterCategory.tooltip","Filter the timeline to a single change category.")})}),e.jsxs("select",{className:t.filterSelect,value:d,onChange:i=>u(i.target.value),children:[e.jsx("option",{value:"all",children:n("tools.filter.all","All")}),$.map(i=>e.jsxs("option",{value:i.key,children:[i.icon," ",n(i.labelKey,i.key)]},i.key))]})]}),y.length===0?e.jsx("div",{className:t.empty,children:n("changelog.detail.noChanges","No changes in this category")}):e.jsx("div",{className:t.timeline,children:y.map((i,c)=>{const o=q===c;return e.jsxs("div",{children:[e.jsxs("div",{className:t.timelineEntry,onClick:()=>w(o?null:c),children:[e.jsx("span",{className:t.timelineTime,children:Le(i.timestamp)}),e.jsx("span",{className:t.timelineIcon,children:H(i.category)}),e.jsxs("div",{className:t.timelineBody,children:[e.jsxs("div",{className:t.timelineSummary,children:[i.summary,e.jsx(m,{text:Re(n,i.confidence),children:e.jsx("span",{className:`${t.timelineConfidence} ${Ae(i.confidence)}`,children:Ke(n,i.confidence)})})]}),e.jsx("div",{className:t.timelineTarget,children:i.target})]})]}),o&&e.jsx("div",{className:t.timelineExpanded,children:e.jsx(D,{change:i})})]},c)})})]})]})}export{Ge as Component};
@@ -0,0 +1 @@
1
+ import{r as l,a as A,D as O,u as R,j as e,i as P,c as V,l as K,m as G}from"./index-CjBiayQg.js";import{C as H}from"./ConfirmModal-Dak7jVJo.js";import{T as $}from"./TooltipText-DgxJjq91.js";import{T as U}from"./Tabs-CuTJuL80.js";const Z=10;function q(){const[s,p]=l.useState([]),[t,n]=l.useState(0),[a,u]=l.useState(!1),[r,_]=l.useState(!0),[i,b]=l.useState(0),[g,x]=l.useState("all"),v=l.useRef(null),f=l.useCallback(async(d,y)=>{_(!0);try{const j={limit:String(Z),offset:String(d)};y!=="all"&&(j.status=y);const N=await A.get("/api/dashboard/changelog",j);p(N.entries),n(N.total),u(N.hasMore)}catch{p([]),n(0),u(!1)}finally{_(!1)}},[]),C=l.useCallback(()=>{f(i,g)},[f,i,g]),c=l.useCallback(async()=>{await A.post("/api/dashboard/changelog/clear"),p([]),n(0),u(!1)},[]);return l.useEffect(()=>{f(i,g)},[f,i,g]),l.useEffect(()=>{const d=new O;v.current=d,d.connect();const y=d.on("command",()=>{f(i,g)});return()=>{y(),d.disconnect(),v.current=null}},[f,i,g]),{entries:s,total:t,hasMore:a,loading:r,offset:i,statusFilter:g,setOffset:b,setStatusFilter:x,refresh:C,clear:c}}const z="_card_1n89u_2",J="_header_1n89u_17",Q="_statusBadge_1n89u_24",W="_statusDot_1n89u_35",X="_active_1n89u_41",Y="_completed_1n89u_50",ee="_timeRange_1n89u_58",te="_summaryList_1n89u_65",se="_summaryItem_1n89u_71",ae="_summaryIcon_1n89u_80",ne="_summaryText_1n89u_86",oe="_progressBar_1n89u_91",ce="_progressFill_1n89u_99",ie="_emptySummary_1n89u_112",le="_contextBlock_1n89u_120",re="_contextLabel_1n89u_129",ge="_contextValue_1n89u_137",o={card:z,header:J,statusBadge:Q,statusDot:W,active:X,completed:Y,timeRange:ee,summaryList:te,summaryItem:se,summaryIcon:ae,summaryText:ne,progressBar:oe,progressFill:ce,emptySummary:ie,contextBlock:le,contextLabel:re,contextValue:ge};function D(s){if(!s)return"--:--";const p=new Date(s);return`${String(p.getHours()).padStart(2,"0")}:${String(p.getMinutes()).padStart(2,"0")}`}function de({entry:s,onClick:p}){var j,N,I,k,w,B,L,M,E,F;const{t}=R(),n=s.changeSummary,a=s.status==="active",u=s.isBootstrapOnly===!0,r=[],_=n.scriptsModified+n.scriptsCreated;if(_>0){const m=[];n.scriptsModified>0&&m.push(`${n.scriptsModified} ${t("changelog.card.modified","modified")}`),n.scriptsCreated>0&&m.push(`${n.scriptsCreated} ${t("changelog.card.created","created")}`);const S=`${_} ${t("changelog.card.scripts","scripts")} ${m.join(", ")}`;r.push({icon:"📝",text:S,tooltip:t("changelog.card.scripts.tooltip","Script changes made in this session.")})}const i=n.instancesCreated+n.instancesDeleted+n.instancesMoved;if(i>0){const m=[];n.instancesCreated>0&&m.push(`${n.instancesCreated} ${t("changelog.card.created","created")}`),n.instancesDeleted>0&&m.push(`${n.instancesDeleted} ${t("changelog.card.deleted","deleted")}`),n.instancesMoved>0&&m.push(`${n.instancesMoved} ${t("changelog.card.moved","moved")}`);const S=`${i} ${t("changelog.card.instances","instances")} ${m.join(", ")}`;r.push({icon:"🧱",text:S,tooltip:t("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}n.propertiesChanged>0&&r.push({icon:"🎨",text:`${n.propertiesChanged} ${t("changelog.card.propertiesChanged","properties changed")}`,tooltip:t("changelog.card.propertiesChanged.tooltip","Property value changes recorded for this session.")}),n.lightingChanged&&r.push({icon:"🌅",text:t("changelog.card.lightingConfigured","Lighting configured"),tooltip:t("changelog.card.lightingConfigured.tooltip","Lighting or atmosphere settings changed in this session.")}),n.terrainChanged&&r.push({icon:"⛰️",text:t("changelog.card.terrainConfigured","Terrain configured"),tooltip:t("changelog.card.terrainConfigured.tooltip","Terrain data or terrain settings changed in this session.")}),n.assetsInserted>0&&r.push({icon:"📦",text:`${n.assetsInserted} ${t("changelog.card.assetsInserted","assets inserted")}`,tooltip:t("changelog.card.assetsInserted.tooltip","Assets inserted into the place during this session.")});const b=D(s.startTime),g=a?t("changelog.card.inProgress","in progress"):s.endTime?D(s.endTime):"--:--",x=u?t("changelog.card.bootstrapStatus","Bootstrap"):a?t("changelog.card.active","Active"):t("changelog.card.completed","Completed"),v=u?t("changelog.card.bootstrapStatus.tooltip","This session only contains the initial sync bootstrap snapshot."):a?t("changelog.card.active.tooltip","This session is still receiving new game changes."):t("changelog.card.completed.tooltip","This session has ended and no more changes are expected."),f=u?t("changelog.card.bootstrapSummary","Initial sync snapshot"):t("changelog.card.noChanges","No changes yet"),C=u?t("changelog.card.bootstrapSummary.tooltip","Initial file sync writes are collapsed into a single bootstrap snapshot row."):t("changelog.card.noChanges.tooltip","No game changes have been extracted for this session yet."),c=(N=(j=s.contextSummary)==null?void 0:j.intent)==null?void 0:N.trim(),d=((B=(w=(k=(I=s.contextSummary)==null?void 0:I.affectedAreas)==null?void 0:k[0])==null?void 0:w.label)==null?void 0:B.trim())||((M=(L=s.contextSummary)==null?void 0:L.testScenario)==null?void 0:M.trim()),y=(F=(E=s.verificationSummary)==null?void 0:E.label)==null?void 0:F.trim();return e.jsxs("div",{className:o.card,onClick:p,children:[e.jsxs("div",{className:o.header,children:[e.jsx($,{text:v,children:e.jsxs("span",{className:`${o.statusBadge} ${a?o.active:o.completed}`,children:[e.jsx("span",{className:o.statusDot}),x]})}),e.jsxs("span",{className:o.timeRange,children:[b,"~",g]})]}),e.jsx("div",{className:o.summaryList,children:r.length>0?r.map((m,S)=>e.jsxs("div",{className:o.summaryItem,children:[e.jsx("span",{className:o.summaryIcon,children:m.icon}),e.jsx($,{text:m.tooltip,children:e.jsx("span",{className:o.summaryText,children:m.text})})]},S)):e.jsx($,{text:C,children:e.jsx("span",{className:o.emptySummary,style:{display:"block"},children:f})})}),c&&e.jsxs("div",{className:o.contextBlock,children:[e.jsx("span",{className:o.contextLabel,children:t("changelog.card.sessionIntent","Session intent")}),e.jsx("span",{className:o.contextValue,children:c})]}),!c&&d&&e.jsxs("div",{className:o.contextBlock,children:[e.jsx("span",{className:o.contextLabel,children:t("changelog.card.representativeArea","Representative area")}),e.jsx("span",{className:o.contextValue,children:d})]}),y&&e.jsxs("div",{className:o.contextBlock,children:[e.jsx("span",{className:o.contextLabel,children:t("changelog.card.verification","Verification")}),e.jsx("span",{className:o.contextValue,children:y})]}),a&&e.jsx("div",{className:o.progressBar,children:e.jsx("div",{className:o.progressFill})})]})}const me="_page_1ynbw_2",he="_limitNotice_1ynbw_9",pe="_limitNoticeTitle_1ynbw_18",ue="_limitNoticeText_1ynbw_25",fe="_clearButton_1ynbw_33",_e="_list_1ynbw_54",xe="_empty_1ynbw_61",ye="_loading_1ynbw_70",be="_pagination_1ynbw_79",ve="_pageInfo_1ynbw_87",Ne="_btn_1ynbw_93",h={page:me,limitNotice:he,limitNoticeTitle:pe,limitNoticeText:ue,clearButton:fe,list:_e,empty:xe,loading:ye,pagination:be,pageInfo:ve,btn:Ne},T=10,Ce=[{key:"all",labelKey:"changelog.filter.all"},{key:"active",labelKey:"changelog.filter.active"},{key:"completed",labelKey:"changelog.filter.completed"}];function Ie(){const{t:s}=R(),{trackEvent:p,trackPageView:t}=P(),n=V(),a=q(),u=K(),{show:r}=G(),[_,i]=l.useState(!1),[b,g]=l.useState(!1),x=!u.loading&&u.tier==="basic",v=x?a.entries.slice(0,3):a.entries,f=!x&&a.total>T,C=async()=>{g(!0);try{await a.clear(),r(s("toast.clearSuccess","Cleared successfully"),"success"),i(!1)}catch{r(s("toast.clearFailed","Failed to clear data"),"error")}finally{g(!1)}};return e.jsxs("div",{className:h.page,children:[e.jsx(U,{items:Ce.map(c=>({key:c.key,label:s(c.labelKey,c.key.charAt(0).toUpperCase()+c.key.slice(1))})),value:a.statusFilter,onChange:c=>{const d=`changelog_${c}`;p("dashboard_click_event",{click_target:`changelog_tab_${c}`,page:"changelog",tab:d}),t({page:"changelog",tab:d}),a.setStatusFilter(c),a.setOffset(0)},rightActions:e.jsx("button",{className:h.clearButton,onClick:()=>{p("dashboard_click_event",{click_target:"changelog_clear",page:"changelog",tab:`changelog_${a.statusFilter}`}),i(!0)},children:s("common.clear","Clear")})}),a.loading&&a.entries.length===0&&e.jsx("div",{className:h.loading,children:s("common.loading","Loading...")}),!a.loading&&a.entries.length===0?e.jsx("div",{className:h.empty,children:s("changelog.empty","No changelog entries yet")}):e.jsx("div",{className:h.list,children:v.map(c=>e.jsx(de,{entry:c,onClick:()=>n(`/changelog/${c.entryId}`)},c.entryId))}),f&&e.jsxs("div",{className:h.pagination,children:[e.jsx("button",{className:h.btn,disabled:a.offset===0,onClick:()=>a.setOffset(Math.max(0,a.offset-T)),children:s("tools.page.prev","Prev")}),e.jsxs("span",{className:h.pageInfo,children:[a.offset+1,"–",Math.min(a.offset+T,a.total)," / ",a.total]}),e.jsx("button",{className:h.btn,disabled:!a.hasMore,onClick:()=>a.setOffset(a.offset+T),children:s("tools.page.next","Next")})]}),x&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:h.limitNotice,children:[e.jsx("div",{className:h.limitNoticeTitle,children:s("changelog.basic.limit.title","Basic preview shows the latest 3 sessions")}),e.jsx("div",{className:h.limitNoticeText,children:s("changelog.basic.limit.body","Upgrade to Pro to browse the full changelog timeline for this place.")})]})}),e.jsx(H,{open:_,title:s("changelog.clear.title","Clear changelog?"),message:s("changelog.clear.message","This permanently removes the stored changelog for the current place."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:b,onCancel:()=>!b&&i(!1),onConfirm:C})]})}export{Ie as Component};
@@ -1 +1 @@
1
- import{j as s,w as e}from"./index-FfT2oWAB.js";function x({open:c,title:i,message:n,cancelLabel:t,confirmLabel:o,loading:a=!1,onCancel:l,onConfirm:r}){return c?s.jsx("div",{className:e.backdrop,onClick:a?void 0:l,children:s.jsxs("div",{className:e.modal,onClick:d=>d.stopPropagation(),children:[s.jsx("h2",{className:e.title,children:i}),s.jsx("p",{className:e.message,children:n}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:e.cancelButton,onClick:l,disabled:a,children:t}),s.jsx("button",{className:e.confirmButton,onClick:r,disabled:a,children:a?"...":o})]})]})}):null}export{x as C};
1
+ import{j as s,x as e}from"./index-CjBiayQg.js";function x({open:c,title:i,message:n,cancelLabel:t,confirmLabel:o,loading:a=!1,onCancel:l,onConfirm:r}){return c?s.jsx("div",{className:e.backdrop,onClick:a?void 0:l,children:s.jsxs("div",{className:e.modal,onClick:d=>d.stopPropagation(),children:[s.jsx("h2",{className:e.title,children:i}),s.jsx("p",{className:e.message,children:n}),s.jsxs("div",{className:e.actions,children:[s.jsx("button",{className:e.cancelButton,onClick:l,disabled:a,children:t}),s.jsx("button",{className:e.confirmButton,onClick:r,disabled:a,children:a?"...":o})]})]})}):null}export{x as C};
@@ -0,0 +1 @@
1
+ ._container_1h084_2{max-height:200px;overflow-y:auto;font-family:var(--font-code);font-size:12px;line-height:1.6;padding:8px 12px;background:var(--bg-secondary);border-radius:4px}._entry_1h084_14{display:flex;gap:8px;white-space:nowrap}._timestamp_1h084_21{color:var(--text-muted);flex-shrink:0}._message_1h084_27{color:var(--text-primary);overflow:hidden;text-overflow:ellipsis}._warn_1h084_34 ._message_1h084_27{color:var(--warning)}._error_1h084_39 ._message_1h084_27{color:var(--error)}._empty_1h084_44{color:var(--text-muted);font-style:italic;padding:8px 0}._page_15jrd_2{display:flex;flex-direction:column;gap:16px;max-width:820px}._card_15jrd_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._disabled_15jrd_18{opacity:.4;pointer-events:none}._cardHeader_15jrd_24{font-family:var(--font-label);font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}._clearButton_15jrd_37{border:1px solid var(--error-border);background:var(--error-bg);color:var(--error-text);border-radius:var(--radius-sm);padding:6px 12px;cursor:pointer}._serverGrid_15jrd_47{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-family:var(--font-code);font-size:13px}._serverGrid_15jrd_47 dt{color:var(--text-muted)}._serverGrid_15jrd_47 dd{color:var(--text-primary);margin:0}._statusRow_15jrd_65{display:flex;align-items:center;gap:16px;margin-bottom:12px}._metaItem_15jrd_72{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._table_15jrd_79{width:100%;border-collapse:collapse;font-family:var(--font-code);font-size:12px}._table_15jrd_79 th{text-align:left;color:var(--text-muted);font-weight:400;padding:4px 8px 4px 0;border-bottom:1px solid var(--border)}._table_15jrd_79 td{padding:6px 8px 6px 0;color:var(--text-primary)}._table_15jrd_79 tr:hover td{background:var(--accent-dim)}._toggleBtn_15jrd_104{background:none;border:none;color:var(--text-secondary);cursor:pointer;font-size:12px;padding:0 4px;transition:color var(--transition)}._toggleBtn_15jrd_104:hover{color:var(--accent)}._disconnected_15jrd_119{text-align:center;padding:32px 16px}._disconnected_15jrd_119 h3{color:var(--error);font-size:16px;margin:0 0 8px}._disconnected_15jrd_119 p{color:var(--text-secondary);font-size:13px;margin:0 0 4px}._disconnectedActions_15jrd_136{display:flex;gap:8px;justify-content:center;margin-top:16px}._btn_15jrd_143{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_15jrd_143:hover{border-color:var(--accent);background:var(--accent-dim)}._activity_active_15jrd_161,._activity_stale_15jrd_162,._activity_unknown_15jrd_163{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle}._activity_active_15jrd_161{background:var(--success);box-shadow:0 0 4px var(--success)}._activity_stale_15jrd_162{background:var(--text-muted)}._activity_unknown_15jrd_163{background:var(--text-muted);opacity:.4}._killBtn_15jrd_187{font-family:var(--font-label);font-size:11px;padding:3px 10px;border-radius:var(--radius-sm);border:1px solid var(--error-border);background:var(--error-bg);color:var(--error-text);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._killBtn_15jrd_187:hover{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text);filter:brightness(1.15)}._emptyRow_15jrd_207{color:var(--text-muted);font-style:italic}
@@ -0,0 +1 @@
1
+ import{u as R,r as a,j as e,d as P,a as S,D as T,i as D,m as F}from"./index-CjBiayQg.js";import{I as r}from"./InfoLabel-BDieYXVe.js";import{S as H}from"./StatusBadge-MxsMOCZ3.js";import{T as U}from"./TooltipText-DgxJjq91.js";import{C as $}from"./ConfirmModal-Dak7jVJo.js";import{u as K,f as G}from"./useLiveUptime-s_CjVcUM.js";const O="_container_1h084_2",V="_entry_1h084_14",q="_timestamp_1h084_21",X="_message_1h084_27",z="_warn_1h084_34",J="_error_1h084_39",Q="_empty_1h084_44",v={container:O,entry:V,timestamp:q,message:X,warn:z,error:J,empty:Q};function W(n){const i=new Date(n);return Number.isNaN(i.getTime())?n:`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}function Y({entries:n}){const{t:i}=R(),t=a.useRef(null);return a.useEffect(()=>{const o=t.current;o&&(o.scrollTop=o.scrollHeight)},[n.length]),e.jsx("div",{ref:t,className:v.container,children:n.length===0?e.jsx("div",{className:v.empty,children:i("connection.log.empty","No events yet")}):n.map((o,u)=>e.jsxs("div",{className:`${v.entry} ${o.type?v[o.type]:""}`,children:[e.jsx("span",{className:v.timestamp,children:W(o.timestamp)}),e.jsx("span",{className:v.message,children:o.message})]},u))})}const A=50;function Z(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function ee(){const{level:n,status:i,error:t}=P(),[o,u]=a.useState(null),[N,j]=a.useState([]),C=a.useRef(null),g=a.useCallback((l,x)=>{j(p=>{const d=[...p,{timestamp:Z(),message:l,type:x}];return d.length>A?d.slice(-A):d})},[]),m=a.useCallback(async()=>{try{const l=await S.get("/connection-info");u(l)}catch{u(null)}},[]),y=a.useCallback(async()=>{try{const l=await S.get("/api/dashboard/connection-log");j(l.entries??[])}catch{j([])}},[]),k=a.useCallback(async()=>{await S.post("/api/dashboard/connection-log/clear"),j([])},[]),f=a.useCallback(async l=>{await S.post("/api/dashboard/kill-agent",{instanceId:l}),await m()},[m]);return a.useEffect(()=>{n!=="disconnected"&&i&&m(),y()},[n,i,m,y]),a.useEffect(()=>{const l=new T;C.current=l,l.connect();const x=l.on("connection",d=>{const h=d,_=h.status==="connected"?"connected":"disconnected";g(`Plugin ${_} — ${h.clientId}`,h.status==="connected"?"info":"warn")}),p=l.on("mcp_status",d=>{const h=d,_=h.status==="registered"?"registered":"unregistered";g(`MCP ${_} — ${h.aiClientName}`,h.status==="registered"?"info":"warn"),m()});return()=>{x(),p(),l.disconnect(),C.current=null}},[g,m]),{status:i,connectionInfo:o,connectionLog:N,level:n,error:t,clearConnectionLog:k,killAgent:f}}const ne="_page_15jrd_2",te="_card_15jrd_10",se="_disabled_15jrd_18",ce="_cardHeader_15jrd_24",oe="_clearButton_15jrd_37",ie="_serverGrid_15jrd_47",ae="_statusRow_15jrd_65",le="_metaItem_15jrd_72",re="_table_15jrd_79",de="_toggleBtn_15jrd_104",me="_disconnected_15jrd_119",pe="_disconnectedActions_15jrd_136",he="_btn_15jrd_143",ge="_activity_active_15jrd_161",ue="_activity_stale_15jrd_162",je="_activity_unknown_15jrd_163",xe="_killBtn_15jrd_187",_e="_emptyRow_15jrd_207",s={page:ne,card:te,disabled:se,cardHeader:ce,clearButton:oe,serverGrid:ie,statusRow:ae,metaItem:le,table:re,toggleBtn:de,disconnected:me,disconnectedActions:pe,btn:he,activity_active:ge,activity_stale:ue,activity_unknown:je,killBtn:xe,emptyRow:_e};function w(n,i){const t=Math.max(0,Math.floor((Date.now()-n)/1e3));return t<60?`${t}${i("connection.time.secondsAgo","s ago")}`:t<3600?`${Math.floor(t/60)}${i("connection.time.minutesAgo","m ago")}`:`${Math.floor(t/3600)}${i("connection.time.hoursAgo","h ago")}`}function ve(n){return n?Date.now()-n<3e4?"active":"stale":"unknown"}function Ne(){var I;const{t:n}=R(),{trackEvent:i}=D(),{status:t,connectionInfo:o,connectionLog:u,level:N,clearConnectionLog:j,killAgent:C}=ee(),{show:g}=F(),[m,y]=a.useState(!0),[k,f]=a.useState(!1),[l,x]=a.useState(!1),[p,d]=a.useState(null),[h,_]=a.useState(!1),L=K(t==null?void 0:t.uptime),b=N==="disconnected",M=b?"offline":"online",E=async()=>{if(p){_(!0);try{await C(p.instanceId),g(n("connection.agents.killed","Agent killed"),"success"),d(null)}catch{g(n("connection.agents.killFailed","Failed to kill agent"),"error")}finally{_(!1)}}},B=async()=>{x(!0);try{await j(),g(n("toast.clearSuccess","Cleared successfully"),"success"),f(!1)}catch{g(n("toast.clearFailed","Failed to clear data"),"error")}finally{x(!1)}};return e.jsxs("div",{className:s.page,children:[e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:n("connection.server.title","Server Status")}),b?e.jsxs("div",{className:s.disconnected,children:[e.jsx("h3",{children:n("level.l0.title")}),e.jsx("p",{children:n("level.l0.message")}),e.jsx("p",{children:n("common.reconnecting")}),e.jsxs("div",{className:s.disconnectedActions,children:[e.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:n("connection.reconnect","Reconnect")}),e.jsx("button",{className:s.btn,onClick:()=>{window.location.hash="#/settings"},children:n("connection.checkSettings","Check Settings")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.statusRow,children:e.jsx(H,{status:M})}),e.jsxs("dl",{className:s.serverGrid,children:[(t==null?void 0:t.version)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.version","Version"),tooltip:n("connection.server.version.tooltip","Installed MCP server version")})}),e.jsx("dd",{children:e.jsx(U,{text:n("connection.server.version.tooltip","Installed MCP server version"),children:`v${t.version}`})})]}),(t==null?void 0:t.pid)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("dd",{children:t.pid})]}),(t==null?void 0:t.uptime)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.uptime","Uptime"),tooltip:n("connection.server.uptime.tooltip","Time elapsed since the MCP server started")})}),e.jsx("dd",{children:G(L??t.uptime)})]}),(t==null?void 0:t.sessionId)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.session","Session"),tooltip:n("connection.server.session.tooltip","Current MCP session identifier")})}),e.jsx("dd",{children:t.sessionId.slice(0,8)})]}),(o==null?void 0:o.serverExecutable)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(r,{label:n("connection.server.exec","Exec"),tooltip:n("connection.server.exec.tooltip","Executable path used to launch the MCP server")})}),e.jsx("dd",{children:o.serverExecutable})]})]})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsxs("span",{children:[n("connection.agents.title","AI Agents")," ","(",(o==null?void 0:o.mcpInstanceCount)??0,")"]}),e.jsx("button",{className:s.toggleBtn,onClick:()=>y(c=>!c),"aria-label":m?n("common.collapse","Collapse"):n("common.expand","Expand"),children:m?"▾":"▸"})]}),m&&e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.agents.name","Agent")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.server.pid","PID"),tooltip:n("connection.server.pid.tooltip","Operating system process identifier")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.projectRoot","Project Root"),tooltip:n("connection.agents.projectRoot.tooltip","Authoritative project root for sync ownership")})}),e.jsx("th",{children:n("connection.agents.connected","Connected")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastSeen","Last Seen"),tooltip:n("connection.agents.lastSeen.tooltip","Most recent heartbeat or activity from this agent")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.agents.lastCommand","Last Command"),tooltip:n("connection.agents.lastCommand.tooltip","Most recent tool call executed by this agent")})}),e.jsx("th",{})]})}),e.jsx("tbody",{children:o!=null&&o.mcpInstances&&o.mcpInstances.length>0?o.mcpInstances.map(c=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:s[`activity_${ve(c.lastSeen)}`]}),c.aiClientName??n("connection.agents.unknown","Unknown")]}),e.jsx("td",{children:c.pid}),e.jsx("td",{children:c.projectRoot??c.cwd??n("connection.agents.projectRoot.unresolved","Unresolved")}),e.jsx("td",{children:w(c.connectedAt,n)}),e.jsx("td",{children:c.lastSeen?w(c.lastSeen,n):"-"}),e.jsx("td",{children:c.lastCommandAt?w(c.lastCommandAt,n):"-"}),e.jsx("td",{children:!c.isServer&&e.jsx("button",{className:s.killBtn,onClick:()=>{i("dashboard_click_event",{click_target:"connection_kill_agent",page:"connection"}),d({instanceId:c.instanceId,name:c.aiClientName??c.instanceId.slice(0,8)})},children:n("connection.agents.kill","Kill")})})]},c.instanceId)):e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:s.emptyRow,children:n("connection.agents.none","No agents connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[n("connection.plugins.title","Plugins")," ","(",((I=t==null?void 0:t.pluginClients)==null?void 0:I.length)??0,")"]}),e.jsxs("table",{className:s.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:n("connection.plugins.place","Place")}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.clientId","Client ID"),tooltip:n("connection.plugins.clientId.tooltip","Unique plugin client identifier for this Studio connection")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.lastSeen","Last Seen"),tooltip:n("connection.plugins.lastSeen.tooltip","Most recent heartbeat received from the plugin")})}),e.jsx("th",{children:e.jsx(r,{label:n("connection.plugins.version","Ver"),tooltip:n("connection.plugins.version.tooltip","Installed plugin version reported by Studio")})})]})}),e.jsx("tbody",{children:t!=null&&t.pluginClients&&t.pluginClients.length>0?t.pluginClients.map(c=>e.jsxs("tr",{children:[e.jsx("td",{children:c.placeName??c.projectName??"-"}),e.jsx("td",{children:c.clientId.slice(0,10)}),e.jsx("td",{children:w(c.lastSeen,n)}),e.jsx("td",{children:c.pluginVersion??"-"})]},c.clientId)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:s.emptyRow,children:n("connection.plugins.none","No plugins connected")})})})]})]}),e.jsxs("div",{className:`${s.card} ${b?s.disabled:""}`,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx("span",{children:n("connection.log.title","Connection Log")}),e.jsx("button",{className:s.clearButton,onClick:()=>{i("dashboard_click_event",{click_target:"connection_clear_log",page:"connection"}),f(!0)},children:n("common.clear","Clear")})]}),e.jsx(Y,{entries:u})]}),e.jsx($,{open:k,title:n("connection.clear.title","Clear connection log?"),message:n("connection.clear.message","This permanently removes the stored connection log for the current project."),cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("common.clear","Clear"),loading:l,onCancel:()=>!l&&f(!1),onConfirm:B}),e.jsx($,{open:!!p,title:n("connection.agents.kill.title","Kill agent?"),message:`"${p==null?void 0:p.name}" 프로세스를 강제 종료합니다. 해당 에이전트의 진행 중인 작업이 중단됩니다.`,cancelLabel:n("common.cancel","Cancel"),confirmLabel:n("connection.agents.kill","Kill"),loading:h,onCancel:()=>!h&&d(null),onConfirm:E})]})}export{Ne as Component};
@@ -1 +1 @@
1
- ._container_uv8oc_2{font-family:var(--font-code);font-size:11px;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._header_uv8oc_10{display:flex;gap:2px;background:var(--bg-secondary);border-bottom:1px solid var(--border);padding:4px 8px}._modeBtn_uv8oc_18{font-family:var(--font-label);font-size:10px;padding:2px 8px;border:1px solid var(--border);border-radius:3px;background:none;color:var(--text-secondary);cursor:pointer}._modeBtn_uv8oc_18:hover{border-color:var(--accent)}._modeBtnActive_uv8oc_33{background:var(--accent-dim);color:var(--accent);border-color:var(--accent)}._unifiedView_uv8oc_40{overflow-x:auto;max-height:400px;overflow-y:auto}._diffLine_uv8oc_46{display:flex;padding:0 8px;min-height:18px;line-height:18px;white-space:pre-wrap;word-break:break-all}._lineNum_uv8oc_55{min-width:32px;text-align:right;padding-right:8px;color:var(--text-muted);-webkit-user-select:none;user-select:none;flex-shrink:0}._lineContent_uv8oc_64{flex:1}._lineAdded_uv8oc_68{background:#22c55e1a;color:var(--success)}._lineRemoved_uv8oc_73{background:#ef44441a;color:var(--error)}._lineContext_uv8oc_78{color:var(--text-secondary)}._sideBySide_uv8oc_83{display:flex;overflow-x:auto;max-height:400px;overflow-y:auto}._sidePane_uv8oc_90{flex:1;min-width:0;overflow-x:auto}._sidePane_uv8oc_90:first-child{border-right:1px solid var(--border)}._sideLabel_uv8oc_100{font-family:var(--font-label);font-size:10px;font-weight:500;color:var(--text-muted);padding:4px 8px;background:var(--bg-secondary);border-bottom:1px solid var(--border);text-transform:uppercase;letter-spacing:.05em}._sideContent_uv8oc_112{padding:4px 0}._empty_uv8oc_117{padding:16px;text-align:center;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._container_1obo2_2{display:flex;align-items:center;gap:8px;font-family:var(--font-code);font-size:11px;padding:4px 0}._propertyList_1obo2_11{display:flex;flex-direction:column;gap:6px;padding:4px 0}._propertyRow_1obo2_18{display:flex;align-items:flex-start;gap:8px;font-family:var(--font-code);font-size:11px}._propertyKey_1obo2_26{min-width:88px;color:var(--text-secondary);font-weight:600}._oldValue_1obo2_32{color:var(--error);text-decoration:line-through;opacity:.7}._arrow_1obo2_38{color:var(--text-muted);font-size:10px}._newValue_1obo2_43{color:var(--success);font-weight:500;word-break:break-all}._onlyValue_1obo2_49{color:var(--text-primary)}
1
+ ._container_uv8oc_2{font-family:var(--font-code);font-size:11px;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._header_uv8oc_10{display:flex;gap:2px;background:var(--bg-secondary);border-bottom:1px solid var(--border);padding:4px 8px}._modeBtn_uv8oc_18{font-family:var(--font-label);font-size:10px;padding:2px 8px;border:1px solid var(--border);border-radius:3px;background:none;color:var(--text-secondary);cursor:pointer}._modeBtn_uv8oc_18:hover{border-color:var(--accent)}._modeBtnActive_uv8oc_33{background:var(--accent-dim);color:var(--accent);border-color:var(--accent)}._unifiedView_uv8oc_40{overflow-x:auto;max-height:400px;overflow-y:auto}._diffLine_uv8oc_46{display:flex;padding:0 8px;min-height:18px;line-height:18px;white-space:pre-wrap;word-break:break-all}._lineNum_uv8oc_55{min-width:32px;text-align:right;padding-right:8px;color:var(--text-muted);-webkit-user-select:none;user-select:none;flex-shrink:0}._lineContent_uv8oc_64{flex:1}._lineAdded_uv8oc_68{background:#22c55e1a;color:var(--success)}._lineRemoved_uv8oc_73{background:#ef44441a;color:var(--error)}._lineContext_uv8oc_78{color:var(--text-secondary)}._sideBySide_uv8oc_83{display:flex;overflow-x:auto;max-height:400px;overflow-y:auto}._sidePane_uv8oc_90{flex:1;min-width:0;overflow-x:auto}._sidePane_uv8oc_90:first-child{border-right:1px solid var(--border)}._sideLabel_uv8oc_100{font-family:var(--font-label);font-size:10px;font-weight:500;color:var(--text-muted);padding:4px 8px;background:var(--bg-secondary);border-bottom:1px solid var(--border);text-transform:uppercase;letter-spacing:.05em}._sideContent_uv8oc_112{padding:4px 0}._empty_uv8oc_117{padding:16px;text-align:center;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._container_1d335_2{display:flex;align-items:center;gap:8px;font-family:var(--font-code);font-size:11px;padding:4px 0}._propertyList_1d335_11{display:flex;flex-direction:column;gap:6px;padding:4px 0}._propertyRow_1d335_18{display:flex;align-items:flex-start;gap:8px;font-family:var(--font-code);font-size:11px}._propertyKey_1d335_26{min-width:88px;color:var(--text-secondary);font-weight:600}._oldValue_1d335_33{color:var(--diff-remove);text-decoration:line-through;opacity:.7}._arrow_1d335_39{color:var(--diff-update);font-size:10px}._newValue_1d335_44{color:var(--diff-add);font-weight:500;word-break:break-all}._onlyValue_1d335_50{color:var(--text-primary)}
@@ -1,6 +1,6 @@
1
- import{u as _,r as x,j as e}from"./index-FfT2oWAB.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",b="_unifiedView_uv8oc_40",w="_diffLine_uv8oc_46",L="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:b,diffLine:w,lineNum:L,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const o=n.split(`
1
+ import{u as _,r as x,j as e}from"./index-CjBiayQg.js";const N="_container_uv8oc_2",j="_header_uv8oc_10",v="_modeBtn_uv8oc_18",g="_modeBtnActive_uv8oc_33",w="_unifiedView_uv8oc_40",L="_diffLine_uv8oc_46",b="_lineNum_uv8oc_55",C="_lineContent_uv8oc_64",S="_lineAdded_uv8oc_68",V="_lineRemoved_uv8oc_73",B="_lineContext_uv8oc_78",$="_sideBySide_uv8oc_83",A="_sidePane_uv8oc_90",P="_sideLabel_uv8oc_100",R="_sideContent_uv8oc_112",D="_empty_uv8oc_117",s={container:N,header:j,modeBtn:v,modeBtnActive:g,unifiedView:w,diffLine:L,lineNum:b,lineContent:C,lineAdded:S,lineRemoved:V,lineContext:B,sideBySide:$,sidePane:A,sideLabel:P,sideContent:R,empty:D};function k(n,i){const l=n.split(`
2
2
  `),d=i.split(`
3
- `),a=[],f=Math.max(o.length,d.length);let t=0,l=0;for(;(t<o.length||l<d.length)&&(t<o.length&&l<d.length?o[t]===d[l]?(a.push({type:"context",content:o[t],lineNum:l+1}),t++,l++):(a.push({type:"removed",content:o[t],lineNum:t+1}),t++,t<o.length&&o[t]===d[l]?(a.push({type:"added",content:d[l],lineNum:l+1}),l++):l<d.length&&(a.push({type:"added",content:d[l],lineNum:l+1}),l++)):t<o.length?(a.push({type:"removed",content:o[t],lineNum:t+1}),t++):l<d.length&&(a.push({type:"added",content:d[l],lineNum:l+1}),l++),!(a.length>f*3)););return a}function O({before:n,after:i}){const{t:o}=_(),[d,a]=x.useState("unified"),f=typeof n=="string"?n:n!=null?JSON.stringify(n,null,2):"",t=typeof i=="string"?i:i!=null?JSON.stringify(i,null,2):"",l=x.useMemo(()=>k(f,t),[f,t]);if(!f&&!t)return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.empty,children:o("changelog.diff.empty","No diff available")})});if(!f&&t){const c=t.split(`
4
- `);return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.unifiedView,children:c.map((u,m)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineAdded}`,children:[e.jsx("span",{className:s.lineNum,children:m+1}),e.jsxs("span",{className:s.lineContent,children:["+ ",u]})]},m))})})}return e.jsxs("div",{className:s.container,children:[e.jsxs("div",{className:s.header,children:[e.jsx("button",{className:`${s.modeBtn} ${d==="unified"?s.modeBtnActive:""}`,onClick:()=>a("unified"),children:o("changelog.diff.unified","Unified")}),e.jsx("button",{className:`${s.modeBtn} ${d==="side-by-side"?s.modeBtnActive:""}`,onClick:()=>a("side-by-side"),children:o("changelog.diff.sideBySide","Side by Side")})]}),d==="unified"?e.jsx("div",{className:s.unifiedView,children:l.map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${c.type==="added"?s.lineAdded:c.type==="removed"?s.lineRemoved:s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:c.lineNum??""}),e.jsxs("span",{className:s.lineContent,children:[c.type==="added"?"+ ":c.type==="removed"?"- ":" ",c.content]})]},u))}):e.jsxs("div",{className:s.sideBySide,children:[e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:o("changelog.diff.before","Before")}),e.jsx("div",{className:s.sideContent,children:f.split(`
5
- `).map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:u+1}),e.jsx("span",{className:s.lineContent,children:c})]},u))})]}),e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:o("changelog.diff.after","After")}),e.jsx("div",{className:s.sideContent,children:t.split(`
6
- `).map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:u+1}),e.jsx("span",{className:s.lineContent,children:c})]},u))})]})]})]})}const z="_container_1obo2_2",J="_propertyList_1obo2_11",K="_propertyRow_1obo2_18",F="_propertyKey_1obo2_26",E="_oldValue_1obo2_32",G="_arrow_1obo2_38",I="_newValue_1obo2_43",r={container:z,propertyList:J,propertyRow:K,propertyKey:F,oldValue:E,arrow:G,newValue:I};function h(n){return typeof n=="object"&&n!==null}function M(n){return h(n)&&n.type==="props"}function U(n){return h(n)&&n.type==="value"}function p(n){return n==null?"nil":typeof n=="string"?`"${n}"`:typeof n=="object"?JSON.stringify(n):String(n)}function W({before:n,after:i}){if(M(i)){const a=Object.entries(i.changedProperties??{});return a.length===0?null:e.jsx("div",{className:r.propertyList,children:a.map(([f,t])=>e.jsxs("div",{className:r.propertyRow,children:[e.jsx("span",{className:r.propertyKey,children:f}),e.jsx("span",{className:r.oldValue,children:p(t.before)}),e.jsx("span",{className:r.arrow,children:"→"}),e.jsx("span",{className:r.newValue,children:p(t.after)})]},f))})}if(U(i)&&i.valueDiff)return e.jsxs("div",{className:r.container,children:[e.jsx("span",{className:r.oldValue,children:p(i.valueDiff.before)}),e.jsx("span",{className:r.arrow,children:"→"}),e.jsx("span",{className:r.newValue,children:p(i.valueDiff.after)})]});const o=n!=null,d=i!=null;return!o&&!d?null:o?d?e.jsxs("div",{className:r.container,children:[e.jsx("span",{className:r.oldValue,children:p(n)}),e.jsx("span",{className:r.arrow,children:"→"}),e.jsx("span",{className:r.newValue,children:p(i)})]}):e.jsx("div",{className:r.container,children:e.jsx("span",{className:r.oldValue,children:p(n)})}):e.jsx("div",{className:r.container,children:e.jsx("span",{className:r.newValue,children:p(i)})})}function q(n){return typeof n=="object"&&n!==null}function H(n){return q(n)&&n.type==="script"}function y(n){return n==null?"new":`${n} lines`}function T({change:n}){if(n.category==="script"){if(typeof n.before=="string"||typeof n.after=="string")return e.jsx(O,{before:n.before,after:n.after});if(H(n.after)){const i=n.after.scriptMeta;return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"var(--font-code)",fontSize:"11px",padding:"4px 0"},children:[e.jsx("span",{style:{color:"var(--text-secondary)"},children:y(i==null?void 0:i.beforeLines)}),e.jsx("span",{style:{color:"var(--text-muted)",fontSize:"10px"},children:"→"}),e.jsx("span",{style:{color:"var(--text-primary)",fontWeight:500},children:y(i==null?void 0:i.afterLines)})]})}}return n.category==="property"?e.jsx(W,{before:n.before,after:n.after}):n.details?e.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(n.details,null,2)}):e.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:n.target})}export{T as G};
3
+ `),a=[],f=Math.max(l.length,d.length);let t=0,r=0;for(;(t<l.length||r<d.length)&&(t<l.length&&r<d.length?l[t]===d[r]?(a.push({type:"context",content:l[t],lineNum:r+1}),t++,r++):(a.push({type:"removed",content:l[t],lineNum:t+1}),t++,t<l.length&&l[t]===d[r]?(a.push({type:"added",content:d[r],lineNum:r+1}),r++):r<d.length&&(a.push({type:"added",content:d[r],lineNum:r+1}),r++)):t<l.length?(a.push({type:"removed",content:l[t],lineNum:t+1}),t++):r<d.length&&(a.push({type:"added",content:d[r],lineNum:r+1}),r++),!(a.length>f*3)););return a}function O({before:n,after:i}){const{t:l}=_(),[d,a]=x.useState("unified"),f=typeof n=="string"?n:n!=null?JSON.stringify(n,null,2):"",t=typeof i=="string"?i:i!=null?JSON.stringify(i,null,2):"",r=x.useMemo(()=>k(f,t),[f,t]);if(!f&&!t)return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.empty,children:l("changelog.diff.empty","No diff available")})});if(!f&&t){const c=t.split(`
4
+ `);return e.jsx("div",{className:s.container,children:e.jsx("div",{className:s.unifiedView,children:c.map((u,m)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineAdded}`,children:[e.jsx("span",{className:s.lineNum,children:m+1}),e.jsxs("span",{className:s.lineContent,children:["+ ",u]})]},m))})})}return e.jsxs("div",{className:s.container,children:[e.jsxs("div",{className:s.header,children:[e.jsx("button",{className:`${s.modeBtn} ${d==="unified"?s.modeBtnActive:""}`,onClick:()=>a("unified"),children:l("changelog.diff.unified","Unified")}),e.jsx("button",{className:`${s.modeBtn} ${d==="side-by-side"?s.modeBtnActive:""}`,onClick:()=>a("side-by-side"),children:l("changelog.diff.sideBySide","Side by Side")})]}),d==="unified"?e.jsx("div",{className:s.unifiedView,children:r.map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${c.type==="added"?s.lineAdded:c.type==="removed"?s.lineRemoved:s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:c.lineNum??""}),e.jsxs("span",{className:s.lineContent,children:[c.type==="added"?"+ ":c.type==="removed"?"- ":" ",c.content]})]},u))}):e.jsxs("div",{className:s.sideBySide,children:[e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:l("changelog.diff.before","Before")}),e.jsx("div",{className:s.sideContent,children:f.split(`
5
+ `).map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:u+1}),e.jsx("span",{className:s.lineContent,children:c})]},u))})]}),e.jsxs("div",{className:s.sidePane,children:[e.jsx("div",{className:s.sideLabel,children:l("changelog.diff.after","After")}),e.jsx("div",{className:s.sideContent,children:t.split(`
6
+ `).map((c,u)=>e.jsxs("div",{className:`${s.diffLine} ${s.lineContext}`,children:[e.jsx("span",{className:s.lineNum,children:u+1}),e.jsx("span",{className:s.lineContent,children:c})]},u))})]})]})]})}const z="_container_1d335_2",J="_propertyList_1d335_11",K="_propertyRow_1d335_18",F="_propertyKey_1d335_26",E="_oldValue_1d335_33",G="_arrow_1d335_39",I="_newValue_1d335_44",o={container:z,propertyList:J,propertyRow:K,propertyKey:F,oldValue:E,arrow:G,newValue:I};function h(n){return typeof n=="object"&&n!==null}function M(n){return h(n)&&n.type==="props"}function U(n){return h(n)&&n.type==="value"}function p(n){return n==null?"nil":typeof n=="string"?`"${n}"`:typeof n=="object"?JSON.stringify(n):String(n)}function W({before:n,after:i}){if(M(i)){const a=Object.entries(i.changedProperties??{});return a.length===0?null:e.jsx("div",{className:o.propertyList,children:a.map(([f,t])=>e.jsxs("div",{className:o.propertyRow,children:[e.jsx("span",{className:o.propertyKey,children:f}),e.jsx("span",{className:o.oldValue,children:p(t.before)}),e.jsx("span",{className:o.arrow,children:"→"}),e.jsx("span",{className:o.newValue,children:p(t.after)})]},f))})}if(U(i)&&i.valueDiff)return e.jsxs("div",{className:o.container,children:[e.jsx("span",{className:o.oldValue,children:p(i.valueDiff.before)}),e.jsx("span",{className:o.arrow,children:"→"}),e.jsx("span",{className:o.newValue,children:p(i.valueDiff.after)})]});const l=n!=null,d=i!=null;return!l&&!d?null:l?d?e.jsxs("div",{className:o.container,children:[e.jsx("span",{className:o.oldValue,children:p(n)}),e.jsx("span",{className:o.arrow,children:"→"}),e.jsx("span",{className:o.newValue,children:p(i)})]}):e.jsx("div",{className:o.container,children:e.jsx("span",{className:o.oldValue,children:p(n)})}):e.jsx("div",{className:o.container,children:e.jsx("span",{className:o.newValue,children:p(i)})})}function q(n){return typeof n=="object"&&n!==null}function H(n){return q(n)&&n.type==="script"}function y(n){return n==null?"new":`${n} lines`}function T({change:n}){if(n.category==="script"){if(typeof n.before=="string"||typeof n.after=="string")return e.jsx(O,{before:n.before,after:n.after});if(H(n.after)){const i=n.after.scriptMeta;return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"var(--font-code)",fontSize:"11px",padding:"4px 0"},children:[e.jsx("span",{style:{color:"var(--text-secondary)"},children:y(i==null?void 0:i.beforeLines)}),e.jsx("span",{style:{color:"var(--text-muted)",fontSize:"10px"},children:"→"}),e.jsx("span",{style:{color:"var(--text-primary)",fontWeight:500},children:y(i==null?void 0:i.afterLines)})]})}}return n.category==="property"?e.jsx(W,{before:n.before,after:n.after}):n.details?e.jsx("pre",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-secondary)",margin:0,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:JSON.stringify(n.details,null,2)}):e.jsx("div",{style:{fontFamily:"var(--font-code)",fontSize:"11px",color:"var(--text-muted)"},children:n.target})}export{T as G};
@@ -1 +1 @@
1
- import{j as r,T as e}from"./index-FfT2oWAB.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
1
+ import{j as r,T as e}from"./index-CjBiayQg.js";function s({label:t,tooltip:o}){return r.jsx(e,{text:o,children:t})}export{s as I};
@@ -1 +1 @@
1
- import{j as t,u as P,r as v,d as G,l as L,a as M,D as F}from"./index-FfT2oWAB.js";import{I as V}from"./InfoLabel-B9KT3kfU.js";import{S as A}from"./StatusBadge-Bxe88ki2.js";import{T as U}from"./TooltipText-Baw38jOU.js";import{G as z}from"./GameChangeDetail-D1kE2L_v.js";import{u as O,f as X}from"./useLiveUptime-DhJz484L.js";const q="_page_1xgxh_2",J="_card_1xgxh_10",K="_cardHeader_1xgxh_17",Q="_disconnectCard_1xgxh_28",W="_disconnectIcon_1xgxh_36",Y="_disconnectTitle_1xgxh_41",Z="_disconnectMessage_1xgxh_48",ee="_reconnectGuide_1xgxh_55",te="_guideStep_1xgxh_64",se="_stepNumber_1xgxh_72",ne="_reconnectIndicator_1xgxh_88",ie="_reconnectDot_1xgxh_98",ce="_pulse_1xgxh_1",re="_disconnectActions_1xgxh_112",ae="_btn_1xgxh_118",oe="_btnSecondary_1xgxh_134",le="_metricRow_1xgxh_152",de="_metricGrid_1xgxh_158",me="_metricCard_1xgxh_164",ge="_metric_ok_1xgxh_174",he="_metric_warn_1xgxh_179",xe="_metric_error_1xgxh_184",ue="_metricHeader_1xgxh_189",ve="_metricIcon_1xgxh_200",_e="_metricTitle_1xgxh_204",pe="_metricValue_1xgxh_208",fe="_metricSubtitle_1xgxh_215",Ce="_guideCard_1xgxh_225",je="_guideTitle_1xgxh_232",we="_checklist_1xgxh_239",Ne="_feedEmpty_1xgxh_263",ye="_feedList_1xgxh_270",Te="_feedItem_1xgxh_278",Se="_feedTime_1xgxh_291",Ie="_feedIcon_1xgxh_298",be="_feedSummary_1xgxh_304",ke="_feedText_1xgxh_313",Me="_feedContext_1xgxh_321",De="_feedItemClickable_1xgxh_330",Be="_feedChevron_1xgxh_338",Ee="_feedDetail_1xgxh_347",He="_feedDetailPre_1xgxh_356",$e="_feedDetailText_1xgxh_365",Pe="_changelogSummary_1xgxh_372",Re="_changeTag_1xgxh_381",Ge="_tierBar_1xgxh_393",Le="_tierBarTrack_1xgxh_399",Fe="_tierBarFillBasic_1xgxh_407",Ve="_tierBarFillPro_1xgxh_412",Ae="_tierLabels_1xgxh_417",s={page:q,card:J,cardHeader:K,disconnectCard:Q,disconnectIcon:W,disconnectTitle:Y,disconnectMessage:Z,reconnectGuide:ee,guideStep:te,stepNumber:se,reconnectIndicator:ne,reconnectDot:ie,pulse:ce,disconnectActions:re,btn:ae,btnSecondary:oe,metricRow:le,metricGrid:de,metricCard:me,metric_ok:ge,metric_warn:he,metric_error:xe,metricHeader:ue,metricIcon:ve,metricTitle:_e,metricValue:pe,metricSubtitle:fe,guideCard:Ce,guideTitle:je,checklist:we,feedEmpty:Ne,feedList:ye,feedItem:Te,feedTime:Se,feedIcon:Ie,feedSummary:be,feedText:ke,feedContext:Me,feedItemClickable:De,feedChevron:Be,feedDetail:Ee,feedDetailPre:He,feedDetailText:$e,changelogSummary:Pe,changeTag:Re,tierBar:Ge,tierBarTrack:Le,tierBarFillBasic:Fe,tierBarFillPro:Ve,tierLabels:Ae};function j({title:e,value:i,icon:c,subtitle:r,status:o,children:n}){const l=o?s[`metric_${o}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${l}`,children:[t.jsxs("div",{className:s.metricHeader,children:[c&&t.jsx("span",{className:s.metricIcon,children:c}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function Ue(e){var c,r;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((r=(c=i==null?void 0:i.affectedAreas)==null?void 0:c[0])==null?void 0:r.label)??(i==null?void 0:i.testScenario)??null}function B({changes:e}){const{t:i}=P(),[c,r]=v.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((o,n)=>{const l=c===n,h=o.raw,m=h&&(h.before!=null||h.after!=null||h.details!=null),d=Ue(h);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${m?s.feedItemClickable:""}`,onClick:()=>m&&r(l?null:n),children:[t.jsx("span",{className:s.feedTime,children:o.timestamp}),t.jsx("span",{className:s.feedIcon,children:o.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:o.summary}),d&&t.jsx("span",{className:s.feedContext,children:d})]}),m&&t.jsx("span",{className:s.feedChevron,children:l?"▴":"▾"})]}),l&&h&&t.jsx("div",{className:s.feedDetail,children:t.jsx(z,{change:h})})]},n)})})}const E=20;function R(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return R(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function ze(){const{level:e,status:i}=G(),c=L(),[r,o]=v.useState(null),[n,l]=v.useState(null),[h,m]=v.useState(null),[d,w]=v.useState([]),N=v.useRef(null),S=v.useCallback(async()=>{try{const a=await M.get("/connection-info");o(a)}catch{o(null)}},[]),_=v.useCallback(async()=>{try{const a=await M.get("/api/dashboard/changelog/active");if(m(a),a.recentChanges&&a.recentChanges.length>0){const f=a.recentChanges.map(x=>({timestamp:x.timestamp?R(new Date(x.timestamp)):H(),icon:$(x.category),summary:x.summary,category:x.category,raw:x}));w(f)}}catch{m(null)}},[]),y=v.useCallback(async()=>{try{const a=await M.get("/sync/status");l(a)}catch{l(null)}},[]);return v.useEffect(()=>{e!=="disconnected"?(S(),_(),y()):(o(null),l(null),m(null));const a=new F;N.current=a,a.connect();const f=a.on("game_change",p=>{const u=p,T={timestamp:H(),icon:$(u.category),summary:u.summary,category:u.category};w(I=>{const C=[T,...I];return C.length>E?C.slice(0,E):C}),_()}),x=a.on("sync",p=>{const u=p;l(T=>({...T,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{f(),x(),a.disconnect(),N.current=null}},[e,S,_,y]),{level:e,status:i,connectionInfo:r,syncStatus:n,changeSummary:h,recentChanges:d,tier:c}}function D(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Oe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Xe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function k(e,i,c,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:i,tooltip:c}),": ",r]},i)}function g(e,i){return t.jsx(U,{text:i,children:e})}function Ze(){var I,C;const{t:e}=P(),{level:i,status:c,connectionInfo:r,syncStatus:o,changeSummary:n,recentChanges:l}=ze(),h=O(c==null?void 0:c.uptime);if(i==="disconnected")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const m=(r==null?void 0:r.mcpInstanceCount)??0,d=((I=r==null?void 0:r.mcpInstances)==null?void 0:I.find(b=>!b.isServer&&b.aiClientName))??((C=r==null?void 0:r.mcpInstances)==null?void 0:C.find(b=>!!b.aiClientName))??null,w=(c==null?void 0:c.pluginClients)??[],N=w.length>0,S=(c==null?void 0:c.sessionId)??(r==null?void 0:r.sessionId)??"-",_=e("overview.metric.server.tooltip","MCP server runtime and process status"),y=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),a=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),f=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),x=c?[k(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${c.version}`),k(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),k(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(c.pid??"-")),k(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),X(h??c.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[x,t.jsx(A,{status:"online"})]})}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),l.length>0?t.jsx(B,{changes:l}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",D(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const p=w[0],u=n?D(n):0,T=!!n&&u>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:x})}),t.jsx(j,{title:g(e("overview.metric.plugin"),y),value:g(e(N?"status.online":"status.offline"),y),icon:"🔌",subtitle:p?`${p.placeName??p.projectName??"-"} / v${p.pluginVersion??"-"}`:void 0,status:N?"ok":"error"}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"}),t.jsx(j,{title:g(e("overview.metric.sync"),f),value:g(Oe(o==null?void 0:o.state,e),f),icon:"🔄",status:Xe(o==null?void 0:o.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(B,{changes:l})]}),T&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",u]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]})}export{Ze as Component};
1
+ import{j as t,u as P,r as v,d as G,l as L,a as M,D as F}from"./index-CjBiayQg.js";import{I as V}from"./InfoLabel-BDieYXVe.js";import{S as A}from"./StatusBadge-MxsMOCZ3.js";import{T as U}from"./TooltipText-DgxJjq91.js";import{G as z}from"./GameChangeDetail-MfVogSqQ.js";import{u as O,f as X}from"./useLiveUptime-s_CjVcUM.js";const q="_page_1xgxh_2",J="_card_1xgxh_10",K="_cardHeader_1xgxh_17",Q="_disconnectCard_1xgxh_28",W="_disconnectIcon_1xgxh_36",Y="_disconnectTitle_1xgxh_41",Z="_disconnectMessage_1xgxh_48",ee="_reconnectGuide_1xgxh_55",te="_guideStep_1xgxh_64",se="_stepNumber_1xgxh_72",ne="_reconnectIndicator_1xgxh_88",ie="_reconnectDot_1xgxh_98",ce="_pulse_1xgxh_1",re="_disconnectActions_1xgxh_112",ae="_btn_1xgxh_118",oe="_btnSecondary_1xgxh_134",le="_metricRow_1xgxh_152",de="_metricGrid_1xgxh_158",me="_metricCard_1xgxh_164",ge="_metric_ok_1xgxh_174",he="_metric_warn_1xgxh_179",xe="_metric_error_1xgxh_184",ue="_metricHeader_1xgxh_189",ve="_metricIcon_1xgxh_200",_e="_metricTitle_1xgxh_204",pe="_metricValue_1xgxh_208",fe="_metricSubtitle_1xgxh_215",Ce="_guideCard_1xgxh_225",je="_guideTitle_1xgxh_232",we="_checklist_1xgxh_239",Ne="_feedEmpty_1xgxh_263",ye="_feedList_1xgxh_270",Te="_feedItem_1xgxh_278",Se="_feedTime_1xgxh_291",Ie="_feedIcon_1xgxh_298",be="_feedSummary_1xgxh_304",ke="_feedText_1xgxh_313",Me="_feedContext_1xgxh_321",De="_feedItemClickable_1xgxh_330",Be="_feedChevron_1xgxh_338",Ee="_feedDetail_1xgxh_347",He="_feedDetailPre_1xgxh_356",$e="_feedDetailText_1xgxh_365",Pe="_changelogSummary_1xgxh_372",Re="_changeTag_1xgxh_381",Ge="_tierBar_1xgxh_393",Le="_tierBarTrack_1xgxh_399",Fe="_tierBarFillBasic_1xgxh_407",Ve="_tierBarFillPro_1xgxh_412",Ae="_tierLabels_1xgxh_417",s={page:q,card:J,cardHeader:K,disconnectCard:Q,disconnectIcon:W,disconnectTitle:Y,disconnectMessage:Z,reconnectGuide:ee,guideStep:te,stepNumber:se,reconnectIndicator:ne,reconnectDot:ie,pulse:ce,disconnectActions:re,btn:ae,btnSecondary:oe,metricRow:le,metricGrid:de,metricCard:me,metric_ok:ge,metric_warn:he,metric_error:xe,metricHeader:ue,metricIcon:ve,metricTitle:_e,metricValue:pe,metricSubtitle:fe,guideCard:Ce,guideTitle:je,checklist:we,feedEmpty:Ne,feedList:ye,feedItem:Te,feedTime:Se,feedIcon:Ie,feedSummary:be,feedText:ke,feedContext:Me,feedItemClickable:De,feedChevron:Be,feedDetail:Ee,feedDetailPre:He,feedDetailText:$e,changelogSummary:Pe,changeTag:Re,tierBar:Ge,tierBarTrack:Le,tierBarFillBasic:Fe,tierBarFillPro:Ve,tierLabels:Ae};function j({title:e,value:i,icon:c,subtitle:r,status:o,children:n}){const l=o?s[`metric_${o}`]:"";return t.jsxs("div",{className:`${s.metricCard} ${l}`,children:[t.jsxs("div",{className:s.metricHeader,children:[c&&t.jsx("span",{className:s.metricIcon,children:c}),t.jsx("span",{className:s.metricTitle,children:e})]}),t.jsx("div",{className:s.metricValue,children:i}),r&&t.jsx("div",{className:s.metricSubtitle,children:r}),n]})}function Ue(e){var c,r;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((r=(c=i==null?void 0:i.affectedAreas)==null?void 0:c[0])==null?void 0:r.label)??(i==null?void 0:i.testScenario)??null}function B({changes:e}){const{t:i}=P(),[c,r]=v.useState(null);return e.length===0?t.jsx("div",{className:s.feedEmpty,children:i("overview.feed.empty")}):t.jsx("div",{className:s.feedList,children:e.map((o,n)=>{const l=c===n,h=o.raw,m=h&&(h.before!=null||h.after!=null||h.details!=null),d=Ue(h);return t.jsxs("div",{children:[t.jsxs("div",{className:`${s.feedItem} ${m?s.feedItemClickable:""}`,onClick:()=>m&&r(l?null:n),children:[t.jsx("span",{className:s.feedTime,children:o.timestamp}),t.jsx("span",{className:s.feedIcon,children:o.icon}),t.jsxs("span",{className:s.feedText,children:[t.jsx("span",{className:s.feedSummary,children:o.summary}),d&&t.jsx("span",{className:s.feedContext,children:d})]}),m&&t.jsx("span",{className:s.feedChevron,children:l?"▴":"▾"})]}),l&&h&&t.jsx("div",{className:s.feedDetail,children:t.jsx(z,{change:h})})]},n)})})}const E=20;function R(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function H(){return R(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function ze(){const{level:e,status:i}=G(),c=L(),[r,o]=v.useState(null),[n,l]=v.useState(null),[h,m]=v.useState(null),[d,w]=v.useState([]),N=v.useRef(null),S=v.useCallback(async()=>{try{const a=await M.get("/connection-info");o(a)}catch{o(null)}},[]),_=v.useCallback(async()=>{try{const a=await M.get("/api/dashboard/changelog/active");if(m(a),a.recentChanges&&a.recentChanges.length>0){const f=a.recentChanges.map(x=>({timestamp:x.timestamp?R(new Date(x.timestamp)):H(),icon:$(x.category),summary:x.summary,category:x.category,raw:x}));w(f)}}catch{m(null)}},[]),y=v.useCallback(async()=>{try{const a=await M.get("/sync/status");l(a)}catch{l(null)}},[]);return v.useEffect(()=>{e!=="disconnected"?(S(),_(),y()):(o(null),l(null),m(null));const a=new F;N.current=a,a.connect();const f=a.on("game_change",p=>{const u=p,T={timestamp:H(),icon:$(u.category),summary:u.summary,category:u.category};w(I=>{const C=[T,...I];return C.length>E?C.slice(0,E):C}),_()}),x=a.on("sync",p=>{const u=p;l(T=>({...T,state:u.status,...u.placeId?{placeId:u.placeId}:{}}))});return()=>{f(),x(),a.disconnect(),N.current=null}},[e,S,_,y]),{level:e,status:i,connectionInfo:r,syncStatus:n,changeSummary:h,recentChanges:d,tier:c}}function D(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function Oe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Xe(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function k(e,i,c,r){return t.jsxs("div",{className:e.metricSubtitle,children:[t.jsx(V,{label:i,tooltip:c}),": ",r]},i)}function g(e,i){return t.jsx(U,{text:i,children:e})}function Ze(){var I,C;const{t:e}=P(),{level:i,status:c,connectionInfo:r,syncStatus:o,changeSummary:n,recentChanges:l}=ze(),h=O(c==null?void 0:c.uptime);if(i==="disconnected")return t.jsx("div",{className:s.page,children:t.jsxs("div",{className:s.disconnectCard,children:[t.jsx("div",{className:s.disconnectIcon,children:"⚠️"}),t.jsx("h2",{className:s.disconnectTitle,children:e("overview.l0.title")}),t.jsx("p",{className:s.disconnectMessage,children:e("overview.l0.message")}),t.jsxs("div",{className:s.reconnectGuide,children:[t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"1"}),t.jsx("span",{children:e("overview.l0.step1")})]}),t.jsxs("div",{className:s.guideStep,children:[t.jsx("span",{className:s.stepNumber,children:"2"}),t.jsx("span",{children:e("overview.l0.step2")})]})]}),t.jsxs("div",{className:s.reconnectIndicator,children:[t.jsx("span",{className:s.reconnectDot}),e("overview.l0.reconnecting")]}),t.jsxs("div",{className:s.disconnectActions,children:[t.jsx("button",{className:s.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),t.jsx("button",{className:s.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})});const m=(r==null?void 0:r.mcpInstanceCount)??0,d=((I=r==null?void 0:r.mcpInstances)==null?void 0:I.find(b=>!b.isServer&&b.aiClientName))??((C=r==null?void 0:r.mcpInstances)==null?void 0:C.find(b=>!!b.aiClientName))??null,w=(c==null?void 0:c.pluginClients)??[],N=w.length>0,S=(c==null?void 0:c.sessionId)??(r==null?void 0:r.sessionId)??"-",_=e("overview.metric.server.tooltip","MCP server runtime and process status"),y=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),a=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),f=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),x=c?[k(s,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${c.version}`),k(s,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),k(s,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(c.pid??"-")),k(s,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),X(h??c.uptime))]:[];if(i==="serverOnly")return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricRow,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsxs(t.Fragment,{children:[x,t.jsx(A,{status:"online"})]})}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"})]}),t.jsxs("div",{className:s.guideCard,children:[t.jsx("h3",{className:s.guideTitle,children:e("overview.l1.pluginGuide")}),t.jsxs("ul",{className:s.checklist,children:[t.jsx("li",{children:e("overview.l1.check1")}),t.jsx("li",{children:e("overview.l1.check2")})]})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),l.length>0?t.jsx(B,{changes:l}):t.jsx("div",{className:s.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(n)>0&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",D(n)]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const p=w[0],u=n?D(n):0,T=!!n&&u>0;return t.jsxs("div",{className:s.page,children:[t.jsxs("div",{className:s.metricGrid,children:[t.jsx(j,{title:g(e("overview.metric.server"),_),value:g(e("status.online"),_),icon:"🖥️",status:"ok",children:t.jsx(t.Fragment,{children:x})}),t.jsx(j,{title:g(e("overview.metric.plugin"),y),value:g(e(N?"status.online":"status.offline"),y),icon:"🔌",subtitle:p?`${p.placeName??p.projectName??"-"} / v${p.pluginVersion??"-"}`:void 0,status:N?"ok":"error"}),t.jsx(j,{title:g(e("overview.metric.agent"),a),value:g((d==null?void 0:d.aiClientName)??e("overview.metric.noAgent"),a),icon:"🤖",subtitle:m>1?`${m} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:d?"ok":"warn"}),t.jsx(j,{title:g(e("overview.metric.sync"),f),value:g(Oe(o==null?void 0:o.state,e),f),icon:"🔄",status:Xe(o==null?void 0:o.state)})]}),t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.feed.title")}),t.jsx(B,{changes:l})]}),T&&t.jsxs("div",{className:s.card,children:[t.jsx("div",{className:s.cardHeader,children:e("overview.changelog.title")}),t.jsxs("div",{className:s.changelogSummary,children:[t.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",u]}),n.scriptsModified>0&&t.jsxs("span",{className:s.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&t.jsxs("span",{className:s.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&t.jsxs("span",{className:s.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&t.jsxs("span",{className:s.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]})}export{Ze as Component};
@@ -0,0 +1,11 @@
1
+ import{r as n,a as f,u as b,j as e,i as A,l as H,m as D,p as E}from"./index-CjBiayQg.js";import{D as U,T as $}from"./TierComparison-DvuMctLJ.js";import{I}from"./InfoLabel-BDieYXVe.js";import{T as _}from"./TooltipText-DgxJjq91.js";import{C as O}from"./ConfirmModal-Dak7jVJo.js";const F=5e3;function W(t){const r=(t==null?void 0:t.enabled)??!0,[p,o]=n.useState([]),[a,l]=n.useState(null),[d,i]=n.useState(r),c=n.useRef(null),h=n.useCallback(async()=>{try{const x=await f.get("/api/dashboard/playtest/history");o(x.entries??[])}catch{}},[]),m=n.useCallback(async()=>{if(!r){i(!1);return}await h(),i(!1)},[r,h]),y=n.useCallback(async()=>{r&&(await f.post("/api/dashboard/playtest/history/clear"),o([]),l(null))},[r]),g=n.useCallback(async x=>{if(r)try{const v=await f.get(`/api/dashboard/playtest/report/${x}`);l(v)}catch{l(null)}},[r]);return n.useEffect(()=>{if(!r){i(!1);return}return m(),c.current=setInterval(m,F),()=>{c.current&&clearInterval(c.current)}},[r,m]),{history:p,selectedReport:a,loading:d,loadReport:g,clearHistory:y}}function V(t){const r="2026-03-27T15:26:00.000Z",p={testScenario:t("playtest.sample.context.why","Spawn into the arena, survive the opener, and verify the HUD responds immediately."),expectedBehavior:t("playtest.sample.context.expected","The player spawns safely, the countdown UI appears within one second, and the first wave starts without errors."),observedBehavior:t("playtest.sample.context.observed","Spawn protection held, the HUD updated on time, and wave one completed with no gameplay regressions.")};return{history:[{timestamp:r,testName:t("playtest.sample.history.name","Sample Arena Smoke Test"),mode:"play",status:"passed",durationMs:4820,contextId:"sample_playtest_preview",contextSummary:p}],report:{markdown:t("playtest.sample.report.markdown",`# Sample Arena Smoke Test
2
+
3
+ - Spawn flow: PASS
4
+ - HUD countdown: PASS
5
+ - Wave bootstrap: PASS
6
+
7
+ This is a sample preview. Upgrade to Pro to save and review real automated playtest reports.`),logs:t("playtest.sample.report.logs",`[sample] boot playtest preview
8
+ [sample] spawn protection active
9
+ [sample] hud countdown rendered
10
+ [sample] wave one completed
11
+ [sample] preview report finished`),contextId:"sample_playtest_preview",contextSummary:p}}}const Y="_page_3lq3l_2",z="_sampleBanner_3lq3l_9",G="_sampleBannerRow_3lq3l_21",Z="_sampleBannerMain_3lq3l_28",J="_sampleBadge_3lq3l_35",K="_sampleTitle_3lq3l_50",Q="_sampleMessage_3lq3l_57",X="_sampleActions_3lq3l_64",ee="_primaryAction_3lq3l_72",te="_secondaryAction_3lq3l_73",se="_card_3lq3l_109",ae="_cardHeader_3lq3l_116",re="_clearButton_3lq3l_128",oe="_statusRow_3lq3l_143",ne="_statusIndicator_3lq3l_150",le="_statusRunning_3lq3l_158",ie="_statusPaused_3lq3l_163",ce="_statusNotRunning_3lq3l_167",pe="_statusLabel_3lq3l_171",de="_statusMeta_3lq3l_178",me="_controlButtons_3lq3l_184",ue="_btn_3lq3l_191",he="_btnPrimary_3lq3l_213",ye="_btnDanger_3lq3l_223",_e="_historyList_3lq3l_233",xe="_historyItem_3lq3l_241",ge="_historyItemSelected_3lq3l_260",ve="_historyItemHeader_3lq3l_265",Se="_historyIcon_3lq3l_271",fe="_historyTimestamp_3lq3l_276",be="_historyName_3lq3l_283",je="_historyItemMeta_3lq3l_293",Ne="_historyMode_3lq3l_302",Ce="_historyDuration_3lq3l_306",we="_historyStatus_3lq3l_310",qe="_status_passed_3lq3l_317",Le="_status_failed_3lq3l_321",Ie="_status_running_3lq3l_325",Pe="_historyError_3lq3l_329",Re="_historyContext_3lq3l_339",Be="_historyContextLine_3lq3l_348",Te="_historyContextLabel_3lq3l_354",Me="_reportContainer_3lq3l_363",ke="_reportContextPanel_3lq3l_369",Ae="_reportContextRow_3lq3l_379",He="_reportContextLabel_3lq3l_387",De="_reportSection_3lq3l_395",Ee="_reportSectionHeader_3lq3l_401",Ue="_reportMarkdown_3lq3l_413",$e="_reportLogs_3lq3l_426",Oe="_emptyState_3lq3l_441",Fe="_emptyStateTitle_3lq3l_448",We="_emptyStateMessage_3lq3l_456",Ve="_upgradePanel_3lq3l_465",Ye="_upgradePanelIcon_3lq3l_473",ze="_upgradePanelTitle_3lq3l_478",Ge="_upgradePanelDesc_3lq3l_486",Ze="_benefitList_3lq3l_496",Je="_benefitItem_3lq3l_507",Ke="_upgradeActions_3lq3l_522",s={page:Y,sampleBanner:z,sampleBannerRow:G,sampleBannerMain:Z,sampleBadge:J,sampleTitle:K,sampleMessage:Q,sampleActions:X,primaryAction:ee,secondaryAction:te,card:se,cardHeader:ae,clearButton:re,statusRow:oe,statusIndicator:ne,statusRunning:le,statusPaused:ie,statusNotRunning:ce,statusLabel:pe,statusMeta:de,controlButtons:me,btn:ue,btnPrimary:he,btnDanger:ye,historyList:_e,historyItem:xe,historyItemSelected:ge,historyItemHeader:ve,historyIcon:Se,historyTimestamp:fe,historyName:be,historyItemMeta:je,historyMode:Ne,historyDuration:Ce,historyStatus:we,status_passed:qe,status_failed:Le,status_running:Ie,historyError:Pe,historyContext:Re,historyContextLine:Be,historyContextLabel:Te,reportContainer:Me,reportContextPanel:ke,reportContextRow:Ae,reportContextLabel:He,reportSection:De,reportSectionHeader:Ee,reportMarkdown:Ue,reportLogs:$e,emptyState:Oe,emptyStateTitle:Fe,emptyStateMessage:We,upgradePanel:Ve,upgradePanelIcon:Ye,upgradePanelTitle:ze,upgradePanelDesc:Ge,benefitList:Ze,benefitItem:Je,upgradeActions:Ke};function S(t){return t.trim().toLowerCase()}function Qe(t){switch(S(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Xe(t,r){switch(S(r)){case"run":return t("playtest.status.mode.run","Run");case"server":return t("playtest.status.mode.server","Server");case"edit":return t("playtest.status.mode.edit","Edit");case"play":return t("playtest.status.mode.play","Play");default:return r}}function et(t,r){switch(S(r)){case"passed":return t("playtest.history.status.passed","Passed");case"failed":return t("playtest.history.status.failed","Failed");case"running":return t("playtest.history.status.running","Running");default:return t("playtest.history.status.unknown","Unknown")}}function tt(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function st({entries:t,onSelect:r,selectedTimestamp:p}){const{t:o}=b();return t.length===0?e.jsx("div",{className:s.emptyState,children:o("playtest.history.empty","No test results yet")}):e.jsx("div",{className:s.historyList,children:t.map(a=>{var d,i,c,h,m,y;const l=a.timestamp===p;return e.jsxs("button",{className:`${s.historyItem} ${l?s.historyItemSelected:""}`,onClick:()=>r(a.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Qe(a.status)}),e.jsx("span",{className:s.historyTimestamp,children:a.timestamp}),e.jsx("span",{className:s.historyName,children:a.testName})]}),e.jsxs("div",{className:s.historyItemMeta,children:[e.jsx(_,{text:o("playtest.history.mode.tooltip","Playtest mode used for this recorded test run."),children:e.jsxs("span",{className:s.historyMode,children:[o("playtest.history.mode","Mode"),": ",Xe(o,a.mode)]})}),e.jsx("span",{className:s.historyDuration,children:tt(a.durationMs)}),e.jsx(_,{text:o("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${S(a.status)}`]??""}`,children:et(o,a.status)})})]}),a.errorMessage&&e.jsx("div",{className:s.historyError,children:a.errorMessage}),(a.contextId||((d=a.contextSummary)==null?void 0:d.testScenario)||((i=a.contextSummary)==null?void 0:i.expectedBehavior)||((c=a.contextSummary)==null?void 0:c.observedBehavior))&&e.jsxs("div",{className:s.historyContext,children:[a.contextId&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:o("playtest.context.contextId","Context ID")}),e.jsx("span",{children:a.contextId})]}),((h=a.contextSummary)==null?void 0:h.testScenario)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:o("playtest.context.why","Why this test ran")}),e.jsx("span",{children:a.contextSummary.testScenario})]}),((m=a.contextSummary)==null?void 0:m.expectedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:o("playtest.context.expected","Expected")}),e.jsx("span",{children:a.contextSummary.expectedBehavior})]}),((y=a.contextSummary)==null?void 0:y.observedBehavior)&&e.jsxs("div",{className:s.historyContextLine,children:[e.jsx("span",{className:s.historyContextLabel,children:o("playtest.context.observed","Observed")}),e.jsx("span",{children:a.contextSummary.observedBehavior})]})]})]},a.timestamp)})})}function at({report:t}){var o,a,l,d,i,c;const{t:r}=b(),p=!!((o=t.contextSummary)!=null&&o.testScenario||(a=t.contextSummary)!=null&&a.expectedBehavior||(l=t.contextSummary)!=null&&l.observedBehavior);return e.jsxs("div",{className:s.reportContainer,children:[p&&e.jsxs("div",{className:s.reportContextPanel,children:[((d=t.contextSummary)==null?void 0:d.testScenario)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:r("playtest.context.why","Why this test ran")}),e.jsx("span",{children:t.contextSummary.testScenario})]}),((i=t.contextSummary)==null?void 0:i.expectedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:r("playtest.context.expected","Expected")}),e.jsx("span",{children:t.contextSummary.expectedBehavior})]}),((c=t.contextSummary)==null?void 0:c.observedBehavior)&&e.jsxs("div",{className:s.reportContextRow,children:[e.jsx("span",{className:s.reportContextLabel,children:r("playtest.context.observed","Observed")}),e.jsx("span",{children:t.contextSummary.observedBehavior})]})]}),t.markdown&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(_,{text:r("playtest.report.content.tooltip","Markdown summary for the selected automated playtest run."),children:e.jsx("span",{children:r("playtest.report.content","Report")})})}),e.jsx("pre",{className:s.reportMarkdown,children:t.markdown})]}),t.logs&&e.jsxs("div",{className:s.reportSection,children:[e.jsx("div",{className:s.reportSectionHeader,children:e.jsx(_,{text:r("playtest.report.logs.tooltip","Execution logs captured for the selected automated playtest run."),children:e.jsx("span",{children:r("playtest.report.logs","Logs")})})}),e.jsx("pre",{className:s.reportLogs,children:t.logs})]}),!t.markdown&&!t.logs&&e.jsx("div",{className:s.emptyState,children:r("playtest.report.empty","No report content available")})]})}function ct(){var q;const{t}=b(),{trackEvent:r}=A(),{tier:p,loading:o}=H(),a=!o&&p==="basic",l=W({enabled:!a}),{show:d}=D(),[i,c]=n.useState(null),[h,m]=n.useState(!1),[y,g]=n.useState(!1),[x,v]=n.useState(!1),{history:P,selectedReport:R,loading:B}=l,u=a?V(t):null,j=((q=u==null?void 0:u.history[0])==null?void 0:q.timestamp)??null,N=a?i??j:i,C=(u==null?void 0:u.history)??P,w=u&&N===j?u.report:R,T=a?!1:B,M=L=>{c(L),!a&&l.loadReport(L)},k=async()=>{g(!0);try{await l.clearHistory(),d(t("toast.clearSuccess","Cleared successfully"),"success"),m(!1),c(null)}catch{d(t("toast.clearFailed","Failed to clear data"),"error")}finally{g(!1)}};return e.jsxs("div",{className:s.page,children:[a&&e.jsxs("div",{className:s.sampleBanner,children:[e.jsxs("div",{className:s.sampleBannerRow,children:[e.jsxs("div",{className:s.sampleBannerMain,children:[e.jsx("div",{className:s.sampleBadge,children:t("playtest.sample.badge","Preview of the Pro playtest view")}),e.jsx("div",{className:s.sampleTitle,children:t("playtest.sample.title","You are previewing the report viewer that becomes available after upgrading to Pro.")}),e.jsx("div",{className:s.sampleMessage,children:t("playtest.sample.message","This preview uses sample data. Real playtest history management and stored reports unlock with Pro.")})]}),e.jsxs("div",{className:s.sampleActions,children:[e.jsx("button",{className:s.secondaryAction,onClick:()=>{r("dashboard_click_event",{click_target:"tier_compare",placement:"playtest_sample_banner",page:"playtest"}),v(!0)},children:t("tier.compare","Basic vs Pro")}),e.jsx("a",{className:s.primaryAction,href:E.playtest,target:"_blank",rel:"noreferrer",onClick:()=>r("dashboard_click_event",{click_target:"upgrade_cta",placement:"playtest_sample_banner",page:"playtest"}),children:t("tier.upgrade","Upgrade to Pro")})]})]}),e.jsx(U,{variant:"centered"})]}),e.jsxs("div",{className:s.card,children:[e.jsxs("div",{className:s.cardHeader,children:[e.jsx(I,{label:t("playtest.history.title","Test History"),tooltip:t("playtest.history.title.tooltip","Recorded automated playtest runs for this project.")}),a?e.jsx(_,{text:t("playtest.sample.clearDisabled","Upgrade to Pro to clear live playtest history."),children:e.jsx("span",{children:e.jsx("button",{className:s.clearButton,disabled:!0,children:t("common.clear","Clear")})})}):e.jsx("button",{className:s.clearButton,onClick:()=>{r("dashboard_click_event",{click_target:"playtest_clear_history",page:"playtest"}),m(!0)},children:t("common.clear","Clear")})]}),T?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):C.length===0?e.jsxs("div",{className:s.emptyState,children:[e.jsx("div",{className:s.emptyStateTitle,children:t("playtest.empty.title","No playtest results yet")}),e.jsxs("div",{className:s.emptyStateMessage,children:[t("playtest.empty.message.before","Test results will appear here when the AI agent runs automated tests via")," ",e.jsx(_,{text:t("playtest.empty.runTest.tooltip","WEPPY Dashboard automation entry point that runs Roblox playtest checks through the system_info tool."),children:e.jsx("span",{children:"system_info.run_test"})}),t("playtest.empty.message.after",".")]})]}):e.jsx(st,{entries:C,onSelect:M,selectedTimestamp:N??void 0})]}),w&&e.jsxs("div",{className:s.card,children:[e.jsx("div",{className:s.cardHeader,children:e.jsx(I,{label:t("playtest.report.title","Selected Report"),tooltip:t("playtest.report.title.tooltip","Detailed output for the currently selected automated playtest run.")})}),e.jsx(at,{report:w})]}),!a&&e.jsx(O,{open:h,title:t("playtest.clear.title","Clear test history?"),message:t("playtest.clear.message","This permanently removes the stored playtest reports for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:y,onCancel:()=>!y&&m(!1),onConfirm:k}),x&&e.jsx($,{onClose:()=>v(!1)})]})}export{ct as Component};
@@ -0,0 +1 @@
1
+ ._page_3lq3l_2{display:flex;flex-direction:column;gap:16px;max-width:900px}._sampleBanner_3lq3l_9{display:flex;flex-direction:column;gap:12px;padding:18px 20px;border:1px solid var(--pro-border);border-radius:var(--radius);background:linear-gradient(135deg,#f0bd5829,#f0bd5808 55%),var(--bg-card)}._sampleBannerRow_3lq3l_21{display:flex;align-items:center;justify-content:space-between;gap:20px}._sampleBannerMain_3lq3l_28{display:flex;flex-direction:column;gap:8px;min-width:0}._sampleBadge_3lq3l_35{width:fit-content;padding:0;border-radius:0;background:none;border:none;color:var(--pro-text);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:none;opacity:.92}._sampleTitle_3lq3l_50{font-family:var(--font-label);font-size:16px;font-weight:600;color:var(--text-primary)}._sampleMessage_3lq3l_57{max-width:560px;color:var(--text-secondary);font-size:13px;line-height:1.5}._sampleActions_3lq3l_64{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._primaryAction_3lq3l_72,._secondaryAction_3lq3l_73{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border-radius:8px;font-family:var(--font-label);font-size:12px;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._secondaryAction_3lq3l_73{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer}._secondaryAction_3lq3l_73:hover{border-color:var(--accent);background:var(--accent-dim)}._primaryAction_3lq3l_72{border:1px solid var(--pro-badge);background:var(--pro-badge);color:var(--pro-text-on-badge)}._primaryAction_3lq3l_72:hover{opacity:.9}._card_3lq3l_109{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._cardHeader_3lq3l_116{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--text-primary);margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}._clearButton_3lq3l_128{border:1px solid rgba(209,84,84,.5);background:#d154541f;color:var(--error-text);border-radius:8px;padding:6px 12px;cursor:pointer}._clearButton_3lq3l_128:disabled{cursor:not-allowed;opacity:.55}._statusRow_3lq3l_143{display:flex;align-items:center;gap:12px;margin-bottom:8px}._statusIndicator_3lq3l_150{display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0}._statusRunning_3lq3l_158{background:var(--success);box-shadow:0 0 6px var(--success)}._statusPaused_3lq3l_163{background:var(--warning)}._statusNotRunning_3lq3l_167{background:var(--text-muted)}._statusLabel_3lq3l_171{font-family:var(--font-code);font-size:13px;font-weight:600;color:var(--text-primary)}._statusMeta_3lq3l_178{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._controlButtons_3lq3l_184{display:flex;gap:8px;margin-top:12px}._btn_3lq3l_191{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:4px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_3lq3l_191:hover{border-color:var(--accent);background:var(--accent-dim)}._btn_3lq3l_191:disabled{opacity:.4;pointer-events:none}._btnPrimary_3lq3l_213{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_3lq3l_213:hover{opacity:.9}._btnDanger_3lq3l_223{border-color:var(--error);color:var(--error)}._btnDanger_3lq3l_223:hover{background:#ef44441a}._historyList_3lq3l_233{display:flex;flex-direction:column;gap:4px;max-height:320px;overflow-y:auto}._historyItem_3lq3l_241{display:flex;flex-direction:column;gap:4px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);cursor:pointer;text-align:left;width:100%;font-family:inherit;transition:border-color var(--transition)}._historyItem_3lq3l_241:hover{border-color:var(--accent)}._historyItemSelected_3lq3l_260{border-color:var(--accent);background:var(--accent-dim)}._historyItemHeader_3lq3l_265{display:flex;align-items:center;gap:8px}._historyIcon_3lq3l_271{font-size:14px;flex-shrink:0}._historyTimestamp_3lq3l_276{font-family:var(--font-code);font-size:11px;color:var(--text-muted);flex-shrink:0}._historyName_3lq3l_283{font-family:var(--font-label);font-size:12px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyItemMeta_3lq3l_293{display:flex;gap:12px;font-family:var(--font-code);font-size:11px;color:var(--text-secondary);padding-left:22px}._historyMode_3lq3l_302{color:var(--text-muted)}._historyDuration_3lq3l_306{color:var(--text-secondary)}._historyStatus_3lq3l_310{font-weight:500;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._status_passed_3lq3l_317{color:var(--success)}._status_failed_3lq3l_321{color:var(--error)}._status_running_3lq3l_325{color:var(--accent)}._historyError_3lq3l_329{font-family:var(--font-code);font-size:11px;color:var(--error);padding-left:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._historyContext_3lq3l_339{display:flex;flex-direction:column;gap:4px;padding-left:22px;color:var(--text-secondary);font-size:11px}._historyContextLine_3lq3l_348{display:flex;flex-direction:column;gap:2px}._historyContextLabel_3lq3l_354{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}._reportContainer_3lq3l_363{display:flex;flex-direction:column;gap:12px}._reportContextPanel_3lq3l_369{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._reportContextRow_3lq3l_379{display:flex;flex-direction:column;gap:4px;color:var(--text-primary);font-size:12px}._reportContextLabel_3lq3l_387{font-family:var(--font-label);font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}._reportSection_3lq3l_395{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}._reportSectionHeader_3lq3l_401{font-family:var(--font-label);font-size:11px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em;padding:6px 12px;background:var(--bg-secondary);border-bottom:1px solid var(--border)}._reportMarkdown_3lq3l_413{padding:12px;margin:0;font-family:var(--font-code);font-size:12px;line-height:1.6;color:var(--text-primary);white-space:pre-wrap;word-break:break-word;max-height:400px;overflow-y:auto}._reportLogs_3lq3l_426{padding:12px;margin:0;font-family:var(--font-code);font-size:11px;line-height:1.5;color:var(--text-secondary);white-space:pre-wrap;word-break:break-word;max-height:240px;overflow-y:auto;background:var(--bg-secondary)}._emptyState_3lq3l_441{text-align:center;padding:32px 16px;color:var(--text-muted);font-size:13px}._emptyStateTitle_3lq3l_448{font-family:var(--font-label);font-size:14px;font-weight:600;color:var(--text-secondary);margin-bottom:8px}._emptyStateMessage_3lq3l_456{font-size:12px;color:var(--text-muted);max-width:360px;margin:0 auto;line-height:1.5}._upgradePanel_3lq3l_465{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:32px 24px;text-align:center}._upgradePanelIcon_3lq3l_473{font-size:32px;margin-bottom:12px}._upgradePanelTitle_3lq3l_478{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary);margin-bottom:8px}._upgradePanelDesc_3lq3l_486{font-size:13px;color:var(--text-secondary);margin-bottom:16px;max-width:400px;margin-left:auto;margin-right:auto;line-height:1.5}._benefitList_3lq3l_496{list-style:none;padding:0;margin:0 auto 16px;display:flex;flex-direction:column;gap:4px;max-width:360px;text-align:left}._benefitItem_3lq3l_507{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_3lq3l_507:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_3lq3l_522{display:flex;gap:8px;justify-content:center}@media(max-width:720px){._sampleBannerRow_3lq3l_21{flex-direction:column;align-items:stretch}._sampleActions_3lq3l_64{justify-content:stretch}._primaryAction_3lq3l_72,._secondaryAction_3lq3l_73{width:100%}}
@@ -0,0 +1 @@
1
+ import{d as re,r as d,f as ce,D as de,e as ue,g as ge,h as pe,a as D,u as V,i as ie,j as e,k as he,A as ye,S as ve}from"./index-CjBiayQg.js";import{I as j}from"./InfoLabel-BDieYXVe.js";import{T as u}from"./TooltipText-DgxJjq91.js";import{C as me}from"./ConfirmModal-Dak7jVJo.js";import{D as ne,f as oe,r as _e,s as xe,a as le,d as K,S as te,b as je}from"./sample-requests-BrVQkhcR.js";function be(){const{level:t}=re(),[s,c]=d.useState(null),[N,o]=d.useState(null),[p,i]=d.useState(!1),[_,h]=d.useState(!0),[A,L]=d.useState(!1),[B,f]=d.useState(null),b="gumroad",m=t==="disconnected",y=d.useCallback(r=>{r&&o(n=>({...n,...r,maskedKey:r.maskedKey??(n==null?void 0:n.maskedKey),provider:r.provider??(n==null?void 0:n.provider)??b}))},[b]),k=d.useCallback(r=>{if(!r){o(null);return}o({...r,provider:r.provider??b})},[b]),H=d.useCallback(async()=>{try{return await ce(b)}catch{return null}},[b]);d.useEffect(()=>{let r=!1;async function n(){try{const[v,x]=await Promise.all([D.get("/api/dashboard/settings").catch(()=>null),H()]);if(r)return;v&&c(v),x&&y(x)}catch{}finally{r||h(!1)}}return n(),()=>{r=!0}},[H,y]),d.useEffect(()=>{const r=new de;r.connect();const n=r.on("license",v=>{H().then(x=>{if(x){if((v==null?void 0:v.cleared)===!0){k(x);return}y(x)}})});return()=>{n(),r.disconnect()}},[H,y,k]);const S=d.useCallback((r,n)=>{f(r??n)},[]),E=d.useCallback(async r=>{if(m)return!1;if(!r.trim())return f("License key is required."),!1;L(!0);try{const n=await ue({provider:b,licenseKey:r.trim()});return y(n.license),S(n.message,n.ok?"License updated.":"License activation failed."),n.ok}catch{return f("License activation failed."),!1}finally{L(!1)}},[S,m,b,y]),R=d.useCallback(async()=>{if(!m){L(!0);try{const r=await ge({provider:b});y(r.license),S(r.message,r.ok?"License updated.":"License refresh failed.")}catch{f("License refresh failed.")}finally{L(!1)}}},[S,m,b,y]),T=d.useCallback(async()=>{if(!m){L(!0);try{const r=await pe({provider:b});k(r.license),S(r.message,r.ok?"License reset.":"License reset failed.")}catch{f("License reset failed.")}finally{L(!1)}}},[S,m,b,k]),I=d.useCallback(async(r,n)=>{if(s){c(v=>v&&{...v,hot:{...v.hot,[r]:n}}),i(!0);try{await D.patch("/api/dashboard/settings",{[r]:n})}catch{c(v=>v&&{...v,hot:{...v.hot,[r]:s.hot[r]}})}finally{i(!1)}}},[s]);return{settings:s,license:N,saving:p,licenseProvider:b,licenseControlsDisabled:m,licenseSubmitting:A,licenseMessage:B,activateLicense:E,refreshLicense:R,resetLicense:T,updateHotSetting:I,loading:_}}const fe="_card_1jlvt_4",Se="_cardEmbedded_1jlvt_14",Ne="_cardTitle_1jlvt_21",Le="_usageRow_1jlvt_30",Ce="_usageTotal_1jlvt_36",He="_usageBreakdown_1jlvt_42",ke="_usageCounts_1jlvt_47",we="_divider_1jlvt_53",Re="_lastRunRow_1jlvt_60",Te="_lastRunLabel_1jlvt_69",Ee="_errorIcon_1jlvt_75",Ae="_tooltip_1jlvt_83",Be="_cleanupRow_1jlvt_106",Ie="_cleanupLabel_1jlvt_113",De="_cleanupBtn_1jlvt_120",Pe="_cleanupBtnDanger_1jlvt_143",Me="_retentionSection_1jlvt_155",$e="_retentionTitle_1jlvt_161",Ue="_retentionFieldset_1jlvt_170",Oe="_proOverlay_1jlvt_185",ze="_radioRow_1jlvt_197",Fe="_radioLabel_1jlvt_204",Ge="_presetGroup_1jlvt_224",qe="_presetBtn_1jlvt_232",We="_presetBtnActive_1jlvt_249",Ye="_freeInput_1jlvt_256",Ke="_inputError_1jlvt_272",Ve="_inputUnit_1jlvt_276",Qe="_cascadeRow_1jlvt_283",Xe="_retentionActions_1jlvt_302",Je="_saveBtn_1jlvt_308",Ze="_runNowBtn_1jlvt_330",et="_errorMsg_1jlvt_353",l={card:fe,cardEmbedded:Se,cardTitle:Ne,usageRow:Le,usageTotal:Ce,usageBreakdown:He,usageCounts:ke,divider:we,lastRunRow:Re,lastRunLabel:Te,errorIcon:Ee,tooltip:Ae,cleanupRow:Be,cleanupLabel:Ie,cleanupBtn:De,cleanupBtnDanger:Pe,retentionSection:Me,retentionTitle:$e,retentionFieldset:Ue,proOverlay:Oe,radioRow:ze,radioLabel:Fe,presetGroup:Ge,presetBtn:qe,presetBtnActive:We,freeInput:Ye,inputError:Ke,inputUnit:Ve,cascadeRow:Qe,retentionActions:Xe,saveBtn:Je,runNowBtn:Ze,errorMsg:et};function tt(t,s){return!!(t.mode==="off"&&s.mode!=="off"||t.mode==="age"&&s.mode==="age"&&(s.ageDays??0)<(t.ageDays??0)||t.mode==="size"&&s.mode==="size"&&(s.sizeMb??0)<(t.sizeMb??0)||!t.cascadeSnapshots&&s.cascadeSnapshots)}function se(t){return t.mode==="age"?Number.isInteger(t.ageDays)&&t.ageDays>=1&&t.ageDays<=365:t.mode==="size"?Number.isInteger(t.sizeMb)&&t.sizeMb>=50&&t.sizeMb<=1e4:!0}function st(t,s){return t.mode===s.mode&&t.ageDays===s.ageDays&&t.sizeMb===s.sizeMb&&t.cascadeSnapshots===s.cascadeSnapshots}function O(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(2)} GB`}function at({placeId:t,tier:s,currentPolicy:c,onSaved:N}){const{t:o}=V(),{trackEvent:p}=ie(),[i,_]=d.useState(c),[h,A]=d.useState(()=>[7,14,30,90].includes(c.ageDays??-1)?"":String(c.ageDays??30)),[L,B]=d.useState(()=>[100,500,1e3].includes(c.sizeMb??-1)?"":String(c.sizeMb??500)),[f,b]=d.useState(null),[m,y]=d.useState(!1),[k,H]=d.useState(!1),[S,E]=d.useState(!1),[R,T]=d.useState(null);d.useEffect(()=>{_(c);const g=[7,14,30,90],w=[100,500,1e3];A(g.includes(c.ageDays??-1)?"":String(c.ageDays??30)),B(w.includes(c.sizeMb??-1)?"":String(c.sizeMb??500))},[c]);const I=s==="basic",r=se(i),n=st(c,i),v=r&&!n&&!k,x=g=>{_(w=>{const U={...w,mode:g};return g==="age"&&(U.ageDays=parseInt(h,10)||30),g==="size"&&(U.sizeMb=parseInt(L,10)||500),U})},C=g=>{A(""),_(w=>({...w,ageDays:g}))},z=g=>{B(""),_(w=>({...w,sizeMb:g}))},Q=g=>{A(g);const w=parseInt(g,10);Number.isNaN(w)||_(U=>({...U,ageDays:w}))},M=g=>{B(g);const w=parseInt(g,10);Number.isNaN(w)||_(U=>({...U,sizeMb:w}))},X=async()=>{if(T(null),p("dashboard_click_event",{click_target:"ui_studio_cleanup_save",page:"settings"}),tt(c,i)){try{const g=await oe(t,{mode:i.mode,ageDays:i.ageDays,sizeMb:i.sizeMb,cascadeSnapshots:i.cascadeSnapshots});b(g.dryRun),y(!0)}catch(g){T(g.message)}return}await Y()},Y=async()=>{H(!0);try{await xe(t,i),y(!1),N()}catch(g){throw T(g.message),g}finally{H(!1)}},J=async()=>{T(null),p("dashboard_click_event",{click_target:"ui_studio_cleanup_run_now",page:"settings"}),E(!0);try{await _e(t),N()}catch(g){T(g.message)}finally{E(!1)}},Z=f?`${o("uiStudio.cleanup.policy.confirm.messageStrict","이 정책으로 즉시")} ${f.wouldRemoveRequests}${o("uiStudio.cleanup.policy.confirm.requests","건")} / ${f.wouldRemoveSnapshots}${o("uiStudio.cleanup.policy.confirm.snapshots","개 화면 캡처")} / ${O(f.wouldFreeBytes)} ${o("uiStudio.cleanup.policy.confirm.freed","가 삭제됩니다 — 적용?")}`:"",$=i.mode==="age"&&!se(i),ee=i.mode==="size"&&!se(i);return e.jsxs("div",{className:l.retentionSection,children:[e.jsx("h3",{className:l.retentionTitle,children:e.jsx(j,{label:o("uiStudio.cleanup.policy.title","자동 삭제 정책"),tooltip:o("uiStudio.cleanup.policy.title.tooltip","Rules that automatically remove old or large captures.")})}),e.jsxs("div",{style:{position:"relative"},children:[I&&e.jsx("div",{className:l.proOverlay,title:o("uiStudio.cleanup.policy.proRequired","Pro 업그레이드 후 사용 가능"),children:e.jsx("div",{className:l.tooltip,children:o("uiStudio.cleanup.policy.proRequired","Pro 업그레이드 후 사용 가능")})}),e.jsxs("fieldset",{className:l.retentionFieldset,disabled:I,style:I?{opacity:.45,pointerEvents:"none"}:void 0,children:[e.jsx("div",{className:l.radioRow,children:e.jsx(u,{text:o("uiStudio.cleanup.policy.modeOff.tooltip","Turn off auto-cleanup. Data stays until you remove it manually."),children:e.jsxs("label",{className:l.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"off",checked:i.mode==="off",onChange:()=>x("off")}),o("uiStudio.cleanup.policy.modeOff","사용 안 함 (off)")]})})}),e.jsxs("div",{children:[e.jsx("div",{className:l.radioRow,children:e.jsx(u,{text:o("uiStudio.cleanup.policy.modeAge.tooltip","Automatically delete data older than the configured number of days."),children:e.jsxs("label",{className:l.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"age",checked:i.mode==="age",onChange:()=>x("age")}),o("uiStudio.cleanup.policy.modeAge","기간 기반 (age)")]})})}),i.mode==="age"&&e.jsxs("div",{className:l.presetGroup,children:[[7,14,30,90].map(g=>e.jsx(u,{text:o("uiStudio.cleanup.policy.agePreset.tooltip","Delete data older than this many days."),children:e.jsxs("button",{type:"button",className:`${l.presetBtn} ${i.ageDays===g&&h===""?l.presetBtnActive:""}`,onClick:()=>C(g),children:[g,o("uiStudio.cleanup.policy.daysUnit","일")]})},g)),e.jsx(u,{text:o("uiStudio.cleanup.policy.ageInput.tooltip","Enter any value between 1 and 365 days."),children:e.jsx("input",{type:"number",className:`${l.freeInput} ${$?l.inputError:""}`,value:h,min:1,max:365,onChange:g=>Q(g.target.value)})}),e.jsxs("span",{className:l.inputUnit,children:["1–365",o("uiStudio.cleanup.policy.daysUnit","일")]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:l.radioRow,children:e.jsx(u,{text:o("uiStudio.cleanup.policy.modeSize.tooltip","When total usage exceeds the limit, the oldest data is removed first."),children:e.jsxs("label",{className:l.radioLabel,children:[e.jsx("input",{type:"radio",name:"cleanupMode",value:"size",checked:i.mode==="size",onChange:()=>x("size")}),o("uiStudio.cleanup.policy.modeSize","용량 기반 (size)")]})})}),i.mode==="size"&&e.jsxs("div",{className:l.presetGroup,children:[[100,500,1e3].map(g=>e.jsx(u,{text:o("uiStudio.cleanup.policy.sizePreset.tooltip","Keep total usage under this size."),children:e.jsxs("button",{type:"button",className:`${l.presetBtn} ${i.sizeMb===g&&L===""?l.presetBtnActive:""}`,onClick:()=>z(g),children:[g,o("uiStudio.cleanup.policy.mbUnit","MB")]})},g)),e.jsx(u,{text:o("uiStudio.cleanup.policy.sizeInput.tooltip","Enter any value between 50 MB and 10000 MB (10 GB)."),children:e.jsx("input",{type:"number",className:`${l.freeInput} ${ee?l.inputError:""}`,value:L,min:50,max:1e4,onChange:g=>M(g.target.value)})}),e.jsxs("span",{className:l.inputUnit,children:["50–10000",o("uiStudio.cleanup.policy.mbUnit","MB")]})]})]}),e.jsx(u,{text:o("uiStudio.cleanup.policy.cascade.tooltip","Also delete the capture images linked to those records. If off, the images stay."),children:e.jsxs("label",{className:l.cascadeRow,children:[e.jsx("input",{type:"checkbox",checked:i.cascadeSnapshots,onChange:g=>_(w=>({...w,cascadeSnapshots:g.target.checked}))}),o("uiStudio.cleanup.policy.cascade","연결된 화면 캡처도 함께 삭제")]})}),e.jsxs("div",{className:l.retentionActions,children:[e.jsx(u,{text:o("uiStudio.cleanup.policy.save.tooltip","Save the current cleanup rule. It runs in the background from then on."),children:e.jsx("button",{type:"button",className:l.saveBtn,onClick:()=>void X(),disabled:!v,children:o("uiStudio.cleanup.policy.save","정책 저장")})}),e.jsx(u,{text:o("uiStudio.cleanup.policy.runNow.tooltip","Run the current rule once now, without waiting for the next scheduled run."),children:e.jsx("button",{type:"button",className:l.runNowBtn,onClick:()=>void J(),disabled:S,children:o("uiStudio.cleanup.policy.runNow","지금 정리")})})]}),R&&e.jsx("div",{className:l.errorMsg,children:R})]})]}),m&&f&&e.jsx(ne,{title:o("uiStudio.cleanup.policy.confirm.title","정책 적용 확인"),message:Z,danger:!0,confirmLabel:o("uiStudio.cleanup.policy.save","정책 저장"),busy:k,onConfirm:Y,onClose:()=>y(!1)})]})}function it({placeId:t,tier:s,onChanged:c,sampleUsage:N,sampleRetention:o,embedded:p=!1}){const{t:i}=V(),_=s==="basic"&&N!=null&&o!=null,[h,A]=d.useState(_?N:null),[L,B]=d.useState(_?o:null),[f,b]=d.useState(null),[m,y]=d.useState(null),[k,H]=d.useState(null),S=d.useCallback(async()=>{if(!_&&t!=null){b(null);try{const[x,C]=await Promise.all([le(t),oe(t)]);A(x),B(C.policy)}catch(x){b(x.message)}}},[t,_]);d.useEffect(()=>{S()},[S]);const E=d.useCallback(()=>{S(),c==null||c()},[S,c]),R=d.useCallback(async()=>{if(m&&t!=null){H(null);try{m.kind==="keep7"?await K(t,{olderThanDays:7,alsoSnapshots:!0}):m.kind==="keep30"?await K(t,{olderThanDays:30,alsoSnapshots:!0}):await K(t,{all:!0,alsoSnapshots:!0}),y(null),S(),c==null||c()}catch(x){throw H(x.message),x}}},[m,t,S,c]);function T(x){const C=i("uiStudio.cleanup.studioPreservedNote","This deletes saved change records and screenshots on disk only; Roblox Studio instances are not affected.");return x.kind==="keep7"?`${i("uiStudio.cleanup.cleanupConfirmMessage.keep7","7일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${C}`:x.kind==="keep30"?`${i("uiStudio.cleanup.cleanupConfirmMessage.keep30","30일 이전 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${C}`:`${((h==null?void 0:h.requestCount)??0)+((h==null?void 0:h.snapshotCount)??0)}${i("uiStudio.cleanup.cleanupConfirmMessage.all","개의 저장된 변경 기록과 화면 캡처가 삭제됩니다. 이 작업은 되돌릴 수 없습니다.")} ${C}`}if(t==null&&!_)return null;if(f)return e.jsx("div",{className:`${l.card} ${p?l.cardEmbedded:""}`,children:e.jsx("p",{className:l.errorMsg,children:f})});if(!h||!L)return e.jsx("div",{className:`${l.card} ${p?l.cardEmbedded:""}`,children:e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",margin:0},children:i("uiStudio.storage.loading","로딩 중...")})});const I=L.lastRunAt,r=L.lastRunStats,n=I?new Date(I).toLocaleString():null,v=t??0;return e.jsxs("div",{className:`${l.card} ${p?l.cardEmbedded:""}`,children:[e.jsx("h3",{className:l.cardTitle,children:e.jsx(j,{label:i("uiStudio.storage.title","UI Studio 저장 데이터"),tooltip:i("uiStudio.storage.title.tooltip","Disk usage of UI Studio change records and screenshots.")})}),e.jsxs("div",{className:l.usageRow,children:[e.jsx(u,{text:i("uiStudio.storage.usageLabel.tooltip","Disk space currently used by UI Studio for this project."),children:e.jsxs("div",{className:l.usageTotal,children:[i("uiStudio.storage.usageLabel","사용 중")," ",O(h.totalBytes)]})}),e.jsxs("div",{className:l.usageBreakdown,children:[e.jsx(u,{text:i("uiStudio.storage.historyBytes.tooltip","Space taken by change record data (JSON)."),children:e.jsxs("span",{children:[i("uiStudio.storage.historyBytes","변경 이력")," ",O(h.historyBytes)]})})," · ",e.jsx(u,{text:i("uiStudio.storage.snapshotBytes.tooltip","Space taken by captured PNG image files."),children:e.jsxs("span",{children:[i("uiStudio.storage.snapshotBytes","화면 캡처")," ",O(h.snapshotBytes)]})})]}),e.jsxs("div",{className:l.usageCounts,children:[e.jsx(u,{text:i("uiStudio.storage.requestCount.tooltip","Number of actions where AI changed the UI."),children:e.jsxs("span",{children:[i("uiStudio.storage.requestCount","변경 기록")," ",h.requestCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(u,{text:i("uiStudio.storage.mutationCount.tooltip","Number of detail changes inside actions (one property edit = 1)."),children:e.jsxs("span",{children:[i("uiStudio.storage.mutationCount","변경 상세")," ",h.mutationCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})," · ",e.jsx(u,{text:i("uiStudio.storage.snapshotCount.tooltip","Number of saved capture image files."),children:e.jsxs("span",{children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",h.snapshotCount.toLocaleString(),i("uiStudio.storage.countSuffix","개")]})})]})]}),e.jsx("hr",{className:l.divider}),e.jsx(at,{placeId:v,tier:s,currentPolicy:L,onSaved:E}),e.jsx("hr",{className:l.divider}),e.jsxs("div",{className:l.lastRunRow,children:[e.jsx("span",{className:l.lastRunLabel,children:e.jsx(j,{label:i("uiStudio.storage.lastRun","마지막 자동 정리"),tooltip:i("uiStudio.storage.lastRun.tooltip","When the auto-cleanup policy last ran, and what it removed.")})}),n?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:n}),r&&e.jsxs("span",{children:["· ",i("uiStudio.storage.requestCount","변경 기록")," ",r.removedRequests,i("uiStudio.storage.countSuffix","개")," / ",i("uiStudio.storage.snapshotCount","화면 캡처")," ",r.removedSnapshots,i("uiStudio.storage.countSuffix","개")," / ",O(r.freedBytes)," ",i("uiStudio.storage.lastRunFreed","회수")]}),r&&r.errors>0&&e.jsxs("span",{className:l.errorIcon,title:`${i("uiStudio.storage.lastRunErrors","오류")} ${r.errors}건`,children:["⚠",e.jsxs("span",{className:l.tooltip,children:[i("uiStudio.storage.lastRunErrors","오류")," ",r.errors,i("uiStudio.storage.countSuffix","건")]})]})]}):e.jsx("span",{children:i("uiStudio.storage.lastRunNever","—")})]}),e.jsx("hr",{className:l.divider}),e.jsxs("div",{className:l.cleanupRow,children:[e.jsx("span",{className:l.cleanupLabel,children:e.jsx(j,{label:i("uiStudio.cleanup.label","수동 정리"),tooltip:i("uiStudio.cleanup.label.tooltip","Manually clean up change records and captures whenever you want.")})}),e.jsx(u,{text:i("uiStudio.cleanup.keep7.tooltip","Delete change records and captures older than 7 days."),children:e.jsx("button",{type:"button",className:l.cleanupBtn,onClick:()=>y({kind:"keep7"}),disabled:s==="basic",children:i("uiStudio.cleanup.keepLastNDays","최근 7일만 남기기").replace("{n}","7")})}),e.jsx(u,{text:i("uiStudio.cleanup.keep30.tooltip","Delete change records and captures older than 30 days."),children:e.jsx("button",{type:"button",className:l.cleanupBtn,onClick:()=>y({kind:"keep30"}),disabled:s==="basic",children:i("uiStudio.cleanup.keepLastNDays","최근 30일만 남기기").replace("{n}","30")})}),e.jsx(u,{text:i("uiStudio.cleanup.deleteAll.tooltip","Delete every change record and capture for this project. The actual UI in Roblox Studio is not affected."),children:e.jsx("button",{type:"button",className:`${l.cleanupBtn} ${l.cleanupBtnDanger}`,onClick:()=>y({kind:"all"}),disabled:s==="basic",children:i("uiStudio.cleanup.deleteAll","전체 삭제…")})})]}),k&&e.jsx("div",{className:l.errorMsg,children:k}),m&&e.jsx(ne,{title:i("uiStudio.cleanup.cleanupConfirmTitle","정리 확인"),message:T(m),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:R,onClose:()=>{y(null),H(null)}})]})}const nt="_page_16yvc_2",ot="_card_16yvc_10",lt="_licenseCardPro_16yvc_17",rt="_cardHeader_16yvc_28",ct="_cardHeaderActions_16yvc_41",dt="_collapseButton_16yvc_47",ut="_headerBadge_16yvc_69",gt="_headerBadgeLive_16yvc_80",pt="_licenseGrid_16yvc_86",ht="_statusDot_16yvc_104",yt="_statusActive_16yvc_113",vt="_statusGrace_16yvc_118",mt="_statusInactive_16yvc_123",_t="_statusError_16yvc_127",xt="_proBadge_16yvc_132",jt="_upgradeLink_16yvc_146",bt="_licenseControls_16yvc_160",ft="_licenseControlRow_16yvc_169",St="_licenseField_16yvc_176",Nt="_licenseFieldGrow_16yvc_182",Lt="_controlLabel_16yvc_187",Ct="_textInput_16yvc_193",Ht="_actionBtn_16yvc_209",kt="_licenseMessage_16yvc_231",wt="_licenseNotice_16yvc_238",Rt="_licenseNoticeInfo_16yvc_248",Tt="_licenseNoticeWarning_16yvc_254",Et="_licenseNoticeMuted_16yvc_260",At="_settingRow_16yvc_266",Bt="_settingLabel_16yvc_280",It="_settingControl_16yvc_287",Dt="_select_16yvc_296",Pt="_numberInput_16yvc_314",Mt="_toggleSwitch_16yvc_332",$t="_toggleInput_16yvc_339",Ut="_toggleTrack_16yvc_347",Ot="_toggleThumb_16yvc_369",zt="_savedIndicator_16yvc_418",Ft="_savedIndicatorHidden_16yvc_429",Gt="_dataHistoryIntro_16yvc_434",qt="_dataHistoryList_16yvc_442",Wt="_dataHistoryRow_16yvc_448",Yt="_dataHistoryDetail_16yvc_457",Kt="_uiStudioDataHistoryRow_16yvc_462",Vt="_uiStudioDataHistoryDetail_16yvc_467",Qt="_dataHistoryMain_16yvc_474",Xt="_dataHistoryTitle_16yvc_478",Jt="_dataHistoryDescription_16yvc_484",Zt="_dataHistoryMetric_16yvc_492",es="_dataHistoryActions_16yvc_499",ts="_linkButton_16yvc_505",ss="_dangerButton_16yvc_506",as="_inlineStatus_16yvc_542",is="_coldGrid_16yvc_550",ns="_coldHint_16yvc_568",os="_langRow_16yvc_577",ls="_loading_16yvc_590",rs="_unit_16yvc_599",a={page:nt,card:ot,licenseCardPro:lt,cardHeader:rt,cardHeaderActions:ct,collapseButton:dt,headerBadge:ut,headerBadgeLive:gt,licenseGrid:pt,statusDot:ht,statusActive:yt,statusGrace:vt,statusInactive:mt,statusError:_t,proBadge:xt,upgradeLink:jt,licenseControls:bt,licenseControlRow:ft,licenseField:St,licenseFieldGrow:Nt,controlLabel:Lt,textInput:Ct,actionBtn:Ht,licenseMessage:kt,licenseNotice:wt,licenseNoticeInfo:Rt,licenseNoticeWarning:Tt,licenseNoticeMuted:Et,settingRow:At,settingLabel:Bt,settingControl:It,select:Dt,numberInput:Pt,toggleSwitch:Mt,toggleInput:$t,toggleTrack:Ut,toggleThumb:Ot,savedIndicator:zt,savedIndicatorHidden:Ft,dataHistoryIntro:Gt,dataHistoryList:qt,dataHistoryRow:Wt,dataHistoryDetail:Yt,uiStudioDataHistoryRow:Kt,uiStudioDataHistoryDetail:Vt,dataHistoryMain:Qt,dataHistoryTitle:Xt,dataHistoryDescription:Jt,dataHistoryMetric:Zt,dataHistoryActions:es,linkButton:ts,dangerButton:ss,inlineStatus:as,coldGrid:is,coldHint:ns,langRow:os,loading:ls,unit:rs},cs={toolsActivity:null,toolStats:null,toolSessions:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null},ds={toolsActivity:null,toolStats:null,syncLog:null,playtestReports:null,projectChanges:null,connectionLog:null};function us(t){var s;return t?t.pluginConnected?t.activePlaceId:t.lastActivePlaceId??((s=t.places[0])==null?void 0:s.placeId)??null:null}async function P(t){try{return await t}catch{return null}}function q(t){return t?typeof t.total=="number"?t.total:Array.isArray(t.entries)?t.entries.length:null:null}function W(t,s,c,N){return s===null?t("settings.dataHistory.metric.unavailable","Unavailable"):`${s.toLocaleString()} ${t(c,N)}`}function F(t,s,c){const N=c===null?t("settings.dataHistory.metric.sizeUnavailable","size unavailable"):O(c);return`${s} · ${N}`}function G(t,s){var N;const c=(N=t==null?void 0:t[s])==null?void 0:N.bytes;return typeof c=="number"&&Number.isFinite(c)?c:null}function gs(t,s){return s?[`${s.requestCount.toLocaleString()} ${t("uiStudio.storage.requestCount","change records")}`,`${s.snapshotCount.toLocaleString()} ${t("uiStudio.storage.snapshotCount","screenshots")}`,O(s.totalBytes)].join(" · "):t("settings.dataHistory.metric.unavailable","Unavailable")}function ps({tier:t}){const{t:s}=V(),[c,N]=d.useState(cs),[o,p]=d.useState(ds),[i,_]=d.useState(t==="basic"?te:null),[h,A]=d.useState(null),[L,B]=d.useState(!0),[f,b]=d.useState(!0),[m,y]=d.useState(null),[k,H]=d.useState(!1),[S,E]=d.useState(null),R=d.useCallback(async()=>{B(!0);const C=await P(he()),z=us(C);A(z);const[Q,M,X,Y,J,Z,$]=await Promise.all([P(D.get("/api/dashboard/history",{limit:"1",offset:"0"})),P(D.get("/api/dashboard/tool-stats")),P(D.get("/sync/history",{limit:"1",offset:"0"})),P(D.get("/api/dashboard/playtest/history")),P(D.get("/api/dashboard/changelog",{limit:"1",offset:"0"})),P(D.get("/api/dashboard/connection-log")),P(D.get("/api/dashboard/storage-summary"))]),ee=t==="basic"?te:z===null?null:await P(le(z));N({toolsActivity:q(Q),toolStats:(M==null?void 0:M.totalCalls)??null,toolSessions:(M==null?void 0:M.totalSessions)??null,syncLog:q(X),playtestReports:q(Y),projectChanges:q(J),connectionLog:q(Z)}),p({toolsActivity:G($,"toolsActivity"),toolStats:G($,"toolStats"),syncLog:G($,"syncLog"),playtestReports:G($,"playtestReports"),projectChanges:G($,"projectChanges"),connectionLog:G($,"connectionLog")}),_(ee),B(!1)},[t]);d.useEffect(()=>{R()},[R]);const T=d.useMemo(()=>[{key:"toolsActivity",title:s("settings.dataHistory.toolsActivity.title","Tool activity"),description:s("settings.dataHistory.toolsActivity.description","Saved tool runs shown on the Tools page."),metric:F(s,W(s,c.toolsActivity,"settings.dataHistory.metric.records","records"),o.toolsActivity),metricTooltip:s("settings.dataHistory.toolsActivity.metric.tooltip","Number of saved tool runs and the disk space they use."),route:"/tools",clearEndpoint:"/api/dashboard/tools/history/clear"},{key:"toolStats",title:s("settings.dataHistory.toolStats.title","Tool usage statistics"),description:s("settings.dataHistory.toolStats.description","Aggregated tool counts and status totals."),metric:F(s,c.toolStats===null?s("settings.dataHistory.metric.unavailable","Unavailable"):`${c.toolStats.toLocaleString()} ${s("settings.dataHistory.metric.runs","runs")} · ${(c.toolSessions??0).toLocaleString()} ${s("settings.dataHistory.metric.sessions","sessions")}`,o.toolStats),metricTooltip:s("settings.dataHistory.toolStats.metric.tooltip","Aggregated total runs and session counts."),route:"/tools",clearEndpoint:"/api/dashboard/tools/statistics/clear"},{key:"syncLog",title:s("settings.dataHistory.syncLog.title","Sync log"),description:s("settings.dataHistory.syncLog.description","Saved file sync events for the active place."),metric:F(s,W(s,c.syncLog,"settings.dataHistory.metric.records","records"),o.syncLog),metricTooltip:s("settings.dataHistory.syncLog.metric.tooltip","Number of saved sync events and the disk space they use."),route:"/sync",clearEndpoint:"/api/dashboard/sync/history/clear"},{key:"playtestReports",title:s("settings.dataHistory.playtest.title","Playtest reports"),description:s("settings.dataHistory.playtest.description","Saved automated playtest reports and logs."),metric:F(s,W(s,c.playtestReports,"settings.dataHistory.metric.reports","reports"),o.playtestReports),metricTooltip:s("settings.dataHistory.playtestReports.metric.tooltip","Number of saved playtest reports and the disk space they use."),route:"/playtest",clearEndpoint:"/api/dashboard/playtest/history/clear"},{key:"projectChanges",title:s("settings.dataHistory.projectChanges.title","Project change summary"),description:s("settings.dataHistory.projectChanges.description","Saved summaries of project changes."),metric:F(s,W(s,c.projectChanges,"settings.dataHistory.metric.records","records"),o.projectChanges),metricTooltip:s("settings.dataHistory.projectChanges.metric.tooltip","Number of saved project change summaries and the disk space they use."),route:"/changelog",clearEndpoint:"/api/dashboard/changelog/clear"},{key:"connectionLog",title:s("settings.dataHistory.connectionLog.title","Connection log"),description:s("settings.dataHistory.connectionLog.description","Saved MCP and Studio connection events."),metric:F(s,W(s,c.connectionLog,"settings.dataHistory.metric.records","records"),o.connectionLog),metricTooltip:s("settings.dataHistory.connectionLog.metric.tooltip","Number of saved connection events and the disk space they use."),route:"/connection",clearEndpoint:"/api/dashboard/connection-log/clear"}],[c,o,s]),I=async()=>{if(m){H(!0),E(null);try{if(m.kind==="uiStudio"){if(t!=="pro"||h===null)throw new Error("UI Studio place is unavailable");await K(h,{all:!0,alsoSnapshots:!0}),E(s("settings.dataHistory.uiStudio.clear.success","UI Studio saved data cleared."))}else await D.post(m.row.clearEndpoint),E(s("settings.dataHistory.clear.success","Saved data cleared."));y(null),await R()}catch{E(m.kind==="uiStudio"?s("settings.dataHistory.uiStudio.clear.failed","Failed to clear UI Studio saved data."):s("settings.dataHistory.clear.failed","Failed to clear saved data."))}finally{H(!1)}}},r=t==="pro"?h:0,n=t==="pro"&&h!==null,v=(m==null?void 0:m.kind)==="uiStudio",x=s("settings.dataHistory.title","Data & History");return e.jsxs(e.Fragment,{children:[e.jsxs("section",{id:"data-history",className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(j,{label:s("settings.dataHistory.title","Data & History"),tooltip:s("settings.dataHistory.title.tooltip","Manage saved dashboard data in one place.")}),e.jsxs("div",{className:a.cardHeaderActions,children:[e.jsx(u,{text:s("settings.dataHistory.scope.tooltip","Clear actions apply to the current project and active place where applicable."),children:e.jsx("span",{className:a.headerBadge,children:L?s("common.loading","Loading"):s("settings.dataHistory.scope","Current project")})}),e.jsx(u,{text:s("settings.dataHistory.toggle.tooltip","Collapse or expand this section."),children:e.jsx("button",{className:a.collapseButton,type:"button","aria-expanded":f,"aria-controls":"settings-data-history-body","aria-label":f?s("settings.dataHistory.collapse","Collapse {title}").replace("{title}",x):s("settings.dataHistory.expand","Expand {title}").replace("{title}",x),onClick:()=>b(C=>!C),children:f?"▾":"▸"})})]})]}),f&&e.jsxs("div",{id:"settings-data-history-body",children:[e.jsx("p",{className:a.dataHistoryIntro,children:s("settings.dataHistory.intro","Review saved dashboard data, open the related page, or clear stored records from one place.")}),e.jsxs("div",{className:a.dataHistoryList,children:[T.map(C=>e.jsxs("div",{className:a.dataHistoryRow,children:[e.jsxs("div",{className:a.dataHistoryMain,children:[e.jsx("div",{className:a.dataHistoryTitle,children:C.title}),e.jsx("div",{className:a.dataHistoryDescription,children:C.description})]}),e.jsx(u,{text:C.metricTooltip,children:e.jsx("div",{className:a.dataHistoryMetric,children:C.metric})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(u,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:a.linkButton,href:`#${C.route}`,children:s("settings.dataHistory.open","Open")})}),e.jsx(u,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:a.dangerButton,type:"button",onClick:()=>y({kind:"row",row:C}),children:s("common.clear","Clear")})})]})]},C.key)),e.jsxs("div",{className:`${a.dataHistoryRow} ${a.uiStudioDataHistoryRow}`,children:[e.jsxs("div",{className:a.dataHistoryMain,children:[e.jsx("div",{className:a.dataHistoryTitle,children:s("settings.dataHistory.uiStudio.title","UI Studio history and screenshots")}),e.jsx("div",{className:a.dataHistoryDescription,children:s("settings.dataHistory.uiStudio.description","Saved UI Studio change records, screenshots, and cleanup policy.")})]}),e.jsx(u,{text:s("settings.dataHistory.uiStudio.metric.tooltip","UI Studio change record and capture counts, plus total disk usage."),children:e.jsx("div",{className:a.dataHistoryMetric,children:gs(s,i)})}),e.jsxs("div",{className:a.dataHistoryActions,children:[e.jsx(u,{text:s("settings.dataHistory.open.tooltip","Open the page that shows this item in detail."),children:e.jsx("a",{className:a.linkButton,href:"#/ui-studio?tab=history",children:s("settings.dataHistory.open","Open")})}),e.jsx(u,{text:s("settings.dataHistory.clear.tooltip","Delete only the records saved for this item. Roblox Studio data is not changed."),children:e.jsx("button",{className:a.dangerButton,type:"button",disabled:!n,onClick:()=>y({kind:"uiStudio"}),children:s("common.clear","Clear")})})]})]}),e.jsx("div",{className:`${a.dataHistoryDetail} ${a.uiStudioDataHistoryDetail}`,children:e.jsx(it,{placeId:r,tier:t,onChanged:R,embedded:!0,...t==="basic"?{sampleUsage:te,sampleRetention:je}:{}})})]}),S&&e.jsx("p",{className:a.inlineStatus,children:S})]})]}),e.jsx(me,{open:m!==null,title:v?s("settings.dataHistory.uiStudio.clear.title","Clear UI Studio saved data?"):s("settings.dataHistory.clear.title","Clear saved data?"),message:v?s("settings.dataHistory.uiStudio.clear.message","This deletes saved UI Studio change records and screenshots only. Roblox Studio instances and project objects are not changed."):s("settings.dataHistory.clear.message","This deletes saved dashboard records only. Roblox Studio instances and project objects are not changed."),cancelLabel:s("common.cancel","Cancel"),confirmLabel:s("common.clear","Clear"),loading:k,onCancel:()=>!k&&y(null),onConfirm:()=>void I()})]})}const hs={en:"English",ko:"한국어",es:"Español","pt-br":"Português (BR)",ja:"日本語",id:"Bahasa Indonesia",de:"Deutsch"},ys=["debug","info","warn","error"];function vs(t){return t==="active"?a.statusActive:t==="grace"?a.statusGrace:t==="invalid"||t==="revoked"?a.statusError:a.statusInactive}function ms(t,s){return t.refreshBlockedReason==="missing_session_token"?{label:s("settings.license.status.activationRequired","Activation Required"),tooltip:s("settings.license.status.activationRequired.tooltip","Manual license activation is required before WEPPY Dashboard can refresh this status."),detail:s("settings.license.detail.missingSessionToken","Refresh is blocked because the current session token is missing."),detailTone:a.licenseNoticeWarning}:t.statusDetail==="active_cancel_pending"?{label:s("settings.license.active","Active"),tooltip:s("settings.license.status.activeCancelPending.tooltip","Cancellation is pending, but Pro access remains active until the current billing period ends."),detail:s("settings.license.detail.cancelPending","Cancellation is scheduled. Pro access remains active until the current billing period ends."),detailTone:a.licenseNoticeInfo}:t.statusDetail==="grace_provider_unavailable"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.grace.tooltip","Provider verification is temporarily unavailable, but Pro access remains active during the grace period."),detail:s("settings.license.detail.graceProviderUnavailable","Provider unavailable. Pro access remains active during grace mode."),detailTone:a.licenseNoticeInfo}:t.statusDetail==="grace_expired"||t.statusDetail==="grace_payment_failed"?{label:s("settings.license.status.grace","Grace"),tooltip:s("settings.license.status.graceBilling.tooltip","Pro access is still available during a billing-related grace period."),detail:s("settings.license.detail.graceBilling","Pro access remains available during a billing grace period."),detailTone:a.licenseNoticeInfo}:{label:s(`settings.license.${t.status}`,t.status),tooltip:s(`settings.license.${t.status}.tooltip`,"Current license activation state."),detail:t.refreshRequired?s("settings.license.detail.refreshRecommended","License verification should be refreshed soon."):null,detailTone:a.licenseNoticeMuted}}function ae({checked:t,onChange:s,testId:c,ariaLabel:N}){return e.jsxs("label",{className:a.toggleSwitch,"data-testid":c,children:[e.jsx("input",{type:"checkbox",className:a.toggleInput,checked:t,"aria-label":N,onChange:o=>s(o.target.checked)}),e.jsx("span",{className:a.toggleTrack,"aria-hidden":"true",children:e.jsx("span",{className:a.toggleThumb})})]})}function Ss(){const{t,selectedLocale:s,setLocale:c}=V(),{trackEvent:N}=ie(),{settings:o,license:p,licenseProvider:i,licenseControlsDisabled:_,licenseSubmitting:h,licenseMessage:A,activateLicense:L,refreshLicense:B,resetLicense:f,updateHotSetting:b,loading:m}=be(),[y,k]=d.useState(null),[H,S]=d.useState(""),E=p?ms(p,t):null,R=(p==null?void 0:p.tier)==="pro",T=(p==null?void 0:p.tier)==="pro"?p.maskedKey:void 0,I=(p==null?void 0:p.tier)==="pro"?"pro":"basic",r=d.useCallback(async(n,v)=>{await b(n,v),k(n),setTimeout(()=>k(x=>x===n?null:x),2e3)},[b]);return m?e.jsx("div",{className:a.page,children:e.jsx("div",{className:a.loading,children:t("common.loading")})}):e.jsxs("div",{className:a.page,children:[e.jsxs("div",{"data-testid":"settings-license-card",className:[a.card,(p==null?void 0:p.tier)==="pro"?a.licenseCardPro:""].filter(Boolean).join(" "),children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(j,{label:t("settings.license.title","License"),tooltip:t("settings.license.title.tooltip","Current license status and subscription tier.")}),e.jsx(u,{text:_?t("settings.license.disconnected.tooltip","Reconnect to the MCP server to manage license actions from WEPPY Dashboard."):t("settings.license.live.tooltip","License actions are sent to the MCP server immediately."),children:e.jsx("span",{className:`${a.headerBadge} ${_?"":a.headerBadgeLive}`,children:_?t("settings.license.disconnected","Disconnected"):t("settings.general.liveApply","Live Apply")})})]}),e.jsxs(e.Fragment,{children:[p?e.jsxs(e.Fragment,{children:[(()=>{const n=E;return e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.licenseGrid,children:[e.jsx("dt",{children:e.jsx(j,{label:t("settings.license.status","Status"),tooltip:t("settings.license.status.tooltip","Current license activation state.")})}),e.jsxs("dd",{children:[e.jsx("span",{className:`${a.statusDot} ${vs(p.status)}`}),e.jsx(u,{text:(n==null?void 0:n.tooltip)??t(`settings.license.${p.status}.tooltip`,"Current license activation state."),children:(n==null?void 0:n.label)??t(`settings.license.${p.status}`,p.status)})]}),e.jsx("dt",{children:e.jsx(j,{label:t("settings.license.tier","Tier"),tooltip:t("settings.license.tier.tooltip","Current subscription tier for available WEPPY Dashboard features.")})}),e.jsx("dd",{className:p.tier==="pro"?a.proBadge:"",children:e.jsx(u,{text:t(`tier.${p.tier}.tooltip`,"Available feature set for the connected license."),children:p.tier==="pro"?t("tier.pro","Pro"):t("tier.basic","Basic")})}),T&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(j,{label:t("settings.license.key","Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.keyValue.tooltip","Masked license key currently loaded by the server."),children:T})})]}),p.provider&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(j,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.license.providerValue.tooltip","License provider used to validate this key."),children:p.provider})})]})]}),(n==null?void 0:n.detail)&&e.jsx("p",{className:`${a.licenseNotice} ${n.detailTone}`,children:p.refreshBlockedReason==="missing_session_token"?t("settings.license.detail.manualActivation","Manual activation required to restore Pro access."):n.detail}),p.refreshBlockedReason==="missing_session_token"&&e.jsx("p",{className:`${a.licenseNotice} ${a.licenseNoticeMuted}`,children:n==null?void 0:n.detail})]})})(),p.tier==="basic"&&e.jsx(u,{text:t("tier.upgrade.tooltip","Upgrade to Pro to unlock every feature."),children:e.jsx("a",{className:a.upgradeLink,href:"https://gum.co/u/din5in7h",target:"_blank",rel:"noopener noreferrer",onClick:()=>N("dashboard_click_event",{click_target:"upgrade_cta",placement:"settings_license",page:"settings"}),children:t("tier.upgrade")})})]}):e.jsx("div",{className:a.loading,children:t("settings.license.unavailable")}),e.jsxs("div",{className:a.licenseControls,children:[e.jsxs("div",{className:a.licenseControlRow,children:[e.jsxs("label",{className:a.licenseField,children:[e.jsx("span",{className:a.controlLabel,children:e.jsx(j,{label:t("settings.license.provider","Provider"),tooltip:t("settings.license.provider.tooltip","License provider used to validate this key.")})}),e.jsx("select",{"aria-label":t("settings.license.provider","Provider"),className:a.select,value:i,disabled:_||h,onChange:()=>{},children:e.jsx("option",{value:"gumroad",children:"gumroad"})})]}),e.jsx(u,{text:t("settings.license.refresh.tooltip","Re-fetch the current state from the license server. Useful when a billing change hasn't appeared yet."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:_||h||!R,onClick:()=>{B()},children:h?t("common.loading"):t("settings.license.refresh","Refresh License")})}),e.jsx(u,{text:t("settings.license.reset.tooltip","Remove the currently registered license key. Use this before activating with a different key."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:_||h||!R,onClick:()=>{f()},children:h?t("common.loading"):t("settings.license.reset","Reset License")})})]}),e.jsxs("div",{className:a.licenseControlRow,children:[e.jsxs("label",{className:`${a.licenseField} ${a.licenseFieldGrow}`,children:[e.jsx("span",{className:a.controlLabel,children:e.jsx(j,{label:t("settings.license.keyInput","License Key"),tooltip:t("settings.license.key.tooltip","Masked license key currently loaded by the server.")})}),e.jsx("input",{"aria-label":t("settings.license.keyInput","License Key"),className:a.textInput,type:"text",value:H,disabled:_||h,onChange:n=>S(n.target.value)})]}),e.jsx(u,{text:t("settings.license.activate.tooltip","Activate Pro features with the entered license key."),children:e.jsx("button",{type:"button",className:a.actionBtn,disabled:_||h,onClick:()=>{(async()=>await L(H)&&S(""))()},children:h?t("common.loading"):t("settings.license.activate","Activate License")})})]}),A&&e.jsx("p",{className:a.licenseMessage,children:A})]})]})]}),e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(j,{label:t("settings.general.title","General Settings"),tooltip:t("settings.general.title.tooltip","Hot settings that apply immediately when changed.")}),e.jsx(u,{text:t("settings.general.liveApply.tooltip","Changes in this section are applied immediately without a separate save button."),children:e.jsx("span",{className:`${a.headerBadge} ${a.headerBadgeLive}`,children:t("settings.general.liveApply","Live Apply")})})]}),o?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(j,{label:t("settings.general.logLevel","Log Level"),tooltip:t("settings.general.logLevel.tooltip","Sets how much detail WEPPY Dashboard writes to its logs.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("select",{className:a.select,value:o.hot.LOG_LEVEL,onChange:n=>r("LOG_LEVEL",n.target.value),children:ys.map(n=>e.jsx("option",{value:n,children:n},n))}),y==="LOG_LEVEL"&&e.jsx("span",{className:a.savedIndicator,children:t("settings.general.applied")})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(j,{label:t("settings.general.localHistory","Tool History Recording"),tooltip:t("settings.general.localHistory.tooltip","Stores local tool execution history for the WEPPY Dashboard history views.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("span",{className:`${a.savedIndicator} ${y==="ENABLE_LOCAL_HISTORY"?"":a.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(ae,{checked:o.hot.ENABLE_LOCAL_HISTORY,ariaLabel:t("settings.general.localHistory","Tool History Recording"),testId:"settings-toggle-enable-local-history",onChange:n=>r("ENABLE_LOCAL_HISTORY",n)})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(j,{label:t("settings.general.localStatistics","Tool Statistics Collection"),tooltip:t("settings.general.localStatistics.tooltip","Aggregates local usage statistics for WEPPY Dashboard reporting.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("span",{className:`${a.savedIndicator} ${y==="ENABLE_LOCAL_STATISTICS"?"":a.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(ae,{checked:o.hot.ENABLE_LOCAL_STATISTICS,ariaLabel:t("settings.general.localStatistics","Tool Statistics Collection"),testId:"settings-toggle-enable-local-statistics",onChange:n=>r("ENABLE_LOCAL_STATISTICS",n)})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(j,{label:t("settings.general.contextCapture","Context Capture"),tooltip:t("settings.general.contextCapture.tooltip","When enabled, WEPPY Dashboard records structured execution context for changelog and playtest views.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("span",{className:`${a.savedIndicator} ${y==="ENABLE_CONTEXT_CAPTURE"?"":a.savedIndicatorHidden}`,children:t("settings.general.applied","Applied")}),e.jsx(ae,{checked:o.hot.ENABLE_CONTEXT_CAPTURE,ariaLabel:t("settings.general.contextCapture","Context Capture"),testId:"settings-toggle-enable-context-capture",onChange:n=>r("ENABLE_CONTEXT_CAPTURE",n)})]})]}),e.jsxs("div",{className:a.settingRow,children:[e.jsx("span",{className:a.settingLabel,children:e.jsx(j,{label:t("settings.general.requestTimeout","Action Timeout"),tooltip:t("settings.general.requestTimeout.tooltip","Maximum time WEPPY Dashboard waits for an action before it fails.")})}),e.jsxs("div",{className:a.settingControl,children:[e.jsx("input",{type:"number",className:a.numberInput,value:o.hot.REQUEST_TIMEOUT,min:1e3,max:12e4,step:1e3,onChange:n=>{const v=parseInt(n.target.value,10);isNaN(v)||r("REQUEST_TIMEOUT",v)}}),e.jsx(u,{text:t("settings.general.requestTimeout.unit.tooltip","Action timeout is measured in milliseconds."),children:e.jsx("span",{className:a.unit,children:t("settings.general.requestTimeout.unit","ms")})}),y==="REQUEST_TIMEOUT"&&e.jsx("span",{className:a.savedIndicator,children:t("settings.general.applied","Applied")})]})]})]}):e.jsx("div",{className:a.loading,children:t("settings.unavailable")})]}),e.jsx(ps,{tier:I}),e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx(j,{label:t("settings.cold.title","Server Environment"),tooltip:t("settings.cold.title.tooltip","Read-only server environment values loaded at startup.")}),e.jsx(u,{text:t("settings.readOnly.tooltip","This section shows values that cannot be edited from WEPPY Dashboard."),children:e.jsx("span",{className:a.headerBadge,children:t("settings.readOnly","Read-only")})})]}),o?e.jsxs(e.Fragment,{children:[e.jsxs("dl",{className:a.coldGrid,children:[e.jsx("dt",{children:e.jsx(j,{label:"HTTP_PORT",tooltip:t("settings.cold.httpPort.tooltip","Port number used by the MCP WEPPY Dashboard HTTP server.")})}),e.jsx("dd",{children:o.cold.HTTP_PORT}),e.jsx("dt",{children:e.jsx(j,{label:"HTTP_HOST",tooltip:t("settings.cold.httpHost.tooltip","Host interface that the MCP WEPPY Dashboard HTTP server binds to.")})}),e.jsx("dd",{children:o.cold.HTTP_HOST}),e.jsx("dt",{children:e.jsx(j,{label:"DASHBOARD_AUTO_OPEN",tooltip:t("settings.cold.dashboardAutoOpen.tooltip","Controls whether WEPPY Dashboard opens automatically in the browser when the server starts.")})}),e.jsx("dd",{children:e.jsx(u,{text:t("settings.cold.dashboardAutoOpen.value.tooltip","Current startup behavior for opening WEPPY Dashboard in a browser."),children:String(o.cold.DASHBOARD_AUTO_OPEN)})})]}),e.jsx("p",{className:a.coldHint,children:t("settings.cold.hint","Set via environment variables to change these values.")})]}):e.jsx("div",{className:a.loading,children:t("settings.unavailable")})]}),e.jsxs("div",{className:a.card,children:[e.jsx("div",{className:a.cardHeader,children:e.jsx(j,{label:t("settings.language.title","Language"),tooltip:t("settings.language.title.tooltip","Choose how the WEPPY Dashboard interface text is localized.")})}),e.jsxs("div",{className:a.langRow,children:[e.jsx("label",{children:e.jsx(j,{label:t("settings.language.dashboard","WEPPY Dashboard Language"),tooltip:t("settings.language.dashboard.tooltip","Overrides the WEPPY Dashboard language or follows the system language when set to Auto.")})}),e.jsx(u,{text:t("settings.language.auto.tooltip","Follow the operating system's language. Falls back to English when not supported."),children:e.jsxs("select",{className:a.select,value:s,onChange:n=>c(n.target.value),children:[e.jsx("option",{value:ye,children:t("settings.language.auto","Auto")}),ve.map(n=>e.jsx("option",{value:n,children:hs[n]??n},n))]})})]})]})]})}export{Ss as Component};