@weppy/roblox-mcp 2.8.2 → 2.9.1

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 (56) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +46 -14
  3. package/dashboard/dist/assets/AssetsPage-Be5aZDhj.css +1 -0
  4. package/dashboard/dist/assets/AssetsPage-CC3FW3XG.js +46 -0
  5. package/dashboard/dist/assets/ChangelogDetailPage-B1zg2f56.js +1 -0
  6. package/dashboard/dist/assets/ChangelogPage-CbfWdVtL.js +1 -0
  7. package/dashboard/dist/assets/ConfirmModal-BCviiJ3_.js +1 -0
  8. package/dashboard/dist/assets/ConfirmModal-D1kfK31C.css +1 -0
  9. package/dashboard/dist/assets/ConfirmModal.module-NrFlfTWy.js +1 -0
  10. package/dashboard/dist/assets/ConnectionPage-D1GWlHZP.css +1 -0
  11. package/dashboard/dist/assets/ConnectionPage-Dskqof1W.js +11 -0
  12. package/dashboard/dist/assets/ControlsPage-C_38U6b0.js +1 -0
  13. package/dashboard/dist/assets/CurrentPlaceScope-CHEqGWYd.js +1 -0
  14. package/dashboard/dist/assets/CurrentPlaceScope-v3pl1mLI.css +1 -0
  15. package/dashboard/dist/assets/{GameChangeDetail-CghOvUm8.js → GameChangeDetail-DAEU3IYH.js} +1 -1
  16. package/dashboard/dist/assets/{InfoLabel-Cyz7d4Kc.js → InfoLabel-DCq3Fmko.js} +1 -1
  17. package/dashboard/dist/assets/{OverviewPage-B6ZL_JXU.js → OverviewPage-lOYmwxzd.js} +1 -1
  18. package/dashboard/dist/assets/PageHeader-Do_AQ2vQ.js +6 -0
  19. package/dashboard/dist/assets/PlaytestPage-CKcxZyhl.js +11 -0
  20. package/dashboard/dist/assets/SettingsPage-C0PubIFP.js +1 -0
  21. package/dashboard/dist/assets/SettingsPage-DSipzuEo.css +1 -0
  22. package/dashboard/dist/assets/{StatusBadge-CkLieULy.js → StatusBadge-DRbLpCd0.js} +1 -1
  23. package/dashboard/dist/assets/SyncPage-BFsgItgP.js +4 -0
  24. package/dashboard/dist/assets/{Tabs-BhkhdCvF.js → Tabs-CGfFE3L1.js} +1 -1
  25. package/dashboard/dist/assets/ToolsPage-DHhF-Y_W.js +1 -0
  26. package/dashboard/dist/assets/TooltipText-CfI7WgY4.js +1 -0
  27. package/dashboard/dist/assets/UiStudioPage-RAd0qXzL.js +11 -0
  28. package/dashboard/dist/assets/{WhatsNewPage-CBUk7WTn.js → WhatsNewPage-CLnx6v4u.js} +1 -1
  29. package/dashboard/dist/assets/copy-BIZzQcB-.js +6 -0
  30. package/dashboard/dist/assets/index-DYezp9b1.js +606 -0
  31. package/dashboard/dist/assets/index-Dd1aCYFM.css +1 -0
  32. package/dashboard/dist/assets/{sample-requests-D1b5Z8FU.js → sample-requests-CnV4bBG4.js} +1 -1
  33. package/dashboard/dist/assets/{useLiveUptime-BHqJirBV.js → useLiveUptime-BYmnk4Ph.js} +1 -1
  34. package/dashboard/dist/assets/useSettings-Bsfu70PT.css +1 -0
  35. package/dashboard/dist/assets/useSettings-HzhprVq7.js +1 -0
  36. package/dashboard/dist/index.html +2 -2
  37. package/dist/index.js +93 -93
  38. package/package.json +1 -1
  39. package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
  40. package/dashboard/dist/assets/AssetsPage-BQGliX7Q.css +0 -1
  41. package/dashboard/dist/assets/AssetsPage-yddSUaZg.js +0 -51
  42. package/dashboard/dist/assets/ChangelogDetailPage-BiiG5ZpO.js +0 -1
  43. package/dashboard/dist/assets/ChangelogPage-oIxW8_VE.js +0 -1
  44. package/dashboard/dist/assets/ConfirmModal-CpImpY9c.js +0 -1
  45. package/dashboard/dist/assets/ConnectionPage-CNtjimlm.css +0 -1
  46. package/dashboard/dist/assets/ConnectionPage-zGBwRnwi.js +0 -1
  47. package/dashboard/dist/assets/PageHeader-CThGgsAt.js +0 -6
  48. package/dashboard/dist/assets/PlaytestPage-CQqE8m04.js +0 -11
  49. package/dashboard/dist/assets/SettingsPage-DX6vgUTw.js +0 -1
  50. package/dashboard/dist/assets/SettingsPage-d0wOFs8U.css +0 -1
  51. package/dashboard/dist/assets/SyncPage-cfQ-4IDk.js +0 -4
  52. package/dashboard/dist/assets/ToolsPage-B004HHzX.js +0 -1
  53. package/dashboard/dist/assets/TooltipText-H3YSCbob.js +0 -1
  54. package/dashboard/dist/assets/UiStudioPage-CwURRVO9.js +0 -11
  55. package/dashboard/dist/assets/index-CjzKb5lS.css +0 -1
  56. package/dashboard/dist/assets/index-DG2RrKOl.js +0 -532
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weppy/roblox-mcp",
3
- "version": "2.8.2",
3
+ "version": "2.9.1",
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": "dist/index.js",
6
6
  "type": "module",
