UNPKG

@nuxt/devtools

Version:

<a href="https://devtools.nuxt.com"><img width="1200" alt="Nuxt DevTools" src="https://github-production-user-asset-6210df.s3.amazonaws.com/904724/261577617-a10567bd-ad33-48cc-9bda-9e37dbe1929f.png"></a> <br>

3 lines (2 loc) 32.7 kB
import{$ as Oe}from"./Bysyzw-g.js";function Ee(t){const e=t.length;let n=-1,s,r="";const i=t.charCodeAt(0);for(;++n<e;){if(s=t.charCodeAt(n),s===0){r+="�";continue}if(s===37){r+="\\%";continue}if(s===44){r+="\\,";continue}if(s>=1&&s<=31||s===127||n===0&&s>=48&&s<=57||n===1&&s>=48&&s<=57&&i===45){r+=`\\${s.toString(16)} `;continue}if(n===0&&e===1&&s===45){r+=`\\${t.charAt(n)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}const K=Ee;function L(t=[]){return Array.isArray(t)?t:[t]}function I(t){return Array.from(new Set(t))}function te(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function k(t){return typeof t=="string"}function B(t){return k(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ke(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>B(e)):[t]:[B(t)]}function je(t){return t.filter(([e,n],s)=>{if(e.startsWith("$$"))return!1;for(let r=s-1;r>=0;r--)if(t[r][0]===e&&t[r][1]===n)return!1;return!0})}function X(t){return t==null?"":je(t).map(([e,n])=>n!=null&&typeof n!="function"?`${e}:${n};`:void 0).filter(Boolean).join("")}function U(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ge(t,e,n=!1){const s=t,r=e;if(Array.isArray(r))return n&&Array.isArray(r)?[...s,...r]:[...r];const i={...s};return U(s)&&U(r)&&Object.keys(r).forEach(o=>{U(s[o])&&U(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ge(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function G(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?G(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:G(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?G(s):s;return n}return t}function Le(t){return k(t[0])}function Pe(t){return k(t[0])}function Fe(t){return typeof t=="function"?{match:t}:t}function ne(t){return t.length===3}function re(t){return t!=null}function Te(){}var ze=Object.defineProperty,Ie=(t,e,n)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ne=(t,e,n)=>(Ie(t,e+"",n),n);class De{constructor(){Ne(this,"_map",new Map)}get(e,n){const s=this._map.get(e);if(s)return s.get(n)}getFallback(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(n)||r.set(n,s),r.get(n)}set(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(n,s),this}has(e,n){return this._map.get(e)?.has(n)}delete(e,n){return this._map.get(e)?.delete(n)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([n,s])=>Array.from(s.entries()).map(([r,i])=>e(i,n,r)))}}class Re extends Map{getFallback(e,n){const s=this.get(e);return s===void 0?(this.set(e,n),n):s}map(e){const n=[];return this.forEach((s,r)=>{n.push(e(s,r))}),n}flatMap(e){const n=[];return this.forEach((s,r)=>{n.push(...e(s,r))}),n}}var Ve=Object.defineProperty,Be=(t,e,n)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ue=(t,e,n)=>(Be(t,e+"",n),n);class ye extends Set{constructor(e){super(e),Ue(this,"_map"),this._map??(this._map=new Map)}add(e){return this._map??(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,n){return this._map.set(e,n),super.add(e)}}function Z(t){return t instanceof ye}const H={};function He(t=["-",":"]){const e=t.join("|");return H[e]||(H[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),H[e].lastIndex=0,H[e]}function Ge(t,e=["-",":"],n=5){const s=He(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(u,c,h,y,v)=>{if(!e.includes(h))return u;r=!0,o.add(c+h);const _=v+c.length+h.length+1,g={length:u.length,items:[]};a.set(v,g);for(const p of[...y.matchAll(/\S+/g)]){const M=_+p.index;let m=a.get(M)?.items;m?a.delete(M):m=[{offset:M,length:p[0].length,className:p[0]}];for(const d of m)d.className=d.className==="~"?c:d.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),g.items.push(d)}return"$".repeat(u.length)}),n-=1;while(r&&n);let l;if(typeof t=="string"){l="";let u=0;for(const[c,h]of a)l+=t.slice(u,c),l+=h.items.map(y=>y.className).join(" "),u=c+h.length;l+=t.slice(u)}else{l=t;for(const[u,c]of a)l.overwrite(u,u+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return l.toString()}}}function We(t,e=["-",":"],n=5){const s=Ge(t,e,n);return typeof t=="string"?s.expanded:t}const se=new Set;function we(t){se.has(t)||(console.warn("[unocss]",t),se.add(t))}const Ye=/[\\:]?[\s'"`;{}]+/g;function qe(t){return t.split(Ye)}const Ke={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return qe(t)}};function Xe(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}}}const W="default",Q="preflights",Ze="shortcuts",Je="imports",Qe={[Je]:-200,[Q]:-100,[Ze]:-10,[W]:0};function ve(t){return L(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ie="_uno_resolved";function et(t){let e=typeof t=="function"?t():t;if(ie in e)return e;e={...e},Object.defineProperty(e,ie,{value:!0,enumerable:!1});const n=e.shortcuts?ve(e.shortcuts):void 0;if(e.shortcuts=n,e.prefix||e.layer){const s=r=>{r[2]||(r[2]={});const i=r[2];i.prefix==null&&e.prefix&&(i.prefix=L(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function be(t){const e=et(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(L).flatMap(be);return[e,...n]}function tt(t){if(t.length===0)return{};const e=[],n=[];let s=!1;for(const r of t)r.pipeline===!1?s=!0:(e.push(r.pipeline?.include??[]),n.push(r.pipeline?.exclude??[]));return{filesystem:I(t.flatMap(r=>r.filesystem??[])),inline:I(t.flatMap(r=>r.inline??[])),plain:I(t.flatMap(r=>r.plain??[])),pipeline:s?!1:{include:I(ae(...e)),exclude:I(ae(...n))}}}function oe(t={},e={}){const n=Object.assign({},e,t),s=te((n.presets||[]).flatMap(L).flatMap(be),(f,w)=>f.name===w.name),r=[...s.filter(f=>f.enforce==="pre"),...s.filter(f=>!f.enforce),...s.filter(f=>f.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},Qe,...i.map(f=>f.layers));function l(f){return I(i.flatMap(w=>L(w[f]||[])))}const u=l("extractors");let c=o.find(f=>f.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=Ke),c&&!u.includes(c)&&u.unshift(c),u.sort((f,w)=>(f.order||0)-(w.order||0));const h=l("rules"),y={},v=h.length,_=h.map((f,w)=>{if(Le(f)){L(f[2]?.prefix||"").forEach(E=>{y[E+f[0]]=[w,f[1],f[2],f]});return}return[w,...f]}).filter(Boolean).reverse();let g=nt(i.map(f=>f.theme));const p=l("extendTheme");for(const f of p)g=f(g)||g;const M={templates:I(i.flatMap(f=>L(f.autocomplete?.templates))),extractors:i.flatMap(f=>L(f.autocomplete?.extractors)).sort((f,w)=>(f.order||0)-(w.order||0)),shorthands:rt(i.map(f=>f.autocomplete?.shorthands||{}))};let m=l("separators");m.length||(m=[":","-"]);const d=l("content"),x=tt(d),S={mergeSelectors:!0,warn:!0,sortLayers:f=>f,...n,blocklist:l("blocklist"),presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:g,rulesSize:v,rulesDynamic:_,rulesStaticMap:y,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:M,variants:l("variants").map(Fe).sort((f,w)=>(f.order||0)-(w.order||0)),shortcuts:ve(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:m,details:n.details??n.envMode==="dev",content:x,transformers:te(l("transformers"),(f,w)=>f.name===w.name)};for(const f of i)f?.configResolved?.(S);return S}function nt(t){return t.map(e=>e?G(e):{}).reduce((e,n)=>ge(e,n),{})}function rt(t){return t.reduce((e,n)=>{const s={};for(const r in n){const i=n[r];Array.isArray(i)?s[r]=`(${i.join("|")})`:s[r]=i}return{...e,...s}},{})}function ae(...t){return t.flatMap(st)}function st(t){return Array.isArray(t)?t:t?[t]:[]}const it="0.62.3";var ot=Object.defineProperty,at=(t,e,n)=>e in t?ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(at(t,typeof e!="symbol"?e+"":e,n),n);const V={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"};class ct{constructor(e={},n={}){this.userConfig=e,this.defaults=n,R(this,"version",it),R(this,"_cache",new Map),R(this,"config"),R(this,"blocked",new Set),R(this,"parentOrders",new Map),R(this,"events",Xe()),this.config=oe(e,n),this.events.emit("config",this.config)}setConfig(e,n){e&&(n&&(this.defaults=n),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=oe(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,n,s=new Set){const r={original:e,code:e,id:n,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const o=await i.extract?.(r);if(o)if(Z(o)&&Z(s))for(const a of o)s.setCount(a,s.getCount(a)+o.getCount(a));else for(const a of o)s.add(a)}return s}makeContext(e,n){const s={rawSelector:e,currentSelector:n[1],theme:this.config.theme,generator:this,symbols:V,variantHandlers:n[2],constructCSS:(...r)=>this.constructCustomCSS(s,...r),variantMatch:n};return s}async parseToken(e,n){if(this.blocked.has(e))return;const s=`${e}${n?` ${n}`:""}`;if(this._cache.has(s))return this._cache.get(s);let r=e;for(const u of this.config.preprocess)r=u(e);if(this.isBlocked(r)){this.blocked.add(e),this._cache.set(s,null);return}const i=await this.matchVariants(e,r);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(s,null);return}const o=this.makeContext(e,[n||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);const a=await this.expandShortcut(o.currentSelector,o),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(re);if(l?.length)return this._cache.set(s,l),l;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=n,u=this.config.outputToCssLayers,c=k(e)?await this.applyExtractors(e,s,l?new ye:new Set):Array.isArray(e)?new Set(e):e;if(o){const S={generator:this,theme:this.config.theme};this.config.safelist.flatMap(f=>typeof f=="function"?f(S):f).forEach(f=>{c.has(f)||c.add(f)})}const h=a?"":` `,y=new Set([W]),v=l?new Map:new Set,_=new Map;let g={};const p=Array.from(c).map(async S=>{if(v.has(S))return;const f=await this.parseToken(S);if(f!=null){v instanceof Map?v.set(S,{data:f,count:Z(c)?c.getCount(S):-1}):v.add(S);for(const w of f){const A=w[3]||"",E=w[4]?.layer;_.has(A)||_.set(A,[]),_.get(A).push(w),E&&y.add(E)}}});await Promise.all(p),await(async()=>{if(!i)return;const S={generator:this,theme:this.config.theme},f=new Set([]);this.config.preflights.forEach(({layer:w=Q})=>{y.add(w),f.add(w)}),g=Object.fromEntries(await Promise.all(Array.from(f).map(async w=>{const E=(await Promise.all(this.config.preflights.filter(P=>(P.layer||Q)===w).map(async P=>await P.getCSS(S)))).filter(Boolean).join(h);return[w,E]})))})();const M=this.config.sortLayers(Array.from(y).sort((S,f)=>(this.config.layers[S]??0)-(this.config.layers[f]??0)||S.localeCompare(f))),m={},d=(S=W)=>{if(m[S])return m[S];let f=Array.from(_).sort((A,E)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(E[0])??0)||A[0]?.localeCompare(E[0]||"")||0).map(([A,E])=>{const P=E.length,T=E.filter(b=>(b[4]?.layer||W)===S).sort((b,C)=>b[0]-C[0]||(b[4]?.sort||0)-(C[4]?.sort||0)||b[5]?.currentSelector?.localeCompare(C[5]?.currentSelector??"")||b[1]?.localeCompare(C[1]||"")||b[2]?.localeCompare(C[2]||"")||0).map(([,b,C,,O,,j])=>[[[(b&&ut(b,r))??"",O?.sort??0]],C,!!(j??O?.noMerge)]);if(!T.length)return;const z=T.reverse().map(([b,C,O],j)=>{if(!O&&this.config.mergeSelectors)for(let D=j+1;D<P;D++){const F=T[D];if(F&&!F[2]&&(b&&F[0]||b==null&&F[0]==null)&&F[1]===C)return b&&F[0]&&F[0].push(...b),null}const N=b?I(b.sort((D,F)=>D[1]-F[1]||D[0]?.localeCompare(F[0]||"")||0).map(D=>D[0]).filter(Boolean)):[];return N.length?`${N.join(`,${h}`)}{${C}}`:C}).filter(Boolean).reverse().join(h);if(!A)return z;const $=A.split(" $$ ");return`${$.join("{")}{${h}${z}${h}${"}".repeat($.length)}`}).filter(Boolean).join(h);if(i&&(f=[g[S],f].filter(Boolean).join(h)),u&&f){let A=typeof u=="object"?u.cssLayerName?.(S):void 0;A!==null&&(A||(A=S),f=`@layer ${A}{${h}${f}${h}}`)}const w=a?"":`/* layer: ${S} */${h}`;return m[S]=f?w+f:""},x=(S=M,f)=>S.filter(w=>!f?.includes(w)).map(w=>d(w)||"").filter(Boolean).join(h);return{get css(){return x()},layers:M,matched:v,getLayers:x,getLayer:d}}async matchVariants(e,n){const s=new Set,r=[];let i=n||e,o=!0;const a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(const l of this.config.variants){if(!l.multiPass&&s.has(l))continue;let u=await l.match(i,a);if(u){if(k(u)){if(u===i)continue;u={matcher:u}}i=u.matcher??i,r.unshift(u),s.add(l),o=!0;break}}if(!o)break;if(r.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,r,s]}applyVariants(e,n=e[4],s=e[1]){const i=n.slice().sort((u,c)=>(u.order||0)-(c.order||0)).reduceRight((u,c)=>h=>{const y=c.body?.(h.entries)||h.entries,v=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??pt)({...h,entries:y,selector:c.selector?.(h.selector,y)||h.selector,parent:v[0]||h.parent,parentOrder:v[1]||h.parentOrder,layer:c.layer||h.layer,sort:c.sort||h.sort},u)},u=>u)({prefix:"",selector:ht(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);const l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const u of this.config.postprocess)u(l);return l}constructCustomCSS(e,n,s){const r=B(n);if(k(r))return r;const{selector:i,entries:o,parent:a}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),l=`${i}{${X(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,n,s=!1,r){const[i,o,a]=k(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const l=this.config.rulesStaticMap[o];if(l&&l[1]&&(s||!l[2]?.internal)){this.config.details&&n.rules.push(l[3]);const c=l[0],h=B(l[1]),y=l[2];return k(h)?[[c,h,y]]:[[c,i,h,y,a]]}n.variantHandlers=a;const{rulesDynamic:u}=this.config;for(const[c,h,y,v]of u){if(v?.internal&&!s)continue;let _=o;if(v?.prefix){const m=L(v.prefix);if(r){const d=L(r);if(!m.some(x=>d.includes(x)))continue}else{const d=m.find(x=>o.startsWith(x));if(d==null)continue;_=o.slice(d.length)}}const g=_.match(h);if(!g)continue;let p=await y(g,n);if(!p)continue;if(this.config.details&&n.rules.push([h,y,v]),typeof p!="string")if(Symbol.asyncIterator in p){const m=[];for await(const d of p)d&&m.push(d);p=m}else Symbol.iterator in p&&!Array.isArray(p)&&(p=Array.from(p).filter(re));const M=ke(p).filter(m=>m.length);if(M.length)return M.map(m=>{if(k(m))return[c,m,v];let d=a;for(const x of m)x[0]===V.variants?d=[...L(x[1]),...d]:x[0]===V.parent?d=[{parent:x[1]},...d]:x[0]===V.selector&&(d=[{selector:x[1]},...d]);return[c,i,m,v,d]})}}stringifyUtil(e,n){if(!e)return;if(ne(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?n:void 0,void 0];const{selector:s,entries:r,parent:i,layer:o,sort:a,noMerge:l}=this.applyVariants(e),u=X(r);if(!u)return;const{layer:c,sort:h,...y}=e[3]??{},v={...y,layer:o??c,sort:a??h};return[e[0],s,u,i,v,this.config.details?n:void 0,l]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?a=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(a)}:Te;let i,o;for(const a of this.config.shortcuts){let l=e;if(a[2]?.prefix){const c=L(a[2].prefix).find(h=>e.startsWith(h));if(c==null)continue;l=e.slice(c.length)}if(Pe(a)){if(a[0]===l){i=i||a[2],o=a[1],r(a);break}}else{const u=l.match(a[0]);if(u&&(o=a[1](u,n)),o){i=i||a[2],r(a);break}}}if(o&&(o=L(o).map(a=>k(a)?We(a.trim()).split(/\s+/g):a).flat()),!o){const[a,l]=k(e)?await this.matchVariants(e):e;if(a!==l){const u=await this.expandShortcut(l,n,s-1);u&&(o=u[0].map(c=>k(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(k(a)?(await this.expandShortcut(a,n,s-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,n,s,r={layer:this.config.shortcutsLayer}){const i=new Re,o=(await Promise.all(I(s).map(async c=>{const h=k(c)?await this.parseUtil(c,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",B(c),void 0,[]]];return!h&&this.config.warn&&we(`unmatched utility "${c}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((c,h)=>c[0]-h[0]),[a,,l]=e,u=[];for(const c of o){if(ne(c)){u.push([c[0],void 0,c[1],void 0,c[2],n,void 0]);continue}const{selector:h,entries:y,parent:v,sort:_,noMerge:g,layer:p}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(p??r.layer,new De).getFallback(h,v,[[],c[0]])[0].push([y,!!(g??c[3]?.noMerge),_??0])}return u.concat(i.flatMap((c,h)=>c.map(([y,v],_,g)=>{const p=(m,d,x)=>{const S=Math.max(...x.map(w=>w[1])),f=x.map(w=>w[0]);return(m?[f.flat(1)]:f).map(w=>{const A=X(w);if(A)return[v,_,A,g,{...r,noMerge:d,sort:S,layer:h},n,void 0]})};return[[y.filter(([,m])=>m).map(([m,,d])=>[m,d]),!0],[y.filter(([,m])=>!m).map(([m,,d])=>[m,d]),!1]].map(([m,d])=>[...p(!1,d,m.filter(([x])=>x.some(S=>S[0]===V.shortcutsNoMerge))),...p(!0,d,m.filter(([x])=>x.every(S=>S[0]!==V.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(n=>Array.isArray(n)?n[0]:n).some(n=>typeof n=="function"?n(e):k(n)?n===e:n.test(e))}getBlocked(e){const n=this.config.blocklist.find(s=>{const r=Array.isArray(s)?s[0]:s;return typeof r=="function"?r(e):k(r)?r===e:r.test(e)});return n?Array.isArray(n)?n:[n,void 0]:void 0}}function lt(t,e){return new ct(t,e)}const Se=/\s\$\$\s+/g;function ft(t){return Se.test(t)}function ut(t,e){return ft(t)?t.replace(Se,e?` ${e} `:" "):e?`${e} ${t}`:t}const ce=/^\[(.+?)(~?=)"(.*)"\]$/;function ht(t){return ce.test(t)?t.replace(ce,(e,n,s,r)=>`[${K(n)}${s}"${K(r)}"]`):`.${K(t)}`}function pt(t,e){return e(t)}var le={};const dt=Object.freeze({left:0,top:0,width:16,height:16}),Y=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xe=Object.freeze({...dt,...Y}),mt=Object.freeze({...xe,body:"",hidden:!1}),gt=Object.freeze({width:null,height:null}),$e=Object.freeze({...gt,...Y});function yt(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function fe(t,e){const n=yt(t,e);for(const s in mt)s in Y?s in t&&!(s in n)&&(n[s]=Y[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function wt(t,e){const n=t.icons,s=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const a=s[o]&&s[o].parent,l=a&&i(a);l&&(r[o]=[a].concat(l))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function ue(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(a){i=fe(s[a]||r[a],i)}return o(e),n.forEach(o),fe(t,i)}function vt(t,e){if(t.icons[e])return ue(t,e,[]);const n=wt(t,[e])[e];return n?ue(t,e,n):null}const bt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,St=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function q(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(bt);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=St.test(i);for(;;){if(o){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*e*n)/n)}else r.push(i);if(i=s.shift(),i===void 0)return r.join("");o=!o}}function xt(t,e="defs"){let n="";const s=t.indexOf("<"+e);for(;s>=0;){const r=t.indexOf(">",s),i=t.indexOf("</"+e);if(r===-1||i===-1)break;const o=t.indexOf(">",i);if(o===-1)break;n+=t.slice(r+1,i).trim(),t=t.slice(0,s).trim()+t.slice(o+1)}return{defs:n,content:t}}function $t(t,e){return t?"<defs>"+t+"</defs>"+e:e}function _t(t,e,n){const s=xt(t);return $t(s.defs,e+s.content+n)}const ee=t=>t==="unset"||t==="undefined"||t==="none";function Ct(t,e){const n={...xe,...t},s={...$e,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(g=>{const p=[],M=g.hFlip,m=g.vFlip;let d=g.rotate;M?m?d+=2:(p.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),p.push("scale(-1 1)"),r.top=r.left=0):m&&(p.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),p.push("scale(1 -1)"),r.top=r.left=0);let x;switch(d<0&&(d-=Math.floor(d/4)*4),d=d%4,d){case 1:x=r.height/2+r.top,p.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:p.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,p.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}d%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),p.length&&(i=_t(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const o=s.width,a=s.height,l=r.width,u=r.height;let c,h;o===null?(h=a===null?"1em":a==="auto"?u:a,c=q(h,l/u)):(c=o==="auto"?l:o,h=a===null?q(c,u/l):a==="auto"?u:a);const y={},v=(g,p)=>{ee(p)||(y[g]=p.toString())};v("width",c),v("height",h);const _=[r.left,r.top,l,u];return y.viewBox=_.join(" "),{attributes:y,viewBox:_,body:i}}function At(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mt(t){let e=t.startsWith("<svg>")?t.replace("<svg>","<svg >"):t;return!e.includes(" xmlns:xlink=")&&e.includes(" xlink:")&&(e=e.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),e.includes(" xmlns=")||(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),At(e)}function Ot(t){return t.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').replace(/(\s)+\/>/g,"/>").trim()}const Et=/\swidth\s*=\s*["']([\w.]+)["']/,kt=/\sheight\s*=\s*["']([\w.]+)["']/,J=/<svg\s+/;function jt(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const a=o.exec(s),l=a!=null,u=e[i];return!u&&!ee(u)&&(typeof n=="number"?n>0&&(e[i]=q(a?.[1]??"1em",n)):a&&(e[i]=a[1])),l};return[r("width",Et),r("height",kt)]}async function _e(t,e,n,s,r,i){const{scale:o,addXmlNs:a=!1}=s??{},{additionalProps:l={},iconCustomizer:u}=s?.customizations??{},c=await r?.()??{};await u?.(e,n,c),Object.keys(l).forEach(g=>{const p=l[g];p!=null&&(c[g]=p)}),i?.(c);const[h,y]=jt(t,c,o);a&&(!t.includes("xmlns=")&&!c.xmlns&&(c.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!c["xmlns:xlink"]&&(c["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const v=Object.keys(c).map(g=>g==="width"&&h||g==="height"&&y?null:`${g}="${c[g]}"`).filter(g=>g!=null);if(v.length&&(t=t.replace(J,`<svg ${v.join(" ")} `)),s){const{defaultStyle:g,defaultClass:p}=s;p&&!t.includes("class=")&&(t=t.replace(J,`<svg class="${p}" `)),g&&!t.includes("style=")&&(t=t.replace(J,`<svg style="${g}" `))}const _=s?.usedProps;return _&&(Object.keys(l).forEach(g=>{const p=c[g];p!=null&&(_[g]=p)}),typeof c.width<"u"&&c.width!==null&&(_.width=c.width),typeof c.height<"u"&&c.height!==null&&(_.height=c.height)),t}async function he(t,e,n,s){let r;try{if(typeof t=="function")r=await t(n);else{const i=t[n];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${n}" in "${e}":`,i);return}if(r){const i=r.indexOf("<svg");i>0&&(r=r.slice(i));const{transform:o}=s?.customizations??{};return r=typeof o=="function"?await o(r,e,n):r,r.startsWith("<svg")?await _e(s?.customizations?.trimCustomSvg===!0?Ot(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function Ce(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=vt(t,o),r){let a={...$e};typeof i=="function"&&(r=Object.assign({},r),a=i(a,r,`${e}:${o}`)??a);const{attributes:{width:l,height:u,...c},body:h}=Ct(r,a),y=s?.scale;return await _e(`<svg >${h}</svg>`,e,o,s,()=>({...c}),v=>{const _=(g,p)=>{const M=v[g];let m;if(!ee(M)){if(M)return;typeof y=="number"?y&&(m=q(p??"1em",y)):m=p}m?v[g]=m:delete v[g]};_("width",l),_("height",u)})}}const Ae=async(t,e,n)=>{const s=n?.customCollections?.[t];if(s)if(typeof s=="function"){let r;try{r=await s(e)}catch(i){console.warn(`Failed to load custom icon "${e}" in "${t}":`,i);return}if(r){if(typeof r=="string")return await he(()=>r,t,e,n);if("icons"in r){const i=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await Ce(r,t,i,n)}}}else return await he(s,t,e,n)};function Lt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Pt=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","catppuccin","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","f7","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","hugeicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide-lab","lucide","mage","majesticons","maki","map","marketeq","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","rivet-icons","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","weui","whh","wi","wpf","zmdi","zondicons"];const Ft=Lt(Pt),Tt=3;function zt(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:a={},customizations:l={},autoInstall:u=!1,collectionsNodeResolvePath:c,layer:h="icons",unit:y,processor:v}=e,_=It(),g={addXmlNs:!0,scale:n,customCollections:o,autoInstall:u,cwd:c,warn:void 0,customizations:{...l,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(M,m,d){await l.iconCustomizer?.(M,m,d),y&&(d.width||(d.width=`${n}${y}`),d.height||(d.height=`${n}${y}`))}}};let p;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async M=>{let[m,d,x=s]=M,S="",f="",w;p=p||await t(e);const A={};if(d.includes(":"))[S,f]=d.split(":"),w=await p(S,f,{...g,usedProps:A});else{const T=d.split(/-/g);for(let z=Tt;z>=1&&(S=T.slice(0,z).join("-"),f=T.slice(z).join("-"),w=await p(S,f,{...g,usedProps:A}),!w);z--);}if(!w){i&&!_.isESLint&&we(`failed to load icon "${m}"`);return}let E;const P=`url("data:image/svg+xml;utf8,${Mt(w)}")`;return x==="auto"&&(x=w.includes("currentColor")?"mask":"bg"),x==="mask"?E={"--un-icon":P,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...A}:E={background:`${P} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...A},v?.(E,{collection:S,icon:f,svg:w,mode:x}),E},{layer:h,prefix:r}]]}}}function Me(t,e){const n=new Map;function s(r){if(Ft.includes(r))return n.has(r)||n.set(r,t(`${e}@iconify-json/${r}/icons.json`)),n.get(r)}return async(r,i,o)=>{let a=await Ae(r,i,o);if(a)return a;const l=await s(r);if(l){const u=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await Ce(l,r,u,o)}return a}}function It(){const t=typeof process<"u"&&process.stdout&&!process.versions.deno,e=t&&!!le.VSCODE_CWD,n=t&&!!le.ESLINT;return{isNode:t,isVSCode:e,isESLint:n}}function Nt(t){return Me(Oe,t)}const Dt=zt(async t=>{const e=t?.customFetch,n=t?.cdn;return e&&n?Me(e,n):n?Nt(n):Ae});function Rt(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function pe(t){return t.charAt(0).toUpperCase()+t.slice(1)}function de(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var me=["Webkit","Moz","ms"];function Vt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=Rt(s);if(i!=="filter"&&i in t)return e[s]=de(i);i=pe(i);for(let o=0;o<me.length;o++){const a=`${me[o]}${i}`;if(a in t)return e[s]=de(pe(a))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function Bt(t){return t.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}function Ut(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,n=window.document,s=()=>n.documentElement,r=e.__unocss||{},i=Object.assign({},t,r.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=L(o.postprocess)).unshift(Vt(n.createElement("div").style)),i.configResolved?.(r,o);const l=lt(r,o),u=$=>i.inject?i.inject($):s().prepend($),c=()=>i.rootElement?i.rootElement():n.body,h=new Map;let y=!0;const v=new Set;let _,g,p=[];const M=()=>new Promise($=>{p.push($),g!=null&&clearTimeout(g),g=setTimeout(()=>x().then(()=>{const b=p;p=[],b.forEach(C=>C())}),0)});function m($,b=!1){if($.nodeType!==1)return;const C=$;C.hasAttribute(a)&&C.removeAttribute(a),b&&C.querySelectorAll(`[${a}]`).forEach(O=>{O.removeAttribute(a)})}function d($,b){let C=h.get($);if(!C)if(C=n.createElement("style"),C.setAttribute("data-unocss-runtime-layer",$),h.set($,C),b==null)u(C);else{const O=d(b),j=O.parentNode;j?j.insertBefore(C,O.nextSibling):u(C)}return C}async function x(){const $=[...v],b=await l.generate($);return b.layers.reduce((O,j)=>(d(j,O).innerHTML=b.getLayer(j)??"",j),void 0),$.filter(O=>!b.matched.has(O)).forEach(O=>v.delete(O)),{...b,getStyleElement:O=>h.get(O),getStyleElements:()=>h}}async function S($){const b=v.size;await l.applyExtractors($,void 0,v),b!==v.size&&await M()}async function f($=c()){const b=$&&$.outerHTML;b&&(await S(`${b} ${Bt(b)}`),m(s()),m($,!0))}const w=new MutationObserver($=>{y||$.forEach(async b=>{if(b.target.nodeType!==1)return;const C=b.target;for(const O of h)if(C===O[1])return;if(b.type==="childList")b.addedNodes.forEach(async O=>{if(O.nodeType!==1)return;const j=O;_&&!_(j)||(await S(j.outerHTML),m(j))});else{if(_&&!_(C))return;if(b.attributeName!==a){const O=Array.from(C.attributes).map(N=>N.value?`${N.name}="${N.value}"`:N.name).join(" "),j=`<${C.tagName.toLowerCase()} ${O}>`;await S(j)}m(C)}})});let A=!1;function E(){if(A)return;const $=i.observer?.target?i.observer.target():c();$&&(w.observe($,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),A=!0)}function P(){i.bypassDefined&&Ht(l.blocked),f(),E()}function T(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",P):P()}const z=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract($){k($)||($.forEach(b=>v.add(b)),$=""),await S($)},extractAll:f,inspect($){_=$},toggleObserver($){$===void 0?y=!y:y=!!$,!A&&!y&&T()},update:x,presets:e.__unocss_runtime?.presets??{}};i.ready?.(z)!==!1&&(y=!1,T())}function Ht(t=new Set){for(let e=0;e<document.styleSheets.length;e++){const n=document.styleSheets[e];let s;try{if(s=n.cssRules||n.rules,!s)continue;Array.from(s).flatMap(r=>r.selectorText?.split(/,/g)||[]).forEach(r=>{r&&(r=r.trim(),r.startsWith(".")&&(r=r.slice(1)),t.add(r))})}catch{continue}}return t}Ut({defaults:{presets:[Dt({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});