39 lines
244 KiB
JavaScript
39 lines
244 KiB
JavaScript
|
|
import{a as z,b as st,c as wr,d as J,e as Ge,f as _,g as _t,h as Q,i as Ae,j as br}from"./chunk-C2OYBFIH.mjs";import{a as kr}from"./chunk-DCG7AFIE.mjs";import{a as _e,b as Ie,c as vr}from"./chunk-5JIJA4QV.mjs";var yr="4.3.3";function mn(e){return{kind:"combinator",value:e}}function It(e){return{kind:"complex",nodes:e}}function xr(e){return{kind:"compound",nodes:e}}function gn(e,i){return{kind:"function",value:e,nodes:i}}function hn(e){return{kind:"list",nodes:e}}function be(e){return{kind:"selector",value:e}}function Ar(e){return{kind:"value",value:e}}function qe(e){return e.kind==="selector"&&e.value.charCodeAt(0)===jt}function ut(e){if(e.kind!=="selector")return!1;switch(e.value.charCodeAt(0)){case jt:case Or:case Rr:case Pr:case Lt:case zt:return!1;default:return!0}}function oe(e,i=!1){let r="";for(let t of e)switch(t.kind){case"selector":case"value":{r+=t.value;break}case"combinator":{i||t.value===" "?r+=t.value:r+=` ${t.value} `;break}case"function":{r+=`${t.value}(${oe(t.nodes,i)})`;break}case"complex":case"compound":{r+=oe(t.nodes,i);break}case"list":{r+=t.nodes.map(n=>oe([n],i)).join(i?",":", ");break}}return r}var Cr=92,vn=93,Sr=41,Lt=58,Vr=44,wn=34,Rr=46,$r=62,Dt=10,Pr=35,zt=91,Tr=40,Nr=43,kn=39,Kt=32,Ut=9,Er=126,Or=38,jt=42;function fe(e){e=e.replaceAll(`\r
|
||
|
|
`,`
|
||
|
|
`);let i=[],r=i,t=!1,n=[],s=null,l="",d;function f(p=r){return p.length===1?p[0]:t?It(p):xr(p)}function c(p){let m=r[r.length-1];m?.kind==="compound"?m.nodes.push(p):m&&m.kind!=="list"&&m.kind!=="combinator"?r[r.length-1]=xr([m,p]):r.push(p)}for(let p=0;p<e.length;p++){let m=e.charCodeAt(p);switch(m){case Vr:{for(l.length>0&&(c(be(l)),l="");p+1<e.length&&(d=e.charCodeAt(p+1),!(d!==Dt&&d!==Kt&&d!==Ut));p++);if(s)s.nodes.push(f()),r=[],t=!1;else{let u=r.splice(0),v=f(u),h=hn([v]);r.push(h),s=h,r=[],t=!1}break}case $r:case Dt:case Kt:case Nr:case Ut:case Er:{l.length>0&&(c(be(l)),l="");let u=p,v=p+1;for(;v<e.length&&(d=e.charCodeAt(v),!(d!==$r&&d!==Dt&&d!==Kt&&d!==Nr&&d!==Ut&&d!==Er));v++);p=v-1;let h=e.slice(u,v).trim();if(h===""&&(r.length===0||v>=e.length||e.charCodeAt(v)===Vr))break;r.push(mn(h===""?" ":h)),t=!0;break}case Tr:{let u=gn(l,[]);if(l="",u.value!==":not"&&u.value!==":where"&&u.value!==":has"&&u.value!==":is"){let v=p+1,h=0;for(let S=p+1;S<e.length;S++){if(d=e.charCodeAt(S),d===Tr){h++;continue}if(d===Sr){if(h===0){p=S;break}h--}}let k=p,y=e.slice(v,k);if(u.value===":nth-child"||u.value===":nth-last-child"){let S=y.indexOf("of ");if(S!==-1){u.nodes.push(Ar(y.slice(0,S+3)),...fe(y.slice(S+3))),l="",p=k,c(u);break}}u.nodes.push(Ar(y)),l="",p=k,c(u);break}c(u),n.push({target:r,currentList:s,containsCombinator:t}),r=u.nodes,t=!1,s=null;break}case Sr:{l.length>0&&(c(be(l)),l=""),s?s.nodes.push(f()):t&&r.splice(0,r.length,It(r.splice(0)));let u=n.pop();r=u?.target??i,s=u?.currentList??null,t=u?.containsCombinator??!1;break}case Rr:case Lt:case Pr:{if(m===Lt&&l===":"){l+=e[p];break}l.length>0&&c(be(l)),l=e[p];break}case zt:{l.length>0&&(c(be(l)),l="");let u=p,v=0;for(let h=p+1;h<e.length;h++){if(d=e.charCodeAt(h),d===zt){v++;continue}if(d===vn){if(v===0){p=h;break}v--}}c(be(e.slice(u,p+1)));break}case kn:case wn:{let u=p;for(let v=p+1;v<e.length;v++)if(d=e.charCodeAt(v),d===Cr)v+=1;else if(d===m){p=v;break}l+=e.slice(u,p+1);break}case Or:case jt:{l.length>0&&(c(be(l)),l=""),c(be(e[p]));break}case Cr:{l+=e[p]+e[p+1],p+=1;break}default:l+=e[p]}}return l.length>0&&c(be(l)),s?s.nodes.push(f()):t&&r.splice(0,r.length,It(r.splice(0))),i}function ft(e){let i=[0];for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&i.push(n+1);function r(n){let s=0,l=i.length;for(;l>0;){let f=(l|0)>>1,c=s+f;i[c]<=n?(s=c+1,l=l-f-1):l=f}s-=1;let d=n-i[s];return{line:s+1,column:d}}function t({line:n,column:s}){n-=1,n=Math.min(Math.max(n,0),i.length-1);let l=i[n],d=i[n+1]??l;return Math.min(Math.max(l+s,0),d)}return{find:r,findOffset:t}}var He=92,ct=47,pt=42,_r=34,Ir=39,bn=58,dt=59,me=10,mt=13,Ze=32,Je=9,Dr=123,Ft=125,Yt=40,Kr=41,yn=91,xn=93,Ur=45,Wt=64,An=33,ge=class e extends Error{loc;constructor(i,r){if(r){let t=r[0],n=ft(t.code).find(r[1]);i=`${t.file}:${n.line}:${n.column+1}: ${i}`}super(i),this.name="CssSyntaxError",this.loc=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};function Te(e,i){let r=i?.from?{file:i.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let t=[],n=[],s=[],l=null,d=null,f="",c="",p=0,m;for(let u=0;u<e.length;u++){let v=e.charCodeAt(u);if(!(v===mt&&(m=e.charCodeAt(u+1),m===me)))if(v===He)f===""&&(p=u),f+=e.slice(u,u+2),u+=1;else if(v===ct&&e.charCodeAt(u+1)===pt){let h=u;for(let y=u+2;y<e.length;y++)if(m=e.charCodeAt(y),m===He)y+=1;else if(m===pt&&e.charCodeAt(y+1)===ct){u=y+1;break}let k=e.slice(h,u+1);if(k.charCodeAt(2)===An){let y=gt(k.slice(2,-2));n.push(y),r&&(y.src=[r,h,u+1],y.dst=[r,h,u+1])}}else if(v===Ir||v===_r){let h=Lr(e,u,v,r);f+=e.slice(u,h+1),u=h}else{if((v===Ze||v===me||v===Je)&&(m=e.charCodeAt(u+1))&&(m===Ze||m===me||m===Je||m===mt&&(m=e.charCodeAt(u+2))&&m==me))continue;if(v===me){if(f.length===0)continue;m=f.charCodeAt(f.length-1),m!==Ze&&m!==me&&m!==Je&&(f+=" ")}else if(v===Ur&&e.charCodeAt(u+1)===Ur&&f.length===0){let h="",k=u,y=-1;for(let x=u+2;x<e.length;x++)if(m=e.charCodeAt(x),m===He)x+=1;else if(m===Ir||m===_r)x=Lr(e,x,m,r);else if(m===ct&&e.charCodeAt(x+1)===pt){for(let b=x+2;b<e.length;b++)if(m=e.charCodeAt(b),m===He)b+=1;else if(m===pt&&e.charCodeAt(b+1)===ct){x=b+1;break}}e
|
||
|
|
`,`
|
||
|
|
`);let i=[],r=[],t=null,n="",s;for(let l=0;l<e.length;l++){let d=e.charCodeAt(l);switch(d){case zr:{n+=e[l]+e[l+1],l++;break}case En:{if(n.length>0){let c=ne(n);t?t.nodes.push(c):i.push(c),n=""}let f=ne(e[l]);t?t.nodes.push(f):i.push(f);break}case jr:case Mr:case Fr:case Wr:case Br:case Yr:case Gr:case qr:{if(n.length>0){let m=ne(n);t?t.nodes.push(m):i.push(m),n=""}let f=l,c=l+1;for(;c<e.length&&(s=e.charCodeAt(c),!(s!==jr&&s!==Mr&&s!==Fr&&s!==Wr&&s!==Br&&s!==Yr&&s!==Gr&&s!==qr));c++);l=c-1;let p=Sn(e.slice(f,c));t?t.nodes.push(p):i.push(p);break}case Nn:case $n:{let f=l;for(let c=l+1;c<e.length;c++)if(s=e.charCodeAt(c),s===zr)c+=1;else if(s===d){l=c;break}n+=e.slice(f,l+1);break}case Tn:{let f=Cn(n,[]);n="",t?t.nodes.push(f):i.push(f),r.push(f),t=f;break}case Vn:{let f=r.pop();if(n.length>0){let c=ne(n);f?.nodes.push(c),n=""}r.length>0?t=r[r.length-1]:t=null;break}default:n+=String.fromCharCode(d)}}return n.length>0&&i.push(ne(n)),i}var qt=(l=>(l[l.Continue=0]="Continue",l[l.Skip=1]="Skip",l[l.Stop=2]="Stop",l[l.Replace=3]="Replace",l[l.ReplaceSkip=4]="ReplaceSkip",l[l.ReplaceStop=5]="ReplaceStop",l))(qt||{}),V={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function P(e,i){typeof i=="function"?Hr(e,i):Hr(e,i.enter,i.exit)}function Hr(e,i=()=>V.Continue,r=()=>V.Continue){let t={value:[e,0,null],prev:null},n={parent:null,depth:0,index:0,siblings:e,path(){let s=[],l=t;for(;l;){let d=l.value[2];d&&s.push(d),l=l.prev}return s.reverse(),s}};for(;t!==null;){let s=t.value,l=s[0],d=s[1],f=s[2];if(d>=l.length){t=t.prev,n.depth-=1;continue}if(n.parent=f,n.siblings=l,d>=0){n.index=d;let u=l[d],v=i(u,n)??V.Continue;switch(v.kind){case 0:{u.nodes&&u.nodes.length>0&&(n.depth+=1,t={value:[u.nodes,0,u],prev:t}),s[1]=~d;continue}case 2:return;case 1:{s[1]=~d;continue}case 3:{l.splice(d,1,...v.nodes);continue}case 5:{l.splice(d,1,...v.nodes);return}case 4:{l.splice(d,1,...v.nodes),s[1]+=v.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${qt[v.kind]??`Unknown(${v.kind})`}\` in enter.`)}}let c=~d;n.index=c;let p=l[c],m=r(p,n)??V.Continue;switch(m.kind){case 0:s[1]=c+1;continue;case 2:return;case 3:{l.splice(c,1,...m.nodes),s[1]=c+m.nodes.length;continue}case 5:{l.splice(c,1,...m.nodes);return}case 4:{l.splice(c,1,...m.nodes),s[1]=c+m.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${qt[m.kind]??`Unknown(${m.kind})`}\` in exit.`)}}}var Rn=new U(e=>{let i=[];return P(M(e),r=>{if(!(r.kind!=="function"||r.value!=="var"))return P(r.nodes,t=>{t.kind!=="word"||t.value[0]!=="-"||t.value[1]!=="-"||i.push(t.value)}),V.Skip}),i});function ht(e){return Rn.get(e)}var Pn=64,On=124;function H(e,i=[]){return{kind:"rule",selector:e,nodes:i}}function B(e,i="",r=[]){return{kind:"at-rule",name:e,params:i,nodes:r}}function Z(e,i=[]){return e.charCodeAt(0)===Pn?Qe(e,i):H(e,i)}function a(e,i,r=!1){return{kind:"declaration",property:e,value:i,important:r}}function gt(e){return{kind:"comment",value:e}}function ve(e,i){return{kind:"context",context:e,nodes:i}}function Y(e){return{kind:"at-root",nodes:e}}function re(e){switch(e.kind){case"rule":return{kind:e.kind,selector:e.selector,nodes:e.nodes.map(re),src:e.src,dst:e.dst};case"at-rule":return{kind:e.kind,name:e.name,params:e.params,nodes:e.nodes.map(re),src:e.src,dst:e.dst};case"at-root":return{kind:e.kind,nodes:e.nodes.map(re),src:e.src,dst:e.dst};case"context":return{kind:e.kind,context:{...e.context},nodes:e.nodes.map(re),src:e.src,dst:e.dst};case"declaration":return{kind:e.kind,property:e.property,value:e.value,important:e.important,src:e.src,dst:e.dst};case"comment":return{kind:e.kind,value:e.value,src:e.src,dst:e.dst};default:throw new Error(`Unknown node kind: ${e.kind}`)}}function et(e){return{depth:e.depth,index:e.index,siblings:e.siblings,get context(){let i={};for(let r of e.path())r.kind==="context"&&Object.assign(i,r.context);return Object.defineProperty(this,"context",{value:i}),i},get parent(){let i=
|
||
|
|
`,i){r+=c.length;let p=r;r+=l.property.length,r+=2,r+=l.value?.length??0,l.important&&(r+=11);let m=r;r+=2,l.dst=[t,p,m]}}else if(l.kind==="rule"){if(f+=`${c}${l.selector} {
|
||
|
|
`,i){r+=c.length;let p=r;r+=l.selector.length,r+=1;let m=r;l.dst=[t,p,m],r+=2}for(let p of l.nodes)f+=n(p,d+1);f+=`${c}}
|
||
|
|
`,i&&(r+=c.length,r+=2)}else if(l.kind==="at-rule"){if(l.nodes.length===0){let p=`${c}${l.name} ${l.params};
|
||
|
|
`;if(i){r+=c.length;let m=r;r+=l.name.length,r+=1,r+=l.params.length;let u=r;r+=2,l.dst=[t,m,u]}return p}if(f+=`${c}${l.name}${l.params?` ${l.params} `:" "}{
|
||
|
|
`,i){r+=c.length;let p=r;r+=l.name.length,l.params&&(r+=1,r+=l.params.length),r+=1;let m=r;l.dst=[t,p,m],r+=2}for(let p of l.nodes)f+=n(p,d+1);f+=`${c}}
|
||
|
|
`,i&&(r+=c.length,r+=2)}else if(l.kind==="comment"){if(f+=`${c}/*${l.value}*/
|
||
|
|
`,i){r+=c.length;let p=r;r+=2+l.value.length+2;let m=r;l.dst=[t,p,m],r+=1}}else if(l.kind==="context"||l.kind==="at-root")return"";return f}let s="";for(let l of e)s+=n(l,0);return t.code=s,s}function Kn(e,i){let r=[];return P(e,(t,n)=>{if(i(t))return r=n.path(),r.push(t),V.Stop}),r}function Jr(e,i,r,t=new Set){if(t.has(e)||(t.add(e),i.getOptions(e)&24))return!0;{let s=r.get(e)??[];for(let l of s)if(Jr(l,i,r,t))return!0}return!1}function Zr(e){return e.split(/[\s,]+/)}function Ce(e){if(e.indexOf("(")===-1)return De(e);let i=M(e);return Zt(i),e=F(i),e=st(e),e}function De(e,i=!1){let r="";for(let t=0;t<e.length;t++){let n=e[t];n==="\\"&&e[t+1]==="_"?(r+="_",t+=1):n==="_"&&!i?r+=" ":r+=n}return r}function Zt(e){for(let i of e)switch(i.kind){case"function":{if(i.value==="url"||i.value.endsWith("_url")){i.value=De(i.value);break}if(i.value==="var"||i.value.endsWith("_var")||i.value==="theme"||i.value.endsWith("_theme")){i.value=De(i.value);for(let r=0;r<i.nodes.length;r++){if(r==0&&i.nodes[r].kind==="word"){i.nodes[r].value=De(i.nodes[r].value,!0);continue}Zt([i.nodes[r]])}break}i.value=De(i.value),Zt(i.nodes);break}case"separator":case"word":{i.value=De(i.value);break}default:Un(i)}}function Un(e){throw new Error(`Unexpected value: ${e}`)}var Jt=new Uint8Array(256);function ye(e){let i=0,r=e.length;for(let t=0;t<r;t++){let n=e.charCodeAt(t);switch(n){case 92:t+=1;break;case 39:case 34:for(;++t<r;){let s=e.charCodeAt(t);if(s===92){t+=1;continue}if(s===n)break}break;case 40:Jt[i]=41,i++;break;case 91:Jt[i]=93,i++;break;case 123:break;case 93:case 125:case 41:if(i===0)return!1;i>0&&n===Jt[i-1]&&i--;break;case 59:if(i===0)return!1;break}}return!0}var Ln=58,Qr=45,Xr=97,ei=122,er=/^[a-zA-Z0-9_.%-]+$/;function Ue(e){switch(e.kind){case"arbitrary":return{kind:e.kind,property:e.property,value:e.value,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null,variants:e.variants.map(Ke),important:e.important,raw:e.raw};case"static":return{kind:e.kind,root:e.root,variants:e.variants.map(Ke),important:e.important,raw:e.raw};case"functional":return{kind:e.kind,root:e.root,value:e.value?e.value.kind==="arbitrary"?{kind:e.value.kind,dataType:e.value.dataType,value:e.value.value}:{kind:e.value.kind,value:e.value.value,fraction:e.value.fraction}:null,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null,variants:e.variants.map(Ke),important:e.important,raw:e.raw};default:throw new Error("Unknown candidate kind")}}function Ke(e){switch(e.kind){case"arbitrary":return{kind:e.kind,selector:e.selector,relative:e.relative};case"static":return{kind:e.kind,root:e.root};case"functional":return{kind:e.kind,root:e.root,value:e.value?{kind:e.value.kind,value:e.value.value}:null,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null};case"compound":return{kind:e.kind,root:e.root,variant:Ke(e.variant),modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null};default:throw new Error("Unknown variant kind")}}function*ti(e,i){let r=z(e,":");if(i.theme.prefix){if(r.length===1||r[0]!==i.theme.prefix)return null;r.shift()}let t=r.pop(),n=[];for(let m=r.length-1;m>=0;--m){let u=i.parseVariant(r[m]);if(u===null)return;n.push(u)}let s=!1;t[t.length-1]==="!"?(s=!0,t=t.slice(0,-1)):t[0]==="!"&&(s=!0,t=t.slice(1)),i.utilities.has(t,"static")&&!t.includes("[")&&(yield{kind:"static",root:t,variants:n,important:s,raw:e});let[l,d=null,f]=z(t,"/");if(f)return;let c=d===null?null:Qt(d);if(d!==null&&c===null)return;if(l[0]==="["){if(l[l.length-1]!=="]")return;let m=l.charCodeAt(1);if(m!==Qr&&!(m>=Xr&&m<=ei))return;l=l.slice(1,-1);let u=l.indexOf(":");if(u===-1||u===0||u===l.length-1)return;let v=l.slice(0,u),h=Ce(l.slice(u+1));if(!ye(h))return;yield{kind:"arbitrary",property:v,value:h,modifier:c,variants:n,important:s,raw:e};return}let p;if(l[l.length-1]==="]"){let m=l.indexOf("-[");if(m===-1)return;let u=l.slice(0,m);if(!i.utilities.has(u,"functional"))return;let v=l.slice(m+1);p=[[u,v]]}else if(l[l.length-1]===")"){let m=l.indexOf("-(");if(m===-1)return;let u=l.slice(0,m);if(!i.utilities.has(u,"functional"))retur
|
||
|
|
Only valid data types are: ${ir.map(k=>`"${k}"`).join(", ")}.
|
||
|
|
`);let c=f.value,p=structuredClone(l),m="\xB6";P(p.nodes,k=>{if(k.kind==="word"&&k.value===c)return V.ReplaceSkip({kind:"word",value:m})});let u="^".repeat(F([f]).length),v=F([p]).indexOf(m),h=["```css",F([l])," ".repeat(v)+u,"```"].join(`
|
||
|
|
`);console.warn(h)}}),n.value=F(s)}),r.utilities.functional(i.slice(0,-2),n=>{let s=re(e),l=n.value,d=n.modifier,f=!1,c=!1,p=!1,m=!1,u=new Map,v=!1;if(P([s],(h,k)=>{let y=k.parent;if(y?.kind!=="rule"&&y?.kind!=="at-rule"||h.kind!=="declaration"||!h.value)return;let S=!1,x=M(h.value);if(P(x,b=>{if(b.kind==="function"){if(b.value==="--value"){f=!0;let I=li(l,b,r);return I?(c=!0,I.ratio?v=!0:u.set(h,y),V.ReplaceSkip(I.nodes)):(S=!0,V.Stop)}else if(b.value==="--modifier"){p=!0;let I=li(d,b,r);return I?(m=!0,V.ReplaceSkip(I.nodes)):(S=!0,V.Stop)}}}),S)return V.ReplaceSkip([]);h.value=F(x)}),!f||!c||p&&!m&&d!==null||v&&m||d&&!v&&!m)return null;if(v)for(let[h,k]of u){let y=k.nodes.indexOf(h);y!==-1&&k.nodes.splice(y,1)}return s.nodes}),r.utilities.suggest(i.slice(0,-2),()=>{let n=[],s=[];for(let[l,{literals:d,usedSpacingNumber:f,usedSpacingInteger:c,themeKeys:p}]of[[n,t["--value"]],[s,t["--modifier"]]]){for(let m of d)l.push(m);if(f)l.push(...yt);else if(c)for(let m of yt)_(m)&&l.push(m);for(let m of r.theme.keysInNamespaces(p))l.push(m.replace(oi,(u,v,h)=>`${v}.${h}`))}return[{values:n,modifiers:s}]})}:ll(i)?r=>{r.utilities.static(i,()=>e.nodes.map(re))}:null}function li(e,i,r){if(e===null){for(let t of i.nodes)if(t.kind==="function"&&t.value==="--default")return{nodes:t.nodes};return}for(let t of i.nodes){if(e.kind==="named"&&t.kind==="word"&&(t.value[0]==="'"||t.value[0]==='"')&&t.value[t.value.length-1]===t.value[0]&&t.value.slice(1,-1)===e.value)return{nodes:M(e.value)};if(e.kind==="named"&&t.kind==="word"&&t.value[0]==="-"&&t.value[1]==="-"){let n=t.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=r.theme.resolve(e.value,[n]);if(s)return{nodes:M(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let l=[s.shift()],d=r.theme.resolveWith(e.value,l,s);if(d){let[,f={}]=d;{let c=f[s.pop()];if(c)return{nodes:M(c)}}}}}else if(e.kind==="named"&&t.kind==="word"){if(!ir.includes(t.value))continue;let n=t.value==="ratio"&&"fraction"in e?e.fraction:e.value;if(!n)continue;let s=J(n,[t.value]);if(s===null)continue;if(s==="ratio"){let[l,d]=z(n,"/").map(Number);if(!_(l)||!_(d))continue}else{if(s==="number"&&!Q(n))continue;if(s==="percentage"&&!_(n.slice(0,-1)))continue}if(s==="ratio"){let[l,d]=z(n,"/");return{nodes:M(`${l.trim()} / ${d.trim()}`),ratio:!0}}return{nodes:M(n),ratio:!1}}else if(e.kind==="arbitrary"&&t.kind==="word"&&t.value[0]==="["&&t.value[t.value.length-1]==="]"){let n=t.value.slice(1,-1);if(n==="*")return{nodes:M(e.value)};if("dataType"in e&&e.dataType&&e.dataType!==n)continue;if("dataType"in e&&e.dataType)return{nodes:M(e.value)};if(J(e.value,[n])!==null)return{nodes:M(e.value)}}}}function xe(e,i,r,t,n=""){let s=!1,l=it(i,f=>r==null?t(f):f.startsWith("current")?t(X(f,r)):((f.startsWith("var(")||r.startsWith("var("))&&(s=!0),t(ai(f,r))));function d(f){return n?z(f,",").map(c=>n.trim()+" "+c.trim()).join(", "):f}return s?[a(e,d(it(i,t))),Z("@supports (color: lab(from red l a b))",[a(e,d(l))])]:[a(e,d(l))]}function wt(e,i,r,t,n=""){let s=!1,l=z(i,",").map(d=>it(d,f=>r==null?t(f):f.startsWith("current")?t(X(f,r)):((f.startsWith("var(")||r.startsWith("var("))&&(s=!0),t(ai(f,r))))).map(d=>`drop-shadow(${d})`).join(" ");return s?[a(e,n+z(i,",").map(d=>`drop-shadow(${it(d,t)})`).join(" ")),Z("@supports (color: lab(from red l a b))",[a(e,n+l)])]:[a(e,n+l)]}var fi=/^-?[a-z][a-zA-Z0-9_-]*/,Zn=37,Jn=47,Qn=46,Xn=97,el=122,tl=65,rl=90,kt=48,bt=57,il=95,nl=45;function ll(e){let i=fi.exec(e);if(i===null)return!1;let r=i[0],t=e.slice(r.length);if(t.length===0&&r.endsWith("-"))return!1;if(t.length===0)return!0;let n=!1;for(let s=0;s<t.length;s++){let l=t.charCodeAt(s);switch(l){case Zn:{if(s!==t.length-1)return!1;let f=(t[s-1]||r[r.length-1]||"").charCodeAt(0);if(f<kt||f>bt)return!1;break}case Jn:{if(s===t.length-1||n)return!1;n=!0;break}case Qn:{let f=(t[s-1]||r[r.length-1]||"").charCodeAt(0);if(f<kt||f>bt)return!1;let p=(t[s+1]||"").charCodeAt(0);if(p<kt||p>bt)return!1;break}case il:case nl:continue;default:{if(l>=Xn&&l<=el||l>=tl&&l<=rl||l>=kt&&l<=bt)continue;return!1}}}return!0}function al(e){if(!e.endsWith("-*"))return!1;e=e.slice
|
||
|
|
`),s=!0;return P(M(t),l=>{if(l.kind==="function"&&l.value==="var"){let d=l.nodes[0].value;if(!new RegExp(`var\\(${d}[,)]\\s*`,"g").test(n)||n.includes(`${d}:`))return s=!1,V.Stop}}),s}function Ml(e,i){if(e.kind!=="functional"||e.value?.kind!=="named")return e;let r=i.designSystem,t=r.storage[ur].get(i.signatureOptions),n=r.storage[we].get(i.signatureOptions),s=r.storage[lt].get(i.signatureOptions),l=r.printCandidate(e),d=n.get(l);if(typeof d!="string")return e;for(let c of f(d,e))if(s(e,c))return c;return e;function*f(c,p){let m=t.get(c);if(m.length>1){let u;for(let v of m)if(v[0]!=="-"){if(u)return;u=v}if(u)for(let v of de(r,u))yield v;return}if(m.length===0&&p.modifier){let u={...p,modifier:null},v=n.get(r.printCandidate(u));if(typeof v=="string")for(let h of f(v,u))yield Object.assign({},h,{modifier:p.modifier})}if(m.length===1)for(let u of de(r,m[0]))yield u}}var Fl=new Map([["order-none","order-0"],["break-words","wrap-break-word"],["overflow-ellipsis","text-ellipsis"]]),Wl=new Map([[/^(-)?start-(.*?)$/,"$1inset-s-$2"],[/^(-)?end-(.*?)$/,"$1inset-e-$2"]]);function*Bl(e){let i=Fl.get(e);i&&(yield i);for(let[r,t]of Wl){let n=e.replace(r,t);n!==e&&(yield n)}}function Yl(e,i){let r=i.designSystem,t=r.storage[lt].get(i.signatureOptions),n=Oi(r,e);for(let s of Bl(n)){if(!t(e,s))continue;let[l]=de(r,s);return l}return e}function Gl(e,i){let r=i.designSystem,t=r.storage[Nt],n=r.storage[Ki],s=Tt(e);for(let[l]of s){if(l.kind==="compound")continue;let d=r.printVariant(l),f=t.get(d);if(typeof f!="string")continue;let c=n.get(f);if(c.length!==1)continue;let p=c[0],m=r.parseVariant(p);m!==null&&pe(l,m)}return e}function ql(e,i){let r=i.designSystem,t=r.storage[we].get(i.signatureOptions);if(e.kind==="functional"&&e.value?.kind==="arbitrary"&&e.value.dataType!==null){let n=r.printCandidate({...e,value:{...e.value,dataType:null}});t.get(r.printCandidate(e))===t.get(n)&&(e.value.dataType=null)}return e}function Hl(e,i){if(e.kind!=="functional"||e.value?.kind!=="arbitrary")return e;let r=i.designSystem,t=r.storage[we].get(i.signatureOptions),n=t.get(r.printCandidate(e));if(n===null)return e;for(let s of Ii(e))if(t.get(r.printCandidate({...e,value:s}))===n)return e.value=s,e;return e}function Zl(e){let i=Tt(e);for(let[r]of i)if(r.kind==="functional"&&r.root==="data"&&r.value?.kind==="arbitrary"&&!r.value.value.includes("="))r.value={kind:"named",value:r.value.value};else if(r.kind==="functional"&&r.root==="aria"&&r.value?.kind==="arbitrary"&&(r.value.value.endsWith("=true")||r.value.value.endsWith('="true"')||r.value.value.endsWith("='true'"))){let[t,n]=z(r.value.value,"=");if(t[t.length-1]==="~"||t[t.length-1]==="|"||t[t.length-1]==="^"||t[t.length-1]==="$"||t[t.length-1]==="*")continue;r.value={kind:"named",value:r.value.value.slice(0,r.value.value.indexOf("="))}}else r.kind==="functional"&&r.root==="supports"&&r.value?.kind==="arbitrary"&&/^[a-z-][a-z0-9-]*$/i.test(r.value.value)&&(r.value={kind:"named",value:r.value.value});return e}function*Ii(e,i=e.value?.value??"",r=new Set){if(r.has(i))return;if(r.add(i),yield{kind:"named",value:i,fraction:null},i.endsWith("%")&&Q(i.slice(0,-1))&&(yield{kind:"named",value:i.slice(0,-1),fraction:null}),i.includes("/")){let[s,l]=i.split("/");_(s)&&_(l)&&(yield{kind:"named",value:s,fraction:`${s}/${l}`})}let t=new Set;for(let s of i.matchAll(/(\d+\/\d+)|(\d+\.?\d+)/g))t.add(s[0].trim());let n=Array.from(t).sort((s,l)=>s.length-l.length);for(let s of n)yield*Ii(e,s,r)}function Si(e){return!(e.length===1&&e[0].kind==="list")}function St(e){return e.value[0]==="["&&e.value[e.value.length-1]==="]"}function Jl(e,i){let r=[e],t=i.designSystem,n=t.storage[Nt],s=Tt(e);for(let[l,d]of s)if(l.kind==="compound"&&(l.root==="has"||l.root==="not"||l.root==="in")&&l.modifier!==null&&"modifier"in l.variant&&(l.variant.modifier=l.modifier,l.modifier=null),l.kind==="arbitrary"){if(l.relative)continue;let f=fe(l.selector);if(!Si(f))continue;if(f.length===1&&f[0].kind==="complex"&&(f=f[0].nodes),d===null&&f.length===3&&f[0].kind==="selector"&&f[0].value==="&"&&f[1].kind==="combinator"&&f[1].value===">"&&f[2].kind===
|
||
|
|
|
||
|
|
${se([m])}
|
||
|
|
Relies on:
|
||
|
|
|
||
|
|
${se([v])}`)}c.add(m);for(let v of s.get(m))for(let h of l.get(v))u.push(m),p(h,u),u.pop();d.add(m),c.delete(m),f.push(m)}}for(let m of n)p(m);for(let m of f)"nodes"in m&&P(m.nodes,u=>{if(u.kind!=="at-rule"||u.name!=="@apply")return;let v=u.params.split(/(\s+)/g),h={},k=[],y=[],S=0;for(let[b,I]of v.entries())b%2===0&&(I[0]==="-"&&I[1]==="-"?y.push(I):k.push(I),h[I]=S),S+=I.length;if(y.length){if(k.length===0)return V.Skip;let b=y.join(" ");throw new Error(`You cannot use \`@apply\` with both mixins and utilities. Please move \`@apply ${b}\` into a separate rule.`)}if(u.nodes.length>0&&k.length){let b=k.join(" ");throw new Error(`The rule \`@apply ${b}\` must not have a body.`)}{let b=Object.keys(h),I=$e(b,i,{respectImportant:!1,onInvalidCandidate:E=>{if(i.theme.prefix&&!E.startsWith(i.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${E}\`. Did you mean \`${i.theme.prefix}:${E}\`?`);if(i.invalidCandidates.has(E))throw new Error(`Cannot apply utility class \`${E}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let j=z(E,":");if(j.length>1){let q=j.pop();if(i.candidatesToCss([q])[0]){let G=i.candidatesToCss(j.map(ie=>`${ie}:[--tw-variant-check:1]`)),ee=j.filter((ie,o)=>G[o]===null);if(ee.length>0){if(ee.length===1)throw new Error(`Cannot apply utility class \`${E}\` because the ${ee.map(ie=>`\`${ie}\``)} variant does not exist.`);{let ie=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${E}\` because the ${ie.format(ee.map(o=>`\`${o}\``))} variants do not exist.`)}}}}throw i.theme.size===0?new Error(`Cannot apply unknown utility class \`${E}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):new Error(`Cannot apply unknown utility class \`${E}\``)}}),D=u.src,O=I.astNodes.map(E=>{let j=I.nodeSorting.get(E)?.candidate,q=j?h[j]:void 0;if(E=re(E),!D||!j||q===void 0)return P([E],ee=>{ee.src=D}),E;let G=[D[0],D[1],D[2]];return G[1]+=7+q,G[2]=G[1]+j.length,P([E],ee=>{ee.src=G}),E}),L=[];for(let E of O)if(E.kind==="rule")for(let j of E.nodes)L.push(j);else L.push(E);return V.Replace(L)}});return r}function*Gi(e,i){for(let r of e.params.split(/\s+/g))for(let t of i.parseCandidate(r))switch(t.kind){case"arbitrary":break;case"static":case"functional":yield t.root;break;default:}}async function dr(e,i,r,t=0,n=!1){let s=0,l=[];return P(e,d=>{if(d.kind==="at-rule"&&(d.name==="@import"||d.name==="@reference")){let f=ma(M(d.params));if(f===null)return;d.name==="@reference"&&(f.media="reference"),s|=2;let{uri:c,layer:p,media:m,supports:u}=f;if(c.startsWith("data:")||c.startsWith("http://")||c.startsWith("https://"))return;let v=ve({},[]);return l.push((async()=>{if(t>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${c}\` in \`${i}\`)`);let h=await r(c,i),k=Te(h.content,{from:n?h.path:void 0});await dr(k,h.base,r,t+1,n),v.nodes=ga(d,[ve({base:h.base},k)],p,m,u)})()),V.ReplaceSkip(v)}}),l.length>0&&await Promise.all(l),s}function ma(e){let i,r=null,t=null,n=null;for(let s=0;s<e.length;s++){let l=e[s];if(l.kind!=="separator"){if(l.kind==="word"&&!i){if(!l.value||l.value[0]!=='"'&&l.value[0]!=="'")return null;i=l.value.slice(1,-1);continue}if(l.kind==="function"&&l.value.toLowerCase()==="url"||!i)return null;if((l.kind==="word"||l.kind==="function")&&l.value.toLowerCase()==="layer"){if(r)return null;if(n)throw new Error("`layer(\u2026)` in an `@import` should come before any other functions or conditions");"nodes"in l?r=F(l.nodes):r="";continue}if(l.kind==="function"&&l.value.toLowerCase()==="supports"){if(n)return null;n=F(l.nodes);continue}t=F(e.slice(s));break}}return i?{uri:i,layer:r,media:t,supports:n}:null}function ga(e,i,r,t,n){let s=i;if(r!==null){let l=B("@layer",r,s);l.src=e.src,s=[l]}if(t!==null){let l=B("@media",t,s);l.src=e.src,s=[l]}if(n!==null){let l=B("@supports",n[0]==="("?n:`(${n})`,s);l.src=e.src,s=[l]}return s}function Ye(e){if(Object.prototyp
|
||
|
|
|
||
|
|
${se([y])}
|
||
|
|
|
||
|
|
\`@plugin\` options must be a flat list of declarations.`);if(y.value===void 0)continue;let S=y.value,x=z(S,",").map(b=>{if(b=b.trim(),b==="null")return null;if(b==="true")return!0;if(b==="false")return!1;if(Number.isNaN(Number(b))){if(b[0]==='"'&&b[b.length-1]==='"'||b[0]==="'"&&b[b.length-1]==="'")return b.slice(1,-1);if(b[0]==="{"&&b[b.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${se([y]).trim()}\` is not supported.
|
||
|
|
|
||
|
|
Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(b);return b});k[y.property]=x.length===1?x[0]:x}return l.push([{id:h,base:v.context.base,reference:!!v.context.reference,src:m.src},Object.keys(k).length>0?k:null]),s|=4,V.Replace([])}if(m.name==="@config"){if(m.nodes.length>0)throw new Error("`@config` cannot have a body.");if(v.parent!==null)throw new Error("`@config` cannot be nested.");return d.push({id:m.params.slice(1,-1),base:v.context.base,reference:!!v.context.reference,src:m.src}),s|=4,V.Replace([])}}),nn(e);let f=e.resolveThemeValue;if(e.resolveThemeValue=function(u,v){return u.startsWith("--")?f(u,v):(s|=on({designSystem:e,base:i,ast:r,sources:n,configs:[],pluginDetails:[]}),e.resolveThemeValue(u,v))},!l.length&&!d.length)return 0;let[c,p]=await Promise.all([Promise.all(d.map(async({id:m,base:u,reference:v,src:h})=>{let k=await t(m,u,"config");return{path:m,base:k.base,config:k.module,reference:v,src:h}})),Promise.all(l.map(async([{id:m,base:u,reference:v,src:h},k])=>{let y=await t(m,u,"plugin");return{path:m,base:y.base,plugin:y.module,options:k,reference:v,src:h}}))]);return s|=on({designSystem:e,base:i,ast:r,sources:n,configs:c,pluginDetails:p}),s}function on({designSystem:e,base:i,ast:r,sources:t,configs:n,pluginDetails:s}){let l=0,f=[...s.map(k=>{if(!k.options)return{config:{plugins:[k.plugin]},base:k.base,reference:k.reference,src:k.src};if("__isOptionsFunction"in k.plugin)return{config:{plugins:[k.plugin(k.options)]},base:k.base,reference:k.reference,src:k.src};throw new Error(`The plugin "${k.path}" does not accept options`)}),...n],{resolvedConfig:c}=hr(e,[{config:en(e.theme),base:i,reference:!0,src:void 0},...f,{config:{plugins:[rn]},base:i,reference:!0,src:void 0}]),{resolvedConfig:p,replacedThemeKeys:m}=hr(e,f),u={designSystem:e,ast:r,resolvedConfig:c,featuresRef:{set current(k){l|=k}}},v=mr({...u,referenceMode:!1,src:void 0}),h=e.resolveThemeValue;e.resolveThemeValue=function(y,S){if(y[0]==="-"&&y[1]==="-")return h(y,S);let x=v.theme(y,void 0);if(Array.isArray(x)&&x.length===2)return x[0];if(Array.isArray(x))return x.join(", ");if(typeof x=="object"&&x!==null&&"DEFAULT"in x)return x.DEFAULT;if(typeof x=="string")return x};for(let{handler:k,reference:y,src:S}of c.plugins){let x=mr({...u,referenceMode:y??!1,src:S});k(x)}if(gi(e,p,m),Xi(e,p),an(p,e),ln(p,e),tn(p,e),!e.theme.prefix&&c.prefix){if(c.prefix.endsWith("-")&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!Aa.test(c.prefix))throw new Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);e.theme.prefix=c.prefix}if(!e.important&&c.important===!0&&(e.important=!0),typeof c.important=="string"){let k=c.important;P(r,(y,S)=>{if(y.kind!=="at-rule"||y.name!=="@tailwind"||y.params!=="utilities")return;let x=et(S);return x.parent?.kind==="rule"&&x.parent.selector===k?V.Stop:V.ReplaceStop(H(k,[y]))})}for(let k of c.blocklist)e.invalidCandidates.add(k);for(let k of c.content.files){if("raw"in k)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:
|
||
|
|
|
||
|
|
${JSON.stringify(k,null,2)}
|
||
|
|
|
||
|
|
This feature is not currently supported.`);let y=!1;k.pattern[0]=="!"&&(y=!0,k.pattern=k.pattern.slice(1)),t.push({...k,negated:y})}return l}function un({ast:e}){let i=new U(n=>ft(n.code)),r=new U(n=>({url:n.file,content:n.code,ignore:!1})),t={file:null,sources:[],mappings:[]};P(e,n=>{if(!n.src||!n.dst)return;let s=r.get(n.src[0]);if(!s.content)return;let l=i.get(n.src[0]),d=i.get(n.dst[0]),f=s.content.slice(n.src[1],n.src[2]),c=0;for(let u of f.split(`
|
||
|
|
`)){if(u.trim()!==""){let v=l.find(n.src[1]+c),h=d.find(n.dst[1]);t.mappings.push({name:null,originalPosition:{source:s,...v},generatedPosition:h})}c+=u.length,c+=1}let p=l.find(n.src[2]),m=d.find(n.dst[2]);t.mappings.push({name:null,originalPosition:{source:s,...p},generatedPosition:m})});for(let n of i.keys())t.sources.push(r.get(n));return t.mappings.sort((n,s)=>n.generatedPosition.line-s.generatedPosition.line||n.generatedPosition.column-s.generatedPosition.column||(n.originalPosition?.line??0)-(s.originalPosition?.line??0)||(n.originalPosition?.column??0)-(s.originalPosition?.column??0)),t}var fn=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function Pt(e){let i=e.indexOf("{");if(i===-1)return[e];let r=[],t=e.slice(0,i),n=e.slice(i),s=0,l=n.lastIndexOf("}");for(let m=0;m<n.length;m++){let u=n[m];if(u==="{")s++;else if(u==="}"&&(s--,s===0)){l=m;break}}if(l===-1)throw new Error(`The pattern \`${e}\` is not balanced.`);let d=n.slice(1,l),f=n.slice(l+1),c;Ca(d)?c=Sa(d):c=z(d,","),c=c.flatMap(m=>Pt(m));let p=Pt(f);for(let m of p)for(let u of c)r.push(t+u+m);return r}function Ca(e){return fn.test(e)}function Sa(e){let i=e.match(fn);if(!i)return[e];let[,r,t,n]=i,s=n?parseInt(n,10):void 0,l=[];if(/^-?\d+$/.test(r)&&/^-?\d+$/.test(t)){let d=parseInt(r,10),f=parseInt(t,10);if(s===void 0&&(s=d<=f?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let c=d<f;c&&s<0&&(s=-s),!c&&s>0&&(s=-s);for(let p=d;c?p<=f:p>=f;p+=s)l.push(p.toString())}return l}function cn(e,i){let r=new Set,t=new Set,n=[];function s(l,d=[]){if(e.has(l)&&!r.has(l)){t.has(l)&&i.onCircularDependency?.(d,l),t.add(l);for(let f of e.get(l)??[])d.push(l),s(f,d),d.pop();r.add(l),t.delete(l),n.push(l)}}for(let l of e.keys())s(l);return n}var Va=/^[a-z]+$/,Ht=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(Ht||{});function $a(){throw new Error("No `loadModule` function provided to `compile`")}function Ta(){throw new Error("No `loadStylesheet` function provided to `compile`")}function Na(e){let i=0,r=null;for(let t of z(e," "))t==="reference"?i|=2:t==="inline"?i|=1:t==="default"?i|=4:t==="static"?i|=8:t.startsWith("prefix(")&&t.endsWith(")")&&(r=t.slice(7,-1));return[i,r]}var ze=(f=>(f[f.None=0]="None",f[f.AtApply=1]="AtApply",f[f.AtImport=2]="AtImport",f[f.JsPluginCompat=4]="JsPluginCompat",f[f.ThemeFunction=8]="ThemeFunction",f[f.Utilities=16]="Utilities",f[f.Variants=32]="Variants",f[f.AtTheme=64]="AtTheme",f))(ze||{});async function pn(e,{base:i="",from:r,loadModule:t=$a,loadStylesheet:n=Ta}={}){let s=0;e=[ve({base:i},e)],s|=await dr(e,i,n,0,r!==void 0);let l=null,d=new vr,f=new Map,c=new Map,p=[],m=null,u=null,v=[],h=[],k=[],y=[],S=null;P(e,(b,I)=>{if(b.kind!=="at-rule")return;let D=et(I);if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(u!==null)return V.Replace([]);if(D.context.reference)return V.Replace([]);let O=z(b.params," ");for(let L of O)if(L.startsWith("source(")){let E=L.slice(7,-1);if(E==="none"){S=E;continue}if(E[0]==='"'&&E[E.length-1]!=='"'||E[0]==="'"&&E[E.length-1]!=="'"||E[0]!=="'"&&E[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");S={base:D.context.sourceBase??D.context.base,pattern:E.slice(1,-1)}}u=b,s|=16}if(b.name==="@utility"){if(D.parent!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let O=ui(b);if(O===null){if(!b.params.endsWith("-*")){if(b.params.endsWith("*"))throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);if(b.params.includes("*"))throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`)}throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`)}p.push(O)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.")
|
||
|
|
`).map((q,G,ee)=>`${G===0||G>=ee.length-2?" ":">"} ${q}`).join(`
|
||
|
|
`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`.
|
||
|
|
|
||
|
|
${j}`)}),m?V.ReplaceSkip([]):(m=H(":root, :host",[]),m.src=b.src,V.ReplaceSkip(m))}});let x=Fi(d,u?.src);if(l&&(x.important=l),y.length>0)for(let b of y)x.invalidCandidates.add(b);s|=await sn({designSystem:x,base:i,ast:e,loadModule:t,sources:h});for(let b of f.keys())x.variants.static(b,()=>{});for(let b of cn(c,{onCircularDependency(I,D){let O=se(I.map((L,E)=>B("@custom-variant",L,[B("@variant",I[E+1]??D,[])]))).replaceAll(";"," { \u2026 }").replace(`@custom-variant ${D} {`,`@custom-variant ${D} { /* \u2190 */`);throw new Error(`Circular dependency detected in custom variants:
|
||
|
|
|
||
|
|
${O}`)}}))f.get(b)?.(x);for(let b of p)b(x);if(m){let b=[];for(let[D,O]of x.theme.entries()){if(O.options&2)continue;let L=a(_e(D),O.value);L.src=O.src,b.push(L)}let I=x.theme.getKeyframes();for(let D of I)e.push(ve({theme:!0},[Y([D])]));m.nodes=[ve({theme:!0},b)]}if(s|=at(e,x),s|=Le(e,x),s|=Ve(e,x),u){let b=u;b.kind="context",b.context={}}return P(e,b=>{if(b.kind==="at-rule")return b.name==="@utility"?V.Replace([]):V.Skip}),{designSystem:x,ast:e,sources:h,root:S,utilitiesNode:u,features:s,inlineCandidates:k}}async function Ea(e,i={}){let{designSystem:r,ast:t,sources:n,root:s,utilitiesNode:l,features:d,inlineCandidates:f}=await pn(e,i);t.unshift(gt(`! tailwindcss v${yr} | MIT License | https://tailwindcss.com `));function c(h){r.invalidCandidates.add(h)}let p=new Set,m=null,u=0,v=!1;for(let h of f)r.invalidCandidates.has(h)||(p.add(h),v=!0);return{sources:n,root:s,features:d,build(h){if(d===0)return e;if(!l)return m??=Ne(t,r,i.polyfills),m;let k=v,y=!1;v=!1;let S=p.size;for(let b of h)if(!r.invalidCandidates.has(b))if(b[0]==="-"&&b[1]==="-"){let I=r.theme.markUsedVariable(b);k||=I,y||=I}else p.add(b),k||=p.size!==S;if(!k)return m??=Ne(t,r,i.polyfills),m;let x=$e(p,r,{onInvalidCandidate:c}).astNodes;return i.from&&P(x,b=>{b.src??=l.src}),!y&&u===x.length?(m??=Ne(t,r,i.polyfills),m):(u=x.length,l.nodes=x,m=Ne(t,r,i.polyfills),m)}}}async function zf(e,i={}){let r=Te(e,{from:i.from}),t=await Ea(r,i),n=r,s=e;return{...t,build(l){let d=t.build(l);return d===n||(s=se(d,!!i.from),n=d),s},buildSourceMap(){return un({ast:n})}}}async function jf(e,i={}){return(await pn(Te(e,{from:i.from}),i)).designSystem}function Ra(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}export{ze as Features,Ht as Polyfills,jf as __unstable__loadDesignSystem,zf as compile,Ea as compileAst,Ra as default};
|