function I(n){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");var e=String(n),r=e.length,s=-1,t,l="",o=e.charCodeAt(0);if(r==1&&o==45)return"\\"+e;for(;++s=1&&t<=31||t==127||s==0&&t>=48&&t<=57||s==1&&t>=48&&t<=57&&o==45){l+="\\"+t.toString(16)+" ";continue}if(t>=128||t==45||t==95||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122){l+=e.charAt(s);continue}l+="\\"+e.charAt(s)}return l}function R(n){return n.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,e=>e.length>2?String.fromCodePoint(Number.parseInt(e.slice(1).trim(),16)):e[1])}var U=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-underline-offset","--text-indent","--text-decoration-thickness","--text-decoration-color"]]]);function D(n,e){return(U.get(e)??[]).some(r=>n===r||n.startsWith(`${r}-`))}var L=class{constructor(e=new Map,r=new Set([])){this.values=e;this.keyframes=r}prefix=null;add(e,r,s=0){if(e.endsWith("-*")){if(r!=="initial")throw new Error(`Invalid theme value \`${r}\` for namespace \`${e}\``);e==="--*"?this.values.clear():this.clearNamespace(e.slice(0,-2),0)}if(s&4){let t=this.values.get(e);if(t&&!(t.options&4))return}r==="initial"?this.values.delete(e):this.values.set(e,{value:r,options:s})}keysInNamespaces(e){let r=[];for(let s of e){let t=`${s}-`;for(let l of this.values.keys())l.startsWith(t)&&l.indexOf("--",2)===-1&&(D(l,s)||r.push(l.slice(t.length)))}return r}get(e){for(let r of e){let s=this.values.get(r);if(s)return s.value}return null}hasDefault(e){return(this.getOptions(e)&4)===4}getOptions(e){return e=R(this.#n(e)),this.values.get(e)?.options??0}entries(){return this.prefix?Array.from(this.values,e=>(e[0]=this.#r(e[0]),e)):this.values.entries()}#r(e){return this.prefix?`--${this.prefix}-${e.slice(2)}`:e}#n(e){return this.prefix?`--${e.slice(3+this.prefix.length)}`:e}clearNamespace(e,r){let s=U.get(e)??[];e:for(let t of this.values.keys())if(t.startsWith(e)){if(r!==0&&(this.getOptions(t)&r)!==r)continue;for(let l of s)if(t.startsWith(l))continue e;this.values.delete(t)}}#e(e,r){for(let s of r){let t=e!==null?`${s}-${e}`:s;if(!this.values.has(t))if(e!==null&&e.includes(".")){if(t=`${s}-${e.replaceAll(".","_")}`,!this.values.has(t))continue}else continue;if(!D(t,s))return t}return null}#t(e){return this.values.has(e)?`var(${I(this.#r(e))})`:null}markUsedVariable(e){let r=R(this.#n(e)),s=this.values.get(r);s&&(s.options|=16)}resolve(e,r){let s=this.#e(e,r);if(!s)return null;let t=this.values.get(s);return t.options&1?t.value:this.#t(s)}resolveValue(e,r){let s=this.#e(e,r);return s?this.values.get(s).value:null}resolveWith(e,r,s=[]){let t=this.#e(e,r);if(!t)return null;let l={};for(let u of s){let a=`${t}${u}`,i=this.values.get(a);i&&(i.options&1?l[u]=i.value:l[u]=this.#t(a))}let o=this.values.get(t);return o.options&1?[o.value,l]:[this.#t(t),l]}namespace(e){let r=new Map,s=`${e}-`;for(let[t,l]of this.values)t===e?r.set(null,l.value):t.startsWith(`${s}-`)?r.set(t.slice(e.length),l.value):t.startsWith(s)&&r.set(t.slice(s.length),l.value);return r}addKeyframes(e){this.keyframes.add(e)}getKeyframes(){return Array.from(this.keyframes)}};var N=class extends Map{constructor(r){super();this.factory=r}get(r){let s=super.get(r);return s===void 0&&(s=this.factory(r,this),this.set(r,s)),s}};var j=64;function G(n,e=[]){return{kind:"rule",selector:n,nodes:e}}function $(n,e="",r=[]){return{kind:"at-rule",name:n,params:e,nodes:r}}function M(n,e=[]){return n.charCodeAt(0)===j?x(n,e):G(n,e)}function _(n,e,r=!1){return{kind:"declaration",property:n,value:e,important:r}}function F(n){return{kind:"comment",value:n}}function oe(n,e){return{kind:"context",context:n,nodes:e}}function ae(n){return{kind:"at-root",nodes:n}}function b(n,e,r=[],s={}){for(let t=0;tnew Set),l=new Set,o=new Set;function u(i,f,h={},d=0){if(i.kind==="declaration"){if(i.property==="--tw-sort"||i.value===void 0||i.value===null)return;if(h.theme&&i.property[0]==="-"&&i.property[1]==="-"&&t.get(f).add(i),i.value.includes("var(")&&e.trackUsedVariables(i.value),i.property==="animation"){let c=i.value.split(/\s+/);for(let p of c)o.add(p)}f.push(i)}else if(i.kind==="rule")if(i.selector==="&")for(let c of i.nodes){let p=[];u(c,p,h,d+1),p.length>0&&f.push(...p)}else{let c={...i,nodes:[]};for(let p of i.nodes)u(p,c.nodes,h,d+1);c.nodes.length>0&&f.push(c)}else if(i.kind==="at-rule"&&i.name==="@property"&&d===0){if(s.has(i.params))return;s.add(i.params);let c={...i,nodes:[]};for(let p of i.nodes)u(p,c.nodes,h,d+1);f.push(c)}else if(i.kind==="at-rule"){let c={...i,nodes:[]};for(let p of i.nodes)u(p,c.nodes,h,d+1);i.name==="@keyframes"&&h.theme&&l.add(c),(c.nodes.length>0||c.name==="@layer"||c.name==="@charset"||c.name==="@custom-media"||c.name==="@namespace"||c.name==="@import")&&f.push(c)}else if(i.kind==="at-root")for(let c of i.nodes){let p=[];u(c,p,h,0);for(let g of p)r.push(g)}else if(i.kind==="context"){if(i.context.reference)return;for(let c of i.nodes)u(c,f,{...h,...i.context},d)}else i.kind==="comment"&&f.push(i)}let a=[];for(let i of n)u(i,a,{},0);e:for(let[i,f]of t)for(let h of f){if(e.theme.getOptions(h.property)&24){if(h.property.startsWith("--animate-")){let p=h.value.split(/\s+/);for(let g of p)o.add(g)}continue}let c=i.indexOf(h);if(i.splice(c,1),i.length===0){for(let[p,g]of a.entries())if(g.kind==="rule"&&g.nodes===i){a.splice(p,1);break}continue e}}for(let i of l)if(!o.has(i.params)){let f=r.indexOf(i);r.splice(f,1)}return a.concat(r)}function ue(n){function e(s,t=0){let l="",o=" ".repeat(t);if(s.kind==="declaration")l+=`${o}${s.property}: ${s.value}${s.important?" !important":""}; `;else if(s.kind==="rule"){l+=`${o}${s.selector} { `;for(let u of s.nodes)l+=e(u,t+1);l+=`${o}} `}else if(s.kind==="at-rule"){if(s.nodes.length===0)return`${o}${s.name} ${s.params}; `;l+=`${o}${s.name}${s.params?` ${s.params} `:" "}{ `;for(let u of s.nodes)l+=e(u,t+1);l+=`${o}} `}else if(s.kind==="comment")l+=`${o}/*${s.value}*/ `;else if(s.kind==="context"||s.kind==="at-root")return"";return l}let r="";for(let s of n){let t=e(s);t!==""&&(r+=t)}return r}var y=92,C=47,k=42,H=34,z=39,Q=58,E=59,m=10,v=32,S=9,P=123,T=125,K=40,B=41,Y=91,q=93,V=45,w=64,X=33;function de(n){n=n.replaceAll(`\r `,` `);let e=[],r=[],s=[],t=null,l=null,o="",u="",a;for(let i=0;i0&&n[g]===h[h.length-1]&&(h=h.slice(0,-1));let p=O(o,c);if(!p)throw new Error("Invalid custom property, expected a value");t?t.nodes.push(p):e.push(p),o=""}else if(f===E&&o.charCodeAt(0)===w)l=x(o),t?t.nodes.push(l):e.push(l),o="",l=null;else if(f===E&&u[u.length-1]!==")"){let h=O(o);if(!h)throw o.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${o.trim()}\``);t?t.nodes.push(h):e.push(h),o=""}else if(f===P&&u[u.length-1]!==")")u+="}",l=M(o.trim()),t&&t.nodes.push(l),s.push(t),t=l,o="",l=null;else if(f===T&&u[u.length-1]!==")"){if(u==="")throw new Error("Missing opening {");if(u=u.slice(0,-1),o.length>0)if(o.charCodeAt(0)===w)l=x(o),t?t.nodes.push(l):e.push(l),o="",l=null;else{let d=o.indexOf(":");if(t){let c=O(o,d);if(!c)throw new Error(`Invalid declaration: \`${o.trim()}\``);t.nodes.push(c)}}let h=s.pop()??null;h===null&&t&&e.push(t),t=h,o="",l=null}else if(f===K)u+=")",o+="(";else if(f===B){if(u[u.length-1]!==")")throw new Error("Missing opening (");u=u.slice(0,-1),o+=")"}else{if(o.length===0&&(f===v||f===m||f===S))continue;o+=String.fromCharCode(f)}}}if(o.charCodeAt(0)===w&&e.push(x(o)),u.length>0&&t){if(t.kind==="rule")throw new Error(`Missing closing } at ${t.selector}`);if(t.kind==="at-rule")throw new Error(`Missing closing } at ${t.name} ${t.params}`)}return r.length>0?r.concat(e):e}function x(n,e=[]){for(let r=5;r