@unocss/runtime 0.65.0 → 0.65.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/uno.global.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";(()=>{var Ha=Object.defineProperty;var qa=(e,t)=>{for(var r in t)Ha(e,r,{get:t[r],enumerable:!0})};var _e="default",at="preflights",Ya="shortcuts",Xa="imports",Nn={[Xa]:-200,[at]:-100,[Ya]:-10,[_e]:0};var ct=/[\\:]?[\s'"`;{}]+/g;function Za(e){return e.split(ct)}var lt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Za(e)}};function V(e=[]){return Array.isArray(e)?e:[e]}function ee(e){return Array.from(new Set(e))}function Nr(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function P(e){return typeof e=="string"}var Fe=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ut(e){return e instanceof Fe}function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function se(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.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&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var ft=se;var Ja=/[\w\u00A0-\uFFFF%-?]/;function Dn(e=""){return Ja.test(e)}function In(e){return typeof e=="function"?{match:e}:e}function Dr(e){return e.length===3}function pt(e){return e!=null}function Kn(){}var dt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},mt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};function $e(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Gn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>$e(t)):[e]:[$e(e)]}function Qa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function Se(e){return e==null?"":Qa(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function gt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ir(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return gt(n)&&gt(o)&&Object.keys(o).forEach(s=>{gt(n[s])&&gt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ir(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Le(e){let t,r,n;if(Array.isArray(e)){for(r=Array.from({length:t=e.length});t--;)r[t]=(n=e[t])&&typeof n=="object"?Le(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Le(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Le(n):n;return r}return e}function Hn(e){return P(e[0])}function qn(e){return P(e[0])}var ht={};function ec(e=["-",":"]){let t=e.join("|");return ht[t]||(ht[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ht[t].lastIndex=0,ht[t]}function tc(e,t=["-",":"],r=5){let n=ec(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,m)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let b=m+f.length+p.length+1,x={length:u.length,items:[]};a.set(m,x);for(let $ of[...d.matchAll(/\S+/g)]){let j=b+$.index,w=a.get(j)?.items;w?a.delete(j):w=[{offset:j,length:$[0].length,className:$[0]}];for(let R of w)R.className=R.className==="~"?f:R.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(R)}return"$".repeat(u.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let u=0;for(let[f,p]of a)c+=e.slice(u,f),c+=p.items.map(d=>d.className).join(" "),u=f+p.length;c+=e.slice(u)}else{c=e;for(let[u,f]of a)c.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Yn(e,t=["-",":"],r=5){let n=tc(e,t,r);return typeof e=="string"?n.expanded:e}var Xn=new Set;function Zn(e){Xn.has(e)||(console.warn("[unocss]",e),Xn.add(e))}function eo(e){return V(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Jn="_uno_resolved";async function rc(e){let t=typeof e=="function"?await e():await e;if(Jn in t)return t;t={...t},Object.defineProperty(t,Jn,{value:!0,enumerable:!1});let r=t.shortcuts?eo(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=V(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function to(e){let t=await rc(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(V).flatMap(to))).flat();return[t,...r]}function nc(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let c of e){if(c.pipeline===!1){n=!0;break}else c.pipeline?.include&&t.push(c.pipeline.include),c.pipeline?.exclude&&r.push(c.pipeline.exclude);c.filesystem&&o.push(c.filesystem),c.inline&&i.push(c.inline),c.plain&&s.push(c.plain)}let a={pipeline:n?!1:{include:ee(Qn(...t)),exclude:ee(Qn(...r))}};return o.length&&(a.filesystem=ee(o.flat())),i.length&&(a.inline=ee(i.flat())),s.length&&(a.plain=ee(s.flat())),a}async function Kr(e={},t={}){let r=Object.assign({},t,e),n=Nr((await Promise.all((r.presets||[]).flatMap(V).flatMap(to))).flat(),(h,g)=>h.name===g.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Nn,...i.map(h=>h.layers));function c(h){return ee(i.flatMap(g=>V(g[h]||[])))}let u=c("extractors"),f=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=lt),f&&!u.includes(f)&&u.unshift(f),u.sort((h,g)=>(h.order||0)-(g.order||0));let p=c("rules"),d={},m=p.length,b=p.filter(h=>Hn(h)?(V(h[2]?.prefix||"").forEach(v=>{d[v+h[0]]=h}),!1):!0).reverse(),x=oc(i.map(h=>h.theme)),$=c("extendTheme");for(let h of $)x=h(x)||x;let j={templates:ee(i.flatMap(h=>V(h.autocomplete?.templates))),extractors:i.flatMap(h=>V(h.autocomplete?.extractors)).sort((h,g)=>(h.order||0)-(g.order||0)),shorthands:ic(i.map(h=>h.autocomplete?.shorthands||{}))},w=c("separators");w.length||(w=[":","-"]);let R=c("content"),W=nc(R),A={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rules:p,rulesSize:m,rulesDynamic:b,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(In).sort((h,g)=>(h.order||0)-(g.order||0)),shortcuts:eo(c("shortcuts")).reverse(),extractors:u,safelist:c("safelist"),separators:w,details:r.details??r.envMode==="dev",content:W,transformers:Nr(c("transformers"),(h,g)=>h.name===g.name)};for(let h of i)h?.configResolved?.(A);return A}function oc(e){return e.map(t=>t?Le(t):{}).reduce((t,r)=>Ir(t,r),{})}function ic(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}function Qn(...e){return e.flatMap(sc)}function sc(e){return Array.isArray(e)?e:e?[e]:[]}var ro="0.65.0";function no(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var pe={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},Gr=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=ro;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;activatedRules=new Set;events=no();static async create(t={},r={}){let n=new e(t,r);return n.config=await Kr(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this._cache.clear(),this.config=await Kr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(ut(s)&&ut(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:pe,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let c of this.config.preprocess)o=c(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async c=>{let u=this.makeContext(t,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(u.variants=[...c[3]]);let f=await this.expandShortcut(u.currentSelector,u);return f?await this.stringifyShortcuts(u.variantMatch,u,f[0],f[1]):(await this.parseUtil(u.variantMatch,u))?.map(d=>this.stringifyUtil(d,u)).filter(pt)},a=(await Promise.all(i.map(c=>s(c)))).flat().filter(c=>!!c);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,u=P(t)?await this.applyExtractors(t,n,c?new Fe:new Set):Array.isArray(t)?new Set(t):t;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap(v=>typeof v=="function"?v(g):v).forEach(v=>{u.has(v)||u.add(v)})}let f=a?"":`
2
- `,p=new Set([_e]),d=c?new Map:new Set,m=new Map,b={},x=Array.from(u).map(async g=>{if(d.has(g))return;let v=await this.parseToken(g);if(v!=null){d instanceof Map?d.set(g,{data:v,count:ut(u)?u.getCount(g):-1}):d.add(g);for(let C of v){let H=C[3]||"",q=C[4]?.layer;m.has(H)||m.set(H,[]),m.get(H).push(C),q&&p.add(q)}}});await Promise.all(x),await(async()=>{if(!i)return;let g={generator:this,theme:this.config.theme},v=new Set([]);this.config.preflights.forEach(({layer:C=at})=>{p.add(C),v.add(C)}),b=Object.fromEntries(await Promise.all(Array.from(v).map(async C=>{let q=(await Promise.all(this.config.preflights.filter(Q=>(Q.layer||at)===C).map(async Q=>await Q.getCSS(g)))).filter(Boolean).join(f);return[C,q]})))})();let $=this.config.sortLayers(Array.from(p).sort((g,v)=>(this.config.layers[g]??0)-(this.config.layers[v]??0)||g.localeCompare(v))),j={},w=this.config.outputToCssLayers,R=g=>{let v=g;return typeof w=="object"&&(v=w.cssLayerName?.(g)),v===null?null:v??g},W=(g=_e)=>{if(j[g])return j[g];let v=Array.from(m).sort((q,Q)=>(this.parentOrders.get(q[0])??0)-(this.parentOrders.get(Q[0])??0)||q[0]?.localeCompare(Q[0]||"")||0).map(([q,Q])=>{let S=Q.length,z=Q.filter(T=>(T[4]?.layer||_e)===g).sort((T,D)=>T[0]-D[0]||(T[4]?.sort||0)-(D[4]?.sort||0)||T[5]?.currentSelector?.localeCompare(D[5]?.currentSelector??"")||T[1]?.localeCompare(D[1]||"")||T[2]?.localeCompare(D[2]||"")||0).map(([,T,D,,st,,Wr])=>[[[(T&&lc(T,o))??"",st?.sort??0]],D,!!(Wr??st?.noMerge)]);if(!z.length)return;let _=z.reverse().map(([T,D,st],Wr)=>{if(!st&&this.config.mergeSelectors)for(let ue=Wr+1;ue<S;ue++){let re=z[ue];if(re&&!re[2]&&(T&&re[0]||T==null&&re[0]==null)&&re[1]===D)return T&&re[0]&&re[0].push(...T),null}let Br=T?ee(T.sort((ue,re)=>ue[1]-re[1]||ue[0]?.localeCompare(re[0]||"")||0).map(ue=>ue[0]).filter(Boolean)):[];return Br.length?`${Br.join(`,${f}`)}{${D}}`:D}).filter(Boolean).reverse().join(f);if(!q)return _;let L=q.split(" $$ ");return`${L.join("{")}{${f}${_}${f}${"}".repeat(L.length)}`}).filter(Boolean).join(f);i&&(v=[b[g],v].filter(Boolean).join(f));let C;w&&v&&(C=R(g),C!==null&&(v=`@layer ${C}{${f}${v}${f}}`));let H=a?"":`/* layer: ${g}${C&&C!==g?`, alias: ${C}`:""} */${f}`;return j[g]=v?H+v:""},A=(g=$,v)=>{let C=g.filter(H=>!v?.includes(H));return[w&&C.length>0?`@layer ${C.map(R).filter(pt).join(", ")};`:void 0,...C.map(H=>W(H)||"")].filter(Boolean).join(f)};return{get css(){return A()},layers:$,matched:d,getLayers:A,getLayer:W,setLayer:async(g,v)=>{let C=await v(W(g));return j[g]=C,C}}}async matchVariants(t,r){let n={rawSelector:t,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,a,c]=i;for(;s;){s=!1;let u=i[1];for(let f of this.config.variants){if(!f.multiPass&&c.has(f))continue;let p=await f.match(u,n);if(p){if(P(p)){if(p===u)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let d=p.map(m=>{let b=m.matcher??u,x=[m,...a],$=new Set(c);return $.add(f),[i[0],b,x,$]});return(await Promise.all(d.map(m=>o(m)))).flat()}}i[1]=p.matcher??u,a.unshift(p),c.add(f),s=!0;break}}if(!s)break;if(a.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[i]};return await o([t,r||t,[],new Set])}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((u,f)=>(u.order||0)-(f.order||0)).reduceRight((u,f)=>p=>{let d=f.body?.(p.entries)||p.entries,m=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??fc)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:m[0]||p.parent,parentOrder:m[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},u)},u=>u)({prefix:"",selector:uc(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let u of this.config.postprocess)u(c);return c}constructCustomCSS(t,r,n){let o=$e(r);if(P(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${Se(s)}}`;return a?`${a}{${c}}`:c}async parseUtil(t,r,n=!1,o){let i=P(t)?await this.matchVariants(t):[t],s=async([c,u,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[u];if(p&&p[1]&&(n||!p[2]?.internal)){r.generator.activatedRules.add(p),this.config.details&&r.rules.push(p);let m=this.config.rules.indexOf(p),b=$e(p[1]),x=p[2];return P(b)?[[m,b,x]]:[[m,c,b,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let m of d){let[b,x,$]=m;if($?.internal&&!n)continue;let j=u;if($?.prefix){let A=V($.prefix);if(o){let h=V(o);if(!A.some(g=>h.includes(g)))continue}else{let h=A.find(g=>u.startsWith(g));if(h==null)continue;j=u.slice(h.length)}}let w=j.match(b);if(!w)continue;let R=await x(w,r);if(!R)continue;if(r.generator.activatedRules.add(m),this.config.details&&r.rules.push(m),typeof R!="string")if(Symbol.asyncIterator in R){let A=[];for await(let h of R)h&&A.push(h);R=A}else Symbol.iterator in R&&!Array.isArray(R)&&(R=Array.from(R).filter(pt));let W=Gn(R).filter(A=>A.length);if(W.length){let A=this.config.rules.indexOf(m);return W.map(h=>{if(P(h))return[A,h,$];let g=f,v=$;for(let C of h)C[0]===pe.variants?g=[...V(C[1]),...g]:C[0]===pe.parent?g=[{parent:C[1]},...g]:C[0]===pe.selector?g=[{selector:C[1]},...g]:C[0]===pe.layer?g=[{layer:C[1]},...g]:C[0]===pe.sort&&(v={...v,sort:C[1]});return[A,c,h,v,g]})}}},a=(await Promise.all(i.map(c=>s(c)))).flat().filter(c=>!!c);if(a.length)return a}stringifyUtil(t,r){if(!t)return;if(Dr(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:c}=this.applyVariants(t),u=Se(o);if(!u)return;let{layer:f,sort:p,...d}=t[3]??{},m={...d,layer:s??f,sort:a??p};return[t[0],n,u,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Kn,i,s;for(let a of this.config.shortcuts){let c=t;if(a[2]?.prefix){let f=V(a[2].prefix).find(p=>t.startsWith(p));if(f==null)continue;c=t.slice(f.length)}if(qn(a)){if(a[0]===c){i=i||a[2],s=a[1],o(a);break}}else{let u=c.match(a[0]);if(u&&(s=a[1](u,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=V(s).map(a=>P(a)?Yn(a.trim()).split(/\s+/g):a).flat()),!s){let a=P(t)?await this.matchVariants(t):[t];for(let c of a){let[u,f]=c;if(u!==f){let p=await this.expandShortcut(f,r,n-1);p&&(s=p[0].map(d=>P(d)?u.replace(f,d):d))}}}if(s)return[(await Promise.all(s.map(async a=>(P(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(a=>!!a),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new mt,s=(await Promise.all(ee(n).map(async f=>{let p=P(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",$e(f),void 0,[]]];return!p&&this.config.warn&&Zn(`unmatched utility "${f}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,c]=t,u=[];for(let f of s){if(Dr(f)){u.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:m,sort:b,noMerge:x,layer:$}=this.applyVariants(f,[...f[4],...c],a);i.getFallback($??o.layer,new dt).getFallback(p,m,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),b??0])}return u.concat(i.flatMap((f,p)=>f.map(([d,m],b,x)=>{let $=(w,R,W)=>{let A=Math.max(...W.map(g=>g[1])),h=W.map(g=>g[0]);return(w?[h.flat(1)]:h).map(g=>{let v=Se(g);if(v)return[m,b,v,x,{...o,noMerge:R,sort:A,layer:p},r,void 0]})};return[[d.filter(([,w])=>w).map(([w,,R])=>[w,R]),!0],[d.filter(([,w])=>!w).map(([w,,R])=>[w,R]),!1]].map(([w,R])=>[...$(!1,R,w.filter(([W])=>W.some(A=>A[0]===pe.shortcutsNoMerge))),...$(!0,R,w.filter(([W])=>W.every(A=>A[0]!==pe.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(t):P(r)?r===t:r.test(t))}getBlocked(t){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(t):P(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function io(e,t){return await Gr.create(e,t)}var so=/\s\$\$\s+/g;function cc(e){return so.test(e)}function lc(e,t){return cc(e)?e.replace(so,t?` ${t} `:" "):t?`${t} ${e}`:e}var oo=/^\[(.+?)(~?=)"(.*)"\]$/;function uc(e){return oo.test(e)?e.replace(oo,(t,r,n,o)=>`[${ft(r)}${n}"${ft(o)}"]`):`.${ft(e)}`}function fc(e,t){return t(e)}function pc(e){let t,r,n=2166136261;for(t=0,r=e.length;t<r;t++)n^=e.charCodeAt(t),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return`00000${(n>>>0).toString(36)}`.slice(-6)}function ao(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${pc(i)}`;t.set(s,i),e=e.replace(i,s)}return e}function co(e,t){for(let[r,n]of t.entries())e=e.replaceAll(r,n);return e}var dc=/\/\/#\s*sourceMappingURL=.*\n?/g;function lo(e){return e.includes("sourceMappingURL=")?e.replace(dc,""):e}var mc=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,gc=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,hc=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function bc(e){let t=[];for(let o of e.matchAll(gc))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(mc))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=ao(e,r,/-\[(?!&.+?;)[^\]]*\]/g,n),e&&e.split(ct).forEach(o=>{o.includes(n)&&(o=co(o,r)),Dn(o)&&!hc.test(o)&&t.push(o)}),t}function uo(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return bc(lo(e))}}}function fo(e){if(e.preflight)return[{layer:"preflights",getCSS({theme:t,generator:r}){if(t.preflightBase){let n=Object.entries(t.preflightBase);if(e.preflight==="on-demand"){let o=new Set(Array.from(r.activatedRules).map(i=>i[2]?.custom?.preflightKeys).filter(Boolean).flat());n=n.filter(([i])=>o.has(i))}if(n.length>0){let o=Se(n);return e.variablePrefix!=="un-"&&(o=o.replace(/--un-/g,`--${e.variablePrefix}`)),V(t.preflightRoot??["*,::before,::after","::backdrop"]).map(s=>`${s}{${o}}`).join("")}}}}]}function Ce(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function de(e,t,r,n){if(e===""||(P(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let s=0;s<o;s++)switch(e[s]){case t:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let c=a.length;if(c&&a===e.slice(s,s+c)&&i===0)return s===0||s===o-c?void 0:[e.slice(0,s),e.slice(s+c)]}}return[e,""]}function xe(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=de(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Hr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],po=["%alpha","<alpha-value>"],xc=new RegExp(po.map(e=>fe(e)).join("|"));function Y(e=""){let t=yc(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Hr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ae(e){let t=e.alpha??1;return typeof t=="string"&&po.includes(t)?1:t}function M(e,t){if(typeof e=="string")return e.replace(xc,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Hr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function yc(e){if(!e)return;let t=vc(e);if(t!=null||(t=wc(e),t!=null)||(t=kc(e),t!=null)||(t=Sc(e),t!=null)||(t=Cc(e),t!=null))return t}function vc(e){let[,t]=e.match(/^#([\da-f]+)$/i)||[];if(t)switch(t.length){case 3:case 4:let r=Array.from(t,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:t.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(t,16);return{type:"rgb",components:t.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:t.length===6?void 0:Math.round((n&255)/255*100)/100}}}function wc(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function kc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=xe(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var $c=new RegExp(`^(${Hr.join("|")})\\((.+)\\)$`,"i");function Sc(e){let t=e.match($c);if(!t)return;let[,r,n]=t,o=mo(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function Cc(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=mo(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function mo(e){let t=xe(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=xe(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function bt(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=e[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return t}var go="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xo=new Uint8Array(64),Rc=new Uint8Array(128);for(let e=0;e<go.length;e++){let t=go.charCodeAt(e);xo[e]=t,Rc[t]=e}function Ue(e,t,r){let n=t-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),e.write(xo[o])}while(n>0);return t}var ho=1024*16,bo=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 r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}},qr=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(ho)}write(t){let{buffer:r}=this;r[this.pos++]=t,this.pos===ho&&(this.out+=bo.decode(r),this.pos=0)}flush(){let{buffer:t,out:r,pos:n}=this;return n>0?r+bo.decode(t.subarray(0,n)):r}};function yo(e){let t=new qr,r=0,n=0,o=0,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(s>0&&t.write(59),a.length===0)continue;let c=0;for(let u=0;u<a.length;u++){let f=a[u];u>0&&t.write(44),c=Ue(t,f[0],c),f.length!==1&&(r=Ue(t,f[1],r),n=Ue(t,f[2],n),o=Ue(t,f[3],o),f.length!==4&&(i=Ue(t,f[4],i)))}}return t.flush()}var xt=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))}},yt=class e{constructor(t,r,n){this.start=t,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(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 r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,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 r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,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(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");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(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");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(t,""),this.outro.length)return!0}};function Ec(){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 Tc=Ec(),Yr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=yo(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Tc(this.toString())}};function jc(e){let t=e.split(`
1
+ "use strict";(()=>{var Ha=Object.defineProperty;var qa=(e,t)=>{for(var r in t)Ha(e,r,{get:t[r],enumerable:!0})};var _e="default",at="preflights",Ya="shortcuts",Xa="imports",Nn={[Xa]:-200,[at]:-100,[Ya]:-10,[_e]:0};var ct=/[\\:]?[\s'"`;{}]+/g;function Za(e){return e.split(ct)}var lt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Za(e)}};function V(e=[]){return Array.isArray(e)?e:[e]}function ee(e){return Array.from(new Set(e))}function Nr(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function P(e){return typeof e=="string"}var Fe=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ut(e){return e instanceof Fe}function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function se(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.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&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var ft=se;var Ja=/[\w\u00A0-\uFFFF%-?]/;function Dn(e=""){return Ja.test(e)}function In(e){return typeof e=="function"?{match:e}:e}function Dr(e){return e.length===3}function pt(e){return e!=null}function Kn(){}var dt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},mt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};function $e(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Gn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>$e(t)):[e]:[$e(e)]}function Qa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function Se(e){return e==null?"":Qa(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function gt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ir(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return gt(n)&&gt(o)&&Object.keys(o).forEach(s=>{gt(n[s])&&gt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ir(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Le(e){let t,r,n;if(Array.isArray(e)){for(r=Array.from({length:t=e.length});t--;)r[t]=(n=e[t])&&typeof n=="object"?Le(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Le(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Le(n):n;return r}return e}function Hn(e){return P(e[0])}function qn(e){return P(e[0])}var ht={};function ec(e=["-",":"]){let t=e.join("|");return ht[t]||(ht[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ht[t].lastIndex=0,ht[t]}function tc(e,t=["-",":"],r=5){let n=ec(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,m)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let b=m+f.length+p.length+1,x={length:u.length,items:[]};a.set(m,x);for(let $ of[...d.matchAll(/\S+/g)]){let j=b+$.index,w=a.get(j)?.items;w?a.delete(j):w=[{offset:j,length:$[0].length,className:$[0]}];for(let R of w)R.className=R.className==="~"?f:R.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(R)}return"$".repeat(u.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let u=0;for(let[f,p]of a)c+=e.slice(u,f),c+=p.items.map(d=>d.className).join(" "),u=f+p.length;c+=e.slice(u)}else{c=e;for(let[u,f]of a)c.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Yn(e,t=["-",":"],r=5){let n=tc(e,t,r);return typeof e=="string"?n.expanded:e}var Xn=new Set;function Zn(e){Xn.has(e)||(console.warn("[unocss]",e),Xn.add(e))}function eo(e){return V(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Jn="_uno_resolved";async function rc(e){let t=typeof e=="function"?await e():await e;if(Jn in t)return t;t={...t},Object.defineProperty(t,Jn,{value:!0,enumerable:!1});let r=t.shortcuts?eo(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=V(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function to(e){let t=await rc(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(V).flatMap(to))).flat();return[t,...r]}function nc(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let c of e){if(c.pipeline===!1){n=!0;break}else c.pipeline?.include&&t.push(c.pipeline.include),c.pipeline?.exclude&&r.push(c.pipeline.exclude);c.filesystem&&o.push(c.filesystem),c.inline&&i.push(c.inline),c.plain&&s.push(c.plain)}let a={pipeline:n?!1:{include:ee(Qn(...t)),exclude:ee(Qn(...r))}};return o.length&&(a.filesystem=ee(o.flat())),i.length&&(a.inline=ee(i.flat())),s.length&&(a.plain=ee(s.flat())),a}async function Kr(e={},t={}){let r=Object.assign({},t,e),n=Nr((await Promise.all((r.presets||[]).flatMap(V).flatMap(to))).flat(),(h,g)=>h.name===g.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Nn,...i.map(h=>h.layers));function c(h){return ee(i.flatMap(g=>V(g[h]||[])))}let u=c("extractors"),f=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=lt),f&&!u.includes(f)&&u.unshift(f),u.sort((h,g)=>(h.order||0)-(g.order||0));let p=c("rules"),d={},m=p.length,b=p.filter(h=>Hn(h)?(V(h[2]?.prefix||"").forEach(v=>{d[v+h[0]]=h}),!1):!0).reverse(),x=oc(i.map(h=>h.theme)),$=c("extendTheme");for(let h of $)x=h(x)||x;let j={templates:ee(i.flatMap(h=>V(h.autocomplete?.templates))),extractors:i.flatMap(h=>V(h.autocomplete?.extractors)).sort((h,g)=>(h.order||0)-(g.order||0)),shorthands:ic(i.map(h=>h.autocomplete?.shorthands||{}))},w=c("separators");w.length||(w=[":","-"]);let R=c("content"),W=nc(R),A={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rules:p,rulesSize:m,rulesDynamic:b,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(In).sort((h,g)=>(h.order||0)-(g.order||0)),shortcuts:eo(c("shortcuts")).reverse(),extractors:u,safelist:c("safelist"),separators:w,details:r.details??r.envMode==="dev",content:W,transformers:Nr(c("transformers"),(h,g)=>h.name===g.name)};for(let h of i)h?.configResolved?.(A);return A}function oc(e){return e.map(t=>t?Le(t):{}).reduce((t,r)=>Ir(t,r),{})}function ic(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}function Qn(...e){return e.flatMap(sc)}function sc(e){return Array.isArray(e)?e:e?[e]:[]}var ro="0.65.1";function no(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var pe={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},Gr=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=ro;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;activatedRules=new Set;events=no();static async create(t={},r={}){let n=new e(t,r);return n.config=await Kr(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this._cache.clear(),this.config=await Kr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(ut(s)&&ut(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:pe,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let c of this.config.preprocess)o=c(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(i.every(c=>!c||this.isBlocked(c[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async c=>{let u=this.makeContext(t,[r||c[0],c[1],c[2],c[3]]);this.config.details&&(u.variants=[...c[3]]);let f=await this.expandShortcut(u.currentSelector,u);return f?await this.stringifyShortcuts(u.variantMatch,u,f[0],f[1]):(await this.parseUtil(u.variantMatch,u))?.map(d=>this.stringifyUtil(d,u)).filter(pt)},a=(await Promise.all(i.map(c=>s(c)))).flat().filter(c=>!!c);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,u=P(t)?await this.applyExtractors(t,n,c?new Fe:new Set):Array.isArray(t)?new Set(t):t;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap(v=>typeof v=="function"?v(g):v).forEach(v=>{u.has(v)||u.add(v)})}let f=a?"":`
2
+ `,p=new Set([_e]),d=c?new Map:new Set,m=new Map,b={},x=Array.from(u).map(async g=>{if(d.has(g))return;let v=await this.parseToken(g);if(v!=null){d instanceof Map?d.set(g,{data:v,count:ut(u)?u.getCount(g):-1}):d.add(g);for(let C of v){let H=C[3]||"",q=C[4]?.layer;m.has(H)||m.set(H,[]),m.get(H).push(C),q&&p.add(q)}}});await Promise.all(x),await(async()=>{if(!i)return;let g={generator:this,theme:this.config.theme},v=new Set([]);this.config.preflights.forEach(({layer:C=at})=>{p.add(C),v.add(C)}),b=Object.fromEntries(await Promise.all(Array.from(v).map(async C=>{let q=(await Promise.all(this.config.preflights.filter(Q=>(Q.layer||at)===C).map(async Q=>await Q.getCSS(g)))).filter(Boolean).join(f);return[C,q]})))})();let $=this.config.sortLayers(Array.from(p).sort((g,v)=>(this.config.layers[g]??0)-(this.config.layers[v]??0)||g.localeCompare(v))),j={},w=this.config.outputToCssLayers,R=g=>{let v=g;return typeof w=="object"&&(v=w.cssLayerName?.(g)),v===null?null:v??g},W=(g=_e)=>{if(j[g])return j[g];let v=Array.from(m).sort((q,Q)=>(this.parentOrders.get(q[0])??0)-(this.parentOrders.get(Q[0])??0)||q[0]?.localeCompare(Q[0]||"")||0).map(([q,Q])=>{let S=Q.length,z=Q.filter(T=>(T[4]?.layer||_e)===g).sort((T,D)=>T[0]-D[0]||(T[4]?.sort||0)-(D[4]?.sort||0)||T[5]?.currentSelector?.localeCompare(D[5]?.currentSelector??"")||T[1]?.localeCompare(D[1]||"")||T[2]?.localeCompare(D[2]||"")||0).map(([,T,D,,st,,Wr])=>[[[(T&&lc(T,o))??"",st?.sort??0]],D,!!(Wr??st?.noMerge)]);if(!z.length)return;let _=z.reverse().map(([T,D,st],Wr)=>{if(!st&&this.config.mergeSelectors)for(let ue=Wr+1;ue<S;ue++){let re=z[ue];if(re&&!re[2]&&(T&&re[0]||T==null&&re[0]==null)&&re[1]===D)return T&&re[0]&&re[0].push(...T),null}let Br=T?ee(T.sort((ue,re)=>ue[1]-re[1]||ue[0]?.localeCompare(re[0]||"")||0).map(ue=>ue[0]).filter(Boolean)):[];return Br.length?`${Br.join(`,${f}`)}{${D}}`:D}).filter(Boolean).reverse().join(f);if(!q)return _;let L=q.split(" $$ ");return`${L.join("{")}{${f}${_}${f}${"}".repeat(L.length)}`}).filter(Boolean).join(f);i&&(v=[b[g],v].filter(Boolean).join(f));let C;w&&v&&(C=R(g),C!==null&&(v=`@layer ${C}{${f}${v}${f}}`));let H=a?"":`/* layer: ${g}${C&&C!==g?`, alias: ${C}`:""} */${f}`;return j[g]=v?H+v:""},A=(g=$,v)=>{let C=g.filter(H=>!v?.includes(H));return[w&&C.length>0?`@layer ${C.map(R).filter(pt).join(", ")};`:void 0,...C.map(H=>W(H)||"")].filter(Boolean).join(f)};return{get css(){return A()},layers:$,matched:d,getLayers:A,getLayer:W,setLayer:async(g,v)=>{let C=await v(W(g));return j[g]=C,C}}}async matchVariants(t,r){let n={rawSelector:t,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,a,c]=i;for(;s;){s=!1;let u=i[1];for(let f of this.config.variants){if(!f.multiPass&&c.has(f))continue;let p=await f.match(u,n);if(p){if(P(p)){if(p===u)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let d=p.map(m=>{let b=m.matcher??u,x=[m,...a],$=new Set(c);return $.add(f),[i[0],b,x,$]});return(await Promise.all(d.map(m=>o(m)))).flat()}}i[1]=p.matcher??u,a.unshift(p),c.add(f),s=!0;break}}if(!s)break;if(a.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[i]};return await o([t,r||t,[],new Set])}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((u,f)=>(u.order||0)-(f.order||0)).reduceRight((u,f)=>p=>{let d=f.body?.(p.entries)||p.entries,m=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??fc)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:m[0]||p.parent,parentOrder:m[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},u)},u=>u)({prefix:"",selector:uc(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let u of this.config.postprocess)u(c);return c}constructCustomCSS(t,r,n){let o=$e(r);if(P(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${Se(s)}}`;return a?`${a}{${c}}`:c}async parseUtil(t,r,n=!1,o){let i=P(t)?await this.matchVariants(t):[t],s=async([c,u,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[u];if(p&&p[1]&&(n||!p[2]?.internal)){r.generator.activatedRules.add(p),this.config.details&&r.rules.push(p);let m=this.config.rules.indexOf(p),b=$e(p[1]),x=p[2];return P(b)?[[m,b,x]]:[[m,c,b,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let m of d){let[b,x,$]=m;if($?.internal&&!n)continue;let j=u;if($?.prefix){let A=V($.prefix);if(o){let h=V(o);if(!A.some(g=>h.includes(g)))continue}else{let h=A.find(g=>u.startsWith(g));if(h==null)continue;j=u.slice(h.length)}}let w=j.match(b);if(!w)continue;let R=await x(w,r);if(!R)continue;if(r.generator.activatedRules.add(m),this.config.details&&r.rules.push(m),typeof R!="string")if(Symbol.asyncIterator in R){let A=[];for await(let h of R)h&&A.push(h);R=A}else Symbol.iterator in R&&!Array.isArray(R)&&(R=Array.from(R).filter(pt));let W=Gn(R).filter(A=>A.length);if(W.length){let A=this.config.rules.indexOf(m);return W.map(h=>{if(P(h))return[A,h,$];let g=f,v=$;for(let C of h)C[0]===pe.variants?g=[...V(C[1]),...g]:C[0]===pe.parent?g=[{parent:C[1]},...g]:C[0]===pe.selector?g=[{selector:C[1]},...g]:C[0]===pe.layer?g=[{layer:C[1]},...g]:C[0]===pe.sort&&(v={...v,sort:C[1]});return[A,c,h,v,g]})}}},a=(await Promise.all(i.map(c=>s(c)))).flat().filter(c=>!!c);if(a.length)return a}stringifyUtil(t,r){if(!t)return;if(Dr(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:c}=this.applyVariants(t),u=Se(o);if(!u)return;let{layer:f,sort:p,...d}=t[3]??{},m={...d,layer:s??f,sort:a??p};return[t[0],n,u,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Kn,i,s;for(let a of this.config.shortcuts){let c=t;if(a[2]?.prefix){let f=V(a[2].prefix).find(p=>t.startsWith(p));if(f==null)continue;c=t.slice(f.length)}if(qn(a)){if(a[0]===c){i=i||a[2],s=a[1],o(a);break}}else{let u=c.match(a[0]);if(u&&(s=a[1](u,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=V(s).map(a=>P(a)?Yn(a.trim()).split(/\s+/g):a).flat()),!s){let a=P(t)?await this.matchVariants(t):[t];for(let c of a){let[u,f]=c;if(u!==f){let p=await this.expandShortcut(f,r,n-1);p&&(s=p[0].map(d=>P(d)?u.replace(f,d):d))}}}if(s)return[(await Promise.all(s.map(async a=>(P(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(a=>!!a),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new mt,s=(await Promise.all(ee(n).map(async f=>{let p=P(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",$e(f),void 0,[]]];return!p&&this.config.warn&&Zn(`unmatched utility "${f}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,c]=t,u=[];for(let f of s){if(Dr(f)){u.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:m,sort:b,noMerge:x,layer:$}=this.applyVariants(f,[...f[4],...c],a);i.getFallback($??o.layer,new dt).getFallback(p,m,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),b??0])}return u.concat(i.flatMap((f,p)=>f.map(([d,m],b,x)=>{let $=(w,R,W)=>{let A=Math.max(...W.map(g=>g[1])),h=W.map(g=>g[0]);return(w?[h.flat(1)]:h).map(g=>{let v=Se(g);if(v)return[m,b,v,x,{...o,noMerge:R,sort:A,layer:p},r,void 0]})};return[[d.filter(([,w])=>w).map(([w,,R])=>[w,R]),!0],[d.filter(([,w])=>!w).map(([w,,R])=>[w,R]),!1]].map(([w,R])=>[...$(!1,R,w.filter(([W])=>W.some(A=>A[0]===pe.shortcutsNoMerge))),...$(!0,R,w.filter(([W])=>W.every(A=>A[0]!==pe.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(t):P(r)?r===t:r.test(t))}getBlocked(t){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(t):P(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function io(e,t){return await Gr.create(e,t)}var so=/\s\$\$\s+/g;function cc(e){return so.test(e)}function lc(e,t){return cc(e)?e.replace(so,t?` ${t} `:" "):t?`${t} ${e}`:e}var oo=/^\[(.+?)(~?=)"(.*)"\]$/;function uc(e){return oo.test(e)?e.replace(oo,(t,r,n,o)=>`[${ft(r)}${n}"${ft(o)}"]`):`.${ft(e)}`}function fc(e,t){return t(e)}function pc(e){let t,r,n=2166136261;for(t=0,r=e.length;t<r;t++)n^=e.charCodeAt(t),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return`00000${(n>>>0).toString(36)}`.slice(-6)}function ao(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${pc(i)}`;t.set(s,i),e=e.replace(i,s)}return e}function co(e,t){for(let[r,n]of t.entries())e=e.replaceAll(r,n);return e}var dc=/\/\/#\s*sourceMappingURL=.*\n?/g;function lo(e){return e.includes("sourceMappingURL=")?e.replace(dc,""):e}var mc=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,gc=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,hc=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function bc(e){let t=[];for(let o of e.matchAll(gc))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(mc))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=ao(e,r,/-\[(?!&.+?;)[^\]]*\]/g,n),e&&e.split(ct).forEach(o=>{o.includes(n)&&(o=co(o,r)),Dn(o)&&!hc.test(o)&&t.push(o)}),t}function uo(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return bc(lo(e))}}}function fo(e){if(e.preflight)return[{layer:"preflights",getCSS({theme:t,generator:r}){if(t.preflightBase){let n=Object.entries(t.preflightBase);if(e.preflight==="on-demand"){let o=new Set(Array.from(r.activatedRules).map(i=>i[2]?.custom?.preflightKeys).filter(Boolean).flat());n=n.filter(([i])=>o.has(i))}if(n.length>0){let o=Se(n);return e.variablePrefix!=="un-"&&(o=o.replace(/--un-/g,`--${e.variablePrefix}`)),V(t.preflightRoot??["*,::before,::after","::backdrop"]).map(s=>`${s}{${o}}`).join("")}}}}]}function Ce(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function de(e,t,r,n){if(e===""||(P(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let s=0;s<o;s++)switch(e[s]){case t:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let c=a.length;if(c&&a===e.slice(s,s+c)&&i===0)return s===0||s===o-c?void 0:[e.slice(0,s),e.slice(s+c)]}}return[e,""]}function xe(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=de(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Hr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],po=["%alpha","<alpha-value>"],xc=new RegExp(po.map(e=>fe(e)).join("|"));function Y(e=""){let t=yc(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Hr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ae(e){let t=e.alpha??1;return typeof t=="string"&&po.includes(t)?1:t}function M(e,t){if(typeof e=="string")return e.replace(xc,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Hr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function yc(e){if(!e)return;let t=vc(e);if(t!=null||(t=wc(e),t!=null)||(t=kc(e),t!=null)||(t=Sc(e),t!=null)||(t=Cc(e),t!=null))return t}function vc(e){let[,t]=e.match(/^#([\da-f]+)$/i)||[];if(t)switch(t.length){case 3:case 4:let r=Array.from(t,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:t.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(t,16);return{type:"rgb",components:t.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:t.length===6?void 0:Math.round((n&255)/255*100)/100}}}function wc(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function kc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=xe(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var $c=new RegExp(`^(${Hr.join("|")})\\((.+)\\)$`,"i");function Sc(e){let t=e.match($c);if(!t)return;let[,r,n]=t,o=mo(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function Cc(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=mo(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function mo(e){let t=xe(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=xe(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function bt(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=e[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return t}var go="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xo=new Uint8Array(64),Rc=new Uint8Array(128);for(let e=0;e<go.length;e++){let t=go.charCodeAt(e);xo[e]=t,Rc[t]=e}function Ue(e,t,r){let n=t-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),e.write(xo[o])}while(n>0);return t}var ho=1024*16,bo=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 r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}},qr=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(ho)}write(t){let{buffer:r}=this;r[this.pos++]=t,this.pos===ho&&(this.out+=bo.decode(r),this.pos=0)}flush(){let{buffer:t,out:r,pos:n}=this;return n>0?r+bo.decode(t.subarray(0,n)):r}};function yo(e){let t=new qr,r=0,n=0,o=0,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(s>0&&t.write(59),a.length===0)continue;let c=0;for(let u=0;u<a.length;u++){let f=a[u];u>0&&t.write(44),c=Ue(t,f[0],c),f.length!==1&&(r=Ue(t,f[1],r),n=Ue(t,f[2],n),o=Ue(t,f[3],o),f.length!==4&&(i=Ue(t,f[4],i)))}}return t.flush()}var xt=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))}},yt=class e{constructor(t,r,n){this.start=t,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(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 r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,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 r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,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(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");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(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");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(t,""),this.outro.length)return!0}};function Ec(){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 Tc=Ec(),Yr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=yo(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,"+Tc(this.toString())}};function jc(e){let t=e.split(`
3
3
  `),r=t.filter(i=>/^\t+/.test(i)),n=t.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 a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function zc(e,t){let r=e.split(/[/\\]/),n=t.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 Oc=Object.prototype.toString;function Ac(e){return Oc.call(e)==="[object Object]"}function vo(e){let t=e.split(`
4
4
  `),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let u=i+s>>1;o<r[u]?s=u:i=u+1}let a=i-1,c=o-r[a];return{line:a,column:c}}}var Vc=/\w/,Xr=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,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
5
5
  `,0),a=-1;for(;s>=0&&i>s;){let u=[this.generatedCodeColumn,t,n.line,n.column];o>=0&&u.push(o),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=s,s=r.indexOf(`