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