module.exports=[69147,a=>{"use strict";var b=a.i(87924);function c({title:a,description:c,controls:d,output:e}){return(0,b.jsxs)("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[(0,b.jsxs)("div",{className:"mb-8",children:[(0,b.jsx)("h1",{className:"text-3xl font-bold tracking-tight text-foreground mb-2",children:a}),(0,b.jsx)("p",{className:"text-muted-foreground",children:c})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[(0,b.jsx)("div",{className:"space-y-6",children:(0,b.jsx)("div",{className:"bg-card rounded-2xl border border-border p-6 shadow-sm",children:d})}),(0,b.jsx)("div",{className:"lg:sticky lg:top-24",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider px-1",children:"Generated Output"}),e]})})]})]})}a.s(["ToolLayout",()=>c])},99437,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(69147);let e=[{id:"const_missing",pattern:/^[ \t]*[A-Z][a-zA-Z0-9_]+\([^)]*\),/gm,message:"Consider adding 'const' keyword to this constructor if all its arguments are constant.",severity:"info"},{id:"heavy_build",pattern:/class .+\s+extends\s+StatelessWidget(?:\s|\{)[\s\S]+?@override[\s\S]+?\.map\(|new List\(/gm,message:"Heavy loops or list generation found inside build() method. Move these to a variable or state.",severity:"warning"},{id:"unnecessary_setstate",pattern:/setState\(\(\)\s*=>\s*[^;]+=[^;]+\)/gm,message:"Ensure you are only updating variables that affect the UI inside setState.",severity:"info"},{id:"nested_builders",pattern:/Builder\([\s\S]+?Builder\(/g,message:"Nested Builders detected. This might increase widget tree depth unnecessarily.",severity:"warning"},{id:"missing_onpressed",pattern:/onPressed: \(\) \{ \}/g,message:"Empty onPressed callback might cause the button to be disabled or redundant.",severity:"info"}];function f(){let[a,f]=(0,c.useState)(`class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text("Title"),
        ListView(
          children: [1,2,3,4].map((i) => Text("Item $i")).toList(),
        ),
      ],
    );
  }
}`),[g,h]=(0,c.useState)([]);return(0,b.jsx)(d.ToolLayout,{title:"Performance Analyzer",description:"Static code analysis for Flutter widgets. Detect common anti-patterns that might cause performance issues.",controls:(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)("label",{className:"text-sm font-medium text-muted-foreground",children:"Flutter Code to Analyze"}),(0,b.jsx)("textarea",{value:a,onChange:a=>f(a.target.value),className:"w-full h-80 px-4 py-3 bg-slate-900 border border-border rounded-xl font-mono text-xs text-yellow-500 focus:ring-2 focus:ring-primary outline-none transition-all resize-none",placeholder:"Paste widget code here..."})]}),(0,b.jsxs)("button",{onClick:()=>{let b=[];e.forEach(c=>{let d;for(;null!==(d=c.pattern.exec(a));)b.push({...c,line:a.substring(0,d.index).split("\n").length})}),h(b)},className:"w-full py-4 bg-primary text-white font-bold rounded-xl shadow-lg transition-all hover:brightness-110 active:scale-95 flex items-center justify-center gap-2",children:[(0,b.jsx)("span",{children:"⚡"})," RUN ANALYSIS"]}),g.length>0&&(0,b.jsxs)("div",{className:"space-y-3 mt-8",children:[(0,b.jsxs)("span",{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest block mb-1",children:["Detected Issues (",g.length,")"]}),g.map((a,c)=>(0,b.jsxs)("div",{className:`p-4 rounded-xl border ${"warning"===a.severity?"bg-orange-500/5 border-orange-500/20":"bg-blue-500/5 border-blue-500/20"}`,children:[(0,b.jsxs)("div",{className:"flex justify-between items-center mb-1",children:[(0,b.jsxs)("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:["Line ",a.line]}),(0,b.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded uppercase font-bold ${"warning"===a.severity?"bg-orange-500 text-white":"bg-blue-500 text-white"}`,children:a.severity})]}),(0,b.jsx)("p",{className:"text-sm font-medium leading-relaxed",children:a.message})]},c))]})]}),output:(0,b.jsxs)("div",{className:"h-full flex flex-col p-8 bg-card rounded-2xl border border-border",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4 mb-8",children:[(0,b.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-primary/10 flex items-center justify-center text-xl",children:"🚀"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"font-bold text-lg",children:"Performance Score"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Optimization assessment based on static rules."})]})]}),(0,b.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center",children:[(0,b.jsxs)("div",{className:"relative w-48 h-48 flex items-center justify-center",children:[(0,b.jsxs)("svg",{className:"w-full h-full transform -rotate-90",children:[(0,b.jsx)("circle",{cx:"96",cy:"96",r:"80",fill:"none",stroke:"currentColor",strokeWidth:"12",className:"text-muted/10"}),(0,b.jsx)("circle",{cx:"96",cy:"96",r:"80",fill:"none",stroke:"currentColor",strokeWidth:"12",strokeDasharray:2*Math.PI*80,strokeDashoffset:2*Math.PI*80*(1-(g.length>0?.7:.95)),className:"text-primary transition-all duration-1000"})]}),(0,b.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,b.jsx)("span",{className:"text-4xl font-black",children:g.length>0?"70":"95"}),(0,b.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground",children:"OPTIMAL"})]})]}),(0,b.jsxs)("div",{className:"mt-12 grid grid-cols-2 gap-4 w-full",children:[(0,b.jsxs)("div",{className:"p-4 rounded-2xl bg-secondary/50 border border-border text-center",children:[(0,b.jsx)("div",{className:"text-xl font-bold",children:"0ms"}),(0,b.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"FRAME LATENCY"})]}),(0,b.jsxs)("div",{className:"p-4 rounded-2xl bg-secondary/50 border border-border text-center",children:[(0,b.jsx)("div",{className:"text-xl font-bold",children:"60fps"}),(0,b.jsx)("div",{className:"text-[10px] text-muted-foreground",children:"TARGET FPS"})]})]})]})]})})}a.s(["default",()=>f])}];

//# sourceMappingURL=src_058525fc._.js.map