@fwkui/x-css 1.0.18 → 1.0.20

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/dist/index.d.mts CHANGED
@@ -12,6 +12,7 @@ type XCSSConfig = {
12
12
  version?: string;
13
13
  compression?: boolean;
14
14
  debounceMs?: number;
15
+ sizeLast?: number;
15
16
  };
16
17
  };
17
18
  interface XCSSCacheData {
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ type XCSSConfig = {
12
12
  version?: string;
13
13
  compression?: boolean;
14
14
  debounceMs?: number;
15
+ sizeLast?: number;
15
16
  };
16
17
  };
17
18
  interface XCSSCacheData {
package/dist/index.js CHANGED
@@ -1,14 +1,19 @@
1
- "use strict";var we=Object.defineProperty;var lt=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var ft=(e,t)=>{for(var n in t)we(e,n,{get:t[n],enumerable:!0})},ut=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ct(t))!dt.call(e,o)&&o!==n&&we(e,o,{get:()=>t[o],enumerable:!(s=lt(t,o))||s.enumerable});return e};var pt=e=>ut(we({},"__esModule",{value:!0}),e);var Nt={};ft(Nt,{clsx:()=>Bt,createSharedClsx:()=>jt,createSharedInstance:()=>Mt,default:()=>Ut,getBootloaderScript:()=>Fe,getCss:()=>Wt,observe:()=>Kt,ready:()=>Vt,setClsxRoot:()=>Ht});module.exports=pt(Nt);var je=e=>(e=e||new Map,{all:e,on(t,n){let s=e.get(t);s?s.push(n):e.set(t,[n])},off(t,n){let s=e.get(t);s&&(n?s.splice(s.indexOf(n)>>>0,1):e.set(t,[]))},emit(t,n){let s=e.get(t);s&&s.slice().forEach(d=>{d(n)});let o=e.get("*");o&&o.slice().forEach(d=>{d(t,n)})}});function yt(e,t,n){let s=0;for(let o=t;o<n;o++){let d=e.charCodeAt(o);if(d===91){s++;continue}if(d===93){s>0&&s--;continue}if(d===58&&s===0)return o}return-1}function St(e,t,n){let s=0;for(let o=n-1;o>=t;o--){let d=e.charCodeAt(o);if(d===93){s++;continue}if(d===91){s>0&&s--;continue}if(d===64&&s===0)return o}return-1}function gt(e,t,n){let s=0;for(let o=t;o<n;o++){let d=e.charCodeAt(o);if(d===91){s++;continue}if(d===93){if(s===0)return!1;s--}}return s===0}function ht(e){return e>=97&&e<=122}function le(e){if(!e||e.length<2||!gt(e,0,e.length))return null;let t=0,n=e.length,s="",o=St(e,t,n);o>t&&(s=e.substring(o+1,n),n=o);let d="",h="",u=yt(e,t,n);if(u>0&&u<n){let X=e.substring(t,u);t=u+1,d=X}let O=t;for(;O<n;){let X=e.charCodeAt(O);if(X>=48&&X<=57)O++;else break}if(O>t&&(h=e.substring(t,O),t=O),t>=n||e.charCodeAt(t)===38)return null;if(e.charCodeAt(t)===91){let X=e.indexOf("]",t);if(X>t)return{mq:d,layer:h,prop:e.substring(t,X+1),val:"",selector:s}}let R=t;for(;R<n;){let X=e.charCodeAt(R);if(X===45||X===46){if(R+1<n){let b=e.charCodeAt(R+1);if(X===45&&b===45&&R>t||b>=48&&b<=57)break}R++;continue}if(!ht(X))break;R++}if(R===t)return null;let K=e.substring(t,R),M=e.substring(R,n);return{mq:d,layer:h,prop:K,val:M,selector:s}}var He=e=>{let t=typeof e?.styleId=="string"&&e.styleId.trim()?e.styleId.trim():"fwkui",n=typeof e?.version=="string"&&e.version.trim()?e.version.trim():"v1",s=e?.compression??!0,o=typeof e?.debounceMs=="number"&&e.debounceMs>=0?e.debounceMs:1e3;return{styleId:t,version:n,compression:s,debounceMs:o}},mt=e=>`${e.styleId}_cache_${e.version}`,Ct=e=>`${e.styleId}_sizeL_${e.version}`,We=e=>{if(!e||typeof e!="object")return!1;let t=e;return t.__xcss_cache_v===2&&t.compressed===!0&&typeof t.payload=="string"},xe=e=>{if(!e||typeof e!="object")return!1;let t=e;return t.__xcss_cache_v===3&&t.compressed===!0&&t.algorithm==="deflate-raw"&&t.encoding==="base64"&&typeof t.payload=="string"},Ve=()=>typeof CompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",Ue=()=>typeof DecompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",bt=e=>{if(typeof btoa=="function"){let n="";for(let o=0;o<e.length;o+=32768){let d=e.subarray(o,o+32768);for(let h=0;h<d.length;h++)n+=String.fromCharCode(d[h])}return btoa(n)}let t=globalThis.Buffer;if(typeof t<"u")return t.from(e).toString("base64");throw new Error("XCSS: base64 encoding is not supported in this runtime")},wt=e=>{if(typeof atob=="function"){let n=atob(e),s=new Uint8Array(n.length);for(let o=0;o<n.length;o++)s[o]=n.charCodeAt(o);return s}let t=globalThis.Buffer;if(typeof t<"u")return new Uint8Array(t.from(e,"base64"));throw new Error("XCSS: base64 decoding is not supported in this runtime")},xt=async e=>{if(!Ve())throw new Error("XCSS: CompressionStream is not supported");let t=new Blob([e]).stream().pipeThrough(new CompressionStream("deflate-raw")),n=await new Response(t).arrayBuffer();return bt(new Uint8Array(n))},vt=async e=>{if(!Ue())throw new Error("XCSS: DecompressionStream is not supported");let t=wt(e),n=new Uint8Array(t.length);n.set(t);let s=new Blob([n.buffer]).stream().pipeThrough(new DecompressionStream("deflate-raw"));return await new Response(s).text()},Et=e=>{try{let t=JSON.parse(e);return xe(t)}catch{return!1}},Rt=e=>{if(!e)return"";let t=new Map,n=[],s=256;for(let d=0;d<256;d++)t.set(String.fromCharCode(d),d);let o=e[0];for(let d=1;d<e.length;d++){let h=e[d],u=o+h;t.has(u)?o=u:(n.push(t.get(o)),t.set(u,s++),o=h)}return n.push(t.get(o)),n.map(d=>String.fromCharCode(d)).join("")},Ne=e=>{if(!e)return"";let t=new Map,n=256,s="";for(let u=0;u<256;u++)t.set(u,String.fromCharCode(u));let o=e.split("").map(u=>u.charCodeAt(0)),d=o[0],h=t.get(d)||"";s=h;for(let u=1;u<o.length;u++){let O=o[u],R=t.get(O);R||(R=O===n?h+h[0]:""),s+=R,t.set(n++,h+R[0]),h=R}return s},ve=e=>{if(!e||typeof e!="object")return null;let t=e,n=t.default&&typeof t.default=="object"?t.default:t,s=n.SHORT_PROPERTIES,o=n.COMMON_VALUES,d=n.SPECIFIC_VALUES;return!s||!o||!d||typeof s!="object"||typeof o!="object"||typeof d!="object"?null:{SHORT_PROPERTIES:s,COMMON_VALUES:o,SPECIFIC_VALUES:d}},It=async e=>{let t=await import(e),n=ve(t);if(!n)throw new Error(ze);return n},ze="XCSS: dictionary module must export SHORT_PROPERTIES, COMMON_VALUES and SPECIFIC_VALUES",qe=()=>{let e=typeof require=="function"?require:null;if(!e)return null;for(let t of["./dictionary.js","./dictionary"])try{let n=e(t),s=ve(n);if(s)return s}catch{}return null},Tt=async()=>{let e=qe();if(e)return e;let t=["./dictionary.mjs","./dictionary.js","./dictionary"],n=null;for(let s of t)try{let o=await import(s),d=ve(o);if(d)return d}catch(o){n=o}throw n||new Error(ze)},Dt=(e,t)=>{if(!e||typeof document>"u")return;t=t||"fwkui";let n=Array.from({length:24},(s,o)=>"l"+o);if(!e.querySelector('style[id="'+t+'"]')){let s=document.createElement("style");if(s.id=t,!(e instanceof ShadowRoot))document.head.append(s);else try{e.prepend(s)}catch{e.appendChild(s)}let o=`@layer ${n.join(", ")};`,d=setInterval(()=>{if(s.sheet){clearInterval(d);try{s.sheet.insertRule(o,s.sheet.cssRules.length)}catch{}}},10)}},At=e=>{let t=Array.isArray(e.excludes)?e.excludes:[],n=He(e.cache),s=JSON.stringify({base:e.base||"",aliases:e.aliases||{},breakpoints:e.breakpoints||[],theme:e.theme||{},prefix:e.prefix||"",excludes:t,excludePrefixes:e.excludePrefixes||[],dictionaryImport:e.dictionaryImport??!0,cache:n}),o=0;if(s.length===0)return o.toString();for(let d=0;d<s.length;d++){let h=s.charCodeAt(d);o=(o<<5)-o+h,o|=0}return o.toString()},Be=e=>{if(!e)return null;try{let t=JSON.parse(e);if(We(t)){let n=Ne(t.payload);return n?JSON.parse(n):null}return xe(t)?null:t}catch{return null}},_t=async e=>{if(!e)return null;try{let t=JSON.parse(e);if(We(t)){let n=Ne(t.payload);return n?JSON.parse(n):null}if(xe(t)){let n=await vt(t.payload);return n?JSON.parse(n):null}return t}catch{return null}},Ke=(e,t)=>{if(e==="root")return t;let n=/@media[^{]+\{\n?([\s\S]+)\n?\}/.exec(t);return n&&n[1]?n[1].trim():t},Ee=(e={base:"",aliases:{},excludes:[],excludePrefixes:[],breakpoints:[],theme:{},prefix:"",dictionaryImport:!0,cache:{styleId:"fwkui",version:"v1",compression:!0,debounceMs:1e3}})=>{let{base:t=null,breakpoints:n=[],aliases:s={},theme:o={},excludes:d=[],excludePrefixes:h=[],prefix:u="",dictionaryImport:O=!0,cache:R={}}=e||{};Array.isArray(n)||(n=[]),Array.isArray(d)||(d=[]),Array.isArray(h)||(h=[]),(!s||typeof s!="object")&&(s={}),(!o||typeof o!="object")&&(o={});let K=He(R),M=mt(K),X=d,b=h.filter(r=>typeof r=="string").map(r=>r.trim()).filter(r=>r.length>0),L=r=>{let a=r.replace(/[.+?^${}()|[\]\\]/g,"\\$&");return new RegExp("^"+a.replace(/\*/g,".*")+"$")},Y=X.filter(r=>typeof r=="string").map(r=>r.trim()).filter(r=>r.length>0).map(r=>{if(r.includes("*")){let a=L(r);return c=>a.test(c)}return a=>a===r}),ce=r=>b.some(a=>r.startsWith(a))?!0:Y.some(a=>a(r)),de=r=>!(ce(r)||u&&!r.startsWith(u)),Ze=["default","xs","sm","md","lg","xl","2xl","sma","mda","lga","xla"],Je=n.filter(r=>!!r&&typeof r=="object"&&!Array.isArray(r)).map(r=>Object.keys(r)[0]).filter(r=>typeof r=="string"&&r.length>0),Ge=new Set([...Ze,...Je]),fe=r=>!r||Ge.has(r),Ye=O!==!1,Qe=new Set(["mx","my","px","py","bdx","bdy"]),ue=new Set,pe=r=>r?!Ye||!z||Object.keys(z).length===0?!0:!!z[r]||Qe.has(r)||ue.has(r):!1,z={},ne={},ye={},Se={},Ae=()=>{Se={...ye,...o}},F=r=>{if(!r){z={},ne={},ye={},ue=new Set,Ae();return}z=r.SHORT_PROPERTIES,ne=r.SPECIFIC_VALUES,ye=r.COMMON_VALUES,ue=new Set(Object.values(z)),Ae()},Z=!0,se=Promise.resolve();if(O===!1)F(null);else if(typeof O=="string")Z=!1,F(null),se=It(O).then(r=>{F(r)}).catch(r=>{console.warn("XCSS: Failed to import dictionary from URL",r)}).finally(()=>{Z=!0});else{let r=qe();r?F(r):(Z=!1,F(null),se=Tt().then(a=>{F(a)}).catch(a=>{console.warn("XCSS: Failed to load built-in dictionary module",a)}).finally(()=>{Z=!0}))}let Q=null,et=(r=typeof document<"u"?document:void 0)=>{let a=typeof window<"u"&&typeof document<"u",c=null,g=Array.isArray(t)?t.length>0:!!t;r&&(c="getRootNode"in r?r.getRootNode():r);let y=new Map,x=new Set,v=1e3,p=Ct(K);a&&c&&Dt(c,K.styleId);let m=je(),S=[{default:""},{xs:"screen and (max-width: 575px)"},{sm:"screen and (min-width: 576px)"},{md:"screen and (min-width: 768px)"},{lg:"screen and (min-width: 992px)"},{xl:"screen and (min-width: 1200px)"},{"2xl":"screen and (min-width: 1400px)"},{sma:"screen and (max-width: 768px)"},{mda:"screen and (max-width: 992px)"},{lga:"screen and (max-width: 1200px)"},{xla:"screen and (max-width: 1400px)"},...n],$=S.filter((i,l)=>S.findLastIndex(f=>Object.keys(f)[0]==Object.keys(i)[0])==l),I=$.map(i=>Object.keys(i)[0]),D={},T={},_={root:""},ee={root:[]},k={root:!1},H=At(e),V=null,J=0,j=!1,B=null,q=null,U=i=>{try{window.localStorage.setItem(M,i)}catch(l){console.warn("XCSS: Failed to save cache",l)}},te=()=>{if(!(!a||!window.localStorage))try{let i=parseInt(window.localStorage.getItem(p)||"0",10);i>v&&(v=i)}catch{}},E=()=>{if(!(!a||!window.localStorage))try{window.localStorage.setItem(p,String(v))}catch{}},oe=i=>{!a||!window.localStorage||typeof i=="string"&&window.localStorage.getItem(M)!==i||window.localStorage.removeItem(M)},me=i=>{if(!a||!window.localStorage)return;Q=i;let l=++J;try{let f=JSON.stringify(i),w=()=>{let C={__xcss_cache_v:2,compressed:!0,payload:Rt(f)};U(JSON.stringify(C))};if(!K.compression){U(f);return}if(Ve()&&Ue()){xt(f).then(C=>{if(l!==J)return;U(JSON.stringify({__xcss_cache_v:3,compressed:!0,algorithm:"deflate-raw",encoding:"base64",payload:C}))}).catch(()=>{l===J&&w()});return}w()}catch(f){console.warn("XCSS: Failed to save cache",f)}},ie=()=>{a&&(V&&clearTimeout(V),V=setTimeout(()=>{let i={};for(let w in D)i[w]=Array.from(D[w]);let l={};Object.keys(_).forEach(w=>{if(w==="root")l[w]=_[w];else{let C=S.find(P=>Object.keys(P)[0]===w)?.[w];C&&_[w]?l[w]=`@media ${C} {
2
- ${_[w]}
3
- }`:l[w]=_[w]||""}});let f={configHash:H,cssText:l,rulesSet:i,keys:Array.from(y.entries()),sizeLast:v};E(),me(f)},K.debounceMs))};if(a&&window.localStorage)try{let i=window.localStorage.getItem(M);if(i){let l=Be(i);if(!l)Et(i)?q={raw:i}:window.localStorage.removeItem(M);else if(l.configHash!==H)window.localStorage.removeItem(M);else{if(B=l,j=!0,l.keys&&l.keys.forEach(([f,w])=>{y.set(f,w),x.add(w)}),typeof l.sizeLast=="number"&&(v=l.sizeLast),te(),E(),l.cssText)for(let f in l.cssText)_[f]=Ke(f,l.cssText[f]);Q=l}}}catch(i){console.error(i)}a&&(T.root=new CSSStyleSheet),I.forEach(i=>{if(D[i]=new Set,a){let l=$.find(f=>Object.keys(f)[0]==i)?.[i]||"";T[i]=new CSSStyleSheet({media:l})}j||(_[i]=""),ee[i]=[],k[i]=!1});let ae=()=>{if(!c)return;let i=c.querySelector(`style[id="${K.styleId}"]`);i&&i.remove()},Xe=i=>{if(i.keys&&i.keys.forEach(([l,f])=>{y.set(l,f),x.add(f)}),typeof i.sizeLast=="number"&&(v=i.sizeLast),te(),E(),i.cssText)for(let l in i.cssText){if(l==="root"&&g)continue;let f=Ke(l,i.cssText[l]);_[l]=f,a&&T[l]&&T[l].replaceSync(f)}if(i.rulesSet)for(let l in i.rulesSet)D[l]||(D[l]=new Set),i.rulesSet[l].forEach(f=>D[l].add(f));Q=i,ae()};j&&B&&Xe(B),t&&Array.isArray(t)?(_.root=t.join(`
4
- `),a&&T.root&&T.root.replaceSync(_.root)):(_.root=t||"",a&&T.root&&T.root.replaceSync(_.root)),a&&c&&["root",...I].forEach(i=>{T[i]&&c?.adoptedStyleSheets&&(c.adoptedStyleSheets.includes(T[i])||(c.adoptedStyleSheets=[...c.adoptedStyleSheets,T[i]]))}),a&&window.localStorage&&q&&!j&&(async()=>{let i=await _t(q.raw);if(!i){oe(q.raw);return}if(i.configHash!==H){oe(q.raw);return}j=!0,B=i,Xe(i)})(),a&&window.addEventListener&&window.addEventListener("storage",i=>{if(i.key===p&&i.newValue){let l=parseInt(i.newValue,10);l>v&&(v=l)}});let ot=(i,l)=>{let{media:f,property:w,selector:C,layer:P,className:A}=l,N=_,W=ee,Ce=k;P=Number(P)||0;let Pe=y.get(i),at=Pe?`.${Pe}${C}`:`.${A}${C}`;var be=`@layer l${P}{${at}{${w}}}`;D[f]||(D[f]=new Set);let $e=D[f];if(!$e.has(be))if($e.add(be),W[f]||(W[f]=[]),W[f].push(be),a)Ce[f]||(Ce[f]=!0,queueMicrotask(()=>{let re=W[f],Me=T[f];re.length>0&&(N[f]+=(N[f]?`
5
- `:"")+re.join(`
6
- `),Me&&Me.replaceSync(N[f]),W[f]=[],ie()),Ce[f]=!1}));else{let re=W[f];re.length>0&&(N[f]+=(N[f]?`
7
- `:"")+re.join(`
8
- `),W[f]=[])}},it=i=>{i.forEach(l=>{let f=Oe(l);f&&ot(l,f)})},Le=i=>{if(i.length===0)return;let l=()=>it(i);Z?l():se.then(l)};return m.on("observeDom",Le),{clsx:(...i)=>{let l=i.map(C=>Array.isArray(C)?C:[C]).flat(1/0).map(C=>typeof C=="string"?C.split(/(\s|\t)+/g):[]).flat(1/0);l=l.filter(C=>typeof C=="string"&&C.trim()),l=[...new Set(l)];let f=C=>{if(!de(C))return!1;if(Z)return!!Oe(C);let P=u?C.slice(u.length):C,A=le(P);if(!A||!fe(A.mq))return!1;let N=(A.selector||"").replace(/(';|;)/g,W=>W=="';"?";":" ");return N&&!ge(N)?!1:A.prop.startsWith("[")?!!_e(A.prop+A.val):pe(A.prop)?(A.prop==="&",A.val.length>0):!1},w=l.map(C=>{let P=C;if(y.has(C))P=y.get(C);else if(f(C)){te();let A;do A="D"+(v++).toString(32).toUpperCase();while(x.has(A));y.set(C,A),x.add(A),P=A,E(),ie()}return P});return a?queueMicrotask(()=>m.emit("observeDom",l)):m.emit("observeDom",l),w.join(" ")},observe:()=>{!a||!c||st(c,i=>{Le(i)})},getCssString:()=>Object.entries(_).map(([i,l])=>{if(!l)return"";if(i==="root"||i==="default")return l;let f=S.find(w=>Object.keys(w)[0]===i)?.[i];return f?`@media ${f} {
9
- ${l}
10
- }`:l}).join(`
11
- `)}};function _e(r){let a=new RegExp("^(\\[(?<p>[a-zA-Z]+)\\])$"),{p:c=""}=a.exec(r)?.groups??{};if(c&&s[c]&&Array.isArray(s[c])){let g=s[c],y=[],x=!0,v=p=>{let m=p.trim();if(!m)return null;let S=m.endsWith(";")?m.slice(0,-1).trim():m,$=S.indexOf(":");if($<=0||$>=S.length-1)return null;let I=S.slice(0,$).trim(),D=S.slice($+1).trim();return!I||!D||!/^(?:--[a-zA-Z0-9-_]+|-?[a-zA-Z][a-zA-Z0-9-]*)$/.test(I)?null:`${I}:${D}`};for(let p of g){if(typeof p!="string"){x=!1;break}let m=v(p);if(m){if(typeof CSS<"u"&&!CSS.supports(m)){x=!1;break}y.push(m);continue}x=!1;break}if(y.length>0&&x)return y.join(";")}return null}function ke(r,a){let c=_e(r+a);if(c)return c;if(!r||a===void 0)return null;let g=z[r],y=g||r,x=a[0],v=!1,p=a;if(x==="!"&&(v=!0,p=p.substring(1),x=p[0]),p.startsWith("--"))p="var("+p+")";else if(x==="["&&p.endsWith("]"))p=p.substring(1,p.length-1);else if(p.length>0){let I=p[0].toLowerCase()+p.substring(1),D=ne[r]?.[I]||Se[I];if(!D){let T=p.toLowerCase();D=ne[r]?.[T]||Se[T]}p=D||p}if(p=p.replace(/(';|;)/g,I=>I=="';"?";":" "),!p)return null;let m=p+(v?" !important":""),S=[y+":"+m];switch(y){case"mx":S=[`margin-left:${m}`,`margin-right:${m}`];break;case"my":S=[`margin-top:${m}`,`margin-bottom:${m}`];break;case"px":S=[`padding-left:${m}`,`padding-right:${m}`];break;case"py":S=[`padding-top:${m}`,`padding-bottom:${m}`];break;case"bdx":S=[`border-left:${m}`,`border-right:${m}`];break;case"bdy":S=[`border-top:${m}`,`border-bottom:${m}`];break}return!(typeof CSS<"u")||S.every(I=>CSS.supports(I))?S.join(";"):null}let tt=r=>{let a=0;for(let c=r.length-1;c>=0;c--){let g=r[c];if(g==="]"){a++;continue}if(g==="["){a>0&&a--;continue}if(g==="@"&&a===0)return{body:r.slice(0,c),selector:r.slice(c+1)}}return{body:r,selector:""}},rt=r=>{let a=[],c=0,g=0;for(let y=0;y<r.length;y++){let x=r[y];if(x==="["){g++;continue}if(x==="]"){g>0&&g--;continue}x==="&"&&g===0&&(a.push(r.slice(c,y)),c=y+1)}return a.push(r.slice(c)),a},ge=r=>{if(!r)return!0;let a=r.trim();if(!a)return!0;if(/[{}]/.test(a)||a==="#"||a==="("||a===")"||a===","||a===">"||a==="+"||a==="~"||a.startsWith("(")||a.startsWith(")"))return!1;let c=0;for(let g=0;g<a.length;g++){let y=a[g];if(y==="("){c++;continue}if(y===")"){if(c===0)return!1;c--}}return c===0};function Oe(r){if(!de(r))return null;let a=u?r.slice(u.length):r,c=typeof CSS<"u"?CSS.escape(r):nt(r);if(a.includes("&")&&!a.startsWith("&")){let{body:T,selector:_}=tt(a),ee=rt(T).map(k=>k.trim()).filter(k=>k.length>0).map(k=>u&&k.startsWith(u)?k.slice(u.length):k);if(ee.length>1){let k="",H="",V=_,J=!1,j=[];for(let U of ee){let te=V?`${U}@${V}`:U,E=le(te);if(!E||!fe(E.mq)||!E.prop.startsWith("[")&&!pe(E.prop))return null;J?(!E.mq&&k&&(E.mq=k),!E.layer&&H&&(E.layer=H)):(k=E.mq||"",H=E.layer||"",J=!0);let oe=E.mq||"",me=E.layer||"",ie=E.selector||"";if(oe!==k||me!==H||ie!==V)return null;let ae=ke(E.prop,E.val);if(!ae)return null;j.push(ae)}if(j.length===0)return null;let B=V.replace(/(';|;)/g,U=>U=="';"?";":" "),q=`selector(${c}${B})`;if(B){if(typeof CSS<"u"){if(!CSS.supports(q))return null}else if(!ge(B))return null}return{media:k||"default",layer:H||"0",className:c,property:j.join(";"),selector:B,cssRules:`.${c}${B}{${j.join(";")}}`}}}let g=le(a);if(!g||!fe(g.mq)||!g.prop.startsWith("[")&&!pe(g.prop))return null;let{mq:y="default",layer:x="0",prop:v,val:p,selector:m=""}=g,S=[],$=ke(v,p);if($&&S.push($),S.length===0)return null;let I=m.replace(/(';|;)/g,T=>T=="';"?";":" "),D=`selector(${c}${I})`;if(I){if(typeof CSS<"u"){if(!CSS.supports(D))return null}else if(!ge(I))return null}return{media:y||"default",layer:x||"0",className:c,property:S.join(";"),selector:I,cssRules:`.${c}${I}{${S.join(";")}}`}}let nt=r=>r.replace(/([^\w-])/g,"\\$1"),he=r=>{var a=[...r?.classList||[]].filter(c=>{if(c){let g=c.charCodeAt(0)==45?c.charCodeAt(1):c.charCodeAt(0);return g>=97&&g<=122||g>=48&&g<=57}return!1});return r?.children?.length>0&&Array.from(r?.children).forEach(c=>{a.push(...he(c))}),a.flat(1/0)},st=(r,a)=>{if(typeof a!="function")throw new Error("Callback is not a function");if(!r)return;let c;"documentElement"in r?c=r.documentElement:(r instanceof Element||"tagName"in r||"host"in r)&&(c=r),c&&(c instanceof Element&&a(he(c)),typeof MutationObserver<"u"&&new MutationObserver(g=>{for(let y of g)if(y.type=="attributes"&&y.attributeName=="class"){if(y.target.nodeType==1){let x=String(y.target?.className??""),v=String(y?.oldValue??"");if(x||v){let p=x.split(" ").map(S=>S.trim()).filter(S=>S),m=v.split(" ").map(S=>S.trim()).filter(S=>S);p=p.filter(S=>!m.includes(S)),typeof a=="function"&&a([...new Set(p)])}}}else if(y.type=="childList"&&y.addedNodes.length>0){let x=[...y.addedNodes].filter(v=>v.nodeType==1).map(v=>he(v)).flat(1/0);typeof a=="function"&&a([...new Set(x)])}}).observe(c,{attributes:!0,attributeOldValue:!0,attributeFilter:["class"],childList:!0,subtree:!0}))};return{buildCss:et,exportCache:()=>typeof window>"u"||!window.localStorage?Q:Be(window.localStorage.getItem(M))||Q,ready:se}},kt=(e,t)=>{Ee(t).buildCss(e).observe()},Ot=(e,t)=>Ee(t).buildCss(e).clsx,Re={css:Ee,cssObserve:kt,clsx:Ot};var Xt=(e,t)=>(e=e||"fwkui",t=t||"v1",`${e}_cache_${t}`),Fe=(e="fwkui",t="v1",n)=>{let s=String(e||"").trim()||"fwkui",o=Xt(s,t),d=JSON.stringify(s),h=JSON.stringify(o),u=`
1
+ "use strict";var Te=Object.defineProperty;var kt=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var Rt=Object.prototype.hasOwnProperty;var It=(e,t)=>{for(var r in t)Te(e,r,{get:t[r],enumerable:!0})},Tt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Et(t))!Rt.call(e,n)&&n!==r&&Te(e,n,{get:()=>t[n],enumerable:!(s=kt(t,n))||s.enumerable});return e};var _t=e=>Tt(Te({},"__esModule",{value:!0}),e);var gr={};It(gr,{clsx:()=>cr,createSharedClsx:()=>lr,createSharedInstance:()=>ar,default:()=>br,getBootloaderScript:()=>lt,getCss:()=>ur,observe:()=>dr,ready:()=>pr,setClsxRoot:()=>fr});module.exports=_t(gr);var Ze=e=>(e=e||new Map,{all:e,on(t,r){let s=e.get(t);s?s.push(r):e.set(t,[r])},off(t,r){let s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit(t,r){let s=e.get(t);s&&s.slice().forEach(l=>{l(r)});let n=e.get("*");n&&n.slice().forEach(l=>{l(t,r)})}});function At(e,t,r){let s=0;for(let n=t;n<r;n++){let l=e.charCodeAt(n);if(l===91){s++;continue}if(l===93){s>0&&s--;continue}if(l===58&&s===0)return n}return-1}function Ot(e,t,r){let s=0;for(let n=r-1;n>=t;n--){let l=e.charCodeAt(n);if(l===93){s++;continue}if(l===91){s>0&&s--;continue}if(l===64&&s===0)return n}return-1}function Lt(e,t,r){let s=0;for(let n=t;n<r;n++){let l=e.charCodeAt(n);if(l===91){s++;continue}if(l===93){if(s===0)return!1;s--}}return s===0}function Pt(e){return e>=97&&e<=122}function pe(e){if(!e||e.length<2||!Lt(e,0,e.length))return null;let t=0,r=e.length,s="",n=Ot(e,t,r);n>t&&(s=e.substring(n+1,r),r=n);let l="",f="",u=At(e,t,r);if(u>0&&u<r){let _=e.substring(t,u);t=u+1,l=_}let y=t;for(;y<r;){let _=e.charCodeAt(y);if(_>=48&&_<=57)y++;else break}if(y>t&&(f=e.substring(t,y),t=y),t>=r||e.charCodeAt(t)===38)return null;if(e.charCodeAt(t)===91){let _=e.indexOf("]",t);if(_>t)return{mq:l,layer:f,prop:e.substring(t,_+1),val:"",selector:s}}let v=t;for(;v<r;){let _=e.charCodeAt(v);if(_===45||_===46){if(v+1<r){let C=e.charCodeAt(v+1);if(_===45&&C===45&&v>t||C>=48&&C<=57)break}v++;continue}if(!Pt(_))break;v++}if(v===t)return null;let X=e.substring(t,v),N=e.substring(v,r);return{mq:l,layer:f,prop:X,val:N,selector:s}}var Je={a:"all",ac:"align-content",acc:"accent-color",ai:"align-items",ani:"animation",anic:"animation-composition",anide:"animation-delay",anidi:"animation-direction",anidu:"animation-duration",anifm:"animation-fill-mode",aniic:"animation-iteration-count",anin:"animation-name",anips:"animation-play-state",anitf:"animation-timing-function",ap:"appearance",ar:"aspect-ratio",as:"align-self",b:"bottom",bd:"border",bda:"border-radius",bdb:"border-bottom",bdbc:"border-bottom-color",bdblc:"border-block-color",bdble:"border-block-end",bdblec:"border-block-end-color",bdbles:"border-block-end-style",bdblew:"border-block-end-width",bdblk:"border-block",bdblr:"border-bottom-left-radius",bdbls:"border-block-start",bdblsc:"border-block-start-color",bdblss:"border-block-start-style",bdblst:"border-block-style",bdblsw:"border-block-start-width",bdblwi:"border-block-width",bdbr:"box-decoration-break",bdbrr:"border-bottom-right-radius",bdbst:"border-bottom-style",bdbw:"border-bottom-width",bdc:"border-color",bdcl:"border-collapse",bdeer:"border-end-end-radius",bdesr:"border-end-start-radius",bdi:"border-inline",bdic:"border-inline-color",bdie:"border-inline-end",bdiec:"border-inline-end-color",bdies:"border-inline-end-style",bdiew:"border-inline-end-width",bdimg:"border-image",bdinw:"border-inline-width",bdio:"border-image-outset",bdir:"border-image-repeat",bdis:"border-image-slice",bdisc:"border-inline-start-color",bdisrc:"border-image-source",bdiss:"border-inline-start-style",bdista:"border-inline-start",bdistl:"border-inline-style",bdisw:"border-inline-start-width",bdiw:"border-image-width",bdl:"border-left",bdlc:"border-left-color",bdls:"border-left-style",bdlw:"border-left-width",bdr:"border-right",bdra:"border-radius",bdrc:"border-right-color",bdrs:"border-right-style",bdrw:"border-right-width",bds:"border-style",bdser:"border-start-end-radius",bdsp:"border-spacing",bdssr:"border-start-start-radius",bdt:"border-top",bdtc:"border-top-color",bdtlr:"border-top-left-radius",bdtrr:"border-top-right-radius",bdts:"border-top-style",bdtw:"border-top-width",bdw:"border-width",bg:"background",bga:"background-attachment",bgbm:"background-blend-mode",bgc:"background-color",bgcl:"background-clip",bgi:"background-image",bgo:"background-origin",bgp:"background-position",bgpx:"background-position-x",bgpy:"background-position-y",bgr:"background-repeat",bgs:"background-size",bkdf:"backdrop-filter",bkfv:"backface-visibility",blks:"block-size",brka:"break-after",brkb:"break-before",brki:"break-inside",bxsh:"box-shadow",bxshd:"box-shadow",bxsz:"box-sizing",c:"color",caps:"caption-side",cip:"color-interpolation",ciw:"contain-intrinsic-width",clpp:"clip-path",clr:"clear",cnt:"contain",cntibs:"contain-intrinsic-block-size",cntih:"contain-intrinsic-height",cntiis:"contain-intrinsic-inline-size",cntis:"contain-intrinsic-size",cntri:"counter-increment",cntrr:"counter-reset",cntrs:"counter-set",col:"columns",colc:"column-count",colf:"column-fill",colg:"column-gap",colr:"column-rule",colrc:"column-rule-color",colrs:"column-rule-style",colrw:"column-rule-width",cols:"column-span",colw:"column-width",cr:"cursor",crtc:"caret-color",csch:"color-scheme",ctr:"container",ctrn:"container-name",ctrt:"container-type",ctt:"content",d:"display",dir:"direction",empc:"empty-cells",fca:"forced-color-adjust",ff:"font-family",fl:"float",flt:"filter",fn:"font",fnf:"font-family",fnfs:"font-feature-settings",fnk:"font-kerning",fnlo:"font-language-override",fnos:"font-optical-sizing",fnp:"font-palette",fns:"font-size",fnsa:"font-size-adjust",fnsp:"font-synthesis-position",fnss:"font-synthesis-style",fnssc:"font-synthesis-small-caps",fnstr:"font-stretch",fnsty:"font-style",fnsw:"font-synthesis-weight",fnsyn:"font-synthesis",fnv:"font-variant",fnva:"font-variant-alternates",fnvc:"font-variant-caps",fnve:"font-variant-emoji",fnvea:"font-variant-east-asian",fnvl:"font-variant-ligatures",fnvn:"font-variant-numeric",fnvp:"font-variant-position",fnvs:"font-variation-settings",fnw:"font-weight",fw:"font-weight",fx:"flex",fxb:"flex-basis",fxd:"flex-direction",fxf:"flex-flow",fxg:"flex-grow",fxs:"flex-shrink",fxw:"flex-wrap",g:"grid",ga:"grid-area",gac:"grid-auto-columns",gaf:"grid-auto-flow",gap:"gap",gar:"grid-auto-rows",gc:"grid-column",gce:"grid-column-end",gcs:"grid-column-start",gr:"grid-row",gre:"grid-row-end",grs:"grid-row-start",gt:"grid-template",gta:"grid-template-areas",gtc:"grid-template-columns",gtr:"grid-template-rows",h:"height",hc:"hyphenate-character",hlc:"hyphenate-limit-chars",hp:"hanging-punctuation",hyp:"hyphens",i:"inset",ibe:"inset-block-end",iblk:"inset-block",ibsta:"inset-block-start",ii:"inset-inline",iie:"inset-inline-end",iis:"inset-inline-start",imgo:"image-orientation",imgr:"image-rendering",ins:"inline-size",is:"isolation",jc:"justify-content",ji:"justify-items",js:"justify-self",l:"left",lbrk:"line-break",lh:"line-height",lisp:"list-style-position",ls:"list-style",lsi:"list-style-image",lst:"list-style-type",lts:"letter-spacing",m:"margin",mb:"margin-bottom",mbd:"mix-blend-mode",mbe:"margin-block-end",mblk:"margin-block",mbs:"max-block-size",mbsta:"margin-block-start",mh:"max-height",mibs:"min-block-size",mie:"margin-inline-end",mih:"min-height",min:"margin-inline",mis:"max-inline-size",mista:"margin-inline-start",misz:"min-inline-size",miw:"min-width",ml:"margin-left",mr:"margin-right",msk:"mask",mskb:"mask-border",mskbm:"mask-border-mode",mskbo:"mask-border-outset",mskbr:"mask-border-repeat",mskbs:"mask-border-slice",mskbsrc:"mask-border-source",mskbw:"mask-border-width",mskc:"mask-clip",mskcp:"mask-composite",mski:"mask-image",mskm:"mask-mode",msko:"mask-origin",mskp:"mask-position",mskr:"mask-repeat",msks:"mask-size",mskt:"mask-type",mt:"margin-top",mtd:"math-depth",mts:"math-style",mw:"max-width",mxw:"max-width",of:"object-fit",ofa:"offset-anchor",ofd:"offset-distance",ofl:"overflow",ofla:"overflow-anchor",oflb:"overflow-block",oflcm:"overflow-clip-margin",ofli:"overflow-inline",oflw:"overflow-wrap",oflx:"overflow-x",ofly:"overflow-y",ofp:"offset-path",ofpo:"offset-position",ofr:"offset-rotate",ofs:"offset",olc:"outline-color",oli:"outline",olo:"outline-offset",ols:"outline-style",olw:"outline-width",op:"object-position",opc:"opacity",ord:"order",orp:"orphans",orsby:"overscroll-behavior-y",osrbb:"overscroll-behavior-block",osrbh:"overscroll-behavior",osrbi:"overscroll-behavior-inline",osrbx:"overscroll-behavior-x",p:"padding",pb:"padding-bottom",pbe:"padding-block-end",pblk:"padding-block",pbs:"padding-block-start",pe:"pointer-events",pg:"page",pgba:"page-break-after",pgbb:"page-break-before",pgbi:"page-break-inside",pi:"padding-inline",pie:"padding-inline-end",pis:"padding-inline-start",pl:"padding-left",plc:"place-content",pli:"place-items",pls:"place-self",pos:"position",pr:"padding-right",prca:"print-color-adjust",pso:"perspective-origin",psp:"perspective",pt:"padding-top",pto:"paint-order",qts:"quotes",r:"right",rbp:"ruby-position",rgap:"row-gap",rot:"rotate",rsz:"resize",s:"scale",sbc:"scrollbar-color",sbg:"scrollbar-gutter",sbw:"scrollbar-width",scrb:"scroll-behavior",scrm:"scroll-margin",scrmb:"scroll-margin-bottom",scrmbe:"scroll-margin-block-end",scrmblk:"scroll-margin-block",scrmbs:"scroll-margin-block-start",scrmi:"scroll-margin-inline",scrmie:"scroll-margin-inline-end",scrmis:"scroll-margin-inline-start",scrml:"scroll-margin-left",scrmr:"scroll-margin-right",scrmt:"scroll-margin-top",scrp:"scroll-padding",scrpb:"scroll-padding-bottom",scrpblk:"scroll-padding-block",scrpbs:"scroll-padding-block-start",scrpi:"scroll-padding-inline",scrpie:"scroll-padding-inline-end",scrpis:"scroll-padding-inline-start",scrpl:"scroll-padding-left",scrpr:"scroll-padding-right",scrpt:"scroll-padding-top",scrsa:"scroll-snap-align",scrss:"scroll-snap-stop",scrst:"scroll-snap-type",shit:"shape-image-threshold",shm:"shape-margin",sho:"shape-outside",srcpbe:"scroll-padding-block-end",t:"top",ta:"text-align",tal:"text-align-last",tbl:"table-layout",tbs:"tab-size",tcu:"text-combine-upright",td:"text-decoration",tdc:"text-decoration-color",tdl:"text-decoration-line",tds:"text-decoration-style",tdsi:"text-decoration-skip-ink",tdt:"text-decoration-thickness",tec:"text-emphasis-color",tep:"text-emphasis-position",teph:"text-emphasis",tes:"text-emphasis-style",ti:"text-indent",tj:"text-justify",toa:"touch-action",tol:"text-overflow",tor:"text-orientation",tra:"transform",trab:"transform-box",tran:"transition",tranb:"transition-behavior",trand:"transition-delay",trandur:"transition-duration",tranp:"transition-property",trantf:"transition-timing-function",trao:"transform-origin",tras:"transform-style",trd:"text-rendering",trl:"translate",tsh:"text-shadow",ttr:"text-transform",tuo:"text-underline-offset",tup:"text-underline-position",tw:"text-wrap",unib:"unicode-bidi",us:"user-select",v:"visibility",va:"vertical-align",w:"width",wc:"will-change",wd:"widows",wlc:"-webkit-line-clamp",wrb:"word-break",wrs:"word-spacing",wrtm:"writing-mode",ws:"white-space",wsc:"white-space-collapse",wtfc:"-webkit-text-fill-color",wts:"-webkit-text-stroke",wtsc:"-webkit-text-stroke-color",wtsw:"-webkit-text-stroke-width",z:"z-index",zo:"zoom"},Ge={in:"inherit",ini:"initial",un:"unset",rv:"revert",n:"none",a:"auto",t:"top",b:"bottom",l:"left",r:"right",c:"center",m:"middle",j:"justify",s:"start",e:"end",tr:"transparent",cc:"currentColor",minc:"min-content",maxc:"max-content",fitc:"fit-content",sol:"solid",das:"dashed",dot:"dotted",dub:"double",vis:"visible",h:"hidden",col:"collapse"},M={ac:{s:"start",e:"end",fs:"flex-start",fe:"flex-end",n:"normal",b:"baseline",fb:"first baseline",lb:"last baseline",sp:"space-between",sa:"space-around",se:"space-evenly",st:"stretch",sc:"safe center",uc:"unsafe center"},acc:{u:"unset"},ai:{n:"normal",c:"center",s:"start",e:"end",fs:"flex-start",fe:"flex-end",ss:"self-start",se:"self-end",b:"baseline",fb:"first baseline",lb:"last baseline",sc:"safe center",uc:"unsafe center"},anic:{r:"replace",a:"add",ac:"accumulate",ra:"replace, add",aac:"add, accumulate",raac:"replace, add, accumulate"},anidi:{r:"reverse",a:"alternate",ar:"alternate-reverse",nr:"normal, reverse",arn:"alternate, reverse, normal"},anifm:{f:"forwards",b:"backwards",nb:"none, backwards",fbn:"both, forwards, none"},anin:{s:"slide"},anips:{p:"paused",r:"running"},anitf:{ei:"ease-in",eo:"ease-out",eio:"ease-in-out",l:"linear",ss:"step-start",se:"step-end"},ap:{mb:"menulist-button",tf:"textfield",b:"button",c:"checkbox"},ar:{s:"1 / 1",v:"16 / 9"},as:{n:"normal",c:"center",s:"start",e:"end",ss:"self-start",se:"self-end",fs:"flex-start",fe:"flex-end",b:"baseline",fb:"first baseline",lb:"last baseline",st:"stretch",sc:"safe center",uc:"unsafe center"},bd:{d:"dotted",ds:"dashed",db:"double",g:"groove",r:"ridge",i:"inset",o:"outset"},bdbles:{d:"dotted",ds:"dashed",db:"double",g:"groove",r:"ridge",i:"inset",o:"outset"},bdblss:{d:"dotted",ds:"dashed",db:"double",g:"groove",r:"ridge",i:"inset",o:"outset"},bdblst:{d:"dotted",ds:"dashed",db:"double",g:"groove",r:"ridge",i:"inset",o:"outset"},bdbr:{c:"clone",s:"slice"},bdbst:{d:"dotted",ds:"dashed",db:"double",g:"groove",r:"ridge",i:"inset",o:"outset"},bdbw:{t:"thin",m:"medium",th:"thick"},bdcl:{s:"separate",c:"collapse"},bdir:{st:"stretch",r:"repeat",rn:"round",s:"space"},bdlw:{t:"thin",m:"medium",th:"thick"},bdrs:{dt:"dotted",ds:"dashed",s:"solid",db:"double",g:"groove",r:"ridge",in:"inset",out:"outset"},bdrw:{t:"thin",m:"medium",th:"thick"},bds:{dt:"dotted",ds:"dashed",s:"solid",db:"double",g:"groove",r:"ridge",in:"inset",out:"outset"},bdts:{dt:"dotted",ds:"dashed",s:"solid",db:"double",g:"groove",r:"ridge",in:"inset",out:"outset"},bdtw:{t:"thin",m:"medium",th:"thick"},bdw:{t:"thin",m:"medium",th:"thick"},bga:{s:"scroll",f:"fixed",l:"local"},bgbm:{n:"normal",m:"multiply",s:"screen",o:"overlay",d:"darken",l:"lighten",cd:"color-dodge",i:"color-burn",hl:"hard-light",sl:"soft-light",di:"difference",e:"exclusion",h:"hue",sa:"saturation",c:"color",lu:"luminosity"},bgc:{t:"transparent",c:"currentcolor"},bgcl:{bb:"border-box",pb:"padding-box",cb:"content-box",t:"text"},bgo:{bb:"border-box",pb:"padding-box",cb:"content-box"},bgp:{t:"top",b:"bottom",l:"left",r:"right",c:"center",lt:"left top",ct:"center top",rt:"right top",lc:"left center",cc:"center center",rc:"right center",lb:"left bottom",cb:"center bottom",rb:"right bottom"},bgpx:{l:"left",r:"right",c:"center"},bgpy:{t:"top",b:"bottom",c:"center"},bgr:{r:"repeat",x:"repeat-x",y:"repeat-y",s:"space",rn:"round",n:"no-repeat",rs:"repeat space",rr:"repeat repeat",nr:"no-repeat round"},bgs:{c:"contain"},c:{i:"inherit",t:"transparent"},cr:{p:"pointer",d:"default",cm:"context-menu",h:"help",pg:"progress",w:"wait",c:"cell",t:"text",vt:"vertical-text",al:"alias",cp:"copy",mo:"move",nd:"no-drop",na:"not-allowed",gr:"grab",gb:"grabbing",as:"all-scroll",colr:"col-resize",rr:"row-resize",nr:"n-resize",er:"e-resize",sr:"s-resize",wr:"w-resize",ner:"ne-resize",ser:"se-resize",swr:"sw-resize",ewr:"ew-resize",nsr:"ns-resize",nesw:"nesw-resize",nwse:"nwse-resize",zi:"zoom-in",zo:"zoom-out"},d:{b:"block",ib:"inline-block",i:"inline",f:"flex",if:"inline-flex",t:"table",it:"inline-table",tcp:"table-caption",tcell:"table-cell",tcol:"table-column",tcolg:"table-column-group",tfg:"table-footer-group",thg:"table-header-group",trg:"table-row-group",tr:"table-row",fr:"flow-root",g:"grid",ig:"inline-grid",c:"contents",li:"list-item"},ff:{a:"ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",s:"ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif",m:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"},fl:{is:"inline-start",ie:"inline-end",r:"right",l:"left"},fx:{i:"0 1 auto",a:"1 1 auto"},fxd:{r:"row",rr:"row-reverse",c:"column",cr:"column-reverse"},fxw:{w:"wrap",wr:"wrap-reverse",n:"nowrap"},gac:{mic:"min-content",mac:"max-content",mm:"minmax(0, 1fr)"},gaf:{r:"row",c:"column",d:"dense",rd:"row dense",cd:"column dense"},gar:{mic:"min-content",mac:"max-content",mm:"minmax(0, 1fr)"},gc:{f:"1 / -1"},gr:{f:"1 / -1"},gtc:{s:"subgrid"},gtr:{s:"subgrid"},h:{mic:"min-content",mac:"max-content",fc:"fit-content"},hyp:{m:"manual"},is:{i:"isolate"},jc:{c:"center",s:"start",e:"end",fs:"flex-start",fe:"flex-end",l:"left",r:"right",n:"normal",sp:"space-between",sa:"space-around",se:"space-evenly",st:"stretch",sc:"safe center",uc:"unsafe center"},ji:{n:"normal",st:"stretch",c:"center",s:"start",e:"end",fs:"flex-start",fe:"flex-end",ss:"self-start",se:"self-end",l:"left",r:"right",b:"baseline",fb:"first baseline",lb:"last baseline",lr:"legacy right",ll:"legacy left",lc:"legacy center",sc:"safe center",uc:"unsafe center"},js:{n:"normal",st:"stretch",c:"center",s:"start",e:"end",fs:"flex-start",fe:"flex-end",ss:"self-start",se:"self-end",l:"left",r:"right",b:"baseline",sc:"safe center",uc:"unsafe center"},lisp:{i:"inside",o:"outside"},ls:{i:"inside",di:"disc",c:"circle",s:"square",de:"decimal",g:"georgian",tci:"trad-chinese-informal",k:"kannada"},lst:{di:"disc",c:"circle",s:"square",de:"decimal",g:"georgian",tci:"trad-chinese-informal",k:"kannada"},lts:{n:"normal"},mbd:{n:"normal",m:"multiply",s:"screen",o:"overlay",d:"darken",l:"lighten",cd:"color-dodge",i:"color-burn",hl:"hard-light",sl:"soft-light",di:"difference",e:"exclusion",h:"hue",sa:"saturation",c:"color",lu:"luminosity"},mih:{f:"100%",mic:"min-content",mac:"max-content",fc:"fit-content"},miw:{f:"100%",mic:"min-content",mac:"max-content",fc:"fit-content"},of:{c:"contain",cv:"cover",f:"fill",sd:"scale-down"},oflw:{c:"clip",s:"scroll"},oflx:{c:"clip",s:"scroll"},ofly:{c:"clip",s:"scroll"},olc:{i:"inherit",c:"currentColor",t:"transparent"},ols:{dt:"dotted",ds:"dashed",s:"solid",db:"double",g:"groove",r:"ridge",in:"inset",out:"outset"},olw:{t:"thin",m:"medium",th:"thick"},op:{b:"bottom",c:"center",l:"left",r:"right",t:"top",lb:"left bottom",lt:"left top",rb:"right bottom",rt:"right top"},orsby:{c:"contain"},osrbb:{c:"contain"},osrbh:{c:"contain"},osrbi:{c:"contain"},osrbx:{c:"contain"},pi:{s:"start",c:"center",e:"end",b:"baseline",st:"stretch"},pos:{s:"static",f:"fixed",a:"absolute",r:"relative",st:"sticky"},rsz:{b:"both",h:"horizontal",v:"vertical"},ta:{s:"start",e:"end",l:"left",r:"right",c:"center",j:"justify",mp:"match-parent",mc:"-moz-center",wc:"-webkit-center"},tal:{s:"start",e:"end",l:"left",r:"right",c:"center",j:"justify"},td:{u:"underline"},tdl:{u:"underline",o:"overline",lt:"line-through",b:"blink"},tds:{db:"double",dt:"dotted",ds:"dashed",w:"wavy"},tdt:{ff:"from-font"},tep:{or:"over right",ol:"over left",ur:"under right",ul:"under left",lo:"left over",ru:"right under",lu:"left under"},tj:{iw:"inter-word",ic:"inter-character",d:"distribute"},toa:{p:"pan-x",py:"pan-y",pm:"pan-x pan-y",pi:"pinch-zoom"},tol:{c:"clip",e:"ellipsis"},tor:{m:"mixed",u:"upright",sr:"sideways-right",sl:"sideways-left",s:"sideways",ugo:"use-glyph-orientation"},trd:{op:"optimizeSpeed",ol:"optimizeLegibility",g:"geometricPrecision"},ttr:{c:"capitalize",u:"uppercase",l:"lowercase",fw:"full-width",fsk:"full-size-kana"},tup:{u:"under",l:"left",r:"right",ul:"under left",ru:"right under"},tw:{w:"wrap",n:"nowrap",b:"balance",p:"pretty"},us:{t:"text",all:"all",c:"contain"},v:{c:"collapse"},va:{bl:"baseline",t:"top",m:"middle",b:"bottom",tt:"text-top",tb:"text-bottom",sb:"sub",sp:"super"},w:{mic:"min-content",mac:"max-content",fc:"fit-content",f:"100%"},wc:{sp:"scroll-position",c:"contents",t:"transform"},wtsw:{m:"medium",t:"thick"}};M.ji=M.jc;M.js=M.jc;M.pc=M.jc;M.pi=M.jc;M.ps=M.jc;var Dt={SHORT_PROPERTIES:Je,COMMON_VALUES:Ge,SPECIFIC_VALUES:M},nt=e=>{let t=typeof e?.styleId=="string"&&e.styleId.trim()?e.styleId.trim():"fwkui",r=typeof e?.version=="string"&&e.version.trim()?e.version.trim():"v1",s=e?.compression??!0,n=typeof e?.debounceMs=="number"&&e.debounceMs>=0?e.debounceMs:1e3,l=typeof e?.sizeLast=="number"&&Number.isFinite(e.sizeLast)&&e.sizeLast>=0?Math.floor(e.sizeLast):1e3;return{styleId:t,version:r,compression:s,debounceMs:n,sizeLast:l}},jt=e=>`${e.styleId}_cache_${e.version}`,zt=e=>`${e.styleId}_ks_${e.version}`,Mt=e=>`${e.styleId}_bc_${e.version}`,st=e=>{if(!e||typeof e!="object")return!1;let t=e;return t.__xcss_cache_v===2&&t.compressed===!0&&typeof t.payload=="string"},_e=e=>{if(!e||typeof e!="object")return!1;let t=e;return t.__xcss_cache_v===3&&t.compressed===!0&&t.algorithm==="deflate-raw"&&t.encoding==="base64"&&typeof t.payload=="string"},ot=()=>typeof CompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",it=()=>typeof DecompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",Xt=e=>{if(typeof btoa=="function"){let r="";for(let n=0;n<e.length;n+=32768){let l=e.subarray(n,n+32768);for(let f=0;f<l.length;f++)r+=String.fromCharCode(l[f])}return btoa(r)}let t=globalThis.Buffer;if(typeof t<"u")return t.from(e).toString("base64");throw new Error("XCSS: base64 encoding is not supported in this runtime")},$t=e=>{if(typeof atob=="function"){let r=atob(e),s=new Uint8Array(r.length);for(let n=0;n<r.length;n++)s[n]=r.charCodeAt(n);return s}let t=globalThis.Buffer;if(typeof t<"u")return new Uint8Array(t.from(e,"base64"));throw new Error("XCSS: base64 decoding is not supported in this runtime")},Bt=async e=>{if(!ot())throw new Error("XCSS: CompressionStream is not supported");let t=new Blob([e]).stream().pipeThrough(new CompressionStream("deflate-raw")),r=await new Response(t).arrayBuffer();return Xt(new Uint8Array(r))},Kt=async e=>{if(!it())throw new Error("XCSS: DecompressionStream is not supported");let t=$t(e),r=new Uint8Array(t.length);r.set(t);let s=new Blob([r.buffer]).stream().pipeThrough(new DecompressionStream("deflate-raw"));return await new Response(s).text()},Ut=e=>{try{let t=JSON.parse(e);return _e(t)}catch{return!1}},Nt=e=>{if(!e)return"";let t=new Map,r=[],s=256;for(let l=0;l<256;l++)t.set(String.fromCharCode(l),l);let n=e[0];for(let l=1;l<e.length;l++){let f=e[l],u=n+f;t.has(u)?n=u:(r.push(t.get(n)),t.set(u,s++),n=f)}return r.push(t.get(n)),r.map(l=>String.fromCharCode(l)).join("")},at=e=>{if(!e)return"";let t=new Map,r=256,s="";for(let u=0;u<256;u++)t.set(u,String.fromCharCode(u));let n=e.split("").map(u=>u.charCodeAt(0)),l=n[0],f=t.get(l)||"";s=f;for(let u=1;u<n.length;u++){let y=n[u],v=t.get(y);v||(v=y===r?f+f[0]:""),s+=v,t.set(r++,f+v[0]),f=v}return s},Ye=e=>{if(!e||typeof e!="object")return null;let t=e,r=t.default&&typeof t.default=="object"?t.default:t,s=r.SHORT_PROPERTIES,n=r.COMMON_VALUES,l=r.SPECIFIC_VALUES;return!s||!n||!l||typeof s!="object"||typeof n!="object"||typeof l!="object"?null:{SHORT_PROPERTIES:s,COMMON_VALUES:n,SPECIFIC_VALUES:l}},Qe=e=>{if(!e||typeof e!="object")return null;let t=e,r=Array.isArray(t.entries)?t.entries:Array.isArray(t.k)?t.k:null;if(!r)return null;let s=r.filter(l=>Array.isArray(l)&&l.length===2&&typeof l[0]=="string"&&typeof l[1]=="string"),n=typeof t.sizeLast=="number"?t.sizeLast:typeof t.s=="number"?t.s:null;return n===null?null:{source:typeof t.source=="string"?t.source:"",sizeLast:n,entries:s}},Vt=(e,t)=>{let r=t;for(;r<e.length&&/\s/.test(e[r]);)r++;return r},Ht=(e,t)=>{let r=0,s=null,n=!1,l=!1,f=!1;for(let u=t;u<e.length;u++){let y=e[u],v=e[u+1];if(l){y===`
2
+ `&&(l=!1);continue}if(f){y==="*"&&v==="/"&&(f=!1,u++);continue}if(s){if(n){n=!1;continue}if(y==="\\"){n=!0;continue}y===s&&(s=null);continue}if(y==="/"&&v==="/"){l=!0,u++;continue}if(y==="/"&&v==="*"){f=!0,u++;continue}if(y==='"'||y==="'"||y==="`"){s=y;continue}if(y==="{"){r++;continue}if(y==="}"&&(r--,r===0))return u}return-1},be=(e,t)=>{let r=e.indexOf(t);if(r===-1)return null;let s=Vt(e,r+t.length);if(e[s]!=="{")return null;let n=Ht(e,s);return n===-1?null:e.slice(s,n+1)},Y=(e,t)=>{let r=t;for(;r<e.length;){let s=e[r],n=e[r+1];if(/\s/.test(s)){r++;continue}if(s==="/"&&n==="/"){for(r+=2;r<e.length&&e[r]!==`
3
+ `;)r++;continue}if(s==="/"&&n==="*"){for(r+=2;r<e.length;){if(e[r]==="*"&&e[r+1]==="/"){r+=2;break}r++}continue}break}return r},et=(e,t)=>{let r=e[t];if(r!=='"'&&r!=="'")return null;let s="",n=t+1;for(;n<e.length;){let l=e[n];if(l==="\\"){if(n++,n>=e.length)return null;let f=e[n];s+={n:`
4
+ `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v","\\":"\\",'"':'"',"'":"'"}[f]??f,n++;continue}if(l===r)return{value:s,end:n+1};s+=l,n++}return null},Wt=(e,t)=>{let r=e[t];if(!r||!/[A-Za-z_$]/.test(r))return null;let s=t+1;for(;s<e.length&&/[A-Za-z0-9_$]/.test(e[s]);)s++;return{value:e.slice(t,s),end:s}},ge=e=>{let t=(n,l)=>{let f=Y(n,l);return n[f]==="{"?r(n,f):et(n,f)},r=(n,l)=>{let f=Y(n,l);if(n[f]!=="{")return null;f++;let u={};for(;f<n.length;){if(f=Y(n,f),n[f]==="}")return{value:u,end:f+1};let y=et(n,f)||Wt(n,f);if(!y||(f=Y(n,y.end),n[f]!==":"))return null;f++;let v=t(n,f);if(!v)return null;if(u[y.value]=v.value,f=Y(n,v.end),n[f]===","){f++;continue}return n[f]==="}"?{value:u,end:f+1}:null}return null},s=r(e,0);return s&&Y(e,s.end)===e.length?s.value:null},Ft=e=>{let t=be(e,"export const SHORT_PROPERTIES ="),r=be(e,"export const COMMON_VALUES ="),s=be(e,"export const SPECIFIC_VALUES =");if(t&&r&&s)return Ye({SHORT_PROPERTIES:ge(t),COMMON_VALUES:ge(r),SPECIFIC_VALUES:ge(s)});let n=be(e,"export default");return n?Ye(ge(n)):null},qt=async e=>{let t=typeof process<"u"?process:null;if(!t||typeof t.getBuiltinModule!="function")return null;let r=e.startsWith("file:"),s=e.startsWith("/")||e.startsWith("./")||e.startsWith("../")||/^[A-Za-z]:[\\/]/.test(e);if(!r&&!s)return null;let n=t.getBuiltinModule("node:fs/promises");return n?.readFile?n.readFile(r?new URL(e):e,"utf8"):null},Zt=async e=>{let t=await qt(e);if(typeof t=="string")return t;if(typeof fetch=="function"){let r=await fetch(e);if(!r.ok)throw new Error(`XCSS: Failed to fetch dictionary module: ${r.status}`);return r.text()}throw new Error("XCSS: fetch is not supported in this runtime")},Jt=async e=>{let t=await Zt(e),r=Ft(t);if(!r)throw new Error(Gt);return r},Gt="XCSS: dictionary module must export plain-object SHORT_PROPERTIES, COMMON_VALUES and SPECIFIC_VALUES",Yt=(e,t)=>{if(!e||typeof document>"u")return;t=t||"fwkui";let r=Array.from({length:24},(s,n)=>"l"+n);if(!e.querySelector('style[id="'+t+'"]')){let s=document.createElement("style");s.id=t;let n=`@layer ${r.join(", ")};`;if(s.textContent=n,!(e instanceof ShadowRoot))document.head.append(s);else try{e.prepend(s)}catch{e.appendChild(s)}}},Qt=e=>{let t=Array.isArray(e.excludes)?e.excludes:[],r=nt(e.cache),s=JSON.stringify({base:e.base||"",aliases:e.aliases||{},breakpoints:e.breakpoints||[],theme:e.theme||{},prefix:e.prefix||"",excludes:t,excludePrefixes:e.excludePrefixes||[],dictionaryImport:e.dictionaryImport??!0,cache:r}),n=0;if(s.length===0)return n.toString();for(let l=0;l<s.length;l++){let f=s.charCodeAt(l);n=(n<<5)-n+f,n|=0}return n.toString()},tt=e=>{if(!e)return null;try{let t=JSON.parse(e);if(st(t)){let r=at(t.payload);return r?JSON.parse(r):null}return _e(t)?null:t}catch{return null}},er=async e=>{if(!e)return null;try{let t=JSON.parse(e);if(st(t)){let r=at(t.payload);return r?JSON.parse(r):null}if(_e(t)){let r=await Kt(t.payload);return r?JSON.parse(r):null}return t}catch{return null}},rt=(e,t)=>{if(e==="root")return t;let r=/@media[^{]+\{\n?([\s\S]+)\n?\}/.exec(t);return r&&r[1]?r[1].trim():t},Ae=(e={base:"",aliases:{},excludes:[],excludePrefixes:[],breakpoints:[],theme:{},prefix:"",dictionaryImport:!0,cache:{styleId:"fwkui",version:"v1",compression:!0,debounceMs:1e3,sizeLast:1e3}})=>{let{base:t=null,breakpoints:r=[],aliases:s={},theme:n={},excludes:l=[],excludePrefixes:f=[],prefix:u="",dictionaryImport:y=!0,cache:v={}}=e||{};Array.isArray(r)||(r=[]),Array.isArray(l)||(l=[]),Array.isArray(f)||(f=[]),(!s||typeof s!="object")&&(s={}),(!n||typeof n!="object")&&(n={});let X=nt(v),N=jt(X),_=zt(X),C=Mt(X),P=l,ee=f.filter(o=>typeof o=="string").map(o=>o.trim()).filter(o=>o.length>0),me=o=>{let a=o.replace(/[.+?^${}()|[\]\\]/g,"\\$&");return new RegExp("^"+a.replace(/\*/g,".*")+"$")},je=P.filter(o=>typeof o=="string").map(o=>o.trim()).filter(o=>o.length>0).map(o=>{if(o.includes("*")){let a=me(o);return p=>a.test(p)}return a=>a===o}),ct=o=>ee.some(a=>o.startsWith(a))?!0:je.some(a=>a(o)),ze=o=>!(ct(o)||u&&!o.startsWith(u)),dt=["default","xs","sm","md","lg","xl","2xl","sma","mda","lga","xla"],ft=r.filter(o=>!!o&&typeof o=="object"&&!Array.isArray(o)).map(o=>Object.keys(o)[0]).filter(o=>typeof o=="string"&&o.length>0),ut=new Set([...dt,...ft]),he=o=>!o||ut.has(o),pt=y!==!1,bt=new Set(["mx","my","px","py","bdx","bdy"]),ye=new Set,Se=o=>o?!pt||!F||Object.keys(F).length===0?!0:!!F[o]||bt.has(o)||ye.has(o):!1,F={},le={},we={},Ce={},Me=()=>{Ce={...we,...n}},ce=o=>{if(!o){F={},le={},we={},ye=new Set,Me();return}F=o.SHORT_PROPERTIES,le=o.SPECIFIC_VALUES,we=o.COMMON_VALUES,ye=new Set(Object.values(F)),Me()},de=!0,xe=Promise.resolve();y===!1?ce(null):typeof y=="string"?(de=!1,ce(null),xe=Jt(y).then(o=>{ce(o)}).catch(o=>{console.warn("XCSS: Failed to import dictionary from URL",o)}).finally(()=>{de=!0})):ce(Dt);let te=null,gt=(o=typeof document<"u"?document:void 0)=>{let a=typeof window<"u"&&typeof document<"u",p=a?window:null,b=p?.localStorage||null,m=null,E=Array.isArray(t)?t.length>0:!!t;o&&(m="getRootNode"in o?o.getRootNode():o);let k=new Map,g=new Set,S=X.sizeLast,h=!0,$=`xcss_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`,R=[],j=!1,D=null,re=i=>{typeof i=="number"&&Number.isFinite(i)&&i>S&&(S=i)},ne=i=>{i&&(i.source&&i.source===$||(re(i.sizeLast),i.entries.forEach(([d,c])=>{let x=k.get(d);x!==c&&(x||g.has(c)||(k.set(d,c),g.add(c)))})))},L=()=>{if(j=!1,!a||R.length===0)return;let i={source:$,sizeLast:S,entries:R.splice(0,R.length)};if(D)try{D.postMessage(i);return}catch{D=null}if(b)try{b.setItem(_,JSON.stringify(i))}catch{}},q=i=>{a&&(R.push(i),!j&&(j=!0,queueMicrotask(L)))};if(a&&m&&Yt(m,X.styleId),a&&typeof BroadcastChannel<"u")try{D=new BroadcastChannel(C),D.addEventListener("message",i=>{ne(Qe(i.data))})}catch{D=null}let V=Ze(),Z=[{default:""},{xs:"screen and (max-width: 575px)"},{sm:"screen and (min-width: 576px)"},{md:"screen and (min-width: 768px)"},{lg:"screen and (min-width: 992px)"},{xl:"screen and (min-width: 1200px)"},{"2xl":"screen and (min-width: 1400px)"},{sma:"screen and (max-width: 768px)"},{mda:"screen and (max-width: 992px)"},{lga:"screen and (max-width: 1200px)"},{xla:"screen and (max-width: 1400px)"},...r],J=Z.filter((i,d)=>Z.findLastIndex(c=>Object.keys(c)[0]==Object.keys(i)[0])==d),H=J.map(i=>Object.keys(i)[0]),B={},A={},O={root:""},T={root:[]},fe={root:!1},se=Qt(e),oe=null,G=0,ie=!1,ue=null,ae=null,Ee=i=>{try{b?.setItem(N,i)}catch(d){console.warn("XCSS: Failed to save cache",d)}},Ke=i=>{!a||!b||typeof i=="string"&&b.getItem(N)!==i||(b.removeItem(N),b.removeItem(_))},wt=i=>{if(!a||!b)return;te=i;let d=++G;try{let c=JSON.stringify(i),x=()=>{let w={__xcss_cache_v:2,compressed:!0,payload:Nt(c)};Ee(JSON.stringify(w))};if(!X.compression){Ee(c);return}if(ot()&&it()){Bt(c).then(w=>{if(d!==G)return;Ee(JSON.stringify({__xcss_cache_v:3,compressed:!0,algorithm:"deflate-raw",encoding:"base64",payload:w}))}).catch(()=>{d===G&&x()});return}x()}catch(c){console.warn("XCSS: Failed to save cache",c)}},Ue=()=>{a&&(oe&&clearTimeout(oe),oe=setTimeout(()=>{let i={};for(let x in B)i[x]=Array.from(B[x]);let d={};Object.keys(O).forEach(x=>{if(x==="root")d[x]=O[x];else{let w=Z.find(z=>Object.keys(z)[0]===x)?.[x];w&&O[x]?d[x]=`@media ${w} {
5
+ ${O[x]}
6
+ }`:d[x]=O[x]||""}});let c={configHash:se,cssText:d,rulesSet:i,keys:Array.from(k.entries()),sizeLast:S};wt(c)},X.debounceMs))};if(a&&b)try{let i=b.getItem(N);if(i){let d=tt(i);if(!d)Ut(i)?ae={raw:i}:b.removeItem(N);else if(d.configHash!==se)b.removeItem(N);else{if(ue=d,ie=!0,d.keys&&d.keys.forEach(([c,x])=>{k.set(c,x),g.add(x)}),re(d.sizeLast),d.cssText)for(let c in d.cssText)O[c]=rt(c,d.cssText[c]);te=d}}}catch(i){console.error(i)}a&&(A.root=new CSSStyleSheet),H.forEach(i=>{if(B[i]=new Set,a){let d=J.find(c=>Object.keys(c)[0]==i)?.[i]||"";A[i]=new CSSStyleSheet({media:d})}ie||(O[i]=""),T[i]=[],fe[i]=!1});let Ct=()=>{if(!m)return;let i=m.querySelector(`style[id="${X.styleId}"]`);i&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.remove()})})},Ne=i=>{if(i.keys&&i.keys.forEach(([d,c])=>{k.set(d,c),g.add(c)}),re(i.sizeLast),i.cssText)for(let d in i.cssText){if(d==="root"&&E)continue;let c=rt(d,i.cssText[d]);O[d]=c,a&&A[d]&&A[d].replaceSync(c)}if(i.rulesSet)for(let d in i.rulesSet)B[d]||(B[d]=new Set),i.rulesSet[d].forEach(c=>B[d].add(c));te=i,Ct()};if(ie&&ue&&Ne(ue),t&&Array.isArray(t)?(O.root=t.join(`
7
+ `),a&&A.root&&A.root.replaceSync(O.root)):(O.root=t||"",a&&A.root&&A.root.replaceSync(O.root)),a&&m?.adoptedStyleSheets){let i=m.adoptedStyleSheets,d=["root",...H].map(c=>A[c]).filter(c=>c&&!i.includes(c));d.length>0&&(m.adoptedStyleSheets=[...i,...d])}a&&b&&ae&&!ie&&(async()=>{let i=await er(ae.raw);if(!i){Ke(ae.raw);return}if(i.configHash!==se){Ke(ae.raw);return}ie=!0,ue=i,Ne(i)})(),a&&p?.addEventListener&&p.addEventListener("storage",i=>{if(i.key===_&&i.newValue)try{ne(Qe(JSON.parse(i.newValue)))}catch{}});let xt=(i,d)=>{let{media:c,property:x,selector:w,layer:z,className:I}=d,K=O,U=T,Re=fe;z=Number(z)||0;let We=k.get(i),vt=We?`.${We}${w}`:`.${I}${w}`;var Ie=`@layer l${z}{${vt}{${x}}}`;B[c]||(B[c]=new Set);let Fe=B[c];if(!Fe.has(Ie))if(Fe.add(Ie),U[c]||(U[c]=[]),U[c].push(Ie),a)if(h){let W=U[c];W.length>0&&(K[c]+=(K[c]?`
8
+ `:"")+W.join(`
9
+ `),A[c]&&A[c].replaceSync(K[c]),U[c]=[])}else Re[c]||(Re[c]=!0,queueMicrotask(()=>{let W=U[c],qe=A[c];W.length>0&&(K[c]+=(K[c]?`
10
+ `:"")+W.join(`
11
+ `),qe&&qe.replaceSync(K[c]),U[c]=[],Ue()),Re[c]=!1}));else{let W=U[c];W.length>0&&(K[c]+=(K[c]?`
12
+ `:"")+W.join(`
13
+ `),U[c]=[])}},Ve=i=>{i.forEach(d=>{let c=Be(d);c&&xt(d,c)})},He=i=>{if(i.length===0)return;let d=()=>Ve(i);de?d():xe.then(d)};return V.on("observeDom",He),{clsx:(...i)=>{let d=i.map(w=>Array.isArray(w)?w:[w]).flat(1/0).map(w=>typeof w=="string"?w.split(/(\s|\t)+/g):[]).flat(1/0);d=d.filter(w=>typeof w=="string"&&w.trim()),d=[...new Set(d)];let c=w=>{if(!ze(w))return!1;if(de)return!!Be(w);let z=u?w.slice(u.length):w,I=pe(z);if(!I||!he(I.mq))return!1;let K=(I.selector||"").replace(/(';|;)/g,U=>U=="';"?";":" ");return K&&!ve(K)?!1:I.prop.startsWith("[")?!!Xe(I.prop+I.val):Se(I.prop)?(I.prop==="&",I.val.length>0):!1},x=d.map(w=>{let z=w;if(k.has(w))z=k.get(w);else if(c(w)){let I;do I="D"+(S++).toString(32).toUpperCase();while(g.has(I));k.set(w,I),g.add(I),q([w,I]),z=I,Ue()}return z});return!a||h?V.emit("observeDom",d):queueMicrotask(()=>V.emit("observeDom",d)),x.join(" ")},observe:()=>{!a||!m||(St(m,i=>{h?Ve(i):He(i)}),h=!1)},getCssString:()=>Object.entries(O).map(([i,d])=>{if(!d)return"";if(i==="root"||i==="default")return d;let c=Z.find(x=>Object.keys(x)[0]===i)?.[i];return c?`@media ${c} {
14
+ ${d}
15
+ }`:d}).join(`
16
+ `)}};function Xe(o){let a=new RegExp("^(\\[(?<p>[a-zA-Z]+)\\])$"),{p=""}=a.exec(o)?.groups??{};if(p&&s[p]&&Array.isArray(s[p])){let b=s[p],m=[],E=!0,k=g=>{let S=g.trim();if(!S)return null;let h=S.endsWith(";")?S.slice(0,-1).trim():S,$=h.indexOf(":");if($<=0||$>=h.length-1)return null;let R=h.slice(0,$).trim(),j=h.slice($+1).trim();return!R||!j||!/^(?:--[a-zA-Z0-9-_]+|-?[a-zA-Z][a-zA-Z0-9-]*)$/.test(R)?null:`${R}:${j}`};for(let g of b){if(typeof g!="string"){E=!1;break}let S=k(g);if(S){if(typeof CSS<"u"&&!CSS.supports(S)){E=!1;break}m.push(S);continue}E=!1;break}if(m.length>0&&E)return m.join(";")}return null}function $e(o,a){let p=Xe(o+a);if(p)return p;if(!o||a===void 0)return null;let b=F[o],m=b||o,E=a[0],k=!1,g=a;if(E==="!"&&(k=!0,g=g.substring(1),E=g[0]),g.startsWith("--"))g="var("+g+")";else if(E==="["&&g.endsWith("]"))g=g.substring(1,g.length-1);else if(g.length>0){let R=g[0].toLowerCase()+g.substring(1),j=le[o]?.[R]||Ce[R];if(!j){let D=g.toLowerCase();j=le[o]?.[D]||Ce[D]}g=j||g}if(g=g.replace(/(';|;)/g,R=>R=="';"?";":" "),!g)return null;let S=g+(k?" !important":""),h=[m+":"+S];switch(m){case"mx":h=[`margin-left:${S}`,`margin-right:${S}`];break;case"my":h=[`margin-top:${S}`,`margin-bottom:${S}`];break;case"px":h=[`padding-left:${S}`,`padding-right:${S}`];break;case"py":h=[`padding-top:${S}`,`padding-bottom:${S}`];break;case"bdx":h=[`border-left:${S}`,`border-right:${S}`];break;case"bdy":h=[`border-top:${S}`,`border-bottom:${S}`];break}return!(typeof CSS<"u")||h.every(R=>CSS.supports(R))?h.join(";"):null}let mt=o=>{let a=0;for(let p=o.length-1;p>=0;p--){let b=o[p];if(b==="]"){a++;continue}if(b==="["){a>0&&a--;continue}if(b==="@"&&a===0)return{body:o.slice(0,p),selector:o.slice(p+1)}}return{body:o,selector:""}},ht=o=>{let a=[],p=0,b=0;for(let m=0;m<o.length;m++){let E=o[m];if(E==="["){b++;continue}if(E==="]"){b>0&&b--;continue}E==="&"&&b===0&&(a.push(o.slice(p,m)),p=m+1)}return a.push(o.slice(p)),a},ve=o=>{if(!o)return!0;let a=o.trim();if(!a)return!0;if(/[{}]/.test(a)||a==="#"||a==="("||a===")"||a===","||a===">"||a==="+"||a==="~"||a.startsWith("(")||a.startsWith(")"))return!1;let p=0;for(let b=0;b<a.length;b++){let m=a[b];if(m==="("){p++;continue}if(m===")"){if(p===0)return!1;p--}}return p===0};function Be(o){if(!ze(o))return null;let a=u?o.slice(u.length):o,p=typeof CSS<"u"?CSS.escape(o):yt(o);if(a.includes("&")&&!a.startsWith("&")){let{body:D,selector:re}=mt(a),ne=ht(D).map(L=>L.trim()).filter(L=>L.length>0).map(L=>u&&L.startsWith(u)?L.slice(u.length):L);if(ne.length>1){let L="",q="",V=re,Z=!1,J=[];for(let A of ne){let O=V?`${A}@${V}`:A,T=pe(O);if(!T||!he(T.mq)||!T.prop.startsWith("[")&&!Se(T.prop))return null;Z?(!T.mq&&L&&(T.mq=L),!T.layer&&q&&(T.layer=q)):(L=T.mq||"",q=T.layer||"",Z=!0);let fe=T.mq||"",se=T.layer||"",oe=T.selector||"";if(fe!==L||se!==q||oe!==V)return null;let G=$e(T.prop,T.val);if(!G)return null;J.push(G)}if(J.length===0)return null;let H=V.replace(/(';|;)/g,A=>A=="';"?";":" "),B=`selector(${p}${H})`;if(H){if(typeof CSS<"u"){if(!CSS.supports(B))return null}else if(!ve(H))return null}return{media:L||"default",layer:q||"0",className:p,property:J.join(";"),selector:H,cssRules:`.${p}${H}{${J.join(";")}}`}}}let b=pe(a);if(!b||!he(b.mq)||!b.prop.startsWith("[")&&!Se(b.prop))return null;let{mq:m="default",layer:E="0",prop:k,val:g,selector:S=""}=b,h=[],$=$e(k,g);if($&&h.push($),h.length===0)return null;let R=S.replace(/(';|;)/g,D=>D=="';"?";":" "),j=`selector(${p}${R})`;if(R){if(typeof CSS<"u"){if(!CSS.supports(j))return null}else if(!ve(R))return null}return{media:m||"default",layer:E||"0",className:p,property:h.join(";"),selector:R,cssRules:`.${p}${R}{${h.join(";")}}`}}let yt=o=>o.replace(/([^\w-])/g,"\\$1"),ke=o=>{var a=[...o?.classList||[]].filter(p=>{if(p){let b=p.charCodeAt(0)==45?p.charCodeAt(1):p.charCodeAt(0);return b>=97&&b<=122||b>=48&&b<=57}return!1});return o?.children?.length>0&&Array.from(o?.children).forEach(p=>{a.push(...ke(p))}),a.flat(1/0)},St=(o,a)=>{if(typeof a!="function")throw new Error("Callback is not a function");if(!o)return;let p;"documentElement"in o?p=o.documentElement:(o instanceof Element||"tagName"in o||"host"in o)&&(p=o),p&&(p instanceof Element&&a(ke(p)),typeof MutationObserver<"u"&&new MutationObserver(b=>{for(let m of b)if(m.type=="attributes"&&m.attributeName=="class"){if(m.target.nodeType==1){let E=String(m.target?.className??""),k=String(m?.oldValue??"");if(E||k){let g=E.split(" ").map(h=>h.trim()).filter(h=>h),S=k.split(" ").map(h=>h.trim()).filter(h=>h);g=g.filter(h=>!S.includes(h)),typeof a=="function"&&a([...new Set(g)])}}}else if(m.type=="childList"&&m.addedNodes.length>0){let E=[...m.addedNodes].filter(k=>k.nodeType==1).map(k=>ke(k)).flat(1/0);typeof a=="function"&&a([...new Set(E)])}}).observe(p,{attributes:!0,attributeOldValue:!0,attributeFilter:["class"],childList:!0,subtree:!0}))};return{buildCss:gt,exportCache:()=>typeof window>"u"||!window.localStorage?te:tt(window.localStorage.getItem(N))||te,ready:xe}},tr=(e,t)=>{Ae(t).buildCss(e).observe()},rr=(e,t)=>Ae(t).buildCss(e).clsx,Oe={css:Ae,cssObserve:tr,clsx:rr};var nr=(e,t)=>(e=e||"fwkui",t=t||"v1",`${e}_cache_${t}`),lt=(e="fwkui",t="v1",r)=>{let s=String(e||"").trim()||"fwkui",n=nr(s,t),l=JSON.stringify(s),f=JSON.stringify(n),u=`
12
17
  (async function () {
13
18
  function decompressLZW(compressed) {
14
19
  if (!compressed) return '';
@@ -93,8 +98,8 @@ ${l}
93
98
  try {
94
99
  if (typeof window === 'undefined' || !window.localStorage) return;
95
100
 
96
- var styleId = ${d};
97
- var key = ${h};
101
+ var styleId = ${l};
102
+ var key = ${f};
98
103
  var raw = localStorage.getItem(key);
99
104
  if (!raw) return;
100
105
  var payload=await parseCache(raw);
@@ -118,5 +123,5 @@ ${l}
118
123
  styleEl.textContent = css;
119
124
  } catch (_error) {}
120
125
  })();
121
- `.trim();return n?.compact?u.replace(/\s+/g," ").trim():u};var Ie="__FWXCSS_SHARED__",Lt={base:"html,body{font-size:16px;padding:0;margin:0;}"},Pt=e=>{if(!e)return!1;let t=typeof Document<"u",n=typeof ShadowRoot<"u",s=t&&e instanceof Document,o=n&&e instanceof ShadowRoot;return s||o},$t=e=>{let t=[],n=s=>{if(s){if(typeof s=="string"||typeof s=="number"){t.push(String(s));return}if(Array.isArray(s)){s.forEach(n);return}typeof s=="object"&&Object.keys(s).forEach(o=>{s[o]&&t.push(o)})}};return e.forEach(n),t},De=e=>{let t=new WeakMap,n=null,s=e??Lt,o=typeof document<"u"?document:null,d=b=>{let L=Re.css(s);return{...L.buildCss(b??void 0),ready:L.ready}},h=()=>(n||(n=d(null)),n),u=b=>{if(!b)return h();let L=t.get(b);return L||(L=d(b),t.set(b,L)),L};return{clsx:(...b)=>{let L,Y=b[b.length-1];Pt(Y)&&(L=Y,b=b.slice(0,-1));let ce=$t(b);return u(L||o).clsx(ce.join(" "))},observe:b=>{u(b||o).observe()},setClsxRoot:b=>{o=b||(typeof document<"u"?document:null)},getCss:b=>b?u(b).getCssString():o?u(o).getCssString():h().getCssString(),ready:b=>b?u(b).ready:o?u(o).ready:h().ready}},Mt=e=>De(e),jt=e=>De(e),Te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:global,G=Te[Ie]||De();Te[Ie]||(Te[Ie]=G);var Bt=G.clsx,Kt=G.observe,Ht=G.setClsxRoot,Wt=G.getCss,Vt=G.ready;var Ut=Re;0&&(module.exports={clsx,createSharedClsx,createSharedInstance,getBootloaderScript,getCss,observe,ready,setClsxRoot});
126
+ `.trim();return r?.compact?u.replace(/\s+/g," ").trim():u};var Le="__FWXCSS_SHARED__",sr={base:"html,body{font-size:16px;padding:0;margin:0;}"},or=e=>{if(!e)return!1;let t=typeof Document<"u",r=typeof ShadowRoot<"u",s=t&&e instanceof Document,n=r&&e instanceof ShadowRoot;return s||n},ir=e=>{let t=[],r=s=>{if(s){if(typeof s=="string"||typeof s=="number"){t.push(String(s));return}if(Array.isArray(s)){s.forEach(r);return}typeof s=="object"&&Object.keys(s).forEach(n=>{s[n]&&t.push(n)})}};return e.forEach(r),t},De=e=>{let t=new WeakMap,r=null,s=e??sr,n=typeof document<"u"?document:null,l=C=>{let P=Oe.css(s);return{...P.buildCss(C??void 0),ready:P.ready}},f=()=>(r||(r=l(null)),r),u=C=>{if(!C)return f();let P=t.get(C);return P||(P=l(C),t.set(C,P)),P};return{clsx:(...C)=>{let P,ee=C[C.length-1];or(ee)&&(P=ee,C=C.slice(0,-1));let me=ir(C);return u(P||n).clsx(me.join(" "))},observe:C=>{u(C||n).observe()},setClsxRoot:C=>{n=C||(typeof document<"u"?document:null)},getCss:C=>C?u(C).getCssString():n?u(n).getCssString():f().getCssString(),ready:C=>C?u(C).ready:n?u(n).ready:f().ready}},ar=e=>De(e),lr=e=>De(e),Pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:global,Q=Pe[Le]||De();Pe[Le]||(Pe[Le]=Q);var cr=Q.clsx,dr=Q.observe,fr=Q.setClsxRoot,ur=Q.getCss,pr=Q.ready;var br=Oe;0&&(module.exports={clsx,createSharedClsx,createSharedInstance,getBootloaderScript,getCss,observe,ready,setClsxRoot});
122
127
  //# sourceMappingURL=index.js.map