@stacksjs/ts-css 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{c}from"./chunk-vbjv9wf0.js";var P={};c(P,{IgnoreCaseMode:()=>E,isTraversal:()=>x,parse:()=>r,stringify:()=>f});var T=/(?:\\(?:[\dA-Fa-f]{1,6} ?|[^])|[\w\-\u00B0-\uFFFF])+/y,_=/\\([\dA-Fa-f]{1,6} ?|[^])/g;function j(e){return e.replace(_,(a,i)=>{if(i.length>1&&/^[\dA-Fa-f]/.test(i)){let u=Number.parseInt(i,16);if(u>=55296&&u<=57343)return"\uFFFD";return String.fromCodePoint(u)}return i})}function O(e){return e.indexOf("\\")<0?e:j(e)}var U=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function L(e){switch(e){case 126:return"element";case 94:return"start";case 36:return"end";case 42:return"any";case 33:return"not";case 124:return"hyphen";default:return null}}function w(e){return e===32||e===9||e===10||e===13||e===12}function r(e,a={}){let i=[],u=R(i,e,a,0);if(u<e.length)throw Error(`Unmatched selector: ${e.slice(u)}`);return i}function h(e,a){T.lastIndex=a;let i=T.exec(e);if(!i)throw Error(`Expected name, found ${e.slice(a)}`);return{value:O(i[0]),end:a+i[0].length}}function C(e,a){while(a<e.length&&w(e.charCodeAt(a)))a++;return a}function R(e,a,i,u){let o=[],t=C(a,u),n=a.length,d=i.xmlMode===!0,p=i.lowerCaseAttributeNames!==!1&&!d,m=i.lowerCaseTags!==!1;while(t<n){let l=a.charCodeAt(t);if(w(l)){let s=t+1;while(s<n&&w(a.charCodeAt(s)))s++;if(o.length===0)return s;t=s,A(o,"descendant");continue}if(l===62||l===60||l===126||l===43||l===124){let s=t+1;while(s<n&&w(a.charCodeAt(s)))s++;switch(t=s,l){case 62:A(o,"child");break;case 60:A(o,"parent");break;case 126:A(o,"sibling");break;case 43:A(o,"adjacent");break;case 124:if(t<n&&a.charCodeAt(t)===124)t++,t=C(a,t),A(o,"column-combinator");else o.push({type:"tag",name:"",namespace:""});break}continue}if(l===44){if(o.length===0)throw Error("Empty sub-selector");e.push(o),o=[],t=C(a,t+1);continue}if(l===47&&a.charCodeAt(t+1)===42){let s=a.indexOf("*/",t+2);if(s<0)throw Error("Unmatched comment");t=C(a,s+2);continue}if(l===42){t++,o.push({type:"universal",namespace:null});continue}if(l===35){let s=h(a,t+1);t=s.end,o.push({type:"attribute",name:"id",action:"equals",value:s.value,namespace:null,ignoreCase:!1});continue}if(l===46){let s=h(a,t+1);t=s.end,o.push({type:"attribute",name:"class",action:"element",value:s.value,namespace:null,ignoreCase:!1});continue}if(l===91){t=F(a,t,o,i,d,p);continue}if(l===58){t=M(a,t,o,i);continue}if(l===124){t++;let s=h(a,t);t=s.end,o.push({type:"tag",name:m?s.value.toLowerCase():s.value,namespace:""});continue}{let s=h(a,t);if(t=s.end,t<n&&a.charCodeAt(t)===124&&a.charCodeAt(t+1)!==61){t++;let b=h(a,t);t=b.end,o.push({type:"tag",name:m?b.value.toLowerCase():b.value,namespace:s.value})}else o.push({type:"tag",name:m?s.value.toLowerCase():s.value,namespace:null})}}if(o.length>0)e.push(o);return t}function F(e,a,i,u,o,t){let n=a+1,d=e.length,p;if(e.charCodeAt(n)===124)throw Error("Empty namespace not supported");if(e.charCodeAt(n)===42&&e.charCodeAt(n+1)===124){n+=2;let g=h(e,n);n=g.end,p=g.value}else{let g=h(e,n);if(n=g.end,p=g.value,e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61){n++;let y=h(e,n);n=y.end,p=y.value}}n=C(e,n);let m="exists",l="",s=null,b=e.charCodeAt(n);if(b===61)m="equals",n++;else if(b===33&&e.charCodeAt(n+1)===61)m="not",n+=2;else{let g=L(b);if(g!==null&&e.charCodeAt(n+1)===61)m=g,n+=2}if(m!=="exists"){n=C(e,n);let g=e.charCodeAt(n);if(g===34||g===39){let S=q(e,n+1,g);l=O(e.slice(n+1,S)),n=S+1}else{let S=h(e,n);l=S.value,n=S.end}n=C(e,n);let y=e.charCodeAt(n);if(y===105||y===73)s=!0,n++;else if(y===115||y===83)s=!1,n++}if(e.charCodeAt(n)!==93)throw Error("Expected ]");if(n++,s===null&&!o&&U.has(p.toLowerCase()))s="quirks";return i.push({type:"attribute",name:t?p.toLowerCase():p,action:m,value:l,namespace:null,ignoreCase:s}),n}function M(e,a,i,u){if(e.charCodeAt(a+1)===58){let d=a+2,p=h(e,d);d=p.end;let m=p.value.toLowerCase(),l=null;if(e.charCodeAt(d)===40){let s=I(e,d);l=e.slice(d+1,s).trim(),d=s+1}return i.push({type:"pseudo-element",name:m,data:l}),d}let o=a+1,t=h(e,o);o=t.end;let n=t.value.toLowerCase();if(e.charCodeAt(o)===40){let d=I(e,o),p=e.slice(o+1,d);if(o=d+1,n==="is"||n==="not"||n==="where"||n==="has"||n==="matches"||n==="-moz-any"||n==="-webkit-any"){let m=[];R(m,p.trim(),u,0),i.push({type:"pseudo",name:n,data:m})}else i.push({type:"pseudo",name:n,data:p.trim()})}else i.push({type:"pseudo",name:n,data:null});return o}function A(e,a){if(e.length>0&&e[e.length-1].type==="descendant"&&a!=="descendant")e.pop();if(e.length>0&&e[e.length-1].type===a)return;e.push({type:a})}function q(e,a,i){let u=a,o=e.length;while(u<o){let t=e.charCodeAt(u);if(t===92){u+=2;continue}if(t===i)return u;u++}throw Error("Unterminated string")}function I(e,a){let i=1,u=a+1,o=e.length;while(u<o){let t=e.charCodeAt(u);if(t===92){u+=2;continue}if(t===34||t===39){u=q(e,u+1,t)+1;continue}if(t===40)i++;else if(t===41){if(i--,i===0)return u}u++}throw Error("Unterminated parenthesis")}var D={child:" > ",parent:" < ",sibling:" ~ ",adjacent:" + ",descendant:" ","column-combinator":" || "};function f(e){return e.map(z).join(", ")}function z(e){return e.map((a,i)=>B(a,e[i-1])).join("")}function B(e,a){switch(e.type){case"tag":return`${N(e.namespace)}${v(e.name)}`;case"universal":return`${N(e.namespace)}*`;case"attribute":{if(e.name==="id"&&e.action==="equals"&&!e.ignoreCase&&!e.namespace)return`#${v(e.value)}`;if(e.name==="class"&&e.action==="element"&&!e.ignoreCase&&!e.namespace)return`.${v(e.value)}`;let i=`[${N(e.namespace)}${v(e.name)}`;if(e.action!=="exists"){let u=K[e.action]??"=";if(i+=u,i+=`"${e.value.replace(/"/g,"\\\"")}"`,e.ignoreCase===!0)i+=" i";else if(e.ignoreCase===!1)i+=" s"}return i+="]",i}case"pseudo":if(e.data===null)return`:${e.name}`;if(typeof e.data==="string")return`:${e.name}(${e.data})`;return`:${e.name}(${f(e.data)})`;case"pseudo-element":return e.data===null?`::${e.name}`:`::${e.name}(${e.data})`;case"descendant":case"child":case"parent":case"sibling":case"adjacent":case"column-combinator":return D[e.type]??" "}return""}var K={equals:"=",element:"~=",start:"^=",end:"$=",any:"*=",not:"!=",hyphen:"|="};function N(e){if(e===null)return"";if(e==="")return"|";return`${v(e)}|`}var Q=/[^\w\u00B0-\uFFFF-]/g;function v(e){if(e==="")return"";return e.replace(Q,(a)=>`\\${a}`)}var V=new Set(["adjacent","child","descendant","parent","sibling","column-combinator"]);function x(e){return V.has(e.type)}var E={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};export{r,f,x,E,P};
2
+ import{c}from"./chunk-vbjv9wf0.js";var O={};c(O,{IgnoreCaseMode:()=>E,isTraversal:()=>x,parse:()=>r,stringify:()=>f});var T=/(?:\\(?:[\dA-Fa-f]{1,6} ?|[^])|[\w\-\u00B0-\uFFFF])+/y,_=/\\([\dA-Fa-f]{1,6} ?|[^])/g;function j(e){return e.replace(_,(a,i)=>{if(i.length>1&&/^[\dA-Fa-f]/.test(i)){let u=Number.parseInt(i,16);if(u>=55296&&u<=57343)return"\uFFFD";return String.fromCodePoint(u)}return i})}function P(e){return e.indexOf("\\")<0?e:j(e)}var U=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function L(e){switch(e){case 126:return"element";case 94:return"start";case 36:return"end";case 42:return"any";case 33:return"not";case 124:return"hyphen";default:return null}}function w(e){return e===32||e===9||e===10||e===13||e===12}function r(e,a={}){let i=[],u=R(i,e,a,0);if(u<e.length)throw Error(`Unmatched selector: ${e.slice(u)}`);return i}function h(e,a){T.lastIndex=a;let i=T.exec(e);if(!i)throw Error(`Expected name, found ${e.slice(a)}`);return{value:P(i[0]),end:a+i[0].length}}function C(e,a){while(a<e.length&&w(e.charCodeAt(a)))a++;return a}function R(e,a,i,u){let o=[],t=C(a,u),n=a.length,d=i.xmlMode===!0,p=i.lowerCaseAttributeNames!==!1&&!d,m=i.lowerCaseTags!==!1;while(t<n){let l=a.charCodeAt(t);if(w(l)){let s=t+1;while(s<n&&w(a.charCodeAt(s)))s++;if(o.length===0)return s;t=s,A(o,"descendant");continue}if(l===62||l===60||l===126||l===43||l===124){let s=t+1;while(s<n&&w(a.charCodeAt(s)))s++;switch(t=s,l){case 62:A(o,"child");break;case 60:A(o,"parent");break;case 126:A(o,"sibling");break;case 43:A(o,"adjacent");break;case 124:if(t<n&&a.charCodeAt(t)===124)t++,t=C(a,t),A(o,"column-combinator");else o.push({type:"tag",name:"",namespace:""});break}continue}if(l===44){if(o.length===0)throw Error("Empty sub-selector");e.push(o),o=[],t=C(a,t+1);continue}if(l===47&&a.charCodeAt(t+1)===42){let s=a.indexOf("*/",t+2);if(s<0)throw Error("Unmatched comment");t=C(a,s+2);continue}if(l===42){t++,o.push({type:"universal",namespace:null});continue}if(l===35){let s=h(a,t+1);t=s.end,o.push({type:"attribute",name:"id",action:"equals",value:s.value,namespace:null,ignoreCase:!1});continue}if(l===46){let s=h(a,t+1);t=s.end,o.push({type:"attribute",name:"class",action:"element",value:s.value,namespace:null,ignoreCase:!1});continue}if(l===91){t=F(a,t,o,i,d,p);continue}if(l===58){t=M(a,t,o,i);continue}if(l===124){t++;let s=h(a,t);t=s.end,o.push({type:"tag",name:m?s.value.toLowerCase():s.value,namespace:""});continue}{let s=h(a,t);if(t=s.end,t<n&&a.charCodeAt(t)===124&&a.charCodeAt(t+1)!==61){t++;let b=h(a,t);t=b.end,o.push({type:"tag",name:m?b.value.toLowerCase():b.value,namespace:s.value})}else o.push({type:"tag",name:m?s.value.toLowerCase():s.value,namespace:null})}}if(o.length>0)e.push(o);return t}function F(e,a,i,u,o,t){let n=a+1,d=e.length,p;if(e.charCodeAt(n)===124)throw Error("Empty namespace not supported");if(e.charCodeAt(n)===42&&e.charCodeAt(n+1)===124){n+=2;let g=h(e,n);n=g.end,p=g.value}else{let g=h(e,n);if(n=g.end,p=g.value,e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61){n++;let y=h(e,n);n=y.end,p=y.value}}n=C(e,n);let m="exists",l="",s=null,b=e.charCodeAt(n);if(b===61)m="equals",n++;else if(b===33&&e.charCodeAt(n+1)===61)m="not",n+=2;else{let g=L(b);if(g!==null&&e.charCodeAt(n+1)===61)m=g,n+=2}if(m!=="exists"){n=C(e,n);let g=e.charCodeAt(n);if(g===34||g===39){let S=q(e,n+1,g);l=P(e.slice(n+1,S)),n=S+1}else{let S=h(e,n);l=S.value,n=S.end}n=C(e,n);let y=e.charCodeAt(n);if(y===105||y===73)s=!0,n++;else if(y===115||y===83)s=!1,n++}if(e.charCodeAt(n)!==93)throw Error("Expected ]");if(n++,s===null&&!o&&U.has(p.toLowerCase()))s="quirks";return i.push({type:"attribute",name:t?p.toLowerCase():p,action:m,value:l,namespace:null,ignoreCase:s}),n}function M(e,a,i,u){if(e.charCodeAt(a+1)===58){let d=a+2,p=h(e,d);d=p.end;let m=p.value.toLowerCase(),l=null;if(e.charCodeAt(d)===40){let s=I(e,d);l=e.slice(d+1,s).trim(),d=s+1}return i.push({type:"pseudo-element",name:m,data:l}),d}let o=a+1,t=h(e,o);o=t.end;let n=t.value.toLowerCase();if(e.charCodeAt(o)===40){let d=I(e,o),p=e.slice(o+1,d);if(o=d+1,n==="is"||n==="not"||n==="where"||n==="has"||n==="matches"||n==="-moz-any"||n==="-webkit-any"){let m=[];R(m,p.trim(),u,0),i.push({type:"pseudo",name:n,data:m})}else i.push({type:"pseudo",name:n,data:p.trim()})}else i.push({type:"pseudo",name:n,data:null});return o}function A(e,a){if(e.length>0&&e[e.length-1].type==="descendant"&&a!=="descendant")e.pop();if(e.length>0&&e[e.length-1].type===a)return;e.push({type:a})}function q(e,a,i){let u=a,o=e.length;while(u<o){let t=e.charCodeAt(u);if(t===92){u+=2;continue}if(t===i)return u;u++}throw Error("Unterminated string")}function I(e,a){let i=1,u=a+1,o=e.length;while(u<o){let t=e.charCodeAt(u);if(t===92){u+=2;continue}if(t===34||t===39){u=q(e,u+1,t)+1;continue}if(t===40)i++;else if(t===41){if(i--,i===0)return u}u++}throw Error("Unterminated parenthesis")}var D={child:" > ",parent:" < ",sibling:" ~ ",adjacent:" + ",descendant:" ","column-combinator":" || "};function f(e){return e.map(z).join(", ")}function z(e){return e.map((a,i)=>B(a,e[i-1])).join("")}function B(e,a){switch(e.type){case"tag":return`${N(e.namespace)}${v(e.name)}`;case"universal":return`${N(e.namespace)}*`;case"attribute":{if(e.name==="id"&&e.action==="equals"&&!e.ignoreCase&&!e.namespace)return`#${v(e.value)}`;if(e.name==="class"&&e.action==="element"&&!e.ignoreCase&&!e.namespace)return`.${v(e.value)}`;let i=`[${N(e.namespace)}${v(e.name)}`;if(e.action!=="exists"){let u=K[e.action]??"=";if(i+=u,i+=`"${e.value.replace(/"/g,"\\\"")}"`,e.ignoreCase===!0)i+=" i";else if(e.ignoreCase===!1)i+=" s"}return i+="]",i}case"pseudo":if(e.data===null)return`:${e.name}`;if(typeof e.data==="string")return`:${e.name}(${e.data})`;return`:${e.name}(${f(e.data)})`;case"pseudo-element":return e.data===null?`::${e.name}`:`::${e.name}(${e.data})`;case"descendant":case"child":case"parent":case"sibling":case"adjacent":case"column-combinator":return D[e.type]??" "}return""}var K={equals:"=",element:"~=",start:"^=",end:"$=",any:"*=",not:"!=",hyphen:"|="};function N(e){if(e===null)return"";if(e==="")return"|";return`${v(e)}|`}var Q=/[^\w\u00B0-\uFFFF-]/g;function v(e){if(e==="")return"";return e.replace(Q,(a)=>`\\${a}`)}var V=new Set(["adjacent","child","descendant","parent","sibling","column-combinator"]);function x(e){return V.has(e.type)}var E={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};export{r,f,x,E,O};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{e,o,n}from"./chunk-8h5zg4ad.js";import{r}from"./chunk-b44sfqdn.js";import{c}from"./chunk-vbjv9wf0.js";var A={};c(A,{compressTree:()=>p,dedupeDeclarations:()=>u,minify:()=>h,minifyBlock:()=>a,removeComments:()=>s,specificity:()=>l,specificityToString:()=>S,syntax:()=>k});function s(i,t={}){let f=t.exclamation??!1,y=!1;n(i,(m,b,g)=>{if(m.type!=="Comment")return;let d=m.value.startsWith("!");if(f===!0&&d)return;if(f==="first-exclamation"&&d&&!y){y=!0;return}if(b&&g)g.remove(b)})}function u(i){n(i,(t)=>{if(t.type!=="Block"&&t.type!=="DeclarationList")return;if(!("children"in t)||!t.children)return;let f=t.children,y=f.head;if(y==null||y.next==null)return;let m=0;for(let d=y;d!=null;d=d.next)if(d.data.type==="Declaration"){if(m++,m>=2)break}if(m<2)return;let b=new Map,g=[];for(let d=y;d!=null;d=d.next){let x=d.data;if(x.type!=="Declaration")continue;let v=x.property,N=b.get(v);if(N){let z=!!N.decl.important,W=!!x.important;if(W||z===W)g.push(N.item),b.set(v,{item:d,decl:x});else g.push(d)}else b.set(v,{item:d,decl:x})}for(let d of g)f.remove(d)})}var G={black:"#000",fuchsia:"#f0f",white:"#fff",red:"#f00",cyan:"#0ff",blue:"#00f",yellow:"#ff0",magenta:"#f0f",lime:"#0f0",silver:"#c0c0c0",gray:"#808080",maroon:"#800000",olive:"#808000",green:"#008000",purple:"#800080",teal:"#008080",navy:"#000080"},U={"#f00":"red","#ff0000":"red","#000080":"navy","#008080":"teal"};function O(i){if(!i.startsWith("#"))return i;let t=i.slice(1);if(t.length===6){if(t[0]===t[1]&&t[2]===t[3]&&t[4]===t[5])return`#${t[0]}${t[2]}${t[4]}`}if(t.length===8){if(t[0]===t[1]&&t[2]===t[3]&&t[4]===t[5]&&t[6]===t[7])return`#${t[0]}${t[2]}${t[4]}${t[6]}`}return i}function R(i){let t=i.toLowerCase();return G[t]??null}function P(i){let t=i.toLowerCase();return U[t]??null}function X(i,t,f){let y=(i<<16|t<<8|f).toString(16).padStart(6,"0");return O(`#${y}`)}var j=/^rgba?\(\s*([+-]?\d*\.?\d+%?)\s*[,\s]\s*([+-]?\d*\.?\d+%?)\s*[,\s]\s*([+-]?\d*\.?\d+%?)\s*(?:[,/]\s*([+-]?\d*\.?\d+%?)\s*)?\)$/;function T(i){let t=j.exec(i.trim());if(!t)return i;let f=w(t[1]),y=w(t[2]),m=w(t[3]);if(t[4]!==void 0&&!V(t[4]))return i;return X(f,y,m)}function V(i){if(i.endsWith("%"))return Number.parseFloat(i)>=100;return Number.parseFloat(i)>=1}function w(i){if(i.endsWith("%"))return Math.max(0,Math.min(255,Math.round(Number.parseFloat(i)*2.55)));return Math.max(0,Math.min(255,Math.round(Number.parseFloat(i))))}var Z=new Set(["px","pt","pc","in","cm","mm","q","em","rem","ex","ch","cap","ic","lh","rlh","vw","vh","vi","vb","vmin","vmax","svw","svh","svi","svb","svmin","svmax","lvw","lvh","lvi","lvb","lvmin","lvmax","dvw","dvh","dvi","dvb","dvmin","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"]);function C(i){if(i.charCodeAt(0)===43)i=i.slice(1);if(i.includes(".")){let t=i.replace(/(\.\d*?)0+($|[eE])/,"$1$2");t=t.replace(/\.($|[eE])/,"$1"),i=t}if(i.startsWith("0.")&&i.length>2)i=i.slice(1);else if(i.startsWith("-0.")&&i.length>3)i=`-${i.slice(2)}`;if(i==="-0"||i==="-.0"||i==="-0.0")i="0";return i}function I(i,t){let f=C(i);if((f==="0"||f==="-0")&&Z.has(t.toLowerCase()))return{value:"0",unit:""};return{value:f,unit:t}}function H(i){return C(i)}function _(i,t){let f=Number.parseFloat(i);if(!Number.isFinite(f))return i;let y=t<0?0:t;return f.toFixed(y)}var D=new Set(["color","background","background-color","border","border-color","border-top","border-top-color","border-right","border-right-color","border-bottom","border-bottom-color","border-left","border-left-color","border-block","border-block-color","border-block-start-color","border-block-end-color","border-inline","border-inline-color","border-inline-start-color","border-inline-end-color","outline","outline-color","caret-color","fill","stroke","flood-color","lighting-color","stop-color","column-rule","column-rule-color","text-decoration","text-decoration-color","text-emphasis","text-emphasis-color","text-shadow","box-shadow","accent-color","scrollbar-color"]);function L(i){if(!i||i.type!=="Operator")return!1;let t=i.value;return t===":"||t===","||t==="/"}function J(i){let t=i.children;if(!t)return;while(t.head&&t.head.data.type==="WhiteSpace")t.remove(t.head);while(t.tail&&t.tail.data.type==="WhiteSpace")t.remove(t.tail);let f=t.head;while(f){let y=f.next;if(f.data.type==="WhiteSpace"){let m=f.prev&&L(f.prev.data),b=y&&L(y.data);if(m||b)t.remove(f)}f=y}}function p(i,t={}){let f=t.floatPrecision??null,y=f===null?null:(m)=>_(m,f);n(i,{enter(m,b,g){switch(m.type){case"Number":{let d=y?y(m.value):m.value;m.value=C(d);return}case"Percentage":{let d=y?y(m.value):m.value;m.value=H(d);return}case"Dimension":{let d=y?y(m.value):m.value,x=I(d,m.unit);m.value=x.value,m.unit=x.unit;return}case"Hash":{let d=O(`#${m.name}`).slice(1);if(m.name=d,b&&g&&this.declaration&&D.has(this.declaration.property.toLowerCase())){let x=P(`#${d}`);if(x&&x.length<d.length+1){let v={type:"Identifier",name:x,loc:m.loc};g.replace(b,g.createItem(v))}}return}case"Identifier":{if(!b||!g||!this.declaration)return;if(!D.has(this.declaration.property.toLowerCase()))return;let d=R(m.name);if(d&&d.length<m.name.length){let x={type:"Hash",name:d.slice(1),loc:m.loc};g.replace(b,g.createItem(x))}return}case"Url":return;case"Function":{let d=m.name.toLowerCase();if((d==="rgb"||d==="rgba")&&b&&g)m.__rgbReplaceCandidate=!0}}},leave(m,b,g){if(m.type==="Parentheses"||m.type==="Function"||m.type==="Value")J(m);if(m.type==="Function"&&m.__rgbReplaceCandidate&&b&&g){let d=e(m),x=T(d);if(x!==d&&x.startsWith("#")){let v={type:"Hash",name:x.slice(1),loc:m.loc};g.replace(b,g.createItem(v))}}}})}function h(i,t={}){let f=o(i,{context:"stylesheet"});return E(f,t)}function a(i,t={}){let f=o(i,{context:"declarationList"});return E(f,t)}function E(i,t){if(t.comments===!1)s(i,{exclamation:!1});else if(t.comments==="first-exclamation")s(i,{exclamation:"first-exclamation"});else s(i,{exclamation:!0});return p(i,{floatPrecision:t.floatPrecision??null}),u(i),{css:e(i),ast:i}}function l(i){let t=[0,0,0];if(typeof i==="string"){let f=r(i);return F(f,t),t}if(Array.isArray(i)){if(i.length===0)return t;if(Array.isArray(i[0]))F(i,t);else M(i,t);return t}return q(i,t),t}function q(i,t){switch(i.type){case"IdSelector":t[0]++;return;case"ClassSelector":case"AttributeSelector":t[1]++;return;case"TypeSelector":if(i.name!=="*")t[2]++;return;case"PseudoClassSelector":{let f=i.name.toLowerCase();if(f==="is"||f==="matches"||f==="-moz-any"||f==="-webkit-any"||f==="not"||f==="has"){if(i.children){let y=[];for(let b of i.children)if(b.type==="SelectorList"&&"children"in b&&b.children)for(let g of b.children)y.push(g);else if(b.type==="Selector")y.push(b);let m=[0,0,0];for(let b of y){let g=l(b);if(B(g,m)>0)m=g}t[0]+=m[0],t[1]+=m[1],t[2]+=m[2]}return}if(f==="where")return;t[1]++;return}case"PseudoElementSelector":t[2]++;return;case"Selector":case"SelectorList":case"AtrulePrelude":if("children"in i&&i.children)for(let f of i.children)q(f,t);return;case"NestingSelector":return}}function F(i,t){for(let f of i)M(f,t)}function M(i,t){for(let f of i)switch(f.type){case"tag":if(f.name!=="*")t[2]++;break;case"attribute":if(f.name==="id"&&f.action==="equals")t[0]++;else t[1]++;break;case"pseudo":{let y=f.name.toLowerCase();if(y==="is"||y==="matches"||y==="not"||y==="has"||y==="-moz-any"||y==="-webkit-any"){if(Array.isArray(f.data)){let m=[0,0,0];for(let b of f.data){let g=[0,0,0];if(M(b,g),B(g,m)>0)m=g}t[0]+=m[0],t[1]+=m[1],t[2]+=m[2]}break}if(y==="where")break;t[1]++;break}case"pseudo-element":t[2]++;break}}function B(i,t){for(let f=0;f<3;f++)if(i[f]!==t[f])return i[f]-t[f];return 0}function S(i){return i.join(",")}var k={specificity:l};
3
- export{s,u,p,h,a,l,S,k,A};
2
+ import{e,o,n}from"./chunk-8h5zg4ad.js";import{r}from"./chunk-dbj97h19.js";import{c}from"./chunk-vbjv9wf0.js";var A={};c(A,{compressTree:()=>p,dedupeDeclarations:()=>u,minify:()=>h,minifyBlock:()=>a,removeComments:()=>s,specificity:()=>l,specificityToString:()=>S,syntax:()=>w});function s(i,t={}){let f=t.exclamation??!1,y=!1;n(i,(m,b,g)=>{if(m.type!=="Comment")return;let d=m.value.startsWith("!");if(f===!0&&d)return;if(f==="first-exclamation"&&d&&!y){y=!0;return}if(b&&g)g.remove(b)})}function u(i){n(i,(t)=>{if(t.type!=="Block"&&t.type!=="DeclarationList")return;if(!("children"in t)||!t.children)return;let f=t.children,y=f.head;if(y==null||y.next==null)return;let m=0;for(let d=y;d!=null;d=d.next)if(d.data.type==="Declaration"){if(m++,m>=2)break}if(m<2)return;let b=new Map,g=[];for(let d=y;d!=null;d=d.next){let x=d.data;if(x.type!=="Declaration")continue;let v=x.property,N=b.get(v);if(N){let z=!!N.decl.important,W=!!x.important;if(W||z===W)g.push(N.item),b.set(v,{item:d,decl:x});else g.push(d)}else b.set(v,{item:d,decl:x})}for(let d of g)f.remove(d)})}var G={black:"#000",fuchsia:"#f0f",white:"#fff",red:"#f00",cyan:"#0ff",blue:"#00f",yellow:"#ff0",magenta:"#f0f",lime:"#0f0",silver:"#c0c0c0",gray:"#808080",maroon:"#800000",olive:"#808000",green:"#008000",purple:"#800080",teal:"#008080",navy:"#000080"},U={"#f00":"red","#ff0000":"red","#000080":"navy","#008080":"teal"};function O(i){if(!i.startsWith("#"))return i;let t=i.slice(1);if(t.length===6){if(t[0]===t[1]&&t[2]===t[3]&&t[4]===t[5])return`#${t[0]}${t[2]}${t[4]}`}if(t.length===8){if(t[0]===t[1]&&t[2]===t[3]&&t[4]===t[5]&&t[6]===t[7])return`#${t[0]}${t[2]}${t[4]}${t[6]}`}return i}function R(i){let t=i.toLowerCase();return G[t]??null}function P(i){let t=i.toLowerCase();return U[t]??null}function X(i,t,f){let y=(i<<16|t<<8|f).toString(16).padStart(6,"0");return O(`#${y}`)}var j=/^rgba?\(\s*([+-]?\d*\.?\d+%?)\s*[,\s]\s*([+-]?\d*\.?\d+%?)\s*[,\s]\s*([+-]?\d*\.?\d+%?)\s*(?:[,/]\s*([+-]?\d*\.?\d+%?)\s*)?\)$/;function T(i){let t=j.exec(i.trim());if(!t)return i;let f=k(t[1]),y=k(t[2]),m=k(t[3]);if(t[4]!==void 0&&!V(t[4]))return i;return X(f,y,m)}function V(i){if(i.endsWith("%"))return Number.parseFloat(i)>=100;return Number.parseFloat(i)>=1}function k(i){if(i.endsWith("%"))return Math.max(0,Math.min(255,Math.round(Number.parseFloat(i)*2.55)));return Math.max(0,Math.min(255,Math.round(Number.parseFloat(i))))}var Z=new Set(["px","pt","pc","in","cm","mm","q","em","rem","ex","ch","cap","ic","lh","rlh","vw","vh","vi","vb","vmin","vmax","svw","svh","svi","svb","svmin","svmax","lvw","lvh","lvi","lvb","lvmin","lvmax","dvw","dvh","dvi","dvb","dvmin","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"]);function C(i){if(i.charCodeAt(0)===43)i=i.slice(1);if(i.includes(".")){let t=i.replace(/(\.\d*?)0+($|[eE])/,"$1$2");t=t.replace(/\.($|[eE])/,"$1"),i=t}if(i.startsWith("0.")&&i.length>2)i=i.slice(1);else if(i.startsWith("-0.")&&i.length>3)i=`-${i.slice(2)}`;if(i==="-0"||i==="-.0"||i==="-0.0")i="0";return i}function I(i,t){let f=C(i);if((f==="0"||f==="-0")&&Z.has(t.toLowerCase()))return{value:"0",unit:""};return{value:f,unit:t}}function H(i){return C(i)}function _(i,t){let f=Number.parseFloat(i);if(!Number.isFinite(f))return i;let y=t<0?0:t;return f.toFixed(y)}var D=new Set(["color","background","background-color","border","border-color","border-top","border-top-color","border-right","border-right-color","border-bottom","border-bottom-color","border-left","border-left-color","border-block","border-block-color","border-block-start-color","border-block-end-color","border-inline","border-inline-color","border-inline-start-color","border-inline-end-color","outline","outline-color","caret-color","fill","stroke","flood-color","lighting-color","stop-color","column-rule","column-rule-color","text-decoration","text-decoration-color","text-emphasis","text-emphasis-color","text-shadow","box-shadow","accent-color","scrollbar-color"]);function L(i){if(!i||i.type!=="Operator")return!1;let t=i.value;return t===":"||t===","||t==="/"}function J(i){let t=i.children;if(!t)return;while(t.head&&t.head.data.type==="WhiteSpace")t.remove(t.head);while(t.tail&&t.tail.data.type==="WhiteSpace")t.remove(t.tail);let f=t.head;while(f){let y=f.next;if(f.data.type==="WhiteSpace"){let m=f.prev&&L(f.prev.data),b=y&&L(y.data);if(m||b)t.remove(f)}f=y}}function p(i,t={}){let f=t.floatPrecision??null,y=f===null?null:(m)=>_(m,f);n(i,{enter(m,b,g){switch(m.type){case"Number":{let d=y?y(m.value):m.value;m.value=C(d);return}case"Percentage":{let d=y?y(m.value):m.value;m.value=H(d);return}case"Dimension":{let d=y?y(m.value):m.value,x=I(d,m.unit);m.value=x.value,m.unit=x.unit;return}case"Hash":{let d=O(`#${m.name}`).slice(1);if(m.name=d,b&&g&&this.declaration&&D.has(this.declaration.property.toLowerCase())){let x=P(`#${d}`);if(x&&x.length<d.length+1){let v={type:"Identifier",name:x,loc:m.loc};g.replace(b,g.createItem(v))}}return}case"Identifier":{if(!b||!g||!this.declaration)return;if(!D.has(this.declaration.property.toLowerCase()))return;let d=R(m.name);if(d&&d.length<m.name.length){let x={type:"Hash",name:d.slice(1),loc:m.loc};g.replace(b,g.createItem(x))}return}case"Url":return;case"Function":{let d=m.name.toLowerCase();if((d==="rgb"||d==="rgba")&&b&&g)m.__rgbReplaceCandidate=!0}}},leave(m,b,g){if(m.type==="Parentheses"||m.type==="Function"||m.type==="Value")J(m);if(m.type==="Function"&&m.__rgbReplaceCandidate&&b&&g){let d=e(m),x=T(d);if(x!==d&&x.startsWith("#")){let v={type:"Hash",name:x.slice(1),loc:m.loc};g.replace(b,g.createItem(v))}}}})}function h(i,t={}){let f=o(i,{context:"stylesheet"});return E(f,t)}function a(i,t={}){let f=o(i,{context:"declarationList"});return E(f,t)}function E(i,t){if(t.comments===!1)s(i,{exclamation:!1});else if(t.comments==="first-exclamation")s(i,{exclamation:"first-exclamation"});else s(i,{exclamation:!0});return p(i,{floatPrecision:t.floatPrecision??null}),u(i),{css:e(i),ast:i}}function l(i){let t=[0,0,0];if(typeof i==="string"){let f=r(i);return F(f,t),t}if(Array.isArray(i)){if(i.length===0)return t;if(Array.isArray(i[0]))F(i,t);else M(i,t);return t}return q(i,t),t}function q(i,t){switch(i.type){case"IdSelector":t[0]++;return;case"ClassSelector":case"AttributeSelector":t[1]++;return;case"TypeSelector":if(i.name!=="*")t[2]++;return;case"PseudoClassSelector":{let f=i.name.toLowerCase();if(f==="is"||f==="matches"||f==="-moz-any"||f==="-webkit-any"||f==="not"||f==="has"){if(i.children){let y=[];for(let b of i.children)if(b.type==="SelectorList"&&"children"in b&&b.children)for(let g of b.children)y.push(g);else if(b.type==="Selector")y.push(b);let m=[0,0,0];for(let b of y){let g=l(b);if(B(g,m)>0)m=g}t[0]+=m[0],t[1]+=m[1],t[2]+=m[2]}return}if(f==="where")return;t[1]++;return}case"PseudoElementSelector":t[2]++;return;case"Selector":case"SelectorList":case"AtrulePrelude":if("children"in i&&i.children)for(let f of i.children)q(f,t);return;case"NestingSelector":return}}function F(i,t){for(let f of i)M(f,t)}function M(i,t){for(let f of i)switch(f.type){case"tag":if(f.name!=="*")t[2]++;break;case"attribute":if(f.name==="id"&&f.action==="equals")t[0]++;else t[1]++;break;case"pseudo":{let y=f.name.toLowerCase();if(y==="is"||y==="matches"||y==="not"||y==="has"||y==="-moz-any"||y==="-webkit-any"){if(Array.isArray(f.data)){let m=[0,0,0];for(let b of f.data){let g=[0,0,0];if(M(b,g),B(g,m)>0)m=g}t[0]+=m[0],t[1]+=m[1],t[2]+=m[2]}break}if(y==="where")break;t[1]++;break}case"pseudo-element":t[2]++;break}}function B(i,t){for(let f=0;f<3;f++)if(i[f]!==t[f])return i[f]-t[f];return 0}function S(i){return i.join(",")}var w={specificity:l};
3
+ export{s,u,p,h,a,l,S,w,A};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{r}from"./chunk-b44sfqdn.js";import{c}from"./chunk-vbjv9wf0.js";var C={};c(C,{clearSelectorCache:()=>O,compile:()=>g,is:()=>w,parseAndCompile:()=>i,selectAll:()=>v,selectOne:()=>R});function x(u,o,t,l){let a=[],d=[o],n=[0];for(;;){if(n[0]>=d[0].length){if(d.length===1)return a;d.shift(),n.shift();continue}let e=d[0][n[0]++];if(!t.isTag(e))continue;if(u(e))a.push(e);if(l||t.getName(e)!=="template"){let s=t.getChildren(e);if(s.length>0)d.unshift(s),n.unshift(0)}}}function L(u,o,t,l){let a=[o],d=[0];for(;;){if(d[0]>=a[0].length){if(a.length===1)return null;a.shift(),d.shift();continue}let n=a[0][d[0]++];if(!t.isTag(n))continue;if(u(n))return n;if(l||t.getName(n)!=="template"){let e=t.getChildren(n);if(e.length>0)a.unshift(e),d.unshift(0)}}}function Q(u,o){if(Array.isArray(u))return o.removeSubsets(u);return o.getChildren(u)}var y=(u)=>!0;function V(u){return u===32||u===9||u===10||u===12||u===13}function h(u,o){let t=o.length,l=u.length;if(t===0||t>l)return!1;let a=u.indexOf(o);while(a>=0){let d=a===0||V(u.charCodeAt(a-1)),n=a+t,e=n===l||V(u.charCodeAt(n));if(d&&e)return!0;a=u.indexOf(o,a+1)}return!1}function q(u,o,t){if(o.ignoreCase===!0)return!0;if(o.ignoreCase===!1)return!1;if(o.ignoreCase==="quirks")return!t.xmlMode;return!1}function P(u,o,t){let l=o.adapter,{action:a,name:d,value:n}=u,e=q(n,u,o);if(e)n=n.toLowerCase();return D(a,d,n,e,l,t)}function D(u,o,t,l,a,d){let n=d===y;switch(u){case"exists":if(n)return(e)=>a.hasAttrib(e,o);return(e)=>a.hasAttrib(e,o)&&d(e);case"equals":if(!l){if(n)return(e)=>a.getAttributeValue(e,o)===t;return(e)=>a.getAttributeValue(e,o)===t&&d(e)}if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase()===t};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase()===t&&d(e)};case"not":return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return d(e);return(l?s.toLowerCase():s)!==t&&d(e)};case"start":if(t==="")return()=>!1;if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).startsWith(t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).startsWith(t)&&d(e)};case"end":if(t==="")return()=>!1;if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).endsWith(t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).endsWith(t)&&d(e)};case"any":{if(t==="")return()=>!1;if(l){if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase().indexOf(t)>=0};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase().indexOf(t)>=0&&d(e)}}if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.indexOf(t)>=0};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.indexOf(t)>=0&&d(e)}}case"element":{if(t===""||/\s/.test(t))return()=>!1;if(l){if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s.toLowerCase(),t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s.toLowerCase(),t)&&d(e)}}if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s,t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s,t)&&d(e)}}case"hyphen":if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;let f=l?s.toLowerCase():s;if(f===t)return!0;if(f.startsWith(t)&&f.charAt(t.length)==="-")return!0;return!1};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;let f=l?s.toLowerCase():s;if(f===t)return d(e);if(f.startsWith(t)&&f.charAt(t.length)==="-")return d(e);return!1}}return(e)=>!1}var k=new Set(["link","any-link","visited","hover","active","focus","focus-visible","focus-within","target","target-within","enabled","disabled","checked","required","optional","valid","invalid","selected","placeholder-shown","read-only","read-write","in-range","out-of-range","default","indeterminate"]),G=new Set(["is","where","matches","-moz-any","-webkit-any"]),I=new Set(["nth-child","nth-last-child","nth-of-type","nth-last-of-type"]);function W(u,o,t){let l=o.adapter,{name:a,data:d}=u;if(u.type==="pseudo"&&G.has(a)){if(!Array.isArray(d))return t;let n=d.map((e)=>i(e,o));if(n.length===1){let e=n[0];return(s)=>e(s)&&t(s)}return(e)=>{for(let s of n)if(s(e))return t(e);return!1}}if(u.type==="pseudo"&&a==="not"){if(!Array.isArray(d))return t;let n=d.map((e)=>i(e,o));if(n.length===1){let e=n[0];return(s)=>!e(s)&&t(s)}return(e)=>{for(let s of n)if(s(e))return!1;return t(e)}}if(u.type==="pseudo"&&a==="has"){if(!Array.isArray(d))return t;let n=d.map((s)=>i(s,o)),e=n.length===1?n[0]:(s)=>{for(let f of n)if(f(s))return!0;return!1};return(s)=>{let f=l.getChildren(s).slice();while(f.length>0){let m=f.pop();if(!l.isTag(m))continue;if(e(m))return t(s);let p=l.getChildren(m);for(let N=0;N<p.length;N++)f.push(p[N])}return!1}}if(u.type==="pseudo"&&I.has(a)){let n=F(typeof d==="string"?d:"",a,o);return(e)=>n(e)&&t(e)}if(u.type==="pseudo"&&a==="first-child")return(n)=>{let e=l.getSiblings(n);for(let s of e){if(!l.isTag(s))continue;return s===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="last-child")return(n)=>{let e=l.getSiblings(n);for(let s=e.length-1;s>=0;s--){let f=e[s];if(!l.isTag(f))continue;return f===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="first-of-type")return(n)=>{let e=l.getName(n),s=l.getSiblings(n);for(let f of s){if(!l.isTag(f)||l.getName(f)!==e)continue;return f===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="last-of-type")return(n)=>{let e=l.getName(n),s=l.getSiblings(n);for(let f=s.length-1;f>=0;f--){let m=s[f];if(!l.isTag(m)||l.getName(m)!==e)continue;return m===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="only-child")return(n)=>{let e=l.getSiblings(n),s=0,f=!1;for(let m of e){if(!l.isTag(m))continue;if(s++,s>1)return!1;if(m===n)f=!0}return s===1&&f&&t(n)};if(u.type==="pseudo"&&a==="only-of-type")return(n)=>{let e=l.getName(n),s=l.getSiblings(n),f=0,m=!1;for(let p of s){if(!l.isTag(p)||l.getName(p)!==e)continue;if(f++,f>1)return!1;if(p===n)m=!0}return f===1&&m&&t(n)};if(u.type==="pseudo"&&a==="empty")return(n)=>l.getChildren(n).length===0&&t(n);if(u.type==="pseudo"&&a==="root")return(n)=>{let e=l.getParent(n);return(e==null||!l.isTag(e))&&t(n)};if(u.type==="pseudo"&&a==="scope"){if(o.context&&Array.isArray(o.context)){let n=new Set(o.context);return(e)=>n.has(e)&&t(e)}if(o.context){let n=o.context;return(e)=>e===n&&t(e)}return(n)=>{let e=l.getParent(n);return(e==null||!l.isTag(e))&&t(n)}}if(u.type==="pseudo"&&k.has(a)){if(o.pseudos&&o.pseudos[a]){let n=o.pseudos[a];if(typeof n==="function")return(e)=>n(e,void 0)&&t(e)}return(n)=>!1}if(u.type==="pseudo-element")return t;if(o.pseudos&&o.pseudos[a]){let n=o.pseudos[a];if(typeof n==="function")return(e)=>n(e,typeof d==="string"?d:void 0)&&t(e);if(typeof n==="string"){let e=r(n),s=b(e,o);return(f)=>s(f)&&t(f)}}return(n)=>!1}function Y(u){let o=u.trim();if(o==="odd")return{a:2,b:1};if(o==="even")return{a:2,b:0};let t=/^([+-]?\d*)n([+-]\d+)?$/.exec(o.replace(/\s+/g,""));if(t){let a=t[1]===""||t[1]==="+"?1:t[1]==="-"?-1:Number(t[1]),d=t[2]?Number(t[2]):0;return{a,b:d}}let l=Number(o);if(!Number.isNaN(l))return{a:0,b:l};return null}function F(u,o,t){let l=Y(u);if(!l)return()=>!1;let{a,b:d}=l,n=t.adapter,e=o==="nth-of-type"||o==="nth-last-of-type",s=o==="nth-last-child"||o==="nth-last-of-type";return(f)=>{let m=n.getSiblings(f),p=e?n.getName(f):"",N=0,A=0;for(let T of m){if(!n.isTag(T))continue;if(e&&n.getName(T)!==p)continue;if(A++,T===f)N=A}if(N===0)return!1;let S=s?A-N+1:N;if(a===0)return S===d;return(S-d)/a>=0&&(S-d)%a===0}}function M(u,o,t){let l=o.adapter,a=t===y;switch(u.type){case"tag":{let d=o.lowerCaseTags!==!1&&!o.xmlMode?u.name.toLowerCase():u.name;if(a)return(n)=>l.getName(n)===d;return(n)=>l.getName(n)===d&&t(n)}case"universal":return t;case"attribute":return P(u,o,t);case"pseudo":case"pseudo-element":return W(u,o,t);case"descendant":case"child":case"parent":case"sibling":case"adjacent":case"column-combinator":return t}return(d)=>!1}var B={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0},z={exists:10,equals:8,not:7,start:6,end:6,hyphen:5,any:4,element:3};function U(u){let o=B[u.type]??0;if(u.type==="attribute")return o+(z[u.action]??0);return o}function b(u,o){if(u.length===1)return i(u[0],o);let t=u.map((l)=>i(l,o));return(l)=>t.some((a)=>a(l))}function i(u,o){let t=o.adapter,l=[[]],a=[];for(let n of u)if(n.type==="descendant"||n.type==="child"||n.type==="sibling"||n.type==="adjacent"||n.type==="parent"||n.type==="column-combinator")a.push(n),l.push([]);else l[l.length-1].push(n);let d=y;for(let n=0;n<l.length;n++){let e=l[n].slice().sort((s,f)=>U(s)-U(f));for(let s of e)d=M(s,o,d);if(n<a.length)d=H(a[n],d,t)}return d}function H(u,o,t){switch(u.type){case"descendant":case"column-combinator":return(l)=>{let a=t.getParent(l);while(a){if(t.isTag(a)&&o(a))return!0;a=t.getParent(a)}return!1};case"child":return(l)=>{let a=t.getParent(l);return a!=null&&t.isTag(a)&&o(a)};case"sibling":return(l)=>{let a=t.getSiblings(l);for(let d of a){if(d===l)return!1;if(t.isTag(d)&&o(d))return!0}return!1};case"adjacent":return(l)=>{let a=t.getSiblings(l),d=null;for(let n of a){if(n===l)return d!=null&&t.isTag(d)&&o(d);d=n}return!1};case"parent":return(l)=>t.existsOne(o,t.getChildren(l))}return(l)=>!1}function j(u){if(!u||!u.adapter)throw Error("css-select: adapter is required");return u.adapter}var E=new WeakMap;function J(u){return(u.xmlMode?1:0)<<0|(u.lowerCaseAttributeNames===!1?1:0)<<1|(u.lowerCaseTags===!1?1:0)<<2}function K(u,o){let t=E.get(u);if(!t)t=[],E.set(u,t);let l=t[o];if(!l)l=new Map,t[o]=l;return l}function _(u,o){let t=r(u,{xmlMode:o.xmlMode,lowerCaseAttributeNames:o.lowerCaseAttributeNames,lowerCaseTags:o.lowerCaseTags});return b(t,o)}function g(u,o){if(typeof u!=="string")return b(u,o);if(o.cacheResults===!1||!o.adapter)return _(u,o);let t=K(o.adapter,J(o)),l=t.get(u);if(l!==void 0)return l;return l=_(u,o),t.set(u,l),l}function O(u,o){if(o===void 0){E.delete(u);return}let t=E.get(u);if(!t)return;for(let l of t)if(l)l.delete(o)}function v(u,o,t){let l=j(t),a=typeof u==="function"?u:g(u,t),d=Q(o,l);return x(a,d,l,t.xmlMode===!0)}function R(u,o,t){let l=j(t),a=typeof u==="function"?u:g(u,t),d=Q(o,l);return L(a,d,l,t.xmlMode===!0)}function w(u,o,t){return(typeof o==="function"?o:g(o,t))(u)}export{i,g,O,v,R,w,C};
2
+ import{r}from"./chunk-dbj97h19.js";import{c}from"./chunk-vbjv9wf0.js";var C={};c(C,{clearSelectorCache:()=>P,compile:()=>g,is:()=>k,parseAndCompile:()=>i,selectAll:()=>v,selectOne:()=>R});function O(u,o,t,l){let a=[],d=[o],n=[0];for(;;){if(n[0]>=d[0].length){if(d.length===1)return a;d.shift(),n.shift();continue}let e=d[0][n[0]++];if(!t.isTag(e))continue;if(u(e))a.push(e);if(l||t.getName(e)!=="template"){let s=t.getChildren(e);if(s.length>0)d.unshift(s),n.unshift(0)}}}function Q(u,o,t,l){let a=[o],d=[0];for(;;){if(d[0]>=a[0].length){if(a.length===1)return null;a.shift(),d.shift();continue}let n=a[0][d[0]++];if(!t.isTag(n))continue;if(u(n))return n;if(l||t.getName(n)!=="template"){let e=t.getChildren(n);if(e.length>0)a.unshift(e),d.unshift(0)}}}function T(u,o){if(Array.isArray(u))return o.removeSubsets(u);return o.getChildren(u)}var y=(u)=>!0;function x(u){return u===32||u===9||u===10||u===12||u===13}function h(u,o){let t=o.length,l=u.length;if(t===0||t>l)return!1;let a=u.indexOf(o);while(a>=0){let d=a===0||x(u.charCodeAt(a-1)),n=a+t,e=n===l||x(u.charCodeAt(n));if(d&&e)return!0;a=u.indexOf(o,a+1)}return!1}function j(u,o,t){if(o.ignoreCase===!0)return!0;if(o.ignoreCase===!1)return!1;if(o.ignoreCase==="quirks")return!t.xmlMode;return!1}function L(u,o,t){let l=o.adapter,{action:a,name:d,value:n}=u,e=j(n,u,o);if(e)n=n.toLowerCase();return q(a,d,n,e,l,t)}function q(u,o,t,l,a,d){let n=d===y;switch(u){case"exists":if(n)return(e)=>a.hasAttrib(e,o);return(e)=>a.hasAttrib(e,o)&&d(e);case"equals":if(!l){if(n)return(e)=>a.getAttributeValue(e,o)===t;return(e)=>a.getAttributeValue(e,o)===t&&d(e)}if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase()===t};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase()===t&&d(e)};case"not":return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return d(e);return(l?s.toLowerCase():s)!==t&&d(e)};case"start":if(t==="")return()=>!1;if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).startsWith(t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).startsWith(t)&&d(e)};case"end":if(t==="")return()=>!1;if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).endsWith(t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return(l?s.toLowerCase():s).endsWith(t)&&d(e)};case"any":{if(t==="")return()=>!1;if(l){if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase().indexOf(t)>=0};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.toLowerCase().indexOf(t)>=0&&d(e)}}if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.indexOf(t)>=0};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return s.indexOf(t)>=0&&d(e)}}case"element":{if(t===""||/\s/.test(t))return()=>!1;if(l){if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s.toLowerCase(),t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s.toLowerCase(),t)&&d(e)}}if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s,t)};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;return h(s,t)&&d(e)}}case"hyphen":if(n)return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;let f=l?s.toLowerCase():s;if(f===t)return!0;if(f.startsWith(t)&&f.charAt(t.length)==="-")return!0;return!1};return(e)=>{let s=a.getAttributeValue(e,o);if(s==null)return!1;let f=l?s.toLowerCase():s;if(f===t)return d(e);if(f.startsWith(t)&&f.charAt(t.length)==="-")return d(e);return!1}}return(e)=>!1}var D=new Set(["link","any-link","visited","hover","active","focus","focus-visible","focus-within","target","target-within","enabled","disabled","checked","required","optional","valid","invalid","selected","placeholder-shown","read-only","read-write","in-range","out-of-range","default","indeterminate"]),G=new Set(["is","where","matches","-moz-any","-webkit-any"]),I=new Set(["nth-child","nth-last-child","nth-of-type","nth-last-of-type"]);function V(u,o,t){let l=o.adapter,{name:a,data:d}=u;if(u.type==="pseudo"&&G.has(a)){if(!Array.isArray(d))return t;let n=d.map((e)=>i(e,o));if(n.length===1){let e=n[0];return(s)=>e(s)&&t(s)}return(e)=>{for(let s of n)if(s(e))return t(e);return!1}}if(u.type==="pseudo"&&a==="not"){if(!Array.isArray(d))return t;let n=d.map((e)=>i(e,o));if(n.length===1){let e=n[0];return(s)=>!e(s)&&t(s)}return(e)=>{for(let s of n)if(s(e))return!1;return t(e)}}if(u.type==="pseudo"&&a==="has"){if(!Array.isArray(d))return t;let n=d.map((s)=>i(s,o)),e=n.length===1?n[0]:(s)=>{for(let f of n)if(f(s))return!0;return!1};return(s)=>{let f=l.getChildren(s).slice();while(f.length>0){let m=f.pop();if(!l.isTag(m))continue;if(e(m))return t(s);let p=l.getChildren(m);for(let N=0;N<p.length;N++)f.push(p[N])}return!1}}if(u.type==="pseudo"&&I.has(a)){let n=F(typeof d==="string"?d:"",a,o);return(e)=>n(e)&&t(e)}if(u.type==="pseudo"&&a==="first-child")return(n)=>{let e=l.getSiblings(n);for(let s of e){if(!l.isTag(s))continue;return s===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="last-child")return(n)=>{let e=l.getSiblings(n);for(let s=e.length-1;s>=0;s--){let f=e[s];if(!l.isTag(f))continue;return f===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="first-of-type")return(n)=>{let e=l.getName(n),s=l.getSiblings(n);for(let f of s){if(!l.isTag(f)||l.getName(f)!==e)continue;return f===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="last-of-type")return(n)=>{let e=l.getName(n),s=l.getSiblings(n);for(let f=s.length-1;f>=0;f--){let m=s[f];if(!l.isTag(m)||l.getName(m)!==e)continue;return m===n&&t(n)}return!1};if(u.type==="pseudo"&&a==="only-child")return(n)=>{let e=l.getSiblings(n),s=0,f=!1;for(let m of e){if(!l.isTag(m))continue;if(s++,s>1)return!1;if(m===n)f=!0}return s===1&&f&&t(n)};if(u.type==="pseudo"&&a==="only-of-type")return(n)=>{let e=l.getName(n),s=l.getSiblings(n),f=0,m=!1;for(let p of s){if(!l.isTag(p)||l.getName(p)!==e)continue;if(f++,f>1)return!1;if(p===n)m=!0}return f===1&&m&&t(n)};if(u.type==="pseudo"&&a==="empty")return(n)=>l.getChildren(n).length===0&&t(n);if(u.type==="pseudo"&&a==="root")return(n)=>{let e=l.getParent(n);return(e==null||!l.isTag(e))&&t(n)};if(u.type==="pseudo"&&a==="scope"){if(o.context&&Array.isArray(o.context)){let n=new Set(o.context);return(e)=>n.has(e)&&t(e)}if(o.context){let n=o.context;return(e)=>e===n&&t(e)}return(n)=>{let e=l.getParent(n);return(e==null||!l.isTag(e))&&t(n)}}if(u.type==="pseudo"&&D.has(a)){if(o.pseudos&&o.pseudos[a]){let n=o.pseudos[a];if(typeof n==="function")return(e)=>n(e,void 0)&&t(e)}return(n)=>!1}if(u.type==="pseudo-element")return t;if(o.pseudos&&o.pseudos[a]){let n=o.pseudos[a];if(typeof n==="function")return(e)=>n(e,typeof d==="string"?d:void 0)&&t(e);if(typeof n==="string"){let e=r(n),s=b(e,o);return(f)=>s(f)&&t(f)}}return(n)=>!1}function Y(u){let o=u.trim();if(o==="odd")return{a:2,b:1};if(o==="even")return{a:2,b:0};let t=/^([+-]?\d*)n([+-]\d+)?$/.exec(o.replace(/\s+/g,""));if(t){let a=t[1]===""||t[1]==="+"?1:t[1]==="-"?-1:Number(t[1]),d=t[2]?Number(t[2]):0;return{a,b:d}}let l=Number(o);if(!Number.isNaN(l))return{a:0,b:l};return null}function F(u,o,t){let l=Y(u);if(!l)return()=>!1;let{a,b:d}=l,n=t.adapter,e=o==="nth-of-type"||o==="nth-last-of-type",s=o==="nth-last-child"||o==="nth-last-of-type";return(f)=>{let m=n.getSiblings(f),p=e?n.getName(f):"",N=0,A=0;for(let w of m){if(!n.isTag(w))continue;if(e&&n.getName(w)!==p)continue;if(A++,w===f)N=A}if(N===0)return!1;let S=s?A-N+1:N;if(a===0)return S===d;return(S-d)/a>=0&&(S-d)%a===0}}function W(u,o,t){let l=o.adapter,a=t===y;switch(u.type){case"tag":{let d=o.lowerCaseTags!==!1&&!o.xmlMode?u.name.toLowerCase():u.name;if(a)return(n)=>l.getName(n)===d;return(n)=>l.getName(n)===d&&t(n)}case"universal":return t;case"attribute":return L(u,o,t);case"pseudo":case"pseudo-element":return V(u,o,t);case"descendant":case"child":case"parent":case"sibling":case"adjacent":case"column-combinator":return t}return(d)=>!1}var B={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0},z={exists:10,equals:8,not:7,start:6,end:6,hyphen:5,any:4,element:3};function M(u){let o=B[u.type]??0;if(u.type==="attribute")return o+(z[u.action]??0);return o}function b(u,o){if(u.length===1)return i(u[0],o);let t=u.map((l)=>i(l,o));return(l)=>t.some((a)=>a(l))}function i(u,o){let t=o.adapter,l=[[]],a=[];for(let n of u)if(n.type==="descendant"||n.type==="child"||n.type==="sibling"||n.type==="adjacent"||n.type==="parent"||n.type==="column-combinator")a.push(n),l.push([]);else l[l.length-1].push(n);let d=y;for(let n=0;n<l.length;n++){let e=l[n].slice().sort((s,f)=>M(s)-M(f));for(let s of e)d=W(s,o,d);if(n<a.length)d=H(a[n],d,t)}return d}function H(u,o,t){switch(u.type){case"descendant":case"column-combinator":return(l)=>{let a=t.getParent(l);while(a){if(t.isTag(a)&&o(a))return!0;a=t.getParent(a)}return!1};case"child":return(l)=>{let a=t.getParent(l);return a!=null&&t.isTag(a)&&o(a)};case"sibling":return(l)=>{let a=t.getSiblings(l);for(let d of a){if(d===l)return!1;if(t.isTag(d)&&o(d))return!0}return!1};case"adjacent":return(l)=>{let a=t.getSiblings(l),d=null;for(let n of a){if(n===l)return d!=null&&t.isTag(d)&&o(d);d=n}return!1};case"parent":return(l)=>t.existsOne(o,t.getChildren(l))}return(l)=>!1}function _(u){if(!u||!u.adapter)throw Error("css-select: adapter is required");return u.adapter}var E=new WeakMap;function J(u){return(u.xmlMode?1:0)<<0|(u.lowerCaseAttributeNames===!1?1:0)<<1|(u.lowerCaseTags===!1?1:0)<<2}function K(u,o){let t=E.get(u);if(!t)t=[],E.set(u,t);let l=t[o];if(!l)l=new Map,t[o]=l;return l}function U(u,o){let t=r(u,{xmlMode:o.xmlMode,lowerCaseAttributeNames:o.lowerCaseAttributeNames,lowerCaseTags:o.lowerCaseTags});return b(t,o)}function g(u,o){if(typeof u!=="string")return b(u,o);if(o.cacheResults===!1||!o.adapter)return U(u,o);let t=K(o.adapter,J(o)),l=t.get(u);if(l!==void 0)return l;return l=U(u,o),t.set(u,l),l}function P(u,o){if(o===void 0){E.delete(u);return}let t=E.get(u);if(!t)return;for(let l of t)if(l)l.delete(o)}function v(u,o,t){let l=_(t),a=typeof u==="function"?u:g(u,t),d=T(o,l);return O(a,d,l,t.xmlMode===!0)}function R(u,o,t){let l=_(t),a=typeof u==="function"?u:g(u,t),d=T(o,l);return Q(a,d,l,t.xmlMode===!0)}function k(u,o,t){return(typeof o==="function"?o:g(o,t))(u)}export{i,g,P,v,R,k,C};
@@ -6,7 +6,10 @@ export * from './plugin';
6
6
  export * from './preflight';
7
7
  export * from './preflight-forms';
8
8
  export * from './rules';
9
+ export * from './rules-mask';
10
+ export * from './rules-shadow';
9
11
  export * from './scanner';
12
+ export * from './shadow-layers';
10
13
  export * from './style/index';
11
14
  export * from './style/collect';
12
15
  export * from './style/plugin';