@unocss/runtime 65.5.0 → 66.0.0

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.
package/mini.global.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var Ai=Object.defineProperty;var Oi=(t,e)=>{for(var r in e)Ai(t,r,{get:e[r],enumerable:!0})};var xe="default",Le="preflights",Pi="shortcuts",Vi="imports",Zt={[Vi]:-200,[Le]:-100,[Pi]:-10,[xe]:0};var Fe=/[\\:]?[\s'"`;{}]+/g;function zi(t){return t.split(Fe)}var Ue={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return zi(t)}};function E(t=[]){return Array.isArray(t)?t:[t]}function B(t){return Array.from(new Set(t))}function ft(t,e){return t.reduce((r,n)=>(r.findIndex(i=>e(n,i))===-1&&r.push(n),r),[])}function z(t){return typeof t=="string"}var ye=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 _e(t){return t instanceof ye}function ee(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ie(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.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&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Ie=ie;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 Mi=/^\[(.+?)~?="(.*)"\]$/;var Li=/[\w\u00A0-\uFFFF%-?]/;function Qt(t){return t.match(Mi)}function we(t=""){return Li.test(t)}function er(t){return typeof t=="function"?{match:t}:t}function pt(t){return t.length===3}function We(t){return t!=null}function tr(){}var De=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.has(r)||o.set(r,n),o.get(r)}set(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.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(([o,i])=>e(i,r,o)))}},Ne=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,o)=>{r.push(e(n,o))}),r}flatMap(e){let r=[];return this.forEach((n,o)=>{r.push(...e(n,o))}),r}};function le(t){return z(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function rr(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>le(e)):[t]:[le(t)]}function Fi(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}function ce(t){return t==null?"":Fi(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Be(t){return t&&typeof t=="object"&&!Array.isArray(t)}function dt(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Be(n)&&Be(o)&&Object.keys(o).forEach(s=>{Be(n[s])&&Be(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=dt(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function $e(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:$e(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}return t}function nr(t){return z(t[0])}function or(t){return z(t[0])}var Ke={};function Ui(t=["-",":"]){let e=t.join("|");return Ke[e]||(Ke[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ke[e].lastIndex=0,Ke[e]}function _i(t,e=["-",":"],r=5){let n=Ui(e),o,i=t.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(c,f,p,d,h)=>{if(!e.includes(p))return c;o=!0,s.add(f+p);let m=h+f.length+p.length+1,x={length:c.length,items:[]};l.set(h,x);for(let w of[...d.matchAll(/\S+/g)]){let R=m+w.index,y=l.get(R)?.items;y?l.delete(R):y=[{offset:R,length:w[0].length,className:w[0]}];for(let S of y)S.className=S.className==="~"?f:S.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(S)}return"$".repeat(c.length)}),r-=1;while(o&&r);let a;if(typeof t=="string"){a="";let c=0;for(let[f,p]of l)a+=t.slice(c,f),a+=p.items.map(d=>d.className).join(" "),c=f+p.length;a+=t.slice(c)}else{a=t;for(let[c,f]of l)a.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return a.toString()}}}function ir(t,e=["-",":"],r=5){let n=_i(t,e,r);return typeof t=="string"?n.expanded:t}var sr=new Set;function ar(t){sr.has(t)||(console.warn("[unocss]",t),sr.add(t))}function ur(t){return E(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var lr="_uno_resolved";async function Ii(t){let e=typeof t=="function"?await t():await t;if(lr in e)return e;e={...e},Object.defineProperty(e,lr,{value:!0,enumerable:!1});let r=e.shortcuts?ur(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=E(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function fr(t){let e=await Ii(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(E).flatMap(fr))).flat();return[e,...r]}function Wi(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[],s=[];for(let a of t){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&o.push(a.filesystem),a.inline&&i.push(a.inline),a.plain&&s.push(a.plain)}let l={pipeline:n?!1:{include:B(cr(...e)),exclude:B(cr(...r))}};return o.length&&(l.filesystem=B(o.flat())),i.length&&(l.inline=B(i.flat())),s.length&&(l.plain=B(s.flat())),l}async function ht(t={},e={}){let r=Object.assign({},e,t),n=ft((await Promise.all((r.presets||[]).flatMap(E).flatMap(fr))).flat(),(b,g)=>b.name===g.name),o=[...n.filter(b=>b.enforce==="pre"),...n.filter(b=>!b.enforce),...n.filter(b=>b.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},Zt,...i.map(b=>b.layers));function a(b){return B(i.flatMap(g=>E(g[b]||[])))}let c=a("extractors"),f=s.find(b=>b.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=Ue),f&&!c.includes(f)&&c.unshift(f),c.sort((b,g)=>(b.order||0)-(g.order||0));let p=a("rules"),d={},h=p.length,m=p.filter(b=>nr(b)?(E(b[2]?.prefix||"").forEach($=>{d[$+b[0]]=b}),!1):!0).reverse(),x=Di(i.map(b=>b.theme)),w=a("extendTheme");for(let b of w)x=b(x)||x;let R={templates:B(i.flatMap(b=>E(b.autocomplete?.templates))),extractors:i.flatMap(b=>E(b.autocomplete?.extractors)).sort((b,g)=>(b.order||0)-(g.order||0)),shorthands:Ni(i.map(b=>b.autocomplete?.shorthands||{}))},y=a("separators");y.length||(y=[":","-"]);let S=a("content"),V=Wi(S),k={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...r,blocklist:a("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:x,rules:p,rulesSize:h,rulesDynamic:m,rulesStaticMap:d,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:R,variants:a("variants").map(er).sort((b,g)=>(b.order||0)-(g.order||0)),shortcuts:ur(a("shortcuts")).reverse(),extractors:c,safelist:a("safelist"),separators:y,details:r.details??r.envMode==="dev",content:V,transformers:ft(a("transformers"),(b,g)=>b.name===g.name)};for(let b of i)b?.configResolved?.(k);return k}function Di(t){return t.map(e=>e?$e(e):{}).reduce((e,r)=>dt(e,r),{})}function Ni(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function cr(...t){return t.flatMap(Bi)}function Bi(t){return Array.isArray(t)?t:t?[t]:[]}var pr="65.5.0";var te={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},mt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=pr;events=Jt();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(e={},r={}){let n=new t(e,r);return n.config=await ht(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await ht(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(_e(s)&&_e(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:te,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=e;for(let a of this.config.preprocess)o=a(e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async a=>{let c=this.makeContext(e,[r||a[0],a[1],a[2],a[3]]);this.config.details&&(c.variants=[...a[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(d=>this.stringifyUtil(d,c)).filter(We)},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l?.length)return this.cache.set(n,l),l;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:a=!1}=r,c=z(e)?await this.applyExtractors(e,n,a?new ye:new Set):Array.isArray(e)?new Set(e):e;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap($=>typeof $=="function"?$(g):$).forEach($=>{c.has($)||c.add($)})}let f=l?"":`
1
+ "use strict";(()=>{var Ai=Object.defineProperty;var Oi=(t,e)=>{for(var r in e)Ai(t,r,{get:e[r],enumerable:!0})};var xe="default",Le="preflights",Pi="shortcuts",Vi="imports",Zt={[Vi]:-200,[Le]:-100,[Pi]:-10,[xe]:0};var Fe=/[\\:]?[\s'"`;{}]+/g;function zi(t){return t.split(Fe)}var Ue={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return zi(t)}};function E(t=[]){return Array.isArray(t)?t:[t]}function B(t){return Array.from(new Set(t))}function ft(t,e){return t.reduce((r,n)=>(r.findIndex(i=>e(n,i))===-1&&r.push(n),r),[])}function z(t){return typeof t=="string"}var ye=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 _e(t){return t instanceof ye}function ee(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ie(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.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&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Ie=ie;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 Mi=/^\[(.+?)~?="(.*)"\]$/;var Li=/[\w\u00A0-\uFFFF%-?]/;function Qt(t){return t.match(Mi)}function we(t=""){return Li.test(t)}function er(t){return typeof t=="function"?{match:t}:t}function pt(t){return t.length===3}function We(t){return t!=null}function tr(){}var De=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.has(r)||o.set(r,n),o.get(r)}set(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.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(([o,i])=>e(i,r,o)))}},Ne=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,o)=>{r.push(e(n,o))}),r}flatMap(e){let r=[];return this.forEach((n,o)=>{r.push(...e(n,o))}),r}};function le(t){return z(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function rr(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>le(e)):[t]:[le(t)]}function Fi(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}function ce(t){return t==null?"":Fi(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Be(t){return t&&typeof t=="object"&&!Array.isArray(t)}function dt(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Be(n)&&Be(o)&&Object.keys(o).forEach(s=>{Be(n[s])&&Be(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=dt(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function $e(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:$e(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?$e(n):n;return r}return t}function nr(t){return z(t[0])}function or(t){return z(t[0])}var Ke={};function Ui(t=["-",":"]){let e=t.join("|");return Ke[e]||(Ke[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ke[e].lastIndex=0,Ke[e]}function _i(t,e=["-",":"],r=5){let n=Ui(e),o,i=t.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(c,f,p,d,h)=>{if(!e.includes(p))return c;o=!0,s.add(f+p);let m=h+f.length+p.length+1,x={length:c.length,items:[]};l.set(h,x);for(let w of[...d.matchAll(/\S+/g)]){let R=m+w.index,y=l.get(R)?.items;y?l.delete(R):y=[{offset:R,length:w[0].length,className:w[0]}];for(let S of y)S.className=S.className==="~"?f:S.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(S)}return"$".repeat(c.length)}),r-=1;while(o&&r);let a;if(typeof t=="string"){a="";let c=0;for(let[f,p]of l)a+=t.slice(c,f),a+=p.items.map(d=>d.className).join(" "),c=f+p.length;a+=t.slice(c)}else{a=t;for(let[c,f]of l)a.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return a.toString()}}}function ir(t,e=["-",":"],r=5){let n=_i(t,e,r);return typeof t=="string"?n.expanded:t}var sr=new Set;function ar(t){sr.has(t)||(console.warn("[unocss]",t),sr.add(t))}function ur(t){return E(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var lr="_uno_resolved";async function Ii(t){let e=typeof t=="function"?await t():await t;if(lr in e)return e;e={...e},Object.defineProperty(e,lr,{value:!0,enumerable:!1});let r=e.shortcuts?ur(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=E(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function fr(t){let e=await Ii(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(E).flatMap(fr))).flat();return[e,...r]}function Wi(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[],s=[];for(let a of t){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&o.push(a.filesystem),a.inline&&i.push(a.inline),a.plain&&s.push(a.plain)}let l={pipeline:n?!1:{include:B(cr(...e)),exclude:B(cr(...r))}};return o.length&&(l.filesystem=B(o.flat())),i.length&&(l.inline=B(i.flat())),s.length&&(l.plain=B(s.flat())),l}async function ht(t={},e={}){let r=Object.assign({},e,t),n=ft((await Promise.all((r.presets||[]).flatMap(E).flatMap(fr))).flat(),(b,g)=>b.name===g.name),o=[...n.filter(b=>b.enforce==="pre"),...n.filter(b=>!b.enforce),...n.filter(b=>b.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},Zt,...i.map(b=>b.layers));function a(b){return B(i.flatMap(g=>E(g[b]||[])))}let c=a("extractors"),f=s.find(b=>b.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=Ue),f&&!c.includes(f)&&c.unshift(f),c.sort((b,g)=>(b.order||0)-(g.order||0));let p=a("rules"),d={},h=p.length,m=p.filter(b=>nr(b)?(E(b[2]?.prefix||"").forEach($=>{d[$+b[0]]=b}),!1):!0).reverse(),x=Di(i.map(b=>b.theme)),w=a("extendTheme");for(let b of w)x=b(x)||x;let R={templates:B(i.flatMap(b=>E(b.autocomplete?.templates))),extractors:i.flatMap(b=>E(b.autocomplete?.extractors)).sort((b,g)=>(b.order||0)-(g.order||0)),shorthands:Ni(i.map(b=>b.autocomplete?.shorthands||{}))},y=a("separators");y.length||(y=[":","-"]);let S=a("content"),V=Wi(S),k={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...r,blocklist:a("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:x,rules:p,rulesSize:h,rulesDynamic:m,rulesStaticMap:d,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:R,variants:a("variants").map(er).sort((b,g)=>(b.order||0)-(g.order||0)),shortcuts:ur(a("shortcuts")).reverse(),extractors:c,safelist:a("safelist"),separators:y,details:r.details??r.envMode==="dev",content:V,transformers:ft(a("transformers"),(b,g)=>b.name===g.name)};for(let b of i)b?.configResolved?.(k);return k}function Di(t){return t.map(e=>e?$e(e):{}).reduce((e,r)=>dt(e,r),{})}function Ni(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function cr(...t){return t.flatMap(Bi)}function Bi(t){return Array.isArray(t)?t:t?[t]:[]}var pr="66.0.0";var te={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},mt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=pr;events=Jt();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(e={},r={}){let n=new t(e,r);return n.config=await ht(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await ht(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(_e(s)&&_e(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:te,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=e;for(let a of this.config.preprocess)o=a(e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async a=>{let c=this.makeContext(e,[r||a[0],a[1],a[2],a[3]]);this.config.details&&(c.variants=[...a[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(d=>this.stringifyUtil(d,c)).filter(We)},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l?.length)return this.cache.set(n,l),l;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:a=!1}=r,c=z(e)?await this.applyExtractors(e,n,a?new ye:new Set):Array.isArray(e)?new Set(e):e;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap($=>typeof $=="function"?$(g):$).forEach($=>{c.has($)||c.add($)})}let f=l?"":`
2
2
  `,p=new Set([xe]),d=a?new Map:new Set,h=new Map,m={},x=Array.from(c).map(async g=>{if(d.has(g))return;let $=await this.parseToken(g);if($!=null){d instanceof Map?d.set(g,{data:$,count:_e(c)?c.getCount(g):-1}):d.add(g);for(let C of $){let _=C[3]||"",I=C[4]?.layer;h.has(_)||h.set(_,[]),h.get(_).push(C),I&&p.add(I)}}});await Promise.all(x),await(async()=>{if(!i)return;let g={generator:this,theme:this.config.theme},$=new Set([]);this.config.preflights.forEach(({layer:C=Le})=>{p.add(C),$.add(C)}),m=Object.fromEntries(await Promise.all(Array.from($).map(async C=>{let I=(await Promise.all(this.config.preflights.filter(H=>(H.layer||Le)===C).map(async H=>await H.getCSS(g)))).filter(Boolean).join(f);return[C,I]})))})();let w=this.config.sortLayers(Array.from(p).sort((g,$)=>(this.config.layers[g]??0)-(this.config.layers[$]??0)||g.localeCompare($))),R={},y=this.config.outputToCssLayers,S=g=>{let $=g;return typeof y=="object"&&($=y.cssLayerName?.(g)),$===null?null:$??g},V=(g=xe)=>{if(R[g])return R[g];let $=Array.from(h).sort((I,H)=>(this.parentOrders.get(I[0])??0)-(this.parentOrders.get(H[0])??0)||I[0]?.localeCompare(H[0]||"")||0).map(([I,H])=>{let v=H.length,j=H.filter(T=>(T[4]?.layer||xe)===g).sort((T,F)=>T[0]-F[0]||(T[4]?.sort||0)-(F[4]?.sort||0)||T[5]?.currentSelector?.localeCompare(F[5]?.currentSelector??"")||T[1]?.localeCompare(F[1]||"")||T[2]?.localeCompare(F[2]||"")||0).map(([,T,F,,Me,,ct])=>[[[(T&&Hi(T,o))??"",Me?.sort??0]],F,!!(ct??Me?.noMerge)]);if(!j.length)return;let O=j.reverse().map(([T,F,Me],ct)=>{if(!Me&&this.config.mergeSelectors)for(let Q=ct+1;Q<v;Q++){let Y=j[Q];if(Y&&!Y[2]&&(T&&Y[0]||T==null&&Y[0]==null)&&Y[1]===F)return T&&Y[0]&&Y[0].push(...T),null}let ut=T?B(T.sort((Q,Y)=>Q[1]-Y[1]||Q[0]?.localeCompare(Y[0]||"")||0).map(Q=>Q[0]).filter(Boolean)):[];return ut.length?`${ut.join(`,${f}`)}{${F}}`:F}).filter(Boolean).reverse().join(f);if(!I)return O;let M=I.split(" $$ ");return`${M.join("{")}{${f}${O}${f}${"}".repeat(M.length)}`}).filter(Boolean).join(f);i&&($=[m[g],$].filter(Boolean).join(f));let C;y&&$&&(C=S(g),C!==null&&($=`@layer ${C}{${f}${$}${f}}`));let _=l?"":`/* layer: ${g}${C&&C!==g?`, alias: ${C}`:""} */${f}`;return R[g]=$?_+$:""},k=(g=w,$)=>{let C=g.filter(_=>!$?.includes(_));return[y&&C.length>0?`@layer ${C.map(S).filter(We).join(", ")};`:void 0,...C.map(_=>V(_)||"")].filter(Boolean).join(f)};return{get css(){return k()},layers:w,matched:d,getLayers:k,getLayer:V,setLayer:async(g,$)=>{let C=await $(V(g));return R[g]=C,C}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,l,a]=i;for(;s;){s=!1;let c=i[1];for(let f of this.config.variants){if(!f.multiPass&&a.has(f))continue;let p=await f.match(c,n);if(p){if(z(p)){if(p===c)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let d=p.map(h=>{let m=h.matcher??c,x=[h,...l],w=new Set(a);return w.add(f),[i[0],m,x,w]});return(await Promise.all(d.map(h=>o(h)))).flat()}}i[1]=p.matcher??c,l.unshift(p),a.add(f),s=!0;break}}if(!s)break;if(l.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await o([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let i=r.slice().sort((c,f)=>(c.order||0)-(f.order||0)).reduceRight((c,f)=>p=>{let d=f.body?.(p.entries)||p.entries,h=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??Yi)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:h[0]||p.parent,parentOrder:h[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},c)},c=>c)({prefix:"",selector:qi(n),pseudo:"",entries:e[2]}),{parent:s,parentOrder:l}=i;s!=null&&l!=null&&this.parentOrders.set(s,l);let a={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let c of this.config.postprocess)c(a);return a}constructCustomCSS(e,r,n){let o=le(r);if(z(o))return o;let{selector:i,entries:s,parent:l}=this.applyVariants([0,n||e.rawSelector,o,void 0,e.variantHandlers]),a=`${i}{${ce(s)}}`;return l?`${l}{${a}}`:a}async parseUtil(e,r,n=!1,o){let i=z(e)?await this.matchVariants(e):[e],s=async([a,c,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[c];if(p&&p[1]&&(n||!p[2]?.internal)){r.generator.activatedRules.add(p),this.config.details&&r.rules.push(p);let h=this.config.rules.indexOf(p),m=le(p[1]),x=p[2];return z(m)?[[h,m,x]]:[[h,a,m,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let h of d){let[m,x,w]=h;if(w?.internal&&!n)continue;let R=c;if(w?.prefix){let k=E(w.prefix);if(o){let b=E(o);if(!k.some(g=>b.includes(g)))continue}else{let b=k.find(g=>c.startsWith(g));if(b==null)continue;R=c.slice(b.length)}}let y=R.match(m);if(!y)continue;let S=await x(y,r);if(!S)continue;if(r.generator.activatedRules.add(h),this.config.details&&r.rules.push(h),typeof S!="string")if(Symbol.asyncIterator in S){let k=[];for await(let b of S)b&&k.push(b);S=k}else Symbol.iterator in S&&!Array.isArray(S)&&(S=Array.from(S).filter(We));let V=rr(S).filter(k=>k.length);if(V.length){let k=this.config.rules.indexOf(h);return V.map(b=>{if(z(b))return[k,b,w];let g=f,$=w;for(let C of b)C[0]===te.variants?g=[...E(C[1]),...g]:C[0]===te.parent?g=[{parent:C[1]},...g]:C[0]===te.selector?g=[{selector:C[1]},...g]:C[0]===te.layer?g=[{layer:C[1]},...g]:C[0]===te.sort&&($={...$,sort:C[1]});return[k,a,b,$,g]})}}},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l.length)return l}stringifyUtil(e,r){if(!e)return;if(pt(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:l,noMerge:a}=this.applyVariants(e),c=ce(o);if(!c)return;let{layer:f,sort:p,...d}=e[3]??{},h={...d,layer:s??f,sort:l??p};return[e[0],n,c,i,h,this.config.details?r:void 0,a]}async expandShortcut(e,r,n=5){if(n===0)return;let o=this.config.details?c=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(c)}:tr,i,s,l,a;for(let c of this.config.shortcuts){let f=e;if(c[2]?.prefix){let d=E(c[2].prefix).find(h=>e.startsWith(h));if(d==null)continue;f=e.slice(d.length)}if(or(c)){if(c[0]===f){i=i||c[2],s=c[1],o(c);break}}else{let p=f.match(c[0]);if(p&&(s=c[1](p,r)),s){i=i||c[2],o(c);break}}}if(s&&(l=B(E(s).filter(z).map(c=>ir(c.trim()).split(/\s+/g)).flat()),a=E(s).filter(c=>!z(c)).map(c=>({handles:[],value:c}))),!s){let c=z(e)?await this.matchVariants(e):[e];for(let f of c){let[p,d,h]=f;if(p!==d){let m=await this.expandShortcut(d,r,n-1);m&&(l=m[0].filter(z).map(x=>p.replace(d,x)),a=m[0].filter(x=>!z(x)).map(x=>({handles:[...x.handles,...h],value:x.value})))}}}if(!(!l?.length&&!a?.length))return[[await Promise.all(E(l).map(async c=>(await this.expandShortcut(c,r,n-1))?.[0]||[c])),a].flat(2).filter(c=>!!c),i]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new Ne,s=(await Promise.all(B(n).map(async f=>{let p=z(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",le(f.value),void 0,f.handles]];return!p&&this.config.warn&&ar(`unmatched utility "${f}" in shortcut "${e[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[l,,a]=e,c=[];for(let f of s){if(pt(f)){c.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:h,sort:m,noMerge:x,layer:w}=this.applyVariants(f,[...f[4],...a],l);i.getFallback(w??o.layer,new De).getFallback(p,h,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),m??0])}return c.concat(i.flatMap((f,p)=>f.map(([d,h],m,x)=>{let w=(y,S,V)=>{let k=Math.max(...V.map(g=>g[1])),b=V.map(g=>g[0]);return(y?[b.flat(1)]:b).map(g=>{let $=ce(g);if($)return[h,m,$,x,{...o,noMerge:S,sort:k,layer:p},r,void 0]})};return[[d.filter(([,y])=>y).map(([y,,S])=>[y,S]),!0],[d.filter(([,y])=>!y).map(([y,,S])=>[y,S]),!1]].map(([y,S])=>[...w(!1,S,y.filter(([V])=>V.some(k=>k[0]===te.shortcutsNoMerge))),...w(!0,S,y.filter(([V])=>V.every(k=>k[0]!==te.shortcutsNoMerge)))])}).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):z(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(e):z(o)?o===e:o.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function hr(t,e){return await mt.create(t,e)}var mr=/\s\$\$\s+/g;function Gi(t){return mr.test(t)}function Hi(t,e){return Gi(t)?t.replace(mr,e?` ${e} `:" "):e?`${e} ${t}`:t}var dr=/^\[(.+?)(~?=)"(.*)"\]$/;function qi(t){return dr.test(t)?t.replace(dr,(e,r,n,o)=>`[${Ie(r)}${n}"${Ie(o)}"]`):`.${Ie(t)}`}function Yi(t,e){return e(t)}var gt=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function gr(t={}){let e=t.prefix??"un-",r=t.prefixedOnly??!1,n=t.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let l=Qt(i);if(!l)return;let a=l[1];if(a.startsWith(e))a=a.slice(e.length);else if(r)return;let c=l[2],[,f="",p=c]=c.match(gt)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${a}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,h]=c.match(o)||[];if(h)return`${d}${f}${a}-${h}`}if(f&&p.match(/^[\d.]+$/)){let d=f.split(/([^:]*:)/g).filter(Boolean),h=d.pop()+p,m=d.join("");return[{matcher:`${f}${a}-${p}`},{matcher:`${m}${a}-${h}`}]}return`${f}${a}-${p}`}}}var Xi=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,Zi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,br=/[\s'"`;>]+/;function xr(t){return{name:"attributify",extract:({content:e,cursor:r})=>{let n=e.matchAll(Xi),o,i=0;for(let y of n){let[,S,V]=y,k=y.index+S.length;if(r>k&&r<=k+V.length){i=k,o=V;break}}if(!o)return null;let s=o.matchAll(Zi),l=0,a,c;for(let y of s){let[S,V,k]=y,b=i+y.index;if(r>b&&r<=b+S.length){l=b,a=V,c=k?.slice(1);break}}if(!a||a==="class"||a==="className"||a===":class")return null;let f=!!t?.prefix&&a.startsWith(t.prefix);if(t?.prefixedOnly&&!f)return null;let p=f?a.slice(t.prefix.length):a;if(c===void 0)return{extracted:p,resolveReplacement(y){let S=f?t.prefix.length:0;return{start:l+S,end:l+a.length,replacement:y}}};let d=l+a.length+2,h=br.exec(c),m=0,x;for(;h;){let[y]=h;if(r>d+m&&r<=d+m+h.index){x=c.slice(m,m+h.index);break}m+=h.index+y.length,h=br.exec(c.slice(m))}x===void 0&&(x=c.slice(m));let[,w="",R]=x.match(gt)||[];return{extracted:`${w}${p}-${R}`,transformSuggestions(y){return y.filter(S=>S.startsWith(`${w}${p}-`)).map(S=>w+S.slice(w.length+p.length+1))},resolveReplacement(y){return{start:m+d,end:m+d+x.length,replacement:w+y.slice(w.length+p.length+1)}}}}}}var Ji=["v-bind:",":"],yr=/[\s'"`;]+/g,bt=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,Qi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,xt=["placeholder","fill","opacity","stroke-opacity"];function wr(t){let e=t?.ignoreAttributes??xt,r=t?.nonValuedAttribute??!0,n=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(bt)).flatMap(i=>Array.from((i[1]||"").matchAll(Qi))).flatMap(([,i,...s])=>{let l=s.filter(Boolean).join("");if(e.includes(i))return[];for(let a of Ji)if(i.startsWith(a)){i=i.slice(a.length);break}if(!l){if(we(i)&&r!==!1){let a=[`[${i}=""]`];return n&&a.push(`[${i}="true"]`),a}return[]}return["class","className"].includes(i)?l.split(yr).filter(we):bt.test(l)?(bt.lastIndex=0,this.extract({code:l})):t?.prefixedOnly&&t.prefix&&!i.startsWith(t.prefix)?[]:l.split(yr).filter(a=>!!a&&a!==":").map(a=>`[${i}~="${a}"]`)})}}}var es=(t={})=>{t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??xt;let e=[gr(t)],r=[wr(t)],n=[xr(t)];return{name:"@unocss/preset-attributify",enforce:"post",variants:e,extractors:r,options:t,autocomplete:{extractors:n},extractorDefault:t.strict?!1:void 0}},$r=es;function ts(t){let e,r,n=2166136261;for(e=0,r=t.length;e<r;e++)n^=t.charCodeAt(e),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return`00000${(n>>>0).toString(36)}`.slice(-6)}function Sr(t,e,r,n){for(let o of Array.from(t.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${ts(i)}`;e.set(s,i),t=t.replace(i,s)}return t}function vr(t,e){for(let[r,n]of e.entries())t=t.replaceAll(r,n);return t}var rs=/\/\/#\s*sourceMappingURL=.*\n?/g;function Cr(t){return t.includes("sourceMappingURL=")?t.replace(rs,""):t}var ns=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,os=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,is=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function ss(t){let e=[];for(let o of t.matchAll(os))o.index!==0&&!/^[\s'"`]/.test(t[o.index-1]??"")||e.push(o[0]);for(let o of t.matchAll(ns))e.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return t=Sr(t,r,/-\[(?!&.+?;)[^\]]*\]/g,n),t&&t.split(Fe).forEach(o=>{o.includes(n)&&(o=vr(o,r)),we(o)&&!is.test(o)&&e.push(o)}),e}function kr(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return ss(Cr(t))}}}function Rr(t){if(t.preflight)return[{layer:"preflights",getCSS({theme:e,generator:r}){if(e.preflightBase){let n=Object.entries(e.preflightBase);if(t.preflight==="on-demand"){let o=new Set(Array.from(r.activatedRules).map(i=>i[2]?.custom?.preflightKeys).filter(Boolean).flat());n=n.filter(([i])=>o.has(i))}if(n.length>0){let o=ce(n);return t.variablePrefix!=="un-"&&(o=o.replace(/--un-/g,`--${t.variablePrefix}`)),E(e.preflightRoot??["*,::before,::after","::backdrop"]).map(s=>`${s}{${o}}`).join("")}}}}]}function ue(t,e,r){if(t==="")return;let n=t.length,o=0,i=!1,s=0;for(let l=0;l<n;l++)switch(t[l]){case e:i||(i=!0,s=l),o++;break;case r:if(--o,o<0)return;if(o===0)return[t.slice(s,l+1),t.slice(l+1),t.slice(0,s)];break}}function fe(t,e,r,n){if(t===""||(z(n)&&(n=[n]),n.length===0))return;let o=t.length,i=0;for(let s=0;s<o;s++)switch(t[s]){case e:i++;break;case r:if(--i<0)return;break;default:for(let l of n){let a=l.length;if(a&&l===t.slice(s,s+a)&&i===0)return s===0||s===o-a?void 0:[t.slice(0,s),t.slice(s+a)]}}return[t,""]}function pe(t,e,r){r=r??10;let n=[],o=0;for(;t!=="";){if(++o>r)return;let i=fe(t,"(",")",e);if(!i)return;let[s,l]=i;n.push(s),t=l}if(n.length>0)return n}var yt=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Tr=["%alpha","<alpha-value>"],as=new RegExp(Tr.map(t=>ee(t)).join("|"));function re(t=""){let e=ls(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:o}=e,i=r.toLowerCase();if(n.length!==0&&!(yt.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 Se(t){let e=t.alpha??1;return typeof e=="string"&&Tr.includes(e)?1:e}function W(t,e){if(typeof t=="string")return t.replace(as,`${e??1}`);let{components:r}=t,{alpha:n,type:o}=t;return n=e??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,yt.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function ls(t){if(!t)return;let e=cs(t);if(e!=null||(e=us(t),e!=null)||(e=fs(t),e!=null)||(e=ds(t),e!=null)||(e=hs(t),e!=null))return e}function cs(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:let r=Array.from(e,o=>Number.parseInt(o,16)).map(o=>o<<4|o);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 us(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function fs(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,o=pe(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 ps=new RegExp(`^(${yt.join("|")})\\((.+)\\)$`,"i");function ds(t){let e=t.match(ps);if(!e)return;let[,r,n]=e,o=Er(`${r} ${n}`);if(o){let{alpha:i,components:[s,...l]}=o;return{type:s,components:l,alpha:i}}}function hs(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=Er(e[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function Er(t){let e=pe(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 i=e.splice(r-2);e.push(i.join(" ")),--r}let n=pe(e[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:e};let o=n.pop();return e[r-1]=n.join("/"),{components:e,alpha:o}}function jr(t){let e=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=t[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(t))Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return e}var Ar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vr=new Uint8Array(64),ms=new Uint8Array(128);for(let t=0;t<Ar.length;t++){let e=Ar.charCodeAt(t);Vr[t]=e,ms[e]=t}function ve(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(Vr[o])}while(n>0);return e}var Or=1024*16,Pr=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}},wt=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Or)}write(e){let{buffer:r}=this;r[this.pos++]=e,this.pos===Or&&(this.out+=Pr.decode(r),this.pos=0)}flush(){let{buffer:e,out:r,pos:n}=this;return n>0?r+Pr.decode(e.subarray(0,n)):r}};function zr(t){let e=new wt,r=0,n=0,o=0,i=0;for(let s=0;s<t.length;s++){let l=t[s];if(s>0&&e.write(59),l.length===0)continue;let a=0;for(let c=0;c<l.length;c++){let f=l[c];c>0&&e.write(44),a=ve(e,f[0],a),f.length!==1&&(r=ve(e,f[1],r),n=ve(e,f[2],n),o=ve(e,f[3],o),f.length!==4&&(i=ve(e,f[4],i)))}}return e.flush()}var Ge=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),o=this.original.slice(r);this.original=n;let i=new t(e,this.end,o);return i.outro=this.outro,this.outro="",this.end=e,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(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 gs(){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 bs=gs(),$t=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=zr(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+bs(this.toString())}};function xs(t){let e=t.split(`
3
3
  `),r=e.filter(i=>/^\t+/.test(i)),n=e.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 l=/^ +/.exec(s)[0].length;return Math.min(l,i)},1/0);return new Array(o+1).join(" ")}function ys(t,e){let r=t.split(/[/\\]/),n=e.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 ws=Object.prototype.toString;function $s(t){return ws.call(t)==="[object Object]"}function Mr(t){let e=t.split(`
4
4
  `),r=[];for(let n=0,o=0;n<e.length;n++)r.push(o),o+=e[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let c=i+s>>1;o<r[c]?s=c:i=c+1}let l=i-1,a=o-r[l];return{line:l,column:a}}}var Ss=/\w/,St=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,o){if(r.length){let i=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": "65.5.0",
4
+ "version": "66.0.0",
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": "65.5.0",
39
- "@unocss/preset-uno": "65.5.0",
40
- "@unocss/preset-attributify": "65.5.0"
38
+ "@unocss/core": "66.0.0",
39
+ "@unocss/preset-attributify": "66.0.0",
40
+ "@unocss/preset-uno": "66.0.0"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",