// @bun
var{defineProperty:D,getOwnPropertyNames:J,getOwnPropertyDescriptor:K}=Object,M=Object.prototype.hasOwnProperty;function O(j){return this[j]}var Z=(j)=>{var k=(F??=new WeakMap).get(j),w;if(k)return k;if(k=D({},"__esModule",{value:!0}),j&&typeof j==="object"||typeof j==="function"){for(var q of J(j))if(!M.call(k,q))D(k,q,{get:O.bind(j,q),enumerable:!(w=K(j,q))||w.enumerable})}return F.set(j,k),k},F;var Q=(j)=>j;function U(j,k){this[j]=Q.bind(null,k)}var $=(j,k)=>{for(var w in k)D(j,w,{get:k[w],enumerable:!0,configurable:!0,set:U.bind(k,w)})};var V=(j,k)=>()=>(j&&(k=j(j=0)),k);var b=import.meta.require;function X(j,k,w){let q={fullTag:w,content:k,attrs:j};if(/\bserver\b/.test(j))return{...q,type:"server"};if(/\bdata-stx-scoped\b/.test(j))return{...q,type:"client"};if(W.test(k))return{...q,type:"signals"};if(/\bclient\b/.test(j)||/\btype\s*=\s*["']module["']/.test(j)||/\bsrc\s*=/.test(j))return{...q,type:"client"};return{...q,type:"server"}}function x(j){let k=[],w=[],q=[],H=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,z;while((z=H.exec(j))!==null){let B=X(z[1],z[2],z[0]);switch(B.type){case"signals":k.push(B);break;case"client":w.push(B);break;case"server":q.push(B);break}}return{signals:k,client:w,server:q}}var W;var Y=V(()=>{W=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/});Y();export{X as classifyScript,x as classifyAllScripts};
