@unocss/runtime 0.54.3 → 0.55.1

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