@weppy/roblox-mcp 2.17.8 → 2.17.10
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.
- package/CHANGELOG.md +27 -0
- package/README.md +14 -5
- package/dashboard/dist/assets/{AiPromptExamples-FjV57hJp.js → AiPromptExamples-BSFrFYar.js} +1 -1
- package/dashboard/dist/assets/AssetsPage-Bt9gZnJ_.js +61 -0
- package/dashboard/dist/assets/ChangelogPage-C4tBBoXT.js +1 -0
- package/dashboard/dist/assets/{ConfirmModal-Ddk0UX_P.js → ConfirmModal-BbqpSaVw.js} +1 -1
- package/dashboard/dist/assets/ConnectionPage-BStKoHK8.css +1 -0
- package/dashboard/dist/assets/ConnectionPage-Sy7xUWtJ.js +6 -0
- package/dashboard/dist/assets/{ControlsPage-Cl_mQpzx.js → ControlsPage-ECpr55X_.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-br9EgICc.js → GameChangeDetail-DJ0xywJq.js} +1 -1
- package/dashboard/dist/assets/InfoLabel-DAd1I756.js +1 -0
- package/dashboard/dist/assets/OverviewPage-C2xJb1Wf.js +1 -0
- package/dashboard/dist/assets/{PageHeader-Dc41DgFB.js → PageHeader-_z4Dtkbg.js} +1 -1
- package/dashboard/dist/assets/PlaceSelectOptions-Dd_m61bQ.js +1 -0
- package/dashboard/dist/assets/{PlaytestAiPromptExamples-CkR6t6Na.js → PlaytestAiPromptExamples-CNe0qWb1.js} +1 -1
- package/dashboard/dist/assets/{PlaytestPage-ShadLIAO.js → PlaytestPage-DZa14JH0.js} +18 -23
- package/dashboard/dist/assets/{SettingsPage-CGGHBxbL.js → SettingsPage-BiDPnuz8.js} +1 -1
- package/dashboard/dist/assets/SyncPage-BIm9tW0s.css +1 -0
- package/dashboard/dist/assets/SyncPage-EcDvwdB8.js +1 -0
- package/dashboard/dist/assets/Tabs-BoD1I6c5.js +1 -0
- package/dashboard/dist/assets/{CurrentPlaceScope-B6NllTmu.css → Tabs-Ci4-OJm-.css} +1 -1
- package/dashboard/dist/assets/{TierPromoPanel-B0BctivD.js → TierPromoPanel-CQQdO5mK.js} +1 -1
- package/dashboard/dist/assets/ToolsPage-D7ovZ3QM.js +1 -0
- package/dashboard/dist/assets/TooltipText-NA7u0bu6.js +1 -0
- package/dashboard/dist/assets/{UiStudioPage-DzG_JVxv.js → UiStudioPage-wYZQClUu.js} +2 -2
- package/dashboard/dist/assets/{WhatsNewPage-BpSGOLxW.js → WhatsNewPage-D3cvOOAD.js} +1 -1
- package/dashboard/dist/assets/{bot-BCKWpJd_.js → bot-D89pfHg8.js} +1 -1
- package/dashboard/dist/assets/{check-DvBWmDvn.js → check-GVlTbKVy.js} +1 -1
- package/dashboard/dist/assets/{copy-vqzBh0XB.js → copy-DVGVC27v.js} +1 -1
- package/dashboard/dist/assets/index-uP4eoQi-.js +746 -0
- package/dashboard/dist/assets/rotate-ccw-Dxk8CuFi.js +6 -0
- package/dashboard/dist/assets/sample-requests-CQy_WSFJ.js +1 -0
- package/dashboard/dist/assets/{trash-2-zj182u9_.js → trash-2-CEfHj47n.js} +1 -1
- package/dashboard/dist/assets/useLiveUptime-BGDr-4gk.js +1 -0
- package/dashboard/dist/assets/{useSettings-Cme-nLG9.js → useSettings-kOu_k9zT.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dist/index.js +170 -170
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/AssetsPage-DvCSWpoy.js +0 -61
- package/dashboard/dist/assets/ChangelogPage-BrNOX2vc.js +0 -1
- package/dashboard/dist/assets/ConnectionPage-B3fGIK2X.css +0 -1
- package/dashboard/dist/assets/ConnectionPage-B62B5vSh.js +0 -6
- package/dashboard/dist/assets/CurrentPlaceScope-Y25KxsHT.js +0 -1
- package/dashboard/dist/assets/InfoLabel-CAGC3efT.js +0 -1
- package/dashboard/dist/assets/OverviewPage-DxRlbjwz.js +0 -1
- package/dashboard/dist/assets/PlaceSelectOptions-Gd2pK9DL.js +0 -1
- package/dashboard/dist/assets/StatusBadge-Cdfb5vyE.js +0 -1
- package/dashboard/dist/assets/SyncPage-BgbrC3SP.css +0 -1
- package/dashboard/dist/assets/SyncPage-CT2ECSYt.js +0 -1
- package/dashboard/dist/assets/Tabs-CPTkUoYi.css +0 -1
- package/dashboard/dist/assets/Tabs-Dl0dNd8V.js +0 -1
- package/dashboard/dist/assets/ToolsPage-CsFjwKOz.js +0 -1
- package/dashboard/dist/assets/TooltipText-C0DmdntK.js +0 -1
- package/dashboard/dist/assets/index-CG4GxcAc.js +0 -714
- package/dashboard/dist/assets/sample-requests-BqgMpTlQ.js +0 -1
- package/dashboard/dist/assets/useLiveUptime-yZ9iKJ1B.js +0 -1
- /package/dashboard/dist/assets/{StatusBadge-C2zYt5iE.css → useLiveUptime-C2zYt5iE.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s,u as R,r as h,d as L,e as F,b as M,D as V}from"./index-CG4GxcAc.js";import{I as A}from"./InfoLabel-CAGC3efT.js";import{P as U}from"./PageHeader-Dc41DgFB.js";import{S as z}from"./StatusBadge-Cdfb5vyE.js";import{T as O}from"./TooltipText-C0DmdntK.js";import{G as X}from"./GameChangeDetail-br9EgICc.js";import{u as q,f as J}from"./useLiveUptime-yZ9iKJ1B.js";const K="_page_amwos_2",Q="_card_amwos_10",W="_cardHeader_amwos_17",Y="_disconnectCard_amwos_28",Z="_disconnectIcon_amwos_36",ee="_disconnectTitle_amwos_41",se="_disconnectMessage_amwos_48",te="_reconnectGuide_amwos_55",ne="_guideStep_amwos_64",ie="_stepNumber_amwos_72",ae="_reconnectIndicator_amwos_88",ce="_reconnectDot_amwos_98",re="_pulse_amwos_1",oe="_disconnectActions_amwos_112",le="_btn_amwos_118",de="_btnSecondary_amwos_134",me="_metricRow_amwos_152",ue="_metricGrid_amwos_158",ve="_metricCard_amwos_164",ge="_metric_ok_amwos_174",_e="_metric_warn_amwos_179",he="_metric_error_amwos_184",pe="_metricHeader_amwos_189",we="_metricIcon_amwos_200",fe="_metricTitle_amwos_204",xe="_metricValue_amwos_208",Ce="_metricSubtitle_amwos_215",je="_guideCard_amwos_225",Ne="_guideTitle_amwos_232",ye="_checklist_amwos_239",Te="_feedEmpty_amwos_263",Se="_feedList_amwos_270",Ie="_feedItem_amwos_278",be="_feedTime_amwos_291",ke="_feedIcon_amwos_298",Me="_feedSummary_amwos_304",De="_feedText_amwos_313",Be="_feedContext_amwos_321",He="_feedItemClickable_amwos_330",Ee="_feedChevron_amwos_338",Pe="_feedDetail_amwos_347",$e="_feedDetailPre_amwos_356",Re="_feedDetailText_amwos_365",Ge="_changelogSummary_amwos_372",Le="_changeTag_amwos_381",Fe="_tierBar_amwos_393",Ve="_tierBarTrack_amwos_399",Ae="_tierBarFillBasic_amwos_407",Ue="_tierBarFillPro_amwos_412",ze="_tierLabels_amwos_417",t={page:K,card:Q,cardHeader:W,disconnectCard:Y,disconnectIcon:Z,disconnectTitle:ee,disconnectMessage:se,reconnectGuide:te,guideStep:ne,stepNumber:ie,reconnectIndicator:ae,reconnectDot:ce,pulse:re,disconnectActions:oe,btn:le,btnSecondary:de,metricRow:me,metricGrid:ue,metricCard:ve,metric_ok:ge,metric_warn:_e,metric_error:he,metricHeader:pe,metricIcon:we,metricTitle:fe,metricValue:xe,metricSubtitle:Ce,guideCard:je,guideTitle:Ne,checklist:ye,feedEmpty:Te,feedList:Se,feedItem:Ie,feedTime:be,feedIcon:ke,feedSummary:Me,feedText:De,feedContext:Be,feedItemClickable:He,feedChevron:Ee,feedDetail:Pe,feedDetailPre:$e,feedDetailText:Re,changelogSummary:Ge,changeTag:Le,tierBar:Fe,tierBarTrack:Ve,tierBarFillBasic:Ae,tierBarFillPro:Ue,tierLabels:ze};function N({title:e,value:i,icon:a,subtitle:c,status:r,children:n}){const l=r?t[`metric_${r}`]:"";return s.jsxs("div",{className:`${t.metricCard} ${l}`,children:[s.jsxs("div",{className:t.metricHeader,children:[a&&s.jsx("span",{className:t.metricIcon,children:a}),s.jsx("span",{className:t.metricTitle,children:e})]}),s.jsx("div",{className:t.metricValue,children:i}),c&&s.jsx("div",{className:t.metricSubtitle,children:c}),n]})}function Oe(e){var a,c;const i=e==null?void 0:e.contextSummary;return(i==null?void 0:i.intent)??((c=(a=i==null?void 0:i.affectedAreas)==null?void 0:a[0])==null?void 0:c.label)??(i==null?void 0:i.testScenario)??null}function H({changes:e}){const{t:i}=R(),[a,c]=h.useState(null);return e.length===0?s.jsx("div",{className:t.feedEmpty,children:i("overview.feed.empty")}):s.jsx("div",{className:t.feedList,children:e.map((r,n)=>{const l=a===n,m=r.raw,u=m&&(m.before!=null||m.after!=null||m.details!=null),p=Oe(m);return s.jsxs("div",{children:[s.jsxs("div",{className:`${t.feedItem} ${u?t.feedItemClickable:""}`,onClick:()=>u&&c(l?null:n),children:[s.jsx("span",{className:t.feedTime,children:r.timestamp}),s.jsx("span",{className:t.feedIcon,children:r.icon}),s.jsxs("span",{className:t.feedText,children:[s.jsx("span",{className:t.feedSummary,children:r.summary}),p&&s.jsx("span",{className:t.feedContext,children:p})]}),u&&s.jsx("span",{className:t.feedChevron,children:l?"▴":"▾"})]}),l&&m&&s.jsx("div",{className:t.feedDetail,children:s.jsx(X,{change:m})})]},n)})})}const E=20;function G(e){return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`}function P(){return G(new Date)}function $(e){switch(e){case"script":return"📝";case"instance":return"🧱";case"property":return"🎨";case"lighting":return"💡";case"terrain":return"⛰️";case"asset":return"📦";default:return"🔧"}}function Xe(){const{level:e,status:i}=L(),a=F(),[c,r]=h.useState(null),[n,l]=h.useState(null),[m,u]=h.useState(null),[p,v]=h.useState([]),y=h.useRef(null),T=h.useCallback(async()=>{try{const o=await M.get("/connection-info");r(o)}catch{r(null)}},[]),S=h.useCallback(async()=>{try{const o=await M.get("/api/dashboard/changelog/active");if(u(o),o.recentChanges&&o.recentChanges.length>0){const w=o.recentChanges.map(g=>({timestamp:g.timestamp?G(new Date(g.timestamp)):P(),icon:$(g.category),summary:g.summary,category:g.category,raw:g}));v(w)}}catch{u(null)}},[]),f=h.useCallback(async()=>{try{const o=await M.get("/sync/status");l(o)}catch{l(null)}},[]);return h.useEffect(()=>{e!=="disconnected"?(T(),S(),f()):(r(null),l(null),u(null));const o=new V;y.current=o,o.connect();const w=o.on("game_change",x=>{const _=x,C={timestamp:P(),icon:$(_.category),summary:_.summary,category:_.category};v(k=>{const j=[C,...k];return j.length>E?j.slice(0,E):j}),S()}),g=o.on("sync",x=>{const _=x;l(C=>({...C,state:_.status,..._.placeId?{placeId:_.placeId}:{}}))});return()=>{w(),g(),o.disconnect(),y.current=null}},[e,T,S,f]),{level:e,status:i,connectionInfo:c,syncStatus:n,changeSummary:m,recentChanges:p,tier:a}}function D(e){return e.scriptsModified+e.scriptsCreated+e.instancesCreated+e.instancesDeleted+e.instancesMoved+e.propertiesChanged+e.assetsInserted+(e.lightingChanged?1:0)+(e.terrainChanged?1:0)}function qe(e,i){switch(e){case"syncing":return i("status.syncing","Syncing");case"initializing":return i("status.initializing","Initializing");case"error":return i("status.error","Error");default:return i("status.idle","Idle")}}function Je(e){switch(e){case"syncing":return"ok";case"initializing":return"warn";case"error":return"error";default:return"ok"}}function b(e,i,a,c){return s.jsxs("div",{className:e.metricSubtitle,children:[s.jsx(A,{label:i,tooltip:a}),": ",c]},i)}function d(e,i){return s.jsx(O,{text:i,children:e})}function ts(){var j,B;const{t:e}=R(),{level:i,status:a,connectionInfo:c,syncStatus:r,changeSummary:n,recentChanges:l}=Xe(),m=q(a==null?void 0:a.uptime),u=s.jsx(U,{title:e("page.overview.title","Overview"),description:e("page.overview.description","Check server, plugin, agent, sync, and recent game-change status in one place."),helpTopicId:"overview",helpState:{connectionLevel:i}});if(i==="disconnected")return s.jsxs("div",{className:t.page,children:[u,s.jsxs("div",{className:t.disconnectCard,children:[s.jsx("div",{className:t.disconnectIcon,children:"⚠️"}),s.jsx("h2",{className:t.disconnectTitle,children:e("overview.l0.title")}),s.jsx("p",{className:t.disconnectMessage,children:e("overview.l0.message")}),s.jsxs("div",{className:t.reconnectGuide,children:[s.jsxs("div",{className:t.guideStep,children:[s.jsx("span",{className:t.stepNumber,children:"1"}),s.jsx("span",{children:e("overview.l0.step1")})]}),s.jsxs("div",{className:t.guideStep,children:[s.jsx("span",{className:t.stepNumber,children:"2"}),s.jsx("span",{children:e("overview.l0.step2")})]})]}),s.jsxs("div",{className:t.reconnectIndicator,children:[s.jsx("span",{className:t.reconnectDot}),e("overview.l0.reconnecting")]}),s.jsxs("div",{className:t.disconnectActions,children:[s.jsx("button",{className:t.btn,onClick:()=>window.location.reload(),children:e("overview.l0.reconnectBtn")}),s.jsx("button",{className:t.btnSecondary,onClick:()=>{window.location.hash="#/settings"},children:e("overview.l0.settingsBtn")})]})]})]});const p=(c==null?void 0:c.mcpInstanceCount)??0,v=((j=c==null?void 0:c.mcpInstances)==null?void 0:j.find(I=>!I.isServer&&I.aiClientName))??((B=c==null?void 0:c.mcpInstances)==null?void 0:B.find(I=>!!I.aiClientName))??null,y=(a==null?void 0:a.pluginClients)??[],T=y.length>0,S=(a==null?void 0:a.sessionId)??(c==null?void 0:c.sessionId)??"-",f=e("overview.metric.server.tooltip","MCP server runtime and process status"),o=e("overview.metric.plugin.tooltip","Roblox Studio plugin connection and version status"),w=e("overview.metric.agent.tooltip","Connected AI coding agents and their runtime state"),g=e("overview.metric.sync.tooltip","Current Studio to local sync activity"),x=a?[b(t,e("overview.meta.version","Version"),e("overview.meta.version.tooltip","Installed MCP server version"),`v${a.version}`),b(t,e("overview.meta.session","Session"),e("overview.meta.session.tooltip","Current MCP session identifier"),S),b(t,e("overview.meta.pid","PID"),e("overview.meta.pid.tooltip","Operating system process identifier"),String(a.pid??"-")),b(t,e("overview.meta.uptime","Uptime"),e("overview.meta.uptime.tooltip","Time elapsed since the MCP server started"),J(m??a.uptime))]:[];if(i==="serverOnly")return s.jsxs("div",{className:t.page,children:[u,s.jsxs("div",{className:t.metricRow,children:[s.jsx(N,{title:d(e("overview.metric.server"),f),value:d(e("status.online"),f),icon:"🖥️",status:"ok",children:s.jsxs(s.Fragment,{children:[x,s.jsx(z,{status:"online"})]})}),s.jsx(N,{title:d(e("overview.metric.agent"),w),value:d((v==null?void 0:v.aiClientName)??e("overview.metric.noAgent"),w),icon:"🤖",subtitle:p>1?`${p} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:v?"ok":"warn"})]}),s.jsxs("div",{className:t.guideCard,children:[s.jsx("h3",{className:t.guideTitle,children:e("overview.l1.pluginGuide")}),s.jsxs("ul",{className:t.checklist,children:[s.jsx("li",{children:e("overview.l1.check1")}),s.jsx("li",{children:e("overview.l1.check2")})]})]}),s.jsxs("div",{className:t.card,children:[s.jsx("div",{className:t.cardHeader,children:e("overview.feed.title")}),l.length>0?s.jsx(H,{changes:l}):s.jsx("div",{className:t.feedEmpty,children:e("overview.l1.feedHint")})]}),n&&D(n)>0&&s.jsxs("div",{className:t.card,children:[s.jsx("div",{className:t.cardHeader,children:e("overview.changelog.title")}),s.jsxs("div",{className:t.changelogSummary,children:[s.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",D(n)]}),n.scriptsModified>0&&s.jsxs("span",{className:t.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&s.jsxs("span",{className:t.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&s.jsxs("span",{className:t.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&s.jsxs("span",{className:t.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]});const _=y[0],C=n?D(n):0,k=!!n&&C>0;return s.jsxs("div",{className:t.page,children:[u,s.jsxs("div",{className:t.metricGrid,children:[s.jsx(N,{title:d(e("overview.metric.server"),f),value:d(e("status.online"),f),icon:"🖥️",status:"ok",children:s.jsx(s.Fragment,{children:x})}),s.jsx(N,{title:d(e("overview.metric.plugin"),o),value:d(e(T?"status.online":"status.offline"),o),icon:"🔌",subtitle:_?`${_.placeName??"-"} / v${_.pluginVersion??"-"}`:void 0,status:T?"ok":"error"}),s.jsx(N,{title:d(e("overview.metric.agent"),w),value:d((v==null?void 0:v.aiClientName)??e("overview.metric.noAgent"),w),icon:"🤖",subtitle:p>1?`${p} ${e("overview.metric.agent.instancesUnit","instances")}`:void 0,status:v?"ok":"warn"}),s.jsx(N,{title:d(e("overview.metric.sync"),g),value:d(qe(r==null?void 0:r.state,e),g),icon:"🔄",status:Je(r==null?void 0:r.state)})]}),s.jsxs("div",{className:t.card,children:[s.jsx("div",{className:t.cardHeader,children:e("overview.feed.title")}),s.jsx(H,{changes:l})]}),k&&s.jsxs("div",{className:t.card,children:[s.jsx("div",{className:t.cardHeader,children:e("overview.changelog.title")}),s.jsxs("div",{className:t.changelogSummary,children:[s.jsxs("span",{children:[e("overview.changelog.entries","Entries"),": ",C]}),n.scriptsModified>0&&s.jsxs("span",{className:t.changeTag,children:["📝"," ",n.scriptsModified," ",e("overview.changelog.scripts")]}),n.instancesCreated>0&&s.jsxs("span",{className:t.changeTag,children:["🧱"," ",n.instancesCreated," ",e("overview.changelog.instances")]}),n.propertiesChanged>0&&s.jsxs("span",{className:t.changeTag,children:["🎨"," ",n.propertiesChanged," ",e("overview.changelog.properties")]}),n.assetsInserted>0&&s.jsxs("span",{className:t.changeTag,children:["📦"," ",n.assetsInserted," ",e("overview.changelog.assets")]})]})]})]})}export{ts as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,z as r,B as b,q as j}from"./index-CG4GxcAc.js";const x="_details_1nw6u_1",P={details:x};function I(c,e,l,o,s,d,a,i){const f=c.isConnected?l:o,u=r(c),p=[f,u==="duplicate"?s:u==="unresolved"?d:null,i===!1?a:null].filter(n=>!!n);return`${e} (${c.placeId}) — ${p.join(" · ")}`}function $(c){const e=new Set;return c.filter(l=>l.placeId<=0||r(l)!=="unresolved"?!0:e.has(l.placeId)?!1:(e.add(l.placeId),!0))}function h(c,e){return Object.entries(e).reduce((l,[o,s])=>l.replace(`{${o}}`,s),c)}function N({places:c,t:e}){const l=$(c),o=l.filter(n=>n.isConnected),s=l.filter(n=>!n.isConnected),d=e("placeScope.connected","Studio connected"),a=e("placeScope.stored","Stored data"),i=e("placeScope.folder.duplicate","Duplicate folder"),f=e("placeScope.folder.unresolved","Representative folder unconfirmed"),u=e("placeScope.folder.noSyncHistory","No sync history"),p=n=>{const S=b(n),m=r(n)==="unresolved"&&n.placeId>0,y=j(c,n),v=m?h(e("placeScope.folder.unresolvedPlace","Place {placeId}"),{placeId:String(n.placeId)}):n.placeName;return t.jsx("option",{value:S?`folder:${n.placeDirName}`:n.placeId,disabled:S,children:I(n,v,d,a,i,f,u,y)},`${n.placeId}:${n.placeDirName}`)};return t.jsxs(t.Fragment,{children:[o.length>0?t.jsx("optgroup",{label:e("placeScope.connectedGroup","Connected Studios"),children:o.map(p)}):null,s.length>0?t.jsx("optgroup",{label:e("placeScope.storedGroup","Stored data"),children:s.map(p)}):null]})}function g({places:c,t:e}){const l=c.filter(o=>r(o)==="duplicate"||r(o)==="unresolved");return l.length===0?null:t.jsxs("details",{className:P.details,children:[t.jsx("summary",{children:e("placeScope.folder.details","Place folder details")}),t.jsx("ul",{children:l.map(o=>{const s=r(o)==="duplicate",d=s?e("placeScope.folder.duplicate","Duplicate folder"):e("placeScope.folder.unresolved","Representative folder unconfirmed"),a=s?h(e("placeScope.folder.duplicateReason","The current saved location is {canonicalFolder}. This folder is backed up after a successful full sync."),{canonicalFolder:o.canonicalPlaceDirName??e("placeScope.folder.unknown","unknown")}):e("placeScope.folder.unresolvedReason","This Place remains selectable by ID, but no specific folder is confirmed as the representative yet."),i=o.hasSyncMetadata===!1?`${e("placeScope.folder.noSyncHistory","No sync history")}. ${a}`:a;return t.jsxs("li",{children:[t.jsx("strong",{children:d}),t.jsx("span",{children:o.placeDirName}),t.jsx("span",{children:i})]},`${o.placeId}:${o.placeDirName}`)})})]})}export{N as P,g as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as o,j as s}from"./index-CG4GxcAc.js";const e="_badge_1ucqq_2",c="_dot_1ucqq_12",a="_online_1ucqq_20",l="_offline_1ucqq_25",_="_idle_1ucqq_30",u="_syncing_1ucqq_34",d="_initializing_1ucqq_35",n={badge:e,dot:c,online:a,offline:l,idle:_,syncing:u,initializing:d},g={online:"status.online",offline:"status.offline",idle:"status.idle",syncing:"status.syncing",initializing:"status.initializing"};function f({status:i}){const{t}=o();return s.jsxs("span",{className:n.badge,children:[s.jsx("span",{className:`${n.dot} ${n[i]}`}),t(g[i])]})}export{f as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._page_1rrgy_2{display:flex;flex-direction:column;gap:var(--space-page);max-width:900px}._card_1rrgy_10{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:var(--card-padding-block) var(--card-padding-inline)}._cardHeader_1rrgy_17{font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600;color:var(--text-primary);margin-bottom:var(--space-section);display:flex;align-items:center;justify-content:space-between;gap:var(--space-related)}._clearButton_1rrgy_29{border:1px solid var(--danger-border);background:var(--danger-bg);color:var(--danger-text);border-radius:var(--radius-control);padding:6px 12px;font-family:var(--font-label);font-size:12px;font-weight:600;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._clearButton_1rrgy_29:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearButton_1rrgy_29:focus-visible{outline:none;box-shadow:var(--focus-ring)}._statusRow_1rrgy_53{display:flex;align-items:center;gap:12px;margin-bottom:8px}._metaItem_1rrgy_60{font-family:var(--font-code);font-size:12px;color:var(--text-secondary)}._statusGrid_1rrgy_66{display:grid;grid-template-columns:auto 1fr;gap:4px 16px;font-size:12px}._statusGrid_1rrgy_66 dt{color:var(--text-secondary);font-family:var(--font-label)}._statusGrid_1rrgy_66 dd{margin:0;font-family:var(--font-code);color:var(--text-primary)}._migrationPanel_1rrgy_85{display:flex;flex-direction:column;gap:16px;font-size:16px}._migrationHeader_1rrgy_92{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}._migrationTitle_1rrgy_99{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:20px;line-height:1.25;font-weight:600}._migrationDescription_1rrgy_108{max-width:640px;margin:8px 0 0;color:var(--text-secondary);font-size:16px;line-height:1.5}._migrationLedger_1rrgy_116{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--border);background:var(--bg-secondary)}._migrationLedgerItem_1rrgy_123{display:flex;min-width:0;min-height:64px;flex-direction:column;justify-content:center;gap:4px;padding:8px 12px;border-right:1px solid var(--border);color:var(--text-secondary);font-family:var(--font-label);font-size:14px}._migrationLedgerItem_1rrgy_123:last-child{border-right:0}._migrationLedgerItem_1rrgy_123 strong{color:var(--text-primary);font-family:var(--font-code);font-size:20px;font-variant-numeric:tabular-nums}._migrationLedgerBlocked_1rrgy_148 strong{color:var(--warning-text)}._migrationSection_1rrgy_152{display:flex;flex-direction:column;gap:8px}._migrationSection_1rrgy_152 h3{margin:0;color:var(--text-secondary);font-family:var(--font-label);font-size:14px;font-weight:600}._migrationList_1rrgy_166{display:flex;flex-direction:column;gap:0;margin:0;padding:0;border:1px solid var(--border);list-style:none}._migrationRow_1rrgy_176{display:grid;grid-template-columns:84px minmax(0,1fr);align-items:start;gap:12px;padding:12px;border-bottom:1px solid var(--border)}._migrationRow_1rrgy_176:last-child{border-bottom:0}._migrationOperation_1rrgy_189{min-width:76px;text-transform:uppercase}._migrationRowBody_1rrgy_194{display:flex;min-width:0;flex-direction:column;gap:4px}._migrationRowBody_1rrgy_194 code{overflow-wrap:anywhere;color:var(--text-primary);font-family:var(--font-code);font-size:14px;line-height:1.4}._migrationRowBody_1rrgy_194 span{color:var(--text-secondary);font-size:14px;line-height:1.4}._migrationNotice_1rrgy_215{min-height:24px;color:var(--warning-text);font-size:16px;line-height:1.5}._migrationActions_1rrgy_222{display:flex;justify-content:flex-end;gap:8px}._migrationButton_1rrgy_228{min-height:44px;padding:0 16px;font-size:16px}@media(max-width:640px){._migrationHeader_1rrgy_92{flex-direction:column}._migrationLedger_1rrgy_116{grid-template-columns:repeat(2,minmax(0,1fr))}._migrationLedgerItem_1rrgy_123:nth-child(2){border-right:0}._migrationLedgerItem_1rrgy_123:nth-child(-n+2){border-bottom:1px solid var(--border)}._migrationRow_1rrgy_176{grid-template-columns:1fr}._migrationActions_1rrgy_222{flex-direction:column-reverse}._migrationButton_1rrgy_228{width:100%}}._policySummary_1rrgy_265{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--border)}._policySummaryItem_1rrgy_276{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,1.2fr);align-items:center;min-height:48px;gap:12px;padding:10px 12px;background:var(--bg-secondary)}._policySummaryItem_1rrgy_276 dt{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySummaryItem_1rrgy_276 dd{min-width:0;margin:0;color:var(--text-primary);font-family:var(--font-code);font-size:13px;overflow-wrap:anywhere}._policyPrimaryValue_1rrgy_301{font-family:var(--font-label)!important;font-size:16px!important;font-weight:600}._policyReviewNotice_1rrgy_307{margin-top:12px;padding:10px 12px;border:1px solid var(--warning-border);border-radius:var(--radius-control);background:var(--warning-bg);color:var(--warning-text);font-size:14px;line-height:1.45}._policyApplySection_1rrgy_318{margin-top:12px}._policyApplyHeader_1rrgy_322{margin-bottom:10px}._policyApplyTitle_1rrgy_326{margin:0;color:var(--text-primary);font-family:var(--font-label);font-size:14px;font-weight:600}._policyApplyDescription_1rrgy_334{margin:4px 0 0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;line-height:1.45}._policyInfoLabel_1rrgy_342{border-bottom:1px dotted var(--text-muted);cursor:help}._policyInfoLabel_1rrgy_342:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policySafetyRow_1rrgy_353{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:48px;margin-top:8px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control)}._policySafetyLabel_1rrgy_365{color:var(--text-secondary);font-family:var(--font-label);font-size:12px}._policySafetyBadge_1rrgy_371{min-height:22px}._policyDisclosure_1rrgy_375{display:flex;width:100%;min-height:42px;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;text-align:left;cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._policyDisclosure_1rrgy_375:hover{border-color:var(--border-highlight);background:var(--bg-secondary);color:var(--accent)}._policyDisclosure_1rrgy_375:focus-visible{outline:none;box-shadow:var(--focus-ring)}._policyDisclosureIcon_1rrgy_407{flex:0 0 auto;color:var(--text-muted);font-family:var(--font-code);transition:transform var(--transition)}._policyDisclosureIconOpen_1rrgy_414{transform:rotate(180deg)}._policyScopeList_1rrgy_418{margin-top:8px;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-control)}._policyScopeRow_1rrgy_425{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(0,1.1fr);align-items:center;min-height:44px;gap:16px;padding:8px 12px;border-bottom:1px solid var(--border)}._policyScopeRow_1rrgy_425:last-child{border-bottom:0}._policyScopeName_1rrgy_439{min-width:0;color:var(--text-secondary);font-family:var(--font-label);font-size:13px;overflow-wrap:anywhere}._policyScopeRow_1rrgy_425>[data-tooltip-text]{width:100%}._policyDirectionRail_1rrgy_451{display:grid;width:100%;min-width:0;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);align-items:center;color:var(--text-secondary);font-family:var(--font-code)}._policyDirectionRail_1rrgy_451:focus-visible{outline:none;border-radius:2px;box-shadow:var(--focus-ring)}._policyDirectionEndpoint_1rrgy_467{min-width:0;font-size:11px;font-weight:500;overflow-wrap:anywhere}._policyDirectionEndpointStudio_1rrgy_474{text-align:right}._policyDirectionArrow_1rrgy_478{color:var(--accent);font-size:15px;font-weight:600;text-align:center}@media(max-width:640px){._policySummary_1rrgy_265{grid-template-columns:1fr}._policySummaryItem_1rrgy_276{grid-template-columns:minmax(112px,.8fr) minmax(0,1.2fr)}._policyScopeRow_1rrgy_425{grid-template-columns:1fr;gap:6px}._policySafetyRow_1rrgy_353{grid-template-columns:1fr;align-items:start;gap:8px;padding:10px 12px}._policySafetyRow_1rrgy_353>[data-tooltip-text]{max-width:100%;justify-self:start}._policySafetyBadge_1rrgy_371{height:auto;min-height:22px;white-space:normal;line-height:1.25;text-align:left}}._forwardBadge_1rrgy_521{display:inline-flex;align-items:center;min-height:20px;padding:2px 8px;font-size:10px;font-weight:600;letter-spacing:.04em;color:var(--text-secondary);background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-control)}._logContainer_1rrgy_536{max-height:240px;overflow-y:auto;font-family:var(--font-code);font-size:11px}._logEntry_1rrgy_543{display:flex;gap:10px;padding:3px 0;border-bottom:1px solid var(--border);color:var(--text-primary)}._logEntry_1rrgy_543:last-child{border-bottom:none}._logTime_1rrgy_555{color:var(--text-muted);flex-shrink:0;width:44px}._logType_1rrgy_561{font-weight:500;flex-shrink:0;width:90px;text-transform:uppercase;font-size:10px;letter-spacing:.04em}._logTypeWrite_1rrgy_570{color:var(--success)}._logTypeUpdate_1rrgy_574{color:var(--accent)}._logTypeDelete_1rrgy_578{color:var(--error)}._logTypeIdle_1rrgy_582{color:var(--text-muted)}._logPath_1rrgy_586{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._logEmpty_1rrgy_593{color:var(--text-muted);font-style:italic;padding:8px 0}._overlay_1rrgy_600{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 24px;gap:16px}._overlayTitle_1rrgy_610{font-family:var(--font-label);font-size:15px;font-weight:600;color:var(--text-primary)}._overlayMessage_1rrgy_617{font-size:13px;color:var(--text-secondary);max-width:400px}._checklist_1rrgy_623{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;text-align:left}._checkItem_1rrgy_633{font-family:var(--font-code);font-size:12px;color:var(--text-secondary);padding-left:20px;position:relative}._checkItem_1rrgy_633:before{content:"○";position:absolute;left:0;color:var(--text-muted)}._upgradePanel_1rrgy_649{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px}._upgradePanelHeader_1rrgy_656{font-family:var(--font-label);font-size:13px;font-weight:600;color:var(--accent);margin-bottom:8px}._benefitList_1rrgy_664{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}._benefitItem_1rrgy_673{font-size:12px;color:var(--text-secondary);padding-left:16px;position:relative}._benefitItem_1rrgy_673:before{content:"+";position:absolute;left:0;color:var(--accent);font-weight:600}._upgradeActions_1rrgy_688{display:flex;gap:8px}._btn_1rrgy_693{font-family:var(--font-label);font-size:12px;padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer;transition:background var(--transition),border-color var(--transition)}._btn_1rrgy_693:hover{border-color:var(--accent);background:var(--accent-dim)}._btnPrimary_1rrgy_710{background:var(--accent);color:var(--bg-card);border-color:var(--accent)}._btnPrimary_1rrgy_710:hover{opacity:.9}._disabled_1rrgy_721{opacity:.4;pointer-events:none}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,b,k as C,D as F,u as O,j as e,a as U,d as V,e as W,i as q,T as G}from"./index-CG4GxcAc.js";import{B as R,a as P,P as z}from"./PageHeader-Dc41DgFB.js";import{I}from"./InfoLabel-CAGC3efT.js";import{T as j}from"./TooltipText-C0DmdntK.js";import{C as H}from"./ConfirmModal-Ddk0UX_P.js";import{C as E}from"./CurrentPlaceScope-Y25KxsHT.js";import{S as Y}from"./StatusBadge-Cdfb5vyE.js";import{T as K}from"./TierPromoPanel-B0BctivD.js";import"./ConfirmModal.module-DJksQHBd.js";import"./PlaceSelectOptions-Gd2pK9DL.js";const J=5e3;function Q(){const[t,s]=c.useState(null),[l,a]=c.useState([]),[v,g]=c.useState(!0),[y,f]=c.useState(null),[_,w]=c.useState(null),[r,u]=c.useState({report:null,loading:!1,applying:!1,error:null}),D=c.useRef(null),N=c.useRef(null),x=c.useCallback(async()=>{var p;try{const[n,m]=await Promise.all([b.get("/sync/status"),b.get("/api/dashboard/place-summary")]);s(n);const T=(p=m.places)==null?void 0:p.find(M=>M.isActive);return f((T==null?void 0:T.placeDirName)??null),w(m.activePlaceId),m.activePlaceId}catch{return null}},[]),L=c.useCallback(async()=>{try{const p=await b.get("/sync/history",{limit:"30"});a(p.entries??[])}catch{a([])}},[]),o=c.useCallback(async p=>{if(p===null){u({report:null,loading:!1,applying:!1,error:null});return}u(n=>({...n,loading:!0,error:null}));try{const n=await b.get("/api/sync/migration",{placeId:String(p)});u(m=>({...m,report:n,loading:!1,error:n.status==="blocked"?"migration_blocked":null}))}catch(n){if(n instanceof C&&(n.status===404||n.status===503)){u(m=>({...m,report:null,loading:!1,error:null}));return}u(m=>({...m,loading:!1,error:"unknown"}))}},[]),h=c.useCallback(async()=>{const[p]=await Promise.all([x(),L()]);await o(p),g(!1)},[x,L,o]),k=c.useCallback(()=>{h()},[h]),A=c.useCallback(async()=>{await o(_)},[_,o]),d=c.useCallback(async()=>{const p=r.report;if(!(!p||p.status!=="ready"||r.applying)){u(n=>({...n,applying:!0,error:null}));try{const n=await b.post("/api/sync/migration",{placeId:p.placeId,fromVersion:2,previewFingerprint:p.previewFingerprint,apply:!0});u({report:n,loading:!1,applying:!1,error:null}),await x()}catch(n){if(n instanceof C&&n.status===409&&(n.error==="preview_stale"||n.error==="migration_blocked")){const m=n.error;await o(p.placeId),u(T=>({...T,applying:!1,error:m}));return}u(m=>({...m,applying:!1,error:"unknown"}))}}},[o,x,r.applying,r.report]),S=c.useCallback(async()=>{await b.post("/api/dashboard/sync/history/clear"),a([]),x()},[x]);return c.useEffect(()=>(h(),N.current=setInterval(h,J),()=>{N.current&&clearInterval(N.current)}),[h]),c.useEffect(()=>{const p=new F;D.current=p,p.connect();const n=p.on("sync",()=>{h()});return()=>{n(),p.disconnect(),D.current=null}},[h]),{status:t,history:l,loading:v,activePlaceDirName:y,migration:r,refresh:k,refreshMigration:A,applyMigration:d,clearHistory:S}}const X="_page_1rrgy_2",Z="_card_1rrgy_10",ee="_cardHeader_1rrgy_17",te="_clearButton_1rrgy_29",ie="_statusRow_1rrgy_53",oe="_metaItem_1rrgy_60",ae="_statusGrid_1rrgy_66",se="_migrationPanel_1rrgy_85",re="_migrationHeader_1rrgy_92",ne="_migrationTitle_1rrgy_99",ce="_migrationDescription_1rrgy_108",le="_migrationLedger_1rrgy_116",pe="_migrationLedgerItem_1rrgy_123",ye="_migrationLedgerBlocked_1rrgy_148",de="_migrationSection_1rrgy_152",ue="_migrationList_1rrgy_166",ge="_migrationRow_1rrgy_176",me="_migrationOperation_1rrgy_189",he="_migrationRowBody_1rrgy_194",fe="_migrationNotice_1rrgy_215",_e="_migrationActions_1rrgy_222",xe="_migrationButton_1rrgy_228",je="_policySummary_1rrgy_265",ve="_policySummaryItem_1rrgy_276",Se="_policyPrimaryValue_1rrgy_301",we="_policyReviewNotice_1rrgy_307",Ne="_policyApplySection_1rrgy_318",be="_policyApplyHeader_1rrgy_322",Ie="_policyApplyTitle_1rrgy_326",Le="_policyApplyDescription_1rrgy_334",Te="_policyInfoLabel_1rrgy_342",Re="_policySafetyRow_1rrgy_353",De="_policySafetyLabel_1rrgy_365",ke="_policySafetyBadge_1rrgy_371",Ae="_policyDisclosure_1rrgy_375",Ce="_policyDisclosureIcon_1rrgy_407",Pe="_policyDisclosureIconOpen_1rrgy_414",Ee="_policyScopeList_1rrgy_418",Be="_policyScopeRow_1rrgy_425",$e="_policyScopeName_1rrgy_439",Oe="_policyDirectionRail_1rrgy_451",He="_policyDirectionEndpoint_1rrgy_467",Me="_policyDirectionEndpointStudio_1rrgy_474",Fe="_policyDirectionArrow_1rrgy_478",Ue="_forwardBadge_1rrgy_521",Ve="_logContainer_1rrgy_536",We="_logEntry_1rrgy_543",qe="_logTime_1rrgy_555",Ge="_logType_1rrgy_561",ze="_logTypeWrite_1rrgy_570",Ye="_logTypeUpdate_1rrgy_574",Ke="_logTypeDelete_1rrgy_578",Je="_logTypeIdle_1rrgy_582",Qe="_logPath_1rrgy_586",Xe="_logEmpty_1rrgy_593",Ze="_overlay_1rrgy_600",et="_overlayTitle_1rrgy_610",tt="_overlayMessage_1rrgy_617",it="_checklist_1rrgy_623",ot="_checkItem_1rrgy_633",i={page:X,card:Z,cardHeader:ee,clearButton:te,statusRow:ie,metaItem:oe,statusGrid:ae,migrationPanel:se,migrationHeader:re,migrationTitle:ne,migrationDescription:ce,migrationLedger:le,migrationLedgerItem:pe,migrationLedgerBlocked:ye,migrationSection:de,migrationList:ue,migrationRow:ge,migrationOperation:me,migrationRowBody:he,migrationNotice:fe,migrationActions:_e,migrationButton:xe,policySummary:je,policySummaryItem:ve,policyPrimaryValue:Se,policyReviewNotice:we,policyApplySection:Ne,policyApplyHeader:be,policyApplyTitle:Ie,policyApplyDescription:Le,policyInfoLabel:Te,policySafetyRow:Re,policySafetyLabel:De,policySafetyBadge:ke,policyDisclosure:Ae,policyDisclosureIcon:Ce,policyDisclosureIconOpen:Pe,policyScopeList:Ee,policyScopeRow:Be,policyScopeName:$e,policyDirectionRail:Oe,policyDirectionEndpoint:He,policyDirectionEndpointStudio:Me,policyDirectionArrow:Fe,forwardBadge:Ue,logContainer:Ve,logEntry:We,logTime:qe,logType:Ge,logTypeWrite:ze,logTypeUpdate:Ye,logTypeDelete:Ke,logTypeIdle:Je,logPath:Qe,logEmpty:Xe,overlay:Ze,overlayTitle:et,overlayMessage:tt,checklist:it,checkItem:ot};function at(t){return t==="add"?"success":t==="delete"?"danger":"accent"}function st(t){return`sync.migration.reason.${t}`}function rt(t){return`sync.migration.reason.${t}`}function nt({migration:t,onRefresh:s,onApply:l}){const{t:a}=O(),[v,g]=c.useState(!1),y=t==null?void 0:t.report;if(!t||!y||y.status==="not_required")return null;const f=y.status==="blocked",_=y.status==="ready"&&!t.loading&&!t.applying,w=async()=>{await l(),g(!1)};return e.jsxs("section",{className:`${i.card} ${i.migrationPanel}`,"aria-labelledby":"sync-migration-title",children:[e.jsxs("div",{className:i.migrationHeader,children:[e.jsxs("div",{children:[e.jsx("h2",{id:"sync-migration-title",className:i.migrationTitle,children:a("sync.migration.title","Sync format update available")}),e.jsx("p",{className:i.migrationDescription,children:a("sync.migration.description","Review the metadata changes before updating this place from sync format v2 to v3.")})]}),e.jsx(R,{variant:f?"warning":"accent",children:f?a("sync.migration.status.blocked","Blocked"):a("sync.migration.status.ready","Ready to review")})]}),e.jsxs("div",{className:i.migrationLedger,"aria-label":a("sync.migration.preview","Review changes"),children:[e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.add","Add")}),e.jsx("strong",{children:y.summary.add})]}),e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.modify","Modify")}),e.jsx("strong",{children:y.summary.modify})]}),e.jsxs("div",{className:i.migrationLedgerItem,children:[e.jsx("span",{children:a("sync.migration.summary.delete","Delete")}),e.jsx("strong",{children:y.summary.delete})]}),e.jsxs("div",{className:`${i.migrationLedgerItem} ${f?i.migrationLedgerBlocked:""}`,children:[e.jsx("span",{children:a("sync.migration.summary.blocked","Blocked")}),e.jsx("strong",{children:y.summary.blocked})]})]}),y.changes.length>0&&e.jsxs("div",{className:i.migrationSection,children:[e.jsx("h3",{children:a("sync.migration.changes","Metadata changes")}),e.jsx("ul",{className:i.migrationList,children:y.changes.map(r=>e.jsxs("li",{className:i.migrationRow,children:[e.jsx(R,{variant:at(r.operation),className:i.migrationOperation,children:a(`sync.migration.operation.${r.operation}`,r.operation)}),e.jsxs("div",{className:i.migrationRowBody,children:[e.jsx("code",{children:r.path}),e.jsx("span",{children:a(st(r.reason),r.reason.replace(/_/g," "))})]})]},`${r.operation}:${r.path}`))})]}),y.blockers.length>0&&e.jsxs("div",{className:i.migrationSection,children:[e.jsx("h3",{children:a("sync.migration.blockers","Items to resolve")}),e.jsx("ul",{className:i.migrationList,children:y.blockers.map((r,u)=>e.jsxs("li",{className:i.migrationRow,children:[e.jsx(R,{variant:"warning",className:i.migrationOperation,children:a("sync.migration.summary.blocked","Blocked")}),e.jsxs("div",{className:i.migrationRowBody,children:[r.path&&e.jsx("code",{children:r.path}),e.jsx("span",{children:a(rt(r.reason),r.reason.replace(/_/g," "))})]})]},`${r.reason}:${r.path??u}`))})]}),e.jsxs("div",{className:i.migrationNotice,"aria-live":"polite",children:[(f||t.error==="migration_blocked")&&e.jsx("span",{children:a("sync.migration.blocked","Resolve sync conflicts before updating")}),t.error==="preview_stale"&&e.jsx("span",{children:a("sync.migration.stale","Preview changed. Review the latest diff.")}),t.error==="unknown"&&e.jsx("span",{children:a("sync.migration.error","Could not update the sync format. Try again.")})]}),e.jsxs("div",{className:i.migrationActions,children:[e.jsx(P,{variant:"secondary",className:i.migrationButton,disabled:t.loading||t.applying,onClick:()=>void s(),children:t.loading?a("sync.migration.refreshing","Refreshing…"):a("sync.migration.refresh","Refresh preview")}),e.jsx(P,{variant:"primary",className:i.migrationButton,disabled:!_,onClick:()=>g(!0),children:t.applying?a("sync.migration.applying","Applying…"):a("sync.migration.apply","Apply update")})]}),e.jsx(H,{open:v,title:a("sync.migration.confirm.title","Apply sync format update?"),message:a("sync.migration.confirm.message","Back up and update the listed sync metadata. Your Luau source files will not change."),cancelLabel:a("common.cancel","Cancel"),confirmLabel:a("sync.migration.apply","Apply update"),loading:t.applying,onCancel:()=>!t.applying&&g(!1),onConfirm:()=>void w()})]})}const ct=["scriptSource","properties","structure","serviceProperties"];function lt(t){const s=new Date(t);return`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`}function pt(t){switch(t){case"write":return i.logTypeWrite;case"update":return i.logTypeUpdate;case"delete":return i.logTypeDelete;default:return i.logTypeIdle}}function yt(t){switch(t){case"syncing":return"syncing";case"initializing":return"initializing";case"idle":return"idle";default:return"offline"}}function dt(t,s){const l={studio_first:"Studio First",bidirectional_review:"Bidirectional",local_code_studio_world:"Local Code, Studio World",custom:"Custom"};return t(`sync.policy.preset.${s}`,l[s])}function B(t,s){return s==="auto"?t("sync.policy.apply.auto","Auto apply"):t("sync.policy.apply.manual","Review first")}function ut(t,s){const l={forward:"Studio → Local",reverse:"Local → Studio",bidirectional:"Both ways"};return t(`sync.policy.direction.${s}`,l[s])}function gt(t){return{forward:"←",reverse:"→",bidirectional:"⇄"}[t]}function mt(t,s){const l={forward:"Studio changes are written to local files.",reverse:"Local file changes are applied to Studio.",bidirectional:"Changes can move from Studio to local files and from local files to Studio."};return t(`sync.policy.direction.${s}.tooltip`,l[s])}function $(...t){const s=t[0]??"",l=s.includes("\\")&&!s.includes("/")?"\\":"/";return t.filter(a=>a.length>0).map((a,v)=>v===0?a.replace(/[\\/]+$/g,""):a.replace(/^[\\/]+|[\\/]+$/g,"")).join(l)}function ht(t){const s=t.replace(/[\\/]+$/g,""),l=s.split(/[\\/]+/);return l[l.length-1]??s}function ft(t,s){const l=ht(t);return l==="explorer"?t:l===s?$(t,"explorer"):$(t,s,"explorer")}function _t(t,s){return s?t("sync.policy.safety.auto","Auto delete to Studio"):t("sync.policy.safety.review","Review before delete")}function xt(t,s){return s?t("sync.policy.safety.auto.tooltip","Deleting local files may automatically remove matching Studio instances. This is separate from UI Studio automatic cleanup."):t("sync.policy.safety.review.tooltip","Local file deletions wait for review before matching Studio instances are removed. This is separate from UI Studio automatic cleanup.")}function jt(t,s){switch(s){case"write":return t("sync.log.type.write","WRITE");case"update":return t("sync.log.type.update","UPDATE");case"delete":return t("sync.log.type.delete","DELETE");default:return t("sync.log.type.idle","IDLE")}}function vt(t,s){switch(s){case"write":return t("sync.log.type.write.tooltip","A new sync output was written to disk.");case"update":return t("sync.log.type.update.tooltip","An existing synced file or instance was updated.");case"delete":return t("sync.log.type.delete.tooltip","A synced file or instance was removed.");default:return t("sync.log.type.idle.tooltip","A sync event was recorded without a file mutation.")}}function At(){const{t}=O(),{trackEvent:s}=U(),{level:l}=V(),{tier:a,loading:v}=W(),g=Q(),{show:y}=q(),[f,_]=c.useState(!1),[w,r]=c.useState(!1),[u,D]=c.useState(!1),N=!v&&a==="basic",x=l==="disconnected"||l==="serverOnly",L=e.jsx(z,{title:t("page.sync.title","Sync"),description:t("page.sync.description","Monitor Studio to local sync status, direction, apply mode, and recent sync logs."),helpTopicId:"sync",helpState:{connectionLevel:l,tier:a}});if(x)return e.jsxs("div",{className:i.page,children:[L,e.jsx(E,{surface:"sync"}),e.jsx("div",{className:i.card,children:e.jsxs("div",{className:i.overlay,children:[e.jsx("div",{className:i.overlayTitle,children:t("sync.overlay.title","Roblox Studio plugin required")}),e.jsx("div",{className:i.overlayMessage,children:t("sync.overlay.message","Sync status will be available once the Roblox Studio plugin connects.")}),e.jsxs("ul",{className:i.checklist,children:[e.jsx("li",{className:i.checkItem,children:t("sync.overlay.check1","Is Roblox Studio running?")}),e.jsx("li",{className:i.checkItem,children:t("sync.overlay.check2","Is the WEPPY Plugin installed?")})]})]})})]});const o=g.status,h=g.history,k=yt(o==null?void 0:o.state),A=async()=>{r(!0);try{await g.clearHistory(),y(t("toast.clearSuccess","Cleared successfully"),"success"),_(!1)}catch{y(t("toast.clearFailed","Failed to clear data"),"error")}finally{r(!1)}};return e.jsxs("div",{className:i.page,children:[L,e.jsx(E,{surface:"sync"}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx(j,{text:t("sync.status.title.tooltip","Current Studio and local file sync status for this place."),children:t("sync.status.title","Sync Status")}),N&&e.jsx(j,{text:t("sync.status.forwardOnly.tooltip","Basic tier allows Studio to local forward sync only."),children:e.jsx("span",{className:i.forwardBadge,children:t("sync.status.forwardOnly","Forward Only")})})]}),e.jsxs("div",{className:i.statusRow,children:[e.jsx(Y,{status:k}),(o==null?void 0:o.placeName)&&e.jsxs("span",{className:i.metaItem,children:[e.jsx(I,{label:t("sync.status.place","Place"),tooltip:t("sync.status.place.tooltip","Connected Roblox place name and place ID.")}),": ",o.placeName,o.placeId?` (${o.placeId})`:""]})]}),e.jsxs("dl",{className:i.statusGrid,children:[(o==null?void 0:o.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.path","Place Root"),tooltip:t("sync.status.path.tooltip","Local filesystem root currently used for this place sync output.")})}),e.jsx("dd",{children:o.syncRoot})]}),g.activePlaceDirName&&(o==null?void 0:o.syncRoot)&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.placePath","Explorer Path"),tooltip:t("sync.status.placePath.tooltip","Explorer files path for the active place.")})}),e.jsx("dd",{children:ft(o.syncRoot,g.activePlaceDirName)})]}),(o==null?void 0:o.instanceCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.instances","Instances"),tooltip:t("sync.status.instances.tooltip","Total synced Roblox instances tracked in the local mirror.")})}),e.jsx("dd",{children:o.instanceCount})]}),(o==null?void 0:o.scriptCount)!=null&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.scripts","Scripts"),tooltip:t("sync.status.scripts.tooltip","Total synced script files currently indexed for this place.")})}),e.jsx("dd",{children:o.scriptCount})]}),(o==null?void 0:o.state)==="syncing"&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:e.jsx(I,{label:t("sync.status.state","State"),tooltip:t("sync.status.state.tooltip","Current runtime sync state reported by the server.")})}),e.jsx("dd",{children:t("status.syncing","Syncing")})]})]})]}),e.jsx(nt,{migration:g.migration,onRefresh:g.refreshMigration,onApply:g.applyMigration}),(o==null?void 0:o.policy)&&e.jsxs("div",{className:i.card,children:[e.jsx("div",{className:i.cardHeader,children:e.jsx(j,{text:t("sync.policy.title.tooltip","Effective Sync policy reported by the connected Studio plugin."),children:t("sync.policy.title","Sync Policy")})}),e.jsxs("dl",{className:i.policySummary,children:[e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.activation","Activation")}),e.jsx("dd",{children:e.jsx(R,{variant:o.syncEnabled?"success":"neutral",children:o.syncEnabled?t("sync.policy.activation.on","Sync ON"):t("sync.policy.activation.off","Sync OFF")})})]}),e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:t("sync.policy.preset","Workflow")}),e.jsx("dd",{className:i.policyPrimaryValue,children:dt(t,o.policy.preset)})]})]}),o.policyReviewRequired&&e.jsx("div",{className:i.policyReviewNotice,role:"status",children:t("sync.policy.reviewRequired","Review this policy in the Studio plugin before starting Sync.")}),e.jsxs("section",{className:i.policyApplySection,"aria-labelledby":"sync-policy-apply-title",children:[e.jsxs("div",{className:i.policyApplyHeader,children:[e.jsx("h3",{id:"sync-policy-apply-title",className:i.policyApplyTitle,children:t("sync.policy.apply.title","How local changes apply to Studio")}),e.jsx("p",{className:i.policyApplyDescription,children:t("sync.policy.apply.description","Shows whether changes made locally are reviewed first or applied to Studio automatically.")})]}),e.jsxs("dl",{className:i.policySummary,children:[e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(j,{text:t("sync.policy.apply.content.tooltip","Script Source, property, and Service property changes made locally. Instance creation, deletion, renaming, and moves are Structure changes."),children:e.jsx("span",{className:i.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.content","Content changes")})})}),e.jsx("dd",{children:B(t,o.policy.apply.contentChanges)})]}),e.jsxs("div",{className:i.policySummaryItem,children:[e.jsx("dt",{children:e.jsx(j,{text:t("sync.policy.apply.structure.tooltip","Instance creation, deletion, renaming, and moves made locally. Automatic local deletion additionally requires the separate delete option below."),children:e.jsx("span",{className:i.policyInfoLabel,tabIndex:0,children:t("sync.policy.apply.structure","Structure changes")})})}),e.jsx("dd",{children:B(t,o.policy.apply.structureChanges)})]})]}),e.jsxs("div",{className:i.policySafetyRow,children:[e.jsx("span",{className:i.policySafetyLabel,children:t("sync.policy.safety.localDeletes","Local delete → Studio instance removal")}),e.jsx(j,{text:xt(t,o.policy.autoApplyLocalDeletesToStudio),children:e.jsx(R,{variant:o.policy.autoApplyLocalDeletesToStudio?"warning":"neutral",className:i.policySafetyBadge,tabIndex:0,children:_t(t,o.policy.autoApplyLocalDeletesToStudio)})})]})]}),e.jsxs("button",{type:"button",className:i.policyDisclosure,"aria-expanded":u,"aria-controls":"sync-policy-scope-panel",onClick:()=>D(d=>!d),children:[e.jsx("span",{children:t("sync.policy.scope.disclosure","Scope directions")}),e.jsx("span",{"aria-hidden":"true",className:`${i.policyDisclosureIcon} ${u?i.policyDisclosureIconOpen:""}`,children:"⌄"})]}),u&&e.jsx("div",{id:"sync-policy-scope-panel",className:i.policyScopeList,children:ct.map(d=>{const S=o.policy.directions[d];return e.jsxs("div",{className:i.policyScopeRow,"data-testid":"sync-policy-scope-row",children:[e.jsx("span",{className:i.policyScopeName,children:t(`sync.policy.scope.${d}`,d)}),e.jsx(j,{text:mt(t,S),children:e.jsxs("span",{className:i.policyDirectionRail,"data-testid":"sync-policy-direction-rail",role:"img","aria-label":ut(t,S),tabIndex:0,children:[e.jsx("span",{className:i.policyDirectionEndpoint,children:t("sync.policy.endpoint.local","Local")}),e.jsx("span",{className:i.policyDirectionArrow,"aria-hidden":"true",children:gt(S)}),e.jsx("span",{className:`${i.policyDirectionEndpoint} ${i.policyDirectionEndpointStudio}`,children:t("sync.policy.endpoint.studio","Studio")})]})})]},d)})})]}),e.jsxs("div",{className:i.card,children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx("span",{children:t("sync.log.title","Sync Log")}),e.jsx("button",{className:i.clearButton,onClick:()=>{s("dashboard_click_event",{click_target:"sync_clear_log",page:"sync"}),_(!0)},children:t("common.clear","Clear")})]}),e.jsx("div",{className:i.logContainer,children:h.length===0?e.jsx("div",{className:i.logEmpty,children:t("sync.log.empty","No sync events yet")}):h.map((d,S)=>e.jsxs("div",{className:i.logEntry,children:[e.jsx("span",{className:i.logTime,children:lt(d.timestamp)}),e.jsx(j,{text:vt(t,d.type),children:e.jsx("span",{className:`${i.logType} ${pt(d.type)}`,children:jt(t,d.type)})}),e.jsxs("span",{className:i.logPath,children:[d.path,d.details?` — ${d.details}`:""]})]},S))})]}),N&&e.jsx(K,{title:t("sync.upgrade.title","Explore Full Sync with Pro"),description:t("tier.banner.save","Save AI tokens with Pro!"),benefits:[t("sync.upgrade.benefit1","Bidirectional sync — edit files, auto-apply to Studio"),t("sync.upgrade.benefit2","Reverse sync — push file changes back to Studio"),t("sync.upgrade.benefit3","Full sync history and detailed change log")],upgradeLabel:t("sync.upgrade.buy","View Pro"),upgradeHref:G.sync}),e.jsx(H,{open:f,title:t("sync.clear.title","Clear sync log?"),message:t("sync.clear.message","This permanently removes the stored sync log for the current place."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:w,onCancel:()=>!w&&_(!1),onConfirm:A})]})}export{At as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._backdrop_1sgib_1{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;min-width:0;padding:clamp(12px,2vw,24px);overflow:hidden;box-sizing:border-box;background:#03071294;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}._dialog_1sgib_19{display:flex;flex:1;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);box-shadow:0 24px 60px #0000006b}._dialog_1sgib_19>*{min-width:0;min-height:0;max-height:100%}@media(max-width:1120px){._backdrop_1sgib_1{right:16px;bottom:16px;left:calc(var(--sidebar-width) + 16px);padding:12px}}@media(max-width:768px){._backdrop_1sgib_1{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}}._tabBar_jefog_2{display:flex;align-items:stretch;gap:2px;border-bottom:1px solid var(--border)}._tabs_jefog_9{display:flex;gap:2px}._actions_jefog_14{margin-left:auto;display:flex;align-items:center;gap:8px;padding-bottom:4px}._tab_jefog_2{font-family:var(--font-label);font-size:12px;font-weight:500;min-height:34px;padding:0 14px;background:transparent;border:1px solid transparent;border-bottom:2px solid transparent;border-radius:var(--radius-control) var(--radius-control) 0 0;color:var(--text-secondary);cursor:pointer;transition:background var(--transition),border-color var(--transition),color var(--transition)}._tab_jefog_2:hover{background:var(--bg-secondary);border-color:var(--border);border-bottom-color:transparent;color:var(--text-primary)}._tab_jefog_2:focus-visible{outline:none;box-shadow:var(--focus-ring)}._tabActive_jefog_52{background:var(--accent-dim);color:var(--accent);border-bottom-color:var(--accent)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,w as k,j as d}from"./index-CG4GxcAc.js";const w="_backdrop_1sgib_1",T="_dialog_1sgib_19",j={backdrop:w,dialog:T},B=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contenteditable="true"]','[tabindex]:not([tabindex="-1"])'].join(", ");function L(a){return Array.from(a.querySelectorAll(B))}function R(a){const s=document.activeElement;if(!(s instanceof HTMLElement))return!1;const c=s.closest('[role="dialog"][aria-modal="true"]');return c!==null&&c!==a}function M({open:a,ariaLabel:s,onClose:c,returnFocusTo:f=null,initialFocusRef:l,dismissDisabled:i=!1,children:m,testId:v}){const e=r.useRef(null),t=r.useRef(c),u=r.useRef(i),E=r.useRef(null);return t.current=c,u.current=i,r.useEffect(()=>{if(!a)return;const o=e.current;if(!o)return;const x=document.body.style.overflow;E.current=f??(document.activeElement instanceof HTMLElement?document.activeElement:null),document.body.style.overflow="hidden",((l==null?void 0:l.current)??o).focus();const _=n=>{if(R(o))return;if(n.key==="Escape"){n.preventDefault(),u.current||t.current();return}if(n.key!=="Tab")return;const g=L(o);if(g.length===0){n.preventDefault(),o.focus();return}const p=g[0],h=g[g.length-1],y=document.activeElement;n.shiftKey&&(y===p||!o.contains(y))?(n.preventDefault(),h.focus()):!n.shiftKey&&(y===h||!o.contains(y))&&(n.preventDefault(),p.focus())};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_),document.body.style.overflow=x;const n=f??E.current;n&&document.contains(n)&&n.focus()}},[l,a,f]),a?k.createPortal(d.jsx("div",{className:j.backdrop,"data-testid":v,role:"presentation",onClick:o=>{o.target===o.currentTarget&&!i&&t.current()},children:d.jsx("section",{ref:e,className:j.dialog,role:"dialog","aria-modal":"true","aria-label":s,tabIndex:-1,children:m})}),document.body):null}const A="_tabBar_jefog_2",D="_tabs_jefog_9",N="_actions_jefog_14",C="_tab_jefog_2",S="_tabActive_jefog_52",b={tabBar:A,tabs:D,actions:N,tab:C,tabActive:S};function O({items:a,value:s,onChange:c,ariaLabel:f,className:l,rightActions:i}){const m=r.useRef(null),v=r.useRef(null);return r.useEffect(()=>{const e=()=>{const t=m.current,u=v.current;!t||!u||typeof t.scrollTo!="function"||t.scrollTo({left:Math.max(0,u.offsetLeft+u.offsetWidth/2-t.clientWidth/2),behavior:"auto"})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[s]),d.jsxs("div",{ref:m,className:[b.tabBar,l].filter(Boolean).join(" "),role:"tablist","aria-label":f,children:[d.jsx("div",{className:b.tabs,children:a.map(e=>{const t=e.key===s;return d.jsx("button",{ref:t?v:void 0,type:"button",role:"tab","aria-selected":t,"data-testid":e.testId,className:[b.tab,t?b.tabActive:""].filter(Boolean).join(" "),onClick:()=>c(e.key),children:e.label},e.key)})}),i?d.jsx("div",{className:b.actions,children:i}):null]})}export{M as C,O as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as i,b as I,D as ht,u as at,X as mt,a as bt,i as xt}from"./index-CG4GxcAc.js";import{P as ft}from"./PageHeader-Dc41DgFB.js";import{T as M}from"./TooltipText-C0DmdntK.js";import{C as _t}from"./ConfirmModal-Ddk0UX_P.js";import{T as gt,C as jt}from"./Tabs-Dl0dNd8V.js";import{C as yt}from"./CurrentPlaceScope-Y25KxsHT.js";import"./ConfirmModal.module-DJksQHBd.js";import"./PlaceSelectOptions-Gd2pK9DL.js";const Ct="_wrapper_1s3lp_2",Tt="_table_1s3lp_7",kt="_sortable_1s3lp_32",Nt="_sortArrow_1s3lp_41",St="_clickable_1s3lp_52",wt="_empty_1s3lp_57",A={wrapper:Ct,table:Tt,sortable:kt,sortArrow:Nt,clickable:St,empty:wt};function vt({columns:t,data:o,sortBy:c,sortDir:T="asc",onSort:b,onRowClick:l,rowKey:N,emptyMessage:S}){return e.jsx("div",{className:A.wrapper,children:e.jsxs("table",{className:A.table,children:[e.jsx("thead",{children:e.jsx("tr",{children:t.map(h=>e.jsxs("th",{style:h.width?{width:h.width}:void 0,className:h.sortable?A.sortable:void 0,onClick:h.sortable&&b?()=>b(h.key):void 0,children:[e.jsx("span",{children:h.label}),h.sortable&&c===h.key&&e.jsx("span",{className:A.sortArrow,children:T==="asc"?"▴":"▾"})]},h.key))})}),e.jsx("tbody",{children:o.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:A.empty,children:S||"No data"})}):o.map((h,w)=>{const C=N?N(h):String(w);return e.jsx("tr",{className:l?A.clickable:void 0,tabIndex:l?-1:void 0,onClick:l?_=>l(h,_.currentTarget):void 0,children:t.map(_=>e.jsx("td",{children:_.render?_.render(h):String(h[_.key]??"")},_.key))},C)})})]})})}function Mt(t){return{...t,sequenceNumber:typeof t.sequenceNumber=="number"?t.sequenceNumber:void 0,executionTimeMs:typeof t.executionTimeMs=="number"?t.executionTimeMs:void 0}}const Bt=50;function Pt(t){if(typeof t=="number")return{placeId:String(t)}}function Y(t,o){return typeof o!="number"?t:`${t}?placeId=${encodeURIComponent(String(o))}`}function Lt(t){const o=(t==null?void 0:t.placeId)??null,[c,T]=i.useState(null),[b,l]=i.useState(!0),[N,S]=i.useState([]),[h,w]=i.useState(0),[C,_]=i.useState(!1),[U,O]=i.useState(!0),[m,E]=i.useState(0),[g,F]=i.useState(""),B=i.useRef(null),k=i.useCallback(async()=>{l(!0);try{const j=Pt(o),u=j?await I.get("/api/dashboard/tool-stats",j):await I.get("/api/dashboard/tool-stats");T(u)}catch{}finally{l(!1)}},[o]),x=i.useCallback(async(j,u)=>{O(!0);try{const P={limit:String(Bt),offset:String(j)};u&&(P.tool=u),typeof o=="number"&&(P.placeId=String(o));const H=await I.get("/api/dashboard/history",P);S(H.entries.map(Mt)),w(H.total),_(H.hasMore)}catch{S([]),w(0),_(!1)}finally{O(!1)}},[o]),D=i.useCallback(()=>{k(),x(m,g)},[x,k,m,g]),V=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/history/clear",o)),x(m,g)},[x,m,g,o]),K=i.useCallback(async()=>{await I.post(Y("/api/dashboard/tools/statistics/clear",o)),k()},[k,o]);return i.useEffect(()=>{k()},[k]),i.useEffect(()=>{x(m,g)},[x,m,g]),i.useEffect(()=>{const j=new ht;B.current=j,j.connect();const u=j.on("command",()=>{k(),x(m,g)});return()=>{u(),j.disconnect(),B.current=null}},[x,k,m,g]),{statistics:c,statsLoading:b,history:N,historyTotal:h,historyHasMore:C,historyLoading:U,historyOffset:m,historyToolFilter:g,setHistoryOffset:E,setHistoryToolFilter:F,refresh:D,clearHistory:V,clearStatistics:K}}const Et="_page_1rtjt_2",Ht="_card_1rtjt_14",At="_cardToolbar_1rtjt_21",Rt="_sectionTitle_1rtjt_29",It="_dangerButton_1rtjt_36",Ot="_proBadge_1rtjt_55",Ft="_statusOk_1rtjt_70",Dt="_statusFallback_1rtjt_83",$t="_statusUnsupported_1rtjt_96",qt="_statusWarning_1rtjt_109",Wt="_statusError_1rtjt_122",Ut="_tierBasic_1rtjt_136",Vt="_tierPro_1rtjt_140",Kt="_tierMixed_1rtjt_145",Gt="_filterRow_1rtjt_156",zt="_filterLabel_1rtjt_163",Jt="_filterSelect_1rtjt_172",Qt="_detailsButton_1rtjt_187",Zt="_detailShell_1rtjt_210",Xt="_detailHeader_1rtjt_218",Yt="_detailHeading_1rtjt_229",te="_detailTitle_1rtjt_236",ee="_detailRecordName_1rtjt_243",se="_detailHeaderActions_1rtjt_252",ae="_detailCloseButton_1rtjt_259",oe="_detailBody_1rtjt_282",le="_detailSection_1rtjt_294",re="_detailList_1rtjt_313",ie="_detailItem_1rtjt_319",ne="_detailLabel_1rtjt_326",ce="_detailValue_1rtjt_331",de="_pre_1rtjt_337",ue="_pagination_1rtjt_355",pe="_pageInfo_1rtjt_363",he="_btn_1rtjt_369",me="_tierDistribution_1rtjt_397",be="_tierBarWrap_1rtjt_401",xe="_tierBarBasic_1rtjt_409",fe="_tierBarPro_1rtjt_414",_e="_tierLabels_1rtjt_419",ge="_statsTableWrap_1rtjt_428",je="_statsTable_1rtjt_428",ye="_sortableHeader_1rtjt_460",Ce="_sortArrow_1rtjt_465",Te="_statsToolRow_1rtjt_469",ke="_statsActionRow_1rtjt_477",Ne="_expandButton_1rtjt_481",Se="_expandIcon_1rtjt_493",we="_actionLabel_1rtjt_498",ve="_emptyStats_1rtjt_505",Me="_summaryLine_1rtjt_511",a={page:Et,card:Ht,cardToolbar:At,sectionTitle:Rt,dangerButton:It,proBadge:Ot,statusOk:Ft,statusFallback:Dt,statusUnsupported:$t,statusWarning:qt,statusError:Wt,tierBasic:Ut,tierPro:Vt,tierMixed:Kt,filterRow:Gt,filterLabel:zt,filterSelect:Jt,detailsButton:Qt,detailShell:Zt,detailHeader:Xt,detailHeading:Yt,detailTitle:te,detailRecordName:ee,detailHeaderActions:se,detailCloseButton:ae,detailBody:oe,detailSection:le,detailList:re,detailItem:ie,detailLabel:ne,detailValue:ce,pre:de,pagination:ue,pageInfo:pe,btn:he,tierDistribution:me,tierBarWrap:be,tierBarBasic:xe,tierBarPro:fe,tierLabels:_e,statsTableWrap:ge,statsTable:je,sortableHeader:ye,sortArrow:Ce,statsToolRow:Te,statsActionRow:ke,expandButton:Ne,expandIcon:Se,actionLabel:we,emptyStats:ve,summaryLine:Me},Be=new Set(["clientId","placeId","pinnedTarget","recentPriority","globalQueue"]);function tt(t){return typeof t=="string"&&t.length>0?t:void 0}function Pe(t){if(!Array.isArray(t))return;const o=t.filter(c=>typeof c=="string"&&c.length>0);return o.length>0?o:void 0}function Le(t){const o=t.result??{};return{requestedCommand:t.requestedCommand??tt(o.requestedCommand),executedCommand:t.executedCommand??tt(o.executedCommand),alternatives:t.alternatives??Pe(o.alternatives)}}function ot(t,o){switch(t.status){case"fallback":return{label:o("tools.badge.fallback","FALLBACK"),tooltip:o("tools.badge.fallback.tooltip","The requested Pro action succeeded via a Basic fallback."),className:a.statusFallback};case"unsupported":return{label:o("tools.badge.unsupported","UNSUPPORTED"),tooltip:o("tools.badge.unsupported.tooltip","The requested Pro action was blocked and no fallback ran."),className:a.statusUnsupported};case"warning":return{label:o("tools.badge.warn","WARN"),tooltip:o("tools.badge.warn.tooltip","The tool call failed as an expected caller, project, policy, or user-code issue."),className:a.statusWarning};case"error":return{label:o("tools.badge.err","FAILED"),tooltip:o("tools.badge.err.tooltip","The tool run failed."),className:a.statusError};default:return{label:o("tools.status.ok","OK"),tooltip:o("tools.status.ok.tooltip","The tool run completed successfully."),className:a.statusOk}}}function y(t,o){return e.jsxs("div",{className:a.detailItem,children:[e.jsx("span",{className:a.detailLabel,children:t}),e.jsx("span",{className:a.detailValue,children:o})]})}function Ee(t){if(!t||typeof t!="object")return;const o=t;if(typeof o.selectionMode=="string"&&Be.has(o.selectionMode))return o}function et(t){if(!(!t||typeof t!="object"||!("routing"in t)))return Ee(t.routing)}function He(t){return t.routing??et(t.result)??et(t.data)}function Ae(t,o){return t.requestedClientId?t.requestedClientId:t.requestedPlaceId!==void 0?t.requestedPlaceId:o("tools.history.routing.none","No Studio target named")}function Re(t){return t.actualPlaceName?`${t.actualPlaceName} · ${t.actualPlaceId??"-"}`:t.actualClientId??"-"}function Ie({entry:t,onClose:o}){const{t:c}=at(),T=ot(t,c),b=Le(t),l=He(t);return e.jsxs("div",{className:a.detailShell,children:[e.jsxs("header",{className:a.detailHeader,children:[e.jsxs("div",{className:a.detailHeading,children:[e.jsx("span",{className:a.detailTitle,children:c("tools.detail.title","Tool execution")}),e.jsx("span",{className:a.detailRecordName,children:t.command})]}),e.jsxs("div",{className:a.detailHeaderActions,children:[e.jsx(M,{text:T.tooltip,children:e.jsx("span",{className:T.className,children:T.label})}),e.jsx("button",{type:"button",className:a.detailCloseButton,onClick:o,"aria-label":c("common.close","Close"),children:e.jsx(mt,{size:18,"aria-hidden":"true"})})]})]}),e.jsxs("div",{className:a.detailBody,children:[e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.params.tooltip","Input parameters passed to this tool run."),children:c("tools.detail.params","Parameters")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.parameters,null,2)})]}),t.result&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:e.jsx(M,{text:c("tools.detail.result.tooltip","Returned result payload for this tool run."),children:c("tools.detail.result","Result")})}),e.jsx("pre",{className:a.pre,children:JSON.stringify(t.result,null,2)})]}),l&&e.jsxs("section",{className:a.detailSection,children:[e.jsx("strong",{children:c("tools.history.routing","Routing")}),e.jsxs("div",{className:a.detailList,children:[y(c("tools.history.routing.mode","Mode"),l.selectionMode),y(c("tools.history.routing.requested","Requested"),Ae(l,c)),y(c("tools.history.routing.actual","Actual"),Re(l))]})]}),(t.status==="fallback"||t.status==="unsupported"||t.status==="warning"||t.status==="error")&&e.jsx("section",{className:a.detailSection,children:e.jsxs("div",{className:a.detailList,children:[t.status==="fallback"&&b.requestedCommand?y(c("tools.detail.requestedCommand","Requested Command"),b.requestedCommand):null,t.status==="fallback"&&b.executedCommand?y(c("tools.detail.executedCommand","Executed Command"),b.executedCommand):null,t.status==="fallback"&&b.alternatives?y(c("tools.detail.alternatives","Alternatives"),b.alternatives.join(", ")):null,t.status==="unsupported"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="unsupported"?y(c("tools.detail.noFallback","No Fallback"),c("tools.detail.noFallback.value","No fallback ran.")):null,t.status==="warning"&&t.warningMessage?y(c("tools.detail.warningMessage","Warning Message"),t.warningMessage):null,t.status==="error"&&t.errorMessage?y(c("tools.detail.errorMessage","Error Message"),t.errorMessage):null,t.status==="error"&&t.blockedMessage?y(c("tools.detail.blockedMessage","Blocked Reason"),t.blockedMessage):null,t.status==="error"&&t.fallbackCommand?y(c("tools.detail.executedCommand","Executed Command"),t.fallbackCommand):null]})})]})]})}const G=50;function Oe(t){const o=new Date(t);return`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}`}function W(t){return typeof t!="number"||!Number.isFinite(t)?"-":t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function R(t,o){return o==="pro"?t("tier.pro","Pro"):o==="mixed"?t("tier.mixed","Mixed"):t("tier.basic","Basic")}function lt(t,o){return o!==t&&o.startsWith(`${t}_`)?o.slice(t.length+1):""}function st(t,o){const c=lt(t,o);return c?`${t}.${c}`:t}function ze(){const{t}=at(),{trackEvent:o,trackPageView:c}=bt(),[T,b]=i.useState(null),l=Lt({placeId:T}),{show:N}=xt(),[S,h]=i.useState("history"),[w,C]=i.useState(null),_=i.useRef(null),[U,O]=i.useState(null),[m,E]=i.useState(null),[g,F]=i.useState(!1),[B,k]=i.useState("totalCalls"),[x,D]=i.useState("desc"),V=i.useCallback(s=>{k(n=>n===s?(D(r=>r==="asc"?"desc":"asc"),s):(D("desc"),s))},[]),K=i.useMemo(()=>{var n;const s=new Set;return Object.keys(((n=l.statistics)==null?void 0:n.tools)??{}).forEach(r=>s.add(r)),l.history.forEach(r=>{r.tool&&s.add(r.tool)}),l.historyToolFilter&&s.add(l.historyToolFilter),Array.from(s).sort()},[l.history,l.historyToolFilter,l.statistics]),j=i.useMemo(()=>{var s;return(s=l.statistics)!=null&&s.tools?Object.values(l.statistics.tools).map(n=>{var X;const r=Object.entries(n.commands??{}).map(([p,d])=>({toolName:n.tool,commandName:d.command??p,label:lt(n.tool,d.command??p)||(d.command??p),tier:d.tier,totalCalls:d.totalCalls,successCount:d.successCount,fallbackCount:d.fallbackCount,unsupportedCount:d.unsupportedCount,warningCount:d.warningCount??0,failureCount:d.failureCount,totalExecutionTimeMs:d.totalExecutionTimeMs,avgExecutionTimeMs:d.avgExecutionTimeMs})),f=r.reduce((p,d)=>p+d.totalCalls,0),v=r.reduce((p,d)=>p+d.successCount,0),$=r.reduce((p,d)=>p+d.fallbackCount,0),q=r.reduce((p,d)=>p+d.unsupportedCount,0),dt=r.reduce((p,d)=>p+d.warningCount,0),ut=r.reduce((p,d)=>p+d.failureCount,0),Z=r.reduce((p,d)=>p+d.totalExecutionTimeMs,0),pt=new Set(r.map(p=>p.tier)).size>1?"mixed":((X=r[0])==null?void 0:X.tier)??n.tier;return{toolName:n.tool,tier:pt,commands:r,totalCalls:f,successCount:v,fallbackCount:$,unsupportedCount:q,warningCount:dt,failureCount:ut,totalExecutionTimeMs:Z,avgExecutionTimeMs:f>0?Math.round(Z/f):0}}):[]},[l.statistics]),u=i.useCallback((s,n,r,f)=>e.jsx(M,{text:t(r,f),children:t(s,n)}),[t]),P=i.useCallback((s,n)=>{_.current=n,C(s)},[]),H=i.useCallback(()=>{C(null)},[]),z=i.useMemo(()=>[...j].sort((n,r)=>{const f=n[B],v=r[B];if(typeof f=="number"&&typeof v=="number")return x==="asc"?f-v:v-f;const $=String(f??""),q=String(v??"");return x==="asc"?$.localeCompare(q):q.localeCompare($)}),[j,B,x]),rt=i.useMemo(()=>[{key:"timestamp",label:u("tools.col.time","Time","tools.col.time.tooltip","When the tool run was recorded."),width:"80px",render:s=>Oe(s.timestamp)},{key:"toolName",label:u("tools.col.toolAction","Tool.Action","tools.col.toolAction.tooltip","Tool name and action that were executed."),render:s=>e.jsxs("span",{children:[st(s.tool,s.command),s.tier==="pro"&&e.jsx(M,{text:t("tools.badge.pro.tooltip","This entry used a Pro-only tool or action."),children:e.jsx("span",{className:a.proBadge,children:t("tools.badge.pro","PRO")})})]})},{key:"executionTimeMs",label:u("tools.col.duration","Duration","tools.col.duration.tooltip","How long the tool took to finish."),width:"80px",render:s=>W(s.executionTimeMs)},{key:"status",label:u("tools.col.status","Status","tools.col.status.tooltip","Outcome of the recorded tool run."),width:"120px",render:s=>{const n=ot(s,t);return e.jsx(M,{text:n.tooltip,children:e.jsx("span",{className:n.className,children:n.label})})}},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tier.tooltip","License tier required for the tool or action."),width:"60px",render:s=>e.jsx("span",{className:s.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,s.tier)})},{key:"details",label:t("tools.detail.open","Details"),width:"84px",render:s=>{const n=st(s.tool,s.command);return e.jsx("button",{type:"button",className:a.detailsButton,"aria-haspopup":"dialog","aria-label":t("tools.detail.openLabel","View details for {command}").replace("{command}",n),onClick:r=>{r.stopPropagation(),P(s,r.currentTarget)},children:t("tools.detail.open","Details")})}}],[P,t,u]),J=i.useMemo(()=>[{key:"toolName",label:u("tools.col.tool","Tool","tools.col.tool.tooltip","Consolidated tool name in the statistics table."),sortable:!0},{key:"totalCalls",label:u("tools.col.calls","Calls","tools.col.calls.tooltip","Total number of recorded calls for this tool."),sortable:!0,width:"70px"},{key:"successCount",label:u("tools.col.ok","OK","tools.col.ok.tooltip","Number of direct successful runs."),sortable:!0,width:"70px"},{key:"fallbackCount",label:u("tools.col.fallback","FALLBACK","tools.col.fallback.tooltip","Number of runs that succeeded through fallback execution."),sortable:!0,width:"110px"},{key:"unsupportedCount",label:u("tools.col.unsupported","UNSUPPORTED","tools.col.unsupported.tooltip","Number of blocked runs without fallback execution."),sortable:!0,width:"130px"},{key:"warningCount",label:u("tools.col.warn","WARN","tools.col.warn.tooltip","Number of expected failures caused by caller input, project state, Roblox policy, or user code."),sortable:!0,width:"80px"},{key:"failureCount",label:u("tools.col.err","FAILED","tools.col.err.tooltip","Number of runs that failed."),sortable:!0,width:"70px"},{key:"avgExecutionTimeMs",label:u("tools.col.avgTime","Avg Time","tools.col.avgTime.tooltip","Average execution time across recorded calls."),sortable:!0,width:"90px",render:s=>W(s.avgExecutionTimeMs)},{key:"tier",label:u("tools.col.tier","Tier","tools.col.tierStats.tooltip","Basic, Pro, or Mixed summary for the tool statistics row."),sortable:!0,width:"70px",render:s=>e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})}],[t,u]),L=i.useMemo(()=>{if(!l.statistics)return null;const s=l.statistics.tierSummary.basic.totalCalls,n=l.statistics.tierSummary.pro.totalCalls,r=s+n;if(r===0)return null;const f=Math.round(s/r*100),v=100-f;return{basic:s,pro:n,basicPct:f,proPct:v}},[l.statistics]),Q=i.useCallback(s=>{O(n=>n===s?null:s)},[]),it=i.useCallback(async()=>{if(m){F(!0);try{m==="history"?await l.clearHistory():await l.clearStatistics(),N(t("toast.clearSuccess","Cleared successfully"),"success"),E(null)}catch{N(t("toast.clearFailed","Failed to clear data"),"error")}finally{F(!1)}}},[m,N,t,l]),nt=i.useCallback(s=>{const n=s==="history"?"tools_history":"tools_statistics";o("dashboard_click_event",{click_target:s==="history"?"tools_tab_history":"tools_tab_statistics",page:"tools",tab:n}),c({page:"tools",tab:n}),C(null),h(s)},[o,c]),ct=["history","statistics"].map(s=>({key:s,label:t(`tools.tab.${s}`,s.charAt(0).toUpperCase()+s.slice(1))}));return e.jsxs("div",{className:a.page,children:[e.jsx(ft,{title:t("page.tools.title","Tools"),description:t("page.tools.description","Inspect tool history, outcomes, fallback details, and usage statistics."),helpTopicId:"tools"}),e.jsx(yt,{surface:"tools",selectable:!0,selectedPlaceId:T,onSelectedPlaceIdChange:s=>{C(null),b(s),l.setHistoryOffset(0)}}),e.jsx(gt,{items:ct,value:S,onChange:nt}),S==="history"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.history","History")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_history",page:"tools",tab:"tools_history"}),E("history")},children:t("common.clear","Clear")})]}),e.jsx("div",{className:a.filterRow,children:e.jsxs("label",{className:a.filterLabel,children:[t("tools.filter.tool","Tool"),":",e.jsxs("select",{className:a.filterSelect,value:l.historyToolFilter,onChange:s=>{C(null),l.setHistoryToolFilter(s.target.value),l.setHistoryOffset(0)},children:[e.jsx("option",{value:"",children:t("tools.filter.all","All")}),K.map(s=>e.jsx("option",{value:s,children:s},s))]})]})}),e.jsx(vt,{columns:rt,data:l.history,rowKey:s=>s.id,onRowClick:(s,n)=>P(s,n),emptyMessage:t("tools.empty.history","No tool history entries for this place")}),e.jsxs("div",{className:a.pagination,children:[e.jsx("button",{className:a.btn,disabled:l.historyOffset===0,title:t("tools.page.prev.tooltip","Go to the previous page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(Math.max(0,l.historyOffset-G))},children:t("tools.page.prev","Prev")}),e.jsxs("span",{className:a.pageInfo,children:[l.historyOffset+1,"–",Math.min(l.historyOffset+G,l.historyTotal)," / ",l.historyTotal]}),e.jsx("button",{className:a.btn,disabled:!l.historyHasMore,title:t("tools.page.next.tooltip","Go to the next page of tool history results."),onClick:()=>{C(null),l.setHistoryOffset(l.historyOffset+G)},children:t("tools.page.next","Next")})]})]}),S==="statistics"&&e.jsxs("div",{className:a.card,children:[e.jsxs("div",{className:a.cardToolbar,children:[e.jsx("div",{className:a.sectionTitle,children:t("tools.tab.statistics","Statistics")}),e.jsx("button",{className:a.dangerButton,onClick:()=>{o("dashboard_click_event",{click_target:"tools_clear_statistics",page:"tools",tab:"tools_statistics"}),E("statistics")},children:t("common.clear","Clear")})]}),L&&e.jsxs("div",{className:a.tierDistribution,children:[e.jsxs("div",{className:a.tierBarWrap,children:[e.jsx("div",{className:a.tierBarBasic,style:{width:`${L.basicPct}%`}}),e.jsx("div",{className:a.tierBarPro,style:{width:`${L.proPct}%`}})]}),e.jsxs("div",{className:a.tierLabels,children:[e.jsxs("span",{children:[R(t,"basic")," ",L.basicPct,"% (",L.basic,")"]}),e.jsxs("span",{children:[R(t,"pro")," ",L.proPct,"% (",L.pro,")"]})]})]}),e.jsx("div",{className:a.statsTableWrap,children:e.jsxs("table",{className:a.statsTable,children:[e.jsx("thead",{children:e.jsx("tr",{children:J.map(s=>e.jsxs("th",{style:s.width?{width:s.width}:void 0,className:s.sortable?a.sortableHeader:void 0,onClick:s.sortable?()=>V(s.key):void 0,children:[e.jsx("span",{children:s.label}),s.sortable&&B===s.key&&e.jsx("span",{className:a.sortArrow,children:x==="asc"?"▴":"▾"})]},s.key))})}),e.jsx("tbody",{children:z.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:J.length,className:a.emptyStats,children:t("tools.empty.stats","No tool statistics for this place")})}):z.map(s=>{const n=U===s.toolName;return e.jsxs(i.Fragment,{children:[e.jsxs("tr",{className:a.statsToolRow,onClick:()=>Q(s.toolName),children:[e.jsx("td",{children:e.jsxs("button",{type:"button",className:a.expandButton,"aria-expanded":n,"aria-label":`${s.toolName} ${n?t("common.collapse","Collapse"):t("common.expand","Expand")}`,onClick:r=>{r.stopPropagation(),Q(s.toolName)},children:[e.jsx("span",{className:a.expandIcon,"aria-hidden":"true",children:n?"▾":"▸"}),e.jsx("span",{children:s.toolName})]})}),e.jsx("td",{children:s.totalCalls}),e.jsx("td",{children:s.successCount}),e.jsx("td",{children:s.fallbackCount}),e.jsx("td",{children:s.unsupportedCount}),e.jsx("td",{children:s.warningCount}),e.jsx("td",{children:s.failureCount}),e.jsx("td",{children:W(s.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx(M,{text:s.tier==="mixed"?t("tools.tier.mixed.tooltip","This tool includes both Basic and Pro actions."):"",children:e.jsx("span",{className:s.tier==="pro"?a.tierPro:s.tier==="mixed"?a.tierMixed:a.tierBasic,children:R(t,s.tier)})})})]}),n&&s.commands.map(r=>e.jsxs("tr",{className:a.statsActionRow,children:[e.jsx("td",{children:e.jsx("span",{className:a.actionLabel,children:r.label})}),e.jsx("td",{children:r.totalCalls}),e.jsx("td",{children:r.successCount}),e.jsx("td",{children:r.fallbackCount}),e.jsx("td",{children:r.unsupportedCount}),e.jsx("td",{children:r.warningCount}),e.jsx("td",{children:r.failureCount}),e.jsx("td",{children:W(r.avgExecutionTimeMs)}),e.jsx("td",{children:e.jsx("span",{className:r.tier==="pro"?a.tierPro:a.tierBasic,children:R(t,r.tier)})})]},`${s.toolName}:${r.commandName}`))]},s.toolName)})})]})}),l.statistics&&e.jsxs("div",{className:a.summaryLine,children:[t("tools.summary.total","Total"),": ",l.statistics.totalCalls," ",t("tools.summary.calls","calls")," | ",t("tools.summary.sessions","Sessions"),": ",l.statistics.totalSessions]})]}),e.jsx(jt,{open:w!==null,ariaLabel:t("tools.detail.dialogLabel","Tool execution detail"),onClose:H,returnFocusTo:_.current,testId:"tools-history-detail-popup-layer",children:w&&e.jsx(Ie,{entry:w,onClose:H})}),e.jsx(_t,{open:m!==null,title:m==="history"?t("tools.clear.history.title","Clear history?"):t("tools.clear.statistics.title","Clear statistics?"),message:m==="history"?t("tools.clear.history.message","This permanently removes the current place tools history."):t("tools.clear.statistics.message","This permanently resets the current place tool statistics."),cancelLabel:t("common.cancel","Cancel"),confirmLabel:t("common.clear","Clear"),loading:g,onCancel:()=>!g&&E(null),onConfirm:it})]})}export{ze as Component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,h as s}from"./index-CG4GxcAc.js";function p({text:o,children:t}){return r.jsx(s,{text:o,children:t})}export{p as T};
|