@unocss/runtime 0.48.2 → 0.48.4
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 be(t){let e=t.length,r=-1,n,s="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.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&&e===1&&n===45){s+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=t.charAt(r);continue}s+=`\\${t.charAt(r)}`}return s}var K=be;function w(t=[]){return Array.isArray(t)?t:[t]}function L(t){return Array.from(new Set(t))}function v(t){return typeof t=="string"}function j(t){return v(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ee(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>j(e)):[t]:[j(t)]}function Re(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(t[s][0]===e&&t[s][1]===r)return!1;return!0})}function F(t){return t==null?"":Re(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function H(t){return t&&typeof t=="object"&&!Array.isArray(t)}function W(t,e){let r=t,n=e;if(Array.isArray(r))return[...n];let s={...r};return H(r)&&H(n)&&Object.keys(n).forEach(i=>{H(r[i])&&H(n[i])||Array.isArray(r[i])&&Array.isArray(n[i])?s[i]=W(r[i],n[i]):Object.assign(s,{[i]:n[i]})}),s}function k(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?k(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:k(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?k(n):n;return r}return t}function te(t){return v(t[0])}function re(t){return v(t[0])}var ve=/[\w\u00A0-\uFFFF-_:%-?]/,N="$$shortcut-no-merge";function ne(t=""){return ve.test(t)}function se(t){return typeof t=="function"?{match:t}:t}function Y(t){return t.length===3}function ie(t){return t!=null}function oe(){}var G=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(r)||s.set(r,n),s.get(r)}set(e,r,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.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(([s,i])=>e(i,r,s)))}};var ae=/((?:[!@\w+:_/-]|\[&?>?:?.*\])+?)([:-])\(((?:[~!\w\s:/\\,%#.$?-]|\[.*?\])+?)\)(?!\s*?=>)/gm;function ce(t,e=["-",":"],r=5){ae.lastIndex=0;let n=!1,s=t.toString();do{let i=s;s=s.replace(ae,(o,a,u,l)=>e.includes(u)?l.split(/\s/g).filter(Boolean).map(c=>c==="~"?a:c.replace(/^(!?)(.*)/,`$1${a}${u}$2`)).join(" "):o),n=s!==i,r-=1}while(n&&r);return typeof t=="string"?s:t.length()?t.overwrite(0,t.length(),s):t}var le=new Set;function ue(t){le.has(t)||(console.warn("[unocss]",t),le.add(t))}var Ae=/\\?[\s'"`;{}]+/g,q=/\[(\\\W|[\w-])+:['"]?\S+?['"]?\]/g,Ue=new RegExp(`^${q.source}$`),we=t=>{let e=new Set;for(let r of t.matchAll(q))!t[r.index-1]?.match(/^[\s'"`]/)||e.add(r[0]);return t.split(Ae).forEach(r=>{ne(r)&&!Ue.test(r)&&e.add(r)}),[...e]},Z={name:"split",order:0,extract({code:t}){return we(t)}};function fe(){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 B="default",z="preflights",$e="shortcuts",pe={[z]:-100,[$e]:-10,[B]:0};function de(t){return w(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}function Ve(t){let e=t.shortcuts?de(t.shortcuts):void 0;if(t.shortcuts=e,t.prefix||t.layer){let r=n=>{n[2]||(n[2]={});let s=n[2];s.prefix==null&&t.prefix&&(s.prefix=w(t.prefix)),s.layer==null&&t.layer&&(s.layer=t.layer)};e?.forEach(r),t.rules?.forEach(r)}return t}function J(t={},e={}){let r=Object.assign({},e,t),n=(r.presets||[]).flatMap(w).map(Ve),s=[...n.filter(f=>f.enforce==="pre"),...n.filter(f=>!f.enforce),...n.filter(f=>f.enforce==="post")],i=Object.assign(pe,...n.map(f=>f.layers),t.layers);function o(f){return L([...s.flatMap(E=>w(E[f]||[])),...w(r[f]||[])])}let a=o("extractors");a.length||a.push(Z),a.sort((f,E)=>(f.order||0)-(E.order||0));let u=o("rules"),l={},c=u.length,p=u.map((f,E)=>{if(te(f)){w(f[2]?.prefix||"").forEach(R=>{l[R+f[0]]=[E,f[1],f[2],f]});return}return[E,...f]}).filter(Boolean).reverse(),g=k([...s.map(f=>f.theme||{}),r.theme||{}].reduce((f,E)=>W(f,E),{}));o("extendTheme").forEach(f=>f(g));let S={templates:L(s.map(f=>w(f.autocomplete?.templates)).flat()),extractors:s.map(f=>w(f.autocomplete?.extractors)).flat().sort((f,E)=>(f.order||0)-(E.order||0))};return{mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:f=>f,...r,presets:s,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:i,theme:g,rulesSize:c,rulesDynamic:p,rulesStaticMap:l,preprocess:o("preprocess"),postprocess:o("postprocess"),preflights:o("preflights"),autocomplete:S,variants:o("variants").map(se),shortcuts:de(o("shortcuts")),extractors:a,safelist:o("safelist")}}var he="0.48.
|
|
1
|
+
"use strict";(()=>{function be(t){let e=t.length,r=-1,n,s="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.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&&e===1&&n===45){s+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=t.charAt(r);continue}s+=`\\${t.charAt(r)}`}return s}var K=be;function w(t=[]){return Array.isArray(t)?t:[t]}function L(t){return Array.from(new Set(t))}function v(t){return typeof t=="string"}function j(t){return v(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ee(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>j(e)):[t]:[j(t)]}function Re(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(t[s][0]===e&&t[s][1]===r)return!1;return!0})}function F(t){return t==null?"":Re(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function H(t){return t&&typeof t=="object"&&!Array.isArray(t)}function W(t,e){let r=t,n=e;if(Array.isArray(r))return[...n];let s={...r};return H(r)&&H(n)&&Object.keys(n).forEach(i=>{H(r[i])&&H(n[i])||Array.isArray(r[i])&&Array.isArray(n[i])?s[i]=W(r[i],n[i]):Object.assign(s,{[i]:n[i]})}),s}function k(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?k(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:k(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?k(n):n;return r}return t}function te(t){return v(t[0])}function re(t){return v(t[0])}var ve=/[\w\u00A0-\uFFFF-_:%-?]/,N="$$shortcut-no-merge";function ne(t=""){return ve.test(t)}function se(t){return typeof t=="function"?{match:t}:t}function Y(t){return t.length===3}function ie(t){return t!=null}function oe(){}var G=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(r)||s.set(r,n),s.get(r)}set(e,r,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.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(([s,i])=>e(i,r,s)))}};var ae=/((?:[!@\w+:_/-]|\[&?>?:?.*\])+?)([:-])\(((?:[~!\w\s:/\\,%#.$?-]|\[.*?\])+?)\)(?!\s*?=>)/gm;function ce(t,e=["-",":"],r=5){ae.lastIndex=0;let n=!1,s=t.toString();do{let i=s;s=s.replace(ae,(o,a,u,l)=>e.includes(u)?l.split(/\s/g).filter(Boolean).map(c=>c==="~"?a:c.replace(/^(!?)(.*)/,`$1${a}${u}$2`)).join(" "):o),n=s!==i,r-=1}while(n&&r);return typeof t=="string"?s:t.length()?t.overwrite(0,t.length(),s):t}var le=new Set;function ue(t){le.has(t)||(console.warn("[unocss]",t),le.add(t))}var Ae=/\\?[\s'"`;{}]+/g,q=/\[(\\\W|[\w-])+:['"]?\S+?['"]?\]/g,Ue=new RegExp(`^${q.source}$`),we=t=>{let e=new Set;for(let r of t.matchAll(q))!t[r.index-1]?.match(/^[\s'"`]/)||e.add(r[0]);return t.split(Ae).forEach(r=>{ne(r)&&!Ue.test(r)&&e.add(r)}),[...e]},Z={name:"split",order:0,extract({code:t}){return we(t)}};function fe(){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 B="default",z="preflights",$e="shortcuts",pe={[z]:-100,[$e]:-10,[B]:0};function de(t){return w(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}function Ve(t){let e=t.shortcuts?de(t.shortcuts):void 0;if(t.shortcuts=e,t.prefix||t.layer){let r=n=>{n[2]||(n[2]={});let s=n[2];s.prefix==null&&t.prefix&&(s.prefix=w(t.prefix)),s.layer==null&&t.layer&&(s.layer=t.layer)};e?.forEach(r),t.rules?.forEach(r)}return t}function J(t={},e={}){let r=Object.assign({},e,t),n=(r.presets||[]).flatMap(w).map(Ve),s=[...n.filter(f=>f.enforce==="pre"),...n.filter(f=>!f.enforce),...n.filter(f=>f.enforce==="post")],i=Object.assign(pe,...n.map(f=>f.layers),t.layers);function o(f){return L([...s.flatMap(E=>w(E[f]||[])),...w(r[f]||[])])}let a=o("extractors");a.length||a.push(Z),a.sort((f,E)=>(f.order||0)-(E.order||0));let u=o("rules"),l={},c=u.length,p=u.map((f,E)=>{if(te(f)){w(f[2]?.prefix||"").forEach(R=>{l[R+f[0]]=[E,f[1],f[2],f]});return}return[E,...f]}).filter(Boolean).reverse(),g=k([...s.map(f=>f.theme||{}),r.theme||{}].reduce((f,E)=>W(f,E),{}));o("extendTheme").forEach(f=>f(g));let S={templates:L(s.map(f=>w(f.autocomplete?.templates)).flat()),extractors:s.map(f=>w(f.autocomplete?.extractors)).flat().sort((f,E)=>(f.order||0)-(E.order||0))};return{mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:f=>f,...r,presets:s,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:i,theme:g,rulesSize:c,rulesDynamic:p,rulesStaticMap:l,preprocess:o("preprocess"),postprocess:o("postprocess"),preflights:o("preflights"),autocomplete:S,variants:o("variants").map(se),shortcuts:de(o("shortcuts")),extractors:a,safelist:o("safelist")}}var he="0.48.4";var Q=class{constructor(e={},r={}){this.userConfig=e;this.defaults=r;this.config=J(e,r),this.events.emit("config",this.config)}version=he;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=fe();setConfig(e,r){!e||(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=J(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let s={get original(){return e},code:e,id:r};for(let i of this.config.extractors){let o=await i.extract(s);if(o)for(let a of o)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:(...s)=>this.constructCustomCSS(n,...s),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 s=e;for(let l of this.config.preprocess)s=l(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(n,null);return}let i=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,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);let a=this.expandShortcut(o.currentSelector,o),u=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(l=>this.stringifyUtil(l,o)).filter(ie);if(u?.length)return this._cache.set(n,u),u;this._cache.set(n,null)}async generate(e,r={}){let{id:n,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1}=r,u=v(e)?await this.applyExtractors(e,n):Array.isArray(e)?new Set(e):e;o&&this.config.safelist.forEach(d=>u.add(d));let l=a?"":`
|
|
2
2
|
`,c=new Set([B]),p=new Set,g=new Map,S={},f=Array.from(u).map(async d=>{if(p.has(d))return;let C=await this.parseToken(d);if(C!=null){p.add(d);for(let y of C){let A=y[3]||"",$=y[4]?.layer;g.has(A)||g.set(A,[]),g.get(A).push(y),$&&c.add($)}}});await Promise.all(f),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},C=new Set([]);this.config.preflights.forEach(({layer:y=z})=>{c.add(y),C.add(y)}),S=Object.fromEntries(await Promise.all(Array.from(C).map(async y=>{let $=(await Promise.all(this.config.preflights.filter(_=>(_.layer||z)===y).map(async _=>await _.getCSS(d)))).filter(Boolean).join(l);return[y,$]})))})();let E=this.config.sortLayers(Array.from(c).sort((d,C)=>(this.config.layers[d]??0)-(this.config.layers[C]??0)||d.localeCompare(C))),T={},R=d=>{if(T[d])return T[d];let C=Array.from(g).sort((A,$)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get($[0])??0)||A[0]?.localeCompare($[0]||"")||0).map(([A,$])=>{let _=$.length,D=$.filter(m=>(m[4]?.layer||B)===d).sort((m,U)=>m[0]-U[0]||(m[4]?.sort||0)-(U[4]?.sort||0)||m[1]?.localeCompare(U[1]||"")||m[2]?.localeCompare(U[2]||"")||0).map(([,m,U,,V,,O])=>[[[(m&&Oe(m,s))??"",V?.sort??0]],U,!!(O??V?.noMerge)]);if(!D.length)return;let h=D.reverse().map(([m,U,V],O)=>{if(!V&&this.config.mergeSelectors)for(let P=O+1;P<_;P++){let M=D[P];if(M&&!M[2]&&(m&&M[0]||m==null&&M[0]==null)&&M[1]===U)return m&&M[0]&&M[0].push(...m),null}let I=m?L(m.sort((P,M)=>P[1]-M[1]||P[0]?.localeCompare(M[0]||"")||0).map(P=>P[0]).filter(Boolean)):[];return I.length?`${I.join(`,${l}`)}{${U}}`:U}).filter(Boolean).reverse().join(l);if(!A)return h;let x=A.split(" $$ ");return`${x.join("{")}{${l}${h}${l}}${x.map(m=>"").join("}")}`}).filter(Boolean).join(l);i&&(C=[S[d],C].filter(Boolean).join(l));let y=a?"":`/* layer: ${d} */${l}`;return T[d]=C?y+C:""},b=(d=E,C)=>d.filter(y=>!C?.includes(y)).map(y=>R(y)||"").filter(Boolean).join(l);return{get css(){return b()},layers:E,matched:p,getLayers:b,getLayer:R}}matchVariants(e,r){let n=new Set,s=[],i=r||e,o=!1,a={rawSelector:e,theme:this.config.theme,generator:this};for(;;){o=!1;for(let u of this.config.variants){if(!u.multiPass&&n.has(u))continue;let l=u.match(i,a);if(!!l){v(l)&&(l={matcher:l}),i=l.matcher,s.unshift(l),n.add(u),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,r=e[4],n=e[1]){let i=r.slice().sort((l,c)=>(l.order||0)-(c.order||0)).reduceRight((l,c)=>p=>{let g=c.body?.(p.entries)||p.entries,S=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??je)({...p,entries:g,selector:c.selector?.(p.selector,g)||p.selector,parent:S[0]||p.parent,parentOrder:S[1]||p.parentOrder,layer:c.layer||p.layer,sort:c.sort||p.sort},l)},l=>l)({prefix:"",selector:Le(n),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);let u={selector:Pe([i.prefix,i.selector,i.pseudo].join("")),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let l of this.config.postprocess)l(u);return u}constructCustomCSS(e,r,n){let s=j(r);if(v(s))return s;let{selector:i,entries:o,parent:a}=this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]),u=`${i}{${F(o)}}`;return a?`${a}{${u}}`:u}async parseUtil(e,r,n=!1,s){let[i,o,a]=v(e)?this.matchVariants(e):e;this.config.details&&(r.rules=r.rules??[]);let u=this.config.rulesStaticMap[o];if(u&&u[1]&&(n||!u[2]?.internal)){this.config.details&&r.rules.push(u[3]);let c=u[0],p=j(u[1]),g=u[2];return v(p)?[[c,p,g]]:[[c,i,p,g,a]]}r.variantHandlers=a;let{rulesDynamic:l}=this.config;for(let[c,p,g,S]of l){if(S?.internal&&!n)continue;let f=o;if(S?.prefix){let b=w(S.prefix);if(s){let d=w(s);if(!b.some(C=>d.includes(C)))continue}else{let d=b.find(C=>o.startsWith(C));if(d==null)continue;f=o.slice(d.length)}}let E=f.match(p);if(!E)continue;let T=await g(E,r);if(!T)continue;this.config.details&&r.rules.push([p,g,S]);let R=ee(T).filter(b=>b.length);if(R.length)return R.map(b=>v(b)?[c,b,S]:[c,i,b,S,a])}}stringifyUtil(e,r){if(!e)return;if(Y(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];let{selector:n,entries:s,parent:i,layer:o,sort:a,noMerge:u}=this.applyVariants(e),l=F(s);if(!l)return;let{layer:c,sort:p,...g}=e[3]??{},S={...g,layer:o??c,sort:a??p};return[e[0],n,l,i,S,this.config.details?r:void 0,u]}expandShortcut(e,r,n=5){if(n===0)return;let s=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:oe,i,o;for(let a of this.config.shortcuts){let u=e;if(a[2]?.prefix){let c=w(a[2].prefix).find(p=>e.startsWith(p));if(c==null)continue;u=e.slice(c.length)}if(re(a)){if(a[0]===u){i=i||a[2],o=a[1],s(a);break}}else{let l=u.match(a[0]);if(l&&(o=a[1](l,r)),o){i=i||a[2],s(a);break}}}if(v(o)&&(o=ce(o.trim()).split(/\s+/g)),!o){let[a,u]=v(e)?this.matchVariants(e):e;if(a!==u){let l=this.expandShortcut(u,r,n-1);l&&(o=l[0].map(c=>v(c)?a.replace(u,c):c))}}if(!!o)return[o.flatMap(a=>(v(a)?this.expandShortcut(a,r,n-1)?.[0]:void 0)||[a]).filter(Boolean),i]}async stringifyShortcuts(e,r,n,s={layer:this.config.shortcutsLayer}){let i=new G,o=(await Promise.all(L(n).map(async c=>{let p=v(c)?await this.parseUtil(c,r,!0,s.prefix):[[1/0,"{inline}",j(c),void 0,[]]];return p||ue(`unmatched utility "${c}" in shortcut "${e[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((c,p)=>c[0]-p[0]),[a,,u]=e,l=[];for(let c of o){if(Y(c)){l.push([c[0],void 0,c[1],void 0,c[2],r,void 0]);continue}let{selector:p,entries:g,parent:S,sort:f,noMerge:E}=this.applyVariants(c,[...c[4],...u],a);i.getFallback(p,S,[[],c[0]])[0].push([g,!!(E??c[3]?.noMerge),f??0])}return l.concat(i.map(([c,p],g,S)=>{let f=(T,R,b)=>{let d=Math.max(...b.map(y=>y[1])),C=b.map(y=>y[0]);return(T?[C.flat(1)]:C).map(y=>{let A=F(y);if(A)return[p,g,A,S,{...s,noMerge:R,sort:d},r,void 0]})};return[[c.filter(([,T])=>T).map(([T,,R])=>[T,R]),!0],[c.filter(([,T])=>!T).map(([T,,R])=>[T,R]),!1]].map(([T,R])=>[...f(!1,R,T.filter(([b])=>b.some(d=>d[0]===N))),...f(!0,R,T.filter(([b])=>b.every(d=>d[0]!==N)))])}).flat(2).filter(Boolean))}isBlocked(e){return!e||this.config.blocklist.some(r=>v(r)?r===e:r.test(e))}};function ge(t,e){return new Q(t,e)}var ye=/ \$\$ /,_e=t=>t.match(ye);function Oe(t,e){return _e(t)?t.replace(ye,e?` ${e} `:" "):e?`${e} ${t}`:t}function Pe(t){let e=t.match(/::[\w-]+(\([\w-]+\))?/g);if(e){for(let r of e)t=t.replace(r,"");t+=e.join("")}return t}var me=/^\[(.+?)(~?=)"(.*)"\]$/;function Le(t){return me.test(t)?t.replace(me,(e,r,n,s)=>`[${K(r)}${n}"${K(s)}"]`):`.${K(t)}`}function je(t,e){return e(t)}var De=t=>t.replace(/-(\w)/g,(e,r)=>r?r.toUpperCase():""),xe=t=>t.charAt(0).toUpperCase()+t.slice(1),Se=t=>t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase(),Ce=["Webkit","Moz","ms"];function Ee(t){let e={};function r(n){let s=e[n];if(s)return s;let i=De(n);if(i!=="filter"&&i in t)return e[n]=Se(i);i=xe(i);for(let o=0;o<Ce.length;o++){let a=`${Ce[o]}${i}`;if(a in t)return e[n]=Se(xe(a))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=r(s[0]))})}function Te(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function X(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,r=document,n=e.__unocss||{},s=Object.assign({},t,n.runtime),i=s.defaults||{},o=s.cloakAttribute??"un-cloak";s.autoPrefix&&(i.postprocess=w(i.postprocess)).unshift(Ee(r.createElement("div").style)),s.configResolved?.(n,i);let a=ge(n,i),u=!0,l=new Set,c,p,g,S=[],f=()=>new Promise(h=>{S.push(h),g!=null&&clearTimeout(g),g=setTimeout(()=>R().then(()=>{let x=S;S=[],x.forEach(m=>m())}),0)});function E(h){if(h.nodeType!==1)return;let x=h;x.hasAttribute(o)&&x.removeAttribute(o),x.querySelectorAll(`[${o}]`).forEach(m=>{m.removeAttribute(o)})}function T(){return c||(c=r.createElement("style"),r.documentElement.prepend(c)),c}async function R(){let h=await a.generate(l),x=T();return x.innerHTML=h.css,l=h.matched,{...h,styleElement:x}}async function b(h){let x=l.size;await a.applyExtractors(h,void 0,l),x!==l.size&&await f()}async function d(){let h=r.body,x=h&&h.outerHTML;x&&(await b(`${x} ${Te(x)}`),E(r.documentElement),E(h))}let C=new MutationObserver(h=>{u||h.forEach(async x=>{if(x.target.nodeType!==1)return;let m=x.target;if(m!==c)if(x.type==="childList")x.addedNodes.forEach(async U=>{if(U.nodeType!==1)return;let V=U;p&&!p(V)||(await b(V.outerHTML),E(V))});else{if(p&&!p(m))return;if(x.attributeName!==o){let U=Array.from(m.attributes).map(O=>O.value?`${O.name}="${O.value}"`:O.name).join(" "),V=`<${m.tagName.toLowerCase()} ${U}>`;await b(V)}m.hasAttribute(o)&&m.removeAttribute(o)}})}),y=!1;function A(){if(y)return;let h=r.documentElement||r.body;!h||(C.observe(h,{childList:!0,subtree:!0,attributes:!0}),y=!0)}function $(){d(),A()}function _(){r.readyState==="loading"?e.addEventListener("DOMContentLoaded",$):$()}let D=e.__unocss_runtime=e.__unocss_runtime={version:a.version,uno:a,async extract(h){v(h)||(h.forEach(x=>l.add(x)),h=""),await b(h)},extractAll:d,inspect(h){p=h},toggleObserver(h){h===void 0?u=!u:u=!!h,!y&&!u&&_()},update:R};s.ready?.(D)!==!1&&(u=!1,_())}X();})();
|