@unocss/runtime 0.60.1 → 0.60.2

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,4 +1,4 @@
1
- "use strict";(()=>{var Os=Object.defineProperty;var As=(e,t)=>{for(var r in t)Os(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var et=Q;function V(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function Cn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Rn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Vs(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":Vs(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function tt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Vr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return tt(n)&&tt(o)&&Object.keys(o).forEach(a=>{tt(n[a])&&tt(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Vr(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function Tn(e){return O(e[0])}function En(e){return O(e[0])}var _s=/^\[(.+?)~?="(.*)"\]$/;var Ps=/[\w\u00A0-\uFFFF-_:%-?]/,_r="$$shortcut-no-merge";function jn(e){return e.match(_s)}function Ae(e=""){return Ps.test(e)}function zn(e){return typeof e=="function"?{match:e}:e}function Pr(e){return e.length===3}function On(e){return e!=null}function An(){}var rt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},nt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ot(e){return e instanceof Ve}var it={};function Ms(e=["-",":"]){let t=e.join("|");return it[t]||(it[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),it[t].lastIndex=0,it[t]}function Fs(e,t=["-",":"],r=5){let n=Ms(t),o,i=e.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,a.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};s.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=s.get(j)?.items;g?s.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of s)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of s)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function Vn(e,t=["-",":"],r=5){let n=Fs(e,t,r);return typeof e=="string"?n.expanded:e}var _n=new Set;function ae(e){_n.has(e)||(console.warn("[unocss]",e),_n.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ls(e){return e.split(at)}var st={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ls(e)}};function Pn(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var _e="default",ct="preflights",Us="shortcuts",Ws="imports",Mn={[Ws]:-200,[ct]:-100,[Us]:-10,[_e]:0};function Ln(e){return V(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Fn="_uno_resolved";function Ns(e){let t=typeof e=="function"?e():e;if(Fn in t)return t;t={...t},Object.defineProperty(t,Fn,{value:!0,enumerable:!1});let r=t.shortcuts?Ln(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=V(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Un(e){let t=Ns(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(V).flatMap(Un);return[t,...r]}function Mr(e={},t={}){let r=Object.assign({},t,e),n=Cn((r.presets||[]).flatMap(V).flatMap(Un),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},Mn,...i.map(h=>h.layers));function c(h){return be(i.flatMap(b=>V(b[h]||[])))}let f=c("extractors"),p=a.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=st),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(Tn(h)){V(h[2]?.prefix||"").forEach(A=>{d[A+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Bs(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:be(i.flatMap(h=>V(h.autocomplete?.templates))),extractors:i.flatMap(h=>V(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Ds(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(zn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Ln(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Bs(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Vr(t,r),{})}function Ds(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Wn="0.60.1";var Fr=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Mr(t,r),this.events.emit("config",this.config)}version=Wn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Pn();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Mr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(ot(a)&&ot(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let a=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(a.variants=[...i[3]]);let s=await this.expandShortcut(a.currentSelector,a),c=s?await this.stringifyShortcuts(a.variantMatch,a,s[0],s[1]):(await this.parseUtil(a.variantMatch,a))?.map(f=>this.stringifyUtil(f,a)).filter(On);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=O(t)?await this.applyExtractors(t,n,c?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(a){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(R=>typeof R=="function"?R(b):R).forEach(R=>{p.has(R)||p.add(R)})}let u=s?"":`
1
+ "use strict";(()=>{var Os=Object.defineProperty;var As=(e,t)=>{for(var r in t)Os(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var et=Q;function V(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function Cn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Rn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Vs(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":Vs(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function tt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Vr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return tt(n)&&tt(o)&&Object.keys(o).forEach(a=>{tt(n[a])&&tt(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Vr(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function Tn(e){return O(e[0])}function En(e){return O(e[0])}var _s=/^\[(.+?)~?="(.*)"\]$/;var Ps=/[\w\u00A0-\uFFFF-_:%-?]/,_r="$$shortcut-no-merge";function jn(e){return e.match(_s)}function Ae(e=""){return Ps.test(e)}function zn(e){return typeof e=="function"?{match:e}:e}function Pr(e){return e.length===3}function On(e){return e!=null}function An(){}var rt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},nt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ot(e){return e instanceof Ve}var it={};function Ms(e=["-",":"]){let t=e.join("|");return it[t]||(it[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),it[t].lastIndex=0,it[t]}function Fs(e,t=["-",":"],r=5){let n=Ms(t),o,i=e.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,a.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};s.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=s.get(j)?.items;g?s.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of s)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of s)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function Vn(e,t=["-",":"],r=5){let n=Fs(e,t,r);return typeof e=="string"?n.expanded:e}var _n=new Set;function ae(e){_n.has(e)||(console.warn("[unocss]",e),_n.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ls(e){return e.split(at)}var st={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ls(e)}};function Pn(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var _e="default",ct="preflights",Us="shortcuts",Ws="imports",Mn={[Ws]:-200,[ct]:-100,[Us]:-10,[_e]:0};function Ln(e){return V(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Fn="_uno_resolved";function Ns(e){let t=typeof e=="function"?e():e;if(Fn in t)return t;t={...t},Object.defineProperty(t,Fn,{value:!0,enumerable:!1});let r=t.shortcuts?Ln(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=V(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Un(e){let t=Ns(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(V).flatMap(Un);return[t,...r]}function Mr(e={},t={}){let r=Object.assign({},t,e),n=Cn((r.presets||[]).flatMap(V).flatMap(Un),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},Mn,...i.map(h=>h.layers));function c(h){return be(i.flatMap(b=>V(b[h]||[])))}let f=c("extractors"),p=a.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=st),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(Tn(h)){V(h[2]?.prefix||"").forEach(A=>{d[A+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Bs(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:be(i.flatMap(h=>V(h.autocomplete?.templates))),extractors:i.flatMap(h=>V(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Ds(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(zn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Ln(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Bs(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Vr(t,r),{})}function Ds(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Wn="0.60.2";var Fr=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Mr(t,r),this.events.emit("config",this.config)}version=Wn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Pn();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Mr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(ot(a)&&ot(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let a=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(a.variants=[...i[3]]);let s=await this.expandShortcut(a.currentSelector,a),c=s?await this.stringifyShortcuts(a.variantMatch,a,s[0],s[1]):(await this.parseUtil(a.variantMatch,a))?.map(f=>this.stringifyUtil(f,a)).filter(On);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=O(t)?await this.applyExtractors(t,n,c?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(a){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(R=>typeof R=="function"?R(b):R).forEach(R=>{p.has(R)||p.add(R)})}let u=s?"":`
2
2
  `,d=new Set([_e]),m=c?new Map:new Set,x=new Map,w={},S=Array.from(p).map(async b=>{if(m.has(b))return;let R=await this.parseToken(b);if(R!=null){m instanceof Map?m.set(b,{data:R,count:ot(p)?p.getCount(b):-1}):m.add(b);for(let A of R){let M=A[3]||"",K=A[4]?.layer;x.has(M)||x.set(M,[]),x.get(M).push(A),K&&d.add(K)}}});await Promise.all(S),await(async()=>{if(!i)return;let b={generator:this,theme:this.config.theme},R=new Set([]);this.config.preflights.forEach(({layer:A=ct})=>{d.add(A),R.add(A)}),w=Object.fromEntries(await Promise.all(Array.from(R).map(async A=>{let K=(await Promise.all(this.config.preflights.filter(re=>(re.layer||ct)===A).map(async re=>await re.getCSS(b)))).filter(Boolean).join(u);return[A,K]})))})();let j=this.config.sortLayers(Array.from(d).sort((b,R)=>(this.config.layers[b]??0)-(this.config.layers[R]??0)||b.localeCompare(R))),g={},k=(b=_e)=>{if(g[b])return g[b];let R=Array.from(x).sort((M,K)=>(this.parentOrders.get(M[0])??0)-(this.parentOrders.get(K[0])??0)||M[0]?.localeCompare(K[0]||"")||0).map(([M,K])=>{let re=K.length,ge=K.filter(v=>(v[4]?.layer||_e)===b).sort((v,T)=>v[0]-T[0]||(v[4]?.sort||0)-(T[4]?.sort||0)||v[5]?.currentSelector?.localeCompare(T[5]?.currentSelector??"")||v[1]?.localeCompare(T[1]||"")||v[2]?.localeCompare(T[2]||"")||0).map(([,v,T,,D,,G])=>[[[(v&&Gs(v,o))??"",D?.sort??0]],T,!!(G??D?.noMerge)]);if(!ge.length)return;let Qe=ge.reverse().map(([v,T,D],G)=>{if(!D&&this.config.mergeSelectors)for(let oe=G+1;oe<re;oe++){let Z=ge[oe];if(Z&&!Z[2]&&(v&&Z[0]||v==null&&Z[0]==null)&&Z[1]===T)return v&&Z[0]&&Z[0].push(...v),null}let ne=v?be(v.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${u}`)}{${T}}`:T}).filter(Boolean).reverse().join(u);if(!M)return Qe;let $=M.split(" $$ ");return`${$.join("{")}{${u}${Qe}${u}${"}".repeat($.length)}`}).filter(Boolean).join(u);if(i&&(R=[w[b],R].filter(Boolean).join(u)),f&&R){let M=typeof f=="object"?f.cssLayerName?.(b):void 0;M!==null&&(M||(M=b),R=`@layer ${M}{${u}${R}${u}}`)}let A=s?"":`/* layer: ${b} */${u}`;return g[b]=R?A+R:""},h=(b=j,R)=>b.filter(A=>!R?.includes(A)).map(A=>k(A)||"").filter(Boolean).join(u);return{get css(){return h()},layers:j,matched:m,getLayers:h,getLayer:k}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,a=!0,s={rawSelector:t,theme:this.config.theme,generator:this};for(;a;){a=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let f=await c.match(i,s);if(f){if(O(f)){if(f===i)continue;f={matcher:f}}i=f.matcher,o.unshift(f),n.add(c),a=!0;break}}if(!a)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((f,p)=>(f.order||0)-(p.order||0)).reduceRight((f,p)=>u=>{let d=p.body?.(u.entries)||u.entries,m=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??qs)({...u,entries:d,selector:p.selector?.(u.selector,d)||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:p.layer||u.layer,sort:p.sort||u.sort},f)},f=>f)({prefix:"",selector:Hs(n),pseudo:"",entries:t[2]}),{parent:a,parentOrder:s}=i;a!=null&&s!=null&&this.parentOrders.set(a,s);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:a,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let f of this.config.postprocess)f(c);return c}constructCustomCSS(t,r,n){let o=xe(r);if(O(o))return o;let{selector:i,entries:a,parent:s}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${ye(a)}}`;return s?`${s}{${c}}`:c}async parseUtil(t,r,n=!1,o){let[i,a,s]=O(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let c=this.config.rulesStaticMap[a];if(c&&c[1]&&(n||!c[2]?.internal)){this.config.details&&r.rules.push(c[3]);let p=c[0],u=xe(c[1]),d=c[2];return O(u)?[[p,u,d]]:[[p,i,u,d,s]]}r.variantHandlers=s;let{rulesDynamic:f}=this.config;for(let[p,u,d,m]of f){if(m?.internal&&!n)continue;let x=a;if(m?.prefix){let g=V(m.prefix);if(o){let k=V(o);if(!g.some(h=>k.includes(h)))continue}else{let k=g.find(h=>a.startsWith(h));if(k==null)continue;x=a.slice(k.length)}}let w=x.match(u);if(!w)continue;let S=await d(w,r);if(!S)continue;this.config.details&&r.rules.push([u,d,m]);let j=Rn(S).filter(g=>g.length);if(j.length)return j.map(g=>O(g)?[p,g,m]:[p,i,g,m,s])}}stringifyUtil(t,r){if(!t)return;if(Pr(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:a,sort:s,noMerge:c}=this.applyVariants(t),f=ye(o);if(!f)return;let{layer:p,sort:u,...d}=t[3]??{},m={...d,layer:a??p,sort:s??u};return[t[0],n,f,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?s=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(s)}:An,i,a;for(let s of this.config.shortcuts){let c=t;if(s[2]?.prefix){let p=V(s[2].prefix).find(u=>t.startsWith(u));if(p==null)continue;c=t.slice(p.length)}if(En(s)){if(s[0]===c){i=i||s[2],a=s[1],o(s);break}}else{let f=c.match(s[0]);if(f&&(a=s[1](f,r)),a){i=i||s[2],o(s);break}}}if(O(a)&&(a=Vn(a.trim()).split(/\s+/g)),!a){let[s,c]=O(t)?await this.matchVariants(t):t;if(s!==c){let f=await this.expandShortcut(c,r,n-1);f&&(a=f[0].map(p=>O(p)?s.replace(c,p):p))}}if(a)return[(await Promise.all(a.map(async s=>(O(s)?(await this.expandShortcut(s,r,n-1))?.[0]:void 0)||[s]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new nt,a=(await Promise.all(be(n).map(async p=>{let u=O(p)?await this.parseUtil(p,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(p),void 0,[]]];return!u&&this.config.warn&&ae(`unmatched utility "${p}" in shortcut "${t[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((p,u)=>p[0]-u[0]),[s,,c]=t,f=[];for(let p of a){if(Pr(p)){f.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:u,entries:d,parent:m,sort:x,noMerge:w,layer:S}=this.applyVariants(p,[...p[4],...c],s);i.getFallback(S??o.layer,new rt).getFallback(u,m,[[],p[0]])[0].push([d,!!(w??p[3]?.noMerge),x??0])}return f.concat(i.flatMap((p,u)=>p.map(([d,m],x,w)=>{let S=(g,k,h)=>{let b=Math.max(...h.map(A=>A[1])),R=h.map(A=>A[0]);return(g?[R.flat(1)]:R).map(A=>{let M=ye(A);if(M)return[m,x,M,w,{...o,noMerge:k,sort:b,layer:u},r,void 0]})};return[[d.filter(([,g])=>g).map(([g,,k])=>[g,k]),!0],[d.filter(([,g])=>!g).map(([g,,k])=>[g,k]),!1]].map(([g,k])=>[...S(!1,k,g.filter(([h])=>h.some(b=>b[0]===_r))),...S(!0,k,g.filter(([h])=>h.every(b=>b[0]!==_r)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(t):O(r)?r===t:r.test(t))}getBlocked(t){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(t):O(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function Bn(e,t){return new Fr(e,t)}var Dn=/\s\$\$\s+/g;function Ks(e){return Dn.test(e)}function Gs(e,t){return Ks(e)?e.replace(Dn,t?` ${t} `:" "):t?`${t} ${e}`:e}var Nn=/^\[(.+?)(~?=)"(.*)"\]$/;function Hs(e){return Nn.test(e)?e.replace(Nn,(t,r,n,o)=>`[${et(r)}${n}"${et(o)}"]`):`.${et(e)}`}function qs(e,t){return t(e)}var Ys=/\/\/#\s*sourceMappingURL=.*\n?/g;function In(e){return e.includes("sourceMappingURL=")?e.replace(Ys,""):e}var Xs=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Zs=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Js=/^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Qs(e){let t=[];for(let r of e.matchAll(Zs))r.index!==0&&!/^[\s'"`]/.test(e[r.index-1]??"")||t.push(r[0]);for(let r of e.matchAll(Xs))t.push(r[0]);return e.split(at).forEach(r=>{Ae(r)&&!Js.test(r)&&t.push(r)}),t}var Kn={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return Qs(In(e))}};var Gn=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=ye(Object.entries(e.theme.preflightBase));return V(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];var U={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Lr={...U,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Ur={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},qn={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},Yn=["x","y","z"],Hn=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],L=Object.assign({},...Hn.map(e=>({[e.replace(/ /,"-")]:e})),...Hn.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),C=["inherit","initial","revert","revert-layer","unset"],Pe=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,Xn=/^(var)\s*\((.+)\)(.*)/;function ve(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,a=0;for(let s=0;s<n;s++)switch(e[s]){case t:i||(i=!0,a=s),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(a,s+1),e.slice(s+1),e.slice(0,a)];break}}function se(e,t,r,n){if(e===""||(O(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let a=0;a<o;a++)switch(e[a]){case t:i++;break;case r:if(--i<0)return;break;default:for(let s of n){let c=s.length;if(c&&s===e.slice(a,a+c)&&i===0)return a===0||a===o-c?void 0:[e.slice(0,a),e.slice(a+c)]}}return[e,""]}function ue(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=se(e,"(",")",t);if(!i)return;let[a,s]=i;n.push(a),e=s}if(n.length>0)return n}var Wr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Zn=["%alpha","<alpha-value>"],ec=new RegExp(Zn.map(e=>ie(e)).join("|"));function I(e=""){let t=tc(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Wr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(a=>typeof a=="string"?a.trim():a),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&Zn.includes(t)?1:t}function _(e,t){if(typeof e=="string")return e.replace(ec,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Wr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function tc(e){if(!e)return;let t=rc(e);if(t!=null||(t=nc(e),t!=null)||(t=oc(e),t!=null)||(t=ac(e),t!=null)||(t=sc(e),t!=null))return t}function rc(e){let[,t]=e.match(/^#([\da-f]+)$/i)||[];if(t)switch(t.length){case 3:case 4:let r=Array.from(t,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:t.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(t,16);return{type:"rgb",components:t.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:t.length===6?void 0:Math.round((n&255)/255*100)/100}}}function nc(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function oc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=ue(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var ic=new RegExp(`^(${Wr.join("|")})\\((.+)\\)$`,"i");function ac(e){let t=e.match(ic);if(!t)return;let[,r,n]=t,o=Jn(`${r} ${n}`);if(o){let{alpha:i,components:[a,...s]}=o;return{type:a,components:s,alpha:i}}}function sc(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=Jn(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function Jn(e){let t=ue(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=ue(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function lt(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let a=e[i](n);if(a!=null)return a}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,get(){return r(this,n)}});return t}function W(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(a,s)=>s({...a,...t(a)})}},autocomplete:`${e}:`}}function N(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(a,s)=>s({...a,parent:`${a.parent?`${a.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function ce(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=ve(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function B(e,t,r){if(t.startsWith(e)){let n=ce(e,t,r);if(n){let[o="",i=n[1]]=B("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let a=t.indexOf("/",e.length),s=a===-1||i<=a;return[t.slice(e.length,s?i:a),t.slice(i+o.length),s?"":t.slice(a+1,i)]}}}}var Qn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eo=new Uint8Array(64),cc=new Uint8Array(128);for(let e=0;e<Qn.length;e++){let t=Qn.charCodeAt(e);eo[e]=t,cc[t]=e}var Nr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function to(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),a=0,s="";for(let c=0;c<e.length;c++){let f=e[c];if(c>0&&(a===r&&(s+=Nr.decode(o),a=0),o[a++]=59),f.length!==0){t[0]=0;for(let p=0;p<f.length;p++){let u=f[p];a>n&&(s+=Nr.decode(i),o.copyWithin(0,n,a),a-=n),p>0&&(o[a++]=44),a=Me(o,a,t,u,0),u.length!==1&&(a=Me(o,a,t,u,1),a=Me(o,a,t,u,2),a=Me(o,a,t,u,3),u.length!==4&&(a=Me(o,a,t,u,4)))}}}return s+Nr.decode(o.subarray(0,a))}function Me(e,t,r,n,o){let i=n[o],a=i-r[o];r[o]=i,a=a<0?-a<<1|1:a<<1;do{let s=a&31;a>>>=5,a>0&&(s|=32),e[t++]=eo[s]}while(a>0);return t}var ft=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},ut=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function lc(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var fc=lc(),Br=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=to(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+fc(this.toString())}};function uc(e){let t=e.split(`
3
3
  `),r=t.filter(i=>/^\t+/.test(i)),n=t.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,a)=>{let s=/^ +/.exec(a)[0].length;return Math.min(s,i)},1/0);return new Array(o+1).join(" ")}function pc(e,t){let r=e.split(/[/\\]/),n=t.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var dc=Object.prototype.toString;function mc(e){return dc.call(e)==="[object Object]"}function ro(e){let t=e.split(`
4
4
  `),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,a=r.length;for(;i<a;){let f=i+a>>1;o<r[f]?a=f:i=f+1}let s=i-1,c=o-r[s];return{line:s,column:c}}}var hc=/\w/,Dr=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,r,n,o){if(r.length){let i=r.length-1,a=r.indexOf(`
package/core.global.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var I=Ve;function U(r=[]){return Array.isArray(r)?r:[r]}function D(r){return Array.from(new Set(r))}function ie(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function M(r){return typeof r=="string"}function K(r){return M(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function oe(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function _e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function z(r){return r==null?"":_e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function N(r){return r&&typeof r=="object"&&!Array.isArray(r)}function X(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return N(n)&&N(s)&&Object.keys(s).forEach(o=>{N(n[o])&&N(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=X(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ae(r){return M(r[0])}function ce(r){return M(r[0])}var ee="$$shortcut-no-merge";function le(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function ue(r){return r!=null}function fe(){}var W=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},Y=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function q(r){return r instanceof G}var Z={};function $e(r=["-",":"]){let e=r.join("|");return Z[e]||(Z[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Z[e].lastIndex=0,Z[e]}function Pe(r,e=["-",":"],t=5){let n=$e(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,u,x,S)=>{if(!e.includes(u))return p;s=!0,o.add(c+u);let R=S+c.length+u.length+1,v={length:p.length,items:[]};a.set(S,v);for(let A of[...x.matchAll(/\S+/g)]){let w=R+A.index,m=a.get(w)?.items;m?a.delete(w):m=[{offset:w,length:A[0].length,className:A[0]}];for(let T of m)T.className=T.className==="~"?c:T.className.replace(/^(!?)(.*)/,`$1${c}${u}$2`),v.items.push(T)}return"$".repeat(p.length)}),t-=1;while(s&&t);let l;if(typeof r=="string"){l="";let p=0;for(let[c,u]of a)l+=r.slice(p,c),l+=u.items.map(x=>x.className).join(" "),p=c+u.length;l+=r.slice(p)}else{l=r;for(let[p,c]of a)l.overwrite(p,p+c.length,c.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return l.toString()}}}function pe(r,e=["-",":"],t=5){let n=Pe(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function ge(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var he=/[\\:]?[\s'"`;{}]+/g;function Oe(r){return r.split(he)}var J={name:"@unocss/core/extractor-split",order:0,extract({code:r}){return Oe(r)}};function me(){return{events:{},emit(r,...e){(this.events[r]||[]).forEach(t=>t(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(t=>t!==e)}}}var H="default",Q="preflights",je="shortcuts",Le="imports",ye={[Le]:-200,[Q]:-100,[je]:-10,[H]:0};function Se(r){return U(r).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var xe="_uno_resolved";function ke(r){let e=typeof r=="function"?r():r;if(xe in e)return e;e={...e},Object.defineProperty(e,xe,{value:!0,enumerable:!1});let t=e.shortcuts?Se(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&e.prefix&&(i.prefix=U(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};t?.forEach(n),e.rules?.forEach(n)}return e}function be(r){let e=ke(r);if(!e.presets)return[e];let t=(e.presets||[]).flatMap(U).flatMap(be);return[e,...t]}function re(r={},e={}){let t=Object.assign({},e,r),n=ie((t.presets||[]).flatMap(U).flatMap(be),(f,d)=>f.name===d.name),s=[...n.filter(f=>f.enforce==="pre"),...n.filter(f=>!f.enforce),...n.filter(f=>f.enforce==="post")],i=[...s,t],o=[...i].reverse(),a=Object.assign({},ye,...i.map(f=>f.layers));function l(f){return D(i.flatMap(d=>U(d[f]||[])))}let p=l("extractors"),c=o.find(f=>f.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=J),c&&!p.includes(c)&&p.unshift(c),p.sort((f,d)=>(f.order||0)-(d.order||0));let u=l("rules"),x={},S=u.length,R=u.map((f,d)=>{if(ae(f)){U(f[2]?.prefix||"").forEach(C=>{x[C+f[0]]=[d,f[1],f[2],f]});return}return[d,...f]}).filter(Boolean).reverse(),v=De(i.map(f=>f.theme)),A=l("extendTheme");for(let f of A)v=f(v)||v;let w={templates:D(i.flatMap(f=>U(f.autocomplete?.templates))),extractors:i.flatMap(f=>U(f.autocomplete?.extractors)).sort((f,d)=>(f.order||0)-(d.order||0)),shorthands:Ke(i.map(f=>f.autocomplete?.shorthands||{}))},m=l("separators");m.length||(m=[":","-"]);let T={mergeSelectors:!0,warn:!0,sortLayers:f=>f,...t,blocklist:l("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:a,theme:v,rulesSize:S,rulesDynamic:R,rulesStaticMap:x,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:w,variants:l("variants").map(le).sort((f,d)=>(f.order||0)-(d.order||0)),shortcuts:Se(l("shortcuts")).reverse(),extractors:p,safelist:l("safelist"),separators:m,details:t.details??t.envMode==="dev"};for(let f of i)f?.configResolved?.(T);return T}function De(r){return r.map(e=>e?F(e):{}).reduce((e,t)=>X(e,t),{})}function Ke(r){return r.reduce((e,t)=>{let n={};for(let s in t){let i=t[s];Array.isArray(i)?n[s]=`(${i.join("|")})`:n[s]=i}return{...e,...n}},{})}var Te="0.60.1";var ne=class{constructor(e={},t={}){this.userConfig=e;this.defaults=t;this.config=re(e,t),this.events.emit("config",this.config)}version=Te;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=me();setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=re(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,n=new Set){let s={original:e,code:e,id:t,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(q(o)&&q(n))for(let a of o)n.setCount(a,n.getCount(a)+o.getCount(a));else for(let a of o)n.add(a)}return n}makeContext(e,t){let n={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(n,...s),variantMatch:t};return n}async parseToken(e,t){if(this.blocked.has(e))return;let n=`${e}${t?` ${t}`:""}`;if(this._cache.has(n))return this._cache.get(n);let s=e;for(let p of this.config.preprocess)s=p(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,s);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(n,null);return}let o=this.makeContext(e,[t||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);let a=await this.expandShortcut(o.currentSelector,o),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(p=>this.stringifyUtil(p,o)).filter(ue);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,t={}){let{id:n,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=t,p=this.config.outputToCssLayers,c=M(e)?await this.applyExtractors(e,n,l?new G:new Set):Array.isArray(e)?new Set(e):e;if(o){let d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(d):b).forEach(b=>{c.has(b)||c.add(b)})}let u=a?"":`
1
+ "use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var I=Ve;function U(r=[]){return Array.isArray(r)?r:[r]}function D(r){return Array.from(new Set(r))}function ie(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function M(r){return typeof r=="string"}function K(r){return M(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function oe(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function _e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function z(r){return r==null?"":_e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function N(r){return r&&typeof r=="object"&&!Array.isArray(r)}function X(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return N(n)&&N(s)&&Object.keys(s).forEach(o=>{N(n[o])&&N(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=X(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ae(r){return M(r[0])}function ce(r){return M(r[0])}var ee="$$shortcut-no-merge";function le(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function ue(r){return r!=null}function fe(){}var W=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},Y=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function q(r){return r instanceof G}var Z={};function $e(r=["-",":"]){let e=r.join("|");return Z[e]||(Z[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Z[e].lastIndex=0,Z[e]}function Pe(r,e=["-",":"],t=5){let n=$e(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,u,x,S)=>{if(!e.includes(u))return p;s=!0,o.add(c+u);let R=S+c.length+u.length+1,v={length:p.length,items:[]};a.set(S,v);for(let A of[...x.matchAll(/\S+/g)]){let w=R+A.index,m=a.get(w)?.items;m?a.delete(w):m=[{offset:w,length:A[0].length,className:A[0]}];for(let T of m)T.className=T.className==="~"?c:T.className.replace(/^(!?)(.*)/,`$1${c}${u}$2`),v.items.push(T)}return"$".repeat(p.length)}),t-=1;while(s&&t);let l;if(typeof r=="string"){l="";let p=0;for(let[c,u]of a)l+=r.slice(p,c),l+=u.items.map(x=>x.className).join(" "),p=c+u.length;l+=r.slice(p)}else{l=r;for(let[p,c]of a)l.overwrite(p,p+c.length,c.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return l.toString()}}}function pe(r,e=["-",":"],t=5){let n=Pe(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function ge(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var he=/[\\:]?[\s'"`;{}]+/g;function Oe(r){return r.split(he)}var J={name:"@unocss/core/extractor-split",order:0,extract({code:r}){return Oe(r)}};function me(){return{events:{},emit(r,...e){(this.events[r]||[]).forEach(t=>t(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(t=>t!==e)}}}var H="default",Q="preflights",je="shortcuts",Le="imports",ye={[Le]:-200,[Q]:-100,[je]:-10,[H]:0};function Se(r){return U(r).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var xe="_uno_resolved";function ke(r){let e=typeof r=="function"?r():r;if(xe in e)return e;e={...e},Object.defineProperty(e,xe,{value:!0,enumerable:!1});let t=e.shortcuts?Se(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&e.prefix&&(i.prefix=U(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};t?.forEach(n),e.rules?.forEach(n)}return e}function be(r){let e=ke(r);if(!e.presets)return[e];let t=(e.presets||[]).flatMap(U).flatMap(be);return[e,...t]}function re(r={},e={}){let t=Object.assign({},e,r),n=ie((t.presets||[]).flatMap(U).flatMap(be),(f,d)=>f.name===d.name),s=[...n.filter(f=>f.enforce==="pre"),...n.filter(f=>!f.enforce),...n.filter(f=>f.enforce==="post")],i=[...s,t],o=[...i].reverse(),a=Object.assign({},ye,...i.map(f=>f.layers));function l(f){return D(i.flatMap(d=>U(d[f]||[])))}let p=l("extractors"),c=o.find(f=>f.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=J),c&&!p.includes(c)&&p.unshift(c),p.sort((f,d)=>(f.order||0)-(d.order||0));let u=l("rules"),x={},S=u.length,R=u.map((f,d)=>{if(ae(f)){U(f[2]?.prefix||"").forEach(C=>{x[C+f[0]]=[d,f[1],f[2],f]});return}return[d,...f]}).filter(Boolean).reverse(),v=De(i.map(f=>f.theme)),A=l("extendTheme");for(let f of A)v=f(v)||v;let w={templates:D(i.flatMap(f=>U(f.autocomplete?.templates))),extractors:i.flatMap(f=>U(f.autocomplete?.extractors)).sort((f,d)=>(f.order||0)-(d.order||0)),shorthands:Ke(i.map(f=>f.autocomplete?.shorthands||{}))},m=l("separators");m.length||(m=[":","-"]);let T={mergeSelectors:!0,warn:!0,sortLayers:f=>f,...t,blocklist:l("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:a,theme:v,rulesSize:S,rulesDynamic:R,rulesStaticMap:x,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:w,variants:l("variants").map(le).sort((f,d)=>(f.order||0)-(d.order||0)),shortcuts:Se(l("shortcuts")).reverse(),extractors:p,safelist:l("safelist"),separators:m,details:t.details??t.envMode==="dev"};for(let f of i)f?.configResolved?.(T);return T}function De(r){return r.map(e=>e?F(e):{}).reduce((e,t)=>X(e,t),{})}function Ke(r){return r.reduce((e,t)=>{let n={};for(let s in t){let i=t[s];Array.isArray(i)?n[s]=`(${i.join("|")})`:n[s]=i}return{...e,...n}},{})}var Te="0.60.2";var ne=class{constructor(e={},t={}){this.userConfig=e;this.defaults=t;this.config=re(e,t),this.events.emit("config",this.config)}version=Te;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=me();setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=re(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,n=new Set){let s={original:e,code:e,id:t,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(q(o)&&q(n))for(let a of o)n.setCount(a,n.getCount(a)+o.getCount(a));else for(let a of o)n.add(a)}return n}makeContext(e,t){let n={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(n,...s),variantMatch:t};return n}async parseToken(e,t){if(this.blocked.has(e))return;let n=`${e}${t?` ${t}`:""}`;if(this._cache.has(n))return this._cache.get(n);let s=e;for(let p of this.config.preprocess)s=p(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,s);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(n,null);return}let o=this.makeContext(e,[t||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);let a=await this.expandShortcut(o.currentSelector,o),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(p=>this.stringifyUtil(p,o)).filter(ue);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,t={}){let{id:n,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=t,p=this.config.outputToCssLayers,c=M(e)?await this.applyExtractors(e,n,l?new G:new Set):Array.isArray(e)?new Set(e):e;if(o){let d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(d):b).forEach(b=>{c.has(b)||c.add(b)})}let u=a?"":`
2
2
  `,x=new Set([H]),S=l?new Map:new Set,R=new Map,v={},A=Array.from(c).map(async d=>{if(S.has(d))return;let b=await this.parseToken(d);if(b!=null){S instanceof Map?S.set(d,{data:b,count:q(c)?c.getCount(d):-1}):S.add(d);for(let C of b){let E=C[3]||"",_=C[4]?.layer;R.has(E)||R.set(E,[]),R.get(E).push(C),_&&x.add(_)}}});await Promise.all(A),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},b=new Set([]);this.config.preflights.forEach(({layer:C=Q})=>{x.add(C),b.add(C)}),v=Object.fromEntries(await Promise.all(Array.from(b).map(async C=>{let _=(await Promise.all(this.config.preflights.filter(O=>(O.layer||Q)===C).map(async O=>await O.getCSS(d)))).filter(Boolean).join(u);return[C,_]})))})();let w=this.config.sortLayers(Array.from(x).sort((d,b)=>(this.config.layers[d]??0)-(this.config.layers[b]??0)||d.localeCompare(b))),m={},T=(d=H)=>{if(m[d])return m[d];let b=Array.from(R).sort((E,_)=>(this.parentOrders.get(E[0])??0)-(this.parentOrders.get(_[0])??0)||E[0]?.localeCompare(_[0]||"")||0).map(([E,_])=>{let O=_.length,k=_.filter(g=>(g[4]?.layer||H)===d).sort((g,y)=>g[0]-y[0]||(g[4]?.sort||0)-(y[4]?.sort||0)||g[5]?.currentSelector?.localeCompare(y[5]?.currentSelector??"")||g[1]?.localeCompare(y[1]||"")||g[2]?.localeCompare(y[2]||"")||0).map(([,g,y,,V,,$])=>[[[(g&&He(g,s))??"",V?.sort??0]],y,!!($??V?.noMerge)]);if(!k.length)return;let B=k.reverse().map(([g,y,V],$)=>{if(!V&&this.config.mergeSelectors)for(let L=$+1;L<O;L++){let P=k[L];if(P&&!P[2]&&(g&&P[0]||g==null&&P[0]==null)&&P[1]===y)return g&&P[0]&&P[0].push(...g),null}let j=g?D(g.sort((L,P)=>L[1]-P[1]||L[0]?.localeCompare(P[0]||"")||0).map(L=>L[0]).filter(Boolean)):[];return j.length?`${j.join(`,${u}`)}{${y}}`:y}).filter(Boolean).reverse().join(u);if(!E)return B;let h=E.split(" $$ ");return`${h.join("{")}{${u}${B}${u}${"}".repeat(h.length)}`}).filter(Boolean).join(u);if(i&&(b=[v[d],b].filter(Boolean).join(u)),p&&b){let E=typeof p=="object"?p.cssLayerName?.(d):void 0;E!==null&&(E||(E=d),b=`@layer ${E}{${u}${b}${u}}`)}let C=a?"":`/* layer: ${d} */${u}`;return m[d]=b?C+b:""},f=(d=w,b)=>d.filter(C=>!b?.includes(C)).map(C=>T(C)||"").filter(Boolean).join(u);return{get css(){return f()},layers:w,matched:S,getLayers:f,getLayer:T}}async matchVariants(e,t){let n=new Set,s=[],i=t||e,o=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let p=await l.match(i,a);if(p){if(M(p)){if(p===i)continue;p={matcher:p}}i=p.matcher,s.unshift(p),n.add(l),o=!0;break}}if(!o)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,s,n]}applyVariants(e,t=e[4],n=e[1]){let i=t.slice().sort((p,c)=>(p.order||0)-(c.order||0)).reduceRight((p,c)=>u=>{let x=c.body?.(u.entries)||u.entries,S=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??Ie)({...u,entries:x,selector:c.selector?.(u.selector,x)||u.selector,parent:S[0]||u.parent,parentOrder:S[1]||u.parentOrder,layer:c.layer||u.layer,sort:c.sort||u.sort},p)},p=>p)({prefix:"",selector:Be(n),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);let l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let p of this.config.postprocess)p(l);return l}constructCustomCSS(e,t,n){let s=K(t);if(M(s))return s;let{selector:i,entries:o,parent:a}=this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]),l=`${i}{${z(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,t,n=!1,s){let[i,o,a]=M(e)?await this.matchVariants(e):e;this.config.details&&(t.rules=t.rules??[]);let l=this.config.rulesStaticMap[o];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&t.rules.push(l[3]);let c=l[0],u=K(l[1]),x=l[2];return M(u)?[[c,u,x]]:[[c,i,u,x,a]]}t.variantHandlers=a;let{rulesDynamic:p}=this.config;for(let[c,u,x,S]of p){if(S?.internal&&!n)continue;let R=o;if(S?.prefix){let m=U(S.prefix);if(s){let T=U(s);if(!m.some(f=>T.includes(f)))continue}else{let T=m.find(f=>o.startsWith(f));if(T==null)continue;R=o.slice(T.length)}}let v=R.match(u);if(!v)continue;let A=await x(v,t);if(!A)continue;this.config.details&&t.rules.push([u,x,S]);let w=oe(A).filter(m=>m.length);if(w.length)return w.map(m=>M(m)?[c,m,S]:[c,i,m,S,a])}}stringifyUtil(e,t){if(!e)return;if(te(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:n,entries:s,parent:i,layer:o,sort:a,noMerge:l}=this.applyVariants(e),p=z(s);if(!p)return;let{layer:c,sort:u,...x}=e[3]??{},S={...x,layer:o??c,sort:a??u};return[e[0],n,p,i,S,this.config.details?t:void 0,l]}async expandShortcut(e,t,n=5){if(n===0)return;let s=this.config.details?a=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(a)}:fe,i,o;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let c=U(a[2].prefix).find(u=>e.startsWith(u));if(c==null)continue;l=e.slice(c.length)}if(ce(a)){if(a[0]===l){i=i||a[2],o=a[1],s(a);break}}else{let p=l.match(a[0]);if(p&&(o=a[1](p,t)),o){i=i||a[2],s(a);break}}}if(M(o)&&(o=pe(o.trim()).split(/\s+/g)),!o){let[a,l]=M(e)?await this.matchVariants(e):e;if(a!==l){let p=await this.expandShortcut(l,t,n-1);p&&(o=p[0].map(c=>M(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(M(a)?(await this.expandShortcut(a,t,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,t,n,s={layer:this.config.shortcutsLayer}){let i=new Y,o=(await Promise.all(D(n).map(async c=>{let u=M(c)?await this.parseUtil(c,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(c),void 0,[]]];return!u&&this.config.warn&&ge(`unmatched utility "${c}" in shortcut "${e[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((c,u)=>c[0]-u[0]),[a,,l]=e,p=[];for(let c of o){if(te(c)){p.push([c[0],void 0,c[1],void 0,c[2],t,void 0]);continue}let{selector:u,entries:x,parent:S,sort:R,noMerge:v,layer:A}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(A??s.layer,new W).getFallback(u,S,[[],c[0]])[0].push([x,!!(v??c[3]?.noMerge),R??0])}return p.concat(i.flatMap((c,u)=>c.map(([x,S],R,v)=>{let A=(m,T,f)=>{let d=Math.max(...f.map(C=>C[1])),b=f.map(C=>C[0]);return(m?[b.flat(1)]:b).map(C=>{let E=z(C);if(E)return[S,R,E,v,{...s,noMerge:T,sort:d,layer:u},t,void 0]})};return[[x.filter(([,m])=>m).map(([m,,T])=>[m,T]),!0],[x.filter(([,m])=>!m).map(([m,,T])=>[m,T]),!1]].map(([m,T])=>[...A(!1,T,m.filter(([f])=>f.some(d=>d[0]===ee))),...A(!0,T,m.filter(([f])=>f.every(d=>d[0]!==ee)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(t=>Array.isArray(t)?t[0]:t).some(t=>typeof t=="function"?t(e):M(t)?t===e:t.test(e))}getBlocked(e){let t=this.config.blocklist.find(n=>{let s=Array.isArray(n)?n[0]:n;return typeof s=="function"?s(e):M(s)?s===e:s.test(e)});return t?Array.isArray(t)?t:[t,void 0]:void 0}};function Ee(r,e){return new ne(r,e)}var Re=/\s\$\$\s+/g;function Ge(r){return Re.test(r)}function He(r,e){return Ge(r)?r.replace(Re,e?` ${e} `:" "):e?`${e} ${r}`:r}var Ce=/^\[(.+?)(~?=)"(.*)"\]$/;function Be(r){return Ce.test(r)?r.replace(Ce,(e,t,n,s)=>`[${I(t)}${n}"${I(s)}"]`):`.${I(r)}`}function Ie(r,e){return e(r)}function Ne(r){return r.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function ve(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Me(r){return r.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Ae=["Webkit","Moz","ms"];function we(r){let e={};function t(n){let s=e[n];if(s)return s;let i=Ne(n);if(i!=="filter"&&i in r)return e[n]=Me(i);i=ve(i);for(let o=0;o<Ae.length;o++){let a=`${Ae[o]}${i}`;if(a in r)return e[n]=Me(ve(a))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Ue(r){return r.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}function se(r={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,n=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},r,s.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=U(o.postprocess)).unshift(we(t.createElement("div").style)),i.configResolved?.(s,o);let l=Ee(s,o),p=h=>i.inject?i.inject(h):n().prepend(h),c=()=>i.rootElement?i.rootElement():t.body,u=new Map,x=!0,S=new Set,R,v,A=[],w=()=>new Promise(h=>{A.push(h),v!=null&&clearTimeout(v),v=setTimeout(()=>f().then(()=>{let g=A;A=[],g.forEach(y=>y())}),0)});function m(h){if(h.nodeType!==1)return;let g=h;g.hasAttribute(a)&&g.removeAttribute(a),g.querySelectorAll(`[${a}]`).forEach(y=>{y.removeAttribute(a)})}function T(h,g){let y=u.get(h);if(!y)if(y=t.createElement("style"),y.setAttribute("data-unocss-runtime-layer",h),u.set(h,y),g==null)p(y);else{let V=T(g),$=V.parentNode;$?$.insertBefore(y,V.nextSibling):p(y)}return y}async function f(){let h=await l.generate(S);return h.layers.reduce((g,y)=>(T(y,g).innerHTML=h.getLayer(y)??"",y),void 0),S=h.matched,{...h,getStyleElement:g=>u.get(g),getStyleElements:()=>u}}async function d(h){let g=S.size;await l.applyExtractors(h,void 0,S),g!==S.size&&await w()}async function b(h=c()){let g=h&&h.outerHTML;g&&(await d(`${g} ${Ue(g)}`),m(n()),m(h))}let C=new MutationObserver(h=>{x||h.forEach(async g=>{if(g.target.nodeType!==1)return;let y=g.target;for(let V of u)if(y===V[1])return;if(g.type==="childList")g.addedNodes.forEach(async V=>{if(V.nodeType!==1)return;let $=V;R&&!R($)||(await d($.outerHTML),m($))});else{if(R&&!R(y))return;if(g.attributeName!==a){let V=Array.from(y.attributes).map(j=>j.value?`${j.name}="${j.value}"`:j.name).join(" "),$=`<${y.tagName.toLowerCase()} ${V}>`;await d($)}y.hasAttribute(a)&&y.removeAttribute(a)}})}),E=!1;function _(){if(E)return;let h=i.observer?.target?i.observer.target():c();h&&(C.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),E=!0)}function O(){i.bypassDefined&&ze(l.blocked),b(),_()}function k(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",O):O()}let B=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(h){M(h)||(h.forEach(g=>S.add(g)),h=""),await d(h)},extractAll:b,inspect(h){R=h},toggleObserver(h){h===void 0?x=!x:x=!!h,!E&&!x&&k()},update:f,presets:e.__unocss_runtime?.presets??{}};i.ready?.(B)!==!1&&(x=!1,k())}function ze(r=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],n;try{if(n=t.cssRules||t.rules,!n)continue;Array.from(n).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),r.add(s))})}catch{continue}}return r}se();})();
package/full.global.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var Wa=Object.defineProperty;var Na=(e,t)=>{for(var r in t)Wa(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var tt=Q;function V(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function En(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function jn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ba(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":Ba(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function rt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ae(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return rt(n)&&rt(o)&&Object.keys(o).forEach(s=>{rt(n[s])&&rt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ae(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function zn(e){return O(e[0])}function On(e){return O(e[0])}var Da=/^\[(.+?)~?="(.*)"\]$/;var Ia=/[\w\u00A0-\uFFFF-_:%-?]/,Pr="$$shortcut-no-merge";function An(e){return e.match(Da)}function Ve(e=""){return Ia.test(e)}function Vn(e){return typeof e=="function"?{match:e}:e}function Mr(e){return e.length===3}function _n(e){return e!=null}function Pn(){}var nt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},ot=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var _e=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function it(e){return e instanceof _e}var st={};function Ka(e=["-",":"]){let t=e.join("|");return st[t]||(st[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),st[t].lastIndex=0,st[t]}function Ga(e,t=["-",":"],r=5){let n=Ka(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};a.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=a.get(j)?.items;g?a.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Mn(e,t=["-",":"],r=5){let n=Ga(e,t,r);return typeof e=="string"?n.expanded:e}var Fn=new Set;function se(e){Fn.has(e)||(console.warn("[unocss]",e),Fn.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ha(e){return e.split(at)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ha(e)}};function Un(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var Pe="default",lt="preflights",qa="shortcuts",Ya="imports",Ln={[Ya]:-200,[lt]:-100,[qa]:-10,[Pe]:0};function Nn(e){return V(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Wn="_uno_resolved";function Xa(e){let t=typeof e=="function"?e():e;if(Wn in t)return t;t={...t},Object.defineProperty(t,Wn,{value:!0,enumerable:!1});let r=t.shortcuts?Nn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=V(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Bn(e){let t=Xa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(V).flatMap(Bn);return[t,...r]}function Fr(e={},t={}){let r=Object.assign({},t,e),n=En((r.presets||[]).flatMap(V).flatMap(Bn),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Ln,...i.map(h=>h.layers));function c(h){return be(i.flatMap(b=>V(b[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=ct),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(zn(h)){V(h[2]?.prefix||"").forEach(A=>{d[A+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Za(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:be(i.flatMap(h=>V(h.autocomplete?.templates))),extractors:i.flatMap(h=>V(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Ja(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(Vn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Nn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Za(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Ae(t,r),{})}function Ja(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Dn="0.60.1";var Ur=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Fr(t,r),this.events.emit("config",this.config)}version=Dn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Un();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Fr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(it(s)&&it(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let s=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(s.variants=[...i[3]]);let a=await this.expandShortcut(s.currentSelector,s),c=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(f=>this.stringifyUtil(f,s)).filter(_n);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=O(t)?await this.applyExtractors(t,n,c?new _e:new Set):Array.isArray(t)?new Set(t):t;if(s){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(R=>typeof R=="function"?R(b):R).forEach(R=>{p.has(R)||p.add(R)})}let u=a?"":`
1
+ "use strict";(()=>{var Wa=Object.defineProperty;var Na=(e,t)=>{for(var r in t)Wa(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var tt=Q;function V(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function En(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function jn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ba(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":Ba(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function rt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ae(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return rt(n)&&rt(o)&&Object.keys(o).forEach(s=>{rt(n[s])&&rt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ae(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function zn(e){return O(e[0])}function On(e){return O(e[0])}var Da=/^\[(.+?)~?="(.*)"\]$/;var Ia=/[\w\u00A0-\uFFFF-_:%-?]/,Pr="$$shortcut-no-merge";function An(e){return e.match(Da)}function Ve(e=""){return Ia.test(e)}function Vn(e){return typeof e=="function"?{match:e}:e}function Mr(e){return e.length===3}function _n(e){return e!=null}function Pn(){}var nt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},ot=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var _e=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function it(e){return e instanceof _e}var st={};function Ka(e=["-",":"]){let t=e.join("|");return st[t]||(st[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),st[t].lastIndex=0,st[t]}function Ga(e,t=["-",":"],r=5){let n=Ka(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};a.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=a.get(j)?.items;g?a.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Mn(e,t=["-",":"],r=5){let n=Ga(e,t,r);return typeof e=="string"?n.expanded:e}var Fn=new Set;function se(e){Fn.has(e)||(console.warn("[unocss]",e),Fn.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ha(e){return e.split(at)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ha(e)}};function Un(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var Pe="default",lt="preflights",qa="shortcuts",Ya="imports",Ln={[Ya]:-200,[lt]:-100,[qa]:-10,[Pe]:0};function Nn(e){return V(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Wn="_uno_resolved";function Xa(e){let t=typeof e=="function"?e():e;if(Wn in t)return t;t={...t},Object.defineProperty(t,Wn,{value:!0,enumerable:!1});let r=t.shortcuts?Nn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=V(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Bn(e){let t=Xa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(V).flatMap(Bn);return[t,...r]}function Fr(e={},t={}){let r=Object.assign({},t,e),n=En((r.presets||[]).flatMap(V).flatMap(Bn),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Ln,...i.map(h=>h.layers));function c(h){return be(i.flatMap(b=>V(b[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=ct),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(zn(h)){V(h[2]?.prefix||"").forEach(A=>{d[A+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Za(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:be(i.flatMap(h=>V(h.autocomplete?.templates))),extractors:i.flatMap(h=>V(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Ja(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(Vn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Nn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Za(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Ae(t,r),{})}function Ja(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Dn="0.60.2";var Ur=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Fr(t,r),this.events.emit("config",this.config)}version=Dn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Un();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Fr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(it(s)&&it(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let s=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(s.variants=[...i[3]]);let a=await this.expandShortcut(s.currentSelector,s),c=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(f=>this.stringifyUtil(f,s)).filter(_n);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=O(t)?await this.applyExtractors(t,n,c?new _e:new Set):Array.isArray(t)?new Set(t):t;if(s){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(R=>typeof R=="function"?R(b):R).forEach(R=>{p.has(R)||p.add(R)})}let u=a?"":`
2
2
  `,d=new Set([Pe]),m=c?new Map:new Set,x=new Map,w={},S=Array.from(p).map(async b=>{if(m.has(b))return;let R=await this.parseToken(b);if(R!=null){m instanceof Map?m.set(b,{data:R,count:it(p)?p.getCount(b):-1}):m.add(b);for(let A of R){let M=A[3]||"",K=A[4]?.layer;x.has(M)||x.set(M,[]),x.get(M).push(A),K&&d.add(K)}}});await Promise.all(S),await(async()=>{if(!i)return;let b={generator:this,theme:this.config.theme},R=new Set([]);this.config.preflights.forEach(({layer:A=lt})=>{d.add(A),R.add(A)}),w=Object.fromEntries(await Promise.all(Array.from(R).map(async A=>{let K=(await Promise.all(this.config.preflights.filter(re=>(re.layer||lt)===A).map(async re=>await re.getCSS(b)))).filter(Boolean).join(u);return[A,K]})))})();let j=this.config.sortLayers(Array.from(d).sort((b,R)=>(this.config.layers[b]??0)-(this.config.layers[R]??0)||b.localeCompare(R))),g={},k=(b=Pe)=>{if(g[b])return g[b];let R=Array.from(x).sort((M,K)=>(this.parentOrders.get(M[0])??0)-(this.parentOrders.get(K[0])??0)||M[0]?.localeCompare(K[0]||"")||0).map(([M,K])=>{let re=K.length,ge=K.filter(v=>(v[4]?.layer||Pe)===b).sort((v,T)=>v[0]-T[0]||(v[4]?.sort||0)-(T[4]?.sort||0)||v[5]?.currentSelector?.localeCompare(T[5]?.currentSelector??"")||v[1]?.localeCompare(T[1]||"")||v[2]?.localeCompare(T[2]||"")||0).map(([,v,T,,D,,G])=>[[[(v&&tc(v,o))??"",D?.sort??0]],T,!!(G??D?.noMerge)]);if(!ge.length)return;let et=ge.reverse().map(([v,T,D],G)=>{if(!D&&this.config.mergeSelectors)for(let oe=G+1;oe<re;oe++){let Z=ge[oe];if(Z&&!Z[2]&&(v&&Z[0]||v==null&&Z[0]==null)&&Z[1]===T)return v&&Z[0]&&Z[0].push(...v),null}let ne=v?be(v.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${u}`)}{${T}}`:T}).filter(Boolean).reverse().join(u);if(!M)return et;let $=M.split(" $$ ");return`${$.join("{")}{${u}${et}${u}${"}".repeat($.length)}`}).filter(Boolean).join(u);if(i&&(R=[w[b],R].filter(Boolean).join(u)),f&&R){let M=typeof f=="object"?f.cssLayerName?.(b):void 0;M!==null&&(M||(M=b),R=`@layer ${M}{${u}${R}${u}}`)}let A=a?"":`/* layer: ${b} */${u}`;return g[b]=R?A+R:""},h=(b=j,R)=>b.filter(A=>!R?.includes(A)).map(A=>k(A)||"").filter(Boolean).join(u);return{get css(){return h()},layers:j,matched:m,getLayers:h,getLayer:k}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,s=!0,a={rawSelector:t,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let f=await c.match(i,a);if(f){if(O(f)){if(f===i)continue;f={matcher:f}}i=f.matcher,o.unshift(f),n.add(c),s=!0;break}}if(!s)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((f,p)=>(f.order||0)-(p.order||0)).reduceRight((f,p)=>u=>{let d=p.body?.(u.entries)||u.entries,m=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??rc)({...u,entries:d,selector:p.selector?.(u.selector,d)||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:p.layer||u.layer,sort:p.sort||u.sort},f)},f=>f)({prefix:"",selector:Lr(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let f of this.config.postprocess)f(c);return c}constructCustomCSS(t,r,n){let o=xe(r);if(O(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${ye(s)}}`;return a?`${a}{${c}}`:c}async parseUtil(t,r,n=!1,o){let[i,s,a]=O(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let c=this.config.rulesStaticMap[s];if(c&&c[1]&&(n||!c[2]?.internal)){this.config.details&&r.rules.push(c[3]);let p=c[0],u=xe(c[1]),d=c[2];return O(u)?[[p,u,d]]:[[p,i,u,d,a]]}r.variantHandlers=a;let{rulesDynamic:f}=this.config;for(let[p,u,d,m]of f){if(m?.internal&&!n)continue;let x=s;if(m?.prefix){let g=V(m.prefix);if(o){let k=V(o);if(!g.some(h=>k.includes(h)))continue}else{let k=g.find(h=>s.startsWith(h));if(k==null)continue;x=s.slice(k.length)}}let w=x.match(u);if(!w)continue;let S=await d(w,r);if(!S)continue;this.config.details&&r.rules.push([u,d,m]);let j=jn(S).filter(g=>g.length);if(j.length)return j.map(g=>O(g)?[p,g,m]:[p,i,g,m,a])}}stringifyUtil(t,r){if(!t)return;if(Mr(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:c}=this.applyVariants(t),f=ye(o);if(!f)return;let{layer:p,sort:u,...d}=t[3]??{},m={...d,layer:s??p,sort:a??u};return[t[0],n,f,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Pn,i,s;for(let a of this.config.shortcuts){let c=t;if(a[2]?.prefix){let p=V(a[2].prefix).find(u=>t.startsWith(u));if(p==null)continue;c=t.slice(p.length)}if(On(a)){if(a[0]===c){i=i||a[2],s=a[1],o(a);break}}else{let f=c.match(a[0]);if(f&&(s=a[1](f,r)),s){i=i||a[2],o(a);break}}}if(O(s)&&(s=Mn(s.trim()).split(/\s+/g)),!s){let[a,c]=O(t)?await this.matchVariants(t):t;if(a!==c){let f=await this.expandShortcut(c,r,n-1);f&&(s=f[0].map(p=>O(p)?a.replace(c,p):p))}}if(s)return[(await Promise.all(s.map(async a=>(O(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new ot,s=(await Promise.all(be(n).map(async p=>{let u=O(p)?await this.parseUtil(p,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(p),void 0,[]]];return!u&&this.config.warn&&se(`unmatched utility "${p}" in shortcut "${t[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((p,u)=>p[0]-u[0]),[a,,c]=t,f=[];for(let p of s){if(Mr(p)){f.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:u,entries:d,parent:m,sort:x,noMerge:w,layer:S}=this.applyVariants(p,[...p[4],...c],a);i.getFallback(S??o.layer,new nt).getFallback(u,m,[[],p[0]])[0].push([d,!!(w??p[3]?.noMerge),x??0])}return f.concat(i.flatMap((p,u)=>p.map(([d,m],x,w)=>{let S=(g,k,h)=>{let b=Math.max(...h.map(A=>A[1])),R=h.map(A=>A[0]);return(g?[R.flat(1)]:R).map(A=>{let M=ye(A);if(M)return[m,x,M,w,{...o,noMerge:k,sort:b,layer:u},r,void 0]})};return[[d.filter(([,g])=>g).map(([g,,k])=>[g,k]),!0],[d.filter(([,g])=>!g).map(([g,,k])=>[g,k]),!1]].map(([g,k])=>[...S(!1,k,g.filter(([h])=>h.some(b=>b[0]===Pr))),...S(!0,k,g.filter(([h])=>h.every(b=>b[0]!==Pr)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(t):O(r)?r===t:r.test(t))}getBlocked(t){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(t):O(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function Kn(e,t){return new Ur(e,t)}var Gn=/\s\$\$\s+/g;function ec(e){return Gn.test(e)}function tc(e,t){return ec(e)?e.replace(Gn,t?` ${t} `:" "):t?`${t} ${e}`:e}var In=/^\[(.+?)(~?=)"(.*)"\]$/;function Lr(e){return In.test(e)?e.replace(In,(t,r,n,o)=>`[${tt(r)}${n}"${tt(o)}"]`):`.${tt(e)}`}function rc(e,t){return t(e)}var Wr=/^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/;function Hn(e={}){let t=e.prefix??"un-",r=e.prefixedOnly??!1,n=e.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let a=An(i);if(!a)return;let c=a[1];if(c.startsWith(t))c=c.slice(t.length);else if(r)return;let f=a[2],[,p="",u=f]=f.match(Wr)||[];if(u==="~"||n&&u==="true"||!u)return`${p}${c}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,m]=f.match(o)||[];if(m)return`${d}${p}${c}-${m}`}return`${p}${c}-${u}`}}}var nc=/(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g,oc=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g,qn=/[\s'"`;>]+/;function Yn(e){return{name:"attributify",extract:({content:t,cursor:r})=>{let n=t.matchAll(nc),o,i=0;for(let g of n){let[,k,h]=g,b=g.index+k.length;if(r>b&&r<=b+h.length){i=b,o=h;break}}if(!o)return null;let s=o.matchAll(oc),a=0,c,f;for(let g of s){let[k,h,b]=g,R=i+g.index;if(r>R&&r<=R+k.length){a=R,c=h,f=b?.slice(1);break}}if(!c||c==="class"||c==="className"||c===":class")return null;let p=!!e?.prefix&&c.startsWith(e.prefix);if(e?.prefixedOnly&&!p)return null;let u=p?c.slice(e.prefix.length):c;if(f===void 0)return{extracted:u,resolveReplacement(g){let k=p?e.prefix.length:0;return{start:a+k,end:a+c.length,replacement:g}}};let d=a+c.length+2,m=qn.exec(f),x=0,w;for(;m;){let[g]=m;if(r>d+x&&r<=d+x+m.index){w=f.slice(x,x+m.index);break}x+=m.index+g.length,m=qn.exec(f.slice(x))}w===void 0&&(w=f.slice(x));let[,S="",j]=w.match(Wr)||[];return{extracted:`${S}${u}-${j}`,transformSuggestions(g){return g.filter(k=>k.startsWith(`${S}${u}-`)).map(k=>S+k.slice(S.length+u.length+1))},resolveReplacement(g){return{start:x+d,end:x+d+w.length,replacement:S+g.slice(S.length+u.length+1)}}}}}}var ic=["v-bind:",":"],Xn=/[\s'"`;]+/g,Nr=/<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|=>|[^>]*?)*)/g,sc=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms,Br=["placeholder","fill","opacity","stroke-opacity"];function Zn(e){let t=e?.ignoreAttributes??Br,r=e?.nonValuedAttribute??!0,n=e?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(Nr)).flatMap(i=>Array.from((i[1]||"").matchAll(sc))).flatMap(([,i,...s])=>{let a=s.filter(Boolean).join("");if(t.includes(i))return[];for(let c of ic)if(i.startsWith(c)){i=i.slice(c.length);break}if(!a){if(Ve(i)&&r!==!1){let c=[`[${i}=""]`];return n&&c.push(`[${i}="true"]`),c}return[]}return["class","className"].includes(i)?a.split(Xn).filter(Ve):Nr.test(a)?(Nr.lastIndex=0,this.extract({code:a})):e?.prefixedOnly&&e.prefix&&!i.startsWith(e.prefix)?[]:a.split(Xn).filter(c=>!!c&&c!==":").map(c=>`[${i}~="${c}"]`)})}}}var ac=(e={})=>{e.strict=e.strict??!1,e.prefix=e.prefix??"un-",e.prefixedOnly=e.prefixedOnly??!1,e.nonValuedAttribute=e.nonValuedAttribute??!0,e.ignoreAttributes=e.ignoreAttributes??Br;let t=[Hn(e)],r=[Zn(e)],n=[Yn(e)];return{name:"@unocss/preset-attributify",enforce:"post",variants:t,extractors:r,options:e,autocomplete:{extractors:n},extractorDefault:e.strict?!1:void 0}},Jn=ac;var cc=/\/\/#\s*sourceMappingURL=.*\n?/g;function Qn(e){return e.includes("sourceMappingURL=")?e.replace(cc,""):e}var lc=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,fc=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,uc=/^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function pc(e){let t=[];for(let r of e.matchAll(fc))r.index!==0&&!/^[\s'"`]/.test(e[r.index-1]??"")||t.push(r[0]);for(let r of e.matchAll(lc))t.push(r[0]);return e.split(at).forEach(r=>{Ve(r)&&!uc.test(r)&&t.push(r)}),t}var eo={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return pc(Qn(e))}};var to=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=ye(Object.entries(e.theme.preflightBase));return V(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];var L={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Dr={...L,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Ir={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},no={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},oo=["x","y","z"],ro=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],U=Object.assign({},...ro.map(e=>({[e.replace(/ /,"-")]:e})),...ro.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),C=["inherit","initial","revert","revert-layer","unset"],Me=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,io=/^(var)\s*\((.+)\)(.*)/;function ve(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function ae(e,t,r,n){if(e===""||(O(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let s=0;s<o;s++)switch(e[s]){case t:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let c=a.length;if(c&&a===e.slice(s,s+c)&&i===0)return s===0||s===o-c?void 0:[e.slice(0,s),e.slice(s+c)]}}return[e,""]}function ue(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=ae(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Kr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],so=["%alpha","<alpha-value>"],dc=new RegExp(so.map(e=>ie(e)).join("|"));function I(e=""){let t=mc(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Kr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&so.includes(t)?1:t}function _(e,t){if(typeof e=="string")return e.replace(dc,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Kr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function mc(e){if(!e)return;let t=hc(e);if(t!=null||(t=gc(e),t!=null)||(t=bc(e),t!=null)||(t=yc(e),t!=null)||(t=vc(e),t!=null))return t}function hc(e){let[,t]=e.match(/^#([\da-f]+)$/i)||[];if(t)switch(t.length){case 3:case 4:let r=Array.from(t,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:t.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(t,16);return{type:"rgb",components:t.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:t.length===6?void 0:Math.round((n&255)/255*100)/100}}}function gc(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function bc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=ue(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var xc=new RegExp(`^(${Kr.join("|")})\\((.+)\\)$`,"i");function yc(e){let t=e.match(xc);if(!t)return;let[,r,n]=t,o=ao(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function vc(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=ao(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function ao(e){let t=ue(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=ue(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function ft(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=e[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,get(){return r(this,n)}});return t}function W(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,...t(s)})}},autocomplete:`${e}:`}}function N(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function ce(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=ve(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function B(e,t,r){if(t.startsWith(e)){let n=ce(e,t,r);if(n){let[o="",i=n[1]]=B("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let s=t.indexOf("/",e.length),a=s===-1||i<=s;return[t.slice(e.length,a?i:s),t.slice(i+o.length),a?"":t.slice(s+1,i)]}}}}var co="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lo=new Uint8Array(64),wc=new Uint8Array(128);for(let e=0;e<co.length;e++){let t=co.charCodeAt(e);lo[e]=t,wc[t]=e}var Gr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function fo(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),s=0,a="";for(let c=0;c<e.length;c++){let f=e[c];if(c>0&&(s===r&&(a+=Gr.decode(o),s=0),o[s++]=59),f.length!==0){t[0]=0;for(let p=0;p<f.length;p++){let u=f[p];s>n&&(a+=Gr.decode(i),o.copyWithin(0,n,s),s-=n),p>0&&(o[s++]=44),s=Fe(o,s,t,u,0),u.length!==1&&(s=Fe(o,s,t,u,1),s=Fe(o,s,t,u,2),s=Fe(o,s,t,u,3),u.length!==4&&(s=Fe(o,s,t,u,4)))}}}return a+Gr.decode(o.subarray(0,s))}function Fe(e,t,r,n,o){let i=n[o],s=i-r[o];r[o]=i,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),e[t++]=lo[a]}while(s>0);return t}var ut=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},pt=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function $c(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var kc=$c(),Hr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=fo(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+kc(this.toString())}};function Sc(e){let t=e.split(`
3
3
  `),r=t.filter(i=>/^\t+/.test(i)),n=t.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function Cc(e,t){let r=e.split(/[/\\]/),n=t.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var Rc=Object.prototype.toString;function Tc(e){return Rc.call(e)==="[object Object]"}function uo(e){let t=e.split(`
4
4
  `),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let f=i+s>>1;o<r[f]?s=f:i=f+1}let a=i-1,c=o-r[a];return{line:a,column:c}}}var Ec=/\w/,qr=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
package/mini.global.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var ao=Object.defineProperty;var lo=(t,e)=>{for(var r in e)ao(t,r,{get:e[r],enumerable:!0})};function Y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ee(t){let e=t.length,r=-1,n,i="",o=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){i+="\uFFFD";continue}if(n===37){i+="\\%";continue}if(n===44){i+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&o===45){i+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){i+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){i+=t.charAt(r);continue}i+=`\\${t.charAt(r)}`}return i}var Le=ee;function A(t=[]){return Array.isArray(t)?t:[t]}function ie(t){return Array.from(new Set(t))}function Bt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function V(t){return typeof t=="string"}function oe(t){return V(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Dt(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>oe(e)):[t]:[oe(t)]}function co(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let i=n-1;i>=0;i--)if(t[i][0]===e&&t[i][1]===r)return!1;return!0})}function se(t){return t==null?"":co(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function _e(t){return t&&typeof t=="object"&&!Array.isArray(t)}function lt(t,e,r=!1){let n=t,i=e;if(Array.isArray(i))return r&&Array.isArray(i)?[...n,...i]:[...i];let o={...n};return _e(n)&&_e(i)&&Object.keys(i).forEach(s=>{_e(n[s])&&_e(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=lt(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function me(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:me(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}return t}function It(t){return V(t[0])}function Kt(t){return V(t[0])}var uo=/^\[(.+?)~?="(.*)"\]$/;var fo=/[\w\u00A0-\uFFFF-_:%-?]/,ct="$$shortcut-no-merge";function Ht(t){return t.match(uo)}function ge(t=""){return fo.test(t)}function Gt(t){return typeof t=="function"?{match:t}:t}function ut(t){return t.length===3}function qt(t){return t!=null}function Yt(){}var Fe=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.has(r)||i.set(r,n),i.get(r)}set(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([i,o])=>e(o,r,i)))}},Ue=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,i)=>{r.push(e(n,i))}),r}flatMap(e){let r=[];return this.forEach((n,i)=>{r.push(...e(n,i))}),r}};var be=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function We(t){return t instanceof be}var Ne={};function po(t=["-",":"]){let e=t.join("|");return Ne[e]||(Ne[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ne[e].lastIndex=0,Ne[e]}function ho(t,e=["-",":"],r=5){let n=po(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(u,p,f,d,h)=>{if(!e.includes(f))return u;i=!0,s.add(p+f);let x=h+p.length+f.length+1,w={length:u.length,items:[]};a.set(h,w);for(let v of[...d.matchAll(/\S+/g)]){let R=x+v.index,g=a.get(R)?.items;g?a.delete(R):g=[{offset:R,length:v[0].length,className:v[0]}];for(let S of g)S.className=S.className==="~"?p:S.className.replace(/^(!?)(.*)/,`$1${p}${f}$2`),w.items.push(S)}return"$".repeat(u.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let u=0;for(let[p,f]of a)l+=t.slice(u,p),l+=f.items.map(d=>d.className).join(" "),u=p+f.length;l+=t.slice(u)}else{l=t;for(let[u,p]of a)l.overwrite(u,u+p.length,p.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function Xt(t,e=["-",":"],r=5){let n=ho(t,e,r);return typeof t=="string"?n.expanded:t}var Zt=new Set;function X(t){Zt.has(t)||(console.warn("[unocss]",t),Zt.add(t))}var Be=/[\\:]?[\s'"`;{}]+/g;function mo(t){return t.split(Be)}var De={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return mo(t)}};function Jt(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var xe="default",Ie="preflights",go="shortcuts",bo="imports",Qt={[bo]:-200,[Ie]:-100,[go]:-10,[xe]:0};function tr(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var er="_uno_resolved";function xo(t){let e=typeof t=="function"?t():t;if(er in e)return e;e={...e},Object.defineProperty(e,er,{value:!0,enumerable:!1});let r=e.shortcuts?tr(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=i=>{i[2]||(i[2]={});let o=i[2];o.prefix==null&&e.prefix&&(o.prefix=A(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}function rr(t){let e=xo(t);if(!e.presets)return[e];let r=(e.presets||[]).flatMap(A).flatMap(rr);return[e,...r]}function ft(t={},e={}){let r=Object.assign({},e,t),n=Bt((r.presets||[]).flatMap(A).flatMap(rr),(m,b)=>m.name===b.name),i=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},Qt,...o.map(m=>m.layers));function l(m){return ie(o.flatMap(b=>A(b[m]||[])))}let u=l("extractors"),p=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=De),p&&!u.includes(p)&&u.unshift(p),u.sort((m,b)=>(m.order||0)-(b.order||0));let f=l("rules"),d={},h=f.length,x=f.map((m,b)=>{if(It(m)){A(m[2]?.prefix||"").forEach(T=>{d[T+m[0]]=[b,m[1],m[2],m]});return}return[b,...m]}).filter(Boolean).reverse(),w=yo(o.map(m=>m.theme)),v=l("extendTheme");for(let m of v)w=m(w)||w;let R={templates:ie(o.flatMap(m=>A(m.autocomplete?.templates))),extractors:o.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,b)=>(m.order||0)-(b.order||0)),shorthands:wo(o.map(m=>m.autocomplete?.shorthands||{}))},g=l("separators");g.length||(g=[":","-"]);let S={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:h,rulesDynamic:x,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(Gt).sort((m,b)=>(m.order||0)-(b.order||0)),shortcuts:tr(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let m of o)m?.configResolved?.(S);return S}function yo(t){return t.map(e=>e?me(e):{}).reduce((e,r)=>lt(e,r),{})}function wo(t){return t.reduce((e,r)=>{let n={};for(let i in r){let o=r[i];Array.isArray(o)?n[i]=`(${o.join("|")})`:n[i]=o}return{...e,...n}},{})}var nr="0.60.1";var pt=class{constructor(e={},r={}){this.userConfig=e;this.defaults=r;this.config=ft(e,r),this.events.emit("config",this.config)}version=nr;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Jt();setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ft(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let i={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let o of this.config.extractors){let s=await o.extract?.(i);if(s)if(We(s)&&We(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...i)=>this.constructCustomCSS(n,...i),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let i=e;for(let u of this.config.preprocess)i=u(e);if(this.isBlocked(i)){this.blocked.add(e),this._cache.set(n,null);return}let o=await this.matchVariants(e,i);if(!o||this.isBlocked(o[1])){this.blocked.add(e),this._cache.set(n,null);return}let s=this.makeContext(e,[r||o[0],o[1],o[2],o[3]]);this.config.details&&(s.variants=[...o[3]]);let a=await this.expandShortcut(s.currentSelector,s),l=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(u=>this.stringifyUtil(u,s)).filter(qt);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,r={}){let{id:n,scope:i,preflights:o=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,p=V(e)?await this.applyExtractors(e,n,l?new be:new Set):Array.isArray(e)?new Set(e):e;if(s){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(b):C).forEach(C=>{p.has(C)||p.add(C)})}let f=a?"":`
1
+ "use strict";(()=>{var ao=Object.defineProperty;var lo=(t,e)=>{for(var r in e)ao(t,r,{get:e[r],enumerable:!0})};function Y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ee(t){let e=t.length,r=-1,n,i="",o=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){i+="\uFFFD";continue}if(n===37){i+="\\%";continue}if(n===44){i+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&o===45){i+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){i+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){i+=t.charAt(r);continue}i+=`\\${t.charAt(r)}`}return i}var Le=ee;function A(t=[]){return Array.isArray(t)?t:[t]}function ie(t){return Array.from(new Set(t))}function Bt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function V(t){return typeof t=="string"}function oe(t){return V(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Dt(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>oe(e)):[t]:[oe(t)]}function co(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let i=n-1;i>=0;i--)if(t[i][0]===e&&t[i][1]===r)return!1;return!0})}function se(t){return t==null?"":co(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function _e(t){return t&&typeof t=="object"&&!Array.isArray(t)}function lt(t,e,r=!1){let n=t,i=e;if(Array.isArray(i))return r&&Array.isArray(i)?[...n,...i]:[...i];let o={...n};return _e(n)&&_e(i)&&Object.keys(i).forEach(s=>{_e(n[s])&&_e(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=lt(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function me(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:me(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}return t}function It(t){return V(t[0])}function Kt(t){return V(t[0])}var uo=/^\[(.+?)~?="(.*)"\]$/;var fo=/[\w\u00A0-\uFFFF-_:%-?]/,ct="$$shortcut-no-merge";function Ht(t){return t.match(uo)}function ge(t=""){return fo.test(t)}function Gt(t){return typeof t=="function"?{match:t}:t}function ut(t){return t.length===3}function qt(t){return t!=null}function Yt(){}var Fe=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.has(r)||i.set(r,n),i.get(r)}set(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([i,o])=>e(o,r,i)))}},Ue=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,i)=>{r.push(e(n,i))}),r}flatMap(e){let r=[];return this.forEach((n,i)=>{r.push(...e(n,i))}),r}};var be=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function We(t){return t instanceof be}var Ne={};function po(t=["-",":"]){let e=t.join("|");return Ne[e]||(Ne[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ne[e].lastIndex=0,Ne[e]}function ho(t,e=["-",":"],r=5){let n=po(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(u,p,f,d,h)=>{if(!e.includes(f))return u;i=!0,s.add(p+f);let x=h+p.length+f.length+1,w={length:u.length,items:[]};a.set(h,w);for(let v of[...d.matchAll(/\S+/g)]){let R=x+v.index,g=a.get(R)?.items;g?a.delete(R):g=[{offset:R,length:v[0].length,className:v[0]}];for(let S of g)S.className=S.className==="~"?p:S.className.replace(/^(!?)(.*)/,`$1${p}${f}$2`),w.items.push(S)}return"$".repeat(u.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let u=0;for(let[p,f]of a)l+=t.slice(u,p),l+=f.items.map(d=>d.className).join(" "),u=p+f.length;l+=t.slice(u)}else{l=t;for(let[u,p]of a)l.overwrite(u,u+p.length,p.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function Xt(t,e=["-",":"],r=5){let n=ho(t,e,r);return typeof t=="string"?n.expanded:t}var Zt=new Set;function X(t){Zt.has(t)||(console.warn("[unocss]",t),Zt.add(t))}var Be=/[\\:]?[\s'"`;{}]+/g;function mo(t){return t.split(Be)}var De={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return mo(t)}};function Jt(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var xe="default",Ie="preflights",go="shortcuts",bo="imports",Qt={[bo]:-200,[Ie]:-100,[go]:-10,[xe]:0};function tr(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var er="_uno_resolved";function xo(t){let e=typeof t=="function"?t():t;if(er in e)return e;e={...e},Object.defineProperty(e,er,{value:!0,enumerable:!1});let r=e.shortcuts?tr(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=i=>{i[2]||(i[2]={});let o=i[2];o.prefix==null&&e.prefix&&(o.prefix=A(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}function rr(t){let e=xo(t);if(!e.presets)return[e];let r=(e.presets||[]).flatMap(A).flatMap(rr);return[e,...r]}function ft(t={},e={}){let r=Object.assign({},e,t),n=Bt((r.presets||[]).flatMap(A).flatMap(rr),(m,b)=>m.name===b.name),i=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},Qt,...o.map(m=>m.layers));function l(m){return ie(o.flatMap(b=>A(b[m]||[])))}let u=l("extractors"),p=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=De),p&&!u.includes(p)&&u.unshift(p),u.sort((m,b)=>(m.order||0)-(b.order||0));let f=l("rules"),d={},h=f.length,x=f.map((m,b)=>{if(It(m)){A(m[2]?.prefix||"").forEach(T=>{d[T+m[0]]=[b,m[1],m[2],m]});return}return[b,...m]}).filter(Boolean).reverse(),w=yo(o.map(m=>m.theme)),v=l("extendTheme");for(let m of v)w=m(w)||w;let R={templates:ie(o.flatMap(m=>A(m.autocomplete?.templates))),extractors:o.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,b)=>(m.order||0)-(b.order||0)),shorthands:wo(o.map(m=>m.autocomplete?.shorthands||{}))},g=l("separators");g.length||(g=[":","-"]);let S={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:h,rulesDynamic:x,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(Gt).sort((m,b)=>(m.order||0)-(b.order||0)),shortcuts:tr(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let m of o)m?.configResolved?.(S);return S}function yo(t){return t.map(e=>e?me(e):{}).reduce((e,r)=>lt(e,r),{})}function wo(t){return t.reduce((e,r)=>{let n={};for(let i in r){let o=r[i];Array.isArray(o)?n[i]=`(${o.join("|")})`:n[i]=o}return{...e,...n}},{})}var nr="0.60.2";var pt=class{constructor(e={},r={}){this.userConfig=e;this.defaults=r;this.config=ft(e,r),this.events.emit("config",this.config)}version=nr;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Jt();setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ft(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let i={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let o of this.config.extractors){let s=await o.extract?.(i);if(s)if(We(s)&&We(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...i)=>this.constructCustomCSS(n,...i),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let i=e;for(let u of this.config.preprocess)i=u(e);if(this.isBlocked(i)){this.blocked.add(e),this._cache.set(n,null);return}let o=await this.matchVariants(e,i);if(!o||this.isBlocked(o[1])){this.blocked.add(e),this._cache.set(n,null);return}let s=this.makeContext(e,[r||o[0],o[1],o[2],o[3]]);this.config.details&&(s.variants=[...o[3]]);let a=await this.expandShortcut(s.currentSelector,s),l=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(u=>this.stringifyUtil(u,s)).filter(qt);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,r={}){let{id:n,scope:i,preflights:o=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,p=V(e)?await this.applyExtractors(e,n,l?new be:new Set):Array.isArray(e)?new Set(e):e;if(s){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(b):C).forEach(C=>{p.has(C)||p.add(C)})}let f=a?"":`
2
2
  `,d=new Set([xe]),h=l?new Map:new Set,x=new Map,w={},v=Array.from(p).map(async b=>{if(h.has(b))return;let C=await this.parseToken(b);if(C!=null){h instanceof Map?h.set(b,{data:C,count:We(p)?p.getCount(b):-1}):h.add(b);for(let T of C){let O=T[3]||"",U=T[4]?.layer;x.has(O)||x.set(O,[]),x.get(O).push(T),U&&d.add(U)}}});await Promise.all(v),await(async()=>{if(!o)return;let b={generator:this,theme:this.config.theme},C=new Set([]);this.config.preflights.forEach(({layer:T=Ie})=>{d.add(T),C.add(T)}),w=Object.fromEntries(await Promise.all(Array.from(C).map(async T=>{let U=(await Promise.all(this.config.preflights.filter(H=>(H.layer||Ie)===T).map(async H=>await H.getCSS(b)))).filter(Boolean).join(f);return[T,U]})))})();let R=this.config.sortLayers(Array.from(d).sort((b,C)=>(this.config.layers[b]??0)-(this.config.layers[C]??0)||b.localeCompare(C))),g={},S=(b=xe)=>{if(g[b])return g[b];let C=Array.from(x).sort((O,U)=>(this.parentOrders.get(O[0])??0)-(this.parentOrders.get(U[0])??0)||O[0]?.localeCompare(U[0]||"")||0).map(([O,U])=>{let H=U.length,ne=U.filter(y=>(y[4]?.layer||xe)===b).sort((y,k)=>y[0]-k[0]||(y[4]?.sort||0)-(k[4]?.sort||0)||y[5]?.currentSelector?.localeCompare(k[5]?.currentSelector??"")||y[1]?.localeCompare(k[1]||"")||y[2]?.localeCompare(k[2]||"")||0).map(([,y,k,,M,,W])=>[[[(y&&vo(y,i))??"",M?.sort??0]],k,!!(W??M?.noMerge)]);if(!ne.length)return;let Me=ne.reverse().map(([y,k,M],W)=>{if(!M&&this.config.mergeSelectors)for(let q=W+1;q<H;q++){let I=ne[q];if(I&&!I[2]&&(y&&I[0]||y==null&&I[0]==null)&&I[1]===k)return y&&I[0]&&I[0].push(...y),null}let G=y?ie(y.sort((q,I)=>q[1]-I[1]||q[0]?.localeCompare(I[0]||"")||0).map(q=>q[0]).filter(Boolean)):[];return G.length?`${G.join(`,${f}`)}{${k}}`:k}).filter(Boolean).reverse().join(f);if(!O)return Me;let $=O.split(" $$ ");return`${$.join("{")}{${f}${Me}${f}${"}".repeat($.length)}`}).filter(Boolean).join(f);if(o&&(C=[w[b],C].filter(Boolean).join(f)),u&&C){let O=typeof u=="object"?u.cssLayerName?.(b):void 0;O!==null&&(O||(O=b),C=`@layer ${O}{${f}${C}${f}}`)}let T=a?"":`/* layer: ${b} */${f}`;return g[b]=C?T+C:""},m=(b=R,C)=>b.filter(T=>!C?.includes(T)).map(T=>S(T)||"").filter(Boolean).join(f);return{get css(){return m()},layers:R,matched:h,getLayers:m,getLayer:S}}async matchVariants(e,r){let n=new Set,i=[],o=r||e,s=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let u=await l.match(o,a);if(u){if(V(u)){if(u===o)continue;u={matcher:u}}o=u.matcher,i.unshift(u),n.add(l),s=!0;break}}if(!s)break;if(i.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,o,i,n]}applyVariants(e,r=e[4],n=e[1]){let o=r.slice().sort((u,p)=>(u.order||0)-(p.order||0)).reduceRight((u,p)=>f=>{let d=p.body?.(f.entries)||f.entries,h=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??ko)({...f,entries:d,selector:p.selector?.(f.selector,d)||f.selector,parent:h[0]||f.parent,parentOrder:h[1]||f.parentOrder,layer:p.layer||f.layer,sort:p.sort||f.sort},u)},u=>u)({prefix:"",selector:Co(n),pseudo:"",entries:e[2]}),{parent:s,parentOrder:a}=o;s!=null&&a!=null&&this.parentOrders.set(s,a);let l={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:s,layer:o.layer,sort:o.sort,noMerge:o.noMerge};for(let u of this.config.postprocess)u(l);return l}constructCustomCSS(e,r,n){let i=oe(r);if(V(i))return i;let{selector:o,entries:s,parent:a}=this.applyVariants([0,n||e.rawSelector,i,void 0,e.variantHandlers]),l=`${o}{${se(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,r,n=!1,i){let[o,s,a]=V(e)?await this.matchVariants(e):e;this.config.details&&(r.rules=r.rules??[]);let l=this.config.rulesStaticMap[s];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&r.rules.push(l[3]);let p=l[0],f=oe(l[1]),d=l[2];return V(f)?[[p,f,d]]:[[p,o,f,d,a]]}r.variantHandlers=a;let{rulesDynamic:u}=this.config;for(let[p,f,d,h]of u){if(h?.internal&&!n)continue;let x=s;if(h?.prefix){let g=A(h.prefix);if(i){let S=A(i);if(!g.some(m=>S.includes(m)))continue}else{let S=g.find(m=>s.startsWith(m));if(S==null)continue;x=s.slice(S.length)}}let w=x.match(f);if(!w)continue;let v=await d(w,r);if(!v)continue;this.config.details&&r.rules.push([f,d,h]);let R=Dt(v).filter(g=>g.length);if(R.length)return R.map(g=>V(g)?[p,g,h]:[p,o,g,h,a])}}stringifyUtil(e,r){if(!e)return;if(ut(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];let{selector:n,entries:i,parent:o,layer:s,sort:a,noMerge:l}=this.applyVariants(e),u=se(i);if(!u)return;let{layer:p,sort:f,...d}=e[3]??{},h={...d,layer:s??p,sort:a??f};return[e[0],n,u,o,h,this.config.details?r:void 0,l]}async expandShortcut(e,r,n=5){if(n===0)return;let i=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Yt,o,s;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let p=A(a[2].prefix).find(f=>e.startsWith(f));if(p==null)continue;l=e.slice(p.length)}if(Kt(a)){if(a[0]===l){o=o||a[2],s=a[1],i(a);break}}else{let u=l.match(a[0]);if(u&&(s=a[1](u,r)),s){o=o||a[2],i(a);break}}}if(V(s)&&(s=Xt(s.trim()).split(/\s+/g)),!s){let[a,l]=V(e)?await this.matchVariants(e):e;if(a!==l){let u=await this.expandShortcut(l,r,n-1);u&&(s=u[0].map(p=>V(p)?a.replace(l,p):p))}}if(s)return[(await Promise.all(s.map(async a=>(V(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),o]}async stringifyShortcuts(e,r,n,i={layer:this.config.shortcutsLayer}){let o=new Ue,s=(await Promise.all(ie(n).map(async p=>{let f=V(p)?await this.parseUtil(p,r,!0,i.prefix):[[Number.POSITIVE_INFINITY,"{inline}",oe(p),void 0,[]]];return!f&&this.config.warn&&X(`unmatched utility "${p}" in shortcut "${e[1]}"`),f||[]}))).flat(1).filter(Boolean).sort((p,f)=>p[0]-f[0]),[a,,l]=e,u=[];for(let p of s){if(ut(p)){u.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:f,entries:d,parent:h,sort:x,noMerge:w,layer:v}=this.applyVariants(p,[...p[4],...l],a);o.getFallback(v??i.layer,new Fe).getFallback(f,h,[[],p[0]])[0].push([d,!!(w??p[3]?.noMerge),x??0])}return u.concat(o.flatMap((p,f)=>p.map(([d,h],x,w)=>{let v=(g,S,m)=>{let b=Math.max(...m.map(T=>T[1])),C=m.map(T=>T[0]);return(g?[C.flat(1)]:C).map(T=>{let O=se(T);if(O)return[h,x,O,w,{...i,noMerge:S,sort:b,layer:f},r,void 0]})};return[[d.filter(([,g])=>g).map(([g,,S])=>[g,S]),!0],[d.filter(([,g])=>!g).map(([g,,S])=>[g,S]),!1]].map(([g,S])=>[...v(!1,S,g.filter(([m])=>m.some(b=>b[0]===ct))),...v(!0,S,g.filter(([m])=>m.every(b=>b[0]!==ct)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):V(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let i=Array.isArray(n)?n[0]:n;return typeof i=="function"?i(e):V(i)?i===e:i.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function or(t,e){return new pt(t,e)}var sr=/\s\$\$\s+/g;function So(t){return sr.test(t)}function vo(t,e){return So(t)?t.replace(sr,e?` ${e} `:" "):e?`${e} ${t}`:t}var ir=/^\[(.+?)(~?=)"(.*)"\]$/;function Co(t){return ir.test(t)?t.replace(ir,(e,r,n,i)=>`[${Le(r)}${n}"${Le(i)}"]`):`.${Le(t)}`}function ko(t,e){return e(t)}var Ro=/\/\/#\s*sourceMappingURL=.*\n?/g;function ar(t){return t.includes("sourceMappingURL=")?t.replace(Ro,""):t}var To=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Eo=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,jo=/^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Oo(t){let e=[];for(let r of t.matchAll(Eo))r.index!==0&&!/^[\s'"`]/.test(t[r.index-1]??"")||e.push(r[0]);for(let r of t.matchAll(To))e.push(r[0]);return t.split(Be).forEach(r=>{ge(r)&&!jo.test(r)&&e.push(r)}),e}var lr={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return Oo(ar(t))}};var cr=[{layer:"preflights",getCSS(t){if(t.theme.preflightBase){let e=se(Object.entries(t.theme.preflightBase));return A(t.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${e}}`).join("")}}}];var L={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},dt={...L,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},ht={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},fr={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},pr=["x","y","z"],ur=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],ye=Object.assign({},...ur.map(t=>({[t.replace(/ /,"-")]:t})),...ur.map(t=>({[t.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:t}))),E=["inherit","initial","revert","revert-layer","unset"],we=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,dr=/^(var)\s*\((.+)\)(.*)/;function ae(t,e,r){if(t==="")return;let n=t.length,i=0,o=!1,s=0;for(let a=0;a<n;a++)switch(t[a]){case e:o||(o=!0,s=a),i++;break;case r:if(--i,i<0)return;if(i===0)return[t.slice(s,a+1),t.slice(a+1),t.slice(0,s)];break}}function le(t,e,r,n){if(t===""||(V(n)&&(n=[n]),n.length===0))return;let i=t.length,o=0;for(let s=0;s<i;s++)switch(t[s]){case e:o++;break;case r:if(--o<0)return;break;default:for(let a of n){let l=a.length;if(l&&a===t.slice(s,s+l)&&o===0)return s===0||s===i-l?void 0:[t.slice(0,s),t.slice(s+l)]}}return[t,""]}function ce(t,e,r){r=r??10;let n=[],i=0;for(;t!=="";){if(++i>r)return;let o=le(t,"(",")",e);if(!o)return;let[s,a]=o;n.push(s),t=a}if(n.length>0)return n}var mt=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],hr=["%alpha","<alpha-value>"],Ao=new RegExp(hr.map(t=>Y(t)).join("|"));function Z(t=""){let e=Vo(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:i}=e,o=r.toLowerCase();if(n.length!==0&&!(mt.includes(o)&&![1,3].includes(n.length)))return{type:o,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof i=="string"?i.trim():i}}function $e(t){let e=t.alpha??1;return typeof e=="string"&&hr.includes(e)?1:e}function _(t,e){if(typeof t=="string")return t.replace(Ao,`${e??1}`);let{components:r}=t,{alpha:n,type:i}=t;return n=e??n,i=i.toLowerCase(),["hsla","rgba"].includes(i)?`${i}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,mt.includes(i)?`${i}(${r.join(" ")}${n})`:`color(${i} ${r.join(" ")}${n})`)}function Vo(t){if(!t)return;let e=zo(t);if(e!=null||(e=Po(t),e!=null)||(e=Mo(t),e!=null)||(e=_o(t),e!=null)||(e=Fo(t),e!=null))return e}function zo(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:let r=Array.from(e,i=>Number.parseInt(i,16)).map(i=>i<<4|i);return{type:"rgb",components:r.slice(0,3),alpha:e.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(e,16);return{type:"rgb",components:e.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:e.length===6?void 0:Math.round((n&255)/255*100)/100}}}function Po(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function Mo(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,i=ce(n,",",5);if(i){if([3,4].includes(i.length))return{type:r,components:i.slice(0,3),alpha:i[3]};if(i.length!==1)return!1}}var Lo=new RegExp(`^(${mt.join("|")})\\((.+)\\)$`,"i");function _o(t){let e=t.match(Lo);if(!e)return;let[,r,n]=e,i=mr(`${r} ${n}`);if(i){let{alpha:o,components:[s,...a]}=i;return{type:s,components:a,alpha:o}}}function Fo(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=mr(e[1]);if(r){let{alpha:n,components:[i,...o]}=r;return{type:i,components:o,alpha:n}}}function mr(t){let e=ce(t," ");if(!e)return;let r=e.length;if(e[r-2]==="/")return{components:e.slice(0,r-2),alpha:e[r-1]};if(e[r-2]!=null&&(e[r-2].endsWith("/")||e[r-1].startsWith("/"))){let o=e.splice(r-2);e.push(o.join(" ")),--r}let n=ce(e[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:e};let i=n.pop();return e[r-1]=n.join("/"),{components:e,alpha:i}}function gr(t){let e=function(n){let i=this.__options?.sequence||[];this.__options.sequence=[];for(let o of i){let s=t[o](n);if(s!=null)return s}};function r(n,i){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(i),n}for(let n of Object.keys(t))Object.defineProperty(e,n,{enumerable:!0,get(){return r(this,n)}});return e}function J(t,e){let r;return{name:t,match(n,i){r||(r=new RegExp(`^${Y(t)}(?:${i.generator.config.separators.join("|")})`));let o=n.match(r);if(o)return{matcher:n.slice(o[0].length),handle:(s,a)=>a({...s,...e(s)})}},autocomplete:`${t}:`}}function Se(t,e){let r;return{name:t,match(n,i){r||(r=new RegExp(`^${Y(t)}(?:${i.generator.config.separators.join("|")})`));let o=n.match(r);if(o)return{matcher:n.slice(o[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${e}`})}},autocomplete:`${t}:`}}function Q(t,e,r){if(e.startsWith(`${t}[`)){let[n,i]=ae(e.slice(t.length),"[","]")??[];if(n&&i){for(let o of r)if(i.startsWith(o))return[n,i.slice(o.length),o];return[n,i,""]}}}function P(t,e,r){if(e.startsWith(t)){let n=Q(t,e,r);if(n){let[i="",o=n[1]]=P("/",n[1],r)??[];return[n[0],o,i]}for(let i of r.filter(o=>o!=="/")){let o=e.indexOf(i,t.length);if(o!==-1){let s=e.indexOf("/",t.length),a=s===-1||o<=s;return[e.slice(t.length,a?o:s),e.slice(o+i.length),a?"":e.slice(s+1,o)]}}}}var br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=new Uint8Array(64),Uo=new Uint8Array(128);for(let t=0;t<br.length;t++){let e=br.charCodeAt(t);xr[t]=e,Uo[e]=t}var gt=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}};function yr(t){let e=new Int32Array(5),r=1024*16,n=r-36,i=new Uint8Array(r),o=i.subarray(0,n),s=0,a="";for(let l=0;l<t.length;l++){let u=t[l];if(l>0&&(s===r&&(a+=gt.decode(i),s=0),i[s++]=59),u.length!==0){e[0]=0;for(let p=0;p<u.length;p++){let f=u[p];s>n&&(a+=gt.decode(o),i.copyWithin(0,n,s),s-=n),p>0&&(i[s++]=44),s=ve(i,s,e,f,0),f.length!==1&&(s=ve(i,s,e,f,1),s=ve(i,s,e,f,2),s=ve(i,s,e,f,3),f.length!==4&&(s=ve(i,s,e,f,4)))}}}return a+gt.decode(i.subarray(0,s))}function ve(t,e,r,n,i){let o=n[i],s=o-r[i];r[i]=o,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),t[e++]=xr[a]}while(s>0);return e}var Ke=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},He=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),i=this.original.slice(r);this.original=n;let o=new t(e,this.end,i);return o.outro=this.outro,this.outro="",this.end=e,this.edited?(o.edit("",!1),this.content=""):this.content=n,o.next=this.next,o.next&&(o.next.previous=o),o.previous=this,this.next=o,o}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function Wo(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var No=Wo(),bt=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=yr(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+No(this.toString())}};function Bo(t){let e=t.split(`
3
3
  `),r=e.filter(o=>/^\t+/.test(o)),n=e.filter(o=>/^ {2,}/.test(o));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let i=n.reduce((o,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,o)},1/0);return new Array(i+1).join(" ")}function Do(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(n).join("/")}var Io=Object.prototype.toString;function Ko(t){return Io.call(t)==="[object Object]"}function wr(t){let e=t.split(`
4
4
  `),r=[];for(let n=0,i=0;n<e.length;n++)r.push(i),i+=e[n].length+1;return function(i){let o=0,s=r.length;for(;o<s;){let u=o+s>>1;i<r[u]?s=u:o=u+1}let a=o-1,l=i-r[a];return{line:a,column:l}}}var Ho=/\w/,xt=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,i){if(r.length){let o=r.length-1,s=r.indexOf(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/runtime",
3
3
  "type": "module",
4
- "version": "0.60.1",
4
+ "version": "0.60.2",
5
5
  "description": "CSS-in-JS Runtime for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -35,9 +35,9 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@unocss/core": "0.60.1",
39
- "@unocss/preset-uno": "0.60.1",
40
- "@unocss/preset-attributify": "0.60.1"
38
+ "@unocss/core": "0.60.2",
39
+ "@unocss/preset-attributify": "0.60.2",
40
+ "@unocss/preset-uno": "0.60.2"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",
package/uno.global.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var ws=Object.defineProperty;var $s=(e,t)=>{for(var r in t)ws(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var Qe=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function wn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function $n(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function ks(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":ks(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function et(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Vr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return et(n)&&et(o)&&Object.keys(o).forEach(a=>{et(n[a])&&et(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Vr(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function kn(e){return O(e[0])}function Sn(e){return O(e[0])}var Ss=/[\w\u00A0-\uFFFF-_:%-?]/,Ar="$$shortcut-no-merge";function Cn(e=""){return Ss.test(e)}function Rn(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Tn(e){return e!=null}function En(){}var tt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},rt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function nt(e){return e instanceof Ve}var ot={};function Cs(e=["-",":"]){let t=e.join("|");return ot[t]||(ot[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ot[t].lastIndex=0,ot[t]}function Rs(e,t=["-",":"],r=5){let n=Cs(t),o,i=e.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,a.add(p+u);let w=m+p.length+u.length+1,k={length:f.length,items:[]};s.set(m,k);for(let T of[...d.matchAll(/\S+/g)]){let z=w+T.index,x=s.get(z)?.items;x?s.delete(z):x=[{offset:z,length:T[0].length,className:T[0]}];for(let E of x)E.className=E.className==="~"?p:E.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),k.items.push(E)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of s)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of s)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function jn(e,t=["-",":"],r=5){let n=Rs(e,t,r);return typeof e=="string"?n.expanded:e}var zn=new Set;function ae(e){zn.has(e)||(console.warn("[unocss]",e),zn.add(e))}var it=/[\\:]?[\s'"`;{}]+/g;function Ts(e){return e.split(it)}var at={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ts(e)}};function On(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var Ae="default",st="preflights",Es="shortcuts",js="imports",Vn={[js]:-200,[st]:-100,[Es]:-10,[Ae]:0};function _n(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var An="_uno_resolved";function zs(e){let t=typeof e=="function"?e():e;if(An in t)return t;t={...t},Object.defineProperty(t,An,{value:!0,enumerable:!1});let r=t.shortcuts?_n(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Mn(e){let t=zs(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Mn);return[t,...r]}function Mr(e={},t={}){let r=Object.assign({},t,e),n=wn((r.presets||[]).flatMap(A).flatMap(Mn),(h,g)=>h.name===g.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},Vn,...i.map(h=>h.layers));function c(h){return be(i.flatMap(g=>A(g[h]||[])))}let f=c("extractors"),p=a.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=at),p&&!f.includes(p)&&f.unshift(p),f.sort((h,g)=>(h.order||0)-(g.order||0));let u=c("rules"),d={},m=u.length,w=u.map((h,g)=>{if(kn(h)){A(h[2]?.prefix||"").forEach(V=>{d[V+h[0]]=[g,h[1],h[2],h]});return}return[g,...h]}).filter(Boolean).reverse(),k=Os(i.map(h=>h.theme)),T=c("extendTheme");for(let h of T)k=h(k)||k;let z={templates:be(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,g)=>(h.order||0)-(g.order||0)),shorthands:Vs(i.map(h=>h.autocomplete?.shorthands||{}))},x=c("separators");x.length||(x=[":","-"]);let E={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:k,rulesSize:m,rulesDynamic:w,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:z,variants:c("variants").map(Rn).sort((h,g)=>(h.order||0)-(g.order||0)),shortcuts:_n(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:x,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(E);return E}function Os(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Vr(t,r),{})}function Vs(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Pn="0.60.1";var Pr=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Mr(t,r),this.events.emit("config",this.config)}version=Pn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=On();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Mr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(nt(a)&&nt(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let a=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(a.variants=[...i[3]]);let s=await this.expandShortcut(a.currentSelector,a),c=s?await this.stringifyShortcuts(a.variantMatch,a,s[0],s[1]):(await this.parseUtil(a.variantMatch,a))?.map(f=>this.stringifyUtil(f,a)).filter(Tn);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=O(t)?await this.applyExtractors(t,n,c?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(a){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(g):C).forEach(C=>{p.has(C)||p.add(C)})}let u=s?"":`
1
+ "use strict";(()=>{var ws=Object.defineProperty;var $s=(e,t)=>{for(var r in t)ws(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var Qe=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function be(e){return Array.from(new Set(e))}function wn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function O(e){return typeof e=="string"}function xe(e){return O(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function $n(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function ks(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function ye(e){return e==null?"":ks(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function et(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Vr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return et(n)&&et(o)&&Object.keys(o).forEach(a=>{et(n[a])&&et(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Vr(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function kn(e){return O(e[0])}function Sn(e){return O(e[0])}var Ss=/[\w\u00A0-\uFFFF-_:%-?]/,Ar="$$shortcut-no-merge";function Cn(e=""){return Ss.test(e)}function Rn(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Tn(e){return e!=null}function En(){}var tt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},rt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function nt(e){return e instanceof Ve}var ot={};function Cs(e=["-",":"]){let t=e.join("|");return ot[t]||(ot[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ot[t].lastIndex=0,ot[t]}function Rs(e,t=["-",":"],r=5){let n=Cs(t),o,i=e.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,a.add(p+u);let w=m+p.length+u.length+1,k={length:f.length,items:[]};s.set(m,k);for(let T of[...d.matchAll(/\S+/g)]){let z=w+T.index,x=s.get(z)?.items;x?s.delete(z):x=[{offset:z,length:T[0].length,className:T[0]}];for(let E of x)E.className=E.className==="~"?p:E.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),k.items.push(E)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of s)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of s)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function jn(e,t=["-",":"],r=5){let n=Rs(e,t,r);return typeof e=="string"?n.expanded:e}var zn=new Set;function ae(e){zn.has(e)||(console.warn("[unocss]",e),zn.add(e))}var it=/[\\:]?[\s'"`;{}]+/g;function Ts(e){return e.split(it)}var at={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ts(e)}};function On(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var Ae="default",st="preflights",Es="shortcuts",js="imports",Vn={[js]:-200,[st]:-100,[Es]:-10,[Ae]:0};function _n(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var An="_uno_resolved";function zs(e){let t=typeof e=="function"?e():e;if(An in t)return t;t={...t},Object.defineProperty(t,An,{value:!0,enumerable:!1});let r=t.shortcuts?_n(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Mn(e){let t=zs(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Mn);return[t,...r]}function Mr(e={},t={}){let r=Object.assign({},t,e),n=wn((r.presets||[]).flatMap(A).flatMap(Mn),(h,g)=>h.name===g.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},Vn,...i.map(h=>h.layers));function c(h){return be(i.flatMap(g=>A(g[h]||[])))}let f=c("extractors"),p=a.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=at),p&&!f.includes(p)&&f.unshift(p),f.sort((h,g)=>(h.order||0)-(g.order||0));let u=c("rules"),d={},m=u.length,w=u.map((h,g)=>{if(kn(h)){A(h[2]?.prefix||"").forEach(V=>{d[V+h[0]]=[g,h[1],h[2],h]});return}return[g,...h]}).filter(Boolean).reverse(),k=Os(i.map(h=>h.theme)),T=c("extendTheme");for(let h of T)k=h(k)||k;let z={templates:be(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,g)=>(h.order||0)-(g.order||0)),shorthands:Vs(i.map(h=>h.autocomplete?.shorthands||{}))},x=c("separators");x.length||(x=[":","-"]);let E={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:k,rulesSize:m,rulesDynamic:w,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:z,variants:c("variants").map(Rn).sort((h,g)=>(h.order||0)-(g.order||0)),shortcuts:_n(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:x,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(E);return E}function Os(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Vr(t,r),{})}function Vs(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Pn="0.60.2";var Pr=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Mr(t,r),this.events.emit("config",this.config)}version=Pn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=On();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Mr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(nt(a)&&nt(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let a=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(a.variants=[...i[3]]);let s=await this.expandShortcut(a.currentSelector,a),c=s?await this.stringifyShortcuts(a.variantMatch,a,s[0],s[1]):(await this.parseUtil(a.variantMatch,a))?.map(f=>this.stringifyUtil(f,a)).filter(Tn);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=O(t)?await this.applyExtractors(t,n,c?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(a){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(g):C).forEach(C=>{p.has(C)||p.add(C)})}let u=s?"":`
2
2
  `,d=new Set([Ae]),m=c?new Map:new Set,w=new Map,k={},T=Array.from(p).map(async g=>{if(m.has(g))return;let C=await this.parseToken(g);if(C!=null){m instanceof Map?m.set(g,{data:C,count:nt(p)?p.getCount(g):-1}):m.add(g);for(let V of C){let P=V[3]||"",K=V[4]?.layer;w.has(P)||w.set(P,[]),w.get(P).push(V),K&&d.add(K)}}});await Promise.all(T),await(async()=>{if(!i)return;let g={generator:this,theme:this.config.theme},C=new Set([]);this.config.preflights.forEach(({layer:V=st})=>{d.add(V),C.add(V)}),k=Object.fromEntries(await Promise.all(Array.from(C).map(async V=>{let K=(await Promise.all(this.config.preflights.filter(re=>(re.layer||st)===V).map(async re=>await re.getCSS(g)))).filter(Boolean).join(u);return[V,K]})))})();let z=this.config.sortLayers(Array.from(d).sort((g,C)=>(this.config.layers[g]??0)-(this.config.layers[C]??0)||g.localeCompare(C))),x={},E=(g=Ae)=>{if(x[g])return x[g];let C=Array.from(w).sort((P,K)=>(this.parentOrders.get(P[0])??0)-(this.parentOrders.get(K[0])??0)||P[0]?.localeCompare(K[0]||"")||0).map(([P,K])=>{let re=K.length,ge=K.filter(y=>(y[4]?.layer||Ae)===g).sort((y,S)=>y[0]-S[0]||(y[4]?.sort||0)-(S[4]?.sort||0)||y[5]?.currentSelector?.localeCompare(S[5]?.currentSelector??"")||y[1]?.localeCompare(S[1]||"")||y[2]?.localeCompare(S[2]||"")||0).map(([,y,S,,D,,G])=>[[[(y&&Ms(y,o))??"",D?.sort??0]],S,!!(G??D?.noMerge)]);if(!ge.length)return;let Je=ge.reverse().map(([y,S,D],G)=>{if(!D&&this.config.mergeSelectors)for(let oe=G+1;oe<re;oe++){let Z=ge[oe];if(Z&&!Z[2]&&(y&&Z[0]||y==null&&Z[0]==null)&&Z[1]===S)return y&&Z[0]&&Z[0].push(...y),null}let ne=y?be(y.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${u}`)}{${S}}`:S}).filter(Boolean).reverse().join(u);if(!P)return Je;let v=P.split(" $$ ");return`${v.join("{")}{${u}${Je}${u}${"}".repeat(v.length)}`}).filter(Boolean).join(u);if(i&&(C=[k[g],C].filter(Boolean).join(u)),f&&C){let P=typeof f=="object"?f.cssLayerName?.(g):void 0;P!==null&&(P||(P=g),C=`@layer ${P}{${u}${C}${u}}`)}let V=s?"":`/* layer: ${g} */${u}`;return x[g]=C?V+C:""},h=(g=z,C)=>g.filter(V=>!C?.includes(V)).map(V=>E(V)||"").filter(Boolean).join(u);return{get css(){return h()},layers:z,matched:m,getLayers:h,getLayer:E}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,a=!0,s={rawSelector:t,theme:this.config.theme,generator:this};for(;a;){a=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let f=await c.match(i,s);if(f){if(O(f)){if(f===i)continue;f={matcher:f}}i=f.matcher,o.unshift(f),n.add(c),a=!0;break}}if(!a)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((f,p)=>(f.order||0)-(p.order||0)).reduceRight((f,p)=>u=>{let d=p.body?.(u.entries)||u.entries,m=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??Fs)({...u,entries:d,selector:p.selector?.(u.selector,d)||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:p.layer||u.layer,sort:p.sort||u.sort},f)},f=>f)({prefix:"",selector:Ps(n),pseudo:"",entries:t[2]}),{parent:a,parentOrder:s}=i;a!=null&&s!=null&&this.parentOrders.set(a,s);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:a,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let f of this.config.postprocess)f(c);return c}constructCustomCSS(t,r,n){let o=xe(r);if(O(o))return o;let{selector:i,entries:a,parent:s}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${ye(a)}}`;return s?`${s}{${c}}`:c}async parseUtil(t,r,n=!1,o){let[i,a,s]=O(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let c=this.config.rulesStaticMap[a];if(c&&c[1]&&(n||!c[2]?.internal)){this.config.details&&r.rules.push(c[3]);let p=c[0],u=xe(c[1]),d=c[2];return O(u)?[[p,u,d]]:[[p,i,u,d,s]]}r.variantHandlers=s;let{rulesDynamic:f}=this.config;for(let[p,u,d,m]of f){if(m?.internal&&!n)continue;let w=a;if(m?.prefix){let x=A(m.prefix);if(o){let E=A(o);if(!x.some(h=>E.includes(h)))continue}else{let E=x.find(h=>a.startsWith(h));if(E==null)continue;w=a.slice(E.length)}}let k=w.match(u);if(!k)continue;let T=await d(k,r);if(!T)continue;this.config.details&&r.rules.push([u,d,m]);let z=$n(T).filter(x=>x.length);if(z.length)return z.map(x=>O(x)?[p,x,m]:[p,i,x,m,s])}}stringifyUtil(t,r){if(!t)return;if(_r(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:a,sort:s,noMerge:c}=this.applyVariants(t),f=ye(o);if(!f)return;let{layer:p,sort:u,...d}=t[3]??{},m={...d,layer:a??p,sort:s??u};return[t[0],n,f,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?s=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(s)}:En,i,a;for(let s of this.config.shortcuts){let c=t;if(s[2]?.prefix){let p=A(s[2].prefix).find(u=>t.startsWith(u));if(p==null)continue;c=t.slice(p.length)}if(Sn(s)){if(s[0]===c){i=i||s[2],a=s[1],o(s);break}}else{let f=c.match(s[0]);if(f&&(a=s[1](f,r)),a){i=i||s[2],o(s);break}}}if(O(a)&&(a=jn(a.trim()).split(/\s+/g)),!a){let[s,c]=O(t)?await this.matchVariants(t):t;if(s!==c){let f=await this.expandShortcut(c,r,n-1);f&&(a=f[0].map(p=>O(p)?s.replace(c,p):p))}}if(a)return[(await Promise.all(a.map(async s=>(O(s)?(await this.expandShortcut(s,r,n-1))?.[0]:void 0)||[s]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new rt,a=(await Promise.all(be(n).map(async p=>{let u=O(p)?await this.parseUtil(p,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(p),void 0,[]]];return!u&&this.config.warn&&ae(`unmatched utility "${p}" in shortcut "${t[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((p,u)=>p[0]-u[0]),[s,,c]=t,f=[];for(let p of a){if(_r(p)){f.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:u,entries:d,parent:m,sort:w,noMerge:k,layer:T}=this.applyVariants(p,[...p[4],...c],s);i.getFallback(T??o.layer,new tt).getFallback(u,m,[[],p[0]])[0].push([d,!!(k??p[3]?.noMerge),w??0])}return f.concat(i.flatMap((p,u)=>p.map(([d,m],w,k)=>{let T=(x,E,h)=>{let g=Math.max(...h.map(V=>V[1])),C=h.map(V=>V[0]);return(x?[C.flat(1)]:C).map(V=>{let P=ye(V);if(P)return[m,w,P,k,{...o,noMerge:E,sort:g,layer:u},r,void 0]})};return[[d.filter(([,x])=>x).map(([x,,E])=>[x,E]),!0],[d.filter(([,x])=>!x).map(([x,,E])=>[x,E]),!1]].map(([x,E])=>[...T(!1,E,x.filter(([h])=>h.some(g=>g[0]===Ar))),...T(!0,E,x.filter(([h])=>h.every(g=>g[0]!==Ar)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(t):O(r)?r===t:r.test(t))}getBlocked(t){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(t):O(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};function Ln(e,t){return new Pr(e,t)}var Un=/\s\$\$\s+/g;function _s(e){return Un.test(e)}function Ms(e,t){return _s(e)?e.replace(Un,t?` ${t} `:" "):t?`${t} ${e}`:e}var Fn=/^\[(.+?)(~?=)"(.*)"\]$/;function Ps(e){return Fn.test(e)?e.replace(Fn,(t,r,n,o)=>`[${Qe(r)}${n}"${Qe(o)}"]`):`.${Qe(e)}`}function Fs(e,t){return t(e)}var Ls=/\/\/#\s*sourceMappingURL=.*\n?/g;function Wn(e){return e.includes("sourceMappingURL=")?e.replace(Ls,""):e}var Us=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Ws=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Ns=/^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Bs(e){let t=[];for(let r of e.matchAll(Ws))r.index!==0&&!/^[\s'"`]/.test(e[r.index-1]??"")||t.push(r[0]);for(let r of e.matchAll(Us))t.push(r[0]);return e.split(it).forEach(r=>{Cn(r)&&!Ns.test(r)&&t.push(r)}),t}var Nn={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return Bs(Wn(e))}};var Bn=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=ye(Object.entries(e.theme.preflightBase));return A(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];var U={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Fr={...U,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Lr={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},In={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},Kn=["x","y","z"],Dn=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],L=Object.assign({},...Dn.map(e=>({[e.replace(/ /,"-")]:e})),...Dn.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),$=["inherit","initial","revert","revert-layer","unset"],_e=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/,Gn=/^(var)\s*\((.+)\)(.*)/;function ve(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,a=0;for(let s=0;s<n;s++)switch(e[s]){case t:i||(i=!0,a=s),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(a,s+1),e.slice(s+1),e.slice(0,a)];break}}function se(e,t,r,n){if(e===""||(O(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let a=0;a<o;a++)switch(e[a]){case t:i++;break;case r:if(--i<0)return;break;default:for(let s of n){let c=s.length;if(c&&s===e.slice(a,a+c)&&i===0)return a===0||a===o-c?void 0:[e.slice(0,a),e.slice(a+c)]}}return[e,""]}function ue(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=se(e,"(",")",t);if(!i)return;let[a,s]=i;n.push(a),e=s}if(n.length>0)return n}var Ur=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Hn=["%alpha","<alpha-value>"],Ds=new RegExp(Hn.map(e=>ie(e)).join("|"));function I(e=""){let t=Is(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Ur.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(a=>typeof a=="string"?a.trim():a),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&Hn.includes(t)?1:t}function _(e,t){if(typeof e=="string")return e.replace(Ds,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Ur.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function Is(e){if(!e)return;let t=Ks(e);if(t!=null||(t=Gs(e),t!=null)||(t=Hs(e),t!=null)||(t=Ys(e),t!=null)||(t=Xs(e),t!=null))return t}function Ks(e){let[,t]=e.match(/^#([\da-f]+)$/i)||[];if(t)switch(t.length){case 3:case 4:let r=Array.from(t,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:t.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(t,16);return{type:"rgb",components:t.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:t.length===6?void 0:Math.round((n&255)/255*100)/100}}}function Gs(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function Hs(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=ue(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var qs=new RegExp(`^(${Ur.join("|")})\\((.+)\\)$`,"i");function Ys(e){let t=e.match(qs);if(!t)return;let[,r,n]=t,o=qn(`${r} ${n}`);if(o){let{alpha:i,components:[a,...s]}=o;return{type:a,components:s,alpha:i}}}function Xs(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=qn(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function qn(e){let t=ue(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=ue(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function ct(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let a=e[i](n);if(a!=null)return a}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,get(){return r(this,n)}});return t}function W(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(a,s)=>s({...a,...t(a)})}},autocomplete:`${e}:`}}function N(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(a,s)=>s({...a,parent:`${a.parent?`${a.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function ce(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=ve(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function B(e,t,r){if(t.startsWith(e)){let n=ce(e,t,r);if(n){let[o="",i=n[1]]=B("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let a=t.indexOf("/",e.length),s=a===-1||i<=a;return[t.slice(e.length,s?i:a),t.slice(i+o.length),s?"":t.slice(a+1,i)]}}}}var Yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xn=new Uint8Array(64),Zs=new Uint8Array(128);for(let e=0;e<Yn.length;e++){let t=Yn.charCodeAt(e);Xn[e]=t,Zs[t]=e}var Wr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function Zn(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),a=0,s="";for(let c=0;c<e.length;c++){let f=e[c];if(c>0&&(a===r&&(s+=Wr.decode(o),a=0),o[a++]=59),f.length!==0){t[0]=0;for(let p=0;p<f.length;p++){let u=f[p];a>n&&(s+=Wr.decode(i),o.copyWithin(0,n,a),a-=n),p>0&&(o[a++]=44),a=Me(o,a,t,u,0),u.length!==1&&(a=Me(o,a,t,u,1),a=Me(o,a,t,u,2),a=Me(o,a,t,u,3),u.length!==4&&(a=Me(o,a,t,u,4)))}}}return s+Wr.decode(o.subarray(0,a))}function Me(e,t,r,n,o){let i=n[o],a=i-r[o];r[o]=i,a=a<0?-a<<1|1:a<<1;do{let s=a&31;a>>>=5,a>0&&(s|=32),e[t++]=Xn[s]}while(a>0);return t}var lt=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},ft=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function Js(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var Qs=Js(),Nr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=Zn(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Qs(this.toString())}};function ec(e){let t=e.split(`
3
3
  `),r=t.filter(i=>/^\t+/.test(i)),n=t.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,a)=>{let s=/^ +/.exec(a)[0].length;return Math.min(s,i)},1/0);return new Array(o+1).join(" ")}function tc(e,t){let r=e.split(/[/\\]/),n=t.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var rc=Object.prototype.toString;function nc(e){return rc.call(e)==="[object Object]"}function Jn(e){let t=e.split(`
4
4
  `),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,a=r.length;for(;i<a;){let f=i+a>>1;o<r[f]?a=f:i=f+1}let s=i-1,c=o-r[s];return{line:s,column:c}}}var oc=/\w/,Br=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,r,n,o){if(r.length){let i=r.length-1,a=r.indexOf(`