@weppy/roblox-mcp 2.17.1 → 2.17.3
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 +20 -0
- package/README.md +2 -0
- package/dashboard/dist/assets/AiPromptExamples-DniGyTTn.js +1 -0
- package/dashboard/dist/assets/AiPromptExamples-DvVR2a1g.css +1 -0
- package/dashboard/dist/assets/AssetsPage--90xGzmZ.js +61 -0
- package/dashboard/dist/assets/AssetsPage-DX8NUPQo.css +1 -0
- package/dashboard/dist/assets/{ChangelogPage-CRXXHovV.js → ChangelogPage-Bg9Kg_qZ.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-Dz7mVKLZ.js → ConfirmModal-Dp7bIaIr.js} +1 -1
- package/dashboard/dist/assets/{ConnectionPage-CKKn3lt0.js → ConnectionPage-C9BrvjSI.js} +1 -1
- package/dashboard/dist/assets/{ControlsPage-Ch6He2CV.js → ControlsPage-Cz7l6oLO.js} +1 -1
- package/dashboard/dist/assets/{CurrentPlaceScope-DhPCqaMU.js → CurrentPlaceScope-BjpoPQlM.js} +1 -1
- package/dashboard/dist/assets/{GameChangeDetail-CZuYgFvS.js → GameChangeDetail-COMtVAQK.js} +1 -1
- package/dashboard/dist/assets/{InfoLabel-BGeOUBIl.js → InfoLabel-Duu_xBC8.js} +1 -1
- package/dashboard/dist/assets/{OverviewPage-B-CtTLEP.js → OverviewPage-Bw6nCN_K.js} +1 -1
- package/dashboard/dist/assets/{PageHeader-CYbeZdtL.js → PageHeader-DCh0GrcW.js} +1 -1
- package/dashboard/dist/assets/PlaytestAiPromptExamples-Cv4yOTd0.js +1 -0
- package/dashboard/dist/assets/{PlaytestPage-C092tN-C.js → PlaytestPage-DM7NkrhI.js} +2 -2
- package/dashboard/dist/assets/{SettingsPage-bEHQn_8W.js → SettingsPage-DOx4zPQB.js} +1 -1
- package/dashboard/dist/assets/{StatusBadge-BmR5_DsF.js → StatusBadge-DB7SzHxU.js} +1 -1
- package/dashboard/dist/assets/{SyncPage-BFz_XQ40.js → SyncPage-Bgb0V6Yy.js} +1 -1
- package/dashboard/dist/assets/{Tabs-C7TenrZD.js → Tabs-8coaSlFl.js} +1 -1
- package/dashboard/dist/assets/{TierPromoPanel-C02VRkHz.js → TierPromoPanel-C6AtGEJN.js} +1 -1
- package/dashboard/dist/assets/{ToolsPage-CJeoFakm.js → ToolsPage-DkCD8pPL.js} +1 -1
- package/dashboard/dist/assets/{TooltipText-sb-BSgUg.js → TooltipText-B2gmJunf.js} +1 -1
- package/dashboard/dist/assets/UiStudioPage-CNWTVJ4w.js +11 -0
- package/dashboard/dist/assets/UiStudioPage-CtSFtEbS.css +1 -0
- package/dashboard/dist/assets/WhatsNewPage-CX_N1RVO.js +1 -0
- package/dashboard/dist/assets/{bot-oMwejCZF.js → bot-DRBnM_Dv.js} +1 -1
- package/dashboard/dist/assets/{check-EdHXSSef.js → check-DFGDcGQp.js} +1 -1
- package/dashboard/dist/assets/{copy-CePVq0VI.js → copy-DGkh5PJA.js} +1 -1
- package/dashboard/dist/assets/{index-DchewB5y.js → index-UFZ5peom.js} +39 -39
- package/dashboard/dist/assets/{sample-requests-CQvn7a4-.js → sample-requests-CcJyTFj5.js} +1 -1
- package/dashboard/dist/assets/{trash-2-8V3SCC8q.js → trash-2-OtWthCQY.js} +1 -1
- package/dashboard/dist/assets/{useLiveUptime-BeZ9TLyF.js → useLiveUptime-hS0F15wX.js} +1 -1
- package/dashboard/dist/assets/{useSettings-D5XHMODc.js → useSettings-B6gBfQjz.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dist/index.js +167 -445
- package/package.json +1 -1
- package/roblox-plugin/WeppyRobloxMCP.rbxm +0 -0
- package/dashboard/dist/assets/AssetsPage-BRZSoLQp.css +0 -1
- package/dashboard/dist/assets/AssetsPage-ClzgrkC_.js +0 -56
- package/dashboard/dist/assets/PlaytestAiPromptExamples-DHVX0Ljy.css +0 -1
- package/dashboard/dist/assets/PlaytestAiPromptExamples-flhav1EU.js +0 -1
- package/dashboard/dist/assets/UiStudioPage-C5dYQMax.js +0 -11
- package/dashboard/dist/assets/UiStudioPage-CSK5gQMN.css +0 -1
- package/dashboard/dist/assets/WhatsNewPage-C_z4g3oa.js +0 -1
|
@@ -1 +1 @@
|
|
|
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-DchewB5y.js";import{P as ft}from"./PageHeader-CYbeZdtL.js";import{T as M}from"./TooltipText-sb-BSgUg.js";import{C as _t}from"./ConfirmModal-Dz7mVKLZ.js";import{T as gt,C as jt}from"./Tabs-C7TenrZD.js";import{C as yt}from"./CurrentPlaceScope-DhPCqaMU.js";import"./ConfirmModal.module-DJksQHBd.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 Ge(){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{Ge as Component};
|
|
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-UFZ5peom.js";import{P as ft}from"./PageHeader-DCh0GrcW.js";import{T as M}from"./TooltipText-B2gmJunf.js";import{C as _t}from"./ConfirmModal-Dp7bIaIr.js";import{T as gt,C as jt}from"./Tabs-8coaSlFl.js";import{C as yt}from"./CurrentPlaceScope-BjpoPQlM.js";import"./ConfirmModal.module-DJksQHBd.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 Ge(){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{Ge as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,h as s}from"./index-
|
|
1
|
+
import{j as r,h as s}from"./index-UFZ5peom.js";function p({text:o,children:t}){return r.jsx(s,{text:o,children:t})}export{p as T};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{f as ke,l as W,k as Fe,r as m,u as j,j as t,a as q,R as ze,X as Ve,T as je,e as We,t as Ke}from"./index-UFZ5peom.js";import{I as B}from"./InfoLabel-Duu_xBC8.js";import{T as y}from"./TooltipText-B2gmJunf.js";import{C as Ye,P as Qe}from"./PageHeader-DCh0GrcW.js";import{D as le,c as ce,e as Je,g as Xe,h as Ze,i as de,j as Ie,k as et,l as ue,d as tt}from"./sample-requests-CcJyTFj5.js";import{C as it,T as st}from"./Tabs-8coaSlFl.js";import{A as pe}from"./AiPromptExamples-DniGyTTn.js";import{B as rt}from"./bot-DRBnM_Dv.js";import{C as at}from"./CurrentPlaceScope-BjpoPQlM.js";import"./copy-DGkh5PJA.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 nt=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],ot=ke("camera",nt);/**
|
|
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 lt=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ct=ke("ellipsis",lt);async function Ne(e){const i=await fetch(`${W}${e}`);if(!i.ok){let s=null;try{s=await i.json()}catch{}throw new Fe(i.status,(s==null?void 0:s.message)??i.statusText,(s==null?void 0:s.error)??null,s)}return await i.json()}function U(e){return typeof e=="number"&&Number.isFinite(e)?e:0}const dt=["structure","visual","interaction","primary_view_context","responsive_viewport"];function he(e){const i=e.coverage_dimensions,s={structure:{status:e.deterministic_status==="failed"?"failed":"completed",reasons:[]},visual:{status:e.visual_status??"not_requested",reasons:[]},interaction:{status:"skipped",reasons:[]},primary_view_context:{status:"skipped",reasons:[]},responsive_viewport:{status:"skipped",reasons:[]}};if(!i)return s;for(const n of dt){const l=i[n];l&&["completed","not_requested","skipped","failed"].includes(l.status)&&(s[n]={status:l.status,reasons:Array.isArray(l.reasons)?l.reasons.filter(r=>typeof r=="string"):[]})}return s}function ut(e,i){return e.readiness==="ready"||e.readiness==="review_required"||e.readiness==="insufficient_evidence"?e.readiness:"insufficient_evidence"}function pt(e){return e==="recompose"||e==="refine"||e==="approved"?e:void 0}function ht(e){return e==="recommended"||e==="required"?e:void 0}function _t(e){if(Array.isArray(e))return e.filter(i=>i==="primary_visual"||i==="functional_safe"||i==="responsive_ready")}function mt(e){if(e.design_check_summary){const n={priority_high:U(e.design_check_summary.priority_high),priority_medium:U(e.design_check_summary.priority_medium),priority_low:U(e.design_check_summary.priority_low),deterministic_status:e.design_check_summary.deterministic_status==="failed"?"failed":"completed",visual_status:e.design_check_summary.visual_status??"not_requested",coverage:e.design_check_summary.coverage==="structural_and_visual"?"structural_and_visual":"structural_only",skipped_reasons:Array.isArray(e.design_check_summary.skipped_reasons)?e.design_check_summary.skipped_reasons.filter(r=>typeof r=="string"):[],primary_visual_status:e.design_check_summary.primary_visual_status,primary_visual_verdict:pt(e.design_check_summary.primary_visual_verdict),critic_summary:typeof e.design_check_summary.critic_summary=="string"?e.design_check_summary.critic_summary:void 0,functional_safe:typeof e.design_check_summary.functional_safe=="boolean"?e.design_check_summary.functional_safe:void 0,responsive_requirement:ht(e.design_check_summary.responsive_requirement),responsive_ready:typeof e.design_check_summary.responsive_ready=="boolean"?e.design_check_summary.responsive_ready:void 0,required_dimensions:_t(e.design_check_summary.required_dimensions),observation_source:e.design_check_summary.observation_source==="play_client"?"play_client":e.design_check_summary.observation_source==="edit"?"edit":void 0,runtime_status:e.design_check_summary.runtime_status==="completed"||e.design_check_summary.runtime_status==="skipped"?e.design_check_summary.runtime_status:void 0,limitations:Array.isArray(e.design_check_summary.limitations)?e.design_check_summary.limitations.filter(r=>typeof r=="string"):[],state_coverage:Array.isArray(e.design_check_summary.state_coverage)?e.design_check_summary.state_coverage:[]},l=he({...n,coverage_dimensions:e.design_check_summary.coverage_dimensions});return{...n,coverage_dimensions:l,viewport_profiles_tested:Array.isArray(e.design_check_summary.viewport_profiles_tested)?e.design_check_summary.viewport_profiles_tested.filter(r=>typeof r=="string"):[],readiness:ut(e.design_check_summary)}}if(!e.lint_summary)return null;const i={priority_high:U(e.lint_summary.errors),priority_medium:U(e.lint_summary.warnings),priority_low:0,deterministic_status:"completed",visual_status:"not_requested",coverage:"structural_only",skipped_reasons:[]},s=he(i);return{...i,coverage_dimensions:s,viewport_profiles_tested:[],readiness:"insufficient_evidence"}}function gt(e){return{rule:e.rule,path:e.path,displayPriority:e.displayPriority??(e.severity==="error"?"priority_high":"priority_medium"),actual:e.actual,expected:e.expected,hint:e.hint}}function Pe(e){return{snapshot_id:e.snapshot_id,captured_at:e.captured_at,brief_id:e.brief_id,thresholds_source:e.thresholds_source,scope:e.scope,target:e.target,design_check_summary:mt(e),primary_view_context:e.primary_view_context,image:e.image}}function yt(e){const i=e.check_results??e.lint_results??[];return{...Pe(e),check_results:i.map(gt),image_url:e.image_url,meta:e.meta,layout_metadata:e.layout_metadata,target_profiles:e.target_profiles,profile_simulations:e.profile_simulations,design_check_context:e.design_check_context}}async function _e(e,i){const s=new URLSearchParams;i!==void 0&&s.set("limit",String(i));const n=s.toString()?`?${s.toString()}`:"",l=await Ne(`/api/ui-studio/snapshots${n}`);return{...l,snapshots:l.snapshots.map(Pe)}}async function ft(e,i){const s=i!==void 0?`?placeId=${i}`:"",n=await Ne(`/api/ui-studio/snapshots/${encodeURIComponent(e)}${s}`);return yt(n)}function Te(e,i){const s=i!==void 0?`?placeId=${i}`:"";return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image${s}`}const St=1e4;function Re(e=50){const[i,s]=m.useState(null),[n,l]=m.useState(!0),[r,o]=m.useState(null),d=m.useCallback(async()=>{try{const p=await _e(void 0,e);s(p),o(null)}catch(p){o(p instanceof Error?p.message:String(p))}finally{l(!1)}},[e]);return m.useEffect(()=>{let p=!1;const u=async()=>{try{const h=await _e(void 0,e);p||(s(h),o(null))}catch(h){p||o(h instanceof Error?h.message:String(h))}finally{p||l(!1)}};u();const g=setInterval(()=>{u()},St);return()=>{p=!0,clearInterval(g)}},[e]),{data:i,loading:n,error:r,refresh:d}}const xt="_page_1ldr9_2",vt="_grid_1ldr9_9",Ct="_card_1ldr9_16",bt="_cardBodyButton_1ldr9_31",wt="_thumb_1ldr9_48",kt="_runtimeObservationPlaceholder_1ldr9_57",jt="_badges_1ldr9_69",It="_priorityHighBadge_1ldr9_77",Nt="_priorityMediumBadge_1ldr9_78",Pt="_priorityLowBadge_1ldr9_79",Tt="_cardMeta_1ldr9_109",Rt="_target_1ldr9_115",Bt="_time_1ldr9_122",Gt="_drawer_1ldr9_127",Dt="_drawerToolbar_1ldr9_144",Mt="_drawerTitleBlock_1ldr9_155",At="_drawerEyebrow_1ldr9_162",$t="_drawerTarget_1ldr9_171",Lt="_drawerToolbarActions_1ldr9_181",Et="_closeBtn_1ldr9_189",qt="_detailBody_1ldr9_210",Ut="_screenshotPreviewFrame_1ldr9_217",Ot="_fullImg_1ldr9_230",Ht="_metaDl_1ldr9_237",Ft="_errorMsg_1ldr9_249",zt="_suggestionsWrap_1ldr9_254",Vt="_prioritySection_1ldr9_261",Wt="_sectionHighHeader_1ldr9_265",Kt="_sectionLowHeader_1ldr9_271",Yt="_sectionMediumHeader_1ldr9_277",Qt="_groupCard_1ldr9_283",Jt="_groupHeader_1ldr9_290",Xt="_groupLabel_1ldr9_306",Zt="_groupCount_1ldr9_311",ei="_groupChevron_1ldr9_318",ti="_groupBody_1ldr9_322",ii="_groupDescription_1ldr9_325",si="_groupFix_1ldr9_330",ri="_falsePositive_1ldr9_339",ai="_itemList_1ldr9_347",ni="_suggestionItem_1ldr9_355",oi="_suggestionInfo_1ldr9_365",li="_pathBreadcrumb_1ldr9_371",ci="_currentValue_1ldr9_380",di="_copyFixBtn_1ldr9_384",ui="_emptySuggestions_1ldr9_398",pi="_sampleBanner_1ldr9_406",hi="_sampleBannerRow_1ldr9_419",_i="_sampleBannerMain_1ldr9_427",mi="_sampleBadge_1ldr9_435",gi="_sampleTitle_1ldr9_445",yi="_sampleMessage_1ldr9_452",fi="_sampleActions_1ldr9_459",Si="_primaryAction_1ldr9_467",xi="_secondaryAction_1ldr9_468",vi="_emptyState_1ldr9_503",Ci="_pluginGuideCard_1ldr9_511",bi="_pluginGuideMarker_1ldr9_522",wi="_pluginGuideBody_1ldr9_537",ki="_pluginGuideTitle_1ldr9_541",ji="_pluginGuideMessage_1ldr9_549",Ii="_pluginGuideChecklist_1ldr9_556",Ni="_pluginGuideWaiting_1ldr9_579",Pi="_pluginGuideDot_1ldr9_588",Ti="_analysisWorkspace_1ldr9_596",Ri="_analysisMainColumn_1ldr9_601",Bi="_analysisSummaryPanel_1ldr9_606",Gi="_recentCapturesHeader_1ldr9_619",Di="_analysisSummaryText_1ldr9_626",Mi="_recentCapturesMeta_1ldr9_627",Ai="_analysisReportGrid_1ldr9_633",$i="_analysisReportGroup_1ldr9_640",Li="_analysisReportCard_1ldr9_644",Ei="_analysisReportThumb_1ldr9_666",qi="_analysisReportBody_1ldr9_675",Ui="_analysisReportTopline_1ldr9_682",Oi="_analysisVerdict_1ldr9_689",Hi="_analysisVerdict_needsFix_1ldr9_700",Fi="_analysisVerdict_review_1ldr9_701",zi="_analysisVerdict_incomplete_1ldr9_706",Vi="_analysisVerdict_passed_1ldr9_711",Wi="_analysisReportCounts_1ldr9_716",Ki="_readinessSummary_1ldr9_721",Yi="_readinessChip_1ldr9_727",Qi="_readinessChipReady_1ldr9_742",Ji="_readinessChipPending_1ldr9_748",Xi="_primaryReadinessBlock_1ldr9_754",Zi="_criticSummary_1ldr9_761",es="_analysisReportTarget_1ldr9_780",ts="_analysisReportIssue_1ldr9_789",is="_analysisReportCoverage_1ldr9_795",ss="_coverageChips_1ldr9_801",rs="_coverageChip_1ldr9_801",as="_coverageChip_completed_1ldr9_822",ns="_coverageChip_failed_1ldr9_827",os="_coverageChip_skipped_1ldr9_832",ls="_coverageChip_not_requested_1ldr9_833",cs="_analysisReportMeta_1ldr9_838",ds="_analysisChildList_1ldr9_845",us="_analysisChildRow_1ldr9_856",ps="_analysisChildPath_1ldr9_877",hs="_analysisChildSummary_1ldr9_886",_s="_analysisChildDetailHint_1ldr9_887",ms="_drawerAnalysisSummary_1ldr9_896",gs="_drawerAnalysisSummaryItem_1ldr9_907",ys="_drawerAnalysisLabel_1ldr9_914",fs="_drawerAnalysisCounts_1ldr9_920",Ss="_drawerAnalysisValue_1ldr9_921",xs="_recentCapturesSection_1ldr9_926",vs="_drawerPrimaryActions_1ldr9_938",Cs="_drawerActionBtn_1ldr9_945",bs="_drawerMoreMenu_1ldr9_974",ws="_drawerMoreButton_1ldr9_979",ks="_drawerMoreMenuBody_1ldr9_1004",js="_drawerMenuItem_1ldr9_1017",Is="_drawerMenuItemDanger_1ldr9_1040",Ns="_actionErrMsg_1ldr9_1049",Ps="_actionStatusMsg_1ldr9_1058",Ts="_actionStatus_info_1ldr9_1072",Rs="_actionStatus_success_1ldr9_1078",Bs="_actionStatus_warning_1ldr9_1084",Gs="_actionStatusDetail_1ldr9_1090",Ds="_galleryHeader_1ldr9_1096",Ms="_cardChecked_1ldr9_1113",As="_cardCheckbox_1ldr9_1120",$s="_captureSelectionActions_1ldr9_1135",Ls="_selectionToolbar_1ldr9_1144",Es="_selectionBar_1ldr9_1145",qs="_selectionToolbarCount_1ldr9_1164",Us="_selectionToolbarActions_1ldr9_1171",Os="_selectionBarBtn_1ldr9_1178",Hs="_selectionBarBtnDanger_1ldr9_1204",a={page:xt,grid:vt,card:Ct,cardBodyButton:bt,thumb:wt,runtimeObservationPlaceholder:kt,badges:jt,priorityHighBadge:It,priorityMediumBadge:Nt,priorityLowBadge:Pt,cardMeta:Tt,target:Rt,time:Bt,drawer:Gt,drawerToolbar:Dt,drawerTitleBlock:Mt,drawerEyebrow:At,drawerTarget:$t,drawerToolbarActions:Lt,closeBtn:Et,detailBody:qt,screenshotPreviewFrame:Ut,fullImg:Ot,metaDl:Ht,errorMsg:Ft,suggestionsWrap:zt,prioritySection:Vt,sectionHighHeader:Wt,sectionLowHeader:Kt,sectionMediumHeader:Yt,groupCard:Qt,groupHeader:Jt,groupLabel:Xt,groupCount:Zt,groupChevron:ei,groupBody:ti,groupDescription:ii,groupFix:si,falsePositive:ri,itemList:ai,suggestionItem:ni,suggestionInfo:oi,pathBreadcrumb:li,currentValue:ci,copyFixBtn:di,emptySuggestions:ui,sampleBanner:pi,sampleBannerRow:hi,sampleBannerMain:_i,sampleBadge:mi,sampleTitle:gi,sampleMessage:yi,sampleActions:fi,primaryAction:Si,secondaryAction:xi,emptyState:vi,pluginGuideCard:Ci,pluginGuideMarker:bi,pluginGuideBody:wi,pluginGuideTitle:ki,pluginGuideMessage:ji,pluginGuideChecklist:Ii,pluginGuideWaiting:Ni,pluginGuideDot:Pi,analysisWorkspace:Ti,analysisMainColumn:Ri,analysisSummaryPanel:Bi,recentCapturesHeader:Gi,analysisSummaryText:Di,recentCapturesMeta:Mi,analysisReportGrid:Ai,analysisReportGroup:$i,analysisReportCard:Li,analysisReportThumb:Ei,analysisReportBody:qi,analysisReportTopline:Ui,analysisVerdict:Oi,analysisVerdict_needsFix:Hi,analysisVerdict_review:Fi,analysisVerdict_incomplete:zi,analysisVerdict_passed:Vi,analysisReportCounts:Wi,readinessSummary:Ki,readinessChip:Yi,readinessChipReady:Qi,readinessChipPending:Ji,primaryReadinessBlock:Xi,criticSummary:Zi,analysisReportTarget:es,analysisReportIssue:ts,analysisReportCoverage:is,coverageChips:ss,coverageChip:rs,coverageChip_completed:as,coverageChip_failed:ns,coverageChip_skipped:os,coverageChip_not_requested:ls,analysisReportMeta:cs,analysisChildList:ds,analysisChildRow:us,analysisChildPath:ps,analysisChildSummary:hs,analysisChildDetailHint:_s,drawerAnalysisSummary:ms,drawerAnalysisSummaryItem:gs,drawerAnalysisLabel:ys,drawerAnalysisCounts:fs,drawerAnalysisValue:Ss,recentCapturesSection:xs,drawerPrimaryActions:vs,drawerActionBtn:Cs,drawerMoreMenu:bs,drawerMoreButton:ws,drawerMoreMenuBody:ks,drawerMenuItem:js,drawerMenuItemDanger:Is,actionErrMsg:Ns,actionStatusMsg:Ps,actionStatus_info:Ts,actionStatus_success:Rs,actionStatus_warning:Bs,actionStatusDetail:Gs,galleryHeader:Ds,cardChecked:Ms,cardCheckbox:As,captureSelectionActions:$s,selectionToolbar:Ls,selectionBar:Es,selectionToolbarCount:qs,selectionToolbarActions:Us,selectionBarBtn:Os,selectionBarBtnDanger:Hs};function Fs({snapshot:e,placeId:i,onClick:s,imageUrlOverride:n,selectable:l,selected:r,onToggleSelect:o}){var v,I,G;const{t:d}=j(),p=((v=e.design_check_summary)==null?void 0:v.priority_high)??0,u=((I=e.design_check_summary)==null?void 0:I.priority_medium)??0,g=((G=e.design_check_summary)==null?void 0:G.priority_low)??0,h=new Date(e.captured_at*1e3).toLocaleString(),S=n??Te(e.snapshot_id,i),f=()=>{o==null||o(e.snapshot_id)};return t.jsxs("div",{className:`${a.card} ${r?a.cardChecked:""}`,children:[l&&t.jsx(y,{text:d("uiStudio.gallery.cardCheckbox.tooltip","Select this capture. Pick multiple to delete them together."),children:t.jsx(Ye,{className:a.cardCheckbox,"aria-label":d("uiStudio.gallery.cardCheckbox","Select screenshot"),checked:!!r,onChange:f})}),t.jsxs("button",{className:a.cardBodyButton,onClick:k=>s(k.currentTarget),type:"button",children:[e.image?t.jsx("img",{className:a.thumb,src:S,alt:e.snapshot_id,loading:"lazy"}):t.jsx("div",{className:`${a.thumb} ${a.runtimeObservationPlaceholder}`,role:"img","aria-label":d("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:d("uiStudio.runtimeStructureObservation","Runtime structure observation")}),t.jsxs("div",{className:a.badges,children:[p>0&&t.jsx(y,{text:d("uiStudio.gallery.priorityHighBadge.tooltip","Number of suggestions to review first. Click for details."),children:t.jsx("span",{className:a.priorityHighBadge,children:p})}),u>0&&t.jsx(y,{text:d("uiStudio.gallery.priorityMediumBadge.tooltip","Number of recommended suggestions."),children:t.jsx("span",{className:a.priorityMediumBadge,children:u})}),g>0&&t.jsx(y,{text:d("uiStudio.gallery.priorityLowBadge.tooltip","Number of optional improvements."),children:t.jsx("span",{className:a.priorityLowBadge,children:g})})]}),t.jsxs("div",{className:a.cardMeta,children:[t.jsx("div",{className:a.target,children:e.target??e.scope}),t.jsx("div",{className:a.time,children:h})]})]})]})}const zs={touch_target:"touchTarget",contrast:"contrast",text_scaled:"textScaled",safezone:"safezone",min_text_size:"minTextSize"};function Vs(e){return e.rule==="contrast"&&/\.(Icon|Avatar|EmptyIcon|GoldIcon|[A-Za-z]*Icon)$/.test(e.path)}const Ws={touch_target:{checkLabel:"터치 타겟 크기",description:"모바일에서 손가락으로 누르기 편한 최소 크기를 만족하는지 확인합니다.",howToFix:"버튼 Size 를 44x44 px 이상으로 키우거나 UIPadding 으로 터치 영역을 확장하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{Size:{xScale:0,xOffset:44,yScale:0,yOffset:44}}}},null,2)},contrast:{checkLabel:"텍스트 대비",description:"텍스트와 배경의 명암 비율이 WCAG 접근성 기준을 만족하는지 확인합니다.",howToFix:"TextColor3 를 더 밝은 색(예: #FFFFFF) 으로 바꾸거나, 배경(BackgroundColor3)을 어둡게 조정하세요.",falsePositiveNote:"이모지 아이콘의 경우 색이 고정되어 대비 규칙이 오탐하는 경우가 많습니다. 실제 가독성에 문제 없으면 무시해도 됩니다.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextColor3:{r:255,g:255,b:255}}}},null,2)},text_scaled:{checkLabel:"TextScaled 사용",description:"TextScaled 가 켜져 있으나 UITextSizeConstraint 가 없으면 언어 확장 시 레이아웃이 깨질 수 있습니다.",howToFix:"해당 TextLabel 에 UITextSizeConstraint 자식을 추가하고 MaxTextSize 를 지정하세요.",buildUpdateCommand:e=>JSON.stringify({action:"update",targetPath:e.path,changes:{addChildren:[{className:"UITextSizeConstraint",name:"SizeConstraint",properties:{MaxTextSize:24,MinTextSize:10}}]}},null,2)},safezone:{checkLabel:"세이프존 배치",description:"버튼이 플랫폼별 세이프존(노치·홈 인디케이터·TV safe margin) 안에 있는지 확인합니다.",howToFix:"Position 을 세이프존 안쪽으로 이동하거나, 부모 Frame 을 축소하세요.",buildUpdateCommand:()=>null},min_text_size:{checkLabel:"최소 폰트 크기",description:"텍스트가 너무 작아 가독성이 떨어지는지 확인합니다. 브리프 기준 하한을 사용합니다.",howToFix:"TextSize 를 14 이상(본문 기준)으로 올리세요.",buildUpdateCommand:e=>{const i=typeof e.expected=="string"?parseInt(e.expected.replace(/[^\d]/g,""),10):14;return JSON.stringify({action:"update",targetPath:e.path,changes:{properties:{TextSize:Number.isFinite(i)?i:14}}},null,2)}}};function Ks(e,i,s){const n=zs[e];return n?{...i,checkLabel:s(`uiStudio.fix.${n}.label`,i.checkLabel),description:s(`uiStudio.fix.${n}.description`,i.description),howToFix:s(`uiStudio.fix.${n}.howToFix`,i.howToFix),falsePositiveNote:i.falsePositiveNote?s(`uiStudio.fix.${n}.falsePositive`,i.falsePositiveNote):void 0}:i}function Ys(e,i){const s=Ws[e]??null;return s?i?Ks(e,s,i):s:null}function Qs(e){return Vs(e)}function Js(e,i){const s=new Map;for(const l of e){const r=`${l.displayPriority}::${l.rule}`,o=s.get(r)??[];o.push(l),s.set(r,o)}const n=[];for(const[l,r]of s){const[o,d]=l.split("::"),p=r.filter(Qs).length;n.push({rule:d??"unknown",priority:o,items:r,fixTemplate:Ys(d??"",i),falsePositiveRatio:r.length>0?p/r.length:0})}return n.sort((l,r)=>{const o={priority_high:0,priority_medium:1,priority_low:2};return l.priority!==r.priority?o[l.priority]-o[r.priority]:r.items.length-l.items.length}),{high:n.filter(l=>l.priority==="priority_high"),medium:n.filter(l=>l.priority==="priority_medium"),low:n.filter(l=>l.priority==="priority_low")}}function Be(e){const i=e.split("."),s=i[i.length-1]??e,n=i[i.length-2],l=n?`${n} > ${s}`:s;return{full:e,breadcrumb:l,leaf:s}}function Ge(e){return typeof e=="object"&&e!==null}function me(e){return Ge(e.data)?e.data:{}}function se(e,i){const s=e[i];return Ge(s)?s:{}}function Q(e,i){const s=e[i];return typeof s=="string"?s:null}function J(e,i){const s=e[i];return typeof s=="number"&&Number.isFinite(s)?s:0}function Xs(e){const i=se(e,"design_check_summary");return{priority_high:J(i,"priority_high"),priority_medium:J(i,"priority_medium"),priority_low:J(i,"priority_low")}}function ge(e){if(!(e.success??e.ok??!e.error))throw new Error(e.error??"UI Studio action failed")}function ye(e,i){return De(e,Xs(i))}function O(e,i,s,n,l){const r=e(i,s);return l?`${r}: ${l} · ${n}`:`${r}: ${n}`}function Zs(e){const i=e.design_check_summary;return((i==null?void 0:i.priority_high)??0)>0?"needsFix":(i==null?void 0:i.readiness)==="insufficient_evidence"?"incomplete":((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0?"review":"passed"}function er(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):i==="incomplete"?e("uiStudio.analysis.verdict.incomplete","검토 증거 부족"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function X(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function De(e,i){return`${e("uiStudio.priorityHigh","우선 검토")} ${X(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${X(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${X(e,(i==null?void 0:i.priority_low)??0)}`}function tr(e,i){return De(e,i.design_check_summary)}function ir(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function sr(e,i){return i==="ready"?e("uiStudio.readiness.ready","Ready"):i==="review_required"?e("uiStudio.readiness.reviewRequired","Review required"):i==="insufficient_evidence"?e("uiStudio.readiness.insufficient","Evidence incomplete"):e("uiStudio.readiness.unknown","Readiness unknown")}function rr({snapshotId:e,placeId:i,onClose:s,sampleDetail:n,tier:l,onActionDone:r}){const[o,d]=m.useState(n??null),[p,u]=m.useState(null),[g,h]=m.useState(null),[S,f]=m.useState(null),[v,I]=m.useState(null),[G,k]=m.useState(null),{t:_}=j(),{trackEvent:R}=q(),N=l==="pro";m.useEffect(()=>{if(n){d(n),u(null);return}let b=!1;return ft(e,i).then(A=>{b||d(A)}).catch(A=>{b||u(A instanceof Error?A.message:String(A))}),()=>{b=!0}},[e,i,n]);const C=async()=>{if(o!=null&&o.target){R("dashboard_click_event",{click_target:"ui_studio_capture_current",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),I("preview"),f({tone:"info",message:_("uiStudio.actions.previewRunning","캡처 중..."),detail:_("uiStudio.actions.previewRunningDetail","완료되면 새 화면 캡처 파일 ID를 표시합니다.")});try{const b=await ce("preview",{targetPath:o.target,placeId:i});ge(b);const A=me(b),L=Q(A,"snapshot_id"),Y=se(A,"screenshot"),x=se(A,"meta"),$=Q(Y,"saved_path"),T=Q(x,"persist_warning"),F=ye(_,A);f(T?{tone:"warning",message:O(_,"uiStudio.actions.previewNeedsSaveCheck","캡처 완료, 저장 확인 필요",F,L),detail:T}:L&&$?{tone:"success",message:O(_,"uiStudio.actions.previewSaved","새 화면 캡처 저장 완료",F,L),detail:_("uiStudio.actions.previewSavedDetail","기존 화면 캡처는 변경하지 않고 새 파일로 저장했습니다.")}:L?{tone:"warning",message:O(_,"uiStudio.actions.previewComplete","캡처 완료",F,L),detail:_("uiStudio.actions.previewSavedPathMissing","새 화면 캡처 ID는 받았지만 저장 경로를 확인하지 못했습니다.")}:{tone:"warning",message:O(_,"uiStudio.actions.previewComplete","캡처 완료",F),detail:_("uiStudio.actions.previewSnapshotIdMissing","새 화면 캡처 ID를 확인하지 못했습니다. 목록을 새로고침해 저장 여부를 확인해 주세요.")}),await(r==null?void 0:r())}catch(b){h(b instanceof Error?b.message:String(b))}finally{I(null)}}},P=async()=>{if(o!=null&&o.target){R("dashboard_click_event",{click_target:"ui_studio_check_again",page:"ui-studio",tab:"ui_studio_analysis"}),h(null),I("check"),f({tone:"info",message:_("uiStudio.actions.designCheckRunning","개선 제안 확인 중..."),detail:_("uiStudio.actions.designCheckRunningDetail","완료되면 우선 검토/검토 권장/선택 개선 항목 수를 표시합니다.")});try{const b=await ce("check",{targetPath:o.target,placeId:i});ge(b);const A=me(b),L=ye(_,A);f({tone:"success",message:O(_,"uiStudio.actions.designCheckComplete","개선 제안 확인 완료",L),detail:_("uiStudio.actions.designCheckNoSnapshotSaved","이 작업은 화면 캡처 파일을 새로 저장하지 않습니다.")}),await(r==null?void 0:r())}catch(b){h(b instanceof Error?b.message:String(b))}finally{I(null)}}},M=async()=>{h(null),f(null);try{await Je(i,e),await(r==null?void 0:r()),k(null),s()}catch(b){throw h(b instanceof Error?b.message:String(b)),b}},D=N?void 0:_("uiStudio.actions.proRequired","Pro에서 사용 가능"),w=o!=null&&o.target?Be(o.target):null;return t.jsxs("div",{className:a.drawer,children:[t.jsxs("div",{className:a.drawerToolbar,"data-testid":"snapshot-detail-toolbar",children:[t.jsxs("div",{className:a.drawerTitleBlock,children:[t.jsx("span",{className:a.drawerEyebrow,children:_("uiStudio.analysis.detailDialog","Analysis detail")}),t.jsx("span",{className:a.drawerTarget,title:(w==null?void 0:w.full)??e,children:(w==null?void 0:w.breadcrumb)??e})]}),t.jsxs("div",{className:a.drawerToolbarActions,children:[o&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:a.drawerPrimaryActions,children:[t.jsx(y,{text:D??_("uiStudio.actions.captureCurrentState.tooltip","Save the UI currently shown in Studio as a new capture. Existing captures are kept."),children:t.jsxs("button",{className:a.drawerActionBtn,onClick:()=>void C(),disabled:!N||!o.target||v!==null,type:"button",children:[t.jsx(ot,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:_("uiStudio.actions.captureCurrentState","현재 상태 캡처")})]})}),t.jsx(y,{text:D??_("uiStudio.actions.checkSuggestionsAgain.tooltip","Recompute suggestions for this capture without taking a new screenshot."),children:t.jsxs("button",{className:a.drawerActionBtn,onClick:()=>void P(),disabled:!N||!o.target||v!==null,type:"button",children:[t.jsx(ze,{size:15,"aria-hidden":"true"}),t.jsx("span",{children:_("uiStudio.actions.checkSuggestionsAgain","개선 제안 다시 확인")})]})})]}),t.jsxs("details",{className:a.drawerMoreMenu,children:[t.jsx("summary",{className:a.drawerMoreButton,title:_("uiStudio.actions.more.tooltip","Open additional actions."),"aria-label":_("uiStudio.actions.more","More"),children:t.jsx(ct,{size:18,"aria-hidden":"true"})}),t.jsx("div",{className:a.drawerMoreMenuBody,children:t.jsx(y,{text:D??_("uiStudio.actions.deleteSnapshot.tooltip","Delete only this capture file. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${a.drawerMenuItem} ${a.drawerMenuItemDanger}`,onClick:()=>{R("dashboard_click_event",{click_target:"ui_studio_delete_snapshot",page:"ui-studio",tab:"ui_studio_analysis"}),k("deleteSnapshot")},disabled:!N,type:"button",children:_("uiStudio.actions.deleteSnapshot","이 화면 캡처 삭제")})})})]})]}),t.jsx(y,{text:_("uiStudio.detailClose.tooltip","Close this detail panel."),children:t.jsx("button",{className:a.closeBtn,onClick:s,type:"button","aria-label":_("uiStudio.detailClose","Close"),children:t.jsx(Ve,{size:18,"aria-hidden":"true"})})})]})]}),p&&t.jsx("div",{className:a.errorMsg,children:p}),o&&t.jsxs("div",{className:a.detailBody,children:[g&&t.jsx("div",{className:a.actionErrMsg,children:g}),S&&t.jsxs("div",{className:`${a.actionStatusMsg} ${a[`actionStatus_${S.tone}`]??""}`,children:[t.jsx("div",{children:S.message}),S.detail&&t.jsx("div",{className:a.actionStatusDetail,children:S.detail})]}),t.jsx(ar,{detail:o}),t.jsx("div",{className:a.screenshotPreviewFrame,"data-testid":"analysis-screenshot-preview",children:o.image?t.jsx("img",{className:a.fullImg,src:o.image_url,alt:o.snapshot_id}):t.jsx("div",{className:`${a.fullImg} ${a.runtimeObservationPlaceholder}`,role:"img","aria-label":_("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:_("uiStudio.runtimeStructureObservation","Runtime structure observation")})}),t.jsx(cr,{items:o.check_results,summary:o.design_check_summary}),t.jsxs("dl",{className:a.metaDl,children:[t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.capturedAt","Captured"),tooltip:_("uiStudio.capturedAt.tooltip","When this screen was captured.")})}),t.jsx("dd",{children:new Date(o.captured_at*1e3).toLocaleString()}),t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.scope","Scope"),tooltip:_("uiStudio.scope.tooltip","Capture scope (full screen or a specific UI).")})}),t.jsx("dd",{children:o.scope}),o.target&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.target","Target"),tooltip:_("uiStudio.target.tooltip","Exact path of the captured UI instance.")})}),t.jsx("dd",{children:o.target})]}),o.brief_id&&t.jsxs(t.Fragment,{children:[t.jsx("dt",{children:t.jsx(B,{label:_("uiStudio.briefId","Brief"),tooltip:_("uiStudio.briefId.tooltip","Identifier of the design brief that produced this UI.")})}),t.jsx("dd",{children:o.brief_id})]})]})]}),G==="deleteSnapshot"&&t.jsx(le,{title:_("uiStudio.confirm.deleteSnapshotTitle","화면 캡처 삭제"),message:_("uiStudio.confirm.deleteSnapshotMessage","이 화면 캡처 파일만 삭제됩니다 (Studio 인스턴스 보존)."),danger:!0,confirmLabel:_("common.delete","삭제"),onConfirm:M,onClose:()=>k(null)})]})}function ar({detail:e}){const{t:i}=j(),s=Zs(e);return t.jsxs("section",{className:a.drawerAnalysisSummary,children:[t.jsxs("div",{className:a.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:a.drawerAnalysisLabel,children:t.jsx(B,{label:i("uiStudio.analysis.verdictLabel","개선 요약"),tooltip:i("uiStudio.analysis.verdictLabel.tooltip","Overall improvement verdict for this capture.")})}),t.jsx("span",{className:`${a.analysisVerdict} ${a[`analysisVerdict_${s}`]??""}`,children:er(i,s)}),t.jsx("span",{className:a.drawerAnalysisCounts,children:tr(i,e)})]}),t.jsxs("div",{className:a.drawerAnalysisSummaryItem,children:[t.jsx("span",{className:a.drawerAnalysisLabel,children:t.jsx(B,{label:i("uiStudio.analysis.thresholds","검토 기준"),tooltip:i("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom).")})}),t.jsx("span",{className:a.drawerAnalysisValue,children:e.thresholds_source})]}),t.jsx(nr,{summary:e.design_check_summary}),t.jsx(lr,{summary:e.design_check_summary}),t.jsx(or,{summary:e.design_check_summary})]})}function nr({summary:e}){const{t:i}=j();if(!e)return null;const s=e.functional_safe===!0?i("uiStudio.functional.checkedScopeSafe","Checked scope safe"):e.functional_safe===!1?i("uiStudio.functional.risk","Risk found"):i("uiStudio.functional.unknown","Unknown"),n=e.responsive_requirement==="required"?i("uiStudio.responsive.required","Required"):e.responsive_requirement==="recommended"?i("uiStudio.responsive.recommended","Recommended"):i("uiStudio.responsive.unknown","Unknown");return t.jsxs("div",{className:a.primaryReadinessBlock,children:[t.jsxs("div",{className:a.readinessSummary,"aria-label":i("uiStudio.readiness.summary","UI readiness"),children:[t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.primaryVisual.label","Primary visual")," · ",ir(i,e.primary_visual_verdict)]}),t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.functional.label","Functional")," · ",s]}),t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.responsive.label","Responsive")," · ",n]}),e.observation_source&&t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.observationSource.label","검사 출처")," · ",e.observation_source==="play_client"?i("uiStudio.observationSource.playClient","Play client"):i("uiStudio.observationSource.edit","Edit")]}),t.jsx("span",{className:`${a.readinessChip} ${e.readiness==="ready"?a.readinessChipReady:a.readinessChipPending}`,children:sr(i,e.readiness)})]}),e.critic_summary&&t.jsxs("p",{className:a.criticSummary,children:[t.jsx("span",{children:i("uiStudio.criticSummary","Critic summary")}),e.critic_summary]})]})}function or({summary:e}){var s,n;const{t:i}=j();return!e||!((s=e.state_coverage)!=null&&s.length)&&!((n=e.limitations)!=null&&n.length)?null:t.jsxs("div",{className:a.primaryReadinessBlock,children:[e.state_coverage&&e.state_coverage.length>0&&t.jsx("div",{className:a.coverageChips,"aria-label":i("uiStudio.stateCoverage.label","상태별 검토"),children:e.state_coverage.map(l=>t.jsxs("span",{className:a.coverageChip,title:l.reasons.join(", "),children:[l.stateId," · ",l.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):l.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},`${l.stateId}:${l.status}`))}),e.limitations&&e.limitations.length>0&&t.jsx("div",{className:a.coverageChips,"aria-label":i("uiStudio.limitations.label","검토 제한"),children:e.limitations.map(l=>t.jsx("span",{className:a.coverageChip,children:l},l))})]})}function lr({summary:e}){const{t:i}=j(),s=e==null?void 0:e.coverage_dimensions;if(!s)return null;const n=[["Structure",s.structure],["Visual",s.visual],["Interaction",s.interaction],["Primary view",s.primary_view_context],["Responsive",s.responsive_viewport]];return t.jsx("div",{className:a.coverageChips,"aria-label":i("uiStudio.analysis.coverageDimensions","검토 범위"),children:n.map(([l,r])=>t.jsxs("span",{className:`${a.coverageChip} ${a[`coverageChip_${r.status}`]??""}`,title:r.reasons.join(", "),children:[l," · ",r.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):r.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},l))})}function cr({items:e,summary:i}){const{t:s}=j();if(e.length===0)return t.jsx("p",{className:a.emptySuggestions,children:(i==null?void 0:i.readiness)==="insufficient_evidence"?s("uiStudio.noSuggestionsIncomplete","제안은 없지만 검토되지 않은 범위가 남아 있습니다."):s("uiStudio.noSuggestions","현재 개선 제안 없음")});const{high:n,medium:l,low:r}=Js(e,s);return t.jsxs("div",{className:a.suggestionsWrap,children:[t.jsx("h3",{children:t.jsx(B,{label:s("uiStudio.designCheckResultsTitle","Design Check suggestions"),tooltip:s("uiStudio.designCheckResultsTitle.tooltip","All improvement suggestions found in this capture.")})}),n.length>0&&t.jsxs("section",{className:a.prioritySection,children:[t.jsx("h4",{className:a.sectionHighHeader,children:s("uiStudio.highPrioritySection","우선 검토")}),n.map(o=>t.jsx(Z,{group:o},`h-${o.rule}`))]}),l.length>0&&t.jsxs("section",{className:a.prioritySection,children:[t.jsx("h4",{className:a.sectionMediumHeader,children:s("uiStudio.mediumPrioritySection","검토 권장")}),l.map(o=>t.jsx(Z,{group:o},`m-${o.rule}`))]}),r.length>0&&t.jsxs("section",{className:a.prioritySection,children:[t.jsx("h4",{className:a.sectionLowHeader,children:s("uiStudio.lowPrioritySection","선택 개선")}),r.map(o=>t.jsx(Z,{group:o},`l-${o.rule}`))]})]})}function Z({group:e}){var o,d,p;const{t:i}=j(),[s,n]=m.useState(e.priority==="priority_high"&&e.items.length<=5),l=e.falsePositiveRatio>=.5&&!!((o=e.fixTemplate)!=null&&o.falsePositiveNote),r=((d=e.fixTemplate)==null?void 0:d.checkLabel)??e.rule;return t.jsxs("div",{className:a.groupCard,children:[t.jsx(y,{text:i("uiStudio.suggestionGroup.tooltip","Suggestions of the same kind grouped together. Click to expand or collapse."),children:t.jsxs("button",{className:a.groupHeader,onClick:()=>n(u=>!u),type:"button",children:[t.jsx("span",{className:a.groupLabel,children:r}),t.jsx(y,{text:i("uiStudio.groupSummary.tooltip","Number of UI elements matching this group."),children:t.jsxs("span",{className:a.groupCount,children:[e.items.length," ",i("uiStudio.groupSummary","items")]})}),t.jsx("span",{className:a.groupChevron,children:s?"▾":"▸"})]})}),s&&t.jsxs("div",{className:a.groupBody,children:[e.fixTemplate&&t.jsxs(t.Fragment,{children:[t.jsx("p",{className:a.groupDescription,children:e.fixTemplate.description}),t.jsx("p",{className:a.groupFix,children:e.fixTemplate.howToFix})]}),l&&t.jsx(y,{text:i("uiStudio.falsePositiveWarning.tooltip","This check can produce false positives — verify before applying."),children:t.jsxs("p",{className:a.falsePositive,children:[i("uiStudio.falsePositiveWarning","May contain false positives"),":"," ",(p=e.fixTemplate)==null?void 0:p.falsePositiveNote]})}),t.jsx("ul",{className:a.itemList,children:e.items.map((u,g)=>t.jsx(dr,{item:u,group:e},`${u.path}-${g}`))})]})]})}function dr({item:e,group:i}){var u;const{t:s}=j(),{trackEvent:n}=q(),[l,r]=m.useState(!1),o=Be(e.path),d=((u=i.fixTemplate)==null?void 0:u.buildUpdateCommand(e))??null,p=async()=>{if(d)try{await navigator.clipboard.writeText(d),n("dashboard_click_event",{click_target:"ui_studio_copy_ai_instruction",page:"ui-studio",tab:"ui_studio_analysis"}),r(!0),setTimeout(()=>r(!1),2e3)}catch{}};return t.jsxs("li",{className:a.suggestionItem,children:[t.jsxs("div",{className:a.suggestionInfo,children:[t.jsx("code",{className:a.pathBreadcrumb,title:`${s("uiStudio.fullPath","Full path")}: ${o.full}`,children:o.breadcrumb}),t.jsxs("span",{className:a.currentValue,children:[t.jsx(y,{text:s("uiStudio.colCurrent.tooltip","The currently applied value."),children:t.jsx("span",{children:s("uiStudio.colCurrent","Current")})}),": ",t.jsx("strong",{children:String(e.actual)})," → ",t.jsx(y,{text:s("uiStudio.colRecommended.tooltip","The recommended value."),children:t.jsx("span",{children:s("uiStudio.colRecommended","Recommended")})}),": ",t.jsx("strong",{children:String(e.expected)})]})]}),d&&t.jsx(y,{text:s("uiStudio.copyFixCommand.tooltip","Copy a prompt that asks the AI to fix this issue."),children:t.jsx("button",{className:a.copyFixBtn,onClick:p,type:"button",children:l?s("uiStudio.copiedToClipboard","Copied"):s("uiStudio.copyFixCommand","Copy AI instruction")})})]})}function ee(e,i){return Object.entries(i).reduce((s,[n,l])=>s.split(`{${n}}`).join(String(l)),e)}function ur(e,i){return i.rule==="contrast"?ee(e("uiStudio.sample.designCheck.contrast","Text contrast is below {expected} (current {actual}). Adjust TextColor3 or BackgroundColor3."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="touch_target"?ee(e("uiStudio.sample.designCheck.touchTarget","Touch targets should be at least {expected} px (current {actual}). Increase Size or padding."),{expected:String(i.expected),actual:String(i.actual)}):i.rule==="min_text_size"?ee(e("uiStudio.sample.designCheck.minTextSize","TextSize is below {expected} (current {actual}). Increase it for readability."),{expected:String(i.expected),actual:String(i.actual)}):i.hint}const Me="sample_inventory_preview",re=Xe,pr=[{path:"StarterGui.InventoryGame.Overlay.Modal.Header.GoldBox.Icon",hint:"텍스트 대비 4.5:1 미만 (현재 1.24). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"1.24"},{path:"StarterGui.InventoryGame.Overlay.Modal.Header.CloseBtn",hint:"텍스트 대비 4.5:1 미만 (현재 4.11). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥4.5:1",rule:"contrast",actual:"4.11"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.Portrait.Avatar",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.LeftPanel.EquipGrid.Slot6.EmptyIcon",hint:"텍스트 대비 3.0:1 미만 (현재 2.53). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"2.53"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabAll",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabWeapon",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabArmor",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabConsume",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.TabBar.TabMisc",hint:"터치 타겟 44x44 px 이상 권장 (현재 64x32). Size 또는 padding 늘리세요.",displayPriority:"priority_high",expected:"≥44x44",rule:"touch_target",actual:"64x32"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I1.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I2.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I3.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I4.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I5.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I6.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I7.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I8.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I9.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I10.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I11.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I12.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I13.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I14.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I15.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I16.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I17.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I18.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I19.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.CenterPanel.ItemGrid.I20.Qty",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.ItemIconBox.Icon",hint:"텍스트 대비 3.0:1 미만 (현재 1.25). TextColor3 또는 BackgroundColor3 조정 필요.",displayPriority:"priority_high",expected:"≥3.0:1",rule:"contrast",actual:"1.25"},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.Rarity",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12},{path:"StarterGui.InventoryGame.Overlay.Modal.DetailPanel.StatsBox.Passive",hint:"TextSize 12 미만 (하한 14). 가독성 확보를 위해 상향 조정 권장.",displayPriority:"priority_medium",expected:"≥14",rule:"min_text_size",actual:12}];function hr(e){const n={snapshot_id:Me,captured_at:1776757908,brief_id:null,thresholds_source:"default",scope:"targetPath",target:"StarterGui.InventoryGame",design_check_summary:{priority_high:35,priority_medium:10,priority_low:0},image:{file:"ui-studio-sample.png",width:402,height:252}},l={...n,check_results:pr.map(o=>({...o,hint:ur(e,o)})),image_url:re};return{list:{placeId:0,snapshots:[n],totalCount:1},detail:l}}const _r=/plugin not connected|sync not started/i;function ae(e){return typeof e=="string"&&_r.test(e)}function Ae(){const{t:e}=j();return t.jsxs("section",{className:a.pluginGuideCard,role:"status","aria-live":"polite",children:[t.jsx("div",{className:a.pluginGuideMarker,"aria-hidden":"true",children:"!"}),t.jsxs("div",{className:a.pluginGuideBody,children:[t.jsx("h2",{className:a.pluginGuideTitle,children:e("uiStudio.pluginGuide.title","Roblox Studio 플러그인이 연결되지 않았습니다")}),t.jsx("p",{className:a.pluginGuideMessage,children:e("uiStudio.pluginGuide.message","UI Studio는 연결된 Studio place의 화면 캡처와 변경 이력을 표시합니다. Studio와 WEPPY Plugin을 연결하면 자동으로 갱신됩니다.")}),t.jsxs("ul",{className:a.pluginGuideChecklist,children:[t.jsx("li",{children:e("uiStudio.pluginGuide.check1","Roblox Studio가 실행 중인가요?")}),t.jsx("li",{children:e("uiStudio.pluginGuide.check2","WEPPY Plugin이 설치되어 실행 중인가요?")})]}),t.jsxs("div",{className:a.pluginGuideWaiting,children:[t.jsx("span",{className:a.pluginGuideDot,"aria-hidden":"true"}),e("uiStudio.pluginGuide.waiting","플러그인 연결을 기다리는 중...")]})]})]})}function mr(e){return{review:{id:"review-ui",title:e("uiStudio.emptyGuide.ai.reviewTitle","Review an existing UI"),request:e("uiStudio.emptyGuide.ai.reviewRequest","Inspect both Edit UI and UI created in the Play Client, then identify a screen to review. If there are several candidates, ask me which one to use first. Check text readability, overlapping elements, safe areas, and content outside the screen, then save the evidence in UI Studio. Do not modify the existing UI, and clearly separate semantic runtime observations, available screenshots, required states, and anything you could not verify.")},create:{id:"create-ui",title:e("uiStudio.emptyGuide.ai.createTitle","Create a new UI"),request:e("uiStudio.emptyGuide.ai.createRequest","Create an inventory UI for this game. Check the existing UI and data structure first, and ask me if the required features or visual direction are unclear. Do not overwrite existing UI. Capture and review the finished screen, then save the results in UI Studio.")}}}const gr="_emptyState_13gyl_1",yr="_header_13gyl_11",fr="_method_13gyl_12",Sr="_methodTitle_13gyl_44",xr="_moreExamples_13gyl_57",H={emptyState:gr,header:yr,method:fr,methodTitle:Sr,moreExamples:xr};function $e({kind:e}){const{locale:i,t:s}=j(),n=mr(s),l=e==="analysis",r={copy:s("guidance.ai.copy","Copy request"),copying:s("guidance.ai.copying","Copying…"),copied:s("guidance.ai.copied","Copied"),copyFailed:s("guidance.ai.copyFailed","Could not copy. Select the request text and copy it manually.")};return t.jsxs("section",{className:H.emptyState,children:[t.jsxs("header",{className:H.header,children:[t.jsx("h3",{children:l?s("uiStudio.emptyGuide.analysis.title","Create or review game UI"):s("uiStudio.emptyGuide.history.title","Start a UI task")}),t.jsx("p",{children:l?s("uiStudio.emptyGuide.analysis.description","Ask AI to create or review UI, then inspect the saved screens and findings here."):s("uiStudio.emptyGuide.history.description","When AI creates or changes UI, the change record will appear here.")})]}),t.jsxs("section",{className:H.method,children:[t.jsxs("div",{className:H.methodTitle,children:[t.jsx(rt,{size:16,"aria-hidden":"true"}),t.jsx("h4",{children:s("uiStudio.emptyGuide.ai.title","Ask AI")})]}),t.jsx(pe,{examples:[l?n.review:n.create],resetKey:`${i}|ui-studio-${e}`,labels:r,nextStep:s("guidance.ai.nextStep","Paste this request into an AI chat connected to WEPPY.")}),l&&t.jsxs("details",{className:H.moreExamples,children:[t.jsx("summary",{children:s("uiStudio.emptyGuide.ai.more","Other request examples")}),t.jsx(pe,{examples:[n.create],resetKey:`${i}|ui-studio-create`,labels:r})]})]})]})}function vr(e){return((e==null?void 0:e.priority_high)??0)>0||((e==null?void 0:e.priority_medium)??0)>0||((e==null?void 0:e.priority_low)??0)>0}function K(e){return e===null||e.readiness==="insufficient_evidence"}function Le(e){return e.target??e.scope}function Cr(e){const i=Le(e),s=i.split(".").filter(l=>l.length>0),n=s.findIndex(l=>l==="StarterGui");return n>=0&&s[n+1]?["StarterGui",s[n+1]].join("."):i}function Ee(e){return((e==null?void 0:e.priority_high)??0)>0?"needsFix":((e==null?void 0:e.priority_medium)??0)>0||((e==null?void 0:e.priority_low)??0)>0?"review":K(e)?"incomplete":"passed"}function br(e){return Ee(e.design_check_summary)}function fe(e){return ne(e.design_check_summary)}function ne(e){return((e==null?void 0:e.priority_high)??0)>0?0:((e==null?void 0:e.priority_medium)??0)>0?1:((e==null?void 0:e.priority_low)??0)>0?2:K(e)?3:4}function wr(e){var o;if(e.length===0)return null;if(e.length===1)return((o=e[0])==null?void 0:o.latest.design_check_summary)??null;const i=e.reduce((d,p)=>{const u=p.latest.design_check_summary;d.priority_high+=(u==null?void 0:u.priority_high)??0,d.priority_medium+=(u==null?void 0:u.priority_medium)??0,d.priority_low+=(u==null?void 0:u.priority_low)??0,(u==null?void 0:u.deterministic_status)==="failed"&&(d.deterministic_status="failed"),(u==null?void 0:u.visual_status)==="failed"?d.visual_status="failed":(u==null?void 0:u.visual_status)==="skipped"&&d.visual_status!=="failed"?d.visual_status="skipped":(u==null?void 0:u.visual_status)==="completed"&&d.visual_status==="completed"?d.visual_status="completed":(u==null?void 0:u.visual_status)!=="completed"&&d.visual_status==="completed"&&(d.visual_status="not_requested"),(u==null?void 0:u.coverage)!=="structural_and_visual"&&(d.coverage="structural_only");for(const g of(u==null?void 0:u.skipped_reasons)??[])d.skipped_reasons.add(g);(u==null?void 0:u.readiness)==="insufficient_evidence"?d.readiness="insufficient_evidence":(u==null?void 0:u.readiness)==="review_required"&&d.readiness==="ready"&&(d.readiness="review_required");for(const g of(u==null?void 0:u.viewport_profiles_tested)??[])d.viewport_profiles_tested.add(g);return d},{priority_high:0,priority_medium:0,priority_low:0,deterministic_status:"completed",visual_status:"completed",coverage:"structural_and_visual",skipped_reasons:new Set,readiness:"ready",viewport_profiles_tested:new Set}),s=e.flatMap(d=>d.latest.design_check_summary?[d.latest.design_check_summary]:[]),n=d=>{const p=s.flatMap(h=>{var S;return(S=h.coverage_dimensions)!=null&&S[d]?[h.coverage_dimensions[d]]:[]}),u=p.map(h=>h.status);return{status:u.includes("failed")?"failed":u.length===s.length&&u.every(h=>h==="completed")?"completed":u.length>0&&u.every(h=>h==="not_requested")?"not_requested":"skipped",reasons:Array.from(new Set(p.flatMap(h=>h.reasons)))}},l=s.some(d=>d.coverage_dimensions)?{structure:n("structure"),visual:n("visual"),interaction:n("interaction"),primary_view_context:n("primary_view_context"),responsive_viewport:n("responsive_viewport")}:void 0,r=Array.from(new Set(s.flatMap(d=>d.observation_source?[d.observation_source]:[])));return{priority_high:i.priority_high,priority_medium:i.priority_medium,priority_low:i.priority_low,deterministic_status:i.deterministic_status,visual_status:i.visual_status,coverage:i.coverage,skipped_reasons:[...i.skipped_reasons],readiness:i.readiness,viewport_profiles_tested:[...i.viewport_profiles_tested],coverage_dimensions:l,observation_source:r.length===1?r[0]:void 0,limitations:Array.from(new Set(s.flatMap(d=>d.limitations??[]))),state_coverage:s.flatMap(d=>d.state_coverage??[])}}function kr(e){const i=new Map;for(const l of e){const r=Le(l),o=i.get(r);if(!o){i.set(r,{latest:l,snapshotCount:1});continue}o.snapshotCount+=1,l.captured_at>o.latest.captured_at&&(o.latest=l)}const s=[...i.entries()].map(([l,r])=>({key:l,latest:r.latest,snapshotCount:r.snapshotCount,verdict:br(r.latest)})),n=new Map;for(const l of s){const r=Cr(l.latest),o=n.get(r)??[];o.push(l),n.set(r,o)}return[...n.entries()].map(([l,r])=>{var u;const o=r.sort((g,h)=>{const S=fe(g.latest)-fe(h.latest);return S!==0?S:h.latest.captured_at-g.latest.captured_at}),d=o.reduce((g,h)=>h.latest.captured_at>g.captured_at?h.latest:g,((u=o[0])==null?void 0:u.latest)??r[0].latest),p=wr(o);return{key:l,latest:d,snapshotCount:o.reduce((g,h)=>g+h.snapshotCount,0),children:o,summary:p,verdict:Ee(p)}}).sort((l,r)=>{const o=ne(l.summary)-ne(r.summary);return o!==0?o:r.latest.captured_at-l.latest.captured_at})}function jr(e){return e.reduce((i,s)=>(vr(s.summary)?i.hasSuggestions+=1:s.summary&&(i.noSuggestions+=1),K(s.summary)&&(i.evidenceIncomplete+=1),i),{hasSuggestions:0,evidenceIncomplete:0,noSuggestions:0})}function E(e,i){return`${i}${e("uiStudio.storage.countSuffix","개")}`}function oe(e,i){const s=K(i)?` · ${e("uiStudio.analysis.verdict.incomplete","검토 증거 부족")}`:"";return`${e("uiStudio.priorityHigh","우선 검토")} ${E(e,(i==null?void 0:i.priority_high)??0)} · ${e("uiStudio.priorityMedium","검토 권장")} ${E(e,(i==null?void 0:i.priority_medium)??0)} · ${e("uiStudio.priorityLow","선택 개선")} ${E(e,(i==null?void 0:i.priority_low)??0)}${s}`}function Se(e){const i=e==null?void 0:e.coverage_dimensions;return i?[["Visual",i.visual],["Interaction",i.interaction],["Primary view",i.primary_view_context],["Responsive",i.responsive_viewport]].flatMap(([s,n])=>typeof n=="object"&&n.status!=="completed"?[s]:[]):[]}function Ir(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function Nr(e,i){return i==="ready"?e("uiStudio.readiness.ready","Ready"):i==="review_required"?e("uiStudio.readiness.reviewRequired","Review required"):i==="insufficient_evidence"?e("uiStudio.readiness.insufficient","Evidence incomplete"):e("uiStudio.readiness.unknown","Readiness unknown")}function Pr(e,i,s){const n=s.evidenceIncomplete>0?` · ${V(e,"incomplete")} ${E(e,s.evidenceIncomplete)}`:"";return`${e("uiStudio.analysis.targetCountLabel","분석 대상")} ${E(e,i)} · ${V(e,"needsFix")} ${E(e,s.hasSuggestions)}${n} · ${V(e,"passed")} ${E(e,s.noSuggestions)}`}function xe(e,i){return(i==null?void 0:i.deterministic_status)==="failed"?e("uiStudio.analysis.coverage.deterministicFailed","구조 검사 실패"):(i==null?void 0:i.coverage)==="structural_and_visual"&&i.visual_status==="completed"?e("uiStudio.analysis.coverage.full","구조·시각 검사 완료"):(i==null?void 0:i.visual_status)==="skipped"?e("uiStudio.analysis.coverage.visualSkipped","구조 검사만 완료 · 시각 검사 생략"):(i==null?void 0:i.visual_status)==="failed"?e("uiStudio.analysis.coverage.visualFailed","구조 검사 완료 · 시각 검사 실패"):e("uiStudio.analysis.coverage.structuralOnly","구조 검사만 완료")}function Tr({tier:e}){const{t:i}=j(),{trackEvent:s}=q(),n=e==="basic",l=Re(50),r=m.useRef(null),[o,d]=m.useState(null),[p,u]=m.useState(new Set),[g,h]=m.useState(new Set),[S,f]=m.useState(!1),v=m.useCallback((x,$)=>{const T=o===x;T||(r.current=$??null),d(T?null:x)},[o]),I=m.useCallback(()=>{d(null)},[]),G=m.useCallback(x=>{u($=>{const T=new Set($);return T.has(x)?T.delete(x):T.add(x),T})},[]),k=n?hr(i):null,_=(k==null?void 0:k.list)??l.data,R=n?!1:l.loading,N=m.useCallback(x=>{h($=>{const T=new Set($);return T.has(x)?T.delete(x):T.add(x),T})},[]),C=x=>{h(new Set(x))},P=()=>{h(new Set)},M=async()=>{const x=(_==null?void 0:_.placeId)??0;s("dashboard_click_event",{click_target:"ui_studio_delete_selected_snapshots",page:"ui-studio",tab:"ui_studio_analysis"}),await Ze(x,{ids:[...g]}),await l.refresh(),f(!1),h(new Set)};if(R)return t.jsx("div",{className:a.page,children:i("uiStudio.loading","Loading...")});if(!n&&ae(l.error))return t.jsx(Ae,{});if(!n&&l.error)return t.jsxs("div",{className:a.page,children:[i("uiStudio.error","Error"),": ",l.error]});const D=(_==null?void 0:_.snapshots)??[],w=_!==null,b=(_==null?void 0:_.placeId)??0,A=D.map(x=>x.snapshot_id),L=kr(D),Y=jr(L);return t.jsxs("div",{children:[t.jsx("div",{className:a.analysisWorkspace,"data-detail-open":o?"true":"false",children:t.jsxs("div",{className:a.analysisMainColumn,"data-testid":"analysis-main-column",children:[n&&t.jsx("div",{className:a.sampleBanner,children:t.jsxs("div",{className:a.sampleBannerRow,children:[t.jsxs("div",{className:a.sampleBannerMain,children:[t.jsx("div",{className:a.sampleBadge,children:i("uiStudio.sample.badge","Preview of the Pro UI gallery")}),t.jsx("div",{className:a.sampleTitle,children:i("uiStudio.sample.title","You are previewing the UI screenshot gallery that unlocks after upgrading to Pro.")}),t.jsx("div",{className:a.sampleMessage,children:i("uiStudio.sample.message","This preview uses sample data from a demo inventory UI. Real screenshots, review history, and AI-driven fixes unlock with Pro.")})]}),t.jsx("div",{className:a.sampleActions,children:t.jsx("a",{className:a.primaryAction,href:je.uiStudioAnalysis,target:"_blank",rel:"noreferrer",onClick:()=>s("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_analysis_banner",page:"ui-studio",tab:"ui_studio_analysis"}),children:i("tier.upgrade","View Pro")})})]})}),t.jsx("div",{className:a.galleryHeader,children:t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.title","UI Studio"),tooltip:i("uiStudio.title.tooltip","A central place to review AI-generated UI screens and improvement suggestions.")})})}),D.length===0?w?t.jsx($e,{kind:"analysis"}):t.jsx("div",{className:a.emptyState,children:i("uiStudio.empty.unavailable","UI Studio data is not available yet.")}):t.jsxs(t.Fragment,{children:[t.jsx("section",{className:a.analysisSummaryPanel,children:t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.analysis.reportsTitle","UI 루트별 최신 분석"),tooltip:i("uiStudio.analysis.reportsTitle.tooltip","Shows the latest capture and suggestion summary per UI (e.g., Inventory window, Main menu).")})}),t.jsx("p",{className:a.analysisSummaryText,children:Pr(i,L.length,Y)})]})}),t.jsx("div",{className:a.analysisReportGrid,"data-testid":"analysis-report-grid",children:L.map(x=>t.jsx(Br,{report:x,placeId:b,imageUrlOverride:n?re:void 0,expanded:p.has(x.key),onPrimaryClick:$=>{x.children.length>1?G(x.key):v(x.latest.snapshot_id,$)},onChildClick:($,T)=>v($,T)},x.key))}),t.jsxs("section",{className:a.recentCapturesSection,children:[t.jsxs("div",{className:a.recentCapturesHeader,children:[t.jsxs("div",{children:[t.jsx("h2",{children:t.jsx(B,{label:i("uiStudio.analysis.recentCapturesTitle","최근 캡처"),tooltip:i("uiStudio.analysis.recentCapturesTitle.tooltip","All recently saved captures in chronological order.")})}),t.jsxs("p",{className:a.recentCapturesMeta,children:[i("uiStudio.storage.snapshotCount","화면 캡처")," ",E(i,D.length)]})]}),!n&&D.length>0&&t.jsxs("div",{className:a.captureSelectionActions,children:[t.jsx(y,{text:i("uiStudio.gallery.selectAll.tooltip","Select every visible capture at once."),children:t.jsx("button",{className:a.selectionBarBtn,onClick:()=>C(A),type:"button",children:i("uiStudio.gallery.selectAll","모두 선택")})}),g.size>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:a.selectionToolbarCount,children:[g.size,i("uiStudio.gallery.selection.selectedCount"," selected")]}),t.jsx(y,{text:i("uiStudio.gallery.clearSelection.tooltip","Clear the current selection."),children:t.jsx("button",{className:a.selectionBarBtn,onClick:P,type:"button",children:i("uiStudio.gallery.clearSelection","선택 해제")})}),t.jsx(y,{text:i("uiStudio.gallery.deleteSelected.tooltip","Delete only the selected capture files. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:`${a.selectionBarBtn} ${a.selectionBarBtnDanger}`,onClick:()=>f(!0),type:"button",children:i("common.delete","삭제")})})]})]})]}),t.jsx("div",{className:a.grid,children:D.map(x=>t.jsx(Fs,{snapshot:x,placeId:b,onClick:$=>v(x.snapshot_id,$),imageUrlOverride:n?re:void 0,selectable:!n,selected:g.has(x.snapshot_id),onToggleSelect:N},x.snapshot_id))})]})]})]})}),t.jsx(it,{open:o!==null,ariaLabel:i("uiStudio.analysis.detailDialog","Analysis detail"),onClose:I,returnFocusTo:r.current,testId:"analysis-detail-popup-layer",children:o&&t.jsx(rr,{snapshotId:o,placeId:b,onClose:I,sampleDetail:n&&o===Me?(k==null?void 0:k.detail)??null:null,tier:e,onActionDone:n?void 0:l.refresh})}),S&&t.jsx(le,{title:i("uiStudio.confirm.deleteBatchTitle","화면 캡처 일괄 삭제"),message:i("uiStudio.confirm.deleteBatchMessage",`선택한 ${g.size}개의 화면 캡처를 삭제합니다. 이 작업은 되돌릴 수 없습니다.`),danger:!0,confirmLabel:i("common.delete","삭제"),onConfirm:M,onClose:()=>f(!1)})]})}function V(e,i){return i==="needsFix"||i==="review"?e("uiStudio.analysis.verdict.hasSuggestions","개선 제안 있음"):i==="incomplete"?e("uiStudio.analysis.verdict.incomplete","검토 증거 부족"):e("uiStudio.analysis.verdict.passed","현재 개선 제안 없음")}function Rr(e,i){if(((i==null?void 0:i.priority_high)??0)>0||((i==null?void 0:i.priority_medium)??0)>0||((i==null?void 0:i.priority_low)??0)>0){if((i==null?void 0:i.readiness)==="insufficient_evidence"){const s=Se(i);return s.length>0?`${e("uiStudio.analysis.remainingReview","남은 검토")}: ${s.join(", ")}`:e("uiStudio.analysis.issueSummary.incomplete","검토 증거가 더 필요합니다.")}return oe(e,i)}if((i==null?void 0:i.readiness)==="insufficient_evidence"){const s=Se(i);return s.length>0?`${e("uiStudio.analysis.remainingReview","남은 검토")}: ${s.join(", ")}`:e("uiStudio.analysis.issueSummary.incomplete","검토 증거가 더 필요합니다.")}return e("uiStudio.analysis.issueSummary.passed","현재 검토 기준에서 추가 개선 제안은 없습니다.")}function Br({report:e,placeId:i,imageUrlOverride:s,expanded:n,onPrimaryClick:l,onChildClick:r}){var S;const{t:o}=j(),d=e.latest,p=s??Te(d.snapshot_id,i),u=new Date(d.captured_at*1e3).toLocaleString(),g=V(o,e.verdict),h=e.children.length>1;return t.jsxs("div",{className:a.analysisReportGroup,children:[t.jsxs("button",{className:a.analysisReportCard,"aria-expanded":h?n:void 0,"aria-label":`${e.key} ${h?o("uiStudio.analysis.expandChildren","하위 대상 보기"):o("uiStudio.analysis.openDetail","상세 보기")}`,onClick:f=>l(f.currentTarget),type:"button",children:[d.image?t.jsx("img",{className:a.analysisReportThumb,src:p,alt:d.snapshot_id,loading:"lazy"}):t.jsx("div",{className:`${a.analysisReportThumb} ${a.runtimeObservationPlaceholder}`,role:"img","aria-label":o("uiStudio.runtimeStructureObservation","Runtime structure observation"),children:o("uiStudio.runtimeStructureObservation","Runtime structure observation")}),t.jsxs("div",{className:a.analysisReportBody,children:[t.jsxs("div",{className:a.analysisReportTopline,children:[t.jsx(y,{text:e.verdict==="passed"?o("uiStudio.analysis.verdict.passed.tooltip","No improvements suggested under the current review thresholds."):o("uiStudio.analysis.verdict.hasSuggestions.tooltip","Some improvements were found in this UI. Click the card for details."),children:t.jsx("span",{className:`${a.analysisVerdict} ${a[`analysisVerdict_${e.verdict}`]??""}`,children:g})}),t.jsx(y,{text:o("uiStudio.analysis.counts.tooltip","Shows how many suggestions are marked review first, recommended, or optional."),children:t.jsx("span",{className:a.analysisReportCounts,children:oe(o,e.summary)})})]}),t.jsx("div",{className:a.analysisReportTarget,children:e.key}),((S=e.summary)==null?void 0:S.readiness)==="insufficient_evidence"&&e.verdict!=="incomplete"&&t.jsx("div",{className:a.analysisReportIssue,children:o("uiStudio.analysis.verdict.incomplete","검토 증거 부족")}),t.jsx(Gr,{summary:e.summary}),t.jsx("div",{className:a.analysisReportIssue,children:Rr(o,e.summary)}),t.jsx("div",{className:a.analysisReportCoverage,children:xe(o,e.summary)}),t.jsx(Dr,{summary:e.summary}),t.jsxs("div",{className:a.analysisReportMeta,children:[u," ·"," ",t.jsx(y,{text:o("uiStudio.analysis.thresholds.tooltip","The threshold set used for this review (default or custom)."),children:t.jsx("span",{children:o("uiStudio.analysis.thresholds","검토 기준")})}),": ",d.thresholds_source,e.snapshotCount>1?` · ${o("uiStudio.analysis.captureLabel","캡처")} ${E(o,e.snapshotCount)}`:"",h?` · ${o("uiStudio.analysis.childTargets","하위 대상")} ${E(o,e.children.length)}`:""]})]})]}),h&&n&&t.jsx("div",{className:a.analysisChildList,children:e.children.map(f=>t.jsxs("button",{className:a.analysisChildRow,onClick:v=>r(f.latest.snapshot_id,v.currentTarget),type:"button",children:[t.jsx("span",{className:a.analysisChildPath,children:f.key}),t.jsx("span",{className:a.analysisChildSummary,children:oe(o,f.latest.design_check_summary)}),t.jsx("span",{className:a.analysisChildSummary,children:xe(o,f.latest.design_check_summary)}),t.jsx("span",{className:a.analysisChildDetailHint,children:o("uiStudio.analysis.childDetailHint","하위 대상 상세 보기")})]},f.key))})]})}function Gr({summary:e}){const{t:i}=j();if(!e)return null;const s=e.functional_safe===!0?i("uiStudio.functional.checkedScopeSafe","Checked scope safe"):e.functional_safe===!1?i("uiStudio.functional.risk","Risk found"):i("uiStudio.functional.unknown","Unknown"),n=e.responsive_requirement==="required"?i("uiStudio.responsive.required","Required"):e.responsive_requirement==="recommended"?i("uiStudio.responsive.recommended","Recommended"):i("uiStudio.responsive.unknown","Unknown");return t.jsxs("div",{className:a.readinessSummary,"aria-label":i("uiStudio.readiness.summary","UI readiness"),children:[t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.primaryVisual.label","Primary visual")," · ",Ir(i,e.primary_visual_verdict)]}),t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.functional.label","Functional")," · ",s]}),t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.responsive.label","Responsive")," · ",n]}),e.observation_source&&t.jsxs("span",{className:a.readinessChip,children:[i("uiStudio.observationSource.label","검사 출처")," · ",e.observation_source==="play_client"?i("uiStudio.observationSource.playClient","Play client"):i("uiStudio.observationSource.edit","Edit")]}),t.jsx("span",{className:`${a.readinessChip} ${e.readiness==="ready"?a.readinessChipReady:a.readinessChipPending}`,children:Nr(i,e.readiness)})]})}function Dr({summary:e}){const{t:i}=j(),s=e==null?void 0:e.coverage_dimensions;if(!s)return null;const n=[["Structure",s.structure],["Visual",s.visual],["Interaction",s.interaction],["Primary view",s.primary_view_context],["Responsive",s.responsive_viewport]];return t.jsx("div",{className:a.coverageChips,"aria-label":i("uiStudio.analysis.coverageDimensions","검토 범위"),children:n.map(([l,r])=>t.jsxs("span",{className:`${a.coverageChip} ${a[`coverageChip_${r.status}`]??""}`,title:r.reasons.join(", "),children:[l," · ",r.status==="completed"?i("uiStudio.analysis.coverageStatus.completed","완료"):r.status==="failed"?i("uiStudio.analysis.coverageStatus.failed","실패"):i("uiStudio.analysis.coverageStatus.skipped","생략")]},l))})}function Mr(e,i,s=1e4){const[n,l]=m.useState(null),[r,o]=m.useState(!0),[d,p]=m.useState(null),u=JSON.stringify(i),g=m.useCallback(async()=>{if(e===null){l(null),p(null),o(!1);return}try{const h=await de(e,i);l(h),p(null)}catch(h){p(h.message)}finally{o(!1)}},[e,u]);return m.useEffect(()=>{let h=!0;if(e===null)return l(null),p(null),o(!1),()=>{h=!1};const S=async()=>{try{const v=await de(e,i);h&&(l(v),p(null))}catch(v){h&&p(v.message)}finally{h&&o(!1)}};S();const f=setInterval(()=>{S()},s);return()=>{h=!1,clearInterval(f)}},[e,u,s]),{data:n,loading:r,error:d,refresh:g}}const Ar="_filterBar_1203k_4",$r="_filterGroup_1203k_14",Lr="_filterLabel_1203k_21",Er="_filterCheckbox_1203k_28",qr="_segmentGroup_1203k_45",Ur="_segmentBtn_1203k_55",Or="_segmentBtnActive_1203k_73",Hr="_filterInput_1203k_79",Fr="_filterResetBtn_1203k_95",zr="_requestRow_1203k_114",Vr="_requestRowMain_1203k_127",Wr="_requestDetailToggle_1203k_134",Kr="_thumbPair_1203k_156",Yr="_thumbPairButton_1203k_164",Qr="_thumbSlot_1203k_179",Jr="_thumbImg_1203k_204",Xr="_thumbPlaceholder_1203k_211",Zr="_thumbArrow_1203k_219",ea="_extraPathsBadge_1203k_225",ta="_requestMeta_1203k_239",ia="_requestLabel_1203k_247",sa="_requestTime_1203k_256",ra="_requestStats_1203k_261",aa="_statDot_1203k_269",na="_summaryPill_1203k_273",oa="_requestReadiness_1203k_277",la="_requestReadinessPill_1203k_283",ca="_requestReadinessReady_1203k_297",da="_requestReadinessPending_1203k_303",ua="_requestActions_1203k_310",pa="_expandHint_1203k_317",ha="_mutationsArea_1203k_330",_a="_mutLoading_1203k_339",ma="_mutEmpty_1203k_340",ga="_mutError_1203k_346",ya="_mutationRow_1203k_352",fa="_mutationLine_1203k_362",Sa="_mutTs_1203k_369",xa="_mutCommand_1203k_375",va="_mutPath_1203k_381",Ca="_mutDiff_1203k_391",ba="_mutErr_1203k_346",wa="_changeDetails_1203k_406",ka="_changeDetailRow_1203k_414",ja="_changeDetailRowNoBefore_1203k_423",Ia="_changeDetailBadge_1203k_427",Na="_changeDetail_text_1203k_444",Pa="_changeDetail_color_1203k_449",Ta="_changeDetail_size_1203k_454",Ra="_changeDetail_layout_1203k_459",Ba="_changeDetail_state_1203k_464",Ga="_changeDetail_asset_1203k_469",Da="_changeDetail_property_1203k_474",Ma="_changeDetailProperty_1203k_478",Aa="_changeDetailArrow_1203k_486",$a="_changeDetailOldValue_1203k_492",La="_changeDetailNewValue_1203k_493",Ea="_compareDialogLayer_1203k_511",qa="_compareDialog_1203k_511",Ua="_beforeAfterDrawer_1203k_542",Oa="_drawerHeader_1203k_552",Ha="_drawerTitle_1203k_561",Fa="_drawerCloseBtn_1203k_569",za="_drawerBody_1203k_585",Va="_pathTabs_1203k_592",Wa="_pathTab_1203k_592",Ka="_pathTabActive_1203k_621",Ya="_comparePanel_1203k_627",Qa="_compareHalf_1203k_637",Ja="_compareLabel_1203k_644",Xa="_compareImg_1203k_655",Za="_comparePlaceholder_1203k_663",en="_compareDetailsPanel_1203k_675",tn="_compareDetailsHeader_1203k_684",sn="_drawerFooter_1203k_702",rn="_drawerActionBtn_1203k_710",an="_historyTabWrap_1203k_728",nn="_historyWorkspace_1203k_734",on="_historyMainColumn_1203k_739",ln="_requestList_1203k_743",cn="_emptyHistory_1203k_748",dn="_historyError_1203k_758",un="_historyLoading_1203k_764",pn="_listHeader_1203k_772",hn="_listHeaderTitle_1203k_781",_n="_clearBtn_1203k_788",mn="_deleteErrBanner_1203k_812",c={filterBar:Ar,filterGroup:$r,filterLabel:Lr,filterCheckbox:Er,segmentGroup:qr,segmentBtn:Ur,segmentBtnActive:Or,filterInput:Hr,filterResetBtn:Fr,requestRow:zr,requestRowMain:Vr,requestDetailToggle:Wr,thumbPair:Kr,thumbPairButton:Yr,thumbSlot:Qr,thumbImg:Jr,thumbPlaceholder:Xr,thumbArrow:Zr,extraPathsBadge:ea,requestMeta:ta,requestLabel:ia,requestTime:sa,requestStats:ra,statDot:aa,summaryPill:na,requestReadiness:oa,requestReadinessPill:la,requestReadinessReady:ca,requestReadinessPending:da,requestActions:ua,expandHint:pa,mutationsArea:ha,mutLoading:_a,mutEmpty:ma,mutError:ga,mutationRow:ya,mutationLine:fa,mutTs:Sa,mutCommand:xa,mutPath:va,mutDiff:Ca,mutErr:ba,changeDetails:wa,changeDetailRow:ka,changeDetailRowNoBefore:ja,changeDetailBadge:Ia,changeDetail_text:Na,changeDetail_color:Pa,changeDetail_size:Ta,changeDetail_layout:Ra,changeDetail_state:Ba,changeDetail_asset:Ga,changeDetail_property:Da,changeDetailProperty:Ma,changeDetailArrow:Aa,changeDetailOldValue:$a,changeDetailNewValue:La,compareDialogLayer:Ea,compareDialog:qa,beforeAfterDrawer:Ua,drawerHeader:Oa,drawerTitle:Ha,drawerCloseBtn:Fa,drawerBody:za,pathTabs:Va,pathTab:Wa,pathTabActive:Ka,comparePanel:Ya,compareHalf:Qa,compareLabel:Ja,compareImg:Xa,comparePlaceholder:Za,compareDetailsPanel:en,compareDetailsHeader:tn,drawerFooter:sn,drawerActionBtn:rn,historyTabWrap:an,historyWorkspace:nn,historyMainColumn:on,requestList:ln,emptyHistory:cn,historyError:dn,historyLoading:un,listHeader:pn,listHeaderTitle:hn,clearBtn:_n,deleteErrBanner:mn};function gn(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function ve(e){return e==null?"nil":typeof e=="string"?`"${e}"`:typeof e=="object"?JSON.stringify(e):String(e)}function qe({mutations:e,emptyLabel:i}){const{t:s}=j();return e.length===0?t.jsx("div",{className:c.mutEmpty,children:i??s("uiStudio.history.row.mutationsEmpty","No change details")}):t.jsx(t.Fragment,{children:e.map(n=>t.jsx(yn,{mutation:n},n.mutationId))})}function yn({mutation:e}){return t.jsxs("div",{className:c.mutationRow,children:[t.jsxs("div",{className:c.mutationLine,children:[t.jsx("span",{className:c.mutTs,children:gn(e.ts)}),t.jsx("span",{className:c.mutCommand,children:e.command}),e.targetPath&&t.jsx("span",{className:c.mutPath,children:e.targetPath}),e.diffSummary&&t.jsx("span",{className:c.mutDiff,children:e.diffSummary})]}),e.changeDetails&&e.changeDetails.length>0&&t.jsx("div",{className:c.changeDetails,children:e.changeDetails.map(i=>t.jsx(fn,{detail:i},`${i.property}:${i.category}`))}),!e.ok&&e.error&&t.jsx("span",{className:c.mutErr,children:e.error})]})}function fn({detail:e}){const i=Object.prototype.hasOwnProperty.call(e,"before");return t.jsxs("div",{className:`${c.changeDetailRow} ${i?"":c.changeDetailRowNoBefore}`,children:[t.jsx("span",{className:`${c.changeDetailBadge} ${c[`changeDetail_${e.category}`]??""}`,children:e.label}),t.jsx("span",{className:c.changeDetailProperty,children:e.property}),i&&t.jsx("span",{className:c.changeDetailOldValue,children:ve(e.before)}),t.jsx("span",{className:c.changeDetailArrow,children:"→"}),t.jsx("span",{className:c.changeDetailNewValue,children:ve(e.after)})]})}function Ce(e,i){return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Sn(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function xn(e){if(!e)return null;const i=e.split(/[./]/).filter(n=>n.length>0);if(i.length===0)return null;const s=i.findIndex(n=>n==="StarterGui");return s>=0&&i[s+1]?i[s+1]:i[i.length-1]??null}function te(e,i){if(i.label)return i.label;const s=xn(i.affectedPaths[0]);if(s){const n=i.mutationCount===1?"uiStudio.history.row.pathLabelOne":"uiStudio.history.row.pathLabelMany",l=i.mutationCount===1?"{path} · {n} change detail":"{path} · {n} change details";return e(n,l).replace("{path}",s).replace("{n}",String(i.mutationCount))}return e("uiStudio.history.row.toolLabel","UI changes ({n})").replace("{n}",String(i.mutationCount))}function ie(e,i){return`${i}${e("uiStudio.storage.countSuffix","")}`}function vn(e,i){if(!i)return null;const s=[i.style_family,i.layout_family,i.device_policy,i.safe_area_policy].filter(n=>typeof n=="string"&&n.length>0);return s.length===0?null:`${e("uiStudio.history.row.qualityPlan","Design direction")}: ${s.join(" · ")}`}function Cn(e,i,s){if(!i)return null;if(i.source==="unavailable")return e("uiStudio.history.row.designCheckUnavailable","Suggestions: unavailable");if(s==="insufficient_evidence"||i.readiness==="insufficient_evidence")return e("uiStudio.history.row.readinessIncomplete","Readiness: evidence incomplete");if(i.total===0)return e("uiStudio.history.row.designCheckNone","Suggestions: none");const n=`${e("uiStudio.priorityHigh","Priority")} ${ie(e,i.priority_high)}`,l=`${e("uiStudio.priorityMedium","Recommended")} ${ie(e,i.priority_medium)}`,r=`${e("uiStudio.priorityLow","Optional")} ${ie(e,i.priority_low)}`;return`${e("uiStudio.history.row.designCheck","Suggestions")}: ${n} · ${l} · ${r}`}function bn(e,i){return i==="recompose"?e("uiStudio.primaryVisual.recompose","Recompose"):i==="refine"?e("uiStudio.primaryVisual.refine","Refine"):i==="approved"?e("uiStudio.primaryVisual.approved","Approved"):e("uiStudio.primaryVisual.unknown","Unknown")}function Ue({req:e,placeId:i,onOpenCompare:s,imageUrlOverride:n,sampleMutations:l}){const{t:r}=j(),[o,d]=m.useState(!1),[p,u]=m.useState(null),[g,h]=m.useState(!1),[S,f]=m.useState(null),v=n!=null,I=e.affectedPaths[0]??null,G=e.affectedPaths.length-1,k=I?e.beforeSnapshots[I]??null:null,_=I?e.afterSnapshots[I]??null:null,R=k?v?n:Ce(k,i):null,N=_?v?n:Ce(_,i):null,C=vn(r,e.qualityPlanSummary),P=Cn(r,e.postChangeDesignCheckSummary,e.readiness),M=e.postChangeDesignCheckSummary,D=async()=>{if(!o&&p===null)if(v&&l!=null)u(l);else{h(!0),f(null);try{const w=await Ie(i,e.requestId);u(w.mutations)}catch(w){f(w.message)}finally{h(!1)}}d(w=>!w)};return t.jsxs("div",{className:c.requestRow,children:[t.jsxs("div",{className:c.requestRowMain,children:[t.jsx(y,{text:r("uiStudio.history.row.compare.tooltip","Compare the before and after screens. Click to open the full comparison view."),children:t.jsxs("button",{className:`${c.thumbPair} ${c.thumbPairButton}`,onClick:w=>s(w.currentTarget),disabled:!I,"aria-label":`${te(r,e)} ${r("uiStudio.history.row.compare","Before / After")}`,type:"button",children:[t.jsx("div",{className:c.thumbSlot,children:R?t.jsx("img",{className:c.thumbImg,src:R,alt:r("uiStudio.compare.before","Before"),loading:"lazy"}):t.jsx(y,{text:r("uiStudio.history.row.noBeforeState.tooltip","No capture saved before this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:r("uiStudio.history.row.noBeforeState","이전 없음")})})}),t.jsx("span",{className:c.thumbArrow,children:"→"}),t.jsx("div",{className:c.thumbSlot,children:N?t.jsx("img",{className:c.thumbImg,src:N,alt:r("uiStudio.compare.after","After"),loading:"lazy"}):t.jsx(y,{text:r("uiStudio.history.row.noAfterState.tooltip","No capture saved after this change."),children:t.jsx("span",{className:c.thumbPlaceholder,children:r("uiStudio.history.row.noAfterState","이후 없음")})})}),G>0&&t.jsx(y,{text:r("uiStudio.history.row.extraPaths.tooltip","Number of additional UIs changed in this action."),children:t.jsxs("span",{className:c.extraPathsBadge,children:["+",G]})})]})}),t.jsxs("button",{className:c.requestDetailToggle,type:"button","aria-expanded":o,"aria-label":`${te(r,e)} ${r("uiStudio.history.row.toggleDetails","Toggle change details")}`,onClick:()=>void D(),children:[t.jsxs("span",{className:c.requestMeta,children:[t.jsx("span",{className:c.requestLabel,children:te(r,e)}),t.jsx("span",{className:c.requestTime,children:Sn(e.startedAt)}),t.jsxs("span",{className:c.requestStats,children:[t.jsx(y,{text:r("uiStudio.history.row.affectedPaths.tooltip","Number of UIs affected by this action."),children:t.jsxs("span",{children:[r("uiStudio.history.row.affectedPaths","Paths")," ",e.affectedPaths.length,r("uiStudio.storage.countSuffix","")]})}),t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.mutations.tooltip","Number of detailed changes (e.g., property edits)."),children:t.jsxs("span",{children:[r("uiStudio.history.row.mutations","Change details")," ",e.mutationCount,r("uiStudio.storage.countSuffix","")]})}),C&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.qualityPlan.tooltip","Brief design direction used for this change."),children:t.jsx("span",{className:c.summaryPill,children:C})})]}),P&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:c.statDot,children:"·"}),t.jsx(y,{text:r("uiStudio.history.row.designCheck.tooltip","Post-change Design Check suggestion summary."),children:t.jsx("span",{className:c.summaryPill,children:P})})]})]}),M&&t.jsxs("span",{className:c.requestReadiness,"aria-label":r("uiStudio.readiness.summary","UI readiness"),children:[t.jsx("span",{className:c.requestReadinessPill,children:bn(r,M.primary_visual_verdict)}),t.jsx("span",{className:c.requestReadinessPill,children:M.functional_safe===!0?r("uiStudio.functional.safeCompact","Functional safe"):M.functional_safe===!1?r("uiStudio.functional.riskCompact","Functional risk"):r("uiStudio.functional.unknownCompact","Functional unknown")}),t.jsx("span",{className:c.requestReadinessPill,children:M.responsive_requirement==="required"?r("uiStudio.responsive.requiredCompact","Responsive required"):M.responsive_requirement==="recommended"?r("uiStudio.responsive.recommendedCompact","Responsive recommended"):r("uiStudio.responsive.unknownCompact","Responsive unknown")}),M.readiness==="ready"&&t.jsx("span",{className:`${c.requestReadinessPill} ${c.requestReadinessReady}`,children:r("uiStudio.readiness.ready","Ready")}),M.readiness==="review_required"&&t.jsx("span",{className:`${c.requestReadinessPill} ${c.requestReadinessPending}`,children:r("uiStudio.readiness.reviewRequired","Review required")})]})]}),t.jsx("span",{className:c.requestActions,children:t.jsx(y,{text:r("uiStudio.history.row.toggleDetails.tooltip","Show or hide a per-line breakdown of what changed."),children:t.jsx("span",{className:c.expandHint,children:o?r("uiStudio.history.row.collapseDetails","Hide change details"):r("uiStudio.history.row.expandDetails","Show {n} change details").replace("{n}",String(e.mutationCount))})})})]})]}),o&&t.jsxs("div",{className:c.mutationsArea,children:[g&&t.jsx("div",{className:c.mutLoading,children:r("uiStudio.history.loading","로딩 중...")}),S&&t.jsx("div",{className:c.mutError,children:S}),p&&t.jsx(qe,{mutations:p,emptyLabel:r("uiStudio.history.row.mutationsEmpty","No change details")})]})]})}function be(e,i){return`${W}/api/ui-studio/snapshots/${encodeURIComponent(e)}/image?placeId=${i}`}function Oe({requestId:e,placeId:i,onClose:s,imageUrlOverride:n,sampleDetail:l}){const{t:r}=j(),o=m.useRef(null),d=l!=null,[p,u]=m.useState(d?l:null),[g,h]=m.useState(!d),[S,f]=m.useState(null),[v,I]=m.useState(d&&l.affectedPaths.length>0?l.affectedPaths[0]:null);m.useEffect(()=>{var C;(C=o.current)==null||C.focus()},[]),m.useEffect(()=>{const C=P=>{P.key==="Escape"&&(P.preventDefault(),s())};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[s]),m.useEffect(()=>{if(d)return;let C=!0;return h(!0),f(null),Ie(i,e).then(P=>{C&&(u(P),P.affectedPaths.length>0&&I(P.affectedPaths[0]))}).catch(P=>{C&&f(P.message)}).finally(()=>{C&&h(!1)}),()=>{C=!1}},[e,i,d]);const G=v&&p?p.beforeSnapshots[v]??null:null,k=v&&p?p.afterSnapshots[v]??null:null,_=G?n??be(G,i):null,R=k?n??be(k,i):null,N=r("uiStudio.history.row.compare","전후 비교");return t.jsx("div",{className:c.compareDialogLayer,"data-testid":"history-compare-dialog-layer",onClick:s,role:"presentation",children:t.jsx("section",{ref:o,className:c.compareDialog,role:"dialog","aria-modal":"true","aria-label":N,tabIndex:-1,onClick:C=>C.stopPropagation(),children:t.jsxs("div",{className:c.beforeAfterDrawer,children:[t.jsxs("div",{className:c.drawerHeader,children:[t.jsx("h2",{className:c.drawerTitle,children:N}),t.jsx("button",{className:c.drawerCloseBtn,onClick:s,type:"button",children:r("uiStudio.history.drawer.close","닫기")})]}),g&&t.jsx("div",{className:c.drawerBody,children:r("uiStudio.history.loading","로딩 중...")}),S&&t.jsx("div",{className:c.drawerBody,children:t.jsx("span",{className:c.mutErr,children:S})}),!g&&!S&&p&&t.jsxs(t.Fragment,{children:[p.affectedPaths.length>0&&t.jsx("div",{className:c.pathTabs,role:"tablist",children:p.affectedPaths.map(C=>t.jsx(y,{text:`${r("uiStudio.compare.path.tooltip","The UI instance path for this screen.")} ${C}`,children:t.jsx("button",{role:"tab","aria-selected":v===C,className:`${c.pathTab} ${v===C?c.pathTabActive:""}`,onClick:()=>I(C),type:"button",children:C.split("/").pop()??C})},C))}),t.jsxs("div",{className:c.comparePanel,children:[t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:r("uiStudio.compare.before.tooltip","The screen saved just before AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:r("uiStudio.compare.before","Before")})}),_?t.jsx("img",{className:c.compareImg,src:_,alt:r("uiStudio.compare.before","Before")}):t.jsx("div",{className:c.comparePlaceholder,children:r("uiStudio.history.row.noBeforeState","이전 상태 없음")})]}),t.jsxs("div",{className:c.compareHalf,children:[t.jsx(y,{text:r("uiStudio.compare.after.tooltip","The screen saved just after AI made the change."),children:t.jsx("div",{className:c.compareLabel,children:r("uiStudio.compare.after","After")})}),R?t.jsx("img",{className:c.compareImg,src:R,alt:r("uiStudio.compare.after","After")}):t.jsx("div",{className:c.comparePlaceholder,children:r("uiStudio.history.row.noAfterState","이후 상태 없음")})]})]}),t.jsxs("section",{className:c.compareDetailsPanel,children:[t.jsx("div",{className:c.compareDetailsHeader,children:r("uiStudio.history.drawer.changeDetails","Change details")}),t.jsx(qe,{mutations:p.mutations,emptyLabel:r("uiStudio.history.row.mutationsEmpty","No change details")})]})]}),t.jsx("div",{className:c.drawerFooter,children:t.jsx("button",{className:c.drawerActionBtn,onClick:s,type:"button",children:r("uiStudio.history.drawer.close","닫기")})})]})})})}function z(e){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0),s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999);return{start:i,end:s}}function we(e,i){const s=e.split("-").map(Number);if(s.length!==3||s.some(o=>Number.isNaN(o)))return;const[n,l,r]=s;return new Date(n,l-1,r,i?23:0,i?59:0,i?59:0,i?999:0).toISOString()}function wn(e){const i={limit:50};if(e.action!=="all"&&(i.action=e.action),e.datePreset==="custom"){const s=e.from?we(e.from,!1):void 0,n=e.to?we(e.to,!0):void 0;s&&(i.from=s),n&&(i.to=n)}else if(e.datePreset!=="all"){const s=new Date;if(e.datePreset==="today"){const{start:n,end:l}=z(s);i.from=n.toISOString(),i.to=l.toISOString()}else if(e.datePreset==="yesterday"){const n=new Date(s);n.setDate(n.getDate()-1);const{start:l,end:r}=z(n);i.from=l.toISOString(),i.to=r.toISOString()}else{const n=e.datePreset==="7d"?6:29,l=new Date(s);l.setDate(l.getDate()-n);const{start:r}=z(l),{end:o}=z(s);i.from=r.toISOString(),i.to=o.toISOString()}}return i}function He(){return{action:"all",datePreset:"all"}}function kn(e){return e.action==="all"&&e.datePreset==="all"&&e.from===void 0&&e.to===void 0}function jn(){const{t:e}=j(),{trackEvent:i}=q(),s=et(e),[n,l]=m.useState(null),r=n?s.requests.find(p=>p.requestId===n)??null:null,o=m.useCallback((p,u)=>{l(p)},[]),d=m.useCallback(()=>{l(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[t.jsx("div",{className:a.sampleBanner,children:t.jsxs("div",{className:a.sampleBannerRow,children:[t.jsxs("div",{className:a.sampleBannerMain,children:[t.jsx("div",{className:a.sampleBadge,children:e("uiStudio.history.sample.bannerBadge","Preview of the Pro change history")}),t.jsx("div",{className:a.sampleTitle,children:e("uiStudio.history.sample.bannerTitle","You are previewing the UI change history that unlocks after upgrading to Pro.")}),t.jsx("div",{className:a.sampleMessage,children:e("uiStudio.history.sample.bannerMessage","This preview uses sample data. Real change history, before/after comparison, and batch delete unlock with Pro.")})]}),t.jsx("div",{className:a.sampleActions,children:t.jsx("a",{className:a.primaryAction,href:je.uiStudioHistory,target:"_blank",rel:"noreferrer",title:e("uiStudio.history.sample.tooltip","Full history is available with Pro"),onClick:()=>i("dashboard_click_event",{click_target:"upgrade_cta",placement:"ui_studio_history_banner",page:"ui-studio",tab:"ui_studio_history"}),children:e("tier.upgrade","View Pro")})})]})}),t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":n?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx("div",{className:c.listHeader,children:t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(B,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})})}),t.jsx("div",{className:c.requestList,children:s.requests.map(p=>t.jsx(Ue,{req:p,placeId:0,onOpenCompare:u=>o(p.requestId,u),imageUrlOverride:ue,sampleMutations:s.mutationsByRequest[p.requestId]},p.requestId))})]}),n&&r&&t.jsx(Oe,{requestId:n,placeId:0,onClose:d,imageUrlOverride:ue,sampleDetail:{...r,mutations:s.mutationsByRequest[r.requestId]??[]}})]})]})}function In({filter:e,onChange:i}){const{t:s}=j(),n=[{value:"all",label:s("uiStudio.history.filter.actionAll","All"),tooltip:s("uiStudio.history.filter.actionAll.tooltip","Show every kind of action.")},{value:"create_tree",label:s("uiStudio.history.filter.actionCreate","Create"),tooltip:s("uiStudio.history.filter.actionCreate.tooltip","Show only actions that created a new UI.")},{value:"update",label:s("uiStudio.history.filter.actionUpdate","Update"),tooltip:s("uiStudio.history.filter.actionUpdate.tooltip","Show only actions that updated an existing UI.")},{value:"delete",label:s("uiStudio.history.filter.actionDelete","Delete"),tooltip:s("uiStudio.history.filter.actionDelete.tooltip","Show only actions that deleted a UI.")}],l=[{value:"all",label:s("uiStudio.history.filter.dateAll","All"),tooltip:s("uiStudio.history.filter.dateAll.tooltip","Show the full history.")},{value:"today",label:s("uiStudio.history.filter.today","Today"),tooltip:s("uiStudio.history.filter.today.tooltip","Show only changes from today.")},{value:"yesterday",label:s("uiStudio.history.filter.yesterday","Yesterday"),tooltip:s("uiStudio.history.filter.yesterday.tooltip","Show only changes from yesterday.")},{value:"7d",label:s("uiStudio.history.filter.last7Days","Last 7 days"),tooltip:s("uiStudio.history.filter.last7Days.tooltip","Show changes from the last 7 days.")},{value:"30d",label:s("uiStudio.history.filter.last30Days","Last 30 days"),tooltip:s("uiStudio.history.filter.last30Days.tooltip","Show changes from the last 30 days.")},{value:"custom",label:s("uiStudio.history.filter.customRange","Custom range"),tooltip:s("uiStudio.history.filter.customRange.tooltip","Pick a custom start and end date.")}];return t.jsxs("div",{className:c.filterBar,children:[t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(B,{label:s("uiStudio.history.filter.actions","작업 유형"),tooltip:s("uiStudio.history.filter.actions.tooltip","Filter records by the kind of change AI made.")})}),t.jsx("div",{className:c.segmentGroup,children:n.map(r=>t.jsx(y,{text:r.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.action===r.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,action:r.value}),"aria-pressed":e.action===r.value,type:"button",children:r.label})},r.value))})]}),t.jsxs("div",{className:c.filterGroup,children:[t.jsx("span",{className:c.filterLabel,children:t.jsx(B,{label:s("uiStudio.history.filter.period","Period"),tooltip:s("uiStudio.history.filter.period.tooltip","Filter records by time range.")})}),t.jsx("div",{className:c.segmentGroup,children:l.map(r=>t.jsx(y,{text:r.tooltip,children:t.jsx("button",{className:`${c.segmentBtn} ${e.datePreset===r.value?c.segmentBtnActive:""}`,onClick:()=>i({...e,datePreset:r.value,from:r.value==="custom"?e.from:void 0,to:r.value==="custom"?e.to:void 0}),"aria-pressed":e.datePreset===r.value,type:"button",children:r.label})},r.value))})]}),e.datePreset==="custom"&&t.jsxs("div",{className:c.filterGroup,children:[t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-from-date",children:t.jsx(B,{label:s("uiStudio.history.filter.from","시작일"),tooltip:s("uiStudio.history.filter.from.tooltip","Start date for the query.")})}),t.jsx("input",{id:"ui-history-from-date",type:"date",className:c.filterInput,value:e.from??"",onChange:r=>i({...e,from:r.target.value||void 0})}),t.jsx("label",{className:c.filterLabel,htmlFor:"ui-history-to-date",children:t.jsx(B,{label:s("uiStudio.history.filter.to","종료일"),tooltip:s("uiStudio.history.filter.to.tooltip","End date for the query.")})}),t.jsx("input",{id:"ui-history-to-date",type:"date",className:c.filterInput,value:e.to??"",onChange:r=>i({...e,to:r.target.value||void 0})})]}),t.jsx(y,{text:s("uiStudio.history.filter.reset.tooltip","Reset all filters to defaults."),children:t.jsx("button",{className:c.filterResetBtn,onClick:()=>i(He()),type:"button",children:s("uiStudio.history.filter.reset","Reset")})})]})}function Nn(){var D;const{t:e}=j(),{trackEvent:i}=q(),s=Re(1),n=((D=s.data)==null?void 0:D.placeId)??null,[l,r]=m.useState(He),{data:o,loading:d,error:p,refresh:u}=Mr(n,wn(l)),[g,h]=m.useState(null),[S,f]=m.useState(!1),[v,I]=m.useState(!1),[G,k]=m.useState(null),_=async()=>{if(k(null),n===null){k(e("uiStudio.history.noPlaceAction","Current place is not available yet."));return}try{await tt(n,{all:!0,alsoSnapshots:v}),await u(),f(!1)}catch(w){throw k(w.message),w}},R=(o==null?void 0:o.requests)??[],N=n===null&&s.loading,C=ae(s.error)||ae(p),P=m.useCallback((w,b)=>{i("dashboard_click_event",{click_target:"ui_studio_compare_before_after",page:"ui-studio",tab:"ui_studio_history"}),h(w)},[i]),M=m.useCallback(()=>{h(null)},[]);return t.jsxs("div",{className:c.historyTabWrap,children:[C?t.jsx(Ae,{}):t.jsxs("div",{className:c.historyWorkspace,"data-compare-open":g?"true":"false",children:[t.jsxs("div",{className:c.historyMainColumn,"data-testid":"history-main-column",children:[t.jsx(In,{filter:l,onChange:r}),t.jsxs("div",{className:c.listHeader,children:[t.jsx("h2",{className:c.listHeaderTitle,children:t.jsx(B,{label:e("uiStudio.history.title","변경 이력"),tooltip:e("uiStudio.history.title.tooltip","A timeline of every UI change made by AI.")})}),R.length>0&&t.jsx(y,{text:e("uiStudio.history.clear.tooltip","Delete every change record for this project. The actual UI in Roblox Studio is not affected."),children:t.jsx("button",{className:c.clearBtn,onClick:()=>{i("dashboard_click_event",{click_target:"ui_studio_clear_history",page:"ui-studio",tab:"ui_studio_history"}),f(!0)},type:"button",children:e("uiStudio.history.clear","Clear")})})]}),N&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loadingPlace","Loading current place...")}),!N&&d&&t.jsx("div",{className:c.historyLoading,children:e("uiStudio.history.loading","로딩 중...")}),!N&&!d&&p&&t.jsxs("div",{className:c.historyError,children:[e("uiStudio.history.error","오류"),": ",p]}),!N&&!d&&!p&&n===null&&t.jsx("div",{className:c.emptyHistory,children:e("uiStudio.history.noPlace","No current place data is available yet. Connect WEPPY Plugin and sync a place to view UI change history.")}),!N&&!d&&!p&&n!==null&&R.length===0&&(kn(l)?t.jsx($e,{kind:"history"}):t.jsxs("div",{className:c.emptyHistory,children:[t.jsx("strong",{children:e("uiStudio.history.filteredEmpty.title","No change history matches these filters")}),t.jsx("span",{children:e("uiStudio.history.filteredEmpty.body","Change the filters or use Reset to show the full history.")})]})),!N&&!d&&n!==null&&R.length>0&&t.jsx("div",{className:c.requestList,children:R.map(w=>t.jsx(Ue,{req:w,placeId:n,onOpenCompare:b=>P(w.requestId,b)},w.requestId))}),G&&t.jsx("div",{className:c.deleteErrBanner,children:G})]}),g&&n!==null&&t.jsx(Oe,{requestId:g,placeId:n,onClose:M})]}),S&&t.jsx(le,{title:e("uiStudio.history.confirm.clearRequestsTitle","변경 이력 삭제"),message:e("uiStudio.history.confirm.clearRequestsMessage","현재 place의 변경 이력을 삭제합니다. Studio 인스턴스에는 영향을 주지 않습니다."),danger:!0,cascadeOption:{label:e("uiStudio.history.confirm.cascadeOption","연결된 화면 캡처도 함께 삭제"),checked:v,onChange:I},confirmLabel:e("common.delete","삭제"),onConfirm:_,onClose:()=>f(!1)})]})}function Pn({tier:e}){return e==="basic"?t.jsx(jn,{}):t.jsx(Nn,{})}const Tn=["analysis","history"];function Un(){const{t:e}=j(),{trackEvent:i}=q(),{tier:s,loading:n}=We(),[l,r]=Ke(),o=l.get("tab"),d=o&&Tn.includes(o)?o:"analysis",p=g=>{i("dashboard_click_event",{click_target:g==="analysis"?"ui_studio_tab_analysis":"ui_studio_tab_history",page:"ui-studio",tab:g==="analysis"?"ui_studio_analysis":"ui_studio_history"}),r(h=>{const S=new URLSearchParams(h);return S.set("tab",g),S})},u=[{key:"analysis",label:t.jsx(y,{text:e("uiStudio.tabs.analysis.tooltip","Browse AI-captured UI screens and quickly find which UIs need improvement."),children:e("uiStudio.tabs.analysis","Analysis")})},{key:"history",label:t.jsx(y,{text:e("uiStudio.tabs.history.tooltip","Every UI change AI made, in order. Compare before and after screens."),children:e("uiStudio.tabs.history","History")})}];return t.jsxs("div",{className:a.page,children:[t.jsx(Qe,{title:e("page.uiStudio.title","UI Studio"),description:e("page.uiStudio.description","Review UI captures, improvement suggestions, and before/after change history."),helpTopicId:"uiStudio",helpState:{tier:s}}),!n&&s==="pro"&&t.jsx(at,{surface:"uiStudio"}),t.jsx(st,{items:u,value:d,onChange:p}),n?t.jsx("div",{className:a.emptyState,children:e("uiStudio.loading","Loading...")}):d==="analysis"?t.jsx(Tr,{tier:s}):t.jsx(Pn,{tier:s})]})}export{Un as Component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._page_1ldr9_2{display:flex;flex-direction:column;gap:var(--content-gap);max-width:var(--content-max)}._grid_1ldr9_9{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:16px}._card_1ldr9_16{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--bg-card);padding:0;text-align:left;position:relative;color:inherit}._card_1ldr9_16:hover{border-color:var(--accent)}._cardBodyButton_1ldr9_31{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;text-align:left}._cardBodyButton_1ldr9_31:focus-visible{outline:none;box-shadow:inset var(--focus-ring)}._thumb_1ldr9_48{width:100%;aspect-ratio:16 / 9;object-fit:contain;object-position:center;display:block;background:var(--bg-secondary)}._runtimeObservationPlaceholder_1ldr9_57{display:flex;align-items:center;justify-content:center;padding:12px;color:var(--text-secondary);font-size:11px;font-weight:600;line-height:1.35;text-align:center}._badges_1ldr9_69{position:absolute;top:8px;right:8px;display:flex;gap:4px}._priorityHighBadge_1ldr9_77,._priorityMediumBadge_1ldr9_78,._priorityLowBadge_1ldr9_79{display:inline-flex;align-items:center;min-height:22px;padding:2px 6px;border:1px solid var(--border);border-radius:var(--radius-control);font-size:12px;font-weight:600;cursor:default}._priorityHighBadge_1ldr9_77{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}._priorityMediumBadge_1ldr9_78{background:var(--pro-bg-soft);border-color:var(--pro-border);color:var(--pro-text)}._priorityLowBadge_1ldr9_79{background:var(--bg-secondary);border-color:var(--border);color:var(--text-secondary)}._cardMeta_1ldr9_109{padding:8px 12px;font-size:12px;color:var(--text-primary)}._target_1ldr9_115{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._time_1ldr9_122{color:var(--text-muted);margin-top:4px}._drawer_1ldr9_127{width:100%;flex:1 1 auto;min-height:0;max-height:none;display:flex;flex-direction:column;background:var(--bg-card);border:0;border-radius:0;overflow:hidden;padding:0;box-shadow:none;color:var(--text-primary);box-sizing:border-box}._drawerToolbar_1ldr9_144{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))}._drawerTitleBlock_1ldr9_155{min-width:0;display:flex;flex-direction:column;gap:3px}._drawerEyebrow_1ldr9_162{color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:0;text-transform:uppercase}._drawerTarget_1ldr9_171{overflow:hidden;color:var(--text-primary);font-family:var(--font-label);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._drawerToolbarActions_1ldr9_181{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}._closeBtn_1ldr9_189{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;cursor:pointer;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--text-secondary);transition:border-color var(--transition),background var(--transition),color var(--transition)}._closeBtn_1ldr9_189:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._detailBody_1ldr9_210{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 24px 24px}._screenshotPreviewFrame_1ldr9_217{display:flex;align-items:center;justify-content:center;width:100%;height:clamp(180px,32vh,320px);margin-top:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary);overflow:hidden}._fullImg_1ldr9_230{display:block;width:100%;height:100%;object-fit:contain}._metaDl_1ldr9_237{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;margin:16px 0;font-size:13px}._metaDl_1ldr9_237 dt{color:var(--text-muted)}._errorMsg_1ldr9_249{color:var(--error-text);padding:12px}._suggestionsWrap_1ldr9_254{margin-top:16px}._suggestionsWrap_1ldr9_254 h3{margin:0 0 12px;font-size:16px}._prioritySection_1ldr9_261{margin-bottom:16px}._sectionHighHeader_1ldr9_265{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--error)}._sectionLowHeader_1ldr9_271{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning-text)}._sectionMediumHeader_1ldr9_277{margin:0 0 8px;font-size:13px;font-weight:600;color:var(--warning)}._groupCard_1ldr9_283{border:1px solid var(--border);border-radius:8px;margin-bottom:8px;background:var(--bg-secondary);overflow:hidden}._groupHeader_1ldr9_290{width:100%;display:flex;align-items:center;gap:8px;padding:10px 12px;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--text-primary);font:inherit}._groupHeader_1ldr9_290:hover{background:var(--bg-card)}._groupLabel_1ldr9_306{font-weight:600;font-size:13px;flex:1}._groupCount_1ldr9_311{font-size:12px;color:var(--text-muted);padding:2px 8px;background:var(--bg-card);border-radius:10px}._groupChevron_1ldr9_318{color:var(--text-muted);font-size:12px}._groupBody_1ldr9_322{padding:0 12px 12px}._groupDescription_1ldr9_325{font-size:12px;color:var(--text-muted);margin:8px 0 4px}._groupFix_1ldr9_330{font-size:12px;color:var(--text-primary);margin:4px 0 8px;padding:6px 10px;background:var(--bg-card);border-left:3px solid var(--accent);border-radius:4px}._falsePositive_1ldr9_339{font-size:12px;color:var(--warning-text);margin:4px 0 8px;padding:6px 10px;background:var(--warning-bg);border-radius:4px}._itemList_1ldr9_347{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}._suggestionItem_1ldr9_355{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:var(--bg-card);border-radius:6px;font-size:12px}._suggestionInfo_1ldr9_365{display:flex;flex-direction:column;gap:2px;min-width:0}._pathBreadcrumb_1ldr9_371{font-family:monospace;font-size:11px;color:var(--text-primary);background:transparent;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._currentValue_1ldr9_380{font-size:11px;color:var(--text-muted)}._copyFixBtn_1ldr9_384{padding:4px 10px;background:var(--accent);color:var(--bg-card);border:none;border-radius:4px;cursor:pointer;font-size:11px;font-weight:600;flex-shrink:0}._copyFixBtn_1ldr9_384:hover{opacity:.9}._emptySuggestions_1ldr9_398{text-align:center;padding:24px;color:var(--text-muted);font-size:13px}._sampleBanner_1ldr9_406{display:flex;flex-direction:column;gap:12px;padding:18px 20px;border:1px solid var(--pro-border);border-radius:var(--radius);background:linear-gradient(135deg,#f0bd5829,#f0bd5808 55%),var(--bg-card);margin-bottom:16px}._sampleBannerRow_1ldr9_419{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}._sampleBannerMain_1ldr9_427{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1}._sampleBadge_1ldr9_435{width:fit-content;color:var(--pro-text);font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:.02em;opacity:.92}._sampleTitle_1ldr9_445{font-family:var(--font-label);font-size:16px;font-weight:600;color:var(--text-primary)}._sampleMessage_1ldr9_452{max-width:560px;color:var(--text-secondary);font-size:13px;line-height:1.5}._sampleActions_1ldr9_459{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}._primaryAction_1ldr9_467,._secondaryAction_1ldr9_468{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 14px;border-radius:8px;font-family:var(--font-label);font-size:12px;text-decoration:none;transition:background var(--transition),border-color var(--transition),opacity var(--transition)}._secondaryAction_1ldr9_468{border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);cursor:pointer}._secondaryAction_1ldr9_468:hover{border-color:var(--accent);background:var(--accent-dim)}._primaryAction_1ldr9_467{border:1px solid var(--pro-badge);background:var(--pro-badge);color:var(--pro-text-on-badge)}._primaryAction_1ldr9_467:hover{opacity:.9}._emptyState_1ldr9_503{text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._pluginGuideCard_1ldr9_511{display:flex;align-items:flex-start;gap:14px;padding:18px 20px;border:1px solid var(--warning);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary)}._pluginGuideMarker_1ldr9_522{display:flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;border-radius:50%;border:1px solid var(--warning);color:var(--warning);font-family:var(--font-label);font-size:15px;font-weight:700}._pluginGuideBody_1ldr9_537{min-width:0}._pluginGuideTitle_1ldr9_541{margin:0 0 8px;color:var(--text-primary);font-family:var(--font-label);font-size:15px;font-weight:600}._pluginGuideMessage_1ldr9_549{margin:0 0 12px;color:var(--text-secondary);font-size:13px;line-height:1.5}._pluginGuideChecklist_1ldr9_556{display:flex;flex-direction:column;gap:7px;margin:0 0 14px;padding:0;list-style:none}._pluginGuideChecklist_1ldr9_556 li{position:relative;padding-left:20px;color:var(--text-secondary);font-size:13px}._pluginGuideChecklist_1ldr9_556 li:before{content:"○";position:absolute;left:2px;color:var(--text-muted)}._pluginGuideWaiting_1ldr9_579{display:inline-flex;align-items:center;gap:8px;color:var(--text-muted);font-family:var(--font-label);font-size:12px}._pluginGuideDot_1ldr9_588{width:7px;height:7px;border-radius:50%;background:var(--warning)}._analysisWorkspace_1ldr9_596{width:100%;position:relative}._analysisMainColumn_1ldr9_601{min-width:0}._analysisSummaryPanel_1ldr9_606{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:16px;padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._analysisSummaryPanel_1ldr9_606 h2,._recentCapturesHeader_1ldr9_619 h2{margin:0;font-size:16px;font-family:var(--font-label);color:var(--text-primary)}._analysisSummaryText_1ldr9_626,._recentCapturesMeta_1ldr9_627{margin:6px 0 0;color:var(--text-secondary);font-size:13px}._analysisReportGrid_1ldr9_633{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-top:14px}._analysisReportGroup_1ldr9_640{min-width:0}._analysisReportCard_1ldr9_644{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;width:100%;min-height:128px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisReportCard_1ldr9_644:hover{border-color:var(--accent);background:var(--bg-secondary)}._analysisReportThumb_1ldr9_666{width:112px;aspect-ratio:16 / 10;object-fit:contain;object-position:center;border-radius:6px;background:var(--bg-secondary)}._analysisReportBody_1ldr9_675{min-width:0;display:flex;flex-direction:column;gap:7px}._analysisReportTopline_1ldr9_682{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._analysisVerdict_1ldr9_689{display:inline-flex;align-items:center;min-height:22px;padding:0 8px;border-radius:999px;font-family:var(--font-label);font-size:12px;font-weight:600}._analysisVerdict_needsFix_1ldr9_700,._analysisVerdict_review_1ldr9_701{color:var(--accent);background:var(--accent-dim)}._analysisVerdict_incomplete_1ldr9_706{color:var(--warning-text);background:var(--warning-bg)}._analysisVerdict_passed_1ldr9_711{color:var(--text-secondary);background:var(--bg-secondary)}._analysisReportCounts_1ldr9_716{color:var(--text-secondary);font-size:12px}._readinessSummary_1ldr9_721{display:flex;flex-wrap:wrap;gap:5px}._readinessChip_1ldr9_727{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;font-weight:600;line-height:1.3}._readinessChipReady_1ldr9_742{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._readinessChipPending_1ldr9_748{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._primaryReadinessBlock_1ldr9_754{display:flex;flex-direction:column;gap:8px;width:100%}._criticSummary_1ldr9_761{display:flex;flex-direction:column;gap:3px;margin:0;padding:8px 10px;border-left:2px solid var(--accent);background:var(--accent-dim);color:var(--text-secondary);font-size:12px;line-height:1.45}._criticSummary_1ldr9_761>span{color:var(--text-primary);font-size:11px;font-weight:600}._analysisReportTarget_1ldr9_780{overflow:hidden;color:var(--text-primary);font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}._analysisReportIssue_1ldr9_789{color:var(--text-secondary);font-size:12px;line-height:1.35}._analysisReportCoverage_1ldr9_795{color:var(--text-muted);font-size:12px;line-height:1.4}._coverageChips_1ldr9_801{display:flex;flex-wrap:wrap;gap:5px}._coverageChip_1ldr9_801{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:5px;background:var(--bg-card);color:var(--text-muted);font-family:var(--font-label);font-size:11px;font-weight:500;cursor:default}._coverageChip_completed_1ldr9_822{border-color:var(--success-border);color:var(--success-text)}._coverageChip_failed_1ldr9_827{border-color:var(--error-border);color:var(--error-text)}._coverageChip_skipped_1ldr9_832,._coverageChip_not_requested_1ldr9_833{border-color:var(--warning-border);color:var(--warning-text)}._analysisReportMeta_1ldr9_838{margin-top:auto;color:var(--text-muted);font-size:11px;line-height:1.35}._analysisChildList_1ldr9_845{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding:8px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._analysisChildRow_1ldr9_856{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:6px;background:var(--bg-card);color:var(--text-primary);cursor:pointer;text-align:left;font:inherit;transition:border-color var(--transition),background var(--transition)}._analysisChildRow_1ldr9_856:hover{border-color:var(--accent);background:var(--accent-dim)}._analysisChildPath_1ldr9_877{overflow:hidden;color:var(--text-primary);font-family:var(--font-code);font-size:11px;text-overflow:ellipsis;white-space:nowrap}._analysisChildSummary_1ldr9_886,._analysisChildDetailHint_1ldr9_887{color:var(--text-secondary);font-size:11px}._analysisChildDetailHint_1ldr9_887{color:var(--text-muted)}._drawerAnalysisSummary_1ldr9_896{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-secondary)}._drawerAnalysisSummaryItem_1ldr9_907{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._drawerAnalysisLabel_1ldr9_914{min-width:64px;color:var(--text-muted);font-size:12px}._drawerAnalysisCounts_1ldr9_920,._drawerAnalysisValue_1ldr9_921{color:var(--text-secondary);font-size:12px}._recentCapturesSection_1ldr9_926{margin-top:28px}._recentCapturesHeader_1ldr9_619{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._drawerPrimaryActions_1ldr9_938{display:flex;align-items:center;gap:8px;min-width:0}._drawerActionBtn_1ldr9_945{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 14px;border-radius:7px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerActionBtn_1ldr9_945:hover:not(:disabled){border-color:var(--accent);background:var(--accent-dim)}._drawerActionBtn_1ldr9_945:disabled{opacity:.45;cursor:not-allowed}._drawerMoreMenu_1ldr9_974{position:relative;flex:0 0 auto}._drawerMoreButton_1ldr9_979{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:7px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);cursor:pointer;list-style:none;transition:border-color var(--transition),background var(--transition),color var(--transition)}._drawerMoreButton_1ldr9_979:hover{border-color:var(--accent);background:var(--accent-dim);color:var(--text-primary)}._drawerMoreButton_1ldr9_979::-webkit-details-marker{display:none}._drawerMoreMenuBody_1ldr9_1004{position:absolute;top:calc(100% + 6px);right:0;z-index:2;min-width:180px;padding:6px;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);box-shadow:0 8px 24px #0000002e}._drawerMenuItem_1ldr9_1017{display:block;width:100%;padding:8px 10px;border:0;border-radius:5px;background:transparent;color:var(--text-primary);text-align:left;font-family:var(--font-label);font-size:12px;cursor:pointer}._drawerMenuItem_1ldr9_1017:hover:not(:disabled){background:var(--bg-secondary)}._drawerMenuItem_1ldr9_1017:disabled{opacity:.45;cursor:not-allowed}._drawerMenuItemDanger_1ldr9_1040{color:var(--danger-text)}._drawerMenuItemDanger_1ldr9_1040:hover:not(:disabled){background:var(--danger-hover-bg)}._actionErrMsg_1ldr9_1049{font-size:12px;color:var(--error-text);padding:6px 10px;background:#e0555514;border-radius:4px;margin-top:10px}._actionStatusMsg_1ldr9_1058{display:inline-flex;flex-direction:column;align-items:flex-start;max-width:100%;font-size:12px;padding:7px 10px;border:1px solid transparent;border-radius:7px;margin-top:0;margin-bottom:10px;line-height:1.45}._actionStatus_info_1ldr9_1072{color:var(--text-secondary);background:var(--bg-secondary);border-color:var(--border)}._actionStatus_success_1ldr9_1078{color:var(--success-text);background:var(--success-bg);border-color:var(--success-border)}._actionStatus_warning_1ldr9_1084{color:var(--warning-text);background:var(--warning-bg);border-color:var(--warning-border)}._actionStatusDetail_1ldr9_1090{margin-top:2px;color:var(--text-muted)}._galleryHeader_1ldr9_1096{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}._galleryHeader_1ldr9_1096 h2{margin:0;color:var(--text-primary);font-size:var(--type-surface-title-size);font-weight:600;line-height:var(--leading-title)}._cardChecked_1ldr9_1113{border-color:var(--accent)!important;box-shadow:0 0 0 2px var(--accent);background:var(--accent-dim)}._cardCheckbox_1ldr9_1120{position:absolute;top:8px;left:8px;opacity:0;z-index:2;transition:opacity var(--transition),background var(--transition),border-color var(--transition)}._card_1ldr9_16:hover ._cardCheckbox_1ldr9_1120,._card_1ldr9_16:focus-within ._cardCheckbox_1ldr9_1120,._cardChecked_1ldr9_1113 ._cardCheckbox_1ldr9_1120{opacity:1}._captureSelectionActions_1ldr9_1135{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}._selectionToolbar_1ldr9_1144,._selectionBar_1ldr9_1145{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 12px;padding:12px 16px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius)}._selectionToolbar_1ldr9_1144{position:sticky;top:0;z-index:8;justify-content:space-between}._selectionToolbarCount_1ldr9_1164{color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._selectionToolbarActions_1ldr9_1171{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._selectionBarBtn_1ldr9_1178{padding:6px 14px;border-radius:var(--radius-control);border:1px solid var(--border);background:var(--bg-card);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),opacity var(--transition)}._selectionBarBtn_1ldr9_1178:hover:not(:disabled){border-color:var(--accent)}._selectionBarBtn_1ldr9_1178:focus-visible{outline:none;box-shadow:var(--focus-ring)}._selectionBarBtn_1ldr9_1178:disabled{opacity:.45;cursor:not-allowed}._selectionBarBtnDanger_1ldr9_1204{border-color:var(--danger-border);background:var(--danger-bg);color:var(--danger-text)}._selectionBarBtnDanger_1ldr9_1204:hover:not(:disabled){border-color:var(--danger);background:var(--danger-hover-bg)}@media(max-width:768px){._drawer_1ldr9_127{padding:0}._drawerToolbar_1ldr9_144{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:10px;padding:12px}._drawerToolbarActions_1ldr9_181{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}._drawerActionBtn_1ldr9_945{padding:7px 10px}._detailBody_1ldr9_210{padding:14px}}._emptyState_13gyl_1{display:flex;flex-direction:column;gap:var(--space-section);padding:20px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-card)}._header_13gyl_11,._method_13gyl_12{display:flex;flex-direction:column;gap:var(--space-related)}._header_13gyl_11 h3,._header_13gyl_11 p,._method_13gyl_12 h4{margin:0}._header_13gyl_11 h3{color:var(--text-primary);font-family:var(--font-label);font-size:var(--type-section-title-size);font-weight:600}._header_13gyl_11 p{color:var(--text-secondary);font-size:var(--type-body-size);line-height:var(--leading-body)}._method_13gyl_12{padding:14px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary)}._methodTitle_13gyl_44{display:flex;align-items:center;gap:var(--space-related);color:var(--text-primary)}._methodTitle_13gyl_44 h4{font-family:var(--font-label);font-size:var(--type-card-title-size);font-weight:600}._moreExamples_13gyl_57{color:var(--text-secondary);font-size:var(--type-body-size)}._moreExamples_13gyl_57 summary{width:fit-content;min-height:34px;color:var(--accent-hover);font-weight:600;line-height:34px;cursor:pointer}._moreExamples_13gyl_57[open] summary{margin-bottom:var(--space-related)}._moreExamples_13gyl_57 summary:focus-visible{outline:none;box-shadow:var(--focus-ring)}._filterBar_1203k_4{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;margin-bottom:8px;border-bottom:1px solid var(--border)}._filterGroup_1203k_14{display:flex;align-items:center;gap:8px;flex-wrap:wrap}._filterLabel_1203k_21{font-size:12px;color:var(--text-muted);font-weight:500;white-space:nowrap}._filterCheckbox_1203k_28{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--text-secondary);cursor:pointer;-webkit-user-select:none;user-select:none}._filterCheckbox_1203k_28 input[type=checkbox]{width:14px;height:14px;cursor:pointer;accent-color:var(--accent)}._segmentGroup_1203k_45{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--border);border-radius:7px;background:var(--bg-secondary)}._segmentBtn_1203k_55{min-height:26px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;white-space:nowrap;transition:background var(--transition),color var(--transition)}._segmentBtn_1203k_55:hover{color:var(--text-primary)}._segmentBtnActive_1203k_73{background:var(--bg-card);color:var(--text-primary);box-shadow:0 0 0 1px var(--border)}._filterInput_1203k_79{font-size:12px;padding:4px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg-secondary);color:var(--text-primary);font-family:inherit;width:130px}._filterInput_1203k_79:focus{outline:none;border-color:var(--accent)}._filterResetBtn_1203k_95{min-height:30px;padding:0 12px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card);color:var(--text-secondary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),color var(--transition)}._filterResetBtn_1203k_95:hover{border-color:var(--accent);color:var(--text-primary)}._requestRow_1203k_114{border:1px solid var(--border);border-radius:var(--radius);margin-bottom:8px;background:var(--bg-card);overflow:hidden;transition:border-color var(--transition)}._requestRow_1203k_114:hover{border-color:var(--accent)}._requestRowMain_1203k_127{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}._requestDetailToggle_1203k_134{flex:1;min-width:0;display:flex;align-items:flex-start;gap:12px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}._requestDetailToggle_1203k_134:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}._thumbPair_1203k_156{display:flex;align-items:center;gap:4px;flex-shrink:0;position:relative}._thumbPairButton_1203k_164{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;border-radius:6px}._thumbPairButton_1203k_164:focus-visible{outline:2px solid var(--accent);outline-offset:3px}._thumbPairButton_1203k_164:hover ._thumbSlot_1203k_179{border-color:var(--accent)}._thumbPairButton_1203k_164:disabled{cursor:not-allowed;opacity:.72}._thumbPairButton_1203k_164:disabled:hover ._thumbSlot_1203k_179{border-color:var(--border)}._thumbSlot_1203k_179{width:72px;height:48px;border:1px solid var(--border);border-radius:4px;overflow:hidden;background:var(--bg-secondary);display:flex;align-items:center;justify-content:center}._thumbImg_1203k_204{width:100%;height:100%;object-fit:cover;display:block}._thumbPlaceholder_1203k_211{font-size:10px;color:var(--text-muted);text-align:center;padding:4px;line-height:1.3}._thumbArrow_1203k_219{font-size:12px;color:var(--text-muted);flex-shrink:0}._extraPathsBadge_1203k_225{position:absolute;bottom:0;right:0;background:var(--accent);color:#fff;font-size:10px;font-weight:700;padding:1px 4px;border-radius:3px;line-height:1.4}._requestMeta_1203k_239{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}._requestLabel_1203k_247{font-size:13px;font-weight:500;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._requestTime_1203k_256{font-size:11px;color:var(--text-muted)}._requestStats_1203k_261{font-size:12px;color:var(--text-secondary);display:flex;gap:4px;flex-wrap:wrap}._statDot_1203k_269{color:var(--text-muted)}._summaryPill_1203k_273{color:var(--text-secondary)}._requestReadiness_1203k_277{display:flex;flex-wrap:wrap;gap:5px}._requestReadinessPill_1203k_283{display:inline-flex;align-items:center;min-height:20px;padding:1px 6px;border:1px solid var(--border);border-radius:var(--radius-control);background:var(--bg-secondary);color:var(--text-secondary);font-size:11px;font-weight:600;line-height:1.35}._requestReadinessReady_1203k_297{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}._requestReadinessPending_1203k_303{border-color:var(--warning-border);background:var(--warning-bg);color:var(--warning-text)}._requestActions_1203k_310{display:flex;flex-direction:column;gap:6px;flex-shrink:0}._expandHint_1203k_317{padding:5px 10px;border-radius:5px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-secondary);font-family:var(--font-label);font-size:11px;white-space:nowrap;-webkit-user-select:none;user-select:none}._mutationsArea_1203k_330{border-top:1px solid var(--border);background:var(--bg-secondary);padding:8px 14px;display:flex;flex-direction:column;gap:4px}._mutLoading_1203k_339,._mutEmpty_1203k_340{font-size:12px;color:var(--text-muted);padding:4px 0}._mutError_1203k_346{font-size:12px;color:var(--error-text);padding:4px 0}._mutationRow_1203k_352{font-size:12px;padding:6px 0;border-bottom:1px solid var(--border)}._mutationRow_1203k_352:last-child{border-bottom:none}._mutationLine_1203k_362{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}._mutTs_1203k_369{color:var(--text-muted);flex-shrink:0;font-size:11px}._mutCommand_1203k_375{color:var(--accent);font-weight:500;flex-shrink:0}._mutPath_1203k_381{font-family:monospace;font-size:11px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}._mutDiff_1203k_391{color:var(--text-muted);font-size:11px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._mutErr_1203k_346{color:var(--error-text);font-size:11px}._changeDetails_1203k_406{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding-left:88px}._changeDetailRow_1203k_414{display:grid;grid-template-columns:72px minmax(96px,180px) minmax(0,1fr) 14px minmax(0,1fr);align-items:start;gap:8px;min-height:24px;font-size:11px}._changeDetailRowNoBefore_1203k_423{grid-template-columns:72px minmax(96px,180px) 14px minmax(0,1fr)}._changeDetailBadge_1203k_427{justify-self:start;padding:2px 6px;border-radius:4px;border:1px solid var(--border);background:var(--bg-card);color:var(--text-secondary);font-weight:600;line-height:1.4;white-space:nowrap}._changeDetail_text_1203k_444{color:#2563eb;border-color:#2563eb47}._changeDetail_color_1203k_449{color:#b45309;border-color:#b4530947}._changeDetail_size_1203k_454{color:#047857;border-color:#04785747}._changeDetail_layout_1203k_459{color:#7c3aed;border-color:#7c3aed47}._changeDetail_state_1203k_464{color:#be123c;border-color:#be123c47}._changeDetail_asset_1203k_469{color:#0369a1;border-color:#0369a147}._changeDetail_property_1203k_474{color:var(--text-secondary)}._changeDetailProperty_1203k_478{font-family:var(--font-code);color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._changeDetailArrow_1203k_486{color:var(--text-muted);text-align:center;line-height:1.6}._changeDetailOldValue_1203k_492,._changeDetailNewValue_1203k_493{font-family:var(--font-code);overflow-wrap:anywhere;word-break:break-word;line-height:1.6}._changeDetailOldValue_1203k_492{color:var(--error-text);text-decoration:line-through;text-decoration-thickness:1px}._changeDetailNewValue_1203k_493{color:var(--success-text)}._compareDialogLayer_1203k_511{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;overflow:auto}._compareDialog_1203k_511{width:100%;height:100%;min-height:0;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;box-shadow:0 24px 60px #0000006b;outline:none;overflow:hidden}._beforeAfterDrawer_1203k_542{width:100%;height:100%;min-height:0;background:var(--bg-card);display:flex;flex-direction:column;overflow:hidden}._drawerHeader_1203k_552{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);flex-shrink:0}._drawerTitle_1203k_561{margin:0;font-size:var(--type-section-title-size);font-weight:600;line-height:var(--leading-title);color:var(--text-primary)}._drawerCloseBtn_1203k_569{padding:5px 12px;border-radius:5px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);font-size:12px;cursor:pointer;transition:border-color var(--transition)}._drawerCloseBtn_1203k_569:hover{border-color:var(--accent);color:var(--text-primary)}._drawerBody_1203k_585{padding:20px;color:var(--text-muted);font-size:13px}._pathTabs_1203k_592{display:flex;gap:2px;border-bottom:1px solid var(--border);padding:0 20px;flex-shrink:0;overflow-x:auto}._pathTab_1203k_592{font-family:var(--font-label);font-size:12px;padding:8px 14px;background:none;border:none;border-bottom:2px solid transparent;color:var(--text-secondary);cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;transition:color var(--transition),border-color var(--transition)}._pathTab_1203k_592:hover{color:var(--text-primary)}._pathTabActive_1203k_621{color:var(--accent);border-bottom-color:var(--accent)}._comparePanel_1203k_627{display:grid;grid-template-columns:1fr 1fr;gap:1px;flex:1;min-height:0;background:var(--border);overflow:auto}._compareHalf_1203k_637{background:var(--bg-card);display:flex;flex-direction:column;min-height:0}._compareLabel_1203k_644{font-size:11px;font-weight:600;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase;padding:8px 12px;border-bottom:1px solid var(--border);flex-shrink:0}._compareImg_1203k_655{width:100%;flex:1;object-fit:contain;background:var(--bg-secondary);display:block}._comparePlaceholder_1203k_663{flex:1;display:flex;align-items:center;justify-content:center;font-size:13px;color:var(--text-muted);background:var(--bg-secondary);padding:24px;text-align:center}._compareDetailsPanel_1203k_675{flex-shrink:0;max-height:min(34%,260px);overflow:auto;padding:12px 20px 14px;border-top:1px solid var(--border);background:var(--bg-secondary)}._compareDetailsHeader_1203k_684{margin-bottom:8px;color:var(--text-primary);font-family:var(--font-label);font-size:12px;font-weight:600}._compareDetailsPanel_1203k_675 ._changeDetails_1203k_406{padding-left:0}._compareDetailsPanel_1203k_675 ._mutPath_1203k_381,._compareDetailsPanel_1203k_675 ._mutDiff_1203k_391{max-width:none}._drawerFooter_1203k_702{display:flex;justify-content:flex-end;padding:12px 20px;border-top:1px solid var(--border);flex-shrink:0}._drawerActionBtn_1203k_710{padding:7px 16px;border-radius:6px;border:1px solid var(--border);background:var(--bg-secondary);color:var(--text-primary);font-family:var(--font-label);font-size:12px;cursor:pointer;transition:border-color var(--transition),background var(--transition)}._drawerActionBtn_1203k_710:hover{border-color:var(--accent);background:var(--accent-dim)}._historyTabWrap_1203k_728{display:flex;flex-direction:column;gap:0}._historyWorkspace_1203k_734{width:100%;position:relative}._historyMainColumn_1203k_739{min-width:0}._requestList_1203k_743{display:flex;flex-direction:column}._emptyHistory_1203k_748{display:flex;flex-direction:column;gap:var(--space-related);text-align:center;padding:48px 20px;color:var(--text-muted);font-size:14px}._historyError_1203k_758{padding:16px 0;color:var(--error-text);font-size:13px}._historyLoading_1203k_764{padding:48px 20px;text-align:center;color:var(--text-muted);font-size:13px}._listHeader_1203k_772{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px}._listHeaderTitle_1203k_781{font-size:14px;font-weight:600;color:var(--text-primary);margin:0}._clearBtn_1203k_788{padding:6px 12px;border:1px solid var(--danger-border);border-radius:var(--radius-control);background:var(--danger-bg);color:var(--danger-text);font-family:var(--font-label);font-size:12px;font-weight:500;cursor:pointer;transition:background var(--transition),border-color var(--transition)}._clearBtn_1203k_788:hover{background:var(--danger-hover-bg);border-color:var(--danger)}._clearBtn_1203k_788:focus-visible{outline:none;box-shadow:var(--focus-ring)}._deleteErrBanner_1203k_812{padding:8px 12px;margin-bottom:8px;border-radius:var(--radius);background:var(--error-bg, rgba(224, 85, 85, .12));border:1px solid var(--error-border, rgba(224, 85, 85, .4));color:var(--error-text);font-size:13px}@media(max-width:1120px){._compareDialogLayer_1203k_511{left:calc(var(--sidebar-width) + 16px);right:16px;bottom:16px;padding:12px}}@media(max-width:768px){._compareDialogLayer_1203k_511{top:calc(var(--header-height) + 10px);right:10px;bottom:10px;left:calc(var(--sidebar-collapsed) + 10px);padding:8px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as j,j as e,L as f,H as k,r as g,J as x}from"./index-UFZ5peom.js";import{P as z}from"./PageHeader-DCh0GrcW.js";import{P as C}from"./PlaytestAiPromptExamples-Cv4yOTd0.js";import"./AiPromptExamples-DniGyTTn.js";import"./copy-DGkh5PJA.js";const P="_card_15ozw_2",v="_cardUnread_15ozw_15",R="_cardRead_15ozw_20",T="_cardUnreadWarning_15ozw_25",A="_topRow_15ozw_32",I="_categoryChip_15ozw_39",L="_versionChip_15ozw_52",B="_importantBadge_15ozw_64",U="_date_15ozw_77",b="_title_15ozw_85",E="_body_15ozw_94",S="_aiPrompt_15ozw_102",W="_aiPromptIntro_15ozw_112",$="_linkList_15ozw_125",M="_link_15ozw_125",H="_internalLink_15ozw_147",O="_newBadge_15ozw_169",t={card:P,cardUnread:v,cardRead:R,cardUnreadWarning:T,topRow:A,categoryChip:I,versionChip:L,importantBadge:B,date:U,title:b,body:E,aiPrompt:S,aiPromptIntro:W,linkList:$,link:M,internalLink:H,newBadge:O},Y={release:"whatsNew.category.release",notice:"whatsNew.category.notice",deprecation:"whatsNew.category.deprecation",tip:"whatsNew.category.tip"};function u({announcement:s,isNew:i}){var a;const{locale:c,t:n}=j(),d=i?t.cardUnread:t.cardRead,l=s.severity==="warning",p=l&&i?t.cardUnreadWarning:"",w=s.title[c]??s.title.en,N=s.body[c]??s.body.en,h=s.links??(s.link?[s.link]:[]),_=r=>typeof r=="string"?r:r[c]??r.en;return e.jsxs("div",{className:`${t.card} ${d} ${p}`,children:[e.jsxs("div",{className:t.topRow,children:[e.jsx("span",{className:t.categoryChip,children:n(Y[s.category])}),l&&e.jsx("span",{className:t.importantBadge,children:n("whatsNew.importantBadge","IMPORTANT")}),s.version&&e.jsx("span",{className:t.versionChip,children:s.version}),i&&e.jsx("span",{className:t.newBadge,children:n("whatsNew.newBadge","NEW")}),e.jsx("span",{className:t.date,children:s.date})]}),e.jsx("h3",{className:t.title,children:w}),e.jsx("p",{className:t.body,children:N}),((a=s.aiPrompt)==null?void 0:a.kind)==="playtest-values"&&e.jsxs("div",{className:t.aiPrompt,children:[e.jsxs("div",{className:t.aiPromptIntro,children:[e.jsx("strong",{children:n("playtest.emptyValues.aiTitle","Ask AI")}),e.jsx("span",{children:n("playtest.emptyValues.aiDescription","Copy a request and paste it into an AI chat connected to WEPPY.")})]}),e.jsx(C,{exampleIds:[s.aiPrompt.exampleId]})]}),h.length>0&&e.jsx("div",{className:t.linkList,children:h.map(r=>{const m=_(r.url),y=_(r.label);return m.startsWith("/")?e.jsx(f,{className:`${t.link} ${t.internalLink}`,to:m,children:y},m):e.jsxs("a",{className:t.link,href:m,target:"_blank",rel:"noopener noreferrer",children:["↗"," ",y]},m)})})]})}const V="_page_4653w_2",q="_section_4653w_10",D="_sectionTitle_4653w_16",G="_unreadCount_4653w_28",J="_empty_4653w_43",K="_divider_4653w_51",o={page:V,section:q,sectionTitle:D,unreadCount:G,empty:J,divider:K};function se(){const{t:s}=j(),{readSet:i,markRead:c}=k(),n=g.useMemo(()=>{const a=[];for(const r of x)i.has(r.id)||a.push(r.id);return a},[]),d=g.useRef(n);d.current=n,g.useEffect(()=>()=>{d.current.length>0&&c(d.current)},[]);const l=g.useMemo(()=>new Set(n),[n]),p=x.filter(a=>l.has(a.id)),w=x.filter(a=>!l.has(a.id)),N=p.length>0,h=w.length>0,_=e.jsx(z,{title:s("whatsNew.pageTitle","What's New"),description:s("whatsNew.pageSubtitle","Stay up to date with MCP changes"),helpTopicId:"whatsNew"});return x.length===0?e.jsxs("div",{className:o.page,children:[_,e.jsx("p",{className:o.empty,children:s("whatsNew.empty","No announcements yet")})]}):e.jsxs("div",{className:o.page,children:[_,N&&e.jsxs("section",{className:o.section,children:[e.jsxs("h2",{className:o.sectionTitle,children:[s("whatsNew.unreadSection","Unread"),e.jsx("span",{className:o.unreadCount,children:p.length})]}),p.map(a=>e.jsx(u,{announcement:a,isNew:!0},`unread-${a.id}`))]}),N&&h&&e.jsx("hr",{className:o.divider}),h&&e.jsxs("section",{className:o.section,children:[e.jsx("h2",{className:o.sectionTitle,children:s("whatsNew.allSection","All Announcements")}),w.map(a=>e.jsx(u,{announcement:a,isNew:!1},`all-${a.id}`))]})]})}export{se as Component};
|