// @bun
var{defineProperty:O,getOwnPropertyNames:Z,getOwnPropertyDescriptor:$}=Object,k=Object.prototype.hasOwnProperty;function M(b){return this[b]}var N=(b)=>{var j=(Q??=new WeakMap).get(b),q;if(j)return j;if(j=O({},"__esModule",{value:!0}),b&&typeof b==="object"||typeof b==="function"){for(var v of Z(b))if(!k.call(j,v))O(j,v,{get:M.bind(b,v),enumerable:!(q=$(b,v))||q.enumerable})}return Q.set(b,j),j},Q;var w=(b)=>b;function y(b,j){this[b]=w.bind(null,j)}var W=(b,j)=>{for(var q in j)O(b,q,{get:j[q],enumerable:!0,configurable:!0,set:y.bind(j,q)})};var g=(b,j)=>()=>(b&&(j=b(b=0)),j);var L=import.meta.require;import V from"fs";import X from"path";var Y="node_modules/@stacksjs/crosswind/dist/crosswind.css";async function P(b){let j=X.join(b,Y);try{return await V.promises.access(j),!0}catch{return!1}}async function F(b,j={}){let q=j.cssPath||X.join(b.root,Y);try{return await V.promises.readFile(q,"utf-8")}catch{return I()}}function I(){return`
/* Minimal utility classes (Crosswind fallback) */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Spacing */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Colors */
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray-500 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-green-500 { background-color: #22c55e; }
.bg-red-500 { background-color: #ef4444; }

/* Borders */
.border { border-width: 1px; }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Sizing */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-auto { width: auto; }
.h-auto { height: auto; }
.min-w-0 { min-width: 0; }
.max-w-full { max-width: 100%; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-scroll { overflow: scroll; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Transitions */
.transition { transition-property: all; transition-duration: 150ms; }
.duration-150 { transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
`}async function T(b,j={}){return`<style id="crosswind-css">
${await F(b,j)}
</style>`}function _(b){let j=/class=["']([^"']+)["']/g,q=new Set,v=j.exec(b);while(v!==null){let G=v[1].split(/\s+/);for(let B of G)if(B.trim())q.add(B.trim());v=j.exec(b)}return Array.from(q)}function f(b,j){let q=b.split(`
`),v=[],G=!1,B="",K=!1;for(let z of q)if(z.includes("{")){G=!0,B=z;for(let J of j)if(z.includes(`.${J}`)||z.includes(`.${J} `)||z.includes(`.${J},`)||z.includes(`.${J}:`)){K=!0;break}}else if(z.includes("}")){if(K)v.push(B),v.push(z);G=!1,B="",K=!1}else if(G)B+=`
${z}`;else v.push(z);return v.join(`
`)}export{F as loadCrosswindCSS,P as isCrosswindAvailable,f as generateOptimizedCSS,T as generateCrosswindStyleTag,_ as extractUsedClasses};
