@unocss/runtime 0.45.15 → 0.45.18
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/attributify.global.js +3 -3
- package/core.global.js +1 -1
- package/full.global.js +3 -3
- package/mini.global.js +3 -3
- package/package.json +4 -4
- package/uno.global.js +3 -3
package/core.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{function vt(e){let t=e.length,r=-1,n,s="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){s+="\uFFFD";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){s+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=e.charAt(r);continue}s+=`\\${e.charAt(r)}`}return s}var F=vt;function L(e=[]){return Array.isArray(e)?e:[e]}function D(e){return Array.from(new Set(e))}function v(e){return typeof e=="string"}function K(e){return v(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function et(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>K(t)):[e]:[K(e)]}function wt(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(e[s][0]===t&&e[s][1]===r)return!1;return!0})}function G(e){return e==null?"":wt(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function B(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Y(e,t){let r=e,n=t;if(Array.isArray(r))return[...n];let s={...r};return B(r)&&B(n)&&Object.keys(n).forEach(i=>{B(r[i])&&B(n[i])||Array.isArray(r[i])&&Array.isArray(n[i])?s[i]=Y(r[i],n[i]):Object.assign(s,{[i]:n[i]})}),s}function H(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?H(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:H(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?H(n):n;return r}return e}function rt(e){return v(e[0])}function nt(e){return v(e[0])}var Ut=/[\w\u00A0-\uFFFF-_:%-?]/,q="$$shortcut-no-merge";function st(e=""){return Ut.test(e)}function it(e){return typeof e=="function"?{match:e}:e}function W(e){return e.length===3}function ot(e){return e!=null}function at(){}var z=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.has(r)||s.set(r,n),s.get(r)}set(t,r,n){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.set(r,n),this}has(t,r){var n;return(n=this._map.get(t))==null?void 0:n.has(r)}delete(t,r){var n;return((n=this._map.get(t))==null?void 0:n.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(([s,i])=>t(i,r,s)))}};var ct=/((?:[!\w+:_/-]|\[&?>?:?.*\])+?)([:-])\(((?:[~!\w\s:/\\,%#.$-]|\[.*?\])*?)\)/gm;function lt(e,t=["-",":"],r=5){ct.lastIndex=0;let n=!1,s=e.toString();do{let i=s;s=s.replace(ct,(a,p,c,o)=>t.includes(c)?o.split(/\s/g).filter(Boolean).map(d=>d==="~"?p:d.replace(/^(!?)(.*)/,`$1${p}${c}$2`)).join(" "):a),n=s!==i,r-=1}while(n&&r);return typeof e=="string"?s:e.length()?e.overwrite(0,e.length(),s):e}var ut=new Set;function ft(e){ut.has(e)||(console.warn("[unocss]",e),ut.add(e))}var At=e=>[...new Set(e.split(/\\?[\s'"`;={}]+/g))].filter(st),Z={name:"split",order:0,extract({code:e}){return At(e)}};function pt(){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 I="default",N="preflights",Vt="shortcuts",dt={[N]:-100,[Vt]:-10,[I]:0};function ht(e){return L(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}function $t(e){var r;let t=e.shortcuts?ht(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=e.prefix),i.layer==null&&e.layer&&(i.prefix=e.layer)};t==null||t.forEach(n),(r=e.rules)==null||r.forEach(n)}return e}function J(e={},t={}){let r=Object.assign({},t,e),n=(r.presets||[]).flatMap(L).map($t),s=[...n.filter(l=>l.enforce==="pre"),...n.filter(l=>!l.enforce),...n.filter(l=>l.enforce==="post")],i=Object.assign(dt,...n.map(l=>l.layers),e.layers);function a(l){return D([...s.flatMap(h=>L(h[l]||[])),...L(r[l]||[])])}let p=a("extractors");p.length||p.push(Z),p.sort((l,h)=>(l.order||0)-(h.order||0));let c=a("rules"),o={},d=c.length,u=c.map((l,h)=>{var A;if(rt(l)){let S=((A=l[2])==null?void 0:A.prefix)||"";o[S+l[0]]=[h,l[1],l[2],l];return}return[h,...l]}).filter(Boolean).reverse(),g=H([...s.map(l=>l.theme||{}),r.theme||{}].reduce((l,h)=>Y(l,h),{}));a("extendTheme").forEach(l=>l(g));let y={templates:D(s.map(l=>{var h;return L((h=l.autocomplete)==null?void 0:h.templates)}).flat()),extractors:s.map(l=>{var h;return L((h=l.autocomplete)==null?void 0:h.extractors)}).flat().sort((l,h)=>(l.order||0)-(h.order||0))};return{mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:l=>l,...r,presets:s,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:i,theme:g,rulesSize:d,rulesDynamic:u,rulesStaticMap:o,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:y,variants:a("variants").map(it),shortcuts:ht(a("shortcuts")),extractors:p,safelist:a("safelist")}}var gt="0.45.
|
|
1
|
+
"use strict";(()=>{function vt(e){let t=e.length,r=-1,n,s="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.charCodeAt(r),n===0){s+="\uFFFD";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(r===0&&t===1&&n===45){s+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=e.charAt(r);continue}s+=`\\${e.charAt(r)}`}return s}var F=vt;function L(e=[]){return Array.isArray(e)?e:[e]}function D(e){return Array.from(new Set(e))}function v(e){return typeof e=="string"}function K(e){return v(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function et(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>K(t)):[e]:[K(e)]}function wt(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(e[s][0]===t&&e[s][1]===r)return!1;return!0})}function G(e){return e==null?"":wt(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function B(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Y(e,t){let r=e,n=t;if(Array.isArray(r))return[...n];let s={...r};return B(r)&&B(n)&&Object.keys(n).forEach(i=>{B(r[i])&&B(n[i])||Array.isArray(r[i])&&Array.isArray(n[i])?s[i]=Y(r[i],n[i]):Object.assign(s,{[i]:n[i]})}),s}function H(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?H(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:H(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?H(n):n;return r}return e}function rt(e){return v(e[0])}function nt(e){return v(e[0])}var Ut=/[\w\u00A0-\uFFFF-_:%-?]/,q="$$shortcut-no-merge";function st(e=""){return Ut.test(e)}function it(e){return typeof e=="function"?{match:e}:e}function W(e){return e.length===3}function ot(e){return e!=null}function at(){}var z=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.has(r)||s.set(r,n),s.get(r)}set(t,r,n){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.set(r,n),this}has(t,r){var n;return(n=this._map.get(t))==null?void 0:n.has(r)}delete(t,r){var n;return((n=this._map.get(t))==null?void 0:n.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(([s,i])=>t(i,r,s)))}};var ct=/((?:[!\w+:_/-]|\[&?>?:?.*\])+?)([:-])\(((?:[~!\w\s:/\\,%#.$-]|\[.*?\])*?)\)/gm;function lt(e,t=["-",":"],r=5){ct.lastIndex=0;let n=!1,s=e.toString();do{let i=s;s=s.replace(ct,(a,p,c,o)=>t.includes(c)?o.split(/\s/g).filter(Boolean).map(d=>d==="~"?p:d.replace(/^(!?)(.*)/,`$1${p}${c}$2`)).join(" "):a),n=s!==i,r-=1}while(n&&r);return typeof e=="string"?s:e.length()?e.overwrite(0,e.length(),s):e}var ut=new Set;function ft(e){ut.has(e)||(console.warn("[unocss]",e),ut.add(e))}var At=e=>[...new Set(e.split(/\\?[\s'"`;={}]+/g))].filter(st),Z={name:"split",order:0,extract({code:e}){return At(e)}};function pt(){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 I="default",N="preflights",Vt="shortcuts",dt={[N]:-100,[Vt]:-10,[I]:0};function ht(e){return L(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}function $t(e){var r;let t=e.shortcuts?ht(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=e.prefix),i.layer==null&&e.layer&&(i.prefix=e.layer)};t==null||t.forEach(n),(r=e.rules)==null||r.forEach(n)}return e}function J(e={},t={}){let r=Object.assign({},t,e),n=(r.presets||[]).flatMap(L).map($t),s=[...n.filter(l=>l.enforce==="pre"),...n.filter(l=>!l.enforce),...n.filter(l=>l.enforce==="post")],i=Object.assign(dt,...n.map(l=>l.layers),e.layers);function a(l){return D([...s.flatMap(h=>L(h[l]||[])),...L(r[l]||[])])}let p=a("extractors");p.length||p.push(Z),p.sort((l,h)=>(l.order||0)-(h.order||0));let c=a("rules"),o={},d=c.length,u=c.map((l,h)=>{var A;if(rt(l)){let S=((A=l[2])==null?void 0:A.prefix)||"";o[S+l[0]]=[h,l[1],l[2],l];return}return[h,...l]}).filter(Boolean).reverse(),g=H([...s.map(l=>l.theme||{}),r.theme||{}].reduce((l,h)=>Y(l,h),{}));a("extendTheme").forEach(l=>l(g));let y={templates:D(s.map(l=>{var h;return L((h=l.autocomplete)==null?void 0:h.templates)}).flat()),extractors:s.map(l=>{var h;return L((h=l.autocomplete)==null?void 0:h.extractors)}).flat().sort((l,h)=>(l.order||0)-(h.order||0))};return{mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:l=>l,...r,presets:s,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:i,theme:g,rulesSize:d,rulesDynamic:u,rulesStaticMap:o,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:y,variants:a("variants").map(it),shortcuts:ht(a("shortcuts")),extractors:p,safelist:a("safelist")}}var gt="0.45.18";var Q=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=J(t,r),this.events.emit("config",this.config)}version=gt;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=pt();setConfig(t,r){!t||(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=J(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let s={get original(){return t},code:t,id:r};for(let i of this.config.extractors){let a=await i.extract(s);if(a)for(let p of a)n.add(p)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...s)=>this.constructCustomCSS(n,...s),variantMatch:r};return n}async parseToken(t,r){var c;if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let s=t;for(let o of this.config.preprocess)s=o(t);if(this.isBlocked(s)){this.blocked.add(t),this._cache.set(n,null);return}let i=this.matchVariants(t,s);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 p=this.expandShortcut(a.currentSelector,a);if(p){let o=await this.stringifyShortcuts(a.variantMatch,a,p[0],p[1]);if(o!=null&&o.length)return this._cache.set(n,o),o}else{let o=(c=await this.parseUtil(a.variantMatch,a))==null?void 0:c.map(d=>this.stringifyUtil(d,a)).filter(ot);if(o!=null&&o.length)return this._cache.set(n,o),o}this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:s,preflights:i=!0,safelist:a=!0,minify:p=!1}=r,c=v(t)?await this.applyExtractors(t,n):Array.isArray(t)?new Set(t):t;a&&this.config.safelist.forEach(m=>c.add(m));let o=p?"":`
|
|
2
2
|
`,d=new Set([I]),u=new Set,g=new Map,y={},l=Array.from(c).map(async m=>{var C;if(u.has(m))return;let b=await this.parseToken(m);if(b!=null){u.add(m);for(let w of b){let f=w[3]||"",x=(C=w[4])==null?void 0:C.layer;g.has(f)||g.set(f,[]),g.get(f).push(w),x&&d.add(x)}}}),h=(async()=>{if(!i)return;let m={generator:this,theme:this.config.theme},b=new Set([]);this.config.preflights.forEach(({layer:C=N})=>{d.add(C),b.add(C)}),y=Object.fromEntries(await Promise.all(Array.from(b).map(async C=>{let f=(await Promise.all(this.config.preflights.filter(x=>(x.layer||N)===C).map(async x=>await x.getCSS(m)))).filter(Boolean).join(o);return[C,f]})))})();await Promise.all([...l,h]);let A=this.config.sortLayers(Array.from(d).sort((m,b)=>(this.config.layers[m]??0)-(this.config.layers[b]??0)||m.localeCompare(b))),S={},R=m=>{if(S[m])return S[m];let b=Array.from(g).sort((w,f)=>{var x;return(this.parentOrders.get(w[0])??0)-(this.parentOrders.get(f[0])??0)||((x=w[0])==null?void 0:x.localeCompare(f[0]||""))||0}).map(([w,f])=>{let x=f.length,U=f.filter(E=>{var V;return(((V=E[4])==null?void 0:V.layer)||I)===m}).sort((E,V)=>{var M,j,k,_;return E[0]-V[0]||(((M=E[4])==null?void 0:M.sort)||0)-(((j=V[4])==null?void 0:j.sort)||0)||((k=E[1])==null?void 0:k.localeCompare(V[1]||""))||((_=E[2])==null?void 0:_.localeCompare(V[2]||""))||0}).map(([,E,V,,M,,j])=>[[[(E&&Tt(E,s))??"",(M==null?void 0:M.sort)??0]],V,!!(j??(M==null?void 0:M.noMerge))]);if(!U.length)return;let P=U.reverse().map(([E,V,M],j)=>{if(!M&&this.config.mergeSelectors)for(let _=j+1;_<x;_++){let T=U[_];if(T&&!T[2]&&(E&&T[0]||E==null&&T[0]==null)&&T[1]===V)return E&&T[0]&&T[0].push(...E),null}let k=E?D(E.sort((_,T)=>{var tt;return _[1]-T[1]||((tt=_[0])==null?void 0:tt.localeCompare(T[0]||""))||0}).map(_=>_[0]).filter(Boolean)):[];return k.length?`${k.join(`,${o}`)}{${V}}`:V}).filter(Boolean).reverse().join(o);if(!w)return P;let O=w.split(" $$ ");return`${O.join("{")}{${o}${P}${o}}${O.map(E=>"").join("}")}`}).filter(Boolean).join(o);i&&(b=[y[m],b].filter(Boolean).join(o));let C=p?"":`/* layer: ${m} */${o}`;return S[m]=b?C+b:""},$=(m=A,b)=>m.filter(C=>!(b!=null&&b.includes(C))).map(C=>R(C)||"").filter(Boolean).join(o);return{get css(){return $()},layers:A,matched:u,getLayers:$,getLayer:R}}matchVariants(t,r){let n=new Set,s=[],i=r||t,a=!1,p={rawSelector:t,theme:this.config.theme,generator:this};for(;;){a=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let o=c.match(i,p);if(!!o){v(o)&&(o={matcher:o}),i=o.matcher,s.unshift(o),n.add(c),a=!0;break}}if(!a)break;if(s.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,s,n]}applyVariants(t,r=t[4],n=t[1]){let i=[...r].sort((o,d)=>(o.order||0)-(d.order||0)).reverse().reduce((o,d)=>u=>{var l,h;let g=((l=d.body)==null?void 0:l.call(d,u.entries))||u.entries,y=Array.isArray(d.parent)?d.parent:[d.parent,void 0];return(d.handle??Lt)({...u,entries:g,selector:((h=d.selector)==null?void 0:h.call(d,u.selector,g))||u.selector,parent:y[0]||u.parent,parentOrder:y[1]||u.parentOrder,layer:d.layer||u.layer,sort:d.sort||u.sort},o)},o=>o)({prefix:"",selector:Pt(n),pseudo:"",entries:t[2]}),{parent:a,parentOrder:p}=i;a!=null&&p!=null&&this.parentOrders.set(a,p);let c={selector:Ot([i.prefix,i.selector,i.pseudo].join("")),entries:i.entries,parent:a,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let o of this.config.postprocess)o(c);return c}constructCustomCSS(t,r,n){let s=K(r);if(v(s))return s;let{selector:i,entries:a,parent:p}=this.applyVariants([0,n||t.rawSelector,s,void 0,t.variantHandlers]),c=`${i}{${G(a)}}`;return p?`${p}{${c}}`:c}async parseUtil(t,r,n=!1){var o;let[s,i,a]=v(t)?this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[i];if(p&&p[1]&&(n||!((o=p[2])!=null&&o.internal))){this.config.details&&r.rules.push(p[3]);let d=p[0],u=K(p[1]),g=p[2];return v(u)?[[d,u,g]]:[[d,s,u,g,a]]}r.variantHandlers=a;let{rulesDynamic:c}=this.config;for(let[d,u,g,y]of c){if((y==null?void 0:y.internal)&&!n)continue;let l=i;if(y!=null&&y.prefix){if(!i.startsWith(y.prefix))continue;l=i.slice(y.prefix.length)}let h=l.match(u);if(!h)continue;let A=await g(h,r);if(!A)continue;this.config.details&&r.rules.push([u,g,y]);let S=et(A).filter(R=>R.length);if(S.length)return S.map(R=>v(R)?[d,R,y]:[d,s,R,y,a])}}stringifyUtil(t,r){if(!t)return;if(W(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:s,parent:i,layer:a,sort:p,noMerge:c}=this.applyVariants(t),o=G(s);if(!o)return;let{layer:d,sort:u,...g}=t[3]??{},y={...g,layer:a??d,sort:p??u};return[t[0],n,o,i,y,this.config.details?r:void 0,c]}expandShortcut(t,r,n=5){var p;if(n===0)return;let s=this.config.details?c=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(c)}:at,i,a;for(let c of this.config.shortcuts){let o=(p=c[2])!=null&&p.prefix?t.slice(c[2].prefix.length):t;if(nt(c)){if(c[0]===o){i=i||c[2],a=c[1],s(c);break}}else{let d=o.match(c[0]);if(d&&(a=c[1](d,r)),a){i=i||c[2],s(c);break}}}if(v(a)&&(a=lt(a).split(/\s+/g)),!a){let[c,o]=v(t)?this.matchVariants(t):t;if(c!==o){let d=this.expandShortcut(o,r,n-1);d&&(a=d[0].map(u=>v(u)?c.replace(o,u):u))}}if(!!a)return[a.flatMap(c=>{var o;return(v(c)?(o=this.expandShortcut(c,r,n-1))==null?void 0:o[0]:void 0)||[c]}).filter(Boolean),i]}async stringifyShortcuts(t,r,n,s={layer:this.config.shortcutsLayer}){var d;let i=new z,a=(await Promise.all(D(n).map(async u=>{let g=v(u)?await this.parseUtil(u,r,!0):[[1/0,"{inline}",K(u),void 0,[]]];return g||ft(`unmatched utility "${u}" in shortcut "${t[1]}"`),g||[]}))).flat(1).filter(Boolean).sort((u,g)=>u[0]-g[0]),[p,,c]=t,o=[];for(let u of a){if(W(u)){o.push([u[0],void 0,u[1],void 0,u[2],r,void 0]);continue}let{selector:g,entries:y,parent:l,sort:h,noMerge:A}=this.applyVariants(u,[...u[4],...c],p);i.getFallback(g,l,[[],u[0]])[0].push([y,!!(A??((d=u[3])==null?void 0:d.noMerge)),h??0])}return o.concat(i.map(([u,g],y,l)=>{let h=(S,R,$)=>{let m=Math.max(...$.map(C=>C[1])),b=$.map(C=>C[0]);return(S?[b.flat(1)]:b).map(C=>{let w=G(C);if(w)return[g,y,w,l,{...s,noMerge:R,sort:m},r,void 0]})};return[[u.filter(([,S])=>S).map(([S,,R])=>[S,R]),!0],[u.filter(([,S])=>!S).map(([S,,R])=>[S,R]),!1]].map(([S,R])=>[...h(!1,R,S.filter(([$])=>$.some(m=>m[0]===q))),...h(!0,R,S.filter(([$])=>$.every(m=>m[0]!==q)))])}).flat(2).filter(Boolean))}isBlocked(t){return!t||this.config.blocklist.some(r=>v(r)?r===t:r.test(t))}};function yt(e,t){return new Q(e,t)}var xt=/ \$\$ /,_t=e=>e.match(xt);function Tt(e,t){return _t(e)?e.replace(xt,t?` ${t} `:" "):t?`${t} ${e}`:e}function Ot(e){let t=e.match(/::[\w-]+(\([\w-]+\))?/g);if(t){for(let r of t)e=e.replace(r,"");e+=t.join("")}return e}var mt=/^\[(.+?)(~?=)"(.*)"\]$/;function Pt(e){return mt.test(e)?e.replace(mt,(t,r,n,s)=>`[${F(r)}${n}"${F(s)}"]`):`.${F(e)}`}function Lt(e,t){return t(e)}var jt=e=>e.replace(/-(\w)/g,(t,r)=>r?r.toUpperCase():""),St=e=>e.charAt(0).toUpperCase()+e.slice(1),Ct=e=>e.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase(),Et=["Webkit","Moz","ms"];function bt(e){let t={};function r(n){let s=t[n];if(s)return s;let i=jt(n);if(i!=="filter"&&i in e)return t[n]=Ct(i);i=St(i);for(let a=0;a<Et.length;a++){let p=`${Et[a]}${i}`;if(p in e)return t[n]=Ct(St(p))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=r(s[0]))})}function Rt(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function X(e={}){var C,w;if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let t=window.__unocss||{},r=t==null?void 0:t.runtime,n=Object.assign(e.defaults||{},r);if(r!=null&&r.autoPrefix){let f=n.postprocess;f||(f=[]),Array.isArray(f)||(f=[f]),f.unshift(bt(document.createElement("div").style)),n.postprocess=f}(C=r==null?void 0:r.configResolved)==null||C.call(r,t,n);let s,i=!0,a,p=yt(t,n),c=new Set,o,d=[],u=()=>new Promise(f=>{d.push(f),o!=null&&clearTimeout(o),o=setTimeout(()=>y().then(()=>{let x=d;d=[],x.forEach(U=>U())}),0)});function g(f=document.body){if(f.nodeType!==1)return;let x=f;x.hasAttribute("un-cloak")&&x.removeAttribute("un-cloak"),x.querySelectorAll("[un-cloak]").forEach(U=>{U.removeAttribute("un-cloak")})}async function y(){let f=await p.generate(c);s||(s=document.createElement("style"),document.documentElement.prepend(s)),s.innerHTML=f.css,c=f.matched}async function l(f){let x=c.size;await p.applyExtractors(f,void 0,c),x!==c.size&&await u()}async function h(){let f=document.body&&document.body.outerHTML;f&&(await l(`${f} ${Rt(f)}`),g())}let A=new MutationObserver(f=>{i||f.forEach(async x=>{if(x.target.nodeType!==1)return;let U=x.target;if(U!==s)if(x.type==="childList")x.addedNodes.forEach(async P=>{if(P.nodeType!==1)return;let O=P;a&&!a(O)||(await l(O.outerHTML),g(O))});else{if(a&&!a(U))return;if(x.attributeName!=="un-cloak"){let P=Array.from(U.attributes).map(E=>E.value?`${E.name}="${E.value}"`:E.name).join(" "),O=`<${U.tagName.toLowerCase()} ${P}>`;await l(O)}U.hasAttribute("un-cloak")&&U.removeAttribute("un-cloak")}})}),S=!1;function R(){if(S)return;let f=document.documentElement||document.body;!f||(A.observe(f,{childList:!0,subtree:!0,attributes:!0}),S=!0)}function $(){h(),R()}function m(){document.readyState==="loading"?window.addEventListener("DOMContentLoaded",$):$()}let b=window.__unocss_runtime=window.__unocss_runtime={version:p.version,uno:p,async extract(f){typeof f!="string"&&(f.forEach(x=>c.add(x)),f=""),await l(f)},extractAll:h,inspect(f){a=f},toggleObserver(f){f===void 0?i=!i:i=!!f,!S&&!i&&m()}};((w=r==null?void 0:r.ready)==null?void 0:w.call(r,b))!==!1&&(i=!1,m())}X();})();
|