@stacksjs/stx 0.2.657 → 0.2.662
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/{chunk-mgkrnwjk.js → chunk-1hny5z72.js} +1 -1
- package/dist/{chunk-q68rssa6.js → chunk-3ay916gv.js} +1 -1
- package/dist/chunk-4f4agvd0.js +129 -0
- package/dist/{chunk-xmb4ttnf.js → chunk-4jyehvz3.js} +2 -2
- package/dist/{chunk-tnqbck1r.js → chunk-4xdpeky6.js} +1 -1
- package/dist/chunk-4xfpq9yp.js +2 -0
- package/dist/{chunk-s3t9tmsz.js → chunk-51n5rfsk.js} +1 -1
- package/dist/{chunk-kt3nk905.js → chunk-5m8j11b0.js} +1 -1
- package/dist/{chunk-g3tk83ea.js → chunk-61pvye5k.js} +1 -1
- package/dist/{chunk-m0gd0264.js → chunk-6dz6tpkp.js} +1 -1
- package/dist/chunk-6fbxh1we.js +2 -0
- package/dist/chunk-721ba72m.js +2 -0
- package/dist/{chunk-zvj935ma.js → chunk-7m5sqtq5.js} +1 -1
- package/dist/{chunk-nm1ggj8d.js → chunk-8n78w5kh.js} +1 -1
- package/dist/{chunk-vpmfm04j.js → chunk-9jcxrc6t.js} +1 -1
- package/dist/{chunk-zd23z1j8.js → chunk-a3mmhzpa.js} +1 -1
- package/dist/{chunk-a8aqch0j.js → chunk-adxt8qcy.js} +38 -38
- package/dist/{chunk-f9xed7c1.js → chunk-adzrhca1.js} +1 -1
- package/dist/chunk-ap1sydzw.js +2 -0
- package/dist/{chunk-47qc69v1.js → chunk-creeaceg.js} +1 -1
- package/dist/{chunk-ddtmrma9.js → chunk-d419kwfp.js} +1 -1
- package/dist/{chunk-7nx74hdr.js → chunk-d8kfbhhw.js} +1 -1
- package/dist/{chunk-6w8sjav5.js → chunk-dw5bsya8.js} +1 -1
- package/dist/{chunk-fzxx3rad.js → chunk-e3crw545.js} +3 -3
- package/dist/{chunk-vmwdt8fr.js → chunk-een2wqah.js} +6 -6
- package/dist/chunk-eqrkhc18.js +12 -0
- package/dist/chunk-fdfnk654.js +2 -0
- package/dist/{chunk-7gpxz94n.js → chunk-fr4hs814.js} +1 -1
- package/dist/{chunk-h8h2n247.js → chunk-ftskxb7f.js} +5 -5
- package/dist/{chunk-x29qw59w.js → chunk-h2a40417.js} +1 -1
- package/dist/{chunk-gjwyy7kh.js → chunk-h6633jna.js} +86 -86
- package/dist/{chunk-gg3wbfxa.js → chunk-j0dsavn2.js} +1 -1
- package/dist/{chunk-3zbrmm40.js → chunk-k6fyn9gk.js} +1 -1
- package/dist/{chunk-j8g1v38x.js → chunk-ky5kmg7t.js} +1 -1
- package/dist/{chunk-ndn0rmhs.js → chunk-m2h91ccn.js} +1 -1
- package/dist/{chunk-2mppsbt3.js → chunk-m7wb991z.js} +1 -1
- package/dist/{chunk-pcscq080.js → chunk-m89yndgc.js} +1 -1
- package/dist/{chunk-py28zkeh.js → chunk-mayr8s0x.js} +11 -11
- package/dist/{chunk-pbxq1rwd.js → chunk-msvpb1ax.js} +4 -4
- package/dist/chunk-mxdm8sw0.js +2 -0
- package/dist/{chunk-w6kdpx52.js → chunk-n48cshgz.js} +5 -5
- package/dist/{chunk-zn7ncwb8.js → chunk-pm76dy07.js} +1 -1
- package/dist/{chunk-nr9z0zeq.js → chunk-ptx6n9hd.js} +1 -1
- package/dist/{chunk-3ey8888k.js → chunk-pwjre3b2.js} +1 -1
- package/dist/{chunk-0h3gpwyv.js → chunk-q341v4gv.js} +56 -56
- package/dist/{chunk-aqk9e27b.js → chunk-q5h1reph.js} +1 -1
- package/dist/{chunk-jp4ef6dc.js → chunk-qvdx99py.js} +1 -1
- package/dist/chunk-r1hg1yc4.js +2 -0
- package/dist/{chunk-51kzs978.js → chunk-r6kbpwzd.js} +2 -2
- package/dist/{chunk-3r5rk2rz.js → chunk-rxqv3p90.js} +2 -2
- package/dist/{chunk-h39efd30.js → chunk-sknazxqf.js} +1 -1
- package/dist/{chunk-64ny75zz.js → chunk-smyeg8cr.js} +1 -1
- package/dist/chunk-tr4hseng.js +2 -0
- package/dist/chunk-tywr9wc5.js +2 -0
- package/dist/{chunk-shbabvaz.js → chunk-v0byvxty.js} +1 -1
- package/dist/{chunk-3areak0p.js → chunk-vc2xzscw.js} +2 -2
- package/dist/{chunk-28jtt8hn.js → chunk-vp9hse5k.js} +48 -48
- package/dist/chunk-vpa06pyx.js +2 -0
- package/dist/{chunk-v5981jwt.js → chunk-vsxws200.js} +1 -1
- package/dist/{chunk-sng45f0b.js → chunk-vzk09hvw.js} +8 -8
- package/dist/{chunk-y463z9qf.js → chunk-xz261gkh.js} +39 -39
- package/dist/{chunk-mj3fghaq.js → chunk-z248e3gj.js} +1 -1
- package/dist/{chunk-gb6229zj.js → chunk-zxbw2gr0.js} +2 -2
- package/dist/{chunk-n9dbjget.js → chunk-zzk3a426.js} +1 -1
- package/dist/cli.js +8 -8
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/expressions.js +9 -0
- package/dist/native/bridge/protocol.d.ts +1 -0
- package/dist/native/compiler/bundle.d.ts +1 -0
- package/dist/native/compiler/bundle.js +3 -2
- package/dist/native/compiler/headwind-to-style.d.ts +4 -0
- package/dist/native/compiler/headwind-to-style.js +33 -3
- package/dist/native/compiler/html-to-ir.d.ts +12 -0
- package/dist/native/compiler/html-to-ir.js +56 -5
- package/dist/native/compiler/inline-style.js +13 -0
- package/dist/native/compiler/ir.d.ts +2 -0
- package/dist/native/compiler/render-screen.js +32 -6
- package/dist/native/runtime/binding-tree.js +2 -1
- package/dist/native/runtime/craft-bridge.d.ts +2 -0
- package/dist/native/runtime/craft-bridge.js +13 -3
- package/dist/native/runtime/native-host.d.ts +1 -0
- package/dist/native/runtime/native-host.js +82 -12
- package/dist/native/runtime/shared-screen.js +4 -3
- package/dist/native/runtime/web-navigation.d.ts +18 -0
- package/dist/native/runtime/web-navigation.js +59 -0
- package/dist/native/runtime/web-storage.d.ts +40 -1
- package/dist/native/runtime/web-storage.js +123 -26
- package/dist/native/testing.d.ts +1 -0
- package/dist/native/testing.js +1 -0
- package/dist/native/text-entry.d.ts +51 -0
- package/dist/native/text-entry.js +101 -0
- package/dist/native-build.js +3 -1
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +25 -25
- package/dist/stx-virtual-ts.d.ts +1 -1
- package/dist/stx-virtual-ts.js +3 -1
- package/dist/utils.js +3 -1
- package/package.json +5 -5
- package/dist/chunk-0rs1j4bn.js +0 -2
- package/dist/chunk-1qmc6gg1.js +0 -2
- package/dist/chunk-2e9d0np1.js +0 -2
- package/dist/chunk-62x62wzy.js +0 -2
- package/dist/chunk-7js495j0.js +0 -2
- package/dist/chunk-cbsa2np9.js +0 -2
- package/dist/chunk-egg54kd0.js +0 -12
- package/dist/chunk-ez0s2kvp.js +0 -2
- package/dist/chunk-g884rvhy.js +0 -2
- package/dist/chunk-h42anr8g.js +0 -2
- package/dist/chunk-hz0g9xrq.js +0 -2
- package/dist/chunk-rhzkw6y4.js +0 -128
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{un,zl,Hl,Vl,Ul,Wl,f,ql,Po,Gl,Va,Ua}from"./chunk-
|
|
2
|
+
import{un,zl,Hl,Vl,Ul,Wl,f,ql,Po,Gl,Va,Ua}from"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{un as STX_ENGINE_BINDING_NAMES,Po as convertToCommonJS,Va as extractScriptFromTemplate,f as extractVariables,Ua as hasVariables,ql as isCompleteImport,Wl as isMissingBindingFailure,Vl as isModuleResolutionFailure,Ul as isSyntaxFailure,Gl as splitDeclaration,zl as stripTypeScript,Hl as withoutStxReferrer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ye,Io,Oo,Kl,Pt,Wa,No,qa,$p,Ie,dn,Oe}from"./chunk-
|
|
2
|
+
import{ye,Io,Oo,Kl,Pt,Wa,No,qa,$p,Ie,dn,Oe}from"./chunk-h6633jna.js";import{Za,i}from"./chunk-eqrkhc18.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{ye as BROWSER_CORE_IMPORTS,Kl as STX_AUTO_IMPORTS,Io as extractAndStripCssImports,Ie as extractBridgeData,Za as findInterpolationEnd,qa as generateAutoImportDestructuring,$p as generateBrowserAutoImportDestructuring,dn as generateServerDataBridge,Pt as injectBrowserCoreAutoImports,Oe as processClientScript,No as referencesName,Oo as renderVendorStyleTags,i as stripCommentsAndLiterals,Wa as transformAutoImports};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-hb08vrbb.js";import{_s,Ko,gc}from"./chunk-7rta163c.js";import"./chunk-ce6zddpf.js";import"./chunk-h6633jna.js";import"./chunk-2h8ea0we.js";import"./chunk-z248e3gj.js";import"./chunk-a3d0g4mr.js";import"./chunk-zaaeneq6.js";import{o}from"./chunk-adxt8qcy.js";import"./chunk-t9mfztcs.js";import"./chunk-04kg16qs.js";import"./chunk-q5h1reph.js";import{gt,Ve,fe,Qt,Te,Vn,Un,Ue}from"./chunk-vc2xzscw.js";import{s}from"./chunk-ftskxb7f.js";import"./chunk-vzk09hvw.js";import"./chunk-msvpb1ax.js";import"./chunk-pwjre3b2.js";import{Vr}from"./chunk-r6kbpwzd.js";import"./chunk-prf164ct.js";import{pt}from"./chunk-pxqh758g.js";import"./chunk-v2x9vzgw.js";import"./chunk-d419kwfp.js";import{qs}from"./chunk-fr4hs814.js";import"./chunk-r7kmsq3n.js";import"./chunk-n48cshgz.js";import"./chunk-8nryyqb5.js";import"./chunk-a3mmhzpa.js";import{existsSync as be,mkdirSync as di,readFileSync as fi}from"fs";import U from"path";import{existsSync as Ze,mkdirSync as un,realpathSync as ei,rmSync as dn}from"fs";import L from"path";import{existsSync as qr}from"fs";import K from"path";var mn="data-stx-b",rt=new Set(Ko),yn=new Set(_s);function Se(t){if(t==="ref"||t==="data-stx-ref")return"ref";if(t.startsWith("::"))return null;if(t.startsWith("@bind:")||t.startsWith("x-bind:"))return"attr";if(t.startsWith("@")||t.startsWith(":")){let e=t.slice(1).split(".")[0];if(rt.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(gc(e))return"event";if(t.startsWith("@"))return"event";return"attr"}if(t.startsWith("x-")){let e=t.split(".")[0];if(!yn.has(e))return"attr";let n=e.slice(2);if(n==="cloak"||n==="data"||n==="bind")return null;if(n==="tooltip"||n==="tooltip-position")return null;return rt.has(n)?n==="if"?"if":n:"attr"}return null}function bn(t){let e=[];for(let[n,r]of t){let i=Se(n);if(i)e.push({name:n,value:r,kind:i})}return e}var vn=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,ve=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function it(t){let e=[],n=0;return{html:t.replace(vn,(i,a,u)=>{if(!u||!/[:@]|x-/.test(u))return i;let c=[];ve.lastIndex=0;for(let x=ve.exec(u);x;x=ve.exec(u))c.push([x[1],x[2]??x[3]??x[4]??""]);let d=bn(c);if(!d.length)return i;let g={id:n++,bindings:d};if(d.some((x)=>x.kind==="for"))g.template=!0;e.push(g);let h=i.endsWith("/>");return`${i.slice(0,h?-2:-1).trimEnd()} ${mn}="${g.id}"${h?"/>":">"}`}),manifest:{entries:e}}}import cr from"path";function oe(t){let e=t&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(t.trim());if(!e)return;let n=Number(e[1])*(e[2]==="rem"?16:1);return Number.isFinite(n)?n:void 0}function we(t,e){if(!fe[t])return;return oe(e?.get(Qt(t))??fe[t].value)}function xe(t,e){let n=Vn[t];if(!n)return;return oe(e?.get(Ue(n))??Te[n]?.value)}function Ne(t,e){let n=Un[t];if(!n)return;let r=oe(e?.get(Ue(n.size))??Te[n.size]?.value),i=oe(e?.get(Ue(n.leading))??Te[n.leading]?.value);if(r===void 0||i===void 0)return;return{fontSize:r,lineHeight:i}}var Sn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},ct=_e({}),st,ot=null;function Re(){let t=globalThis.__stxNativeStyleConfig;if(!t)return ct;if(t!==st)st=t,ot=_e(t);return ot}function lt(t,e=new Map,n=""){for(let[r,i]of Object.entries(t??{})){let a=r==="DEFAULT"?n.replace(/-$/,""):`${n}${r}`;if(typeof i==="string")e.set(a,i);else if(i&&typeof i==="object")lt(i,e,`${a}-`)}return e}function ut(t){let e={};for(let[n,r]of Object.entries(t??{})){let i=typeof r==="number"?r:Number.parseFloat(String(r));if(Number.isFinite(i))e[n]=i}return e}function _e(t){return{shortcuts:new Map(Object.entries(t.shortcuts??{}).filter(([,e])=>typeof e==="string")),colors:lt(t.colors),breakpoints:new Map(Object.entries({...Sn,...ut(t.breakpoints)}))}}var ke={};function at(t){ke=t??{},ct=_e(ke)}async function dt(t,e){let n=ke;at(t);try{return await e()}finally{at(n)}}function ft(t){if(!t)return{};let e=t.theme??{},n=Object.fromEntries(Object.entries(t.shortcuts??{}).filter(([,r])=>typeof r==="string"));return{...Object.keys(n).length?{shortcuts:n}:{},...e.colors?{colors:JSON.parse(JSON.stringify(e.colors))}:{},...e.screens?{breakpoints:ut(e.screens)}:{}}}function ht(t){return Re().shortcuts.get(t)}function mt(t){return Re().colors.get(t)}function Ae(t){return Re().breakpoints.get(t)}var bt=/^--[\w\u0080-\uFFFF-]+$/u;function yt(t,e){if(!/var\(/i.test(t))return t;let n="",r="",i=!1;for(let a=0;a<t.length;a++){let u=t[a];if(u==="\\"){n+=t.slice(a,a+2),a++;continue}if(r){if(n+=u,u===r)r="";continue}if(u==='"'||u==="'"){r=u,n+=u;continue}if(t.slice(a,a+4).toLowerCase()!=="var("||a>0&&/[\w-]/.test(t[a-1])){n+=u;continue}let c=1,d=-1,g="",h=a+4;for(;h<t.length;h++){let w=t[h];if(w==="\\"){h++;continue}if(g){if(w===g)g="";continue}if(w==='"'||w==="'"){g=w;continue}if(w==="(")c++;if(w===")"&&--c===0)break;if(w===","&&c===1&&d===-1)d=h}if(c!==0)return;let m=t.slice(a+4,d===-1?h:d).trim();if(!bt.test(m))return;let x=e(m,d===-1?void 0:t.slice(d+1,h).trim());if(x===void 0||n.length+x.length>65536)return;n+=x,i=!0,a=h}return i&&n.length>65536?void 0:n}function ne(t,e){let n=new Map,r=new Set;for(let[f,l]of t){let p=f.trim();if(!bt.test(p))continue;if(typeof l==="string"||typeof l==="number"&&Number.isFinite(l))n.set(p,String(l).trim())}let i=new Map,a=new Set;for(let[f,l]of n){let p=new Set,b=(N,y=0)=>y>64?void 0:yt(N,(k,v)=>(p.add(k),v===void 0?"":b(v,y+1)));if(b(l)===void 0)a.add(f);i.set(f,p)}let u=new Map,c=new Map,d=[],g=new Set,h=0;function m(f,l=0){if(l>64){a.add(f);return}u.set(f,h),c.set(f,h++),d.push(f),g.add(f);for(let N of i.get(f)??[]){if(!n.has(N))continue;if(!u.has(N)){if(m(N,l+1),c.has(N))c.set(f,Math.min(c.get(f),c.get(N)))}else if(g.has(N))c.set(f,Math.min(c.get(f),u.get(N)))}if(c.get(f)!==u.get(f))return;let p=[],b;do b=d.pop(),g.delete(b),p.push(b);while(b!==f);if(p.length>1||i.get(f)?.has(f))p.forEach((N)=>a.add(N))}for(let f of n.keys())if(!u.has(f))m(f);let x=new Map;function w(f,l){if(r.add(f),x.has(f))return x.get(f);let p=n.get(f),b=p===void 0||/^(?:inherit|unset)$/i.test(p)?e?.get(f):a.has(f)||/^(?:initial|revert|revert-layer)$/i.test(p)?void 0:S(p,l+1);return x.set(f,b),b}function S(f,l=0){if(l>64)return;return yt(f,(p,b)=>w(p,l)??(b===void 0?void 0:S(b,l+1)))}return{resolve:S,used:r,computed(){let f=new Map(e);for(let l of n.keys())f.set(l,w(l,0));return f}}}function Ee(t){if(t.display==="flex"&&t.flexDirection==null)return{...t,flexDirection:"row"};return t}var vt=new Set(["display","gridColumns","gridTemplateColumns","gridTemplateRows","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","objectFit","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),wn=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","order","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),St=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),xn=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Nn=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,kn=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Tn=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function Rn(t){if(typeof t!=="string")return t;let e=Nn.exec(t);return e?Number(e[1])*(/^r?em$/i.test(e[2]||"")?16:1):t}function ee(t){return typeof t==="number"&&Number.isFinite(t)}function _n(t,e){if(t==="shadowOffset"&&e&&typeof e==="object"&&!Array.isArray(e)){let{width:n,height:r}=e;return ee(n)&&ee(r)?{width:n,height:r}:void 0}if(t==="transform"&&Array.isArray(e)){let n=[];for(let r of e){if(!r||typeof r!=="object"||Array.isArray(r)||Object.keys(r).length!==1)return;let[i,a]=Object.entries(r)[0];if(Tn.has(i)&&ee(a))n.push({[i]:a});else if(kn.has(i)&&typeof a==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(a))n.push({[i]:a});else return}return n}return}function An(t){let e=[],n=0,r=0,i="";for(let a=0;a<=t.length;a++){let u=t[a];if(u==="\\"){a++;continue}if(i){if(u===i)i="";continue}if(u==='"'||u==="'"){i=u;continue}if(u==="(")r++;if(u===")")r=Math.max(0,r-1);if(a!==t.length&&(u!==";"||r))continue;let c=t.slice(n,a),d=c.indexOf(":");if(d!==-1)e.push([c.slice(0,d).trim(),c.slice(d+1).trim()]);n=a+1}return e}function En(t,e){let n;if(typeof t==="string"){if(t=t.trim(),!t)return[];try{t=JSON.parse(t)}catch{}}if(typeof t==="string")n=An(t);else if(t&&typeof t==="object"&&!Array.isArray(t))n=Object.entries(t);else{if(t!=null&&t!==!1)e({kind:"non-numeric-style",name:"style"});return[]}return n}function ae(t,e=()=>{},n={}){let r=En(t,e),i=ne(r,n.inheritedVariables);return n.onVariables?.(i.computed()),In(r,i,e)}function In(t,e,n){let r={},i=[];for(let[a,u]of t){if(a.trim().startsWith("--")){i.push(a.trim());continue}let c=vt.has(a)||a.trim().startsWith("--")?a:a.trim().toLowerCase().replace(/-([a-z])/g,(h,m)=>m.toUpperCase());if(!vt.has(c)){n({kind:"unknown-style",name:c});continue}if(u==null||u==="")continue;let d=typeof u==="string"?e.resolve(u.trim()):u;if(d===void 0){n({kind:"non-numeric-style",name:c});continue}if(d==="")continue;if(c==="objectFit"){let h=typeof d==="string"?d.trim().toLowerCase():"";if(h==="cover"||h==="contain")r.resizeMode=h;else if(h==="fill")r.resizeMode="stretch";else if(h==="none")r.resizeMode="center";else n({kind:"unknown-style",name:`objectFit:${String(d)}`});continue}let g;if(wn.has(c)||St.has(c)){if(g=Rn(d),!ee(g)&&!(St.has(c)&&typeof g==="string"&&g.endsWith("%")&&xn.test(g.slice(0,-1))&&Number.isFinite(Number(g.slice(0,-1)))))g=void 0}else if(c==="display"&&d==="inline-flex")g="flex";else if(c==="shadowOffset"||c==="transform")g=_n(c,d);else if(c==="gridTemplateColumns"||c==="gridTemplateRows")g=ee(d)||typeof d==="string"?d:void 0;else if(c==="fontWeight"&&ee(d))g=String(d);else if(typeof d==="string")g=d;if(g===void 0)n({kind:"non-numeric-style",name:c});else r[c]=g}for(let a of i)if(!e.used.has(a))n({kind:"unknown-style",name:a});return r}var Cn={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Ce={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},wt={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},xt={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function Q(t){let e=t.lastIndexOf("/");if(e>0&&(!t.endsWith("]")||/\/\[[\d.]+%?\]$/.test(t))){let r=Q(t.slice(0,e)),i=t.slice(e+1),a=/^\[(.+)\]$/.test(i)?Number.parseFloat(i.slice(1,-1))*(i.includes("%")?1:100):Number.parseFloat(i);if(!r||!Number.isFinite(a))return;return On(r,a/100)}if(t==="transparent")return"transparent";if(t==="current")return"currentColor";if(t==="black")return"#000000";if(t==="white")return"#ffffff";let n=t.split("-");if(n.length===2){let[r,i]=n,a=Cn[r];if(a&&typeof a==="object")return a[i]}if(t.startsWith("[")&&t.endsWith("]")){let r=t.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(r)?r:void 0}return}function Oe(t){return Q(t.trim())}function On(t,e){if(t==="transparent")return t;let n=t.startsWith("#")?t.slice(1):"";if(n.length===3)n=n.split("").map((i)=>i+i).join("");if(n.length===8)n=n.slice(0,6);if(n.length!==6)return;let r=Math.round(Math.min(1,Math.max(0,e))*255);return`#${n}${r.toString(16).padStart(2,"0")}`}function Ie(t,e=16){if(!t.startsWith("[")||!t.endsWith("]"))return;let n=t.slice(1,-1),r=Number.parseFloat(n);if(!Number.isFinite(r))return;if(n.endsWith("rem"))return r*16;if(n.endsWith("em"))return r*e;return r}function j(t){if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1);if(e.endsWith("%"))return;let n=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(n)?n:void 0}return Ce[t]??xe(t)}function le(t){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(t);if(e)return`${Number.parseFloat(e[1])}%`;return j(t)}var Pn={flex:(t,e)=>(e.display="flex",!0),hidden:(t,e)=>(e.display="none",!0),grid:(t,e)=>(e.display="grid",!0),"flex-row":(t,e)=>(e.flexDirection="row",!0),"flex-col":(t,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(t,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(t,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(t,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(t,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(t,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(t,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(t,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(t,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(t,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(t,e)=>(e.flexGrow=1,!0),"grow-0":(t,e)=>(e.flexGrow=0,!0),shrink:(t,e)=>(e.flexShrink=1,!0),"shrink-0":(t,e)=>(e.flexShrink=0,!0),"order-first":(t,e)=>(e.order=-9999,!0),"order-last":(t,e)=>(e.order=9999,!0),"order-none":(t,e)=>(e.order=0,!0),"justify-start":(t,e)=>(e.justifyContent="flex-start",!0),"justify-center":(t,e)=>(e.justifyContent="center",!0),"justify-end":(t,e)=>(e.justifyContent="flex-end",!0),"justify-between":(t,e)=>(e.justifyContent="space-between",!0),"justify-around":(t,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(t,e)=>(e.justifyContent="space-evenly",!0),"items-start":(t,e)=>(e.alignItems="flex-start",!0),"items-center":(t,e)=>(e.alignItems="center",!0),"items-end":(t,e)=>(e.alignItems="flex-end",!0),"items-stretch":(t,e)=>(e.alignItems="stretch",!0),"items-baseline":(t,e)=>(e.alignItems="baseline",!0),"self-auto":(t,e)=>(e.alignSelf="auto",!0),"self-start":(t,e)=>(e.alignSelf="flex-start",!0),"self-center":(t,e)=>(e.alignSelf="center",!0),"self-end":(t,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(t,e)=>(e.alignSelf="stretch",!0),"self-baseline":(t,e)=>(e.alignSelf="baseline",!0),"min-w-0":(t,e)=>(e.minWidth=0,!0),"aspect-square":(t,e)=>(e.aspectRatio=1,!0),"inset-0":(t,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"mx-auto":(t,e)=>(e.alignSelf="center",!0),fixed:(t,e)=>(e.position="absolute",!0),sticky:()=>!0,"sr-only":(t,e)=>(e.position="absolute",e.width=1,e.height=1,e.overflow="hidden",!0),inline:()=>!0,"inline-block":()=>!0,contents:()=>!0,"align-top":()=>!0,"align-middle":()=>!0,"align-bottom":()=>!0,"align-baseline":()=>!0,"align-text-top":()=>!0,"whitespace-normal":()=>!0,"whitespace-pre":()=>!0,"whitespace-pre-line":()=>!0,"whitespace-pre-wrap":()=>!0,"whitespace-nowrap":()=>!0,"break-words":()=>!0,"break-all":()=>!0,"break-normal":()=>!0,"object-cover":()=>!0,"object-contain":()=>!0,"object-fill":()=>!0,"object-center":()=>!0,"tracking-tighter":(t,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(t,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(t,e)=>(e.letterSpacing=0,!0),"tracking-wide":(t,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(t,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(t,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(t,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(t,e)=>(e.position="relative",!0),absolute:(t,e)=>(e.position="absolute",!0),"overflow-visible":(t,e)=>(e.overflow="visible",!0),"overflow-hidden":(t,e)=>(e.overflow="hidden",!0),"overflow-scroll":(t,e)=>(e.overflow="scroll",!0),"overflow-x-auto":()=>!0,"overflow-x-scroll":()=>!0,"overflow-y-auto":()=>!0,"overflow-y-scroll":()=>!0,"font-thin":(t,e)=>(e.fontWeight="100",!0),"font-extralight":(t,e)=>(e.fontWeight="200",!0),"font-light":(t,e)=>(e.fontWeight="300",!0),"font-normal":(t,e)=>(e.fontWeight="400",!0),"font-medium":(t,e)=>(e.fontWeight="500",!0),"font-semibold":(t,e)=>(e.fontWeight="600",!0),"font-bold":(t,e)=>(e.fontWeight="bold",!0),"font-extrabold":(t,e)=>(e.fontWeight="800",!0),"font-black":(t,e)=>(e.fontWeight="900",!0),italic:(t,e)=>(e.fontStyle="italic",!0),"not-italic":(t,e)=>(e.fontStyle="normal",!0),"text-left":(t,e)=>(e.textAlign="left",!0),"text-center":(t,e)=>(e.textAlign="center",!0),"text-right":(t,e)=>(e.textAlign="right",!0),"text-justify":(t,e)=>(e.textAlign="justify",!0),uppercase:(t,e)=>(e.textTransform="uppercase",!0),lowercase:(t,e)=>(e.textTransform="lowercase",!0),capitalize:(t,e)=>(e.textTransform="capitalize",!0),"normal-case":(t,e)=>(e.textTransform="none",!0),underline:(t,e)=>(e.textDecorationLine="underline",!0),"line-through":(t,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(t,e)=>(e.textDecorationLine="none",!0)};function Mn(t,e){if(!t.startsWith("bg-"))return!1;let n=t.slice(3),r=Q(n);if(r)return e.backgroundColor=r,!0;return!1}function Bn(t,e){if(!t.startsWith("text-"))return!1;let n=t.slice(5),r=Ne(n);if(r)return Object.assign(e,r),!0;if(wt[n])return e.fontSize=wt[n],!0;if(n.startsWith("[")&&n.endsWith("]")){let a=n.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(a)){let u=a.endsWith("rem")||a.endsWith("em")?Number.parseFloat(a)*16:Number.parseFloat(a);if(Number.isFinite(u))return e.fontSize=u,!0}}let i=Q(n);if(i)return e.color=i,!0;return!1}var Ln=new Set(["t","tr","r","br","b","bl","l","tl"]);function Dn(t,e){let n=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(t);if(n&&Ln.has(n[1]))return e.gradientDirection=`to-${n[1]}`,!0;let r=/^(from|via|to)-(.+)$/.exec(t);if(!r)return!1;let i=Q(r[2]);if(!i)return!1;if(r[1]==="from")e.gradientFrom=i;else if(r[1]==="via")e.gradientVia=i;else e.gradientTo=i;return!0}function $n(t,e){for(let n of["fill","stroke"]){let r=`${n}-`;if(!t.startsWith(r))continue;let i=t.slice(r.length);if(i==="none")return e[n]="none",!0;if(n==="stroke"&&/^\d+(?:\.\d+)?$/.test(i))return e.strokeWidth=Number.parseFloat(i),!0;if(n==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(i))return e.strokeWidth=Number.parseFloat(i.slice(1)),!0;let a=Q(i);if(a)return e[n]=a,!0}return!1}function jn(t,e){if(t.startsWith("p-")){let n=j(t.slice(2));if(n!==void 0)return e.padding=n,!0}if(t.startsWith("px-")){let n=j(t.slice(3));if(n!==void 0)return e.paddingHorizontal=n,!0}if(t.startsWith("py-")){let n=j(t.slice(3));if(n!==void 0)return e.paddingVertical=n,!0}if(t.startsWith("pt-")){let n=j(t.slice(3));if(n!==void 0)return e.paddingTop=n,!0}if(t.startsWith("pr-")){let n=j(t.slice(3));if(n!==void 0)return e.paddingRight=n,!0}if(t.startsWith("pb-")){let n=j(t.slice(3));if(n!==void 0)return e.paddingBottom=n,!0}if(t.startsWith("pl-")){let n=j(t.slice(3));if(n!==void 0)return e.paddingLeft=n,!0}return!1}function kt(t,e){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(t)){let n={};if(!kt(t.slice(1),n))return!1;let r=Object.entries(n);if(r.some(([,i])=>typeof i!=="number"))return!1;for(let[i,a]of r)e[i]=-a;return!0}if(t.startsWith("m-")){let n=j(t.slice(2));if(n!==void 0)return e.margin=n,!0}if(t.startsWith("mx-")){let n=j(t.slice(3));if(n!==void 0)return e.marginHorizontal=n,!0}if(t.startsWith("my-")){let n=j(t.slice(3));if(n!==void 0)return e.marginVertical=n,!0}if(t.startsWith("mt-")){let n=j(t.slice(3));if(n!==void 0)return e.marginTop=n,!0}if(t.startsWith("mr-")){let n=j(t.slice(3));if(n!==void 0)return e.marginRight=n,!0}if(t.startsWith("mb-")){let n=j(t.slice(3));if(n!==void 0)return e.marginBottom=n,!0}if(t.startsWith("ml-")){let n=j(t.slice(3));if(n!==void 0)return e.marginLeft=n,!0}return!1}function Wn(t,e){if(!t.startsWith("w-"))return!1;let n=t.slice(2);if(n==="full")return e.width="100%",!0;if(n==="screen")return e.width="100%",!0;if(n==="auto")return e.width="auto",!0;if(n.includes("/")){let[i,a]=n.split("/"),u=Number.parseInt(i)/Number.parseInt(a)*100;return e.width=`${u}%`,!0}let r=le(n);if(r!==void 0)return e.width=r,!0;return!1}function Fn(t,e){if(!t.startsWith("h-"))return!1;let n=t.slice(2);if(n==="full")return e.height="100%",!0;if(n==="screen")return e.height="100%",!0;if(n==="auto")return e.height="auto",!0;let r=le(n);if(r!==void 0)return e.height=r,!0;return!1}function zn(t,e){if(t==="rounded")return e.borderRadius=xt.DEFAULT,!0;if(!t.startsWith("rounded-"))return!1;let n=t.slice(8);if(n==="")return!1;let r=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(n),i=xt[r[2]]??we(r[2])??Ie(r[2]);if(i===void 0)return!1;let a={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],tl:["borderTopLeftRadius"],tr:["borderTopRightRadius"],bl:["borderBottomLeftRadius"],br:["borderBottomRightRadius"]};for(let u of r[1]?a[r[1]]:["borderRadius"])e[u]=i;return!0}function Xn(t,e){let n=/^border(?:-([trblxy]))?(?:-(\d+|\[[^\]]+\]))?$/.exec(t);if(!n)return!1;let[,r="",i]=n,a=i===void 0?1:Number(i);if(i?.startsWith("[")){let c=/^\[(\d+(?:\.\d+)?|\.\d+)(px|rem)?\]$/.exec(i);if(!c)return!1;a=Number(c[1])*(c[2]==="rem"?16:1)}if(!Number.isFinite(a)||a<0)return!1;let u={"":["borderWidth"],t:["borderTopWidth"],r:["borderRightWidth"],b:["borderBottomWidth"],l:["borderLeftWidth"],x:["borderLeftWidth","borderRightWidth"],y:["borderTopWidth","borderBottomWidth"]};for(let c of u[r])e[c]=a;return!0}function Hn(t,e){if(!t.startsWith("border-"))return!1;let n=t.slice(7),r=Q(n);if(r)return e.borderColor=r,!0;return!1}function qn(t,e){if(!t.startsWith("opacity-"))return!1;let n=Number.parseInt(t.slice(8));if(!Number.isNaN(n))return e.opacity=n/100,!0;return!1}function Gn(t,e){if(t.startsWith("tracking-[")){let n=Ie(t.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(n===void 0)return!1;return e.letterSpacing=n,!0}if(t.startsWith("leading-")){let n=t.slice(8),r=typeof e.fontSize==="number"?e.fontSize:16,i={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=n.startsWith("[")?/^\[[\d.]+\]$/.test(n)?Number.parseFloat(n.slice(1,-1))*r:Ie(n,r):i[n]!==void 0?i[n]*r:Ce[n];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Kn(t,e){let n=/^(-?)(inset-x|inset-y|inset|top|right|bottom|left)-(.+)$/.exec(t);if(!n)return!1;let r=n[3],i=/^\[(-?[\d.]+)px\]$/.exec(r),a=i?Number(i[1]):Ce[r];if(a===void 0||!Number.isFinite(a))return!1;let u=n[1]?-a:a,c=n[2]==="inset"?["top","right","bottom","left"]:n[2]==="inset-x"?["left","right"]:n[2]==="inset-y"?["top","bottom"]:[n[2]];for(let d of c)e[d]=u;return!0}function Jn(t,e){let n=/^grid-cols-\[(.+)\]$/.exec(t);if(n)return e.gridColumns=n[1].split("_").filter(Boolean).length,!0;let r=/^grid-cols-(\d+)$/.exec(t);if(!r)return!1;return e.gridColumns=Number(r[1]),!0}function Yn(t,e){if(!t.startsWith("size-"))return!1;let n=t.slice(5),r=n==="full"?"100%":le(n);if(r===void 0)return!1;return e.width=r,e.height=r,!0}var Qn={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function Zn(t,e){let n=/^(min|max)-(w|h)-(.+)$/.exec(t);if(!n)return!1;let[,r,i,a]=n,u=a==="full"||a==="screen"?"100%":a==="none"?void 0:i==="w"&&r==="max"&&Qn[a]||le(a);if(u===void 0&&a!=="none")return!1;let c=`${r}${i==="w"?"Width":"Height"}`;if(u===void 0)delete e[c];else e[c]=u;return!0}function er(t,e){let n=/^(-?)(top|right|bottom|left)-(.+)$/.exec(t);if(!n)return!1;let r=n[3]==="full"?"100%":j(n[3]);if(r===void 0)return!1;return e[n[2]]=typeof r==="number"&&n[1]?-r:r,!0}function tr(t,e){let n=/^(-?)translate-(x|y)-(.+)$/.exec(t);if(!n)return!1;let r=n[3],i;if(r.startsWith("[")){let c=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(r);if(!c)return!1;i=Number(c[1])*(c[2]?.endsWith("em")?16:1)}else i=j(r);if(i===void 0||!Number.isFinite(i))return!1;if(n[1])i=-i;let a=n[2]==="x"?"translateX":"translateY",u=a==="translateX"?{translateX:i}:{translateY:i};return e.transform=[...(e.transform??[]).filter((c)=>!(a in c)),u],!0}function nr(t,e){let n=/^space-(x|y)-(.+)$/.exec(t);if(!n)return!1;let r=j(n[2]);if(r===void 0)return!1;return e.gap=r,!0}function rr(t,e){if(t.startsWith("gap-")){let n=j(t.slice(4));if(n!==void 0)return e.gap=n,!0}if(t.startsWith("gap-x-")){let n=j(t.slice(6));if(n!==void 0)return e.columnGap=n,!0}if(t.startsWith("gap-y-")){let n=j(t.slice(6));if(n!==void 0)return e.rowGap=n,!0}return!1}function ir(t,e){let r={"shadow-none":[0,0,0,0],"shadow-xs":[1,1,0.05,1],"shadow-sm":[2,1,0.1,2],shadow:[3,2,0.12,3],"shadow-md":[6,4,0.15,4],"shadow-lg":[10,6,0.18,8],"shadow-xl":[16,10,0.2,12],"shadow-2xl":[24,16,0.25,18]}[t];if(!r)return!1;let[i,a,u,c]=r;return Object.assign(e,{shadowColor:"#000000",shadowOpacity:u,shadowRadius:i,shadowOffset:{width:0,height:a},elevation:c}),!0}function sr(t){let e=/^divide-(?:(y|x)(?:-(.+))?|(.+))$/.exec(t);if(!e)return null;if(e[2]==="reverse")return"";if(e[1])return`border-${e[1]==="y"?"t":"l"}${e[2]?`-${e[2]}`:""}`;return`border-${e[3]}`}var Tt=new Set(["aria-selected","aria-pressed","aria-checked","aria-expanded"]),or=new Set(["hover","group-hover","peer-hover","active","group-active","visited","placeholder","selection","print","motion-safe"]),ar=/^(?:transition(?:-[a-z]+)?|duration-\S+|ease-\S+|delay-\S+|will-change-\S+|cursor-\S+|select-(?:none|text|all|auto)|outline-none|outline-0|appearance-none|scroll-smooth|scroll-auto|antialiased|subpixel-antialiased|touch-\S+|resize(?:-\S+)?|backdrop-blur(?:-\S+)?|isolate|contain-\S+)$/;function Rt(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a==="[")n++;else if(a==="]")n=Math.max(0,n-1);else if(a===":"&&n===0)e.push(t.slice(r,i)),r=i+1}return e.push(t.slice(r)),e}function _t(t,e=new Set){let n=Rt(t),r=n[n.length-1],i=e.has(r)?void 0:ht(r);if(i===void 0)return[t];let a=n.slice(0,-1).map((c)=>`${c}:`).join(""),u=new Set(e).add(r);return i.split(/\s+/).filter(Boolean).flatMap((c)=>_t(`${a}${c}`,u))}function ue(t,e,n={}){let r=new Map,i=(S,f)=>{if(!r.has(S))r.set(S,{...f,classes:[],authored:new Map});return r.get(S)};i("base",{});let a=[],u=[],c=t.split(/\s+/).filter(Boolean);if(n.rules){let S=new Set(c);for(let f of Object.keys(n.rules))if(f.includes(".")&&f.split(".").every((l)=>S.has(l)))u.push(f);u.sort((f,l)=>f.split(".").length-l.split(".").length)}for(let S of c){if(n.rules&&Object.hasOwn(n.rules,S)){a.push(S);continue}for(let f of _t(S)){let l=Rt(f),p=l.pop(),b=l.some((T)=>T.startsWith("focus"));if(l.some((T)=>/^(?:group-|peer-)?focus(?:-visible|-within)?$/.test(T))&&/^(?:ring|outline)(?:-|$)/.test(p))continue;if(ar.test(p)||!b&&l.some((T)=>or.has(T)))continue;let N,y,k=!1,v,_=[];for(let T of l){let I=Ae(T),M=T.startsWith("max-")?Ae(T.slice(4)):void 0;if(I!==void 0&&N===void 0)N=I;else if(M!==void 0&&y===void 0)y=M-0.02;else if(T==="disabled"&&!k)k=!0;else if(Tt.has(T)&&v===void 0)v=T;else _.push(T)}let O=[..._,p].join(":"),R=N!==void 0||y!==void 0,A=k?i("disabled",{disabled:!0}):v?i(`state:${v}`,{state:v}):R?i(`range:${N??0}:${y??""}`,{min:N??0,max:y}):r.get("base");if((k||v)&&(R||k&&v)){r.get("base").authored.set(f,S),r.get("base").classes.push(f);continue}if(A.classes.push(O),!A.authored.has(O))A.authored.set(O,S===f?f:`${S} (${f})`)}}let d=[...a,...u],g=(S,f)=>f.map((l)=>S.authored.get(l)??l),h=r.get("base"),m=ce(h.classes.join(" "),e,n),x=new Map;if(d.length){let S=(p)=>p?ae(p,()=>{},{inheritedVariables:e}):{},f={},l={};for(let p of d){let b=n.rules[p];f={...f,...S(b.light)},l={...l,...S(b.dark)};for(let N of b.responsive??[]){let y=`${N.min}:${N.max??""}`,k=x.get(y)??{min:N.min,...N.max===void 0?{}:{max:N.max},style:{}};if(k.style={...k.style,...S(N.light)},N.dark)k.dark={...k.dark,...S(N.dark)};x.set(y,k)}}if(m.style={...f,...m.style},Object.keys(l).length)m.dark={...l,...m.dark}}m.unknown=g(h,m.unknown);let w=[];for(let S of r.values()){if(S===h)continue;let f=ce(S.classes.join(" "),e);m.unknown=[...new Set([...m.unknown,...g(S,f.unknown)])];let l={style:f.style,...f.dark?{dark:f.dark}:{}};if(S.disabled)m.disabled=l;else if(S.state)(m.states??={})[S.state]=l;else w.push({min:S.min??0,...S.max===void 0?{}:{max:S.max},...l})}for(let S of x.values()){let f=w.find((l)=>l.min===S.min&&l.max===S.max);if(f){if(f.style={...S.style,...f.style},S.dark||f.dark)f.dark={...S.dark,...f.dark}}else w.push(S)}if(w.length)m.responsive=w.sort((S,f)=>S.min-f.min||(S.max??1/0)-(f.max??1/0));return m}function ce(t,e,n={}){let r=[],i=[],a=[],u=[],c={focus:{classes:[],originals:new Map},focusWithin:{classes:[],originals:new Map}},d=new Map;function g(p,b){let N=/^(bg|text|border(?:-[trblxy])?|from|via|to|fill|stroke|divide|decoration|caret|accent)-(.+?)(\/[^\s]+)?$/.exec(p),y=N&&mt(N[2]);if(N&&y){let R=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+?)\s*)?\)$/.exec(y),A=R?e?.get(R[1])??R[2]:y;if(A&&/^(?:#[0-9a-f]{3,8}|rgba?\(.+\)|hsla?\(.+\))$/i.test(A))return[`${N[1]}-[${A.replace(/\s+/g,"")}]${N[3]||""}`]}let k=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(p),v=k&>[k[2]];if(v){let R=e?.get(Ve(k[2]));return[`${k[1]}-${R===void 0?v[b]:`[${R}]`}${k[3]||""}`]}let _=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(p);if(_&&fe[_[2]]){let R=we(_[2],e);return R===void 0?void 0:[`rounded-${_[1]?`${_[1]}-`:""}[${R}px]`]}let O=p.startsWith("text-")?p.slice(5):"";if(Un[O]){let R=Ne(O,e);return R&&[`text-[${R.fontSize}px]`,`leading-[${R.lineHeight}px]`]}for(let R of Object.keys(Vn)){if(!p.endsWith(`-${R}`))continue;let A=xe(R,e);return A===void 0?void 0:[`${p.slice(0,-R.length)}[${A}px]`]}return[p]}function h(p,b){if(!d.has(p))d.set(p,new Set);return d.get(p).add(b),p}let m=[],x=new Map;for(let p of t.split(/\s+/).filter(Boolean)){let b=p.startsWith("dark:")?p.slice(5):p,N=sr(b);if(N!==null){let v=N&&`${p===b?"":"dark:"}${N}`;if(v)m.push(v),x.set(v,p);continue}let y=/^(dark:)?(focus|focus-within):(dark:)?(.+)$/.exec(p),k=y?.[2]==="focus"?"focus":"focusWithin";if(y&&n[k]&&!(y[1]&&y[3])){let v=`${y[1]||y[3]?"dark:":""}${y[4]}`,_=c[k];_.classes.push(v),_.originals.set(v,[..._.originals.get(v)??[],p]);continue}if(p.startsWith("dark:")){let v=g(p.slice(5),"dark");if(!v)u.push(p);else i.push(...v.map((_)=>h(_,p)))}else if(!p.includes(":")||p.startsWith("[")){let v=g(p,"light"),_=g(p,"dark");if(!v||!_){u.push(p);continue}if(r.push(...v.map((O)=>h(O,p))),_.join(" ")!==v.join(" "))a.push(..._.map((O)=>h(O,p)))}else u.push(p)}let w=[],S=Nt(r,w),f={style:S,unknown:w};if(i.length||a.length)f.dark=Nt([...a,...i],w);if(S.transform&&f.dark?.transform){let p=new Set(f.dark.transform.flatMap((b)=>Object.keys(b)));f.dark.transform=[...S.transform.filter((b)=>!Object.keys(b).some((N)=>p.has(N))),...f.dark.transform]}for(let p of r){if(p==="truncate"||p==="whitespace-nowrap")f.numberOfLines=1;let b=/^object-(cover|contain|fill)$/.exec(p);if(b)f.resizeMode=b[1]==="fill"?"stretch":b[1];let N=/^line-clamp-(\d+)$/.exec(p);if(N)f.numberOfLines=Number(N[1]);if(!f.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(p))f.icon=p}let l=w.flatMap((p)=>[...d.get(p)??[p]]);if(f.unknown=[...new Set([...l.filter((p)=>!/^line-clamp-\d+$/.test(p)),...u])],m.length){let p=ce(m.join(" "),e);f.divide={style:p.style,...p.dark?{dark:p.dark}:{}},f.unknown=[...new Set([...f.unknown,...p.unknown.map((b)=>x.get(b)??b)])]}for(let p of["focus","focusWithin"]){let b=c[p];if(!b.classes.length)continue;let N=ce(b.classes.join(" "),e);f[p]={style:N.style,dark:N.dark},f.unknown=[...new Set([...f.unknown,...N.unknown.flatMap((y)=>b.originals.get(y)??[y])])];for(let y of b.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(y))f.unknown.push(...b.originals.get(y))}return f}function Nt(t,e){let n={},r=Array.isArray(t)?t:t.split(/\s+/).filter(Boolean);for(let i of r){if(/^i-[a-z0-9]+-/.test(i))continue;let a=Pn[i];if(a){a("",n);continue}if(ir(i,n))continue;if(Dn(i,n))continue;if(Mn(i,n))continue;if($n(i,n))continue;if(Bn(i,n))continue;if(jn(i,n))continue;if(kt(i,n))continue;if(Wn(i,n))continue;if(Fn(i,n))continue;if(zn(i,n))continue;if(Xn(i,n))continue;if(Hn(i,n))continue;if(qn(i,n))continue;if(rr(i,n))continue;if(Gn(i,n))continue;if(Yn(i,n))continue;if(Zn(i,n))continue;if(Jn(i,n))continue;let u=/^z-\[(-?\d+)\]$/.exec(i)??/^z-(\d+)$/.exec(i);if(u){n.zIndex=Number(u[1]);continue}if(i==="z-auto")continue;if(Kn(i,n))continue;let c=/^order-\[(-?\d+)\]$/.exec(i)??/^order-(-?\d+)$/.exec(i);if(c){n.order=Number(c[1]);continue}if(er(i,n))continue;if(tr(i,n))continue;if(nr(i,n))continue;if(e?.push(i),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${i}`)}return n}var At=new Map;function Et(t,e){if(!t)return;let n=t.trim(),r=n.lastIndexOf("-"),i=r===-1?e[n]:e[n.slice(0,r)],a=r===-1?i:i?.[n.slice(r+1)];if(typeof a==="string"&&/^#[\da-f]{3,8}$/i.test(a))return a;return Oe(n)??Oe(`[${n}]`)}function lr(t){let e=t.roles??{},n=t.shapes??{},r=t.density??{},i={...t.theme?.colors,...t.theme?.extend?.colors},a=[],u=[];for(let[c,d]of Object.entries(e)){if(!gt[c])continue;let g=Et(typeof d==="string"?d:d?.light,i),h=Et(typeof d==="string"?d:d?.dark,i);if(g)a.push(`${Ve(c)}: ${g};`);if(h)u.push(`${Ve(c)}: ${h};`)}for(let[c,d]of Object.entries(n))if(fe[c])a.push(`${Qt(c)}: ${d};`);for(let[c,d]of Object.entries(r))if(Te[c])a.push(`${Ue(c)}: ${d};`);return[a.length?`:root { ${a.join(" ")} }`:"",u.length?`.dark { ${u.join(" ")} }`:""].filter(Boolean).join(`
|
|
3
|
+
`)}async function ur(t){let{resolveUserCssConfig:e}=await import("./chunk-pm76dy07.js"),n=await e(t);return n?lr(n):""}function It(t){let e=cr.resolve(t),n=At.get(e);if(!n)n=ur(e).catch(()=>""),At.set(e,n);return n}var Ot={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},Ct={alert:"alert",button:"button",checkbox:"checkbox",combobox:"combobox",header:"header",heading:"header",image:"image",img:"image",link:"link",menu:"menu",menubar:"menubar",menuitem:"menuitem",none:"none",presentation:"none",progressbar:"progressbar",radio:"radio",scrollbar:"scrollbar",search:"search",searchbox:"search",slider:"adjustable",spinbutton:"spinbutton",switch:"switch",tab:"tab",tablist:"tablist",timer:"timer",toolbar:"toolbar"};function dr(t){return t==="role"||t==="aria-label"||t==="aria-valuetext"||t in Ot}function fr(t,e){if(e===void 0||e===null)return;let n=String(e).trim().toLowerCase();if(n==="mixed")return t==="aria-checked"?"mixed":!0;if(n==="undefined")return;return n===""||n==="true"}function pr(t){if(t===void 0||t===null)return null;for(let e of String(t).trim().toLowerCase().split(/\s+/))if(Ct[e])return Ct[e];return null}function gr(t,e,n){if(t==="aria-label")return{accessibilityLabel:e===void 0||e===null||e===""?null:String(e)};if(t==="aria-valuetext")return{accessibilityValue:e===void 0||e===null||e===""?null:String(e)};if(t==="role")return{accessibilityRole:pr(e)};let r=Ot[t];if(!r)return;let i=n.accessibilityState,a=i&&typeof i==="object"?{...i}:{},u=fr(t,e);if(u===void 0)delete a[r];else a[r]=u;return{accessibilityState:Object.keys(a).length?a:null}}function hr(t){let e=t.accessibilityState&&typeof t.accessibilityState==="object"?t.accessibilityState:void 0,n={};for(let[i,a]of Object.entries(t)){if(!dr(i))continue;let u=gr(i,a,n);if(u)Object.assign(n,u)}for(let i of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(t[i]===void 0&&n[i]!==void 0&&n[i]!==null)t[i]=n[i];let r=n.accessibilityState;if(r)t.accessibilityState={...r,...e}}var Pe=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function Me(t){let e={...t};return hr(e),Object.fromEntries(Pe.filter((n)=>(n in e)).map((n)=>[n,e[n]]))}var Mt=["keyboardType","secureTextEntry","returnKeyType","autoCapitalize","autoCorrect","editable","autoComplete"],mr=new Set(["type","inputmode","inputMode","enterkeyhint","enterKeyHint","autoCapitalize","autoCorrect","spellcheck","readonly","readOnly","disabled",...Mt]),yr={numeric:"number-pad",decimal:"decimal-pad",tel:"phone-pad",email:"email-address",url:"url",search:"web-search",text:"default"},br={email:{keyboardType:"email-address",verbatim:!0,autoComplete:"email"},tel:{keyboardType:"phone-pad",autoComplete:"tel"},url:{keyboardType:"url",verbatim:!0,autoComplete:"url"},number:{keyboardType:"decimal-pad"},search:{keyboardType:"web-search",returnKeyType:"search"},password:{secure:!0,verbatim:!0}},vr={enter:"default",done:"done",go:"go",next:"next",previous:"default",search:"search",send:"send"};function te(t){return t===void 0||t===null?"":String(t).trim().toLowerCase()}function Pt(t){if(t===void 0||t===null||t===!1)return!1;return te(t)!=="false"}function Be(t,...e){for(let n of e)if(t[n]!==void 0&&t[n]!==null)return t[n];return}function Bt(t,e){if(t!=="TextInput")return{};let n={},r=te(e.type),i=br[r]??{},a=te(Be(e,"inputmode","inputMode")),u=yr[a]??i.keyboardType;if(u&&u!=="default")n.keyboardType=u;if(i.secure)n.secureTextEntry=!0;let c=te(Be(e,"enterkeyhint","enterKeyHint")),d=vr[c]??i.returnKeyType;if(d&&d!=="default")n.returnKeyType=d;let g=te(e.autoCapitalize);if(g==="off"||g==="none")n.autoCapitalize="none";else if(g==="on")n.autoCapitalize="sentences";else if(!g&&i.verbatim)n.autoCapitalize="none";let h=e.autoCorrect;if(h==="off"||h==="false"||te(e.spellcheck)==="false"||h===void 0&&i.verbatim)n.autoCorrect=!1;else if(h==="on"||h==="true")n.autoCorrect=!0;if(Pt(Be(e,"readonly","readOnly"))||Pt(e.disabled))n.editable=!1;if(i.autoComplete)n.autoComplete=i.autoComplete;return Object.fromEntries(Object.entries(n).filter(([m])=>e[m]===void 0||Sr(m,e[m])))}function Sr(t,e){if(t==="autoCapitalize")return e==="off"||e==="on";if(t==="autoCorrect")return typeof e==="string";return!1}function Lt(t){let e=Bt(t.type,t.props);if(!Object.keys(e).length)return;t._textEntrySource=Object.fromEntries(Mt.filter((n)=>(n in t.props)).map((n)=>[n,t.props[n]])),Object.assign(t.props,e)}var Le={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",onchange:"onChange",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll","scroll-begin-drag":"onScrollBeginDrag",scrollbegindrag:"onScrollBeginDrag","scroll-end-drag":"onScrollEndDrag",scrollenddrag:"onScrollEndDrag","momentum-scroll-begin":"onMomentumScrollBegin",momentumscrollbegin:"onMomentumScrollBegin","momentum-scroll-end":"onMomentumScrollEnd",momentumscrollend:"onMomentumScrollEnd",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError",play:"onPlay",playing:"onPlay",pause:"onPause",ended:"onEnd",end:"onEnd",timeupdate:"onProgress",progress:"onProgress",loadedmetadata:"onLoad",enterpictureinpicture:"onPictureInPictureStart",leavepictureinpicture:"onPictureInPictureStop"};var $e={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},je=new Set(Object.values($e));var Vt=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),jt=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function X(t){let e=typeof t==="number"?t:Number.parseFloat(String(t??""));return Number.isFinite(e)?e:0}function J(t){return Math.round(t*1000)/1000}function We(t){if(Array.isArray(t)&&t.length===4&&t.every((n)=>Number.isFinite(Number(n))))return t.map(Number);let e=String(t??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((n)=>!Number.isFinite(n))||e[2]<=0||e[3]<=0)return null;return e}function wr(t){let e=String(t??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var Dt=/[MLHVCSQTAZ]/i,De=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function xr(t){let e=[],n=t,r=Dt.exec(n);while(r){let i=r.index;n=n.slice(i);let a=n[0];n=n.slice(1);let u=Dt.exec(n),c=u?n.slice(0,u.index):n,d;if(a==="A"||a==="a"){d=[];let g=0,h=c.trim(),m=0;while(m<h.length){let x=g%7,w=h.slice(m).replace(/^[\s,]+/,"");if(m=h.length-w.length,!w)break;if(x===3||x===4)d.push(w[0]==="1"?1:0),m+=1;else{De.lastIndex=0;let S=De.exec(w);if(!S||S.index!==0)break;d.push(Number.parseFloat(S[0])),m+=S[0].length}g++}}else d=(c.match(De)||[]).map(Number.parseFloat);e.push({command:a,args:d}),r=u}return e}function Nr(t,e,n,r,i,a,u,c,d){if(t===c&&e===d)return[];let g=Math.abs(n),h=Math.abs(r);if(!g||!h)return[1,c,d];let m=i*Math.PI/180,x=Math.cos(m),w=Math.sin(m),S=(t-c)/2,f=(e-d)/2,l=x*S+w*f,p=-w*S+x*f,b=l*l/(g*g)+p*p/(h*h);if(b>1)g*=Math.sqrt(b),h*=Math.sqrt(b);let N=g*g*h*h-g*g*p*p-h*h*l*l,y=g*g*p*p+h*h*l*l,k=Math.sqrt(Math.max(0,N/y));if(a===u)k=-k;let v=k*(g*p)/h,_=k*-(h*l)/g,O=x*v-w*_+(t+c)/2,R=w*v+x*_+(e+d)/2,A=(W,F,z,H)=>{let Y=W*H-F*z<0?-1:1,q=(W*z+F*H)/(Math.hypot(W,F)*Math.hypot(z,H));return Y*Math.acos(Math.min(1,Math.max(-1,q)))},T=A(1,0,(l-v)/g,(p-_)/h),I=A((l-v)/g,(p-_)/h,(-l-v)/g,(-p-_)/h);if(!u&&I>0)I-=2*Math.PI;if(u&&I<0)I+=2*Math.PI;let M=Math.max(1,Math.ceil(Math.abs(I)/(Math.PI/2))),E=I/M,B=1.3333333333333333*Math.tan(E/4),D=[],P=(W)=>{let F=g*Math.cos(W),z=h*Math.sin(W);return[x*F-w*z+O,w*F+x*z+R]},C=(W)=>{let F=-g*Math.sin(W),z=h*Math.cos(W);return[x*F-w*z,w*F+x*z]},V=T;for(let W=0;W<M;W++){let F=V+E,[z,H]=P(V),[Y,q]=C(V),[tt,nt]=P(F),[gn,hn]=C(F);D.push(2,z+B*Y,H+B*q,tt-B*gn,nt-B*hn,W===M-1?c:tt,W===M-1?d:nt),V=F}return D}function Wt(t){let e=[],n=0,r=0,i=0,a=0,u=0,c=0,d=0,g=0,h="";for(let{command:m,args:x}of xr(String(t??""))){let w=m===m.toLowerCase(),S=m.toUpperCase(),f=()=>w?n:0,l=()=>w?r:0,p=0,b=(y)=>{if(p+y>x.length)return null;let k=x.slice(p,p+y);return p+=y,k};if(S==="Z"){e.push(4),n=i,r=a,h="Z";continue}let N=!0;while(p<x.length||N&&S==="Z"){switch(S){case"M":{let y=b(2);if(!y)return e;if(n=y[0]+f(),r=y[1]+l(),N)e.push(0,n,r),i=n,a=r;else e.push(1,n,r);h=N?"M":"L";break}case"L":{let y=b(2);if(!y)return e;n=y[0]+f(),r=y[1]+l(),e.push(1,n,r),h="L";break}case"H":{let y=b(1);if(!y)return e;n=y[0]+f(),e.push(1,n,r),h="L";break}case"V":{let y=b(1);if(!y)return e;r=y[0]+l(),e.push(1,n,r),h="L";break}case"C":{let y=b(6);if(!y)return e;let k=y[0]+f(),v=y[1]+l();u=y[2]+f(),c=y[3]+l(),n=y[4]+f(),r=y[5]+l(),e.push(2,k,v,u,c,n,r),h="C";break}case"S":{let y=b(4);if(!y)return e;let k=h==="C"?2*n-u:n,v=h==="C"?2*r-c:r;u=y[0]+f(),c=y[1]+l(),n=y[2]+f(),r=y[3]+l(),e.push(2,k,v,u,c,n,r),h="C";break}case"Q":{let y=b(4);if(!y)return e;d=y[0]+f(),g=y[1]+l(),n=y[2]+f(),r=y[3]+l(),e.push(3,d,g,n,r),h="Q";break}case"T":{let y=b(2);if(!y)return e;d=h==="Q"?2*n-d:n,g=h==="Q"?2*r-g:r,n=y[0]+f(),r=y[1]+l(),e.push(3,d,g,n,r),h="Q";break}case"A":{let y=b(7);if(!y)return e;let k=y[5]+f(),v=y[6]+l();e.push(...Nr(n,r,y[0],y[1],y[2],y[3],y[4],k,v)),n=k,r=v,h="A";break}default:return e}N=!1}}return e.map((m)=>J(m))}function $t(t,e,n,r){if(n<=0||r<=0)return[];let i=0.5522847498;return[0,t+n,e,2,t+n,e+i*r,t+i*n,e+r,t,e+r,2,t-i*n,e+r,t-n,e+i*r,t-n,e,2,t-n,e-i*r,t-i*n,e-r,t,e-r,2,t+i*n,e-r,t+n,e-i*r,t+n,e,4].map(J)}function Fe(t,e){switch(t){case"Path":return Wt(String(e.d??""));case"Line":return[0,X(e.x1),X(e.y1),1,X(e.x2),X(e.y2)].map(J);case"Rect":{let n=X(e.x),r=X(e.y),i=X(e.width),a=X(e.height);if(i<=0||a<=0)return[];let u=e.rx===void 0?X(e.ry):X(e.rx),c=e.ry===void 0?u:X(e.ry);if(u=Math.min(Math.max(0,u),i/2),c=Math.min(Math.max(0,c),a/2),!u||!c)return[0,n,r,1,n+i,r,1,n+i,r+a,1,n,r+a,4].map(J);let d=0.5522847498;return[0,n+u,r,1,n+i-u,r,2,n+i-u+d*u,r,n+i,r+c-d*c,n+i,r+c,1,n+i,r+a-c,2,n+i,r+a-c+d*c,n+i-u+d*u,r+a,n+i-u,r+a,1,n+u,r+a,2,n+u-d*u,r+a,n,r+a-c+d*c,n,r+a-c,1,n,r+c,2,n,r+c-d*c,n+u-d*u,r,n+u,r,4].map(J)}case"Circle":return $t(X(e.cx),X(e.cy),X(e.r),X(e.r));case"Ellipse":return $t(X(e.cx),X(e.cy),X(e.rx),X(e.ry));case"Polyline":case"Polygon":{let n=wr(e.points);if(n.length<4)return[];let r=[0,n[0],n[1]];for(let i=2;i<n.length;i+=2)r.push(1,n[i],n[i+1]);if(t==="Polygon")r.push(4);return r.map(J)}default:return null}}function kr(t){let e=/^\s*(\d+(?:\.\d+)?|\.\d+)\s*(ms|s)?\s*$/.exec(String(t??""));if(!e)return null;let n=Number(e[1])/(e[2]==="ms"?1000:1);return n>0?n:null}function Tr(t){if(t.attributeName!=="d")return null;let e=kr(t.dur),n=String(t.values??"").split(";").map((c)=>c.trim()).filter(Boolean);if(e===null||n.length<2)return null;let r=n.map(Wt);if(r.some((c)=>!c.length))return null;let i=String(t.keyTimes??"").split(";").map((c)=>c.trim()).filter(Boolean).map(Number),u=i.length===r.length&&i[0]===0&&i[i.length-1]===1&&i.every((c,d)=>Number.isFinite(c)&&(d===0||c>=i[d-1]))?i.map(J):r.map((c,d)=>J(d/(r.length-1)));return{frames:r,frameTimes:u,duration:e}}function ze(t){let e=Tr(t),n={frames:e?.frames??null,frameTimes:e?.frameTimes??null,duration:e?.duration??null};for(let[r,i]of Object.entries(n))if(i===null)delete t[r];else t[r]=i;return n}var Rr=[...jt,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","contentContainerStyle","currentTime","defaultSource","defaultValue","ellipsizeMode","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","ios_backgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","listRole","maxLength","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","nonModal","dismissOnOutsideTap","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","initialRegion","tileOverlay","edgePadding","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","mapType","fillColor","strokeColor","pinColor","showsCompass","showsScale","cameraPitch","cameraHeading","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],Ft=new Set(["alwaysBounceHorizontal","alwaysBounceVertical","animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","nonModal","dismissOnOutsideTap","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","showsCompass","showsScale","pictureInPicture"]),_r=new Map(Rr.map((t)=>[zt(t),t]));function zt(t){return t.replace(/[-_]/g,"").toLowerCase()}function Xe(t,e){if((e==="Image"||e==="Video")&&t.toLowerCase()==="src")return"source";return _r.get(zt(t))??t}var Ar={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",map:"Map",mappolyline:"MapPolyline",mappolygon:"MapPolygon",mapmarker:"MapMarker",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",checkbox:"Checkbox",slider:"Slider",picker:"Picker",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function Xt(t){return Ar[t.toLowerCase()]||t}var Er={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",apple:"leaf",archive:"archivebox",armchair:"sofa","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette",backpack:"backpack","badge-check":"checkmark.seal","badge-x":"xmark.seal",ban:"nosign","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100","battery-charging":"battery.100.bolt",bean:"leaf",bed:"bed.double",beef:"fork.knife",bell:"bell","bell-off":"bell.slash","bell-ring":"bell.and.waves.left.and.right",bike:"figure.outdoor.cycle",blocks:"square.grid.2x2",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",box:"shippingbox",brain:"brain",building:"building","building-2":"building.2",cable:"cable.connector","cake-slice":"birthday.cake",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-minus":"calendar.badge.minus","calendar-minus-2":"calendar.badge.minus","calendar-off":"calendar.badge.exclamationmark","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath","calendar-x":"calendar.badge.exclamationmark","calendar-x-2":"calendar.badge.exclamationmark",camera:"camera",carrot:"carrot","chart-bar":"chart.bar","chart-column":"chart.bar","chart-line":"chart.xyaxis.line","chart-no-axes-gantt":"chart.bar.doc.horizontal",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-arrow-out-up-left":"arrow.uturn.backward.circle","circle-minus":"minus.circle","circle-arrow-down":"arrow.down.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-dot":"smallcircle.filled.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock","clock-12":"clock","clock-2":"clock","clock-3":"clock","clock-4":"clock","clock-8":"clock","clock-alert":"clock.badge.exclamationmark",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",cookie:"birthday.cake",copy:"doc.on.doc","credit-card":"creditcard","cup-soda":"takeoutbag.and.cup.and.straw",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",drumstick:"fork.knife",dumbbell:"dumbbell",edit:"pencil",egg:"frying.pan","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",fish:"fish",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift","glass-water":"waterbottle",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal",hamburger:"takeoutbag.and.cup.and.straw","hand-fist":"hand.raised",heart:"heart","heart-off":"heart.slash","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house","id-card":"person.text.rectangle",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-dashboard":"rectangle.3.group","layout-grid":"square.grid.2x2",leaf:"leaf",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",megaphone:"megaphone",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble","messages-square":"bubble.left.and.bubble.right",mic:"mic",milk:"waterbottle",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",nut:"leaf",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","rectangle-horizontal":"rectangle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",salad:"leaf",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass","scan-line":"barcode.viewfinder",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart",shuffle:"shuffle","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",soup:"mug",sparkles:"sparkles",sprout:"leaf",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront","stretch-horizontal":"rectangle.split.1x2",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis","triangle-alert":"exclamationmark.triangle",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-check":"person.crop.circle.badge.checkmark","user-minus":"person.badge.minus","user-plus":"person.badge.plus","user-round":"person","user-round-check":"person.crop.circle.badge.checkmark","user-round-minus":"person.crop.circle.badge.minus","user-round-plus":"person.crop.circle.badge.plus","user-round-x":"person.crop.circle.badge.xmark","user-x":"person.crop.circle.badge.xmark",users:"person.2","users-round":"person.2",utensils:"fork.knife",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wheat:"laurel.leading",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",wine:"wineglass",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function re(t,e=!1){let n=String(t??"").trim();if(!n)return{symbol:"circle",known:!1};if(e)return{symbol:n,known:!0};let r=/^i-([a-z0-9]+)-(.+)$/.exec(n)??/^([a-z0-9]+):(.+)$/.exec(n),i=r?r[1]:"lucide",a=r?r[2]:n;if(i==="lucide"){let u=Er[a];if(u)return{symbol:u,iconify:`i-lucide-${a}`,known:!0};if(!r&&n.includes("."))return{symbol:n,known:!0}}return{symbol:"circle",iconify:r?n:`i-lucide-${a}`,known:!1}}function He(t){return t.split(/\s+/).find((e)=>/^i-[a-z0-9]+-[a-z0-9-]+$/.test(e))}import{generate as de,parse as Ir}from"@stacksjs/ts-css/parse";var Cr=/^(?::hover|:active|:visited|:focus|:focus-visible|:focus-within)$/;function Or(t){let e=t.replace(/\s+/g,"").toLowerCase();if(!e||e==="all"||e==="screen")return{};if(/^(?:screenand)?\(prefers-color-scheme:dark\)$/.test(e))return{dark:!0};if(/^(?:screenand)?\(prefers-color-scheme:light\)$/.test(e))return{};if(/prefers-reduced-motion|\(hover|\(pointer|print|forced-colors|prefers-contrast/.test(e))return"skip";let n=e.replace(/^screenand/,"").split("and"),r={};for(let i of n){let a=/^\((min|max)-width:([\d.]+)(px|rem|em)\)$/.exec(i);if(!a)return;r[a[1]]=Number(a[2])*(a[3]==="px"?1:16)}return r}async function Ut(t,e){let n={},r=new Set,i=(g)=>{if(r.has(g))return;r.add(g),e(g,[...g.matchAll(/\.(-?[a-z_][\w-]*)/gi)].map((h)=>h[1]))},a=(g,h,m)=>{if(!h.trim())return;let x=n[g]??={},w=m.dark?"dark":"light";if(m.min===void 0&&m.max===void 0){x[w]=x[w]?`${x[w]};${h}`:h;return}let S=x.responsive??=[],f=m.min??0,l=S.find((p)=>p.min===f&&p.max===m.max);if(!l)S.push(l={min:f,...m.max===void 0?{}:{max:m.max}});l[w]=l[w]?`${l[w]};${h}`:h};function u(g,h){for(let m of g){if(m.type==="Atrule"){let S=m.name.toLowerCase();if(["font-face","keyframes","-webkit-keyframes","import","charset","property","page","layer"].includes(S)){if(S==="layer"&&m.block)u(m.block.children,h);continue}if(S!=="media"||!m.block){i(`@${S}`);continue}let f=m.prelude?de(m.prelude):"",l=Or(f);if(l==="skip")continue;if(!l){i(`@media ${f}`);continue}u(m.block.children,{dark:h.dark||l.dark,min:l.min??h.min,max:l.max??h.max});continue}if(m.type!=="Rule"||m.block.type!=="Block")continue;let x=[...m.block.children].filter((S)=>S.type==="Declaration").map((S)=>de(S)).join(";"),w=m.prelude.type==="SelectorList"?[...m.prelude.children].map(de):[de(m.prelude)];for(let S of w){let f=/^(?:(?:html|:root)?\.dark\s+)?((?:\.-?[a-z_][\w-]*)+)((?::{1,2}[a-z-]+)*)$/i.exec(S.trim());if(!f){if(!/^(?:html|:root|body|\*|::?[a-z-]+)/i.test(S.trim()))i(S.trim());continue}let l=f[2];if(l){if(!Cr.test(l))i(S.trim());continue}let p=h.dark||/^(?:(?:html|:root)?\.dark\s+)/i.test(S.trim());a(f[1].slice(1),x,{dark:p,min:h.min,max:h.max})}}}let c="",d=!0;await new HTMLRewriter().on("style",{element(g){c="";let h=g.getAttribute("type");d=!h||h.toLowerCase()==="text/css",g.onEndTag(()=>{if(!d)return;try{let m=Ir(c);if(m.type==="StyleSheet")u(m.children,{})}catch{i("invalid stylesheet")}})},text(g){c+=g.text}}).transform(new Response(t)).text();for(let g of Object.values(n))g.responsive?.sort((h,m)=>h.min-m.min||(h.max??1/0)-(m.max??1/0));return n}import{generate as ie,parse as Ht}from"@stacksjs/ts-css/parse";async function qt(t,e){let n={light:new Map,dark:new Map},r=new Set,i=(m)=>{if(!r.has(m))r.add(m),e(m)},a=(m,x,w)=>{for(let S of w){let f=n[S].get(m);if(!f||Number(x.important)>Number(f.important)||x.important===f.important&&x.specificity>=f.specificity)n[S].set(m,x)}},u=(m)=>{if(m.type==="Declaration")return m.property.startsWith("--");if(m.type==="Rule"||m.type==="Atrule")return!!m.block&&[...m.block.children].some(u);return!1},c=(m)=>{let x=m.replace(/\s+/g,"").toLowerCase();if(!x||x==="all"||x==="screen")return["light","dark"];let w=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(x);return w?[w[1]]:void 0};function d(m,x){for(let w of m){if(!u(w))continue;if(w.type==="Atrule"){let f=w.prelude?ie(w.prelude):"",l=w.name.toLowerCase()==="media"?c(f):void 0;if(!l){i(`@${w.name} ${f}`.trim());continue}d(w.block.children,x.filter((p)=>l.includes(p)));continue}if(w.type!=="Rule")continue;let S=w.prelude.type==="SelectorList"?[...w.prelude.children].map(ie):[ie(w.prelude)];for(let f of S){let l=/^(html|:root)?(?:\.(dark|light))?$/.exec(f.trim());if(!l||!l[1]&&!l[2]){i(f);continue}let p=(l[1]===":root"?10:l[1]?1:0)+(l[2]?10:0);for(let b of w.block.children){if(b.type!=="Declaration"){if(u(b))i(`nested rule in ${f}`);continue}if(!b.property.startsWith("--"))continue;let N={value:ie(b.value),important:!!b.important,specificity:p};a(b.property,N,x.filter((y)=>!l[2]||l[2]===y))}}}}let g="",h;return await new HTMLRewriter().on("html",{element(m){let x=m.getAttribute("style");if(!x)return;try{let w=Ht(x,{context:"declarationList"});if(w.type!=="DeclarationList")return;for(let S of w.children)if(S.type==="Declaration"&&S.property.startsWith("--"))a(S.property,{value:ie(S.value),important:!!S.important,specificity:1000},["light","dark"])}catch{i("invalid document inline theme")}}}).on("style",{element(m){g="";let x=m.getAttribute("type");h=!x||x.toLowerCase()==="text/css"?c(m.getAttribute("media")??""):void 0,m.onEndTag(()=>{try{let w=Ht(g);if(w.type!=="StyleSheet")return;if(!h){if([...w.children].some(u))i("style type/media");return}d(w.children,h)}catch{i("invalid stylesheet")}})},text(m){g+=m.text}}).transform(new Response(t)).text(),{light:[...n.light].map(([m,x])=>[m,x.value]),dark:[...n.dark].map(([m,x])=>[m,x.value])}}function G(t,e={},n={},r={},i=[]){return{type:t,props:e,style:n,events:r,children:i}}function Gt(t,e,n={}){return{version:"1.0.0",root:t,script:e,meta:{source:n.source||"unknown",compiledAt:n.compiledAt||Date.now(),headwindConfig:n.headwindConfig}}}var Pr=/^(?:key(?:down|up|press)|mouse[a-z]+|pointer[a-z]+|dbl(?:click)?|contextmenu|wheel|drag[a-z]*|drop|copy|cut|paste|beforeinput|compositionstart|compositionupdate|compositionend|animation[a-z]+|transition[a-z]+|resize|hashchange|popstate|beforeunload|unload|visibilitychange|selectionchange|selectstart|auxclick)$/,Kt=new Set(["script","style","head","meta","link","title","base","noscript"]),Jt=new Set(["template","body","html","main","fragment"]),pe=new Set,Mr=new Set(["onBlur","onChange","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),qe=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","Link","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapPolygon","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...je]),Br=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),Yt=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Lr={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function Z(t){return t.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,n)=>{let r=Lr[n.toLowerCase()];if(r!==void 0)return r;if(n[0]==="#"){let i=n[1]==="x"||n[1]==="X"?Number.parseInt(n.slice(2),16):Number.parseInt(n.slice(1),10);return Number.isFinite(i)?String.fromCodePoint(i):e}return e})}function en(t){if(!t.includes("{{"))return null;let e=[],n=0;for(let r of t.matchAll(/\{\{([\s\S]+?)\}\}/g)){if(r.index>n)e.push(JSON.stringify(t.slice(n,r.index)));e.push(`(${r[1].trim()})`),n=r.index+r[0].length}if(!e.some((r)=>r.startsWith("(")))return null;if(n<t.length)e.push(JSON.stringify(t.slice(n)));if(e.length===1)return e[0].slice(1,-1);return`[${e.join(", ")}].map(__stxPart => __stxPart == null ? '' : __stxPart).join('')`}function Zt(t,e,n,r={}){let i=r.inheritedVariables,a={},u={},c={},d=[],g="",h={};for(let[S,f]of e){let l=S.toLowerCase();if(l==="class"||l==="classname"){g=g?`${g} ${f}`:f;continue}if(l==="style"){h={...h,...Dr(t,f,n,{...r,onVariables(y){i=y,r.onVariables?.(y)}})};continue}if(l.startsWith(":")||l.startsWith("x-")&&l!=="x-cloak"){c[l.startsWith(":")?l.slice(1):l.slice(2)]=Z(f);continue}if(l==="x-cloak")continue;if(l.startsWith("@")||l.startsWith("v-on:")){let y=l.startsWith("@")?l.slice(1):l.slice(5),[k]=y.split("."),v=Le[k]??(k.startsWith("on")?k:"");if(!v||!Mr.has(v)){if(Pr.test(k)||/\./.test(y))n.push({kind:"unread-event",tag:t,name:S});continue}u[v]=Z(f);continue}if(l==="key"){a.key=f;continue}let p=Z(f),b=en(p);if(b){c[l]=b,d.push(l);continue}let N=Xe(S);if(p===""&&Ft.has(N)){a[N]=!0;continue}try{a[N]=JSON.parse(p)}catch{a[N]=p}}let m=a["data-native"]?a["data-native"]==="TextInput":t==="textarea"||t==="input"&&!["checkbox","radio","hidden"].includes(String(a.type??"text").toLowerCase()),x=g?ue(g,i,{focus:m,focusWithin:!0,rules:r.rules}):void 0;for(let S of new Set(x?.unknown??[]))n.push({kind:"unknown-class",tag:t,name:S});let w=Ee({...x?.style,...h});return{props:a,style:w,events:u,bindings:c,classes:g,inline:h,templated:d}}function Dr(t,e,n,r){return ae(Z(e),(i)=>n.push({...i,tag:t}),r)}function Ge(t){return t.children.map((e)=>typeof e==="string"?e:Ge(e)).join("").replace(/\s+/g," ").trim()}function $r(t,e){let n=t.node,r=n.children.filter((a)=>typeof a!=="string"),i=n.children.filter((a)=>typeof a==="string").join("").trim();if(t.tag==="button"&&n.type==="Button"&&!t.declaredNative&&r.length>0)return n.type="Pressable",n.props.role??="button",n.children=n.children.flatMap((a)=>typeof a==="string"?a.trim()?[G("Text",{},{},{},[a.trim()])]:[]:[a]),n;if(n.type==="Button"&&r.length===0)return n.children=i?[i]:[],n;if(n.type==="Svg"||n.type==="G")return n.children=r,n;if(n.type==="SvgText"){let a=Ge(n);return n.children=a?[a]:[],n}if(Yt.has(n.type)&&r.length===0&&i)return n.type="Text",n.children=[i],n;if(n.type==="Text"&&!i&&r.length===0&&typeof n.props.text==="string")return n.children=n.props.text?[n.props.text]:[],delete n.props.text,n;if(n.type==="Text"&&r.length>0){if(/(?:^|\s)(?:inline-)?(?:flex|grid)(?:\s|$)/.test(n._classes??"")||r.some((c)=>c.type!=="Text"))return n.type="View",n.children=n.children.map((c)=>typeof c==="string"?G("Text",{},{},{},[c]):c),n;let u=Ge(n);return e.push({kind:"flattened-text",tag:t.tag}),n.children=u?[u]:[],n}if(Yt.has(n.type)&&r.length>0)n.children=r;return n}async function jr(t,e={}){let n=[],r=await qt(t,(l)=>n.push({kind:"unsupported-theme-rule",tag:"style",name:l})),i=ne(r.light).computed(),a=new Set([...t.matchAll(/\sclass(?:name)?\s*=\s*"([^"]*)"/gi)].flatMap((l)=>l[1].split(/\s+/))),u=await Ut(t,(l,p)=>{if(!p.length||p.some((b)=>a.has(b)))n.push({kind:"unsupported-style-rule",tag:"style",name:l})}),c=[],d=[],g=new Set;function h(l){let p=d[d.length-1];if(!p)c.push(l);else if(!p.dropped)p.node.children.push(l)}function m(l){let p=(N)=>{if(l.tag!=="html"&&l.node._styleSource)N._styleAncestors=[l.node._styleSource,...N._styleAncestors??[]]};if(l.node.bindings&&Object.keys(l.node.bindings).length>0){let N=l.node.children,y=N.filter((v)=>typeof v!=="string"),k=y.length===1&&y.length===N.length?y[0]:G("View",{},{},{},N);if(k.bindings={...l.node.bindings,...k.bindings},k.bindingId===void 0&&l.node.bindingId!==void 0)k.bindingId=l.node.bindingId;p(k),h(k);return}let b=d[d.length-1];for(let N of l.node.children){if(typeof N==="string"){if(b&&!b.dropped)b.node.children.push(N);continue}if(p(N),!b)c.push(N);else if(!b.dropped)b.node.children.push(N)}}function x(l,p){let b=d[d.length-1];if(l==="svg"||b?.svg)return w(l,p,b);let N=Kt.has(l)&&!pe.has(l),y=d[d.length-1]?.dropped??!1,k=b?.variables??i,{props:v,style:_,events:O,bindings:R,classes:A,inline:T,templated:I}=N||y?{props:{},style:{},events:{},bindings:{},classes:"",inline:{},templated:[]}:Zt(l,p,n,{inheritedVariables:k,onVariables:(P)=>{k=P},rules:u});if(l==="html")k=i;let M=v["data-native"],E;if(typeof M==="string"&&qe.has(M))E=M,delete v["data-native"];else{if(E=pe.has(l)?"View":Xt(l),(l==="i"||l==="span")&&/(?:^|\s)i-[a-z0-9]+-[a-z0-9-]+(?:\s|$)/.test(A))E="Icon";if(l==="input"){let P=String(v.type??"text").toLowerCase();if(P==="checkbox")E="Checkbox",v.formValue=v.value??"on",v.checked=v.checked===""||v.checked===!0||v.checked==="true",v.value=v.checked;else if(P==="hidden")E="View",_.display="none",T.display="none";else if(P==="radio")E="View",v.accessibilityRole="radio",n.push({kind:"unsupported-control",tag:l,name:"input:radio"})}}if(!y&&E===l&&!qe.has(E)&&!Kt.has(l)&&!Jt.has(l)&&!g.has(l))g.add(l),n.push({kind:"unmapped-tag",tag:l});if((N||pe.has(l))&&!g.has(`drop:${l}`))g.add(`drop:${l}`),n.push({kind:"dropped-subtree",tag:l});if(E==="View"&&/(?:^|\s)overflow-x-(?:auto|scroll)(?:\s|$)/.test(A))E="ScrollView",v.horizontal=!0,v.showsHorizontalScrollIndicator??=!1;else if(E==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(A))E="ScrollView";if(l==="form")v["data-stx-form"]=!0;if(l==="button"&&v.type===void 0)v.type="submit";if((E==="Video"||E==="Image")&&v.source===void 0&&v.src!==void 0)v.source=v.src,delete v.src;if(E==="Icon"){let P=ue(A).icon,C=re(String(v.symbol||v.name||P||""),Boolean(v.symbol));if(v.symbol=C.symbol,C.iconify)v.iconify=C.iconify}if(E==="FlatList"||E==="SectionList"){let P=new Set([...Object.keys(v),...Object.keys(R)].map((C)=>C.toLowerCase()));for(let[C,V]of Br)if(P.has(C))n.push({kind:"unsupported-list-prop",tag:E,name:V})}let B=G(E,v,_,O);B._inlineStyle=T,B._styleSource=Z(p.find(([P])=>P==="style")?.[1]??"");let D=v["data-stx-b"];if(typeof D==="number"&&Number.isInteger(D))B.bindingId=D;if(delete v["data-stx-b"],A)B._classes=A;if(Object.keys(R).length>0)B.bindings=R;if(I.length>0)B._templated=I;if(typeof v.key==="string")B.key=v.key,delete v.key;return{tag:l,node:B,variables:k,declaredNative:typeof M==="string"&&qe.has(M),dropped:N||y||pe.has(l)||E==="Video",discard:N||y,unwrap:Jt.has(l)}}function w(l,p,b){let N=b?.dropped??!1,y=$e[l];if(N||!y){if(!N&&!g.has(`drop:${l}`))g.add(`drop:${l}`),n.push({kind:Vt.has(l)?"dropped-subtree":"unmapped-tag",tag:l});return{tag:l,node:G("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let k=b?.variables??i,{props:v,style:_,events:O,bindings:R,classes:A,inline:T,templated:I}=Zt(l,p,n,{inheritedVariables:k,onVariables:(D)=>{k=D},rules:u});if(y==="Svg"){let D=We(v.viewBox);if(D)v.viewBox=D;else delete v.viewBox;for(let P of["width","height"]){if(typeof v[P]==="number"&&_[P]===void 0)_[P]=v[P];delete v[P]}}if(typeof v.strokeDasharray==="string"||typeof v.strokeDasharray==="number"){let D=String(v.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);v.strokeDasharray=D}let M=Fe(y,v);if(M)v.geometry=M;if(y==="Animate")ze(v);let E=G(y,v,_,O);E._inlineStyle=T,E._styleSource=Z(p.find(([D])=>D==="style")?.[1]??"");let B=v["data-stx-b"];if(typeof B==="number"&&Number.isInteger(B))E.bindingId=B;if(delete v["data-stx-b"],A)E._classes=A;if(Object.keys(R).length>0)E.bindings=R;if(I.length>0)E._templated=I;if(typeof v.key==="string")E.key=v.key,delete v.key;return{tag:l,node:E,variables:k,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(l){let p=l.tagName.toLowerCase(),b=x(p,[...l.attributes]),N=!0;try{l.onEndTag(()=>{if(d.pop(),b.discard)return;if(b.unwrap)m(b);else h($r(b,n))})}catch{N=!1}if(N)d.push(b);else if(!b.discard)h(b.node)},text(l){let p=d[d.length-1];if(!p||p.dropped)return;let b=Z(l.text).replace(/\s+/g," ");if(!b.trim())return;p.node.children.push(b)}}).transform(new Response(t)).text(),c.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);let S=c.length===1?c[0]:G("View",{},{},{},c);if(r.light.length||r.dark.length)S._stylesheetTheme=r;if(Object.keys(u).length)S._stylesheetRules=u;let f=(l)=>{Wr(l);let p=Me(l.props);if(Object.keys(p).length)l._accessibilitySource=Object.fromEntries(Pe.filter((b)=>(b in l.props)).map((b)=>[b,l.props[b]])),Object.assign(l.props,p);Lt(l);for(let b of l.children)if(typeof b!=="string")f(b)};return f(S),{root:S,diagnostics:n}}function Wr(t){if(t.bindings?.text||t.children.length===0||!t.children.every((n)=>typeof n==="string"))return;let e=en(t.children.join(""));if(!e)return;if(t.type!=="Button")t.bindings={...t.bindings,text:e},t._templated=[...t._templated??[],"text"],t.children=[];else{t.type="Pressable",t.props.role??="button";let n=G("Text",{},{},{},[]);n.bindings={text:e},n._templated=["text"],t.children=[n]}}async function tn(t,e={}){let{root:n,diagnostics:r}=await jr(t,e),i=e.script??{exports:{},functions:[],code:""};return{document:Gt(n,i,{source:e.source??"unknown"}),diagnostics:r}}var nn=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Fr=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,zr=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,rn=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function Ke(t){let e=[];nn.lastIndex=0;for(let a of t.matchAll(nn)){let u=a[1]??"";if(/\bserver\b/.test(u))continue;e.push(a[2].trim())}let n=e.filter(Boolean).join(`
|
|
4
|
+
|
|
5
|
+
`),r=[];for(let a of[Fr,zr]){a.lastIndex=0;for(let u of n.matchAll(a))if(!r.includes(u[1]))r.push(u[1])}let i={};rn.lastIndex=0;for(let a of n.matchAll(rn)){let u=a[2];try{i[a[1]]=JSON.parse(u.replace(/^'(.*)'$/,'"$1"'))}catch{i[a[1]]=u}}return{exports:i,functions:r,code:n}}var ge="[data-native-chrome]";function Xr(t){let e=(t??"").trim().toLowerCase();return e==="tabs"||e==="bar"?e:""}function sn(t){let e=re(t);return e.known||/^i-|:/.test(t)?e.symbol:t}function Ur(t){let e=(t??"").trim();if(!e.startsWith("/")||e.startsWith("//"))return null;return e}function on(t){return t.replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�?39;/g,"'").replace(/\s+/g," ").trim()}async function an(t){if(!/\bdata-native-chrome\b/i.test(t))return{html:t,chrome:null};let e=[],n=[],r=null,i=!1;if(await new HTMLRewriter().on(ge,{element(c){i=!0,e.push(Xr(c.getAttribute("data-native-chrome"))),c.onEndTag(()=>{e.pop()})}}).on(`${ge} a`,{element(c){let d=Ur(c.getAttribute("href")),g=e[e.length-1]??"";if(!d||!g)return;let h=c.getAttribute("data-native-icon")||He(c.getAttribute("class")??""),m={path:d,title:"",region:g,label:c.getAttribute("aria-label")||c.getAttribute("title")||"",...h?{symbol:sn(h)}:{}};r=m,c.onEndTag(()=>{if(m.title=on(m.title)||on(m.label),n.push(m),r===m)r=null})},text(c){if(r)r.title+=c.text}}).on(`${ge} a *`,{element(c){if(!r||r.symbol)return;let d=c.getAttribute("data-native-icon")||He(c.getAttribute("class")??"");if(d)r.symbol=sn(d)}}).transform(new Response(t)).text(),!i)return{html:t,chrome:null};let a=await new HTMLRewriter().on(ge,{element(c){c.remove()}}).transform(new Response(t)).text(),u=(c)=>n.filter((d)=>d.region===c).map(({path:d,title:g,symbol:h})=>({path:d,title:g,...h?{symbol:h}:{}}));return{html:a,chrome:{tabs:u("tabs"),bar:u("bar")}}}var he=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,cn=/function\s+(__stx_setup_[\w$]+)\s*\(/,Hr=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function Je(t){he.lastIndex=0;for(let e of t.matchAll(he)){let n=e[2].trim(),r=cn.exec(n)?.[1];if(r)return{name:r,code:n}}return null}function ln(t){let e=[];he.lastIndex=0;for(let n of t.matchAll(he)){let r=n[1],i=n[2].trim(),a=Hr.exec(r)?.[1],u=/\bdata-stx-component-factories\b/i.test(r);if(!i||!a&&!u&&!cn.test(i))continue;e.push(a?{code:i,owner:a}:{code:i})}return e}function Gr(){let t=[K.join(import.meta.dir,"..","primitives"),K.join(import.meta.dir,"native","primitives")];for(let e of t)if(qr(K.join(e,"View.stx")))return e;return t[0]}async function Kr(t,e,n={}){let r=n.root??K.dirname(e),i=await o(r),a=typeof i.root==="string"&&i.root?K.resolve(r,i.root):r,u=(R,A)=>R?K.isAbsolute(R)?R:K.resolve(a,R):K.join(a,A),c={root:r,layoutsDir:u(i.layoutsDir,"layouts"),partialsDir:u(i.partialsDir,"partials"),storesDir:u(i.storesDir,"stores"),componentsDir:n.componentsDir??(i.componentsDir?u(i.componentsDir,"components"):K.join(a,"components")),buildMode:"serve",cache:!1,_targetComponentDirs:[Gr()],_targetComponentFallbackNames:["Button","Checkbox","Switch","TextInput"],_nativeHostAttrs:!0,skipEventDirectives:!0,_pluginComponentDirs:i._pluginComponentDirs??[]},d={...n.context??{},__stx_inject_css:!1,__stx_native_screen:!0},g=new Set([e]),h=await s(t,d,e,c,g),{html:m,chrome:x}=await an(h),{html:w,manifest:S}=it(m),f=await It(r),{document:l,diagnostics:p}=await tn(f?`<style>${f}</style>${w}`:w,{source:e,script:Ke(t)});Jr(l.root,S);let b=d.__stx_runtime_head;if(typeof b?.title==="string"&&b.title.trim())l.title=b.title.trim();if(x)l.chrome=x;let N=Je(w),y=ln(w);if(Ke(t).code.trim()){let R=await Vr(t,e,n.context,{forceClientSetup:!0}),A=Je(R.setupCode??"");if(N=A??N,A&&!y.some((T)=>T.code===A.code))y.push({code:A.code})}if(/<script\b[^>]*\bdata-stx-stores\b/i.test(w)){let{getStoreScript:R}=await import("./chunk-721ba72m.js"),A=await R(c.storesDir);if(A){y.unshift({code:A});for(let T of new Bun.Glob("*.ts").scanSync({cwd:c.storesDir,absolute:!0}))g.add(T)}}let{buildModuleRegistryScript:k,registeredModuleIdsIn:v}=await import("./chunk-m2h91ccn.js"),_=[],O=await k(v(...y.map((R)=>R.code)),{collectInputs:_});for(let R of _)g.add(R);if(O)y.unshift({code:O});return{document:l,manifest:S,setup:N,scripts:y,diagnostics:p,html:w,dependencies:[...g]}}function Jr(t,e){let n=new Map(e.entries.map((a)=>[a.id,a])),r=e.entries.reduce((a,u)=>Math.max(a,u.id),-1)+1,i=(a)=>{if(a._templated?.length&&a.bindings){if(a.bindingId===void 0||!n.has(a.bindingId)){let c={id:a.bindingId??r++,bindings:[]};a.bindingId=c.id,n.set(c.id,c),e.entries.push(c)}let u=n.get(a.bindingId);for(let c of a._templated){let d=`:${c}`,g=Se(d);if(g&&!u.bindings.some((h)=>h.name===d))u.bindings.push({name:d,value:a.bindings[c],kind:g})}}for(let u of a.children)if(typeof u!=="string")i(u)};i(t)}async function me(t,e={}){return Kr(await Bun.file(t).text(),t,e)}var Es=Symbol("stx.nativeWebStorage.raw");var se="__app";async function ti(t){try{let{loadCssEngineConfig:e}=await import("./chunk-pm76dy07.js");return ft(await e(t))}catch{return{}}}var ye="__runtime",ni="__messages";function Ye(t){let n=[L.join(import.meta.dir,"..","runtime",`${t}.ts`),L.join(import.meta.dir,"..","runtime",`${t}.js`),L.join(import.meta.dir,"native","runtime",`${t}.js`)].find((r)=>Ze(r));if(!n)throw Error(`Native runtime module ${t} is missing`);return n}async function Qe(t,e,n,r,i){let a={name:"stx-screen-inputs",setup(c){c.onLoad({filter:/.*/,namespace:"file"},({path:d})=>{r.add(d);let g=i?.get(d);return g===void 0?void 0:{contents:g,loader:"js"}})}},u=await Bun.build({entrypoints:[t],target:"browser",format:"iife",minify:n,plugins:[a,...e],define:{"process.env.NODE_ENV":JSON.stringify(n?"production":"development")}});if(!u.success){let c=u.logs.map((d)=>String(d.message??d)).join(`
|
|
6
|
+
`);throw Error(`Could not bundle ${t}:
|
|
7
|
+
${c}`)}return(await u.outputs[0].text()).trim()}var ri=/^[\w-]+(?:\/[\w-]+)*$/,ii=/^[\w-]+$/;async function si(t,e){let n=L.resolve(t,e.dir);if(!e.languages?.length)throw Error("messages.languages must name at least one language");let r=new Map,i=new Map;for(let a of e.languages){if(!ii.test(a))throw Error(`messages: "${a}" is not a language directory name`);let u=L.join(n,a);if(!Ze(u))throw Error(`messages: ${L.relative(t,u)} does not exist`);let c=new Map;for(let d of[...new Bun.Glob("**/*.{ts,js,mjs,json}").scanSync({cwd:u})].sort()){if(/\.(?:test|spec|d)\.[^.]+$/.test(d))continue;let g=d.replace(/\.[^./]+$/,"").split(L.sep).join("/");if(!ri.test(g))throw Error(`messages: ${a}/${d} is not an area name`);if(c.has(g))throw Error(`messages: ${a}/${g} is defined twice`);let h=L.join(u,d),m=await import(h),x=Object.keys(m).filter((f)=>f!=="default");if(x.length)throw Error(`messages: ${a}/${d} exports ${x.join(", ")}; a message module exports its messages as default, and nothing else`);let w=m.default,S=w!==null&&typeof w==="object"&&!Array.isArray(w)?JSON.stringify(w):void 0;if(S===void 0||!Bun.deepEquals(JSON.parse(S),w,!0))throw Error(`messages: ${a}/${d} must export plain data (an object JSON can hold) as default`);c.set(g,S),r.set(h,{language:a,area:g})}i.set(a,c)}return{files:r,data:i}}function oi(t,e){return`export default globalThis.__stxNativeRuntime.messages(${JSON.stringify(t)}, ${JSON.stringify(e)});`}function ai(t){let e=new Map;for(let[n,{language:r,area:i}]of t.files){let a=oi(r,i);e.set(n,a),e.set(ei(n),a)}return e}function ci(t){let e=new Set;for(let n of t.matchAll(/__stxNativeRuntime\.messages\(\s*"[\w-]+"\s*,\s*"([\w/-]+)"\s*\)/g))e.add(n[1]);return[...e].sort()}function li(t,e){let n=L.isAbsolute(t.meta.source)?L.relative(e,t.meta.source).split(L.sep).join("/"):t.meta.source;return{...t,script:{exports:t.script.exports,functions:[],code:""},meta:{...t.meta,source:n,compiledAt:0}}}async function et(t){let e=Object.keys(t.screens);if(e.length===0)throw Error("screens must name at least one .stx file");let n=t.routed??!0,r=t.initialScreen??e[0];if(!t.screens[r])throw Error(`Initial screen ${r} is not in screens`);let i=L.resolve(t.root??process.cwd());if(t.messages&&!t.routesDir)throw Error("messages ship a language at a time beside route files: they need routesDir");if(t.sharedRuntime&&!t.routesDir)throw Error("sharedRuntime is the route files' runtime: it needs routesDir");if(t.messages&&!t.sharedRuntime)throw Error("messages are read by the shared runtime: they need sharedRuntime");if(t.messages&&t.outFile)throw Error("messages leave the languages out of the screens' code, which the one-file bundle cannot read: build it without messages");let a=t.messages?await si(i,t.messages):null,u=t.styleConfig??await ti(i),c=a?ai(a):null,d=[],g=async()=>{for(let T of e){let I=L.resolve(i,t.screens[T]);if(!I.endsWith(".stx"))throw Error(`Screen ${T} must name a .stx file`);d.push({name:T,file:I,compiled:await me(I,{root:i})})}};await dt(u,()=>c?qs(c,g):g());let h=Ye("jsc-globals"),m=Ye("shared-screen"),x=t.app?L.resolve(i,t.app):null;if(x&&!Ze(x))throw Error(`The app script ${t.app} does not exist`);if(x&&!n)throw Error("An app script needs a routed bundle");if(x&&t.screens[se])throw Error(`${se} is the app script's route, not a screen name`);let w=t.browser;if(t.screens[ye])throw Error(`${ye} is the runtime prelude's file, not a screen name`);let S=pt();if(w&&t.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let f=(T,I,M)=>{let E=n?`var routeName = g.__stxNativeRoute || ${JSON.stringify(r)};
|
|
8
|
+
var isApp = ${x?`routeName === ${JSON.stringify(se)}`:"false"};
|
|
9
|
+
if (!isApp && routeNames.indexOf(routeName) === -1) throw new Error(['Unknown native screen:', routeName].join(' '));
|
|
10
|
+
if (isApp ? ${!I} : ${JSON.stringify(T.map(({name:z})=>z))}.indexOf(routeName) === -1) throw new Error(['This bundle does not hold the native screen', routeName].join(' '));`:`var routeName = 'main';
|
|
11
|
+
var isApp = false;`,B=T.map(({name:z,compiled:H},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?z:"main")}) {
|
|
12
|
+
nativeDocument = ${JSON.stringify(li(H.document,i))};
|
|
13
|
+
manifest = ${JSON.stringify(H.manifest)};
|
|
14
|
+
}`).join(`
|
|
15
|
+
`),D=T.map(({name:z,compiled:H},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?z:"main")}) {
|
|
16
|
+
g.__stx_latestSetup = null;
|
|
17
|
+
${H.scripts.map((q)=>q.owner?` g.__stx_componentSetups = g.__stx_componentSetups || {};
|
|
18
|
+
// Kept by id as well as run once: a :for or :if clone of this component
|
|
19
|
+
// has no script to copy, and is set up from this (component hydration).
|
|
20
|
+
g.__stx_componentSetups[${JSON.stringify(q.owner)}] = function() {
|
|
21
|
+
${q.code}
|
|
22
|
+
};
|
|
23
|
+
g.__STX_SETUP_ROOT__ = screen && screen.scopeRoot(${JSON.stringify(q.owner)});
|
|
24
|
+
try { g.__stx_componentSetups[${JSON.stringify(q.owner)}](); }
|
|
25
|
+
finally { g.__STX_SETUP_ROOT__ = null; }`:q.code).join(`
|
|
26
|
+
`)}
|
|
27
|
+
}`).join(`
|
|
28
|
+
`),P=I&&x,C=w?Ye("browser-screen"):null,V=w?Bun.resolveSync(w.platformModule,i):null;return`
|
|
29
|
+
${M?`var runtime = globalThis.__stxNativeRuntime;
|
|
30
|
+
if (!runtime || runtime.version !== ${JSON.stringify(M)}) throw new Error('This screen needs the stx native runtime it was built with: evaluate ${ye}.js from the same build first');
|
|
31
|
+
var installJSCGlobals = runtime.installJSCGlobals;
|
|
32
|
+
var prepareNativeApp = runtime.prepareNativeApp;
|
|
33
|
+
var prepareSharedNativeScreen = runtime.prepareSharedNativeScreen;`:`import { installJSCGlobals } from ${JSON.stringify(h)};
|
|
34
|
+
import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(m)};`}
|
|
35
|
+
${w?`import { createBrowserScreenBridge } from ${JSON.stringify(C)};
|
|
36
|
+
import { createBrowserPlatform } from ${JSON.stringify(V)};`:""}
|
|
37
|
+
${P?`import * as nativeAppModule from ${JSON.stringify(x)};`:"var nativeAppModule = null;"}
|
|
38
|
+
${w?"(async function() {":""}
|
|
39
|
+
var g = globalThis;
|
|
40
|
+
installJSCGlobals(g);
|
|
41
|
+
g.__stxNativeStyleConfig = ${JSON.stringify(u)};
|
|
42
|
+
${w?`var browserPlatform = await createBrowserPlatform(${JSON.stringify(w.platformOptions??{})});
|
|
43
|
+
var browserBridge = createBrowserScreenBridge(browserPlatform, ${JSON.stringify(w)});
|
|
44
|
+
var bridge = browserBridge;
|
|
45
|
+
g.__stxNativeRoute = ${JSON.stringify(r)};`:"var bridge = g.__stxNativeBridge;"}
|
|
46
|
+
if (!bridge) throw new Error('Missing __stxNativeBridge');
|
|
47
|
+
var routeNames = ${JSON.stringify(n?e:["main"])};
|
|
48
|
+
var shareStorage = ${JSON.stringify(t.shareStorage??{})};
|
|
49
|
+
${E}
|
|
50
|
+
g.__stxNativeRoute = routeName;
|
|
51
|
+
var nativeDocument;
|
|
52
|
+
var manifest;
|
|
53
|
+
${B}
|
|
54
|
+
var screen = null;
|
|
55
|
+
var app = null;
|
|
56
|
+
if (isApp) {
|
|
57
|
+
app = prepareNativeApp(bridge, { routeName: routeName, routeNames: routeNames, shareStorage: shareStorage });
|
|
58
|
+
g.__stxNativeUnmount = function() { app.unmount(); };
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
screen = prepareSharedNativeScreen(nativeDocument, manifest, bridge, { routeName: routeName, routeNames: routeNames, shareStorage: shareStorage });
|
|
62
|
+
g.__stx_host = screen.host;
|
|
63
|
+
g.__stxNativeUnmount = function() { screen.unmount(); };
|
|
64
|
+
}
|
|
65
|
+
${M?"runtime.startSignals();":S}
|
|
66
|
+
var pageSetup = g.__stx_latestSetup;
|
|
67
|
+
var pageRuntimeSetup = g.stx && g.stx._latestSetup;
|
|
68
|
+
${D}
|
|
69
|
+
// The screen's setup is the native host's to run. A screen script publishes
|
|
70
|
+
// it where a page's document runtime adopts its own, and in a browser that
|
|
71
|
+
// runtime's DOMContentLoaded and stx:load ran it a second time: another copy
|
|
72
|
+
// of the screen, mounted beside this one. Take it, and hand the page back
|
|
73
|
+
// whatever setup it had.
|
|
74
|
+
var screenSetup = g.__stx_latestSetup || null;
|
|
75
|
+
g.__stx_latestSetup = pageSetup;
|
|
76
|
+
if (g.stx) g.stx._latestSetup = pageRuntimeSetup || null;
|
|
77
|
+
if (isApp) app.start(nativeAppModule);
|
|
78
|
+
else screen.mount(g.stx, screenSetup);
|
|
79
|
+
${w?`var stopApp = nativeAppModule && typeof nativeAppModule.default === 'function' ? nativeAppModule.default(g.craft) : null;
|
|
80
|
+
var unmount = g.__stxNativeUnmount;
|
|
81
|
+
var ended = false;
|
|
82
|
+
g.__stxNativeUnmount = function() { if (ended) return; ended = true; if (typeof stopApp === 'function') stopApp(); unmount(); browserBridge.dispose(); };
|
|
83
|
+
g.addEventListener('pagehide', function(event) { if (!event.persisted) g.__stxNativeUnmount(); });
|
|
84
|
+
})().catch(function(error) { console.error('[stx browser screen]', error); var node = document.querySelector(${JSON.stringify(w.container)}); if (node) { node.textContent = 'This screen could not start. Reload to try again.'; node.setAttribute('role', 'alert'); } });`:""}
|
|
85
|
+
`},l=(T)=>({name:"stx-native-shared-screens",setup(I){I.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),I.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:T,loader:"js"}))}}),p=new Set(d.flatMap(({compiled:T})=>T.dependencies)),b=d.flatMap(({compiled:T})=>T.diagnostics).map((T)=>({level:"warning",message:[T.kind,T.tag,T.name].filter(Boolean).join(": ")})),N=d.filter(({compiled:T})=>T.document.chrome),y=N.length?{chrome:Object.fromEntries(N.map(({name:T,compiled:I})=>[T,I.document.chrome]))}:{},k=t.minify??!1,v,_,O;if(t.routesDir){let T=L.resolve(i,t.routesDir);un(T,{recursive:!0});let I=`
|
|
86
|
+
import { installJSCGlobals } from ${JSON.stringify(h)};
|
|
87
|
+
import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(m)};
|
|
88
|
+
globalThis.__stxNativeRuntime = {
|
|
89
|
+
version: '__STX_NATIVE_RUNTIME_VERSION__',
|
|
90
|
+
installJSCGlobals: installJSCGlobals,
|
|
91
|
+
prepareNativeApp: prepareNativeApp,
|
|
92
|
+
prepareSharedNativeScreen: prepareSharedNativeScreen,
|
|
93
|
+
// Each screen starts its own signals runtime, after its host is in place.
|
|
94
|
+
startSignals: function() {
|
|
95
|
+
${S}
|
|
96
|
+
},
|
|
97
|
+
// A language's messages for an area (the compile's \`messages\`), read the
|
|
98
|
+
// first time they are looked into: a screen never parses a language it
|
|
99
|
+
// is not shown in, nor an area it does not use.
|
|
100
|
+
messages: function(language, area) {
|
|
101
|
+
var g = globalThis;
|
|
102
|
+
var loaded = g.__stxNativeMessages || (g.__stxNativeMessages = {});
|
|
103
|
+
function table() {
|
|
104
|
+
var forLanguage = loaded[language] || (loaded[language] = {});
|
|
105
|
+
if (Object.prototype.hasOwnProperty.call(forLanguage, area)) return forLanguage[area];
|
|
106
|
+
var value = null;
|
|
107
|
+
if (typeof g.__stxNativeReadMessages === 'function') {
|
|
108
|
+
try {
|
|
109
|
+
var text = g.__stxNativeReadMessages(language, area);
|
|
110
|
+
if (typeof text === 'string') value = JSON.parse(text);
|
|
111
|
+
}
|
|
112
|
+
catch (error) { console.error('[stx native] could not read the ' + language + ' messages for ' + area, error); }
|
|
113
|
+
}
|
|
114
|
+
forLanguage[area] = value;
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
var own = Object.prototype.hasOwnProperty;
|
|
118
|
+
return new Proxy({}, {
|
|
119
|
+
get: function(target, name) { var messages = table(); return messages && own.call(messages, name) ? messages[name] : undefined; },
|
|
120
|
+
has: function(target, name) { var messages = table(); return !!messages && own.call(messages, name); },
|
|
121
|
+
ownKeys: function() { var messages = table(); return messages ? Object.keys(messages) : []; },
|
|
122
|
+
getOwnPropertyDescriptor: function(target, name) {
|
|
123
|
+
var messages = table();
|
|
124
|
+
return messages && own.call(messages, name) ? { value: messages[name], writable: false, enumerable: true, configurable: true } : undefined;
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
`,M,E=L.join(T,`${ye}.js`);if(t.sharedRuntime){let C=await Qe("stx:native-shared-screens",[l(I)],k,p);M=Bun.hash(C).toString(36),_=E,await Bun.write(_,C.replace("__STX_NATIVE_RUNTIME_VERSION__",M))}else dn(E,{force:!0});let B=L.join(T,ni);dn(B,{recursive:!0,force:!0});let D={},P=[...d.map((C)=>({name:C.name,screens:[C],app:!1})),...x?[{name:se,screens:[],app:!0}]:[]];v={};for(let C=0;C<P.length;C+=6)await Promise.all(P.slice(C,C+6).map(async(V)=>{let W=L.join(T,`${V.name}.js`),F=await Qe("stx:native-shared-screens",[l(f(V.screens,V.app,M))],k,p,c??void 0);if(await Bun.write(W,F),v[V.name]=W,a)D[V.name]=ci(F)}));if(a){for(let[V,W]of a.data)for(let[F,z]of W)await Bun.write(L.join(B,V,`${F}.json`),z);let C=Object.fromEntries(Object.keys(D).sort().map((V)=>[V,D[V]]));await Bun.write(L.join(B,"routes.json"),JSON.stringify(C));for(let V of a.files.keys())p.add(V);O={dir:B,languages:[...a.data.keys()],routes:C}}if(!t.outFile)return{code:"",routes:v,runtime:_,...O?{messages:O}:{},...y,diagnostics:b,dependencies:[...p]}}let R=await Qe("stx:native-shared-screens",[l(f(d,!0))],k,p);if(!t.outFile)return{code:R,...y,diagnostics:b,dependencies:[...p]};let A=L.resolve(i,t.outFile);return un(L.dirname(A),{recursive:!0}),await Bun.write(A,R),{code:R,outFile:A,...v?{routes:v,runtime:_}:{},...O?{messages:O}:{},...y,diagnostics:b,dependencies:[...p]}}async function ui(t,e={}){return et({...e,screens:{main:t},routed:!1})}function fn(t,e={}){return ui(t,e)}var pn=["native.config.json","stx-native.config.json"];function pi(t=process.cwd(),e){let n=e?U.resolve(t,e):pn.map((d)=>U.join(t,d)).find((d)=>be(d));if(!n)return null;if(!be(n))throw Error(`Native config not found: ${n}`);let r=JSON.parse(fi(n,"utf8")),i=Object.entries(r.screens??{});if(i.length===0)throw Error(`${U.basename(n)} must name at least one screen in "screens"`);let a={};for(let[d,g]of i){if(!/^[A-Z][\w-]*$/i.test(d))throw Error(`Invalid native screen name: ${d}`);if(typeof g!=="string"||!g.endsWith(".stx"))throw Error(`Screen ${d} must name a .stx file`);if(a[d]=U.resolve(U.dirname(n),g),!be(a[d]))throw Error(`Screen ${d} not found: ${a[d]}`)}let u=r.initialScreen||i[0][0];if(!a[u])throw Error(`Initial screen ${u} is not in screens`);if(r.app!==void 0&&typeof r.app!=="string")throw Error(`"app" must name the app script's file`);let c=r.app?U.resolve(U.dirname(n),r.app):void 0;if(c&&!be(c))throw Error(`App script not found: ${c}`);return{initialScreen:u,screens:a,file:n,...c?{app:c}:{}}}async function ta(t,e={}){let n=U.resolve(e.cwd??process.cwd()),r=e.format??"ir";if(r!=="ir"&&r!=="bundle")throw Error(`Unknown compile format: ${r}. Expected ir or bundle.`);let i=t?null:pi(n,e.config);if(!t&&!i)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${pn[0]}`);let a,u=[];if(r==="bundle"){let d=i?await et({screens:i.screens,initialScreen:i.initialScreen,minify:e.minify,root:n,...i.app?{app:i.app}:{}}):await fn(U.resolve(n,t),{minify:e.minify});a=d.code,u=d.diagnostics}else{let d=async(h)=>{let m=await me(h);return u.push(...m.diagnostics.map((x)=>({level:"warning",message:[x.kind,x.tag,x.name].filter(Boolean).join(": ")}))),m.document},g=i?{initialScreen:i.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(i.screens).map(async([h,m])=>[h,await d(m)])))}:await d(U.resolve(n,t));a=JSON.stringify(g,null,2)}if(!e.output)return{output:a,diagnostics:u};let c=U.resolve(n,e.output);return di(U.dirname(c),{recursive:!0}),await Bun.write(c,a),{output:a,written:c,diagnostics:u}}export{ta as runNativeCompile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ae,Ma,ds,ln,f,Ie,Oe}from"./chunk-
|
|
2
|
+
import{ae,Ma,ds,ln,f,Ie,Oe}from"./chunk-h6633jna.js";import{Yn,Ke,N}from"./chunk-adxt8qcy.js";import{Hn,s}from"./chunk-ftskxb7f.js";import{me}from"./chunk-n48cshgz.js";function b(o){return o.endsWith(".md")||o.endsWith(".markdown")}function C(o){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(n,p){let g;while((g=n.exec(o))!==null){let t=g.index,i=t+g[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return o;e.sort((n,p)=>n.start-p.start);let a="",c=0;for(let n of e){if(n.start<c)continue;a+=o.slice(c,n.start),a+=`@raw${o.slice(n.start,n.end)}@endraw`,c=n.end}return a+=o.slice(c),a}async function R(o,e={}){let{data:r,content:m}=Yn(o),c=await(e.renderer??((n)=>Ke(n)))(m);return{html:C(c),frontmatter:r??{}}}import{dirname as k,resolve as _}from"path";function v(o){let e=o,r=ae(o);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,a=[],c=[],n=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),g;while((g=m.exec(o))!==null){let i=g[1],l=g[2],d=g[0],u=i.includes("server");if(p(l))n.push(d);else if(u)c.push(l);else a.push(d)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,d=[];while((l=i.exec(t))!==null){let u=l.index+l[0].length,w=t.indexOf("</script>",u);if(w===-1)continue;d.push({start:l.index,end:w+9}),i.lastIndex=w+9}for(let u=d.length-1;u>=0;u--)t=t.substring(0,d[u].start)+t.substring(d[u].end)}for(let i of a)t=t.replace(i,"");return{templateContent:t,serverScripts:c,clientScripts:a,signalsScripts:n}}function M(o,e){return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -14,5 +14,5 @@ ${c.join(`
|
|
|
14
14
|
`)}`}else{if(r.processClientScripts!==!1&&c.length>0){let i=p.__stx_event_bindings||[],l=Ie(p),d=await Promise.all(c.map(async(y)=>{let h=y.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!h)return y;return await Oe(h[1],{eventBindings:i,templateContent:t,serverData:l,filePath:e})})),w=[await Hn(d,{...n,buildMode:"compile"}),...d].filter(Boolean).join(`
|
|
15
15
|
`);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${w}
|
|
16
16
|
$1`);else t+=`
|
|
17
|
-
${w}`}t=await me(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=M(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-
|
|
17
|
+
${w}`}t=await me(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=M(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-pm76dy07.js");t=await i(t)}catch{}return t}
|
|
18
18
|
export{Ki};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{lp,Sl,We,sa,up,Dr,Mr,Lr}from"./chunk-
|
|
2
|
+
import{lp,Sl,We,sa,up,Dr,Mr,Lr}from"./chunk-msvpb1ax.js";import"./chunk-vzk09hvw.js";import"./chunk-r7kmsq3n.js";import"./chunk-8nryyqb5.js";import"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{up as clearOnceStore,sa as onceStore,We as partialsCache,Dr as processIncludes,Mr as processStackPushDirectives,Lr as processStackReplacements,lp as resetUnscopedSignalWarnings,Sl as topLevelElements};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{xc,Sc}from"./chunk-q341v4gv.js";import"./chunk-v0byvxty.js";import"./chunk-sknazxqf.js";import"./chunk-rjh2jwxx.js";import"./chunk-yq021b3r.js";import"./chunk-mayr8s0x.js";import"./chunk-zqtbtqbq.js";import"./chunk-creeaceg.js";import{_i}from"./chunk-zxbw2gr0.js";import"./chunk-jxda11cg.js";import"./chunk-2jh21f1n.js";import"./chunk-51n5rfsk.js";import"./chunk-rcadtv3x.js";import"./chunk-adzrhca1.js";import"./chunk-0jhdrgpr.js";import"./chunk-ym41ybz2.js";import"./chunk-n38yb274.js";import"./chunk-ptx6n9hd.js";import"./chunk-tre98h62.js";import"./chunk-dw5bsya8.js";import"./chunk-dgb4z4kw.js";import"./chunk-r3e6x87d.js";import"./chunk-mmwedr93.js";import"./chunk-aprhqxky.js";import"./chunk-kgfgb971.js";import"./chunk-nrvwejdw.js";import"./chunk-qvdx99py.js";import"./chunk-e3crw545.js";import"./chunk-pxqh758g.js";import"./chunk-4jyehvz3.js";import"./chunk-c1dkh0es.js";import"./chunk-6ajahb2x.js";import"./chunk-fr4hs814.js";import"./chunk-d419kwfp.js";import"./chunk-v2x9vzgw.js";import{Ee,s}from"./chunk-ftskxb7f.js";import"./chunk-vc2xzscw.js";import"./chunk-prf164ct.js";import"./chunk-pwjre3b2.js";import"./chunk-msvpb1ax.js";import"./chunk-vzk09hvw.js";import"./chunk-r7kmsq3n.js";import"./chunk-r6kbpwzd.js";import{me}from"./chunk-n48cshgz.js";import"./chunk-8nryyqb5.js";import{Xn,Jn}from"./chunk-q5h1reph.js";import{qr,N,o}from"./chunk-adxt8qcy.js";import"./chunk-a3mmhzpa.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import{f,Oe}from"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";import"./chunk-9p6efb17.js";import"./chunk-t2pzy3x1.js";export{qr as buildWebComponents,Jn as cacheTemplate,Xn as checkCache,_i as classifyAllScripts,xc as createMiddleware,Sc as createRoute,N as defaultConfig,f as extractVariables,me as injectRouterScript,o as loadStxConfig,Oe as processClientScript,s as processDirectives,Ee as readMarkdownFile};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{o}from"./chunk-adxt8qcy.js";import{Fs}from"./chunk-vqc4h16r.js";import p from"path";async function Ku(t={}){let d=performance.now(),s=t.root||process.cwd(),e=await o(s),u=t.ssr?.routeRules??e.routeRules??{};if(Fs(u),!e.ssr&&Object.keys(u).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let n,l;if(r==="ssg"){let{generateStaticSite:i}=await import("./ssg.js");n=await i({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:i}=await import("./chunk-tywr9wc5.js");l=await i({root:s,outputDir:".output",debug:t.debug,...t.ssr})}let a=Math.round(performance.now()-d);return{mode:r,ssg:n,ssr:l,duration:a}}
|
|
3
3
|
export{Ku};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Nr,qn,xl}from"./chunk-
|
|
2
|
+
import{Nr,qn,xl}from"./chunk-pwjre3b2.js";import"./chunk-r7kmsq3n.js";import"./chunk-8nryyqb5.js";import{Et}from"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{xl as declareBareLoopHead,Et as parseLoopBinding,qn as processLoops,Nr as reportDeferredLoopWarnings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{f,Po,Va,Ua,Xl,Jl,Yl,Zl,Ql,ms,eu,Ne,G,De,tu,lr,nu,Ga,Do,Me,n,pn,Ka,g,de,Rp}from"./chunk-
|
|
2
|
+
import{f,Po,Va,Ua,Xl,Jl,Yl,Zl,Ql,ms,eu,Ne,G,De,tu,lr,nu,Ga,Do,Me,n,pn,Ka,g,de,Rp}from"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{de as clearComponentCache,Do as componentClientSignalNames,Po as convertToCommonJS,g as createDetailedErrorMessage,Ql as extractDirectiveNames,Va as extractScriptFromTemplate,f as extractVariables,n as fileExists,Rp as getComponentCacheStats,Jl as getPositionInfo,G as getSharedTranspiler,Ka as getSourceLineInfo,Zl as hasDirectives,Ua as hasVariables,nu as isHydrateTrigger,eu as isJavaScriptScript,Me as renderComponentWithSlot,pn as resolveTemplatePath,tu as scopeOnRootElement,ms as scopeSequenceKey,Ne as shouldTranspileTypeScript,Ga as slotContentHasExpressions,De as transpileTypeScript,lr as userComponentFileExists,Yl as validateDirective,Xl as validateTemplate};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-7rta163c.js";import"./chunk-ce6zddpf.js";import{y,b,S,G}from"./chunk-
|
|
2
|
+
import"./chunk-7rta163c.js";import"./chunk-ce6zddpf.js";import{y,b,S,G}from"./chunk-h6633jna.js";import"./chunk-hb08vrbb.js";import"./chunk-2h8ea0we.js";import"./chunk-z248e3gj.js";import f from"path";var h=["applyOfflineUpdate","broadcast","cacheMedia","calculateDistance","canNotify","clearCookies","clearFetchCache","clearOfflineData","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","onOfflineUpdateReady","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAmbientSound","useAnimationFrame","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBreathPacer","useBroadcastChannel","useBroadcastStream","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useOutbox","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],L=new Set(h);var l=new Map,w=y(64),x=new Set,O=0,R=new Set(h);function T(){l.clear(),w.clear()}function P(n){let o=new Map;for(let r of n){let a=f.basename(r);if(a.endsWith(".d.ts"))continue;let t=a.replace(/\.[jt]s$/,"");if(t==="index")continue;if(t===a)continue;let i=o.get(t);if(i&&!i.endsWith(".js"))continue;o.set(t,r)}return[...o.values()].sort()}function I(n,o){let r=o.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${r}\\b`).test(n)}function M(n){if(!n)return[];let o=b(n,O),r=w.get(o);if(r)return r.slice();let a=n.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),t=[];for(let i of R){if(x.has(i))continue;let u=i.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${u}\\s*\\(`).test(a))t.push(i)}return t.sort(),w.set(o,t),t.slice()}async function A(n,o){let r=M(n);if(r.length===0)return null;let a=o??f.join(import.meta.dir,"composables"),t=`${a}\x00${r.join(",")}`,i=l.get(t);if(i!==void 0)return i||null;let u=G({loader:"ts",target:"browser",define:S()}),C=new Set(r),m=[],d=new Set,p=[];try{let s=new Bun.Glob("*.{ts,js}");for await(let e of s.scan({cwd:a,absolute:!0}))p.push(e)}catch{return l.set(t,""),null}p=P(p);for(let s of p){let e;try{e=await Bun.file(s).text()}catch{continue}let g=[];try{g=u.scan(e).exports.filter((c)=>c!=="default")}catch{continue}if(!g.some((c)=>C.has(c)))continue;try{e=e.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^import\s+type\s+.*$/gm,""),e=e.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),e=e.replace(/^export\s+default\s+/gm,""),e=e.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),m.push(`// ${f.basename(s).replace(/\.[jt]s$/,"")}
|
|
3
3
|
${u.transformSync(e).trim()}`);for(let c of g)d.add(c)}catch(c){console.warn(`[stx] framework composable ${f.basename(s)} could not be bundled:`,c)}}let v=r.filter((s)=>!d.has(s)&&!I(n,s));if(v.length>0)console.warn(`[stx] could not bundle ${v.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(m.length===0)return l.set(t,""),null;let E=[...d].map((s)=>` try { if (!(${JSON.stringify(s)} in __s)) { __s[${JSON.stringify(s)}] = ${s}; if (!(${JSON.stringify(s)} in window)) window[${JSON.stringify(s)}] = ${s}; } } catch (e) {}`).join(`
|
|
4
4
|
`),k=`<script data-stx-scoped data-stx-run="always" data-stx-framework-composables>
|
|
5
5
|
;(function(){
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$u}from"./chunk-sknazxqf.js";import"./chunk-zxbw2gr0.js";import"./chunk-d419kwfp.js";import"./chunk-n48cshgz.js";import"./chunk-adxt8qcy.js";import"./chunk-a3mmhzpa.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{$u as startProductionServer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Bd,Fd}from"./chunk-qvdx99py.js";import"./chunk-fr4hs814.js";import"./chunk-d419kwfp.js";import"./chunk-v2x9vzgw.js";import"./chunk-r6kbpwzd.js";import"./chunk-n48cshgz.js";import"./chunk-8nryyqb5.js";import"./chunk-adxt8qcy.js";import"./chunk-a3mmhzpa.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Fd as clearStoreCache,Bd as getStoreScript};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{gn,jo}from"./chunk-
|
|
2
|
+
import{gn,jo}from"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";export{jo as generateRuntimeConfigTypes,gn as prepareRuntimeConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Zt,Gs,Ks,Xs,sp,Js}from"./chunk-
|
|
2
|
+
import{Zt,Gs,Ks,Xs,sp,Js}from"./chunk-d419kwfp.js";import"./chunk-04kg16qs.js";import"./chunk-zaaeneq6.js";import"./chunk-2h8ea0we.js";export{Ks as buildServerApi,sp as createServerApi,Zt as discoverServerApi,Gs as generateApiTypes,Js as isServerApiSource,Xs as productionApiDispatcher};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{he,hs,ru,Ap,su,Pp,It,m,F,K,fn,be,ou,Lo,iu,Ip,k,au,Op,_,Np}from"./chunk-
|
|
2
|
+
import{he,hs,ru,Ap,su,Pp,It,m,F,K,fn,be,ou,Lo,iu,Ip,k,au,Op,_,Np}from"./chunk-h6633jna.js";import"./chunk-z248e3gj.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{au as applyFilters,Pp as clearCustomFilters,ou as clientLoopScopes,hs as defaultFilters,fn as escapeAttributeValue,m as escapeHtml,F as escapeHtmlValue,K as escapeInterpolatedHtmlValue,_ as evaluateExpression,he as findMustacheEnd,su as getAllFilters,iu as interpolateScriptAttributes,Lo as interpolateScriptExpressions,Ip as interpolateScriptsInTemplate,k as processExpressions,ru as registerFilter,Ap as registerFilters,It as replaceInterpolations,Op as resetRejectedExpressionWarnings,Np as unescapeHtml,be as usesSignalsInScript};
|