@stacksjs/stx 0.2.668 → 0.2.670
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-9edksf8x.js → chunk-0dxkj53f.js} +1 -1
- package/dist/{chunk-41cvkdcm.js → chunk-0gxxknfy.js} +1 -1
- package/dist/{chunk-61n06wra.js → chunk-0zqzn3hr.js} +1 -1
- package/dist/{chunk-wesafj4a.js → chunk-1a7k07b8.js} +1 -1
- package/dist/{chunk-fpz59dhz.js → chunk-28qn219e.js} +4 -4
- package/dist/{chunk-w6x8m0tz.js → chunk-2f2q31yc.js} +1 -1
- package/dist/{chunk-dtjybwtz.js → chunk-2q8maj3k.js} +1 -1
- package/dist/{chunk-rcefnd1g.js → chunk-38th7z7d.js} +5 -5
- package/dist/{chunk-2hxwds8c.js → chunk-3cr5yths.js} +1 -1
- package/dist/{chunk-avph47dc.js → chunk-3m0cebvd.js} +1 -1
- package/dist/{chunk-cyq1jcg2.js → chunk-3ttr743b.js} +5 -5
- package/dist/chunk-4ef70h09.js +2 -0
- package/dist/{chunk-0hemydnd.js → chunk-4v1582qk.js} +1 -1
- package/dist/{chunk-cba7953e.js → chunk-54gq98a2.js} +1 -1
- package/dist/{chunk-hm9jt1p9.js → chunk-57vwx6nv.js} +1 -1
- package/dist/chunk-5r6jbxyk.js +2 -0
- package/dist/chunk-6vk1jvx5.js +130 -0
- package/dist/{chunk-fb93n9ts.js → chunk-77dewvn4.js} +1 -1
- package/dist/{chunk-zcz97ber.js → chunk-7hm5asnb.js} +1 -1
- package/dist/{chunk-6z2sdfac.js → chunk-7hzjnzex.js} +1 -1
- package/dist/{chunk-fmkcc7g1.js → chunk-82w7h48a.js} +1 -1
- package/dist/{chunk-s5w3t7xw.js → chunk-8p14rew3.js} +1 -1
- package/dist/{chunk-ca6vx6vg.js → chunk-8yry75vs.js} +1 -1
- package/dist/{chunk-65b6cy92.js → chunk-beccrqdy.js} +1 -1
- package/dist/chunk-ccwattyw.js +2 -0
- package/dist/{chunk-060298px.js → chunk-cxc3zdhn.js} +2 -2
- package/dist/{chunk-3641xvaw.js → chunk-cxmdbhwb.js} +1 -1
- package/dist/{chunk-heh151bn.js → chunk-dxc782vg.js} +1 -1
- package/dist/{chunk-6tngeb4b.js → chunk-e7avmdqn.js} +1 -1
- package/dist/{chunk-vg9bz5zs.js → chunk-egt49kgq.js} +1 -1
- package/dist/chunk-f87ycgnc.js +2 -0
- package/dist/chunk-ffd48ere.js +2 -0
- package/dist/{chunk-3n9vaxnt.js → chunk-h1gjww3q.js} +1 -1
- package/dist/{chunk-k5mez1vx.js → chunk-h1qz5xd6.js} +1 -1
- package/dist/{chunk-hkqhpckf.js → chunk-hjccqjt4.js} +1 -1
- package/dist/{chunk-9k2wz3k1.js → chunk-hvsv59f5.js} +2 -2
- package/dist/{chunk-t7jxkrbx.js → chunk-jy89bcma.js} +1 -1
- package/dist/{chunk-e8gcqp8w.js → chunk-kjhbchxn.js} +2 -2
- package/dist/{chunk-4m1hye28.js → chunk-m2znv53p.js} +1 -1
- package/dist/{chunk-02gn092e.js → chunk-mrs4sw7d.js} +1 -1
- package/dist/chunk-ng1mgtph.js +2 -0
- package/dist/{chunk-kpeep7gq.js → chunk-p450pdx3.js} +1 -1
- package/dist/{chunk-zdgsj39g.js → chunk-pgs6p767.js} +1 -1
- package/dist/{chunk-x986xz7h.js → chunk-pjdsvqzc.js} +1 -1
- package/dist/chunk-q19vdv8m.js +2 -0
- package/dist/chunk-qmtpvrz4.js +2 -0
- package/dist/{chunk-c4qebqmk.js → chunk-qqzmmnga.js} +1 -1
- package/dist/{chunk-sme31jbj.js → chunk-rmdc1bqn.js} +1 -1
- package/dist/{chunk-ynh1ppa6.js → chunk-rt2v4sy2.js} +1 -1
- package/dist/{chunk-vdjj4vrp.js → chunk-rwyexk13.js} +6 -6
- package/dist/{chunk-dy5j389v.js → chunk-sbvmcwqg.js} +2 -2
- package/dist/{chunk-8kskjg62.js → chunk-skwjbhfh.js} +1 -1
- package/dist/{chunk-4teqcbw0.js → chunk-tm6z49c5.js} +2 -2
- package/dist/{chunk-6by8f7n9.js → chunk-tnfbx8he.js} +4 -4
- package/dist/{chunk-t01c62y5.js → chunk-v2yjapag.js} +1 -1
- package/dist/{chunk-9vaz5f9j.js → chunk-wf7wxa9h.js} +1 -1
- package/dist/chunk-x4t3mjg0.js +2 -0
- package/dist/{chunk-c3dk9pkf.js → chunk-xsbacs9w.js} +1 -1
- package/dist/chunk-y4n984em.js +2 -0
- package/dist/{chunk-493x6e71.js → chunk-zgg6w9pt.js} +2 -2
- package/dist/{chunk-tq0bgaae.js → chunk-zrged04y.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/native/compiler/component-mapping.js +2 -0
- package/dist/native/compiler/html-to-ir.js +35 -2
- package/dist/native/compiler/ir.d.ts +1 -0
- package/dist/native/compiler/layout-chrome.js +51 -4
- package/dist/native/components/primitives.d.ts +18 -0
- package/dist/native/components/primitives.js +1 -0
- package/dist/native/index.d.ts +2 -0
- package/dist/native/primitives/NativeSegmentedControl.stx +5 -0
- package/dist/native/prop-names.js +8 -1
- package/dist/native/runtime/browser-renderer.js +23 -1
- package/dist/native/runtime/craft-bridge.js +2 -1
- package/dist/native/runtime/native-host.js +46 -3
- package/dist/native/runtime/web-storage.js +41 -8
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/package.json +5 -5
- package/dist/chunk-2ecgyqam.js +0 -2
- package/dist/chunk-gkmpr64n.js +0 -2
- package/dist/chunk-hj0raner.js +0 -2
- package/dist/chunk-hx9cn2s4.js +0 -2
- package/dist/chunk-n7a33e3v.js +0 -2
- package/dist/chunk-r7cenpxp.js +0 -2
- package/dist/chunk-sz6xdz4h.js +0 -2
- package/dist/chunk-tw0wc95k.js +0 -2
- package/dist/chunk-v0091n1g.js +0 -2
- package/dist/chunk-vfba7nz5.js +0 -129
- package/dist/chunk-vryzt0p0.js +0 -2
package/dist/chunk-vfba7nz5.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-2dp7hyv7.js";import{_s,Ko,gc}from"./chunk-pxdww4rb.js";import"./chunk-ce6zddpf.js";import"./chunk-vdjj4vrp.js";import"./chunk-1sr6c0nk.js";import"./chunk-kpeep7gq.js";import"./chunk-a3d0g4mr.js";import"./chunk-365vg0eg.js";import{o}from"./chunk-9k2wz3k1.js";import"./chunk-fzqj1mjz.js";import"./chunk-04kg16qs.js";import"./chunk-6z2sdfac.js";import{mt,Ue,fe,Qt,$e,Vn,Un,We}from"./chunk-dy5j389v.js";import{s}from"./chunk-rcefnd1g.js";import"./chunk-hm9jt1p9.js";import"./chunk-6by8f7n9.js";import"./chunk-dtjybwtz.js";import{Vr}from"./chunk-060298px.js";import"./chunk-prf164ct.js";import{ft}from"./chunk-3y41efsf.js";import"./chunk-md2jn67b.js";import"./chunk-sme31jbj.js";import{qs}from"./chunk-zcz97ber.js";import"./chunk-ka8befem.js";import"./chunk-fpz59dhz.js";import"./chunk-p472crv1.js";import"./chunk-9edksf8x.js";import{existsSync as be,mkdirSync as di,readFileSync as fi}from"fs";import U from"path";import{existsSync as et,mkdirSync as un,realpathSync as ei,rmSync as dn}from"fs";import D from"path";import{existsSync as qr}from"fs";import K from"path";var mn="data-stx-b",it=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(it.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 it.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 st(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(We(n))??$e[n]?.value)}function Ne(t,e){let n=Un[t];if(!n)return;let r=oe(e?.get(We(n.size))??$e[n.size]?.value),i=oe(e?.get(We(n.leading))??$e[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},lt=Re({}),ot,at=null;function Te(){let t=globalThis.__stxNativeStyleConfig;if(!t)return lt;if(t!==ot)ot=t,at=Re(t);return at}function ut(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")ut(i,e,`${a}-`)}return e}function dt(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 Re(t){return{shortcuts:new Map(Object.entries(t.shortcuts??{}).filter(([,e])=>typeof e==="string")),colors:ut(t.colors),breakpoints:new Map(Object.entries({...Sn,...dt(t.breakpoints)}))}}var ke={};function ct(t){ke=t??{},lt=Re(ke)}async function pt(t,e){let n=ke;ct(t);try{return await e()}finally{ct(n)}}function gt(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:dt(e.screens)}:{}}}function ht(t){return Te().shortcuts.get(t)}function yt(t){return Te().colors.get(t)}function _e(t){return Te().breakpoints.get(t)}var vt=/^--[\w\u0080-\uFFFF-]+$/u;function bt(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(!vt.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(!vt.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,v=(N,y=0)=>y>64?void 0:bt(N,(k,b)=>(p.add(k),b===void 0?"":v(b,y+1)));if(v(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=[],v;do v=d.pop(),g.delete(v),p.push(v);while(v!==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),v=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,v),v}function S(f,l=0){if(l>64)return;return bt(f,(p,v)=>w(p,l)??(v===void 0?void 0:S(v,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 Ae(t){if(t.display==="flex"&&t.flexDirection==null)return{...t,flexDirection:"row"};return t}var St=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"]),wt=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=St.has(a)||a.trim().startsWith("--")?a:a.trim().toLowerCase().replace(/-([a-z])/g,(h,m)=>m.toUpperCase());if(!St.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)||wt.has(c)){if(g=Rn(d),!ee(g)&&!(wt.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"}},Ie={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},xt={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},Nt={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 Ce(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 Ee(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 V(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 Ie[t]??xe(t)}function le(t){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(t);if(e)return`${Number.parseFloat(e[1])}%`;return V(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),"aspect-video":(t,e)=>(e.aspectRatio=1.7777777777777777,!0),"border-solid":(t,e)=>(e.borderStyle="solid",!0),"border-dashed":(t,e)=>(e.borderStyle="dashed",!0),"border-dotted":(t,e)=>(e.borderStyle="dotted",!0),group:()=>!0,peer:()=>!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(xt[n])return e.fontSize=xt[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=V(t.slice(2));if(n!==void 0)return e.padding=n,!0}if(t.startsWith("px-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingHorizontal=n,!0}if(t.startsWith("py-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingVertical=n,!0}if(t.startsWith("pt-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingTop=n,!0}if(t.startsWith("pr-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingRight=n,!0}if(t.startsWith("pb-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingBottom=n,!0}if(t.startsWith("pl-")){let n=V(t.slice(3));if(n!==void 0)return e.paddingLeft=n,!0}return!1}function Tt(t,e){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(t)){let n={};if(!Tt(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=V(t.slice(2));if(n!==void 0)return e.margin=n,!0}if(t.startsWith("mx-")){let n=V(t.slice(3));if(n!==void 0)return e.marginHorizontal=n,!0}if(t.startsWith("my-")){let n=V(t.slice(3));if(n!==void 0)return e.marginVertical=n,!0}if(t.startsWith("mt-")){let n=V(t.slice(3));if(n!==void 0)return e.marginTop=n,!0}if(t.startsWith("mr-")){let n=V(t.slice(3));if(n!==void 0)return e.marginRight=n,!0}if(t.startsWith("mb-")){let n=V(t.slice(3));if(n!==void 0)return e.marginBottom=n,!0}if(t.startsWith("ml-")){let n=V(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=Nt.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=Nt[r[2]]??we(r[2])??Ee(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=Ee(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:Ee(n,r):i[n]!==void 0?i[n]*r:Ie[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]):Ie[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%":V(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=V(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=V(n[2]);if(r===void 0)return!1;return e.gap=r,!0}function rr(t,e){if(t.startsWith("gap-")){let n=V(t.slice(4));if(n!==void 0)return e.gap=n,!0}if(t.startsWith("gap-x-")){let n=V(t.slice(6));if(n!==void 0)return e.columnGap=n,!0}if(t.startsWith("gap-y-")){let n=V(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 Rt=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]+)?|animate-\S+|scroll-[mp][trblxyse]?-\S+|snap-\S+|overscroll-\S+|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 _t(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 At(t,e=new Set){let n=_t(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)=>At(`${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 At(S)){let l=_t(f),p=l.pop(),v=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)||!v&&l.some((T)=>or.has(T)))continue;let N,y,k=!1,b,_=[];for(let T of l){let A=_e(T),B=T.startsWith("max-")?_e(T.slice(4)):void 0;if(A!==void 0&&N===void 0)N=A;else if(B!==void 0&&y===void 0)y=B-0.02;else if(T==="disabled"&&!k)k=!0;else if(Rt.has(T)&&b===void 0)b=T;else _.push(T)}let O=[..._,p].join(":"),I=N!==void 0||y!==void 0,R=k?i("disabled",{disabled:!0}):b?i(`state:${b}`,{state:b}):I?i(`range:${N??0}:${y??""}`,{min:N??0,max:y}):r.get("base");if((k||b)&&(I||k&&b)){r.get("base").authored.set(f,S),r.get("base").classes.push(f);continue}if(R.classes.push(O),!R.authored.has(O))R.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 v=n.rules[p];f={...f,...S(v.light)},l={...l,...S(v.dark)};for(let N of v.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,v){let N=/^(bg|text|border(?:-[trblxy])?|from|via|to|fill|stroke|divide|decoration|caret|accent)-(.+?)(\/[^\s]+)?$/.exec(p),y=N&&yt(N[2]);if(N&&y){let I=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+?)\s*)?\)$/.exec(y),R=I?e?.get(I[1])??I[2]:y;if(R&&/^(?:#[0-9a-f]{3,8}|rgba?\(.+\)|hsla?\(.+\))$/i.test(R))return[`${N[1]}-[${R.replace(/\s+/g,"")}]${N[3]||""}`]}let k=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(p),b=k&&mt[k[2]];if(b){let I=e?.get(Ue(k[2]));return[`${k[1]}-${I===void 0?b[v]:`[${I}]`}${k[3]||""}`]}let _=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(p);if(_&&fe[_[2]]){let I=we(_[2],e);return I===void 0?void 0:[`rounded-${_[1]?`${_[1]}-`:""}[${I}px]`]}let O=p.startsWith("text-")?p.slice(5):"";if(Un[O]){let I=Ne(O,e);return I&&[`text-[${I.fontSize}px]`,`leading-[${I.lineHeight}px]`]}for(let I of Object.keys(Vn)){if(!p.endsWith(`-${I}`))continue;let R=xe(I,e);return R===void 0?void 0:[`${p.slice(0,-I.length)}[${R}px]`]}return[p]}function h(p,v){if(!d.has(p))d.set(p,new Set);return d.get(p).add(v),p}let m=[],x=new Map;for(let p of t.split(/\s+/).filter(Boolean)){let v=p.startsWith("dark:")?p.slice(5):p,N=sr(v);if(N!==null){let b=N&&`${p===v?"":"dark:"}${N}`;if(b)m.push(b),x.set(b,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 b=`${y[1]||y[3]?"dark:":""}${y[4]}`,_=c[k];_.classes.push(b),_.originals.set(b,[..._.originals.get(b)??[],p]);continue}if(p.startsWith("dark:")){let b=g(p.slice(5),"dark");if(!b)u.push(p);else i.push(...b.map((_)=>h(_,p)))}else if(!p.includes(":")||p.startsWith("[")){let b=g(p,"light"),_=g(p,"dark");if(!b||!_){u.push(p);continue}if(r.push(...b.map((O)=>h(O,p))),_.join(" ")!==b.join(" "))a.push(..._.map((O)=>h(O,p)))}else u.push(p)}let w=[],S=kt(r,w),f={style:S,unknown:w};if(i.length||a.length)f.dark=kt([...a,...i],w);if(S.transform&&f.dark?.transform){let p=new Set(f.dark.transform.flatMap((v)=>Object.keys(v)));f.dark.transform=[...S.transform.filter((v)=>!Object.keys(v).some((N)=>p.has(N))),...f.dark.transform]}for(let p of r){if(p==="truncate"||p==="whitespace-nowrap")f.numberOfLines=1;let v=/^object-(cover|contain|fill)$/.exec(p);if(v)f.resizeMode=v[1]==="fill"?"stretch":v[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((v)=>x.get(v)??v)])]}for(let p of["focus","focusWithin"]){let v=c[p];if(!v.classes.length)continue;let N=ce(v.classes.join(" "),e);f[p]={style:N.style,dark:N.dark},f.unknown=[...new Set([...f.unknown,...N.unknown.flatMap((y)=>v.originals.get(y)??[y])])];for(let y of v.classes)if(/^(?:dark:)?(?:truncate|line-clamp-\d+|i-[a-z0-9]+-.+)$/.test(y))f.unknown.push(...v.originals.get(y))}return f}function kt(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(Tt(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=/^aspect-\[(\d+(?:\.\d+)?)\/(\d+(?:\.\d+)?)\]$/.exec(i);if(u&&Number(u[2])>0){n.aspectRatio=Number(u[1])/Number(u[2]);continue}let c=/^z-\[(-?\d+)\]$/.exec(i)??/^z-(\d+)$/.exec(i);if(c){n.zIndex=Number(c[1]);continue}if(i==="z-auto")continue;if(Kn(i,n))continue;let d=/^order-\[(-?\d+)\]$/.exec(i)??/^order-(-?\d+)$/.exec(i);if(d){n.order=Number(d[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 Et=new Map;function It(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 Ce(n)??Ce(`[${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(!mt[c])continue;let g=It(typeof d==="string"?d:d?.light,i),h=It(typeof d==="string"?d:d?.dark,i);if(g)a.push(`${Ue(c)}: ${g};`);if(h)u.push(`${Ue(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($e[c])a.push(`${We(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-8kskjg62.js"),n=await e(t);return n?lr(n):""}function Ct(t){let e=cr.resolve(t),n=Et.get(e);if(!n)n=ur(e).catch(()=>""),Et.set(e,n);return n}var Pt={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},Ot={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 Pt}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(Ot[e])return Ot[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=Pt[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 Oe=["accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue"];function Pe(t){let e={...t};return hr(e),Object.fromEntries(Oe.filter((n)=>(n in e)).map((n)=>[n,e[n]]))}var Bt=["keyboardType","secureTextEntry","returnKeyType","autoCapitalize","autoCorrect","editable","autoComplete"],mr=new Set(["type","inputmode","inputMode","enterkeyhint","enterKeyHint","autoCapitalize","autoCorrect","spellcheck","readonly","readOnly","disabled",...Bt]),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 Mt(t){if(t===void 0||t===null||t===!1)return!1;return te(t)!=="false"}function Me(t,...e){for(let n of e)if(t[n]!==void 0&&t[n]!==null)return t[n];return}function Lt(t,e){if(t!=="TextInput")return{};let n={},r=te(e.type),i=br[r]??{},a=te(Me(e,"inputmode","inputMode")),u=yr[a]??i.keyboardType;if(u&&u!=="default")n.keyboardType=u;if(i.secure)n.secureTextEntry=!0;let c=te(Me(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(Mt(Me(e,"readonly","readOnly"))||Mt(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 Dt(t){let e=Lt(t.type,t.props);if(!Object.keys(e).length)return;t._textEntrySource=Object.fromEntries(Bt.filter((n)=>(n in t.props)).map((n)=>[n,t.props[n]])),Object.assign(t.props,e)}var Be={"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 De={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText",animate:"Animate"},Ve=new Set(Object.values(De));var jt=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),Wt=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight","attributeName","keyTimes","repeatCount"];function z(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 je(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 $t=/[MLHVCSQTAZ]/i,Le=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function xr(t){let e=[],n=t,r=$t.exec(n);while(r){let i=r.index;n=n.slice(i);let a=n[0];n=n.slice(1);let u=$t.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{Le.lastIndex=0;let S=Le.exec(w);if(!S||S.index!==0)break;d.push(Number.parseFloat(S[0])),m+=S[0].length}g++}}else d=(c.match(Le)||[]).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,v=l*l/(g*g)+p*p/(h*h);if(v>1)g*=Math.sqrt(v),h*=Math.sqrt(v);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 b=k*(g*p)/h,_=k*-(h*l)/g,O=x*b-w*_+(t+c)/2,I=w*b+x*_+(e+d)/2,R=(L,W,F,q)=>{let Y=L*q-W*F<0?-1:1,G=(L*F+W*q)/(Math.hypot(L,W)*Math.hypot(F,q));return Y*Math.acos(Math.min(1,Math.max(-1,G)))},T=R(1,0,(l-b)/g,(p-_)/h),A=R((l-b)/g,(p-_)/h,(-l-b)/g,(-p-_)/h);if(!u&&A>0)A-=2*Math.PI;if(u&&A<0)A+=2*Math.PI;let B=Math.max(1,Math.ceil(Math.abs(A)/(Math.PI/2))),j=A/B,E=1.3333333333333333*Math.tan(j/4),M=[],X=(L)=>{let W=g*Math.cos(L),F=h*Math.sin(L);return[x*W-w*F+O,w*W+x*F+I]},C=(L)=>{let W=-g*Math.sin(L),F=h*Math.cos(L);return[x*W-w*F,w*W+x*F]},P=T;for(let L=0;L<B;L++){let W=P+j,[F,q]=X(P),[Y,G]=C(P),[nt,rt]=X(W),[gn,hn]=C(W);M.push(2,F+E*Y,q+E*G,nt-E*gn,rt-E*hn,L===B-1?c:nt,L===B-1?d:rt),P=W}return M}function Ft(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,v=(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=v(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=v(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=v(1);if(!y)return e;n=y[0]+f(),e.push(1,n,r),h="L";break}case"V":{let y=v(1);if(!y)return e;r=y[0]+l(),e.push(1,n,r),h="L";break}case"C":{let y=v(6);if(!y)return e;let k=y[0]+f(),b=y[1]+l();u=y[2]+f(),c=y[3]+l(),n=y[4]+f(),r=y[5]+l(),e.push(2,k,b,u,c,n,r),h="C";break}case"S":{let y=v(4);if(!y)return e;let k=h==="C"?2*n-u:n,b=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,b,u,c,n,r),h="C";break}case"Q":{let y=v(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=v(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=v(7);if(!y)return e;let k=y[5]+f(),b=y[6]+l();e.push(...Nr(n,r,y[0],y[1],y[2],y[3],y[4],k,b)),n=k,r=b,h="A";break}default:return e}N=!1}}return e.map((m)=>J(m))}function Vt(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 Ft(String(e.d??""));case"Line":return[0,z(e.x1),z(e.y1),1,z(e.x2),z(e.y2)].map(J);case"Rect":{let n=z(e.x),r=z(e.y),i=z(e.width),a=z(e.height);if(i<=0||a<=0)return[];let u=e.rx===void 0?z(e.ry):z(e.rx),c=e.ry===void 0?u:z(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 Vt(z(e.cx),z(e.cy),z(e.r),z(e.r));case"Ellipse":return Vt(z(e.cx),z(e.cy),z(e.rx),z(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(Ft);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=[...Wt,"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"],zt=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)=>[Xt(t),t]));function Xt(t){return t.replace(/[-_]/g,"").toLowerCase()}function Xe(t,e){if((e==="Image"||e==="Video")&&t.toLowerCase()==="src")return"source";return _r.get(Xt(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 Ut(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 Ht(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 qt}from"@stacksjs/ts-css/parse";async function Gt(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 v of w.block.children){if(v.type!=="Declaration"){if(u(v))i(`nested rule in ${f}`);continue}if(!v.property.startsWith("--"))continue;let N={value:ie(v.value),important:!!v.important,specificity:p};a(v.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=qt(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=qt(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 H(t,e={},n={},r={},i=[]){return{type:t,props:e,style:n,events:r,children:i}}function Kt(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)$/,Jt=new Set(["script","style","head","meta","link","title","base","noscript"]),Yt=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",...Ve]),Br=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"]]),Zt=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 Ge(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 en(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("."),b=Be[k]??(k.startsWith("on")?k:"");if(!b||!Mr.has(b)){if(Pr.test(k)||/\./.test(y))n.push({kind:"unread-event",tag:t,name:S});continue}u[b]=Z(f);continue}if(l==="key"){a.key=f;continue}let p=Z(f),v=Ge(p);if(v){c[l]=v,d.push(l);continue}let N=Xe(S);if(p===""&&zt.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=Ae({...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 Ke(t){return t.children.map((e)=>typeof e==="string"?e:Ke(e)).join("").replace(/\s+/g," ").trim()}function $r(t,e){let n=t.node;if(n.props["data-stx-native-template"])return n.children=n.children.map((a)=>typeof a==="string"?H("Text",{},{},{},[a]):a),n;let 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()?[H("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=Ke(n);return n.children=a?[a]:[],n}if(Zt.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"?H("Text",{},{},{},[c]):c),n;let u=Ke(n);return e.push({kind:"flattened-text",tag:t.tag}),n.children=u?[u]:[],n}if(Zt.has(n.type)&&r.length>0)n.children=r;return n}async function jr(t,e={}){let n=[],r=await Gt(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 Ht(t,(l,p)=>{if(!p.length||p.some((v)=>a.has(v)))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((b)=>typeof b!=="string"),k=y.length===1&&y.length===N.length?y[0]:H("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 v=d[d.length-1];for(let N of l.node.children){if(typeof N==="string"){if(v&&!v.dropped)v.node.children.push(N);continue}if(p(N),!v)c.push(N);else if(!v.dropped)v.node.children.push(N)}}function x(l,p){let v=d[d.length-1];if(l==="svg"||v?.svg)return w(l,p,v);let N=Jt.has(l)&&!pe.has(l),y=d[d.length-1]?.dropped??!1,k=v?.variables??i,{props:b,style:_,events:O,bindings:I,classes:R,inline:T,templated:A}=N||y?{props:{},style:{},events:{},bindings:{},classes:"",inline:{},templated:[]}:en(l,p,n,{inheritedVariables:k,onVariables:(C)=>{k=C},rules:u});if(l==="html")k=i;let B=b["data-native"],j=l==="template"&&p.some(([C])=>[":for","x-for","@for"].includes(C)),E;if(j)E="View",b["data-stx-native-template"]=!0;else if(typeof B==="string"&&qe.has(B))E=B,delete b["data-native"];else{if(E=pe.has(l)?"View":Ut(l),(l==="i"||l==="span")&&/(?:^|\s)i-[a-z0-9]+-[a-z0-9-]+(?:\s|$)/.test(R))E="Icon";if(l==="input"){let C=String(b.type??"text").toLowerCase();if(C==="checkbox")E="Checkbox",b.formValue=b.value??"on",b.checked=b.checked===""||b.checked===!0||b.checked==="true",b.value=b.checked;else if(C==="hidden")E="View",_.display="none",T.display="none";else if(C==="radio")E="View",b.accessibilityRole="radio",n.push({kind:"unsupported-control",tag:l,name:"input:radio"})}}if(!y&&E===l&&!qe.has(E)&&!Jt.has(l)&&!Yt.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(R))E="ScrollView",b.horizontal=!0,b.showsHorizontalScrollIndicator??=!1;else if(E==="View"&&/(?:^|\s)overflow-y-(?:auto|scroll)(?:\s|$)/.test(R))E="ScrollView";if(l==="form")b["data-stx-form"]=!0;if(l==="button"&&b.type===void 0)b.type="submit";if((E==="Video"||E==="Image")&&b.source===void 0&&b.src!==void 0)b.source=b.src,delete b.src;if(E==="Icon"){let C=ue(R).icon,P=re(String(b.symbol||b.name||C||""),Boolean(b.symbol));if(b.symbol=P.symbol,P.iconify)b.iconify=P.iconify}if(E==="FlatList"||E==="SectionList"){let C=new Set([...Object.keys(b),...Object.keys(I)].map((P)=>P.toLowerCase()));for(let[P,L]of Br)if(C.has(P))n.push({kind:"unsupported-list-prop",tag:E,name:L})}let M=H(E,b,_,O);M._inlineStyle=T,M._styleSource=Z(p.find(([C])=>C==="style")?.[1]??"");let X=b["data-stx-b"];if(typeof X==="number"&&Number.isInteger(X))M.bindingId=X;if(delete b["data-stx-b"],R)M._classes=R;if(Object.keys(I).length>0)M.bindings=I;if(A.length>0)M._templated=A;if(typeof b.key==="string")M.key=b.key,delete b.key;return{tag:l,node:M,variables:k,declaredNative:typeof B==="string"&&qe.has(B),dropped:N||y||pe.has(l)||E==="Video",discard:N||y,unwrap:Yt.has(l)&&!j}}function w(l,p,v){let N=v?.dropped??!1,y=De[l];if(N||!y){if(!N&&!g.has(`drop:${l}`))g.add(`drop:${l}`),n.push({kind:jt.has(l)?"dropped-subtree":"unmapped-tag",tag:l});return{tag:l,node:H("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let k=v?.variables??i,{props:b,style:_,events:O,bindings:I,classes:R,inline:T,templated:A}=en(l,p,n,{inheritedVariables:k,onVariables:(M)=>{k=M},rules:u});if(y==="Svg"){let M=je(b.viewBox);if(M)b.viewBox=M;else delete b.viewBox;for(let X of["width","height"]){if(typeof b[X]==="number"&&_[X]===void 0)_[X]=b[X];delete b[X]}}if(typeof b.strokeDasharray==="string"||typeof b.strokeDasharray==="number"){let M=String(b.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);b.strokeDasharray=M}let B=Fe(y,b);if(B)b.geometry=B;if(y==="Animate")ze(b);let j=H(y,b,_,O);j._inlineStyle=T,j._styleSource=Z(p.find(([M])=>M==="style")?.[1]??"");let E=b["data-stx-b"];if(typeof E==="number"&&Number.isInteger(E))j.bindingId=E;if(delete b["data-stx-b"],R)j._classes=R;if(Object.keys(I).length>0)j.bindings=I;if(A.length>0)j._templated=A;if(typeof b.key==="string")j.key=b.key,delete b.key;return{tag:l,node:j,variables:k,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(l){let p=l.tagName.toLowerCase(),v=x(p,[...l.attributes]),N=!0;try{l.onEndTag(()=>{if(d.pop(),v.discard)return;if(v.unwrap)m(v);else h($r(v,n))})}catch{N=!1}if(N)d.push(v);else if(!v.discard)h(v.node)},text(l){let p=d[d.length-1];if(!p||p.dropped)return;let v=Z(l.text).replace(/\s+/g," ");if(!v.trim())return;p.node.children.push(v)}}).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]:H("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=Pe(l.props);if(Object.keys(p).length)l._accessibilitySource=Object.fromEntries(Oe.filter((v)=>(v in l.props)).map((v)=>[v,l.props[v]])),Object.assign(l.props,p);Dt(l);for(let v of l.children)if(typeof v!=="string")f(v)};return f(S),{root:S,diagnostics:n}}function Wr(t){if(t.props["data-stx-native-template"])return;if(t.bindings?.text||t.children.length===0)return;let e=t.children.filter((r)=>typeof r==="string");if(e.length<t.children.length){let r=t.type==="Button"||t.type==="Text"?null:Ge(e.join(""));if(!r)return;t.bindings={...t.bindings,text:r},t._templated=[...t._templated??[],"text"],t.children=t.children.filter((i)=>typeof i!=="string");return}let n=Ge(t.children.join(""));if(!n)return;if(t.type!=="Button")t.bindings={...t.bindings,text:n},t._templated=[...t._templated??[],"text"],t.children=[];else{t.type="Pressable",t.props.role??="button";let r=H("Text",{},{},{},[]);r.bindings={text:n},r._templated=["text"],t.children=[r]}}async function tn(t,e={}){let{root:n,diagnostics:r}=await jr(t,e),i=e.script??{exports:{},functions:[],code:""};return{document:Kt(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 Je(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 Ye(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,T)=>R?K.isAbsolute(R)?R:K.resolve(a,R):K.join(a,T),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}=st(m),f=await Ct(r),{document:l,diagnostics:p}=await tn(f?`<style>${f}</style>${w}`:w,{source:e,script:Je(t)});Jr(l.root,S);let v=d.__stx_runtime_head;if(typeof v?.title==="string"&&v.title.trim())l.title=v.title.trim();if(x)l.chrome=x;let N=Ye(w),y=ln(w);if(Je(t).code.trim()){let R=await Vr(t,e,n.context,{forceClientSetup:!0}),T=Ye(R.setupCode??"");if(N=T??N,T&&!y.some((A)=>A.code===T.code))y.push({code:T.code})}let{buildModuleRegistryScript:k,registeredModuleIdsIn:b}=await import("./chunk-w6x8m0tz.js"),_=async()=>{let R=[],T=await k(b(...y.map((A)=>A.code)),{collectInputs:R});for(let A of R)g.add(A);return T},O=await _();if([...y.map((R)=>R.code),O??""].some((R)=>/\buseStore\s*\(/.test(R))&&/<script\b[^>]*\bdata-stx-stores\b/i.test(w)){let{getStoreScript:R}=await import("./chunk-hj0raner.js"),T=await R(c.storesDir);if(T){y.unshift({code:T});for(let A of new Bun.Glob("*.ts").scanSync({cwd:c.storesDir,absolute:!0}))g.add(A);O=await _()}}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-8kskjg62.js");return gt(await e(t))}catch{return{}}}var ye="__runtime",ni="__messages";function Qe(t){let n=[D.join(import.meta.dir,"..","runtime",`${t}.ts`),D.join(import.meta.dir,"..","runtime",`${t}.js`),D.join(import.meta.dir,"native","runtime",`${t}.js`)].find((r)=>et(r));if(!n)throw Error(`Native runtime module ${t} is missing`);return n}async function Ze(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=D.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=D.join(n,a);if(!et(u))throw Error(`messages: ${D.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(D.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=D.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=D.isAbsolute(t.meta.source)?D.relative(e,t.meta.source).split(D.sep).join("/"):t.meta.source;return{...t,script:{exports:t.script.exports,functions:[],code:""},meta:{...t.meta,source:n,compiledAt:0}}}async function tt(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=D.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 A=D.resolve(i,t.screens[T]);if(!A.endsWith(".stx"))throw Error(`Screen ${T} must name a .stx file`);d.push({name:T,file:A,compiled:await me(A,{root:i})})}};await pt(u,()=>c?qs(c,g):g());let h=Qe("jsc-globals"),m=Qe("shared-screen"),x=t.app?D.resolve(i,t.app):null;if(x&&!et(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=ft();if(w&&t.routesDir)throw Error("A browser screen is one route; routesDir is for device hosts");let f=(T,A,B)=>{let j=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 ? ${!A} : ${JSON.stringify(T.map(({name:F})=>F))}.indexOf(routeName) === -1) throw new Error(['This bundle does not hold the native screen', routeName].join(' '));`:`var routeName = 'main';
|
|
11
|
-
var isApp = false;`,E=T.map(({name:F,compiled:q},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?F:"main")}) {
|
|
12
|
-
nativeDocument = ${JSON.stringify(li(q.document,i))};
|
|
13
|
-
manifest = ${JSON.stringify(q.manifest)};
|
|
14
|
-
}`).join(`
|
|
15
|
-
`),M=T.map(({name:F,compiled:q},Y)=>`${Y===0?"if":"else if"} (routeName === ${JSON.stringify(n?F:"main")}) {
|
|
16
|
-
g.__stx_latestSetup = null;
|
|
17
|
-
${q.scripts.map((G)=>G.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(G.owner)}] = function() {
|
|
21
|
-
${G.code}
|
|
22
|
-
};
|
|
23
|
-
g.__STX_SETUP_ROOT__ = screen && screen.scopeRoot(${JSON.stringify(G.owner)});
|
|
24
|
-
try { g.__stx_componentSetups[${JSON.stringify(G.owner)}](); }
|
|
25
|
-
finally { g.__STX_SETUP_ROOT__ = null; }`:G.code).join(`
|
|
26
|
-
`)}
|
|
27
|
-
}`).join(`
|
|
28
|
-
`),X=A&&x,C=w?Qe("browser-screen"):null,P=w?Bun.resolveSync(w.platformModule,i):null;return`
|
|
29
|
-
${B?`var runtime = globalThis.__stxNativeRuntime;
|
|
30
|
-
if (!runtime || runtime.version !== ${JSON.stringify(B)}) 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(P)};`:""}
|
|
37
|
-
${X?`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
|
-
${j}
|
|
50
|
-
g.__stxNativeRoute = routeName;
|
|
51
|
-
var nativeDocument;
|
|
52
|
-
var manifest;
|
|
53
|
-
${E}
|
|
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
|
-
${B?"runtime.startSignals();":S}
|
|
66
|
-
var pageSetup = g.__stx_latestSetup;
|
|
67
|
-
var pageRuntimeSetup = g.stx && g.stx._latestSetup;
|
|
68
|
-
${M}
|
|
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(A){A.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),A.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:T,loader:"js"}))}}),p=new Set(d.flatMap(({compiled:T})=>T.dependencies)),v=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:A})=>[T,A.document.chrome]))}:{},k=t.minify??!1,b,_,O;if(t.routesDir){let T=D.resolve(i,t.routesDir);un(T,{recursive:!0});let A=`
|
|
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
|
-
`,B,j=D.join(T,`${ye}.js`);if(t.sharedRuntime){let C=await Ze("stx:native-shared-screens",[l(A)],k,p);B=Bun.hash(C).toString(36),_=j,await Bun.write(_,C.replace("__STX_NATIVE_RUNTIME_VERSION__",B))}else dn(j,{force:!0});let E=D.join(T,ni);dn(E,{recursive:!0,force:!0});let M={},X=[...d.map((C)=>({name:C.name,screens:[C],app:!1})),...x?[{name:se,screens:[],app:!0}]:[]];b={};for(let C=0;C<X.length;C+=6)await Promise.all(X.slice(C,C+6).map(async(P)=>{let L=D.join(T,`${P.name}.js`),W=await Ze("stx:native-shared-screens",[l(f(P.screens,P.app,B))],k,p,c??void 0);if(await Bun.write(L,W),b[P.name]=L,a)M[P.name]=ci(W)}));if(a){for(let[P,L]of a.data)for(let[W,F]of L)await Bun.write(D.join(E,P,`${W}.json`),F);let C=Object.fromEntries(Object.keys(M).sort().map((P)=>[P,M[P]]));await Bun.write(D.join(E,"routes.json"),JSON.stringify(C));for(let P of a.files.keys())p.add(P);O={dir:E,languages:[...a.data.keys()],routes:C}}if(!t.outFile)return{code:"",routes:b,runtime:_,...O?{messages:O}:{},...y,diagnostics:v,dependencies:[...p]}}let I=await Ze("stx:native-shared-screens",[l(f(d,!0))],k,p);if(!t.outFile)return{code:I,...y,diagnostics:v,dependencies:[...p]};let R=D.resolve(i,t.outFile);return un(D.dirname(R),{recursive:!0}),await Bun.write(R,I),{code:I,outFile:R,...b?{routes:b,runtime:_}:{},...O?{messages:O}:{},...y,diagnostics:v,dependencies:[...p]}}async function ui(t,e={}){return tt({...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 tt({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};
|
package/dist/chunk-vryzt0p0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$u}from"./chunk-t7jxkrbx.js";import"./chunk-4teqcbw0.js";import"./chunk-sme31jbj.js";import"./chunk-fpz59dhz.js";import"./chunk-9k2wz3k1.js";import"./chunk-9edksf8x.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-fzqj1mjz.js";import"./chunk-365vg0eg.js";import"./chunk-vdjj4vrp.js";import"./chunk-kpeep7gq.js";import"./chunk-1sr6c0nk.js";import"./chunk-2dp7hyv7.js";import"./chunk-ce6zddpf.js";import"./chunk-pxdww4rb.js";export{$u as startProductionServer};
|