UNPKG

@youwen/ai-design-system

Version:

Enterprise AI-driven design system with comprehensive design tokens

1 lines 168 kB
"use strict";var sr=Object.defineProperty;var ir=(a,e,t)=>e in a?sr(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var V=(a,e,t)=>(ir(a,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const dt=require("./ui-f80d7984.js"),Ne=require("./layouts-a25fc833.js"),n=require("react/jsx-runtime"),nr=require("react"),L=require("class-variance-authority"),S=require("./charts-3eb46e5d.js");require("@radix-ui/react-slot");require("clsx");require("tailwind-merge");function or(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const C=or(nr),ct=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),ut=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",big:s,medium:i,...o},d)=>{const c=e.split(",").map(h=>h.trim());return n.jsx("div",{className:S.cn(ct({size:t,padding:r}),a),ref:d,...o,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(c.includes("leftTop")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-big",style:{top:"5px",left:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-medium",style:{top:"30px",left:"0px",width:"195px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(c.includes("rightTop")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-big text-right",style:{top:"5px",right:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-medium text-right",style:{top:"30px",right:"0px",width:"195px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(c.includes("leftBottom")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-big",style:{bottom:"30px",left:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-medium",style:{bottom:"5px",left:"0px",width:"195px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(c.includes("rightBottom")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-big text-right",style:{bottom:"30px",right:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-medium text-right",style:{bottom:"5px",right:"0px",width:"195px"},children:i})]})})]})})});ut.displayName="WidgetTitleTwoLinesBigMedium";const ht=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),mt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",medium:s,small:i,...o},d)=>{const c=e.split(",").map(h=>h.trim());return n.jsx("div",{className:S.cn(ht({size:t,padding:r}),a),ref:d,...o,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(c.includes("leftTop")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-medium",style:{top:"5px",left:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-small",style:{top:"30px",left:"0px",width:"195px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(c.includes("rightTop")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-medium text-right",style:{top:"5px",right:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-small text-right",style:{top:"30px",right:"0px",width:"195px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(c.includes("leftBottom")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-small",style:{bottom:"30px",left:"0px",width:"195px"},children:i}),n.jsx("div",{className:"absolute font-normal text-widget-medium",style:{bottom:"5px",left:"0px",width:"195px"},children:s})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(c.includes("rightBottom")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-small text-right",style:{bottom:"30px",right:"0px",width:"195px"},children:i}),n.jsx("div",{className:"absolute font-normal text-widget-medium text-right",style:{bottom:"5px",right:"0px",width:"195px"},children:s})]})})]})})});mt.displayName="WidgetTitleTwoLinesMediumSmall";const gt=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),pt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",small:s,mini:i,...o},d)=>{const c=e.split(",").map(h=>h.trim());return n.jsx("div",{className:S.cn(gt({size:t,padding:r}),a),ref:d,...o,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(c.includes("leftTop")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-small",style:{top:"5px",left:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-mini",style:{top:"30px",left:"0px",width:"195px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(c.includes("rightTop")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-small text-right",style:{top:"5px",right:"0px",width:"195px"},children:s}),n.jsx("div",{className:"absolute font-normal text-widget-mini text-right",style:{top:"30px",right:"0px",width:"195px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(c.includes("leftBottom")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-mini",style:{bottom:"30px",left:"0px",width:"195px"},children:i}),n.jsx("div",{className:"absolute font-normal text-widget-small",style:{bottom:"5px",left:"0px",width:"195px"},children:s})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(c.includes("rightBottom")||c.includes("all"))&&n.jsxs("div",{className:"relative w-full h-full font-scto",children:[n.jsx("div",{className:"absolute font-normal text-widget-mini text-right",style:{bottom:"30px",right:"0px",width:"195px"},children:i}),n.jsx("div",{className:"absolute font-normal text-widget-small text-right",style:{bottom:"5px",right:"0px",width:"195px"},children:s})]})})]})})});pt.displayName="WidgetTitleTwoLinesSmallMini";const ft=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),xt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",medium:s,small:i,...o},d)=>{const c=e.split(",").map(h=>h.trim());return n.jsx("div",{className:S.cn(ft({size:t,padding:r}),a),ref:d,...o,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(c.includes("leftTop")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-start items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-medium",children:s}),n.jsx("div",{className:"font-normal text-widget-small",children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(c.includes("rightTop")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-end items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-small",children:i}),n.jsx("div",{className:"font-normal text-widget-medium",children:s})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(c.includes("leftBottom")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-start items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-medium",children:s}),n.jsx("div",{className:"font-normal text-widget-small",children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(c.includes("rightBottom")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-end items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-small",children:i}),n.jsx("div",{className:"font-normal text-widget-medium",children:s})]})})]})})});xt.displayName="WidgetTitleOneLineMediumSmall";const yt=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),vt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",small:s,mini:i,...o},d)=>{const c=e.split(",").map(h=>h.trim());return n.jsx("div",{className:S.cn(yt({size:t,padding:r}),a),ref:d,...o,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(c.includes("leftTop")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-start items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-small",children:s}),n.jsx("div",{className:"font-normal text-widget-mini",children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(c.includes("rightTop")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-end items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-mini",children:i}),n.jsx("div",{className:"font-normal text-widget-small",children:s})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(c.includes("leftBottom")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-start items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-small",children:s}),n.jsx("div",{className:"font-normal text-widget-mini",children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(c.includes("rightBottom")||c.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-row justify-end items-center p-0 gap-2 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-mini",children:i}),n.jsx("div",{className:"font-normal text-widget-small",children:s})]})})]})})});vt.displayName="WidgetTitleOneLineSmallMini";const bt=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),wt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",placeholder:s="Placeholder",...i},o)=>{const d=e.split(",").map(c=>c.trim());return n.jsx("div",{className:S.cn(bt({size:t,padding:r}),a),ref:o,...i,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(d.includes("leftTop")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-center p-0 border-2 border-dashed border-gray-300 rounded font-scto",children:n.jsx("div",{className:"font-normal text-gray-400 text-widget-small font-scto",children:s})})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(d.includes("rightTop")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-center p-0 border-2 border-dashed border-gray-300 rounded font-scto",children:n.jsx("div",{className:"font-normal text-gray-400 text-widget-small font-scto",children:s})})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(d.includes("leftBottom")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-center p-0 border-2 border-dashed border-gray-300 rounded font-scto",children:n.jsx("div",{className:"font-normal text-gray-400 text-widget-small font-scto",children:s})})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(d.includes("rightBottom")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-center p-0 border-2 border-dashed border-gray-300 rounded font-scto",children:n.jsx("div",{className:"font-normal text-gray-400 text-widget-small font-scto",children:s})})})]})})});wt.displayName="WidgetTitlePlaceholder";const kt=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),_t=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",items:s=[{icon:"🔧",title1:"CPU",title2:"处理器",description:"85%"},{icon:"💾",title1:"内存",title2:"Memory",description:"67%"},{icon:"💿",title1:"磁盘",title2:"Disk",description:"45%"}],...i},o)=>{const d=e.split(",").map(c=>c.trim());return n.jsx("div",{className:S.cn(kt({size:t,padding:r}),a),ref:o,...i,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(d.includes("leftTop")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto",children:s.slice(0,3).map((c,h)=>n.jsxs("div",{className:"flex items-center justify-between w-full",style:{height:"20px",marginBottom:h<2?"18px":"0px"},children:[n.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[c.icon&&n.jsx("div",{className:"flex items-center justify-center text-xs",style:{width:"16px",height:"16px",marginRight:"10px"},children:c.icon}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0 flex-1",children:[n.jsx("div",{className:"font-normal truncate",style:{fontSize:"16px",lineHeight:"11px"},children:c.title1}),c.title2&&n.jsx("div",{className:"font-normal truncate text-gray-600",style:{fontSize:"10px",lineHeight:"7px",marginTop:"2px"},children:c.title2})]})]}),n.jsx("div",{className:"font-medium text-right",style:{fontSize:"16px",marginLeft:"8px"},children:c.description})]},h))})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(d.includes("rightTop")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto",children:s.slice(0,3).map((c,h)=>n.jsxs("div",{className:"flex items-center justify-between w-full text-right",style:{height:"20px",marginBottom:h<2?"18px":"0px"},children:[n.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[c.icon&&n.jsx("div",{className:"flex items-center justify-center text-xs",style:{width:"16px",height:"16px",marginRight:"10px"},children:c.icon}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0 flex-1",children:[n.jsx("div",{className:"font-normal truncate",style:{fontSize:"16px",lineHeight:"11px"},children:c.title1}),c.title2&&n.jsx("div",{className:"font-normal truncate text-gray-600",style:{fontSize:"10px",lineHeight:"7px",marginTop:"2px"},children:c.title2})]})]}),n.jsx("div",{className:"font-medium text-right",style:{fontSize:"16px",marginLeft:"8px"},children:c.description})]},h))})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(d.includes("leftBottom")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-end items-start p-0 font-scto",children:s.slice(0,3).map((c,h)=>n.jsxs("div",{className:"flex items-center justify-between w-full",style:{height:"20px",marginBottom:h<2?"18px":"0px"},children:[n.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[c.icon&&n.jsx("div",{className:"flex items-center justify-center text-xs",style:{width:"16px",height:"16px",marginRight:"10px"},children:c.icon}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0 flex-1",children:[n.jsx("div",{className:"font-normal truncate",style:{fontSize:"16px",lineHeight:"11px"},children:c.title1}),c.title2&&n.jsx("div",{className:"font-normal truncate text-gray-600",style:{fontSize:"10px",lineHeight:"7px",marginTop:"2px"},children:c.title2})]})]}),n.jsx("div",{className:"font-medium text-right",style:{fontSize:"16px",marginLeft:"8px"},children:c.description})]},h)).reverse()})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(d.includes("rightBottom")||d.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-end items-start p-0 font-scto",children:s.slice(0,3).map((c,h)=>n.jsxs("div",{className:"flex items-center justify-between w-full text-right",style:{height:"20px",marginBottom:h<2?"18px":"0px"},children:[n.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[c.icon&&n.jsx("div",{className:"flex items-center justify-center text-xs",style:{width:"16px",height:"16px",marginRight:"10px"},children:c.icon}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0 flex-1",children:[n.jsx("div",{className:"font-normal truncate",style:{fontSize:"16px",lineHeight:"11px"},children:c.title1}),c.title2&&n.jsx("div",{className:"font-normal truncate text-gray-600",style:{fontSize:"10px",lineHeight:"7px",marginTop:"2px"},children:c.title2})]})]}),n.jsx("div",{className:"font-medium text-right",style:{fontSize:"16px",marginLeft:"8px"},children:c.description})]},h)).reverse()})})]})})});_t.displayName="WidgetModuleList";const jt=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),Nt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",topContent:s="上部内容",bottomContent:i="下部内容",dividerType:o="horizontal",...d},c)=>{const h=e.split(",").map(g=>g.trim());return n.jsx("div",{className:S.cn(jt({size:t,padding:r}),a),ref:c,...d,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(h.includes("leftTop")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto",children:[n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px",marginBottom:"8px"},children:s}),n.jsx("div",{style:{borderTop:"1px solid #e5e7eb",width:"100%",margin:"8px 0"}}),n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(h.includes("rightTop")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto text-right",children:[n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px",marginBottom:"8px"},children:s}),n.jsx("div",{style:{borderTop:"1px solid #e5e7eb",width:"100%",margin:"8px 0"}}),n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(h.includes("leftBottom")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto",children:[n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px",marginBottom:"8px"},children:s}),n.jsx("div",{style:{borderTop:"1px solid #e5e7eb",width:"100%",margin:"8px 0"}}),n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px"},children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(h.includes("rightBottom")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto text-right",children:[n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px",marginBottom:"8px"},children:s}),n.jsx("div",{style:{borderTop:"1px solid #e5e7eb",width:"100%",margin:"8px 0"}}),n.jsx("div",{className:"font-normal",style:{fontSize:"16px",lineHeight:"11px"},children:i})]})})]})})});Nt.displayName="WidgetModuleDivider";const Tt=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),St=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",buttonText:s="操作",buttonType:i="primary",isDisabled:o=!1,onButtonClick:d,...c},h)=>{const g=e.split(",").map(_=>_.trim()),F=()=>{const _="px-4 py-2 rounded font-medium text-widget-small transition-colors cursor-pointer";if(o)return`${_} bg-gray-100 text-gray-400 cursor-not-allowed`;switch(i){case"primary":return`${_} bg-blue-600 text-white hover:bg-blue-700`;case"secondary":return`${_} bg-gray-200 text-gray-800 hover:bg-gray-300`;case"destructive":return`${_} bg-red-600 text-white hover:bg-red-700`;default:return`${_} bg-blue-600 text-white hover:bg-blue-700`}};return n.jsx("div",{className:S.cn(Tt({size:t,padding:r}),a),ref:h,...c,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(g.includes("leftTop")||g.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-start p-0 font-scto",children:n.jsx("button",{className:F(),onClick:o?void 0:d,disabled:o,children:s})})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(g.includes("rightTop")||g.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-end p-0 font-scto",children:n.jsx("button",{className:F(),onClick:o?void 0:d,disabled:o,children:s})})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(g.includes("leftBottom")||g.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-start p-0 font-scto",children:n.jsx("button",{className:F(),onClick:o?void 0:d,disabled:o,children:s})})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(g.includes("rightBottom")||g.includes("all"))&&n.jsx("div",{className:"w-full h-full flex flex-col justify-center items-end p-0 font-scto",children:n.jsx("button",{className:F(),onClick:o?void 0:d,disabled:o,children:s})})})]})})});St.displayName="ModuleControlButton";const Ft=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),Ct=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",graphTitle:s="图表标题",placeholder:i="图表数据",graphType:o="line",...d},c)=>{const h=e.split(",").map(F=>F.trim()),g=()=>{switch(o){case"line":return"📈";case"bar":return"📊";case"pie":return"🥧";case"area":return"📉";default:return"📈"}};return n.jsx("div",{className:S.cn(Ft({size:t,padding:r}),a),ref:c,...d,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(h.includes("leftTop")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-small mb-2",children:s}),n.jsxs("div",{className:"flex-1 w-full flex flex-col justify-center items-center border-2 border-dashed border-gray-300 rounded bg-gray-50",children:[n.jsx("div",{className:"text-2xl mb-1",children:g()}),n.jsx("div",{className:"font-normal text-widget-mini text-gray-500",children:i})]})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(h.includes("rightTop")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-end p-0 font-scto text-right",children:[n.jsx("div",{className:"font-normal text-widget-small mb-2",children:s}),n.jsxs("div",{className:"flex-1 w-full flex flex-col justify-center items-center border-2 border-dashed border-gray-300 rounded bg-gray-50",children:[n.jsx("div",{className:"text-2xl mb-1",children:g()}),n.jsx("div",{className:"font-normal text-widget-mini text-gray-500",children:i})]})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(h.includes("leftBottom")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-end items-start p-0 font-scto",children:[n.jsxs("div",{className:"flex-1 w-full flex flex-col justify-center items-center border-2 border-dashed border-gray-300 rounded bg-gray-50 mb-2",children:[n.jsx("div",{className:"text-2xl mb-1",children:g()}),n.jsx("div",{className:"font-normal text-widget-mini text-gray-500",children:i})]}),n.jsx("div",{className:"font-normal text-widget-small",children:s})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(h.includes("rightBottom")||h.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-end items-end p-0 font-scto text-right",children:[n.jsxs("div",{className:"flex-1 w-full flex flex-col justify-center items-center border-2 border-dashed border-gray-300 rounded bg-gray-50 mb-2",children:[n.jsx("div",{className:"text-2xl mb-1",children:g()}),n.jsx("div",{className:"font-normal text-widget-mini text-gray-500",children:i})]}),n.jsx("div",{className:"font-normal text-widget-small",children:s})]})})]})})});Ct.displayName="ModuleGraphPlaceholder";const zt=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),Bt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",graphTitle:s="数据趋势",dataPoints:i=[{label:"1月",value:65},{label:"2月",value:78},{label:"3月",value:90},{label:"4月",value:81},{label:"5月",value:95}],graphType:o="line",showAxes:d=!0,...c},h)=>{var P,Q,B,$,ge,rt,at,st;const g=e.split(",").map(O=>O.trim()),F=Math.max(...i.map(O=>O.value));Math.min(...i.map(O=>O.value));const _=()=>o==="bar"?n.jsx("div",{className:"flex items-end justify-between h-12 w-full px-1",children:i.slice(0,5).map((O,X)=>{const le=O.value/F*40;return n.jsx("div",{className:"bg-blue-500 w-2 rounded-t",style:{height:`${le}px`}},X)})}):n.jsx("div",{className:"flex items-end justify-between h-12 w-full relative",children:n.jsxs("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 100 40",children:[n.jsx("polyline",{fill:"none",stroke:"#3b82f6",strokeWidth:"2",points:i.slice(0,5).map((O,X)=>{const le=X/(i.slice(0,5).length-1)*100,Ce=40-O.value/F*35;return`${le},${Ce}`}).join(" ")}),i.slice(0,5).map((O,X)=>{const le=X/(i.slice(0,5).length-1)*100,Ce=40-O.value/F*35;return n.jsx("circle",{cx:le,cy:Ce,r:"2",fill:"#3b82f6"},X)})]})});return n.jsx("div",{className:S.cn(zt({size:t,padding:r}),a),ref:h,...c,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(g.includes("leftTop")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-start p-0 font-scto",children:[n.jsx("div",{className:"font-normal text-widget-small mb-2",children:s}),n.jsx("div",{className:"flex-1 w-full",children:_()}),d&&n.jsxs("div",{className:"flex justify-between w-full text-widget-mini text-gray-500 mt-1",children:[n.jsx("span",{children:(P=i[0])==null?void 0:P.label}),n.jsx("span",{children:(Q=i[i.length-1])==null?void 0:Q.label})]})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(g.includes("rightTop")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-start items-end p-0 font-scto text-right",children:[n.jsx("div",{className:"font-normal text-widget-small mb-2",children:s}),n.jsx("div",{className:"flex-1 w-full",children:_()}),d&&n.jsxs("div",{className:"flex justify-between w-full text-widget-mini text-gray-500 mt-1",children:[n.jsx("span",{children:(B=i[0])==null?void 0:B.label}),n.jsx("span",{children:($=i[i.length-1])==null?void 0:$.label})]})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(g.includes("leftBottom")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-end items-start p-0 font-scto",children:[d&&n.jsxs("div",{className:"flex justify-between w-full text-widget-mini text-gray-500 mb-1",children:[n.jsx("span",{children:(ge=i[0])==null?void 0:ge.label}),n.jsx("span",{children:(rt=i[i.length-1])==null?void 0:rt.label})]}),n.jsx("div",{className:"flex-1 w-full",children:_()}),n.jsx("div",{className:"font-normal text-widget-small mt-2",children:s})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(g.includes("rightBottom")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-end items-end p-0 font-scto text-right",children:[d&&n.jsxs("div",{className:"flex justify-between w-full text-widget-mini text-gray-500 mb-1",children:[n.jsx("span",{children:(at=i[0])==null?void 0:at.label}),n.jsx("span",{children:(st=i[i.length-1])==null?void 0:st.label})]}),n.jsx("div",{className:"flex-1 w-full",children:_()}),n.jsx("div",{className:"font-normal text-widget-small mt-2",children:s})]})})]})})});Bt.displayName="ModuleGraphDefault";const At=L.cva("relative bg-card border rounded-lg shadow-sm",{variants:{size:{standard:"w-container-md h-container-md",auto:"w-full h-auto"},padding:{none:"p-0",base:"p-[15px]"}},defaultVariants:{size:"standard",padding:"base"}}),Rt=C.forwardRef(({className:a,layout:e="leftTop",size:t="standard",padding:r="base",content:s="通用内容",icon:i="📱",status:o="normal",contentType:d="text",...c},h)=>{const g=e.split(",").map(Q=>Q.trim()),F=()=>{switch(o){case"warning":return"text-yellow-600";case"error":return"text-red-600";case"success":return"text-green-600";default:return"text-gray-600"}},_=()=>{switch(o){case"warning":return"⚠️";case"error":return"❌";case"success":return"✅";default:return"ℹ️"}},P=()=>{switch(d){case"number":return n.jsx("div",{className:`font-bold text-widget-big ${F()}`,children:s});case"status":return n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-lg",children:_()}),n.jsx("span",{className:`font-medium text-widget-small ${F()}`,children:s})]});case"custom":return s;default:return n.jsx("div",{className:`font-normal text-widget-medium ${F()}`,children:s})}};return n.jsx("div",{className:S.cn(At({size:t,padding:r}),a),ref:h,...c,children:n.jsxs("div",{className:"relative w-full h-full",children:[n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 left-0",children:(g.includes("leftTop")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-center items-start p-0 font-scto",children:[i&&n.jsx("div",{className:"text-2xl mb-2",children:i}),P()]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm top-0 right-0",children:(g.includes("rightTop")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-center items-end p-0 font-scto text-right",children:[i&&n.jsx("div",{className:"text-2xl mb-2",children:i}),P()]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 left-0",children:(g.includes("leftBottom")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-center items-start p-0 font-scto",children:[P(),i&&n.jsx("div",{className:"text-2xl mt-2",children:i})]})}),n.jsx("div",{className:"absolute w-widget-sm h-widget-sm bottom-0 right-0",children:(g.includes("rightBottom")||g.includes("all"))&&n.jsxs("div",{className:"w-full h-full flex flex-col justify-center items-end p-0 font-scto text-right",children:[P(),i&&n.jsx("div",{className:"text-2xl mt-2",children:i})]})})]})})});Rt.displayName="WidgetGeneral";const l={blue:{50:"oklch(0.95 0.05 240)",100:"oklch(0.90 0.10 240)",200:"oklch(0.80 0.15 240)",300:"oklch(0.70 0.20 240)",400:"oklch(0.60 0.25 240)",500:"oklch(0.50 0.30 240)",600:"oklch(0.45 0.28 240)",700:"oklch(0.40 0.25 240)",800:"oklch(0.35 0.22 240)",900:"oklch(0.30 0.18 240)",950:"oklch(0.20 0.15 240)"},green:{50:"oklch(0.95 0.05 150)",100:"oklch(0.90 0.10 150)",200:"oklch(0.80 0.15 150)",300:"oklch(0.70 0.20 150)",400:"oklch(0.60 0.25 150)",500:"oklch(0.50 0.30 150)",600:"oklch(0.45 0.28 150)",700:"oklch(0.40 0.25 150)",800:"oklch(0.35 0.22 150)",900:"oklch(0.30 0.18 150)",950:"oklch(0.20 0.15 150)"},purple:{50:"oklch(0.95 0.05 280)",100:"oklch(0.90 0.10 280)",200:"oklch(0.80 0.15 280)",300:"oklch(0.70 0.20 280)",400:"oklch(0.60 0.25 280)",500:"oklch(0.50 0.30 280)",600:"oklch(0.45 0.28 280)",700:"oklch(0.40 0.25 280)",800:"oklch(0.35 0.22 280)",900:"oklch(0.30 0.18 280)",950:"oklch(0.20 0.15 280)"},amber:{50:"oklch(0.95 0.05 45)",100:"oklch(0.90 0.10 45)",200:"oklch(0.80 0.15 45)",300:"oklch(0.70 0.20 45)",400:"oklch(0.60 0.25 45)",500:"oklch(0.50 0.30 45)",600:"oklch(0.45 0.28 45)",700:"oklch(0.40 0.25 45)",800:"oklch(0.35 0.22 45)",900:"oklch(0.30 0.18 45)",950:"oklch(0.20 0.15 45)"},neutral:{50:"oklch(0.98 0 0)",100:"oklch(0.96 0 0)",200:"oklch(0.93 0 0)",300:"oklch(0.88 0 0)",400:"oklch(0.74 0 0)",500:"oklch(0.58 0 0)",600:"oklch(0.48 0 0)",700:"oklch(0.40 0 0)",800:"oklch(0.27 0 0)",900:"oklch(0.15 0 0)",950:"oklch(0.05 0 0)"}},Te={blue:{name:"Blue",light:{background:l.neutral[50],foreground:l.neutral[950],card:l.neutral[50],cardForeground:l.neutral[950],popover:l.neutral[50],popoverForeground:l.neutral[950],primary:l.blue[500],primaryForeground:l.neutral[50],secondary:l.neutral[100],secondaryForeground:l.neutral[900],muted:l.neutral[100],mutedForeground:l.neutral[500],accent:l.neutral[100],accentForeground:l.neutral[900],destructive:"oklch(0.60 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[200],input:l.neutral[200],ring:l.blue[500],chart1:l.blue[500],chart2:l.blue[600],chart3:l.blue[400],chart4:l.blue[700],chart5:l.blue[300],widgetBackground:l.neutral[50],widgetBorder:l.neutral[200],widgetText:l.neutral[950],widgetAccent:l.blue[500]},dark:{background:l.neutral[950],foreground:l.neutral[50],card:l.neutral[950],cardForeground:l.neutral[50],popover:l.neutral[950],popoverForeground:l.neutral[50],primary:l.blue[400],primaryForeground:l.neutral[950],secondary:l.neutral[800],secondaryForeground:l.neutral[50],muted:l.neutral[800],mutedForeground:l.neutral[400],accent:l.neutral[800],accentForeground:l.neutral[50],destructive:"oklch(0.65 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[800],input:l.neutral[800],ring:l.blue[400],chart1:l.blue[400],chart2:l.blue[500],chart3:l.blue[300],chart4:l.blue[600],chart5:l.blue[200],widgetBackground:l.neutral[950],widgetBorder:l.neutral[800],widgetText:l.neutral[50],widgetAccent:l.blue[400]}},green:{name:"Green",light:{background:l.neutral[50],foreground:l.neutral[950],card:l.neutral[50],cardForeground:l.neutral[950],popover:l.neutral[50],popoverForeground:l.neutral[950],primary:l.green[500],primaryForeground:l.neutral[50],secondary:l.neutral[100],secondaryForeground:l.neutral[900],muted:l.neutral[100],mutedForeground:l.neutral[500],accent:l.neutral[100],accentForeground:l.neutral[900],destructive:"oklch(0.60 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[200],input:l.neutral[200],ring:l.green[500],chart1:l.green[500],chart2:l.green[600],chart3:l.green[400],chart4:l.green[700],chart5:l.green[300],widgetBackground:l.neutral[50],widgetBorder:l.neutral[200],widgetText:l.neutral[950],widgetAccent:l.green[500]},dark:{background:l.neutral[950],foreground:l.neutral[50],card:l.neutral[950],cardForeground:l.neutral[50],popover:l.neutral[950],popoverForeground:l.neutral[50],primary:l.green[400],primaryForeground:l.neutral[950],secondary:l.neutral[800],secondaryForeground:l.neutral[50],muted:l.neutral[800],mutedForeground:l.neutral[400],accent:l.neutral[800],accentForeground:l.neutral[50],destructive:"oklch(0.65 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[800],input:l.neutral[800],ring:l.green[400],chart1:l.green[400],chart2:l.green[500],chart3:l.green[300],chart4:l.green[600],chart5:l.green[200],widgetBackground:l.neutral[950],widgetBorder:l.neutral[800],widgetText:l.neutral[50],widgetAccent:l.green[400]}},purple:{name:"Purple",light:{background:l.neutral[50],foreground:l.neutral[950],card:l.neutral[50],cardForeground:l.neutral[950],popover:l.neutral[50],popoverForeground:l.neutral[950],primary:l.purple[500],primaryForeground:l.neutral[50],secondary:l.neutral[100],secondaryForeground:l.neutral[900],muted:l.neutral[100],mutedForeground:l.neutral[500],accent:l.neutral[100],accentForeground:l.neutral[900],destructive:"oklch(0.60 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[200],input:l.neutral[200],ring:l.purple[500],chart1:l.purple[500],chart2:l.purple[600],chart3:l.purple[400],chart4:l.purple[700],chart5:l.purple[300],widgetBackground:l.neutral[50],widgetBorder:l.neutral[200],widgetText:l.neutral[950],widgetAccent:l.purple[500]},dark:{background:l.neutral[950],foreground:l.neutral[50],card:l.neutral[950],cardForeground:l.neutral[50],popover:l.neutral[950],popoverForeground:l.neutral[50],primary:l.purple[400],primaryForeground:l.neutral[950],secondary:l.neutral[800],secondaryForeground:l.neutral[50],muted:l.neutral[800],mutedForeground:l.neutral[400],accent:l.neutral[800],accentForeground:l.neutral[50],destructive:"oklch(0.65 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[800],input:l.neutral[800],ring:l.purple[400],chart1:l.purple[400],chart2:l.purple[500],chart3:l.purple[300],chart4:l.purple[600],chart5:l.purple[200],widgetBackground:l.neutral[950],widgetBorder:l.neutral[800],widgetText:l.neutral[50],widgetAccent:l.purple[400]}},amber:{name:"Amber",light:{background:l.neutral[50],foreground:l.neutral[950],card:l.neutral[50],cardForeground:l.neutral[950],popover:l.neutral[50],popoverForeground:l.neutral[950],primary:l.amber[500],primaryForeground:l.neutral[50],secondary:l.neutral[100],secondaryForeground:l.neutral[900],muted:l.neutral[100],mutedForeground:l.neutral[500],accent:l.neutral[100],accentForeground:l.neutral[900],destructive:"oklch(0.60 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[200],input:l.neutral[200],ring:l.amber[500],chart1:l.amber[500],chart2:l.amber[600],chart3:l.amber[400],chart4:l.amber[700],chart5:l.amber[300],widgetBackground:l.neutral[50],widgetBorder:l.neutral[200],widgetText:l.neutral[950],widgetAccent:l.amber[500]},dark:{background:l.neutral[950],foreground:l.neutral[50],card:l.neutral[950],cardForeground:l.neutral[50],popover:l.neutral[950],popoverForeground:l.neutral[50],primary:l.amber[400],primaryForeground:l.neutral[950],secondary:l.neutral[800],secondaryForeground:l.neutral[50],muted:l.neutral[800],mutedForeground:l.neutral[400],accent:l.neutral[800],accentForeground:l.neutral[50],destructive:"oklch(0.65 0.20 25)",destructiveForeground:l.neutral[50],border:l.neutral[800],input:l.neutral[800],ring:l.amber[400],chart1:l.amber[400],chart2:l.amber[500],chart3:l.amber[300],chart4:l.amber[600],chart5:l.amber[200],widgetBackground:l.neutral[950],widgetBorder:l.neutral[800],widgetText:l.neutral[50],widgetAccent:l.amber[400]}}};function Ke(a,e){const t=Te[a][e];return{"--background":t.background,"--foreground":t.foreground,"--card":t.card,"--card-foreground":t.cardForeground,"--popover":t.popover,"--popover-foreground":t.popoverForeground,"--primary":t.primary,"--primary-foreground":t.primaryForeground,"--secondary":t.secondary,"--secondary-foreground":t.secondaryForeground,"--muted":t.muted,"--muted-foreground":t.mutedForeground,"--accent":t.accent,"--accent-foreground":t.accentForeground,"--destructive":t.destructive,"--destructive-foreground":t.destructiveForeground,"--border":t.border,"--input":t.input,"--ring":t.ring,"--chart-1":t.chart1,"--chart-2":t.chart2,"--chart-3":t.chart3,"--chart-4":t.chart4,"--chart-5":t.chart5,"--widget-background":t.widgetBackground,"--widget-border":t.widgetBorder,"--widget-text":t.widgetText,"--widget-accent":t.widgetAccent,"--widget-font-big":"40px","--widget-font-medium":"24px","--widget-font-small":"16px","--widget-font-mini":"10px","--widget-line-height-big":"28px","--widget-line-height-medium":"17px","--widget-line-height-small":"11px","--widget-line-height-mini":"7px","--widget-container-width":"430px","--widget-container-height":"225px","--widget-slot-width":"195px","--widget-slot-height":"97px","--widget-container-padding":"15px","--widget-text-gap":"6px","--widget-edge-offset":"2px","--widget-slot-gap":"15px"}}class Qe{constructor(){V(this,"currentTheme","blue");V(this,"currentMode","light");if(typeof window<"u"){const e=localStorage.getItem("theme"),t=localStorage.getItem("mode"),r=window.matchMedia("(prefers-color-scheme: dark)").matches;this.currentTheme=e||"blue",this.currentMode=t||(r?"dark":"light"),this.applyTheme()}}setTheme(e){this.currentTheme=e,typeof window<"u"&&localStorage.setItem("theme",e),this.applyTheme()}setMode(e){this.currentMode=e,typeof window<"u"&&localStorage.setItem("mode",e),this.applyTheme()}toggleMode(){this.setMode(this.currentMode==="light"?"dark":"light")}applyTheme(){if(typeof window>"u")return;const e=document.documentElement,t=Ke(this.currentTheme,this.currentMode);Object.entries(t).forEach(([r,s])=>{e.style.setProperty(r,s)}),e.classList.remove("light","dark"),e.classList.add(this.currentMode)}getCurrentTheme(){return this.currentTheme}getCurrentMode(){return this.currentMode}getAvailableThemes(){return Object.keys(Te)}}function Mt(){return{darkMode:["class"],theme:{extend:{colors:{background:"hsl(var(--background))",foreground:"hsl(var(--foreground))",card:{DEFAULT:"hsl(var(--card))",foreground:"hsl(var(--card-foreground))"},popover:{DEFAULT:"hsl(var(--popover))",foreground:"hsl(var(--popover-foreground))"},primary:{DEFAULT:"hsl(var(--primary))",foreground:"hsl(var(--primary-foreground))"},secondary:{DEFAULT:"hsl(var(--secondary))",foreground:"hsl(var(--secondary-foreground))"},muted:{DEFAULT:"hsl(var(--muted))",foreground:"hsl(var(--muted-foreground))"},accent:{DEFAULT:"hsl(var(--accent))",foreground:"hsl(var(--accent-foreground))"},destructive:{DEFAULT:"hsl(var(--destructive))",foreground:"hsl(var(--destructive-foreground))"},border:"hsl(var(--border))",input:"hsl(var(--input))",ring:"hsl(var(--ring))",chart:{1:"hsl(var(--chart-1))",2:"hsl(var(--chart-2))",3:"hsl(var(--chart-3))",4:"hsl(var(--chart-4))",5:"hsl(var(--chart-5))"},widget:{background:"hsl(var(--widget-background))",border:"hsl(var(--widget-border))",text:"hsl(var(--widget-text))",accent:"hsl(var(--widget-accent))"}},fontSize:{"widget-big":["var(--widget-font-big)","var(--widget-line-height-big)"],"widget-medium":["var(--widget-font-medium)","var(--widget-line-height-medium)"],"widget-small":["var(--widget-font-small)","var(--widget-line-height-small)"],"widget-mini":["var(--widget-font-mini)","var(--widget-line-height-mini)"]},width:{"widget-container":"var(--widget-container-width)","widget-slot":"var(--widget-slot-width)"},height:{"widget-container":"var(--widget-container-height)","widget-slot":"var(--widget-slot-height)"},spacing:{"widget-padding":"var(--widget-container-padding)","widget-gap":"var(--widget-text-gap)","widget-offset":"var(--widget-edge-offset)","widget-slot-gap":"var(--widget-slot-gap)"}}}}}const lr={baseColors:l,themeConfigs:Te,generateCSSVariables:Ke,generateTailwindConfig:Mt,ThemeManager:Qe},M={mobile:{min:0,max:767,name:"mobile"},tablet:{min:768,max:1023,name:"tablet"},desktop:{min:1024,max:1439,name:"desktop"},desktopLarge:{min:1440,max:1/0,name:"desktop-large"}},Xe={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},I={container:{mobile:{width:"100%",maxWidth:"350px",height:"auto",minHeight:"180px",padding:"12px",layout:"single-column"},tablet:{width:"100%",maxWidth:"430px",height:"225px",padding:"15px",layout:"dual-slot"},desktop:{width:"430px",height:"225px",padding:"15px",layout:"full-layout"},desktopLarge:{width:"430px",height:"225px",padding:"15px",layout:"full-layout"}},slot:{mobile:{width:"100%",height:"auto",minHeight:"60px",margin:"0 0 8px 0",display:"block"},tablet:{width:"195px",height:"97px",margin:"0",display:"flex"},desktop:{width:"195px",height:"97px",margin:"0",display:"flex"},desktopLarge:{width:"195px",height:"97px",margin:"0",display:"flex"}},typography:{mobile:{big:{fontSize:"32px",lineHeight:"24px"},medium:{fontSize:"20px",lineHeight:"14px"},small:{fontSize:"14px",lineHeight:"10px"},mini:{fontSize:"10px",lineHeight:"7px"}},tablet:{big:{fontSize:"36px",lineHeight:"26px"},medium:{fontSize:"22px",lineHeight:"16px"},small:{fontSize:"15px",lineHeight:"11px"},mini:{fontSize:"10px",lineHeight:"7px"}},desktop:{big:{fontSize:"40px",lineHeight:"28px"},medium:{fontSize:"24px",lineHeight:"17px"},small:{fontSize:"16px",lineHeight:"11px"},mini:{fontSize:"10px",lineHeight:"7px"}},desktopLarge:{big:{fontSize:"40px",lineHeight:"28px"},medium:{fontSize:"24px",lineHeight:"17px"},small:{fontSize:"16px",lineHeight:"11px"},mini:{fontSize:"10px",lineHeight:"7px"}}},spacing:{mobile:{containerPadding:"12px",textGap:"4px",elementMargin:"1px"},tablet:{containerPadding:"15px",textGap:"5px",elementMargin:"2px"},desktop:{containerPadding:"15px",textGap:"6px",elementMargin:"2px"},desktopLarge:{containerPadding:"15px",textGap:"6px",elementMargin:"2px"}}},pe={mobile:{allowedLayouts:["leftTop","rightTop","leftBottom","rightBottom"],forceVerticalStack:!0,maxSlotsPerRow:1},tablet:{allowedLayouts:["leftTop","rightTop","leftBottom","rightBottom","leftTop,rightTop","leftBottom,rightBottom","leftTop,leftBottom","rightTop,rightBottom"],maxSlotsPerRow:2},desktop:{allowedLayouts:"all",maxSlotsPerRow:2},desktopLarge:{allowedLayouts:"all",maxSlotsPerRow:2}};function Lt(){return{mobile:`@media (max-width: ${M.mobile.max}px)`,tablet:`@media (min-width: ${M.tablet.min}px) and (max-width: ${M.tablet.max}px)`,desktop:`@media (min-width: ${M.desktop.min}px) and (max-width: ${M.desktop.max}px)`,desktopLarge:`@media (min-width: ${M.desktopLarge.min}px)`,mobileOnly:`@media (max-width: ${M.mobile.max}px)`,tabletUp:`@media (min-width: ${M.tablet.min}px)`,desktopUp:`@media (min-width: ${M.desktop.min}px)`}}class Et{constructor(){V(this,"currentBreakpoint","desktop")}getCurrentBreakpoint(){if(typeof window>"u")return"desktop";const e=window.innerWidth;return e<=M.mobile.max?"mobile":e<=M.tablet.max?"tablet":e<=M.desktop.max?"desktop":"desktopLarge"}getResponsiveConfig(e){const t=this.getCurrentBreakpoint();return I[e][t]}isAllowedLayout(e){const t=this.getCurrentBreakpoint(),r=pe[t];return r.allowedLayouts==="all"?!0:r.allowedLayouts.includes(e)}getOptimalLayout(e){if(this.isAllowedLayout(e))return e;const t=this.getCurrentBreakpoint(),r=pe[t];return r.allowedLayouts==="all"?e:r.allowedLayouts[0]}}function dr(){return{screens:Xe,spacing:{"container-padding-mobile":I.container.mobile.padding,"container-padding-desktop":I.container.desktop.padding,"text-gap-mobile":I.spacing.mobile.textGap,"text-gap-desktop":I.spacing.desktop.textGap},fontSize:{"widget-big-mobile":[I.typography.mobile.big.fontSize,I.typography.mobile.big.lineHeight],"widget-big-desktop":[I.typography.desktop.big.fontSize,I.typography.desktop.big.lineHeight]}}}const cr={breakpoints:M,tailwindBreakpoints:Xe,componentResponsiveRules:I,layoutConstraints:pe,generateMediaQueries:Lt,generateTailwindConfig:dr,ResponsiveManager:Et},te={normalText:4.5,largeText:3,normalTextEnhanced:7,largeTextEnhanced:4.5,uiComponents:3,graphicalObjects:3},fe={minimum:{desktop:"12px",mobile:"14px"},recommended:{bodyText:"16px",smallText:"14px",largeText:"18px"},widget:{big:{size:"40px",isAccessible:!0,category:"large"},medium:{size:"24px",isAccessible:!0,category:"large"},small:{size:"16px",isAccessible:!0,category:"normal"},mini:{size:"10px",isAccessible:!1,warning:"低于最小建议尺寸"}}},$t={requiredKeys:{Tab:"焦点切换到下一个可交互元素","Shift+Tab":"焦点切换到上一个可交互元素",Enter:"激活按钮或链接",Space:"激活按钮或切换状态",Escape:"关闭弹出层或取消操作",ArrowKeys:"在相关元素间导航"},focusMana