@master/css 2.0.0-beta.133 → 2.0.0-beta.135

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 +1 @@
1
- import{START_SYMBOL as b}from"../constants/start-symbol.mjs";import{BOX_UNDERNEATH as g}from"../constants/box-underneath.mjs";import{CONTENT_EXTREMA as f}from"../constants/content-extrema.mjs";import{SIZING_VALUES as v}from"../constants/sizing-values.mjs";import{cssEscape as C}from"../utils/css-escape.mjs";var S={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},r=(i,a)=>{let n=a.indexOf(":");if(n!==-1){i in t||(t[i]={});let d=t[i],h=a.slice(0,n);h in d||(d[h]=a.slice(n+1))}},s=i=>{let a=(n,d)=>{let h=d.slice(C(i.className).length).match(/\{(.*)\}/)[1].split(";");for(let w of h)r(n,w)};if(this.theme){let n=i.natives.find(d=>d.theme===this.theme)??i.natives.find(d=>!d.theme);n&&a(this.theme,n.text)}else for(let n of i.natives)a(n.theme,n.text)},l=[],o="",c=()=>{o&&(l.push(o.replace(/ /g,"")),o="")},m=1;(function i(a){for(;m<e.length;m++){let n=e[m];if(!a){if(n===";"){c();continue}if(n==="}")break}if(o+=n,a===n){if(a==="'"||a==='"'){let d=0;for(let h=o.length-2;o[h]==="\\";h--)d++;if(d%2)continue}break}else n in b&&a!=="'"&&a!=='"'&&(m++,i(b[n]))}})(void 0),c();for(let i of l){let a=this.css.create(i);if(Array.isArray(a))for(let n of a)s(n);else a?s(a):r(this.theme??"",i)}let u={};for(let i in t)for(let[a,n]of Object.entries(t[i]))a in u?u[a][i]=n:u[a]={[i]:n};return u}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){let t={};switch(e){case"subpixel-antialiased":t["-webkit-font-smoothing"]=t["-moz-osx-font-smoothing"]="auto";break;case"antialiased":t["-webkit-font-smoothing"]="antialiased",t["-moz-osx-font-smoothing"]="grayscale";break}return t}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},margin:{match:"^m(?:argin(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(e,t){return $.call(this,e+t)},get order(){return this.prefix==="margin:"||this.prefix==="m:"?-1:0}},padding:{match:"^p(?:adding(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(e,t){return $.call(this,e+t)},get order(){return this.prefix==="padding:"||this.prefix==="p:"?-1:0}},flexBasis:{values:v,unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:v},height:{match:"^h:.",unit:"rem",native:!0,values:v},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:v},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:v},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,r]=e.split(" x ");return{width:t,height:r}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,r]=e.split(" x ");return{"min-width":t,"min-height":r}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,r]=e.split(" x ");return{"max-width":t,"max-height":r}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},inset:{match:"^(?:top|bottom|left|right):.",unit:"rem",native:!0,declare(e,t){return{[this.prefix.slice(0,-1)]:e+t}}},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:v},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:v},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflow:{match:"^overflow(?:-x|-y)?:(?:visible|overlay|hidden|scroll|auto|clip|inherit|initial|revert|revert-layer|unset|\\$|var|$values)",declare(e,t){if(this.prefix)switch(this.prefix.slice(-2,-1)){case"x":return{"overflow-x":e+t};case"y":return{"overflow-y":e+t}}return{overflow:e+t}},get order(){return-1}},overscrollBehavior:{match:"^overscroll-behavior(?:-[xy])?:",declare(e,t){switch(this.prefix.slice(-2,-1)){case"x":return{"overscroll-behavior-x":e+t};case"y":return{"overscroll-behavior-y":e+t};default:return{"overscroll-behavior":e+t}}}},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{...g,fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return x.call(this,e)},delete(e){return y.call(this,e)},insert(){return k.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return x.call(this,e)},delete(e){return y.call(this,e)},insert(){return k.call(this)}},borderColor:{match:"^b(?:[xytblr]|(?:order(?:-(?:left|right|top|bottom))?))?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return p(this.prefix,e+t,"color")},get order(){return this.prefix==="border-color:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderRadius:{match:"^(?:r[tblr]?[tblr]?|border(?:-(?:top|bottom)-(?:left|right))?-radius):.",unit:"rem",declare(e,t){if(this.prefix){let s="",l=this.prefix.split("-");if(l.length>1)for(let o=1;o<l.length-1;o++)s+=l[o][0];else s=this.prefix.slice(1,-1);switch(s){case"t":return{"border-top-left-radius":e+t,"border-top-right-radius":e+t};case"tl":case"lt":return{"border-top-left-radius":e+t};case"rt":case"tr":return{"border-top-right-radius":e+t};case"b":return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t};case"bl":case"lb":return{"border-bottom-left-radius":e+t};case"br":case"rb":return{"border-bottom-right-radius":e+t};case"l":return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t};case"r":return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t};default:return{"border-radius":e+t}}}let r=this.prefix?.slice(0,-1);return{[["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].includes(r)?r:"border-radius"]:e+t}},get order(){return this.prefix==="border-radius:"||this.prefix==="r:"?-1:0}},borderStyle:{match:"^(?:border(?:-(?:left|right|top|bottom))?-style:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|))",declare(e,t){return p(this.prefix,e+t,"style")},get order(){return this.prefix==="border-style:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderWidth:{match:"^(?:border(?:-(?:left|right|top|bottom))?-width:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$)",unit:"rem",declare(e,t){return p(this.prefix,e+t,"width")},get order(){return this.prefix==="border-width:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0},border:{match:"^b(?:[xytblr]?|order(?:-(?:left|right|top|bottom))?):.",unit:"rem",colored:!0,values:{current:"currentColor"},declare(e,t){return p(this.prefix,e+t)},get order(){return this.prefix==="border:"||this.prefix==="b:"?-2:-1}},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:g},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:g},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:f},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:f,native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:f},gridTemplateRows:{native:!0,unit:"rem",values:f},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gap:{match:"^gap(?:-x|-y)?:.",unit:"rem",order:-1,declare(e,t){switch(this.prefix[4]){case"x":return{"column-gap":e+t};case"y":return{"row-gap":e+t};default:return{gap:e+t}}}},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMargin:{match:"^scroll-m(?:[xytblr]|argin(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(e,t){if(this.prefix.slice(-3,-2)==="m")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-margin-left":e+t,"scroll-margin-right":e+t};case"y":return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t};case"l":return{"scroll-margin-left":e+t};case"r":return{"scroll-margin-right":e+t};case"t":return{"scroll-margin-top":e+t};case"b":return{"scroll-margin-bottom":e+t}}else return{[this.prefix.replace(/-m(?!argin)/,"-margin").slice(0,-1)]:e+t}},get order(){return this.prefix==="scroll-margin:"||this.prefix==="scroll-m:"?-1:0}},scrollPadding:{match:"^scroll-p(?:[xytblr]|adding(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(e,t){if(this.prefix.slice(-3,-2)==="p")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-padding-left":e+t,"scroll-padding-right":e+t};case"y":return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t};case"l":return{"scroll-padding-left":e+t};case"r":return{"scroll-padding-right":e+t};case"t":return{"scroll-padding-top":e+t};case"b":return{"scroll-padding-bottom":e+t}}else return{[this.prefix.replace(/-p(?!adding)/,"-padding").slice(0,-1)]:e+t}},get order(){return this.prefix==="scroll-padding:"||this.prefix==="scroll-p:"?-1:0}},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{...g,margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{...g,margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},z=S;function x(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(r=>r in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function y(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let r=this.css.keyframes[t];if(!--r.count){let s=e.natives.indexOf(r.native);this.css.style.sheet.deleteRule(s),e.natives.splice(s,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function k(){if(this.keyframeNames){let{config:e,keyframes:t,style:r,rules:s}=this.css,l=r?.sheet;for(let o of this.keyframeNames)if(o in t)t[o].count++;else{let c={text:`@keyframes ${o} {`+Object.entries(e.keyframes[o]).map(([u,i])=>`${u} {${Object.entries(i).map(([a,n])=>a+": "+n).join(";")}}`).join(",")+"}",theme:""},m;if(Object.keys(t).length?(m=s[0]).natives.push(c):s.splice(0,0,m={natives:[c],get text(){return this.natives.map(u=>u.text).join("")}}),l){let u;for(let i=0;i<l.cssRules.length;i++){let a=l.cssRules[i];if(a.constructor.name!=="CSSKeyframesRule")break;if(a.name===o){u=a;break}}if(u)c.cssRule=u;else{let i=m.natives.length-1;l.insertRule(c.text,i),c.cssRule=l.cssRules[i]}}t[o]={native:c,count:1}}}}function $(e){if(this.prefix.includes("-"))return{[this.prefix.slice(0,-1)]:e};let r=this.prefix[0]==="m"?"margin":"padding",s=r+"-left",l=r+"-right",o=r+"-top",c=r+"-bottom";switch(this.prefix[1]){case"x":return{[s]:e,[l]:e};case"y":return{[o]:e,[c]:e};case"l":return{[s]:e};case"r":return{[l]:e};case"t":return{[o]:e};case"b":return{[c]:e};default:return{[r]:e}}}function p(e,t,r=""){let s="border-";r&&(r="-"+r);let l=/^b(order)?-?(.)?/.exec(e)[2],o=s+"left"+r,c=s+"right"+r,m=s+"top"+r,u=s+"bottom"+r;switch(l){case"x":return{[o]:t,[c]:t};case"y":return{[m]:t,[u]:t};case"l":return{[o]:t};case"r":return{[c]:t};case"t":return{[m]:t};case"b":return{[u]:t};default:return{["border"+r]:t}}}export{z as rules};
1
+ import{START_SYMBOL as b}from"../constants/start-symbol.mjs";import{BOX_UNDERNEATH as v}from"../constants/box-underneath.mjs";import{CONTENT_EXTREMA as f}from"../constants/content-extrema.mjs";import{SIZING_VALUES as g}from"../constants/sizing-values.mjs";import{cssEscape as C}from"../utils/css-escape.mjs";var S={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},r=(i,a)=>{let n=a.indexOf(":");if(n!==-1){i in t||(t[i]={});let d=t[i],h=a.slice(0,n);h in d||(d[h]=a.slice(n+1))}},s=i=>{let a=(n,d)=>{let h=d.slice(C(i.className).length).match(/\{(.*)\}/)[1].split(";");for(let w of h)r(n,w)};if(this.theme){let n=i.natives.find(d=>d.theme===this.theme)??i.natives.find(d=>!d.theme);n&&a(this.theme,n.text)}else for(let n of i.natives)a(n.theme,n.text)},l=[],o="",c=()=>{o&&(l.push(o.replace(/ /g,"")),o="")},m=1;(function i(a){for(;m<e.length;m++){let n=e[m];if(!a){if(n===";"){c();continue}if(n==="}")break}if(o+=n,a===n){if(a==="'"||a==='"'){let d=0;for(let h=o.length-2;o[h]==="\\";h--)d++;if(d%2)continue}break}else n in b&&a!=="'"&&a!=='"'&&(m++,i(b[n]))}})(void 0),c();for(let i of l){let a=this.css.create(i);if(Array.isArray(a))for(let n of a)s(n);else a?s(a):r(this.theme??"",i)}let u={};for(let i in t)for(let[a,n]of Object.entries(t[i]))a in u?u[a][i]=n:u[a]={[i]:n};return u}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){let t={};switch(e){case"subpixel-antialiased":t["-webkit-font-smoothing"]=t["-moz-osx-font-smoothing"]="auto";break;case"antialiased":t["-webkit-font-smoothing"]="antialiased",t["-moz-osx-font-smoothing"]="grayscale";break}return t}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},margin:{match:"^m(?:argin(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(e,t){return $.call(this,e+t)},get order(){return this.prefix==="margin:"||this.prefix==="m:"?-1:0}},padding:{match:"^p(?:adding(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(e,t){return $.call(this,e+t)},get order(){return this.prefix==="padding:"||this.prefix==="p:"?-1:0}},flexBasis:{values:g,unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:g},height:{match:"^h:.",unit:"rem",native:!0,values:g},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:g},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:g},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,r]=e.split(" x ");return{width:t,height:r}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,r]=e.split(" x ");return{"min-width":t,"min-height":r}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,r]=e.split(" x ");return{"max-width":t,"max-height":r}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},inset:{match:"^(?:top|bottom|left|right):.",unit:"rem",native:!0,declare(e,t){return{[this.prefix.slice(0,-1)]:e+t}}},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:g},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:g},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflow:{match:"^overflow(?:-x|-y)?:(?:visible|overlay|hidden|scroll|auto|clip|inherit|initial|revert|revert-layer|unset|\\$|var|$values)",declare(e,t){if(this.prefix)switch(this.prefix.slice(-2,-1)){case"x":return{"overflow-x":e+t};case"y":return{"overflow-y":e+t}}return{overflow:e+t}},get order(){return-1}},overscrollBehavior:{match:"^overscroll-behavior(?:-[xy])?:",declare(e,t){switch(this.prefix.slice(-2,-1)){case"x":return{"overscroll-behavior-x":e+t};case"y":return{"overscroll-behavior-y":e+t};default:return{"overscroll-behavior":e+t}}}},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{...v,fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return x.call(this,e)},delete(e){return y.call(this,e)},insert(){return k.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return x.call(this,e)},delete(e){return y.call(this,e)},insert(){return k.call(this)}},borderColor:{match:"^b(?:[xytblr]|(?:order(?:-(?:left|right|top|bottom))?))?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return p(this.prefix,e+t,"color")},get order(){return this.prefix==="border-color:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderRadius:{match:"^(?:r[tblr]?[tblr]?|border(?:-(?:top|bottom)-(?:left|right))?-radius):.",unit:"rem",declare(e,t){if(this.prefix){let s="",l=this.prefix.split("-");if(l.length>1)for(let o=1;o<l.length-1;o++)s+=l[o][0];else s=this.prefix.slice(1,-1);switch(s){case"t":return{"border-top-left-radius":e+t,"border-top-right-radius":e+t};case"tl":case"lt":return{"border-top-left-radius":e+t};case"rt":case"tr":return{"border-top-right-radius":e+t};case"b":return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t};case"bl":case"lb":return{"border-bottom-left-radius":e+t};case"br":case"rb":return{"border-bottom-right-radius":e+t};case"l":return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t};case"r":return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t};default:return{"border-radius":e+t}}}let r=this.prefix?.slice(0,-1);return{[["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].includes(r)?r:"border-radius"]:e+t}},get order(){return this.prefix==="border-radius:"||this.prefix==="r:"?-1:0}},borderStyle:{match:"^(?:border(?:-(?:left|right|top|bottom))?-style:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|))",declare(e,t){return p(this.prefix,e+t,"style")},get order(){return this.prefix==="border-style:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderWidth:{match:"^(?:border(?:-(?:left|right|top|bottom))?-width:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$)",unit:"rem",declare(e,t){return p(this.prefix,e+t,"width")},get order(){return this.prefix==="border-width:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0},border:{match:"^b(?:[xytblr]?|order(?:-(?:left|right|top|bottom))?):.",unit:"rem",colored:!0,values:{current:"currentColor"},declare(e,t){return p(this.prefix,e+t)},get order(){return this.prefix==="border:"||this.prefix==="b:"?-2:-1}},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:v},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:v},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:f},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:f,native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:f},gridTemplateRows:{native:!0,unit:"rem",values:f},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gap:{match:"^gap(?:-x|-y)?:.",unit:"rem",order:-1,declare(e,t){switch(this.prefix[4]){case"x":return{"column-gap":e+t};case"y":return{"row-gap":e+t};default:return{gap:e+t}}}},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMargin:{match:"^scroll-m(?:[xytblr]|argin(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(e,t){if(this.prefix.slice(-3,-2)==="m")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-margin-left":e+t,"scroll-margin-right":e+t};case"y":return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t};case"l":return{"scroll-margin-left":e+t};case"r":return{"scroll-margin-right":e+t};case"t":return{"scroll-margin-top":e+t};case"b":return{"scroll-margin-bottom":e+t}}else return{[this.prefix.replace(/-m(?!argin)/,"-margin").slice(0,-1)]:e+t}},get order(){return this.prefix==="scroll-margin:"||this.prefix==="scroll-m:"?-1:0}},scrollPadding:{match:"^scroll-p(?:[xytblr]|adding(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(e,t){if(this.prefix.slice(-3,-2)==="p")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-padding-left":e+t,"scroll-padding-right":e+t};case"y":return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t};case"l":return{"scroll-padding-left":e+t};case"r":return{"scroll-padding-right":e+t};case"t":return{"scroll-padding-top":e+t};case"b":return{"scroll-padding-bottom":e+t}}else return{[this.prefix.replace(/-p(?!adding)/,"-padding").slice(0,-1)]:e+t}},get order(){return this.prefix==="scroll-padding:"||this.prefix==="scroll-p:"?-1:0}},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{...v,margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{...v,margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},z=S;function x(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(r=>r in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function y(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let r=this.css.keyframes[t];if(!--r.count){let s=e.natives.indexOf(r.native);this.css.style.sheet.deleteRule(s),e.natives.splice(s,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function k(){if(this.keyframeNames){let{config:e,keyframes:t,style:r,rules:s}=this.css,l=r?.sheet;for(let o of this.keyframeNames)if(o in t)t[o].count++;else{let c={text:`@keyframes ${o} {`+Object.entries(e.keyframes[o]).map(([u,i])=>`${u} {${Object.entries(i).map(([a,n])=>a+": "+n).join(";")}}`).join(",")+"}",theme:""},m;if(Object.keys(t).length?(m=s[0]).natives.push(c):s.splice(0,0,m={natives:[c],get text(){return this.natives.map(u=>u.text).join("")}}),l){let u;for(let i=0;i<l.cssRules.length;i++){let a=l.cssRules[i];if(a.constructor.name!=="CSSKeyframesRule")break;if(a.name===o){u=a;break}}if(u)c.cssRule=u;else{let i=m.natives.length-1;l.insertRule(c.text,i),c.cssRule=l.cssRules[i]}}t[o]={native:c,count:1}}}}function $(e){if(this.prefix.includes("-"))return{[this.prefix.slice(0,-1)]:e};let r=this.prefix[0]==="m"?"margin":"padding",s=r+"-left",l=r+"-right",o=r+"-top",c=r+"-bottom";switch(this.prefix[1]){case"x":return{[s]:e,[l]:e};case"y":return{[o]:e,[c]:e};case"l":return{[s]:e};case"r":return{[l]:e};case"t":return{[o]:e};case"b":return{[c]:e};default:return{[r]:e}}}function p(e,t,r=""){let s="border-";r&&(r="-"+r);let l=/^b(order)?-?(.)?/.exec(e)[2],o=s+"left"+r,c=s+"right"+r,m=s+"top"+r,u=s+"bottom"+r;switch(l){case"x":return{[o]:t,[c]:t};case"y":return{[m]:t,[u]:t};case"l":return{[o]:t};case"r":return{[c]:t};case"t":return{[m]:t};case"b":return{[u]:t};default:return{["border"+r]:t}}}export{z as rules};
package/dist/esm/css.mjs CHANGED
@@ -1 +1 @@
1
- var D=Object.defineProperty;var H=(x,e,t)=>e in x?D(x,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):x[e]=t;var S=(x,e,t)=>(H(x,typeof e!="symbol"?e+"":e,t),t);function L(x){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&x instanceof e||x instanceof Date||x instanceof RegExp)}function F(x){if(typeof Buffer<"u"&&Buffer&&x instanceof Buffer){let e=Buffer.alloc(x.length);return x.copy(e),e}else{if(x instanceof Date)return new Date(x.getTime());if(x instanceof RegExp)return new RegExp(x);throw new Error("Unexpected situation")}}function I(x){let e=[];return x.forEach(function(t,s){typeof t=="object"&&t!==null?Array.isArray(t)?e[s]=I(t):L(t)?e[s]=F(t):e[s]=j({},t):e[s]=t}),e}function N(x,e){return e==="__proto__"?void 0:x[e]}function j(...x){let e={},t,s;return x.forEach(function(f){typeof f!="object"||f===null||Array.isArray(f)||Object.keys(f).forEach(function(p){if(s=N(e,p),t=N(f,p),t!==e)if(typeof t!="object"||t===null){e[p]=t;return}else if(Array.isArray(t)){e[p]=I(t);return}else if(L(t)){e[p]=F(t);return}else if(typeof s!="object"||s===null||Array.isArray(s)){e[p]=j({},t);return}else{e[p]=j(s,t);return}})}),e}import{Rule as Q}from"./rule.mjs";import{config as O}from"./config/index.mjs";import{rgbToHex as z}from"./utils/rgb-to-hex.mjs";import{SELECTOR_SYMBOLS as _}from"./constants/selector-symbols.mjs";var T=typeof window<"u",$=()=>{let x=document.createElement("style");return x.id="master",x.setAttribute("blocking","render"),x},A=class{constructor(e){this.config=e;this.config?.override||(this.config=j(O,e)),this.cache(),T&&this.config.observe&&this.observe(document),A.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer=T?new MutationObserver(e=>{let t={},s=[],f=[],p=[],C=(a,i)=>{i?a.classList.forEach(R):a.classList.forEach(y);let c=a.children;for(let u=0;u<c.length;u++){let d=c[u];d.classList&&(f.push(d),C(d,i))}},y=a=>{a in t?t[a]++:t[a]=1},R=a=>{a in t?t[a]--:a in this.countBy&&(t[a]=-1)},k=(a,i)=>{for(let c=0;c<a.length;c++){let u=a[c];u.classList&&!f.includes(u)&&!p.includes(u)&&(u.isConnected!==i?(f.push(u),C(u,i)):p.push(u))}};for(let a=0;a<e.length;a++){let i=e[a],{addedNodes:c,removedNodes:u,type:d,target:h}=i;if(d==="attributes"){if(s.find(w=>w.target===h))continue;s.push(i)}else k(c,!1),(!h.isConnected||!f.includes(h))&&k(u,!0)}if(!(!s.length&&!Object.keys(t).length)){for(let{oldValue:a,target:i}of s){let c=f.includes(i),u=i.classList,d=a?a.split(" "):[];if(c){if(i.isConnected)continue;for(let h of d)u.contains(h)||R(h)}else if(i.isConnected){u.forEach(h=>{d.includes(h)||y(h)});for(let h of d)u.contains(h)||R(h)}}for(let a in t){let i=t[a],c=(this.countBy[a]||0)+i;c===0?(delete this.countBy[a],this.delete(a)):(a in this.countBy||this.insert(a),this.countBy[a]=c)}}}):null;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:t,selectors:s,themes:f,colors:p,values:C,breakpoints:y,mediaQueries:R,rules:k}=this.config;function a(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function i(n,o,r="",m={}){let l=v=>v?(r?r+"-":"")+v:r,g=Object.entries(n),b=[],B=[];for(let v of g){let E=v[1];(typeof E=="object"&&!Array.isArray(E)?b:B).push(v)}for(let[v,E]of b)i(E,o,l(v),m);if(o&&r)B.length&&(m[r]=B.reduce((v,[E,V])=>(v[E]=V,v),{}));else for(let[v,E]of B)m[l(v)]=E;return m}if(e)for(let[n,o]of Object.entries(i(e,!0)))this.semantics.push([new RegExp("^"+a(n)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[n,o]]);if(s)for(let[n,o]of Object.entries(i(s,!1))){let r=new RegExp(a(n)+"(?![a-z-])");for(let m of Array.isArray(o)?o:[o]){let l=m.match(/^::-[a-z]+-/m)?.[0]??"",g=this.selectors[l];g||(g=this.selectors[l]=[]);let b=g.find(([B])=>B===r);b||(b=[r,[]],g.push(b)),b[1].push(m)}}C&&(this.globalValues=i(C,!1)),y&&(this.breakpoints=i(y,!1)),R&&(this.mediaQueries=i(R,!1));let c=t?i(t,!1):{},u=f&&!Array.isArray(f)?Object.entries(f).filter(([,{classes:n}])=>n).reduce((n,[o,{classes:r}])=>(n[o]=i(r,!1),n),{}):{},d=[...Object.keys(c),...Object.entries(u).flatMap(([n,o])=>Object.keys(o))],h=n=>{if(n in this.classes)return;let o=this.classes[n]=[],r=(m,l)=>{if(!l)return;let g=Array.isArray(l)?l:l.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let b of g){let B=v=>{v in this.themeAffectedClassesBy?m in this.themeAffectedClassesBy[v]?this.themeAffectedClassesBy[v][m].push(n):this.themeAffectedClassesBy[v][m]=[n]:this.themeAffectedClassesBy[v]={[m]:[n]},o.includes(v)||o.push(v)};if(d.includes(b)){h(b);for(let v of this.classes[b])B(v)}else B(b)}};r("",c?.[n]);for(let[m,l]of Object.entries(u))r(m,l?.[n])};for(let n of d)h(n);for(let n in this.themeAffectedClassesBy){let o=this.classesBy[n]=[];for(let r of Object.values(this.themeAffectedClassesBy[n]))for(let m of r)o.includes(m)||o.push(m)}let w=(n,o)=>{if(!o)return;let r=i(o,!0);for(let[m,l]of Object.entries(r)){let g=typeof l=="string"?{"":l}:l;for(let[b,B]of Object.entries(g)){let v=m+(b?"-"+b:"");v in this.colorThemesMap?this.colorThemesMap[v][n]=B:this.colorThemesMap[v]={[n]:B}}}for(let m in o)this.colorNames.includes(m)||this.colorNames.push(m)};if(w("",p),f)if(Array.isArray(f))this.themeNames.push(...f);else for(let n in f){let o=f[n];w(n,o.colors),this.themeNames.push(n)}let M=n=>{for(let[o,r]of Object.entries(this.colorThemesMap))for(let[m,l]of Object.entries(r))l.startsWith("#")||n(o,r,m,l)};if(M((n,o,r,m)=>{let l=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(m);if(l){let g="#"+z(+l[1],+l[2],+l[3]);l[4]&&(g+=Math.round(255*+l[4]).toString(16)),o[r]=g}}),M((n,o,r,m)=>{let[l,g]=m.split("/"),b=this.colorThemesMap[l];if(b){let B=(r?b[r]:void 0)??b[""];o[r]=g?B.slice(0,7)+Math.round(255*+g).toString(16):B}else console.warn(`\`${m}\` doesn't exist in the extended config \`.colors\``),delete o[r],Object.keys(o).length||delete this.colorThemesMap[n]}),k)for(let n in k){let o=k[n],{native:r,values:m,colored:l}=o,g=o.match;if(o.id=n,o.native=r===!0?n.replace(/(?!^)[A-Z]/g,b=>"-"+b).toLowerCase():void 0,m&&(this.values[n]=i(m,!1)),g){let b=Object.keys(this.values[n]??{});g.includes("$values")&&(g=b.length?g.replace(/\$values/,b.join("|")):g.replace(/(?:\|)?\$values/,"")),l&&g.includes("$colors")&&(g=this.colorNames.length?g.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):g.replace(/(?:\|)?\$colors/,"")),this.matches[n]=new RegExp(g)}}}observe(e,t={subtree:!0,childList:!0}){if(this.root!==e){if(T&&e){this.root=e;let s=e===document;s&&(A.root=this),this.host=s?document.documentElement:root.host;let f=s?document.head:e,p=s?document.styleSheets:e.styleSheets;for(let y of p){let{href:R,ownerNode:k}=y;(k.id==="master"||R&&R.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(R))&&(this.style=k)}if(this.style)for(let y=0;y<this.style.sheet.cssRules.length;y++){let R=this.style.sheet.cssRules[y];if(R.constructor.name==="CSSKeyframesRule")continue;let k=i=>{if(i.selectorText){let u=i.selectorText.split(", ")[0].split(" ");for(let d=0;d<u.length;d++){let h=u[d];if(h[0]==="."){let w=h.slice(1),M="";for(let n=0;n<w.length;n++){let o=w[n],r=w[n+1];if(o==="\\"){if(n++,r!=="\\"){M+=r;continue}}else if(_.includes(o))break;M+=o}if(!(M in this.ruleBy)&&!(M in this.classes)){let n=this.create(M)[0];if(n)return n}}}}else if(i.cssRules)for(let c=0;c<i.cssRules.length;c++){let u=k(i.cssRules[c]);if(u)return u}},a=k(R);if(a){this.rules.push(a),this.ruleBy[a.className]=a;for(let i=0;i<a.natives.length;i++)a.natives[i].cssRule=this.style.sheet.cssRules[y+i];y+=a.natives.length-1,a.config.insert?.call(a)}}else switch(this.style=$(),this.config.precedence){case"highest":console.log(s?document.body:e),(s?document.body:e).append(this.style);break;case"higher":f.append(this.style);break;default:let y=f.querySelector('link[rel="styleSheet"], style');y?y.before(this.style):f.append(this.style);break}let C=y=>{y.forEach(R=>{R in this.countBy?this.countBy[R]++:(this.countBy[R]=1,this.insert(R))})};C(this.host.classList),t.subtree&&this.host.querySelectorAll("[class]").forEach(y=>C(y.classList)),this.observer.observe(e,{...t,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer?.disconnect?.(),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let t=e.cssRules.length-1;t>=0;t--)e.deleteRule(t);this.style?.remove(),this.style=null,this.root=null}match(e){for(let t in this.config.rules){let s=this.config.rules[t],f=this.matches[t],{symbol:p,native:C}=s;if(f&&f.test(e))return{origin:"match",config:s};if(p&&e.startsWith(p))return{origin:"symbol",config:s};if(C&&e.startsWith(C+":"))return{origin:"match",config:s}}for(let t of this.semantics)if(e.match(t[0]))return{origin:"semantics",value:t[1]}}create(e){let t=s=>{if(s in this.ruleBy)return this.ruleBy[s];let f=this.match(s);if(f)return new Q(s,f,this)};return(e in this.classes?this.classes[e].map(s=>t(s)):[t(e)]).filter(s=>s&&s.text)}refresh(e){if(e?.override?this.config=e:this.config=j(O,e),this.cache(),!this.style)return;let t=$();this.style.replaceWith(t),this.style=t,this.rules.length=0,this.ruleBy={};for(let s in this.countBy)this.insert(s)}destroy(){let e=A.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let t=this.style?.sheet,s=f=>{let p=this.ruleBy[f];if(!(!p||f in this.classesBy&&this.classesBy[f].some(C=>C in this.countBy))){if(t&&p.natives.length){let C=p.natives[0];for(let y=0;y<t.cssRules.length;y++)if(t.cssRules[y]===C.cssRule){for(let k=0;k<p.natives.length;k++)t.deleteRule(y);break}}this.rules.splice(this.rules.indexOf(p),1),delete this.ruleBy[f],p.config.delete&&p.config.delete.call(p,f)}};if(e in this.classes){for(let f of this.classes[e])f in this.countBy||s(f);delete this.ruleBy[e]}else s(e)}insert(e){let t=this.create(e);return t.length?(this.insertRules(t),!0):!1}insertRules(e){for(let t of e){if(this.ruleBy[t.className])continue;let s,f=this.rules.length-1,{media:p,order:C,priority:y,hasWhere:R,className:k}=t,a=(i,c,u,d)=>{let h=0,w;c&&(h=i.findIndex(c)),u&&(w=i.findIndex(u)),h===-1&&(h=i.length),(w===void 0||w===-1)&&(w=i.length);let M=i.slice(h,w);for(let n=0;n<M.length;n++){let o=M[n];if(!(o.priority===-1||d&&d(o))&&(o.priority<y||o.priority===y&&(R&&!o.hasWhere||o.order>=C)))return h+n}return h+M.length};if(p){let i=this.rules.findIndex(c=>c.media);if(i!==-1){let c=p.features["max-width"],u=p.features["min-width"];if(c&&u){let d=c.value-u.value;for(let h=f;h>=i;h--){s=h;let w=this.rules[h],M=w.media,n=M.features["max-width"],o=M.features["min-width"];if(!n||!o){s++;break}let r=n.value-o.value;if(r===d){if(R!==w.hasWhere)continue;if(y!==-1){let m=[this.rules[h]];for(let l=h-1;l>=i;l--){let g=this.rules[l];if(g.hasWhere!==R)break;let b=g.media,B=b.features["max-width"],v=b.features["min-width"];if(!B||!v||B.value-v.value!==r)break;m.unshift(this.rules[l])}s=a(this.rules,l=>l.media&&l.priority!==-1&&l.media.features["min-width"]&&l.media.features["max-width"])}break}else if(r>d)break}}else if(u)for(let d=i;d<=f;d++){s=d;let h=this.rules[d],w=h.media,M=w.features["max-width"],n=w.features["min-width"];if(M){if(n)break;continue}let o=n?.value;if(o===u.value){if(!R&&h.hasWhere){s++;continue}if(y!==-1)s=a(this.rules,r=>r.media,r=>r.media&&r.priority!==-1&&r.media.features["min-width"]&&r.media.features["max-width"],r=>!r.media.features["min-width"]&&!r.media.features["max-width"]);else for(let r=d;r<=f;r++){let m=this.rules[r],l=m.media,g=l.features["min-width"];if(!l.features["max-width"]){if(m.hasWhere!==R||g.value!==o||m.order>=C)break;s=r+1}}break}else{if(o>u.value)break;s++}}else if(c)for(let d=f;d>=i;d--){s=d;let h=this.rules[d],w=h.media,M=w.features["max-width"];if(w.features["min-width"])continue;let o=M?.value;if(!o||o>c.value){s++;break}else if(o===c.value){if(R&&!h.hasWhere)continue;if(y!==-1)s=a(this.rules,r=>r.media,r=>r.media&&r.priority!==-1&&r.media.features["min-width"]&&r.media.features["max-width"],r=>!r.media.features["min-width"]&&!r.media.features["max-width"]);else{let r=[this.rules[d]];for(let m=d-1;m>=i;m--){let l=this.rules[m],g=l.media,b=g.features["min-width"],B=g.features["max-width"];if(!b&&(!B||B.value!==o||l.hasWhere!==R))break;r.unshift(l)}for(let m=0;m<r.length;m++){let l=r[m];if(!l.media.features["min-width"]){if(l.order>=C)break;s=d-r.length+2+m}}}break}}}if(s===void 0)if(i===-1)s=f+1;else if(y!==-1)s=i+a(this.rules.slice(i),void 0,c=>c.media.features["max-width"]||c.media.features["min-width"]);else if(R){let c=i;for(;c<this.rules.length;c++){let u=this.rules[c];if(u.priority!==-1||!u.hasWhere||u.order>=C){s=c;break}}s===void 0&&(s=c)}else for(let c=i;c<=f;c++){s=c;let u=this.rules[c],d=u.media;if(u.priority!==-1||d.features["max-width"]||d.features["min-width"])break;if(u.hasWhere)s++;else if(u.order>=C)break}}else if(y===-1){if(R)s=this.rules.findIndex(i=>!i.hasWhere||i.media||i.priority!==-1||i.order>=C),s===-1&&(s=f+1);else{let i=0;for(;i<this.rules.length;i++){let c=this.rules[i];if(c.media||!c.hasWhere&&(c.order>=C||c.priority!==-1)){s=i;break}}s===void 0&&(s=i)}!s&&Object.keys(this.keyframes).length&&s++}else s=a(this.rules,void 0,i=>i.media);if(this.rules.splice(s,0,t),this.ruleBy[k]=t,this.style){let i=this.style.sheet,c=0,u=d=>{let h=this.rules[d];if(h){if(!h.natives.length)return u(d-1);let w=h.natives[h.natives.length-1].cssRule;for(let M=0;M<i.cssRules.length;M++)if(i.cssRules[M]===w){c=M+1;break}}};u(s-1);for(let d=0;d<t.natives.length;)try{let h=t.natives[d];i.insertRule(h.text,c),h.cssRule=i.cssRules[c++],d++}catch(h){console.error(h),t.natives.splice(d,1)}}t.config.insert?.call(t)}}get text(){return this.rules.map(e=>e.text).join("")}},W=A;S(W,"root"),S(W,"config",O),S(W,"instances",[]),S(W,"refresh",e=>{for(let t of A.instances)t.refresh(e)});T&&(window.MasterCSS=W);export{W as MasterCSS};
1
+ var D=Object.defineProperty;var H=(w,s,r)=>s in w?D(w,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):w[s]=r;var A=(w,s,r)=>(H(w,typeof s!="symbol"?s+"":s,r),r);function L(w){let s=typeof Buffer<"u"?Buffer:null;return!!(s&&w instanceof s||w instanceof Date||w instanceof RegExp)}function F(w){if(typeof Buffer<"u"&&Buffer&&w instanceof Buffer){let s=Buffer.alloc(w.length);return w.copy(s),s}else{if(w instanceof Date)return new Date(w.getTime());if(w instanceof RegExp)return new RegExp(w);throw new Error("Unexpected situation")}}function I(w){let s=[];return w.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?s[n]=I(r):L(r)?s[n]=F(r):s[n]=W({},r):s[n]=r}),s}function N(w,s){return s==="__proto__"?void 0:w[s]}function W(...w){let s={},r,n;return w.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(x){if(n=N(s,x),r=N(u,x),r!==s)if(typeof r!="object"||r===null){s[x]=r;return}else if(Array.isArray(r)){s[x]=I(r);return}else if(L(r)){s[x]=F(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){s[x]=W({},r);return}else{s[x]=W(n,r);return}})}),s}import{Rule as Q}from"./rule.mjs";import{config as T}from"./config/index.mjs";import{rgbToHex as z}from"./utils/rgb-to-hex.mjs";import{SELECTOR_SYMBOLS as _}from"./constants/selector-symbols.mjs";var O=typeof window<"u",$=()=>{let w=document.createElement("style");return w.id="master",w},j=class{constructor(s){this.config=s;this.config?.override||(this.config=W(T,s)),this.cache(),O&&this.config.observe&&this.observe(document),j.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;e;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:s,classes:r,selectors:n,themes:u,colors:x,values:E,breakpoints:b,mediaQueries:g,rules:C}=this.config;function M(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(e,t,i="",c={}){let a=v=>v?(i?i+"-":"")+v:i,y=Object.entries(e),R=[],B=[];for(let v of y){let k=v[1];(typeof k=="object"&&!Array.isArray(k)?R:B).push(v)}for(let[v,k]of R)o(k,t,a(v),c);if(t&&i)B.length&&(c[i]=B.reduce((v,[k,V])=>(v[k]=V,v),{}));else for(let[v,k]of B)c[a(v)]=k;return c}if(s)for(let[e,t]of Object.entries(o(s,!0)))this.semantics.push([new RegExp("^"+M(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,t]]);if(n)for(let[e,t]of Object.entries(o(n,!1))){let i=new RegExp(M(e)+"(?![a-z-])");for(let c of Array.isArray(t)?t:[t]){let a=c.match(/^::-[a-z]+-/m)?.[0]??"",y=this.selectors[a];y||(y=this.selectors[a]=[]);let R=y.find(([B])=>B===i);R||(R=[i,[]],y.push(R)),R[1].push(c)}}E&&(this.globalValues=o(E,!1)),b&&(this.breakpoints=o(b,!1)),g&&(this.mediaQueries=o(g,!1));let h=r?o(r,!1):{},p=u&&!Array.isArray(u)?Object.entries(u).filter(([,{classes:e}])=>e).reduce((e,[t,{classes:i}])=>(e[t]=o(i,!1),e),{}):{},f=[...Object.keys(h),...Object.entries(p).flatMap(([e,t])=>Object.keys(t))],m=e=>{if(e in this.classes)return;let t=this.classes[e]=[],i=(c,a)=>{if(!a)return;let y=Array.isArray(a)?a:a.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let R of y){let B=v=>{v in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[v]?this.themeAffectedClassesBy[v][c].push(e):this.themeAffectedClassesBy[v][c]=[e]:this.themeAffectedClassesBy[v]={[c]:[e]},t.includes(v)||t.push(v)};if(f.includes(R)){m(R);for(let v of this.classes[R])B(v)}else B(R)}};i("",h?.[e]);for(let[c,a]of Object.entries(p))i(c,a?.[e])};for(let e of f)m(e);for(let e in this.themeAffectedClassesBy){let t=this.classesBy[e]=[];for(let i of Object.values(this.themeAffectedClassesBy[e]))for(let c of i)t.includes(c)||t.push(c)}let l=(e,t)=>{if(!t)return;let i=o(t,!0);for(let[c,a]of Object.entries(i)){let y=typeof a=="string"?{"":a}:a;for(let[R,B]of Object.entries(y)){let v=c+(R?"-"+R:"");v in this.colorThemesMap?this.colorThemesMap[v][e]=B:this.colorThemesMap[v]={[e]:B}}}for(let c in t)this.colorNames.includes(c)||this.colorNames.push(c)};if(l("",x),u)if(Array.isArray(u))this.themeNames.push(...u);else for(let e in u){let t=u[e];l(e,t.colors),this.themeNames.push(e)}let d=e=>{for(let[t,i]of Object.entries(this.colorThemesMap))for(let[c,a]of Object.entries(i))a.startsWith("#")||e(t,i,c,a)};if(d((e,t,i,c)=>{let a=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(a){let y="#"+z(+a[1],+a[2],+a[3]);a[4]&&(y+=Math.round(255*+a[4]).toString(16)),t[i]=y}}),d((e,t,i,c)=>{let[a,y]=c.split("/"),R=this.colorThemesMap[a];if(R){let B=(i?R[i]:void 0)??R[""];t[i]=y?B.slice(0,7)+Math.round(255*+y).toString(16):B}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete t[i],Object.keys(t).length||delete this.colorThemesMap[e]}),C)for(let e in C){let t=C[e],{native:i,values:c,colored:a}=t,y=t.match;if(t.id=e,t.native=i===!0?e.replace(/(?!^)[A-Z]/g,R=>"-"+R).toLowerCase():void 0,c&&(this.values[e]=o(c,!1)),y){let R=Object.keys(this.values[e]??{});y.includes("$values")&&(y=R.length?y.replace(/\$values/,R.join("|")):y.replace(/(?:\|)?\$values/,"")),a&&y.includes("$colors")&&(y=this.colorNames.length?y.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):y.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(y)}}}observe(s,r={subtree:!0,childList:!0}){if(this.root!==s){if(O&&s){this.root=s;let n=s===document;n&&(j.root=this),this.host=n?document.documentElement:root.host;let u=n?document.head:s,x=n?document.styleSheets:s.styleSheets;for(let b of x){let{href:g,ownerNode:C}=b;(C.id==="master"||g&&g.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(g))&&(this.style=C)}if(this.style)for(let b=0;b<this.style.sheet.cssRules.length;b++){let g=this.style.sheet.cssRules[b];if(g.constructor.name==="CSSKeyframesRule")continue;let C=o=>{if(o.selectorText){let p=o.selectorText.split(", ")[0].split(" ");for(let f=0;f<p.length;f++){let m=p[f];if(m[0]==="."){let l=m.slice(1),d="";for(let e=0;e<l.length;e++){let t=l[e],i=l[e+1];if(t==="\\"){if(e++,i!=="\\"){d+=i;continue}}else if(_.includes(t))break;d+=t}if(!(d in this.ruleBy)&&!(d in this.classes)){let e=this.create(d)[0];if(e)return e}}}}else if(o.cssRules)for(let h=0;h<o.cssRules.length;h++){let p=C(o.cssRules[h]);if(p)return p}},M=C(g);if(M){this.rules.push(M),this.ruleBy[M.className]=M;for(let o=0;o<M.natives.length;o++)M.natives[o].cssRule=this.style.sheet.cssRules[b+o];b+=M.natives.length-1,M.config.insert?.call(M)}}else this.style=$();u.append(this.style);let E=b=>{b.forEach(g=>{g in this.countBy?this.countBy[g]++:(this.countBy[g]=1,this.insert(g))})};E(this.host.classList),r.subtree&&this.host.querySelectorAll("[class]").forEach(b=>E(b.classList)),this.observer=new MutationObserver(b=>{let g={},C=[],M=[],o=[],h=(l,d)=>{d?l.classList.forEach(f):l.classList.forEach(p);let e=l.children;for(let t=0;t<e.length;t++){let i=e[t];i.classList&&(M.push(i),h(i,d))}},p=l=>{l in g?g[l]++:g[l]=1},f=l=>{l in g?g[l]--:l in this.countBy&&(g[l]=-1)},m=(l,d)=>{for(let e=0;e<l.length;e++){let t=l[e];t.classList&&!M.includes(t)&&!o.includes(t)&&(t.isConnected!==d?(M.push(t),h(t,d)):o.push(t))}};for(let l=0;l<b.length;l++){let d=b[l],{addedNodes:e,removedNodes:t,type:i,target:c}=d;if(i==="attributes"){if(C.find(a=>a.target===c))continue;C.push(d)}else m(e,!1),(!c.isConnected||!M.includes(c))&&m(t,!0)}if(!(!C.length&&!Object.keys(g).length)){for(let{oldValue:l,target:d}of C){let e=M.includes(d),t=d.classList,i=l?l.split(" "):[];if(e){if(d.isConnected)continue;for(let c of i)t.contains(c)||f(c)}else if(d.isConnected){t.forEach(c=>{i.includes(c)||p(c)});for(let c of i)t.contains(c)||f(c)}}for(let l in g){let d=g[l],e=(this.countBy[l]||0)+d;e===0?(delete this.countBy[l],this.delete(l)):(l in this.countBy||this.insert(l),this.countBy[l]=e)}}}),this.observer.observe(s,{...r,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.e=new MutationObserver(b=>{for(let g of b)for(let C of g.addedNodes)if(C.nodeName==="STYLE"||C.nodeName==="LINK"&&C.rel==="stylesheet"){let M=this.root.styleSheets;if(M.item(M.length-1).ownerNode!==this.style){let p=this.style.sheet.cssRules;u.append(this.style);for(let f of p)this.style.sheet.insertRule(f.cssText)}}}),this.e.observe(u,{childList:!0}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.e&&(this.e.disconnect(),this.e=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let s=this.style?.sheet;if(s?.cssRules)for(let r=s.cssRules.length-1;r>=0;r--)s.deleteRule(r);this.style?.remove(),this.style=null,this.root=null}match(s){for(let r in this.config.rules){let n=this.config.rules[r],u=this.matches[r],{symbol:x,native:E}=n;if(u&&u.test(s))return{origin:"match",config:n};if(x&&s.startsWith(x))return{origin:"symbol",config:n};if(E&&s.startsWith(E+":"))return{origin:"match",config:n}}for(let r of this.semantics)if(s.match(r[0]))return{origin:"semantics",value:r[1]}}create(s){let r=n=>{if(n in this.ruleBy)return this.ruleBy[n];let u=this.match(n);if(u)return new Q(n,u,this)};return(s in this.classes?this.classes[s].map(n=>r(n)):[r(s)]).filter(n=>n&&n.text)}refresh(s){if(s?.override?this.config=s:this.config=W(T,s),this.cache(),!this.style)return;let r=$();this.style.replaceWith(r),this.style=r,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let s=j.instances;this.disconnect(),s.splice(s.indexOf(this),1)}delete(s){let r=this.style?.sheet,n=u=>{let x=this.ruleBy[u];if(!(!x||u in this.classesBy&&this.classesBy[u].some(E=>E in this.countBy))){if(r&&x.natives.length){let E=x.natives[0];for(let b=0;b<r.cssRules.length;b++)if(r.cssRules[b]===E.cssRule){for(let C=0;C<x.natives.length;C++)r.deleteRule(b);break}}this.rules.splice(this.rules.indexOf(x),1),delete this.ruleBy[u],x.config.delete&&x.config.delete.call(x,u)}};if(s in this.classes){for(let u of this.classes[s])u in this.countBy||n(u);delete this.ruleBy[s]}else n(s)}insert(s){let r=this.create(s);return r.length?(this.insertRules(r),!0):!1}insertRules(s){for(let r of s){if(this.ruleBy[r.className])continue;let n,u=this.rules.length-1,{media:x,order:E,priority:b,hasWhere:g,className:C}=r,M=(o,h,p,f)=>{let m=0,l;h&&(m=o.findIndex(h)),p&&(l=o.findIndex(p)),m===-1&&(m=o.length),(l===void 0||l===-1)&&(l=o.length);let d=o.slice(m,l);for(let e=0;e<d.length;e++){let t=d[e];if(!(t.priority===-1||f&&f(t))&&(t.priority<b||t.priority===b&&(g&&!t.hasWhere||t.order>=E)))return m+e}return m+d.length};if(x){let o=this.rules.findIndex(h=>h.media);if(o!==-1){let h=x.features["max-width"],p=x.features["min-width"];if(h&&p){let f=h.value-p.value;for(let m=u;m>=o;m--){n=m;let l=this.rules[m],d=l.media,e=d.features["max-width"],t=d.features["min-width"];if(!e||!t){n++;break}let i=e.value-t.value;if(i===f){if(g!==l.hasWhere)continue;if(b!==-1){let c=[this.rules[m]];for(let a=m-1;a>=o;a--){let y=this.rules[a];if(y.hasWhere!==g)break;let R=y.media,B=R.features["max-width"],v=R.features["min-width"];if(!B||!v||B.value-v.value!==i)break;c.unshift(this.rules[a])}n=M(this.rules,a=>a.media&&a.priority!==-1&&a.media.features["min-width"]&&a.media.features["max-width"])}break}else if(i>f)break}}else if(p)for(let f=o;f<=u;f++){n=f;let m=this.rules[f],l=m.media,d=l.features["max-width"],e=l.features["min-width"];if(d){if(e)break;continue}let t=e?.value;if(t===p.value){if(!g&&m.hasWhere){n++;continue}if(b!==-1)n=M(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else for(let i=f;i<=u;i++){let c=this.rules[i],a=c.media,y=a.features["min-width"];if(!a.features["max-width"]){if(c.hasWhere!==g||y.value!==t||c.order>=E)break;n=i+1}}break}else{if(t>p.value)break;n++}}else if(h)for(let f=u;f>=o;f--){n=f;let m=this.rules[f],l=m.media,d=l.features["max-width"];if(l.features["min-width"])continue;let t=d?.value;if(!t||t>h.value){n++;break}else if(t===h.value){if(g&&!m.hasWhere)continue;if(b!==-1)n=M(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else{let i=[this.rules[f]];for(let c=f-1;c>=o;c--){let a=this.rules[c],y=a.media,R=y.features["min-width"],B=y.features["max-width"];if(!R&&(!B||B.value!==t||a.hasWhere!==g))break;i.unshift(a)}for(let c=0;c<i.length;c++){let a=i[c];if(!a.media.features["min-width"]){if(a.order>=E)break;n=f-i.length+2+c}}}break}}}if(n===void 0)if(o===-1)n=u+1;else if(b!==-1)n=o+M(this.rules.slice(o),void 0,h=>h.media.features["max-width"]||h.media.features["min-width"]);else if(g){let h=o;for(;h<this.rules.length;h++){let p=this.rules[h];if(p.priority!==-1||!p.hasWhere||p.order>=E){n=h;break}}n===void 0&&(n=h)}else for(let h=o;h<=u;h++){n=h;let p=this.rules[h],f=p.media;if(p.priority!==-1||f.features["max-width"]||f.features["min-width"])break;if(p.hasWhere)n++;else if(p.order>=E)break}}else if(b===-1){if(g)n=this.rules.findIndex(o=>!o.hasWhere||o.media||o.priority!==-1||o.order>=E),n===-1&&(n=u+1);else{let o=0;for(;o<this.rules.length;o++){let h=this.rules[o];if(h.media||!h.hasWhere&&(h.order>=E||h.priority!==-1)){n=o;break}}n===void 0&&(n=o)}!n&&Object.keys(this.keyframes).length&&n++}else n=M(this.rules,void 0,o=>o.media);if(this.rules.splice(n,0,r),this.ruleBy[C]=r,this.style){let o=this.style.sheet,h=0,p=f=>{let m=this.rules[f];if(m){if(!m.natives.length)return p(f-1);let l=m.natives[m.natives.length-1].cssRule;for(let d=0;d<o.cssRules.length;d++)if(o.cssRules[d]===l){h=d+1;break}}};p(n-1);for(let f=0;f<r.natives.length;)try{let m=r.natives[f];o.insertRule(m.text,h),m.cssRule=o.cssRules[h++],f++}catch(m){console.error(m),r.natives.splice(f,1)}}r.config.insert?.call(r)}}get text(){return this.rules.map(s=>s.text).join("")}},S=j;A(S,"root"),A(S,"config",T),A(S,"instances",[]),A(S,"refresh",s=>{for(let r of j.instances)r.refresh(s)});O&&(window.MasterCSS=S);export{S as MasterCSS};
@@ -1 +1 @@
1
- export*from"./css.mjs";export*from"./rule.mjs";export*from"./theme.mjs";import{MasterCSS as E}from"./css.mjs";function a(t){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&t instanceof e||t instanceof Date||t instanceof RegExp)}function l(t){if(typeof Buffer<"u"&&Buffer&&t instanceof Buffer){let e=Buffer.alloc(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function c(t){let e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=c(r):a(r)?e[n]=l(r):e[n]=u({},r):e[n]=r}),e}function i(t,e){return e==="__proto__"?void 0:t[e]}function u(...t){let e={},r,n;return t.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(f){if(n=i(e,f),r=i(o,f),r!==e)if(typeof r!="object"||r===null){e[f]=r;return}else if(Array.isArray(r)){e[f]=c(r);return}else if(a(r)){e[f]=l(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){e[f]=u({},r);return}else{e[f]=u(n,r);return}})}),e}export*from"./methods/index.mjs";export*from"./config/index.mjs";export{E as default,u as extend};
1
+ export*from"./css.mjs";export*from"./rule.mjs";export*from"./theme.mjs";import{MasterCSS as d}from"./css.mjs";function a(t){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&t instanceof e||t instanceof Date||t instanceof RegExp)}function l(t){if(typeof Buffer<"u"&&Buffer&&t instanceof Buffer){let e=Buffer.alloc(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function c(t){let e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=c(r):a(r)?e[n]=l(r):e[n]=u({},r):e[n]=r}),e}function i(t,e){return e==="__proto__"?void 0:t[e]}function u(...t){let e={},r,n;return t.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(f){if(n=i(e,f),r=i(o,f),r!==e)if(typeof r!="object"||r===null){e[f]=r;return}else if(Array.isArray(r)){e[f]=c(r);return}else if(a(r)){e[f]=l(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){e[f]=u({},r);return}else{e[f]=u(n,r);return}})}),e}export*from"./methods/index.mjs";export*from"./config/index.mjs";export{d as default,u as extend};
@@ -1 +1 @@
1
- import{renderFromHTML as n}from"./render-from-html.mjs";function i(e,t){if(!e)return;let r=`<style id="master">${n(e,t)}</style>`;switch(t?.precedence??"highest"){case"highest":return e.replace(/<\/body>/,`${r}$&`);case"higher":return e.replace(/<\/head>/,`${r}$&`);default:return e.replace(/(<link[^>]*?rel="styleSheet".*?>|<style.*?>|<\/head>)/,`${r}$1`)}}export{i as renderIntoHTML};
1
+ import{renderFromHTML as t}from"./render-from-html.mjs";function i(r,e){if(!r)return;let n=`<style id="master">${t(r,e)}</style>`;return r.replace(/<\/head>/,`${n}$&`)}export{i as renderIntoHTML};
@@ -1 +1 @@
1
- function c(s){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&s instanceof e||s instanceof Date||s instanceof RegExp)}function h(s){if(typeof Buffer<"u"&&Buffer&&s instanceof Buffer){let e=Buffer.alloc(s.length);return s.copy(e),e}else{if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s);throw new Error("Unexpected situation")}}function l(s){let e=[];return s.forEach(function(t,i){typeof t=="object"&&t!==null?Array.isArray(t)?e[i]=l(t):c(t)?e[i]=h(t):e[i]=o({},t):e[i]=t}),e}function a(s,e){return e==="__proto__"?void 0:s[e]}function o(...s){let e={},t,i;return s.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(r){if(i=a(e,r),t=a(n,r),t!==e)if(typeof t!="object"||t===null){e[r]=t;return}else if(Array.isArray(t)){e[r]=l(t);return}else if(c(t)){e[r]=h(t);return}else if(typeof i!="object"||i===null||Array.isArray(i)){e[r]=o({},t);return}else{e[r]=o(i,t);return}})}),e}var u={store:"theme",init:!0},d=typeof document<"u",f=typeof localStorage<"u",m=class{constructor(e,t=d?document.documentElement:null){this.settings=e;this.host=t;this.settings=e?o(u,e):u,this.settings.init&&this.init()}e=typeof matchMedia<"u"?matchMedia?.("(prefers-color-scheme:dark)"):void 0;s;t;init(){let e=this.settings.default,t=this.storage;t&&(e=t),this.value=e}get storage(){let{store:e}=this.settings;if(f&&e)return localStorage.getItem(e)}get systemValue(){return this.e.matches?"dark":"light"}set value(e){this.s=e,e==="system"?(this.e?.addEventListener?.("change",this.i),this.current=this.systemValue):(this.r(),this.current=e)}get value(){return this.s}set current(e){let t=this.t;this.t=e,this.host&&(t&&this.host.classList.remove(t),this.host.classList.contains(e)||(this.host.classList.add(e),this.host.style&&(this.host.style.colorScheme=e)))}get current(){return this.t}switch(e,t={store:!0,emit:!0}){e&&e!==this.value&&(this.value=e,f&&this.storage!==e&&this.settings.store&&localStorage.setItem(this.settings.store,e),t.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this})))}r(){this.e?.removeEventListener("change",this.i)}i=e=>{this.current=e.matches?"dark":"light"};destroy(){this.r()}};function y(s){return s=Object.assign({store:"theme"},s),`let e${s.default?`='${s.default}'`:""};const c=localStorage.getItem("${s.store}");c&&(e=c);let t=e;e==="system"&&(t=matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light");const s=document.documentElement;s.classList.add(t);s.style.colorScheme=t;`}export{m as Theme,y as getDocThemeInitScript,u as themeSettings};
1
+ function c(s){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&s instanceof e||s instanceof Date||s instanceof RegExp)}function h(s){if(typeof Buffer<"u"&&Buffer&&s instanceof Buffer){let e=Buffer.alloc(s.length);return s.copy(e),e}else{if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s);throw new Error("Unexpected situation")}}function l(s){let e=[];return s.forEach(function(t,i){typeof t=="object"&&t!==null?Array.isArray(t)?e[i]=l(t):c(t)?e[i]=h(t):e[i]=o({},t):e[i]=t}),e}function a(s,e){return e==="__proto__"?void 0:s[e]}function o(...s){let e={},t,i;return s.forEach(function(r){typeof r!="object"||r===null||Array.isArray(r)||Object.keys(r).forEach(function(n){if(i=a(e,n),t=a(r,n),t!==e)if(typeof t!="object"||t===null){e[n]=t;return}else if(Array.isArray(t)){e[n]=l(t);return}else if(c(t)){e[n]=h(t);return}else if(typeof i!="object"||i===null||Array.isArray(i)){e[n]=o({},t);return}else{e[n]=o(i,t);return}})}),e}var f={store:"theme",init:!0},d=typeof document<"u",u=typeof localStorage<"u",m=class{constructor(e,t=d?document.documentElement:null){this.settings=e;this.host=t;this.settings=e?o(f,e):f,this.settings.init&&this.init()}e=typeof matchMedia<"u"?matchMedia?.("(prefers-color-scheme:dark)"):void 0;s;t;init(){let e=this.settings.default,t=this.storage;t&&(e=t),this.value=e}get storage(){let{store:e}=this.settings;if(u&&e)return localStorage.getItem(e)}get systemValue(){return this.e.matches?"dark":"light"}set value(e){this.s=e,e==="system"?(this.e?.addEventListener?.("change",this.i),this.current=this.systemValue):(this.n(),this.current=e)}get value(){return this.s}set current(e){let t=this.t;this.t=e,this.host&&t!==e&&(t&&this.host.classList.remove(t),e&&!this.host.classList.contains(e)&&(this.host.classList.add(e),this.host.style&&(this.host.style.colorScheme=e)))}get current(){return this.t}switch(e,t={store:!0,emit:!0}){e&&e!==this.value&&(this.value=e,u&&this.storage!==e&&this.settings.store&&localStorage.setItem(this.settings.store,e),t.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this})))}n(){this.e?.removeEventListener("change",this.i)}i=e=>{this.current=e.matches?"dark":"light"};destroy(){this.n()}};function y(s){return s=Object.assign({store:"theme"},s),`let e${s.default?`='${s.default}'`:""};const c=localStorage.getItem("${s.store}");c&&(e=c);let t=e;e==="system"&&(t=matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light");const s=document.documentElement;s.classList.add(t);s.style.colorScheme=t;`}export{m as Theme,y as getDocThemeInitScript,f as themeSettings};
@@ -1 +1 @@
1
- function e(){return setTimeout(()=>{})}export{e as default};
1
+ function n(e=0){return new Promise(t=>{setTimeout(t,e)})}export{n as default};
@@ -1 +1 @@
1
- (()=>{var Pe=Object.defineProperty;var Ue=(t,e,r)=>e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var oe=(t,e,r)=>(Ue(t,typeof e!="symbol"?e+"":e,r),r);function Re(t){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&t instanceof e||t instanceof Date||t instanceof RegExp)}function Ce(t){if(typeof Buffer<"u"&&Buffer&&t instanceof Buffer){let e=Buffer.alloc(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function Te(t){let e=[];return t.forEach(function(r,i){typeof r=="object"&&r!==null?Array.isArray(r)?e[i]=Te(r):Re(r)?e[i]=Ce(r):e[i]=K({},r):e[i]=r}),e}function Se(t,e){return e==="__proto__"?void 0:t[e]}function K(...t){let e={},r,i;return t.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(o){if(i=Se(e,o),r=Se(n,o),r!==e)if(typeof r!="object"||r===null){e[o]=r;return}else if(Array.isArray(r)){e[o]=Te(r);return}else if(Re(r)){e[o]=Ce(r);return}else if(typeof i!="object"||i===null||Array.isArray(i)){e[o]=K({},r);return}else{e[o]=K(i,r);return}})}),e}var ye=[":disabled",":active",":focus",":hover"];var ie={"(":")","'":"'",'"':'"',"{":"}"};function ue(t){if(typeof CSS<"u")return CSS.escape(t);if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");let e=String(t),r=e.length,i=-1,n="",o,h=e.charCodeAt(0);if(r==1&&h==45)return"\\"+e;for(;++i<r;){if(o=e.charCodeAt(i),o==0){n+="\uFFFD";continue}if(o>=1&&o<=31||o==127||i==0&&o>=48&&o<=57||i==1&&o>=48&&o<=57&&h==45){n+="\\"+o.toString(16)+" ";continue}if(o>=128||o==45||o==95||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122){n+=e.charAt(i);continue}n+="\\"+e.charAt(i)}return n}var He={unit:"",order:0,separators:[","]},fe=class{constructor(e,r={},i){this.className=e;this.meta=r;this.css=i;this.config=K(He,r.config);let{unit:n,order:o,colored:h,native:p,analyze:m,transform:l,declare:a,create:s}=this.config,{scope:c,important:b,functions:y}=i.config,{themeNames:k,colorNames:j,colorThemesMap:A,selectors:u,breakpoints:d,mediaQueries:f,themeAffectedClassesBy:w,globalValues:x}=i,R=w[e];this.order=o,s&&s.call(this,e);let C,W,E,Y,Z;if(r.origin==="semantics"){let[L,O]=r.value;Y=e.slice(L.length),C=O}else{let L;if(m)[L,E]=m.call(this,e);else if(r.origin==="match"){let T=e.indexOf(":");this.prefix=e.slice(0,T+1),this.prefix.includes("(")?(this.prefix=void 0,L=e):L=e.slice(T+1)}else r.origin==="symbol"&&(this.symbol=e[0],L=e.slice(1));Z=[];let O=this,N=this.values,F=[","];this.config.separators.length&&F.push(...this.config.separators);let S="",v=0;(function T(g,B,M,$=void 0,I=[],U=[],z){let Q=$===void 0,P,q=D=>D==="'"||D==='"',re=()=>P=S.length,G=()=>{if(S){let D=S,V=Q?D:S.slice(P);if(S="",X="",N&&V in N&&!I.includes(V)){let H=v;v=0,T(N[V].toString(),B,void 0,$,[...I,V],U,z),v=H,Q||(S=S.slice(0,P)+S)}else if(x&&V in x&&!U.includes(V)){let H=v;v=0,T(x[V].toString(),B,void 0,$,I,[...U,V],z),v=H,Q||(S=S.slice(0,P)+S)}else if(Q){let H=!z&&O.analyzeUnitValue(V,B);Z.push({value:H?.value??V,unit:H?.unit})}else{let H=!z&&O.analyzeUnitValue(V,B);S=H?D.slice(0,P)+H.value+H.unit:D}re()}},J=q(M);re();let X="";for(;v<g.length;v++){let D=g[v];if(D===M){if(J){S+=D;let V=0;for(let H=S.length-2;S[H]==="\\";H--)V++;if(V%2)continue}else G(),S+=D;return}else if(!J&&D in ie){let V=D==="("&&X&&y?.[X];V?.name&&(S=S.slice(0,S.length-X.length)+V.name,X=V.name),S+=D,v++;let H=ie[D];T(g,V?.unit??B,H,X||$||"",I,U,z||!!V?.transform),V?.transform&&(S=S.slice(0,P+X.length+1)+V.transform.call(O,S.slice(P+X.length+1,-1))+S.slice(-1)),Q&&(q(H)?(Z.push(S),S=""):G()),X=""}else if((D==="|"||D===" ")&&M!=="}"&&(!J||$==="path"))G(),Q||(S+=" ",P++);else{if(!J){if(D==="."){if(isNaN(+g[v+1]))break;g[v-1]==="-"&&(S+="0")}else if(F.includes(D)){G(),Q?Z.push(D):(S+=D,P++);continue}else if(Q&&(D==="#"&&(S||Z.length&&g[v-1]!=="|"&&Z[v-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(D)))break;X+=D}S+=D}}$===void 0&&G()})(L,n),Y=L.slice(v)}Y[0]==="!"&&(this.important=!0,Y=Y.slice(1));let we=L=>{let O=L.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((v,T)=>T%3?v:v.replace(/_/g," ")).join(""),N=[],F="",S=0;for(let v=0;v<O.length;v++){let T=O[v];if(T==="\\"){F+=T+O[++v];continue}!S&&T===","?(N.push(F),F=""):(F+=T,S&&T===")"?S--:T==="("&&S++)}return F&&N.push(F),N};this.prefixSelectors=E?we(E):[""];let be=Y.split("@"),ve=be[0];if(ve){this.vendorSuffixSelectors={};let L=(v,T,g,B)=>{for(let[M,$]of T)if(M.test(v)){for(let I of $)L(v.replace(M,I),T,g,!0);return}B&&g.push(v)},O=[];""in u?L(ve,u[""],O,!0):O.push(ve);let N={};for(let[v,T]of Object.entries(u)){if(!v)continue;let g=[];for(let B of O)L(B,T,g,!1);g.length&&(N[v]=g)}let F=(v,T)=>{let g=T.reduce((B,M)=>(B.push(...we(M)),B),[]);v in this.vendorSuffixSelectors?this.vendorSuffixSelectors[v].push(...g):this.vendorSuffixSelectors[v]=g},S=Object.keys(N);if(S.length)for(let v of S)F(v,N[v]);else F("",O);for(let v of Object.values(this.vendorSuffixSelectors))for(let T of v){this.hasWhere!==!1&&(this.hasWhere=T.includes(":where("));for(let g=0;g<ye.length;g++)if(T.includes(ye[g])){(this.priority===-1||this.priority>g)&&(this.priority=g);break}}}else this.vendorSuffixSelectors={"":[""]};for(let L=1;L<be.length;L++){let O=be[L];if(O)if(k.includes(O))this.theme=O;else if(O==="rtl"||O==="ltr")this.direction=O;else{let N,F,S=O.indexOf("_");if(S!==-1)N=O.slice(0,S),F=O.slice(S);else{let v=O.indexOf("(");v!==-1&&(N=O.slice(0,v),F=O.slice(v))}if(!N){N="media";let v=[];this.media={token:O,features:{}};let T=O.split("&");for(let g of T)if(g==="all"||g==="print"||g==="screen"||g==="speech")this.media.type=g;else if(g==="\u{1F5A8}")this.media.type="print";else if(g==="landscape"||g==="portrait")v.push("(orientation:"+g+")");else if(g==="motion"||g==="reduced-motion")v.push("(prefers-reduced-motion:"+(g==="motion"?"no-preference":"reduce")+")");else if(f&&g in f)v.push(f[g]);else{let B={token:g},M="",$="",I=0;g.startsWith("<=")?($="<=",M="max-width"):g.startsWith(">=")||d[g]?($=">=",M="min-width"):g.startsWith(">")?($=">",M="min-width",I=.02):g.startsWith("<")&&($="<",M="max-width",I=-.02);let U=$?g.replace($,""):g,z=d[U];switch(M){case"max-width":case"min-width":z?Object.assign(B,this.analyzeUnitValue(z.toString(),"px")):Object.assign(B,this.analyzeUnitValue(U,"px")),B.unit==="px"&&(B.value+=I),this.media.features[M]=B,v.push("("+M+":"+(B.value+B.unit)+")");break}}F="",this.media.type&&(F=this.media.type),v.length&&(F+=(F?" and ":"")+v.join(" and "))}F&&(this.at[N]=(N in this.at?this.at[N]+" and ":"")+F.replace(/_/g," "))}}let xe=(L,O)=>{let N,F=(T,g,B)=>{let M="";this.direction&&(M+="[dir="+this.direction+"] ");let $=this.prefixSelectors.map(z=>z+M),I=(z,Q)=>$.map(P=>(z?"."+z+" ":"")+(c?c+" ":"")+P).reduce((P,q)=>(P.push(B.reduce((re,G)=>(re.push(q+"."+ue(Q)+G),re),[]).join(",")),P),[]).join(","),U=I(g,e)+(R?Object.entries(R).filter(([z])=>this.theme||!h||!g||!z||z===g).map(([z,Q])=>Q.reduce((P,q)=>P+","+I(this.theme??((h||W)&&g||z),q),"")).join(""):"")+"{"+T+"}";for(let z of Object.keys(this.at).sort((Q,P)=>P==="supports"?-1:1))U="@"+z+" "+this.at[z]+"{"+U+"}";return U},S=[];if(Z){let T=this.theme?[this.theme,""]:[L],g,B;for(let M of Z)if(typeof M=="string")S.push(M);else{let $=M.value;if(M.unit)$+=M.unit;else if(h&&A&&j){let I=!1,U=!1;$=$.replace(new RegExp(`(^|,| |\\()((?:${j.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(z,Q,P,q)=>{U=!0;let re=A[P];if(re){let G;for(let J of T)if(G=re[J])break;if(G){I=!0;let J=G;if(q){let X=q.endsWith("%")?parseFloat(q)/100:+q;X=isNaN(X)?1:Math.min(Math.max(X,0),1),J+=Math.round(X*255).toString(16).toUpperCase().padStart(2,"0")}return Q+J}}return z}),U&&(B=I)}B!==void 0&&!g&&(g=B),S.push($)}if(O&&(g===void 0?L:!g))return;if(N=S.reduce((M,$,I)=>M+$+($===","||Z[I+1]===","||I===Z.length-1?"":" "),""),l&&(N=l.call(this,N,this.css.config)),h&&N==="current"&&(N="currentColor"),a){let M,$;if(Z.length===1){let I=Z[0];typeof I=="object"&&(M=I.value,$=I.unit)}C=a.call(this,$?M:N,$||"")}else C={[p]:N}}let v={};for(let T in C){let g=($,I)=>{let U=I+((this.important||b)&&!I.endsWith("!important")?"!important":"");$ in v?v[$].push(U):v[$]=[U]},B=T+":",M=C[T];if(typeof M=="object"){W=!0;for(let $ in M)g($,B+M[$])}else g(L,B+M.toString())}for(let T of Object.values(this.vendorSuffixSelectors))for(let g in v)this.natives.push({text:F(v[g].join(";"),g,T),theme:g})};if(this.theme)xe(this.theme,!1);else if(h)for(let L of k)xe(L,!0);else xe("",!1)}at={};priority=-1;natives=[];keyframeNames;config;get values(){return this.css.values[this.config.id]}get text(){return this.natives.map(e=>e.text).join("")}resolveValue(e,r){return Number.isNaN(+e)?e:e/(r==="rem"||r==="em"?this.css.config.rootSize:1)+r}analyzeUnitValue(e,r){let i=r??this.config.unit;if(i){let n="",o=e.match(/^([+-.]?\d+(\.?\d+)?)(.*)?/);if(o)if(e.includes("/")){let[h,p]=e.split("/");return{value:+h/+p*100+"%",unit:n}}else{let h=+o[1];return n=o[3]||"",n||((i==="rem"||i==="em")&&(h=h/this.css.config.rootSize),n=i||""),{value:h,unit:n}}}}};var ae={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560};function le(t){t.startsWith("#")&&(t=t.slice(1));let e=t.match(/.{1,2}/g);return[parseInt(e[0],16),parseInt(e[1],16),parseInt(e[2],16)]}function he(t,e,r){return((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1)}function _(t){typeof t=="string"&&(t={"":t});let e=""in t,r=!1;for(let i in t)if(i&&+i>=100){r=!0;break}if(!r&&(!e||Object.keys(t).length>1)){let i=0,n="0"in t?le(t[0]):[0,0,0],o,h,p=[],m=()=>{let l=o-i,a=h.map((s,c)=>(s-n[c])/l);for(let s of p){let c=s-i,b=n.map((y,k)=>Math.round(y+a[k]*c));t[s]="#"+he.call(this,...b)}};for(let l=1;l<100;l++)l in t?(p.length?(o=l,h=le(t[l]),m(),p.length=0,n=h):n=le(t[l]),i=l):p.push(l);p.length&&(o=100,h="100"in t?le(t[100]):[255,255,255],m())}return e||(t[""]=t[r?"500":"50"]),t}var $e={black:"#000000",white:"#ffffff",slate:_({5:"#141e2b",10:"#19212d",20:"#262f3e",30:"#323e52",40:"#41516b",50:"#616a84",55:"#6c7693",60:"#959db3",70:"#a3abbf",80:"#d7dae3",95:"#f6f7f8"}),gray:_({5:"#1e1d1f",10:"#212022",20:"#2f2e30",30:"#3e3d40",40:"#504f52",50:"#6b6a6d",55:"#777679",60:"#9e9da0",70:"#abaaae",80:"#dad9db",95:"#f5f4f7"}),brown:_({5:"#271b15",10:"#2b1e18",20:"#3c2b22",30:"#50382c",40:"#694839",50:"#8d604b",55:"#9d6b53",60:"#b79788",70:"#c1a598",80:"#efd5c9",95:"#faf2ef"}),orange:_({5:"#2e1907",10:"#331b07",20:"#47260b",30:"#5d320e",40:"#7a4111",50:"#a15717",55:"#b4611a",60:"#e38739",70:"#e79855",80:"#f7d4b5",95:"#fcf1e7"}),gold:_({5:"#281b00",10:"#2d1e01",20:"#3f2a00",30:"#543800",40:"#6d4900",50:"#906000",55:"#9c6d00",60:"#d09100",70:"#dca000",80:"#fbd67f",95:"#fff3d8"}),yellow:_({5:"#251d00",10:"#282000",20:"#3a2e01",30:"#4b3b00",40:"#624e00",50:"#806700",55:"#8e7200",60:"#be9900",70:"#d0a700",80:"#edda8f",95:"#fff5ca"}),grass:_({5:"#162106",10:"#182406",20:"#223308",30:"#2c4408",40:"#3a570b",50:"#4e750e",60:"#74ae15",70:"#7dbc17",80:"#bfe87c",95:"#ebfad4"}),green:_({5:"#042311",10:"#032611",20:"#023717",30:"#03481f",40:"#025d26",50:"#067b34",55:"#07883a",60:"#09b64d",70:"#0ac553",80:"#80f1a4",95:"#e0fae8"}),beryl:_({5:"#002319",10:"#00271c",20:"#003626",30:"#004732",40:"#005c41",50:"#007954",55:"#00875e",60:"#00b37c",70:"#00c387",80:"#72f0c5",95:"#d6fcef"}),teal:_({5:"#012220",10:"#012624",20:"#003532",30:"#004541",40:"#005a54",50:"#00776f",55:"#00857c",60:"#00b1a5",70:"#00bfb2",80:"#6aeee5",95:"#d4fcf8"}),cyan:_({5:"#00222b",10:"#00252e",20:"#013340",30:"#004457",40:"#00576f",50:"#007391",55:"#0080a1",60:"#00abd7",70:"#00b9e9",80:"#97e6fa",95:"#dff8ff"}),sky:_({5:"#031f34",10:"#032339",20:"#04314e",30:"#044169",40:"#065386",50:"#086eb3",55:"#097ac5",60:"#29a4f5",70:"#4db3f7",80:"#b3e0ff",95:"#eaf6fe"}),blue:_({5:"#07194a",10:"#081c53",20:"#0a2773",30:"#0e3496",40:"#1146b6",50:"#175fe9",55:"#2671ea",60:"#6b9ef1",70:"#81acf3",80:"#c6dbfe",95:"#edf4fe"}),indigo:_({5:"#1f1645",10:"#20174f",20:"#2b1f74",30:"#37289d",40:"#463fb1",50:"#5a5bd5",55:"#6464f1",60:"#9393f5",70:"#a1a5ee",80:"#d5d7fe",95:"#f1f2ff"}),violet:_({5:"#2b0a4e",10:"#2e0b57",20:"#3d1179",30:"#4e169f",40:"#5f2eba",50:"#7949e5",55:"#8755f5",60:"#ac8af8",70:"#b89bf9",80:"#e1d4fe",95:"#f5f1ff"}),purple:_({5:"#2e0c47",10:"#330c4e",20:"#460f6c",30:"#5b1390",40:"#7421b1",50:"#9832e4",55:"#a348e7",60:"#c184ef",70:"#ca96f1",80:"#ead1fe",95:"#f9f0ff"}),fuchsia:_({5:"#39092a",10:"#400932",20:"#560d4a",30:"#6f1165",40:"#8c158a",50:"#b61cbb",55:"#ca1fce",60:"#e66ee9",70:"#ea86ed",80:"#facbfb",95:"#feefff"}),pink:_({5:"#3d0722",10:"#430725",20:"#5d0933",30:"#790d44",40:"#9a1058",50:"#ca1473",55:"#e11681",60:"#f170b4",70:"#f388c0",80:"#fdcde6",95:"#fff0f8"}),crimson:_({5:"#430213",10:"#470314",20:"#62041c",30:"#800524",40:"#9f1036",50:"#ce1a4b",55:"#e8144c",60:"#f37596",70:"#f58ba7",80:"#fdceda",95:"#fff1f4"}),red:_({5:"#450001",10:"#490102",20:"#640304",30:"#800506",40:"#a11012",50:"#d11a1e",55:"#ed0a0e",60:"#f97476",70:"#fa8b8d",80:"#fdcfcf",95:"#fff1f1"})};var Me="";var Ee={"::scrollbar":"::-webkit-scrollbar","::scrollbar-button":"::-webkit-scrollbar-button","::scrollbar-thumb":"::-webkit-scrollbar-thumb","::scrollbar-track":"::-webkit-scrollbar-track","::scrollbar-track-piece":"::-webkit-scrollbar-track-piece","::scrollbar-corner":"::-webkit-scrollbar-corner","::slider-thumb":["::-webkit-slider-thumb","::-moz-range-thumb"],"::slider-runnable-track":["::-webkit-slider-runnable-track","::-moz-range-track"],"::meter":"::-webkit-meter","::resizer":"::-webkit-resizer","::progress":"::-webkit-progress",":first":":first-child",":last":":last-child",":even":":nth-child(2n)",":odd":":nth-child(odd)",":nth(":":nth-child("};var Oe={square:{"aspect-ratio":"1/1"},video:{"aspect-ratio":"16/9"},rounded:{"border-radius":"1e9em"},round:{"border-radius":"50%"},hidden:{display:"none"},hide:{display:"none"},block:{display:"block"},table:{display:"table"},flex:{display:"flex"},grid:{display:"grid"},contents:{display:"contents"},inline:{display:"inline"},"inline-block":{display:"inline-block"},"inline-flex":{display:"inline-flex"},"inline-grid":{display:"inline-grid"},"inline-table":{display:"inline-table"},"table-cell":{display:"table-cell"},"table-caption":{display:"table-caption"},"flow-root":{display:"flow-root"},"list-item":{display:"list-item"},"table-row":{display:"table-row"},"table-column":{display:"table-column"},"table-row-group":{display:"table-row-group"},"table-column-group":{display:"table-column-group"},"table-header-group":{display:"table-header-group"},"table-footer-group":{display:"table-footer-group"},italic:{"font-style":"italic"},oblique:{"font-style":"oblique"},isolate:{isolation:"isolate"},overflow:{overflow:"visible"},untouchable:{"pointer-events":"none"},static:{position:"static"},fixed:{position:"fixed"},abs:{position:"absolute"},rel:{position:"relative"},sticky:{position:"sticky"},uppercase:{"text-transform":"uppercase"},lowercase:{"text-transform":"lowercase"},capitalize:{"text-transform":"capitalize"},visible:{visibility:"visible"},invisible:{visibility:"hidden"},vw:{width:"100vw"},vh:{height:"100vh"},"max-vw":{"max-width":"100vw"},"max-vh":{"max-height":"100vh"},"min-vw":{"min-width":"100vw"},"min-vh":{"min-height":"100vh"},"center-content":{"justify-content":"center","align-items":"center"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)","white-space":"nowrap","border-width":"0"},full:{width:"100%",height:"100%"},center:{left:0,right:0,"margin-left":"auto","margin-right":"auto"},middle:{top:0,bottom:0,"margin-top":"auto","margin-bottom":"auto"},"break-spaces":{"white-space":"break-spaces"},"break-word":{"overflow-wrap":"break-word",overflow:"hidden"}};var Be=["dark","light"];var se={content:"content-box",border:"border-box",padding:"padding-box"};var ce={min:"min-content",max:"max-content"};var ee={full:"100%",fit:"fit-content",max:"max-content",min:"min-content"};for(let t in ae)ee[t]=ae[t]/16+"rem";var Ye={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(t){let e=0;for(;e<t.length&&!(t[e]==="{"&&t[e-1]!=="\\");e++);return[t.slice(e),t.slice(0,e)]},declare(t){let e={},r=(l,a)=>{let s=a.indexOf(":");if(s!==-1){l in e||(e[l]={});let c=e[l],b=a.slice(0,s);b in c||(c[b]=a.slice(s+1))}},i=l=>{let a=(s,c)=>{let b=c.slice(ue(l.className).length).match(/\{(.*)\}/)[1].split(";");for(let y of b)r(s,y)};if(this.theme){let s=l.natives.find(c=>c.theme===this.theme)??l.natives.find(c=>!c.theme);s&&a(this.theme,s.text)}else for(let s of l.natives)a(s.theme,s.text)},n=[],o="",h=()=>{o&&(n.push(o.replace(/ /g,"")),o="")},p=1;(function l(a){for(;p<t.length;p++){let s=t[p];if(!a){if(s===";"){h();continue}if(s==="}")break}if(o+=s,a===s){if(a==="'"||a==='"'){let c=0;for(let b=o.length-2;o[b]==="\\";b--)c++;if(c%2)continue}break}else s in ie&&a!=="'"&&a!=='"'&&(p++,l(ie[s]))}})(void 0),h();for(let l of n){let a=this.css.create(l);if(Array.isArray(a))for(let s of a)i(s);else a?i(a):r(this.theme??"",l)}let m={};for(let l in e)for(let[a,s]of Object.entries(e[l]))a in m?m[a][l]=s:m[a]={[l]:s};return m}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(t){return{["--"+this.prefix.slice(1,-1)]:t}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(t){let e={};switch(t){case"subpixel-antialiased":e["-webkit-font-smoothing"]=e["-moz-osx-font-smoothing"]="auto";break;case"antialiased":e["-webkit-font-smoothing"]="antialiased",e["-moz-osx-font-smoothing"]="grayscale";break}return e}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},margin:{match:"^m(?:argin(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(t,e){return Ie.call(this,t+e)},get order(){return this.prefix==="margin:"||this.prefix==="m:"?-1:0}},padding:{match:"^p(?:adding(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(t,e){return Ie.call(this,t+e)},get order(){return this.prefix==="padding:"||this.prefix==="p:"?-1:0}},flexBasis:{values:ee,unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:ee},height:{match:"^h:.",unit:"rem",native:!0,values:ee},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:ee},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:ee},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t]},declare(t){let[e,r]=t.split(" x ");return{width:e,height:r}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,r]=t.split(" x ");return{"min-width":e,"min-height":r}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,r]=t.split(" x ");return{"max-width":e,"max-height":r}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},inset:{match:"^(?:top|bottom|left|right):.",unit:"rem",native:!0,declare(t,e){return{[this.prefix.slice(0,-1)]:t+e}}},lines:{match:"^lines:.",declare(t,e){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":t+e}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:ee},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:ee},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflow:{match:"^overflow(?:-x|-y)?:(?:visible|overlay|hidden|scroll|auto|clip|inherit|initial|revert|revert-layer|unset|\\$|var|$values)",declare(t,e){if(this.prefix)switch(this.prefix.slice(-2,-1)){case"x":return{"overflow-x":t+e};case"y":return{"overflow-y":t+e}}return{overflow:t+e}},get order(){return-1}},overscrollBehavior:{match:"^overscroll-behavior(?:-[xy])?:",declare(t,e){switch(this.prefix.slice(-2,-1)){case"x":return{"overscroll-behavior-x":t+e};case"y":return{"overscroll-behavior-y":t+e};default:return{"overscroll-behavior":t+e}}}},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(t,e){return{"user-drag":t+e,"-webkit-user-drag":t+e}}},userSelect:{native:!0,declare(t,e){return{"user-select":t+e,"-webkit-user-select":t+e}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(t,e){return{"font-size":t+e,"line-height":e==="em"?t+.875+e:`calc(${t}${e} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-fill-color":t+e}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(t,e){return{"-webkit-text-stroke-width":t+e}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-stroke-color":t+e}}},textStroke:{unit:"rem",native:!0,declare(t,e){return{"-webkit-text-stroke":t+e}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{...se,fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(t){return je.call(this,t)},delete(t){return Ae.call(this,t)},insert(){return Ne.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(t){return je.call(this,t)},delete(t){return Ae.call(this,t)},insert(){return Ne.call(this)}},borderColor:{match:"^b(?:[xytblr]|(?:order(?:-(?:left|right|top|bottom))?))?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(t,e){return de(this.prefix,t+e,"color")},get order(){return this.prefix==="border-color:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderRadius:{match:"^(?:r[tblr]?[tblr]?|border(?:-(?:top|bottom)-(?:left|right))?-radius):.",unit:"rem",declare(t,e){if(this.prefix){let i="",n=this.prefix.split("-");if(n.length>1)for(let o=1;o<n.length-1;o++)i+=n[o][0];else i=this.prefix.slice(1,-1);switch(i){case"t":return{"border-top-left-radius":t+e,"border-top-right-radius":t+e};case"tl":case"lt":return{"border-top-left-radius":t+e};case"rt":case"tr":return{"border-top-right-radius":t+e};case"b":return{"border-bottom-left-radius":t+e,"border-bottom-right-radius":t+e};case"bl":case"lb":return{"border-bottom-left-radius":t+e};case"br":case"rb":return{"border-bottom-right-radius":t+e};case"l":return{"border-top-left-radius":t+e,"border-bottom-left-radius":t+e};case"r":return{"border-top-right-radius":t+e,"border-bottom-right-radius":t+e};default:return{"border-radius":t+e}}}let r=this.prefix?.slice(0,-1);return{[["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].includes(r)?r:"border-radius"]:t+e}},get order(){return this.prefix==="border-radius:"||this.prefix==="r:"?-1:0}},borderStyle:{match:"^(?:border(?:-(?:left|right|top|bottom))?-style:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|))",declare(t,e){return de(this.prefix,t+e,"style")},get order(){return this.prefix==="border-style:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderWidth:{match:"^(?:border(?:-(?:left|right|top|bottom))?-width:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$)",unit:"rem",declare(t,e){return de(this.prefix,t+e,"width")},get order(){return this.prefix==="border-width:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0},border:{match:"^b(?:[xytblr]?|order(?:-(?:left|right|top|bottom))?):.",unit:"rem",colored:!0,values:{current:"currentColor"},declare(t,e){return de(this.prefix,t+e)},get order(){return this.prefix==="border:"||this.prefix==="b:"?-2:-1}},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(t,e){return{"-webkit-background-clip":t+e,"background-clip":t+e}},values:se},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:se},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"backdrop-filter":t+e,"-webkit-backdrop-filter":t+e}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridColumns:{match:"^grid-cols:.",declare(t,e){return{display:"grid","grid-template-columns":"repeat("+t+e+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridRows:{declare(t,e){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+t+e+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:ce},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:ce,native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:ce},gridTemplateRows:{native:!0,unit:"rem",values:ce},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gap:{match:"^gap(?:-x|-y)?:.",unit:"rem",order:-1,declare(t,e){switch(this.prefix[4]){case"x":return{"column-gap":t+e};case"y":return{"row-gap":t+e};default:return{gap:t+e}}}},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(t,e){return{"box-decoration-break":t+e,"-webkit-box-decoration-break":t+e}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMargin:{match:"^scroll-m(?:[xytblr]|argin(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(t,e){if(this.prefix.slice(-3,-2)==="m")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-margin-left":t+e,"scroll-margin-right":t+e};case"y":return{"scroll-margin-top":t+e,"scroll-margin-bottom":t+e};case"l":return{"scroll-margin-left":t+e};case"r":return{"scroll-margin-right":t+e};case"t":return{"scroll-margin-top":t+e};case"b":return{"scroll-margin-bottom":t+e}}else return{[this.prefix.replace(/-m(?!argin)/,"-margin").slice(0,-1)]:t+e}},get order(){return this.prefix==="scroll-margin:"||this.prefix==="scroll-m:"?-1:0}},scrollPadding:{match:"^scroll-p(?:[xytblr]|adding(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(t,e){if(this.prefix.slice(-3,-2)==="p")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-padding-left":t+e,"scroll-padding-right":t+e};case"y":return{"scroll-padding-top":t+e,"scroll-padding-bottom":t+e};case"l":return{"scroll-padding-left":t+e};case"r":return{"scroll-padding-right":t+e};case"t":return{"scroll-padding-top":t+e};case"b":return{"scroll-padding-bottom":t+e}}else return{[this.prefix.replace(/-p(?!adding)/,"-padding").slice(0,-1)]:t+e}},get order(){return this.prefix==="scroll-padding:"||this.prefix==="scroll-p:"?-1:0}},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{...se,margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{...se,margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(t,e){return{"mask-image":t+e,"-webkit-mask-image":t+e}}}},We=Ye;function je(t){if(!this.css.config.keyframes)return;let e=(this.meta.origin==="symbol"?t.slice(this.meta.config.symbol.length):t.slice(t.indexOf(":")+1)).split("|").filter(r=>r in this.css.config.keyframes);e?.length&&(this.keyframeNames=e)}function Ae(){if(this.keyframeNames?.length){let t=this.css.rules[0];for(let e of this.keyframeNames){let r=this.css.keyframes[e];if(!--r.count){let i=t.natives.indexOf(r.native);this.css.style.sheet.deleteRule(i),t.natives.splice(i,1),delete this.css.keyframes[e]}}t.natives.length||this.css.rules.splice(0,1)}}function Ne(){if(this.keyframeNames){let{config:t,keyframes:e,style:r,rules:i}=this.css,n=r?.sheet;for(let o of this.keyframeNames)if(o in e)e[o].count++;else{let h={text:`@keyframes ${o} {`+Object.entries(t.keyframes[o]).map(([m,l])=>`${m} {${Object.entries(l).map(([a,s])=>a+": "+s).join(";")}}`).join(",")+"}",theme:""},p;if(Object.keys(e).length?(p=i[0]).natives.push(h):i.splice(0,0,p={natives:[h],get text(){return this.natives.map(m=>m.text).join("")}}),n){let m;for(let l=0;l<n.cssRules.length;l++){let a=n.cssRules[l];if(a.constructor.name!=="CSSKeyframesRule")break;if(a.name===o){m=a;break}}if(m)h.cssRule=m;else{let l=p.natives.length-1;n.insertRule(h.text,l),h.cssRule=n.cssRules[l]}}e[o]={native:h,count:1}}}}function Ie(t){if(this.prefix.includes("-"))return{[this.prefix.slice(0,-1)]:t};let r=this.prefix[0]==="m"?"margin":"padding",i=r+"-left",n=r+"-right",o=r+"-top",h=r+"-bottom";switch(this.prefix[1]){case"x":return{[i]:t,[n]:t};case"y":return{[o]:t,[h]:t};case"l":return{[i]:t};case"r":return{[n]:t};case"t":return{[o]:t};case"b":return{[h]:t};default:return{[r]:t}}}function de(t,e,r=""){let i="border-";r&&(r="-"+r);let n=/^b(order)?-?(.)?/.exec(t)[2],o=i+"left"+r,h=i+"right"+r,p=i+"top"+r,m=i+"bottom"+r;switch(n){case"x":return{[o]:e,[h]:e};case"y":return{[p]:e,[m]:e};case"l":return{[o]:e};case"r":return{[h]:e};case"t":return{[p]:e};case"b":return{[m]:e};default:return{["border"+r]:e}}}var Le={fade:{from:{opacity:0},to:{opacity:0}},flash:{"from,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},"100%":{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,100%":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(0.8, 0, 1, 1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0, 0, 0.2, 1)"}},ping:{"75%,100%":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},"100%":{transform:"none"}},rotate:{from:{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{from:{transform:"scale(0)"},"100%":{transform:"none"}}};var ke={$:{name:"var",transform(t){return"--"+t}},calc:{transform(t){let e=m=>m==="+"||m==="-"||m==="*"||m==="/",r="",i,n="",o=!1,h=!1,p=(m,l="",a="")=>{if(i===2&&!h){let s=this.analyzeUnitValue(n,ke.calc.unit);s&&(n=s.value+s.unit)}r+=n+l+m+a,i=null,h=!1,n=""};for(let m=0;m<t.length;m++){let l=t[m];if(l==="("||l===")")o=l===")",p(l);else if(l===",")p(l,""," ");else{switch(i){case 1:break;case 2:if(e(l)){p(l," "," ");continue}else/[0-9]/.test(l)||(h=!0);break;default:o&&(r+=" "),isNaN(+l)?e(l)||(i=1):i=2;break}i?n+=l:r+=l}}return p(""),r}},translate:{unit:"rem"},translateX:{unit:"rem"},translateY:{unit:"rem"},translateZ:{unit:"rem"},translate3d:{unit:"rem"},skew:{unit:"deg"},skewX:{unit:"deg"},skewY:{unit:"deg"},skewZ:{unit:"deg"},skew3d:{unit:"deg"},rotate:{unit:"deg"},rotateX:{unit:"deg"},rotateY:{unit:"deg"},rotateZ:{unit:"deg"},rotate3d:{unit:"deg"},blur:{unit:"rem"},"drop-shadow":{unit:"rem"},"hue-rotate":{unit:"deg"},rgb:{unit:""},rgba:{unit:""},hsl:{unit:""},hsla:{unit:""}};var ze="highest";var me={breakpoints:ae,colors:$e,rootSize:16,scope:Me,selectors:Ee,semantics:Oe,themes:Be,rules:We,override:!1,observe:!0,important:!1,functions:ke,keyframes:Le,precedence:ze};var De=[",",".","#","[","!","*",">","+","~",":","@"];var ge=typeof window<"u",Fe=()=>{let t=document.createElement("style");return t.id="master",t.setAttribute("blocking","render"),t},ne=class{constructor(e){this.config=e;this.config?.override||(this.config=K(me,e)),this.cache(),ge&&this.config.observe&&this.observe(document),ne.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer=ge?new MutationObserver(e=>{let r={},i=[],n=[],o=[],h=(a,s)=>{s?a.classList.forEach(m):a.classList.forEach(p);let c=a.children;for(let b=0;b<c.length;b++){let y=c[b];y.classList&&(n.push(y),h(y,s))}},p=a=>{a in r?r[a]++:r[a]=1},m=a=>{a in r?r[a]--:a in this.countBy&&(r[a]=-1)},l=(a,s)=>{for(let c=0;c<a.length;c++){let b=a[c];b.classList&&!n.includes(b)&&!o.includes(b)&&(b.isConnected!==s?(n.push(b),h(b,s)):o.push(b))}};for(let a=0;a<e.length;a++){let s=e[a],{addedNodes:c,removedNodes:b,type:y,target:k}=s;if(y==="attributes"){if(i.find(j=>j.target===k))continue;i.push(s)}else l(c,!1),(!k.isConnected||!n.includes(k))&&l(b,!0)}if(!(!i.length&&!Object.keys(r).length)){for(let{oldValue:a,target:s}of i){let c=n.includes(s),b=s.classList,y=a?a.split(" "):[];if(c){if(s.isConnected)continue;for(let k of y)b.contains(k)||m(k)}else if(s.isConnected){b.forEach(k=>{y.includes(k)||p(k)});for(let k of y)b.contains(k)||m(k)}}for(let a in r){let s=r[a],c=(this.countBy[a]||0)+s;c===0?(delete this.countBy[a],this.delete(a)):(a in this.countBy||this.insert(a),this.countBy[a]=c)}}}):null;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:r,selectors:i,themes:n,colors:o,values:h,breakpoints:p,mediaQueries:m,rules:l}=this.config;function a(u){return u.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(u,d,f="",w={}){let x=E=>E?(f?f+"-":"")+E:f,R=Object.entries(u),C=[],W=[];for(let E of R){let Y=E[1];(typeof Y=="object"&&!Array.isArray(Y)?C:W).push(E)}for(let[E,Y]of C)s(Y,d,x(E),w);if(d&&f)W.length&&(w[f]=W.reduce((E,[Y,Z])=>(E[Y]=Z,E),{}));else for(let[E,Y]of W)w[x(E)]=Y;return w}if(e)for(let[u,d]of Object.entries(s(e,!0)))this.semantics.push([new RegExp("^"+a(u)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[u,d]]);if(i)for(let[u,d]of Object.entries(s(i,!1))){let f=new RegExp(a(u)+"(?![a-z-])");for(let w of Array.isArray(d)?d:[d]){let x=w.match(/^::-[a-z]+-/m)?.[0]??"",R=this.selectors[x];R||(R=this.selectors[x]=[]);let C=R.find(([W])=>W===f);C||(C=[f,[]],R.push(C)),C[1].push(w)}}h&&(this.globalValues=s(h,!1)),p&&(this.breakpoints=s(p,!1)),m&&(this.mediaQueries=s(m,!1));let c=r?s(r,!1):{},b=n&&!Array.isArray(n)?Object.entries(n).filter(([,{classes:u}])=>u).reduce((u,[d,{classes:f}])=>(u[d]=s(f,!1),u),{}):{},y=[...Object.keys(c),...Object.entries(b).flatMap(([u,d])=>Object.keys(d))],k=u=>{if(u in this.classes)return;let d=this.classes[u]=[],f=(w,x)=>{if(!x)return;let R=Array.isArray(x)?x:x.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let C of R){let W=E=>{E in this.themeAffectedClassesBy?w in this.themeAffectedClassesBy[E]?this.themeAffectedClassesBy[E][w].push(u):this.themeAffectedClassesBy[E][w]=[u]:this.themeAffectedClassesBy[E]={[w]:[u]},d.includes(E)||d.push(E)};if(y.includes(C)){k(C);for(let E of this.classes[C])W(E)}else W(C)}};f("",c?.[u]);for(let[w,x]of Object.entries(b))f(w,x?.[u])};for(let u of y)k(u);for(let u in this.themeAffectedClassesBy){let d=this.classesBy[u]=[];for(let f of Object.values(this.themeAffectedClassesBy[u]))for(let w of f)d.includes(w)||d.push(w)}let j=(u,d)=>{if(!d)return;let f=s(d,!0);for(let[w,x]of Object.entries(f)){let R=typeof x=="string"?{"":x}:x;for(let[C,W]of Object.entries(R)){let E=w+(C?"-"+C:"");E in this.colorThemesMap?this.colorThemesMap[E][u]=W:this.colorThemesMap[E]={[u]:W}}}for(let w in d)this.colorNames.includes(w)||this.colorNames.push(w)};if(j("",o),n)if(Array.isArray(n))this.themeNames.push(...n);else for(let u in n){let d=n[u];j(u,d.colors),this.themeNames.push(u)}let A=u=>{for(let[d,f]of Object.entries(this.colorThemesMap))for(let[w,x]of Object.entries(f))x.startsWith("#")||u(d,f,w,x)};if(A((u,d,f,w)=>{let x=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(w);if(x){let R="#"+he(+x[1],+x[2],+x[3]);x[4]&&(R+=Math.round(255*+x[4]).toString(16)),d[f]=R}}),A((u,d,f,w)=>{let[x,R]=w.split("/"),C=this.colorThemesMap[x];if(C){let W=(f?C[f]:void 0)??C[""];d[f]=R?W.slice(0,7)+Math.round(255*+R).toString(16):W}else console.warn(`\`${w}\` doesn't exist in the extended config \`.colors\``),delete d[f],Object.keys(d).length||delete this.colorThemesMap[u]}),l)for(let u in l){let d=l[u],{native:f,values:w,colored:x}=d,R=d.match;if(d.id=u,d.native=f===!0?u.replace(/(?!^)[A-Z]/g,C=>"-"+C).toLowerCase():void 0,w&&(this.values[u]=s(w,!1)),R){let C=Object.keys(this.values[u]??{});R.includes("$values")&&(R=C.length?R.replace(/\$values/,C.join("|")):R.replace(/(?:\|)?\$values/,"")),x&&R.includes("$colors")&&(R=this.colorNames.length?R.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):R.replace(/(?:\|)?\$colors/,"")),this.matches[u]=new RegExp(R)}}}observe(e,r={subtree:!0,childList:!0}){if(this.root!==e){if(ge&&e){this.root=e;let i=e===document;i&&(ne.root=this),this.host=i?document.documentElement:root.host;let n=i?document.head:e,o=i?document.styleSheets:e.styleSheets;for(let p of o){let{href:m,ownerNode:l}=p;(l.id==="master"||m&&m.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(m))&&(this.style=l)}if(this.style)for(let p=0;p<this.style.sheet.cssRules.length;p++){let m=this.style.sheet.cssRules[p];if(m.constructor.name==="CSSKeyframesRule")continue;let l=s=>{if(s.selectorText){let b=s.selectorText.split(", ")[0].split(" ");for(let y=0;y<b.length;y++){let k=b[y];if(k[0]==="."){let j=k.slice(1),A="";for(let u=0;u<j.length;u++){let d=j[u],f=j[u+1];if(d==="\\"){if(u++,f!=="\\"){A+=f;continue}}else if(De.includes(d))break;A+=d}if(!(A in this.ruleBy)&&!(A in this.classes)){let u=this.create(A)[0];if(u)return u}}}}else if(s.cssRules)for(let c=0;c<s.cssRules.length;c++){let b=l(s.cssRules[c]);if(b)return b}},a=l(m);if(a){this.rules.push(a),this.ruleBy[a.className]=a;for(let s=0;s<a.natives.length;s++)a.natives[s].cssRule=this.style.sheet.cssRules[p+s];p+=a.natives.length-1,a.config.insert?.call(a)}}else switch(this.style=Fe(),this.config.precedence){case"highest":console.log(i?document.body:e),(i?document.body:e).append(this.style);break;case"higher":n.append(this.style);break;default:let p=n.querySelector('link[rel="styleSheet"], style');p?p.before(this.style):n.append(this.style);break}let h=p=>{p.forEach(m=>{m in this.countBy?this.countBy[m]++:(this.countBy[m]=1,this.insert(m))})};h(this.host.classList),r.subtree&&this.host.querySelectorAll("[class]").forEach(p=>h(p.classList)),this.observer.observe(e,{...r,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer?.disconnect?.(),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let r=e.cssRules.length-1;r>=0;r--)e.deleteRule(r);this.style?.remove(),this.style=null,this.root=null}match(e){for(let r in this.config.rules){let i=this.config.rules[r],n=this.matches[r],{symbol:o,native:h}=i;if(n&&n.test(e))return{origin:"match",config:i};if(o&&e.startsWith(o))return{origin:"symbol",config:i};if(h&&e.startsWith(h+":"))return{origin:"match",config:i}}for(let r of this.semantics)if(e.match(r[0]))return{origin:"semantics",value:r[1]}}create(e){let r=i=>{if(i in this.ruleBy)return this.ruleBy[i];let n=this.match(i);if(n)return new fe(i,n,this)};return(e in this.classes?this.classes[e].map(i=>r(i)):[r(e)]).filter(i=>i&&i.text)}refresh(e){if(e?.override?this.config=e:this.config=K(me,e),this.cache(),!this.style)return;let r=Fe();this.style.replaceWith(r),this.style=r,this.rules.length=0,this.ruleBy={};for(let i in this.countBy)this.insert(i)}destroy(){let e=ne.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let r=this.style?.sheet,i=n=>{let o=this.ruleBy[n];if(!(!o||n in this.classesBy&&this.classesBy[n].some(h=>h in this.countBy))){if(r&&o.natives.length){let h=o.natives[0];for(let p=0;p<r.cssRules.length;p++)if(r.cssRules[p]===h.cssRule){for(let l=0;l<o.natives.length;l++)r.deleteRule(p);break}}this.rules.splice(this.rules.indexOf(o),1),delete this.ruleBy[n],o.config.delete&&o.config.delete.call(o,n)}};if(e in this.classes){for(let n of this.classes[e])n in this.countBy||i(n);delete this.ruleBy[e]}else i(e)}insert(e){let r=this.create(e);return r.length?(this.insertRules(r),!0):!1}insertRules(e){for(let r of e){if(this.ruleBy[r.className])continue;let i,n=this.rules.length-1,{media:o,order:h,priority:p,hasWhere:m,className:l}=r,a=(s,c,b,y)=>{let k=0,j;c&&(k=s.findIndex(c)),b&&(j=s.findIndex(b)),k===-1&&(k=s.length),(j===void 0||j===-1)&&(j=s.length);let A=s.slice(k,j);for(let u=0;u<A.length;u++){let d=A[u];if(!(d.priority===-1||y&&y(d))&&(d.priority<p||d.priority===p&&(m&&!d.hasWhere||d.order>=h)))return k+u}return k+A.length};if(o){let s=this.rules.findIndex(c=>c.media);if(s!==-1){let c=o.features["max-width"],b=o.features["min-width"];if(c&&b){let y=c.value-b.value;for(let k=n;k>=s;k--){i=k;let j=this.rules[k],A=j.media,u=A.features["max-width"],d=A.features["min-width"];if(!u||!d){i++;break}let f=u.value-d.value;if(f===y){if(m!==j.hasWhere)continue;if(p!==-1){let w=[this.rules[k]];for(let x=k-1;x>=s;x--){let R=this.rules[x];if(R.hasWhere!==m)break;let C=R.media,W=C.features["max-width"],E=C.features["min-width"];if(!W||!E||W.value-E.value!==f)break;w.unshift(this.rules[x])}i=a(this.rules,x=>x.media&&x.priority!==-1&&x.media.features["min-width"]&&x.media.features["max-width"])}break}else if(f>y)break}}else if(b)for(let y=s;y<=n;y++){i=y;let k=this.rules[y],j=k.media,A=j.features["max-width"],u=j.features["min-width"];if(A){if(u)break;continue}let d=u?.value;if(d===b.value){if(!m&&k.hasWhere){i++;continue}if(p!==-1)i=a(this.rules,f=>f.media,f=>f.media&&f.priority!==-1&&f.media.features["min-width"]&&f.media.features["max-width"],f=>!f.media.features["min-width"]&&!f.media.features["max-width"]);else for(let f=y;f<=n;f++){let w=this.rules[f],x=w.media,R=x.features["min-width"];if(!x.features["max-width"]){if(w.hasWhere!==m||R.value!==d||w.order>=h)break;i=f+1}}break}else{if(d>b.value)break;i++}}else if(c)for(let y=n;y>=s;y--){i=y;let k=this.rules[y],j=k.media,A=j.features["max-width"];if(j.features["min-width"])continue;let d=A?.value;if(!d||d>c.value){i++;break}else if(d===c.value){if(m&&!k.hasWhere)continue;if(p!==-1)i=a(this.rules,f=>f.media,f=>f.media&&f.priority!==-1&&f.media.features["min-width"]&&f.media.features["max-width"],f=>!f.media.features["min-width"]&&!f.media.features["max-width"]);else{let f=[this.rules[y]];for(let w=y-1;w>=s;w--){let x=this.rules[w],R=x.media,C=R.features["min-width"],W=R.features["max-width"];if(!C&&(!W||W.value!==d||x.hasWhere!==m))break;f.unshift(x)}for(let w=0;w<f.length;w++){let x=f[w];if(!x.media.features["min-width"]){if(x.order>=h)break;i=y-f.length+2+w}}}break}}}if(i===void 0)if(s===-1)i=n+1;else if(p!==-1)i=s+a(this.rules.slice(s),void 0,c=>c.media.features["max-width"]||c.media.features["min-width"]);else if(m){let c=s;for(;c<this.rules.length;c++){let b=this.rules[c];if(b.priority!==-1||!b.hasWhere||b.order>=h){i=c;break}}i===void 0&&(i=c)}else for(let c=s;c<=n;c++){i=c;let b=this.rules[c],y=b.media;if(b.priority!==-1||y.features["max-width"]||y.features["min-width"])break;if(b.hasWhere)i++;else if(b.order>=h)break}}else if(p===-1){if(m)i=this.rules.findIndex(s=>!s.hasWhere||s.media||s.priority!==-1||s.order>=h),i===-1&&(i=n+1);else{let s=0;for(;s<this.rules.length;s++){let c=this.rules[s];if(c.media||!c.hasWhere&&(c.order>=h||c.priority!==-1)){i=s;break}}i===void 0&&(i=s)}!i&&Object.keys(this.keyframes).length&&i++}else i=a(this.rules,void 0,s=>s.media);if(this.rules.splice(i,0,r),this.ruleBy[l]=r,this.style){let s=this.style.sheet,c=0,b=y=>{let k=this.rules[y];if(k){if(!k.natives.length)return b(y-1);let j=k.natives[k.natives.length-1].cssRule;for(let A=0;A<s.cssRules.length;A++)if(s.cssRules[A]===j){c=A+1;break}}};b(i-1);for(let y=0;y<r.natives.length;)try{let k=r.natives[y];s.insertRule(k.text,c),k.cssRule=s.cssRules[c++],y++}catch(k){console.error(k),r.natives.splice(y,1)}}r.config.insert?.call(r)}}get text(){return this.rules.map(e=>e.text).join("")}},te=ne;oe(te,"root"),oe(te,"config",me),oe(te,"instances",[]),oe(te,"refresh",e=>{for(let r of ne.instances)r.refresh(e)});ge&&(window.MasterCSS=te);var Ve={store:"theme",init:!0},Qe=typeof document<"u",_e=typeof localStorage<"u",pe=class{constructor(e,r=Qe?document.documentElement:null){this.settings=e;this.host=r;this.settings=e?K(Ve,e):Ve,this.settings.init&&this.init()}e=typeof matchMedia<"u"?matchMedia?.("(prefers-color-scheme:dark)"):void 0;r;t;init(){let e=this.settings.default,r=this.storage;r&&(e=r),this.value=e}get storage(){let{store:e}=this.settings;if(_e&&e)return localStorage.getItem(e)}get systemValue(){return this.e.matches?"dark":"light"}set value(e){this.r=e,e==="system"?(this.e?.addEventListener?.("change",this.i),this.current=this.systemValue):(this.s(),this.current=e)}get value(){return this.r}set current(e){let r=this.t;this.t=e,this.host&&(r&&this.host.classList.remove(r),this.host.classList.contains(e)||(this.host.classList.add(e),this.host.style&&(this.host.style.colorScheme=e)))}get current(){return this.t}switch(e,r={store:!0,emit:!0}){e&&e!==this.value&&(this.value=e,_e&&this.storage!==e&&this.settings.store&&localStorage.setItem(this.settings.store,e),r.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this})))}s(){this.e?.removeEventListener("change",this.i)}i=e=>{this.current=e.matches?"dark":"light"};destroy(){this.s()}};new te(window.masterCSSConfig);new pe(window.masterCSSThemeSettings);})();
1
+ (()=>{var Pe=Object.defineProperty;var Ue=(t,e,r)=>e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var oe=(t,e,r)=>(Ue(t,typeof e!="symbol"?e+"":e,r),r);function Re(t){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&t instanceof e||t instanceof Date||t instanceof RegExp)}function Ce(t){if(typeof Buffer<"u"&&Buffer&&t instanceof Buffer){let e=Buffer.alloc(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function Te(t){let e=[];return t.forEach(function(r,i){typeof r=="object"&&r!==null?Array.isArray(r)?e[i]=Te(r):Re(r)?e[i]=Ce(r):e[i]=K({},r):e[i]=r}),e}function Se(t,e){return e==="__proto__"?void 0:t[e]}function K(...t){let e={},r,i;return t.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(a){if(i=Se(e,a),r=Se(o,a),r!==e)if(typeof r!="object"||r===null){e[a]=r;return}else if(Array.isArray(r)){e[a]=Te(r);return}else if(Re(r)){e[a]=Ce(r);return}else if(typeof i!="object"||i===null||Array.isArray(i)){e[a]=K({},r);return}else{e[a]=K(i,r);return}})}),e}var xe=[":disabled",":active",":focus",":hover"];var ie={"(":")","'":"'",'"':'"',"{":"}"};function ue(t){if(typeof CSS<"u")return CSS.escape(t);if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");let e=String(t),r=e.length,i=-1,o="",a,p=e.charCodeAt(0);if(r==1&&p==45)return"\\"+e;for(;++i<r;){if(a=e.charCodeAt(i),a==0){o+="\uFFFD";continue}if(a>=1&&a<=31||a==127||i==0&&a>=48&&a<=57||i==1&&a>=48&&a<=57&&p==45){o+="\\"+a.toString(16)+" ";continue}if(a>=128||a==45||a==95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){o+=e.charAt(i);continue}o+="\\"+e.charAt(i)}return o}var He={unit:"",order:0,separators:[","]},fe=class{constructor(e,r={},i){this.className=e;this.meta=r;this.css=i;this.config=K(He,r.config);let{unit:o,order:a,colored:p,native:b,analyze:f,transform:c,declare:d,create:s}=this.config,{scope:h,important:S,functions:k}=i.config,{themeNames:R,colorNames:v,colorThemesMap:C,selectors:n,breakpoints:l,mediaQueries:u,themeAffectedClassesBy:m,globalValues:x}=i,T=m[e];this.order=a,s&&s.call(this,e);let $,W,B,Y,Z;if(r.origin==="semantics"){let[L,j]=r.value;Y=e.slice(L.length),$=j}else{let L;if(f)[L,B]=f.call(this,e);else if(r.origin==="match"){let M=e.indexOf(":");this.prefix=e.slice(0,M+1),this.prefix.includes("(")?(this.prefix=void 0,L=e):L=e.slice(M+1)}else r.origin==="symbol"&&(this.symbol=e[0],L=e.slice(1));Z=[];let j=this,N=this.values,F=[","];this.config.separators.length&&F.push(...this.config.separators);let w="",y=0;(function M(g,A,E,O=void 0,I=[],U=[],z){let Q=O===void 0,P,q=D=>D==="'"||D==='"',re=()=>P=w.length,G=()=>{if(w){let D=w,V=Q?D:w.slice(P);if(w="",X="",N&&V in N&&!I.includes(V)){let H=y;y=0,M(N[V].toString(),A,void 0,O,[...I,V],U,z),y=H,Q||(w=w.slice(0,P)+w)}else if(x&&V in x&&!U.includes(V)){let H=y;y=0,M(x[V].toString(),A,void 0,O,I,[...U,V],z),y=H,Q||(w=w.slice(0,P)+w)}else if(Q){let H=!z&&j.analyzeUnitValue(V,A);Z.push({value:H?.value??V,unit:H?.unit})}else{let H=!z&&j.analyzeUnitValue(V,A);w=H?D.slice(0,P)+H.value+H.unit:D}re()}},J=q(E);re();let X="";for(;y<g.length;y++){let D=g[y];if(D===E){if(J){w+=D;let V=0;for(let H=w.length-2;w[H]==="\\";H--)V++;if(V%2)continue}else G(),w+=D;return}else if(!J&&D in ie){let V=D==="("&&X&&k?.[X];V?.name&&(w=w.slice(0,w.length-X.length)+V.name,X=V.name),w+=D,y++;let H=ie[D];M(g,V?.unit??A,H,X||O||"",I,U,z||!!V?.transform),V?.transform&&(w=w.slice(0,P+X.length+1)+V.transform.call(j,w.slice(P+X.length+1,-1))+w.slice(-1)),Q&&(q(H)?(Z.push(w),w=""):G()),X=""}else if((D==="|"||D===" ")&&E!=="}"&&(!J||O==="path"))G(),Q||(w+=" ",P++);else{if(!J){if(D==="."){if(isNaN(+g[y+1]))break;g[y-1]==="-"&&(w+="0")}else if(F.includes(D)){G(),Q?Z.push(D):(w+=D,P++);continue}else if(Q&&(D==="#"&&(w||Z.length&&g[y-1]!=="|"&&Z[y-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(D)))break;X+=D}w+=D}}O===void 0&&G()})(L,o),Y=L.slice(y)}Y[0]==="!"&&(this.important=!0,Y=Y.slice(1));let we=L=>{let j=L.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((y,M)=>M%3?y:y.replace(/_/g," ")).join(""),N=[],F="",w=0;for(let y=0;y<j.length;y++){let M=j[y];if(M==="\\"){F+=M+j[++y];continue}!w&&M===","?(N.push(F),F=""):(F+=M,w&&M===")"?w--:M==="("&&w++)}return F&&N.push(F),N};this.prefixSelectors=B?we(B):[""];let pe=Y.split("@"),be=pe[0];if(be){this.vendorSuffixSelectors={};let L=(y,M,g,A)=>{for(let[E,O]of M)if(E.test(y)){for(let I of O)L(y.replace(E,I),M,g,!0);return}A&&g.push(y)},j=[];""in n?L(be,n[""],j,!0):j.push(be);let N={};for(let[y,M]of Object.entries(n)){if(!y)continue;let g=[];for(let A of j)L(A,M,g,!1);g.length&&(N[y]=g)}let F=(y,M)=>{let g=M.reduce((A,E)=>(A.push(...we(E)),A),[]);y in this.vendorSuffixSelectors?this.vendorSuffixSelectors[y].push(...g):this.vendorSuffixSelectors[y]=g},w=Object.keys(N);if(w.length)for(let y of w)F(y,N[y]);else F("",j);for(let y of Object.values(this.vendorSuffixSelectors))for(let M of y){this.hasWhere!==!1&&(this.hasWhere=M.includes(":where("));for(let g=0;g<xe.length;g++)if(M.includes(xe[g])){(this.priority===-1||this.priority>g)&&(this.priority=g);break}}}else this.vendorSuffixSelectors={"":[""]};for(let L=1;L<pe.length;L++){let j=pe[L];if(j)if(R.includes(j))this.theme=j;else if(j==="rtl"||j==="ltr")this.direction=j;else{let N,F,w=j.indexOf("_");if(w!==-1)N=j.slice(0,w),F=j.slice(w);else{let y=j.indexOf("(");y!==-1&&(N=j.slice(0,y),F=j.slice(y))}if(!N){N="media";let y=[];this.media={token:j,features:{}};let M=j.split("&");for(let g of M)if(g==="all"||g==="print"||g==="screen"||g==="speech")this.media.type=g;else if(g==="\u{1F5A8}")this.media.type="print";else if(g==="landscape"||g==="portrait")y.push("(orientation:"+g+")");else if(g==="motion"||g==="reduced-motion")y.push("(prefers-reduced-motion:"+(g==="motion"?"no-preference":"reduce")+")");else if(u&&g in u)y.push(u[g]);else{let A={token:g},E="",O="",I=0;g.startsWith("<=")?(O="<=",E="max-width"):g.startsWith(">=")||l[g]?(O=">=",E="min-width"):g.startsWith(">")?(O=">",E="min-width",I=.02):g.startsWith("<")&&(O="<",E="max-width",I=-.02);let U=O?g.replace(O,""):g,z=l[U];switch(E){case"max-width":case"min-width":z?Object.assign(A,this.analyzeUnitValue(z.toString(),"px")):Object.assign(A,this.analyzeUnitValue(U,"px")),A.unit==="px"&&(A.value+=I),this.media.features[E]=A,y.push("("+E+":"+(A.value+A.unit)+")");break}}F="",this.media.type&&(F=this.media.type),y.length&&(F+=(F?" and ":"")+y.join(" and "))}F&&(this.at[N]=(N in this.at?this.at[N]+" and ":"")+F.replace(/_/g," "))}}let ve=(L,j)=>{let N,F=(M,g,A)=>{let E="";this.direction&&(E+="[dir="+this.direction+"] ");let O=this.prefixSelectors.map(z=>z+E),I=(z,Q)=>O.map(P=>(z?"."+z+" ":"")+(h?h+" ":"")+P).reduce((P,q)=>(P.push(A.reduce((re,G)=>(re.push(q+"."+ue(Q)+G),re),[]).join(",")),P),[]).join(","),U=I(g,e)+(T?Object.entries(T).filter(([z])=>this.theme||!p||!g||!z||z===g).map(([z,Q])=>Q.reduce((P,q)=>P+","+I(this.theme??((p||W)&&g||z),q),"")).join(""):"")+"{"+M+"}";for(let z of Object.keys(this.at).sort((Q,P)=>P==="supports"?-1:1))U="@"+z+" "+this.at[z]+"{"+U+"}";return U},w=[];if(Z){let M=this.theme?[this.theme,""]:[L],g,A;for(let E of Z)if(typeof E=="string")w.push(E);else{let O=E.value;if(E.unit)O+=E.unit;else if(p&&C&&v){let I=!1,U=!1;O=O.replace(new RegExp(`(^|,| |\\()((?:${v.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(z,Q,P,q)=>{U=!0;let re=C[P];if(re){let G;for(let J of M)if(G=re[J])break;if(G){I=!0;let J=G;if(q){let X=q.endsWith("%")?parseFloat(q)/100:+q;X=isNaN(X)?1:Math.min(Math.max(X,0),1),J+=Math.round(X*255).toString(16).toUpperCase().padStart(2,"0")}return Q+J}}return z}),U&&(A=I)}A!==void 0&&!g&&(g=A),w.push(O)}if(j&&(g===void 0?L:!g))return;if(N=w.reduce((E,O,I)=>E+O+(O===","||Z[I+1]===","||I===Z.length-1?"":" "),""),c&&(N=c.call(this,N,this.css.config)),p&&N==="current"&&(N="currentColor"),d){let E,O;if(Z.length===1){let I=Z[0];typeof I=="object"&&(E=I.value,O=I.unit)}$=d.call(this,O?E:N,O||"")}else $={[b]:N}}let y={};for(let M in $){let g=(O,I)=>{let U=I+((this.important||S)&&!I.endsWith("!important")?"!important":"");O in y?y[O].push(U):y[O]=[U]},A=M+":",E=$[M];if(typeof E=="object"){W=!0;for(let O in E)g(O,A+E[O])}else g(L,A+E.toString())}for(let M of Object.values(this.vendorSuffixSelectors))for(let g in y)this.natives.push({text:F(y[g].join(";"),g,M),theme:g})};if(this.theme)ve(this.theme,!1);else if(p)for(let L of R)ve(L,!0);else ve("",!1)}at={};priority=-1;natives=[];keyframeNames;config;get values(){return this.css.values[this.config.id]}get text(){return this.natives.map(e=>e.text).join("")}resolveValue(e,r){return Number.isNaN(+e)?e:e/(r==="rem"||r==="em"?this.css.config.rootSize:1)+r}analyzeUnitValue(e,r){let i=r??this.config.unit;if(i){let o="",a=e.match(/^([+-.]?\d+(\.?\d+)?)(.*)?/);if(a)if(e.includes("/")){let[p,b]=e.split("/");return{value:+p/+b*100+"%",unit:o}}else{let p=+a[1];return o=a[3]||"",o||((i==="rem"||i==="em")&&(p=p/this.css.config.rootSize),o=i||""),{value:p,unit:o}}}}};var ae={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560};function le(t){t.startsWith("#")&&(t=t.slice(1));let e=t.match(/.{1,2}/g);return[parseInt(e[0],16),parseInt(e[1],16),parseInt(e[2],16)]}function he(t,e,r){return((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1)}function _(t){typeof t=="string"&&(t={"":t});let e=""in t,r=!1;for(let i in t)if(i&&+i>=100){r=!0;break}if(!r&&(!e||Object.keys(t).length>1)){let i=0,o="0"in t?le(t[0]):[0,0,0],a,p,b=[],f=()=>{let c=a-i,d=p.map((s,h)=>(s-o[h])/c);for(let s of b){let h=s-i,S=o.map((k,R)=>Math.round(k+d[R]*h));t[s]="#"+he.call(this,...S)}};for(let c=1;c<100;c++)c in t?(b.length?(a=c,p=le(t[c]),f(),b.length=0,o=p):o=le(t[c]),i=c):b.push(c);b.length&&(a=100,p="100"in t?le(t[100]):[255,255,255],f())}return e||(t[""]=t[r?"500":"50"]),t}var $e={black:"#000000",white:"#ffffff",slate:_({5:"#141e2b",10:"#19212d",20:"#262f3e",30:"#323e52",40:"#41516b",50:"#616a84",55:"#6c7693",60:"#959db3",70:"#a3abbf",80:"#d7dae3",95:"#f6f7f8"}),gray:_({5:"#1e1d1f",10:"#212022",20:"#2f2e30",30:"#3e3d40",40:"#504f52",50:"#6b6a6d",55:"#777679",60:"#9e9da0",70:"#abaaae",80:"#dad9db",95:"#f5f4f7"}),brown:_({5:"#271b15",10:"#2b1e18",20:"#3c2b22",30:"#50382c",40:"#694839",50:"#8d604b",55:"#9d6b53",60:"#b79788",70:"#c1a598",80:"#efd5c9",95:"#faf2ef"}),orange:_({5:"#2e1907",10:"#331b07",20:"#47260b",30:"#5d320e",40:"#7a4111",50:"#a15717",55:"#b4611a",60:"#e38739",70:"#e79855",80:"#f7d4b5",95:"#fcf1e7"}),gold:_({5:"#281b00",10:"#2d1e01",20:"#3f2a00",30:"#543800",40:"#6d4900",50:"#906000",55:"#9c6d00",60:"#d09100",70:"#dca000",80:"#fbd67f",95:"#fff3d8"}),yellow:_({5:"#251d00",10:"#282000",20:"#3a2e01",30:"#4b3b00",40:"#624e00",50:"#806700",55:"#8e7200",60:"#be9900",70:"#d0a700",80:"#edda8f",95:"#fff5ca"}),grass:_({5:"#162106",10:"#182406",20:"#223308",30:"#2c4408",40:"#3a570b",50:"#4e750e",60:"#74ae15",70:"#7dbc17",80:"#bfe87c",95:"#ebfad4"}),green:_({5:"#042311",10:"#032611",20:"#023717",30:"#03481f",40:"#025d26",50:"#067b34",55:"#07883a",60:"#09b64d",70:"#0ac553",80:"#80f1a4",95:"#e0fae8"}),beryl:_({5:"#002319",10:"#00271c",20:"#003626",30:"#004732",40:"#005c41",50:"#007954",55:"#00875e",60:"#00b37c",70:"#00c387",80:"#72f0c5",95:"#d6fcef"}),teal:_({5:"#012220",10:"#012624",20:"#003532",30:"#004541",40:"#005a54",50:"#00776f",55:"#00857c",60:"#00b1a5",70:"#00bfb2",80:"#6aeee5",95:"#d4fcf8"}),cyan:_({5:"#00222b",10:"#00252e",20:"#013340",30:"#004457",40:"#00576f",50:"#007391",55:"#0080a1",60:"#00abd7",70:"#00b9e9",80:"#97e6fa",95:"#dff8ff"}),sky:_({5:"#031f34",10:"#032339",20:"#04314e",30:"#044169",40:"#065386",50:"#086eb3",55:"#097ac5",60:"#29a4f5",70:"#4db3f7",80:"#b3e0ff",95:"#eaf6fe"}),blue:_({5:"#07194a",10:"#081c53",20:"#0a2773",30:"#0e3496",40:"#1146b6",50:"#175fe9",55:"#2671ea",60:"#6b9ef1",70:"#81acf3",80:"#c6dbfe",95:"#edf4fe"}),indigo:_({5:"#1f1645",10:"#20174f",20:"#2b1f74",30:"#37289d",40:"#463fb1",50:"#5a5bd5",55:"#6464f1",60:"#9393f5",70:"#a1a5ee",80:"#d5d7fe",95:"#f1f2ff"}),violet:_({5:"#2b0a4e",10:"#2e0b57",20:"#3d1179",30:"#4e169f",40:"#5f2eba",50:"#7949e5",55:"#8755f5",60:"#ac8af8",70:"#b89bf9",80:"#e1d4fe",95:"#f5f1ff"}),purple:_({5:"#2e0c47",10:"#330c4e",20:"#460f6c",30:"#5b1390",40:"#7421b1",50:"#9832e4",55:"#a348e7",60:"#c184ef",70:"#ca96f1",80:"#ead1fe",95:"#f9f0ff"}),fuchsia:_({5:"#39092a",10:"#400932",20:"#560d4a",30:"#6f1165",40:"#8c158a",50:"#b61cbb",55:"#ca1fce",60:"#e66ee9",70:"#ea86ed",80:"#facbfb",95:"#feefff"}),pink:_({5:"#3d0722",10:"#430725",20:"#5d0933",30:"#790d44",40:"#9a1058",50:"#ca1473",55:"#e11681",60:"#f170b4",70:"#f388c0",80:"#fdcde6",95:"#fff0f8"}),crimson:_({5:"#430213",10:"#470314",20:"#62041c",30:"#800524",40:"#9f1036",50:"#ce1a4b",55:"#e8144c",60:"#f37596",70:"#f58ba7",80:"#fdceda",95:"#fff1f4"}),red:_({5:"#450001",10:"#490102",20:"#640304",30:"#800506",40:"#a11012",50:"#d11a1e",55:"#ed0a0e",60:"#f97476",70:"#fa8b8d",80:"#fdcfcf",95:"#fff1f1"})};var Me="";var Oe={"::scrollbar":"::-webkit-scrollbar","::scrollbar-button":"::-webkit-scrollbar-button","::scrollbar-thumb":"::-webkit-scrollbar-thumb","::scrollbar-track":"::-webkit-scrollbar-track","::scrollbar-track-piece":"::-webkit-scrollbar-track-piece","::scrollbar-corner":"::-webkit-scrollbar-corner","::slider-thumb":["::-webkit-slider-thumb","::-moz-range-thumb"],"::slider-runnable-track":["::-webkit-slider-runnable-track","::-moz-range-track"],"::meter":"::-webkit-meter","::resizer":"::-webkit-resizer","::progress":"::-webkit-progress",":first":":first-child",":last":":last-child",":even":":nth-child(2n)",":odd":":nth-child(odd)",":nth(":":nth-child("};var Ee={square:{"aspect-ratio":"1/1"},video:{"aspect-ratio":"16/9"},rounded:{"border-radius":"1e9em"},round:{"border-radius":"50%"},hidden:{display:"none"},hide:{display:"none"},block:{display:"block"},table:{display:"table"},flex:{display:"flex"},grid:{display:"grid"},contents:{display:"contents"},inline:{display:"inline"},"inline-block":{display:"inline-block"},"inline-flex":{display:"inline-flex"},"inline-grid":{display:"inline-grid"},"inline-table":{display:"inline-table"},"table-cell":{display:"table-cell"},"table-caption":{display:"table-caption"},"flow-root":{display:"flow-root"},"list-item":{display:"list-item"},"table-row":{display:"table-row"},"table-column":{display:"table-column"},"table-row-group":{display:"table-row-group"},"table-column-group":{display:"table-column-group"},"table-header-group":{display:"table-header-group"},"table-footer-group":{display:"table-footer-group"},italic:{"font-style":"italic"},oblique:{"font-style":"oblique"},isolate:{isolation:"isolate"},overflow:{overflow:"visible"},untouchable:{"pointer-events":"none"},static:{position:"static"},fixed:{position:"fixed"},abs:{position:"absolute"},rel:{position:"relative"},sticky:{position:"sticky"},uppercase:{"text-transform":"uppercase"},lowercase:{"text-transform":"lowercase"},capitalize:{"text-transform":"capitalize"},visible:{visibility:"visible"},invisible:{visibility:"hidden"},vw:{width:"100vw"},vh:{height:"100vh"},"max-vw":{"max-width":"100vw"},"max-vh":{"max-height":"100vh"},"min-vw":{"min-width":"100vw"},"min-vh":{"min-height":"100vh"},"center-content":{"justify-content":"center","align-items":"center"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)","white-space":"nowrap","border-width":"0"},full:{width:"100%",height:"100%"},center:{left:0,right:0,"margin-left":"auto","margin-right":"auto"},middle:{top:0,bottom:0,"margin-top":"auto","margin-bottom":"auto"},"break-spaces":{"white-space":"break-spaces"},"break-word":{"overflow-wrap":"break-word",overflow:"hidden"}};var Be=["dark","light"];var se={content:"content-box",border:"border-box",padding:"padding-box"};var ce={min:"min-content",max:"max-content"};var ee={full:"100%",fit:"fit-content",max:"max-content",min:"min-content"};for(let t in ae)ee[t]=ae[t]/16+"rem";var Ye={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(t){let e=0;for(;e<t.length&&!(t[e]==="{"&&t[e-1]!=="\\");e++);return[t.slice(e),t.slice(0,e)]},declare(t){let e={},r=(c,d)=>{let s=d.indexOf(":");if(s!==-1){c in e||(e[c]={});let h=e[c],S=d.slice(0,s);S in h||(h[S]=d.slice(s+1))}},i=c=>{let d=(s,h)=>{let S=h.slice(ue(c.className).length).match(/\{(.*)\}/)[1].split(";");for(let k of S)r(s,k)};if(this.theme){let s=c.natives.find(h=>h.theme===this.theme)??c.natives.find(h=>!h.theme);s&&d(this.theme,s.text)}else for(let s of c.natives)d(s.theme,s.text)},o=[],a="",p=()=>{a&&(o.push(a.replace(/ /g,"")),a="")},b=1;(function c(d){for(;b<t.length;b++){let s=t[b];if(!d){if(s===";"){p();continue}if(s==="}")break}if(a+=s,d===s){if(d==="'"||d==='"'){let h=0;for(let S=a.length-2;a[S]==="\\";S--)h++;if(h%2)continue}break}else s in ie&&d!=="'"&&d!=='"'&&(b++,c(ie[s]))}})(void 0),p();for(let c of o){let d=this.css.create(c);if(Array.isArray(d))for(let s of d)i(s);else d?i(d):r(this.theme??"",c)}let f={};for(let c in e)for(let[d,s]of Object.entries(e[c]))d in f?f[d][c]=s:f[d]={[c]:s};return f}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(t){return{["--"+this.prefix.slice(1,-1)]:t}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(t){let e={};switch(t){case"subpixel-antialiased":e["-webkit-font-smoothing"]=e["-moz-osx-font-smoothing"]="auto";break;case"antialiased":e["-webkit-font-smoothing"]="antialiased",e["-moz-osx-font-smoothing"]="grayscale";break}return e}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},margin:{match:"^m(?:argin(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(t,e){return Ie.call(this,t+e)},get order(){return this.prefix==="margin:"||this.prefix==="m:"?-1:0}},padding:{match:"^p(?:adding(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(t,e){return Ie.call(this,t+e)},get order(){return this.prefix==="padding:"||this.prefix==="p:"?-1:0}},flexBasis:{values:ee,unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:ee},height:{match:"^h:.",unit:"rem",native:!0,values:ee},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:ee},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:ee},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t]},declare(t){let[e,r]=t.split(" x ");return{width:e,height:r}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,r]=t.split(" x ");return{"min-width":e,"min-height":r}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(t){return[t.slice(4)]},declare(t){let[e,r]=t.split(" x ");return{"max-width":e,"max-height":r}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},inset:{match:"^(?:top|bottom|left|right):.",unit:"rem",native:!0,declare(t,e){return{[this.prefix.slice(0,-1)]:t+e}}},lines:{match:"^lines:.",declare(t,e){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":t+e}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:ee},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:ee},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflow:{match:"^overflow(?:-x|-y)?:(?:visible|overlay|hidden|scroll|auto|clip|inherit|initial|revert|revert-layer|unset|\\$|var|$values)",declare(t,e){if(this.prefix)switch(this.prefix.slice(-2,-1)){case"x":return{"overflow-x":t+e};case"y":return{"overflow-y":t+e}}return{overflow:t+e}},get order(){return-1}},overscrollBehavior:{match:"^overscroll-behavior(?:-[xy])?:",declare(t,e){switch(this.prefix.slice(-2,-1)){case"x":return{"overscroll-behavior-x":t+e};case"y":return{"overscroll-behavior-y":t+e};default:return{"overscroll-behavior":t+e}}}},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(t,e){return{"user-drag":t+e,"-webkit-user-drag":t+e}}},userSelect:{native:!0,declare(t,e){return{"user-select":t+e,"-webkit-user-select":t+e}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(t,e){return{"font-size":t+e,"line-height":e==="em"?t+.875+e:`calc(${t}${e} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-fill-color":t+e}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(t,e){return{"-webkit-text-stroke-width":t+e}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"-webkit-text-stroke-color":t+e}}},textStroke:{unit:"rem",native:!0,declare(t,e){return{"-webkit-text-stroke":t+e}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{...se,fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(t){return je.call(this,t)},delete(t){return Ae.call(this,t)},insert(){return Ne.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(t){return je.call(this,t)},delete(t){return Ae.call(this,t)},insert(){return Ne.call(this)}},borderColor:{match:"^b(?:[xytblr]|(?:order(?:-(?:left|right|top|bottom))?))?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(t,e){return de(this.prefix,t+e,"color")},get order(){return this.prefix==="border-color:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderRadius:{match:"^(?:r[tblr]?[tblr]?|border(?:-(?:top|bottom)-(?:left|right))?-radius):.",unit:"rem",declare(t,e){if(this.prefix){let i="",o=this.prefix.split("-");if(o.length>1)for(let a=1;a<o.length-1;a++)i+=o[a][0];else i=this.prefix.slice(1,-1);switch(i){case"t":return{"border-top-left-radius":t+e,"border-top-right-radius":t+e};case"tl":case"lt":return{"border-top-left-radius":t+e};case"rt":case"tr":return{"border-top-right-radius":t+e};case"b":return{"border-bottom-left-radius":t+e,"border-bottom-right-radius":t+e};case"bl":case"lb":return{"border-bottom-left-radius":t+e};case"br":case"rb":return{"border-bottom-right-radius":t+e};case"l":return{"border-top-left-radius":t+e,"border-bottom-left-radius":t+e};case"r":return{"border-top-right-radius":t+e,"border-bottom-right-radius":t+e};default:return{"border-radius":t+e}}}let r=this.prefix?.slice(0,-1);return{[["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].includes(r)?r:"border-radius"]:t+e}},get order(){return this.prefix==="border-radius:"||this.prefix==="r:"?-1:0}},borderStyle:{match:"^(?:border(?:-(?:left|right|top|bottom))?-style:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|))",declare(t,e){return de(this.prefix,t+e,"style")},get order(){return this.prefix==="border-style:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderWidth:{match:"^(?:border(?:-(?:left|right|top|bottom))?-width:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$)",unit:"rem",declare(t,e){return de(this.prefix,t+e,"width")},get order(){return this.prefix==="border-width:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0},border:{match:"^b(?:[xytblr]?|order(?:-(?:left|right|top|bottom))?):.",unit:"rem",colored:!0,values:{current:"currentColor"},declare(t,e){return de(this.prefix,t+e)},get order(){return this.prefix==="border:"||this.prefix==="b:"?-2:-1}},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(t,e){return{"-webkit-background-clip":t+e,"background-clip":t+e}},values:se},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:se},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(t,e){return{"backdrop-filter":t+e,"-webkit-backdrop-filter":t+e}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridColumns:{match:"^grid-cols:.",declare(t,e){return{display:"grid","grid-template-columns":"repeat("+t+e+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(t){return this.prefix.slice(-5,-1)==="span"&&t!=="auto"?"span "+t+"/span "+t:t}},gridRows:{declare(t,e){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+t+e+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:ce},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:ce,native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:ce},gridTemplateRows:{native:!0,unit:"rem",values:ce},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gap:{match:"^gap(?:-x|-y)?:.",unit:"rem",order:-1,declare(t,e){switch(this.prefix[4]){case"x":return{"column-gap":t+e};case"y":return{"row-gap":t+e};default:return{gap:t+e}}}},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(t,e){return{"box-decoration-break":t+e,"-webkit-box-decoration-break":t+e}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMargin:{match:"^scroll-m(?:[xytblr]|argin(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(t,e){if(this.prefix.slice(-3,-2)==="m")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-margin-left":t+e,"scroll-margin-right":t+e};case"y":return{"scroll-margin-top":t+e,"scroll-margin-bottom":t+e};case"l":return{"scroll-margin-left":t+e};case"r":return{"scroll-margin-right":t+e};case"t":return{"scroll-margin-top":t+e};case"b":return{"scroll-margin-bottom":t+e}}else return{[this.prefix.replace(/-m(?!argin)/,"-margin").slice(0,-1)]:t+e}},get order(){return this.prefix==="scroll-margin:"||this.prefix==="scroll-m:"?-1:0}},scrollPadding:{match:"^scroll-p(?:[xytblr]|adding(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(t,e){if(this.prefix.slice(-3,-2)==="p")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-padding-left":t+e,"scroll-padding-right":t+e};case"y":return{"scroll-padding-top":t+e,"scroll-padding-bottom":t+e};case"l":return{"scroll-padding-left":t+e};case"r":return{"scroll-padding-right":t+e};case"t":return{"scroll-padding-top":t+e};case"b":return{"scroll-padding-bottom":t+e}}else return{[this.prefix.replace(/-p(?!adding)/,"-padding").slice(0,-1)]:t+e}},get order(){return this.prefix==="scroll-padding:"||this.prefix==="scroll-p:"?-1:0}},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{...se,margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{...se,margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(t,e){return{"mask-image":t+e,"-webkit-mask-image":t+e}}}},We=Ye;function je(t){if(!this.css.config.keyframes)return;let e=(this.meta.origin==="symbol"?t.slice(this.meta.config.symbol.length):t.slice(t.indexOf(":")+1)).split("|").filter(r=>r in this.css.config.keyframes);e?.length&&(this.keyframeNames=e)}function Ae(){if(this.keyframeNames?.length){let t=this.css.rules[0];for(let e of this.keyframeNames){let r=this.css.keyframes[e];if(!--r.count){let i=t.natives.indexOf(r.native);this.css.style.sheet.deleteRule(i),t.natives.splice(i,1),delete this.css.keyframes[e]}}t.natives.length||this.css.rules.splice(0,1)}}function Ne(){if(this.keyframeNames){let{config:t,keyframes:e,style:r,rules:i}=this.css,o=r?.sheet;for(let a of this.keyframeNames)if(a in e)e[a].count++;else{let p={text:`@keyframes ${a} {`+Object.entries(t.keyframes[a]).map(([f,c])=>`${f} {${Object.entries(c).map(([d,s])=>d+": "+s).join(";")}}`).join(",")+"}",theme:""},b;if(Object.keys(e).length?(b=i[0]).natives.push(p):i.splice(0,0,b={natives:[p],get text(){return this.natives.map(f=>f.text).join("")}}),o){let f;for(let c=0;c<o.cssRules.length;c++){let d=o.cssRules[c];if(d.constructor.name!=="CSSKeyframesRule")break;if(d.name===a){f=d;break}}if(f)p.cssRule=f;else{let c=b.natives.length-1;o.insertRule(p.text,c),p.cssRule=o.cssRules[c]}}e[a]={native:p,count:1}}}}function Ie(t){if(this.prefix.includes("-"))return{[this.prefix.slice(0,-1)]:t};let r=this.prefix[0]==="m"?"margin":"padding",i=r+"-left",o=r+"-right",a=r+"-top",p=r+"-bottom";switch(this.prefix[1]){case"x":return{[i]:t,[o]:t};case"y":return{[a]:t,[p]:t};case"l":return{[i]:t};case"r":return{[o]:t};case"t":return{[a]:t};case"b":return{[p]:t};default:return{[r]:t}}}function de(t,e,r=""){let i="border-";r&&(r="-"+r);let o=/^b(order)?-?(.)?/.exec(t)[2],a=i+"left"+r,p=i+"right"+r,b=i+"top"+r,f=i+"bottom"+r;switch(o){case"x":return{[a]:e,[p]:e};case"y":return{[b]:e,[f]:e};case"l":return{[a]:e};case"r":return{[p]:e};case"t":return{[b]:e};case"b":return{[f]:e};default:return{["border"+r]:e}}}var Le={fade:{from:{opacity:0},to:{opacity:0}},flash:{"from,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},"100%":{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,100%":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(0.8, 0, 1, 1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0, 0, 0.2, 1)"}},ping:{"75%,100%":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},"100%":{transform:"none"}},rotate:{from:{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{from:{transform:"scale(0)"},"100%":{transform:"none"}}};var ye={$:{name:"var",transform(t){return"--"+t}},calc:{transform(t){let e=f=>f==="+"||f==="-"||f==="*"||f==="/",r="",i,o="",a=!1,p=!1,b=(f,c="",d="")=>{if(i===2&&!p){let s=this.analyzeUnitValue(o,ye.calc.unit);s&&(o=s.value+s.unit)}r+=o+c+f+d,i=null,p=!1,o=""};for(let f=0;f<t.length;f++){let c=t[f];if(c==="("||c===")")a=c===")",b(c);else if(c===",")b(c,""," ");else{switch(i){case 1:break;case 2:if(e(c)){b(c," "," ");continue}else/[0-9]/.test(c)||(p=!0);break;default:a&&(r+=" "),isNaN(+c)?e(c)||(i=1):i=2;break}i?o+=c:r+=c}}return b(""),r}},translate:{unit:"rem"},translateX:{unit:"rem"},translateY:{unit:"rem"},translateZ:{unit:"rem"},translate3d:{unit:"rem"},skew:{unit:"deg"},skewX:{unit:"deg"},skewY:{unit:"deg"},skewZ:{unit:"deg"},skew3d:{unit:"deg"},rotate:{unit:"deg"},rotateX:{unit:"deg"},rotateY:{unit:"deg"},rotateZ:{unit:"deg"},rotate3d:{unit:"deg"},blur:{unit:"rem"},"drop-shadow":{unit:"rem"},"hue-rotate":{unit:"deg"},rgb:{unit:""},rgba:{unit:""},hsl:{unit:""},hsla:{unit:""}};var ze="highest";var me={breakpoints:ae,colors:$e,rootSize:16,scope:Me,selectors:Oe,semantics:Ee,themes:Be,rules:We,override:!1,observe:!0,important:!1,functions:ye,keyframes:Le,precedence:ze};var De=[",",".","#","[","!","*",">","+","~",":","@"];var ke=typeof window<"u",Fe=()=>{let t=document.createElement("style");return t.id="master",t},ne=class{constructor(e){this.config=e;this.config?.override||(this.config=K(me,e)),this.cache(),ke&&this.config.observe&&this.observe(document),ne.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;e;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:r,selectors:i,themes:o,colors:a,values:p,breakpoints:b,mediaQueries:f,rules:c}=this.config;function d(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(n,l,u="",m={}){let x=B=>B?(u?u+"-":"")+B:u,T=Object.entries(n),$=[],W=[];for(let B of T){let Y=B[1];(typeof Y=="object"&&!Array.isArray(Y)?$:W).push(B)}for(let[B,Y]of $)s(Y,l,x(B),m);if(l&&u)W.length&&(m[u]=W.reduce((B,[Y,Z])=>(B[Y]=Z,B),{}));else for(let[B,Y]of W)m[x(B)]=Y;return m}if(e)for(let[n,l]of Object.entries(s(e,!0)))this.semantics.push([new RegExp("^"+d(n)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[n,l]]);if(i)for(let[n,l]of Object.entries(s(i,!1))){let u=new RegExp(d(n)+"(?![a-z-])");for(let m of Array.isArray(l)?l:[l]){let x=m.match(/^::-[a-z]+-/m)?.[0]??"",T=this.selectors[x];T||(T=this.selectors[x]=[]);let $=T.find(([W])=>W===u);$||($=[u,[]],T.push($)),$[1].push(m)}}p&&(this.globalValues=s(p,!1)),b&&(this.breakpoints=s(b,!1)),f&&(this.mediaQueries=s(f,!1));let h=r?s(r,!1):{},S=o&&!Array.isArray(o)?Object.entries(o).filter(([,{classes:n}])=>n).reduce((n,[l,{classes:u}])=>(n[l]=s(u,!1),n),{}):{},k=[...Object.keys(h),...Object.entries(S).flatMap(([n,l])=>Object.keys(l))],R=n=>{if(n in this.classes)return;let l=this.classes[n]=[],u=(m,x)=>{if(!x)return;let T=Array.isArray(x)?x:x.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let $ of T){let W=B=>{B in this.themeAffectedClassesBy?m in this.themeAffectedClassesBy[B]?this.themeAffectedClassesBy[B][m].push(n):this.themeAffectedClassesBy[B][m]=[n]:this.themeAffectedClassesBy[B]={[m]:[n]},l.includes(B)||l.push(B)};if(k.includes($)){R($);for(let B of this.classes[$])W(B)}else W($)}};u("",h?.[n]);for(let[m,x]of Object.entries(S))u(m,x?.[n])};for(let n of k)R(n);for(let n in this.themeAffectedClassesBy){let l=this.classesBy[n]=[];for(let u of Object.values(this.themeAffectedClassesBy[n]))for(let m of u)l.includes(m)||l.push(m)}let v=(n,l)=>{if(!l)return;let u=s(l,!0);for(let[m,x]of Object.entries(u)){let T=typeof x=="string"?{"":x}:x;for(let[$,W]of Object.entries(T)){let B=m+($?"-"+$:"");B in this.colorThemesMap?this.colorThemesMap[B][n]=W:this.colorThemesMap[B]={[n]:W}}}for(let m in l)this.colorNames.includes(m)||this.colorNames.push(m)};if(v("",a),o)if(Array.isArray(o))this.themeNames.push(...o);else for(let n in o){let l=o[n];v(n,l.colors),this.themeNames.push(n)}let C=n=>{for(let[l,u]of Object.entries(this.colorThemesMap))for(let[m,x]of Object.entries(u))x.startsWith("#")||n(l,u,m,x)};if(C((n,l,u,m)=>{let x=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(m);if(x){let T="#"+he(+x[1],+x[2],+x[3]);x[4]&&(T+=Math.round(255*+x[4]).toString(16)),l[u]=T}}),C((n,l,u,m)=>{let[x,T]=m.split("/"),$=this.colorThemesMap[x];if($){let W=(u?$[u]:void 0)??$[""];l[u]=T?W.slice(0,7)+Math.round(255*+T).toString(16):W}else console.warn(`\`${m}\` doesn't exist in the extended config \`.colors\``),delete l[u],Object.keys(l).length||delete this.colorThemesMap[n]}),c)for(let n in c){let l=c[n],{native:u,values:m,colored:x}=l,T=l.match;if(l.id=n,l.native=u===!0?n.replace(/(?!^)[A-Z]/g,$=>"-"+$).toLowerCase():void 0,m&&(this.values[n]=s(m,!1)),T){let $=Object.keys(this.values[n]??{});T.includes("$values")&&(T=$.length?T.replace(/\$values/,$.join("|")):T.replace(/(?:\|)?\$values/,"")),x&&T.includes("$colors")&&(T=this.colorNames.length?T.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):T.replace(/(?:\|)?\$colors/,"")),this.matches[n]=new RegExp(T)}}}observe(e,r={subtree:!0,childList:!0}){if(this.root!==e){if(ke&&e){this.root=e;let i=e===document;i&&(ne.root=this),this.host=i?document.documentElement:root.host;let o=i?document.head:e,a=i?document.styleSheets:e.styleSheets;for(let b of a){let{href:f,ownerNode:c}=b;(c.id==="master"||f&&f.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(f))&&(this.style=c)}if(this.style)for(let b=0;b<this.style.sheet.cssRules.length;b++){let f=this.style.sheet.cssRules[b];if(f.constructor.name==="CSSKeyframesRule")continue;let c=s=>{if(s.selectorText){let S=s.selectorText.split(", ")[0].split(" ");for(let k=0;k<S.length;k++){let R=S[k];if(R[0]==="."){let v=R.slice(1),C="";for(let n=0;n<v.length;n++){let l=v[n],u=v[n+1];if(l==="\\"){if(n++,u!=="\\"){C+=u;continue}}else if(De.includes(l))break;C+=l}if(!(C in this.ruleBy)&&!(C in this.classes)){let n=this.create(C)[0];if(n)return n}}}}else if(s.cssRules)for(let h=0;h<s.cssRules.length;h++){let S=c(s.cssRules[h]);if(S)return S}},d=c(f);if(d){this.rules.push(d),this.ruleBy[d.className]=d;for(let s=0;s<d.natives.length;s++)d.natives[s].cssRule=this.style.sheet.cssRules[b+s];b+=d.natives.length-1,d.config.insert?.call(d)}}else this.style=Fe();o.append(this.style);let p=b=>{b.forEach(f=>{f in this.countBy?this.countBy[f]++:(this.countBy[f]=1,this.insert(f))})};p(this.host.classList),r.subtree&&this.host.querySelectorAll("[class]").forEach(b=>p(b.classList)),this.observer=new MutationObserver(b=>{let f={},c=[],d=[],s=[],h=(v,C)=>{C?v.classList.forEach(k):v.classList.forEach(S);let n=v.children;for(let l=0;l<n.length;l++){let u=n[l];u.classList&&(d.push(u),h(u,C))}},S=v=>{v in f?f[v]++:f[v]=1},k=v=>{v in f?f[v]--:v in this.countBy&&(f[v]=-1)},R=(v,C)=>{for(let n=0;n<v.length;n++){let l=v[n];l.classList&&!d.includes(l)&&!s.includes(l)&&(l.isConnected!==C?(d.push(l),h(l,C)):s.push(l))}};for(let v=0;v<b.length;v++){let C=b[v],{addedNodes:n,removedNodes:l,type:u,target:m}=C;if(u==="attributes"){if(c.find(x=>x.target===m))continue;c.push(C)}else R(n,!1),(!m.isConnected||!d.includes(m))&&R(l,!0)}if(!(!c.length&&!Object.keys(f).length)){for(let{oldValue:v,target:C}of c){let n=d.includes(C),l=C.classList,u=v?v.split(" "):[];if(n){if(C.isConnected)continue;for(let m of u)l.contains(m)||k(m)}else if(C.isConnected){l.forEach(m=>{u.includes(m)||S(m)});for(let m of u)l.contains(m)||k(m)}}for(let v in f){let C=f[v],n=(this.countBy[v]||0)+C;n===0?(delete this.countBy[v],this.delete(v)):(v in this.countBy||this.insert(v),this.countBy[v]=n)}}}),this.observer.observe(e,{...r,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.e=new MutationObserver(b=>{for(let f of b)for(let c of f.addedNodes)if(c.nodeName==="STYLE"||c.nodeName==="LINK"&&c.rel==="stylesheet"){let d=this.root.styleSheets;if(d.item(d.length-1).ownerNode!==this.style){let S=this.style.sheet.cssRules;o.append(this.style);for(let k of S)this.style.sheet.insertRule(k.cssText)}}}),this.e.observe(o,{childList:!0}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.e&&(this.e.disconnect(),this.e=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let r=e.cssRules.length-1;r>=0;r--)e.deleteRule(r);this.style?.remove(),this.style=null,this.root=null}match(e){for(let r in this.config.rules){let i=this.config.rules[r],o=this.matches[r],{symbol:a,native:p}=i;if(o&&o.test(e))return{origin:"match",config:i};if(a&&e.startsWith(a))return{origin:"symbol",config:i};if(p&&e.startsWith(p+":"))return{origin:"match",config:i}}for(let r of this.semantics)if(e.match(r[0]))return{origin:"semantics",value:r[1]}}create(e){let r=i=>{if(i in this.ruleBy)return this.ruleBy[i];let o=this.match(i);if(o)return new fe(i,o,this)};return(e in this.classes?this.classes[e].map(i=>r(i)):[r(e)]).filter(i=>i&&i.text)}refresh(e){if(e?.override?this.config=e:this.config=K(me,e),this.cache(),!this.style)return;let r=Fe();this.style.replaceWith(r),this.style=r,this.rules.length=0,this.ruleBy={};for(let i in this.countBy)this.insert(i)}destroy(){let e=ne.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let r=this.style?.sheet,i=o=>{let a=this.ruleBy[o];if(!(!a||o in this.classesBy&&this.classesBy[o].some(p=>p in this.countBy))){if(r&&a.natives.length){let p=a.natives[0];for(let b=0;b<r.cssRules.length;b++)if(r.cssRules[b]===p.cssRule){for(let c=0;c<a.natives.length;c++)r.deleteRule(b);break}}this.rules.splice(this.rules.indexOf(a),1),delete this.ruleBy[o],a.config.delete&&a.config.delete.call(a,o)}};if(e in this.classes){for(let o of this.classes[e])o in this.countBy||i(o);delete this.ruleBy[e]}else i(e)}insert(e){let r=this.create(e);return r.length?(this.insertRules(r),!0):!1}insertRules(e){for(let r of e){if(this.ruleBy[r.className])continue;let i,o=this.rules.length-1,{media:a,order:p,priority:b,hasWhere:f,className:c}=r,d=(s,h,S,k)=>{let R=0,v;h&&(R=s.findIndex(h)),S&&(v=s.findIndex(S)),R===-1&&(R=s.length),(v===void 0||v===-1)&&(v=s.length);let C=s.slice(R,v);for(let n=0;n<C.length;n++){let l=C[n];if(!(l.priority===-1||k&&k(l))&&(l.priority<b||l.priority===b&&(f&&!l.hasWhere||l.order>=p)))return R+n}return R+C.length};if(a){let s=this.rules.findIndex(h=>h.media);if(s!==-1){let h=a.features["max-width"],S=a.features["min-width"];if(h&&S){let k=h.value-S.value;for(let R=o;R>=s;R--){i=R;let v=this.rules[R],C=v.media,n=C.features["max-width"],l=C.features["min-width"];if(!n||!l){i++;break}let u=n.value-l.value;if(u===k){if(f!==v.hasWhere)continue;if(b!==-1){let m=[this.rules[R]];for(let x=R-1;x>=s;x--){let T=this.rules[x];if(T.hasWhere!==f)break;let $=T.media,W=$.features["max-width"],B=$.features["min-width"];if(!W||!B||W.value-B.value!==u)break;m.unshift(this.rules[x])}i=d(this.rules,x=>x.media&&x.priority!==-1&&x.media.features["min-width"]&&x.media.features["max-width"])}break}else if(u>k)break}}else if(S)for(let k=s;k<=o;k++){i=k;let R=this.rules[k],v=R.media,C=v.features["max-width"],n=v.features["min-width"];if(C){if(n)break;continue}let l=n?.value;if(l===S.value){if(!f&&R.hasWhere){i++;continue}if(b!==-1)i=d(this.rules,u=>u.media,u=>u.media&&u.priority!==-1&&u.media.features["min-width"]&&u.media.features["max-width"],u=>!u.media.features["min-width"]&&!u.media.features["max-width"]);else for(let u=k;u<=o;u++){let m=this.rules[u],x=m.media,T=x.features["min-width"];if(!x.features["max-width"]){if(m.hasWhere!==f||T.value!==l||m.order>=p)break;i=u+1}}break}else{if(l>S.value)break;i++}}else if(h)for(let k=o;k>=s;k--){i=k;let R=this.rules[k],v=R.media,C=v.features["max-width"];if(v.features["min-width"])continue;let l=C?.value;if(!l||l>h.value){i++;break}else if(l===h.value){if(f&&!R.hasWhere)continue;if(b!==-1)i=d(this.rules,u=>u.media,u=>u.media&&u.priority!==-1&&u.media.features["min-width"]&&u.media.features["max-width"],u=>!u.media.features["min-width"]&&!u.media.features["max-width"]);else{let u=[this.rules[k]];for(let m=k-1;m>=s;m--){let x=this.rules[m],T=x.media,$=T.features["min-width"],W=T.features["max-width"];if(!$&&(!W||W.value!==l||x.hasWhere!==f))break;u.unshift(x)}for(let m=0;m<u.length;m++){let x=u[m];if(!x.media.features["min-width"]){if(x.order>=p)break;i=k-u.length+2+m}}}break}}}if(i===void 0)if(s===-1)i=o+1;else if(b!==-1)i=s+d(this.rules.slice(s),void 0,h=>h.media.features["max-width"]||h.media.features["min-width"]);else if(f){let h=s;for(;h<this.rules.length;h++){let S=this.rules[h];if(S.priority!==-1||!S.hasWhere||S.order>=p){i=h;break}}i===void 0&&(i=h)}else for(let h=s;h<=o;h++){i=h;let S=this.rules[h],k=S.media;if(S.priority!==-1||k.features["max-width"]||k.features["min-width"])break;if(S.hasWhere)i++;else if(S.order>=p)break}}else if(b===-1){if(f)i=this.rules.findIndex(s=>!s.hasWhere||s.media||s.priority!==-1||s.order>=p),i===-1&&(i=o+1);else{let s=0;for(;s<this.rules.length;s++){let h=this.rules[s];if(h.media||!h.hasWhere&&(h.order>=p||h.priority!==-1)){i=s;break}}i===void 0&&(i=s)}!i&&Object.keys(this.keyframes).length&&i++}else i=d(this.rules,void 0,s=>s.media);if(this.rules.splice(i,0,r),this.ruleBy[c]=r,this.style){let s=this.style.sheet,h=0,S=k=>{let R=this.rules[k];if(R){if(!R.natives.length)return S(k-1);let v=R.natives[R.natives.length-1].cssRule;for(let C=0;C<s.cssRules.length;C++)if(s.cssRules[C]===v){h=C+1;break}}};S(i-1);for(let k=0;k<r.natives.length;)try{let R=r.natives[k];s.insertRule(R.text,h),R.cssRule=s.cssRules[h++],k++}catch(R){console.error(R),r.natives.splice(k,1)}}r.config.insert?.call(r)}}get text(){return this.rules.map(e=>e.text).join("")}},te=ne;oe(te,"root"),oe(te,"config",me),oe(te,"instances",[]),oe(te,"refresh",e=>{for(let r of ne.instances)r.refresh(e)});ke&&(window.MasterCSS=te);var Ve={store:"theme",init:!0},Qe=typeof document<"u",_e=typeof localStorage<"u",ge=class{constructor(e,r=Qe?document.documentElement:null){this.settings=e;this.host=r;this.settings=e?K(Ve,e):Ve,this.settings.init&&this.init()}t=typeof matchMedia<"u"?matchMedia?.("(prefers-color-scheme:dark)"):void 0;i;r;init(){let e=this.settings.default,r=this.storage;r&&(e=r),this.value=e}get storage(){let{store:e}=this.settings;if(_e&&e)return localStorage.getItem(e)}get systemValue(){return this.t.matches?"dark":"light"}set value(e){this.i=e,e==="system"?(this.t?.addEventListener?.("change",this.s),this.current=this.systemValue):(this.n(),this.current=e)}get value(){return this.i}set current(e){let r=this.r;this.r=e,this.host&&r!==e&&(r&&this.host.classList.remove(r),e&&!this.host.classList.contains(e)&&(this.host.classList.add(e),this.host.style&&(this.host.style.colorScheme=e)))}get current(){return this.r}switch(e,r={store:!0,emit:!0}){e&&e!==this.value&&(this.value=e,_e&&this.storage!==e&&this.settings.store&&localStorage.setItem(this.settings.store,e),r.emit&&this.host.dispatchEvent(new CustomEvent("theme",{detail:this})))}n(){this.t?.removeEventListener("change",this.s)}s=e=>{this.current=e.matches?"dark":"light"};destroy(){this.n()}};new te(window.masterCSSConfig);new ge(window.masterCSSThemeSettings);})();
package/dist/index.d.ts CHANGED
@@ -2,6 +2,6 @@ export * from './css';
2
2
  export * from './rule';
3
3
  export * from './theme';
4
4
  export { MasterCSS as default } from './css';
5
- export { default as extend } from 'to-extend';
5
+ export { default as extend } from '@techor/extend';
6
6
  export * from './methods';
7
7
  export * from './config';