@petercjl/omni-desktop-app 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/app/assets/CartesianChart-BLyO9U-C.js +33 -0
  2. package/app/assets/EmptyState-Cgx7dIy3.js +1 -0
  3. package/app/assets/EvidenceSourceGuide-BqwES_45.js +1 -0
  4. package/app/assets/Favorites-JpOkiZFS.js +1 -0
  5. package/app/assets/{help-tip--AXHiRI4.css → HelpTip-BsHPhMNf.css} +1 -1
  6. package/app/assets/{help-tip-MKEk0q51.js → HelpTip-DgowTr-K.js} +1 -1
  7. package/app/assets/LineChart-BOoSfV72.js +4 -0
  8. package/app/assets/ShopLayoutPage-BPjWnPjn.css +1 -0
  9. package/app/assets/ShopLayoutPage-xv0PhUXv.js +1 -0
  10. package/app/assets/TrendChart-ozEGn1ai.js +1 -0
  11. package/app/assets/activity-BV0UMcx6.js +1 -0
  12. package/app/assets/api-DTsZ_OeY.js +1 -0
  13. package/app/assets/arrow-right-DMEu-HBO.js +1 -0
  14. package/app/assets/arrow-up-right-Bi_SzYu1.js +1 -0
  15. package/app/assets/chart-column-x5fvXs9m.js +1 -0
  16. package/app/assets/check-qCcwSYDE.js +1 -0
  17. package/app/assets/chevron-down-p3oUrcsv.js +1 -0
  18. package/app/assets/chevron-right-DqmFJybY.js +1 -0
  19. package/app/assets/clock-3-BThph9Fd.js +1 -0
  20. package/app/assets/components-BVWswT0B.js +2 -0
  21. package/app/assets/create-intent-9uYVhJHt.js +1 -0
  22. package/app/assets/create-intent-ZWl5yZd5.css +1 -0
  23. package/app/assets/demand-planning-client-DVOcsKAy.css +1 -0
  24. package/app/assets/demand-planning-client-cRvN3aET.js +130 -0
  25. package/app/assets/download-DYUXwy45.js +1 -0
  26. package/app/assets/entry-BXB2Nzyc.js +2 -0
  27. package/app/assets/entry-BxaHKvMx.js +2 -0
  28. package/app/assets/entry-C3TFTQrn.js +1 -0
  29. package/app/assets/entry-C_j4PEhB.css +1 -0
  30. package/app/assets/entry-Crfux-R-.js +1 -0
  31. package/app/assets/entry-DHP4cb-p.css +1 -0
  32. package/app/assets/entry-DQpz8kvM.js +58 -0
  33. package/app/assets/entry-OPB3MGoc.css +1 -0
  34. package/app/assets/entry-WYptT5dv.js +2 -0
  35. package/app/assets/file-text-BE0hF4rH.js +1 -0
  36. package/app/assets/flag-DspBXBR4.js +1 -0
  37. package/app/assets/format-BCxMsVJh.js +1 -0
  38. package/app/assets/git-branch-BAJikW8Q.js +1 -0
  39. package/app/assets/graphicalItemSelectors-DGWLDzMl.js +1 -0
  40. package/app/assets/grid-2x2-lULFcGs7.js +1 -0
  41. package/app/assets/group-eZxxe_Hb.js +1 -0
  42. package/app/assets/index-7NKGenq7.css +1 -0
  43. package/app/assets/{index-kh1Fd-ff.js → index-Cez2mr3h.js} +5 -5
  44. package/app/assets/layers-shcwXKIH.js +1 -0
  45. package/app/assets/link-2-BlbKNthn.js +1 -0
  46. package/app/assets/list-CrDQ8uHL.js +1 -0
  47. package/app/assets/market-B2oImfqS.css +1 -0
  48. package/app/assets/market.module-vHIsXpQH.js +1 -0
  49. package/app/assets/module-host-CyMfvPpR.js +1 -0
  50. package/app/assets/pin-C4E_u351.js +1 -0
  51. package/app/assets/play-D07b6r1X.js +1 -0
  52. package/app/assets/plus-iTTlNMxD.js +1 -0
  53. package/app/assets/products-BTd3YVqO.css +1 -0
  54. package/app/assets/products-fIIO39ry.js +1 -0
  55. package/app/assets/project-airtight-canisters-LLndxxjI.jpg +0 -0
  56. package/app/assets/project-collaboration-travel-bag-BB2ARGd7.jpg +0 -0
  57. package/app/assets/project-cutting-board-CeIWMQLS.jpg +0 -0
  58. package/app/assets/project-desktop-cable-clips-DdPGOqI8.jpg +0 -0
  59. package/app/assets/project-double-11-thermos-D7tzhW-B.jpg +0 -0
  60. package/app/assets/project-drinking-glass-D8H-30yp.jpg +0 -0
  61. package/app/assets/project-execution-DMEIpSz3.js +1 -0
  62. package/app/assets/project-foldable-storage-crate-DlZP-j-z.jpg +0 -0
  63. package/app/assets/project-microfiber-cloths-Dda9f7He.jpg +0 -0
  64. package/app/assets/project-portable-blender-CLylHN-m.jpg +0 -0
  65. package/app/assets/project-public-4Gjaxeyh.js +1 -0
  66. package/app/assets/project-public-DCJ5Ry0f.js +4 -0
  67. package/app/assets/project-public-IxjCdnaB.css +1 -0
  68. package/app/assets/project-public-tKjd5rma.js +1 -0
  69. package/app/assets/project-scented-candle-CDVqTvgw.jpg +0 -0
  70. package/app/assets/project-silicone-baking-mat-DUDDE63y.jpg +0 -0
  71. package/app/assets/project-tissue-box-DkxE74G5.jpg +0 -0
  72. package/app/assets/project-travel-bag-DWCGqkcM.png +0 -0
  73. package/app/assets/project-travel-bottles-CgRJiJGs.jpg +0 -0
  74. package/app/assets/project-tumbler-D2BmTnok.png +0 -0
  75. package/app/assets/public-BlU5YmdO.js +1 -0
  76. package/app/assets/refresh-cw-C_4G0Mri.js +1 -0
  77. package/app/assets/search-CUzSX_06.js +1 -0
  78. package/app/assets/ui-public-9lmhhAop.js +1 -0
  79. package/app/assets/use-favorites-BOjIArhk.js +1 -0
  80. package/app/assets/use-favorites-_eKBQGeF.css +1 -0
  81. package/app/assets/use-workspace-query-C-vrOrvK.js +1 -0
  82. package/app/assets/workbench-13XxpUuA.css +1 -0
  83. package/app/assets/workbench-BMO5cSO0.js +2 -0
  84. package/app/assets/workspace-view-state-CRfq5jgZ.js +1 -0
  85. package/app/index.html +2 -2
  86. package/package.json +1 -1
  87. package/release.json +1 -1
  88. package/release.sig +1 -1
  89. package/app/assets/LineChart-DbDnbu8P.js +0 -33
  90. package/app/assets/index-T3G-cOmt.css +0 -1
  91. package/app/assets/page-B9m8x7qr.js +0 -1
  92. package/app/assets/page-BQG8B27I.js +0 -135
  93. package/app/assets/page-ClE1ActL.css +0 -1
  94. package/app/assets/page-E8U5s4LO.css +0 -1
  95. package/app/assets/page-LYbG9XZe.css +0 -1
  96. package/app/assets/page-X3I2H98K.js +0 -1
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ShopLayoutPage-xv0PhUXv.js","./index-Cez2mr3h.js","./index-7NKGenq7.css","./CartesianChart-BLyO9U-C.js","./LineChart-BOoSfV72.js","./check-qCcwSYDE.js","./arrow-right-DMEu-HBO.js","./link-2-BlbKNthn.js","./chevron-right-DqmFJybY.js","./clock-3-BThph9Fd.js","./grid-2x2-lULFcGs7.js","./list-CrDQ8uHL.js","./plus-iTTlNMxD.js","./refresh-cw-C_4G0Mri.js","./search-CUzSX_06.js","./graphicalItemSelectors-DGWLDzMl.js","./api-DTsZ_OeY.js","./use-favorites-BOjIArhk.js","./public-BlU5YmdO.js","./workspace-view-state-CRfq5jgZ.js","./use-favorites-_eKBQGeF.css","./format-BCxMsVJh.js","./ShopLayoutPage-BPjWnPjn.css","./Favorites-JpOkiZFS.js","./components-BVWswT0B.js","./chevron-down-p3oUrcsv.js","./market.module-vHIsXpQH.js","./market-B2oImfqS.css"])))=>i.map(i=>d[i]);
2
+ import{n as e,t}from"./link-2-BlbKNthn.js";import{t as n}from"./chevron-right-DqmFJybY.js";import{t as r}from"./grid-2x2-lULFcGs7.js";import{t as i}from"./list-CrDQ8uHL.js";import{a,c as o,i as s,l as c,n as ee,o as l,r as u,s as te,t as ne,u as re}from"./components-BVWswT0B.js";import{t as ie}from"./search-CUzSX_06.js";import{a as d,c as ae,g as f,p,t as m,u as h}from"./index-Cez2mr3h.js";import{n as g}from"./workspace-view-state-CRfq5jgZ.js";import"./public-BlU5YmdO.js";import{n as _,t as v}from"./api-DTsZ_OeY.js";import{a as oe,i as y,n as b,o as se,r as ce,t as le}from"./format-BCxMsVJh.js";import{t as x}from"./market.module-vHIsXpQH.js";var ue=h(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),de=h(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),S=f(p(),1),C=d();function fe({query:e,month:t,available:n,children:r}){let i=(0,S.useRef)(null),[a,o]=(0,S.useState)(!1),[s,c]=(0,S.useState)(null),[ee,l]=(0,S.useState)(``),[u,te]=(0,S.useState)(0);return(0,S.useEffect)(()=>{if(!i.current||!n)return;let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(o(!0),e.disconnect())},{rootMargin:`180px`});return e.observe(i.current),()=>e.disconnect()},[n]),(0,S.useEffect)(()=>{if(!a||!n)return;let r=new AbortController;return v.query({...e,recentYear:!1,month:t,page:1,pageSize:100},r.signal).then(n=>{r.signal.aborted||(l(``),c({month:t,status:n.availability?.[e.view===`shops`?`shops`:`products`]||`ready`,rows:n.rows,total:n.total}))}).catch(e=>{r.signal.aborted||(c(null),l(e instanceof Error?e.message:`本月榜单读取失败`))}),()=>r.abort()},[n,a,e,t,u]),(0,C.jsxs)(`article`,{ref:i,children:[(0,C.jsxs)(`h2`,{children:[t.replace(`-`,`年`),`月`]}),n?ee?(0,C.jsxs)(`div`,{role:`alert`,children:[ee,(0,C.jsx)(`button`,{onClick:()=>te(e=>e+1),children:`重试本月`})]}):s?r(s):(0,C.jsx)(`div`,{style:{minHeight:260},children:a?(0,C.jsx)(`p`,{role:`status`,children:`正在读取本月榜单…`}):(0,C.jsx)(`button`,{onClick:()=>o(!0),children:`加载本月榜单`})}):(0,C.jsx)(`p`,{children:`暂无该月来源数据`})]})}var w=e=>c.find(t=>t[0]===e)?.[1],pe=(e,t)=>b(e[t],c.find(e=>e[0]===t)?.[2]);function T({view:d,selection:f,onShopLayout:p}={}){let[m,h]=(0,S.useState)(null),[g,T]=(0,S.useState)(null),[E,D]=o(`query`,te),O=(0,S.useRef)(null),me=(0,S.useRef)(null);(0,S.useEffect)(()=>{let e=me.current;if(!e)return;let t=()=>O.current?.style.setProperty(`--market-controls-height`,`${e.getBoundingClientRect().height}px`),n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]),(0,S.useEffect)(()=>{m&&D(e=>{let t=f?.categoryId??e.categoryId,n=m.categories.some(e=>e.id===t&&e.leaf);return{...e,categoryId:t,view:d===`categories`?n?`products`:`categories`:d||e.view,page:1}})},[d,f,m,D]);let[k,A]=(0,S.useState)(!0),[he,j]=(0,S.useState)(``),[ge,_e]=(0,S.useState)(0),[ve,M]=(0,S.useState)(``),[N,ye]=o(`productFields`,ce),[be,xe]=o(`shopFields`,oe),[Se,P]=(0,S.useState)(!1),[F,Ce]=o(`grid`,!1),[I,L]=(0,S.useState)(E.minPrice),[R,z]=(0,S.useState)(E.maxPrice),[B,we]=(0,S.useState)([]),[Te,Ee]=(0,S.useState)(null),[V,H]=(0,S.useState)(null),[U,De]=(0,S.useState)(null),[Oe,ke]=(0,S.useState)(!1),[Ae,je]=(0,S.useState)(``),[Me,Ne]=(0,S.useState)([]),[Pe,Fe]=(0,S.useState)([]),Ie=(0,S.useRef)(null);function W(e){T(null),j(``),A(!0),D(t=>({...t,...e,page:e.page??1}))}function Le(e){let t=m?.categories.find(t=>t.id===e);L(``),z(``),W({categoryId:e,view:d&&d!==`categories`?E.view===`categories`?d:E.view:t?.leaf?`products`:`categories`,q:``,minPrice:``,maxPrice:``,sort:`sales`,direction:`desc`})}(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{if(await Promise.resolve(),!e.signal.aborted){A(!0),j(``),T(null),h(null);try{let t=await v.bootstrap(e.signal);if(e.signal.aborted)return;if(t.contractVersion!==1)throw Error(`市场查询契约版本不兼容`);h(t),we((t.favorites||[]).map(e=>`${e.kind}:${e.key}`)),D(e=>{let n=t.categories.some(t=>t.id===e.categoryId);return{...e,categoryId:n?e.categoryId:``,view:n||!e.categoryId?e.view:`categories`,month:t.months.includes(e.month)?e.month:t.latestCategoryMonth||t.latestMonth||``}})}catch(t){e.signal.aborted||j(t.message)}finally{e.signal.aborted||A(!1)}}})(),()=>e.abort()},[ge,D]),(0,S.useEffect)(()=>{if(!m||m.status!==`ready`||!E.month)return;let e=Ie.current;Ie.current=E;let t=e&&e.q!==E.q&&e.categoryId===E.categoryId&&e.view===E.view&&e.month===E.month?180:0,n=new AbortController,r=setTimeout(()=>{if(E.view!==`categories`&&!E.categoryId){A(!1),T(null);return}if(E.view!==`categories`&&E.recentYear){A(!1),T(null);return}A(!0),v.query(E,n.signal).then(e=>{n.signal.aborted||T(e)}).catch(e=>{n.signal.aborted||(T(null),j(e.message),e.status===403?(h(null),_e(e=>e+1)):e.status===401&&h(null))}).finally(()=>{n.signal.aborted||A(!1)})},t);return()=>{clearTimeout(r),n.abort()}},[E,m]),(0,S.useEffect)(()=>{if(!V)return;let e=new AbortController;return(async()=>{if(await Promise.resolve(),!e.signal.aborted){ke(!0),je(``),Ne([]),Fe([]),De(V.kind===`record`||V.kind===`shopCategories`?V.record:null);try{if(V.kind===`record`){let t=await v.record(V.record.key,e.signal);e.signal.aborted||De(t)}if(V.kind===`shopCategories`){let t=await v.shopCategories(V.record.key,e.signal);e.signal.aborted||Ne(t.rows)}if(V.kind===`distribution`){let t=await v.distribution(E,e.signal);e.signal.aborted||Ne(t.rows.map(e=>({name:e.label,sales:e.sales,products:e.products})))}if(V.kind===`categoryTrend`){let t=await v.query({...E,view:`categories`,categoryId:V.category.id},e.signal);e.signal.aborted||Fe(t.trend)}}catch(t){e.signal.aborted||je(t.message)}finally{e.signal.aborted||ke(!1)}}})(),()=>e.abort()},[V,E]);let Re=le(m?.categories||[],E.categoryId),ze=Re.at(-1),G=E.view===`categories`,K=E.view===`products`,q=m?.months.indexOf(E.month)??-1,J=K?N:be,Y=g?.rows||[],Be=g?.categories||[],Ve=E.metric===`units`?`units`:`sales`,X=g?.availability?.[K?`products`:`shops`],Z=Math.max(1,Math.ceil((g?.total||0)/E.pageSize)),He=E.month?new Date(Date.UTC(Number(E.month.slice(0,4)),Number(E.month.slice(5,7)),0)).toISOString().slice(0,10):``;async function Ue(e,t){if(Te)return;let n=`${e}:${t}`,r=!B.includes(n);Ee(n);try{await v.favorite(e,t,r),we(e=>r?[...e,n]:e.filter(e=>e!==n))}catch(e){M(e.message)}finally{Ee(null)}}function Q(e,t,n){return(0,C.jsx)(`button`,{className:x.iconButton,disabled:Te!==null,"aria-label":`收藏${n}`,"aria-pressed":B.includes(`${e}:${t}`),onClick:()=>void Ue(e,t),children:(0,C.jsx)(de,{size:14,fill:B.includes(`${e}:${t}`)?`currentColor`:`none`})})}function We(e){return(0,C.jsxs)(`span`,{className:x.productId,children:[e.id||`编号缺失`,e.id&&(0,C.jsx)(u,{text:e.id,label:`复制商品编号${e.id}`,title:`复制商品 ID`})]})}function Ge(e,n=!1){return(0,C.jsxs)(`div`,{className:x.identity,children:[y(e.imageUrl)?(0,C.jsx)(a,{src:y(e.imageUrl),name:e.name||`商品图片`}):(0,C.jsx)(`span`,{className:x.noImage,children:(0,C.jsx)(re,{size:20})}),(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`div`,{className:x.productTitleRow,children:[y(e.url)?(0,C.jsx)(`a`,{className:x.productTitle,href:y(e.url),target:`_blank`,rel:`noreferrer`,children:e.name||`资料缺失`}):(0,C.jsx)(`button`,{className:x.productTitle,onClick:()=>H({kind:`record`,record:e}),children:e.name||`资料缺失`}),y(e.url)&&(0,C.jsx)(u,{text:y(e.url),label:`复制商品链接${e.name||e.id||``}`,title:`复制商品链接`,children:(0,C.jsx)(t,{size:13})})]}),!n&&(0,C.jsxs)(`small`,{children:[`商品ID:`,We(e)]})]})]})}function $(e,t=!1){let n=t?e.shopUrl:e.url,r=t?e.shopName:e.name;return y(n)?(0,C.jsx)(`a`,{href:y(n),target:`_blank`,rel:`noreferrer`,children:r||`资料缺失`}):(0,C.jsx)(`span`,{children:r||`资料缺失`})}function Ke(e){return(0,C.jsx)(`th`,{children:(0,C.jsxs)(`button`,{onClick:()=>W({sort:e,direction:E.sort===e&&E.direction===`desc`?`asc`:`desc`}),children:[w(e),(0,C.jsx)(`span`,{className:E.sort===e?x.activeSort:x.sort,children:E.sort===e?E.direction===`desc`?`↓`:`↑`:`↕`})]})},e)}function qe(e,t){return(0,C.jsxs)(`td`,{className:t===`sales`?x.sales:void 0,children:[pe(e,t),t===`conversionRate`&&e[t]!=null&&(e[t]<0||e[t]>100)&&(0,C.jsxs)(`span`,{className:x.anomaly,title:`来源转化率异常,保留原值`,children:[` `,`!`]})]},t)}function Je(){if(I&&!/^\d{1,9}(\.\d{1,2})?$/.test(I)||R&&!/^\d{1,9}(\.\d{1,2})?$/.test(R)||I&&R&&Number(I)>Number(R)){M(`请填写有效的非负件单价区间`);return}M(``),W({minPrice:I,maxPrice:R})}return(0,C.jsxs)(`section`,{ref:O,className:x.page,"aria-label":`市场大盘`,children:[(0,C.jsxs)(`div`,{ref:me,className:x.stickyHeader,children:[(0,C.jsxs)(`header`,{className:x.breadcrumb,"aria-label":`页面路径`,children:[(0,C.jsx)(`button`,{onClick:()=>W({view:`categories`,categoryId:``,q:``,recentYear:!1}),children:`全部类目`}),Re.map(e=>(0,C.jsxs)(`span`,{children:[(0,C.jsx)(n,{size:13}),(0,C.jsx)(`button`,{onClick:()=>Le(e.id),children:e.name})]},e.id)),!G&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(n,{size:13}),(0,C.jsx)(`span`,{"aria-current":`page`,children:K?`商品排行榜`:`店铺排行榜`})]})]}),(0,C.jsxs)(`section`,{className:x.filterBar,"aria-label":`市场查询条件`,children:[(0,C.jsxs)(`div`,{className:x.categoryControl,children:[(0,C.jsx)(ne,{categories:m?.categories||[],favoriteIds:B.filter(e=>e.startsWith(`category:`)).map(e=>e.slice(9)),value:E.categoryId,onChoose:Le,disabled:!m?.categories.length}),G&&(0,C.jsxs)(`span`,{className:x.count,children:[ze?`子类目`:`类目`,` `,g?Be.length:`—`,` `,`个`]}),G&&(0,C.jsxs)(`div`,{className:x.categoryLegend,"aria-label":`类目类型颜色说明`,children:[(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`i`,{"data-leaf":`false`}),`有下级`]}),(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`i`,{"data-leaf":`true`}),`叶子类目`]})]}),!G&&(0,C.jsx)(`nav`,{className:x.tabs,role:`tablist`,"aria-label":`排行榜`,children:[[`products`,`商品排行榜`],[`shops`,`店铺排行榜`]].map(([e,t])=>(0,C.jsx)(`button`,{role:`tab`,"aria-selected":E.view===e,onClick:()=>W({view:e,q:``,sort:`sales`,direction:`desc`,minPrice:``,maxPrice:``}),children:t},e))})]}),(0,C.jsxs)(`div`,{className:x.dateControl,children:[(0,C.jsxs)(`span`,{className:x.period,children:[`统计时间:`,g?.period?.start||(E.month?E.month+`-01`:`—`),` `,`至 `,g?.period?.end||He||`—`]}),(0,C.jsx)(`button`,{className:x.yearButton,"aria-pressed":E.recentYear,disabled:!m?.months.length,onClick:()=>W({recentYear:!E.recentYear,q:``,sort:`sales`,direction:`desc`}),children:`最近1年`}),(0,C.jsxs)(`select`,{"aria-label":`统计月份`,value:E.month,disabled:!m?.months.length,onChange:e=>W({month:e.target.value,recentYear:!1}),children:[!m?.months.length&&(0,C.jsx)(`option`,{children:`等待可用月份`}),m?.months.map(e=>(0,C.jsxs)(`option`,{value:e,children:[e.replace(`-`,`年`),`月`]},e))]}),(0,C.jsx)(`button`,{"aria-label":`上一个可用月份`,disabled:q<=0||k,onClick:()=>W({month:m.months[q-1]}),children:(0,C.jsx)(e,{size:15})}),(0,C.jsx)(`button`,{"aria-label":`下一个可用月份`,disabled:!m||q>=m.months.length-1||k,onClick:()=>W({month:m.months[q+1]}),children:(0,C.jsx)(n,{size:15})}),G&&(0,C.jsx)(`div`,{className:x.segment,children:[[`sales`,`销售额`],[`units`,`销量`],...ze?[[`season`,`行业淡旺季`]]:[]].map(([e,t])=>(0,C.jsx)(`button`,{"aria-pressed":E.metric===e,onClick:()=>W({metric:e}),children:t},e))})]})]}),!G&&!he&&m?.status!==`no-access`&&!!E.categoryId&&(0,C.jsxs)(`div`,{className:x.toolbar,children:[(0,C.jsxs)(`label`,{className:x.search,children:[K&&!E.recentYear&&(0,C.jsx)(`span`,{children:`商品名称`}),(0,C.jsx)(ie,{size:14}),(0,C.jsx)(`input`,{"aria-label":`搜索当前榜单`,placeholder:K?`请输入要搜索的商品名称或ID`:`请输入店铺名称`,value:E.q,onChange:e=>W({q:e.target.value})})]}),E.recentYear?(0,C.jsx)(`div`,{className:x.segment,children:[`sales`,`views`].map(e=>(0,C.jsx)(`button`,{"aria-pressed":E.sort===e,onClick:()=>W({sort:e}),children:w(e)},e))}):(0,C.jsxs)(C.Fragment,{children:[K?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`button`,{disabled:!m?.capabilities?.priceDistribution||X!==`ready`,onClick:()=>H({kind:`distribution`}),children:`客单价分布`}),(0,C.jsxs)(`div`,{className:x.price,children:[(0,C.jsx)(`span`,{children:`件单价:`}),(0,C.jsxs)(`label`,{children:[(0,C.jsx)(`input`,{type:`number`,min:`0`,"aria-label":`最低件单价`,value:I,onChange:e=>L(e.target.value)}),(0,C.jsx)(`span`,{children:`元`})]}),(0,C.jsx)(`span`,{children:`–`}),(0,C.jsxs)(`label`,{children:[(0,C.jsx)(`input`,{type:`number`,min:`0`,"aria-label":`最高件单价`,value:R,onChange:e=>z(e.target.value)}),(0,C.jsx)(`span`,{children:`元`})]}),(0,C.jsx)(`button`,{className:x.primary,onClick:Je,children:`确定`}),(E.minPrice||E.maxPrice)&&(0,C.jsx)(`button`,{onClick:()=>{L(``),z(``),W({minPrice:``,maxPrice:``})},children:`重置`})]}),(0,C.jsxs)(`div`,{className:x.segment,children:[(0,C.jsxs)(`button`,{"aria-label":`大图视图`,"aria-pressed":F,onClick:()=>Ce(!0),children:[(0,C.jsx)(r,{size:13}),`大图`]}),(0,C.jsxs)(`button`,{"aria-label":`列表视图`,"aria-pressed":!F,onClick:()=>Ce(!1),children:[(0,C.jsx)(i,{size:13}),`列表`]})]})]}):(0,C.jsx)(`button`,{disabled:!0,title:`来源数据未提供地域字段`,children:`地域分布`}),(0,C.jsx)(`button`,{className:x.configButton,onClick:()=>P(!0),children:`表格配置`})]})]})]}),ve&&(0,C.jsxs)(`div`,{className:x.message,role:`status`,children:[ve,(0,C.jsx)(`button`,{"aria-label":`关闭提示`,onClick:()=>M(``),children:`×`})]}),he?(0,C.jsxs)(`section`,{className:x.emptyState,role:`alert`,children:[(0,C.jsx)(ae,{size:32}),(0,C.jsx)(`h2`,{children:he}),(0,C.jsx)(`button`,{onClick:()=>_e(e=>e+1),children:`重新连接`})]}):m?.status===`no-access`?(0,C.jsxs)(`section`,{className:x.emptyState,children:[(0,C.jsx)(`h2`,{children:`企业尚未获得市场类目授权`}),(0,C.jsx)(`p`,{children:`企业子账号继承企业的市场类目范围。`})]}):!G&&!E.categoryId?(0,C.jsxs)(`section`,{className:x.emptyState,children:[(0,C.jsxs)(`h2`,{children:[`选择类目查看`,K?`商品`:`店铺`,`排行榜`]}),(0,C.jsx)(`p`,{children:`使用上方类目选择器,选择你要研究的具体类目。`})]}):(0,C.jsxs)(C.Fragment,{children:[k?(0,C.jsx)(`div`,{className:x.empty,role:`status`,children:`正在读取市场数据…`}):G?E.metric===`season`?(0,C.jsxs)(`section`,{className:x.seasonBoard,children:[(0,C.jsxs)(`table`,{children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:`行业类目`}),(g?.period?.availableMonths||[]).map(e=>(0,C.jsx)(`th`,{children:e},e))]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(_,{items:g?.season||[],columns:1+(g?.period?.availableMonths.length||0),children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.name}),e.months.map(e=>(0,C.jsx)(`td`,{children:(0,C.jsx)(`span`,{className:e.state===`旺季`?x.hot:e.state===`淡季`?x.cold:x.neutral,children:e.state||`资料缺失`})},e.month))]},e.categoryId)})})]}),!g?.season.length&&(0,C.jsx)(`p`,{className:x.empty,children:`淡旺季判定口径尚未配置,当前月份数据保持原值。`})]}):(0,C.jsxs)(`section`,{className:x.categoryList,"aria-label":`类目列表`,children:[(0,C.jsx)(`div`,{className:x.categoryHeaders,children:[0,1,2].map(e=>(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`span`,{children:`类目名称`}),(0,C.jsx)(`span`,{children:E.metric===`units`?`销量`:`销售额`}),(0,C.jsx)(`span`,{children:E.metric===`units`?`销量同比`:`销售额同比`}),(0,C.jsx)(`span`,{children:`店铺数`}),(0,C.jsx)(`span`,{})]},e))}),(0,C.jsx)(`div`,{className:x.categoryRows,children:(0,C.jsx)(_,{items:Be,children:e=>(0,C.jsxs)(`article`,{className:x.categoryRow,"data-leaf":e.leaf,children:[(0,C.jsx)(`button`,{className:x.categoryOpen,"aria-label":e.leaf?`查看${e.name}排行榜`:`进入${e.name}子类目`,onClick:()=>Le(e.id)}),(0,C.jsxs)(`div`,{className:x.categoryName,children:[(0,C.jsxs)(`span`,{title:e.name,children:[e.name,!e.leaf&&(0,C.jsx)(n,{size:12})]}),e.leaf&&(0,C.jsx)(`div`,{className:x.rowActions,children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`button`,{onClick:()=>W({categoryId:e.id,view:`products`,q:``}),children:`排行榜`}),(0,C.jsx)(`button`,{onClick:()=>H({kind:`categoryTrend`,category:e}),children:`趋势`})]})})]}),(0,C.jsx)(`strong`,{children:b(e[Ve],Ve===`sales`?`compact`:`number`)}),(0,C.jsx)(`span`,{children:b(E.metric===`units`?e.unitsYoy:e.salesYoy,`percent`)}),(0,C.jsx)(`span`,{children:b(e.shopCount)}),Q(`category`,e.id,e.name)]},e.id)})}),!Be.length&&(0,C.jsx)(`p`,{className:x.empty,children:`当前类目已到最细层级,请选择商品或店铺排行榜。`})]}):E.recentYear?(0,C.jsx)(`section`,{className:x.yearBoards,"aria-label":`最近一年月度榜单`,children:se(E.month).map(e=>(0,C.jsx)(fe,{query:E,month:e,available:m?.months.includes(e)??!1,children:e=>(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`table`,{children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:`排名`}),(0,C.jsx)(`th`,{children:K?`商品`:`店铺`}),(0,C.jsx)(`th`,{children:E.sort===`views`?`浏览量`:`销售额`})]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(_,{items:e.rows,columns:3,children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.sourceRank??`—`}),(0,C.jsxs)(`td`,{children:[K?Ge(e):$(e),K&&(0,C.jsx)(`small`,{children:e.shopName||`店铺资料缺失`})]}),(0,C.jsx)(`td`,{children:b(e[E.sort===`views`?`views`:`sales`],E.sort===`views`?`number`:`compact`)})]},e.key)})})]}),!e.rows.length&&(0,C.jsx)(`p`,{className:x.empty,children:e.status===`pending`?`正在导入`:e.status===`missing`?`暂无该月来源数据`:`暂无匹配数据`})]})},JSON.stringify(E)+e))}):K&&F?(0,C.jsxs)(`section`,{className:x.productGrid,children:[(0,C.jsx)(_,{items:Y||[],children:e=>(0,C.jsxs)(`article`,{tabIndex:0,"aria-label":e.name||`商品卡片`,children:[(0,C.jsxs)(`div`,{className:x.largeImage,children:[y(e.imageUrl)?(0,C.jsx)(a,{src:y(e.imageUrl),name:e.name||`商品图片`,hoverPreview:!1}):(0,C.jsx)(re,{size:44}),(0,C.jsxs)(`span`,{children:[`排名 `,e.sourceRank??`—`]}),Q(`product`,e.key,e.name||`商品`)]}),(0,C.jsxs)(`div`,{className:x.gridDetails,children:[Ge(e),(0,C.jsxs)(`p`,{children:[`店铺:`,$(e,!0)]}),(0,C.jsx)(`dl`,{children:N.map(t=>(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`dt`,{children:w(t)}),(0,C.jsx)(`dd`,{children:pe(e,t)})]},t))}),(0,C.jsx)(`button`,{onClick:()=>H({kind:`record`,record:e}),children:`查看销售走势`})]})]},e.key)}),!Y.length&&(0,C.jsx)(`p`,{className:x.empty,children:X===`pending`?`当前类目榜单正在导入`:`暂无匹配商品`})]}):(0,C.jsxs)(`section`,{className:x.tableScroll,"aria-label":K?`商品排行榜`:`店铺排行榜`,children:[(0,C.jsxs)(`table`,{className:K?x.productTable:x.shopTable,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:`排名`}),K?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`th`,{children:`商品`}),(0,C.jsx)(`th`,{children:`商品ID`}),N[0]===`listingDays`&&Ke(`listingDays`),(0,C.jsx)(`th`,{children:`收藏商品`}),(0,C.jsx)(`th`,{children:`店铺`}),(0,C.jsx)(`th`,{children:`销售走势`}),(0,C.jsx)(`th`,{children:`利润测算`})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`th`,{children:`店铺ID`}),(0,C.jsx)(`th`,{children:`店铺名称`}),(0,C.jsx)(`th`,{children:`店铺收藏`}),(0,C.jsx)(`th`,{children:`销售走势`}),(0,C.jsx)(`th`,{children:`品类分析`})]}),J.filter(e=>!K||N[0]!==`listingDays`||e!==`listingDays`).map(Ke)]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(_,{items:Y,columns:K?J.length+7:J.length+6,children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.sourceRank??`—`}),K?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`td`,{children:Ge(e,!0)}),(0,C.jsx)(`td`,{children:We(e)}),N[0]===`listingDays`&&qe(e,`listingDays`),(0,C.jsx)(`td`,{children:Q(`product`,e.key,e.name||`商品`)}),(0,C.jsx)(`td`,{className:x.shopName,children:$(e,!0)}),(0,C.jsx)(`td`,{children:(0,C.jsx)(`button`,{className:x.linkButton,onClick:()=>H({kind:`record`,record:e}),children:`查看`})}),(0,C.jsx)(`td`,{children:(0,C.jsx)(`button`,{className:x.linkButton,disabled:!0,title:`需要成本与费用口径,当前未配置`,children:`测算`})})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`td`,{children:(0,C.jsxs)(`span`,{className:x.shopId,children:[e.id||`编号缺失`,e.id&&(0,C.jsx)(u,{text:e.id,label:`复制店铺编号${e.id}`,title:`复制店铺 ID`})]})}),(0,C.jsx)(`td`,{className:x.shopName,children:$(e)}),(0,C.jsx)(`td`,{children:Q(`shop`,e.key,e.name||`店铺`)}),(0,C.jsx)(`td`,{children:(0,C.jsx)(`button`,{className:x.linkButton,onClick:()=>H({kind:`record`,record:e}),children:`查看`})}),(0,C.jsxs)(`td`,{children:[(0,C.jsx)(`button`,{className:x.linkButton,disabled:!e.id,title:e.id?`仅分析获准类目`:`缺少可追踪店铺编号`,onClick:()=>H({kind:`shopCategories`,record:e}),children:`分析`}),p&&e.id&&(0,C.jsx)(`button`,{className:x.linkButton,onClick:()=>p({id:e.id,name:e.name||e.id},E.month),children:`归档布局`})]})]}),J.filter(e=>!K||N[0]!==`listingDays`||e!==`listingDays`).map(t=>qe(e,t))]},e.key)})})]}),!Y.length&&(0,C.jsx)(`p`,{className:x.empty,children:X===`pending`?`当前月份此类目榜单正在导入`:X===`missing`?`该类目暂无本月榜单,请选择其他月份或继续下钻`:`暂无匹配记录`})]}),!G&&!E.recentYear&&(0,C.jsxs)(`footer`,{className:x.pagination,children:[(0,C.jsxs)(`span`,{children:[`共 `,b(g?.total),` 条 · 保留来源排名`]}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`button`,{"aria-label":`上一页`,disabled:E.page<=1||k,onClick:()=>W({page:E.page-1}),children:(0,C.jsx)(e,{size:14})}),Array.from(new Set([1,...Array.from({length:5},(e,t)=>E.page-2+t).filter(e=>e>1&&e<Z),Z])).map((e,t,n)=>(0,C.jsxs)(`span`,{children:[t>0&&e-n[t-1]>1&&(0,C.jsx)(`span`,{className:x.ellipsis,children:`…`}),(0,C.jsx)(`button`,{"aria-current":E.page===e?`page`:void 0,onClick:()=>W({page:e}),children:e})]},e)),(0,C.jsx)(`button`,{"aria-label":`下一页`,disabled:E.page>=Z||k,onClick:()=>W({page:E.page+1}),children:(0,C.jsx)(n,{size:14})}),(0,C.jsx)(`select`,{"aria-label":`每页条数`,value:E.pageSize,onChange:e=>W({pageSize:Number(e.target.value)}),children:[25,50,100].map(e=>(0,C.jsxs)(`option`,{value:e,children:[e,` 条/页`]},e))}),(0,C.jsxs)(`label`,{children:[`跳至`,(0,C.jsx)(`input`,{"aria-label":`跳转页码`,type:`number`,min:`1`,max:Z,defaultValue:E.page,onKeyDown:e=>{if(e.key===`Enter`){let t=Number(e.currentTarget.value);Number.isInteger(t)&&t>=1&&t<=Z&&W({page:t})}}},E.page)]})]})]}),g?.notice&&(0,C.jsx)(`p`,{className:x.notice,children:g.notice})]}),(0,C.jsxs)(`details`,{className:x.sources,children:[(0,C.jsxs)(`summary`,{children:[(0,C.jsx)(ue,{size:13}),`数据来源与口径`]}),(0,C.jsxs)(`p`,{children:[g?.provenance.source||m?.sourceLabel||`共享市场数据库`,` ·`,` `,g?.provenance.updatedAt||`等待服务连接`]}),(0,C.jsx)(`p`,{children:g?.provenance.definition||`空值与零分别保留,按企业一级类目授权查询。`}),(0,C.jsx)(`p`,{children:`历史店铺缺少编号时仍保留榜单记录;缺少名称显示资料缺失,缺少有效链接时显示普通文本。收藏保存在当前账号下。`})]}),Se&&(0,C.jsx)(ee,{columns:J,allowed:K?ce:oe,onClose:()=>P(!1),onSave:e=>{K?ye(e):xe(e),P(!1)}}),V&&(0,C.jsx)(s,{title:V.kind===`distribution`?`件单价分布`:V.kind===`categoryTrend`?V.category.name:V.kind===`shopCategories`?`${V.record.name||`店铺`} · 品类分析`:V.record.name||`资料缺失`,onClose:()=>H(null),children:Ae?(0,C.jsx)(`p`,{className:x.notice,role:`alert`,children:Ae}):Oe?(0,C.jsx)(`p`,{className:x.empty,children:`正在读取数据…`}):V.kind===`record`&&U?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`p`,{className:x.detailScope,children:[E.month,` · 原榜排名 `,U.sourceRank??`—`,` ·`,` `,U.id||`编号缺失`]}),(0,C.jsx)(l,{points:U.trend}),(0,C.jsx)(`dl`,{className:x.detailMetrics,children:c.map(([e,t,n])=>(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`dt`,{children:t}),(0,C.jsx)(`dd`,{children:b(U[e],n)})]},e))}),U.warnings?.map(e=>(0,C.jsx)(`p`,{className:x.notice,children:e},e)),(0,C.jsxs)(`p`,{className:x.detailScope,children:[`来源:`,U.source.file,` · 第 `,U.source.row,` 行`]})]}):V.kind===`categoryTrend`?(0,C.jsx)(l,{points:Pe,metric:E.metric===`units`?`units`:`sales`}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`p`,{className:x.detailScope,children:V.kind===`distribution`?`按当前已入库商品榜单统计,非全市场商品分布`:`仅展示获准类目的店铺指标,各层级分别列示。`}),(0,C.jsxs)(`table`,{children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{children:V.kind===`distribution`?`件单价区间`:`类目`}),V.kind===`distribution`&&(0,C.jsx)(`th`,{children:`商品数`}),(0,C.jsx)(`th`,{children:`销售额`})]})}),(0,C.jsx)(`tbody`,{children:(0,C.jsx)(_,{items:Me,columns:V.kind===`distribution`?3:2,children:e=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{children:e.name}),V.kind===`distribution`&&(0,C.jsx)(`td`,{children:b(e.products)}),(0,C.jsx)(`td`,{children:b(e.sales,`money`)})]},e.name)})})]}),!Me.length&&(0,C.jsx)(`p`,{className:x.empty,children:`当前范围暂无可用数据`})]})})]})}var E=(0,S.lazy)(()=>m(()=>import(`./ShopLayoutPage-xv0PhUXv.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url)),D=(0,S.lazy)(()=>m(()=>import(`./Favorites-JpOkiZFS.js`),__vite__mapDeps([23,1,2,24,25,8,14,21,26,27,18,19,16,17,20]),import.meta.url));function O({section:e,onSection:t}){let[n,r]=g(`market.analysisLaunch`,null);return e===`shop-layout`?(0,C.jsx)(S.Suspense,{fallback:(0,C.jsx)(`p`,{role:`status`,children:`正在加载店铺品类布局…`}),children:(0,C.jsx)(E,{launch:n,onConsumeLaunch:()=>r(null)})}):e===`favorites`?(0,C.jsx)(S.Suspense,{fallback:(0,C.jsx)(`p`,{role:`status`,children:`正在加载我的收藏…`}),children:(0,C.jsx)(D,{})}):(0,C.jsx)(T,{onShopLayout:(e,n)=>{r({id:crypto.randomUUID(),shop:e,month:n}),t(`shop-layout`)},view:[`categories`,`products`,`shops`].find(t=>t===e)||`categories`})}export{O as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"./arrow-right-DMEu-HBO.js";import{t}from"./chart-column-x5fvXs9m.js";import{t as n}from"./clock-3-BThph9Fd.js";import{n as r,t as i}from"./pin-C4E_u351.js";import{t as a}from"./git-branch-BAJikW8Q.js";import{t as o}from"./layers-shcwXKIH.js";import{t as s}from"./search-CUzSX_06.js";import{a as c,g as l,p as u}from"./index-Cez2mr3h.js";import{n as d}from"./module-host-CyMfvPpR.js";import{n as f}from"./workspace-view-state-CRfq5jgZ.js";import"./public-BlU5YmdO.js";import{t as p}from"./activity-BV0UMcx6.js";var m=l(u(),1);async function h(e){let t=await Promise.allSettled([e(`/command-center`),e(`/growth-center`)]),n=[],r=[],i=[],a=t[0],o=t[1];if(a.status===`fulfilled`){let e=a.value?.projects;Array.isArray(e)?r=e.filter(e=>!e.simulated):n.push(`项目状态返回格式异常`)}else n.push(`项目状态读取失败,请重试`);if(o.status===`fulfilled`){let e=o.value?.catalog;Array.isArray(e)?i=e.filter(e=>e.mode!==`simulated`):n.push(`资料目录返回格式异常`)}else n.push(`资料目录读取失败,请重试`);return{projects:r,datasets:i,errors:n}}var g={home:`_home_fjsdx_1`,top:`_top_fjsdx_2`,eyebrow:`_eyebrow_fjsdx_5`,search:`_search_fjsdx_9`,resume:`_resume_fjsdx_11`,grid:`_grid_fjsdx_15`,panel:`_panel_fjsdx_16`,heading:`_heading_fjsdx_17`,row:`_row_fjsdx_21`,visit:`_visit_fjsdx_22`,empty:`_empty_fjsdx_24`,shortcuts:`_shortcuts_fjsdx_25`,error:`_error_fjsdx_29`},_=c(),v=e=>Number.isFinite(Date.parse(e))?new Date(e).toLocaleString(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`}):`时间未标注`;function y({mode:c,api:l,visits:u,pins:d,onPin:y,onGo:b,onOpen:x,onModule:S,onCreate:C}){let[w,T]=(0,m.useState)([]),[E,D]=(0,m.useState)([]),[O,k]=(0,m.useState)([]),[A,j]=(0,m.useState)(!0),[M,N]=(0,m.useState)(0),[P,F]=f(`home.search`,``);(0,m.useEffect)(()=>{let e=!0;return h(l).then(t=>{e&&(T(t.projects),D(t.datasets),k(t.errors),j(!1))}),()=>{e=!1}},[l,M]);let I=e=>e.toLowerCase().includes(P.trim().toLowerCase()),L=[...w].sort((e,t)=>t.updated.localeCompare(e.updated)).filter(e=>I(e.name)),R=[...E].sort((e,t)=>t.created.localeCompare(e.created)).filter(e=>I(e.title+e.projectName)),z=p(w),B={recent:`最近访问`,favorites:`我的收藏`}[c]||`从这里开始今天的工作`;function V(t){return t.length?(0,_.jsx)(`div`,{className:g.rows,children:t.filter(e=>I(e.title)).map(t=>{let r=d.some(e=>e.key===t.key);return(0,_.jsxs)(`div`,{className:g.visit,children:[(0,_.jsxs)(`button`,{onClick:()=>b(t.route),children:[(0,_.jsx)(n,{size:17}),(0,_.jsxs)(`span`,{children:[(0,_.jsx)(`b`,{children:t.title}),(0,_.jsx)(`small`,{children:v(t.at)})]}),(0,_.jsx)(e,{size:16})]}),(0,_.jsx)(`button`,{"aria-label":`${r?`取消固定`:`固定`}${t.title}`,"aria-pressed":r,onClick:()=>y(t),children:(0,_.jsx)(i,{size:16})})]},t.key)})}):(0,_.jsx)(`p`,{className:g.empty,children:c===`favorites`?`在最近访问中固定常用页面,即可在这里快速进入。`:`打开市场、商品、项目或资料后,这里会保留本次登录的访问位置。`})}let H=(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsxs)(`div`,{className:g.heading,children:[(0,_.jsx)(`h2`,{children:`需要你处理`}),(0,_.jsx)(`span`,{children:A?`读取中`:`${z.length} 项`})]}),z.slice(0,5).map(({project:t,step:n})=>(0,_.jsxs)(`button`,{className:g.row,onClick:()=>x(t.id,n.target),children:[(0,_.jsxs)(`span`,{children:[(0,_.jsxs)(`b`,{children:[n.name,` · `,n.state===`attention`?`待复核`:`待确认`]}),(0,_.jsxs)(`small`,{children:[t.name,` · `,n.description]})]}),(0,_.jsx)(e,{size:16})]},t.id+n.id)),!A&&!z.length&&(0,_.jsx)(`p`,{className:g.empty,children:O.length?`连接恢复后显示待处理事项。`:`当前没有待复核或待确认的阶段。`})]});return(0,_.jsxs)(`div`,{className:g.home,children:[(0,_.jsxs)(`div`,{className:g.top,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{className:g.eyebrow,children:`山海 · OMNI`}),(0,_.jsx)(`h1`,{children:B}),(0,_.jsx)(`p`,{children:`连接市场机会、经营行动与项目资料`})]}),(0,_.jsxs)(`label`,{className:g.search,children:[(0,_.jsx)(s,{size:17}),(0,_.jsx)(`input`,{"aria-label":`搜索首页项目、资料和访问记录`,value:P,onChange:e=>F(e.target.value),placeholder:`查找项目、资料或访问记录`})]})]}),O.length>0&&(0,_.jsxs)(`div`,{role:`alert`,className:g.error,children:[O.join(`;`),(0,_.jsx)(`button`,{onClick:()=>{j(!0),N(e=>e+1)},children:`重试`})]}),A&&(0,_.jsx)(`p`,{role:`status`,className:g.empty,children:`正在读取当前账号的项目与资料…`}),c===`recent`||c===`favorites`?(0,_.jsx)(`section`,{className:g.panel,children:V(c===`recent`?u:d)}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`section`,{className:g.resume,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{className:g.eyebrow,children:`继续上次工作`}),(0,_.jsx)(`h2`,{children:u[0]?.title||`选择一个入口,开始你的工作`}),(0,_.jsx)(`p`,{children:u[0]?`${u[0].moduleLabel} · ${v(u[0].at)}`:`查看市场,或建立一个商品项目,逐步积累证据与判断。`})]}),(0,_.jsxs)(`button`,{onClick:()=>u[0]?b(u[0].route):S(`market`),children:[u[0]?`继续处理`:`查看市场`,(0,_.jsx)(e,{size:17})]})]}),(0,_.jsxs)(`div`,{className:g.grid,children:[H,(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsx)(`h2`,{children:`常用入口`}),(0,_.jsx)(`div`,{className:g.shortcuts,children:[[`market`,`查市场`,t],[`products`,`查看商品`,o],[`projects`,`打开项目`,a],[`data`,`查找资料`,r]].map(([t,n,r])=>(0,_.jsxs)(`button`,{onClick:()=>S(String(t)),children:[(0,_.jsx)(r,{size:20}),(0,_.jsx)(`span`,{children:String(n)}),(0,_.jsx)(e,{size:14})]},String(t)))}),d.length>0&&V(d.slice(0,3))]}),(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsxs)(`div`,{className:g.heading,children:[(0,_.jsx)(`h2`,{children:`最近项目`}),(0,_.jsx)(`button`,{onClick:C,children:`+ 新建项目`})]}),L.slice(0,4).map(t=>(0,_.jsxs)(`button`,{className:g.row,onClick:()=>x(t.id,{tab:`overview`}),children:[(0,_.jsxs)(`span`,{children:[(0,_.jsx)(`b`,{children:t.name}),(0,_.jsxs)(`small`,{children:[t.statusLabel,` · 下一步:`,t.next.name]}),(0,_.jsx)(`small`,{children:v(t.updated)})]}),(0,_.jsx)(e,{size:16})]},t.id)),!A&&!L.length&&(0,_.jsx)(`p`,{className:g.empty,children:P?`没有匹配的项目。`:`建立第一个项目,将市场机会转化为具体方案。`})]}),(0,_.jsxs)(`section`,{className:g.panel,children:[(0,_.jsxs)(`div`,{className:g.heading,children:[(0,_.jsx)(`h2`,{children:`最近资料`}),(0,_.jsx)(`button`,{onClick:()=>S(`data`),children:`全部资料 →`})]}),R.slice(0,5).map(t=>(0,_.jsxs)(`button`,{className:g.row,onClick:()=>x(t.project,{tab:`data`,datasetId:t.id}),children:[(0,_.jsxs)(`span`,{children:[(0,_.jsx)(`b`,{children:t.title}),(0,_.jsxs)(`small`,{children:[t.projectName,` · `,v(t.created)]})]}),(0,_.jsx)(e,{size:16})]},t.id)),!A&&!R.length&&(0,_.jsx)(`p`,{className:g.empty,children:P?`没有匹配的资料。`:`项目中归档的数据集会出现在这里。`})]})]})]})]})}function b(e,t){return e.some(e=>e.key===t.key)?e.filter(e=>e.key!==t.key):[t,...e].slice(0,20)}function x({section:e}){let t=d(),[n,r]=f(`home.pins`,[]);return(0,_.jsx)(y,{mode:e,...t,pins:n,onPin:e=>r(t=>b(t,e))})}export{x as default};
@@ -0,0 +1 @@
1
+ ._activity_k9yph_1{color:var(--omni-text);max-width:1600px;margin:auto}._activity_k9yph_1 header{justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px;display:flex}._activity_k9yph_1 h1{font-size:27px}._activity_k9yph_1 h2{font-size:15px}._activity_k9yph_1 label{align-items:center;gap:10px;display:flex}._activity_k9yph_1 input{background:var(--omni-field);border:1px solid var(--omni-line);color:inherit;border-radius:6px;padding:10px}._panel_k9yph_1{border:1px solid var(--omni-line);background:var(--omni-panel);border-radius:10px;padding:20px 22px}._activity_k9yph_1 button{border:0;border-bottom:1px solid var(--omni-line);width:100%;color:inherit;text-align:left;cursor:pointer;background:0 0;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;display:flex}._activity_k9yph_1 small{color:var(--omni-muted);margin-top:5px;font-size:11px;display:block}._activity_k9yph_1 p{color:var(--omni-muted);font-size:12px;line-height:1.8}._activity_k9yph_1 button:focus-visible{outline:2px solid var(--omni-accent);outline-offset:3px}@media (width<=800px){._activity_k9yph_1 header{flex-direction:column;align-items:flex-start}}.gc-tabs-heading{border-bottom:1px solid var(--omni-line);justify-content:space-between;align-items:center;gap:20px;margin:22px 0 0;display:flex}.gc-tabs{scrollbar-width:thin;gap:26px;min-width:0;display:flex;overflow-x:auto}.gw .gc-tabs [role=tab]{color:var(--omni-muted);white-space:nowrap;background:0 0;border:0;border-bottom:3px solid #0000;border-radius:0;flex-shrink:0;padding:12px 2px 15px;font-size:16px;font-weight:600;display:block}.gw .gc-tabs [aria-selected=true]{color:var(--omni-text);border-bottom-color:var(--omni-accent)}.gw .gc-tabs [role=tab]:focus-visible{outline:2px solid var(--omni-accent);outline-offset:-3px}.gc-tabs-heading .pb-heading-actions{flex-shrink:0;padding-bottom:9px}.gw .gc-tabs-heading .pb-heading-actions button{border:1px solid var(--omni-line);background:var(--omni-panel);color:var(--omni-text);border-radius:7px;align-items:center;gap:7px;padding:9px 12px;font-size:12px;display:flex}.gw .gc-tabs-heading .pb-heading-actions .pb-create{background:var(--omni-accent);color:var(--omni-accent-text);border-color:var(--omni-accent)}.gc-tab-description{color:var(--omni-muted);margin:12px 0 20px;font-size:12px;line-height:1.6}.gc-tab-panel{min-width:0}.gc-tab-panel:focus-visible{outline:2px solid var(--omni-accent);outline-offset:5px}.gw .gc-tab-panel .gc-main-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gc-tab-panel .gc-sales{grid-column:span 2}.gc-tab-panel .gc-structure{grid-column:span 1}.gc-tab-panel .gc-ranking{grid-column:1/-1}.gw .gc-tab-tasks .gc-main-grid,.gw .gc-tab-history .gc-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gc-tab-tasks .gc-panel,.gc-tab-history .gc-panel{order:initial;grid-column:span 1}.gc-tab-tasks .gc-todo{order:-1}.gw .gc-tab-panel .gc-todo-list,.gw .gc-tab-panel .gc-matrix-scroll,.gw .gc-tab-panel .gc-time-scroll{max-height:430px}.gc-tab-panel .pb-board{margin-top:0}.gc-tab-panel .gc-quick-tiers{margin-bottom:16px}@media (width<=1000px){.gc-tabs-heading{flex-wrap:wrap;gap:6px}.gc-tabs{gap:20px;max-width:100%}.gc-tabs-heading .pb-heading-actions{margin-left:auto}.gw .gc-tab-panel .gc-main-grid{grid-template-columns:1fr}.gc-tab-panel .gc-panel{grid-column:1}.gw .gc-tabs [role=tab]{font-size:14px}}@media (width<=550px){.gc-tabs{gap:18px}.gw .gc-tabs [role=tab]{font-size:13px}.gc-tabs-heading .pb-heading-actions{justify-content:flex-end;width:100%}.gc-tab-description{margin-bottom:14px}}.workbench-module .gw .gc-kpis{gap:10px;margin-bottom:12px}.workbench-module .gw .gc-kpi{border-radius:8px;padding:14px 16px}.workbench-module .gw .gc-kpi>div{gap:9px;font-size:12px}.workbench-module .gw .gc-kpi strong{margin:12px 0 8px;font-size:29px;line-height:1.2}.workbench-module .gw .gc-kpi p{min-height:30px;margin:0;font-size:10px;line-height:1.55}.workbench-module .gw .gc-kpi:after{width:32px}.workbench-module .gw .gc-kpi strong small{font-size:12px}.workbench-module .gw .gc-kpi .gc-long-value{font-size:24px}.workbench-module .gc-quick-tiers{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px;display:grid}.workbench-module .gc-quick-tiers>section{background:linear-gradient(115deg,var(--omni-paint-surface-112749,#112749),var(--omni-paint-surface-0d1b32,#0d1b32));border:1px solid var(--omni-paint-line-29466d,#29466d);border-top:2px solid var(--tier);border-radius:7px;min-width:0;padding:11px 13px}.workbench-module .gc-quick-tiers header{background:0 0;border:0;align-items:center;gap:8px;margin:0 0 7px;padding:0;display:flex}.workbench-module .gc-quick-tiers header b{color:var(--tier);font-size:13px}.workbench-module .gc-quick-tiers header span{color:var(--omni-paint-ink-83a6cf,#83a6cf);margin-left:auto;font-size:10px}.workbench-module .gc-quick-tiers header button{color:var(--omni-paint-ink-87b4de,#87b4de);background:0 0;border:0;padding:0}.workbench-module .gc-quick-tiers .gc-quick-line{text-align:left;width:100%;color:var(--omni-paint-ink-bfd4ed,#bfd4ed);background:0 0;border:0;align-items:center;gap:9px;padding:5px 0;font-size:11px;display:flex}.workbench-module .gc-quick-line em{color:var(--omni-paint-ink-7297c1,#7297c1);flex-shrink:0;font-style:normal}.workbench-module .gc-quick-line span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.workbench-module .gc-quick-line svg{flex-shrink:0;margin-left:auto}.workbench-module .gc-quick-tiers .gc-quick-alert{background:var(--omni-paint-surface-11243c,#11243c);border:0;border-top:1px solid var(--omni-paint-line-254364,#254364);width:100%;color:var(--omni-paint-ink-77b7bc,#77b7bc);text-align:left;justify-content:space-between;align-items:center;margin-top:7px;padding:8px 0 0;font-size:10px;display:flex}.workbench-module .gc-quick-alert.has-issues{color:var(--omni-paint-ink-f1be80,#f1be80)}.workbench-module .gw .gc-main-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.workbench-module .gw .gc-panel{border-radius:8px;min-width:0;padding:15px 16px}.workbench-module .gc-sales{order:1;grid-column:span 4}.workbench-module .gc-structure{order:2;grid-column:span 2}.workbench-module .gc-ranking{order:3;grid-column:span 2}.workbench-module .gc-todo{order:4;grid-column:span 2}.workbench-module .gc-matrix{order:5;grid-column:span 2}.workbench-module .gc-history{order:6;grid-column:span 4}.workbench-module .gc-inspect{order:7;grid-column:span 2}.workbench-module .gw .gc-panel-head h2{font-size:14px}.workbench-module .gw .gc-panel-head small{margin-top:4px;font-size:10px}.workbench-module .gw .gc-panel-head button{padding:5px 7px;font-size:10px}.workbench-module .gw .gc-selects{gap:8px;margin:9px 0}.workbench-module .gw .gc-selects select{min-height:32px;padding:6px 8px;font-size:11px}.workbench-module .gw .gc-selects button{min-height:32px;padding:6px 9px;font-size:11px}.workbench-module .gw .gc-chart-reading strong{font-size:25px}.workbench-module .gw .gc-chart-reading{margin:8px 0 2px}.workbench-module .gw .gc-ring{gap:8px;min-height:215px}.workbench-module .gw .gc-ring svg{width:46%;max-width:180px}.workbench-module .gw .gc-ring-legend button{gap:7px;padding:10px 0;font-size:11px}.workbench-module .gw .gc-ring-legend b{font-size:18px}.workbench-module .gw .gc-footnote{color:var(--omni-paint-ink-799cc4,#799cc4);margin:8px 0 0;font-size:9px;line-height:1.6}.workbench-module .gw .gc-matrix-scroll{max-height:265px}.workbench-module .gw .gc-matrix-row{gap:9px;margin-bottom:10px}.workbench-module .gw .gc-project-name{width:87px;font-size:10px!important}.workbench-module .gw .gc-matrix-row>div{gap:3px}.workbench-module .gw .gc-cell{min-width:12px;height:24px}.workbench-module .gw .gc-state-legend{gap:6px;margin-bottom:15px;font-size:9px}.workbench-module .gw .gc-todo-list{max-height:260px}.workbench-module .gw .gc-todo-list>button{gap:9px;padding:12px 0}.workbench-module .gw .gc-todo-list b{font-size:12px}.workbench-module .gw .gc-todo-list small{font-size:10px}.workbench-module .gw .gc-no-data{min-height:80px;font-size:12px}.workbench-module .gc-rank-list{max-height:266px;overflow:auto}.workbench-module .gc-rank-list>button{border:0;border-bottom:1px solid var(--omni-paint-line-213856,#213856);text-align:left;width:100%;color:var(--omni-paint-ink-b7d1ef,#b7d1ef);background:0 0;align-items:center;gap:8px;padding:8px 0;font-size:11px;display:flex}.workbench-module .gc-rank-list i{background:var(--omni-paint-surface-233e67,#233e67);width:18px;height:19px;color:var(--omni-paint-ink-9cbce2,#9cbce2);border-radius:3px;flex-shrink:0;place-items:center;font:10px monospace;display:grid}.workbench-module .gc-rank-list>button:first-child i{background:var(--omni-paint-surface-cfb660,#cfb660);color:var(--omni-paint-ink-18284a,#18284a)}.workbench-module .gc-rank-list span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.workbench-module .gc-rank-list small{color:var(--omni-paint-ink-698dbb,#698dbb);font-size:9px;display:block}.workbench-module .gc-rank-list>button>div{background:var(--omni-paint-surface-182d4e,#182d4e);border-radius:6px;flex-shrink:0;width:48px;height:5px}.workbench-module .gc-rank-list b{background:linear-gradient(90deg,var(--omni-paint-surface-6760f2,#6760f2),var(--omni-paint-surface-39d5ec,#39d5ec));border-radius:6px;height:100%;display:block}.workbench-module .gc-rank-list strong{text-align:right;min-width:50px;color:var(--omni-paint-ink-badbff,#badbff);font:11px monospace}.workbench-module .gc-status-strip{color:var(--omni-paint-ink-7da1cc,#7da1cc);border-top:1px solid var(--omni-paint-line-274267,#274267);flex-wrap:wrap;align-items:center;gap:20px;margin-top:12px;padding:10px 0;font-size:10px;display:flex}.workbench-module .gc-status-strip i{background:var(--omni-paint-surface-58dccc,#58dccc);border-radius:50%;width:5px;height:5px;margin-right:4px;display:inline-block}.workbench-module .gc-status-strip button{background:var(--omni-paint-surface-183c68,#183c68);border:1px solid var(--omni-paint-line-315885,#315885);color:var(--omni-paint-ink-afd7fa,#afd7fa);align-items:center;gap:7px;margin-left:auto;padding:6px 10px;font-size:10px;display:flex}@media (width>=1600px){.workbench-module .gw .gc-chart svg{max-height:215px}.workbench-module .gw .gc-ring{min-height:240px}.workbench-module .gw .gc-kpi strong{font-size:33px}}@media (width<=1150px){.workbench-module .gw .gc-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}.workbench-module .gw .gc-kpi{padding:12px 10px}.workbench-module .gw .gc-kpi-icon{display:none}.workbench-module .gw .gc-kpi strong{font-size:24px}.workbench-module .gw .gc-kpi>div{font-size:11px}.workbench-module .gw .gc-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-module .gc-sales,.workbench-module .gc-history{grid-column:span 2}.workbench-module .gc-structure,.workbench-module .gc-ranking,.workbench-module .gc-todo,.workbench-module .gc-matrix,.workbench-module .gc-inspect{grid-column:span 1}.workbench-module .gc-structure{order:3}.workbench-module .gc-ranking{order:2}.workbench-module .gc-quick-tiers header{flex-wrap:wrap}.workbench-module .gc-quick-tiers header span{font-size:9px}.workbench-module .gw .gc-ring{flex-direction:row}.workbench-module .gw .gc-ring svg{width:43%}.workbench-module .gw .gc-matrix-row>div{min-width:0}}@media (width<=850px){.workbench-module .gc-quick-tiers{grid-template-columns:1fr;gap:8px}.workbench-module .gc-quick-tiers>section{padding:10px 12px}.workbench-module .gc-quick-tiers .gc-quick-alert{padding-top:6px}.workbench-module .gw .gc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-module .gw .gc-kpi:last-child{grid-column:1/-1}.workbench-module .gw .gc-kpi:last-child p{display:block}.workbench-module .gw .gc-kpi strong{margin:8px 0}.workbench-module .gw .gc-kpi p{min-height:0}.workbench-module .gw .gc-ring{min-height:230px}.workbench-module .gw .gc-main-grid{grid-template-columns:1fr}.workbench-module .gc-main-grid>.gc-panel{grid-column:1}.workbench-module .gc-status-strip{gap:10px}.workbench-module .gc-status-strip button{margin-left:0}}@media (width<=650px){.workbench-module .gc-quick-line span{white-space:normal}.workbench-module .gw .gc-panel{padding:14px}.workbench-module .gc-status-strip{font-size:10px}}.workbench-module .gc-quick-tiers .gc-quick-line{justify-content:flex-start}.workbench-module .gc-next-label{color:var(--omni-paint-ink-76b5e2,#76b5e2);margin:12px 0 2px;font-size:11px}.workbench-module .gc-next-dot{background:var(--omni-paint-surface-5966d4,#5966d4);border-radius:2px;flex-shrink:0;width:7px;height:7px;margin:0 6px}.workbench-module .gw .gc-todo-list:has(.gc-next-label){max-height:270px}.workbench-module .gc-next-label~button b{color:var(--omni-paint-ink-9fc3ef,#9fc3ef)}.workbench-module .gw .gc-kpi{padding:11px 13px}.workbench-module .gw .gc-kpi-icon{width:27px;height:27px}.workbench-module .gw .gc-kpi strong{margin:8px 0 6px;font-size:28px}.workbench-module .gw .gc-kpi p{min-height:19px;font-size:10px}.workbench-module .gw .gc-chart svg{max-height:165px}.workbench-module .gw .gc-ring{min-height:200px}.workbench-module .gw .gc-panel-head{margin-bottom:8px}.workbench-module .gw .gc-panel-head small{margin-top:3px}.workbench-module .gw .gc-time-scroll{max-height:185px}.workbench-module .gw .gc-checks button{padding:8px 0}.workbench-module .gw .gc-checks{gap:10px}.workbench-module .gc-quick-tiers>section{padding:9px 12px}.workbench-module .gc-quick-tiers .gc-quick-line{padding:3px 0}.workbench-module .gc-quick-tiers .gc-quick-alert{margin-top:5px;padding-top:6px}@media (width>=1151px){.workbench-module .gw .gc-chart-empty{min-height:190px}}.workbench-module .gc-quick-line span small{color:var(--omni-paint-ink-718fb7,#718fb7);margin-top:1px;font-size:9px;line-height:1.5;display:block}.workbench-module .gc{--line:var(--omni-paint-line-233a61,#233a61);--muted:var(--omni-paint-ink-839bbd,#839bbd);--cyan:var(--omni-paint-ink-52d5fa,#52d5fa)}.workbench-module .gc button{font:inherit;cursor:pointer}.workbench-module .gc button:focus-visible,.workbench-module .gc select:focus-visible{outline:2px solid var(--omni-paint-line-61dbff,#61dbff);outline-offset:3px}.workbench-module .gc button:disabled{opacity:.45;cursor:default}.workbench-module .gc-kpis{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px;display:grid}.workbench-module .gc-kpi{text-align:left;border:1px solid var(--omni-paint-line-29467a,#29467a);color:var(--omni-paint-ink-b6c9e8,#b6c9e8);background:radial-gradient(ellipse at 85% 0,var(--omni-paint-surface-1c53ad66,#1c53ad66),transparent 75%),linear-gradient(135deg,var(--omni-paint-surface-122b51,#122b51),var(--omni-paint-surface-0c1b36,#0c1b36));box-shadow:inset 0 1px var(--omni-paint-shadow-7abaff15,#7abaff15),0 6px 20px var(--omni-paint-shadow-0002,#0002);border-radius:8px;padding:16px 17px;position:relative;overflow:hidden}.workbench-module .gc-kpi:after{content:"";background:var(--omni-paint-surface-3d97ff,#3d97ff);width:44px;height:2px;box-shadow:0 0 14px var(--omni-paint-shadow-3dbaff,#3dbaff);position:absolute;bottom:0;left:17px}.workbench-module .gc-kpi>div{align-items:center;gap:9px;font-size:12px;display:flex}.workbench-module .gc-kpi>div>svg{color:var(--omni-paint-ink-6e91c3,#6e91c3);margin-left:auto}.workbench-module .gc-kpi-icon{background:var(--omni-paint-surface-173c73,#173c73);color:var(--omni-paint-ink-4dccff,#4dccff);width:34px;height:34px;box-shadow:0 0 17px var(--omni-paint-shadow-1d87ff22,#1d87ff22);border-radius:7px;flex-shrink:0;place-items:center;display:grid}.workbench-module .gc-kpi:nth-child(2) .gc-kpi-icon{color:var(--omni-paint-ink-b99bff,#b99bff);background:var(--omni-paint-surface-34295b,#34295b)}.workbench-module .gc-kpi:nth-child(5) .gc-kpi-icon{color:var(--omni-paint-ink-56e7db,#56e7db);background:var(--omni-paint-surface-113f51,#113f51)}.workbench-module .gc-kpi strong{color:var(--omni-paint-ink-e1efff,#e1efff);letter-spacing:-1px;margin:10px 0 8px;font:34px/1.3 ui-monospace,SFMono-Regular,monospace;display:block}.workbench-module .gc-kpi strong small{color:var(--omni-paint-ink-839fca,#839fca);margin-left:8px;font:11px sans-serif}.workbench-module .gc-kpi p{color:var(--omni-paint-ink-7f9ec5,#7f9ec5);margin:0;font-size:10px;line-height:1.6}.workbench-module .gc-kpi:hover{border-color:var(--omni-paint-line-548ad1,#548ad1);background-color:var(--omni-paint-surface-173363,#173363)}.workbench-module .gc-main-grid{grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:16px;display:grid}.workbench-module .gc-panel{background:linear-gradient(125deg,var(--omni-paint-surface-0e1d39,#0e1d39),var(--omni-paint-surface-0a162d,#0a162d));border:1px solid var(--line);min-width:0;box-shadow:inset 0 1px var(--omni-paint-shadow-80aaff08,#80aaff08);border-radius:8px;padding:18px 20px;position:relative;overflow:hidden}.workbench-module .gc-panel:before{content:"";background:var(--omni-paint-surface-4193f5,#4193f5);width:28px;height:2px;box-shadow:0 0 15px var(--omni-paint-shadow-2e91ee77,#2e91ee77);position:absolute;top:0;left:20px}.workbench-module .gc-panel-head{justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;display:flex}.workbench-module .gc-panel-head h2{color:var(--omni-paint-ink-d4e7ff,#d4e7ff);white-space:nowrap;align-items:center;gap:8px;font-size:15px;font-weight:550;display:flex}.workbench-module .gc-panel-head h2 span{background:var(--omni-paint-surface-50c9ff,#50c9ff);width:6px;height:6px;box-shadow:0 0 9px var(--omni-paint-shadow-4cb8ff,#4cb8ff);transform:rotate(45deg)}.workbench-module .gc-panel-head small{color:var(--muted);margin-top:7px;font-size:10px;line-height:1.5;display:block}.workbench-module .gc-panel-head>svg{color:var(--omni-paint-ink-47bff4,#47bff4)}.workbench-module .gc-panel-head button,.workbench-module .gc-selects button,.workbench-module .gc-archive button,.workbench-module .gc-lanes-title button,.workbench-module .gc-chart-empty button{border:1px solid var(--omni-paint-line-2c4775,#2c4775);background:var(--omni-paint-surface-122b50,#122b50);color:var(--omni-paint-ink-a4ceff,#a4ceff);white-space:nowrap;border-radius:4px;align-items:center;gap:5px;padding:7px 9px;font-size:10px;display:flex}.workbench-module .gc-toggle{background:var(--omni-paint-surface-08152d,#08152d);border:1px solid var(--omni-paint-line-243b63,#243b63);border-radius:5px;flex-shrink:0;padding:2px;display:flex}.workbench-module .gc-toggle button{color:var(--omni-paint-ink-7799c4,#7799c4);background:0 0;border:0;border-radius:3px;padding:5px 10px;font-size:10px}.workbench-module .gc-toggle button[aria-pressed=true]{background:var(--omni-paint-surface-244d8c,#244d8c);color:var(--omni-paint-ink-d5edff,#d5edff)}.workbench-module .gc-selects{gap:7px;display:flex}.workbench-module .gc-selects select{background:var(--omni-paint-surface-0d2040,#0d2040);border:1px solid var(--omni-paint-line-2b4671,#2b4671);min-width:0;color:var(--omni-paint-ink-9db9dc,#9db9dc);border-radius:4px;width:42%;margin:0;padding:7px 8px;font-size:10px}.workbench-module .gc-selects select:nth-child(2){width:38%}.workbench-module .gc-chart-reading{align-items:baseline;gap:12px;margin-top:14px;display:flex}.workbench-module .gc-chart-reading strong{color:var(--omni-paint-ink-def5ff,#def5ff);font:25px ui-monospace,monospace}.workbench-module .gc-chart-reading strong small{color:var(--omni-paint-ink-8eb2d4,#8eb2d4);margin-left:6px;font:10px sans-serif}.workbench-module .gc-chart-reading span{color:var(--omni-paint-ink-9ab1d2,#9ab1d2);font-size:10px}.workbench-module .gc-chart-reading i{color:var(--omni-paint-ink-6185ae,#6185ae);margin-left:auto;font-size:9px;font-style:normal}.workbench-module .gc-chart svg{width:100%;margin:3px 0 0;display:block}.workbench-module .gc-chart svg text{fill:var(--omni-paint-ink-7692bc,#7692bc);font:10px sans-serif}.workbench-module .gc-gridline{stroke:var(--omni-paint-chart-203755,#203755);stroke-dasharray:3 5}.workbench-module .gc-line{stroke:var(--omni-paint-chart-57edee,#57edee);stroke-width:2px;filter:drop-shadow(0 0 3px #39bada88);pointer-events:none}.workbench-module .gc-footnote{color:var(--omni-paint-ink-738daf,#738daf);margin:10px 0 0;font-size:9px;line-height:1.7}.workbench-module .gc-ring{align-items:center;gap:12px;min-height:265px;display:flex}.workbench-module .gc-ring svg{filter:drop-shadow(0 0 15px #3072ff15);flex-shrink:0;width:53%;max-width:270px}.workbench-module .gc-ring text{fill:var(--omni-paint-ink-8da9cc,#8da9cc);font:7px sans-serif}.workbench-module .gc-ring .gc-ring-number{fill:var(--omni-paint-chart-e3f0ff,#e3f0ff);font:27px ui-monospace,monospace}.workbench-module .gc-ring-legend{flex:1;min-width:0}.workbench-module .gc-ring-legend button{border:0;border-bottom:1px solid var(--omni-paint-line-203352,#203352);width:100%;color:var(--omni-paint-ink-9db4d7,#9db4d7);text-align:left;white-space:nowrap;background:0 0;align-items:center;gap:7px;padding:12px 0;font-size:11px;display:flex}.workbench-module .gc-ring-legend i,.workbench-module .gc-state-legend i{border-radius:2px;flex-shrink:0;width:6px;height:6px;display:inline-block}.workbench-module .gc-ring-legend b{color:var(--omni-paint-ink-dfebff,#dfebff);margin-left:auto;font:15px monospace}.workbench-module .gc-ring-legend small{color:var(--omni-paint-ink-6f8fb8,#6f8fb8);text-align:right;width:27px;font-size:9px}.workbench-module .gc-checks{gap:14px;padding:8px 0;display:grid}.workbench-module .gc-checks button{color:var(--omni-paint-ink-9eb5d8,#9eb5d8);text-align:left;background:0 0;border:0;align-items:center;gap:14px;padding:0;font-size:11px;display:flex}.workbench-module .gc-checks button>span{width:75px}.workbench-module .gc-checks button>div{background:var(--omni-paint-surface-162947,#162947);border-radius:2px;flex:1;height:9px;overflow:hidden}.workbench-module .gc-checks i{height:100%;box-shadow:0 0 12px var(--omni-paint-shadow-4b9eff33,#4b9eff33);border-radius:2px;display:block}.workbench-module .gc-checks b{color:var(--omni-paint-ink-c4dafa,#c4dafa);min-width:15px;font:15px monospace}.workbench-module .gc-archive{border-top:1px solid var(--omni-paint-line-213856,#213856);color:var(--omni-paint-ink-87a6cd,#87a6cd);justify-content:space-between;align-items:center;margin-top:18px;padding-top:13px;font-size:11px;display:flex}.workbench-module .gc-archive b{color:var(--omni-paint-ink-9fccff,#9fccff);margin-right:5px;font:18px monospace}.workbench-module .gc-state-legend{color:var(--omni-paint-ink-88a5ca,#88a5ca);flex-wrap:wrap;gap:12px;margin:0 0 13px;font-size:9px;display:flex}.workbench-module .gc-state-legend span{align-items:center;gap:5px;display:flex}.workbench-module .gc .done{background:var(--omni-paint-surface-1d8c94,#1d8c94);border-color:var(--omni-paint-line-31b3bc,#31b3bc)}.workbench-module .gc .review{background:var(--omni-paint-surface-6352b1,#6352b1);border-color:var(--omni-paint-line-8971df,#8971df)}.workbench-module .gc .attention{background:var(--omni-paint-surface-9a6433,#9a6433);border-color:var(--omni-paint-line-d7a15d,#d7a15d)}.workbench-module .gc .todo{background:var(--omni-paint-surface-1c3156,#1c3156);border-color:var(--omni-paint-line-2b4771,#2b4771)}.workbench-module .gc .stopped{background:var(--omni-paint-surface-853d5b,#853d5b);border-color:var(--omni-paint-line-b9698a,#b9698a)}.workbench-module .gc-matrix-scroll{max-height:190px;overflow:auto}.workbench-module .gc-matrix-row{align-items:center;gap:14px;margin-bottom:9px;display:flex}.workbench-module .gc-project-name{text-overflow:ellipsis;white-space:nowrap;text-align:left;width:135px;color:var(--omni-paint-ink-b1c9e9,#b1c9e9);background:0 0;border:0;flex-shrink:0;padding:0;overflow:hidden;font-size:10px!important}.workbench-module .gc-project-name small{color:var(--omni-paint-ink-6386b0,#6386b0);margin-top:4px;font-size:8px;display:block}.workbench-module .gc-matrix-row>div{flex:1;gap:4px;min-width:0;display:flex}.workbench-module .gc-cell{min-width:15px;height:25px;color:var(--omni-paint-ink-adc8ed,#adc8ed);border:1px solid;border-radius:3px;flex:1;padding:0;font-size:8px!important}.workbench-module .gc-cell:hover{filter:brightness(1.5);transform:translateY(-2px)}.workbench-module .gc-time-header,.workbench-module .gc-time-row{grid-template-columns:145px minmax(0,1fr);gap:14px;display:grid}.workbench-module .gc-time-header{color:var(--omni-paint-ink-809dc3,#809dc3);margin:6px 6px 8px 0;font-size:9px}.workbench-module .gc-time-header>div{justify-content:space-between;display:flex}.workbench-module .gc-time-scroll{max-height:229px;padding-right:6px;overflow:auto}.workbench-module .gc-time-row{border-top:1px solid var(--omni-paint-line-1c3052,#1c3052);align-items:center;min-height:31px}.workbench-module .gc-time-row>button{text-overflow:ellipsis;white-space:nowrap;color:var(--omni-paint-ink-9bb8dc,#9bb8dc);text-align:left;background:0 0;border:0;padding:0;font-size:10px;overflow:hidden}.workbench-module .gc-time-row>div{background:repeating-linear-gradient(90deg,var(--omni-paint-surface-203658,#203658) 0,var(--omni-paint-surface-203658,#203658) 1px,transparent 1px,transparent 25%);height:30px;margin:0 4px;position:relative}.workbench-module .gc-event{border:1px solid var(--omni-paint-line-69c5f7,#69c5f7);background:var(--omni-paint-surface-3885c3,#3885c3);border-radius:2px;width:7px;min-width:0;height:16px;padding:0;position:absolute;top:7px;transform:translate(-50%)}.workbench-module .gc-event.saved{background:var(--omni-paint-surface-4b6fce,#4b6fce);border-color:var(--omni-paint-line-8eafff,#8eafff)}.workbench-module .gc-event.bad{background:var(--omni-paint-surface-b75a83,#b75a83);border-color:var(--omni-paint-line-eb92b4,#eb92b4)}.workbench-module .gc-event:hover{z-index:2;outline:2px solid var(--omni-paint-line-bcecff,#bcecff)}.workbench-module .gc-todo-list{max-height:245px;overflow:auto}.workbench-module .gc-todo-list>button{text-align:left;border:0;border-top:1px solid var(--omni-paint-line-243655,#243655);width:100%;color:var(--omni-paint-ink-b1cae8,#b1cae8);background:0 0;align-items:center;gap:12px;padding:12px 0;display:flex}.workbench-module .gc-todo-list>button:first-child{border-top:0}.workbench-module .gc-todo-list>button>div{flex:1;min-width:0}.workbench-module .gc-todo-list b{color:var(--omni-paint-ink-edc897,#edc897);font-size:12px;font-weight:500}.workbench-module .gc-todo-list span:not(.gc-todo-num){color:var(--omni-paint-ink-829bbf,#829bbf);text-overflow:ellipsis;white-space:nowrap;margin-top:5px;font-size:9px;display:block;overflow:hidden}.workbench-module .gc-todo-list small{color:var(--omni-paint-ink-627fa8,#627fa8);margin-top:4px;font-size:9px;display:block}.workbench-module .gc-todo-num{color:var(--omni-paint-ink-deb77c,#deb77c);background:var(--omni-paint-surface-3c302d,#3c302d);border:1px solid var(--omni-paint-line-72563f,#72563f);border-radius:4px;padding:5px;font:11px monospace}.workbench-module .gc-badge{background:var(--omni-paint-surface-3e302c,#3e302c);border:1px solid var(--omni-paint-line-815e3a,#815e3a);color:var(--omni-paint-ink-e8b776,#e8b776);white-space:nowrap;border-radius:4px;padding:5px 9px;font-size:10px}.workbench-module .gc-lanes-title{justify-content:space-between;align-items:center;margin:27px 0 18px;display:flex}.workbench-module .gc-lanes-title span{letter-spacing:1.5px;color:var(--omni-paint-ink-5a85b9,#5a85b9);font:9px monospace}.workbench-module .gc-lanes-title h2{color:var(--omni-paint-ink-bdd9ff,#bdd9ff);margin-top:8px;font-size:19px}.workbench-module .gc-no-data,.workbench-module .gc-chart-empty{color:var(--omni-paint-ink-7c9ac4,#7c9ac4);padding:25px 0;font-size:12px}.workbench-module .gc-chart-empty{flex-direction:column;justify-content:center;align-items:center;gap:14px;min-height:235px;display:flex}.workbench-module .gc-chart-empty span{font-size:11px}@media (width>=1600px){.workbench-module .gc-chart svg{max-height:245px}.workbench-module .gc-ring{min-height:310px}.workbench-module .gc-kpi strong{font-size:38px}}@media (width<=1150px){.workbench-module .gc-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.workbench-module .gc-kpi{padding:13px}.workbench-module .gc-main-grid{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}.workbench-module .gc-panel{padding:15px}.workbench-module .gc-ring{flex-direction:column;gap:0;min-height:0}.workbench-module .gc-ring svg{width:150px}.workbench-module .gc-ring-legend{width:100%}.workbench-module .gc-ring-legend button{padding:6px 0}.workbench-module .gc-chart-reading i{display:none}.workbench-module .gc-project-name{width:90px}.workbench-module .gc-time-header,.workbench-module .gc-time-row{grid-template-columns:110px minmax(0,1fr)}}@media (width<=850px){.workbench-module .gc-main-grid{grid-template-columns:1fr}.workbench-module .gc-ring{flex-direction:row}.workbench-module .gc-ring svg{width:45%}.workbench-module .gc-ring-legend button{padding:14px 0}.workbench-module .gc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-module .gc-kpi:last-child{grid-column:1/-1}.workbench-module .gc-kpi:last-child strong{margin-right:15px;display:inline-block}.workbench-module .gc-kpi:last-child p{display:inline}.workbench-module .gc-matrix-row>div{min-width:220px}.workbench-module .gc-matrix-scroll{overflow:auto}.workbench-module .gc-history{min-width:0}.workbench-module .gc-chart-reading{flex-wrap:wrap}}@media (width<=650px){.workbench-module .gc-kpi strong{font-size:29px}.workbench-module .gc-kpi>div{font-size:11px}.workbench-module .gc-kpi-icon{width:28px;height:28px}.workbench-module .gc-kpi p{font-size:9px}.workbench-module .gc-kpis{gap:9px}.workbench-module .gc-lanes-title{align-items:flex-start;gap:12px}.workbench-module .gc-lanes-title h2{font-size:16px}.workbench-module .gc-lanes-title button{padding:8px;font-size:9px}.workbench-module .gc-time-header,.workbench-module .gc-time-row{grid-template-columns:100px minmax(0,1fr);gap:8px}.workbench-module .gc-panel-head h2{font-size:14px}.workbench-module .gc-panel-head small,.workbench-module .gc-chart-reading span{font-size:9px}.workbench-module .gc-panel{padding:15px 12px}.workbench-module .gc-ring-legend button{font-size:10px}}@media (prefers-reduced-motion:reduce){.workbench-module .gc *{scroll-behavior:auto!important;transition:none!important}}.workbench-module .gw .gc-kpi{min-height:0;display:block}.workbench-module .gw .gc-kpi>div>span:not(.gc-kpi-icon){white-space:nowrap}.workbench-module .gc button{letter-spacing:normal;min-height:0}.workbench-module .gc .gc-project-name,.workbench-module .gc .gc-time-row>button{display:block}.workbench-module .gc .gc-cell{place-items:center;min-height:25px;display:grid}.workbench-module .gc .gc-event{color:var(--omni-paint-ink-d8eeff,#d8eeff);place-items:center;width:18px;height:18px;font:8px monospace;display:grid;top:6px}.workbench-module .gc-records{border-left:1px solid var(--omni-paint-line-3566a0,#3566a0);max-height:55dvh;margin:15px 0 0 5px;padding-left:14px;overflow:auto}.workbench-module .gc-records details{border:1px solid var(--omni-paint-line-294c77,#294c77);background:var(--omni-paint-surface-0c1b33,#0c1b33);border-radius:5px;margin-bottom:10px;padding:12px}.workbench-module .gc-records summary{cursor:pointer;gap:7px;display:grid}.workbench-module .gc-records summary span{color:var(--omni-paint-ink-809bc3,#809bc3);font:10px monospace}.workbench-module .gc-records b{color:var(--omni-paint-ink-b9d8ff,#b9d8ff);font-size:13px}.workbench-module .gc-records em{color:var(--omni-paint-ink-69d1e4,#69d1e4);font-size:10px;font-style:normal}.workbench-module .gc-records p{white-space:pre-wrap;color:var(--omni-paint-ink-aac3e3,#aac3e3);font-size:12px;line-height:1.8}.workbench-module .gc-records button{background:var(--omni-paint-surface-163c6b,#163c6b);border:1px solid var(--omni-paint-line-3b679a,#3b679a);color:var(--omni-paint-ink-c1dfff,#c1dfff);padding:8px 12px;font-size:11px}.workbench-module .gc-history-dialog{background:linear-gradient(140deg,var(--omni-paint-surface-14294b,#14294b),var(--omni-paint-surface-0c1931,#0c1931));border-color:var(--omni-paint-line-3866a0,#3866a0);width:min(640px,100vw - 30px)}.workbench-module .gw .gc+.ta-board>.ta-heading,.workbench-module .gw .gc+.ta-board>.ta-inbox{display:none}.workbench-module .gw .gc-kpi strong small{letter-spacing:0}.workbench-module .gc-kpi.is-open{border-color:var(--omni-paint-line-5acfff,#5acfff);box-shadow:0 0 18px var(--omni-paint-shadow-397dd633,#397dd633)}.workbench-module .gc-kpi .gc-long-value{font-size:24px}.workbench-module .gb-detail{border:1px solid var(--omni-paint-line-3566a4,#3566a4);background:linear-gradient(130deg,var(--omni-paint-surface-13274a,#13274a),var(--omni-paint-surface-0d1b33,#0d1b33));color:var(--omni-paint-ink-a8bfdf,#a8bfdf);border-radius:8px;margin-bottom:18px;padding:22px}.workbench-module .gb-detail>header{background:0 0;border:0;justify-content:space-between;align-items:center;gap:16px;margin:0 0 18px;padding:0;display:flex}.workbench-module .gb-detail header small{color:var(--omni-paint-ink-6db9e8,#6db9e8);font-size:10px}.workbench-module .gb-detail h2{color:var(--omni-paint-ink-d8eaff,#d8eaff);margin-top:8px;font-size:18px}.workbench-module .gb-detail p{font-size:12px;line-height:1.9}.workbench-module .gb-detail button,.workbench-module .gb-detail a{background:var(--omni-paint-surface-173d6d,#173d6d);border:1px solid var(--omni-paint-line-386599,#386599);color:var(--omni-paint-ink-c0e3ff,#c0e3ff);border-radius:4px;justify-content:center;align-items:center;margin:5px 7px 5px 0;padding:8px 12px;font-size:11px;text-decoration:none;display:inline-flex}.workbench-module .gb-detail label{font-size:12px}.workbench-module .gb-detail select{background:var(--omni-paint-surface-0d2040,#0d2040);color:var(--omni-paint-ink-b8ceeb,#b8ceeb);border:1px solid var(--omni-paint-line-33567f,#33567f);padding:8px}.workbench-module .gb-table{max-height:340px;overflow:auto}.workbench-module .gb-table table{border-collapse:collapse;width:100%}.workbench-module .gb-table small{color:var(--omni-paint-ink-839fc3,#839fc3);font-size:10px;display:block}.workbench-module .gb-table .gb-wrap{white-space:normal;min-width:220px;max-width:370px;line-height:1.8}.workbench-module .gb-win{color:var(--omni-paint-ink-5de0c3,#5de0c3)}.workbench-module .gb-loss{color:var(--omni-paint-danger-f299ad,#f299ad)}.workbench-module .gb-next{border-left:2px solid var(--omni-paint-line-46b9ef,#46b9ef);background:var(--omni-paint-surface-14345255,#14345255);padding:13px 16px;color:var(--omni-paint-ink-bad9ee,#bad9ee)!important}.workbench-module .gb-gap{border:1px solid var(--omni-paint-line-756044,#756044);background:var(--omni-paint-surface-342c2844,#342c2844);color:var(--omni-paint-ink-e8c086,#e8c086);padding:15px;font-size:13px}.workbench-module .gb-costs{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0;display:grid}.workbench-module .gb-costs>div{background:var(--omni-paint-surface-0b1b34,#0b1b34);border:1px solid var(--omni-paint-line-29466e,#29466e);border-radius:5px;padding:12px}.workbench-module .gb-costs span{color:var(--omni-paint-ink-86a6cf,#86a6cf);margin-bottom:8px;font-size:10px;display:block}.workbench-module .gb-costs b{color:var(--omni-paint-ink-cae5ff,#cae5ff);overflow-wrap:anywhere;font:16px monospace}.workbench-module .gb-costs .gb-profit{border-color:var(--omni-paint-line-388980,#388980)}.workbench-module .gb-inc-summary{background:var(--omni-paint-surface-10264a,#10264a);border:1px solid var(--omni-paint-line-2a4878,#2a4878);border-radius:5px;align-items:center;gap:25px;margin:15px 0;padding:20px;display:flex}.workbench-module .gb-inc-summary b{color:var(--omni-paint-ink-7bd8ff,#7bd8ff);font:30px monospace}.workbench-module .gb-inc-summary small{color:var(--omni-paint-ink-7fa2c8,#7fa2c8);margin-top:9px;font:11px sans-serif;display:block}.workbench-module .ta-dialog .gb-costs{grid-template-columns:1fr 1fr}@media (width<=650px){.workbench-module .gb-detail{padding:16px}.workbench-module .gb-costs{grid-template-columns:1fr 1fr}.workbench-module .gb-inc-summary{gap:16px}.workbench-module .gb-inc-summary b,.workbench-module .gc-kpi strong{font-size:24px}}.workbench-module .gb-detail table button{white-space:nowrap}:root[data-omni-theme=light]{--omni-paint-surface-112749:#fff;--omni-paint-surface-0d1b32:#fff;--omni-paint-line-29466d:#dde1eb;--omni-paint-ink-83a6cf:#626e80;--omni-paint-ink-87b4de:#626e80;--omni-paint-ink-bfd4ed:#252831;--omni-paint-ink-7297c1:#626e80;--omni-paint-surface-11243c:#fff;--omni-paint-line-254364:#dde1eb;--omni-paint-ink-77b7bc:#626e80;--omni-paint-ink-f1be80:#626e80;--omni-paint-ink-799cc4:#626e80;--omni-paint-line-213856:#dde1eb;--omni-paint-ink-b7d1ef:#252831;--omni-paint-surface-233e67:#fff;--omni-paint-ink-9cbce2:#626e80;--omni-paint-surface-cfb660:#eef0ff;--omni-paint-ink-18284a:#252831;--omni-paint-ink-698dbb:#626e80;--omni-paint-surface-182d4e:#fff;--omni-paint-surface-6760f2:#eef0ff;--omni-paint-surface-39d5ec:#eef0ff;--omni-paint-ink-badbff:#252831;--omni-paint-ink-7da1cc:#626e80;--omni-paint-line-274267:#dde1eb;--omni-paint-surface-58dccc:#eef0ff;--omni-paint-surface-183c68:#fff;--omni-paint-line-315885:#dde1eb;--omni-paint-ink-afd7fa:#252831;--omni-paint-ink-76b5e2:#626e80;--omni-paint-surface-5966d4:#eef0ff;--omni-paint-ink-9fc3ef:#626e80;--omni-paint-ink-718fb7:#626e80;--omni-paint-line-233a61:#dde1eb;--omni-paint-ink-839bbd:#626e80;--omni-paint-ink-52d5fa:#626e80;--omni-paint-line-61dbff:#dde1eb;--omni-paint-line-29467a:#dde1eb;--omni-paint-ink-b6c9e8:#626e80;--omni-paint-surface-1c53ad66:#eef0ff66;--omni-paint-surface-122b51:#fff;--omni-paint-surface-0c1b36:#fff;--omni-paint-shadow-7abaff15:#00000005;--omni-paint-shadow-0002:#00000009;--omni-paint-surface-3d97ff:#eef0ff;--omni-paint-shadow-3dbaff:#0000001f;--omni-paint-ink-6e91c3:#626e80;--omni-paint-surface-173c73:#fff;--omni-paint-ink-4dccff:#626e80;--omni-paint-shadow-1d87ff22:#00000009;--omni-paint-ink-b99bff:#626e80;--omni-paint-surface-34295b:#fff;--omni-paint-ink-56e7db:#626e80;--omni-paint-surface-113f51:#fff;--omni-paint-ink-e1efff:#252831;--omni-paint-ink-839fca:#626e80;--omni-paint-ink-7f9ec5:#626e80;--omni-paint-line-548ad1:#dde1eb;--omni-paint-surface-173363:#fff;--omni-paint-surface-0e1d39:#fff;--omni-paint-surface-0a162d:#f5f6fa;--omni-paint-shadow-80aaff08:#00000002;--omni-paint-surface-4193f5:#eef0ff;--omni-paint-shadow-2e91ee77:#0000001e;--omni-paint-ink-d4e7ff:#252831;--omni-paint-surface-50c9ff:#eef0ff;--omni-paint-shadow-4cb8ff:#0000001f;--omni-paint-ink-47bff4:#626e80;--omni-paint-line-2c4775:#dde1eb;--omni-paint-surface-122b50:#fff;--omni-paint-ink-a4ceff:#252831;--omni-paint-surface-08152d:#f5f6fa;--omni-paint-line-243b63:#dde1eb;--omni-paint-ink-7799c4:#626e80;--omni-paint-surface-244d8c:#eef0ff;--omni-paint-ink-d5edff:#252831;--omni-paint-surface-0d2040:#fff;--omni-paint-line-2b4671:#dde1eb;--omni-paint-ink-9db9dc:#626e80;--omni-paint-ink-def5ff:#252831;--omni-paint-ink-8eb2d4:#626e80;--omni-paint-ink-9ab1d2:#626e80;--omni-paint-ink-6185ae:#626e80;--omni-paint-ink-7692bc:#626e80;--omni-paint-chart-203755:#e7eaf2;--omni-paint-chart-57edee:#4b5fff;--omni-paint-ink-738daf:#626e80;--omni-paint-ink-8da9cc:#626e80;--omni-paint-chart-e3f0ff:#4b5fff;--omni-paint-line-203352:#dde1eb;--omni-paint-ink-9db4d7:#626e80;--omni-paint-ink-dfebff:#252831;--omni-paint-ink-6f8fb8:#626e80;--omni-paint-ink-9eb5d8:#626e80;--omni-paint-surface-162947:#fff;--omni-paint-shadow-4b9eff33:#0000000d;--omni-paint-ink-c4dafa:#252831;--omni-paint-ink-87a6cd:#626e80;--omni-paint-ink-9fccff:#626e80;--omni-paint-ink-88a5ca:#626e80;--omni-paint-surface-1d8c94:#eef0ff;--omni-paint-line-31b3bc:#dde1eb;--omni-paint-surface-6352b1:#eef0ff;--omni-paint-line-8971df:#dde1eb;--omni-paint-surface-9a6433:#eef0ff;--omni-paint-line-d7a15d:#dde1eb;--omni-paint-surface-1c3156:#fff;--omni-paint-line-2b4771:#dde1eb;--omni-paint-surface-853d5b:#eef0ff;--omni-paint-line-b9698a:#dde1eb;--omni-paint-ink-b1c9e9:#626e80;--omni-paint-ink-6386b0:#626e80;--omni-paint-ink-adc8ed:#626e80;--omni-paint-ink-809dc3:#626e80;--omni-paint-line-1c3052:#dde1eb;--omni-paint-ink-9bb8dc:#626e80;--omni-paint-surface-203658:#fff;--omni-paint-line-69c5f7:#dde1eb;--omni-paint-surface-3885c3:#eef0ff;--omni-paint-surface-4b6fce:#eef0ff;--omni-paint-line-8eafff:#dde1eb;--omni-paint-surface-b75a83:#eef0ff;--omni-paint-line-eb92b4:#dde1eb;--omni-paint-line-bcecff:#dde1eb;--omni-paint-line-243655:#dde1eb;--omni-paint-ink-b1cae8:#626e80;--omni-paint-ink-edc897:#626e80;--omni-paint-ink-829bbf:#626e80;--omni-paint-ink-627fa8:#626e80;--omni-paint-ink-deb77c:#626e80;--omni-paint-surface-3c302d:#fff;--omni-paint-line-72563f:#dde1eb;--omni-paint-surface-3e302c:#fff;--omni-paint-line-815e3a:#dde1eb;--omni-paint-ink-e8b776:#626e80;--omni-paint-ink-5a85b9:#626e80;--omni-paint-ink-bdd9ff:#252831;--omni-paint-ink-7c9ac4:#626e80;--omni-paint-ink-d8eeff:#252831;--omni-paint-line-3566a0:#dde1eb;--omni-paint-line-294c77:#dde1eb;--omni-paint-surface-0c1b33:#fff;--omni-paint-ink-809bc3:#626e80;--omni-paint-ink-b9d8ff:#252831;--omni-paint-ink-69d1e4:#626e80;--omni-paint-ink-aac3e3:#626e80;--omni-paint-surface-163c6b:#fff;--omni-paint-line-3b679a:#dde1eb;--omni-paint-ink-c1dfff:#252831;--omni-paint-surface-14294b:#fff;--omni-paint-surface-0c1931:#f5f6fa;--omni-paint-line-3866a0:#dde1eb;--omni-paint-line-5acfff:#dde1eb;--omni-paint-shadow-397dd633:#0000000d;--omni-paint-line-3566a4:#dde1eb;--omni-paint-surface-13274a:#fff;--omni-paint-surface-0d1b33:#fff;--omni-paint-ink-a8bfdf:#626e80;--omni-paint-ink-6db9e8:#626e80;--omni-paint-ink-d8eaff:#252831;--omni-paint-surface-173d6d:#fff;--omni-paint-line-386599:#dde1eb;--omni-paint-ink-c0e3ff:#252831;--omni-paint-ink-b8ceeb:#252831;--omni-paint-line-33567f:#dde1eb;--omni-paint-ink-839fc3:#626e80;--omni-paint-ink-5de0c3:#626e80;--omni-paint-danger-f299ad:#b83a4a;--omni-paint-line-46b9ef:#dde1eb;--omni-paint-surface-14345255:#fff5;--omni-paint-ink-bad9ee:#252831;--omni-paint-line-756044:#dde1eb;--omni-paint-surface-342c2844:#fff4;--omni-paint-ink-e8c086:#626e80;--omni-paint-surface-0b1b34:#fff;--omni-paint-line-29466e:#dde1eb;--omni-paint-ink-86a6cf:#626e80;--omni-paint-ink-cae5ff:#252831;--omni-paint-line-388980:#dde1eb;--omni-paint-surface-10264a:#fff;--omni-paint-line-2a4878:#dde1eb;--omni-paint-ink-7bd8ff:#626e80;--omni-paint-ink-7fa2c8:#626e80}:root[data-omni-theme=dark]{--omni-paint-surface-112749:#102235;--omni-paint-surface-0d1b32:#102235;--omni-paint-line-29466d:#2c435b;--omni-paint-ink-83a6cf:#91a9bd;--omni-paint-ink-87b4de:#91a9bd;--omni-paint-ink-bfd4ed:#dceaf7;--omni-paint-ink-7297c1:#91a9bd;--omni-paint-surface-11243c:#102235;--omni-paint-line-254364:#2c435b;--omni-paint-ink-77b7bc:#91a9bd;--omni-paint-ink-f1be80:#91a9bd;--omni-paint-ink-799cc4:#91a9bd;--omni-paint-line-213856:#2c435b;--omni-paint-ink-b7d1ef:#dceaf7;--omni-paint-surface-233e67:#102235;--omni-paint-ink-9cbce2:#91a9bd;--omni-paint-surface-cfb660:#193954;--omni-paint-ink-18284a:#dceaf7;--omni-paint-ink-698dbb:#91a9bd;--omni-paint-surface-182d4e:#102235;--omni-paint-surface-6760f2:#193954;--omni-paint-surface-39d5ec:#193954;--omni-paint-ink-badbff:#dceaf7;--omni-paint-ink-7da1cc:#91a9bd;--omni-paint-line-274267:#2c435b;--omni-paint-surface-58dccc:#193954;--omni-paint-surface-183c68:#102235;--omni-paint-line-315885:#2c435b;--omni-paint-ink-afd7fa:#dceaf7;--omni-paint-ink-76b5e2:#91a9bd;--omni-paint-surface-5966d4:#193954;--omni-paint-ink-9fc3ef:#91a9bd;--omni-paint-ink-718fb7:#91a9bd;--omni-paint-line-233a61:#2c435b;--omni-paint-ink-839bbd:#91a9bd;--omni-paint-ink-52d5fa:#91a9bd;--omni-paint-line-61dbff:#2c435b;--omni-paint-line-29467a:#2c435b;--omni-paint-ink-b6c9e8:#91a9bd;--omni-paint-surface-1c53ad66:#19395466;--omni-paint-surface-122b51:#102235;--omni-paint-surface-0c1b36:#102235;--omni-paint-shadow-7abaff15:#00000005;--omni-paint-shadow-0002:#00000009;--omni-paint-surface-3d97ff:#193954;--omni-paint-shadow-3dbaff:#0000001f;--omni-paint-ink-6e91c3:#91a9bd;--omni-paint-surface-173c73:#102235;--omni-paint-ink-4dccff:#91a9bd;--omni-paint-shadow-1d87ff22:#00000009;--omni-paint-ink-b99bff:#91a9bd;--omni-paint-surface-34295b:#102235;--omni-paint-ink-56e7db:#91a9bd;--omni-paint-surface-113f51:#102235;--omni-paint-ink-e1efff:#dceaf7;--omni-paint-ink-839fca:#91a9bd;--omni-paint-ink-7f9ec5:#91a9bd;--omni-paint-line-548ad1:#2c435b;--omni-paint-surface-173363:#102235;--omni-paint-surface-0e1d39:#102235;--omni-paint-surface-0a162d:#0b1727;--omni-paint-shadow-80aaff08:#00000002;--omni-paint-surface-4193f5:#193954;--omni-paint-shadow-2e91ee77:#0000001e;--omni-paint-ink-d4e7ff:#dceaf7;--omni-paint-surface-50c9ff:#193954;--omni-paint-shadow-4cb8ff:#0000001f;--omni-paint-ink-47bff4:#91a9bd;--omni-paint-line-2c4775:#2c435b;--omni-paint-surface-122b50:#102235;--omni-paint-ink-a4ceff:#dceaf7;--omni-paint-surface-08152d:#0b1727;--omni-paint-line-243b63:#2c435b;--omni-paint-ink-7799c4:#91a9bd;--omni-paint-surface-244d8c:#193954;--omni-paint-ink-d5edff:#dceaf7;--omni-paint-surface-0d2040:#102235;--omni-paint-line-2b4671:#2c435b;--omni-paint-ink-9db9dc:#91a9bd;--omni-paint-ink-def5ff:#dceaf7;--omni-paint-ink-8eb2d4:#91a9bd;--omni-paint-ink-9ab1d2:#91a9bd;--omni-paint-ink-6185ae:#91a9bd;--omni-paint-ink-7692bc:#91a9bd;--omni-paint-chart-203755:#2c435b;--omni-paint-chart-57edee:#6fa7ff;--omni-paint-ink-738daf:#91a9bd;--omni-paint-ink-8da9cc:#91a9bd;--omni-paint-chart-e3f0ff:#6fa7ff;--omni-paint-line-203352:#2c435b;--omni-paint-ink-9db4d7:#91a9bd;--omni-paint-ink-dfebff:#dceaf7;--omni-paint-ink-6f8fb8:#91a9bd;--omni-paint-ink-9eb5d8:#91a9bd;--omni-paint-surface-162947:#102235;--omni-paint-shadow-4b9eff33:#0000000d;--omni-paint-ink-c4dafa:#dceaf7;--omni-paint-ink-87a6cd:#91a9bd;--omni-paint-ink-9fccff:#91a9bd;--omni-paint-ink-88a5ca:#91a9bd;--omni-paint-surface-1d8c94:#193954;--omni-paint-line-31b3bc:#2c435b;--omni-paint-surface-6352b1:#193954;--omni-paint-line-8971df:#2c435b;--omni-paint-surface-9a6433:#193954;--omni-paint-line-d7a15d:#2c435b;--omni-paint-surface-1c3156:#102235;--omni-paint-line-2b4771:#2c435b;--omni-paint-surface-853d5b:#193954;--omni-paint-line-b9698a:#2c435b;--omni-paint-ink-b1c9e9:#91a9bd;--omni-paint-ink-6386b0:#91a9bd;--omni-paint-ink-adc8ed:#91a9bd;--omni-paint-ink-809dc3:#91a9bd;--omni-paint-line-1c3052:#2c435b;--omni-paint-ink-9bb8dc:#91a9bd;--omni-paint-surface-203658:#102235;--omni-paint-line-69c5f7:#2c435b;--omni-paint-surface-3885c3:#193954;--omni-paint-surface-4b6fce:#193954;--omni-paint-line-8eafff:#2c435b;--omni-paint-surface-b75a83:#193954;--omni-paint-line-eb92b4:#2c435b;--omni-paint-line-bcecff:#2c435b;--omni-paint-line-243655:#2c435b;--omni-paint-ink-b1cae8:#91a9bd;--omni-paint-ink-edc897:#91a9bd;--omni-paint-ink-829bbf:#91a9bd;--omni-paint-ink-627fa8:#91a9bd;--omni-paint-ink-deb77c:#91a9bd;--omni-paint-surface-3c302d:#102235;--omni-paint-line-72563f:#2c435b;--omni-paint-surface-3e302c:#102235;--omni-paint-line-815e3a:#2c435b;--omni-paint-ink-e8b776:#91a9bd;--omni-paint-ink-5a85b9:#91a9bd;--omni-paint-ink-bdd9ff:#dceaf7;--omni-paint-ink-7c9ac4:#91a9bd;--omni-paint-ink-d8eeff:#dceaf7;--omni-paint-line-3566a0:#2c435b;--omni-paint-line-294c77:#2c435b;--omni-paint-surface-0c1b33:#102235;--omni-paint-ink-809bc3:#91a9bd;--omni-paint-ink-b9d8ff:#dceaf7;--omni-paint-ink-69d1e4:#91a9bd;--omni-paint-ink-aac3e3:#91a9bd;--omni-paint-surface-163c6b:#102235;--omni-paint-line-3b679a:#2c435b;--omni-paint-ink-c1dfff:#dceaf7;--omni-paint-surface-14294b:#102235;--omni-paint-surface-0c1931:#0b1727;--omni-paint-line-3866a0:#2c435b;--omni-paint-line-5acfff:#2c435b;--omni-paint-shadow-397dd633:#0000000d;--omni-paint-line-3566a4:#2c435b;--omni-paint-surface-13274a:#102235;--omni-paint-surface-0d1b33:#102235;--omni-paint-ink-a8bfdf:#91a9bd;--omni-paint-ink-6db9e8:#91a9bd;--omni-paint-ink-d8eaff:#dceaf7;--omni-paint-surface-173d6d:#102235;--omni-paint-line-386599:#2c435b;--omni-paint-ink-c0e3ff:#dceaf7;--omni-paint-ink-b8ceeb:#dceaf7;--omni-paint-line-33567f:#2c435b;--omni-paint-ink-839fc3:#91a9bd;--omni-paint-ink-5de0c3:#91a9bd;--omni-paint-danger-f299ad:#ff8996;--omni-paint-line-46b9ef:#2c435b;--omni-paint-surface-14345255:#10223555;--omni-paint-ink-bad9ee:#dceaf7;--omni-paint-line-756044:#2c435b;--omni-paint-surface-342c2844:#10223544;--omni-paint-ink-e8c086:#91a9bd;--omni-paint-surface-0b1b34:#102235;--omni-paint-line-29466e:#2c435b;--omni-paint-ink-86a6cf:#91a9bd;--omni-paint-ink-cae5ff:#dceaf7;--omni-paint-line-388980:#2c435b;--omni-paint-surface-10264a:#102235;--omni-paint-line-2a4878:#2c435b;--omni-paint-ink-7bd8ff:#91a9bd;--omni-paint-ink-7fa2c8:#91a9bd}
@@ -0,0 +1 @@
1
+ import{n as e}from"./check-qCcwSYDE.js";import{t}from"./arrow-right-DMEu-HBO.js";import{t as n}from"./arrow-up-right-Bi_SzYu1.js";import{t as r}from"./chevron-right-DqmFJybY.js";import{a as i,c as a,l as o,o as s,s as c,u as l}from"./create-intent-9uYVhJHt.js";import{a as u,n as d,o as f,r as p}from"./products-fIIO39ry.js";import{t as m}from"./layers-shcwXKIH.js";import{t as h}from"./project-execution-DMEIpSz3.js";import{t as g}from"./refresh-cw-C_4G0Mri.js";import{t as _}from"./search-CUzSX_06.js";import{a as v,g as y,o as b,p as x,u as S}from"./index-Cez2mr3h.js";import{n as C}from"./module-host-CyMfvPpR.js";import{n as w}from"./workspace-view-state-CRfq5jgZ.js";import"./public-BlU5YmdO.js";import"./ui-public-9lmhhAop.js";import"./demand-planning-client-cRvN3aET.js";import{n as T,t as E}from"./activity-BV0UMcx6.js";import{t as D}from"./group-eZxxe_Hb.js";var O=S(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),k=S(`coins`,[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]),A=S(`orbit`,[[`path`,{d:`M20.341 6.484A10 10 0 0 1 10.266 21.85`,key:`1enhxb`}],[`path`,{d:`M3.659 17.516A10 10 0 0 1 13.74 2.152`,key:`1crzgf`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}]]),j=S(`scan-line`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}]]),M=y(x(),1),N={activity:`_activity_k9yph_1`,panel:`_panel_k9yph_1`},P=v();function F({mode:e,api:n,onOpen:r}){let[i,a]=(0,M.useState)([]),[o,s]=(0,M.useState)(!0),[c,l]=(0,M.useState)(``),[u,d]=(0,M.useState)(0),[f,p]=w(`workbench.`+e+`.search`,``);(0,M.useEffect)(()=>{let e=!0;return n(`/command-center`).then(t=>{let n=t?.projects;if(!Array.isArray(n))throw Error(`项目状态返回格式异常`);e&&(a(n.filter(e=>!e.simulated)),l(``))}).catch(t=>{e&&(a([]),l(t instanceof Error?t.message:`项目状态读取失败`))}).finally(()=>{e&&s(!1)}),()=>{e=!1}},[n,u]);let m=E(i),h=T(i),g=e=>e.toLowerCase().includes(f.trim().toLowerCase());return(0,P.jsxs)(`section`,{className:N.activity,children:[(0,P.jsxs)(`header`,{children:[(0,P.jsx)(`h1`,{children:e===`tasks`?`待处理事项`:`执行记录`}),(0,P.jsxs)(`label`,{children:[(0,P.jsx)(_,{size:16}),(0,P.jsx)(`input`,{"aria-label":`搜索工作台事项与记录`,value:f,onChange:e=>p(e.target.value),placeholder:`搜索项目或事项`})]})]}),c&&(0,P.jsxs)(`p`,{role:`alert`,children:[c,` `,(0,P.jsx)(`button`,{onClick:()=>{s(!0),d(e=>e+1)},children:`重试`})]}),o?(0,P.jsx)(`p`,{role:`status`,children:`正在读取项目状态…`}):(0,P.jsx)(`div`,{className:N.panel,children:e===`tasks`?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`h2`,{children:[`需要你处理 · `,m.length,` 项`]}),m.filter(({project:e,step:t})=>g(e.name+t.name)).slice(0,30).map(({project:e,step:n})=>(0,P.jsxs)(`button`,{onClick:()=>r(e.id,n.target),children:[(0,P.jsxs)(`span`,{children:[(0,P.jsxs)(`b`,{children:[n.name,` · `,n.state===`attention`?`待复核`:`待确认`]}),(0,P.jsxs)(`small`,{children:[e.name,` · `,n.description]})]}),(0,P.jsx)(t,{size:16})]},e.id+n.id)),!m.length&&(0,P.jsx)(`p`,{children:c?`连接恢复后显示待处理事项。`:`当前没有待复核或待确认的阶段。`})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`h2`,{children:`项目执行与确认记录`}),h.filter(({project:e,event:t})=>g(e.name+t.name)).slice(0,50).map(({project:e,event:n},i)=>(0,P.jsxs)(`button`,{onClick:()=>r(e.id,{tab:`wiki`}),children:[(0,P.jsxs)(`span`,{children:[(0,P.jsxs)(`b`,{children:[n.name,` · `,n.state]}),(0,P.jsxs)(`small`,{children:[e.name,` · `,new Date(n.at).toLocaleString(`zh-CN`)]})]}),(0,P.jsx)(t,{size:16})]},e.id+n.at+i)),!h.length&&(0,P.jsx)(`p`,{children:c?`连接恢复后显示执行记录。`:`当前没有执行记录。`})]})})]})}async function I(e){let[t,n]=await Promise.all([e(`/growth-center`),e(`/command-center`)]),r=t,i=n.projects;if(!Array.isArray(r?.products)||!Array.isArray(r?.catalog)||!Array.isArray(i))throw Error(`经营资料返回格式异常`);return{growth:r,projects:i}}var L={refunds:`同期支付订单的退款`,product:`货品成本`,fulfillment:`运费与履约`,platform:`平台费用`,ads:`广告花费`,tax:`税费`,other:`其他变动费用`,fixed:`固定费用分摊`},R=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`;function ee({metrics:t,products:r,projects:i,ready:a,onOpen:o,onNav:s,onAssign:c,demo:u}){let[d,f]=(0,M.useState)(``),[p,h]=(0,M.useState)(``),g=t?.sales||[],_=g.find(e=>e.id===p)||g[0],v=(t?.finance||[]).filter(e=>!_||e.start===_.start&&e.end===_.end),y=v.find(e=>e.scope?.type===`shop`&&(u||e.project===_?.project)),x=v.filter(e=>e.scope?.type===`item`&&(u||e.project===_?.project)),S=x.filter(e=>e.complete),C=S.filter(e=>e.profit>0),w=S.filter(e=>e.profit<0),T=S.filter(e=>e.profit===0),E=t?.incubation||[],D=E.filter(e=>e.success),j=i.reduce((e,t)=>e+t.running,0),N=[{id:`sales`,label:`店铺销售额`,value:_?R(_.total):`暂无记录`,unit:_?`元`:``,note:_?`${_.start} — ${_.end}`:`先归档全店销售数据`,Icon:e},{id:`profit`,label:`店铺利润`,value:y?.complete?R(y.profit):`缺成本资料`,unit:y?.complete?`元`:``,note:`已列成本口径经营结余 · 点击核对`,Icon:k},{id:`links`,label:`盈利 / 亏损链接`,value:S.length?`${C.length} / ${w.length}`:`尚未核算`,unit:S.length?`个`:``,note:`${S.length} 个有核算结果 · ${T.length} 个持平`,Icon:m},{id:`incubation`,label:`孵化晋级记录`,value:E.length?`${D.length} / ${E.length}`:`尚无记录`,unit:E.length?`个`:``,note:`已记录晋级 / 累计纳入 · 不代表成功率`,Icon:A},{id:`tasks`,label:`正在执行的任务`,value:a?j:`—`,unit:`个`,note:`${i.filter(e=>e.complete).length} 个项目流程已确认`,Icon:O}];function F(e){if(e===`tasks`){s(`projects`);return}f(d===e?``:e)}let I=e=>u?`data:application/json;charset=utf-8,`+encodeURIComponent(JSON.stringify(e,null,2)):`/api/workbench/`+e.project+`/file/`+(e.artifactId||e.id);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(l,{group:`cockpit.kpis`,className:`gc-kpis`,children:N.map(e=>(0,P.jsx)(`div`,{"data-layout-label":e.label,children:(0,P.jsxs)(`button`,{className:`gc-kpi gc-kpi-`+e.id+` `+(d===e.id?`is-open`:``),onClick:()=>F(e.id),"aria-expanded":d===e.id,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`gc-kpi-icon`,children:(0,P.jsx)(e.Icon,{size:21})}),(0,P.jsx)(`span`,{children:e.label}),(0,P.jsx)(n,{size:13})]}),(0,P.jsxs)(`strong`,{className:String(e.value).length>9?`gc-long-value`:``,children:[e.value,(0,P.jsx)(`small`,{children:e.unit})]}),(0,P.jsx)(`p`,{children:e.note})]},e.id)},e.id))}),d&&(0,P.jsxs)(`section`,{className:`gb-detail`,"aria-label":`经营指标明细`,children:[(0,P.jsxs)(`header`,{children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:u?`演示数据 · 不代表真实经营结果`:`归档数据 · 以原件日期和来源为准`}),(0,P.jsxs)(`h2`,{children:[N.find(e=>e.id===d)?.label,` · 明细与下一步`]})]}),(0,P.jsx)(`button`,{"aria-label":`关闭指标明细`,onClick:()=>f(``),children:(0,P.jsx)(b,{size:18})})]}),d===`sales`&&(0,P.jsxs)(P.Fragment,{children:[g.length>1&&(0,P.jsxs)(`label`,{children:[`选择统计记录`,(0,P.jsx)(`select`,{"aria-label":`销售统计记录`,value:_?.id||``,onChange:e=>h(e.target.value),children:g.map(e=>(0,P.jsxs)(`option`,{value:e.id,children:[e.projectName,` · `,e.start,` ~ `,e.end]},e.id))})]}),_?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:_.basis}),(0,P.jsxs)(`p`,{children:[`统计范围:`,_.scopeLabel,` · `,_.count,` 个链接 · `,_.identity,`。`,_.mode===`unverified`?`来源未完成独立核验。`:``]}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品 / 分类`}),(0,P.jsx)(`th`,{children:`支付销售额`}),(0,P.jsx)(`th`,{children:`链接数`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:_.breakdown.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.name}),(0,P.jsxs)(`td`,{children:[`¥ `,R(e.sales)]}),(0,P.jsx)(`td`,{children:e.count}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>e.itemId?o(e.project,{tab:`monitor`,itemId:e.itemId}):o(_.project,{tab:`data`}),children:e.itemId?`看商品表现`:`核对来源数据`})})]},e.name))})]})}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:先看销售贡献高的商品,再核对退款和成本,决定继续推广还是调整商品。`}),(0,P.jsx)(`a`,{href:I(_),download:u?`模拟销售账本.json`:void 0,children:`查看原始记录`})]}):(0,P.jsx)(`p`,{children:`当前没有全店销售记录。先到数据中心归档同一店铺、同一统计窗口的数据。`}),(0,P.jsx)(`button`,{onClick:()=>s(`data`),children:`进入数据中心`})]}),d===`profit`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`计算:支付销售额 − 同支付订单退款 − 货品、履约、平台、广告、税费、其他费用 − 固定费用分摊。结果是已列成本口径经营结余。`}),y?.complete?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`gb-costs`,children:[Object.entries(y.amounts).map(([e,t])=>(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{children:e===`gross`?`支付销售额`:L[e]}),(0,P.jsxs)(`b`,{children:[`¥ `,R(t)]})]},e)),(0,P.jsxs)(`div`,{className:`gb-profit`,children:[(0,P.jsx)(`span`,{children:`经营结余`}),(0,P.jsxs)(`b`,{children:[`¥ `,R(y.profit)]})]})]}),(0,P.jsx)(`a`,{href:I(y),download:u?`模拟利润账本.json`:void 0,children:`查看核算原件`})]}):(0,P.jsxs)(`div`,{className:`gb-gap`,children:[(0,P.jsx)(`b`,{children:`没有完整的真实店铺成本账本,不能计算利润。`}),(0,P.jsx)(`p`,{children:`需要补齐:货品、运费、平台、广告、税费、其他费用、固定费用分摊,以及同支付订单退款。明确没有发生的费用填0,未知项留空。`})]}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:核对金额和凭证;若亏损,先查看费用占比与亏损商品,再进入商品优化评估原因。`}),(0,P.jsx)(`button`,{onClick:()=>o(y?.project||_?.project||i[0]?.id,{tab:`finance`}),disabled:!i.length,children:`打开经营核算`})]}),d===`links`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`按同周期、完整成本账本判断:结余大于0为盈利,小于0为亏损,等于0为持平;缺成本的商品不计入盈亏。当前仅统计有账本的范围。`}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品`}),(0,P.jsx)(`th`,{children:`销售额`}),(0,P.jsx)(`th`,{children:`经营结余`}),(0,P.jsx)(`th`,{children:`状态`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:x.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsxs)(`td`,{children:[e.projectName,(0,P.jsx)(`small`,{children:e.scope.id})]}),(0,P.jsxs)(`td`,{children:[`¥ `,R(e.gross)]}),(0,P.jsx)(`td`,{children:e.complete?`¥ `+R(e.profit):`费用不全`}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`span`,{className:e.profit<0?`gb-loss`:`gb-win`,children:e.complete?e.profit>0?`盈利`:e.profit<0?`亏损`:`持平`:`待核算`})}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>o(e.project,{tab:e.complete?`optimization`:`finance`,itemId:e.scope.id}),children:e.complete?`查看并优化`:`补齐费用`})})]},e.id))})]})}),!x.length&&(0,P.jsx)(`p`,{children:`还没有商品级真实账本。当前看板商品不能仅凭销售额判定盈亏。`}),(0,P.jsx)(`button`,{disabled:!i.length,onClick:()=>o(_?.project||i[0]?.id,{tab:`finance`}),children:`补充商品成本账本`})]}),d===`incubation`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`p`,{children:`这里只统计已保存的运营晋级记录与累计纳入数量,不计算经营成功率。未晋级可能仍在观察,不代表失败;每条记录需要核对标准、证据和观察时间,不能推断可复制收益。`}),(0,P.jsxs)(`div`,{className:`gb-inc-summary`,children:[(0,P.jsxs)(`b`,{children:[D.length,(0,P.jsx)(`small`,{children:`达标晋级`})]}),(0,P.jsx)(`span`,{children:`/`}),(0,P.jsxs)(`b`,{children:[E.length,(0,P.jsx)(`small`,{children:`纳入孵化`})]})]}),(0,P.jsx)(`div`,{className:`gb-table`,children:(0,P.jsxs)(`table`,{children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:`商品`}),(0,P.jsx)(`th`,{children:`加入时间`}),(0,P.jsx)(`th`,{children:`结果`}),(0,P.jsx)(`th`,{children:`老师标准与依据`}),(0,P.jsx)(`th`,{children:`下一步`})]})}),(0,P.jsx)(`tbody`,{children:E.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.itemId}),(0,P.jsx)(`td`,{children:e.started.slice(0,10)}),(0,P.jsx)(`td`,{children:e.success?`达标晋级`:`继续观察`}),(0,P.jsxs)(`td`,{className:`gb-wrap`,children:[e.standard||`待记录老师标准`,(0,P.jsx)(`small`,{children:e.evidence||`尚无达标证据`})]}),(0,P.jsx)(`td`,{children:(0,P.jsx)(`button`,{onClick:()=>{let t=r.find(t=>t.itemId===e.itemId&&t.project===e.project);t?c(t):o(e.project,{tab:`data`})},children:e.success?`查看运营分组`:`核对并晋级`})})]},e.key))})]})}),!E.length&&(0,P.jsx)(`p`,{children:`还没有新品进入孵化的记录,暂不能评价。`}),(0,P.jsx)(`p`,{className:`gb-next`,children:`下一步:先把新品加入“新品测试”;达标后选择下一运营分组,填写老师标准与达标依据。单纯换组不计为已记录达标晋级。`}),(0,P.jsx)(`button`,{disabled:!r.length,onClick:()=>c(r.find(e=>e.tier===`unassigned`)||r[0],`test`),children:`登记新品,开始孵化`})]})]})]})}var z=e=>Math.abs(e)>=1e4?(e/1e4).toFixed(1)+`万`:B(e),B=e=>typeof e==`number`?e.toLocaleString(`zh-CN`,{maximumFractionDigits:2}):`—`,V={scale:`#35dcca`,incubate:`#9880ff`,test:`#438bff`,unassigned:`var(--omni-muted,#91a9bd)`},H={scale:`重点推广`,incubate:`持续孵化`,test:`新品测试`,unassigned:`待分组`},U=[{id:`business`,label:`经营分析`,note:`查看商品经营趋势、销售构成和运营分组。`},{id:`projects`,label:`项目总览`,note:`全局看进度,卡片看状态,进入节点主流程继续推进。`},{id:`tasks`,label:`待办与任务`,note:`集中查看运营任务、巡店提醒和需要你处理的事项。`},{id:`history`,label:`复盘动态`,note:`回看项目阶段与历史记录,核对过程和依据。`}],W={done:`已确认`,review:`待确认`,attention:`需处理`,todo:`未开始`,stopped:`已停止`};function G({title:e,sub:t,children:n}){return(0,P.jsxs)(`div`,{className:`gc-panel-head`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`h2`,{children:[(0,P.jsx)(`span`,{}),` `,e]}),(0,P.jsx)(`small`,{children:t})]}),n]})}function te({series:t,days:r,onOpen:i}){let[a,o]=(0,M.useState)(null),s=t?.points||[],c=Date.parse(s.at(-1)?.date)-(r-1)*864e5,l=s.filter(e=>Date.parse(e.date)>=c),u=l.filter(e=>e.value!==null).map(e=>e.value);if(!u.length)return(0,P.jsxs)(`div`,{className:`gc-chart-empty`,children:[(0,P.jsx)(e,{size:38}),(0,P.jsx)(`b`,{children:`这段时间还没有可用数据`}),(0,P.jsx)(`span`,{children:`进入商品监控,查看数据来源与日期`}),(0,P.jsxs)(`button`,{onClick:i,children:[`查看商品监控 `,(0,P.jsx)(n,{size:13})]})]});let d=Math.min(0,...u),f=Math.max(1,...u)-d,p=e=>54+(Date.parse(e.date)-c)/(Math.max(1,r-1)*864e5)*690,m=e=>220-(e-d)/f*180,h=null,g=[];return l.forEach(e=>{if(e.value===null){h=null;return}h&&Date.parse(e.date)-Date.parse(h.date)===864e5&&g.push((0,P.jsx)(`line`,{x1:p(h),y1:m(h.value),x2:p(e),y2:m(e.value)},e.date)),h=e}),(0,P.jsxs)(`div`,{className:`gc-chart`,children:[(0,P.jsxs)(`div`,{className:`gc-chart-reading`,children:[(0,P.jsxs)(`strong`,{children:[B(a?.value??l.at(-1)?.value),(0,P.jsx)(`small`,{children:t.unit})]}),(0,P.jsxs)(`span`,{children:[a?.date||l.at(-1)?.date,` · `,t.name]}),(0,P.jsx)(`i`,{children:`柱与线均为同一指标`})]}),(0,P.jsxs)(`svg`,{viewBox:`0 0 780 255`,role:`img`,"aria-label":`${t.name},最近${r}天归档趋势,缺失不补零`,children:[(0,P.jsx)(`defs`,{children:(0,P.jsxs)(`linearGradient`,{id:`gc-bar`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,P.jsx)(`stop`,{stopColor:`#5ec9ff`}),(0,P.jsx)(`stop`,{offset:`1`,stopColor:`#2857d6`,stopOpacity:`.3`})]})}),[0,.25,.5,.75,1].map(e=>(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`line`,{className:`gc-gridline`,x1:`54`,x2:`750`,y1:m(d+f*e),y2:m(d+f*e)}),(0,P.jsx)(`text`,{x:`42`,y:m(d+f*e)+4,textAnchor:`end`,children:z(d+f*e)})]},e)),l.map(e=>e.value===null?null:(0,P.jsxs)(`g`,{onMouseEnter:()=>o(e),onMouseLeave:()=>o(null),children:[(0,P.jsx)(`rect`,{x:p(e)-Math.min(8,230/r),y:Math.min(m(0),m(e.value)),width:Math.min(16,460/r),height:Math.max(1,Math.abs(m(0)-m(e.value))),rx:`2`,fill:`url(#gc-bar)`}),(0,P.jsx)(`circle`,{cx:p(e),cy:m(e.value),r:`3`,fill:`#6ceeff`}),(0,P.jsxs)(`title`,{children:[e.date,`:`,B(e.value),` `,t.unit]})]},e.date)),(0,P.jsx)(`g`,{className:`gc-line`,children:g}),[0,.25,.5,.75,1].map(e=>(0,P.jsx)(`text`,{x:54+690*e,y:`247`,textAnchor:`middle`,children:new Date(c+(r-1)*864e5*e).toISOString().slice(5,10)},e))]})]})}function K(e){return(0,P.jsx)(a,{scope:e.layoutScope,onDirty:e.onDirty,children:(0,P.jsx)(q,{...e})})}function q({products:e,projects:t,catalog:i,ready:a,onAction:s,onAssign:d,onOpen:p,onNav:m,onTier:h,onCreate:g,onExecute:_,metrics:v,demo:y}){let[b,x]=w(`workbench.cockpit.tab`,`business`),S=U.find(e=>e.id===b)||U[0],C=(0,M.useRef)(null);function T(e){let t=U.findIndex(e=>e.id===S.id),n=e.key===`ArrowRight`?(t+1)%U.length:e.key===`ArrowLeft`?(t+U.length-1)%U.length:e.key===`Home`?0:e.key===`End`?U.length-1:-1;n<0||(e.preventDefault(),x(U[n].id),(C.current?.querySelectorAll(`[role=tab]`)[n])?.focus())}let[E,D]=w(`workbench.productKey`,``),[O,k]=w(`workbench.metric`,``),[A,N]=w(`workbench.days`,30),[F,I]=w(`workbench.timelineDays`,14),[L,R]=(0,M.useState)(null),B=e.find(e=>e.key===E)||e.find(e=>e.demoCurrent)||e[0],K=B?.series.find(e=>e.key===O)||B?.series.find(e=>[`paid`,`payAmt`,`sales`,`gmv`].includes(e.metric))||B?.series.find(e=>e.metric===`buyers`)||B?.series[0],q=t.reduce((e,t)=>e+t.running,0),ae=t.reduce((e,t)=>e+t.pending,0),J=e.filter(e=>u(e)),Y=Object.keys(H).map(t=>({id:t,name:H[t],count:e.filter(e=>e.tier===t).length})),oe=0,se=Y.map(t=>{let n={...t,offset:oe,length:e.length?t.count/e.length*314.16:0};return oe+=n.length,n}),ce=t.filter(e=>e.replay?.some(e=>Number.isFinite(Date.parse(e.at)))).sort((e,t)=>String(t.updated).localeCompare(String(e.updated))),X=Math.max(0,...ce.flatMap(e=>e.replay.map(e=>Date.parse(e.at)).filter(Number.isFinite))),Z=X-(F-1)*864e5,le=[{label:`待选择运营分组`,items:e.filter(e=>e.tier===`unassigned`),color:`#8097b8`},{label:`数据需更新`,items:e.filter(e=>e.work?.needsUpdate),color:`#f3ba66`},{label:`任务需检查`,items:e.filter(e=>e.work?.problems?.length),color:`#f581a7`},{label:`近期运行中`,items:e.filter(e=>e.work?.active?.length),color:`#3ddad7`}],Q=v?.sales?.[0],$=(Q?.breakdown||[]).filter(e=>typeof e.sales==`number`).slice().sort((e,t)=>t.sales-e.sales).slice(0,8),ue=$.length>0&&$.every(e=>e.itemId),de=Math.max(1,...$.map(e=>e.sales));return(0,P.jsxs)(`div`,{className:`gc`,children:[(0,P.jsx)(o,{enabled:[`business`,`projects`].includes(S.id),groups:[`cockpit.kpis`,...S.id===`projects`?[`projects.modules`,`projects.stats`,`projects.cards`]:[`cockpit.business`]]}),(0,P.jsx)(ee,{metrics:v,products:e,projects:t,ready:a,onOpen:p,onNav:m,onAssign:d,demo:y}),(0,P.jsxs)(`div`,{className:`gc-tabs-heading`,children:[(0,P.jsx)(`div`,{role:`tablist`,"aria-label":`工作台分类`,className:`gc-tabs`,"data-layout-control":!0,ref:C,onKeyDown:T,children:U.map(e=>(0,P.jsx)(`button`,{role:`tab`,id:`gc-tab-`+e.id,"aria-controls":`gc-panel-`+e.id,"aria-selected":S.id===e.id,tabIndex:S.id===e.id?0:-1,onClick:()=>x(e.id),children:e.label},e.id))}),S.id===`projects`&&(0,P.jsxs)(`div`,{className:`pb-heading-actions`,children:[(0,P.jsxs)(`button`,{className:`pb-all-projects`,onClick:()=>m(`projects`),children:[`查看全部项目 `,(0,P.jsx)(n,{size:14})]}),(0,P.jsx)(`button`,{className:`pb-create`,onClick:g,children:`+ 新建项目`})]})]}),(0,P.jsx)(`p`,{className:`gc-tab-description`,children:S.note}),(0,P.jsxs)(`div`,{role:`tabpanel`,id:`gc-panel-`+S.id,"aria-labelledby":`gc-tab-`+S.id,tabIndex:0,className:`gc-tab-panel gc-tab-`+S.id,children:[S.id===`projects`&&(0,P.jsx)(c,{onExecute:_,projects:t,ready:a,onOpen:p,onCreate:g,showHeading:!1,previewLimit:8,onAllProjects:()=>m(`projects`)}),S.id===`tasks`&&(0,P.jsx)(`div`,{className:`gc-quick-tiers`,"aria-label":`运营策略任务速览`,children:[`test`,`incubate`,`scale`].map(t=>{let i=e.filter(e=>e.tier===t),a=i.filter(e=>e.work?.active?.length),o=i.filter(e=>u(e)),c=i.find(e=>e.demoCurrent)||a[0]||i[0];return(0,P.jsxs)(`section`,{style:{"--tier":V[t]},children:[(0,P.jsxs)(`header`,{children:[(0,P.jsx)(`b`,{children:H[t]}),(0,P.jsxs)(`span`,{children:[i.length,`个商品 · `,a.length,`个运行中`]}),(0,P.jsx)(`button`,{onClick:()=>h(t),"aria-label":`查看`+H[t]+`全部商品`,children:(0,P.jsx)(r,{size:14})})]}),(0,P.jsxs)(`button`,{className:`gc-quick-line`,disabled:!c,onClick:()=>s(c,`work`),children:[(0,P.jsx)(`em`,{children:`正在做`}),(0,P.jsxs)(`span`,{children:[c?c.demoCurrent||f(c):`等待商品加入`,c&&(0,P.jsx)(`small`,{children:c.projectName})]})]}),(0,P.jsxs)(`button`,{className:`gc-quick-line`,onClick:()=>c?s(c,`data`):d(null,t),children:[(0,P.jsx)(`em`,{children:`下一步`}),(0,P.jsx)(`span`,{children:c?.demoNext||(t===`test`?`核对点击和加购,选出潜力款`:t===`incubate`?`核对转化与成本,确认是否赚钱`:`检查推广效果,优化计划`)}),(0,P.jsx)(r,{size:12})]}),(0,P.jsxs)(`button`,{className:`gc-quick-alert `+(o.length?`has-issues`:``),onClick:()=>o.length?s(o[0],`work`):h(t),children:[o.length?`需要你处理 `+o.length+` 项 · `+u(o[0]):`暂无待处理提醒`,(0,P.jsx)(n,{size:12})]})]},t)})}),(0,P.jsxs)(l,{group:`cockpit.`+S.id,className:`gc-main-grid`,children:[S.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`商品经营趋势`,className:`gc-panel gc-sales`,children:[(0,P.jsx)(G,{title:`商品经营趋势`,sub:`按商品查看归档数据,保留真实波动`,children:(0,P.jsx)(`div`,{className:`gc-toggle`,children:[7,30].map(e=>(0,P.jsxs)(`button`,{"aria-pressed":A===e,onClick:()=>N(e),children:[e,`天`]},e))})}),(0,P.jsxs)(`div`,{className:`gc-selects`,children:[(0,P.jsx)(`select`,{"aria-label":`驾驶舱商品`,value:B?.key||``,onChange:e=>{D(e.target.value),k(``)},children:e.map(e=>(0,P.jsxs)(`option`,{value:e.key,children:[e.title||e.projectName,` · `,e.shopName||e.itemId]},e.key))}),(0,P.jsx)(`select`,{"aria-label":`驾驶舱趋势指标`,value:K?.key||``,onChange:e=>k(e.target.value),children:B?.series.map(e=>(0,P.jsx)(`option`,{value:e.key,children:e.name},e.key))}),(0,P.jsxs)(`button`,{disabled:!B,onClick:()=>s(B,`data`),children:[`明细 `,(0,P.jsx)(r,{size:12})]})]}),(0,P.jsx)(te,{series:K,days:A,onOpen:()=>B?s(B,`monitor`):m(`projects`)},B?.key+`|`+K?.key+`|`+A),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`单商品数据,不等于全店销售额 · 缺失日期不连线 · 来源见归档详情`})]},`sales`),S.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`商品运营分组`,className:`gc-panel gc-structure`,children:[(0,P.jsx)(G,{title:`商品运营分组`,sub:`点击分类,查看商品和下一步`}),(0,P.jsxs)(`div`,{className:`gc-ring`,children:[(0,P.jsxs)(`svg`,{viewBox:`0 0 160 160`,role:`img`,"aria-label":Y.map(e=>e.name+e.count+`个`).join(`,`),children:[(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`62`,fill:`none`,stroke:`#1e355b`,strokeWidth:`1`,strokeDasharray:`2 4`}),(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:`#152849`,strokeWidth:`18`}),se.filter(e=>e.count>0).map(e=>(0,P.jsx)(`circle`,{cx:`80`,cy:`80`,r:`50`,fill:`none`,stroke:V[e.id],strokeWidth:`18`,strokeDasharray:`${e.length} ${314.16-e.length}`,strokeDashoffset:-e.offset,transform:`rotate(-90 80 80)`},e.id)),(0,P.jsx)(`text`,{x:`80`,y:`80`,textAnchor:`middle`,className:`gc-ring-number`,children:a?e.length:`—`}),(0,P.jsx)(`text`,{x:`80`,y:`98`,textAnchor:`middle`,children:`商品观察对象`})]}),(0,P.jsx)(`div`,{className:`gc-ring-legend`,children:Y.map(t=>(0,P.jsxs)(`button`,{onClick:()=>h(t.id),children:[(0,P.jsx)(`i`,{style:{background:V[t.id]}}),(0,P.jsx)(`span`,{children:t.name}),(0,P.jsx)(`b`,{children:t.count}),(0,P.jsxs)(`small`,{children:[e.length?Math.round(t.count/e.length*100):0,`%`]}),(0,P.jsx)(r,{size:12})]},t.id))})]}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`同一商品在不同项目中分别记录;人工策略分组以保存记录为准,不代表全店经营梯队。`})]},`structure`),S.id===`business`&&(0,P.jsxs)(`section`,{"data-layout-label":`销售构成`,className:`gc-panel gc-ranking`,children:[(0,P.jsx)(G,{title:ue?`商品销售排行`:`销售构成`,sub:Q?Q.start+` — `+Q.end+` · 同一份销售账本`:`按同一统计期的销售账本排名`}),(0,P.jsx)(`div`,{className:`gc-rank-list`,children:$.map((e,t)=>(0,P.jsxs)(`button`,{onClick:()=>p(e.project||Q.project,{tab:e.itemId?`monitor`:`data`,itemId:e.itemId}),children:[(0,P.jsx)(`i`,{children:t+1}),(0,P.jsxs)(`span`,{title:e.name||e.itemId,children:[e.name||e.itemId,(0,P.jsx)(`small`,{children:e.itemId||e.count+`个商品`})]}),(0,P.jsx)(`div`,{children:(0,P.jsx)(`b`,{style:{width:Math.max(2,e.sales/de*100)+`%`}})}),(0,P.jsxs)(`strong`,{children:[`¥`,z(e.sales)]})]},e.project+`|`+(e.itemId||e.name)))}),!$.length&&(0,P.jsxs)(`p`,{className:`gc-no-data`,children:[`还没有同期商品销售明细。`,(0,P.jsx)(`button`,{onClick:()=>m(`data`),children:`查看已有资料`})]}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:ue?`点击商品核对明细 · 销售排名不代表盈利排名`:`原件按品类汇总,点击查看归档;不是单品排名`})]},`ranking`),S.id===`tasks`&&(0,P.jsxs)(`section`,{"data-layout-label":`巡店检查`,className:`gc-panel gc-inspect`,children:[(0,P.jsx)(G,{title:`巡店检查`,sub:`基于归档与任务状态 · 点击查看待办`,children:(0,P.jsx)(j,{size:17})}),(0,P.jsx)(`div`,{className:`gc-checks`,children:le.map(t=>(0,P.jsxs)(`button`,{disabled:!t.items.length,onClick:()=>t.label===`待选择运营分组`?d(t.items[0]):s(t.items[0],`work`),children:[(0,P.jsx)(`span`,{children:t.label}),(0,P.jsx)(`div`,{children:(0,P.jsx)(`i`,{style:{width:`${e.length?t.items.length/e.length*100:0}%`,background:t.color}})}),(0,P.jsx)(`b`,{children:a?t.items.length:`—`}),(0,P.jsx)(r,{size:12})]},t.label))}),(0,P.jsx)(`p`,{className:`gc-footnote`,children:`同一商品可有多项提醒,数量不可相加;点击先处理一项。`}),(0,P.jsxs)(`div`,{className:`gc-archive`,children:[(0,P.jsx)(ne,{count:i.length}),(0,P.jsxs)(`button`,{onClick:()=>m(`data`),children:[`查看来源 `,(0,P.jsx)(n,{size:12})]})]})]},`inspect`),S.id===`history`&&(0,P.jsxs)(`section`,{"data-layout-label":`项目阶段记录`,className:`gc-panel gc-matrix`,children:[(0,P.jsx)(G,{title:`项目阶段记录`,sub:`节点流程与历史六步记录分别保留,点击核对对应阶段`,children:(0,P.jsxs)(`button`,{onClick:()=>m(`projects`),children:[`全部项目 `,(0,P.jsx)(n,{size:12})]})}),(0,P.jsx)(`div`,{className:`gc-state-legend`,children:Object.entries(W).map(([e,t])=>(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{className:e}),t]},e))}),(0,P.jsxs)(`div`,{className:`gc-matrix-scroll`,children:[t.slice(0,8).map(e=>(0,P.jsxs)(`div`,{className:`gc-matrix-row`,children:[(0,P.jsxs)(`button`,{className:`gc-project-name`,title:e.name,onClick:()=>p(e.id,{tab:`overview`}),children:[e.name,(0,P.jsxs)(`small`,{children:[e.done,`/`,e.total,` 阶段已确认`]})]}),(0,P.jsx)(`div`,{children:e.route.map((t,n)=>(0,P.jsx)(`button`,{className:`gc-cell `+t.state,"aria-label":`${e.name}:${t.name},${W[t.state]}`,title:`${t.name} · ${W[t.state]}`,onClick:()=>p(e.id,t.target),children:String(n+1).padStart(2,`0`)},t.id))})]},e.id)),!t.length&&(0,P.jsx)(`p`,{className:`gc-no-data`,children:`当前范围还没有项目。`})]})]},`matrix`),S.id===`history`&&(0,P.jsxs)(`section`,{"data-layout-label":`项目历史时间轴`,className:`gc-panel gc-history`,children:[(0,P.jsx)(G,{title:`项目历史时间轴`,sub:y?`模拟历史记录;每天的记录合并为一个色块`:`按真实归档时间显示;每天的记录合并为一个色块`,children:(0,P.jsx)(`div`,{className:`gc-toggle`,children:[14,30].map(e=>(0,P.jsxs)(`button`,{"aria-pressed":F===e,onClick:()=>I(e),children:[e,`天`]},e))})}),X>0?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`gc-time-header`,children:[(0,P.jsx)(`span`,{children:`项目 / 点击查看记录`}),(0,P.jsx)(`div`,{children:[0,.25,.5,.75,1].map(e=>(0,P.jsx)(`span`,{children:new Date(Z+(X-Z)*e).toISOString().slice(5,10)},e))})]}),(0,P.jsx)(`div`,{className:`gc-time-scroll`,children:ce.filter(e=>e.replay.some(e=>Date.parse(e.at)>=Z)).slice(0,7).map(e=>(0,P.jsxs)(`div`,{className:`gc-time-row`,children:[(0,P.jsx)(`button`,{title:e.name,onClick:()=>R({project:e,events:e.replay}),children:e.name}),(0,P.jsx)(`div`,{children:re(e.replay.filter(e=>Date.parse(e.at)>=Z)).map(t=>(0,P.jsx)(`button`,{className:`gc-event `+(t.events.some(e=>/失败|停止/.test(e.state))?`bad`:t.events.some(e=>/确认|完成/.test(e.state))?`done`:`saved`),style:{left:`${(Date.parse(t.events[0].at)-Z)/(X-Z)*100}%`},title:`${t.date} · ${t.events.length} 条记录`,"aria-label":`${e.name}:${t.date},${t.events.length}条记录`,onClick:()=>R({project:e,events:t.events,date:t.date}),children:t.events.length},t.date))})]},e.id))}),(0,P.jsxs)(`p`,{className:`gc-footnote`,children:[`最近有记录的日期窗口 · 每个项目最多展示最近120条记录 · 点击色块展开当天记录,不代表运行时长;`,y?`演示操作会追加记录。`:`完整回放在项目执行页。`]})]}):(0,P.jsx)(`p`,{className:`gc-no-data`,children:`暂无可回放的历史记录。`})]},`history`),S.id===`tasks`&&(0,P.jsxs)(`section`,{"data-layout-label":`需要你处理`,className:`gc-panel gc-todo`,children:[(0,P.jsx)(G,{title:`需要你处理`,sub:`先做这一件,再继续下一步`,children:(0,P.jsxs)(`span`,{className:`gc-badge`,children:[J.length,` 项`]})}),(0,P.jsxs)(`div`,{className:`gc-todo-list`,children:[J.map((e,t)=>(0,P.jsxs)(`button`,{onClick:()=>e.tier===`unassigned`?d(e):s(e,`work`),children:[(0,P.jsx)(`span`,{className:`gc-todo-num`,children:String(t+1).padStart(2,`0`)}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`b`,{children:u(e)}),(0,P.jsxs)(`span`,{children:[e.title||e.projectName,` · `,e.shopName||e.itemId]}),(0,P.jsx)(`small`,{children:f(e)})]}),(0,P.jsx)(r,{size:15})]},e.key)),!J.length&&(0,P.jsx)(`p`,{className:`gc-no-data`,children:a?`当前没有商品待办。`:`正在读取…`}),(0,P.jsx)(`h3`,{className:`gc-next-label`,children:`接下来可以做`}),t.slice(0,5).map(e=>(0,P.jsxs)(`button`,{onClick:()=>p(e.id,{tab:`overview`}),children:[(0,P.jsx)(`span`,{className:`gc-next-dot`}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`b`,{children:e.name}),(0,P.jsx)(`span`,{children:`查看项目节点与下一步`})]}),(0,P.jsx)(r,{size:13})]},`next-`+e.id))]})]},`todo`)]})]}),L&&(0,P.jsx)(ie,{...L,onClose:()=>R(null),onOpen:p}),(0,P.jsxs)(`div`,{className:`gc-status-strip`,children:[(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{}),` `,y?`教学模拟`:`归档数据`,` · `,e.length,` 个商品`]}),(0,P.jsxs)(`span`,{children:[t.length,` 个项目 · `,t.filter(e=>e.started).length,` 个已开展 · `,t.filter(e=>e.complete).length,` 个流程已确认`]}),(0,P.jsxs)(`span`,{children:[q,` 项运行中 · `,ae,` 项待执行`]}),(0,P.jsxs)(`button`,{onClick:()=>m(`products`),children:[`展开运营工作清单 `,(0,P.jsx)(n,{size:13})]})]})]})}function ne({count:e}){return(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`b`,{children:e}),` 份归档资料可追溯`]})}function re(e){let t=new Map;for(let n of e){let e=new Date(Date.parse(n.at)+8*36e5).toISOString().slice(0,10);t.set(e,[...t.get(e)||[],n])}return[...t].map(([e,t])=>({date:e,events:t}))}function ie({project:e,events:t,date:n,onClose:r,onOpen:i}){let a=(0,M.useRef)(null);return(0,M.useEffect)(()=>{a.current?.showModal()},[]),(0,P.jsxs)(`dialog`,{className:`ta-dialog gc-history-dialog`,ref:a,onClose:r,"aria-labelledby":`gc-history-title`,children:[(0,P.jsxs)(`div`,{className:`ta-dialog-head`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:e.name}),(0,P.jsxs)(`h2`,{id:`gc-history-title`,children:[n||`项目历史`,` · `,t.length,` 条记录`]})]}),(0,P.jsx)(`button`,{"aria-label":`关闭历史记录`,onClick:r,children:`×`})]}),(0,P.jsx)(`p`,{children:`按发生时间排列。展开记录,查看当时做了什么。`}),(0,P.jsx)(`div`,{className:`gc-records`,children:t.map((t,n)=>(0,P.jsxs)(`details`,{children:[(0,P.jsxs)(`summary`,{children:[(0,P.jsx)(`span`,{children:new Date(t.at).toLocaleString(`zh-CN`,{timeZone:`Asia/Shanghai`})}),(0,P.jsx)(`b`,{children:t.name}),(0,P.jsx)(`em`,{children:t.state})]}),(0,P.jsx)(`p`,{children:t.detail||`此记录没有保存详细说明,可进入对应阶段核对原始资料。`}),(0,P.jsx)(`button`,{onClick:()=>{r(),i(e.id,e.route.find(e=>e.id===t.routeId)?.target||{tab:`data`})},children:`进入对应阶段 / 资料`})]},n))})]})}function ae(){let e=C(),[,t]=i(),[n,r]=(0,M.useState)(null),[a,o]=(0,M.useState)(!0),[c,l]=(0,M.useState)(``),[u,f]=(0,M.useState)(``),[m,_]=(0,M.useState)(0),[v,y]=w(`workbench.scope`,`real`),[b,x]=(0,M.useState)(null),[S,T]=(0,M.useState)(null);(0,M.useEffect)(()=>{let t=!0;return I(e.api).then(e=>{t&&(r(e),l(``))}).catch(e=>{t&&(r(null),l(e instanceof Error?e.message:`经营资料读取失败`))}).finally(()=>{t&&o(!1)}),()=>{t=!1}},[e.api,m]);let E=e=>v===`stored-demo`?e.mode===`simulated`:e.mode!==`simulated`,O=n?.growth.products.filter(E)||[],k=n?.growth.catalog.filter(E)||[],A=n?.projects.filter(e=>v===`stored-demo`?e.simulated:!e.simulated)||[],j={sales:n?.growth.metrics?.sales?.filter(E)||[],finance:n?.growth.metrics?.finance?.filter(E)||[],incubation:n?.growth.metrics?.incubation?.filter(E)||[]},N=(0,M.useCallback)(()=>{o(!0),_(e=>e+1)},[]);s(A.some(e=>e.execution?.state===`running`),N);function F(t,n){n===`work`?T(t):n===`data`?e.onProductGroup(`all`,t,v):e.onOpen(t.project,{tab:n,itemId:t.itemId})}return(0,P.jsx)(`div`,{className:`workbench-module`,children:(0,P.jsx)(`div`,{className:`gw`,children:(0,P.jsxs)(`div`,{className:`gw-body`,children:[(0,P.jsxs)(`header`,{className:`gw-header`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`small`,{children:`工作台 / 经营总览`}),(0,P.jsx)(`h1`,{children:`电商运营作战台`})]}),(0,P.jsxs)(`div`,{className:`gw-header-actions`,children:[(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`i`,{className:`gw-dot`}),v===`stored-demo`?`模拟归档 · 非真实经营`:`归档数据 · 非实时`]}),(0,P.jsxs)(`button`,{disabled:a,onClick:N,children:[(0,P.jsx)(g,{size:14}),a?`读取中`:`刷新数据`]})]})]}),(0,P.jsxs)(`div`,{className:`gw-scope`,children:[(0,P.jsx)(`div`,{children:[[`real`,`非模拟资料`],[`stored-demo`,`模拟资料`]].map(([e,t])=>(0,P.jsx)(`button`,{"aria-pressed":v===e,onClick:()=>{y(e),x(null),T(null),f(``)},children:t},e))}),(0,P.jsx)(`span`,{children:n?`${new Date(n.growth.updatedAt).toLocaleString(`zh-CN`)} 读取归档`:`正在读取归档…`})]}),c&&(0,P.jsxs)(`p`,{role:`alert`,className:`gw-message`,children:[c,` `,(0,P.jsx)(`button`,{onClick:N,children:`重试`})]}),u&&(0,P.jsx)(`p`,{role:`status`,className:`gw-message`,children:u}),(0,P.jsx)(K,{layoutScope:e.layoutScope,onDirty:e.onDirty,onCreate:e.onCreate,onExecute:async(t,n)=>{await h(e.api,t.id,n,t.execution?.version||0),N()},products:O,projects:A,catalog:k,metrics:j,ready:!a&&!!n,demo:!1,onOpen:e.onOpen,onNav:n=>{n===`projects`&&t(v),e.onModule(n)},onTier:t=>e.onProductGroup(t,void 0,v),onAction:F,onAssign:(e,t)=>x({product:e,suggestedTier:t})}),b&&(0,P.jsx)(d,{...b,products:O,onDirty:e.onDirty,onBusy:e.onBusy,onClose:()=>x(null),onSave:async(t,n,r,i)=>{await D(e.api,t,n,r,i),f(`分组已保存,正在更新看板。`),N()}}),S&&(0,P.jsx)(p,{product:S,onOpen:e.onOpen,onClose:()=>T(null)})]})})})}function J({section:e}){let t=C();return e===`tasks`||e===`records`?(0,P.jsx)(F,{mode:e,api:t.api,onOpen:t.onOpen},e):(0,P.jsx)(ae,{})}export{J as default};