39 lines
234 KiB
JavaScript
39 lines
234 KiB
JavaScript
|
|
import{a as rr,b as z,c as H,d as ir,e as I,f as St,g as ee,h as et,i as lr}from"./chunk-TDNFF6A4.mjs";import{a as nr}from"./chunk-X4GG3EDV.mjs";var ar="4.2.2";function tt(t){let r=[0];for(let n=0;n<t.length;n++)t.charCodeAt(n)===10&&r.push(n+1);function i(n){let s=0,l=r.length;for(;l>0;){let u=(l|0)>>1,f=s+u;r[f]<=n?(s=f+1,l=l-u-1):l=u}s-=1;let c=n-r[s];return{line:s+1,column:c}}function e({line:n,column:s}){n-=1,n=Math.min(Math.max(n,0),r.length-1);let l=r[n],c=r[n+1]??l;return Math.min(Math.max(l+s,0),c)}return{find:i,findOffset:e}}var Fe=92,rt=47,it=42,or=34,sr=39,Ji=58,nt=59,oe=10,lt=13,We=32,Be=9,ur=123,Tt=125,Et=40,fr=41,Qi=91,Xi=93,cr=45,Vt=64,en=33,se=class t extends Error{loc;constructor(r,i){if(i){let e=i[0],n=tt(e.code).find(i[1]);r=`${e.file}:${n.line}:${n.column+1}: ${r}`}super(r),this.name="CssSyntaxError",this.loc=i,Error.captureStackTrace&&Error.captureStackTrace(this,t)}};function Se(t,r){let i=r?.from?{file:r.from,code:t}:null;t[0]==="\uFEFF"&&(t=" "+t.slice(1));let e=[],n=[],s=[],l=null,c=null,u="",f="",g=0,d;for(let p=0;p<t.length;p++){let w=t.charCodeAt(p);if(!(w===lt&&(d=t.charCodeAt(p+1),d===oe)))if(w===Fe)u===""&&(g=p),u+=t.slice(p,p+2),p+=1;else if(w===rt&&t.charCodeAt(p+1)===it){let h=p;for(let A=p+2;A<t.length;A++)if(d=t.charCodeAt(A),d===Fe)A+=1;else if(d===it&&t.charCodeAt(A+1)===rt){p=A+1;break}let y=t.slice(h,p+1);if(y.charCodeAt(2)===en){let A=at(y.slice(2,-2));n.push(A),i&&(A.src=[i,h,p+1],A.dst=[i,h,p+1])}}else if(w===sr||w===or){let h=pr(t,p,w,i);u+=t.slice(p,h+1),p=h}else{if((w===We||w===oe||w===Be)&&(d=t.charCodeAt(p+1))&&(d===We||d===oe||d===Be||d===lt&&(d=t.charCodeAt(p+2))&&d==oe))continue;if(w===oe){if(u.length===0)continue;d=u.charCodeAt(u.length-1),d!==We&&d!==oe&&d!==Be&&(u+=" ")}else if(w===cr&&t.charCodeAt(p+1)===cr&&u.length===0){let h="",y=p,A=-1;for(let x=p+2;x<t.length;x++)if(d=t.charCodeAt(x),d===Fe)x+=1;else if(d===sr||d===or)x=pr(t,x,d,i);else if(d===rt&&t.charCodeAt(x+1)===it){for(let k=x+2;k<t.length;k++)if(d=t.charCodeAt(k),d===Fe)k+=1;else if(d===it&&t.charCodeAt(k+1)===rt){x=k+1;break}}else if(A===-1&&d===Ji)A=u.length+x-y;else if(d===nt&&h.length===0){u+=t.slice(y,x),p=x;break}else if(d===Et)h+=")";else if(d===Qi)h+="]";else if(d===ur)h+="}";else if((d===Tt||t.length-1===x)&&h.length===0){p=x-1,u+=t.slice(y,x);break}else(d===fr||d===Xi||d===Tt)&&h.length>0&&t[x]===h[h.length-1]&&(h=h.slice(0,-1));let E=Nt(u,A);if(!E)throw new se("Invalid custom property, expected a value",i?[i,y,p]:null);i&&(E.src=[i,y,p],E.dst=[i,y,p]),l?l.nodes.push(E):e.push(E),u=""}else if(w===nt&&u.charCodeAt(0)===Vt)c=Ye(u),i&&(c.src=[i,g,p],c.dst=[i,g,p]),l?l.nodes.push(c):e.push(c),u="",c=null;else if(w===nt&&f[f.length-1]!==")"){let h=Nt(u);if(!h){if(u.length===0)continue;throw new se(`Invalid declaration: \`${u.trim()}\``,i?[i,g,p]:null)}i&&(h.src=[i,g,p],h.dst=[i,g,p]),l?l.nodes.push(h):e.push(h),u=""}else if(w===ur&&f[f.length-1]!==")")f+="}",c=J(u.trim()),i&&(c.src=[i,g,p],c.dst=[i,g,p]),l&&l.nodes.push(c),s.push(l),l=c,u="",c=null;else if(w===Tt&&f[f.length-1]!==")"){if(f==="")throw new se("Missing opening {",i?[i,p,p]:null);if(f=f.slice(0,-1),u.length>0)if(u.charCodeAt(0)===Vt)c=Ye(u),i&&(c.src=[i,g,p],c.dst=[i,g,p]),l?l.nodes.push(c):e.push(c),u="",c=null;else{let y=u.indexOf(":");if(l){let A=Nt(u,y);if(!A)throw new se(`Invalid declaration: \`${u.trim()}\``,i?[i,g,p]:null);i&&(A.src=[i,g,p],A.dst=[i,g,p]),l.nodes.push(A)}}let h=s.pop()??null;h===null&&l&&e.push(l),l=h,u="",c=null}else if(w===Et)f+=")",u+="(";else if(w===fr){if(f[f.length-1]!==")")throw new se("Missing opening (",i?[i,p,p]:null);f=f.slice(0,-1),u+=")"}else{if(u.length===0&&(w===We||w===oe||w===Be))continue;u===""&&(g=p),u+=String.fromCharCode(w)}}}if(u.charCodeAt(0)===Vt){let p=Ye(u);i&&(p.src=[i,g,t.length],p.dst=[i,g,t.length]),e.push(p)}if(f.length>0&&l){if(l.kind==="rule")throw new se(`Missing closing } at ${l.selector}`,l.src?[l.src[0],l.src[1],l.src[1]]:null);if(l.kind==="at-rule")throw new se(`Missing closing } at ${l.name} ${l.params}`,l.src?[l.src[0],l.src[1],l.src[1]]:null)}return n.length>0?n.concat(e)
|
||
|
|
`,`
|
||
|
|
`);let r=[],i=[],e=null,n="",s;for(let l=0;l<t.length;l++){let c=t.charCodeAt(l);switch(c){case gr:{n+=t[l]+t[l+1],l++;break}case sn:{if(n.length>0){let f=ne(n);e?e.nodes.push(f):r.push(f),n=""}let u=ne(t[l]);e?e.nodes.push(u):r.push(u);break}case hr:case vr:case wr:case yr:case kr:case br:case xr:case Ar:{if(n.length>0){let d=ne(n);e?e.nodes.push(d):r.push(d),n=""}let u=l,f=l+1;for(;f<t.length&&(s=t.charCodeAt(f),!(s!==hr&&s!==vr&&s!==wr&&s!==yr&&s!==kr&&s!==br&&s!==xr&&s!==Ar));f++);l=f-1;let g=rn(t.slice(u,f));e?e.nodes.push(g):r.push(g);break}case on:case ln:{let u=l;for(let f=l+1;f<t.length;f++)if(s=t.charCodeAt(f),s===gr)f+=1;else if(s===c){l=f;break}n+=t.slice(u,l+1);break}case an:{let u=tn(n,[]);n="",e?e.nodes.push(u):r.push(u),i.push(u),e=u;break}case nn:{let u=i.pop();if(n.length>0){let f=ne(n);u?.nodes.push(f),n=""}i.length>0?e=i[i.length-1]:e=null;break}default:n+=String.fromCharCode(c)}}return n.length>0&&r.push(ne(n)),r}var Ot=(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))(Ot||{}),R={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:t=>({kind:3,nodes:Array.isArray(t)?t:[t]}),ReplaceSkip:t=>({kind:4,nodes:Array.isArray(t)?t:[t]}),ReplaceStop:t=>({kind:5,nodes:Array.isArray(t)?t:[t]})};function _(t,r){typeof r=="function"?Cr(t,r):Cr(t,r.enter,r.exit)}function Cr(t,r=()=>R.Continue,i=()=>R.Continue){let e={value:[t,0,null],prev:null},n={parent:null,depth:0,path(){let s=[],l=e;for(;l;){let c=l.value[2];c&&s.push(c),l=l.prev}return s.reverse(),s}};for(;e!==null;){let s=e.value,l=s[0],c=s[1],u=s[2];if(c>=l.length){e=e.prev,n.depth-=1;continue}if(n.parent=u,c>=0){let p=l[c],w=r(p,n)??R.Continue;switch(w.kind){case 0:{p.nodes&&p.nodes.length>0&&(n.depth+=1,e={value:[p.nodes,0,p],prev:e}),s[1]=~c;continue}case 2:return;case 1:{s[1]=~c;continue}case 3:{l.splice(c,1,...w.nodes);continue}case 5:{l.splice(c,1,...w.nodes);return}case 4:{l.splice(c,1,...w.nodes),s[1]+=w.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${Ot[w.kind]??`Unknown(${w.kind})`}\` in enter.`)}}let f=~c,g=l[f],d=i(g,n)??R.Continue;switch(d.kind){case 0:s[1]=f+1;continue;case 2:return;case 3:{l.splice(f,1,...d.nodes),s[1]=f+d.nodes.length;continue}case 5:{l.splice(f,1,...d.nodes);return}case 4:{l.splice(f,1,...d.nodes),s[1]=f+d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${Ot[d.kind]??`Unknown(${d.kind})`}\` in exit.`)}}}function st(t){let r=[];return _(B(t),i=>{if(!(i.kind!=="function"||i.value!=="var"))return _(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||r.push(e.value)}),R.Skip}),r}var un=64;function G(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function F(t,r="",i=[]){return{kind:"at-rule",name:t,params:r,nodes:i}}function J(t,r=[]){return t.charCodeAt(0)===un?Ye(t,r):G(t,r)}function a(t,r,i=!1){return{kind:"declaration",property:t,value:r,important:i}}function at(t){return{kind:"comment",value:t}}function ce(t,r){return{kind:"context",context:t,nodes:r}}function W(t){return{kind:"at-root",nodes:t}}function te(t){switch(t.kind){case"rule":return{kind:t.kind,selector:t.selector,nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"at-rule":return{kind:t.kind,name:t.name,params:t.params,nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"at-root":return{kind:t.kind,nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"context":return{kind:t.kind,context:{...t.context},nodes:t.nodes.map(te),src:t.src,dst:t.dst};case"declaration":return{kind:t.kind,property:t.property,value:t.value,important:t.important,src:t.src,dst:t.dst};case"comment":return{kind:t.kind,value:t.value,src:t.src,dst:t.dst};default:throw new Error(`Unknown node kind: ${t.kind}`)}}function qe(t){return{depth:t.depth,get context(){let r={};for(let i of t.path())i.kind==="context"&&Object.assign(r,i.context);return Object.defineProperty(this,"context",{value:r}),r},get parent(){let r=this.path().pop()??null;return Object.defineProperty(this,"parent",{value:r}),r},path(){return t.path().filter(r=>r.kind!=="context")
|
||
|
|
`,r){i+=f.length;let g=i;i+=l.property.length,i+=2,i+=l.value?.length??0,l.important&&(i+=11);let d=i;i+=2,l.dst=[e,g,d]}}else if(l.kind==="rule"){if(u+=`${f}${l.selector} {
|
||
|
|
`,r){i+=f.length;let g=i;i+=l.selector.length,i+=1;let d=i;l.dst=[e,g,d],i+=2}for(let g of l.nodes)u+=n(g,c+1);u+=`${f}}
|
||
|
|
`,r&&(i+=f.length,i+=2)}else if(l.kind==="at-rule"){if(l.nodes.length===0){let g=`${f}${l.name} ${l.params};
|
||
|
|
`;if(r){i+=f.length;let d=i;i+=l.name.length,i+=1,i+=l.params.length;let p=i;i+=2,l.dst=[e,d,p]}return g}if(u+=`${f}${l.name}${l.params?` ${l.params} `:" "}{
|
||
|
|
`,r){i+=f.length;let g=i;i+=l.name.length,l.params&&(i+=1,i+=l.params.length),i+=1;let d=i;l.dst=[e,g,d],i+=2}for(let g of l.nodes)u+=n(g,c+1);u+=`${f}}
|
||
|
|
`,r&&(i+=f.length,i+=2)}else if(l.kind==="comment"){if(u+=`${f}/*${l.value}*/
|
||
|
|
`,r){i+=f.length;let g=i;i+=2+l.value.length+2;let d=i;l.dst=[e,g,d],i+=1}}else if(l.kind==="context"||l.kind==="at-root")return"";return u}let s="";for(let l of t)s+=n(l,0);return e.code=s,s}function fn(t,r){let i=[];return _(t,(e,n)=>{if(r(e))return i=n.path(),i.push(e),R.Stop}),i}function Sr(t,r,i,e=new Set){if(e.has(t)||(e.add(t),r.getOptions(t)&24))return!0;{let s=i.get(t)??[];for(let l of s)if(Sr(l,r,i,e))return!0}return!1}function $r(t){return t.split(/[\s,]+/)}function be(t){if(t.indexOf("(")===-1)return Ie(t);let r=B(t);return It(r),t=Z(r),t=rr(t),t}function Ie(t,r=!1){let i="";for(let e=0;e<t.length;e++){let n=t[e];n==="\\"&&t[e+1]==="_"?(i+="_",e+=1):n==="_"&&!r?i+=" ":i+=n}return i}function It(t){for(let r of t)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=Ie(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=Ie(r.value);for(let i=0;i<r.nodes.length;i++){if(i==0&&r.nodes[i].kind==="word"){r.nodes[i].value=Ie(r.nodes[i].value,!0);continue}It([r.nodes[i]])}break}r.value=Ie(r.value),It(r.nodes);break}case"separator":case"word":{r.value=Ie(r.value);break}default:cn(r)}}function cn(t){throw new Error(`Unexpected value: ${t}`)}var _t=new Uint8Array(256);function we(t){let r=0,i=t.length;for(let e=0;e<i;e++){let n=t.charCodeAt(e);switch(n){case 92:e+=1;break;case 39:case 34:for(;++e<i;){let s=t.charCodeAt(e);if(s===92){e+=1;continue}if(s===n)break}break;case 40:_t[r]=41,r++;break;case 91:_t[r]=93,r++;break;case 123:break;case 93:case 125:case 41:if(r===0)return!1;r>0&&n===_t[r-1]&&r--;break;case 59:if(r===0)return!1;break}}return!0}var pn=58,Tr=45,Vr=97,Nr=122,Ut=/^[a-zA-Z0-9_.%-]+$/;function Lt(t){switch(t.kind){case"arbitrary":return{kind:t.kind,property:t.property,value:t.value,modifier:t.modifier?{kind:t.modifier.kind,value:t.modifier.value}:null,variants:t.variants.map(_e),important:t.important,raw:t.raw};case"static":return{kind:t.kind,root:t.root,variants:t.variants.map(_e),important:t.important,raw:t.raw};case"functional":return{kind:t.kind,root:t.root,value:t.value?t.value.kind==="arbitrary"?{kind:t.value.kind,dataType:t.value.dataType,value:t.value.value}:{kind:t.value.kind,value:t.value.value,fraction:t.value.fraction}:null,modifier:t.modifier?{kind:t.modifier.kind,value:t.modifier.value}:null,variants:t.variants.map(_e),important:t.important,raw:t.raw};default:throw new Error("Unknown candidate kind")}}function _e(t){switch(t.kind){case"arbitrary":return{kind:t.kind,selector:t.selector,relative:t.relative};case"static":return{kind:t.kind,root:t.root};case"functional":return{kind:t.kind,root:t.root,value:t.value?{kind:t.value.kind,value:t.value.value}:null,modifier:t.modifier?{kind:t.modifier.kind,value:t.modifier.value}:null};case"compound":return{kind:t.kind,root:t.root,variant:_e(t.variant),modifier:t.modifier?{kind:t.modifier.kind,value:t.modifier.value}:null};default:throw new Error("Unknown variant kind")}}function*Er(t,r){let i=z(t,":");if(r.theme.prefix){if(i.length===1||i[0]!==r.theme.prefix)return null;i.shift()}let e=i.pop(),n=[];for(let d=i.length-1;d>=0;--d){let p=r.parseVariant(i[d]);if(p===null)return;n.push(p)}let s=!1;e[e.length-1]==="!"?(s=!0,e=e.slice(0,-1)):e[0]==="!"&&(s=!0,e=e.slice(1)),r.utilities.has(e,"static")&&!e.includes("[")&&(yield{kind:"static",root:e,variants:n,important:s,raw:t});let[l,c=null,u]=z(e,"/");if(u)return;let f=c===null?null:Dt(c);if(c!==null&&f===null)return;if(l[0]==="["){if(l[l.length-1]!=="]")return;let d=l.charCodeAt(1);if(d!==Tr&&!(d>=Vr&&d<=Nr))return;l=l.slice(1,-1);let p=l.indexOf(":");if(p===-1||p===0||p===l.length-1)return;let w=l.slice(0,p),h=be(l.slice(p+1));if(!we(h))return;yield{kind:"arbitrary",property:w,value:h,modifier:f,variants:n,important:s,raw:t};return}let g;if(l[l.length-1]==="]"){let d=l.indexOf("-[");if(d===-1)return;let p=l.slice(0,d);if(!r.utilities.has(p,"functional"))return;let w=l.slice(d+1);g=[[p,w]]}else if(l[l.length-1]===")"){let d=l.indexOf("-(");if(d===-1)return;let p=l.slice(0,d);if(!r.utilities.has(p,"functional"))retur
|
||
|
|
Only valid data types are: ${Mt.map(y=>`"${y}"`).join(", ")}.
|
||
|
|
`);let f=u.value,g=structuredClone(l),d="\xB6";_(g.nodes,y=>{if(y.kind==="word"&&y.value===f)return R.ReplaceSkip({kind:"word",value:d})});let p="^".repeat(Z([u]).length),w=Z([g]).indexOf(d),h=["```css",Z([l])," ".repeat(w)+p,"```"].join(`
|
||
|
|
`);console.warn(h)}}),n.value=Z(s)}),i.utilities.functional(r.slice(0,-2),n=>{let s=te(t),l=n.value,c=n.modifier;if(l===null)return;let u=!1,f=!1,g=!1,d=!1,p=new Map,w=!1;if(_([s],(h,y)=>{let A=y.parent;if(A?.kind!=="rule"&&A?.kind!=="at-rule"||h.kind!=="declaration"||!h.value)return;let E=!1,x=B(h.value);if(_(x,k=>{if(k.kind==="function"){if(k.value==="--value"){u=!0;let D=_r(l,k,i);return D?(f=!0,D.ratio?w=!0:p.set(h,A),R.ReplaceSkip(D.nodes)):(u||=!1,E=!0,R.Stop)}else if(k.value==="--modifier"){if(c===null)return E=!0,R.Stop;g=!0;let D=_r(c,k,i);return D?(d=!0,R.ReplaceSkip(D.nodes)):(g||=!1,E=!0,R.Stop)}}}),E)return R.ReplaceSkip([]);h.value=Z(x)}),u&&!f||g&&!d||w&&d||c&&!w&&!d)return null;if(w)for(let[h,y]of p){let A=y.nodes.indexOf(h);A!==-1&&y.nodes.splice(A,1)}return s.nodes}),i.utilities.suggest(r.slice(0,-2),()=>{let n=[],s=[];for(let[l,{literals:c,usedSpacingNumber:u,usedSpacingInteger:f,themeKeys:g}]of[[n,e["--value"]],[s,e["--modifier"]]]){for(let d of c)l.push(d);if(u)l.push(...dt);else if(f)for(let d of dt)I(d)&&l.push(d);for(let d of i.theme.keysInNamespaces(g))l.push(d.replace(Kr,(p,w,h)=>`${w}.${h}`))}return[{values:n,modifiers:s}]})}:Nn(r)?i=>{i.utilities.static(r,()=>t.nodes.map(te))}:null}function _r(t,r,i){for(let e of r.nodes){if(t.kind==="named"&&e.kind==="word"&&(e.value[0]==="'"||e.value[0]==='"')&&e.value[e.value.length-1]===e.value[0]&&e.value.slice(1,-1)===t.value)return{nodes:B(t.value)};if(t.kind==="named"&&e.kind==="word"&&e.value[0]==="-"&&e.value[1]==="-"){let n=e.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=i.theme.resolve(t.value,[n]);if(s)return{nodes:B(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let l=[s.shift()],c=i.theme.resolveWith(t.value,l,s);if(c){let[,u={}]=c;{let f=u[s.pop()];if(f)return{nodes:B(f)}}}}}else if(t.kind==="named"&&e.kind==="word"){if(!Mt.includes(e.value))continue;let n=e.value==="ratio"&&"fraction"in t?t.fraction:t.value;if(!n)continue;let s=H(n,[e.value]);if(s===null)continue;if(s==="ratio"){let[l,c]=z(n,"/").map(Number);if(!I(l)||!I(c))continue}else{if(s==="number"&&!ee(n))continue;if(s==="percentage"&&!I(n.slice(0,-1)))continue}if(s==="ratio"){let[l,c]=z(n,"/");return{nodes:B(`${l.trim()} / ${c.trim()}`),ratio:!0}}return{nodes:B(n),ratio:!1}}else if(t.kind==="arbitrary"&&e.kind==="word"&&e.value[0]==="["&&e.value[e.value.length-1]==="]"){let n=e.value.slice(1,-1);if(n==="*")return{nodes:B(t.value)};if("dataType"in t&&t.dataType&&t.dataType!==n)continue;if("dataType"in t&&t.dataType)return{nodes:B(t.value)};if(H(t.value,[n])!==null)return{nodes:B(t.value)}}}}function ye(t,r,i,e,n=""){let s=!1,l=Je(r,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Dr(u,i))));function c(u){return n?z(u,",").map(f=>n.trim()+" "+f.trim()).join(", "):u}return s?[a(t,c(Je(r,e))),J("@supports (color: lab(from red l a b))",[a(t,c(l))])]:[a(t,c(l))]}function ft(t,r,i,e,n=""){let s=!1,l=z(r,",").map(c=>Je(c,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Dr(u,i))))).map(c=>`drop-shadow(${c})`).join(" ");return s?[a(t,n+z(r,",").map(c=>`drop-shadow(${Je(c,e)})`).join(" ")),J("@supports (color: lab(from red l a b))",[a(t,n+l)])]:[a(t,n+l)]}var zr=/^-?[a-z][a-zA-Z0-9_-]*/,kn=37,bn=47,xn=46,An=97,Cn=122,$n=65,Sn=90,ct=48,pt=57,Tn=95,Vn=45;function Nn(t){let r=zr.exec(t);if(r===null)return!1;let i=r[0],e=t.slice(i.length);if(e.length===0&&i.endsWith("-"))return!1;if(e.length===0)return!0;let n=!1;for(let s=0;s<e.length;s++){let l=e.charCodeAt(s);switch(l){case kn:{if(s!==e.length-1)return!1;let u=(e[s-1]||i[i.length-1]||"").charCodeAt(0);if(u<ct||u>pt)return!1;break}case bn:{if(s===e.length-1||n)return!1;n=!0;break}case xn:{let u=(e[s-1]||i[i.length-1]||"").charCodeAt(0);if(u<ct||u>pt)return!1;let g=(e[s+1]||"").charCodeAt(0);if(g<ct||g>pt)return!1;break}case Tn:case Vn:continue;default:{if(l>=An&&l<=Cn||l>=$n&&l<=Sn||l>=ct&&l<=pt)continue;return!1}}}return!0}function En(t){if(!t.endsWith("-*"))return!1;t=t.slice(0,-2);let r=zr.exec(t);if(r===null)return!1;let i=
|
||
|
|
`,`
|
||
|
|
`);let r=[],i=[],e=null,n="",s;for(let l=0;l<t.length;l++){let c=t.charCodeAt(l);switch(c){case ei:case ti:case ri:case ai:case li:case oi:case si:{if(n.length>0){let p=Ae(n);e?e.nodes.push(p):r.push(p),n=""}let u=l,f=l+1;for(;f<t.length&&(s=t.charCodeAt(f),!(s!==ei&&s!==ti&&s!==ri&&s!==ai&&s!==li&&s!==oi&&s!==si));f++);l=f-1;let g=t.slice(u,f),d=g.trim()===","?qn(g):Yn(g);e?e.nodes.push(d):r.push(d);break}case ni:{let u=Gn(n,[]);if(n="",u.value!==":not"&&u.value!==":where"&&u.value!==":has"&&u.value!==":is"){let f=l+1,g=0;for(let p=l+1;p<t.length;p++){if(s=t.charCodeAt(p),s===ni){g++;continue}if(s===Xr){if(g===0){l=p;break}g--}}let d=l;u.nodes.push(Zn(t.slice(f,d))),n="",l=d,e?e.nodes.push(u):r.push(u);break}e?e.nodes.push(u):r.push(u),i.push(u),e=u;break}case Xr:{let u=i.pop();if(n.length>0){let f=Ae(n);u.nodes.push(f),n=""}i.length>0?e=i[i.length-1]:e=null;break}case Xn:case Jn:case el:{if(n.length>0){let u=Ae(n);e?e.nodes.push(u):r.push(u)}n=t[l];break}case ii:{if(n.length>0){let g=Ae(n);e?e.nodes.push(g):r.push(g)}n="";let u=l,f=0;for(let g=l+1;g<t.length;g++){if(s=t.charCodeAt(g),s===ii){f++;continue}if(s===Hn){if(f===0){l=g;break}f--}}n+=t.slice(u,l+1);break}case tl:case Qn:{let u=l;for(let f=l+1;f<t.length;f++)if(s=t.charCodeAt(f),s===Qr)f+=1;else if(s===c){l=f;break}n+=t.slice(u,l+1);break}case rl:case il:{if(n.length>0){let u=Ae(n);e?e.nodes.push(u):r.push(u),n=""}e?e.nodes.push(Ae(t[l])):r.push(Ae(t[l]));break}case Qr:{n+=t[l]+t[l+1],l+=1;break}default:n+=t[l]}}return n.length>0&&r.push(Ae(n)),r}function ue(t,r){for(let i in t)delete t[i];return Object.assign(t,r)}function Oe(t){let r=[];for(let i of z(t,".")){if(!i.includes("[")){r.push(i);continue}let e=0;for(;;){let n=i.indexOf("[",e),s=i.indexOf("]",n);if(n===-1||s===-1)break;n>e&&r.push(i.slice(e,n)),r.push(i.slice(n+1,s)),e=s+1}e<=i.length-1&&r.push(i.slice(e))}return r}function Wt(t,r){let i=t;return i.storage[di]??=nl(),i.storage[mi]??=al(i),i.storage[gi]??=ul(),i.storage[hi]??=cl(),i.storage[vi]??=dl(),i.storage[Yt]??=yl(i),i.storage[wt]??=bl(i,r),i.storage[me]??=Pl(i),i.storage[Gt]??=_l(),i.storage[yt]??=Dl(i),i.storage[qt]??=Kl(i),i.storage[bt]??=Ul(i),i.storage[bi]??=Ll(i),i}var di=Symbol();function nl(){return new L(t=>new L(r=>({rem:t,features:r})))}function ll(t,r){let i=0;return r?.collapse&&(i|=1),r?.logicalToPhysical&&(i|=2),Wt(t,r).storage[di].get(r?.rem??null).get(i)}var mi=Symbol();function al(t){return new L(r=>new L(i=>({features:i,designSystem:t,signatureOptions:r})))}function ol(t,r,i){let e=0;return i?.collapse&&(e|=1),Wt(t).storage[mi].get(r).get(e)}function Bt(t,r,i){let e=ll(t,i),n=ol(t,e,i),s=Wt(t),l=new Set,c=s.storage[gi].get(n);for(let u of r)l.add(c.get(u));return l.size<=1||!(n.features&1)?Array.from(l):sl(n,Array.from(l))}function sl(t,r){if(r.length<=1)return r;let i=t.designSystem,e=new L(c=>new L(u=>new Set)),n=t.designSystem.theme.prefix?`${t.designSystem.theme.prefix}:`:"";for(let c of r){let u=z(c,":"),f=u.pop(),g=f.endsWith("!");g&&(f=f.slice(0,-1));let d=u.length>0?`${u.join(":")}:`:"",p=g?"!":"";e.get(d).get(p).add(`${n}${f}`)}let s=new Set;for(let[c,u]of e.entries())for(let[f,g]of u.entries())for(let d of l(Array.from(g)))n&&d.startsWith(n)&&(d=d.slice(n.length)),s.add(`${c}${d}${f}`);return Array.from(s);function l(c){let u=t.signatureOptions,f=i.storage[yt].get(u),g=i.storage[Gt].get(u),d=c.map(x=>f.get(x));if(d.some(x=>x.has("line-height"))){let x=i.theme.keysInNamespaces(["--text"]);if(x.length>0){let k=new Set,D=new Set;for(let N of d)if(N.has("line-height"))for(let U of N.get("line-height")){if(D.has(U))continue;D.add(U);let P=i.storage[wt]?.get(U)??null;if(P!==null)if(ee(P)){k.add(P);for(let j of x)f.get(`text-${j}/${P}`)}else{k.add(U);for(let j of x)f.get(`text-${j}/[${U}]`)}}let V=new Set;for(let N of d)if(N.has("font-size")){for(let U of N.get("font-size"))if(!V.has(U)){V.add(U);for(let P of k)ee(P)?f.get(`text-[${U}]/${P}`):f.get(`text-[${U}]/[${P}]`)}}}}let p=new L(x=>{let k=new L(V=>new L(N=>new Set)),D=new Set(f.get(x).keys());if(D.size===0)return k;for(let V of de(i,x))if(!(V.kind!=="functional"||V.
|
||
|
|
`),s=!0;return _(B(e),l=>{if(l.kind==="function"&&l.value==="var"){let c=l.nodes[0].value;if(!new RegExp(`var\\(${c}[,)]\\s*`,"g").test(n)||n.includes(`${c}:`))return s=!1,R.Stop}}),s}function Cl(t,r){if(t.kind!=="functional"||t.value?.kind!=="named")return t;let i=r.designSystem,e=i.storage[qt].get(r.signatureOptions),n=i.storage[me].get(r.signatureOptions),s=i.printCandidate(t),l=n.get(s);if(typeof l!="string")return t;for(let u of c(l,t)){let f=i.printCandidate(u);if(n.get(f)===l)return u}return t;function*c(u,f){let g=e.get(u);if(!(g.length>1)){if(g.length===0&&f.modifier){let d={...f,modifier:null},p=n.get(i.printCandidate(d));if(typeof p=="string")for(let w of c(p,d))yield Object.assign({},w,{modifier:f.modifier})}if(g.length===1)for(let d of de(i,g[0]))yield d}}}var $l=new Map([["order-none","order-0"],["break-words","wrap-break-word"]]);function Sl(t,r){let i=r.designSystem,e=i.storage[me].get(r.signatureOptions),n=wi(i,t),s=$l.get(n)??null;if(s===null)return t;let l=e.get(n);if(typeof l!="string")return t;let c=e.get(s);if(typeof c!="string"||l!==c)return t;let[u]=de(i,s);return u}function Tl(t,r){let i=r.designSystem,e=i.storage[bt],n=i.storage[bi],s=kt(t);for(let[l]of s){if(l.kind==="compound")continue;let c=i.printVariant(l),u=e.get(c);if(typeof u!="string")continue;let f=n.get(u);if(f.length!==1)continue;let g=f[0],d=i.parseVariant(g);d!==null&&ue(l,d)}return t}function Vl(t,r){let i=r.designSystem,e=i.storage[me].get(r.signatureOptions);if(t.kind==="functional"&&t.value?.kind==="arbitrary"&&t.value.dataType!==null){let n=i.printCandidate({...t,value:{...t.value,dataType:null}});e.get(i.printCandidate(t))===e.get(n)&&(t.value.dataType=null)}return t}function Nl(t,r){if(t.kind!=="functional"||t.value?.kind!=="arbitrary")return t;let i=r.designSystem,e=i.storage[me].get(r.signatureOptions),n=e.get(i.printCandidate(t));if(n===null)return t;for(let s of yi(t))if(e.get(i.printCandidate({...t,value:s}))===n)return t.value=s,t;return t}function El(t){let r=kt(t);for(let[i]of r)if(i.kind==="functional"&&i.root==="data"&&i.value?.kind==="arbitrary"&&!i.value.value.includes("="))i.value={kind:"named",value:i.value.value};else if(i.kind==="functional"&&i.root==="aria"&&i.value?.kind==="arbitrary"&&(i.value.value.endsWith("=true")||i.value.value.endsWith('="true"')||i.value.value.endsWith("='true'"))){let[e,n]=z(i.value.value,"=");if(e[e.length-1]==="~"||e[e.length-1]==="|"||e[e.length-1]==="^"||e[e.length-1]==="$"||e[e.length-1]==="*")continue;i.value={kind:"named",value:i.value.value.slice(0,i.value.value.indexOf("="))}}else i.kind==="functional"&&i.root==="supports"&&i.value?.kind==="arbitrary"&&/^[a-z-][a-z0-9-]*$/i.test(i.value.value)&&(i.value={kind:"named",value:i.value.value});return t}function*yi(t,r=t.value?.value??"",i=new Set){if(i.has(r))return;if(i.add(r),yield{kind:"named",value:r,fraction:null},r.endsWith("%")&&ee(r.slice(0,-1))&&(yield{kind:"named",value:r.slice(0,-1),fraction:null}),r.includes("/")){let[s,l]=r.split("/");I(s)&&I(l)&&(yield{kind:"named",value:s,fraction:`${s}/${l}`})}let e=new Set;for(let s of r.matchAll(/(\d+\/\d+)|(\d+\.?\d+)/g))e.add(s[0].trim());let n=Array.from(e).sort((s,l)=>s.length-l.length);for(let s of n)yield*yi(t,s,i)}function ci(t){return!t.some(r=>r.kind==="separator"&&r.value.trim()===",")}function vt(t){let r=t.value.trim();return t.kind==="selector"&&r[0]==="["&&r[r.length-1]==="]"}function Rl(t,r){let i=[t],e=r.designSystem,n=e.storage[bt],s=kt(t);for(let[l,c]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 u=Re(l.selector.trim());if(!ci(u))continue;if(c===null&&u.length===3&&u[0].kind==="selector"&&u[0].value==="&"&&u[1].kind==="combinator"&&u[1].value.trim()===">"&&u[2].kind==="selector"&&u[2].value==="*"){ue(l,e.parseVariant("*"));continue}if(c===null&&u.length===3&&u[0].kind==="selector"&&u[0].value==="&"&&u[1].kind==="combinator"&&u[1].value.trim()===""&&u[2].kind==="selector"&&u[2].value==="*"){u
|
||
|
|
|
||
|
|
${ie([d])}
|
||
|
|
Relies on:
|
||
|
|
|
||
|
|
${ie([w])}`)}f.add(d);for(let w of s.get(d))for(let h of l.get(w))p.push(d),g(h,p),p.pop();c.add(d),f.delete(d),u.push(d)}}for(let d of n)g(d);for(let d of u)"nodes"in d&&_(d.nodes,p=>{if(p.kind!=="at-rule"||p.name!=="@apply")return;let w=p.params.split(/(\s+)/g),h={},y=0;for(let[A,E]of w.entries())A%2===0&&(h[E]=y),y+=E.length;{let A=Object.keys(h),E=$e(A,r,{respectImportant:!1,onInvalidCandidate:V=>{if(r.theme.prefix&&!V.startsWith(r.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${V}\`. Did you mean \`${r.theme.prefix}:${V}\`?`);if(r.invalidCandidates.has(V))throw new Error(`Cannot apply utility class \`${V}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let N=z(V,":");if(N.length>1){let U=N.pop();if(r.candidatesToCss([U])[0]){let P=r.candidatesToCss(N.map(Y=>`${Y}:[--tw-variant-check:1]`)),j=N.filter((Y,q)=>P[q]===null);if(j.length>0){if(j.length===1)throw new Error(`Cannot apply utility class \`${V}\` because the ${j.map(Y=>`\`${Y}\``)} variant does not exist.`);{let Y=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${V}\` because the ${Y.format(j.map(q=>`\`${q}\``))} variants do not exist.`)}}}}throw r.theme.size===0?new Error(`Cannot apply unknown utility class \`${V}\`. 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 \`${V}\``)}}),x=p.src,k=E.astNodes.map(V=>{let N=E.nodeSorting.get(V)?.candidate,U=N?h[N]:void 0;if(V=te(V),!x||!N||U===void 0)return _([V],j=>{j.src=x}),V;let P=[x[0],x[1],x[2]];return P[1]+=7+U,P[2]=P[1]+N.length,_([V],j=>{j.src=P}),V}),D=[];for(let V of k)if(V.kind==="rule")for(let N of V.nodes)D.push(N);else D.push(V);return R.Replace(D)}});return i}function*Ri(t,r){for(let i of t.params.split(/\s+/g))for(let e of r.parseCandidate(i))switch(e.kind){case"arbitrary":break;case"static":case"functional":yield e.root;break;default:}}async function Qt(t,r,i,e=0,n=!1){let s=0,l=[];return _(t,c=>{if(c.kind==="at-rule"&&(c.name==="@import"||c.name==="@reference")){let u=Gl(B(c.params));if(u===null)return;c.name==="@reference"&&(u.media="reference"),s|=2;let{uri:f,layer:g,media:d,supports:p}=u;if(f.startsWith("data:")||f.startsWith("http://")||f.startsWith("https://"))return;let w=ce({},[]);return l.push((async()=>{if(e>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${f}\` in \`${r}\`)`);let h=await i(f,r),y=Se(h.content,{from:n?h.path:void 0});await Qt(y,h.base,i,e+1,n),w.nodes=ql(c,[ce({base:h.base},y)],g,d,p)})()),R.ReplaceSkip(w)}}),l.length>0&&await Promise.all(l),s}function Gl(t){let r,i=null,e=null,n=null;for(let s=0;s<t.length;s++){let l=t[s];if(l.kind!=="separator"){if(l.kind==="word"&&!r){if(!l.value||l.value[0]!=='"'&&l.value[0]!=="'")return null;r=l.value.slice(1,-1);continue}if(l.kind==="function"&&l.value.toLowerCase()==="url"||!r)return null;if((l.kind==="word"||l.kind==="function")&&l.value.toLowerCase()==="layer"){if(i)return null;if(n)throw new Error("`layer(\u2026)` in an `@import` should come before any other functions or conditions");"nodes"in l?i=Z(l.nodes):i="";continue}if(l.kind==="function"&&l.value.toLowerCase()==="supports"){if(n)return null;n=Z(l.nodes);continue}e=Z(t.slice(s));break}}return r?{uri:r,layer:i,media:e,supports:n}:null}function ql(t,r,i,e,n){let s=r;if(i!==null){let l=F("@layer",i,s);l.src=t.src,s=[l]}if(e!==null){let l=F("@media",e,s);l.src=t.src,s=[l]}if(n!==null){let l=F("@supports",n[0]==="("?n:`(${n})`,s);l.src=t.src,s=[l]}return s}function Me(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let r=Object.getPrototypeOf(t);return r===null||Object.getPrototypeOf(r)===null}function Xe(t,r,i,e=[]){for(let n of r)if(n!=null)for(let s of Reflect.ownKeys(n)){e.push(s);let l=i(t[s],n[s],e);l!==void 0?t[s]=l:!Me(t[s])||!Me(n[s])?t[s]=n[s]:t[s]=Xe({},[t[s],n[s]],i,e),e.pop()}return t}function At(t,r,i){return function(n
|
||
|
|
|
||
|
|
${ie([A])}
|
||
|
|
|
||
|
|
\`@plugin\` options must be a flat list of declarations.`);if(A.value===void 0)continue;let E=A.value,x=z(E,",").map(k=>{if(k=k.trim(),k==="null")return null;if(k==="true")return!0;if(k==="false")return!1;if(Number.isNaN(Number(k))){if(k[0]==='"'&&k[k.length-1]==='"'||k[0]==="'"&&k[k.length-1]==="'")return k.slice(1,-1);if(k[0]==="{"&&k[k.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ie([A]).trim()}\` is not supported.
|
||
|
|
|
||
|
|
Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(k);return k});y[A.property]=x.length===1?x[0]:x}return l.push([{id:h,base:w.context.base,reference:!!w.context.reference,src:d.src},Object.keys(y).length>0?y:null]),s|=4,R.Replace([])}if(d.name==="@config"){if(d.nodes.length>0)throw new Error("`@config` cannot have a body.");if(w.parent!==null)throw new Error("`@config` cannot be nested.");return c.push({id:d.params.slice(1,-1),base:w.context.base,reference:!!w.context.reference,src:d.src}),s|=4,R.Replace([])}}),ji(t);let u=t.resolveThemeValue;if(t.resolveThemeValue=function(p,w){return p.startsWith("--")?u(p,w):(s|=Wi({designSystem:t,base:r,ast:i,sources:n,configs:[],pluginDetails:[]}),t.resolveThemeValue(p,w))},!l.length&&!c.length)return 0;let[f,g]=await Promise.all([Promise.all(c.map(async({id:d,base:p,reference:w,src:h})=>{let y=await e(d,p,"config");return{path:d,base:y.base,config:y.module,reference:w,src:h}})),Promise.all(l.map(async([{id:d,base:p,reference:w,src:h},y])=>{let A=await e(d,p,"plugin");return{path:d,base:A.base,plugin:A.module,options:y,reference:w,src:h}}))]);return s|=Wi({designSystem:t,base:r,ast:i,sources:n,configs:f,pluginDetails:g}),s}function Wi({designSystem:t,base:r,ast:i,sources:e,configs:n,pluginDetails:s}){let l=0,u=[...s.map(y=>{if(!y.options)return{config:{plugins:[y.plugin]},base:y.base,reference:y.reference,src:y.src};if("__isOptionsFunction"in y.plugin)return{config:{plugins:[y.plugin(y.options)]},base:y.base,reference:y.reference,src:y.src};throw new Error(`The plugin "${y.path}" does not accept options`)}),...n],{resolvedConfig:f}=tr(t,[{config:Ui(t.theme),base:r,reference:!0,src:void 0},...u,{config:{plugins:[zi]},base:r,reference:!0,src:void 0}]),{resolvedConfig:g,replacedThemeKeys:d}=tr(t,u),p={designSystem:t,ast:i,resolvedConfig:f,featuresRef:{set current(y){l|=y}}},w=Xt({...p,referenceMode:!1,src:void 0}),h=t.resolveThemeValue;t.resolveThemeValue=function(A,E){if(A[0]==="-"&&A[1]==="-")return h(A,E);let x=w.theme(A,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:y,reference:A,src:E}of f.plugins){let x=Xt({...p,referenceMode:A??!1,src:E});y(x)}if(Wr(t,g,d),Ki(t,g),Fi(g,t),Mi(g,t),Li(g,t),!t.theme.prefix&&f.prefix){if(f.prefix.endsWith("-")&&(f.prefix=f.prefix.slice(0,-1),console.warn(`The prefix "${f.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.`)),!ra.test(f.prefix))throw new Error(`The prefix "${f.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);t.theme.prefix=f.prefix}if(!t.important&&f.important===!0&&(t.important=!0),typeof f.important=="string"){let y=f.important;_(i,(A,E)=>{if(A.kind!=="at-rule"||A.name!=="@tailwind"||A.params!=="utilities")return;let x=qe(E);return x.parent?.kind==="rule"&&x.parent.selector===y?R.Stop:R.ReplaceStop(G(y,[A]))})}for(let y of f.blocklist)t.invalidCandidates.add(y);for(let y of f.content.files){if("raw"in y)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:
|
||
|
|
|
||
|
|
${JSON.stringify(y,null,2)}
|
||
|
|
|
||
|
|
This feature is not currently supported.`);let A=!1;y.pattern[0]=="!"&&(A=!0,y.pattern=y.pattern.slice(1)),e.push({...y,negated:A})}return l}function Yi({ast:t}){let r=new L(n=>tt(n.code)),i=new L(n=>({url:n.file,content:n.code,ignore:!1})),e={file:null,sources:[],mappings:[]};_(t,n=>{if(!n.src||!n.dst)return;let s=i.get(n.src[0]);if(!s.content)return;let l=r.get(n.src[0]),c=r.get(n.dst[0]),u=s.content.slice(n.src[1],n.src[2]),f=0;for(let p of u.split(`
|
||
|
|
`)){if(p.trim()!==""){let w=l.find(n.src[1]+f),h=c.find(n.dst[1]);e.mappings.push({name:null,originalPosition:{source:s,...w},generatedPosition:h})}f+=p.length,f+=1}let g=l.find(n.src[2]),d=c.find(n.dst[2]);e.mappings.push({name:null,originalPosition:{source:s,...g},generatedPosition:d})});for(let n of r.keys())e.sources.push(i.get(n));return e.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)),e}var Gi=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function Ct(t){let r=t.indexOf("{");if(r===-1)return[t];let i=[],e=t.slice(0,r),n=t.slice(r),s=0,l=n.lastIndexOf("}");for(let d=0;d<n.length;d++){let p=n[d];if(p==="{")s++;else if(p==="}"&&(s--,s===0)){l=d;break}}if(l===-1)throw new Error(`The pattern \`${t}\` is not balanced.`);let c=n.slice(1,l),u=n.slice(l+1),f;ia(c)?f=na(c):f=z(c,","),f=f.flatMap(d=>Ct(d));let g=Ct(u);for(let d of g)for(let p of f)i.push(e+p+d);return i}function ia(t){return Gi.test(t)}function na(t){let r=t.match(Gi);if(!r)return[t];let[,i,e,n]=r,s=n?parseInt(n,10):void 0,l=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(e)){let c=parseInt(i,10),u=parseInt(e,10);if(s===void 0&&(s=c<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let f=c<u;f&&s<0&&(s=-s),!f&&s>0&&(s=-s);for(let g=c;f?g<=u:g>=u;g+=s)l.push(g.toString())}return l}function qi(t,r){let i=new Set,e=new Set,n=[];function s(l,c=[]){if(t.has(l)&&!i.has(l)){e.has(l)&&r.onCircularDependency?.(c,l),e.add(l);for(let u of t.get(l)??[])c.push(l),s(u,c),c.pop();i.add(l),e.delete(l),n.push(l)}}for(let l of t.keys())s(l);return n}var la=/^[a-z]+$/,Pt=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(Pt||{});function aa(){throw new Error("No `loadModule` function provided to `compile`")}function oa(){throw new Error("No `loadStylesheet` function provided to `compile`")}function sa(t){let r=0,i=null;for(let e of z(t," "))e==="reference"?r|=2:e==="inline"?r|=1:e==="default"?r|=4:e==="static"?r|=8:e.startsWith("prefix(")&&e.endsWith(")")&&(i=e.slice(7,-1));return[r,i]}var Ke=(u=>(u[u.None=0]="None",u[u.AtApply=1]="AtApply",u[u.AtImport=2]="AtImport",u[u.JsPluginCompat=4]="JsPluginCompat",u[u.ThemeFunction=8]="ThemeFunction",u[u.Utilities=16]="Utilities",u[u.Variants=32]="Variants",u[u.AtTheme=64]="AtTheme",u))(Ke||{});async function Zi(t,{base:r="",from:i,loadModule:e=aa,loadStylesheet:n=oa}={}){let s=0;t=[ce({base:r},t)],s|=await Qt(t,r,n,0,i!==void 0);let l=null,c=new ot,u=new Map,f=new Map,g=[],d=null,p=null,w=[],h=[],y=[],A=[],E=null;_(t,(k,D)=>{if(k.kind!=="at-rule")return;let V=qe(D);if(k.name==="@tailwind"&&(k.params==="utilities"||k.params.startsWith("utilities"))){if(p!==null)return R.Replace([]);if(V.context.reference)return R.Replace([]);let N=z(k.params," ");for(let U of N)if(U.startsWith("source(")){let P=U.slice(7,-1);if(P==="none"){E=P;continue}if(P[0]==='"'&&P[P.length-1]!=='"'||P[0]==="'"&&P[P.length-1]!=="'"||P[0]!=="'"&&P[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");E={base:V.context.sourceBase??V.context.base,pattern:P.slice(1,-1)}}p=k,s|=16}if(k.name==="@utility"){if(V.parent!==null)throw new Error("`@utility` cannot be nested.");if(k.nodes.length===0)throw new Error(`\`@utility ${k.params}\` is empty. Utilities should include at least one property.`);let N=Lr(k);if(N===null){if(!k.params.endsWith("-*")){if(k.params.endsWith("*"))throw new Error(`\`@utility ${k.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);if(k.params.includes("*"))throw new Error(`\`@utility ${k.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`)}throw new Error(`\`@utility ${k.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`)}g.push(N)}if(k.name==="@source"){if(k.nodes.length>0)throw new Error("`@source` cannot have a body.")
|
||
|
|
`).map((Y,q,le)=>`${q===0||q>=le.length-2?" ":">"} ${Y}`).join(`
|
||
|
|
`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`.
|
||
|
|
|
||
|
|
${j}`)}),d?R.ReplaceSkip([]):(d=G(":root, :host",[]),d.src=k.src,R.ReplaceSkip(d))}});let x=Ti(c,p?.src);if(l&&(x.important=l),A.length>0)for(let k of A)x.invalidCandidates.add(k);s|=await Bi({designSystem:x,base:r,ast:t,loadModule:e,sources:h});for(let k of u.keys())x.variants.static(k,()=>{});for(let k of qi(f,{onCircularDependency(D,V){let N=ie(D.map((U,P)=>F("@custom-variant",U,[F("@variant",D[P+1]??V,[])]))).replaceAll(";"," { \u2026 }").replace(`@custom-variant ${V} {`,`@custom-variant ${V} { /* \u2190 */`);throw new Error(`Circular dependency detected in custom variants:
|
||
|
|
|
||
|
|
${N}`)}}))u.get(k)?.(x);for(let k of g)k(x);if(d){let k=[];for(let[V,N]of x.theme.entries()){if(N.options&2)continue;let U=a(ke(V),N.value);U.src=N.src,k.push(U)}let D=x.theme.getKeyframes();for(let V of D)t.push(ce({theme:!0},[W([V])]));d.nodes=[ce({theme:!0},k)]}if(s|=Qe(t,x),s|=De(t,x),s|=Ce(t,x),p){let k=p;k.kind="context",k.context={}}return _(t,k=>{if(k.kind==="at-rule")return k.name==="@utility"?R.Replace([]):R.Skip}),{designSystem:x,ast:t,sources:h,root:E,utilitiesNode:p,features:s,inlineCandidates:y}}async function ua(t,r={}){let{designSystem:i,ast:e,sources:n,root:s,utilitiesNode:l,features:c,inlineCandidates:u}=await Zi(t,r);e.unshift(at(`! tailwindcss v${ar} | MIT License | https://tailwindcss.com `));function f(h){i.invalidCandidates.add(h)}let g=new Set,d=null,p=0,w=!1;for(let h of u)i.invalidCandidates.has(h)||(g.add(h),w=!0);return{sources:n,root:s,features:c,build(h){if(c===0)return t;if(!l)return d??=Te(e,i,r.polyfills),d;let y=w,A=!1;w=!1;let E=g.size;for(let k of h)if(!i.invalidCandidates.has(k))if(k[0]==="-"&&k[1]==="-"){let D=i.theme.markUsedVariable(k);y||=D,A||=D}else g.add(k),y||=g.size!==E;if(!y)return d??=Te(e,i,r.polyfills),d;let x=$e(g,i,{onInvalidCandidate:f}).astNodes;return r.from&&_(x,k=>{k.src??=l.src}),!A&&p===x.length?(d??=Te(e,i,r.polyfills),d):(p=x.length,l.nodes=x,d=Te(e,i,r.polyfills),d)}}}async function yf(t,r={}){let i=Se(t,{from:r.from}),e=await ua(i,r),n=i,s=t;return{...e,build(l){let c=e.build(l);return c===n||(s=ie(c,!!r.from),n=c),s},buildSourceMap(){return Yi({ast:n})}}}async function kf(t,r={}){return(await Zi(Se(t,{from:r.from}),r)).designSystem}function fa(){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{Pt as a,Ke as b,ua as c,yf as d,kf as e,fa as f};
|