@unocss/runtime 66.7.0-beta.1 → 66.7.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 +1 -1
- package/core.global.js +1 -1
- package/full.global.js +1 -1
- package/mini.global.js +1 -1
- package/package.json +4 -4
- package/uno.global.js +1 -1
package/attributify.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Di=Object.defineProperty;var Vi=(t,e)=>{for(var r in e)Di(t,r,{get:e[r],enumerable:!0})};var Me="default",Fn="preflights",Gi="shortcuts",Hi="imports",qi={[Hi]:-200,[Fn]:-100,[Gi]:-10,[Me]:0},Oe=/[\\:]?[\s'"`;{}]+/g;function Yi(t){return t.split(Oe)}var Xi={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Yi(t)}};function j(t=[]){return Array.isArray(t)?t:[t]}function ct(t){return Array.from(new Set(t))}function An(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function F(t){return typeof t=="string"}var Bn=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Re(t){return t instanceof Bn}function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Pe=Z;function Ki(){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 Zi=/^\[(.+?)~?="(.*)"\]$/;var Ji=/[\w\u00A0-\uFFFF%-?]/;function Tn(t){return t.match(Zi)}function Ft(t=""){return Ji.test(t)}function Qi(t){return typeof t=="function"?{match:t}:t}function _n(t){return t.length===3}function Jt(t){return t!=null}function ta(){}var ea=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,o])=>t(o,e,n)))}},ra=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function re(t){return F(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function na(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>re(e)):[t]:[re(t)]}function oa(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}var ia="__virtual_key__";function Lt(t){return t==null?"":oa(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function Qt(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Wn(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Qt(n)&&Qt(o)&&Object.keys(o).forEach(a=>{Qt(n[a])&&Qt(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Wn(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function ee(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?ee(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:ee(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?ee(n):n;return r}return t}function aa(t){return F(t[0])}function sa(t){return F(t[0])}var te={};function ca(t=["-",":"]){let e=t.join("|");return te[e]||(te[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),te[e].lastIndex=0,te[e]}function la(t,e=["-",":"],r=5){let n=ca(e),o,i=t.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(l,u,d,p,h)=>{if(!e.includes(d))return l;o=!0,a.add(u+d);let m=h+u.length+d.length+1,x={length:l.length,items:[]};s.set(h,x);for(let $ of[...p.matchAll(/\S+/g)]){let w=m+$.index,g=s.get(w)?.items;g?s.delete(w):g=[{offset:w,length:$[0].length,className:$[0]}];for(let y of g)y.className=y.className==="~"?d===":"?`${u}${d}~`:u:y.className.replace(/^(!?)(.*)/,`$1${u}${d}$2`),x.items.push(y)}return"$".repeat(l.length)}),r-=1;while(o&&r);let c;if(typeof t=="string"){c="";let l=0;for(let[u,d]of s)c+=t.slice(l,u),c+=d.items.map(p=>p.className).join(" "),l=u+d.length;c+=t.slice(l)}else{c=t;for(let[l,u]of s)c.overwrite(l,l+u.length,u.items.map(d=>d.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function fa(t,e=["-",":"],r=5){let n=la(t,e,r);return typeof t=="string"?n.expanded:t}var Rn=new Set;function ua(t){Rn.has(t)||(console.warn("[unocss]",t),Rn.add(t))}function Nn(t){return j(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Pn="_uno_resolved";async function da(t){let e=typeof t=="function"?await t():await t;if(Pn in e)return e;e={...e},Object.defineProperty(e,Pn,{value:!0,enumerable:!1});let r=e.shortcuts?Nn(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=j(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function In(t){let e=await da(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(j).flatMap(In))).flat()]:[e]}function pa(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[];for(let s of t){if(s.pipeline===!1){n=!0;break}else s.pipeline?.include&&e.push(s.pipeline.include),s.pipeline?.exclude&&r.push(s.pipeline.exclude);s.filesystem&&o.push(s.filesystem),s.inline&&i.push(s.inline)}let a={pipeline:n?!1:{include:ct(On(...e)),exclude:ct(On(...r))}};return o.length&&(a.filesystem=ct(o.flat())),i.length&&(a.inline=ct(i.flat())),a}async function Mn(t={},e={}){let r=Object.assign({},e,t),n=An((await Promise.all((r.presets||[]).flatMap(j).flatMap(In))).flat(),(b,v)=>b.name===v.name),o=[...n.filter(b=>b.enforce==="pre"),...n.filter(b=>!b.enforce),...n.filter(b=>b.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},qi,...i.map(b=>b.layers));function c(b){return ct(i.flatMap(v=>j(v[b]||[])))}let l=c("extractors"),u=a.find(b=>b.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=Xi),u&&!l.includes(u)&&l.unshift(u),l.sort((b,v)=>(b.order||0)-(v.order||0));let d=c("rules"),p=d.length,h={},m=[];for(let[b,v]of d.entries()){let R=v[2]??(v[2]={});R.__index=b,aa(v)?j(R.prefix??"").forEach(Y=>{h[Y+v[0]]=v}):m.unshift(v)}let x={templates:ct(i.flatMap(b=>j(b.autocomplete?.templates))),extractors:i.flatMap(b=>j(b.autocomplete?.extractors)).sort((b,v)=>(b.order||0)-(v.order||0)),shorthands:ha(i.map(b=>b.autocomplete?.shorthands||{}))},$=c("separators");$.length||($=[":","-"]);let w=pa(c("content")),g={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:ma(i.map(b=>b.theme)),rules:d,rulesSize:p,rulesDynamic:m,rulesStaticMap:h,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:x,variants:c("variants").map(Qi).sort((b,v)=>(b.order||0)-(v.order||0)),shortcuts:Nn(c("shortcuts")).reverse(),extractors:l,safelist:c("safelist"),separators:$,details:r.details??r.envMode==="dev",content:w,transformers:An(c("transformers"),(b,v)=>b.name===v.name)},y=c("extendTheme");for(let b of y)g.theme=b(g.theme,g)||g.theme;for(let b of i)b?.configResolved?.(g);return g}function ma(t){return t.map(e=>e?ee(e):{}).reduce((e,r)=>Wn(e,r),{})}function ha(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function On(...t){return t.flatMap(ga)}function ga(t){return Array.isArray(t)?t:t?[t]:[]}var ba="66.7.0-beta.1",H={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},ya=class Un{userConfig;defaults;version=ba;events=Ki();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new Un(e,r);return n.config=await Mn(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Mn(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(Re(a)&&Re(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:H,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=this.config.preprocess.reduce((c,l)=>l(c)??c,e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let a=async c=>{let l=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(l.variants=[...c[3]]);let u=await this.expandShortcut(l.currentSelector,l);return u?await this.stringifyShortcuts(l.variantMatch,l,u[0],u[1]):(await this.parseUtil(l.variantMatch,l))?.flatMap(d=>this.stringifyUtil(d,l)).filter(Jt)},s=(await Promise.all(i.map(c=>a(c)))).flat().filter(c=>!!c);if(s?.length)return this.cache.set(n,s),s;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,l=F(e)?await this.applyExtractors(e,n,c?new Bn:new Set):Array.isArray(e)?new Set(e):e;if(a){let E={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(E):C).forEach(C=>{let z=C.trim();z&&!l.has(z)&&l.add(z)})}let u=s?"":`
|
|
1
|
+
"use strict";(()=>{var Di=Object.defineProperty;var Vi=(t,e)=>{for(var r in e)Di(t,r,{get:e[r],enumerable:!0})};var Me="default",Fn="preflights",Gi="shortcuts",Hi="imports",qi={[Hi]:-200,[Fn]:-100,[Gi]:-10,[Me]:0},Oe=/[\\:]?[\s'"`;{}]+/g;function Yi(t){return t.split(Oe)}var Xi={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Yi(t)}};function j(t=[]){return Array.isArray(t)?t:[t]}function ct(t){return Array.from(new Set(t))}function An(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function F(t){return typeof t=="string"}var Bn=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Re(t){return t instanceof Bn}function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Pe=Z;function Ki(){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 Zi=/^\[(.+?)~?="(.*)"\]$/;var Ji=/[\w\u00A0-\uFFFF%-?]/;function Tn(t){return t.match(Zi)}function Ft(t=""){return Ji.test(t)}function Qi(t){return typeof t=="function"?{match:t}:t}function _n(t){return t.length===3}function Jt(t){return t!=null}function ta(){}var ea=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,o])=>t(o,e,n)))}},ra=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function re(t){return F(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function na(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>re(e)):[t]:[re(t)]}function oa(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}var ia="__virtual_key__";function Lt(t){return t==null?"":oa(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function Qt(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Wn(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Qt(n)&&Qt(o)&&Object.keys(o).forEach(a=>{Qt(n[a])&&Qt(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Wn(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function ee(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?ee(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:ee(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?ee(n):n;return r}return t}function aa(t){return F(t[0])}function sa(t){return F(t[0])}var te={};function ca(t=["-",":"]){let e=t.join("|");return te[e]||(te[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),te[e].lastIndex=0,te[e]}function la(t,e=["-",":"],r=5){let n=ca(e),o,i=t.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(l,u,d,p,h)=>{if(!e.includes(d))return l;o=!0,a.add(u+d);let m=h+u.length+d.length+1,x={length:l.length,items:[]};s.set(h,x);for(let $ of[...p.matchAll(/\S+/g)]){let w=m+$.index,g=s.get(w)?.items;g?s.delete(w):g=[{offset:w,length:$[0].length,className:$[0]}];for(let y of g)y.className=y.className==="~"?d===":"?`${u}${d}~`:u:y.className.replace(/^(!?)(.*)/,`$1${u}${d}$2`),x.items.push(y)}return"$".repeat(l.length)}),r-=1;while(o&&r);let c;if(typeof t=="string"){c="";let l=0;for(let[u,d]of s)c+=t.slice(l,u),c+=d.items.map(p=>p.className).join(" "),l=u+d.length;c+=t.slice(l)}else{c=t;for(let[l,u]of s)c.overwrite(l,l+u.length,u.items.map(d=>d.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function fa(t,e=["-",":"],r=5){let n=la(t,e,r);return typeof t=="string"?n.expanded:t}var Rn=new Set;function ua(t){Rn.has(t)||(console.warn("[unocss]",t),Rn.add(t))}function Nn(t){return j(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Pn="_uno_resolved";async function da(t){let e=typeof t=="function"?await t():await t;if(Pn in e)return e;e={...e},Object.defineProperty(e,Pn,{value:!0,enumerable:!1});let r=e.shortcuts?Nn(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=j(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function In(t){let e=await da(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(j).flatMap(In))).flat()]:[e]}function pa(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[];for(let s of t){if(s.pipeline===!1){n=!0;break}else s.pipeline?.include&&e.push(s.pipeline.include),s.pipeline?.exclude&&r.push(s.pipeline.exclude);s.filesystem&&o.push(s.filesystem),s.inline&&i.push(s.inline)}let a={pipeline:n?!1:{include:ct(On(...e)),exclude:ct(On(...r))}};return o.length&&(a.filesystem=ct(o.flat())),i.length&&(a.inline=ct(i.flat())),a}async function Mn(t={},e={}){let r=Object.assign({},e,t),n=An((await Promise.all((r.presets||[]).flatMap(j).flatMap(In))).flat(),(b,v)=>b.name===v.name),o=[...n.filter(b=>b.enforce==="pre"),...n.filter(b=>!b.enforce),...n.filter(b=>b.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},qi,...i.map(b=>b.layers));function c(b){return ct(i.flatMap(v=>j(v[b]||[])))}let l=c("extractors"),u=a.find(b=>b.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=Xi),u&&!l.includes(u)&&l.unshift(u),l.sort((b,v)=>(b.order||0)-(v.order||0));let d=c("rules"),p=d.length,h={},m=[];for(let[b,v]of d.entries()){let R=v[2]??(v[2]={});R.__index=b,aa(v)?j(R.prefix??"").forEach(Y=>{h[Y+v[0]]=v}):m.unshift(v)}let x={templates:ct(i.flatMap(b=>j(b.autocomplete?.templates))),extractors:i.flatMap(b=>j(b.autocomplete?.extractors)).sort((b,v)=>(b.order||0)-(v.order||0)),shorthands:ha(i.map(b=>b.autocomplete?.shorthands||{}))},$=c("separators");$.length||($=[":","-"]);let w=pa(c("content")),g={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:ma(i.map(b=>b.theme)),rules:d,rulesSize:p,rulesDynamic:m,rulesStaticMap:h,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:x,variants:c("variants").map(Qi).sort((b,v)=>(b.order||0)-(v.order||0)),shortcuts:Nn(c("shortcuts")).reverse(),extractors:l,safelist:c("safelist"),separators:$,details:r.details??r.envMode==="dev",content:w,transformers:An(c("transformers"),(b,v)=>b.name===v.name)},y=c("extendTheme");for(let b of y)g.theme=b(g.theme,g)||g.theme;for(let b of i)b?.configResolved?.(g);return g}function ma(t){return t.map(e=>e?ee(e):{}).reduce((e,r)=>Wn(e,r),{})}function ha(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function On(...t){return t.flatMap(ga)}function ga(t){return Array.isArray(t)?t:t?[t]:[]}var ba="66.7.0",H={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},ya=class Un{userConfig;defaults;version=ba;events=Ki();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new Un(e,r);return n.config=await Mn(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Mn(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(Re(a)&&Re(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:H,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=this.config.preprocess.reduce((c,l)=>l(c)??c,e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let a=async c=>{let l=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(l.variants=[...c[3]]);let u=await this.expandShortcut(l.currentSelector,l);return u?await this.stringifyShortcuts(l.variantMatch,l,u[0],u[1]):(await this.parseUtil(l.variantMatch,l))?.flatMap(d=>this.stringifyUtil(d,l)).filter(Jt)},s=(await Promise.all(i.map(c=>a(c)))).flat().filter(c=>!!c);if(s?.length)return this.cache.set(n,s),s;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,l=F(e)?await this.applyExtractors(e,n,c?new Bn:new Set):Array.isArray(e)?new Set(e):e;if(a){let E={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(E):C).forEach(C=>{let z=C.trim();z&&!l.has(z)&&l.add(z)})}let u=s?"":`
|
|
2
2
|
`,d=new Set([Me]),p=c?new Map:new Set,h=new Map,m={},x=Array.from(l).map(async E=>{if(p.has(E))return;let C=await this.parseToken(E);if(C!=null){p instanceof Map?p.set(E,{data:C,count:Re(l)?l.getCount(E):-1}):p.add(E);for(let z of C){let V=z[3]||"",D=z[4]?.layer;h.has(V)||h.set(V,[]),h.get(V).push(z),D&&d.add(D)}}});await Promise.all(x),await(async()=>{if(!i)return;let E={generator:this,theme:this.config.theme},C=new Set([]);this.config.preflights.forEach(({layer:z=Fn})=>{d.add(z),C.add(z)}),m=Object.fromEntries(await Promise.all(Array.from(C).map(async z=>[z,(await Promise.all(this.config.preflights.filter(V=>(V.layer||"preflights")===z).map(async V=>await V.getCSS(E)))).filter(Boolean).join(u)])))})();let $=E=>this.config.sortLayers(E.sort((C,z)=>(this.config.layers[C]??0)-(this.config.layers[z]??0)||C.localeCompare(z))),w=$(Array.from(d)),g={},y=this.config.outputToCssLayers,b=E=>{let C=E;return typeof y=="object"&&(C=y.cssLayerName?.(E)),C===null?null:C??E},v=(E=Me)=>{if(g[E])return g[E];let C=Array.from(h).sort((D,k)=>(this.parentOrders.get(D[0])??0)-(this.parentOrders.get(k[0])??0)||D[0]?.localeCompare(k[0]||"")||0).map(([D,k])=>{let A=k.length,L=k.filter(I=>(I[4]?.layer||"default")===E).sort((I,X)=>I[0]-X[0]||(I[4]?.sort||0)-(X[4]?.sort||0)||I[5]?.currentSelector?.localeCompare(X[5]?.currentSelector??"")||I[1]?.localeCompare(X[1]||"")||I[2]?.localeCompare(X[2]||"")||0).map(([,I,X,,Ot,,_e])=>[[[(I&&!Ot?.noScope?va(I,o):I)??"",Ot?.sort??0]],X,!!(_e??Ot?.noMerge)]);if(!L.length)return;let T=L.reverse().map(([I,X,Ot],_e)=>{if(!Ot&&this.config.mergeSelectors)for(let dt=_e+1;dt<A;dt++){let et=L[dt];if(et&&!et[2]&&(I&&et[0]||I==null&&et[0]==null)&&et[1]===X)return I&&et[0]&&et[0].push(...I),null}let jn=I?ct(I.sort((dt,et)=>dt[1]-et[1]||dt[0]?.localeCompare(et[0]||"")||0).map(dt=>dt[0]).filter(Boolean)):[];return jn.length?`${jn.join(`,${u}`)}{${X}}`:X}).filter(Boolean),G=Array.from(new Set(T)).reverse().join(u);if(!D)return G;let xt=D.split(" $$ ");return`${xt.join("{")}{${u}${G}${u}${"}".repeat(xt.length)}`}).filter(Boolean).join(u);i&&(C=[m[E],C].filter(Boolean).join(u));let z;y&&C&&(z=b(E),z!==null&&(C=`@layer ${z}{${u}${C}${u}}`));let V=s?"":`/* layer: ${E}${z&&z!==E?`, alias: ${z}`:""} */${u}`;return g[E]=C?V+C:""},R=(E=w,C)=>{let z=E.filter(D=>!C?.includes(D)),V=z.map(v).filter(Boolean);if(y){let D=z;typeof y=="object"&&y.allLayers&&(D=$(Object.keys(this.config.layers))),D.length>0&&V.unshift(`@layer ${D.map(b).filter(Jt).join(", ")};`)}return V.join(u)};return{get css(){return R()},layers:w,matched:p,getLayers:R,getLayer:v,setLayer:async(E,C)=>{let z=await C(v(E));return g[E]=z,z}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},o=async i=>{let a=!0,[,,s,c]=i;for(;a;){a=!1;let l=i[1];for(let u of this.config.variants){if(!u.multiPass&&c.has(u))continue;let d=await u.match(l,n);if(d){if(F(d)){if(d===l)continue;d={matcher:d}}if(Array.isArray(d)){if(!d.length)continue;if(d.length===1)d=d[0];else{if(u.multiPass)throw new Error("multiPass can not be used together with array return variants");let p=d.map(h=>{let m=h.matcher??l,x=[h,...s],$=new Set(c);return $.add(u),[i[0],m,x,$]});return(await Promise.all(p.map(h=>o(h)))).flat()}}i[1]=d.matcher??l,s.unshift(d),c.add(u),a=!0;break}}if(!a)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await o([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let o=r.slice().sort((c,l)=>(c.order||0)-(l.order||0)).reduceRight((c,l)=>u=>{let d=l.body?.(u.entries)||u.entries,p=Array.isArray(l.parent)?l.parent:[l.parent,void 0],h=l.selector?.(u.selector,d);return(l.handle??wa)({...u,entries:d,selector:h||u.selector,parent:p[0]||u.parent,parentOrder:p[1]||u.parentOrder,layer:l.layer||u.layer,sort:l.sort||u.sort},c)},c=>c)({prefix:"",selector:$a(n),pseudo:"",entries:e[2]}),{parent:i,parentOrder:a}=o;i!=null&&a!=null&&this.parentOrders.set(i,a);let s={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:i,layer:o.layer,sort:o.sort,noMerge:o.noMerge};return this.config.postprocess.reduce((c,l)=>{let u=[];for(let d of c){let p=l(d);Array.isArray(p)?u.push(...p.filter(Jt)):u.push(p||d)}return u},[s])}constructCustomCSS(e,r,n){let o=re(r);return F(o)?o:this.applyVariants([0,n||e.rawSelector,o,void 0,e.variantHandlers]).map(({selector:i,entries:a,parent:s})=>{let c=`${i}{${Lt(a)}}`;return s?`${s}{${c}}`:c}).join("")}async parseUtil(e,r,n=!1,o){let i=F(e)?await this.matchVariants(e):[e],a=async([c,l,u])=>{this.config.details&&(r.rules=r.rules??[]);let d={...r,variantHandlers:u},p=this.config.rulesStaticMap[l];if(p&&p[1]&&(n||!p[2]?.internal))return this.resolveCSSResult(c,p[1],p,d);for(let h of this.config.rulesDynamic){let[m,x,$]=h;if($?.internal&&!n)continue;let w=l;if($?.prefix){let v=j($.prefix);if(o){let R=j(o);if(!v.some(Y=>R.includes(Y)))continue}else{let R=v.find(Y=>l.startsWith(Y));if(R==null)continue;w=l.slice(R.length)}}let g=w.match(m);if(!g)continue;let y=await x(g,d);if(!y)continue;if(typeof y!="string")if(Symbol.asyncIterator in y){let v=[];for await(let R of y)R&&v.push(R);y=v}else Symbol.iterator in y&&!Array.isArray(y)&&(y=Array.from(y).filter(Jt));let b=this.resolveCSSResult(c,y,h,d);if(b)return b}},s=(await Promise.all(i.map(c=>a(c)))).flat().filter(c=>!!c);if(s.length)return s}resolveCSSResult=(e,r,n,o)=>{let i=na(r).filter(a=>a.length);if(i.length){this.config.details&&o.rules.push(n),o.generator.activatedRules.add(n);let a=n[2];return i.map(s=>{if(F(s))return[a.__index,s,a];let c=o.variantHandlers,l=a,u=p=>{c=[p,...c]},d=p=>{l={...l,...p}};for(let p of s)switch(p[0]){case H.variants:typeof p[1]=="function"?c=p[1](c)||c:c=[...j(p[1]),...c];break;case H.parent:u({parent:p[1]});break;case H.selector:u({selector:p[1]});break;case H.layer:u({layer:p[1]});break;case H.sort:d({sort:p[1]});break;case H.noMerge:d({noMerge:p[1]});break;case H.noScope:d({noScope:p[1]});break;case H.body:p[0]=ia;break}return[a.__index,e,s,l,c]})}};stringifyUtil(e,r){if(!e)return;if(_n(e))return[[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0]];let n=this.applyVariants(e),o=[];for(let i of n){let{selector:a,entries:s,parent:c,layer:l,sort:u,noMerge:d}=i,p=Lt(s);if(!p)continue;let{layer:h,sort:m,...x}=e[3]??{},$={...x,layer:l??h,sort:u??m};o.push([e[0],a,p,c,$,this.config.details?r:void 0,d])}return o}async expandShortcut(e,r,n=5){if(n===0)return;let o=this.config.details?l=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(l)}:ta,i,a,s,c;for(let l of this.config.shortcuts){let u=e;if(l[2]?.prefix){let d=j(l[2].prefix).find(p=>e.startsWith(p));if(d==null)continue;u=e.slice(d.length)}if(sa(l)){if(l[0]===u){i=i||l[2],a=l[1],o(l);break}}else{let d=u.match(l[0]);if(d&&(a=l[1](d,r)),a){i=i||l[2],o(l);break}}}if(a&&(s=ct(j(a).filter(F).map(l=>fa(l.trim()).split(/\s+/g)).flat()),c=j(a).filter(l=>!F(l)).map(l=>({handles:[],value:l}))),!a){let l=F(e)?await this.matchVariants(e):[e];for(let u of l){let[d,p,h]=u;if(d!==p){let m=await this.expandShortcut(p,r,n-1);m&&(s=m[0].filter(F).map(x=>d.replace(p,x)),c=m[0].filter(x=>!F(x)).map(x=>({handles:[...x.handles,...h],value:x.value})))}}}if(!(!s?.length&&!c?.length))return[[await Promise.all(j(s).map(async l=>(await this.expandShortcut(l,r,n-1))?.[0]||[l])),c].flat(2).filter(l=>!!l),i]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new ra,a=(await Promise.all(ct(n).map(async u=>{let d=F(u)?await this.parseUtil(u,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",re(u.value),void 0,u.handles]];return!d&&this.config.warn&&ua(`unmatched utility "${u}" in shortcut "${e[1]}"`),d||[]}))).flat(1).filter(Boolean).sort((u,d)=>u[0]-d[0]),[s,,c]=e,l=[];for(let u of a){if(_n(u)){l.push([u[0],void 0,u[1],void 0,u[2],r,void 0]);continue}let d=Object.fromEntries(u[2])[H.shortcutsNoMerge],p=[...u[4],...d?[]:c];for(let{selector:h,entries:m,parent:x,sort:$,noMerge:w,layer:g}of this.applyVariants(u,p,s))i.getFallback(g??o.layer,new ea).getFallback(h,x,[[],u[0]])[0].push([m,!!(w??u[3]?.noMerge),$??0])}return l.concat(i.flatMap((u,d)=>u.map(([p,h],m,x)=>{let $=(w,g,y)=>{let b=Math.max(...y.map(R=>R[1])),v=y.map(R=>R[0]);return(w?[v.flat(1)]:v).map(R=>{let Y=Lt(R);if(Y)return[h,m,Y,x,{...o,noMerge:g,sort:b,layer:d},r,void 0]})};return[[p.filter(([,w])=>w).map(([w,,g])=>[w,g]),!0],[p.filter(([,w])=>!w).map(([w,,g])=>[w,g]),!1]].map(([w,g])=>[...$(!1,g,w.filter(([y])=>y.some(b=>b[0]===H.shortcutsNoMerge))),...$(!0,g,w.filter(([y])=>y.every(b=>b[0]!==H.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):F(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(e):F(o)?o===e:o.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function Dn(t,e){return await ya.create(t,e)}var Vn=/\s\$\$\s+/g;function xa(t){return Vn.test(t)}function va(t,e){return xa(t)?t.replace(Vn,e?` ${e} `:" "):e?`${e} ${t}`:t}var Ln=/^\[(.+?)(~?=)"(.*)"\]$/;function $a(t){return Ln.test(t)?t.replace(Ln,(e,r,n,o)=>`[${Pe(r)}${n}"${Pe(o)}"]`):`.${Pe(t)}`}function wa(t,e){return e(t)}var Yn=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function ka(t={}){let e=t.prefix??"un-",r=t.prefixedOnly??!1,n=t.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:a}){let s=Tn(i);if(!s)return;let c=s[1];if(c.startsWith(e))c=c.slice(e.length);else if(r)return;let l=s[2],[,u="",d=l]=l.match(Yn)||[];if(d==="~"||n&&d==="true"||!d)return`${u}${c}`;if(o==null){let p=a?.config?.separators?.join("|");p?o=new RegExp(`^(.*\\](?:${p}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,p,h]=l.match(o)||[];if(h)return`${p}${u}${c}-${h}`}if(u&&/^[\d.]+$/.test(d)){let p=u.split(/([^:]*:)/g).filter(Boolean),h=p.pop()+d,m=p.join("");return[{matcher:`${u}${c}-${d}`},{matcher:`${m}${c}-${h}`}]}return`${u}${c}-${d}`}}}var Sa=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,Ea=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,Gn=/[\s'"`;>]+/;function Ca(t){return{name:"attributify",extract:({content:e,cursor:r})=>{let n=e.matchAll(Sa),o,i=0;for(let g of n){let[,y,b]=g,v=g.index+y.length;if(r>v&&r<=v+b.length){i=v,o=b;break}}if(!o)return null;let a=o.matchAll(Ea),s=0,c,l;for(let g of a){let[y,b,v]=g,R=i+g.index;if(r>R&&r<=R+y.length){s=R,c=b,l=v?.slice(1);break}}if(!c||c==="class"||c==="className"||c===":class")return null;let u=!!t?.prefix&&c.startsWith(t.prefix);if(t?.prefixedOnly&&!u)return null;let d=u?c.slice(t.prefix.length):c;if(l===void 0)return{extracted:d,resolveReplacement(g){let y=u?t.prefix.length:0;return{start:s+y,end:s+c.length,replacement:g}}};let p=s+c.length+2,h=Gn.exec(l),m=0,x;for(;h;){let[g]=h;if(r>p+m&&r<=p+m+h.index){x=l.slice(m,m+h.index);break}m+=h.index+g.length,h=Gn.exec(l.slice(m))}x===void 0&&(x=l.slice(m));let[,$="",w]=x.match(Yn)||[];return{extracted:`${$}${d}-${w}`,transformSuggestions(g){return g.filter(y=>y.startsWith(`${$}${d}-`)).map(y=>$+y.slice($.length+d.length+1))},resolveReplacement(g){return{start:m+p,end:m+p+x.length,replacement:$+g.slice($.length+d.length+1)}}}}}}var za=["v-bind:",":"],Hn=/[\s'"`;]+/g,Le=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,ja=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,Xn=["placeholder","fill","opacity","stroke-opacity"];function Aa(t){let e=t?.ignoreAttributes??Xn,r=t?.nonValuedAttribute??!0,n=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(Le)).flatMap(i=>Array.from((i[1]||"").matchAll(ja))).flatMap(([,i,...a])=>{let s=a.filter(Boolean).join("");if(e.includes(i))return[];for(let c of za)if(i.startsWith(c)){i=i.slice(c.length);break}if(!s){if(Ft(i)&&r!==!1){let c=[`[${i}=""]`];return n&&c.push(`[${i}="true"]`),c}return[]}return["class","className"].includes(i)?s.split(Hn).filter(Ft):Le.test(s)?(Le.lastIndex=0,this.extract({code:s})):t?.prefixedOnly&&t.prefix&&!i.startsWith(t.prefix)?[]:s.split(Hn).filter(c=>!!c&&c!==":").map(c=>`[${i}~="${c}"]`)})}}}var Kn=(t={})=>(t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??Xn,{name:"@unocss/preset-attributify",enforce:"post",variants:[ka(t)],extractors:[Aa(t)],options:t,autocomplete:{extractors:[Ca(t)]},extractorDefault:t.strict?!1:void 0});var Fe=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,Ra=Object.getOwnPropertyNames,Pa=Object.prototype.hasOwnProperty,ne=(t,e)=>{let r={};for(var n in t)Fe(r,n,{get:t[n],enumerable:!0});return e||Fe(r,Symbol.toStringTag,{value:"Module"}),r},Zn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var o=Ra(e),i=0,a=o.length,s;i<a;i++)s=o[i],!Pa.call(t,s)&&s!==r&&Fe(t,s,{get:(c=>e[c]).bind(null,s),enumerable:!(n=_a(e,s))||n.enumerable});return t},Be=(t,e,r)=>(Zn(t,e,"default"),r&&Zn(r,e,"default"));var Je={};Vi(Je,{PseudoClassFunctions:()=>mo,PseudoClassFunctionsStr:()=>pt,PseudoClasses:()=>$t,PseudoClassesAndElementsColonStr:()=>Ue,PseudoClassesAndElementsStr:()=>Ie,PseudoClassesColon:()=>wt,PseudoClassesColonKeys:()=>He,PseudoClassesColonStr:()=>ce,PseudoClassesKeys:()=>Ge,PseudoClassesMulti:()=>qe,PseudoClassesMultiStr:()=>Ne,PseudoClassesStr:()=>se,alphaPlaceholders:()=>De,alphaPlaceholdersRE:()=>co,calcMaxWidthBySize:()=>ts,colorOpacityToString:()=>mt,colorToString:()=>W,createPartClasses:()=>Ze,createPseudoClassFunctions:()=>Xe,createPseudoClassesAndElements:()=>Ye,createTaggedPseudoClassMatcher:()=>go,createTaggedPseudoClasses:()=>Ke,createValueHandler:()=>Ve,cssColorFunctions:()=>le,excludedPseudo:()=>ho,getBracket:()=>oo,getStringComponent:()=>vt,getStringComponents:()=>_t,hasIconFn:()=>rs,hasThemeFn:()=>Ja,hex2rgba:()=>Ga,hueInterpolationMethods:()=>so,iconFnRE:()=>es,isInterpolatedMethod:()=>Va,parseCssColor:()=>J,polarColorSpace:()=>ao,rectangularColorSpace:()=>io,themeFnRE:()=>uo,transformThemeFn:()=>Qa,transformThemeString:()=>po,variantGetBracket:()=>bo,variantGetParameter:()=>yo,variantMatcher:()=>kt,variantParentMatcher:()=>rt});var Ma=44,Oa=59,Jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eo=new Uint8Array(64),La=new Uint8Array(128);for(let t=0;t<Jn.length;t++){let e=Jn.charCodeAt(t);eo[t]=e,La[e]=t}function Bt(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(eo[o])}while(n>0);return e}var Qn=1024*16,to=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},Fa=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Qn)}write(t){let{buffer:e}=this;e[this.pos++]=t,this.pos===Qn&&(this.out+=to.decode(e),this.pos=0)}flush(){let{buffer:t,out:e,pos:r}=this;return r>0?e+to.decode(t.subarray(0,r)):e}};function ro(t){let e=new Fa,r=0,n=0,o=0,i=0;for(let a=0;a<t.length;a++){let s=t[a];if(a>0&&e.write(Oa),s.length===0)continue;let c=0;for(let l=0;l<s.length;l++){let u=s[l];l>0&&e.write(Ma),c=Bt(e,u[0],c),u.length!==1&&(r=Bt(e,u[1],r),n=Bt(e,u[2],n),o=Bt(e,u[3],o),u.length!==4&&(i=Bt(e,u[4],i)))}}return e.flush()}var oe=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},ie=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new t(e,this.end,o);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function Ba(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var Ta=Ba(),Te=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=ro(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Ta(this.toString())}};function Wa(t){let e=t.split(`
|
|
3
3
|
`),r=e.filter(i=>/^\t+/.test(i)),n=e.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,a)=>{let s=/^ +/.exec(a)[0].length;return Math.min(s,i)},1/0);return new Array(o+1).join(" ")}function Na(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var Ia=Object.prototype.toString;function Ua(t){return Ia.call(t)==="[object Object]"}function no(t){let e=t.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<e.length;n++)r.push(o),o+=e[n].length+1;return function(o){let i=0,a=r.length;for(;i<a;){let l=i+a>>1;o<r[l]?a=l:i=l+1}let s=i-1,c=o-r[s];return{line:s,column:c}}}var Da=/\w/,We=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,o){if(r.length){let i=r.length-1,a=r.indexOf(`
|
package/core.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{var X="default",le="preflights",we="shortcuts",$e="imports",Ae={[$e]:-200,[le]:-100,[we]:-10,[X]:0},Ce=/[\\:]?[\s'"`;{}]+/g;function Me(t){return t.split(Ce)}var Ee={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Me(t)}};function k(t=[]){return Array.isArray(t)?t:[t]}function N(t){return Array.from(new Set(t))}function re(t,e){return t.reduce((r,n)=>(r.findIndex(s=>e(n,s))===-1&&r.push(n),r),[])}function O(t){return typeof t=="string"}var fe=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Z(t){return t instanceof fe}function _e(t){let e=t.length,r=-1,n,s="",a=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";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&&a===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 J=_e;function Re(){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)}}}function Le(t){return typeof t=="function"?{match:t}:t}function ne(t){return t.length===3}function H(t){return t!=null}function Oe(){}var ke=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,s])=>t(s,e,n)))}},je=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function q(t){return O(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Te(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>q(e)):[t]:[q(t)]}function Pe(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})}var Ue="__virtual_key__";function Q(t){return t==null?"":Pe(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function z(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ue(t,e,r=!1){let n=t,s=e;if(Array.isArray(s))return r&&Array.isArray(s)?[...n,...s]:[...s];let a={...n};return z(n)&&z(s)&&Object.keys(s).forEach(f=>{z(n[f])&&z(s[f])||Array.isArray(n[f])&&Array.isArray(s[f])?a[f]=ue(n[f],s[f],r):Object.assign(a,{[f]:s[f]})}),a}function Y(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?Y(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:Y(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?Y(n):n;return r}return t}function Ve(t){return O(t[0])}function De(t){return O(t[0])}var W={};function Ge(t=["-",":"]){let e=t.join("|");return W[e]||(W[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),W[e].lastIndex=0,W[e]}function Ne(t,e=["-",":"],r=5){let n=Ge(e),s,a=t.toString(),f=new Set,u=new Map;do s=!1,a=a.replace(n,(o,i,l,p,g)=>{if(!e.includes(l))return o;s=!0,f.add(i+l);let C=g+i.length+l.length+1,M={length:o.length,items:[]};u.set(g,M);for(let $ of[...p.matchAll(/\S+/g)]){let A=C+$.index,y=u.get(A)?.items;y?u.delete(A):y=[{offset:A,length:$[0].length,className:$[0]}];for(let v of y)v.className=v.className==="~"?l===":"?`${i}${l}~`:i:v.className.replace(/^(!?)(.*)/,`$1${i}${l}$2`),M.items.push(v)}return"$".repeat(o.length)}),r-=1;while(s&&r);let c;if(typeof t=="string"){c="";let o=0;for(let[i,l]of u)c+=t.slice(o,i),c+=l.items.map(p=>p.className).join(" "),o=i+l.length;c+=t.slice(o)}else{c=t;for(let[o,i]of u)c.overwrite(o,o+i.length,i.items.map(l=>l.className).join(" "))}return{prefixes:Array.from(f),hasChanged:s,groupsByOffset:u,get expanded(){return c.toString()}}}function Fe(t,e=["-",":"],r=5){let n=Ne(t,e,r);return typeof t=="string"?n.expanded:t}var se=new Set;function Be(t){se.has(t)||(console.warn("[unocss]",t),se.add(t))}function pe(t){return k(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var oe="_uno_resolved";async function Ie(t){let e=typeof t=="function"?await t():await t;if(oe in e)return e;e={...e},Object.defineProperty(e,oe,{value:!0,enumerable:!1});let r=e.shortcuts?pe(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let a=s[2];a.prefix==null&&e.prefix&&(a.prefix=k(e.prefix)),a.layer==null&&e.layer&&(a.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function he(t){let e=await Ie(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(k).flatMap(he))).flat()]:[e]}function He(t){if(t.length===0)return{};let e=[],r=[],n=!1,s=[],a=[];for(let u of t){if(u.pipeline===!1){n=!0;break}else u.pipeline?.include&&e.push(u.pipeline.include),u.pipeline?.exclude&&r.push(u.pipeline.exclude);u.filesystem&&s.push(u.filesystem),u.inline&&a.push(u.inline)}let f={pipeline:n?!1:{include:N(ae(...e)),exclude:N(ae(...r))}};return s.length&&(f.filesystem=N(s.flat())),a.length&&(f.inline=N(a.flat())),f}async function ie(t={},e={}){let r=Object.assign({},e,t),n=re((await Promise.all((r.presets||[]).flatMap(k).flatMap(he))).flat(),(h,m)=>h.name===m.name),s=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],a=[...s,r],f=[...a].reverse(),u=Object.assign({},Ae,...a.map(h=>h.layers));function c(h){return N(a.flatMap(m=>k(m[h]||[])))}let o=c("extractors"),i=f.find(h=>h.extractorDefault!==void 0)?.extractorDefault;i===void 0&&(i=Ee),i&&!o.includes(i)&&o.unshift(i),o.sort((h,m)=>(h.order||0)-(m.order||0));let l=c("rules"),p=l.length,g={},C=[];for(let[h,m]of l.entries()){let _=m[2]??(m[2]={});_.__index=h,Ve(m)?k(_.prefix??"").forEach(V=>{g[V+m[0]]=m}):C.unshift(m)}let M={templates:N(a.flatMap(h=>k(h.autocomplete?.templates))),extractors:a.flatMap(h=>k(h.autocomplete?.extractors)).sort((h,m)=>(h.order||0)-(m.order||0)),shorthands:We(a.map(h=>h.autocomplete?.shorthands||{}))},$=c("separators");$.length||($=[":","-"]);let A=He(c("content")),y={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:s,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:u,theme:ze(a.map(h=>h.theme)),rules:l,rulesSize:p,rulesDynamic:C,rulesStaticMap:g,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:M,variants:c("variants").map(Le).sort((h,m)=>(h.order||0)-(m.order||0)),shortcuts:pe(c("shortcuts")).reverse(),extractors:o,safelist:c("safelist"),separators:$,details:r.details??r.envMode==="dev",content:A,transformers:re(c("transformers"),(h,m)=>h.name===m.name)},v=c("extendTheme");for(let h of v)y.theme=h(y.theme,y)||y.theme;for(let h of a)h?.configResolved?.(y);return y}function ze(t){return t.map(e=>e?Y(e):{}).reduce((e,r)=>ue(e,r),{})}function We(t){return t.reduce((e,r)=>{let n={};for(let s in r){let a=r[s];Array.isArray(a)?n[s]=`(${a.join("|")})`:n[s]=a}return{...e,...n}},{})}function ae(...t){return t.flatMap(Ye)}function Ye(t){return Array.isArray(t)?t:t?[t]:[]}var qe="66.7.0-beta.1",U={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},Ke=class de{userConfig;defaults;version=qe;events=Re();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new de(e,r);return n.config=await ie(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await ie(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 a of this.config.extractors){let f=await a.extract?.(s);if(f)if(Z(f)&&Z(n))for(let u of f)n.setCount(u,n.getCount(u)+f.getCount(u));else for(let u of f)n.add(u)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:U,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=this.config.preprocess.reduce((c,o)=>o(c)??c,e);if(this.isBlocked(s)){this.blocked.add(e),this.cache.set(n,null);return}let a=await this.matchVariants(e,s);if(a.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let f=async c=>{let o=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(o.variants=[...c[3]]);let i=await this.expandShortcut(o.currentSelector,o);return i?await this.stringifyShortcuts(o.variantMatch,o,i[0],i[1]):(await this.parseUtil(o.variantMatch,o))?.flatMap(l=>this.stringifyUtil(l,o)).filter(H)},u=(await Promise.all(a.map(c=>f(c)))).flat().filter(c=>!!c);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:a=!0,safelist:f=!0,minify:u=!1,extendedInfo:c=!1}=r,o=O(e)?await this.applyExtractors(e,n,c?new fe:new Set):Array.isArray(e)?new Set(e):e;if(f){let S={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(S):b).forEach(b=>{let x=b.trim();x&&!o.has(x)&&o.add(x)})}let i=u?"":`
|
|
1
|
+
"use strict";(()=>{var X="default",le="preflights",we="shortcuts",$e="imports",Ae={[$e]:-200,[le]:-100,[we]:-10,[X]:0},Ce=/[\\:]?[\s'"`;{}]+/g;function Me(t){return t.split(Ce)}var Ee={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Me(t)}};function k(t=[]){return Array.isArray(t)?t:[t]}function N(t){return Array.from(new Set(t))}function re(t,e){return t.reduce((r,n)=>(r.findIndex(s=>e(n,s))===-1&&r.push(n),r),[])}function O(t){return typeof t=="string"}var fe=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Z(t){return t instanceof fe}function _e(t){let e=t.length,r=-1,n,s="",a=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";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&&a===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 J=_e;function Re(){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)}}}function Le(t){return typeof t=="function"?{match:t}:t}function ne(t){return t.length===3}function H(t){return t!=null}function Oe(){}var ke=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,s])=>t(s,e,n)))}},je=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function q(t){return O(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Te(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>q(e)):[t]:[q(t)]}function Pe(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})}var Ue="__virtual_key__";function Q(t){return t==null?"":Pe(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function z(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ue(t,e,r=!1){let n=t,s=e;if(Array.isArray(s))return r&&Array.isArray(s)?[...n,...s]:[...s];let a={...n};return z(n)&&z(s)&&Object.keys(s).forEach(f=>{z(n[f])&&z(s[f])||Array.isArray(n[f])&&Array.isArray(s[f])?a[f]=ue(n[f],s[f],r):Object.assign(a,{[f]:s[f]})}),a}function Y(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?Y(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:Y(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?Y(n):n;return r}return t}function Ve(t){return O(t[0])}function De(t){return O(t[0])}var W={};function Ge(t=["-",":"]){let e=t.join("|");return W[e]||(W[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),W[e].lastIndex=0,W[e]}function Ne(t,e=["-",":"],r=5){let n=Ge(e),s,a=t.toString(),f=new Set,u=new Map;do s=!1,a=a.replace(n,(o,i,l,p,g)=>{if(!e.includes(l))return o;s=!0,f.add(i+l);let C=g+i.length+l.length+1,M={length:o.length,items:[]};u.set(g,M);for(let $ of[...p.matchAll(/\S+/g)]){let A=C+$.index,y=u.get(A)?.items;y?u.delete(A):y=[{offset:A,length:$[0].length,className:$[0]}];for(let v of y)v.className=v.className==="~"?l===":"?`${i}${l}~`:i:v.className.replace(/^(!?)(.*)/,`$1${i}${l}$2`),M.items.push(v)}return"$".repeat(o.length)}),r-=1;while(s&&r);let c;if(typeof t=="string"){c="";let o=0;for(let[i,l]of u)c+=t.slice(o,i),c+=l.items.map(p=>p.className).join(" "),o=i+l.length;c+=t.slice(o)}else{c=t;for(let[o,i]of u)c.overwrite(o,o+i.length,i.items.map(l=>l.className).join(" "))}return{prefixes:Array.from(f),hasChanged:s,groupsByOffset:u,get expanded(){return c.toString()}}}function Fe(t,e=["-",":"],r=5){let n=Ne(t,e,r);return typeof t=="string"?n.expanded:t}var se=new Set;function Be(t){se.has(t)||(console.warn("[unocss]",t),se.add(t))}function pe(t){return k(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var oe="_uno_resolved";async function Ie(t){let e=typeof t=="function"?await t():await t;if(oe in e)return e;e={...e},Object.defineProperty(e,oe,{value:!0,enumerable:!1});let r=e.shortcuts?pe(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let a=s[2];a.prefix==null&&e.prefix&&(a.prefix=k(e.prefix)),a.layer==null&&e.layer&&(a.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function he(t){let e=await Ie(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(k).flatMap(he))).flat()]:[e]}function He(t){if(t.length===0)return{};let e=[],r=[],n=!1,s=[],a=[];for(let u of t){if(u.pipeline===!1){n=!0;break}else u.pipeline?.include&&e.push(u.pipeline.include),u.pipeline?.exclude&&r.push(u.pipeline.exclude);u.filesystem&&s.push(u.filesystem),u.inline&&a.push(u.inline)}let f={pipeline:n?!1:{include:N(ae(...e)),exclude:N(ae(...r))}};return s.length&&(f.filesystem=N(s.flat())),a.length&&(f.inline=N(a.flat())),f}async function ie(t={},e={}){let r=Object.assign({},e,t),n=re((await Promise.all((r.presets||[]).flatMap(k).flatMap(he))).flat(),(h,m)=>h.name===m.name),s=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],a=[...s,r],f=[...a].reverse(),u=Object.assign({},Ae,...a.map(h=>h.layers));function c(h){return N(a.flatMap(m=>k(m[h]||[])))}let o=c("extractors"),i=f.find(h=>h.extractorDefault!==void 0)?.extractorDefault;i===void 0&&(i=Ee),i&&!o.includes(i)&&o.unshift(i),o.sort((h,m)=>(h.order||0)-(m.order||0));let l=c("rules"),p=l.length,g={},C=[];for(let[h,m]of l.entries()){let _=m[2]??(m[2]={});_.__index=h,Ve(m)?k(_.prefix??"").forEach(V=>{g[V+m[0]]=m}):C.unshift(m)}let M={templates:N(a.flatMap(h=>k(h.autocomplete?.templates))),extractors:a.flatMap(h=>k(h.autocomplete?.extractors)).sort((h,m)=>(h.order||0)-(m.order||0)),shorthands:We(a.map(h=>h.autocomplete?.shorthands||{}))},$=c("separators");$.length||($=[":","-"]);let A=He(c("content")),y={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:s,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:u,theme:ze(a.map(h=>h.theme)),rules:l,rulesSize:p,rulesDynamic:C,rulesStaticMap:g,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:M,variants:c("variants").map(Le).sort((h,m)=>(h.order||0)-(m.order||0)),shortcuts:pe(c("shortcuts")).reverse(),extractors:o,safelist:c("safelist"),separators:$,details:r.details??r.envMode==="dev",content:A,transformers:re(c("transformers"),(h,m)=>h.name===m.name)},v=c("extendTheme");for(let h of v)y.theme=h(y.theme,y)||y.theme;for(let h of a)h?.configResolved?.(y);return y}function ze(t){return t.map(e=>e?Y(e):{}).reduce((e,r)=>ue(e,r),{})}function We(t){return t.reduce((e,r)=>{let n={};for(let s in r){let a=r[s];Array.isArray(a)?n[s]=`(${a.join("|")})`:n[s]=a}return{...e,...n}},{})}function ae(...t){return t.flatMap(Ye)}function Ye(t){return Array.isArray(t)?t:t?[t]:[]}var qe="66.7.0",U={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},Ke=class de{userConfig;defaults;version=qe;events=Re();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new de(e,r);return n.config=await ie(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await ie(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 a of this.config.extractors){let f=await a.extract?.(s);if(f)if(Z(f)&&Z(n))for(let u of f)n.setCount(u,n.getCount(u)+f.getCount(u));else for(let u of f)n.add(u)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:U,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=this.config.preprocess.reduce((c,o)=>o(c)??c,e);if(this.isBlocked(s)){this.blocked.add(e),this.cache.set(n,null);return}let a=await this.matchVariants(e,s);if(a.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let f=async c=>{let o=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(o.variants=[...c[3]]);let i=await this.expandShortcut(o.currentSelector,o);return i?await this.stringifyShortcuts(o.variantMatch,o,i[0],i[1]):(await this.parseUtil(o.variantMatch,o))?.flatMap(l=>this.stringifyUtil(l,o)).filter(H)},u=(await Promise.all(a.map(c=>f(c)))).flat().filter(c=>!!c);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:a=!0,safelist:f=!0,minify:u=!1,extendedInfo:c=!1}=r,o=O(e)?await this.applyExtractors(e,n,c?new fe:new Set):Array.isArray(e)?new Set(e):e;if(f){let S={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(S):b).forEach(b=>{let x=b.trim();x&&!o.has(x)&&o.add(x)})}let i=u?"":`
|
|
2
2
|
`,l=new Set([X]),p=c?new Map:new Set,g=new Map,C={},M=Array.from(o).map(async S=>{if(p.has(S))return;let b=await this.parseToken(S);if(b!=null){p instanceof Map?p.set(S,{data:b,count:Z(o)?o.getCount(S):-1}):p.add(S);for(let x of b){let T=x[3]||"",j=x[4]?.layer;g.has(T)||g.set(T,[]),g.get(T).push(x),j&&l.add(j)}}});await Promise.all(M),await(async()=>{if(!a)return;let S={generator:this,theme:this.config.theme},b=new Set([]);this.config.preflights.forEach(({layer:x=le})=>{l.add(x),b.add(x)}),C=Object.fromEntries(await Promise.all(Array.from(b).map(async x=>[x,(await Promise.all(this.config.preflights.filter(T=>(T.layer||"preflights")===x).map(async T=>await T.getCSS(S)))).filter(Boolean).join(i)])))})();let $=S=>this.config.sortLayers(S.sort((b,x)=>(this.config.layers[b]??0)-(this.config.layers[x]??0)||b.localeCompare(x))),A=$(Array.from(l)),y={},v=this.config.outputToCssLayers,h=S=>{let b=S;return typeof v=="object"&&(b=v.cssLayerName?.(S)),b===null?null:b??S},m=(S=X)=>{if(y[S])return y[S];let b=Array.from(g).sort((j,d)=>(this.parentOrders.get(j[0])??0)-(this.parentOrders.get(d[0])??0)||j[0]?.localeCompare(d[0]||"")||0).map(([j,d])=>{let w=d.length,E=d.filter(L=>(L[4]?.layer||"default")===S).sort((L,D)=>L[0]-D[0]||(L[4]?.sort||0)-(D[4]?.sort||0)||L[5]?.currentSelector?.localeCompare(D[5]?.currentSelector??"")||L[1]?.localeCompare(D[1]||"")||L[2]?.localeCompare(D[2]||"")||0).map(([,L,D,,I,,K])=>[[[(L&&!I?.noScope?Je(L,s):L)??"",I?.sort??0]],D,!!(K??I?.noMerge)]);if(!E.length)return;let R=E.reverse().map(([L,D,I],K)=>{if(!I&&this.config.mergeSelectors)for(let F=K+1;F<w;F++){let G=E[F];if(G&&!G[2]&&(L&&G[0]||L==null&&G[0]==null)&&G[1]===D)return L&&G[0]&&G[0].push(...L),null}let te=L?N(L.sort((F,G)=>F[1]-G[1]||F[0]?.localeCompare(G[0]||"")||0).map(F=>F[0]).filter(Boolean)):[];return te.length?`${te.join(`,${i}`)}{${D}}`:D}).filter(Boolean),P=Array.from(new Set(R)).reverse().join(i);if(!j)return P;let B=j.split(" $$ ");return`${B.join("{")}{${i}${P}${i}${"}".repeat(B.length)}`}).filter(Boolean).join(i);a&&(b=[C[S],b].filter(Boolean).join(i));let x;v&&b&&(x=h(S),x!==null&&(b=`@layer ${x}{${i}${b}${i}}`));let T=u?"":`/* layer: ${S}${x&&x!==S?`, alias: ${x}`:""} */${i}`;return y[S]=b?T+b:""},_=(S=A,b)=>{let x=S.filter(j=>!b?.includes(j)),T=x.map(m).filter(Boolean);if(v){let j=x;typeof v=="object"&&v.allLayers&&(j=$(Object.keys(this.config.layers))),j.length>0&&T.unshift(`@layer ${j.map(h).filter(H).join(", ")};`)}return T.join(i)};return{get css(){return _()},layers:A,matched:p,getLayers:_,getLayer:m,setLayer:async(S,b)=>{let x=await b(m(S));return y[S]=x,x}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},s=async a=>{let f=!0,[,,u,c]=a;for(;f;){f=!1;let o=a[1];for(let i of this.config.variants){if(!i.multiPass&&c.has(i))continue;let l=await i.match(o,n);if(l){if(O(l)){if(l===o)continue;l={matcher:l}}if(Array.isArray(l)){if(!l.length)continue;if(l.length===1)l=l[0];else{if(i.multiPass)throw new Error("multiPass can not be used together with array return variants");let p=l.map(g=>{let C=g.matcher??o,M=[g,...u],$=new Set(c);return $.add(i),[a[0],C,M,$]});return(await Promise.all(p.map(g=>s(g)))).flat()}}a[1]=l.matcher??o,u.unshift(l),c.add(i),f=!0;break}}if(!f)break;if(u.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[a]};return await s([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let s=r.slice().sort((c,o)=>(c.order||0)-(o.order||0)).reduceRight((c,o)=>i=>{let l=o.body?.(i.entries)||i.entries,p=Array.isArray(o.parent)?o.parent:[o.parent,void 0],g=o.selector?.(i.selector,l);return(o.handle??Xe)({...i,entries:l,selector:g||i.selector,parent:p[0]||i.parent,parentOrder:p[1]||i.parentOrder,layer:o.layer||i.layer,sort:o.sort||i.sort},c)},c=>c)({prefix:"",selector:Qe(n),pseudo:"",entries:e[2]}),{parent:a,parentOrder:f}=s;a!=null&&f!=null&&this.parentOrders.set(a,f);let u={selector:[s.prefix,s.selector,s.pseudo].join(""),entries:s.entries,parent:a,layer:s.layer,sort:s.sort,noMerge:s.noMerge};return this.config.postprocess.reduce((c,o)=>{let i=[];for(let l of c){let p=o(l);Array.isArray(p)?i.push(...p.filter(H)):i.push(p||l)}return i},[u])}constructCustomCSS(e,r,n){let s=q(r);return O(s)?s:this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]).map(({selector:a,entries:f,parent:u})=>{let c=`${a}{${Q(f)}}`;return u?`${u}{${c}}`:c}).join("")}async parseUtil(e,r,n=!1,s){let a=O(e)?await this.matchVariants(e):[e],f=async([c,o,i])=>{this.config.details&&(r.rules=r.rules??[]);let l={...r,variantHandlers:i},p=this.config.rulesStaticMap[o];if(p&&p[1]&&(n||!p[2]?.internal))return this.resolveCSSResult(c,p[1],p,l);for(let g of this.config.rulesDynamic){let[C,M,$]=g;if($?.internal&&!n)continue;let A=o;if($?.prefix){let m=k($.prefix);if(s){let _=k(s);if(!m.some(V=>_.includes(V)))continue}else{let _=m.find(V=>o.startsWith(V));if(_==null)continue;A=o.slice(_.length)}}let y=A.match(C);if(!y)continue;let v=await M(y,l);if(!v)continue;if(typeof v!="string")if(Symbol.asyncIterator in v){let m=[];for await(let _ of v)_&&m.push(_);v=m}else Symbol.iterator in v&&!Array.isArray(v)&&(v=Array.from(v).filter(H));let h=this.resolveCSSResult(c,v,g,l);if(h)return h}},u=(await Promise.all(a.map(c=>f(c)))).flat().filter(c=>!!c);if(u.length)return u}resolveCSSResult=(e,r,n,s)=>{let a=Te(r).filter(f=>f.length);if(a.length){this.config.details&&s.rules.push(n),s.generator.activatedRules.add(n);let f=n[2];return a.map(u=>{if(O(u))return[f.__index,u,f];let c=s.variantHandlers,o=f,i=p=>{c=[p,...c]},l=p=>{o={...o,...p}};for(let p of u)switch(p[0]){case U.variants:typeof p[1]=="function"?c=p[1](c)||c:c=[...k(p[1]),...c];break;case U.parent:i({parent:p[1]});break;case U.selector:i({selector:p[1]});break;case U.layer:i({layer:p[1]});break;case U.sort:l({sort:p[1]});break;case U.noMerge:l({noMerge:p[1]});break;case U.noScope:l({noScope:p[1]});break;case U.body:p[0]=Ue;break}return[f.__index,e,u,o,c]})}};stringifyUtil(e,r){if(!e)return;if(ne(e))return[[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0]];let n=this.applyVariants(e),s=[];for(let a of n){let{selector:f,entries:u,parent:c,layer:o,sort:i,noMerge:l}=a,p=Q(u);if(!p)continue;let{layer:g,sort:C,...M}=e[3]??{},$={...M,layer:o??g,sort:i??C};s.push([e[0],f,p,c,$,this.config.details?r:void 0,l])}return s}async expandShortcut(e,r,n=5){if(n===0)return;let s=this.config.details?o=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(o)}:Oe,a,f,u,c;for(let o of this.config.shortcuts){let i=e;if(o[2]?.prefix){let l=k(o[2].prefix).find(p=>e.startsWith(p));if(l==null)continue;i=e.slice(l.length)}if(De(o)){if(o[0]===i){a=a||o[2],f=o[1],s(o);break}}else{let l=i.match(o[0]);if(l&&(f=o[1](l,r)),f){a=a||o[2],s(o);break}}}if(f&&(u=N(k(f).filter(O).map(o=>Fe(o.trim()).split(/\s+/g)).flat()),c=k(f).filter(o=>!O(o)).map(o=>({handles:[],value:o}))),!f){let o=O(e)?await this.matchVariants(e):[e];for(let i of o){let[l,p,g]=i;if(l!==p){let C=await this.expandShortcut(p,r,n-1);C&&(u=C[0].filter(O).map(M=>l.replace(p,M)),c=C[0].filter(M=>!O(M)).map(M=>({handles:[...M.handles,...g],value:M.value})))}}}if(!(!u?.length&&!c?.length))return[[await Promise.all(k(u).map(async o=>(await this.expandShortcut(o,r,n-1))?.[0]||[o])),c].flat(2).filter(o=>!!o),a]}async stringifyShortcuts(e,r,n,s={layer:this.config.shortcutsLayer}){let a=new je,f=(await Promise.all(N(n).map(async i=>{let l=O(i)?await this.parseUtil(i,r,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",q(i.value),void 0,i.handles]];return!l&&this.config.warn&&Be(`unmatched utility "${i}" in shortcut "${e[1]}"`),l||[]}))).flat(1).filter(Boolean).sort((i,l)=>i[0]-l[0]),[u,,c]=e,o=[];for(let i of f){if(ne(i)){o.push([i[0],void 0,i[1],void 0,i[2],r,void 0]);continue}let l=Object.fromEntries(i[2])[U.shortcutsNoMerge],p=[...i[4],...l?[]:c];for(let{selector:g,entries:C,parent:M,sort:$,noMerge:A,layer:y}of this.applyVariants(i,p,u))a.getFallback(y??s.layer,new ke).getFallback(g,M,[[],i[0]])[0].push([C,!!(A??i[3]?.noMerge),$??0])}return o.concat(a.flatMap((i,l)=>i.map(([p,g],C,M)=>{let $=(A,y,v)=>{let h=Math.max(...v.map(_=>_[1])),m=v.map(_=>_[0]);return(A?[m.flat(1)]:m).map(_=>{let V=Q(_);if(V)return[g,C,V,M,{...s,noMerge:y,sort:h,layer:l},r,void 0]})};return[[p.filter(([,A])=>A).map(([A,,y])=>[A,y]),!0],[p.filter(([,A])=>!A).map(([A,,y])=>[A,y]),!1]].map(([A,y])=>[...$(!1,y,A.filter(([v])=>v.some(h=>h[0]===U.shortcutsNoMerge))),...$(!0,y,A.filter(([v])=>v.every(h=>h[0]!==U.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):O(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let s=Array.isArray(n)?n[0]:n;return typeof s=="function"?s(e):O(s)?s===e:s.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function me(t,e){return await Ke.create(t,e)}var ge=/\s\$\$\s+/g;function Ze(t){return ge.test(t)}function Je(t,e){return Ze(t)?t.replace(ge,e?` ${e} `:" "):e?`${e} ${t}`:t}var ce=/^\[(.+?)(~?=)"(.*)"\]$/;function Qe(t){return ce.test(t)?t.replace(ce,(e,r,n,s)=>`[${J(r)}${n}"${J(s)}"]`):`.${J(t)}`}function Xe(t,e){return e(t)}function et(t){return t.replace(/-(\w)/g,(e,r)=>r?r.toUpperCase():"")}function ye(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ve(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Se=["Webkit","Moz","ms"];function be(t){let e={};function r(n){let s=e[n];if(s)return s;let a=et(n);if(a!=="filter"&&a in t)return e[n]=ve(a);a=ye(a);for(let f=0;f<Se.length;f++){let u=`${Se[f]}${a}`;if(u in t)return e[n]=ve(ye(u))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=r(s[0]))})}function xe(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}async function ee(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||{},a=Object.assign({},t,s.runtime),f=a.defaults||{},u=a.cloakAttribute??"un-cloak";a.autoPrefix&&(f.postprocess=k(f.postprocess)).unshift(be(r.createElement("div").style)),a.configResolved?.(s,f);let c=await me(s,f),o=d=>{let w=t.rootElement?.();if(w){w.appendChild(d);return}a.inject?a.inject(d):n().prepend(d)},i=()=>a.rootElement?a.rootElement():r.body,l=new Map,p=!0,g=new Set,C,M,$=[],A=()=>new Promise(d=>{$.push(d),M!=null&&clearTimeout(M),M=setTimeout(()=>h().then(()=>{let w=$;$=[],w.forEach(E=>E())}),0)});function y(d,w=!1){if(d.nodeType!==1)return;let E=d;E.hasAttribute(u)&&E.removeAttribute(u),w&&E.querySelectorAll(`[${u}]`).forEach(R=>{R.removeAttribute(u)})}function v(d,w){let E=l.get(d);if(!E)if(E=r.createElement("style"),E.setAttribute("data-unocss-runtime-layer",d),l.set(d,E),w==null)o(E);else{let R=v(w),P=R.parentNode;P?P.insertBefore(E,R.nextSibling):o(E)}return E}async function h(){let d=[...g],w=await c.generate(d);return w.layers.reduce((R,P)=>(v(P,R).innerHTML=w.getLayer(P)??"",P),void 0),d.filter(R=>!w.matched.has(R)).forEach(R=>g.delete(R)),{...w,getStyleElement:R=>l.get(R),getStyleElements:()=>l}}async function m(d){let w=g.size;await c.applyExtractors(d,void 0,g),w!==g.size&&await A()}async function _(d=i()){let w=d&&d.outerHTML;w&&(await m(`${w} ${xe(w)}`),y(n()),y(d,!0))}let V=new MutationObserver(d=>{p||d.forEach(async w=>{if(w.target.nodeType!==1)return;let E=w.target;for(let R of l)if(E===R[1])return;if(w.type==="childList")w.addedNodes.forEach(async R=>{if(R.nodeType!==1)return;let P=R;C&&!C(P)||(await m(P.outerHTML),y(P))});else{if(C&&!C(E))return;if(w.attributeName!==u){let R=Array.from(E.attributes).map(B=>B.value?`${B.name}="${B.value}"`:B.name).join(" "),P=`<${E.tagName.toLowerCase()} ${R}>`;await m(P)}y(E)}})}),S=!1;function b(){if(S)return;let d=a.observer?.target?a.observer.target():i();d&&(V.observe(d,{childList:!0,subtree:!0,attributes:!0,attributeFilter:a.observer?.attributeFilter}),S=!0)}function x(){a.bypassDefined&&tt(c.blocked),_(),b()}function T(){r.readyState==="loading"?e.addEventListener("DOMContentLoaded",x):x()}let j=e.__unocss_runtime=e.__unocss_runtime={version:c.version,uno:c,async extract(d){O(d)||(d.forEach(w=>g.add(w)),d=""),await m(d)},extractAll:_,inspect(d){C=d},toggleObserver(d){d===void 0?p=!p:p=!!d,!S&&!p&&T()},update:h,presets:e.__unocss_runtime?.presets??{}};a.ready?.(j)!==!1&&(p=!1,T())}function tt(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}ee();})();
|
package/full.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Ji=Object.defineProperty;var Qi=(t,e)=>{for(var r in e)Ji(t,r,{get:e[r],enumerable:!0})};var Be="default",Un="preflights",ta="shortcuts",ea="imports",ra={[ea]:-200,[Un]:-100,[ta]:-10,[Be]:0},We=/[\\:]?[\s'"`;{}]+/g;function na(t){return t.split(We)}var oa={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return na(t)}};function _(t=[]){return Array.isArray(t)?t:[t]}function dt(t){return Array.from(new Set(t))}function Ln(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function B(t){return typeof t=="string"}var Dn=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Fe(t){return t instanceof Dn}function Q(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tt(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Te=tt;function ia(){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 aa=/^\[(.+?)~?="(.*)"\]$/;var sa=/[\w\u00A0-\uFFFF%-?]/;function Vn(t){return t.match(aa)}function It(t=""){return sa.test(t)}function la(t){return typeof t=="function"?{match:t}:t}function Fn(t){return t.length===3}function oe(t){return t!=null}function ca(){}var fa=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,o])=>t(o,e,n)))}},da=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function se(t){return B(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ua(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>se(e)):[t]:[se(t)]}function pa(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}var ma="__virtual_key__";function Nt(t){return t==null?"":pa(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function ie(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Ot(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return ie(n)&&ie(o)&&Object.keys(o).forEach(s=>{ie(n[s])&&ie(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ot(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Pt(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?Pt(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:Pt(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?Pt(n):n;return r}return t}function ha(t){return B(t[0])}function ga(t){return B(t[0])}var ae={};function ba(t=["-",":"]){let e=t.join("|");return ae[e]||(ae[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ae[e].lastIndex=0,ae[e]}function ya(t,e=["-",":"],r=5){let n=ba(e),o,i=t.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(f,u,p,m,g)=>{if(!e.includes(p))return f;o=!0,s.add(u+p);let h=g+u.length+p.length+1,x={length:f.length,items:[]};l.set(g,x);for(let $ of[...m.matchAll(/\S+/g)]){let k=h+$.index,b=l.get(k)?.items;b?l.delete(k):b=[{offset:k,length:$[0].length,className:$[0]}];for(let v of b)v.className=v.className==="~"?p===":"?`${u}${p}~`:u:v.className.replace(/^(!?)(.*)/,`$1${u}${p}$2`),x.items.push(v)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof t=="string"){c="";let f=0;for(let[u,p]of l)c+=t.slice(f,u),c+=p.items.map(m=>m.className).join(" "),f=u+p.length;c+=t.slice(f)}else{c=t;for(let[f,u]of l)c.overwrite(f,f+u.length,u.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return c.toString()}}}function xa(t,e=["-",":"],r=5){let n=ya(t,e,r);return typeof t=="string"?n.expanded:t}var Tn=new Set;function va(t){Tn.has(t)||(console.warn("[unocss]",t),Tn.add(t))}function Gn(t){return _(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Bn="_uno_resolved";async function $a(t){let e=typeof t=="function"?await t():await t;if(Bn in e)return e;e={...e},Object.defineProperty(e,Bn,{value:!0,enumerable:!1});let r=e.shortcuts?Gn(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=_(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function qn(t){let e=await $a(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(_).flatMap(qn))).flat()]:[e]}function wa(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[];for(let l of t){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&e.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline)}let s={pipeline:n?!1:{include:dt(Nn(...e)),exclude:dt(Nn(...r))}};return o.length&&(s.filesystem=dt(o.flat())),i.length&&(s.inline=dt(i.flat())),s}async function Wn(t={},e={}){let r=Object.assign({},e,t),n=Ln((await Promise.all((r.presets||[]).flatMap(_).flatMap(qn))).flat(),(y,w)=>y.name===w.name),o=[...n.filter(y=>y.enforce==="pre"),...n.filter(y=>!y.enforce),...n.filter(y=>y.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},ra,...i.map(y=>y.layers));function c(y){return dt(i.flatMap(w=>_(w[y]||[])))}let f=c("extractors"),u=s.find(y=>y.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=oa),u&&!f.includes(u)&&f.unshift(u),f.sort((y,w)=>(y.order||0)-(w.order||0));let p=c("rules"),m=p.length,g={},h=[];for(let[y,w]of p.entries()){let R=w[2]??(w[2]={});R.__index=y,ha(w)?_(R.prefix??"").forEach(H=>{g[H+w[0]]=w}):h.unshift(w)}let x={templates:dt(i.flatMap(y=>_(y.autocomplete?.templates))),extractors:i.flatMap(y=>_(y.autocomplete?.extractors)).sort((y,w)=>(y.order||0)-(w.order||0)),shorthands:Sa(i.map(y=>y.autocomplete?.shorthands||{}))},$=c("separators");$.length||($=[":","-"]);let k=wa(c("content")),b={mergeSelectors:!0,warn:!0,sortLayers:y=>y,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:ka(i.map(y=>y.theme)),rules:p,rulesSize:m,rulesDynamic:h,rulesStaticMap:g,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:x,variants:c("variants").map(la).sort((y,w)=>(y.order||0)-(w.order||0)),shortcuts:Gn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:$,details:r.details??r.envMode==="dev",content:k,transformers:Ln(c("transformers"),(y,w)=>y.name===w.name)},v=c("extendTheme");for(let y of v)b.theme=y(b.theme,b)||b.theme;for(let y of i)y?.configResolved?.(b);return b}function ka(t){return t.map(e=>e?Pt(e):{}).reduce((e,r)=>Ot(e,r),{})}function Sa(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function Nn(...t){return t.flatMap(Ea)}function Ea(t){return Array.isArray(t)?t:t?[t]:[]}var Ca="66.7.0-beta.1",X={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},za=class Hn{userConfig;defaults;version=Ca;events=ia();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new Hn(e,r);return n.config=await Wn(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Wn(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(Fe(s)&&Fe(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:X,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=this.config.preprocess.reduce((c,f)=>f(c)??c,e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async c=>{let f=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(f.variants=[...c[3]]);let u=await this.expandShortcut(f.currentSelector,f);return u?await this.stringifyShortcuts(f.variantMatch,f,u[0],u[1]):(await this.parseUtil(f.variantMatch,f))?.flatMap(p=>this.stringifyUtil(p,f)).filter(oe)},l=(await Promise.all(i.map(c=>s(c)))).flat().filter(c=>!!c);if(l?.length)return this.cache.set(n,l),l;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:c=!1}=r,f=B(e)?await this.applyExtractors(e,n,c?new Dn:new Set):Array.isArray(e)?new Set(e):e;if(s){let j={generator:this,theme:this.config.theme};this.config.safelist.flatMap(z=>typeof z=="function"?z(j):z).forEach(z=>{let A=z.trim();A&&!f.has(A)&&f.add(A)})}let u=l?"":`
|
|
1
|
+
"use strict";(()=>{var Ji=Object.defineProperty;var Qi=(t,e)=>{for(var r in e)Ji(t,r,{get:e[r],enumerable:!0})};var Be="default",Un="preflights",ta="shortcuts",ea="imports",ra={[ea]:-200,[Un]:-100,[ta]:-10,[Be]:0},We=/[\\:]?[\s'"`;{}]+/g;function na(t){return t.split(We)}var oa={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return na(t)}};function _(t=[]){return Array.isArray(t)?t:[t]}function dt(t){return Array.from(new Set(t))}function Ln(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function B(t){return typeof t=="string"}var Dn=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Fe(t){return t instanceof Dn}function Q(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tt(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Te=tt;function ia(){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 aa=/^\[(.+?)~?="(.*)"\]$/;var sa=/[\w\u00A0-\uFFFF%-?]/;function Vn(t){return t.match(aa)}function It(t=""){return sa.test(t)}function la(t){return typeof t=="function"?{match:t}:t}function Fn(t){return t.length===3}function oe(t){return t!=null}function ca(){}var fa=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,o])=>t(o,e,n)))}},da=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function se(t){return B(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function ua(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>se(e)):[t]:[se(t)]}function pa(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}var ma="__virtual_key__";function Nt(t){return t==null?"":pa(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function ie(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Ot(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return ie(n)&&ie(o)&&Object.keys(o).forEach(s=>{ie(n[s])&&ie(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ot(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Pt(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?Pt(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:Pt(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?Pt(n):n;return r}return t}function ha(t){return B(t[0])}function ga(t){return B(t[0])}var ae={};function ba(t=["-",":"]){let e=t.join("|");return ae[e]||(ae[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ae[e].lastIndex=0,ae[e]}function ya(t,e=["-",":"],r=5){let n=ba(e),o,i=t.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(f,u,p,m,g)=>{if(!e.includes(p))return f;o=!0,s.add(u+p);let h=g+u.length+p.length+1,x={length:f.length,items:[]};l.set(g,x);for(let $ of[...m.matchAll(/\S+/g)]){let k=h+$.index,b=l.get(k)?.items;b?l.delete(k):b=[{offset:k,length:$[0].length,className:$[0]}];for(let v of b)v.className=v.className==="~"?p===":"?`${u}${p}~`:u:v.className.replace(/^(!?)(.*)/,`$1${u}${p}$2`),x.items.push(v)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof t=="string"){c="";let f=0;for(let[u,p]of l)c+=t.slice(f,u),c+=p.items.map(m=>m.className).join(" "),f=u+p.length;c+=t.slice(f)}else{c=t;for(let[f,u]of l)c.overwrite(f,f+u.length,u.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return c.toString()}}}function xa(t,e=["-",":"],r=5){let n=ya(t,e,r);return typeof t=="string"?n.expanded:t}var Tn=new Set;function va(t){Tn.has(t)||(console.warn("[unocss]",t),Tn.add(t))}function Gn(t){return _(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Bn="_uno_resolved";async function $a(t){let e=typeof t=="function"?await t():await t;if(Bn in e)return e;e={...e},Object.defineProperty(e,Bn,{value:!0,enumerable:!1});let r=e.shortcuts?Gn(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=_(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function qn(t){let e=await $a(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(_).flatMap(qn))).flat()]:[e]}function wa(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[];for(let l of t){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&e.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline)}let s={pipeline:n?!1:{include:dt(Nn(...e)),exclude:dt(Nn(...r))}};return o.length&&(s.filesystem=dt(o.flat())),i.length&&(s.inline=dt(i.flat())),s}async function Wn(t={},e={}){let r=Object.assign({},e,t),n=Ln((await Promise.all((r.presets||[]).flatMap(_).flatMap(qn))).flat(),(y,w)=>y.name===w.name),o=[...n.filter(y=>y.enforce==="pre"),...n.filter(y=>!y.enforce),...n.filter(y=>y.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},ra,...i.map(y=>y.layers));function c(y){return dt(i.flatMap(w=>_(w[y]||[])))}let f=c("extractors"),u=s.find(y=>y.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=oa),u&&!f.includes(u)&&f.unshift(u),f.sort((y,w)=>(y.order||0)-(w.order||0));let p=c("rules"),m=p.length,g={},h=[];for(let[y,w]of p.entries()){let R=w[2]??(w[2]={});R.__index=y,ha(w)?_(R.prefix??"").forEach(H=>{g[H+w[0]]=w}):h.unshift(w)}let x={templates:dt(i.flatMap(y=>_(y.autocomplete?.templates))),extractors:i.flatMap(y=>_(y.autocomplete?.extractors)).sort((y,w)=>(y.order||0)-(w.order||0)),shorthands:Sa(i.map(y=>y.autocomplete?.shorthands||{}))},$=c("separators");$.length||($=[":","-"]);let k=wa(c("content")),b={mergeSelectors:!0,warn:!0,sortLayers:y=>y,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:ka(i.map(y=>y.theme)),rules:p,rulesSize:m,rulesDynamic:h,rulesStaticMap:g,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:x,variants:c("variants").map(la).sort((y,w)=>(y.order||0)-(w.order||0)),shortcuts:Gn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:$,details:r.details??r.envMode==="dev",content:k,transformers:Ln(c("transformers"),(y,w)=>y.name===w.name)},v=c("extendTheme");for(let y of v)b.theme=y(b.theme,b)||b.theme;for(let y of i)y?.configResolved?.(b);return b}function ka(t){return t.map(e=>e?Pt(e):{}).reduce((e,r)=>Ot(e,r),{})}function Sa(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function Nn(...t){return t.flatMap(Ea)}function Ea(t){return Array.isArray(t)?t:t?[t]:[]}var Ca="66.7.0",X={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},za=class Hn{userConfig;defaults;version=Ca;events=ia();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new Hn(e,r);return n.config=await Wn(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Wn(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(Fe(s)&&Fe(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:X,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=this.config.preprocess.reduce((c,f)=>f(c)??c,e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async c=>{let f=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(f.variants=[...c[3]]);let u=await this.expandShortcut(f.currentSelector,f);return u?await this.stringifyShortcuts(f.variantMatch,f,u[0],u[1]):(await this.parseUtil(f.variantMatch,f))?.flatMap(p=>this.stringifyUtil(p,f)).filter(oe)},l=(await Promise.all(i.map(c=>s(c)))).flat().filter(c=>!!c);if(l?.length)return this.cache.set(n,l),l;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:c=!1}=r,f=B(e)?await this.applyExtractors(e,n,c?new Dn:new Set):Array.isArray(e)?new Set(e):e;if(s){let j={generator:this,theme:this.config.theme};this.config.safelist.flatMap(z=>typeof z=="function"?z(j):z).forEach(z=>{let A=z.trim();A&&!f.has(A)&&f.add(A)})}let u=l?"":`
|
|
2
2
|
`,p=new Set([Be]),m=c?new Map:new Set,g=new Map,h={},x=Array.from(f).map(async j=>{if(m.has(j))return;let z=await this.parseToken(j);if(z!=null){m instanceof Map?m.set(j,{data:z,count:Fe(f)?f.getCount(j):-1}):m.add(j);for(let A of z){let G=A[3]||"",q=A[4]?.layer;g.has(G)||g.set(G,[]),g.get(G).push(A),q&&p.add(q)}}});await Promise.all(x),await(async()=>{if(!i)return;let j={generator:this,theme:this.config.theme},z=new Set([]);this.config.preflights.forEach(({layer:A=Un})=>{p.add(A),z.add(A)}),h=Object.fromEntries(await Promise.all(Array.from(z).map(async A=>[A,(await Promise.all(this.config.preflights.filter(G=>(G.layer||"preflights")===A).map(async G=>await G.getCSS(j)))).filter(Boolean).join(u)])))})();let $=j=>this.config.sortLayers(j.sort((z,A)=>(this.config.layers[z]??0)-(this.config.layers[A]??0)||z.localeCompare(A))),k=$(Array.from(p)),b={},v=this.config.outputToCssLayers,y=j=>{let z=j;return typeof v=="object"&&(z=v.cssLayerName?.(j)),z===null?null:z??j},w=(j=Be)=>{if(b[j])return b[j];let z=Array.from(g).sort((q,E)=>(this.parentOrders.get(q[0])??0)-(this.parentOrders.get(E[0])??0)||q[0]?.localeCompare(E[0]||"")||0).map(([q,E])=>{let P=E.length,T=E.filter(D=>(D[4]?.layer||"default")===j).sort((D,J)=>D[0]-J[0]||(D[4]?.sort||0)-(J[4]?.sort||0)||D[5]?.currentSelector?.localeCompare(J[5]?.currentSelector??"")||D[1]?.localeCompare(J[1]||"")||D[2]?.localeCompare(J[2]||"")||0).map(([,D,J,,Wt,,Le])=>[[[(D&&!Wt?.noScope?Aa(D,o):D)??"",Wt?.sort??0]],J,!!(Le??Wt?.noMerge)]);if(!T.length)return;let I=T.reverse().map(([D,J,Wt],Le)=>{if(!Wt&&this.config.mergeSelectors)for(let ht=Le+1;ht<P;ht++){let ot=T[ht];if(ot&&!ot[2]&&(D&&ot[0]||D==null&&ot[0]==null)&&ot[1]===J)return D&&ot[0]&&ot[0].push(...D),null}let Mn=D?dt(D.sort((ht,ot)=>ht[1]-ot[1]||ht[0]?.localeCompare(ot[0]||"")||0).map(ht=>ht[0]).filter(Boolean)):[];return Mn.length?`${Mn.join(`,${u}`)}{${J}}`:J}).filter(Boolean),Y=Array.from(new Set(I)).reverse().join(u);if(!q)return Y;let wt=q.split(" $$ ");return`${wt.join("{")}{${u}${Y}${u}${"}".repeat(wt.length)}`}).filter(Boolean).join(u);i&&(z=[h[j],z].filter(Boolean).join(u));let A;v&&z&&(A=y(j),A!==null&&(z=`@layer ${A}{${u}${z}${u}}`));let G=l?"":`/* layer: ${j}${A&&A!==j?`, alias: ${A}`:""} */${u}`;return b[j]=z?G+z:""},R=(j=k,z)=>{let A=j.filter(q=>!z?.includes(q)),G=A.map(w).filter(Boolean);if(v){let q=A;typeof v=="object"&&v.allLayers&&(q=$(Object.keys(this.config.layers))),q.length>0&&G.unshift(`@layer ${q.map(y).filter(oe).join(", ")};`)}return G.join(u)};return{get css(){return R()},layers:k,matched:m,getLayers:R,getLayer:w,setLayer:async(j,z)=>{let A=await z(w(j));return b[j]=A,A}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,l,c]=i;for(;s;){s=!1;let f=i[1];for(let u of this.config.variants){if(!u.multiPass&&c.has(u))continue;let p=await u.match(f,n);if(p){if(B(p)){if(p===f)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(u.multiPass)throw new Error("multiPass can not be used together with array return variants");let m=p.map(g=>{let h=g.matcher??f,x=[g,...l],$=new Set(c);return $.add(u),[i[0],h,x,$]});return(await Promise.all(m.map(g=>o(g)))).flat()}}i[1]=p.matcher??f,l.unshift(p),c.add(u),s=!0;break}}if(!s)break;if(l.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await o([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let o=r.slice().sort((c,f)=>(c.order||0)-(f.order||0)).reduceRight((c,f)=>u=>{let p=f.body?.(u.entries)||u.entries,m=Array.isArray(f.parent)?f.parent:[f.parent,void 0],g=f.selector?.(u.selector,p);return(f.handle??Ra)({...u,entries:p,selector:g||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:f.layer||u.layer,sort:f.sort||u.sort},c)},c=>c)({prefix:"",selector:_a(n),pseudo:"",entries:e[2]}),{parent:i,parentOrder:s}=o;i!=null&&s!=null&&this.parentOrders.set(i,s);let l={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:i,layer:o.layer,sort:o.sort,noMerge:o.noMerge};return this.config.postprocess.reduce((c,f)=>{let u=[];for(let p of c){let m=f(p);Array.isArray(m)?u.push(...m.filter(oe)):u.push(m||p)}return u},[l])}constructCustomCSS(e,r,n){let o=se(r);return B(o)?o:this.applyVariants([0,n||e.rawSelector,o,void 0,e.variantHandlers]).map(({selector:i,entries:s,parent:l})=>{let c=`${i}{${Nt(s)}}`;return l?`${l}{${c}}`:c}).join("")}async parseUtil(e,r,n=!1,o){let i=B(e)?await this.matchVariants(e):[e],s=async([c,f,u])=>{this.config.details&&(r.rules=r.rules??[]);let p={...r,variantHandlers:u},m=this.config.rulesStaticMap[f];if(m&&m[1]&&(n||!m[2]?.internal))return this.resolveCSSResult(c,m[1],m,p);for(let g of this.config.rulesDynamic){let[h,x,$]=g;if($?.internal&&!n)continue;let k=f;if($?.prefix){let w=_($.prefix);if(o){let R=_(o);if(!w.some(H=>R.includes(H)))continue}else{let R=w.find(H=>f.startsWith(H));if(R==null)continue;k=f.slice(R.length)}}let b=k.match(h);if(!b)continue;let v=await x(b,p);if(!v)continue;if(typeof v!="string")if(Symbol.asyncIterator in v){let w=[];for await(let R of v)R&&w.push(R);v=w}else Symbol.iterator in v&&!Array.isArray(v)&&(v=Array.from(v).filter(oe));let y=this.resolveCSSResult(c,v,g,p);if(y)return y}},l=(await Promise.all(i.map(c=>s(c)))).flat().filter(c=>!!c);if(l.length)return l}resolveCSSResult=(e,r,n,o)=>{let i=ua(r).filter(s=>s.length);if(i.length){this.config.details&&o.rules.push(n),o.generator.activatedRules.add(n);let s=n[2];return i.map(l=>{if(B(l))return[s.__index,l,s];let c=o.variantHandlers,f=s,u=m=>{c=[m,...c]},p=m=>{f={...f,...m}};for(let m of l)switch(m[0]){case X.variants:typeof m[1]=="function"?c=m[1](c)||c:c=[..._(m[1]),...c];break;case X.parent:u({parent:m[1]});break;case X.selector:u({selector:m[1]});break;case X.layer:u({layer:m[1]});break;case X.sort:p({sort:m[1]});break;case X.noMerge:p({noMerge:m[1]});break;case X.noScope:p({noScope:m[1]});break;case X.body:m[0]=ma;break}return[s.__index,e,l,f,c]})}};stringifyUtil(e,r){if(!e)return;if(Fn(e))return[[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0]];let n=this.applyVariants(e),o=[];for(let i of n){let{selector:s,entries:l,parent:c,layer:f,sort:u,noMerge:p}=i,m=Nt(l);if(!m)continue;let{layer:g,sort:h,...x}=e[3]??{},$={...x,layer:f??g,sort:u??h};o.push([e[0],s,m,c,$,this.config.details?r:void 0,p])}return o}async expandShortcut(e,r,n=5){if(n===0)return;let o=this.config.details?f=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(f)}:ca,i,s,l,c;for(let f of this.config.shortcuts){let u=e;if(f[2]?.prefix){let p=_(f[2].prefix).find(m=>e.startsWith(m));if(p==null)continue;u=e.slice(p.length)}if(ga(f)){if(f[0]===u){i=i||f[2],s=f[1],o(f);break}}else{let p=u.match(f[0]);if(p&&(s=f[1](p,r)),s){i=i||f[2],o(f);break}}}if(s&&(l=dt(_(s).filter(B).map(f=>xa(f.trim()).split(/\s+/g)).flat()),c=_(s).filter(f=>!B(f)).map(f=>({handles:[],value:f}))),!s){let f=B(e)?await this.matchVariants(e):[e];for(let u of f){let[p,m,g]=u;if(p!==m){let h=await this.expandShortcut(m,r,n-1);h&&(l=h[0].filter(B).map(x=>p.replace(m,x)),c=h[0].filter(x=>!B(x)).map(x=>({handles:[...x.handles,...g],value:x.value})))}}}if(!(!l?.length&&!c?.length))return[[await Promise.all(_(l).map(async f=>(await this.expandShortcut(f,r,n-1))?.[0]||[f])),c].flat(2).filter(f=>!!f),i]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new da,s=(await Promise.all(dt(n).map(async u=>{let p=B(u)?await this.parseUtil(u,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",se(u.value),void 0,u.handles]];return!p&&this.config.warn&&va(`unmatched utility "${u}" in shortcut "${e[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((u,p)=>u[0]-p[0]),[l,,c]=e,f=[];for(let u of s){if(Fn(u)){f.push([u[0],void 0,u[1],void 0,u[2],r,void 0]);continue}let p=Object.fromEntries(u[2])[X.shortcutsNoMerge],m=[...u[4],...p?[]:c];for(let{selector:g,entries:h,parent:x,sort:$,noMerge:k,layer:b}of this.applyVariants(u,m,l))i.getFallback(b??o.layer,new fa).getFallback(g,x,[[],u[0]])[0].push([h,!!(k??u[3]?.noMerge),$??0])}return f.concat(i.flatMap((u,p)=>u.map(([m,g],h,x)=>{let $=(k,b,v)=>{let y=Math.max(...v.map(R=>R[1])),w=v.map(R=>R[0]);return(k?[w.flat(1)]:w).map(R=>{let H=Nt(R);if(H)return[g,h,H,x,{...o,noMerge:b,sort:y,layer:p},r,void 0]})};return[[m.filter(([,k])=>k).map(([k,,b])=>[k,b]),!0],[m.filter(([,k])=>!k).map(([k,,b])=>[k,b]),!1]].map(([k,b])=>[...$(!1,b,k.filter(([v])=>v.some(y=>y[0]===X.shortcutsNoMerge))),...$(!0,b,k.filter(([v])=>v.every(y=>y[0]!==X.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):B(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(e):B(o)?o===e:o.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function Yn(t,e){return await za.create(t,e)}var Kn=/\s\$\$\s+/g;function ja(t){return Kn.test(t)}function Aa(t,e){return ja(t)?t.replace(Kn,e?` ${e} `:" "):e?`${e} ${t}`:t}var In=/^\[(.+?)(~?=)"(.*)"\]$/;function _a(t){return In.test(t)?t.replace(In,(e,r,n,o)=>`[${Te(r)}${n}"${Te(o)}"]`):`.${Te(t)}`}function Ra(t,e){return e(t)}var Jn=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function Pa(t={}){let e=t.prefix??"un-",r=t.prefixedOnly??!1,n=t.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let l=Vn(i);if(!l)return;let c=l[1];if(c.startsWith(e))c=c.slice(e.length);else if(r)return;let f=l[2],[,u="",p=f]=f.match(Jn)||[];if(p==="~"||n&&p==="true"||!p)return`${u}${c}`;if(o==null){let m=s?.config?.separators?.join("|");m?o=new RegExp(`^(.*\\](?:${m}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,m,g]=f.match(o)||[];if(g)return`${m}${u}${c}-${g}`}if(u&&/^[\d.]+$/.test(p)){let m=u.split(/([^:]*:)/g).filter(Boolean),g=m.pop()+p,h=m.join("");return[{matcher:`${u}${c}-${p}`},{matcher:`${h}${c}-${g}`}]}return`${u}${c}-${p}`}}}var Oa=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,Ma=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,Xn=/[\s'"`;>]+/;function La(t){return{name:"attributify",extract:({content:e,cursor:r})=>{let n=e.matchAll(Oa),o,i=0;for(let b of n){let[,v,y]=b,w=b.index+v.length;if(r>w&&r<=w+y.length){i=w,o=y;break}}if(!o)return null;let s=o.matchAll(Ma),l=0,c,f;for(let b of s){let[v,y,w]=b,R=i+b.index;if(r>R&&r<=R+v.length){l=R,c=y,f=w?.slice(1);break}}if(!c||c==="class"||c==="className"||c===":class")return null;let u=!!t?.prefix&&c.startsWith(t.prefix);if(t?.prefixedOnly&&!u)return null;let p=u?c.slice(t.prefix.length):c;if(f===void 0)return{extracted:p,resolveReplacement(b){let v=u?t.prefix.length:0;return{start:l+v,end:l+c.length,replacement:b}}};let m=l+c.length+2,g=Xn.exec(f),h=0,x;for(;g;){let[b]=g;if(r>m+h&&r<=m+h+g.index){x=f.slice(h,h+g.index);break}h+=g.index+b.length,g=Xn.exec(f.slice(h))}x===void 0&&(x=f.slice(h));let[,$="",k]=x.match(Jn)||[];return{extracted:`${$}${p}-${k}`,transformSuggestions(b){return b.filter(v=>v.startsWith(`${$}${p}-`)).map(v=>$+v.slice($.length+p.length+1))},resolveReplacement(b){return{start:h+m,end:h+m+x.length,replacement:$+b.slice($.length+p.length+1)}}}}}}var Fa=["v-bind:",":"],Zn=/[\s'"`;]+/g,Ne=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,Ta=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,Qn=["placeholder","fill","opacity","stroke-opacity"];function Ba(t){let e=t?.ignoreAttributes??Qn,r=t?.nonValuedAttribute??!0,n=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(Ne)).flatMap(i=>Array.from((i[1]||"").matchAll(Ta))).flatMap(([,i,...s])=>{let l=s.filter(Boolean).join("");if(e.includes(i))return[];for(let c of Fa)if(i.startsWith(c)){i=i.slice(c.length);break}if(!l){if(It(i)&&r!==!1){let c=[`[${i}=""]`];return n&&c.push(`[${i}="true"]`),c}return[]}return["class","className"].includes(i)?l.split(Zn).filter(It):Ne.test(l)?(Ne.lastIndex=0,this.extract({code:l})):t?.prefixedOnly&&t.prefix&&!i.startsWith(t.prefix)?[]:l.split(Zn).filter(c=>!!c&&c!==":").map(c=>`[${i}~="${c}"]`)})}}}var to=(t={})=>(t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??Qn,{name:"@unocss/preset-attributify",enforce:"post",variants:[Pa(t)],extractors:[Ba(t)],options:t,autocomplete:{extractors:[La(t)]},extractorDefault:t.strict?!1:void 0});var eo="__TAGIFY__",Wa=/<([\w:-]+)/g;function Na(t){let{prefix:e="",excludedTags:r=["b",/^h\d+$/,"table"]}=t;return{name:"tagify",extract({code:n}){return Array.from(n.matchAll(Wa)).filter(({1:o})=>{for(let i of r)if(typeof i=="string"){if(o===i)return!1}else if(i.lastIndex=0,i.test(o))return!1;return o.startsWith(e)}).map(([,o])=>`${eo}${o}`)}}}function Ia(t){let{extraProperties:e}=t,r=`${eo}${t.prefix??""}`;return{name:"tagify",match(n){if(!n.startsWith(r))return;let o=n.slice(r.length),i={matcher:o,selector:s=>s.slice(11)};return e&&(typeof e=="function"?i.body=s=>[...s,...Object.entries(e(o)??{})]:i.body=s=>[...s,...Object.entries(e)]),i}}}var ro=(t={})=>{let{defaultExtractor:e=!0}=t;return{name:"@unocss/preset-tagify",variants:[Ia(t)],extractors:[Na(t)],extractorDefault:e?void 0:!1}};var er={};Qi(er,{PseudoClassFunctions:()=>xo,PseudoClassFunctionsStr:()=>gt,PseudoClasses:()=>St,PseudoClassesAndElementsColonStr:()=>qe,PseudoClassesAndElementsStr:()=>Ge,PseudoClassesColon:()=>Et,PseudoClassesColonKeys:()=>Ke,PseudoClassesColonStr:()=>ue,PseudoClassesKeys:()=>Ye,PseudoClassesMulti:()=>Xe,PseudoClassesMultiStr:()=>Ve,PseudoClassesStr:()=>de,alphaPlaceholders:()=>Gt,alphaPlaceholdersRE:()=>mo,calcMaxWidthBySize:()=>cs,colorOpacityToString:()=>bt,colorToString:()=>W,createPartClasses:()=>tr,createPseudoClassFunctions:()=>Je,createPseudoClassesAndElements:()=>Ze,createTaggedPseudoClassMatcher:()=>$o,createTaggedPseudoClasses:()=>Qe,createValueHandler:()=>He,cssColorFunctions:()=>pe,excludedPseudo:()=>vo,getBracket:()=>co,getStringComponent:()=>kt,getStringComponents:()=>Lt,hasIconFn:()=>ds,hasThemeFn:()=>ss,hex2rgba:()=>ts,hueInterpolationMethods:()=>po,iconFnRE:()=>fs,isInterpolatedMethod:()=>Qa,parseCssColor:()=>et,polarColorSpace:()=>uo,rectangularColorSpace:()=>fo,themeFnRE:()=>bo,transformThemeFn:()=>ls,transformThemeString:()=>yo,variantGetBracket:()=>wo,variantGetParameter:()=>ko,variantMatcher:()=>Ct,variantParentMatcher:()=>it});var Ua=44,Da=59,no="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ao=new Uint8Array(64),Va=new Uint8Array(128);for(let t=0;t<no.length;t++){let e=no.charCodeAt(t);ao[t]=e,Va[e]=t}function Ut(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(ao[o])}while(n>0);return e}var oo=1024*16,io=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},Ga=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(oo)}write(t){let{buffer:e}=this;e[this.pos++]=t,this.pos===oo&&(this.out+=io.decode(e),this.pos=0)}flush(){let{buffer:t,out:e,pos:r}=this;return r>0?e+io.decode(t.subarray(0,r)):e}};function so(t){let e=new Ga,r=0,n=0,o=0,i=0;for(let s=0;s<t.length;s++){let l=t[s];if(s>0&&e.write(Da),l.length===0)continue;let c=0;for(let f=0;f<l.length;f++){let u=l[f];f>0&&e.write(Ua),c=Ut(e,u[0],c),u.length!==1&&(r=Ut(e,u[1],r),n=Ut(e,u[2],n),o=Ut(e,u[3],o),u.length!==4&&(i=Ut(e,u[4],i)))}}return e.flush()}var le=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},ce=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new t(e,this.end,o);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function qa(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var Ha=qa(),Ue=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=so(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Ha(this.toString())}};function Ya(t){let e=t.split(`
|
|
3
3
|
`),r=e.filter(i=>/^\t+/.test(i)),n=e.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,s)=>{let l=/^ +/.exec(s)[0].length;return Math.min(l,i)},1/0);return new Array(o+1).join(" ")}function Ka(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var Xa=Object.prototype.toString;function Za(t){return Xa.call(t)==="[object Object]"}function lo(t){let e=t.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<e.length;n++)r.push(o),o+=e[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let f=i+s>>1;o<r[f]?s=f:i=f+1}let l=i-1,c=o-r[l];return{line:l,column:c}}}var Ja=/\w/,De=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
|
package/mini.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Er=Object.defineProperty;var Ar=(e,t)=>{for(var n in t)Er(e,n,{get:t[n],enumerable:!0})};var ct="default",Zt="preflights",jr="shortcuts",Rr="imports",zr={[Rr]:-200,[Zt]:-100,[jr]:-10,[ct]:0},ft=/[\\:]?[\s'"`;{}]+/g;function Pr(e){return e.split(ft)}var _r={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Pr(e)}};function j(e=[]){return Array.isArray(e)?e:[e]}function ee(e){return Array.from(new Set(e))}function Vt(e,t){return e.reduce((n,r)=>(n.findIndex(s=>t(r,s))===-1&&n.push(r),n),[])}function M(e){return typeof e=="string"}var Jt=class extends Set{_map=new Map;constructor(e){if(super(),e)for(let t of e)this.add(t)}add(e){return this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.has(e)?(this._map.delete(e),super.delete(e)):!1}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function at(e){return e instanceof Jt}function K(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(e){let t=e.length,n=-1,r,s="",i=e.charCodeAt(0);for(;++n<t;){if(r=e.charCodeAt(n),r===0){s+="\uFFFD";continue}if(r===37){s+="\\%";continue}if(r===44){s+="\\,";continue}if(r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&i===45){s+=`\\${r.toString(16)} `;continue}if(n===0&&t===1&&r===45){s+=`\\${e.charAt(n)}`;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){s+=e.charAt(n);continue}s+=`\\${e.charAt(n)}`}return s}var lt=Y;function Or(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(n=>n(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(n=>n!==t)}}}var Mr=/^\[(.+?)~?="(.*)"\]$/;var Lr=/[\w\u00A0-\uFFFF%-?]/;function Qt(e){return e.match(Mr)}function ke(e=""){return Lr.test(e)}function Tr(e){return typeof e=="function"?{match:e}:e}function Gt(e){return e.length===3}function We(e){return e!=null}function Fr(){}var Nr=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(t)||r.set(t,n),r.get(t)}set(e,t,n){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([r,s])=>e(s,t,r)))}},Wr=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,r)=>{t.push(e(n,r))}),t}flatMap(e){let t=[];return this.forEach((n,r)=>{t.push(...e(n,r))}),t}};function De(e){return M(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Br(e){return Array.isArray(e)?e.some(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>De(t)):[e]:[De(e)]}function Ir(e){return e.filter(([t,n],r)=>{if(t.startsWith("$$"))return!1;for(let s=r-1;s>=0;s--)if(e[s][0]===t&&e[s][1]===n)return!1;return!0})}var Ur="__virtual_key__";function ve(e){return e==null?"":Ir(e).map(([t,n])=>n!=null&&typeof n!="function"?t!=="__virtual_key__"?`${t}:${n};`:n:void 0).filter(Boolean).join("")}function Be(e){return e&&typeof e=="object"&&!Array.isArray(e)}function en(e,t,n=!1){let r=e,s=t;if(Array.isArray(s))return n&&Array.isArray(s)?[...r,...s]:[...s];let i={...r};return Be(r)&&Be(s)&&Object.keys(s).forEach(o=>{Be(r[o])&&Be(s[o])||Array.isArray(r[o])&&Array.isArray(s[o])?i[o]=en(r[o],s[o],n):Object.assign(i,{[o]:s[o]})}),i}function Ue(e){let t,n,r;if(Array.isArray(e)){for(n=Array.from({length:t=e.length});t--;)n[t]=(r=e[t])&&typeof r=="object"?Ue(r):r;return n}if(Object.prototype.toString.call(e)==="[object Object]"){n={};for(t in e)t==="__proto__"?Object.defineProperty(n,t,{value:Ue(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=(r=e[t])&&typeof r=="object"?Ue(r):r;return n}return e}function Dr(e){return M(e[0])}function Vr(e){return M(e[0])}var Ie={};function Gr(e=["-",":"]){let t=e.join("|");return Ie[t]||(Ie[t]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ie[t].lastIndex=0,Ie[t]}function Hr(e,t=["-",":"],n=5){let r=Gr(t),s,i=e.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(r,(c,f,h,d,m)=>{if(!t.includes(h))return c;s=!0,o.add(f+h);let p=m+f.length+h.length+1,y={length:c.length,items:[]};a.set(m,y);for(let w of[...d.matchAll(/\S+/g)]){let v=p+w.index,g=a.get(v)?.items;g?a.delete(v):g=[{offset:v,length:w[0].length,className:w[0]}];for(let x of g)x.className=x.className==="~"?h===":"?`${f}${h}~`:f:x.className.replace(/^(!?)(.*)/,`$1${f}${h}$2`),y.items.push(x)}return"$".repeat(c.length)}),n-=1;while(s&&n);let l;if(typeof e=="string"){l="";let c=0;for(let[f,h]of a)l+=e.slice(c,f),l+=h.items.map(d=>d.className).join(" "),c=f+h.length;l+=e.slice(c)}else{l=e;for(let[c,f]of a)l.overwrite(c,c+f.length,f.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return l.toString()}}}function qr(e,t=["-",":"],n=5){let r=Hr(e,t,n);return typeof e=="string"?r.expanded:e}var Ht=new Set;function Kr(e){Ht.has(e)||(console.warn("[unocss]",e),Ht.add(e))}function tn(e){return j(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var qt="_uno_resolved";async function Yr(e){let t=typeof e=="function"?await e():await e;if(qt in t)return t;t={...t},Object.defineProperty(t,qt,{value:!0,enumerable:!1});let n=t.shortcuts?tn(t.shortcuts):void 0;if(t.shortcuts=n,t.prefix||t.layer){let r=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&t.prefix&&(i.prefix=j(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};n?.forEach(r),t.rules?.forEach(r)}return t}async function nn(e){let t=await Yr(e);return t.presets?[t,...(await Promise.all((t.presets||[]).flatMap(j).flatMap(nn))).flat()]:[t]}function Xr(e){if(e.length===0)return{};let t=[],n=[],r=!1,s=[],i=[];for(let a of e){if(a.pipeline===!1){r=!0;break}else a.pipeline?.include&&t.push(a.pipeline.include),a.pipeline?.exclude&&n.push(a.pipeline.exclude);a.filesystem&&s.push(a.filesystem),a.inline&&i.push(a.inline)}let o={pipeline:r?!1:{include:ee(Yt(...t)),exclude:ee(Yt(...n))}};return s.length&&(o.filesystem=ee(s.flat())),i.length&&(o.inline=ee(i.flat())),o}async function Kt(e={},t={}){let n=Object.assign({},t,e),r=Vt((await Promise.all((n.presets||[]).flatMap(j).flatMap(nn))).flat(),(b,$)=>b.name===$.name),s=[...r.filter(b=>b.enforce==="pre"),...r.filter(b=>!b.enforce),...r.filter(b=>b.enforce==="post")],i=[...s,n],o=[...i].reverse(),a=Object.assign({},zr,...i.map(b=>b.layers));function l(b){return ee(i.flatMap($=>j($[b]||[])))}let c=l("extractors"),f=o.find(b=>b.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=_r),f&&!c.includes(f)&&c.unshift(f),c.sort((b,$)=>(b.order||0)-($.order||0));let h=l("rules"),d=h.length,m={},p=[];for(let[b,$]of h.entries()){let z=$[2]??($[2]={});z.__index=b,Dr($)?j(z.prefix??"").forEach(H=>{m[H+$[0]]=$}):p.unshift($)}let y={templates:ee(i.flatMap(b=>j(b.autocomplete?.templates))),extractors:i.flatMap(b=>j(b.autocomplete?.extractors)).sort((b,$)=>(b.order||0)-($.order||0)),shorthands:Jr(i.map(b=>b.autocomplete?.shorthands||{}))},w=l("separators");w.length||(w=[":","-"]);let v=Xr(l("content")),g={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...n,blocklist:l("blocklist"),presets:s,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:Zr(i.map(b=>b.theme)),rules:h,rulesSize:d,rulesDynamic:p,rulesStaticMap:m,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:y,variants:l("variants").map(Tr).sort((b,$)=>(b.order||0)-($.order||0)),shortcuts:tn(l("shortcuts")).reverse(),extractors:c,safelist:l("safelist"),separators:w,details:n.details??n.envMode==="dev",content:v,transformers:Vt(l("transformers"),(b,$)=>b.name===$.name)},x=l("extendTheme");for(let b of x)g.theme=b(g.theme,g)||g.theme;for(let b of i)b?.configResolved?.(g);return g}function Zr(e){return e.map(t=>t?Ue(t):{}).reduce((t,n)=>en(t,n),{})}function Jr(e){return e.reduce((t,n)=>{let r={};for(let s in n){let i=n[s];Array.isArray(i)?r[s]=`(${i.join("|")})`:r[s]=i}return{...t,...r}},{})}function Yt(...e){return e.flatMap(Qr)}function Qr(e){return Array.isArray(e)?e:e?[e]:[]}var es="66.7.0-beta.1",V={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},ts=class rn{userConfig;defaults;version=es;events=Or();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(t={},n={}){this.userConfig=t,this.defaults=n}static async create(t={},n={}){let r=new rn(t,n);return r.config=await Kt(r.userConfig,r.defaults),r.events.emit("config",r.config),r}async setConfig(t,n){t&&(n&&(this.defaults=n),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Kt(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,n,r=new Set){let s={original:t,code:t,id:n,extracted:r,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(at(o)&&at(r))for(let a of o)r.setCount(a,r.getCount(a)+o.getCount(a));else for(let a of o)r.add(a)}return r}makeContext(t,n){let r={rawSelector:t,currentSelector:n[1],theme:this.config.theme,generator:this,symbols:V,variantHandlers:n[2],constructCSS:(...s)=>this.constructCustomCSS(r,...s),variantMatch:n};return r}async parseToken(t,n){if(this.blocked.has(t))return;let r=`${t}${n?` ${n}`:""}`;if(this.cache.has(r))return this.cache.get(r);let s=this.config.preprocess.reduce((l,c)=>c(l)??l,t);if(this.isBlocked(s)){this.blocked.add(t),this.cache.set(r,null);return}let i=await this.matchVariants(t,s);if(i.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this.cache.set(r,null);return}let o=async l=>{let c=this.makeContext(t,[n||l[0],l[1],l[2],l[3]]);this.config.details&&(c.variants=[...l[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.flatMap(h=>this.stringifyUtil(h,c)).filter(We)},a=(await Promise.all(i.map(l=>o(l)))).flat().filter(l=>!!l);if(a?.length)return this.cache.set(r,a),a;this.cache.set(r,null)}async generate(t,n={}){let{id:r,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=n,c=M(t)?await this.applyExtractors(t,r,l?new Jt:new Set):Array.isArray(t)?new Set(t):t;if(o){let S={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(S):C).forEach(C=>{let E=C.trim();E&&!c.has(E)&&c.add(E)})}let f=a?"":`
|
|
1
|
+
"use strict";(()=>{var Er=Object.defineProperty;var Ar=(e,t)=>{for(var n in t)Er(e,n,{get:t[n],enumerable:!0})};var ct="default",Zt="preflights",jr="shortcuts",Rr="imports",zr={[Rr]:-200,[Zt]:-100,[jr]:-10,[ct]:0},ft=/[\\:]?[\s'"`;{}]+/g;function Pr(e){return e.split(ft)}var _r={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Pr(e)}};function j(e=[]){return Array.isArray(e)?e:[e]}function ee(e){return Array.from(new Set(e))}function Vt(e,t){return e.reduce((n,r)=>(n.findIndex(s=>t(r,s))===-1&&n.push(r),n),[])}function M(e){return typeof e=="string"}var Jt=class extends Set{_map=new Map;constructor(e){if(super(),e)for(let t of e)this.add(t)}add(e){return this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.has(e)?(this._map.delete(e),super.delete(e)):!1}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function at(e){return e instanceof Jt}function K(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(e){let t=e.length,n=-1,r,s="",i=e.charCodeAt(0);for(;++n<t;){if(r=e.charCodeAt(n),r===0){s+="\uFFFD";continue}if(r===37){s+="\\%";continue}if(r===44){s+="\\,";continue}if(r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&i===45){s+=`\\${r.toString(16)} `;continue}if(n===0&&t===1&&r===45){s+=`\\${e.charAt(n)}`;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){s+=e.charAt(n);continue}s+=`\\${e.charAt(n)}`}return s}var lt=Y;function Or(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(n=>n(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(n=>n!==t)}}}var Mr=/^\[(.+?)~?="(.*)"\]$/;var Lr=/[\w\u00A0-\uFFFF%-?]/;function Qt(e){return e.match(Mr)}function ke(e=""){return Lr.test(e)}function Tr(e){return typeof e=="function"?{match:e}:e}function Gt(e){return e.length===3}function We(e){return e!=null}function Fr(){}var Nr=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(t)||r.set(t,n),r.get(t)}set(e,t,n){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([r,s])=>e(s,t,r)))}},Wr=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,r)=>{t.push(e(n,r))}),t}flatMap(e){let t=[];return this.forEach((n,r)=>{t.push(...e(n,r))}),t}};function De(e){return M(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Br(e){return Array.isArray(e)?e.some(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>De(t)):[e]:[De(e)]}function Ir(e){return e.filter(([t,n],r)=>{if(t.startsWith("$$"))return!1;for(let s=r-1;s>=0;s--)if(e[s][0]===t&&e[s][1]===n)return!1;return!0})}var Ur="__virtual_key__";function ve(e){return e==null?"":Ir(e).map(([t,n])=>n!=null&&typeof n!="function"?t!=="__virtual_key__"?`${t}:${n};`:n:void 0).filter(Boolean).join("")}function Be(e){return e&&typeof e=="object"&&!Array.isArray(e)}function en(e,t,n=!1){let r=e,s=t;if(Array.isArray(s))return n&&Array.isArray(s)?[...r,...s]:[...s];let i={...r};return Be(r)&&Be(s)&&Object.keys(s).forEach(o=>{Be(r[o])&&Be(s[o])||Array.isArray(r[o])&&Array.isArray(s[o])?i[o]=en(r[o],s[o],n):Object.assign(i,{[o]:s[o]})}),i}function Ue(e){let t,n,r;if(Array.isArray(e)){for(n=Array.from({length:t=e.length});t--;)n[t]=(r=e[t])&&typeof r=="object"?Ue(r):r;return n}if(Object.prototype.toString.call(e)==="[object Object]"){n={};for(t in e)t==="__proto__"?Object.defineProperty(n,t,{value:Ue(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=(r=e[t])&&typeof r=="object"?Ue(r):r;return n}return e}function Dr(e){return M(e[0])}function Vr(e){return M(e[0])}var Ie={};function Gr(e=["-",":"]){let t=e.join("|");return Ie[t]||(Ie[t]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ie[t].lastIndex=0,Ie[t]}function Hr(e,t=["-",":"],n=5){let r=Gr(t),s,i=e.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(r,(c,f,h,d,m)=>{if(!t.includes(h))return c;s=!0,o.add(f+h);let p=m+f.length+h.length+1,y={length:c.length,items:[]};a.set(m,y);for(let w of[...d.matchAll(/\S+/g)]){let v=p+w.index,g=a.get(v)?.items;g?a.delete(v):g=[{offset:v,length:w[0].length,className:w[0]}];for(let x of g)x.className=x.className==="~"?h===":"?`${f}${h}~`:f:x.className.replace(/^(!?)(.*)/,`$1${f}${h}$2`),y.items.push(x)}return"$".repeat(c.length)}),n-=1;while(s&&n);let l;if(typeof e=="string"){l="";let c=0;for(let[f,h]of a)l+=e.slice(c,f),l+=h.items.map(d=>d.className).join(" "),c=f+h.length;l+=e.slice(c)}else{l=e;for(let[c,f]of a)l.overwrite(c,c+f.length,f.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return l.toString()}}}function qr(e,t=["-",":"],n=5){let r=Hr(e,t,n);return typeof e=="string"?r.expanded:e}var Ht=new Set;function Kr(e){Ht.has(e)||(console.warn("[unocss]",e),Ht.add(e))}function tn(e){return j(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var qt="_uno_resolved";async function Yr(e){let t=typeof e=="function"?await e():await e;if(qt in t)return t;t={...t},Object.defineProperty(t,qt,{value:!0,enumerable:!1});let n=t.shortcuts?tn(t.shortcuts):void 0;if(t.shortcuts=n,t.prefix||t.layer){let r=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&t.prefix&&(i.prefix=j(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};n?.forEach(r),t.rules?.forEach(r)}return t}async function nn(e){let t=await Yr(e);return t.presets?[t,...(await Promise.all((t.presets||[]).flatMap(j).flatMap(nn))).flat()]:[t]}function Xr(e){if(e.length===0)return{};let t=[],n=[],r=!1,s=[],i=[];for(let a of e){if(a.pipeline===!1){r=!0;break}else a.pipeline?.include&&t.push(a.pipeline.include),a.pipeline?.exclude&&n.push(a.pipeline.exclude);a.filesystem&&s.push(a.filesystem),a.inline&&i.push(a.inline)}let o={pipeline:r?!1:{include:ee(Yt(...t)),exclude:ee(Yt(...n))}};return s.length&&(o.filesystem=ee(s.flat())),i.length&&(o.inline=ee(i.flat())),o}async function Kt(e={},t={}){let n=Object.assign({},t,e),r=Vt((await Promise.all((n.presets||[]).flatMap(j).flatMap(nn))).flat(),(b,$)=>b.name===$.name),s=[...r.filter(b=>b.enforce==="pre"),...r.filter(b=>!b.enforce),...r.filter(b=>b.enforce==="post")],i=[...s,n],o=[...i].reverse(),a=Object.assign({},zr,...i.map(b=>b.layers));function l(b){return ee(i.flatMap($=>j($[b]||[])))}let c=l("extractors"),f=o.find(b=>b.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=_r),f&&!c.includes(f)&&c.unshift(f),c.sort((b,$)=>(b.order||0)-($.order||0));let h=l("rules"),d=h.length,m={},p=[];for(let[b,$]of h.entries()){let z=$[2]??($[2]={});z.__index=b,Dr($)?j(z.prefix??"").forEach(H=>{m[H+$[0]]=$}):p.unshift($)}let y={templates:ee(i.flatMap(b=>j(b.autocomplete?.templates))),extractors:i.flatMap(b=>j(b.autocomplete?.extractors)).sort((b,$)=>(b.order||0)-($.order||0)),shorthands:Jr(i.map(b=>b.autocomplete?.shorthands||{}))},w=l("separators");w.length||(w=[":","-"]);let v=Xr(l("content")),g={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...n,blocklist:l("blocklist"),presets:s,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:Zr(i.map(b=>b.theme)),rules:h,rulesSize:d,rulesDynamic:p,rulesStaticMap:m,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:y,variants:l("variants").map(Tr).sort((b,$)=>(b.order||0)-($.order||0)),shortcuts:tn(l("shortcuts")).reverse(),extractors:c,safelist:l("safelist"),separators:w,details:n.details??n.envMode==="dev",content:v,transformers:Vt(l("transformers"),(b,$)=>b.name===$.name)},x=l("extendTheme");for(let b of x)g.theme=b(g.theme,g)||g.theme;for(let b of i)b?.configResolved?.(g);return g}function Zr(e){return e.map(t=>t?Ue(t):{}).reduce((t,n)=>en(t,n),{})}function Jr(e){return e.reduce((t,n)=>{let r={};for(let s in n){let i=n[s];Array.isArray(i)?r[s]=`(${i.join("|")})`:r[s]=i}return{...t,...r}},{})}function Yt(...e){return e.flatMap(Qr)}function Qr(e){return Array.isArray(e)?e:e?[e]:[]}var es="66.7.0",V={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},ts=class rn{userConfig;defaults;version=es;events=Or();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(t={},n={}){this.userConfig=t,this.defaults=n}static async create(t={},n={}){let r=new rn(t,n);return r.config=await Kt(r.userConfig,r.defaults),r.events.emit("config",r.config),r}async setConfig(t,n){t&&(n&&(this.defaults=n),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Kt(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,n,r=new Set){let s={original:t,code:t,id:n,extracted:r,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(at(o)&&at(r))for(let a of o)r.setCount(a,r.getCount(a)+o.getCount(a));else for(let a of o)r.add(a)}return r}makeContext(t,n){let r={rawSelector:t,currentSelector:n[1],theme:this.config.theme,generator:this,symbols:V,variantHandlers:n[2],constructCSS:(...s)=>this.constructCustomCSS(r,...s),variantMatch:n};return r}async parseToken(t,n){if(this.blocked.has(t))return;let r=`${t}${n?` ${n}`:""}`;if(this.cache.has(r))return this.cache.get(r);let s=this.config.preprocess.reduce((l,c)=>c(l)??l,t);if(this.isBlocked(s)){this.blocked.add(t),this.cache.set(r,null);return}let i=await this.matchVariants(t,s);if(i.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this.cache.set(r,null);return}let o=async l=>{let c=this.makeContext(t,[n||l[0],l[1],l[2],l[3]]);this.config.details&&(c.variants=[...l[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.flatMap(h=>this.stringifyUtil(h,c)).filter(We)},a=(await Promise.all(i.map(l=>o(l)))).flat().filter(l=>!!l);if(a?.length)return this.cache.set(r,a),a;this.cache.set(r,null)}async generate(t,n={}){let{id:r,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=n,c=M(t)?await this.applyExtractors(t,r,l?new Jt:new Set):Array.isArray(t)?new Set(t):t;if(o){let S={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(S):C).forEach(C=>{let E=C.trim();E&&!c.has(E)&&c.add(E)})}let f=a?"":`
|
|
2
2
|
`,h=new Set([ct]),d=l?new Map:new Set,m=new Map,p={},y=Array.from(c).map(async S=>{if(d.has(S))return;let C=await this.parseToken(S);if(C!=null){d instanceof Map?d.set(S,{data:C,count:at(c)?c.getCount(S):-1}):d.add(S);for(let E of C){let N=E[3]||"",F=E[4]?.layer;m.has(N)||m.set(N,[]),m.get(N).push(E),F&&h.add(F)}}});await Promise.all(y),await(async()=>{if(!i)return;let S={generator:this,theme:this.config.theme},C=new Set([]);this.config.preflights.forEach(({layer:E=Zt})=>{h.add(E),C.add(E)}),p=Object.fromEntries(await Promise.all(Array.from(C).map(async E=>[E,(await Promise.all(this.config.preflights.filter(N=>(N.layer||"preflights")===E).map(async N=>await N.getCSS(S)))).filter(Boolean).join(f)])))})();let w=S=>this.config.sortLayers(S.sort((C,E)=>(this.config.layers[C]??0)-(this.config.layers[E]??0)||C.localeCompare(E))),v=w(Array.from(h)),g={},x=this.config.outputToCssLayers,b=S=>{let C=S;return typeof x=="object"&&(C=x.cssLayerName?.(S)),C===null?null:C??S},$=(S=ct)=>{if(g[S])return g[S];let C=Array.from(m).sort((F,k)=>(this.parentOrders.get(F[0])??0)-(this.parentOrders.get(k[0])??0)||F[0]?.localeCompare(k[0]||"")||0).map(([F,k])=>{let A=k.length,P=k.filter(L=>(L[4]?.layer||"default")===S).sort((L,q)=>L[0]-q[0]||(L[4]?.sort||0)-(q[4]?.sort||0)||L[5]?.currentSelector?.localeCompare(q[5]?.currentSelector??"")||L[1]?.localeCompare(q[1]||"")||L[2]?.localeCompare(q[2]||"")||0).map(([,L,q,,we,,ot])=>[[[(L&&!we?.noScope?rs(L,s):L)??"",we?.sort??0]],q,!!(ot??we?.noMerge)]);if(!P.length)return;let O=P.reverse().map(([L,q,we],ot)=>{if(!we&&this.config.mergeSelectors)for(let se=ot+1;se<A;se++){let Z=P[se];if(Z&&!Z[2]&&(L&&Z[0]||L==null&&Z[0]==null)&&Z[1]===q)return L&&Z[0]&&Z[0].push(...L),null}let Dt=L?ee(L.sort((se,Z)=>se[1]-Z[1]||se[0]?.localeCompare(Z[0]||"")||0).map(se=>se[0]).filter(Boolean)):[];return Dt.length?`${Dt.join(`,${f}`)}{${q}}`:q}).filter(Boolean),W=Array.from(new Set(O)).reverse().join(f);if(!F)return W;let ae=F.split(" $$ ");return`${ae.join("{")}{${f}${W}${f}${"}".repeat(ae.length)}`}).filter(Boolean).join(f);i&&(C=[p[S],C].filter(Boolean).join(f));let E;x&&C&&(E=b(S),E!==null&&(C=`@layer ${E}{${f}${C}${f}}`));let N=a?"":`/* layer: ${S}${E&&E!==S?`, alias: ${E}`:""} */${f}`;return g[S]=C?N+C:""},z=(S=v,C)=>{let E=S.filter(F=>!C?.includes(F)),N=E.map($).filter(Boolean);if(x){let F=E;typeof x=="object"&&x.allLayers&&(F=w(Object.keys(this.config.layers))),F.length>0&&N.unshift(`@layer ${F.map(b).filter(We).join(", ")};`)}return N.join(f)};return{get css(){return z()},layers:v,matched:d,getLayers:z,getLayer:$,setLayer:async(S,C)=>{let E=await C($(S));return g[S]=E,E}}}async matchVariants(t,n){let r={rawSelector:t,theme:this.config.theme,generator:this},s=async i=>{let o=!0,[,,a,l]=i;for(;o;){o=!1;let c=i[1];for(let f of this.config.variants){if(!f.multiPass&&l.has(f))continue;let h=await f.match(c,r);if(h){if(M(h)){if(h===c)continue;h={matcher:h}}if(Array.isArray(h)){if(!h.length)continue;if(h.length===1)h=h[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let d=h.map(m=>{let p=m.matcher??c,y=[m,...a],w=new Set(l);return w.add(f),[i[0],p,y,w]});return(await Promise.all(d.map(m=>s(m)))).flat()}}i[1]=h.matcher??c,a.unshift(h),l.add(f),o=!0;break}}if(!o)break;if(a.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[i]};return await s([t,n||t,[],new Set])}applyVariants(t,n=t[4],r=t[1]){let s=n.slice().sort((l,c)=>(l.order||0)-(c.order||0)).reduceRight((l,c)=>f=>{let h=c.body?.(f.entries)||f.entries,d=Array.isArray(c.parent)?c.parent:[c.parent,void 0],m=c.selector?.(f.selector,h);return(c.handle??is)({...f,entries:h,selector:m||f.selector,parent:d[0]||f.parent,parentOrder:d[1]||f.parentOrder,layer:c.layer||f.layer,sort:c.sort||f.sort},l)},l=>l)({prefix:"",selector:ss(r),pseudo:"",entries:t[2]}),{parent:i,parentOrder:o}=s;i!=null&&o!=null&&this.parentOrders.set(i,o);let a={selector:[s.prefix,s.selector,s.pseudo].join(""),entries:s.entries,parent:i,layer:s.layer,sort:s.sort,noMerge:s.noMerge};return this.config.postprocess.reduce((l,c)=>{let f=[];for(let h of l){let d=c(h);Array.isArray(d)?f.push(...d.filter(We)):f.push(d||h)}return f},[a])}constructCustomCSS(t,n,r){let s=De(n);return M(s)?s:this.applyVariants([0,r||t.rawSelector,s,void 0,t.variantHandlers]).map(({selector:i,entries:o,parent:a})=>{let l=`${i}{${ve(o)}}`;return a?`${a}{${l}}`:l}).join("")}async parseUtil(t,n,r=!1,s){let i=M(t)?await this.matchVariants(t):[t],o=async([l,c,f])=>{this.config.details&&(n.rules=n.rules??[]);let h={...n,variantHandlers:f},d=this.config.rulesStaticMap[c];if(d&&d[1]&&(r||!d[2]?.internal))return this.resolveCSSResult(l,d[1],d,h);for(let m of this.config.rulesDynamic){let[p,y,w]=m;if(w?.internal&&!r)continue;let v=c;if(w?.prefix){let $=j(w.prefix);if(s){let z=j(s);if(!$.some(H=>z.includes(H)))continue}else{let z=$.find(H=>c.startsWith(H));if(z==null)continue;v=c.slice(z.length)}}let g=v.match(p);if(!g)continue;let x=await y(g,h);if(!x)continue;if(typeof x!="string")if(Symbol.asyncIterator in x){let $=[];for await(let z of x)z&&$.push(z);x=$}else Symbol.iterator in x&&!Array.isArray(x)&&(x=Array.from(x).filter(We));let b=this.resolveCSSResult(l,x,m,h);if(b)return b}},a=(await Promise.all(i.map(l=>o(l)))).flat().filter(l=>!!l);if(a.length)return a}resolveCSSResult=(t,n,r,s)=>{let i=Br(n).filter(o=>o.length);if(i.length){this.config.details&&s.rules.push(r),s.generator.activatedRules.add(r);let o=r[2];return i.map(a=>{if(M(a))return[o.__index,a,o];let l=s.variantHandlers,c=o,f=d=>{l=[d,...l]},h=d=>{c={...c,...d}};for(let d of a)switch(d[0]){case V.variants:typeof d[1]=="function"?l=d[1](l)||l:l=[...j(d[1]),...l];break;case V.parent:f({parent:d[1]});break;case V.selector:f({selector:d[1]});break;case V.layer:f({layer:d[1]});break;case V.sort:h({sort:d[1]});break;case V.noMerge:h({noMerge:d[1]});break;case V.noScope:h({noScope:d[1]});break;case V.body:d[0]=Ur;break}return[o.__index,t,a,c,l]})}};stringifyUtil(t,n){if(!t)return;if(Gt(t))return[[t[0],void 0,t[1],void 0,t[2],this.config.details?n:void 0,void 0]];let r=this.applyVariants(t),s=[];for(let i of r){let{selector:o,entries:a,parent:l,layer:c,sort:f,noMerge:h}=i,d=ve(a);if(!d)continue;let{layer:m,sort:p,...y}=t[3]??{},w={...y,layer:c??m,sort:f??p};s.push([t[0],o,d,l,w,this.config.details?n:void 0,h])}return s}async expandShortcut(t,n,r=5){if(r===0)return;let s=this.config.details?c=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(c)}:Fr,i,o,a,l;for(let c of this.config.shortcuts){let f=t;if(c[2]?.prefix){let h=j(c[2].prefix).find(d=>t.startsWith(d));if(h==null)continue;f=t.slice(h.length)}if(Vr(c)){if(c[0]===f){i=i||c[2],o=c[1],s(c);break}}else{let h=f.match(c[0]);if(h&&(o=c[1](h,n)),o){i=i||c[2],s(c);break}}}if(o&&(a=ee(j(o).filter(M).map(c=>qr(c.trim()).split(/\s+/g)).flat()),l=j(o).filter(c=>!M(c)).map(c=>({handles:[],value:c}))),!o){let c=M(t)?await this.matchVariants(t):[t];for(let f of c){let[h,d,m]=f;if(h!==d){let p=await this.expandShortcut(d,n,r-1);p&&(a=p[0].filter(M).map(y=>h.replace(d,y)),l=p[0].filter(y=>!M(y)).map(y=>({handles:[...y.handles,...m],value:y.value})))}}}if(!(!a?.length&&!l?.length))return[[await Promise.all(j(a).map(async c=>(await this.expandShortcut(c,n,r-1))?.[0]||[c])),l].flat(2).filter(c=>!!c),i]}async stringifyShortcuts(t,n,r,s={layer:this.config.shortcutsLayer}){let i=new Wr,o=(await Promise.all(ee(r).map(async f=>{let h=M(f)?await this.parseUtil(f,n,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",De(f.value),void 0,f.handles]];return!h&&this.config.warn&&Kr(`unmatched utility "${f}" in shortcut "${t[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((f,h)=>f[0]-h[0]),[a,,l]=t,c=[];for(let f of o){if(Gt(f)){c.push([f[0],void 0,f[1],void 0,f[2],n,void 0]);continue}let h=Object.fromEntries(f[2])[V.shortcutsNoMerge],d=[...f[4],...h?[]:l];for(let{selector:m,entries:p,parent:y,sort:w,noMerge:v,layer:g}of this.applyVariants(f,d,a))i.getFallback(g??s.layer,new Nr).getFallback(m,y,[[],f[0]])[0].push([p,!!(v??f[3]?.noMerge),w??0])}return c.concat(i.flatMap((f,h)=>f.map(([d,m],p,y)=>{let w=(v,g,x)=>{let b=Math.max(...x.map(z=>z[1])),$=x.map(z=>z[0]);return(v?[$.flat(1)]:$).map(z=>{let H=ve(z);if(H)return[m,p,H,y,{...s,noMerge:g,sort:b,layer:h},n,void 0]})};return[[d.filter(([,v])=>v).map(([v,,g])=>[v,g]),!0],[d.filter(([,v])=>!v).map(([v,,g])=>[v,g]),!1]].map(([v,g])=>[...w(!1,g,v.filter(([x])=>x.some(b=>b[0]===V.shortcutsNoMerge))),...w(!0,g,v.filter(([x])=>x.every(b=>b[0]!==V.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(n=>Array.isArray(n)?n[0]:n).some(n=>typeof n=="function"?n(t):M(n)?n===t:n.test(t))}getBlocked(t){let n=this.config.blocklist.find(r=>{let s=Array.isArray(r)?r[0]:r;return typeof s=="function"?s(t):M(s)?s===t:s.test(t)});return n?Array.isArray(n)?n:[n,void 0]:void 0}};async function sn(e,t){return await ts.create(e,t)}var on=/\s\$\$\s+/g;function ns(e){return on.test(e)}function rs(e,t){return ns(e)?e.replace(on,t?` ${t} `:" "):t?`${t} ${e}`:e}var Xt=/^\[(.+?)(~?=)"(.*)"\]$/;function ss(e){return Xt.test(e)?e.replace(Xt,(t,n,r,s)=>`[${lt(n)}${r}"${lt(s)}"]`):`.${lt(e)}`}function is(e,t){return t(e)}var cn=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function as(e={}){let t=e.prefix??"un-",n=e.prefixedOnly??!1,r=e.trueToNonValued??!1,s;return{name:"attributify",match(i,{generator:o}){let a=Qt(i);if(!a)return;let l=a[1];if(l.startsWith(t))l=l.slice(t.length);else if(n)return;let c=a[2],[,f="",h=c]=c.match(cn)||[];if(h==="~"||r&&h==="true"||!h)return`${f}${l}`;if(s==null){let d=o?.config?.separators?.join("|");d?s=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):s=!1}if(s){let[,d,m]=c.match(s)||[];if(m)return`${d}${f}${l}-${m}`}if(f&&/^[\d.]+$/.test(h)){let d=f.split(/([^:]*:)/g).filter(Boolean),m=d.pop()+h,p=d.join("");return[{matcher:`${f}${l}-${h}`},{matcher:`${p}${l}-${m}`}]}return`${f}${l}-${h}`}}}var ls=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,cs=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,an=/[\s'"`;>]+/;function fs(e){return{name:"attributify",extract:({content:t,cursor:n})=>{let r=t.matchAll(ls),s,i=0;for(let g of r){let[,x,b]=g,$=g.index+x.length;if(n>$&&n<=$+b.length){i=$,s=b;break}}if(!s)return null;let o=s.matchAll(cs),a=0,l,c;for(let g of o){let[x,b,$]=g,z=i+g.index;if(n>z&&n<=z+x.length){a=z,l=b,c=$?.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;let f=!!e?.prefix&&l.startsWith(e.prefix);if(e?.prefixedOnly&&!f)return null;let h=f?l.slice(e.prefix.length):l;if(c===void 0)return{extracted:h,resolveReplacement(g){let x=f?e.prefix.length:0;return{start:a+x,end:a+l.length,replacement:g}}};let d=a+l.length+2,m=an.exec(c),p=0,y;for(;m;){let[g]=m;if(n>d+p&&n<=d+p+m.index){y=c.slice(p,p+m.index);break}p+=m.index+g.length,m=an.exec(c.slice(p))}y===void 0&&(y=c.slice(p));let[,w="",v]=y.match(cn)||[];return{extracted:`${w}${h}-${v}`,transformSuggestions(g){return g.filter(x=>x.startsWith(`${w}${h}-`)).map(x=>w+x.slice(w.length+h.length+1))},resolveReplacement(g){return{start:p+d,end:p+d+y.length,replacement:w+g.slice(w.length+h.length+1)}}}}}}var us=["v-bind:",":"],ln=/[\s'"`;]+/g,ut=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,hs=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,fn=["placeholder","fill","opacity","stroke-opacity"];function ds(e){let t=e?.ignoreAttributes??fn,n=e?.nonValuedAttribute??!0,r=e?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:s}){return Array.from(s.matchAll(ut)).flatMap(i=>Array.from((i[1]||"").matchAll(hs))).flatMap(([,i,...o])=>{let a=o.filter(Boolean).join("");if(t.includes(i))return[];for(let l of us)if(i.startsWith(l)){i=i.slice(l.length);break}if(!a){if(ke(i)&&n!==!1){let l=[`[${i}=""]`];return r&&l.push(`[${i}="true"]`),l}return[]}return["class","className"].includes(i)?a.split(ln).filter(ke):ut.test(a)?(ut.lastIndex=0,this.extract({code:a})):e?.prefixedOnly&&e.prefix&&!i.startsWith(e.prefix)?[]:a.split(ln).filter(l=>!!l&&l!==":").map(l=>`[${i}~="${l}"]`)})}}}var un=(e={})=>(e.strict=e.strict??!1,e.prefix=e.prefix??"un-",e.prefixedOnly=e.prefixedOnly??!1,e.nonValuedAttribute=e.nonValuedAttribute??!0,e.ignoreAttributes=e.ignoreAttributes??fn,{name:"@unocss/preset-attributify",enforce:"post",variants:[as(e)],extractors:[ds(e)],options:e,autocomplete:{extractors:[fs(e)]},extractorDefault:e.strict?!1:void 0});var ht=Object.defineProperty,ps=Object.getOwnPropertyDescriptor,ms=Object.getOwnPropertyNames,gs=Object.prototype.hasOwnProperty,Ve=(e,t)=>{let n={};for(var r in e)ht(n,r,{get:e[r],enumerable:!0});return t||ht(n,Symbol.toStringTag,{value:"Module"}),n},hn=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=ms(t),i=0,o=s.length,a;i<o;i++)a=s[i],!gs.call(e,a)&&a!==n&&ht(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=ps(t,a))||r.enumerable});return e},dt=(e,t,n)=>(hn(e,t,"default"),n&&hn(n,t,"default"));var jt={};Ar(jt,{PseudoClassFunctions:()=>jn,PseudoClassFunctionsStr:()=>ie,PseudoClasses:()=>ce,PseudoClassesAndElementsColonStr:()=>xt,PseudoClassesAndElementsStr:()=>bt,PseudoClassesColon:()=>fe,PseudoClassesColonKeys:()=>vt,PseudoClassesColonStr:()=>Ye,PseudoClassesKeys:()=>wt,PseudoClassesMulti:()=>kt,PseudoClassesMultiStr:()=>gt,PseudoClassesStr:()=>Ke,alphaPlaceholders:()=>yt,alphaPlaceholdersRE:()=>kn,calcMaxWidthBySize:()=>Ns,colorOpacityToString:()=>xe,colorToString:()=>D,createPartClasses:()=>At,createPseudoClassFunctions:()=>Ct,createPseudoClassesAndElements:()=>St,createTaggedPseudoClassMatcher:()=>zn,createTaggedPseudoClasses:()=>Et,createValueHandler:()=>$t,cssColorFunctions:()=>Xe,excludedPseudo:()=>Rn,getBracket:()=>yn,getStringComponent:()=>le,getStringComponents:()=>be,hasIconFn:()=>Bs,hasThemeFn:()=>Ts,hex2rgba:()=>Rs,hueInterpolationMethods:()=>vn,iconFnRE:()=>Ws,isInterpolatedMethod:()=>js,parseCssColor:()=>oe,polarColorSpace:()=>wn,rectangularColorSpace:()=>$n,themeFnRE:()=>En,transformThemeFn:()=>Fs,transformThemeString:()=>An,variantGetBracket:()=>Pn,variantGetParameter:()=>_n,variantMatcher:()=>Us,variantParentMatcher:()=>Ds});var bs=44,xs=59,dn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gn=new Uint8Array(64),ys=new Uint8Array(128);for(let e=0;e<dn.length;e++){let t=dn.charCodeAt(e);gn[e]=t,ys[t]=e}function Se(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let s=r&31;r>>>=5,r>0&&(s|=32),e.write(gn[s])}while(r>0);return t}var pn=1024*16,mn=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},$s=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(pn)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===pn&&(this.out+=mn.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+mn.decode(e.subarray(0,n)):t}};function bn(e){let t=new $s,n=0,r=0,s=0,i=0;for(let o=0;o<e.length;o++){let a=e[o];if(o>0&&t.write(xs),a.length===0)continue;let l=0;for(let c=0;c<a.length;c++){let f=a[c];c>0&&t.write(bs),l=Se(t,f[0],l),f.length!==1&&(n=Se(t,f[1],n),r=Se(t,f[2],r),s=Se(t,f[3],s),f.length!==4&&(i=Se(t,f[4],i)))}}return t.flush()}var Ge=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},He=class e{constructor(t,n,r){this.start=t,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let n=this;for(;n;)t(n),n=n.next}eachPrevious(t){let n=this;for(;n;)t(n),n=n.previous}edit(t,n,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=n,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let n=t-this.start,r=this.original.slice(0,n),s=this.original.slice(n);this.original=r;let i=new e(t,this.end,s);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=r,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,!0),this.edited&&this.edit(n,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let n=this.content.replace(t,"");if(n.length){if(n!==this.content){let r=this.split(this.end-n.length);this.edited&&r.edit(n,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function ws(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var vs=ws(),pt=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=bn(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+vs(this.toString())}};function ks(e){let t=e.split(`
|
|
3
3
|
`),n=t.filter(i=>/^\t+/.test(i)),r=t.filter(i=>/^ {2,}/.test(i));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return" ";let s=r.reduce((i,o)=>{let a=/^ +/.exec(o)[0].length;return Math.min(a,i)},1/0);return new Array(s+1).join(" ")}function Ss(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let s=n.length;for(;s--;)n[s]=".."}return n.concat(r).join("/")}var Cs=Object.prototype.toString;function Es(e){return Cs.call(e)==="[object Object]"}function xn(e){let t=e.split(`
|
|
4
4
|
`),n=[];for(let r=0,s=0;r<t.length;r++)n.push(s),s+=t[r].length+1;return function(s){let i=0,o=n.length;for(;i<o;){let c=i+o>>1;s<n[c]?o=c:i=c+1}let a=i-1,l=s-n[a];return{line:a,column:l}}}var As=/\w/,mt=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,n,r,s){if(n.length){let i=n.length-1,o=n.indexOf(`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.7.0
|
|
4
|
+
"version": "66.7.0",
|
|
5
5
|
"description": "CSS-in-JS Runtime for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@iconify/utils": "^3.1.3",
|
|
39
|
-
"@unocss/
|
|
40
|
-
"@unocss/
|
|
41
|
-
"@unocss/preset-uno": "66.7.0
|
|
39
|
+
"@unocss/preset-attributify": "66.7.0",
|
|
40
|
+
"@unocss/core": "66.7.0",
|
|
41
|
+
"@unocss/preset-uno": "66.7.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsup": "^8.5.1"
|
package/uno.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Li=Object.defineProperty;var Fi=(t,e)=>{for(var r in e)Li(t,r,{get:e[r],enumerable:!0})};var Me="default",On="preflights",Bi="shortcuts",Ti="imports",Wi={[Ti]:-200,[On]:-100,[Bi]:-10,[Me]:0},Pe=/[\\:]?[\s'"`;{}]+/g;function Ni(t){return t.split(Pe)}var Ii={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ni(t)}};function j(t=[]){return Array.isArray(t)?t:[t]}function ct(t){return Array.from(new Set(t))}function zn(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function F(t){return typeof t=="string"}var Ln=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Ae(t){return t instanceof Ln}function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Re=Z;function Ui(){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 Di=/[\w\u00A0-\uFFFF%-?]/;function Fn(t=""){return Di.test(t)}function Vi(t){return typeof t=="function"?{match:t}:t}function jn(t){return t.length===3}function Zt(t){return t!=null}function Gi(){}var Hi=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,o])=>t(o,e,n)))}},qi=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function ee(t){return F(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Yi(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>ee(e)):[t]:[ee(t)]}function Xi(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}var Ki="__virtual_key__";function Lt(t){return t==null?"":Xi(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function Jt(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Bn(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Jt(n)&&Jt(o)&&Object.keys(o).forEach(a=>{Jt(n[a])&&Jt(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Bn(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function te(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?te(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:te(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?te(n):n;return r}return t}function Zi(t){return F(t[0])}function Ji(t){return F(t[0])}var Qt={};function Qi(t=["-",":"]){let e=t.join("|");return Qt[e]||(Qt[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Qt[e].lastIndex=0,Qt[e]}function ta(t,e=["-",":"],r=5){let n=Qi(e),o,i=t.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(l,u,d,p,h)=>{if(!e.includes(d))return l;o=!0,a.add(u+d);let m=h+u.length+d.length+1,x={length:l.length,items:[]};s.set(h,x);for(let S of[...p.matchAll(/\S+/g)]){let v=m+S.index,y=s.get(v)?.items;y?s.delete(v):y=[{offset:v,length:S[0].length,className:S[0]}];for(let b of y)b.className=b.className==="~"?d===":"?`${u}${d}~`:u:b.className.replace(/^(!?)(.*)/,`$1${u}${d}$2`),x.items.push(b)}return"$".repeat(l.length)}),r-=1;while(o&&r);let c;if(typeof t=="string"){c="";let l=0;for(let[u,d]of s)c+=t.slice(l,u),c+=d.items.map(p=>p.className).join(" "),l=u+d.length;c+=t.slice(l)}else{c=t;for(let[l,u]of s)c.overwrite(l,l+u.length,u.items.map(d=>d.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function ea(t,e=["-",":"],r=5){let n=ta(t,e,r);return typeof t=="string"?n.expanded:t}var _n=new Set;function ra(t){_n.has(t)||(console.warn("[unocss]",t),_n.add(t))}function Tn(t){return j(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var An="_uno_resolved";async function na(t){let e=typeof t=="function"?await t():await t;if(An in e)return e;e={...e},Object.defineProperty(e,An,{value:!0,enumerable:!1});let r=e.shortcuts?Tn(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=j(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function Wn(t){let e=await na(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(j).flatMap(Wn))).flat()]:[e]}function oa(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[];for(let s of t){if(s.pipeline===!1){n=!0;break}else s.pipeline?.include&&e.push(s.pipeline.include),s.pipeline?.exclude&&r.push(s.pipeline.exclude);s.filesystem&&o.push(s.filesystem),s.inline&&i.push(s.inline)}let a={pipeline:n?!1:{include:ct(Mn(...e)),exclude:ct(Mn(...r))}};return o.length&&(a.filesystem=ct(o.flat())),i.length&&(a.inline=ct(i.flat())),a}async function Rn(t={},e={}){let r=Object.assign({},e,t),n=zn((await Promise.all((r.presets||[]).flatMap(j).flatMap(Wn))).flat(),(g,$)=>g.name===$.name),o=[...n.filter(g=>g.enforce==="pre"),...n.filter(g=>!g.enforce),...n.filter(g=>g.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},Wi,...i.map(g=>g.layers));function c(g){return ct(i.flatMap($=>j($[g]||[])))}let l=c("extractors"),u=a.find(g=>g.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=Ii),u&&!l.includes(u)&&l.unshift(u),l.sort((g,$)=>(g.order||0)-($.order||0));let d=c("rules"),p=d.length,h={},m=[];for(let[g,$]of d.entries()){let L=$[2]??($[2]={});L.__index=g,Zi($)?j(L.prefix??"").forEach(Y=>{h[Y+$[0]]=$}):m.unshift($)}let x={templates:ct(i.flatMap(g=>j(g.autocomplete?.templates))),extractors:i.flatMap(g=>j(g.autocomplete?.extractors)).sort((g,$)=>(g.order||0)-($.order||0)),shorthands:aa(i.map(g=>g.autocomplete?.shorthands||{}))},S=c("separators");S.length||(S=[":","-"]);let v=oa(c("content")),y={mergeSelectors:!0,warn:!0,sortLayers:g=>g,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:ia(i.map(g=>g.theme)),rules:d,rulesSize:p,rulesDynamic:m,rulesStaticMap:h,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:x,variants:c("variants").map(Vi).sort((g,$)=>(g.order||0)-($.order||0)),shortcuts:Tn(c("shortcuts")).reverse(),extractors:l,safelist:c("safelist"),separators:S,details:r.details??r.envMode==="dev",content:v,transformers:zn(c("transformers"),(g,$)=>g.name===$.name)},b=c("extendTheme");for(let g of b)y.theme=g(y.theme,y)||y.theme;for(let g of i)g?.configResolved?.(y);return y}function ia(t){return t.map(e=>e?te(e):{}).reduce((e,r)=>Bn(e,r),{})}function aa(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function Mn(...t){return t.flatMap(sa)}function sa(t){return Array.isArray(t)?t:t?[t]:[]}var ca="66.7.0-beta.1",H={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},la=class Nn{userConfig;defaults;version=ca;events=Ui();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new Nn(e,r);return n.config=await Rn(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Rn(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(Ae(a)&&Ae(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:H,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=this.config.preprocess.reduce((c,l)=>l(c)??c,e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let a=async c=>{let l=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(l.variants=[...c[3]]);let u=await this.expandShortcut(l.currentSelector,l);return u?await this.stringifyShortcuts(l.variantMatch,l,u[0],u[1]):(await this.parseUtil(l.variantMatch,l))?.flatMap(d=>this.stringifyUtil(d,l)).filter(Zt)},s=(await Promise.all(i.map(c=>a(c)))).flat().filter(c=>!!c);if(s?.length)return this.cache.set(n,s),s;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,l=F(e)?await this.applyExtractors(e,n,c?new Ln:new Set):Array.isArray(e)?new Set(e):e;if(a){let C={generator:this,theme:this.config.theme};this.config.safelist.flatMap(E=>typeof E=="function"?E(C):E).forEach(E=>{let z=E.trim();z&&!l.has(z)&&l.add(z)})}let u=s?"":`
|
|
1
|
+
"use strict";(()=>{var Li=Object.defineProperty;var Fi=(t,e)=>{for(var r in e)Li(t,r,{get:e[r],enumerable:!0})};var Me="default",On="preflights",Bi="shortcuts",Ti="imports",Wi={[Ti]:-200,[On]:-100,[Bi]:-10,[Me]:0},Pe=/[\\:]?[\s'"`;{}]+/g;function Ni(t){return t.split(Pe)}var Ii={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ni(t)}};function j(t=[]){return Array.isArray(t)?t:[t]}function ct(t){return Array.from(new Set(t))}function zn(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function F(t){return typeof t=="string"}var Ln=class extends Set{_map=new Map;constructor(t){if(super(),t)for(let e of t)this.add(e)}add(t){return this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.has(t)?(this._map.delete(t),super.delete(t)):!1}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,e){return this._map.set(t,e),super.add(t)}};function Ae(t){return t instanceof Ln}function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Re=Z;function Ui(){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 Di=/[\w\u00A0-\uFFFF%-?]/;function Fn(t=""){return Di.test(t)}function Vi(t){return typeof t=="function"?{match:t}:t}function jn(t){return t.length===3}function Zt(t){return t!=null}function Gi(){}var Hi=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(e)||n.set(e,r),n.get(e)}set(t,e,r){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(e,r),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([n,o])=>t(o,e,n)))}},qi=class extends Map{getFallback(t,e){let r=this.get(t);return r===void 0?(this.set(t,e),e):r}map(t){let e=[];return this.forEach((r,n)=>{e.push(t(r,n))}),e}flatMap(t){let e=[];return this.forEach((r,n)=>{e.push(...t(r,n))}),e}};function ee(t){return F(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Yi(t){return Array.isArray(t)?t.some(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>ee(e)):[t]:[ee(t)]}function Xi(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}var Ki="__virtual_key__";function Lt(t){return t==null?"":Xi(t).map(([e,r])=>r!=null&&typeof r!="function"?e!=="__virtual_key__"?`${e}:${r};`:r:void 0).filter(Boolean).join("")}function Jt(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Bn(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Jt(n)&&Jt(o)&&Object.keys(o).forEach(a=>{Jt(n[a])&&Jt(o[a])||Array.isArray(n[a])&&Array.isArray(o[a])?i[a]=Bn(n[a],o[a],r):Object.assign(i,{[a]:o[a]})}),i}function te(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?te(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:te(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?te(n):n;return r}return t}function Zi(t){return F(t[0])}function Ji(t){return F(t[0])}var Qt={};function Qi(t=["-",":"]){let e=t.join("|");return Qt[e]||(Qt[e]=new RegExp(`((?:[!@*<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[[^\\]]*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Qt[e].lastIndex=0,Qt[e]}function ta(t,e=["-",":"],r=5){let n=Qi(e),o,i=t.toString(),a=new Set,s=new Map;do o=!1,i=i.replace(n,(l,u,d,p,h)=>{if(!e.includes(d))return l;o=!0,a.add(u+d);let m=h+u.length+d.length+1,x={length:l.length,items:[]};s.set(h,x);for(let S of[...p.matchAll(/\S+/g)]){let v=m+S.index,y=s.get(v)?.items;y?s.delete(v):y=[{offset:v,length:S[0].length,className:S[0]}];for(let b of y)b.className=b.className==="~"?d===":"?`${u}${d}~`:u:b.className.replace(/^(!?)(.*)/,`$1${u}${d}$2`),x.items.push(b)}return"$".repeat(l.length)}),r-=1;while(o&&r);let c;if(typeof t=="string"){c="";let l=0;for(let[u,d]of s)c+=t.slice(l,u),c+=d.items.map(p=>p.className).join(" "),l=u+d.length;c+=t.slice(l)}else{c=t;for(let[l,u]of s)c.overwrite(l,l+u.length,u.items.map(d=>d.className).join(" "))}return{prefixes:Array.from(a),hasChanged:o,groupsByOffset:s,get expanded(){return c.toString()}}}function ea(t,e=["-",":"],r=5){let n=ta(t,e,r);return typeof t=="string"?n.expanded:t}var _n=new Set;function ra(t){_n.has(t)||(console.warn("[unocss]",t),_n.add(t))}function Tn(t){return j(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var An="_uno_resolved";async function na(t){let e=typeof t=="function"?await t():await t;if(An in e)return e;e={...e},Object.defineProperty(e,An,{value:!0,enumerable:!1});let r=e.shortcuts?Tn(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=j(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function Wn(t){let e=await na(t);return e.presets?[e,...(await Promise.all((e.presets||[]).flatMap(j).flatMap(Wn))).flat()]:[e]}function oa(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[];for(let s of t){if(s.pipeline===!1){n=!0;break}else s.pipeline?.include&&e.push(s.pipeline.include),s.pipeline?.exclude&&r.push(s.pipeline.exclude);s.filesystem&&o.push(s.filesystem),s.inline&&i.push(s.inline)}let a={pipeline:n?!1:{include:ct(Mn(...e)),exclude:ct(Mn(...r))}};return o.length&&(a.filesystem=ct(o.flat())),i.length&&(a.inline=ct(i.flat())),a}async function Rn(t={},e={}){let r=Object.assign({},e,t),n=zn((await Promise.all((r.presets||[]).flatMap(j).flatMap(Wn))).flat(),(g,$)=>g.name===$.name),o=[...n.filter(g=>g.enforce==="pre"),...n.filter(g=>!g.enforce),...n.filter(g=>g.enforce==="post")],i=[...o,r],a=[...i].reverse(),s=Object.assign({},Wi,...i.map(g=>g.layers));function c(g){return ct(i.flatMap($=>j($[g]||[])))}let l=c("extractors"),u=a.find(g=>g.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=Ii),u&&!l.includes(u)&&l.unshift(u),l.sort((g,$)=>(g.order||0)-($.order||0));let d=c("rules"),p=d.length,h={},m=[];for(let[g,$]of d.entries()){let L=$[2]??($[2]={});L.__index=g,Zi($)?j(L.prefix??"").forEach(Y=>{h[Y+$[0]]=$}):m.unshift($)}let x={templates:ct(i.flatMap(g=>j(g.autocomplete?.templates))),extractors:i.flatMap(g=>j(g.autocomplete?.extractors)).sort((g,$)=>(g.order||0)-($.order||0)),shorthands:aa(i.map(g=>g.autocomplete?.shorthands||{}))},S=c("separators");S.length||(S=[":","-"]);let v=oa(c("content")),y={mergeSelectors:!0,warn:!0,sortLayers:g=>g,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:s,theme:ia(i.map(g=>g.theme)),rules:d,rulesSize:p,rulesDynamic:m,rulesStaticMap:h,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:x,variants:c("variants").map(Vi).sort((g,$)=>(g.order||0)-($.order||0)),shortcuts:Tn(c("shortcuts")).reverse(),extractors:l,safelist:c("safelist"),separators:S,details:r.details??r.envMode==="dev",content:v,transformers:zn(c("transformers"),(g,$)=>g.name===$.name)},b=c("extendTheme");for(let g of b)y.theme=g(y.theme,y)||y.theme;for(let g of i)g?.configResolved?.(y);return y}function ia(t){return t.map(e=>e?te(e):{}).reduce((e,r)=>Bn(e,r),{})}function aa(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function Mn(...t){return t.flatMap(sa)}function sa(t){return Array.isArray(t)?t:t?[t]:[]}var ca="66.7.0",H={shortcutsNoMerge:"$$symbol-shortcut-no-merge",noMerge:"$$symbol-no-merge",noScope:"$$symbol-no-scope",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort",body:"$$symbol-body"},la=class Nn{userConfig;defaults;version=ca;events=Ui();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;constructor(e={},r={}){this.userConfig=e,this.defaults=r}static async create(e={},r={}){let n=new Nn(e,r);return n.config=await Rn(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Rn(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let a=await i.extract?.(o);if(a)if(Ae(a)&&Ae(n))for(let s of a)n.setCount(s,n.getCount(s)+a.getCount(s));else for(let s of a)n.add(s)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:H,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),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 o=this.config.preprocess.reduce((c,l)=>l(c)??c,e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(e),this.cache.set(n,null);return}let a=async c=>{let l=this.makeContext(e,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(l.variants=[...c[3]]);let u=await this.expandShortcut(l.currentSelector,l);return u?await this.stringifyShortcuts(l.variantMatch,l,u[0],u[1]):(await this.parseUtil(l.variantMatch,l))?.flatMap(d=>this.stringifyUtil(d,l)).filter(Zt)},s=(await Promise.all(i.map(c=>a(c)))).flat().filter(c=>!!c);if(s?.length)return this.cache.set(n,s),s;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:a=!0,minify:s=!1,extendedInfo:c=!1}=r,l=F(e)?await this.applyExtractors(e,n,c?new Ln:new Set):Array.isArray(e)?new Set(e):e;if(a){let C={generator:this,theme:this.config.theme};this.config.safelist.flatMap(E=>typeof E=="function"?E(C):E).forEach(E=>{let z=E.trim();z&&!l.has(z)&&l.add(z)})}let u=s?"":`
|
|
2
2
|
`,d=new Set([Me]),p=c?new Map:new Set,h=new Map,m={},x=Array.from(l).map(async C=>{if(p.has(C))return;let E=await this.parseToken(C);if(E!=null){p instanceof Map?p.set(C,{data:E,count:Ae(l)?l.getCount(C):-1}):p.add(C);for(let z of E){let V=z[3]||"",D=z[4]?.layer;h.has(V)||h.set(V,[]),h.get(V).push(z),D&&d.add(D)}}});await Promise.all(x),await(async()=>{if(!i)return;let C={generator:this,theme:this.config.theme},E=new Set([]);this.config.preflights.forEach(({layer:z=On})=>{d.add(z),E.add(z)}),m=Object.fromEntries(await Promise.all(Array.from(E).map(async z=>[z,(await Promise.all(this.config.preflights.filter(V=>(V.layer||"preflights")===z).map(async V=>await V.getCSS(C)))).filter(Boolean).join(u)])))})();let S=C=>this.config.sortLayers(C.sort((E,z)=>(this.config.layers[E]??0)-(this.config.layers[z]??0)||E.localeCompare(z))),v=S(Array.from(d)),y={},b=this.config.outputToCssLayers,g=C=>{let E=C;return typeof b=="object"&&(E=b.cssLayerName?.(C)),E===null?null:E??C},$=(C=Me)=>{if(y[C])return y[C];let E=Array.from(h).sort((D,w)=>(this.parentOrders.get(D[0])??0)-(this.parentOrders.get(w[0])??0)||D[0]?.localeCompare(w[0]||"")||0).map(([D,w])=>{let _=w.length,O=w.filter(I=>(I[4]?.layer||"default")===C).sort((I,X)=>I[0]-X[0]||(I[4]?.sort||0)-(X[4]?.sort||0)||I[5]?.currentSelector?.localeCompare(X[5]?.currentSelector??"")||I[1]?.localeCompare(X[1]||"")||I[2]?.localeCompare(X[2]||"")||0).map(([,I,X,,Ot,,_e])=>[[[(I&&!Ot?.noScope?ua(I,o):I)??"",Ot?.sort??0]],X,!!(_e??Ot?.noMerge)]);if(!O.length)return;let T=O.reverse().map(([I,X,Ot],_e)=>{if(!Ot&&this.config.mergeSelectors)for(let dt=_e+1;dt<_;dt++){let et=O[dt];if(et&&!et[2]&&(I&&et[0]||I==null&&et[0]==null)&&et[1]===X)return I&&et[0]&&et[0].push(...I),null}let En=I?ct(I.sort((dt,et)=>dt[1]-et[1]||dt[0]?.localeCompare(et[0]||"")||0).map(dt=>dt[0]).filter(Boolean)):[];return En.length?`${En.join(`,${u}`)}{${X}}`:X}).filter(Boolean),G=Array.from(new Set(T)).reverse().join(u);if(!D)return G;let xt=D.split(" $$ ");return`${xt.join("{")}{${u}${G}${u}${"}".repeat(xt.length)}`}).filter(Boolean).join(u);i&&(E=[m[C],E].filter(Boolean).join(u));let z;b&&E&&(z=g(C),z!==null&&(E=`@layer ${z}{${u}${E}${u}}`));let V=s?"":`/* layer: ${C}${z&&z!==C?`, alias: ${z}`:""} */${u}`;return y[C]=E?V+E:""},L=(C=v,E)=>{let z=C.filter(D=>!E?.includes(D)),V=z.map($).filter(Boolean);if(b){let D=z;typeof b=="object"&&b.allLayers&&(D=S(Object.keys(this.config.layers))),D.length>0&&V.unshift(`@layer ${D.map(g).filter(Zt).join(", ")};`)}return V.join(u)};return{get css(){return L()},layers:v,matched:p,getLayers:L,getLayer:$,setLayer:async(C,E)=>{let z=await E($(C));return y[C]=z,z}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},o=async i=>{let a=!0,[,,s,c]=i;for(;a;){a=!1;let l=i[1];for(let u of this.config.variants){if(!u.multiPass&&c.has(u))continue;let d=await u.match(l,n);if(d){if(F(d)){if(d===l)continue;d={matcher:d}}if(Array.isArray(d)){if(!d.length)continue;if(d.length===1)d=d[0];else{if(u.multiPass)throw new Error("multiPass can not be used together with array return variants");let p=d.map(h=>{let m=h.matcher??l,x=[h,...s],S=new Set(c);return S.add(u),[i[0],m,x,S]});return(await Promise.all(p.map(h=>o(h)))).flat()}}i[1]=d.matcher??l,s.unshift(d),c.add(u),a=!0;break}}if(!a)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await o([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let o=r.slice().sort((c,l)=>(c.order||0)-(l.order||0)).reduceRight((c,l)=>u=>{let d=l.body?.(u.entries)||u.entries,p=Array.isArray(l.parent)?l.parent:[l.parent,void 0],h=l.selector?.(u.selector,d);return(l.handle??pa)({...u,entries:d,selector:h||u.selector,parent:p[0]||u.parent,parentOrder:p[1]||u.parentOrder,layer:l.layer||u.layer,sort:l.sort||u.sort},c)},c=>c)({prefix:"",selector:da(n),pseudo:"",entries:e[2]}),{parent:i,parentOrder:a}=o;i!=null&&a!=null&&this.parentOrders.set(i,a);let s={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:i,layer:o.layer,sort:o.sort,noMerge:o.noMerge};return this.config.postprocess.reduce((c,l)=>{let u=[];for(let d of c){let p=l(d);Array.isArray(p)?u.push(...p.filter(Zt)):u.push(p||d)}return u},[s])}constructCustomCSS(e,r,n){let o=ee(r);return F(o)?o:this.applyVariants([0,n||e.rawSelector,o,void 0,e.variantHandlers]).map(({selector:i,entries:a,parent:s})=>{let c=`${i}{${Lt(a)}}`;return s?`${s}{${c}}`:c}).join("")}async parseUtil(e,r,n=!1,o){let i=F(e)?await this.matchVariants(e):[e],a=async([c,l,u])=>{this.config.details&&(r.rules=r.rules??[]);let d={...r,variantHandlers:u},p=this.config.rulesStaticMap[l];if(p&&p[1]&&(n||!p[2]?.internal))return this.resolveCSSResult(c,p[1],p,d);for(let h of this.config.rulesDynamic){let[m,x,S]=h;if(S?.internal&&!n)continue;let v=l;if(S?.prefix){let $=j(S.prefix);if(o){let L=j(o);if(!$.some(Y=>L.includes(Y)))continue}else{let L=$.find(Y=>l.startsWith(Y));if(L==null)continue;v=l.slice(L.length)}}let y=v.match(m);if(!y)continue;let b=await x(y,d);if(!b)continue;if(typeof b!="string")if(Symbol.asyncIterator in b){let $=[];for await(let L of b)L&&$.push(L);b=$}else Symbol.iterator in b&&!Array.isArray(b)&&(b=Array.from(b).filter(Zt));let g=this.resolveCSSResult(c,b,h,d);if(g)return g}},s=(await Promise.all(i.map(c=>a(c)))).flat().filter(c=>!!c);if(s.length)return s}resolveCSSResult=(e,r,n,o)=>{let i=Yi(r).filter(a=>a.length);if(i.length){this.config.details&&o.rules.push(n),o.generator.activatedRules.add(n);let a=n[2];return i.map(s=>{if(F(s))return[a.__index,s,a];let c=o.variantHandlers,l=a,u=p=>{c=[p,...c]},d=p=>{l={...l,...p}};for(let p of s)switch(p[0]){case H.variants:typeof p[1]=="function"?c=p[1](c)||c:c=[...j(p[1]),...c];break;case H.parent:u({parent:p[1]});break;case H.selector:u({selector:p[1]});break;case H.layer:u({layer:p[1]});break;case H.sort:d({sort:p[1]});break;case H.noMerge:d({noMerge:p[1]});break;case H.noScope:d({noScope:p[1]});break;case H.body:p[0]=Ki;break}return[a.__index,e,s,l,c]})}};stringifyUtil(e,r){if(!e)return;if(jn(e))return[[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0]];let n=this.applyVariants(e),o=[];for(let i of n){let{selector:a,entries:s,parent:c,layer:l,sort:u,noMerge:d}=i,p=Lt(s);if(!p)continue;let{layer:h,sort:m,...x}=e[3]??{},S={...x,layer:l??h,sort:u??m};o.push([e[0],a,p,c,S,this.config.details?r:void 0,d])}return o}async expandShortcut(e,r,n=5){if(n===0)return;let o=this.config.details?l=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(l)}:Gi,i,a,s,c;for(let l of this.config.shortcuts){let u=e;if(l[2]?.prefix){let d=j(l[2].prefix).find(p=>e.startsWith(p));if(d==null)continue;u=e.slice(d.length)}if(Ji(l)){if(l[0]===u){i=i||l[2],a=l[1],o(l);break}}else{let d=u.match(l[0]);if(d&&(a=l[1](d,r)),a){i=i||l[2],o(l);break}}}if(a&&(s=ct(j(a).filter(F).map(l=>ea(l.trim()).split(/\s+/g)).flat()),c=j(a).filter(l=>!F(l)).map(l=>({handles:[],value:l}))),!a){let l=F(e)?await this.matchVariants(e):[e];for(let u of l){let[d,p,h]=u;if(d!==p){let m=await this.expandShortcut(p,r,n-1);m&&(s=m[0].filter(F).map(x=>d.replace(p,x)),c=m[0].filter(x=>!F(x)).map(x=>({handles:[...x.handles,...h],value:x.value})))}}}if(!(!s?.length&&!c?.length))return[[await Promise.all(j(s).map(async l=>(await this.expandShortcut(l,r,n-1))?.[0]||[l])),c].flat(2).filter(l=>!!l),i]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new qi,a=(await Promise.all(ct(n).map(async u=>{let d=F(u)?await this.parseUtil(u,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",ee(u.value),void 0,u.handles]];return!d&&this.config.warn&&ra(`unmatched utility "${u}" in shortcut "${e[1]}"`),d||[]}))).flat(1).filter(Boolean).sort((u,d)=>u[0]-d[0]),[s,,c]=e,l=[];for(let u of a){if(jn(u)){l.push([u[0],void 0,u[1],void 0,u[2],r,void 0]);continue}let d=Object.fromEntries(u[2])[H.shortcutsNoMerge],p=[...u[4],...d?[]:c];for(let{selector:h,entries:m,parent:x,sort:S,noMerge:v,layer:y}of this.applyVariants(u,p,s))i.getFallback(y??o.layer,new Hi).getFallback(h,x,[[],u[0]])[0].push([m,!!(v??u[3]?.noMerge),S??0])}return l.concat(i.flatMap((u,d)=>u.map(([p,h],m,x)=>{let S=(v,y,b)=>{let g=Math.max(...b.map(L=>L[1])),$=b.map(L=>L[0]);return(v?[$.flat(1)]:$).map(L=>{let Y=Lt(L);if(Y)return[h,m,Y,x,{...o,noMerge:y,sort:g,layer:d},r,void 0]})};return[[p.filter(([,v])=>v).map(([v,,y])=>[v,y]),!0],[p.filter(([,v])=>!v).map(([v,,y])=>[v,y]),!1]].map(([v,y])=>[...S(!1,y,v.filter(([b])=>b.some(g=>g[0]===H.shortcutsNoMerge))),...S(!0,y,v.filter(([b])=>b.every(g=>g[0]!==H.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):F(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(e):F(o)?o===e:o.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function In(t,e){return await la.create(t,e)}var Un=/\s\$\$\s+/g;function fa(t){return Un.test(t)}function ua(t,e){return fa(t)?t.replace(Un,e?` ${e} `:" "):e?`${e} ${t}`:t}var Pn=/^\[(.+?)(~?=)"(.*)"\]$/;function da(t){return Pn.test(t)?t.replace(Pn,(e,r,n,o)=>`[${Re(r)}${n}"${Re(o)}"]`):`.${Re(t)}`}function pa(t,e){return e(t)}var Oe=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,ha=Object.getOwnPropertyNames,ga=Object.prototype.hasOwnProperty,re=(t,e)=>{let r={};for(var n in t)Oe(r,n,{get:t[n],enumerable:!0});return e||Oe(r,Symbol.toStringTag,{value:"Module"}),r},Dn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var o=ha(e),i=0,a=o.length,s;i<a;i++)s=o[i],!ga.call(t,s)&&s!==r&&Oe(t,s,{get:(c=>e[c]).bind(null,s),enumerable:!(n=ma(e,s))||n.enumerable});return t},Le=(t,e,r)=>(Dn(t,e,"default"),r&&Dn(r,e,"default"));var Ke={};Fi(Ke,{PseudoClassFunctions:()=>io,PseudoClassFunctionsStr:()=>pt,PseudoClasses:()=>$t,PseudoClassesAndElementsColonStr:()=>Ne,PseudoClassesAndElementsStr:()=>We,PseudoClassesColon:()=>wt,PseudoClassesColonKeys:()=>Ve,PseudoClassesColonStr:()=>se,PseudoClassesKeys:()=>De,PseudoClassesMulti:()=>Ge,PseudoClassesMultiStr:()=>Te,PseudoClassesStr:()=>ae,alphaPlaceholders:()=>Ie,alphaPlaceholdersRE:()=>to,calcMaxWidthBySize:()=>Ta,colorOpacityToString:()=>mt,colorToString:()=>W,createPartClasses:()=>Xe,createPseudoClassFunctions:()=>qe,createPseudoClassesAndElements:()=>He,createTaggedPseudoClassMatcher:()=>so,createTaggedPseudoClasses:()=>Ye,createValueHandler:()=>Ue,cssColorFunctions:()=>ce,excludedPseudo:()=>ao,getBracket:()=>Kn,getStringComponent:()=>vt,getStringComponents:()=>At,hasIconFn:()=>Na,hasThemeFn:()=>Fa,hex2rgba:()=>_a,hueInterpolationMethods:()=>Qn,iconFnRE:()=>Wa,isInterpolatedMethod:()=>ja,parseCssColor:()=>J,polarColorSpace:()=>Jn,rectangularColorSpace:()=>Zn,themeFnRE:()=>no,transformThemeFn:()=>Ba,transformThemeString:()=>oo,variantGetBracket:()=>co,variantGetParameter:()=>lo,variantMatcher:()=>kt,variantParentMatcher:()=>rt});var ba=44,ya=59,Vn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qn=new Uint8Array(64),xa=new Uint8Array(128);for(let t=0;t<Vn.length;t++){let e=Vn.charCodeAt(t);qn[t]=e,xa[e]=t}function Ft(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(qn[o])}while(n>0);return e}var Gn=1024*16,Hn=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},va=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Gn)}write(t){let{buffer:e}=this;e[this.pos++]=t,this.pos===Gn&&(this.out+=Hn.decode(e),this.pos=0)}flush(){let{buffer:t,out:e,pos:r}=this;return r>0?e+Hn.decode(t.subarray(0,r)):e}};function Yn(t){let e=new va,r=0,n=0,o=0,i=0;for(let a=0;a<t.length;a++){let s=t[a];if(a>0&&e.write(ya),s.length===0)continue;let c=0;for(let l=0;l<s.length;l++){let u=s[l];l>0&&e.write(ba),c=Ft(e,u[0],c),u.length!==1&&(r=Ft(e,u[1],r),n=Ft(e,u[2],n),o=Ft(e,u[3],o),u.length!==4&&(i=Ft(e,u[4],i)))}}return e.flush()}var ne=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},oe=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new t(e,this.end,o);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function $a(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var wa=$a(),Fe=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Yn(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+wa(this.toString())}};function ka(t){let e=t.split(`
|
|
3
3
|
`),r=e.filter(i=>/^\t+/.test(i)),n=e.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,a)=>{let s=/^ +/.exec(a)[0].length;return Math.min(s,i)},1/0);return new Array(o+1).join(" ")}function Sa(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var Ca=Object.prototype.toString;function Ea(t){return Ca.call(t)==="[object Object]"}function Xn(t){let e=t.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<e.length;n++)r.push(o),o+=e[n].length+1;return function(o){let i=0,a=r.length;for(;i<a;){let l=i+a>>1;o<r[l]?a=l:i=l+1}let s=i-1,c=o-r[s];return{line:s,column:c}}}var za=/\w/,Be=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,o){if(r.length){let i=r.length-1,a=r.indexOf(`
|