@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/README.md +15 -3
- package/dist/index-auto.js +19 -14
- package/dist/index-auto.js.map +1 -1
- package/dist/index-auto.mjs +19 -14
- package/dist/index-auto.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/dictionary.d.mts +0 -5
- package/dist/dictionary.d.ts +0 -5
- package/dist/dictionary.js +0 -2
- package/dist/dictionary.js.map +0 -1
- package/dist/dictionary.mjs +0 -2
- package/dist/dictionary.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -357,24 +357,31 @@ Lưu ý khi dùng cùng `prefix`:
|
|
|
357
357
|
|
|
358
358
|
|
|
359
359
|
`dictionaryImport`:
|
|
360
|
-
1. `true` (mặc định):
|
|
360
|
+
1. `true` (mặc định): dùng ngay built-in dictionary từ `src/dictionary.ts`/bundle hiện tại, không self-import `dictionary.js` nội bộ nữa.
|
|
361
361
|
2. `false`: tắt dictionary.
|
|
362
362
|
3. `string` URL/path: import dictionary ngoài.
|
|
363
363
|
|
|
364
364
|
Lưu ý:
|
|
365
|
-
1.
|
|
366
|
-
2.
|
|
365
|
+
1. `dictionaryImport: true` là đồng bộ, có thể parse built-in dictionary ngay khi khởi tạo.
|
|
366
|
+
2. Chỉ trường hợp `dictionaryImport` là `string` URL/path mới cần import bất đồng bộ.
|
|
367
|
+
3. Nếu cần chắc chắn dictionary ngoài đã sẵn sàng trước khi render quan trọng, dùng `await engine.ready`.
|
|
367
368
|
|
|
368
369
|
`cache`:
|
|
369
370
|
1. `styleId` (mặc định `fwkui`): id thẻ `<style>` runtime.
|
|
370
371
|
2. `version` (mặc định `v1`): tham gia vào cache key để chủ động invalidate.
|
|
371
372
|
3. `compression` (mặc định `true`): nén cache trước khi lưu `localStorage`.
|
|
372
373
|
4. `debounceMs` (mặc định `1000`): debounce chu kỳ nén + lưu cache.
|
|
374
|
+
5. `sizeLast` (mặc định `1000`): seed mặc định cho bộ sinh key `D...`.
|
|
373
375
|
|
|
374
376
|
Khi `compression: true`:
|
|
375
377
|
1. Ưu tiên `CompressionStream` (deflate-raw + base64) nếu runtime hỗ trợ.
|
|
376
378
|
2. Tự động fallback về LZW nếu runtime không hỗ trợ stream.
|
|
377
379
|
|
|
380
|
+
Đồng bộ nhiều tab:
|
|
381
|
+
1. Khi phát sinh key mới, engine gửi delta `{ class -> key }` sang tab khác qua `BroadcastChannel` nếu môi trường hỗ trợ.
|
|
382
|
+
2. Nếu không có `BroadcastChannel`, engine fallback về sự kiện `storage`.
|
|
383
|
+
3. `localStorage` cache vẫn giữ vai trò snapshot đầy đủ cho lần mở tab mới hoặc reload sau đó.
|
|
384
|
+
|
|
378
385
|
Quy tắc cache key:
|
|
379
386
|
`cacheKey = styleId + "_cache_" + version`
|
|
380
387
|
|
|
@@ -443,6 +450,11 @@ export default {
|
|
|
443
450
|
};
|
|
444
451
|
```
|
|
445
452
|
|
|
453
|
+
Lưu ý format:
|
|
454
|
+
1. Nên export theo đúng mẫu trên với object tĩnh/plain object.
|
|
455
|
+
2. Không nên tạo dictionary bằng biểu thức động, function, hoặc biến trung gian phức tạp.
|
|
456
|
+
3. `export default` là tùy chọn; 3 named export `SHORT_PROPERTIES`, `COMMON_VALUES`, `SPECIFIC_VALUES` mới là phần quan trọng nhất.
|
|
457
|
+
|
|
446
458
|
Quy trình thay link:
|
|
447
459
|
1. Tạo file `xcss-dict.mjs` theo mẫu trên.
|
|
448
460
|
2. Upload lên CDN/public URL của bạn.
|
package/dist/index-auto.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
"use strict";var we=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var ft=Object.prototype.hasOwnProperty;var ut=(e,t)=>{for(var n in t)we(e,n,{get:t[n],enumerable:!0})},pt=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of dt(t))!ft.call(e,o)&&o!==n&&we(e,o,{get:()=>t[o],enumerable:!(s=ct(t,o))||s.enumerable});return e};var yt=e=>pt(we({},"__esModule",{value:!0}),e);var zt={};ut(zt,{clsx:()=>Kt,createSharedClsx:()=>Bt,createSharedInstance:()=>jt,default:()=>Nt,getBootloaderScript:()=>Ze,getCss:()=>Vt,observe:()=>Ht,ready:()=>Ut,setClsxRoot:()=>Wt});module.exports=yt(zt);var Be=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 St(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 gt(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 ht(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 mt(e){return e>=97&&e<=122}function le(e){if(!e||e.length<2||!ht(e,0,e.length))return null;let t=0,n=e.length,s="",o=gt(e,t,n);o>t&&(s=e.substring(o+1,n),n=o);let d="",h="",u=St(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(!mt(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 We=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}},Ct=e=>`${e.styleId}_cache_${e.version}`,bt=e=>`${e.styleId}_sizeL_${e.version}`,Ve=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"},Ue=()=>typeof CompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",Ne=()=>typeof DecompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",wt=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")},xt=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")},vt=async e=>{if(!Ue())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 wt(new Uint8Array(n))},Et=async e=>{if(!Ne())throw new Error("XCSS: DecompressionStream is not supported");let t=xt(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()},Rt=e=>{try{let t=JSON.parse(e);return xe(t)}catch{return!1}},It=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("")},ze=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}},Tt=async e=>{let t=await import(e),n=ve(t);if(!n)throw new Error(qe);return n},qe="XCSS: dictionary module must export SHORT_PROPERTIES, COMMON_VALUES and SPECIFIC_VALUES",Fe=()=>{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},Dt=async()=>{let e=Fe();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(qe)},At=(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)}},_t=e=>{let t=Array.isArray(e.excludes)?e.excludes:[],n=We(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()},Ke=e=>{if(!e)return null;try{let t=JSON.parse(e);if(Ve(t)){let n=ze(t.payload);return n?JSON.parse(n):null}return xe(t)?null:t}catch{return null}},kt=async e=>{if(!e)return null;try{let t=JSON.parse(e);if(Ve(t)){let n=ze(t.payload);return n?JSON.parse(n):null}if(xe(t)){let n=await Et(t.payload);return n?JSON.parse(n):null}return t}catch{return null}},He=(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=We(R),M=Ct(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)),Je=["default","xs","sm","md","lg","xl","2xl","sma","mda","lga","xla"],Ge=n.filter(r=>!!r&&typeof r=="object"&&!Array.isArray(r)).map(r=>Object.keys(r)[0]).filter(r=>typeof r=="string"&&r.length>0),Ye=new Set([...Je,...Ge]),fe=r=>!r||Ye.has(r),Qe=O!==!1,et=new Set(["mx","my","px","py","bdx","bdy"]),ue=new Set,pe=r=>r?!Qe||!z||Object.keys(z).length===0?!0:!!z[r]||et.has(r)||ue.has(r):!1,z={},ne={},ye={},Se={},_e=()=>{Se={...ye,...o}},F=r=>{if(!r){z={},ne={},ye={},ue=new Set,_e();return}z=r.SHORT_PROPERTIES,ne=r.SPECIFIC_VALUES,ye=r.COMMON_VALUES,ue=new Set(Object.values(z)),_e()},Z=!0,se=Promise.resolve();if(O===!1)F(null);else if(typeof O=="string")Z=!1,F(null),se=Tt(O).then(r=>{F(r)}).catch(r=>{console.warn("XCSS: Failed to import dictionary from URL",r)}).finally(()=>{Z=!0});else{let r=Fe();r?F(r):(Z=!1,F(null),se=Dt().then(a=>{F(a)}).catch(a=>{console.warn("XCSS: Failed to load built-in dictionary module",a)}).finally(()=>{Z=!0}))}let Q=null,tt=(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=bt(K);a&&c&&At(c,K.styleId);let m=Be(),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=_t(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:It(f)};U(JSON.stringify(C))};if(!K.compression){U(f);return}if(Ue()&&Ne()){vt(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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`)
|
|
1
|
+
"use strict";var Te=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var It=Object.prototype.hasOwnProperty;var Tt=(e,t)=>{for(var r in t)Te(e,r,{get:t[r],enumerable:!0})},At=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Rt(t))!It.call(e,n)&&n!==r&&Te(e,n,{get:()=>t[n],enumerable:!(s=Et(t,n))||s.enumerable});return e};var _t=e=>At(Te({},"__esModule",{value:!0}),e);var mr={};Tt(mr,{clsx:()=>dr,createSharedClsx:()=>cr,createSharedInstance:()=>lr,default:()=>gr,getBootloaderScript:()=>ct,getCss:()=>pr,observe:()=>fr,ready:()=>br,setClsxRoot:()=>ur});module.exports=_t(mr);var Je=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 Ot(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 Lt(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 Pt(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 Dt(e){return e>=97&&e<=122}function pe(e){if(!e||e.length<2||!Pt(e,0,e.length))return null;let t=0,r=e.length,s="",n=Lt(e,t,r);n>t&&(s=e.substring(n+1,r),r=n);let l="",f="",u=Ot(e,t,r);if(u>0&&u<r){let A=e.substring(t,u);t=u+1,l=A}let y=t;for(;y<r;){let A=e.charCodeAt(y);if(A>=48&&A<=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 A=e.indexOf("]",t);if(A>t)return{mq:l,layer:f,prop:e.substring(t,A+1),val:"",selector:s}}let v=t;for(;v<r;){let A=e.charCodeAt(v);if(A===45||A===46){if(v+1<r){let C=e.charCodeAt(v+1);if(A===45&&C===45&&v>t||C>=48&&C<=57)break}v++;continue}if(!Dt(A))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 Ge={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"},Ye={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 jt={SHORT_PROPERTIES:Ge,COMMON_VALUES:Ye,SPECIFIC_VALUES:M},st=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}},zt=e=>`${e.styleId}_cache_${e.version}`,Mt=e=>`${e.styleId}_ks_${e.version}`,Xt=e=>`${e.styleId}_bc_${e.version}`,ot=e=>{if(!e||typeof e!="object")return!1;let t=e;return t.__xcss_cache_v===2&&t.compressed===!0&&typeof t.payload=="string"},Ae=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"},it=()=>typeof CompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",at=()=>typeof DecompressionStream<"u"&&typeof Blob<"u"&&typeof Response<"u",$t=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")},Bt=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")},Kt=async e=>{if(!it())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 $t(new Uint8Array(r))},Ut=async e=>{if(!at())throw new Error("XCSS: DecompressionStream is not supported");let t=Bt(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()},Nt=e=>{try{let t=JSON.parse(e);return Ae(t)}catch{return!1}},Vt=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("")},lt=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},Qe=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}},et=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}},Ht=(e,t)=>{let r=t;for(;r<e.length&&/\s/.test(e[r]);)r++;return r},Wt=(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=Ht(e,r+t.length);if(e[s]!=="{")return null;let n=Wt(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},tt=(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},Ft=(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):tt(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=tt(n,f)||Ft(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},qt=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 Qe({SHORT_PROPERTIES:ge(t),COMMON_VALUES:ge(r),SPECIFIC_VALUES:ge(s)});let n=be(e,"export default");return n?Qe(ge(n)):null},Zt=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},Jt=async e=>{let t=await Zt(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")},Gt=async e=>{let t=await Jt(e),r=qt(t);if(!r)throw new Error(Yt);return r},Yt="XCSS: dictionary module must export plain-object SHORT_PROPERTIES, COMMON_VALUES and SPECIFIC_VALUES",Qt=(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)}}},er=e=>{let t=Array.isArray(e.excludes)?e.excludes:[],r=st(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()},rt=e=>{if(!e)return null;try{let t=JSON.parse(e);if(ot(t)){let r=lt(t.payload);return r?JSON.parse(r):null}return Ae(t)?null:t}catch{return null}},tr=async e=>{if(!e)return null;try{let t=JSON.parse(e);if(ot(t)){let r=lt(t.payload);return r?JSON.parse(r):null}if(Ae(t)){let r=await Ut(t.payload);return r?JSON.parse(r):null}return t}catch{return null}},nt=(e,t)=>{if(e==="root")return t;let r=/@media[^{]+\{\n?([\s\S]+)\n?\}/.exec(t);return r&&r[1]?r[1].trim():t},_e=(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=st(v),N=zt(X),A=Mt(X),C=Xt(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,".*")+"$")},ze=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}),dt=o=>ee.some(a=>o.startsWith(a))?!0:ze.some(a=>a(o)),Me=o=>!(dt(o)||u&&!o.startsWith(u)),ft=["default","xs","sm","md","lg","xl","2xl","sma","mda","lga","xla"],ut=r.filter(o=>!!o&&typeof o=="object"&&!Array.isArray(o)).map(o=>Object.keys(o)[0]).filter(o=>typeof o=="string"&&o.length>0),pt=new Set([...ft,...ut]),he=o=>!o||pt.has(o),bt=y!==!1,gt=new Set(["mx","my","px","py","bdx","bdy"]),ye=new Set,Se=o=>o?!bt||!F||Object.keys(F).length===0?!0:!!F[o]||gt.has(o)||ye.has(o):!1,F={},le={},we={},Ce={},Xe=()=>{Ce={...we,...n}},ce=o=>{if(!o){F={},le={},we={},ye=new Set,Xe();return}F=o.SHORT_PROPERTIES,le=o.SPECIFIC_VALUES,we=o.COMMON_VALUES,ye=new Set(Object.values(F)),Xe()},de=!0,xe=Promise.resolve();y===!1?ce(null):typeof y=="string"?(de=!1,ce(null),xe=Gt(y).then(o=>{ce(o)}).catch(o=>{console.warn("XCSS: Failed to import dictionary from URL",o)}).finally(()=>{de=!0})):ce(jt);let te=null,mt=(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(A,JSON.stringify(i))}catch{}},q=i=>{a&&(R.push(i),!j&&(j=!0,queueMicrotask(L)))};if(a&&m&&Qt(m,X.styleId),a&&typeof BroadcastChannel<"u")try{D=new BroadcastChannel(C),D.addEventListener("message",i=>{ne(et(i.data))})}catch{D=null}let V=Je(),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={},_={},O={root:""},T={root:[]},fe={root:!1},se=er(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)}},Ue=i=>{!a||!b||typeof i=="string"&&b.getItem(N)!==i||(b.removeItem(N),b.removeItem(A))},Ct=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:Vt(c)};Ee(JSON.stringify(w))};if(!X.compression){Ee(c);return}if(it()&&at()){Kt(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)}},Ne=()=>{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};Ct(c)},X.debounceMs))};if(a&&b)try{let i=b.getItem(N);if(i){let d=rt(i);if(!d)Nt(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]=nt(c,d.cssText[c]);te=d}}}catch(i){console.error(i)}a&&(_.root=new CSSStyleSheet),H.forEach(i=>{if(B[i]=new Set,a){let d=J.find(c=>Object.keys(c)[0]==i)?.[i]||"";_[i]=new CSSStyleSheet({media:d})}ie||(O[i]=""),T[i]=[],fe[i]=!1});let xt=()=>{if(!m)return;let i=m.querySelector(`style[id="${X.styleId}"]`);i&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.remove()})})},Ve=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=nt(d,i.cssText[d]);O[d]=c,a&&_[d]&&_[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,xt()};if(ie&&ue&&Ve(ue),t&&Array.isArray(t)?(O.root=t.join(`
|
|
7
|
+
`),a&&_.root&&_.root.replaceSync(O.root)):(O.root=t||"",a&&_.root&&_.root.replaceSync(O.root)),a&&m?.adoptedStyleSheets){let i=m.adoptedStyleSheets,d=["root",...H].map(c=>_[c]).filter(c=>c&&!i.includes(c));d.length>0&&(m.adoptedStyleSheets=[...i,...d])}a&&b&&ae&&!ie&&(async()=>{let i=await tr(ae.raw);if(!i){Ue(ae.raw);return}if(i.configHash!==se){Ue(ae.raw);return}ie=!0,ue=i,Ve(i)})(),a&&p?.addEventListener&&p.addEventListener("storage",i=>{if(i.key===A&&i.newValue)try{ne(et(JSON.parse(i.newValue)))}catch{}});let vt=(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 Fe=k.get(i),kt=Fe?`.${Fe}${w}`:`.${I}${w}`;var Ie=`@layer l${z}{${kt}{${x}}}`;B[c]||(B[c]=new Set);let qe=B[c];if(!qe.has(Ie))if(qe.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
|
+
`),_[c]&&_[c].replaceSync(K[c]),U[c]=[])}else Re[c]||(Re[c]=!0,queueMicrotask(()=>{let W=U[c],Ze=_[c];W.length>0&&(K[c]+=(K[c]?`
|
|
10
|
+
`:"")+W.join(`
|
|
11
|
+
`),Ze&&Ze.replaceSync(K[c]),U[c]=[],Ne()),Re[c]=!1}));else{let W=U[c];W.length>0&&(K[c]+=(K[c]?`
|
|
12
|
+
`:"")+W.join(`
|
|
13
|
+
`),U[c]=[])}},He=i=>{i.forEach(d=>{let c=Ke(d);c&&vt(d,c)})},We=i=>{if(i.length===0)return;let d=()=>He(i);de?d():xe.then(d)};return V.on("observeDom",We),{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(!Me(w))return!1;if(de)return!!Ke(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("[")?!!$e(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,Ne()}return z});return!a||h?V.emit("observeDom",d):queueMicrotask(()=>V.emit("observeDom",d)),x.join(" ")},observe:()=>{!a||!m||(wt(m,i=>{h?He(i):We(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 $e(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 Be(o,a){let p=$e(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 ht=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:""}},yt=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 Ke(o){if(!Me(o))return null;let a=u?o.slice(u.length):o,p=typeof CSS<"u"?CSS.escape(o):St(o);if(a.includes("&")&&!a.startsWith("&")){let{body:D,selector:re}=ht(a),ne=yt(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 _ of ne){let O=V?`${_}@${V}`:_,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=Be(T.prop,T.val);if(!G)return null;J.push(G)}if(J.length===0)return null;let H=V.replace(/(';|;)/g,_=>_=="';"?";":" "),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=[],$=Be(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 St=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)},wt=(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:mt,exportCache:()=>typeof window>"u"||!window.localStorage?te:rt(window.localStorage.getItem(N))||te,ready:xe}},rr=(e,t)=>{_e(t).buildCss(e).observe()},nr=(e,t)=>_e(t).buildCss(e).clsx,Oe={css:_e,cssObserve:rr,clsx:nr};var sr=(e,t)=>(e=e||"fwkui",t=t||"v1",`${e}_cache_${t}`),ct=(e="fwkui",t="v1",r)=>{let s=String(e||"").trim()||"fwkui",n=sr(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 = ${
|
|
97
|
-
var key = ${
|
|
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
|
|
126
|
+
`.trim();return r?.compact?u.replace(/\s+/g," ").trim():u};var Le="__FWXCSS_SHARED__",or={base:"html,body{font-size:16px;padding:0;margin:0;}"},ir=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},ar=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??or,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];ir(ee)&&(P=ee,C=C.slice(0,-1));let me=ar(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}},lr=e=>De(e),cr=e=>De(e),Pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:global,Q=Pe[Le]||De();Pe[Le]||(Pe[Le]=Q);var dr=Q.clsx,fr=Q.observe,ur=Q.setClsxRoot,pr=Q.getCss,br=Q.ready;var je=Oe;typeof document<"u"&&(je.cssObserve(document),console.log("\u{1F680} fwxcss Auto-Observer Activated"));var gr=je;0&&(module.exports={clsx,createSharedClsx,createSharedInstance,getBootloaderScript,getCss,observe,ready,setClsxRoot});
|
|
122
127
|
//# sourceMappingURL=index-auto.js.map
|