Binary file
@@ -1 +0,0 @@
1
- ._page_8op6c_1{display:flex;flex-direction:column;gap:14px;min-height:100%;max-width:var(--content-max)}._experimentalBadge_8op6c_9{display:inline-flex;align-items:center;min-height:20px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--border));border-radius:4px;background:color-mix(in srgb,var(--accent) 14%,var(--bg-card));color:var(--accent);padding:0 7px;font-family:var(--font-label);font-size:11px;line-height:1}._toolbarShell_8op6c_23{position:relative;z-index:30;border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:12px 0}._toolbar_8op6c_23{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._toolbar_8op6c_23>._segmented_8op6c_39{order:1}._toolbar_8op6c_23>._listContextSummary_8op6c_43{order:2;flex:1 1 auto;min-width:220px}._toolbar_8op6c_23>._toolbarActions_8op6c_49{order:3;margin-left:auto}._categoryControl_8op6c_54{order:4;display:inline-flex;align-items:center;gap:8px;width:100%;min-width:0;flex:1 0 100%}._listContextSummary_8op6c_43{color:var(--text-secondary);font-size:12px;line-height:1.4}._listContextSummary_8op6c_43 strong{color:var(--text-primary);font-family:var(--font-label);font-weight:600}._contextDivider_8op6c_76{color:var(--text-muted)}._categoryControlLabel_8op6c_80{flex:0 0 auto;color:var(--text-secondary);font-size:12px}._categoryRail_8op6c_86{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}._categoryButton_8op6c_94{min-height:32px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-secondary);padding:0 10px;font-family:var(--font-label);font-size:12px;line-height:1;cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition)}._categoryButton_8op6c_94:hover{border-color:var(--accent);color:var(--text-primary)}._categoryButton_8op6c_94:disabled{cursor:not-allowed;opacity:.48}._categoryButton_8op6c_94:disabled:hover{border-color:var(--border);color:var(--text-secondary)}._categoryButtonActive_8op6c_123{border-color:color-mix(in srgb,var(--accent) 76%,var(--border));background:var(--accent-dim);color:var(--accent)}._toolbarActions_8op6c_49,._actionRow_8op6c_130,._copyRow_8op6c_131,._buttonRow_8op6c_132{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._segmented_8op6c_39{display:inline-flex;min-height:32px;border:1px solid var(--border);border-radius:6px;overflow:hidden;background:var(--bg-card)}._segmented_8op6c_39 button{border:0;border-right:1px solid var(--border);background:transparent;color:var(--text-secondary);padding:0 10px;font-family:var(--font-label);font-size:12px;cursor:pointer}._segmented_8op6c_39 button:last-child{border-right:0}._segmented_8op6c_39 ._segmentedActive_8op6c_163{background:var(--accent-dim);color:var(--accent)}._filterLabel_8op6c_168{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}._filterLabel_8op6c_168 select{min-height:32px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);padding:0 8px;font:inherit}._commandButton_8op6c_186,._primaryButton_8op6c_187,._iconButton_8op6c_188{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--border);border-radius:4px;background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition),opacity var(--transition)}._commandButton_8op6c_186{min-height:32px;padding:6px 10px;text-decoration:none}._primaryButton_8op6c_187{min-height:34px;padding:7px 12px;border-color:var(--accent);color:var(--accent)}._iconButton_8op6c_188{width:32px;height:32px;padding:0}._commandButton_8op6c_186:hover,._primaryButton_8op6c_187:hover,._iconButton_8op6c_188:hover{border-color:var(--accent)}._dangerButton_8op6c_228{color:var(--error-text)}._dangerButton_8op6c_228:hover{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}._iconButtonActive_8op6c_238{border-color:var(--accent);background:var(--accent-dim);color:var(--accent)}._commandButton_8op6c_186:disabled,._primaryButton_8op6c_187:disabled,._iconButton_8op6c_188:disabled{cursor:not-allowed;opacity:.5}._grid_8op6c_251{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}._assetCard_8op6c_257{display:flex;flex-direction:column;gap:8px;min-width:0;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:8px;color:var(--text-primary);text-align:left;cursor:pointer}._assetCardSelected_8op6c_271{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 40%,transparent)}._thumbnailWrap_8op6c_276{display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border-radius:6px;background:var(--bg-secondary)}._thumbnail_8op6c_276{width:100%;height:100%;object-fit:contain}._thumbnailFallback_8op6c_292{display:grid;place-items:center;width:48px;height:48px;border:1px solid var(--border);border-radius:8px;color:var(--text-secondary);background:var(--bg-card)}._assetCardBody_8op6c_303{display:flex;flex-direction:column;gap:6px;min-width:0}._assetName_8op6c_310{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-label);font-size:13px}._assetMeta_8op6c_318{display:flex;align-items:center;justify-content:space-between;gap:8px}._statusChip_8op6c_325,._categoryPill_8op6c_326{border:1px solid var(--border);border-radius:4px;padding:2px 6px;font-size:11px;color:var(--text-secondary)}._categoryPill_8op6c_326{color:var(--text-primary);background:var(--bg-secondary)}._status_uploaded_8op6c_339{color:var(--success);border-color:var(--success)}._status_failed_8op6c_344{color:var(--error);border-color:var(--error)}._status_processing_8op6c_349,._status_uploading_8op6c_350{color:var(--warning);border-color:var(--warning)}._assetId_8op6c_355,._scopeText_8op6c_356,._muted_8op6c_357{color:var(--text-muted);font-size:12px}._emptyState_8op6c_362,._notice_8op6c_363,._errorState_8op6c_364,._messageState_8op6c_365{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);padding:14px;color:var(--text-secondary)}._emptyState_8op6c_362{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._emptyState_8op6c_362 p{margin:0;color:var(--text-primary);font-family:var(--font-label)}._notice_8op6c_363{color:var(--warning-text);border-color:var(--warning-border);background:var(--warning-bg)}._proNotice_8op6c_395{color:var(--pro-text);border-color:var(--pro-border);background:var(--pro-bg-soft)}._errorState_8op6c_364{color:var(--error);border-color:var(--error)}._messageState_8op6c_365{color:var(--success);border-color:var(--success)}._rbxmGuide_8op6c_411{display:flex;flex-direction:column;gap:6px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--border));border-radius:var(--radius);background:color-mix(in srgb,var(--accent) 8%,var(--bg-card));padding:14px}._rbxmGuide_8op6c_411 h2{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;letter-spacing:0}._rbxmGuide_8op6c_411 p{margin:0;max-width:760px;color:var(--text-secondary);font-size:12px;line-height:1.5}._drawer_8op6c_437{position:fixed;top:0;right:0;z-index:40;width:min(460px,100vw);height:100vh;overflow-y:auto;border-left:1px solid var(--border);background:var(--bg-primary);padding:18px;box-shadow:-12px 0 24px #00000047}._settingsInlinePanel_8op6c_451{position:absolute;top:calc(100% + 8px);right:0;z-index:35;display:flex;flex-direction:column;gap:12px;width:min(560px,100%);max-height:min(680px,calc(100vh - var(--header-height) - 112px));overflow-y:auto;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);padding:14px;box-shadow:0 18px 44px #00000057;animation:_settingsPopoverIn_8op6c_1 .12s ease-out;transform-origin:top right}._settingsDrawer_8op6c_471{width:min(560px,100%)}@keyframes _settingsPopoverIn_8op6c_1{0%{opacity:0;transform:translateY(-4px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}._detailPopupLayer_8op6c_487{position:fixed;top:calc(var(--header-height) + 16px);right:24px;bottom:24px;left:calc(var(--sidebar-width) + 24px);z-index:900;display:flex;align-items:stretch;justify-content:center;padding:clamp(12px,2vw,24px);background:#03071294;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-sizing:border-box}._detailDialog_8op6c_503{width:min(1120px,100%);min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);box-shadow:0 24px 60px #0000006b}._detailDialog_8op6c_503:focus{outline:none}._detailDialogHeader_8op6c_520{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg-card) 92%,var(--bg-secondary))}._detailTitleBlock_8op6c_531{min-width:0;display:flex;flex-direction:column;gap:3px}._detailTitleBlock_8op6c_531 h2{margin:0;font-size:18px;letter-spacing:0}._detailTitleBlock_8op6c_531 span:last-child{overflow:hidden;color:var(--text-muted);font-family:var(--font-code);font-size:12px;text-overflow:ellipsis;white-space:nowrap}._detailEyebrow_8op6c_553{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._detailHeaderActions_8op6c_562{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._detailDialogBody_8op6c_570{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.1fr);gap:0;overflow:hidden}._detailPreviewPane_8op6c_579{min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:24px;border-right:1px solid var(--border);background:var(--bg-secondary)}._detailPreview_8op6c_579,._detailPreviewFallback_8op6c_591{width:100%;max-width:520px;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._detailPreview_8op6c_579{display:block;object-fit:contain}._detailPreviewFallback_8op6c_591{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._detailPreviewFallback_8op6c_591 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._detailPreviewFallback_8op6c_591 small{max-width:88%;color:var(--text-muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere;text-align:center}._detailContentPane_8op6c_627{min-width:0;overflow-y:auto;padding:18px 22px 24px}._detailContentPane_8op6c_627 ._formStack_8op6c_633{margin-top:0}._drawerHeader_8op6c_637{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}._settingsInlinePanel_8op6c_451 ._drawerHeader_8op6c_637{margin-bottom:0}._drawerHeader_8op6c_637 h2{margin:0;font-size:18px;letter-spacing:0}._drawerHeader_8op6c_637 span{color:var(--text-muted);font-size:12px}._preview_8op6c_660,._previewFallback_8op6c_661{width:100%;aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);margin-bottom:14px}._preview_8op6c_660{object-fit:contain}._previewFallback_8op6c_661{display:grid;place-items:center;gap:8px;color:var(--text-secondary)}._previewFallback_8op6c_661 code{color:var(--text-muted);font-family:var(--font-code);font-size:12px}._formStack_8op6c_633,._detailSection_8op6c_688,._noticeList_8op6c_689,._settingsPanel_8op6c_690{display:flex;flex-direction:column;gap:10px;margin-top:14px}._noticeList_8op6c_689{color:var(--text-muted);font-size:12px;line-height:1.45}._noticeList_8op6c_689 p{margin:0}._setupNotice_8op6c_707{display:grid;gap:8px;margin-top:14px;border:1px solid var(--warning-border);border-radius:6px;background:var(--warning-bg);color:var(--warning-text);padding:12px;font-size:12px}._setupNotice_8op6c_707 strong{color:var(--text-primary);font-size:13px}._setupNotice_8op6c_707 p{margin:0}._setupNotice_8op6c_707 ._commandButton_8op6c_186{justify-self:start}._field_8op6c_732{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-secondary)}._fieldLabelRow_8op6c_740{display:flex;align-items:center;gap:4px;min-height:24px}._fieldLabelRow_8op6c_740 label,._fieldLabelRow_8op6c_740 span{min-width:0}._field_8op6c_732 input,._field_8op6c_732 textarea,._field_8op6c_732 select{width:100%;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);padding:8px;font:inherit}._fieldHelp_8op6c_764{color:var(--text-muted);line-height:1.35}._twoColumn_8op6c_769{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}._detailSection_8op6c_688{padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_8op6c_780{margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}._technicalDetails_8op6c_780 summary{cursor:pointer;color:var(--text-secondary);font-size:13px;font-weight:600}._technicalDetails_8op6c_780 summary:hover{color:var(--text-primary)}._technicalDetails_8op6c_780 ._detailGrid_8op6c_797,._technicalDetails_8op6c_780 ._metadataList_8op6c_798{margin-top:10px}._detailSection_8op6c_688 h3{margin:0;font-size:13px;letter-spacing:0}._detailGrid_8op6c_797,._compactMeta_8op6c_809{display:grid;grid-template-columns:90px minmax(0,1fr);gap:6px 10px;margin:0;font-size:12px}._compactMeta_8op6c_809{border:1px solid var(--border);border-radius:6px;padding:10px;background:var(--bg-card)}._detailGrid_8op6c_797 dt,._compactMeta_8op6c_809 dt{color:var(--text-muted)}._detailGrid_8op6c_797 dd,._compactMeta_8op6c_809 dd{margin:0;min-width:0;overflow-wrap:anywhere}._copyableValue_8op6c_836{display:inline-flex;align-items:center;gap:6px}._copyableValue_8op6c_836 span{min-width:0;overflow-wrap:anywhere}._inlineCopyButton_8op6c_847{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text-muted);cursor:pointer;transition:border-color var(--transition),color var(--transition),background var(--transition)}._inlineCopyButton_8op6c_847:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}._hashText_8op6c_868{font-family:var(--font-code)}._usageList_8op6c_872{display:flex;flex-direction:column;gap:8px}._usageItem_8op6c_878,._metadataItem_8op6c_879{display:grid;gap:4px;border:1px solid var(--border);border-radius:6px;padding:8px;background:var(--bg-card);font-size:12px}._metadataList_8op6c_798{display:flex;flex-direction:column;gap:8px}._metadataList_8op6c_798 strong,._usageItem_8op6c_878 strong{color:var(--text-primary);overflow-wrap:anywhere}._metadataItem_8op6c_879 span{color:var(--text-secondary);overflow-wrap:anywhere}._metadataItem_8op6c_879 code,._usageItem_8op6c_878 code{color:var(--accent);overflow-wrap:anywhere}._settingsPanel_8op6c_690{border:1px solid var(--border);border-radius:8px;padding:12px;background:var(--bg-card)}._settingsInlinePanel_8op6c_451 ._settingsPanel_8op6c_690{border:0;border-radius:0;background:transparent;padding:0;margin-top:0}._settingsSubsection_8op6c_927{display:grid;gap:8px}._settingsSectionHeader_8op6c_932{display:flex;align-items:center;justify-content:space-between;gap:10px}._settingsSectionHeader_8op6c_932 h3{margin:0;color:var(--text-primary);font-size:13px}._settingsDefinitionList_8op6c_945{display:grid;gap:6px;margin:0}._settingsDefinitionList_8op6c_945 div{display:grid;grid-template-columns:minmax(96px,max-content) minmax(0,1fr);gap:10px}._settingsDefinitionList_8op6c_945 dt{color:var(--text-muted)}._settingsDefinitionList_8op6c_945 dd{margin:0;color:var(--text-primary);overflow-wrap:anywhere}._toggleRow_8op6c_967{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px}._toggleRow_8op6c_967 span{display:grid;gap:3px}._toggleRow_8op6c_967 small,._inlineHelp_8op6c_981{color:var(--text-muted);font-size:12px}._toggleRow_8op6c_967 input{width:18px;height:18px}._inlineHelp_8op6c_981{margin:0}._inlineHelp_8op6c_981 a{color:var(--accent)}@media(max-width:1120px){._detailPopupLayer_8op6c_487{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}._detailDialogBody_8op6c_570{grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr)}}@media(max-width:820px){._detailPopupLayer_8op6c_487{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}._detailDialogHeader_8op6c_520{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._detailHeaderActions_8op6c_562{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._detailDialogBody_8op6c_570{grid-template-columns:minmax(0,1fr);overflow-y:auto}._detailPreviewPane_8op6c_579{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--border)}._detailPreview_8op6c_579,._detailPreviewFallback_8op6c_591{max-width:340px}._detailContentPane_8op6c_627{overflow:visible;padding:14px}}@media(max-width:720px){._headerRow_8op6c_1058,._toolbar_8op6c_23{align-items:stretch;flex-direction:column}._headerMeta_8op6c_1064{justify-items:start}._toolbarActions_8op6c_49{justify-content:flex-start}._settingsInlinePanel_8op6c_451{right:auto;left:0;width:100%;transform-origin:top left}._twoColumn_8op6c_769{grid-template-columns:1fr}}
@@ -1,51 +0,0 @@
1
- import{q as se,a as w,s as be,u as he,j as t,P as dt,I as ut,r as i,t as pt,R as He,X as Ie,E as ht,v as Ke,k as mt,i as gt,m as xt}from"./index-DG2RrKOl.js";import{C as Ge}from"./ConfirmModal-CpImpY9c.js";import{D as Pe,P as bt}from"./PageHeader-CThGgsAt.js";import{T as H}from"./TooltipText-H3YSCbob.js";/**
2
- * @license lucide-react v1.8.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const yt=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ft=se("arrow-left",yt);/**
7
- * @license lucide-react v1.8.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const jt=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],vt=se("audio-lines",jt);/**
12
- * @license lucide-react v1.8.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const Ct=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}]],_t=se("badge",Ct);/**
17
- * @license lucide-react v1.8.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const St=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],At=se("box",St);/**
22
- * @license lucide-react v1.8.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const Nt=[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]],It=se("clapperboard",Nt);/**
27
- * @license lucide-react v1.8.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const kt=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],We=se("copy",kt);/**
32
- * @license lucide-react v1.8.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const Pt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],Rt=se("film",Pt);/**
37
- * @license lucide-react v1.8.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const wt=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$t=se("search",wt);/**
42
- * @license lucide-react v1.8.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const Lt=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Bt=se("trash-2",Lt);/**
47
- * @license lucide-react v1.8.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const Dt=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Et=se("upload",Dt);function ze(e){if(e.scope==="place"&&typeof e.placeId=="number")return{placeId:String(e.placeId)}}function Q(e){const a=ze(e);return a?`?placeId=${encodeURIComponent(a.placeId)}`:""}function ye(e){return`/api/assets/${encodeURIComponent(e.scope)}/${encodeURIComponent(e.category)}`}function ce(e,a){return`${ye(e)}/${encodeURIComponent(a)}`}async function Ut(e){return w.get(ye(e),ze(e))}async function Tt(e){return w.post(`${ye(e)}/rescan${Q(e)}`,{})}async function Ot(e,a,u){return(await w.patch(`${ce(e,a)}${Q(e)}`,u)).asset}async function Ft(e,a){return w.delete(`${ce(e,a)}${Q(e)}`)}async function Mt(e,a,u){return(await w.post(`${ce(e,a)}/upload${Q(e)}`,u)).asset}async function Re(e,a){return(await w.post(`${ce(e,a)}/status-refresh${Q(e)}`,{})).asset}async function Ht(e,a,u){const o={...e,placeId:u??e.placeId};return w.post(`${ce(e,a)}/usage-scan${Q(o)}`,{})}async function Kt(e,a){return w.post(`${ye(e)}/export-selection-rbxm${Q(e)}`,a)}async function Gt(e,a,u){return w.post(`${ce(e,a)}/import-rbxm${Q(e)}`,u)}async function Wt(e,a){return(await w.post(`${ce(e,a)}/thumbnail-generate${Q(e)}`,{})).asset}function Ve(e){return e.fileUrl?`${be}${e.fileUrl}`:`${be}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/file${Q({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}function Ye(e){return e.previewUrl?`${be}${e.previewUrl}`:`${be}/api/assets/${e.scope.kind}/${e.category}/${encodeURIComponent(e.id)}/preview${Q({scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0})}`}const Xe=["all","image","decal","rbxm"],zt=new Set(Xe),we=["model","animation"];function ge(e){return/\.(rbxm|rbxmx)$/i.test(e.file.original)}function Vt(e){return zt.has(e)}function Ae(e,a){return e==="all"?a("assets.category.all","All"):a(`assets.category.${e}`,e==="rbxm"?"RBXM":e)}function ie(e,a){return Ae(ge(e)?"rbxm":e.category,a)}function $e(e){return e==="all"?["image","decal",...we]:e==="rbxm"?we:[e]}function Yt(e,a){return a==="all"?e.category==="image"||e.category==="decal"||ge(e):a==="rbxm"?ge(e):(a==="model"||a==="animation")&&ge(e)?!1:e.category===a}function Xt(e){return[...e].sort((a,u)=>u.createdAt.localeCompare(a.createdAt)||u.id.localeCompare(a.id))}const qt="_page_8op6c_1",Zt="_experimentalBadge_8op6c_9",Jt="_toolbarShell_8op6c_23",Qt="_toolbar_8op6c_23",es="_segmented_8op6c_39",ts="_listContextSummary_8op6c_43",ss="_toolbarActions_8op6c_49",as="_categoryControl_8op6c_54",os="_contextDivider_8op6c_76",ns="_categoryControlLabel_8op6c_80",rs="_categoryRail_8op6c_86",ls="_categoryButton_8op6c_94",is="_categoryButtonActive_8op6c_123",cs="_actionRow_8op6c_130",ds="_copyRow_8op6c_131",us="_buttonRow_8op6c_132",ps="_segmentedActive_8op6c_163",hs="_filterLabel_8op6c_168",ms="_commandButton_8op6c_186",gs="_primaryButton_8op6c_187",xs="_iconButton_8op6c_188",bs="_dangerButton_8op6c_228",ys="_iconButtonActive_8op6c_238",fs="_grid_8op6c_251",js="_assetCard_8op6c_257",vs="_assetCardSelected_8op6c_271",Cs="_thumbnailWrap_8op6c_276",_s="_thumbnail_8op6c_276",Ss="_thumbnailFallback_8op6c_292",As="_assetCardBody_8op6c_303",Ns="_assetName_8op6c_310",Is="_assetMeta_8op6c_318",ks="_statusChip_8op6c_325",Ps="_categoryPill_8op6c_326",Rs="_status_uploaded_8op6c_339",ws="_status_failed_8op6c_344",$s="_status_processing_8op6c_349",Ls="_status_uploading_8op6c_350",Bs="_assetId_8op6c_355",Ds="_scopeText_8op6c_356",Es="_muted_8op6c_357",Us="_emptyState_8op6c_362",Ts="_notice_8op6c_363",Os="_errorState_8op6c_364",Fs="_messageState_8op6c_365",Ms="_proNotice_8op6c_395",Hs="_rbxmGuide_8op6c_411",Ks="_drawer_8op6c_437",Gs="_settingsInlinePanel_8op6c_451",Ws="_settingsPopoverIn_8op6c_1",zs="_settingsDrawer_8op6c_471",Vs="_detailPopupLayer_8op6c_487",Ys="_detailDialog_8op6c_503",Xs="_detailDialogHeader_8op6c_520",qs="_detailTitleBlock_8op6c_531",Zs="_detailEyebrow_8op6c_553",Js="_detailHeaderActions_8op6c_562",Qs="_detailDialogBody_8op6c_570",ea="_detailPreviewPane_8op6c_579",ta="_detailPreview_8op6c_579",sa="_detailPreviewFallback_8op6c_591",aa="_detailContentPane_8op6c_627",oa="_formStack_8op6c_633",na="_drawerHeader_8op6c_637",ra="_preview_8op6c_660",la="_previewFallback_8op6c_661",ia="_detailSection_8op6c_688",ca="_noticeList_8op6c_689",da="_settingsPanel_8op6c_690",ua="_setupNotice_8op6c_707",pa="_field_8op6c_732",ha="_fieldLabelRow_8op6c_740",ma="_fieldHelp_8op6c_764",ga="_twoColumn_8op6c_769",xa="_technicalDetails_8op6c_780",ba="_detailGrid_8op6c_797",ya="_metadataList_8op6c_798",fa="_compactMeta_8op6c_809",ja="_copyableValue_8op6c_836",va="_inlineCopyButton_8op6c_847",Ca="_hashText_8op6c_868",_a="_usageList_8op6c_872",Sa="_usageItem_8op6c_878",Aa="_metadataItem_8op6c_879",Na="_settingsSubsection_8op6c_927",Ia="_settingsSectionHeader_8op6c_932",ka="_settingsDefinitionList_8op6c_945",Pa="_toggleRow_8op6c_967",Ra="_inlineHelp_8op6c_981",wa="_headerRow_8op6c_1058",$a="_headerMeta_8op6c_1064",s={page:qt,experimentalBadge:Zt,toolbarShell:Jt,toolbar:Qt,segmented:es,listContextSummary:ts,toolbarActions:ss,categoryControl:as,contextDivider:os,categoryControlLabel:ns,categoryRail:rs,categoryButton:ls,categoryButtonActive:is,actionRow:cs,copyRow:ds,buttonRow:us,segmentedActive:ps,filterLabel:hs,commandButton:ms,primaryButton:gs,iconButton:xs,dangerButton:bs,iconButtonActive:ys,grid:fs,assetCard:js,assetCardSelected:vs,thumbnailWrap:Cs,thumbnail:_s,thumbnailFallback:Ss,assetCardBody:As,assetName:Ns,assetMeta:Is,statusChip:ks,categoryPill:Ps,status_uploaded:Rs,status_failed:ws,status_processing:$s,status_uploading:Ls,assetId:Bs,scopeText:Ds,muted:Es,emptyState:Us,notice:Ts,errorState:Os,messageState:Fs,proNotice:Ms,rbxmGuide:Hs,drawer:Ks,settingsInlinePanel:Gs,settingsPopoverIn:Ws,settingsDrawer:zs,detailPopupLayer:Vs,detailDialog:Ys,detailDialogHeader:Xs,detailTitleBlock:qs,detailEyebrow:Zs,detailHeaderActions:Js,detailDialogBody:Qs,detailPreviewPane:ea,detailPreview:ta,detailPreviewFallback:sa,detailContentPane:aa,formStack:oa,drawerHeader:na,preview:ra,previewFallback:la,detailSection:ia,noticeList:ca,settingsPanel:da,setupNotice:ua,field:pa,fieldLabelRow:ha,fieldHelp:ma,twoColumn:ga,technicalDetails:xa,detailGrid:ba,metadataList:ya,compactMeta:fa,copyableValue:ja,inlineCopyButton:va,hashText:Ca,usageList:_a,usageItem:Sa,metadataItem:Aa,settingsSubsection:Na,settingsSectionHeader:Ia,settingsDefinitionList:ka,toggleRow:Pa,inlineHelp:Ra,headerRow:wa,headerMeta:$a},La={image:ut,decal:_t,audio:vt,mesh:At,model:dt,video:Rt,animation:It};function Ne(e,a){return a(`assets.status.${e}`,e)}function Ba(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Da(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId:e.roblox.assetId}function Ea({assets:e,selectedAssetId:a,onSelect:u}){const{t:o}=he();return e.length===0?t.jsxs("div",{className:s.emptyState,children:[t.jsx("p",{children:o("assets.empty.title","No assets yet")}),t.jsx("span",{children:o("assets.empty.body","Choose a scope and category, then rescan that inbox folder.")})]}):t.jsx("div",{className:s.grid,children:e.map(l=>{const $=La[l.category],C=Da(l);return t.jsxs("button",{type:"button",className:[s.assetCard,a===l.id?s.assetCardSelected:""].filter(Boolean).join(" "),onClick:()=>u(l.id),children:[t.jsx("span",{className:s.thumbnailWrap,children:Ba(l)?t.jsx("img",{className:s.thumbnail,src:Ye(l),alt:l.displayName,loading:"lazy"}):t.jsx("span",{className:s.thumbnailFallback,"aria-hidden":"true",children:t.jsx($,{size:30})})}),t.jsxs("span",{className:s.assetCardBody,children:[t.jsx("span",{className:s.assetName,children:l.displayName}),t.jsxs("span",{className:s.assetMeta,children:[t.jsx("span",{className:s.categoryPill,children:ie(l,o)}),t.jsx("span",{className:`${s.statusChip} ${s[`status_${l.status}`]??""}`,children:Ne(l.status,o)})]}),t.jsxs("span",{className:s.assetMeta,children:[t.jsx("span",{className:s.scopeText,children:l.scope.kind==="shared"?o("assets.scope.shared","Shared"):o("assets.scope.place","Current Place")}),t.jsx("span",{className:s.assetId,children:C?`#${C}`:o("assets.status.localOnly","Local only")})]})]})]},l.id)})})}const Ua="https://create.roblox.com/dashboard/creations/store",Ta=/^https:\/\/create\.roblox\.com\/store\/asset\/\d+(?:\/.*)?$/;function Oa(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function xe(e){const a=new Date(e);if(Number.isNaN(a.getTime()))return e;const u=a.getFullYear(),o=String(a.getMonth()+1).padStart(2,"0"),l=String(a.getDate()).padStart(2,"0"),$=String(a.getHours()).padStart(2,"0"),C=String(a.getMinutes()).padStart(2,"0");return`${u}-${o}-${l} ${$}:${C}`}function Fa(e){return e.category==="image"||e.category==="decal"||!!e.file.preview}function Ma(e){return e.file.preview?Ye(e):Ve(e)}function Ha(e){var u;const a=Object.entries(((u=e.rbxm)==null?void 0:u.classCounts)??{}).sort((o,l)=>l[1]-o[1]).slice(0,8);return a.length===0?"-":a.map(([o,l])=>`${o} ${l}`).join(", ")}function Le(e){var l;const a=(l=e.rbxm)==null?void 0:l.thumbnail;if(!a)return"-";const u=a.source?` via ${a.source}`:"",o=a.message?` · ${a.message}`:"";return`${a.status}${u}${o}`}function Be(e){const{width:a,height:u}=e.file;return a===null||u===null?null:`${a} x ${u}px`}function De(e){const{durationMs:a}=e.file;return a===null?null:a<1e3?`${a} ms`:`${(a/1e3).toFixed(1)} s`}function Ka(e){return`${Ua}/${e}/configure`}function Ga(e){return e.category==="decal"?e.roblox.creatorAssetId??e.roblox.assetId??null:e.roblox.assetId??null}function Wa(e){const a=Ga(e),u=a?Ka(a):null,o=e.category==="decal"?e.roblox.creatorAssetWebUrl??e.roblox.assetWebUrl:e.roblox.assetWebUrl;return!o||u&&Ta.test(o)?u:o}function za(e){return`${xe(e.startedAt)} -> ${e.status}`}function Ee(e){return!e.creatorType||!e.creatorId?null:`${e.creatorType} ${e.creatorId}`}function Ue(e){return e.assetRole?`Asset role: ${e.assetRole}`:null}function me({label:e,value:a}){return a?t.jsx("button",{type:"button",className:s.inlineCopyButton,"aria-label":e,title:e,onClick:()=>{var u;return void((u=navigator.clipboard)==null?void 0:u.writeText(a))},children:t.jsx(We,{size:13})}):null}function Va({asset:e,busyAction:a,canUpload:u,canImportRbxm:o,importRbxmTooltip:l,importRbxmTargetParent:$,onClose:C,onSave:D,onUpload:p,onDelete:G,onImportRbxm:O,onRefreshStatus:U,onScanUsage:m}){var L,A;const{t:n}=he(),W=i.useRef(null),[K,V]=i.useState(""),[F,X]=i.useState("");if(i.useEffect(()=>{V((e==null?void 0:e.displayName)??""),X((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{var g;if(!e)return;(g=W.current)==null||g.focus();const r=Z=>{Z.key==="Escape"&&C()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,C]),!e)return null;const k=e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath),q=!!e.roblox.assetUri,f=Wa(e),P=e.roblox.uploadAttempts??[],S=e.category==="decal"&&!!(e.roblox.creatorAssetId||e.roblox.backingImageAssetId||e.roblox.assetId),z=e.roblox.creatorAssetId??e.roblox.assetId,j=e.roblox.backingImageAssetId??e.roblox.assetId,v=e.roblox.assetId?e.usage.lastScannedAt?n("assets.detail.noUsageAfterScan","No references were found in local Sync files during the last check."):n("assets.detail.noUsageUnscanned","Run Scan usage to search local Sync files for this Roblox Asset ID."):n("assets.detail.noUsageNoRobloxId","This asset does not have a Roblox Asset ID yet, so usage cannot be checked. Upload it before scanning usage.");return t.jsx("div",{className:s.detailPopupLayer,onClick:C,role:"presentation",children:t.jsxs("section",{ref:W,className:s.detailDialog,role:"dialog","aria-modal":"true","aria-label":n("assets.detail.title","Asset details"),tabIndex:-1,onClick:r=>r.stopPropagation(),children:[t.jsxs("div",{className:s.detailDialogHeader,children:[t.jsxs("div",{className:s.detailTitleBlock,children:[t.jsxs("span",{className:s.detailEyebrow,children:[ie(e,n)," · ",Ne(e.status,n)]}),t.jsx("h2",{children:e.displayName}),t.jsx("span",{children:e.id})]}),t.jsxs("div",{className:s.detailHeaderActions,children:[t.jsx(H,{text:u?n("assets.upload.open.tooltip","Upload this local file to Roblox through Open Cloud."):n("assets.proOnly.tooltip","Roblox upload is available on Pro."),children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:!u,onClick:p,children:[t.jsx(Et,{size:15}),n("assets.upload.open","Upload")]})}),o&&t.jsx(H,{text:l,children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:a==="import-rbxm",onClick:()=>void O(),children:[t.jsx(pt,{size:15}),n("assets.detail.importRbxm","Insert into Studio")]})}),t.jsxs("button",{type:"button",className:s.commandButton,disabled:!k||a==="status-refresh",onClick:()=>void U(),children:[t.jsx(He,{size:15}),n("assets.detail.refreshStatus","Refresh")]}),t.jsxs("button",{type:"button",className:s.commandButton,disabled:!e.roblox.assetId||a==="usage-scan",onClick:()=>void m(),children:[t.jsx($t,{size:15}),n("assets.detail.scanUsage","Scan usage")]}),t.jsx(H,{text:n("assets.delete.tooltip","Delete this local Asset Library item."),children:t.jsxs("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:a==="delete",onClick:G,children:[t.jsx(Bt,{size:15}),n("common.delete","Delete")]})}),t.jsx(H,{text:n("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:C,"aria-label":n("common.close","Close"),children:t.jsx(Ie,{size:16})})})]})]}),t.jsxs("div",{className:s.detailDialogBody,children:[t.jsx("div",{className:s.detailPreviewPane,children:Fa(e)?t.jsx("img",{className:s.detailPreview,src:Ma(e),alt:e.displayName}):t.jsxs("div",{className:s.detailPreviewFallback,children:[t.jsx("span",{children:ie(e,n)}),t.jsx("code",{children:e.file.original}),((L=e.rbxm)==null?void 0:L.thumbnail)&&t.jsx("small",{children:Le(e)})]})}),t.jsxs("div",{className:s.detailContentPane,children:[t.jsxs("div",{className:s.formStack,children:[t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:n("assets.detail.displayName","Display name")}),t.jsx("input",{value:K,onChange:r=>V(r.target.value)})]}),t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:n("assets.detail.description","Description")}),t.jsx("textarea",{value:F,rows:3,onChange:r=>X(r.target.value)})]}),t.jsx("button",{type:"button",className:s.primaryButton,disabled:a==="update",onClick:()=>void D(K,F),children:n("assets.detail.save","Save metadata")})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.localFile","Local file")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.fileName","File")}),t.jsx("dd",{children:e.file.original}),t.jsx("dt",{children:n("assets.detail.source","Source path")}),t.jsx("dd",{children:e.source.originalPath}),t.jsx("dt",{children:n("assets.detail.category","Category")}),t.jsx("dd",{children:ie(e,n)}),t.jsx("dt",{children:n("assets.detail.scope","Scope")}),t.jsx("dd",{children:e.scope.kind==="shared"?n("assets.scope.shared","Shared"):n("assets.scope.place","Current Place")}),t.jsx("dt",{children:n("assets.detail.mimeType","Type")}),t.jsx("dd",{children:e.file.mimeType}),t.jsx("dt",{children:n("assets.detail.size","Size")}),t.jsx("dd",{children:Oa(e.file.sizeBytes)}),Be(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.dimensions","Dimensions")}),t.jsx("dd",{children:Be(e)})]}),De(e)&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.duration","Duration")}),t.jsx("dd",{children:De(e)})]})]})]}),e.rbxm&&t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.rbxm","RBXM contents")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.rbxmExportedCount","Exported roots")}),t.jsx("dd",{children:e.rbxm.exportedCount}),t.jsx("dt",{children:n("assets.detail.rbxmClasses","Classes")}),t.jsx("dd",{children:Ha(e)}),t.jsx("dt",{children:n("assets.detail.rbxmThumbnail","Thumbnail")}),t.jsx("dd",{children:Le(e)}),o&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.studioInsertTarget","Studio insert target")}),t.jsx("dd",{children:$})]})]}),e.rbxm.roots.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.rbxmRoots","Root tree")}),e.rbxm.roots.map(r=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[r.name," (",r.className,")"]}),t.jsx("code",{children:r.path})]},`${r.path}-${r.className}`))]}),e.rbxm.resourceReferences.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.rbxmReferences","Asset references")}),e.rbxm.resourceReferences.map((r,g)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[r.path," · ",r.property]}),t.jsx("code",{children:r.assetId?`${r.value} (#${r.assetId})`:r.value})]},`${r.path}-${r.property}-${g}`))]})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.roblox","Roblox upload status")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.status","Status")}),t.jsx("dd",{children:Ne(e.status,n)}),S?t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.decalAssetId","Roblox Decal ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:z??n("assets.status.localOnly","Local only")}),t.jsx(me,{label:n("assets.detail.copyDecalAssetId","Copy Roblox Decal ID"),value:z})]}),t.jsx("dt",{children:n("assets.detail.studioTextureImageId","Studio Texture Image ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:j??"-"}),t.jsx(me,{label:n("assets.detail.copyStudioTextureImageId","Copy Studio Texture Image ID"),value:j})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.assetId","Asset ID")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:e.roblox.assetId??n("assets.status.localOnly","Local only")}),t.jsx(me,{label:n("assets.detail.copyAssetId","Copy Asset ID"),value:e.roblox.assetId})]})]}),t.jsx("dt",{children:n("assets.detail.studioUri","Studio URI")}),t.jsx("dd",{children:e.roblox.assetUri??"-"}),t.jsx("dt",{children:n("assets.detail.robloxWebUrl","Creator Dashboard URL")}),t.jsxs("dd",{className:s.copyableValue,children:[t.jsx("span",{children:f??"-"}),t.jsx(me,{label:n("assets.detail.copyWebUrl","Copy configure URL"),value:f})]}),e.roblox.errorMessage&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.error","Error")}),t.jsx("dd",{children:e.roblox.errorMessage})]})]}),t.jsxs("div",{className:s.copyRow,children:[t.jsxs("button",{type:"button",className:s.commandButton,disabled:!q,onClick:()=>{var r;return e.roblox.assetUri&&void((r=navigator.clipboard)==null?void 0:r.writeText(e.roblox.assetUri))},children:[t.jsx(We,{size:15}),n("assets.detail.copyStudioUri","Copy Studio URI")]}),f&&t.jsxs("a",{className:s.commandButton,href:f,target:"_blank",rel:"noreferrer",children:[t.jsx(ht,{size:15}),n("assets.detail.openRobloxPage","Open configure page")]})]}),e.roblox.assetId&&t.jsx("p",{className:s.muted,children:n("assets.detail.robloxWebUrlNotice","Opening this page requires the Roblox account that owns or can manage the uploaded asset.")}),P.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.uploadHistory","Upload history")}),P.slice().reverse().map((r,g)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsx("span",{children:za(r)}),Ee(r)&&t.jsx("code",{children:Ee(r)}),Ue(r)&&t.jsx("code",{children:Ue(r)}),r.operationPath&&t.jsx("code",{children:r.operationPath}),r.assetId&&t.jsxs("code",{children:[n("assets.detail.assetId","Asset ID"),": ",r.assetId]}),r.remotePath&&t.jsx("code",{children:r.remotePath}),r.message&&t.jsx("code",{children:r.message}),r.errorMessage&&t.jsx("code",{children:r.errorMessage})]},`${r.startedAt}-${r.operationPath??g}`))]})]}),t.jsxs("section",{className:s.detailSection,children:[t.jsx("h3",{children:n("assets.detail.usedInPlace","Where this asset is used in this Place")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.usageSource","Checked against")}),t.jsx("dd",{children:e.usage.scanSource==="localSync"?n("assets.detail.usageSource.localSync","Local Sync files"):n("assets.detail.usageSource.notScanned","Not checked yet")}),t.jsx("dt",{children:n("assets.detail.lastScanned","Last checked")}),t.jsx("dd",{children:e.usage.lastScannedAt?n("assets.detail.lastScannedAt","Last checked: {time}").replace("{time}",xe(e.usage.lastScannedAt)):n("assets.detail.lastScanned.never","No check yet")})]}),e.usage.references.length===0?t.jsx("p",{className:s.muted,children:v}):t.jsx("div",{className:s.usageList,children:e.usage.references.map((r,g)=>t.jsxs("div",{className:s.usageItem,children:[t.jsx("strong",{children:r.kind==="property"?r.instancePath:r.filePath}),t.jsx("span",{children:r.property??n("assets.detail.line","line {line}").replace("{line}",String(r.line??"-"))}),t.jsx("code",{children:r.value})]},`${r.kind}-${g}`))})]}),t.jsxs("details",{className:s.technicalDetails,children:[t.jsx("summary",{children:n("assets.detail.technicalDetails","Technical details")}),t.jsxs("dl",{className:s.detailGrid,children:[t.jsx("dt",{children:n("assets.detail.stableId","Stable ID")}),t.jsx("dd",{className:s.hashText,children:e.id}),t.jsx("dt",{children:n("assets.detail.sourceKind","Source kind")}),t.jsx("dd",{children:e.source.kind}),t.jsx("dt",{children:n("assets.detail.sha256","SHA-256")}),t.jsx("dd",{className:s.hashText,children:e.file.sha256}),t.jsx("dt",{children:n("assets.detail.createdAt","Created")}),t.jsx("dd",{children:xe(e.createdAt)}),t.jsx("dt",{children:n("assets.detail.updatedAt","Updated")}),t.jsx("dd",{children:xe(e.updatedAt)}),e.roblox.operationId&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.operationId","Operation ID")}),t.jsx("dd",{className:s.hashText,children:e.roblox.operationId})]}),e.roblox.operationPath&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.operationPath","Operation path")}),t.jsx("dd",{className:s.hashText,children:e.roblox.operationPath})]}),e.roblox.versionId&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.versionId","Version ID")}),t.jsx("dd",{className:s.hashText,children:e.roblox.versionId})]}),e.roblox.remotePath&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.remotePath","Remote path")}),t.jsx("dd",{className:s.hashText,children:e.roblox.remotePath})]}),e.roblox.moderationState&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:n("assets.detail.moderationState","Moderation")}),t.jsx("dd",{children:e.roblox.moderationState})]})]}),((A=e.rbxm)==null?void 0:A.thumbnail.attempts)&&e.rbxm.thumbnail.attempts.length>0&&t.jsxs("div",{className:s.metadataList,children:[t.jsx("strong",{children:n("assets.detail.rbxmThumbnailAttempts","Thumbnail attempts")}),e.rbxm.thumbnail.attempts.map((r,g)=>t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("span",{children:[r.method," · ",r.status]}),r.message&&t.jsx("code",{children:r.message})]},`${r.method}-${g}`))]})]})]})]})]})})}function qe(e){return{assetUploadByOpenCloudEnabled:e.hot.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD===!0}}function Ya(e){const a={};return typeof e.assetUploadByOpenCloudEnabled=="boolean"&&(a.ENABLE_ASSET_UPLOAD_BY_OPEN_CLOUD=e.assetUploadByOpenCloudEnabled),a}async function Ze(){const e=await w.get("/api/dashboard/settings");return qe(e)}async function Xa(e){const a=await w.patch("/api/dashboard/settings",Ya(e));return qe(a)}async function Je(){return w.get("/api/dashboard/open-cloud/credential-profiles")}async function qa(e){return w.post("/api/dashboard/open-cloud/credential-profiles",e)}async function Za(e){return w.patch("/api/dashboard/open-cloud/credential-profiles/active",{profileId:e})}async function Ja(e,a){return w.put(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/api-key`,a)}async function Qa(e){return w.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}`)}async function eo(e,a){return w.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators`,a)}async function to(e,a){return w.patch(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(a)}/default`,{})}async function so(e,a){return w.delete(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/creators/${encodeURIComponent(a)}`)}async function ao(e,a){return w.post(`/api/dashboard/open-cloud/credential-profiles/${encodeURIComponent(e)}/test`,a?{creatorPresetId:a}:{})}async function oo(e){return w.post("/api/dashboard/open-cloud/credential/test",e?{apiKey:e}:{})}function no(e){return e.category==="image"||e.category==="decal"}function ro(e,a){return e==="group"?a("assets.creator.group","Group"):a("assets.creator.user","User")}function lo(e,a){return`${e.label} · ${ro(e.creatorType,a)} ${e.creatorId}`}function Te(e){if(!e)return null;if(e.defaultCreatorId){const a=e.creators.find(u=>u.id===e.defaultCreatorId);if(a)return a}return e.creators[0]??null}function io({asset:e,open:a,canUpload:u,busyAction:o,onClose:l,onBack:$,onOpenSettings:C,onUpload:D}){const{t:p}=he(),G=i.useRef(null),[O,U]=i.useState(null),[m,n]=i.useState(null),[W,K]=i.useState(!1),[V,F]=i.useState(null),[X,k]=i.useState(""),[q,f]=i.useState(""),[P,S]=i.useState(""),[z,j]=i.useState("user"),[v,L]=i.useState("");if(i.useEffect(()=>{k((e==null?void 0:e.displayName)??""),f((e==null?void 0:e.description)??"")},[e==null?void 0:e.description,e==null?void 0:e.displayName,e==null?void 0:e.id]),i.useEffect(()=>{if(!a)return;let x=!1;return K(!0),F(null),(async()=>{try{const[B,T]=await Promise.all([Ze(),Je()]);if(x)return;U(B);const oe=T.profiles.find(de=>de.id===T.activeProfileId)??T.profiles[0]??null;n(oe);const Y=Te(oe);S((Y==null?void 0:Y.id)??""),j((Y==null?void 0:Y.creatorType)??"user"),L((Y==null?void 0:Y.creatorId)??"")}catch(B){if(x)return;F(B instanceof Error?B.message:p("assets.upload.settingsLoadFailed","Failed to load upload settings.")),U(null),n(null)}finally{x||K(!1)}})(),()=>{x=!0}},[a,p]),i.useEffect(()=>{var B;if(!a||!e)return;(B=G.current)==null||B.focus();const x=T=>{T.key==="Escape"&&l()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,l,a]),!a||!e)return null;const A=(O==null?void 0:O.assetUploadByOpenCloudEnabled)===!0,r=!!m,g=Te(m),Z=(m==null?void 0:m.creators.find(x=>x.id===P))??null,ee=!!g,J=(m==null?void 0:m.storageProvider)==="env"&&r&&!ee,ae=J&&v.trim().length>0,h=u&&!W&&!V&&(!A||!r||!ee&&!J),te=u&&!W&&!V&&A&&r&&(ee||ae)&&o!=="upload";return t.jsx("div",{className:s.detailPopupLayer,onClick:l,role:"presentation",children:t.jsxs("section",{ref:G,className:s.detailDialog,role:"dialog","aria-modal":"true","aria-label":p("assets.upload.title","Upload asset"),tabIndex:-1,onClick:x=>x.stopPropagation(),children:[t.jsxs("div",{className:s.detailDialogHeader,children:[t.jsxs("div",{className:s.detailTitleBlock,children:[t.jsxs("span",{className:s.detailEyebrow,children:[ie(e,p)," · ",p("assets.upload.intent","Upload to Roblox")]}),t.jsx("h2",{children:p("assets.upload.title","Upload asset")}),t.jsx("span",{children:e.displayName})]}),t.jsxs("div",{className:s.detailHeaderActions,children:[t.jsxs("button",{type:"button",className:s.commandButton,onClick:$,children:[t.jsx(ft,{size:15}),p("assets.upload.backToDetails","Back to details")]}),t.jsx(H,{text:p("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:l,"aria-label":p("common.close","Close"),children:t.jsx(Ie,{size:16})})})]})]}),t.jsxs("div",{className:s.detailDialogBody,children:[t.jsx("div",{className:s.detailPreviewPane,children:no(e)?t.jsx("img",{className:s.detailPreview,src:Ve(e),alt:e.displayName}):t.jsxs("div",{className:s.detailPreviewFallback,children:[t.jsx("span",{children:ie(e,p)}),t.jsx("code",{children:e.file.original})]})}),t.jsxs("div",{className:s.detailContentPane,children:[!u&&t.jsx("div",{className:s.notice,children:p("assets.proOnly.upload","Roblox upload is available on Pro.")}),W&&t.jsx("div",{className:s.notice,children:p("assets.upload.checkingSettings","Checking upload settings...")}),V&&t.jsx("div",{className:s.errorState,children:V}),t.jsxs("dl",{className:s.compactMeta,children:[t.jsx("dt",{children:p("assets.detail.category","Category")}),t.jsx("dd",{children:ie(e,p)}),t.jsx("dt",{children:p("assets.detail.source","Source")}),t.jsx("dd",{children:e.source.originalPath})]}),h&&t.jsxs("div",{className:s.setupNotice,children:[t.jsx("strong",{children:p("assets.upload.settingsRequired","Upload settings required")}),t.jsx("p",{children:r?A?p("assets.upload.settingsRequired.creator","Save a default Creator before uploading."):p("assets.upload.settingsRequired.toggle","Enable Open Cloud upload before uploading."):p("assets.upload.settingsRequired.apiKey","Save an Open Cloud API key before uploading.")}),t.jsxs("button",{type:"button",className:s.commandButton,onClick:C,children:[t.jsx(Ke,{size:15}),p("assets.upload.openSettings","Open Asset Library settings")]})]}),t.jsxs("div",{className:s.formStack,children:[t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.detail.displayName","Display name")}),t.jsx("input",{value:X,disabled:!u,onChange:x=>k(x.target.value)}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.displayNameHelp","Saved to Roblox as the asset display name.")})]}),t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.detail.description","Description")}),t.jsx("textarea",{value:q,rows:3,disabled:!u,onChange:x=>f(x.target.value)}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.descriptionHelp","Saved to Roblox as the asset description.")})]}),ee&&t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.upload.creator","Creator")}),t.jsx("select",{"aria-label":p("assets.upload.creator","Creator"),value:P,disabled:!u||W,onChange:x=>S(x.target.value),children:m==null?void 0:m.creators.map(x=>t.jsx("option",{value:x.id,children:lo(x,p)},x.id))}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.creatorHelp","Used by Open Cloud as the owner of the uploaded asset.")})]}),J&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:s.inlineHelp,children:p("assets.upload.envCreatorHelp","Environment API keys cannot save a default Creator here. Enter the Creator for this upload.")}),t.jsxs("div",{className:s.twoColumn,children:[t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.upload.creatorType","Creator type")}),t.jsxs("select",{value:z,disabled:!u,onChange:x=>j(x.target.value),children:[t.jsx("option",{value:"user",children:p("assets.creator.user","User")}),t.jsx("option",{value:"group",children:p("assets.creator.group","Group")})]}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.creatorTypeHelp","Sent to Open Cloud as the Creator type.")})]}),t.jsxs("label",{className:s.field,children:[t.jsx("span",{children:p("assets.upload.creatorId","Creator ID")}),t.jsx("input",{value:v,disabled:!u,onChange:x=>L(x.target.value)}),t.jsx("small",{className:s.fieldHelp,children:p("assets.upload.creatorIdHelp","Sent to Open Cloud as the User or Group ID that owns the uploaded asset.")})]})]})]}),t.jsx("button",{type:"button",className:s.primaryButton,disabled:!te,onClick:()=>{const x=v.trim(),B=J&&x?{creatorType:z,creatorId:x}:{},T=!J&&Z&&g&&Z.id!==g.id?{creatorType:Z.creatorType,creatorId:Z.creatorId}:{};D({displayName:X,description:q,...B,...T})},children:o==="upload"?p("assets.upload.uploading","Uploading..."):p("assets.upload.submit","Upload with Roblox Open Cloud")})]}),t.jsxs("div",{className:s.noticeList,children:[t.jsx("p",{children:p("assets.upload.noDelete","WEPPY does not provide Roblox asset deletion.")}),t.jsx("p",{children:p("assets.upload.delay","Roblox processing and moderation can delay visibility in Studio or Creator Dashboard.")})]})]})]})]})})}function Oe(e,a){return e==="env"?a("assets.settings.credential.env","Environment variable"):a("assets.settings.credential.local","Local encrypted file")}function ve(e,a){return e==="valid"?a("assets.settings.validation.valid","Connected"):e==="invalid"?a("assets.settings.validation.invalid","Needs attention"):a("assets.settings.validation.unknown","Not tested")}function co(e,a){return(e==null?void 0:e.status)==="valid"?a("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??a("assets.settings.tested","Connection tested.")}function uo(e,a){return(e==null?void 0:e.status)==="valid"?a("assets.settings.apiKeyTested","Open Cloud API key connection tested."):(e==null?void 0:e.message)??a("assets.settings.tested","Connection tested.")}function po(e,a){return e==="group"?a("assets.creator.group","Group"):a("assets.creator.user","User")}function ho(e,a){return`${po(e.creatorType,a)} ${e.creatorId}`}function mo({open:e,tier:a,onClose:u}){const{t:o}=he(),[l,$]=i.useState(null),[C,D]=i.useState(null),[p,G]=i.useState(""),[O,U]=i.useState(!1),[m,n]=i.useState(""),[W,K]=i.useState(""),[V,F]=i.useState("user"),[X,k]=i.useState(""),[q,f]=i.useState(""),[P,S]=i.useState(!0),[z,j]=i.useState(null),[v,L]=i.useState(null),[A,r]=i.useState(!1),g=a==="basic",Z=i.useCallback(async()=>{r(!0),j(null);try{const[d,N]=await Promise.all([Ze(),Je()]);$(d),D(N);const R=N.profiles.find(re=>re.id===N.activeProfileId)??N.profiles[0]??null;G((R==null?void 0:R.id)??""),U(!R),S(!R||R.creators.length===0),F("user"),k(""),f("")}catch(d){j(d instanceof Error?d.message:o("assets.settings.loadFailed","Failed to load upload settings."))}finally{r(!1)}},[o]);if(i.useEffect(()=>{e&&Z()},[Z,e]),!e)return null;const ee=(l==null?void 0:l.assetUploadByOpenCloudEnabled)===!0,E=W.trim(),J=X.trim(),ae=(C==null?void 0:C.profiles)??[],h=ae.find(d=>d.id===p)??ae[0]??null,te=!!h,x=te&&(h==null?void 0:h.storageProvider)==="localFile",B=te&&(h==null?void 0:h.storageProvider)==="env",T=h!=null&&h.defaultCreatorId?h.creators.find(d=>d.id===h.defaultCreatorId):h==null?void 0:h.creators[0],oe=!!(h!=null&&h.creators.length),Y=!oe||P,de=ae.length>1,ne=g?o("assets.settings.action.proRequired","Asset upload settings are available on Pro."):A?o("assets.settings.action.busy","Wait for the current settings action to finish."):null,c=g||A||!E,y=ne??(E?o("assets.settings.saveApiKey.tooltip.ready","Save this API key to local encrypted storage."):o("assets.settings.saveApiKey.tooltip.enter","Enter an Open Cloud API key to save it locally.")),b=g||A||!E&&!te,_=ne??(E?o("assets.settings.testConnection.tooltip.entered","Test the entered API key before saving it."):te?o("assets.settings.testConnection.tooltip.saved","Test the saved Open Cloud API key."):o("assets.settings.testConnection.tooltip.enterOrSaved","Enter an API key or save one before testing the connection.")),I=g||A||!x,M=ne??(x?o("assets.settings.removeApiKey.tooltip.ready","Remove the locally saved Open Cloud API key."):B?o("assets.settings.removeApiKey.tooltip.env","Environment API keys cannot be removed from Dashboard. Remove ROBLOX_OPEN_CLOUD_API_KEY outside WEPPY."):o("assets.settings.removeApiKey.tooltip.none","No local Open Cloud API key is saved.")),ue=g||A||!x||!J,Qe=ne??(B?o("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):x?J?o("assets.settings.saveCreator.tooltip.ready","Save this Creator as the default owner for uploads."):o("assets.settings.saveCreator.tooltip.enterId","Enter a user or group ID before saving the default Creator."):o("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),et=ne??(x?o("assets.settings.addCreator.tooltip.ready","Add another User or Group Creator preset to this profile."):o("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),tt=g||A||B||!x,st=ne??(x?o("assets.settings.unregisterCreator.tooltip.ready","Unregister this Creator from the selected profile."):B?o("assets.settings.saveCreator.tooltip.env","Environment API keys cannot save a default Creator here. Enter Creator details in the upload dialog."):o("assets.settings.saveCreator.tooltip.noLocal","Save a local Open Cloud API key before saving a default Creator.")),at=T?o("assets.settings.saveCreatorPreset","Save Creator"):o("assets.settings.saveCreator","Save default Creator"),ot=(h==null?void 0:h.label)??o("assets.settings.credential.none","No API key saved"),fe=d=>{const N=d.profiles.find(R=>R.id===d.activeProfileId)??d.profiles[0]??null;D(d),G((N==null?void 0:N.id)??""),S(!N||N.creators.length===0),U(d.profiles.length===0)},nt=async()=>{if(h){r(!0);try{const d=await ao(h.id,T==null?void 0:T.id);fe(d),j(uo(d.validation,o))}catch(d){j(d instanceof Error?d.message:o("assets.settings.testFailed","Connection test failed."))}finally{r(!1)}}},rt=async()=>{if(v){r(!0);try{if(v.kind==="apiKey"){const d=await Qa(v.profileId);fe(d),j(o("assets.settings.apiKeyRemoved","Open Cloud API key unregistered from local storage."))}else{const d=await so(v.profileId,v.creatorPresetId);fe(d),j(o("assets.settings.creatorUnregistered","Creator unregistered from this profile."))}L(null)}catch(d){j(d instanceof Error?d.message:v.kind==="apiKey"?o("assets.settings.removeFailed","Failed to unregister API key."):o("assets.settings.creatorUnregisterFailed","Failed to unregister Creator."))}finally{r(!1)}}},lt=(v==null?void 0:v.kind)==="apiKey"?o("assets.settings.unregisterApiKey.title","Unregister API Key?"):o("assets.settings.unregisterCreator.title","Unregister Creator?"),it=(v==null?void 0:v.kind)==="apiKey"?o("assets.settings.unregisterApiKey.message","Roblox API key is not revoked. WEPPY only removes the local Credential Profile registration on this device."):o("assets.settings.unregisterCreator.message","Roblox user or group is not deleted. WEPPY only removes this Creator from the selected API Key profile."),ct=(v==null?void 0:v.kind)==="apiKey"?o("assets.settings.removeApiKey","Unregister API Key"):o("assets.settings.unregisterCreator","Unregister Creator");return t.jsxs("section",{id:"asset-library-settings-panel",className:`${s.settingsInlinePanel} ${s.settingsDrawer}`,role:"region","aria-label":o("assets.settings.title","Asset Library settings"),"data-panel-placement":"toolbar-popover",children:[t.jsxs("div",{className:s.drawerHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:o("assets.settings.title","Asset Library settings")}),t.jsx("span",{children:ot})]}),t.jsx(H,{text:o("common.close","Close"),children:t.jsx("button",{type:"button",className:s.iconButton,onClick:u,"aria-label":o("common.close","Close"),children:t.jsx(Ie,{size:16})})})]}),g&&t.jsx("div",{className:`${s.notice} ${s.proNotice}`,children:o("assets.settings.proOnly","Roblox upload settings and Open Cloud credential controls are available on Pro.")}),t.jsxs("section",{className:s.settingsPanel,children:[t.jsxs("label",{className:s.toggleRow,children:[t.jsxs("span",{children:[t.jsx("strong",{children:o("assets.settings.openCloudToggle","Open Cloud upload")}),t.jsx("small",{children:o("assets.settings.openCloudToggle.help","Controls whether server-side Open Cloud upload mutations can run.")})]}),t.jsx("input",{type:"checkbox",checked:ee,disabled:g||A,onChange:d=>{(async()=>{r(!0);try{const N=await Xa({assetUploadByOpenCloudEnabled:d.target.checked});$(N),j(o("assets.settings.saved","Upload settings saved."))}catch(N){j(N instanceof Error?N.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}})()}})]}),de&&t.jsx("div",{className:s.metadataList,children:ae.map(d=>{const N=d.id===(h==null?void 0:h.id);return t.jsxs("div",{className:s.metadataItem,children:[t.jsx("strong",{children:d.label}),t.jsxs("span",{children:[o("assets.settings.field.storage","Storage"),": ",Oe(d.storageProvider,o)]}),t.jsxs("span",{children:[o("assets.settings.field.validationStatus","Validation status"),": ",ve(d.validationStatus,o)]}),N&&t.jsx("code",{children:o("assets.settings.activeProfileBadge","Active")}),!N&&d.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>{(async()=>{r(!0);try{const R=await Za(d.id),re=R.profiles.find(je=>je.id===(R.activeProfileId??d.id))??d;D(R),G(re.id),S(re.creators.length===0),F("user"),k(""),f(""),j(o("assets.settings.profileSelected","Open Cloud credential profile selected."))}catch(R){j(R instanceof Error?R.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}})()},children:o("assets.settings.useProfile","Use profile")})]},d.id)})}),h&&t.jsxs("div",{className:s.settingsSubsection,children:[t.jsx("div",{className:s.settingsSectionHeader,children:t.jsx("h3",{children:o("assets.settings.credentialProfile","Credential Profile")})}),t.jsxs("div",{className:s.metadataItem,children:[t.jsxs("dl",{className:s.settingsDefinitionList,children:[t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.profile","Profile")}),t.jsx("dd",{children:h.label})]}),h.maskedKey&&t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.apiKey","API Key")}),t.jsx("dd",{children:h.maskedKey})]}),t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.storage","Storage")}),t.jsx("dd",{children:Oe(h.storageProvider,o)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.validationStatus","Validation status")}),t.jsx("dd",{children:ve(h.validationStatus,o)})]}),t.jsxs("div",{children:[t.jsx("dt",{children:o("assets.settings.field.creators","Creators")}),t.jsx("dd",{children:h.creators.length})]})]}),!O&&t.jsxs("div",{className:s.buttonRow,children:[t.jsx(H,{text:_,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:b,onClick:()=>{nt()},children:o("assets.settings.testConnection","Test Connection")})}),x&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>U(!0),children:o("assets.settings.replaceApiKey","Replace API Key")}),t.jsx(H,{text:M,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:I,onClick:()=>L({kind:"apiKey",profileId:h.id}),children:o("assets.settings.removeApiKey","Unregister API Key")})})]})]})]}),O&&t.jsxs("div",{className:s.formStack,children:[t.jsxs("div",{className:s.field,children:[t.jsx("div",{className:s.fieldLabelRow,children:t.jsx("label",{htmlFor:"asset-settings-open-cloud-profile-label",children:o("assets.settings.profileLabel","Profile name")})}),t.jsx("input",{id:"asset-settings-open-cloud-profile-label",value:m,disabled:g||A,onChange:d=>n(d.target.value),placeholder:o("assets.settings.profileLabel.placeholder","Studio automation key")}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.profileLabel.help","Optional. If left blank, WEPPY saves this profile as Open Cloud key automatically.")})]}),t.jsxs("div",{className:s.field,children:[t.jsxs("div",{className:s.fieldLabelRow,children:[t.jsx("label",{htmlFor:"asset-settings-open-cloud-api-key",children:o("assets.settings.apiKey","Open Cloud API Key")}),t.jsx(Pe,{topicId:"openCloudApiKey",variant:"field",state:{hasOpenCloudCredential:te}})]}),t.jsx("input",{id:"asset-settings-open-cloud-api-key",value:W,type:"password",disabled:g||A,onChange:d=>K(d.target.value)}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.apiKey.inlineHelp","WEPPY uses this key only for Roblox Open Cloud requests. The key is encrypted on this device and is not sent to WEPPY servers or stored in any other external storage.")})]}),!te&&t.jsx("p",{className:s.inlineHelp,children:t.jsx("a",{href:"https://create.roblox.com/docs/cloud/auth/api-keys",target:"_blank",rel:"noreferrer",children:o("assets.settings.apiKeyGuide","Create a Roblox API key with Assets Read and Write permissions.")})}),t.jsxs("div",{className:s.buttonRow,children:[t.jsx(H,{text:y,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:c,onClick:()=>{(async()=>{var d;r(!0);try{const N={apiKey:E,...m.trim()?{label:m.trim()}:{}},R=(h==null?void 0:h.storageProvider)==="localFile"?await Ja(h.id,N):await qa(N),re=R.profiles.find(je=>{var ke;return je.id===(R.activeProfileId??((ke=R.profile)==null?void 0:ke.id))});D(R),G(R.activeProfileId??((d=R.profile)==null?void 0:d.id)??""),S(!re||re.creators.length===0),U(!1),K(""),n(""),j(o("assets.settings.apiKeySaved","Open Cloud API key saved locally."))}catch(N){j(N instanceof Error?N.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}})()},children:o("assets.settings.saveApiKey","Save API Key")})}),t.jsx(H,{text:_,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:b,onClick:()=>{(async()=>{r(!0);try{const d=await oo(E||void 0);j(co(d.validation,o))}catch(d){j(d instanceof Error?d.message:o("assets.settings.testFailed","Connection test failed."))}finally{r(!1)}})()},children:o("assets.settings.testConnection","Test Connection")})}),t.jsx(H,{text:M,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:I,onClick:()=>{h&&L({kind:"apiKey",profileId:h.id})},children:o("assets.settings.removeApiKey","Unregister API Key")})})]})]}),t.jsx("div",{className:s.metadataList,children:h==null?void 0:h.creators.map(d=>t.jsxs("div",{className:s.metadataItem,children:[t.jsx("strong",{children:d.label}),t.jsx("span",{children:ho(d,o)}),d.id===h.defaultCreatorId&&t.jsx("code",{children:o("assets.settings.defaultCreatorBadge","Default")}),t.jsxs("span",{children:[o("assets.settings.field.validationStatus","Validation status"),": ",ve(d.validationStatus,o)]}),t.jsxs("div",{className:s.buttonRow,children:[d.id!==h.defaultCreatorId&&h.storageProvider==="localFile"&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>{(async()=>{if(h){r(!0);try{const N=await to(h.id,d.id);D(N),j(o("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(N){j(N instanceof Error?N.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}}})()},children:o("assets.settings.makeDefaultCreator","Make default")}),t.jsx(H,{text:st,children:t.jsx("button",{type:"button",className:`${s.commandButton} ${s.dangerButton}`,disabled:tt,onClick:()=>L({kind:"creator",profileId:h.id,creatorPresetId:d.id}),children:o("assets.settings.unregisterCreator","Unregister Creator")})})]})]},d.id))}),oe&&!P&&t.jsx(H,{text:et,children:t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A||B||!x,onClick:()=>{F("user"),k(""),f(""),S(!0)},children:o("assets.settings.addCreator","Add Creator")})}),Y&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:s.twoColumn,children:[t.jsxs("div",{className:s.field,children:[t.jsx("div",{className:s.fieldLabelRow,children:t.jsx("label",{htmlFor:"asset-settings-creator-type",children:o("assets.upload.creatorType","Creator type")})}),t.jsxs("select",{id:"asset-settings-creator-type",value:V,disabled:g||A||B||!x,onChange:d=>F(d.target.value),children:[t.jsx("option",{value:"user",children:o("assets.creator.user","User")}),t.jsx("option",{value:"group",children:o("assets.creator.group","Group")})]})]}),t.jsxs("div",{className:s.field,children:[t.jsxs("div",{className:s.fieldLabelRow,children:[t.jsx("label",{htmlFor:"asset-settings-creator-id",children:o("assets.upload.creatorId","Creator ID")}),t.jsx(Pe,{topicId:"openCloudCreatorId",variant:"field",state:{hasDefaultCreator:!!T}})]}),t.jsx("input",{id:"asset-settings-creator-id",value:X,disabled:g||A||B||!x,onChange:d=>k(d.target.value)}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.creatorId.inlineHelp","Default owner for new Roblox assets: your User ID or a Group ID.")})]})]}),t.jsxs("div",{className:s.field,children:[t.jsx("div",{className:s.fieldLabelRow,children:t.jsx("label",{htmlFor:"asset-settings-creator-label",children:o("assets.settings.creatorLabel","Creator label")})}),t.jsx("input",{id:"asset-settings-creator-label",value:q,disabled:g||A||B||!x,onChange:d=>f(d.target.value),placeholder:o("assets.settings.creatorLabel.placeholder","Main studio group")}),t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.creatorLabel.help","Optional. If left blank, WEPPY automatically saves a label like User 123 or Group 456.")})]}),!T&&t.jsx("p",{className:s.inlineHelp,children:o("assets.settings.creatorHelp","Use the numeric user ID from a profile URL or group ID from a group URL.")}),t.jsxs("div",{className:s.buttonRow,children:[t.jsx(H,{text:Qe,children:t.jsx("button",{type:"button",className:s.primaryButton,disabled:ue,onClick:()=>{(async()=>{if(h){r(!0);try{const d=await eo(h.id,{creatorType:V,creatorId:J,makeDefault:!T,...q.trim()?{label:q.trim()}:{}});D(d),k(""),f(""),S(!1),j(o("assets.settings.defaultCreatorSaved","Open Cloud default Creator saved locally."))}catch(d){j(d instanceof Error?d.message:o("assets.settings.saveFailed","Failed to save upload settings."))}finally{r(!1)}}})()},children:at})}),oe&&t.jsx("button",{type:"button",className:s.commandButton,disabled:g||A,onClick:()=>{F("user"),k(""),f(""),S(!1)},children:o("assets.settings.cancelCreator","Cancel")})]})]})]}),z&&t.jsx("div",{className:s.messageState,children:z}),t.jsx(Ge,{open:v!==null,title:lt,message:it,cancelLabel:o("common.cancel","Cancel"),confirmLabel:ct,loading:A,onCancel:()=>L(null),onConfirm:()=>{rt()}})]})}const go=12,xo=5e3;function le(e,a){return e instanceof Error&&e.message.trim().length>0?e.message:a}function Ce(e,a){return e.some(o=>o.id===a.id)?e.map(o=>o.id===a.id?a:o):[a,...e]}function _e(e,a){return Xt(e.filter(u=>Yt(u,a)))}function pe(e,a){return e?`${e.displayName} (${e.id})`:a??"unknown asset"}function bo(e){return e.length===0?"none":e.map(a=>pe(a)).join(", ")}function Fe(e){const a=`status ${e.status}`;return e.roblox.assetId?`Roblox asset ${e.roblox.assetId}; ${a}`:a}function yo(e,a){const u=pe(a);return e==="update"?`Updated metadata for asset: ${u}.`:e==="upload"?`Uploaded asset: ${u} -> ${Fe(a)}.`:e==="thumbnail-generate"?`Generated thumbnail for asset: ${u}.`:e==="status-refresh"?`Refreshed Roblox status for asset: ${u} -> ${Fe(a)}.`:e==="usage-scan"?`Scanned usage for asset: ${u} -> ${a.usage.references.length} reference(s).`:`Updated asset: ${u}.`}function fo(e){return e!=="upload"&&e!=="status-refresh"}function Se(e,a){if((a==null?void 0:a.id)===e)return a.category;const u=/^asset_(image|decal|audio|mesh|model|video|animation)_/.exec(e);return u!=null&&u[1]?u[1]:null}function Me(e){return e.status==="processing"&&!!(e.roblox.operationId??e.roblox.operationPath)}function jo(e){return{scope:e.scope.kind,placeId:e.scope.kind==="place"?e.scope.placeId:void 0,category:e.category}}function vo(e){if(e.pluginConnected&&e.activePlaceId!==null)return{placeId:e.activePlaceId,placeName:e.activePlaceName,studioConnected:!0};if(e.lastActivePlaceId!==null)return{placeId:e.lastActivePlaceId,placeName:e.lastActivePlaceName,studioConnected:!1};const a=e.places[0];return{placeId:(a==null?void 0:a.placeId)??null,placeName:(a==null?void 0:a.placeName)??null,studioConnected:!1}}function Co(){const[e,a]=i.useState([]),[u,o]=i.useState(0),[l,$]=i.useState(null),[C,D]=i.useState("place"),[p,G]=i.useState("all"),[O,U]=i.useState(null),[m,n]=i.useState(null),[W,K]=i.useState(!1),[V,F]=i.useState(!0),[X,k]=i.useState(null),[q,f]=i.useState(null),[P,S]=i.useState(null),z=i.useRef(!0),j=i.useRef(new Map),v=i.useMemo(()=>e.find(c=>c.id===l)??null,[e,l]),L=i.useCallback(c=>{const y=j.current.get(c);y!==void 0&&(clearTimeout(y),j.current.delete(c))},[]),A=i.useCallback((c,y=go)=>{if(!Me(c)||y<=0){L(c.id);return}L(c.id),(async()=>{try{const b=await Re(jo(c),c.id);if(!z.current)return;if(a(_=>Ce(_,b)),Me(b)&&y>1){const _=setTimeout(()=>{j.current.delete(b.id),A(b,y-1)},xo);j.current.set(b.id,_);return}L(b.id)}catch(b){if(!z.current)return;L(c.id),f(le(b,"Asset Library status refresh failed."))}})()},[L]);i.useEffect(()=>()=>{z.current=!1;for(const c of j.current.values())clearTimeout(c);j.current.clear()},[]);const r=i.useCallback(()=>({scope:C,placeId:C==="place"?O:void 0}),[O,C]),g=i.useCallback(c=>({...r(),category:c}),[r]),Z=i.useCallback(async()=>{try{const c=await mt(),y=vo(c);return U(y.placeId),n(y.placeName),K(y.studioConnected),y.placeId}catch{return U(null),n(null),K(!1),null}},[]),ee=i.useCallback(async()=>{f(null);try{const c=await Z(),y={scope:C,placeId:C==="place"?c:void 0};if(C==="place"&&c===null){a([]),o(0),F(!1),f("No active place is connected for place-scoped assets.");return}const b=await Promise.all($e(p).map(I=>Ut({...y,category:I}))),_=_e(b.flatMap(I=>I.assets),p);a(_),o(_.length)}catch(c){f(le(c,"Failed to load Asset Library."))}finally{F(!1)}},[p,Z,C]);i.useEffect(()=>{ee()},[ee]);const E=i.useCallback(async(c,y,b)=>{const _=Se(y,v);if(!_)return f("Asset category is unavailable."),null;k(c),f(null),S(null);try{const I=await b(g(_));return a(M=>Ce(M,I)),$(I.id),fo(c)&&S(yo(c,I)),I}catch(I){return f(le(I,"Asset Library action failed.")),null}finally{k(null)}},[g,v]),J=i.useCallback(async()=>{k("rescan"),f(null),S(null);try{const c=await Promise.all($e(p).map(M=>Tt(g(M)))),y=_e(c.flatMap(M=>M.assets),p),b=c.reduce((M,ue)=>M+ue.adoptedCount,0),_=c.reduce((M,ue)=>M+ue.skippedCount,0),I=_e(c.flatMap(M=>M.adopted),p);a(y),o(y.length),S(`Rescan complete for ${p}: ${b} asset(s) added, ${_} skipped. Added: ${bo(I)}.`)}catch(c){f(le(c,"Asset Library rescan failed."))}finally{k(null)}},[p,g]),ae=i.useCallback(async(c,y)=>{k("export-selection-rbxm"),f(null),S(null);try{const b=await Kt(g(c),y);return a(_=>Ce(_,b.asset)),$(b.asset.id),S(`Exported Studio selection as RBXM asset: ${pe(b.asset)}${b.deduplicated?" (reused existing local asset)":""}.`),b}catch(b){return f(le(b,"Asset Library .rbxm export failed.")),null}finally{k(null)}},[g]),h=i.useCallback((c,y)=>E("update",c,b=>Ot(b,c,y)),[E]),te=i.useCallback(async(c,y)=>{const b=await E("upload",c,_=>Mt(_,c,y));return b&&A(b),b},[E,A]),x=i.useCallback(async c=>{const y=Se(c,v);if(!y)return f("Asset category is unavailable."),!1;L(c);const b=e.find(_=>_.id===c)??v;k("delete"),f(null),S(null);try{return await Ft(g(y),c),a(_=>{const I=_.filter(M=>M.id!==c);return o(I.length),I}),$(_=>_===c?null:_),S(`Deleted asset: ${pe(b,c)}. Local files removed; uploaded Roblox assets were not deleted.`),!0}catch(_){return f(le(_,"Asset Library delete failed.")),!1}finally{k(null)}},[e,L,g,v]),B=i.useCallback(async(c,y)=>{const b=Se(c,v);if(!b)return f("Asset category is unavailable."),null;const _=e.find(I=>I.id===c)??v;k("import-rbxm"),f(null),S(null);try{const I=await Gt(g(b),c,y);return $(c),S(`Imported RBXM asset: ${pe(_,c)} -> ${I.importedCount} instance(s) to ${I.targetParent}.`),I}catch(I){return f(le(I,"Asset Library .rbxm import failed.")),null}finally{k(null)}},[e,g,v]),T=i.useCallback(c=>E("thumbnail-generate",c,y=>Wt(y,c)),[E]),oe=i.useCallback(c=>(L(c),E("status-refresh",c,y=>Re(y,c))),[L,E]),Y=i.useCallback((c,y)=>E("usage-scan",c,async b=>(await Ht(b,c,y)).asset),[E]),de=i.useCallback(c=>{D(c),$(null)},[]),ne=i.useCallback(c=>{Vt(c)&&(G(c),$(null))},[]);return{assets:e,totalCount:u,selectedAsset:v,selectedAssetId:l,scope:C,categoryFilter:p,activePlaceId:O,activePlaceName:m,studioConnected:W,loading:V,busyAction:X,error:q,lastMessage:P,setScope:de,setCategoryFilter:ne,selectAsset:$,refresh:ee,rescan:J,exportSelectionRbxm:ae,updateMetadata:h,uploadAsset:te,deleteAsset:x,importRbxm:B,generateThumbnail:T,refreshStatus:oe,scanUsage:Y}}function _o(e,a){return a("assets.count.shown","Shown assets: {count}").replace("{count}",String(e))}function ko(){const{t:e}=he(),{trackEvent:a}=gt(),{tier:u,loading:o}=xt(),l=Co(),[$,C]=i.useState(!1),[D,p]=i.useState(!1),[G,O]=i.useState(!1),U=!o&&u==="pro",m=l.selectedAsset,n=(m==null?void 0:m.file.original.toLowerCase().endsWith(".rbxm"))??!1,W=(m==null?void 0:m.category)==="model"||(m==null?void 0:m.category)==="animation",K="game.Workspace",F=!!(U&&l.studioConnected&&m&&n&&W),X=i.useMemo(()=>l.scope==="place"?l.activePlaceName??e("assets.scope.place","Current Place"):e("assets.scope.shared","Shared"),[l.activePlaceName,l.scope,e]),k=i.useMemo(()=>Ae(l.categoryFilter,e),[l.categoryFilter,e]),q=_o(l.totalCount,e),f=e("assets.detail.importRbxm.tooltip","Insert this local RBXM asset into {target} in the connected Studio place.").replace("{target}",K);return t.jsxs("div",{className:s.page,children:[t.jsx(bt,{title:e("assets.title","Assets"),description:e("assets.subtitle","Browse local originals, upload to Roblox, and inspect synced usage by place."),badge:t.jsx("span",{className:s.experimentalBadge,children:e("assets.experimental","Experimental")}),helpTopicId:"assets",helpState:{tier:u}}),t.jsxs("div",{className:s.toolbarShell,children:[t.jsxs("div",{className:s.toolbar,children:[t.jsxs("div",{className:s.segmented,role:"group","aria-label":e("assets.scope.label","Asset scope"),children:[t.jsx("button",{type:"button",className:l.scope==="place"?s.segmentedActive:"",onClick:()=>l.setScope("place"),children:e("assets.scope.place","Current Place")}),t.jsx("button",{type:"button",className:l.scope==="shared"?s.segmentedActive:"",onClick:()=>l.setScope("shared"),children:e("assets.scope.shared","Shared")})]}),t.jsxs("div",{className:s.listContextSummary,children:[t.jsx("span",{children:X}),t.jsx("span",{className:s.contextDivider,children:" · "}),t.jsx("span",{children:k}),t.jsx("span",{className:s.contextDivider,children:" · "}),t.jsx("strong",{children:q})]}),t.jsxs("div",{className:s.toolbarActions,children:[t.jsx(H,{text:e("assets.rescan.tooltip","Scan inbox folders for the current filter."),children:t.jsxs("button",{type:"button",className:s.commandButton,disabled:l.busyAction==="rescan",onClick:()=>{a("dashboard_click_event",{click_target:"assets_rescan",page:"assets"}),l.rescan()},children:[t.jsx(He,{size:15}),e("assets.rescan","Rescan")]})}),t.jsx(H,{text:D?"":e("assets.settings.open.tooltip","Open Roblox upload settings."),children:t.jsx("button",{type:"button",className:[s.iconButton,D?s.iconButtonActive:""].filter(Boolean).join(" "),onClick:()=>{a("dashboard_click_event",{click_target:"assets_open_settings",page:"assets"}),p(P=>!P)},"aria-label":e("assets.settings.open","Open settings"),"aria-controls":"asset-library-settings-panel","aria-expanded":D,children:t.jsx(Ke,{size:16})})})]}),t.jsxs("div",{className:s.categoryControl,children:[t.jsx("span",{id:"assets-category-filter-label",className:s.categoryControlLabel,children:e("assets.category.filter","Category")}),t.jsx("div",{className:s.categoryRail,role:"radiogroup","aria-labelledby":"assets-category-filter-label",children:Xe.map(P=>{const S=l.categoryFilter===P,z=Ae(P,e);return t.jsx("button",{type:"button",role:"radio","aria-checked":S,className:[s.categoryButton,S?s.categoryButtonActive:""].filter(Boolean).join(" "),onClick:()=>{l.setCategoryFilter(P)},children:z},P)})})]})]}),t.jsx(mo,{open:D,tier:u,onClose:()=>p(!1)})]}),l.error&&t.jsx("div",{className:s.errorState,children:l.error}),l.lastMessage&&t.jsx("div",{className:s.messageState,children:l.lastMessage}),l.categoryFilter==="rbxm"&&t.jsxs("section",{className:s.rbxmGuide,"aria-label":e("assets.rbxmGuide.title","Save RBXM from Studio"),children:[t.jsx("h2",{children:e("assets.rbxmGuide.title","Save RBXM from Studio")}),t.jsx("p",{children:e("assets.rbxmGuide.body","Select objects in Roblox Studio, then use WEPPY Plugin > Assets to save the selection as a local RBXM asset.")}),t.jsx("p",{children:e("assets.rbxmGuide.thumbnail","The plugin save flow includes a thumbnail option, and saved RBXM assets appear here for management, upload, and insertion.")})]}),!U&&!o&&t.jsx("div",{className:`${s.notice} ${s.proNotice}`,children:e("assets.basic.notice","Browse, preview, edit metadata, and scan usage on Basic. Roblox upload controls are available on Pro.")}),l.loading?t.jsx("div",{className:s.emptyState,children:e("common.loading","Loading...")}):t.jsx(Ea,{assets:l.assets,selectedAssetId:l.selectedAssetId,onSelect:l.selectAsset}),t.jsx(Va,{asset:$||D||G?null:m,busyAction:l.busyAction,canUpload:U,canImportRbxm:F,importRbxmTooltip:f,importRbxmTargetParent:K,onClose:()=>l.selectAsset(null),onSave:async(P,S)=>{m&&await l.updateMetadata(m.id,{displayName:P,description:S})},onUpload:()=>C(!0),onDelete:()=>O(!0),onImportRbxm:async()=>{m&&(a("dashboard_click_event",{click_target:"assets_import_rbxm",page:"assets"}),await l.importRbxm(m.id,{targetParent:K}))},onRefreshStatus:async()=>{m&&await l.refreshStatus(m.id)},onScanUsage:async()=>{m&&(a("dashboard_click_event",{click_target:"assets_usage_scan",page:"assets"}),await l.scanUsage(m.id,l.activePlaceId??void 0))}}),t.jsx(Ge,{open:G&&!!m,title:e("assets.delete.title","Delete asset"),message:e("assets.delete.message","This removes the local Asset Library files only. Uploaded Roblox assets are not deleted."),cancelLabel:e("common.cancel","Cancel"),confirmLabel:e("common.delete","Delete"),loading:l.busyAction==="delete",onCancel:()=>O(!1),onConfirm:()=>{m&&(a("dashboard_click_event",{click_target:"assets_delete",page:"assets"}),l.deleteAsset(m.id).then(P=>{P&&O(!1)}))}}),t.jsx(io,{asset:m,open:$,canUpload:U,busyAction:l.busyAction,onClose:()=>{C(!1),l.selectAsset(null)},onBack:()=>C(!1),onOpenSettings:()=>{C(!1),p(!0)},onUpload:async P=>{if(!m)return;a("dashboard_click_event",{click_target:"assets_upload_submit",page:"assets"}),await l.uploadAsset(m.id,P)&&C(!1)}})]})}export{ko as Component};
@@ -1 +0,0 @@
1
- import{r,a as R,u as M,b as B,c as V,j as e}from"./index-DG2RrKOl.js";import{I as G}from"./InfoLabel-Cyz7d4Kc.js";import{G as D}from"./GameChangeDetail-CghOvUm8.js";import{T as m}from"./TooltipText-H3YSCbob.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 +0,0 @@
1
- import{r,a as M,D as P,u as D,j as e,i as V,c as O,m as K,n as G,T as H}from"./index-DG2RrKOl.js";import{P as U}from"./PageHeader-CThGgsAt.js";import{C as Z}from"./ConfirmModal-CpImpY9c.js";import{T as $}from"./TooltipText-H3YSCbob.js";import{T as q}from"./Tabs-BhkhdCvF.js";const z=10;function J(){const[s,d]=r.useState([]),[t,n]=r.useState(0),[a,m]=r.useState(!1),[g,f]=r.useState(!0),[i,v]=r.useState(0),[h,x]=r.useState("all"),N=r.useRef(null),_=r.useCallback(async(p,y)=>{f(!0);try{const j={limit:String(z),offset:String(p)};y!=="all"&&(j.status=y);const b=await M.get("/api/dashboard/changelog",j);d(b.entries),n(b.total),m(b.hasMore)}catch{d([]),n(0),m(!1)}finally{f(!1)}},[]),C=r.useCallback(()=>{_(i,h)},[_,i,h]),c=r.useCallback(async()=>{await M.post("/api/dashboard/changelog/clear"),d([]),n(0),m(!1)},[]);return r.useEffect(()=>{_(i,h)},[_,i,h]),r.useEffect(()=>{const p=new P;N.current=p,p.connect();const y=p.on("command",()=>{_(i,h)});return()=>{y(),p.disconnect(),N.current=null}},[_,i,h]),{entries:s,total:t,hasMore:a,loading:g,offset:i,statusFilter:h,setOffset:v,setStatusFilter:x,refresh:C,clear:c}}const Q="_card_1n89u_2",W="_header_1n89u_17",X="_statusBadge_1n89u_24",Y="_statusDot_1n89u_35",ee="_active_1n89u_41",te="_completed_1n89u_50",se="_timeRange_1n89u_58",ae="_summaryList_1n89u_65",ne="_summaryItem_1n89u_71",oe="_summaryIcon_1n89u_80",ce="_summaryText_1n89u_86",ie="_progressBar_1n89u_91",le="_progressFill_1n89u_99",re="_emptySummary_1n89u_112",ge="_contextBlock_1n89u_120",de="_contextLabel_1n89u_129",me="_contextValue_1n89u_137",o={card:Q,header:W,statusBadge:X,statusDot:Y,active:ee,completed:te,timeRange:se,summaryList:ae,summaryItem:ne,summaryIcon:oe,summaryText:ce,progressBar:ie,progressFill:le,emptySummary:re,contextBlock:ge,contextLabel:de,contextValue:me};function R(s){if(!s)return"--:--";const d=new Date(s);return`${String(d.getHours()).padStart(2,"0")}:${String(d.getMinutes()).padStart(2,"0")}`}function he({entry:s,onClick:d}){var j,b,I,k,B,L,A,w,E,F;const{t}=D(),n=s.changeSummary,a=s.status==="active",m=s.isBootstrapOnly===!0,g=[],f=n.scriptsModified+n.scriptsCreated;if(f>0){const u=[];n.scriptsModified>0&&u.push(`${n.scriptsModified} ${t("changelog.card.modified","modified")}`),n.scriptsCreated>0&&u.push(`${n.scriptsCreated} ${t("changelog.card.created","created")}`);const S=`${f} ${t("changelog.card.scripts","scripts")} ${u.join(", ")}`;g.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 u=[];n.instancesCreated>0&&u.push(`${n.instancesCreated} ${t("changelog.card.created","created")}`),n.instancesDeleted>0&&u.push(`${n.instancesDeleted} ${t("changelog.card.deleted","deleted")}`),n.instancesMoved>0&&u.push(`${n.instancesMoved} ${t("changelog.card.moved","moved")}`);const S=`${i} ${t("changelog.card.instances","instances")} ${u.join(", ")}`;g.push({icon:"🧱",text:S,tooltip:t("changelog.card.instances.tooltip","Instance create, delete, move, or clone changes in this session.")})}n.propertiesChanged>0&&g.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&&g.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&&g.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&&g.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 v=R(s.startTime),h=a?t("changelog.card.inProgress","in progress"):s.endTime?R(s.endTime):"--:--",x=m?t("changelog.card.bootstrapStatus","Bootstrap"):a?t("changelog.card.active","Active"):t("changelog.card.completed","Completed"),N=m?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."),_=m?t("changelog.card.bootstrapSummary","Initial sync snapshot"):t("changelog.card.noChanges","No changes yet"),C=m?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=(b=(j=s.contextSummary)==null?void 0:j.intent)==null?void 0:b.trim(),p=((L=(B=(k=(I=s.contextSummary)==null?void 0:I.affectedAreas)==null?void 0:k[0])==null?void 0:B.label)==null?void 0:L.trim())||((w=(A=s.contextSummary)==null?void 0:A.testScenario)==null?void 0:w.trim()),y=(F=(E=s.verificationSummary)==null?void 0:E.label)==null?void 0:F.trim();return e.jsxs("div",{className:o.card,onClick:d,children:[e.jsxs("div",{className:o.header,children:[e.jsx($,{text:N,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:[v,"~",h]})]}),e.jsx("div",{className:o.summaryList,children:g.length>0?g.map((u,S)=>e.jsxs("div",{className:o.summaryItem,children:[e.jsx("span",{className:o.summaryIcon,children:u.icon}),e.jsx($,{text:u.tooltip,children:e.jsx("span",{className:o.summaryText,children:u.text})})]},S)):e.jsx($,{text:C,children:e.jsx("span",{className:o.emptySummary,style:{display:"block"},children:_})})}),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&&p&&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:p})]}),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 pe="_page_1tggr_2",ue="_limitNotice_1tggr_9",_e="_limitNoticeContent_1tggr_23",fe="_limitNoticeTitle_1tggr_28",xe="_limitNoticeText_1tggr_35",ye="_primaryAction_1tggr_41",ve="_clearButton_1tggr_67",Ne="_list_1tggr_88",be="_empty_1tggr_95",Ce="_loading_1tggr_104",je="_pagination_1tggr_113",Se="_pageInfo_1tggr_121",Te="_btn_1tggr_127",l={page:pe,limitNotice:ue,limitNoticeContent:_e,limitNoticeTitle:fe,limitNoticeText:xe,primaryAction:ye,clearButton:ve,list:Ne,empty:be,loading:Ce,pagination:je,pageInfo:Se,btn:Te},T=10,$e=[{key:"all",labelKey:"changelog.filter.all"},{key:"active",labelKey:"changelog.filter.active"},{key:"completed",labelKey:"changelog.filter.completed"}];function we(){const{t:s}=D(),{trackEvent:d,trackPageView:t}=V(),n=O(),a=J(),m=K(),{show:g}=G(),[f,i]=r.useState(!1),[v,h]=r.useState(!1),x=!m.loading&&m.tier==="basic",N=x?a.entries.slice(0,3):a.entries,_=!x&&a.total>T,C=async()=>{h(!0);try{await a.clear(),g(s("toast.clearSuccess","Cleared successfully"),"success"),i(!1)}catch{g(s("toast.clearFailed","Failed to clear data"),"error")}finally{h(!1)}};return e.jsxs("div",{className:l.page,children:[e.jsx(U,{title:s("page.changelog.title","Changelog"),description:s("page.changelog.description","Review game-change sessions captured from AI actions and sync events."),helpTopicId:"changelog",helpState:{tier:m.tier}}),e.jsx(q,{items:$e.map(c=>({key:c.key,label:s(c.labelKey,c.key.charAt(0).toUpperCase()+c.key.slice(1))})),value:a.statusFilter,onChange:c=>{const p=`changelog_${c}`;d("dashboard_click_event",{click_target:`changelog_tab_${c}`,page:"changelog",tab:p}),t({page:"changelog",tab:p}),a.setStatusFilter(c),a.setOffset(0)},rightActions:e.jsx("button",{className:l.clearButton,onClick:()=>{d("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:l.loading,children:s("common.loading","Loading...")}),!a.loading&&a.entries.length===0?e.jsx("div",{className:l.empty,children:s("changelog.empty","No changelog entries yet")}):e.jsx("div",{className:l.list,children:N.map(c=>e.jsx(he,{entry:c,onClick:()=>n(`/changelog/${c.entryId}`)},c.entryId))}),_&&e.jsxs("div",{className:l.pagination,children:[e.jsx("button",{className:l.btn,disabled:a.offset===0,onClick:()=>a.setOffset(Math.max(0,a.offset-T)),children:s("tools.page.prev","Prev")}),e.jsxs("span",{className:l.pageInfo,children:[a.offset+1,"–",Math.min(a.offset+T,a.total)," / ",a.total]}),e.jsx("button",{className:l.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:l.limitNotice,children:[e.jsxs("div",{className:l.limitNoticeContent,children:[e.jsx("div",{className:l.limitNoticeTitle,children:s("changelog.basic.limit.title","Basic preview shows the latest 3 sessions")}),e.jsx("div",{className:l.limitNoticeText,children:s("changelog.basic.limit.body","Full changelog timeline browsing is available with Pro.")})]}),e.jsx("a",{className:l.primaryAction,href:H.changelog,target:"_blank",rel:"noreferrer",onClick:()=>d("dashboard_click_event",{click_target:"upgrade_cta",placement:"changelog_limit_notice",page:"changelog",tab:`changelog_${a.statusFilter}`}),children:s("tier.upgrade","View Pro")})]})}),e.jsx(Z,{open:f,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:v,onCancel:()=>!v&&i(!1),onConfirm:C})]})}export{we as Component};
@@ -1 +0,0 @@
1
- import{r as u,j as s,y as a}from"./index-DG2RrKOl.js";function j({open:t,title:r,message:c,cancelLabel:o,confirmLabel:n,loading:e=!1,onCancel:l,onConfirm:d}){const i=u.useId();return t?s.jsx("div",{className:a.backdrop,onClick:e?void 0:l,children:s.jsxs("div",{className:a.modal,role:"dialog","aria-modal":"true","aria-labelledby":i,onClick:m=>m.stopPropagation(),children:[s.jsx("h2",{id:i,className:a.title,children:r}),s.jsx("p",{className:a.message,children:c}),s.jsxs("div",{className:a.actions,children:[s.jsx("button",{className:a.cancelButton,onClick:l,disabled:e,children:o}),s.jsx("button",{className:a.confirmButton,onClick:d,disabled:e,children:e?"...":n})]})]})}):null}export{j as C};
@@ -1 +0,0 @@
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}
@@ -1 +0,0 @@
1
- import{u as L,r as a,j as e,d as B,a as w,D as T,i as H,n as D}from"./index-DG2RrKOl.js";import{I as r}from"./InfoLabel-Cyz7d4Kc.js";import{P as F}from"./PageHeader-CThGgsAt.js";import{S as U}from"./StatusBadge-CkLieULy.js";import{T as K}from"./TooltipText-H3YSCbob.js";import{C as $}from"./ConfirmModal-CpImpY9c.js";import{u as G,f as O}from"./useLiveUptime-BHqJirBV.js";const V="_container_1h084_2",q="_entry_1h084_14",X="_timestamp_1h084_21",z="_message_1h084_27",J="_warn_1h084_34",Q="_error_1h084_39",W="_empty_1h084_44",v={container:V,entry:q,timestamp:X,message:z,warn:J,error:Q,empty:W};function Y(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 Z({entries:n}){const{t:i}=L(),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:Y(o.timestamp)}),e.jsx("span",{className:v.message,children:o.message})]},u))})}const A=50;function ee(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function ne(){const{level:n,status:i,error:t}=B(),[o,u]=a.useState(null),[C,j]=a.useState([]),y=a.useRef(null),g=a.useCallback((l,x)=>{j(p=>{const d=[...p,{timestamp:ee(),message:l,type:x}];return d.length>A?d.slice(-A):d})},[]),m=a.useCallback(async()=>{try{const l=await w.get("/connection-info");u(l)}catch{u(null)}},[]),S=a.useCallback(async()=>{try{const l=await w.get("/api/dashboard/connection-log");j(l.entries??[])}catch{j([])}},[]),k=a.useCallback(async()=>{await w.post("/api/dashboard/connection-log/clear"),j([])},[]),f=a.useCallback(async l=>{await w.post("/api/dashboard/kill-agent",{instanceId:l}),await m()},[m]);return a.useEffect(()=>{n!=="disconnected"&&i&&m(),S()},[n,i,m,S]),a.useEffect(()=>{const l=new T;y.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(),y.current=null}},[g,m]),{status:i,connectionInfo:o,connectionLog:C,level:n,error:t,clearConnectionLog:k,killAgent:f}}const te="_page_15jrd_2",se="_card_15jrd_10",ce="_disabled_15jrd_18",oe="_cardHeader_15jrd_24",ie="_clearButton_15jrd_37",ae="_serverGrid_15jrd_47",le="_statusRow_15jrd_65",re="_metaItem_15jrd_72",de="_table_15jrd_79",me="_toggleBtn_15jrd_104",pe="_disconnected_15jrd_119",he="_disconnectedActions_15jrd_136",ge="_btn_15jrd_143",ue="_activity_active_15jrd_161",je="_activity_stale_15jrd_162",xe="_activity_unknown_15jrd_163",_e="_killBtn_15jrd_187",ve="_emptyRow_15jrd_207",s={page:te,card:se,disabled:ce,cardHeader:oe,clearButton:ie,serverGrid:ae,statusRow:le,metaItem:re,table:de,toggleBtn:me,disconnected:pe,disconnectedActions:he,btn:ge,activity_active:ue,activity_stale:je,activity_unknown:xe,killBtn:_e,emptyRow:ve};function N(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 fe(n){return n?Date.now()-n<3e4?"active":"stale":"unknown"}function Ie(){var I;const{t:n}=L(),{trackEvent:i}=H(),{status:t,connectionInfo:o,connectionLog:u,level:C,clearConnectionLog:j,killAgent:y}=ne(),{show:g}=D(),[m,S]=a.useState(!0),[k,f]=a.useState(!1),[l,x]=a.useState(!1),[p,d]=a.useState(null),[h,_]=a.useState(!1),R=G(t==null?void 0:t.uptime),b=C==="disconnected",M=b?"offline":"online",E=async()=>{if(p){_(!0);try{await y(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)}}},P=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.jsx(F,{title:n("page.connection.title","Connection"),description:n("page.connection.description","Inspect MCP server, AI agent, Studio plugin, and connection log status."),helpTopicId:"connection",helpState:{connectionLevel:C}}),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(U,{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(K,{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:O(R??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:()=>S(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_${fe(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:N(c.connectedAt,n)}),e.jsx("td",{children:c.lastSeen?N(c.lastSeen,n):"-"}),e.jsx("td",{children:c.lastCommandAt?N(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:N(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(Z,{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:P}),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{Ie as Component};
@@ -1,6 +0,0 @@
1
- import{q as z,u as Q,i as V,r as p,j as t,X as J,E as Z,C as ee}from"./index-DG2RrKOl.js";/**
2
- * @license lucide-react v1.8.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const te=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ne=z("circle-question-mark",te),a={canDo:{key:"dashboardHelp.section.canDo",fallback:"What you can do here"},needs:{key:"dashboardHelp.section.needs",fallback:"What you need to use it"},currentState:{key:"dashboardHelp.section.currentState",fallback:"Check based on current status"}},oe="https://create.roblox.com/docs/cloud/auth/api-keys",se="https://create.roblox.com/docs/cloud/guides/usage-assets",ae="https://create.roblox.com/docs/cloud/reference/features/assets",re="https://create.roblox.com/docs/reference/engine/classes/DataModel#CreatorId",le="https://create.roblox.com/docs/reference/engine/classes/Player#UserId",ie="https://create.roblox.com/docs/projects/groups",ce="https://create.roblox.com/docs/cloud/reference/features/groups";function y(e,s,o,h){return{id:e,title:{key:`dashboardHelp.${e}.title`,fallback:s},sections:o,links:h}}function l(e,s,o,h){return{heading:e,items:h.map((i,v)=>({key:`dashboardHelp.${s}.${o}.${v+1}`,fallback:i}))}}function r(e,s,o){return{heading:a.currentState,items:[{key:`dashboardHelp.${e}.currentState.${s}`,fallback:o}]}}function _(e,s,o,h,i,v){return y(e,s,[l(a.canDo,e,"canDo",o),l(a.needs,e,"needs",h),l(a.currentState,e,"currentState",i)],v)}function de(e){return e.tier==="basic"?r("assets","basic","Activate Pro before uploading to Roblox."):e.uploadEnabled===!1?r("assets","uploadDisabled","Turn on API Key local upload in Assets settings."):e.hasOpenCloudCredential===!1?r("assets","noCredential","Save and test an Open Cloud API Key."):e.hasDefaultCreator===!1?r("assets","noCreator","Save a default Creator ID or enter Creator details during upload."):r("assets","default","Open an asset detail dialog to start upload or usage scan.")}function ue(e){return e.connectionLevel!==void 0&&e.connectionLevel!=="studioConnected"?r("sync","pluginMissing","Connect WEPPY Plugin in Studio before using live sync details."):e.tier==="basic"?r("sync","basic","Activate Pro to use bidirectional or reverse sync."):r("sync","default","Use the sync log to diagnose stuck or failed sync activity.")}function pe(e,s={}){return e==="openCloudApiKey"?y(e,"Open Cloud API Key help",[l(a.canDo,e,"canDo",["WEPPY uses this key only for Roblox Open Cloud requests."]),l(a.needs,e,"needs",["Create a Roblox API key in Creator Hub. Add Assets under Access Permissions, then enable both Read and Write operations.","Set the key target to the same User or Group that you use as the upload Creator.","The raw key is encrypted on this device. It is not sent to WEPPY servers, and it is not stored in any other external storage, browser storage, telemetry, logs, tool history, or Asset Library metadata."]),s.hasOpenCloudCredential?r(e,"saved","Use Test Connection to confirm the saved key still works."):r(e,"empty","Create an API key in Roblox Creator Hub, paste it here, then save and test it.")],[{label:{key:"dashboardHelp.openCloudApiKey.link.apiKeys",fallback:"Roblox API keys"},href:oe},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsGuide",fallback:"Assets API usage guide"},href:se},{label:{key:"dashboardHelp.openCloudApiKey.link.assetsReference",fallback:"Assets API reference"},href:ae}]):e==="openCloudCreatorId"?y(e,"Creator ID help",[l(a.canDo,e,"canDo",["The default Creator decides which User or Group owns newly uploaded Roblox assets."]),l(a.needs,e,"needs",["For User, sign in to roblox.com, open your profile from your avatar or username, then copy only the number between /users/ and /profile in the browser URL.","For Group, open the Roblox group or community page, then copy only the number after /groups/ or /communities/ in the browser URL.","Paste only the numeric ID in Creator ID. Do not paste the full URL, rbxassetid://, User, or Group text."]),s.hasDefaultCreator?r(e,"saved","Keep this value if new assets should continue using the same owner."):r(e,"empty","Choose User or Group, paste the numeric ID, then save the default Creator.")],[{label:{key:"dashboardHelp.openCloudCreatorId.link.creatorId",fallback:"Creator ID reference"},href:re},{label:{key:"dashboardHelp.openCloudCreatorId.link.userId",fallback:"User ID reference"},href:le},{label:{key:"dashboardHelp.openCloudCreatorId.link.groups",fallback:"Roblox groups"},href:ie},{label:{key:"dashboardHelp.openCloudCreatorId.link.groupsApi",fallback:"Groups Cloud API"},href:ce}]):{overview:y("overview","Overview help",[l(a.canDo,"overview","canDo",["Check MCP server, WEPPY Plugin, AI Agent, Sync, and recent game changes in one place."]),l(a.needs,"overview","needs",["Useful status requires the MCP server. Live Studio status also needs WEPPY Plugin connected to the active place."]),s.connectionLevel==="serverOnly"?r("overview","serverOnly","Open Roblox Studio and start WEPPY Plugin so live place data can appear."):r("overview","default","If the server disconnects, restart MCP or wait for the automatic reconnect.")]),connection:_("connection","Connection help",["Inspect server process details, connected AI agents, Studio plugin clients, and connection log events."],["The MCP server must be reachable. Plugin rows appear after Studio sends heartbeats."],["If Plugin is missing, open Roblox Studio and run WEPPY Plugin. If AI Agent is missing, reconnect the MCP server from your AI tool."]),sync:y("sync","Sync help",[l(a.canDo,"sync","canDo",["Review Studio to local sync status, direction, apply mode, and sync logs."]),l(a.needs,"sync","needs",["Sync needs an active place and connected WEPPY Plugin. Two-way and reverse workflows depend on Pro."]),ue(s)]),assets:y("assets","Assets help",[l(a.canDo,"assets","canDo",["Browse local Asset Library files, switch place/shared scope, filter categories, scan usage, insert RBXM into Studio, and upload local assets to Roblox."]),l(a.needs,"assets","needs",["Upload needs Pro, the Open Cloud upload toggle, a valid API Key, and a Creator. Browse and preview work on Basic."]),de(s)]),changelog:_("changelog","Changelog help",["Review real game-change sessions extracted from AI actions and sync events."],["Entries are scoped to the active place. Basic shows only the latest preview entries."],["If the list is empty, ask the AI Agent to make a game change. Clear only deletes saved history records, not Studio objects."]),playtest:y("playtest","Playtest help",[l(a.canDo,"playtest","canDo",["Review Playtest results and reports saved by the AI Agent."]),l(a.needs,"playtest","needs",["Pro shows real stored reports. Basic shows sample preview data. Live active-place confidence needs WEPPY Plugin connected."]),s.tier==="basic"?r("playtest","basic","Activate Pro to use real Playtest history."):r("playtest","default","Ask the AI Agent to run a Playtest when no report is available.")]),uiStudio:y("uiStudio","UI Studio help",[l(a.canDo,"uiStudio","canDo",["Review AI-created UI analysis, improvement suggestions, captures, and before/after history."]),l(a.needs,"uiStudio","needs",["Pro shows real UI Studio data. Basic shows a bundled sample. New capture/check actions need WEPPY Plugin connected."]),s.tier==="basic"?r("uiStudio","basic","Activate Pro to use live UI Studio previews."):r("uiStudio","default","Ask the AI Agent to capture the UI or recheck improvement suggestions, then copy follow-up requests back to the AI chat.")]),tools:_("tools","Tools help",["Inspect tool history, status classification, fallback/unsupported/warn/error details, and usage statistics."],["History and statistics depend on local recording settings and the active place bucket."],["If no records appear, check Settings > General and confirm history/statistics are enabled. Expand failed rows to inspect input, permission, or connection causes."]),settings:_("settings","Settings help",["Manage License, hot settings, saved data cleanup, server environment display, and language."],["License actions need MCP server connection. Server environment values are read-only here. Asset upload controls live in Assets settings."],["Activate a license for Pro features. Change environment values outside WEPPY Dashboard, then restart MCP. Review delete confirmations before clearing saved data."]),whatsNew:_("whatsNew","What's New help",["Review WEPPY Dashboard, MCP, and Plugin announcements, releases, and change notes."],["Announcements are bundled locally. Unread state is stored in this browser."],["After you visit this page, unread announcements from this visit are marked read when you leave. The top header does not show a duplicate What's New button on this page."])}[e]}const he="_root_rxppj_1",fe="_rootPage_rxppj_7",ye="_rootField_rxppj_11",be="_button_rxppj_15",ge="_panel_rxppj_50",me="_panelField_rxppj_65",ve="_panelPage_rxppj_69",Pe="_panelHeader_rxppj_73",ke="_closeButton_rxppj_91",_e="_sectionStack_rxppj_112",we="_helpSection_rxppj_117",xe="_linkList_rxppj_118",c={root:he,rootPage:fe,rootField:ye,button:be,panel:ge,panelField:me,panelPage:ve,panelHeader:Pe,closeButton:ke,sectionStack:_e,helpSection:we,linkList:xe},b=12,A=8,Ce=120,Ae=360,Ee=340,Y=560;function Ie({topicId:e,state:s,variant:o="page",className:h}){const{t:i}=Q(),{trackEvent:v}=V(),[f,w]=p.useState(!1),[x,D]=p.useState(null),j=p.useId(),O=p.useRef(null),N=p.useRef(null),I=p.useRef(null),g=pe(e,s),R=i(g.title.key,g.title.fallback),C=p.useCallback(()=>{const n=N.current,d=I.current;if(!n||!d||typeof window>"u")return;const u=n.getBoundingClientRect(),m=d.getBoundingClientRect(),P=window.innerWidth,k=window.innerHeight,q=o==="field"?Ee:Ae,M=m.width||Math.min(q,P-b*2),B=m.height||Y;let S=o==="field"?u.left:u.right-M;S=Math.max(b,Math.min(S,P-M-b));const L=k-u.bottom-A-b,W=u.top-A-b,T=L<Math.min(B,220)&&W>L,$=Math.max(Ce,T?W:L),G=Math.min(Y,$),F=Math.min(B,G);let H=T?u.top-A-F:u.bottom+A;H=Math.max(b,Math.min(H,k-F-b)),D({top:Math.round(H),left:Math.round(S),maxHeight:Math.round(G)})},[o]);p.useLayoutEffect(()=>{f?C():D(null)},[f,C]),p.useEffect(()=>{if(!f)return;const n=u=>{var P,k;const m=u.target;m&&!((P=O.current)!=null&&P.contains(m))&&!((k=I.current)!=null&&k.contains(m))&&w(!1)},d=u=>{u.key==="Escape"&&w(!1)};return document.addEventListener("mousedown",n),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",d)}},[f]),p.useEffect(()=>{if(!f)return;const n=()=>C();return window.addEventListener("scroll",n,!0),window.addEventListener("resize",n),()=>{window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n)}},[f,C]);const K=o==="field"?i("dashboardHelp.fieldButton.ariaLabel","Open field help"):i("dashboardHelp.pageButton.ariaLabel","Open page help"),X=x?{top:x.top,left:x.left,maxHeight:x.maxHeight}:{top:-9999,left:-9999,visibility:"hidden"},U=f?t.jsxs("section",{ref:I,id:j,className:[c.panel,o==="field"?c.panelField:c.panelPage].filter(Boolean).join(" "),style:X,role:"dialog","aria-label":R,"data-panel-placement":"help-portal",children:[t.jsxs("div",{className:c.panelHeader,children:[t.jsx("h2",{children:R}),t.jsx("button",{type:"button",className:c.closeButton,"aria-label":i("common.close","Close"),onClick:()=>w(!1),children:t.jsx(J,{size:15,"aria-hidden":"true"})})]}),t.jsx("div",{className:c.sectionStack,children:g.sections.map(n=>t.jsxs("section",{className:c.helpSection,children:[t.jsx("h3",{children:i(n.heading.key,n.heading.fallback)}),t.jsx("ul",{children:n.items.map(d=>t.jsx("li",{children:i(d.key,d.fallback)},d.key))})]},n.heading.key))}),g.links&&g.links.length>0&&t.jsxs("div",{className:c.linkList,children:[t.jsx("h3",{children:i("dashboardHelp.section.links","Related links")}),g.links.map(n=>t.jsxs("a",{href:n.href,target:"_blank",rel:"noreferrer",children:[i(n.label.key,n.label.fallback),t.jsx(Z,{size:12,"aria-hidden":"true"})]},n.href))]})]}):null;return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:O,className:[c.root,o==="field"?c.rootField:c.rootPage,h??""].filter(Boolean).join(" "),children:t.jsxs("button",{ref:N,type:"button",className:c.button,"aria-label":`${K}: ${R}`,"aria-expanded":f,"aria-controls":j,onClick:()=>{w(n=>{const d=!n;return n||v("dashboard_click_event",{click_target:"dashboard_help_open",help_topic:e,placement:o}),d})},children:[t.jsx(ne,{size:o==="field"?14:16,"aria-hidden":"true"}),o==="page"&&t.jsx("span",{children:i("dashboardHelp.button","Help")})]})}),U&&typeof document<"u"?ee.createPortal(U,document.body):null]})}const Re="_pageHeader_qym7v_1",Se="_copy_qym7v_9",Le="_titleLine_qym7v_16",He="_actions_qym7v_39",E={pageHeader:Re,copy:Se,titleLine:Le,actions:He};function je({title:e,description:s,badge:o,helpTopicId:h,helpState:i}){return t.jsxs("div",{className:E.pageHeader,children:[t.jsxs("div",{className:E.copy,children:[t.jsxs("div",{className:E.titleLine,children:[t.jsx("h1",{children:e}),o]}),t.jsx("p",{children:s})]}),t.jsx("div",{className:E.actions,children:t.jsx(Ie,{topicId:h,state:i})})]})}export{Ie as D,je as P};
@@ -1,11 +0,0 @@
1
- import{r as c,a as f,u as b,j as e,i as M,m as k,n as A,T as H}from"./index-DG2RrKOl.js";import{P as D}from"./PageHeader-CThGgsAt.js";import{I}from"./InfoLabel-Cyz7d4Kc.js";import{T as x}from"./TooltipText-H3YSCbob.js";import{C as E}from"./ConfirmModal-CpImpY9c.js";const $=5e3;function U(t){const r=(t==null?void 0:t.enabled)??!0,[p,o]=c.useState([]),[a,n]=c.useState(null),[d,l]=c.useState(r),i=c.useRef(null),h=c.useCallback(async()=>{try{const _=await f.get("/api/dashboard/playtest/history");o(_.entries??[])}catch{}},[]),m=c.useCallback(async()=>{if(!r){l(!1);return}await h(),l(!1)},[r,h]),y=c.useCallback(async()=>{r&&(await f.post("/api/dashboard/playtest/history/clear"),o([]),n(null))},[r]),g=c.useCallback(async _=>{if(r)try{const S=await f.get(`/api/dashboard/playtest/report/${_}`);n(S)}catch{n(null)}},[r]);return c.useEffect(()=>{if(!r){l(!1);return}return m(),i.current=setInterval(m,$),()=>{i.current&&clearInterval(i.current)}},[r,m]),{history:p,selectedReport:a,loading:d,loadReport:g,clearHistory:y}}function O(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. Live playtests and real reports are available with Pro.`),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 F="_page_3lq3l_2",V="_sampleBanner_3lq3l_9",W="_sampleBannerRow_3lq3l_21",z="_sampleBannerMain_3lq3l_28",G="_sampleBadge_3lq3l_35",Y="_sampleTitle_3lq3l_50",Z="_sampleMessage_3lq3l_57",J="_sampleActions_3lq3l_64",K="_primaryAction_3lq3l_72",Q="_secondaryAction_3lq3l_73",X="_card_3lq3l_109",ee="_cardHeader_3lq3l_116",te="_clearButton_3lq3l_128",se="_statusRow_3lq3l_143",ae="_statusIndicator_3lq3l_150",re="_statusRunning_3lq3l_158",oe="_statusPaused_3lq3l_163",ne="_statusNotRunning_3lq3l_167",le="_statusLabel_3lq3l_171",ie="_statusMeta_3lq3l_178",ce="_controlButtons_3lq3l_184",pe="_btn_3lq3l_191",de="_btnPrimary_3lq3l_213",me="_btnDanger_3lq3l_223",ue="_historyList_3lq3l_233",he="_historyItem_3lq3l_241",ye="_historyItemSelected_3lq3l_260",_e="_historyItemHeader_3lq3l_265",xe="_historyIcon_3lq3l_271",ge="_historyTimestamp_3lq3l_276",ve="_historyName_3lq3l_283",Se="_historyItemMeta_3lq3l_293",fe="_historyMode_3lq3l_302",be="_historyDuration_3lq3l_306",je="_historyStatus_3lq3l_310",Ne="_status_passed_3lq3l_317",we="_status_failed_3lq3l_321",Ce="_status_running_3lq3l_325",qe="_historyError_3lq3l_329",Le="_historyContext_3lq3l_339",Ie="_historyContextLine_3lq3l_348",Pe="_historyContextLabel_3lq3l_354",Re="_reportContainer_3lq3l_363",Be="_reportContextPanel_3lq3l_369",Te="_reportContextRow_3lq3l_379",Me="_reportContextLabel_3lq3l_387",ke="_reportSection_3lq3l_395",Ae="_reportSectionHeader_3lq3l_401",He="_reportMarkdown_3lq3l_413",De="_reportLogs_3lq3l_426",Ee="_emptyState_3lq3l_441",$e="_emptyStateTitle_3lq3l_448",Ue="_emptyStateMessage_3lq3l_456",Oe="_upgradePanel_3lq3l_465",Fe="_upgradePanelIcon_3lq3l_473",Ve="_upgradePanelTitle_3lq3l_478",We="_upgradePanelDesc_3lq3l_486",ze="_benefitList_3lq3l_496",Ge="_benefitItem_3lq3l_507",Ye="_upgradeActions_3lq3l_522",s={page:F,sampleBanner:V,sampleBannerRow:W,sampleBannerMain:z,sampleBadge:G,sampleTitle:Y,sampleMessage:Z,sampleActions:J,primaryAction:K,secondaryAction:Q,card:X,cardHeader:ee,clearButton:te,statusRow:se,statusIndicator:ae,statusRunning:re,statusPaused:oe,statusNotRunning:ne,statusLabel:le,statusMeta:ie,controlButtons:ce,btn:pe,btnPrimary:de,btnDanger:me,historyList:ue,historyItem:he,historyItemSelected:ye,historyItemHeader:_e,historyIcon:xe,historyTimestamp:ge,historyName:ve,historyItemMeta:Se,historyMode:fe,historyDuration:be,historyStatus:je,status_passed:Ne,status_failed:we,status_running:Ce,historyError:qe,historyContext:Le,historyContextLine:Ie,historyContextLabel:Pe,reportContainer:Re,reportContextPanel:Be,reportContextRow:Te,reportContextLabel:Me,reportSection:ke,reportSectionHeader:Ae,reportMarkdown:He,reportLogs:De,emptyState:Ee,emptyStateTitle:$e,emptyStateMessage:Ue,upgradePanel:Oe,upgradePanelIcon:Fe,upgradePanelTitle:Ve,upgradePanelDesc:We,benefitList:ze,benefitItem:Ge,upgradeActions:Ye};function v(t){return t.trim().toLowerCase()}function Ze(t){switch(v(t)){case"passed":return"✅";case"failed":return"❌";case"running":return"⏱";default:return"❓"}}function Je(t,r){switch(v(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 Ke(t,r){switch(v(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 Qe(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function Xe({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,l,i,h,m,y;const n=a.timestamp===p;return e.jsxs("button",{className:`${s.historyItem} ${n?s.historyItemSelected:""}`,onClick:()=>r(a.timestamp),children:[e.jsxs("div",{className:s.historyItemHeader,children:[e.jsx("span",{className:s.historyIcon,children:Ze(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(x,{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"),": ",Je(o,a.mode)]})}),e.jsx("span",{className:s.historyDuration,children:Qe(a.durationMs)}),e.jsx(x,{text:o("playtest.history.status.tooltip","Recorded result state for this automated playtest run."),children:e.jsx("span",{className:`${s.historyStatus} ${s[`status_${v(a.status)}`]??""}`,children:Ke(o,a.status)})})]}),a.errorMessage&&e.jsx("div",{className:s.historyError,children:a.errorMessage}),(a.contextId||((d=a.contextSummary)==null?void 0:d.testScenario)||((l=a.contextSummary)==null?void 0:l.expectedBehavior)||((i=a.contextSummary)==null?void 0:i.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 et({report:t}){var o,a,n,d,l,i;const{t:r}=b(),p=!!((o=t.contextSummary)!=null&&o.testScenario||(a=t.contextSummary)!=null&&a.expectedBehavior||(n=t.contextSummary)!=null&&n.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})]}),((l=t.contextSummary)==null?void 0:l.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})]}),((i=t.contextSummary)==null?void 0:i.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(x,{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(x,{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 nt(){var q;const{t}=b(),{trackEvent:r}=M(),{tier:p,loading:o}=k(),a=!o&&p==="basic",n=U({enabled:!a}),{show:d}=A(),[l,i]=c.useState(null),[h,m]=c.useState(!1),[y,g]=c.useState(!1),{history:_,selectedReport:S,loading:P}=n,u=a?O(t):null,j=((q=u==null?void 0:u.history[0])==null?void 0:q.timestamp)??null,N=a?l??j:l,w=(u==null?void 0:u.history)??_,C=u&&N===j?u.report:S,R=a?!1:P,B=L=>{i(L),!a&&n.loadReport(L)},T=async()=>{g(!0);try{await n.clearHistory(),d(t("toast.clearSuccess","Cleared successfully"),"success"),m(!1),i(null)}catch{d(t("toast.clearFailed","Failed to clear data"),"error")}finally{g(!1)}};return e.jsxs("div",{className:s.page,children:[e.jsx(D,{title:t("page.playtest.title","Playtest"),description:t("page.playtest.description","Review automated playtest runs, saved reports, and result history."),helpTopicId:"playtest",helpState:{tier:p}}),a&&e.jsx("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.jsx("div",{className:s.sampleActions,children:e.jsx("a",{className:s.primaryAction,href:H.playtest,target:"_blank",rel:"noreferrer",onClick:()=>r("dashboard_click_event",{click_target:"upgrade_cta",placement:"playtest_sample_banner",page:"playtest"}),children:t("tier.upgrade","View Pro")})})]})}),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(x,{text:t("playtest.sample.clearDisabled","Available with Pro for 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")})]}),R?e.jsx("div",{className:s.emptyState,children:t("common.loading","Loading...")}):w.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.jsx("div",{className:s.emptyStateMessage,children:t("playtest.empty.message","Test results will appear here after the AI Agent runs a Playtest.")})]}):e.jsx(Xe,{entries:w,onSelect:B,selectedTimestamp:N??void 0})]}),C&&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(et,{report:C})]}),!a&&e.jsx(E,{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:T})]})}export{nt as Component};