@stacksjs/stx 0.2.543 → 0.2.545
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-0xydscd9.js +2 -0
- package/dist/chunk-13xhvx68.js +2 -0
- package/dist/chunk-16e1y0dk.js +2 -0
- package/dist/{chunk-bczcm7jk.js → chunk-1b50m7e7.js} +2 -2
- package/dist/chunk-1hqxdn25.js +2 -0
- package/dist/{chunk-r9m4cgq9.js → chunk-1m3k0exr.js} +2 -2
- package/dist/chunk-1v2vehpc.js +2 -0
- package/dist/chunk-1w11d6gq.js +2 -0
- package/dist/chunk-2bpj2dsh.js +2 -0
- package/dist/{chunk-qmza4327.js → chunk-39tkfkp7.js} +3 -3
- package/dist/chunk-3j5bg3xq.js +2 -0
- package/dist/chunk-3m2h76cz.js +2 -0
- package/dist/{chunk-ty1v368m.js → chunk-3nc2fr4q.js} +2 -2
- package/dist/{chunk-hsf7nz8x.js → chunk-3v1av932.js} +2 -2
- package/dist/chunk-5141wftw.js +2 -0
- package/dist/{chunk-66s4nhp7.js → chunk-5fx8m234.js} +2 -2
- package/dist/chunk-5g7d3r7a.js +2 -0
- package/dist/{chunk-tzf7znh0.js → chunk-5ghn1gh5.js} +15 -15
- package/dist/{chunk-h51g1ydb.js → chunk-5hdby5qp.js} +4 -4
- package/dist/{chunk-s3r2pv39.js → chunk-64pbmrqg.js} +1 -1
- package/dist/{chunk-4d925m39.js → chunk-652v9mq4.js} +16 -16
- package/dist/chunk-6bcvd3pg.js +2 -0
- package/dist/chunk-6sa2s18z.js +2 -0
- package/dist/chunk-6w8r81kh.js +2 -0
- package/dist/{chunk-p15j9fzt.js → chunk-6wktqt18.js} +3 -3
- package/dist/chunk-6wpgxryt.js +2 -0
- package/dist/{chunk-292vew7b.js → chunk-74j18qk0.js} +28 -28
- package/dist/{chunk-jjwg83xv.js → chunk-75hb7wg6.js} +1 -1
- package/dist/{chunk-8m1y1kyr.js → chunk-77j26p6r.js} +6 -6
- package/dist/{chunk-0m3sjh3t.js → chunk-7dn3bdeh.js} +5 -5
- package/dist/chunk-7pewegtw.js +2 -0
- package/dist/{chunk-nd8v4xgb.js → chunk-7ze47qgv.js} +5 -5
- package/dist/{chunk-6dtmants.js → chunk-8a4g0mex.js} +5 -5
- package/dist/{chunk-ngxqydsg.js → chunk-8nwzd6eg.js} +3 -3
- package/dist/chunk-8sfdj65f.js +2 -0
- package/dist/{chunk-6abvk7vj.js → chunk-97vj2cqz.js} +2 -2
- package/dist/chunk-a3452td4.js +2 -0
- package/dist/chunk-a5kaw8sc.js +40 -0
- package/dist/{chunk-hvpzy98g.js → chunk-ah7h9q0x.js} +2 -2
- package/dist/{chunk-3bma1215.js → chunk-at2d96rz.js} +4 -4
- package/dist/{chunk-jbfad9cc.js → chunk-avgx6hd9.js} +2 -2
- package/dist/{chunk-wav410fm.js → chunk-b2fkxk6k.js} +3 -3
- package/dist/{chunk-zzphh8g9.js → chunk-b9jb44kv.js} +5 -5
- package/dist/chunk-byjr72wz.js +2 -0
- package/dist/chunk-cg8hg6cs.js +3 -0
- package/dist/{chunk-fq9vhy6b.js → chunk-cr4ab43x.js} +2 -2
- package/dist/chunk-cv8ea5yp.js +2 -0
- package/dist/{chunk-wh7xn313.js → chunk-d0yx9kef.js} +1 -1
- package/dist/{chunk-33bzhsyw.js → chunk-d37enreq.js} +3 -3
- package/dist/chunk-d7mfkc61.js +2 -0
- package/dist/chunk-d8fhthyf.js +2 -0
- package/dist/{chunk-x607yxrc.js → chunk-dyreg5df.js} +2 -2
- package/dist/{chunk-v9vvzdag.js → chunk-e124cgb6.js} +2 -2
- package/dist/{chunk-bpr4bkde.js → chunk-ec8k75ep.js} +2 -2
- package/dist/{chunk-gxedmh17.js → chunk-eeadhr78.js} +1 -1
- package/dist/{chunk-m011s2ha.js → chunk-f1n5napx.js} +3 -3
- package/dist/chunk-f8cs6j3n.js +2 -0
- package/dist/chunk-fprgww47.js +2 -0
- package/dist/{chunk-2kvbg3t5.js → chunk-frgpx23w.js} +4 -4
- package/dist/chunk-ft447y2j.js +2 -0
- package/dist/chunk-fyq2gste.js +2 -0
- package/dist/chunk-fz7dxc1q.js +2 -0
- package/dist/{chunk-m5fw8jq1.js → chunk-gjx5256r.js} +5 -5
- package/dist/{chunk-vfcwvqvd.js → chunk-hmehxwzj.js} +193 -193
- package/dist/chunk-hvs58485.js +2 -0
- package/dist/chunk-hzx0vtw0.js +2 -0
- package/dist/{chunk-y18yvcjb.js → chunk-j2erwdgt.js} +11 -11
- package/dist/chunk-jj4b0y48.js +2 -0
- package/dist/{chunk-tkvp3rz0.js → chunk-jmvp99ay.js} +7 -7
- package/dist/chunk-kb62w54c.js +2 -0
- package/dist/{chunk-xab6b4mt.js → chunk-kch9a9v1.js} +2 -2
- package/dist/chunk-kg8rbkcf.js +2 -0
- package/dist/{chunk-2bvk0qyd.js → chunk-kvmg6r89.js} +2 -2
- package/dist/{chunk-g12j8ahm.js → chunk-m6m19hwd.js} +4 -4
- package/dist/chunk-m9cmc6np.js +2 -0
- package/dist/chunk-m9r4x7e6.js +2 -0
- package/dist/{chunk-aqra6vsk.js → chunk-mbazkfy1.js} +3 -3
- package/dist/chunk-mbwdn96z.js +2 -0
- package/dist/{chunk-2me3dm0z.js → chunk-me81wras.js} +3 -3
- package/dist/chunk-mqje968d.js +2 -0
- package/dist/chunk-mxzge1d8.js +2 -0
- package/dist/chunk-myndj1r8.js +3 -0
- package/dist/{chunk-7tabykst.js → chunk-n1cqg89v.js} +2 -2
- package/dist/{chunk-0vn4gzyb.js → chunk-n77shkpy.js} +1 -1
- package/dist/chunk-njrakvz7.js +2 -0
- package/dist/{chunk-r2sy59wb.js → chunk-nrnq7x7p.js} +2 -2
- package/dist/chunk-pq8mz4ma.js +2 -0
- package/dist/{chunk-90wh9zzy.js → chunk-pz8mf91e.js} +5 -5
- package/dist/{chunk-dyegyt6m.js → chunk-q04fdq91.js} +2 -2
- package/dist/chunk-q24yyt9k.js +2 -0
- package/dist/chunk-qbsnvmj0.js +2 -0
- package/dist/chunk-qdrvx7vh.js +2 -0
- package/dist/chunk-qyj6zygv.js +2 -0
- package/dist/chunk-qzs6q626.js +2 -0
- package/dist/{chunk-d7zterbp.js → chunk-r4199q6x.js} +2 -2
- package/dist/chunk-r63aqsc9.js +2 -0
- package/dist/chunk-rrw61yk5.js +2 -0
- package/dist/chunk-rwgp4vt5.js +2 -0
- package/dist/chunk-sn98t7ef.js +2 -0
- package/dist/{chunk-3zqq3f2b.js → chunk-ssthwjpr.js} +5 -5
- package/dist/{chunk-2qbvsvwc.js → chunk-t61vdbje.js} +6 -6
- package/dist/chunk-te6s2apv.js +2 -0
- package/dist/chunk-tgfpk4ng.js +2 -0
- package/dist/chunk-v02g9244.js +2 -0
- package/dist/{chunk-c56qtne1.js → chunk-v2b8pa86.js} +1 -1
- package/dist/chunk-v2rhpdw3.js +2 -0
- package/dist/{chunk-vb4xxpa6.js → chunk-v39ysweq.js} +2 -2
- package/dist/chunk-v40d4bdy.js +2 -0
- package/dist/{chunk-vjdj0ex3.js → chunk-v79qs0qh.js} +1 -1
- package/dist/{chunk-m56m95gk.js → chunk-vpmb8gcc.js} +4 -4
- package/dist/{chunk-p8qr0q85.js → chunk-vvkfde23.js} +2 -2
- package/dist/{chunk-sgh6zsmc.js → chunk-vyjsrvpr.js} +3 -3
- package/dist/{chunk-150v780g.js → chunk-wcp4tf94.js} +23 -17
- package/dist/{chunk-yn3kp3qy.js → chunk-wy4hfmjs.js} +5 -5
- package/dist/{chunk-r6gxy92f.js → chunk-xya3vdqy.js} +2 -2
- package/dist/{chunk-3r1m3tyr.js → chunk-xzcmh5va.js} +1 -1
- package/dist/chunk-y83we135.js +2 -0
- package/dist/{chunk-0dqxnx20.js → chunk-yq1mvakj.js} +2 -2
- package/dist/{chunk-c2ys6ezs.js → chunk-ys3640vq.js} +9 -9
- package/dist/chunk-zfypzka2.js +2 -0
- package/dist/{chunk-9a73re8k.js → chunk-zmq9hwta.js} +2 -2
- package/dist/cli.js +43 -43
- package/dist/conditionals.js +2 -7
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/expressions.js +57 -4
- package/dist/interpolation-context.d.ts +27 -0
- package/dist/interpolation-context.js +46 -0
- package/dist/native/compiler/bundle.js +7 -1
- package/dist/native/compiler/render-screen.d.ts +2 -1
- package/dist/native/compiler/render-screen.js +7 -4
- package/dist/native/compiler/setup-script.d.ts +7 -0
- package/dist/native/compiler/setup-script.js +13 -2
- package/dist/native/live-activity.js +2 -0
- package/dist/native/runtime/binding-tree.d.ts +1 -0
- package/dist/native/runtime/binding-tree.js +10 -2
- package/dist/native/runtime/shared-screen.d.ts +2 -0
- package/dist/native/runtime/shared-screen.js +3 -0
- package/dist/pwa.js +3 -3
- package/dist/safe-evaluator.d.ts +1 -1
- package/dist/safe-evaluator.js +171 -66
- package/dist/ssg.js +2 -2
- package/package.json +5 -5
- package/dist/chunk-08emfsq3.js +0 -2
- package/dist/chunk-12v4d123.js +0 -2
- package/dist/chunk-2a4szpje.js +0 -3
- package/dist/chunk-2j0h8m7g.js +0 -2
- package/dist/chunk-3bwvaxk7.js +0 -2
- package/dist/chunk-3j4rze3n.js +0 -2
- package/dist/chunk-4hyhr5r7.js +0 -2
- package/dist/chunk-4q7ge545.js +0 -2
- package/dist/chunk-4qts8zk7.js +0 -2
- package/dist/chunk-4y2av4ev.js +0 -2
- package/dist/chunk-5gq8m2m7.js +0 -2
- package/dist/chunk-5rmc52h6.js +0 -2
- package/dist/chunk-69v9cn6n.js +0 -2
- package/dist/chunk-6sd4zdtg.js +0 -2
- package/dist/chunk-6tnh3cyq.js +0 -2
- package/dist/chunk-6va8wt88.js +0 -2
- package/dist/chunk-9a111pet.js +0 -3
- package/dist/chunk-9e1hftmd.js +0 -2
- package/dist/chunk-9etv5vzp.js +0 -2
- package/dist/chunk-9skdekv5.js +0 -2
- package/dist/chunk-c2cdv6rh.js +0 -2
- package/dist/chunk-cp4dr9ch.js +0 -2
- package/dist/chunk-d576yrbj.js +0 -2
- package/dist/chunk-dw5hrb3n.js +0 -2
- package/dist/chunk-ev51qyw1.js +0 -2
- package/dist/chunk-f1fyvqz0.js +0 -2
- package/dist/chunk-frw35d2v.js +0 -2
- package/dist/chunk-fzn7k9kn.js +0 -2
- package/dist/chunk-gsm1y1kb.js +0 -2
- package/dist/chunk-h1kssqxk.js +0 -2
- package/dist/chunk-h4crv0by.js +0 -2
- package/dist/chunk-h5p3h200.js +0 -2
- package/dist/chunk-j9c0yam7.js +0 -2
- package/dist/chunk-jt6p29k1.js +0 -2
- package/dist/chunk-jxbx6dk4.js +0 -2
- package/dist/chunk-kqkja1n4.js +0 -2
- package/dist/chunk-m27w29q6.js +0 -2
- package/dist/chunk-m7ddp1jw.js +0 -2
- package/dist/chunk-m7jmpech.js +0 -2
- package/dist/chunk-m8n9wxba.js +0 -2
- package/dist/chunk-ndv44bgs.js +0 -2
- package/dist/chunk-nssdvec7.js +0 -2
- package/dist/chunk-pkfwxp9n.js +0 -2
- package/dist/chunk-qtgejdvq.js +0 -2
- package/dist/chunk-rdy49a05.js +0 -2
- package/dist/chunk-rx4hz615.js +0 -2
- package/dist/chunk-sb0j0v59.js +0 -2
- package/dist/chunk-shf0hd05.js +0 -2
- package/dist/chunk-t1g1sp2z.js +0 -2
- package/dist/chunk-vdh825gt.js +0 -2
- package/dist/chunk-vhfwnvmc.js +0 -40
- package/dist/chunk-vm2cbysz.js +0 -2
- package/dist/chunk-wzymzex7.js +0 -2
- package/dist/chunk-xey01yna.js +0 -2
- package/dist/chunk-xmd8wp8x.js +0 -2
- package/dist/chunk-xmwd2xm6.js +0 -2
- package/dist/chunk-yw3cqy43.js +0 -2
- package/dist/chunk-zpf9he2x.js +0 -2
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-vhfwnvmc.js";import"./chunk-bpr4bkde.js";import"./chunk-2bvk0qyd.js";import{dr,Fs,Ui}from"./chunk-d7zterbp.js";import"./chunk-6v1gwdbv.js";import{Vn,Kn,n,o}from"./chunk-vfcwvqvd.js";import"./chunk-y18yvcjb.js";import"./chunk-tkvp3rz0.js";import"./chunk-v9vvzdag.js";import"./chunk-dyegyt6m.js";import"./chunk-1xgs9gd5.js";import"./chunk-x607yxrc.js";import{De}from"./chunk-h51g1ydb.js";import"./chunk-bczcm7jk.js";import{existsSync as ee,mkdirSync as rn,readFileSync as on}from"fs";import C from"path";import{existsSync as Ye,mkdirSync as en}from"fs";import F from"path";import{existsSync as Jt}from"fs";import H from"path";var tt="data-stx-b",Ne=new Set(Fs),nt=new Set(dr);function rt(r){if(r==="ref"||r==="data-stx-ref")return"ref";if(r.startsWith("::"))return null;if(r.startsWith("@bind:")||r.startsWith("x-bind:"))return"attr";if(r.startsWith("@")||r.startsWith(":")){let e=r.slice(1).split(".")[0];if(Ne.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(Ui(e))return"event";if(r.startsWith("@"))return"event";return"attr"}if(r.startsWith("x-")){let e=r.split(".")[0];if(!nt.has(e))return"attr";let t=e.slice(2);if(t==="cloak"||t==="data"||t==="bind")return null;if(t==="tooltip"||t==="tooltip-position")return null;return Ne.has(t)?t==="if"?"if":t:"attr"}return null}function it(r){let e=[];for(let[t,i]of r){let s=rt(t);if(s)e.push({name:t,value:i,kind:s})}return e}var ot=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,re=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function Te(r){let e=[],t=0;return{html:r.replace(ot,(s,a,c)=>{if(!c||!/[:@]|x-/.test(c))return s;let d=[];re.lastIndex=0;for(let p=re.exec(c);p;p=re.exec(c))d.push([p[1],p[2]??p[3]??p[4]??""]);let l=it(d);if(!l.length)return s;let f={id:t++,bindings:l};if(l.some((p)=>p.kind==="for"))f.template=!0;e.push(f);let m=s.endsWith("/>");return`${s.slice(0,m?-2:-1).trimEnd()} ${tt}="${f.id}"${m?"/>":">"}`}),manifest:{entries:e}}}var oe={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText"},se=new Set(Object.values(oe));var Ee=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),_e=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight"];function R(r){let e=typeof r==="number"?r:Number.parseFloat(String(r??""));return Number.isFinite(e)?e:0}function V(r){return Math.round(r*1000)/1000}function ae(r){if(Array.isArray(r)&&r.length===4&&r.every((t)=>Number.isFinite(Number(t))))return r.map(Number);let e=String(r??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((t)=>!Number.isFinite(t))||e[2]<=0||e[3]<=0)return null;return e}function st(r){let e=String(r??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var Re=/[MLHVCSQTAZ]/i,ie=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function at(r){let e=[],t=r,i=Re.exec(t);while(i){let s=i.index;t=t.slice(s);let a=t[0];t=t.slice(1);let c=Re.exec(t),d=c?t.slice(0,c.index):t,l;if(a==="A"||a==="a"){l=[];let f=0,m=d.trim(),u=0;while(u<m.length){let p=f%7,b=m.slice(u).replace(/^[\s,]+/,"");if(u=m.length-b.length,!b)break;if(p===3||p===4)l.push(b[0]==="1"?1:0),u+=1;else{ie.lastIndex=0;let v=ie.exec(b);if(!v||v.index!==0)break;l.push(Number.parseFloat(v[0])),u+=v[0].length}f++}}else l=(d.match(ie)||[]).map(Number.parseFloat);e.push({command:a,args:l}),i=c}return e}function ct(r,e,t,i,s,a,c,d,l){if(r===d&&e===l)return[];let f=Math.abs(t),m=Math.abs(i);if(!f||!m)return[1,d,l];let u=s*Math.PI/180,p=Math.cos(u),b=Math.sin(u),v=(r-d)/2,S=(e-l)/2,g=p*v+b*S,w=-b*v+p*S,N=g*g/(f*f)+w*w/(m*m);if(N>1)f*=Math.sqrt(N),m*=Math.sqrt(N);let A=f*f*m*m-f*f*w*w-m*m*g*g,h=f*f*w*w+m*m*g*g,y=Math.sqrt(Math.max(0,A/h));if(a===c)y=-y;let x=y*(f*w)/m,k=y*-(m*g)/f,I=p*x-b*k+(r+d)/2,O=b*x+p*k+(e+l)/2,P=(E,_,B,X)=>{let te=E*X-_*B<0?-1:1,ne=(E*B+_*X)/(Math.hypot(E,_)*Math.hypot(B,X));return te*Math.acos(Math.min(1,Math.max(-1,ne)))},L=P(1,0,(g-x)/f,(w-k)/m),D=P((g-x)/f,(w-k)/m,(-g-x)/f,(-w-k)/m);if(!c&&D>0)D-=2*Math.PI;if(c&&D<0)D+=2*Math.PI;let U=Math.max(1,Math.ceil(Math.abs(D)/(Math.PI/2))),ye=D/U,q=1.3333333333333333*Math.tan(ye/4),ve=[],Se=(E)=>{let _=f*Math.cos(E),B=m*Math.sin(E);return[p*_-b*B+I,b*_+p*B+O]},we=(E)=>{let _=-f*Math.sin(E),B=m*Math.cos(E);return[p*_-b*B,b*_+p*B]},G=L;for(let E=0;E<U;E++){let _=G+ye,[B,X]=Se(G),[te,ne]=we(G),[xe,ke]=Se(_),[Ze,et]=we(_);ve.push(2,B+q*te,X+q*ne,xe-q*Ze,ke-q*et,E===U-1?d:xe,E===U-1?l:ke),G=_}return ve}function lt(r){let e=[],t=0,i=0,s=0,a=0,c=0,d=0,l=0,f=0,m="";for(let{command:u,args:p}of at(String(r??""))){let b=u===u.toLowerCase(),v=u.toUpperCase(),S=()=>b?t:0,g=()=>b?i:0,w=0,N=(h)=>{if(w+h>p.length)return null;let y=p.slice(w,w+h);return w+=h,y};if(v==="Z"){e.push(4),t=s,i=a,m="Z";continue}let A=!0;while(w<p.length||A&&v==="Z"){switch(v){case"M":{let h=N(2);if(!h)return e;if(t=h[0]+S(),i=h[1]+g(),A)e.push(0,t,i),s=t,a=i;else e.push(1,t,i);m=A?"M":"L";break}case"L":{let h=N(2);if(!h)return e;t=h[0]+S(),i=h[1]+g(),e.push(1,t,i),m="L";break}case"H":{let h=N(1);if(!h)return e;t=h[0]+S(),e.push(1,t,i),m="L";break}case"V":{let h=N(1);if(!h)return e;i=h[0]+g(),e.push(1,t,i),m="L";break}case"C":{let h=N(6);if(!h)return e;let y=h[0]+S(),x=h[1]+g();c=h[2]+S(),d=h[3]+g(),t=h[4]+S(),i=h[5]+g(),e.push(2,y,x,c,d,t,i),m="C";break}case"S":{let h=N(4);if(!h)return e;let y=m==="C"?2*t-c:t,x=m==="C"?2*i-d:i;c=h[0]+S(),d=h[1]+g(),t=h[2]+S(),i=h[3]+g(),e.push(2,y,x,c,d,t,i),m="C";break}case"Q":{let h=N(4);if(!h)return e;l=h[0]+S(),f=h[1]+g(),t=h[2]+S(),i=h[3]+g(),e.push(3,l,f,t,i),m="Q";break}case"T":{let h=N(2);if(!h)return e;l=m==="Q"?2*t-l:t,f=m==="Q"?2*i-f:i,t=h[0]+S(),i=h[1]+g(),e.push(3,l,f,t,i),m="Q";break}case"A":{let h=N(7);if(!h)return e;let y=h[5]+S(),x=h[6]+g();e.push(...ct(t,i,h[0],h[1],h[2],h[3],h[4],y,x)),t=y,i=x,m="A";break}default:return e}A=!1}}return e.map((u)=>V(u))}function Ae(r,e,t,i){if(t<=0||i<=0)return[];let s=0.5522847498;return[0,r+t,e,2,r+t,e+s*i,r+s*t,e+i,r,e+i,2,r-s*t,e+i,r-t,e+s*i,r-t,e,2,r-t,e-s*i,r-s*t,e-i,r,e-i,2,r+s*t,e-i,r+t,e-s*i,r+t,e,4].map(V)}function ce(r,e){switch(r){case"Path":return lt(String(e.d??""));case"Line":return[0,R(e.x1),R(e.y1),1,R(e.x2),R(e.y2)].map(V);case"Rect":{let t=R(e.x),i=R(e.y),s=R(e.width),a=R(e.height);if(s<=0||a<=0)return[];let c=e.rx===void 0?R(e.ry):R(e.rx),d=e.ry===void 0?c:R(e.ry);if(c=Math.min(Math.max(0,c),s/2),d=Math.min(Math.max(0,d),a/2),!c||!d)return[0,t,i,1,t+s,i,1,t+s,i+a,1,t,i+a,4].map(V);let l=0.5522847498;return[0,t+c,i,1,t+s-c,i,2,t+s-c+l*c,i,t+s,i+d-l*d,t+s,i+d,1,t+s,i+a-d,2,t+s,i+a-d+l*d,t+s-c+l*c,i+a,t+s-c,i+a,1,t+c,i+a,2,t+c-l*c,i+a,t,i+a-d+l*d,t,i+a-d,1,t,i+d,2,t,i+d-l*d,t+c-l*c,i,t+c,i,4].map(V)}case"Circle":return Ae(R(e.cx),R(e.cy),R(e.r),R(e.r));case"Ellipse":return Ae(R(e.cx),R(e.cy),R(e.rx),R(e.ry));case"Polyline":case"Polygon":{let t=st(e.points);if(t.length<4)return[];let i=[0,t[0],t[1]];for(let s=2;s<t.length;s+=2)i.push(1,t[s],t[s+1]);if(r==="Polygon")i.push(4);return i.map(V)}default:return null}}var dt=[..._e,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","mapType","strokeColor","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],Ie=new Set(["animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pictureInPicture"]),ut=new Map(dt.map((r)=>[Pe(r),r]));function Pe(r){return r.replace(/[-_]/g,"").toLowerCase()}function le(r){return ut.get(Pe(r))??r}var ft={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",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 Ce(r){return ft[r.toLowerCase()]||r}var pt={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",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",bed:"bed.double",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",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","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",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",dumbbell:"dumbbell",edit:"pencil","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal","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",mic:"mic",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",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",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",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",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function de(r,e=!1){let t=String(r??"").trim();if(!t)return{symbol:"circle",known:!1};if(e)return{symbol:t,known:!0};let i=/^i-([a-z0-9]+)-(.+)$/.exec(t)??/^([a-z0-9]+):(.+)$/.exec(t),s=i?i[1]:"lucide",a=i?i[2]:t;if(s==="lucide"){let c=pt[a];if(c)return{symbol:c,iconify:`i-lucide-${a}`,known:!0};if(!i&&t.includes("."))return{symbol:t,known:!0}}return{symbol:"circle",iconify:i?t:`i-lucide-${a}`,known:!1}}var gt={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"}},Me={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},Be={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},M={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function W(r){let e=r.lastIndexOf("/");if(e>0&&!r.endsWith("]")){let i=W(r.slice(0,e)),s=r.slice(e+1),a=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!i||!Number.isFinite(a))return;return ht(i,a/100)}if(r==="transparent")return"transparent";if(r==="current")return"currentColor";if(r==="black")return"#000000";if(r==="white")return"#ffffff";let t=r.split("-");if(t.length===2){let[i,s]=t,a=gt[i];if(a&&typeof a==="object")return a[s]}if(r.startsWith("[")&&r.endsWith("]")){let i=r.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function ht(r,e){if(r==="transparent")return r;let t=r.startsWith("#")?r.slice(1):"";if(t.length===3)t=t.split("").map((s)=>s+s).join("");if(t.length===8)t=t.slice(0,6);if(t.length!==6)return;let i=Math.round(Math.min(1,Math.max(0,e))*255);return`#${t}${i.toString(16).padStart(2,"0")}`}function ue(r,e=16){if(!r.startsWith("[")||!r.endsWith("]"))return;let t=r.slice(1,-1),i=Number.parseFloat(t);if(!Number.isFinite(i))return;if(t.endsWith("rem"))return i*16;if(t.endsWith("em"))return i*e;return i}function T(r){if(r.startsWith("[")&&r.endsWith("]")){let e=r.slice(1,-1);if(e.endsWith("%"))return;let t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return Me[r]}function K(r){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(r);if(e)return`${Number.parseFloat(e[1])}%`;return T(r)}var mt={flex:(r,e)=>(e.display="flex",!0),hidden:(r,e)=>(e.display="none",!0),grid:(r,e)=>(e.display="grid",!0),"flex-row":(r,e)=>(e.flexDirection="row",!0),"flex-col":(r,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(r,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(r,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(r,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(r,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(r,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(r,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(r,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(r,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(r,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(r,e)=>(e.flexGrow=1,!0),"grow-0":(r,e)=>(e.flexGrow=0,!0),shrink:(r,e)=>(e.flexShrink=1,!0),"shrink-0":(r,e)=>(e.flexShrink=0,!0),"justify-start":(r,e)=>(e.justifyContent="flex-start",!0),"justify-center":(r,e)=>(e.justifyContent="center",!0),"justify-end":(r,e)=>(e.justifyContent="flex-end",!0),"justify-between":(r,e)=>(e.justifyContent="space-between",!0),"justify-around":(r,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(r,e)=>(e.justifyContent="space-evenly",!0),"items-start":(r,e)=>(e.alignItems="flex-start",!0),"items-center":(r,e)=>(e.alignItems="center",!0),"items-end":(r,e)=>(e.alignItems="flex-end",!0),"items-stretch":(r,e)=>(e.alignItems="stretch",!0),"items-baseline":(r,e)=>(e.alignItems="baseline",!0),"self-auto":(r,e)=>(e.alignSelf="auto",!0),"self-start":(r,e)=>(e.alignSelf="flex-start",!0),"self-center":(r,e)=>(e.alignSelf="center",!0),"self-end":(r,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(r,e)=>(e.alignSelf="stretch",!0),"self-baseline":(r,e)=>(e.alignSelf="baseline",!0),"min-w-0":(r,e)=>(e.minWidth=0,!0),"aspect-square":(r,e)=>(e.aspectRatio=1,!0),"inset-0":(r,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(r,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(r,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(r,e)=>(e.letterSpacing=0,!0),"tracking-wide":(r,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(r,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(r,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(r,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(r,e)=>(e.position="relative",!0),absolute:(r,e)=>(e.position="absolute",!0),"overflow-visible":(r,e)=>(e.overflow="visible",!0),"overflow-hidden":(r,e)=>(e.overflow="hidden",!0),"overflow-scroll":(r,e)=>(e.overflow="scroll",!0),"font-thin":(r,e)=>(e.fontWeight="100",!0),"font-extralight":(r,e)=>(e.fontWeight="200",!0),"font-light":(r,e)=>(e.fontWeight="300",!0),"font-normal":(r,e)=>(e.fontWeight="400",!0),"font-medium":(r,e)=>(e.fontWeight="500",!0),"font-semibold":(r,e)=>(e.fontWeight="600",!0),"font-bold":(r,e)=>(e.fontWeight="bold",!0),"font-extrabold":(r,e)=>(e.fontWeight="800",!0),"font-black":(r,e)=>(e.fontWeight="900",!0),italic:(r,e)=>(e.fontStyle="italic",!0),"not-italic":(r,e)=>(e.fontStyle="normal",!0),"text-left":(r,e)=>(e.textAlign="left",!0),"text-center":(r,e)=>(e.textAlign="center",!0),"text-right":(r,e)=>(e.textAlign="right",!0),"text-justify":(r,e)=>(e.textAlign="justify",!0),uppercase:(r,e)=>(e.textTransform="uppercase",!0),lowercase:(r,e)=>(e.textTransform="lowercase",!0),capitalize:(r,e)=>(e.textTransform="capitalize",!0),"normal-case":(r,e)=>(e.textTransform="none",!0),underline:(r,e)=>(e.textDecorationLine="underline",!0),"line-through":(r,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(r,e)=>(e.textDecorationLine="none",!0)};function bt(r,e){if(!r.startsWith("bg-"))return!1;let t=r.slice(3),i=W(t);if(i)return e.backgroundColor=i,!0;return!1}function yt(r,e){if(!r.startsWith("text-"))return!1;let t=r.slice(5);if(Be[t])return e.fontSize=Be[t],!0;if(t.startsWith("[")&&t.endsWith("]")){let s=t.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(s)){let a=s.endsWith("rem")||s.endsWith("em")?Number.parseFloat(s)*16:Number.parseFloat(s);if(Number.isFinite(a))return e.fontSize=a,!0}}let i=W(t);if(i)return e.color=i,!0;return!1}var vt=new Set(["t","tr","r","br","b","bl","l","tl"]);function St(r,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(r);if(t&&vt.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let i=/^(from|via|to)-(.+)$/.exec(r);if(!i)return!1;let s=W(i[2]);if(!s)return!1;if(i[1]==="from")e.gradientFrom=s;else if(i[1]==="via")e.gradientVia=s;else e.gradientTo=s;return!0}function wt(r,e){for(let t of["fill","stroke"]){let i=`${t}-`;if(!r.startsWith(i))continue;let s=r.slice(i.length);if(s==="none")return e[t]="none",!0;if(t==="stroke"&&/^\d+(?:\.\d+)?$/.test(s))return e.strokeWidth=Number.parseFloat(s),!0;if(t==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(s))return e.strokeWidth=Number.parseFloat(s.slice(1)),!0;let a=W(s);if(a)return e[t]=a,!0}return!1}function xt(r,e){if(r.startsWith("p-")){let t=T(r.slice(2));if(t!==void 0)return e.padding=t,!0}if(r.startsWith("px-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(r.startsWith("py-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(r.startsWith("pt-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(r.startsWith("pr-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(r.startsWith("pb-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(r.startsWith("pl-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function kt(r,e){if(r.startsWith("m-")){let t=T(r.slice(2));if(t!==void 0)return e.margin=t,!0}if(r.startsWith("mx-")){let t=T(r.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(r.startsWith("my-")){let t=T(r.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(r.startsWith("mt-")){let t=T(r.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(r.startsWith("mr-")){let t=T(r.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(r.startsWith("mb-")){let t=T(r.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(r.startsWith("ml-")){let t=T(r.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function Nt(r,e){if(!r.startsWith("w-"))return!1;let t=r.slice(2);if(t==="full")return e.width="100%",!0;if(t==="screen")return e.width="100%",!0;if(t==="auto")return e.width="auto",!0;if(t.includes("/")){let[s,a]=t.split("/"),c=Number.parseInt(s)/Number.parseInt(a)*100;return e.width=`${c}%`,!0}let i=K(t);if(i!==void 0)return e.width=i,!0;return!1}function Tt(r,e){if(!r.startsWith("h-"))return!1;let t=r.slice(2);if(t==="full")return e.height="100%",!0;if(t==="screen")return e.height="100%",!0;if(t==="auto")return e.height="auto",!0;let i=K(t);if(i!==void 0)return e.height=i,!0;return!1}function Rt(r,e){if(!r.startsWith("rounded"))return!1;if(r==="rounded")return e.borderRadius=M.DEFAULT,!0;let t=r.slice(8);if(t==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(t);if(i){let a=ue(i[2]);if(a===void 0)return!1;let c={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let d of i[1]?c[i[1]]:["borderRadius"])e[d]=a;return!0}if(t.startsWith("t-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderTopLeftRadius=a,e.borderTopRightRadius=a,!0}if(t.startsWith("b-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderBottomLeftRadius=a,e.borderBottomRightRadius=a,!0}if(t.startsWith("l-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderTopLeftRadius=a,e.borderBottomLeftRadius=a,!0}if(t.startsWith("r-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderTopRightRadius=a,e.borderBottomRightRadius=a,!0}let s=M[t];if(s!==void 0)return e.borderRadius=s,!0;return!1}function At(r,e){if(!r.startsWith("border"))return!1;if(r==="border")return e.borderWidth=1,!0;let t=r.match(/^border-(\d+)$/);if(t)return e.borderWidth=Number.parseInt(t[1]),!0;let i=r.match(/^border-(t|r|b|l)-?(\d*)$/);if(i){let[,s,a]=i,c=a?Number.parseInt(a):1;switch(s){case"t":e.borderTopWidth=c;break;case"r":e.borderRightWidth=c;break;case"b":e.borderBottomWidth=c;break;case"l":e.borderLeftWidth=c;break}return!0}return!1}function Et(r,e){if(!r.startsWith("border-"))return!1;let t=r.slice(7),i=W(t);if(i)return e.borderColor=i,!0;return!1}function _t(r,e){if(!r.startsWith("opacity-"))return!1;let t=Number.parseInt(r.slice(8));if(!Number.isNaN(t))return e.opacity=t/100,!0;return!1}function It(r,e){if(r.startsWith("tracking-[")){let t=ue(r.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(t===void 0)return!1;return e.letterSpacing=t,!0}if(r.startsWith("leading-")){let t=r.slice(8),i=typeof e.fontSize==="number"?e.fontSize:16,s={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=t.startsWith("[")?/^\[[\d.]+\]$/.test(t)?Number.parseFloat(t.slice(1,-1))*i:ue(t,i):s[t]!==void 0?s[t]*i:Me[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Pt(r,e){let t=/^grid-cols-(\d+)$/.exec(r);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function Ct(r,e){if(!r.startsWith("size-"))return!1;let t=r.slice(5),i=t==="full"?"100%":K(t);if(i===void 0)return!1;return e.width=i,e.height=i,!0}var Bt={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function Ot(r,e){let t=/^(min|max)-(w|h)-(.+)$/.exec(r);if(!t)return!1;let[,i,s,a]=t,c=a==="full"||a==="screen"?"100%":a==="none"?void 0:s==="w"&&i==="max"&&Bt[a]||K(a);if(c===void 0&&a!=="none")return!1;let d=`${i}${s==="w"?"Width":"Height"}`;if(c===void 0)delete e[d];else e[d]=c;return!0}function Mt(r,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(r);if(!t)return!1;let i=t[3]==="full"?"100%":T(t[3]);if(i===void 0)return!1;return e[t[2]]=typeof i==="number"&&t[1]?-i:i,!0}function Lt(r,e){let t=/^space-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=T(t[2]);if(i===void 0)return!1;return e.gap=i,!0}function Dt(r,e){if(r.startsWith("gap-")){let t=T(r.slice(4));if(t!==void 0)return e.gap=t,!0}if(r.startsWith("gap-x-")){let t=T(r.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(r.startsWith("gap-y-")){let t=T(r.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function Y(r){let e=[],t=[],i=[];function s(l,f){let m=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(l),u=m&&Vn[m[2]];return u?`${m[1]}-${u[f]}${m[3]||""}`:l}for(let l of r.split(/\s+/).filter(Boolean))if(l.startsWith("dark:"))t.push(s(l.slice(5),"dark"));else if(!l.includes(":")||l.startsWith("[")){if(e.push(s(l,"light")),s(l,"dark")!==l)i.push(s(l,"dark"))}let a=[],d={style:Oe(e.join(" "),a),unknown:a};if(t.length||i.length)d.dark=Oe([...i,...t].join(" "),a);for(let l of e){if(l==="truncate")d.numberOfLines=1;let f=/^line-clamp-(\d+)$/.exec(l);if(f)d.numberOfLines=Number(f[1]);if(!d.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(l))d.icon=l}return d.unknown=a.filter((l)=>!/^line-clamp-\d+$/.test(l)),d}function Oe(r,e){let t={},i=r.split(/\s+/).filter(Boolean);for(let s of i){if(/^i-[a-z0-9]+-/.test(s))continue;let a=mt[s];if(a){a("",t);continue}if(St(s,t))continue;if(bt(s,t))continue;if(wt(s,t))continue;if(yt(s,t))continue;if(xt(s,t))continue;if(kt(s,t))continue;if(Nt(s,t))continue;if(Tt(s,t))continue;if(Rt(s,t))continue;if(At(s,t))continue;if(Et(s,t))continue;if(_t(s,t))continue;if(Dt(s,t))continue;if(It(s,t))continue;if(Ct(s,t))continue;if(Ot(s,t))continue;if(Pt(s,t))continue;if(Mt(s,t))continue;if(Lt(s,t))continue;if(e?.push(s),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${s}`)}return t}function z(r,e={},t={},i={},s=[]){return{type:r,props:e,style:t,events:i,children:s}}function Le(r,e,t={}){return{version:"1.0.0",root:r,script:e,meta:{source:t.source||"unknown",compiledAt:t.compiledAt||Date.now(),headwindConfig:t.headwindConfig}}}var Fe=new Set(["script","style","head","meta","link","title","base","noscript"]),Ve=new Set(["template","body","html","main","fragment"]),J=new Set,Ft={click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",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"},Vt=new Set(["onBlur","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),fe=new Set(["display","gridColumns","gridTemplateColumns","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","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","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),Wt=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),$t=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"]),We=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...se]),zt=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"],["listrole","listRole"]]),$e=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Xt={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function j(r){return r.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let i=Xt[t.toLowerCase()];if(i!==void 0)return i;if(t[0]==="#"){let s=t[1]==="x"||t[1]==="X"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):e}return e})}function ze(r){return r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Xe(r){let e=/^(-?[\d.]+)px$/.exec(r);if(e)return Number.parseFloat(e[1]);let t=/^(-?[\d.]+)r?em$/.exec(r);if(t)return Number.parseFloat(t[1])*16;if(/^-?[\d.]+$/.test(r))return Number.parseFloat(r);return r}function je(r,e,t){let i={},s={},a={},c="",d={};for(let[m,u]of e){let p=m.toLowerCase();if(p==="class"||p==="classname"){c=c?`${c} ${u}`:u;continue}if(p==="style"){d={...d,...Ht(r,u,t)};continue}if(p.startsWith(":")||p.startsWith("x-")&&p!=="x-cloak"){a[p.startsWith(":")?p.slice(1):p.slice(2)]=j(u);continue}if(p==="x-cloak")continue;if(p.startsWith("@")||p.startsWith("v-on:")){let S=p.startsWith("@")?p.slice(1):p.slice(5),[g]=S.split("."),w=Ft[g]??(g.startsWith("on")?g:"");if(!w||!Vt.has(w)){t.push({kind:"unread-event",tag:r,name:m});continue}s[w]=j(u);continue}if(p==="key"){i.key=u;continue}let b=j(u),v=le(m);if(b===""&&Ie.has(v)){i[v]=!0;continue}try{i[v]=JSON.parse(b)}catch{i[v]=b}}let l=c?Y(c):void 0;for(let m of new Set(l?.unknown??[]))t.push({kind:"unknown-class",tag:r,name:m});let f={...l?.style,...d};return{props:i,style:f,events:s,bindings:a,classes:c,inline:d}}function jt(r,e){if(r==="shadowOffset"){if(!e||typeof e!=="object"||Array.isArray(e))return;let{width:t,height:i}=e;return typeof t==="number"&&typeof i==="number"?{width:t,height:i}:void 0}if(r==="transform"){if(!Array.isArray(e))return;let t=e.filter((i)=>Boolean(i)&&typeof i==="object"&&!Array.isArray(i)&&Object.keys(i).length===1).filter((i)=>["number","string"].includes(typeof Object.values(i)[0]));return t.length?t:void 0}return}function He(r,e){if(Wt.has(r))return!1;if($t.has(r))return/^-?[\d.]+%$/.test(e);return!0}function Ht(r,e,t){let i={},s=j(e);try{let a=JSON.parse(s);if(a&&typeof a==="object"&&!Array.isArray(a)){for(let[c,d]of Object.entries(a)){let l=fe.has(c)?c:ze(c.trim().toLowerCase());if(!fe.has(l)){t.push({kind:"unknown-style",tag:r,name:l});continue}if(d===null||d===void 0)continue;let f=typeof d==="string"?Xe(d):d;if(typeof f==="object"){let m=jt(l,f);if(m===void 0)t.push({kind:"non-numeric-style",tag:r,name:l});else i[l]=m;continue}if(typeof f!=="string"&&typeof f!=="number")continue;if(typeof f==="string"&&!He(l,f)){t.push({kind:"non-numeric-style",tag:r,name:l});continue}i[l]=f}return i}}catch{}for(let a of s.split(";")){let c=a.indexOf(":");if(c===-1)continue;let d=ze(a.slice(0,c).trim().toLowerCase()),l=a.slice(c+1).trim();if(!d||!l)continue;if(!fe.has(d)){t.push({kind:"unknown-style",tag:r,name:d});continue}let f=Xe(l);if(typeof f==="string"&&!He(d,f)){t.push({kind:"non-numeric-style",tag:r,name:d});continue}i[d]=f}return i}function pe(r){return r.children.map((e)=>typeof e==="string"?e:pe(e)).join("").replace(/\s+/g," ").trim()}function Ut(r,e){let t=r.node,i=t.children.filter((a)=>typeof a!=="string"),s=t.children.filter((a)=>typeof a==="string").join("").trim();if(t.type==="Svg"||t.type==="G")return t.children=i,t;if(t.type==="SvgText"){let a=pe(t);return t.children=a?[a]:[],t}if($e.has(t.type)&&i.length===0&&s)return t.type="Text",t.children=[s],t;if(t.type==="Text"&&!s&&i.length===0&&typeof t.props.text==="string")return t.children=t.props.text?[t.props.text]:[],delete t.props.text,t;if(t.type==="Text"&&i.length>0){let a=pe(t);return e.push({kind:"flattened-text",tag:r.tag}),t.children=a?[a]:[],t}if($e.has(t.type)&&i.length>0)t.children=i;return t}async function qt(r,e={}){let t=[],i=[],s=[],a=new Set;function c(u){let p=s[s.length-1];if(!p)i.push(u);else if(!p.dropped)p.node.children.push(u)}function d(u){if(u.node.bindings&&Object.keys(u.node.bindings).length>0){let b=u.node.children,v=b.filter((g)=>typeof g!=="string"),S=v.length===1&&v.length===b.length?v[0]:z("View",{},{},{},b);if(S.bindings={...u.node.bindings,...S.bindings},S.bindingId===void 0&&u.node.bindingId!==void 0)S.bindingId=u.node.bindingId;c(S);return}let p=s[s.length-1];for(let b of u.node.children){if(typeof b==="string"){if(p&&!p.dropped)p.node.children.push(b);continue}if(!p)i.push(b);else if(!p.dropped)p.node.children.push(b)}}function l(u,p){let b=s[s.length-1];if(u==="svg"||b?.svg)return f(u,p,b);let v=Fe.has(u)&&!J.has(u),S=s[s.length-1]?.dropped??!1,{props:g,style:w,events:N,bindings:A,classes:h,inline:y}=v||S?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:je(u,p,t),x=g["data-native"],k;if(typeof x==="string"&&We.has(x))k=x,delete g["data-native"];else k=J.has(u)?"View":Ce(u);if(k===u&&!We.has(k)&&!Fe.has(u)&&!Ve.has(u)&&!a.has(u))a.add(u),t.push({kind:"unmapped-tag",tag:u});if((v||J.has(u))&&!a.has(`drop:${u}`))a.add(`drop:${u}`),t.push({kind:"dropped-subtree",tag:u});if(k==="Video"&&g.source===void 0&&g.src!==void 0)g.source=g.src,delete g.src;if(k==="Icon"){let P=Y(h).icon,L=de(String(g.symbol||g.name||P||""),Boolean(g.symbol));if(g.symbol=L.symbol,L.iconify)g.iconify=L.iconify}if(k==="FlatList"||k==="SectionList"){let P=new Set([...Object.keys(g),...Object.keys(A)].map((L)=>L.toLowerCase()));for(let[L,D]of zt)if(P.has(L))t.push({kind:"unsupported-list-prop",tag:k,name:D})}let I=z(k,g,w,N);I._inlineStyle=y;let O=g["data-stx-b"];if(typeof O==="number"&&Number.isInteger(O))I.bindingId=O;if(delete g["data-stx-b"],h)I._classes=h;if(Object.keys(A).length>0)I.bindings=A;if(typeof g.key==="string")I.key=g.key,delete g.key;return{tag:u,node:I,dropped:v||S||J.has(u),discard:v||S,unwrap:Ve.has(u)}}function f(u,p,b){let v=b?.dropped??!1,S=oe[u];if(v||!S){if(!v&&!a.has(`drop:${u}`))a.add(`drop:${u}`),t.push({kind:Ee.has(u)?"dropped-subtree":"unmapped-tag",tag:u});return{tag:u,node:z("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let{props:g,style:w,events:N,bindings:A,classes:h,inline:y}=je(u,p,t);if(S==="Svg"){let O=ae(g.viewBox);if(O)g.viewBox=O;else delete g.viewBox;for(let P of["width","height"]){if(typeof g[P]==="number"&&w[P]===void 0)w[P]=g[P];delete g[P]}}if(typeof g.strokeDasharray==="string"||typeof g.strokeDasharray==="number"){let O=String(g.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);g.strokeDasharray=O}let x=ce(S,g);if(x)g.geometry=x;let k=z(S,g,w,N);k._inlineStyle=y;let I=g["data-stx-b"];if(typeof I==="number"&&Number.isInteger(I))k.bindingId=I;if(delete g["data-stx-b"],h)k._classes=h;if(Object.keys(A).length>0)k.bindings=A;if(typeof g.key==="string")k.key=g.key,delete g.key;return{tag:u,node:k,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(u){let p=u.tagName.toLowerCase(),b=l(p,[...u.attributes]),v=!0;try{u.onEndTag(()=>{if(s.pop(),b.discard)return;if(b.unwrap)d(b);else c(Ut(b,t))})}catch{v=!1}if(v)s.push(b);else if(!b.discard)c(b.node)},text(u){let p=s[s.length-1];if(!p||p.dropped)return;let b=j(u.text).replace(/\s+/g," ");if(!b.trim())return;p.node.children.push(b)}}).transform(new Response(r)).text(),i.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);return{root:i.length===1?i[0]:z("View",{},{},{},i),diagnostics:t}}async function Ue(r,e={}){let{root:t,diagnostics:i}=await qt(r,e),s=e.script??{exports:{},functions:[],code:""};return{document:Le(t,s,{source:e.source??"unknown"}),diagnostics:i}}var qe=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Gt=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Kt=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,Ge=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function ge(r){let e=[];qe.lastIndex=0;for(let a of r.matchAll(qe)){let c=a[1]??"";if(/\bserver\b/.test(c))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
|
|
2
|
+
import"./chunk-a5kaw8sc.js";import"./chunk-ec8k75ep.js";import"./chunk-kvmg6r89.js";import{ur,Fs,Vi}from"./chunk-r4199q6x.js";import"./chunk-6v1gwdbv.js";import{Vn,Kn,n,o}from"./chunk-hmehxwzj.js";import"./chunk-j2erwdgt.js";import"./chunk-jmvp99ay.js";import"./chunk-e124cgb6.js";import"./chunk-q04fdq91.js";import"./chunk-1xgs9gd5.js";import"./chunk-dyreg5df.js";import{De}from"./chunk-5hdby5qp.js";import"./chunk-1b50m7e7.js";import{existsSync as te,mkdirSync as sn,readFileSync as an}from"fs";import C from"path";import{existsSync as Qe,mkdirSync as nn}from"fs";import F from"path";import{existsSync as Zt}from"fs";import H from"path";var rt="data-stx-b",Te=new Set(Fs),it=new Set(ur);function ot(r){if(r==="ref"||r==="data-stx-ref")return"ref";if(r.startsWith("::"))return null;if(r.startsWith("@bind:")||r.startsWith("x-bind:"))return"attr";if(r.startsWith("@")||r.startsWith(":")){let e=r.slice(1).split(".")[0];if(Te.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(Vi(e))return"event";if(r.startsWith("@"))return"event";return"attr"}if(r.startsWith("x-")){let e=r.split(".")[0];if(!it.has(e))return"attr";let t=e.slice(2);if(t==="cloak"||t==="data"||t==="bind")return null;if(t==="tooltip"||t==="tooltip-position")return null;return Te.has(t)?t==="if"?"if":t:"attr"}return null}function st(r){let e=[];for(let[t,i]of r){let s=ot(t);if(s)e.push({name:t,value:i,kind:s})}return e}var at=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,ie=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function Re(r){let e=[],t=0;return{html:r.replace(at,(s,a,c)=>{if(!c||!/[:@]|x-/.test(c))return s;let d=[];ie.lastIndex=0;for(let g=ie.exec(c);g;g=ie.exec(c))d.push([g[1],g[2]??g[3]??g[4]??""]);let l=st(d);if(!l.length)return s;let p={id:t++,bindings:l};if(l.some((g)=>g.kind==="for"))p.template=!0;e.push(p);let m=s.endsWith("/>");return`${s.slice(0,m?-2:-1).trimEnd()} ${rt}="${p.id}"${m?"/>":">"}`}),manifest:{entries:e}}}var se={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText"},ae=new Set(Object.values(se));var _e=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),Ie=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight"];function R(r){let e=typeof r==="number"?r:Number.parseFloat(String(r??""));return Number.isFinite(e)?e:0}function V(r){return Math.round(r*1000)/1000}function ce(r){if(Array.isArray(r)&&r.length===4&&r.every((t)=>Number.isFinite(Number(t))))return r.map(Number);let e=String(r??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((t)=>!Number.isFinite(t))||e[2]<=0||e[3]<=0)return null;return e}function ct(r){let e=String(r??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var Ae=/[MLHVCSQTAZ]/i,oe=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function lt(r){let e=[],t=r,i=Ae.exec(t);while(i){let s=i.index;t=t.slice(s);let a=t[0];t=t.slice(1);let c=Ae.exec(t),d=c?t.slice(0,c.index):t,l;if(a==="A"||a==="a"){l=[];let p=0,m=d.trim(),u=0;while(u<m.length){let g=p%7,b=m.slice(u).replace(/^[\s,]+/,"");if(u=m.length-b.length,!b)break;if(g===3||g===4)l.push(b[0]==="1"?1:0),u+=1;else{oe.lastIndex=0;let y=oe.exec(b);if(!y||y.index!==0)break;l.push(Number.parseFloat(y[0])),u+=y[0].length}p++}}else l=(d.match(oe)||[]).map(Number.parseFloat);e.push({command:a,args:l}),i=c}return e}function dt(r,e,t,i,s,a,c,d,l){if(r===d&&e===l)return[];let p=Math.abs(t),m=Math.abs(i);if(!p||!m)return[1,d,l];let u=s*Math.PI/180,g=Math.cos(u),b=Math.sin(u),y=(r-d)/2,S=(e-l)/2,f=g*y+b*S,w=-b*y+g*S,k=f*f/(p*p)+w*w/(m*m);if(k>1)p*=Math.sqrt(k),m*=Math.sqrt(k);let E=p*p*m*m-p*p*w*w-m*m*f*f,h=p*p*w*w+m*m*f*f,v=Math.sqrt(Math.max(0,E/h));if(a===c)v=-v;let x=v*(p*w)/m,N=v*-(m*f)/p,A=g*x-b*N+(r+d)/2,O=b*x+g*N+(e+l)/2,P=(_,I,B,X)=>{let ne=_*X-I*B<0?-1:1,re=(_*B+I*X)/(Math.hypot(_,I)*Math.hypot(B,X));return ne*Math.acos(Math.min(1,Math.max(-1,re)))},L=P(1,0,(f-x)/p,(w-N)/m),D=P((f-x)/p,(w-N)/m,(-f-x)/p,(-w-N)/m);if(!c&&D>0)D-=2*Math.PI;if(c&&D<0)D+=2*Math.PI;let U=Math.max(1,Math.ceil(Math.abs(D)/(Math.PI/2))),Se=D/U,q=1.3333333333333333*Math.tan(Se/4),ve=[],we=(_)=>{let I=p*Math.cos(_),B=m*Math.sin(_);return[g*I-b*B+A,b*I+g*B+O]},xe=(_)=>{let I=-p*Math.sin(_),B=m*Math.cos(_);return[g*I-b*B,b*I+g*B]},G=L;for(let _=0;_<U;_++){let I=G+Se,[B,X]=we(G),[ne,re]=xe(G),[Ne,ke]=we(I),[tt,nt]=xe(I);ve.push(2,B+q*ne,X+q*re,Ne-q*tt,ke-q*nt,_===U-1?d:Ne,_===U-1?l:ke),G=I}return ve}function ut(r){let e=[],t=0,i=0,s=0,a=0,c=0,d=0,l=0,p=0,m="";for(let{command:u,args:g}of lt(String(r??""))){let b=u===u.toLowerCase(),y=u.toUpperCase(),S=()=>b?t:0,f=()=>b?i:0,w=0,k=(h)=>{if(w+h>g.length)return null;let v=g.slice(w,w+h);return w+=h,v};if(y==="Z"){e.push(4),t=s,i=a,m="Z";continue}let E=!0;while(w<g.length||E&&y==="Z"){switch(y){case"M":{let h=k(2);if(!h)return e;if(t=h[0]+S(),i=h[1]+f(),E)e.push(0,t,i),s=t,a=i;else e.push(1,t,i);m=E?"M":"L";break}case"L":{let h=k(2);if(!h)return e;t=h[0]+S(),i=h[1]+f(),e.push(1,t,i),m="L";break}case"H":{let h=k(1);if(!h)return e;t=h[0]+S(),e.push(1,t,i),m="L";break}case"V":{let h=k(1);if(!h)return e;i=h[0]+f(),e.push(1,t,i),m="L";break}case"C":{let h=k(6);if(!h)return e;let v=h[0]+S(),x=h[1]+f();c=h[2]+S(),d=h[3]+f(),t=h[4]+S(),i=h[5]+f(),e.push(2,v,x,c,d,t,i),m="C";break}case"S":{let h=k(4);if(!h)return e;let v=m==="C"?2*t-c:t,x=m==="C"?2*i-d:i;c=h[0]+S(),d=h[1]+f(),t=h[2]+S(),i=h[3]+f(),e.push(2,v,x,c,d,t,i),m="C";break}case"Q":{let h=k(4);if(!h)return e;l=h[0]+S(),p=h[1]+f(),t=h[2]+S(),i=h[3]+f(),e.push(3,l,p,t,i),m="Q";break}case"T":{let h=k(2);if(!h)return e;l=m==="Q"?2*t-l:t,p=m==="Q"?2*i-p:i,t=h[0]+S(),i=h[1]+f(),e.push(3,l,p,t,i),m="Q";break}case"A":{let h=k(7);if(!h)return e;let v=h[5]+S(),x=h[6]+f();e.push(...dt(t,i,h[0],h[1],h[2],h[3],h[4],v,x)),t=v,i=x,m="A";break}default:return e}E=!1}}return e.map((u)=>V(u))}function Ee(r,e,t,i){if(t<=0||i<=0)return[];let s=0.5522847498;return[0,r+t,e,2,r+t,e+s*i,r+s*t,e+i,r,e+i,2,r-s*t,e+i,r-t,e+s*i,r-t,e,2,r-t,e-s*i,r-s*t,e-i,r,e-i,2,r+s*t,e-i,r+t,e-s*i,r+t,e,4].map(V)}function le(r,e){switch(r){case"Path":return ut(String(e.d??""));case"Line":return[0,R(e.x1),R(e.y1),1,R(e.x2),R(e.y2)].map(V);case"Rect":{let t=R(e.x),i=R(e.y),s=R(e.width),a=R(e.height);if(s<=0||a<=0)return[];let c=e.rx===void 0?R(e.ry):R(e.rx),d=e.ry===void 0?c:R(e.ry);if(c=Math.min(Math.max(0,c),s/2),d=Math.min(Math.max(0,d),a/2),!c||!d)return[0,t,i,1,t+s,i,1,t+s,i+a,1,t,i+a,4].map(V);let l=0.5522847498;return[0,t+c,i,1,t+s-c,i,2,t+s-c+l*c,i,t+s,i+d-l*d,t+s,i+d,1,t+s,i+a-d,2,t+s,i+a-d+l*d,t+s-c+l*c,i+a,t+s-c,i+a,1,t+c,i+a,2,t+c-l*c,i+a,t,i+a-d+l*d,t,i+a-d,1,t,i+d,2,t,i+d-l*d,t+c-l*c,i,t+c,i,4].map(V)}case"Circle":return Ee(R(e.cx),R(e.cy),R(e.r),R(e.r));case"Ellipse":return Ee(R(e.cx),R(e.cy),R(e.rx),R(e.ry));case"Polyline":case"Polygon":{let t=ct(e.points);if(t.length<4)return[];let i=[0,t[0],t[1]];for(let s=2;s<t.length;s+=2)i.push(1,t[s],t[s+1]);if(r==="Polygon")i.push(4);return i.map(V)}default:return null}}var ft=[...Ie,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","mapType","strokeColor","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],Pe=new Set(["animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pictureInPicture"]),pt=new Map(ft.map((r)=>[Ce(r),r]));function Ce(r){return r.replace(/[-_]/g,"").toLowerCase()}function de(r){return pt.get(Ce(r))??r}var gt={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",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 Be(r){return gt[r.toLowerCase()]||r}var ht={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",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",bed:"bed.double",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",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","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",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",dumbbell:"dumbbell",edit:"pencil","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal","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",mic:"mic",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",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",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",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",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function ue(r,e=!1){let t=String(r??"").trim();if(!t)return{symbol:"circle",known:!1};if(e)return{symbol:t,known:!0};let i=/^i-([a-z0-9]+)-(.+)$/.exec(t)??/^([a-z0-9]+):(.+)$/.exec(t),s=i?i[1]:"lucide",a=i?i[2]:t;if(s==="lucide"){let c=ht[a];if(c)return{symbol:c,iconify:`i-lucide-${a}`,known:!0};if(!i&&t.includes("."))return{symbol:t,known:!0}}return{symbol:"circle",iconify:i?t:`i-lucide-${a}`,known:!1}}var mt={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"}},Le={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},Oe={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},M={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function W(r){let e=r.lastIndexOf("/");if(e>0&&!r.endsWith("]")){let i=W(r.slice(0,e)),s=r.slice(e+1),a=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!i||!Number.isFinite(a))return;return bt(i,a/100)}if(r==="transparent")return"transparent";if(r==="current")return"currentColor";if(r==="black")return"#000000";if(r==="white")return"#ffffff";let t=r.split("-");if(t.length===2){let[i,s]=t,a=mt[i];if(a&&typeof a==="object")return a[s]}if(r.startsWith("[")&&r.endsWith("]")){let i=r.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function bt(r,e){if(r==="transparent")return r;let t=r.startsWith("#")?r.slice(1):"";if(t.length===3)t=t.split("").map((s)=>s+s).join("");if(t.length===8)t=t.slice(0,6);if(t.length!==6)return;let i=Math.round(Math.min(1,Math.max(0,e))*255);return`#${t}${i.toString(16).padStart(2,"0")}`}function fe(r,e=16){if(!r.startsWith("[")||!r.endsWith("]"))return;let t=r.slice(1,-1),i=Number.parseFloat(t);if(!Number.isFinite(i))return;if(t.endsWith("rem"))return i*16;if(t.endsWith("em"))return i*e;return i}function T(r){if(r.startsWith("[")&&r.endsWith("]")){let e=r.slice(1,-1);if(e.endsWith("%"))return;let t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return Le[r]}function K(r){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(r);if(e)return`${Number.parseFloat(e[1])}%`;return T(r)}var yt={flex:(r,e)=>(e.display="flex",!0),hidden:(r,e)=>(e.display="none",!0),grid:(r,e)=>(e.display="grid",!0),"flex-row":(r,e)=>(e.flexDirection="row",!0),"flex-col":(r,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(r,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(r,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(r,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(r,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(r,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(r,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(r,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(r,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(r,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(r,e)=>(e.flexGrow=1,!0),"grow-0":(r,e)=>(e.flexGrow=0,!0),shrink:(r,e)=>(e.flexShrink=1,!0),"shrink-0":(r,e)=>(e.flexShrink=0,!0),"justify-start":(r,e)=>(e.justifyContent="flex-start",!0),"justify-center":(r,e)=>(e.justifyContent="center",!0),"justify-end":(r,e)=>(e.justifyContent="flex-end",!0),"justify-between":(r,e)=>(e.justifyContent="space-between",!0),"justify-around":(r,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(r,e)=>(e.justifyContent="space-evenly",!0),"items-start":(r,e)=>(e.alignItems="flex-start",!0),"items-center":(r,e)=>(e.alignItems="center",!0),"items-end":(r,e)=>(e.alignItems="flex-end",!0),"items-stretch":(r,e)=>(e.alignItems="stretch",!0),"items-baseline":(r,e)=>(e.alignItems="baseline",!0),"self-auto":(r,e)=>(e.alignSelf="auto",!0),"self-start":(r,e)=>(e.alignSelf="flex-start",!0),"self-center":(r,e)=>(e.alignSelf="center",!0),"self-end":(r,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(r,e)=>(e.alignSelf="stretch",!0),"self-baseline":(r,e)=>(e.alignSelf="baseline",!0),"min-w-0":(r,e)=>(e.minWidth=0,!0),"aspect-square":(r,e)=>(e.aspectRatio=1,!0),"inset-0":(r,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(r,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(r,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(r,e)=>(e.letterSpacing=0,!0),"tracking-wide":(r,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(r,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(r,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(r,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(r,e)=>(e.position="relative",!0),absolute:(r,e)=>(e.position="absolute",!0),"overflow-visible":(r,e)=>(e.overflow="visible",!0),"overflow-hidden":(r,e)=>(e.overflow="hidden",!0),"overflow-scroll":(r,e)=>(e.overflow="scroll",!0),"font-thin":(r,e)=>(e.fontWeight="100",!0),"font-extralight":(r,e)=>(e.fontWeight="200",!0),"font-light":(r,e)=>(e.fontWeight="300",!0),"font-normal":(r,e)=>(e.fontWeight="400",!0),"font-medium":(r,e)=>(e.fontWeight="500",!0),"font-semibold":(r,e)=>(e.fontWeight="600",!0),"font-bold":(r,e)=>(e.fontWeight="bold",!0),"font-extrabold":(r,e)=>(e.fontWeight="800",!0),"font-black":(r,e)=>(e.fontWeight="900",!0),italic:(r,e)=>(e.fontStyle="italic",!0),"not-italic":(r,e)=>(e.fontStyle="normal",!0),"text-left":(r,e)=>(e.textAlign="left",!0),"text-center":(r,e)=>(e.textAlign="center",!0),"text-right":(r,e)=>(e.textAlign="right",!0),"text-justify":(r,e)=>(e.textAlign="justify",!0),uppercase:(r,e)=>(e.textTransform="uppercase",!0),lowercase:(r,e)=>(e.textTransform="lowercase",!0),capitalize:(r,e)=>(e.textTransform="capitalize",!0),"normal-case":(r,e)=>(e.textTransform="none",!0),underline:(r,e)=>(e.textDecorationLine="underline",!0),"line-through":(r,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(r,e)=>(e.textDecorationLine="none",!0)};function St(r,e){if(!r.startsWith("bg-"))return!1;let t=r.slice(3),i=W(t);if(i)return e.backgroundColor=i,!0;return!1}function vt(r,e){if(!r.startsWith("text-"))return!1;let t=r.slice(5);if(Oe[t])return e.fontSize=Oe[t],!0;if(t.startsWith("[")&&t.endsWith("]")){let s=t.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(s)){let a=s.endsWith("rem")||s.endsWith("em")?Number.parseFloat(s)*16:Number.parseFloat(s);if(Number.isFinite(a))return e.fontSize=a,!0}}let i=W(t);if(i)return e.color=i,!0;return!1}var wt=new Set(["t","tr","r","br","b","bl","l","tl"]);function xt(r,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(r);if(t&&wt.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let i=/^(from|via|to)-(.+)$/.exec(r);if(!i)return!1;let s=W(i[2]);if(!s)return!1;if(i[1]==="from")e.gradientFrom=s;else if(i[1]==="via")e.gradientVia=s;else e.gradientTo=s;return!0}function Nt(r,e){for(let t of["fill","stroke"]){let i=`${t}-`;if(!r.startsWith(i))continue;let s=r.slice(i.length);if(s==="none")return e[t]="none",!0;if(t==="stroke"&&/^\d+(?:\.\d+)?$/.test(s))return e.strokeWidth=Number.parseFloat(s),!0;if(t==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(s))return e.strokeWidth=Number.parseFloat(s.slice(1)),!0;let a=W(s);if(a)return e[t]=a,!0}return!1}function kt(r,e){if(r.startsWith("p-")){let t=T(r.slice(2));if(t!==void 0)return e.padding=t,!0}if(r.startsWith("px-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(r.startsWith("py-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(r.startsWith("pt-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(r.startsWith("pr-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(r.startsWith("pb-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(r.startsWith("pl-")){let t=T(r.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function Tt(r,e){if(r.startsWith("m-")){let t=T(r.slice(2));if(t!==void 0)return e.margin=t,!0}if(r.startsWith("mx-")){let t=T(r.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(r.startsWith("my-")){let t=T(r.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(r.startsWith("mt-")){let t=T(r.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(r.startsWith("mr-")){let t=T(r.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(r.startsWith("mb-")){let t=T(r.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(r.startsWith("ml-")){let t=T(r.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function Rt(r,e){if(!r.startsWith("w-"))return!1;let t=r.slice(2);if(t==="full")return e.width="100%",!0;if(t==="screen")return e.width="100%",!0;if(t==="auto")return e.width="auto",!0;if(t.includes("/")){let[s,a]=t.split("/"),c=Number.parseInt(s)/Number.parseInt(a)*100;return e.width=`${c}%`,!0}let i=K(t);if(i!==void 0)return e.width=i,!0;return!1}function At(r,e){if(!r.startsWith("h-"))return!1;let t=r.slice(2);if(t==="full")return e.height="100%",!0;if(t==="screen")return e.height="100%",!0;if(t==="auto")return e.height="auto",!0;let i=K(t);if(i!==void 0)return e.height=i,!0;return!1}function Et(r,e){if(!r.startsWith("rounded"))return!1;if(r==="rounded")return e.borderRadius=M.DEFAULT,!0;let t=r.slice(8);if(t==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(t);if(i){let a=fe(i[2]);if(a===void 0)return!1;let c={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let d of i[1]?c[i[1]]:["borderRadius"])e[d]=a;return!0}if(t.startsWith("t-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderTopLeftRadius=a,e.borderTopRightRadius=a,!0}if(t.startsWith("b-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderBottomLeftRadius=a,e.borderBottomRightRadius=a,!0}if(t.startsWith("l-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderTopLeftRadius=a,e.borderBottomLeftRadius=a,!0}if(t.startsWith("r-")){let a=M[t.slice(2)]??M.DEFAULT;return e.borderTopRightRadius=a,e.borderBottomRightRadius=a,!0}let s=M[t];if(s!==void 0)return e.borderRadius=s,!0;return!1}function _t(r,e){if(!r.startsWith("border"))return!1;if(r==="border")return e.borderWidth=1,!0;let t=r.match(/^border-(\d+)$/);if(t)return e.borderWidth=Number.parseInt(t[1]),!0;let i=r.match(/^border-(t|r|b|l)-?(\d*)$/);if(i){let[,s,a]=i,c=a?Number.parseInt(a):1;switch(s){case"t":e.borderTopWidth=c;break;case"r":e.borderRightWidth=c;break;case"b":e.borderBottomWidth=c;break;case"l":e.borderLeftWidth=c;break}return!0}return!1}function It(r,e){if(!r.startsWith("border-"))return!1;let t=r.slice(7),i=W(t);if(i)return e.borderColor=i,!0;return!1}function Pt(r,e){if(!r.startsWith("opacity-"))return!1;let t=Number.parseInt(r.slice(8));if(!Number.isNaN(t))return e.opacity=t/100,!0;return!1}function Ct(r,e){if(r.startsWith("tracking-[")){let t=fe(r.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(t===void 0)return!1;return e.letterSpacing=t,!0}if(r.startsWith("leading-")){let t=r.slice(8),i=typeof e.fontSize==="number"?e.fontSize:16,s={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=t.startsWith("[")?/^\[[\d.]+\]$/.test(t)?Number.parseFloat(t.slice(1,-1))*i:fe(t,i):s[t]!==void 0?s[t]*i:Le[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Bt(r,e){let t=/^grid-cols-(\d+)$/.exec(r);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function Ot(r,e){if(!r.startsWith("size-"))return!1;let t=r.slice(5),i=t==="full"?"100%":K(t);if(i===void 0)return!1;return e.width=i,e.height=i,!0}var Mt={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function Lt(r,e){let t=/^(min|max)-(w|h)-(.+)$/.exec(r);if(!t)return!1;let[,i,s,a]=t,c=a==="full"||a==="screen"?"100%":a==="none"?void 0:s==="w"&&i==="max"&&Mt[a]||K(a);if(c===void 0&&a!=="none")return!1;let d=`${i}${s==="w"?"Width":"Height"}`;if(c===void 0)delete e[d];else e[d]=c;return!0}function Dt(r,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(r);if(!t)return!1;let i=t[3]==="full"?"100%":T(t[3]);if(i===void 0)return!1;return e[t[2]]=typeof i==="number"&&t[1]?-i:i,!0}function Ft(r,e){let t=/^space-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=T(t[2]);if(i===void 0)return!1;return e.gap=i,!0}function Vt(r,e){if(r.startsWith("gap-")){let t=T(r.slice(4));if(t!==void 0)return e.gap=t,!0}if(r.startsWith("gap-x-")){let t=T(r.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(r.startsWith("gap-y-")){let t=T(r.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function J(r){let e=[],t=[],i=[];function s(l,p){let m=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(l),u=m&&Vn[m[2]];return u?`${m[1]}-${u[p]}${m[3]||""}`:l}for(let l of r.split(/\s+/).filter(Boolean))if(l.startsWith("dark:"))t.push(s(l.slice(5),"dark"));else if(!l.includes(":")||l.startsWith("[")){if(e.push(s(l,"light")),s(l,"dark")!==l)i.push(s(l,"dark"))}let a=[],d={style:Me(e.join(" "),a),unknown:a};if(t.length||i.length)d.dark=Me([...i,...t].join(" "),a);for(let l of e){if(l==="truncate")d.numberOfLines=1;let p=/^line-clamp-(\d+)$/.exec(l);if(p)d.numberOfLines=Number(p[1]);if(!d.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(l))d.icon=l}return d.unknown=a.filter((l)=>!/^line-clamp-\d+$/.test(l)),d}function Me(r,e){let t={},i=r.split(/\s+/).filter(Boolean);for(let s of i){if(/^i-[a-z0-9]+-/.test(s))continue;let a=yt[s];if(a){a("",t);continue}if(xt(s,t))continue;if(St(s,t))continue;if(Nt(s,t))continue;if(vt(s,t))continue;if(kt(s,t))continue;if(Tt(s,t))continue;if(Rt(s,t))continue;if(At(s,t))continue;if(Et(s,t))continue;if(_t(s,t))continue;if(It(s,t))continue;if(Pt(s,t))continue;if(Vt(s,t))continue;if(Ct(s,t))continue;if(Ot(s,t))continue;if(Lt(s,t))continue;if(Bt(s,t))continue;if(Dt(s,t))continue;if(Ft(s,t))continue;if(e?.push(s),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${s}`)}return t}function z(r,e={},t={},i={},s=[]){return{type:r,props:e,style:t,events:i,children:s}}function Fe(r,e,t={}){return{version:"1.0.0",root:r,script:e,meta:{source:t.source||"unknown",compiledAt:t.compiledAt||Date.now(),headwindConfig:t.headwindConfig}}}var Ve=new Set(["script","style","head","meta","link","title","base","noscript"]),We=new Set(["template","body","html","main","fragment"]),Y=new Set,Wt={click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",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"},$t=new Set(["onBlur","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),pe=new Set(["display","gridColumns","gridTemplateColumns","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","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","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),zt=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),Xt=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"]),$e=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...ae]),jt=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"],["listrole","listRole"]]),ze=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Ht={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function j(r){return r.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let i=Ht[t.toLowerCase()];if(i!==void 0)return i;if(t[0]==="#"){let s=t[1]==="x"||t[1]==="X"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):e}return e})}function Xe(r){return r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function je(r){let e=/^(-?[\d.]+)px$/.exec(r);if(e)return Number.parseFloat(e[1]);let t=/^(-?[\d.]+)r?em$/.exec(r);if(t)return Number.parseFloat(t[1])*16;if(/^-?[\d.]+$/.test(r))return Number.parseFloat(r);return r}function He(r,e,t){let i={},s={},a={},c="",d={};for(let[m,u]of e){let g=m.toLowerCase();if(g==="class"||g==="classname"){c=c?`${c} ${u}`:u;continue}if(g==="style"){d={...d,...qt(r,u,t)};continue}if(g.startsWith(":")||g.startsWith("x-")&&g!=="x-cloak"){a[g.startsWith(":")?g.slice(1):g.slice(2)]=j(u);continue}if(g==="x-cloak")continue;if(g.startsWith("@")||g.startsWith("v-on:")){let S=g.startsWith("@")?g.slice(1):g.slice(5),[f]=S.split("."),w=Wt[f]??(f.startsWith("on")?f:"");if(!w||!$t.has(w)){t.push({kind:"unread-event",tag:r,name:m});continue}s[w]=j(u);continue}if(g==="key"){i.key=u;continue}let b=j(u),y=de(m);if(b===""&&Pe.has(y)){i[y]=!0;continue}try{i[y]=JSON.parse(b)}catch{i[y]=b}}let l=c?J(c):void 0;for(let m of new Set(l?.unknown??[]))t.push({kind:"unknown-class",tag:r,name:m});let p={...l?.style,...d};return{props:i,style:p,events:s,bindings:a,classes:c,inline:d}}function Ut(r,e){if(r==="shadowOffset"){if(!e||typeof e!=="object"||Array.isArray(e))return;let{width:t,height:i}=e;return typeof t==="number"&&typeof i==="number"?{width:t,height:i}:void 0}if(r==="transform"){if(!Array.isArray(e))return;let t=e.filter((i)=>Boolean(i)&&typeof i==="object"&&!Array.isArray(i)&&Object.keys(i).length===1).filter((i)=>["number","string"].includes(typeof Object.values(i)[0]));return t.length?t:void 0}return}function Ue(r,e){if(zt.has(r))return!1;if(Xt.has(r))return/^-?[\d.]+%$/.test(e);return!0}function qt(r,e,t){let i={},s=j(e);try{let a=JSON.parse(s);if(a&&typeof a==="object"&&!Array.isArray(a)){for(let[c,d]of Object.entries(a)){let l=pe.has(c)?c:Xe(c.trim().toLowerCase());if(!pe.has(l)){t.push({kind:"unknown-style",tag:r,name:l});continue}if(d===null||d===void 0)continue;let p=typeof d==="string"?je(d):d;if(typeof p==="object"){let m=Ut(l,p);if(m===void 0)t.push({kind:"non-numeric-style",tag:r,name:l});else i[l]=m;continue}if(typeof p!=="string"&&typeof p!=="number")continue;if(typeof p==="string"&&!Ue(l,p)){t.push({kind:"non-numeric-style",tag:r,name:l});continue}i[l]=p}return i}}catch{}for(let a of s.split(";")){let c=a.indexOf(":");if(c===-1)continue;let d=Xe(a.slice(0,c).trim().toLowerCase()),l=a.slice(c+1).trim();if(!d||!l)continue;if(!pe.has(d)){t.push({kind:"unknown-style",tag:r,name:d});continue}let p=je(l);if(typeof p==="string"&&!Ue(d,p)){t.push({kind:"non-numeric-style",tag:r,name:d});continue}i[d]=p}return i}function ge(r){return r.children.map((e)=>typeof e==="string"?e:ge(e)).join("").replace(/\s+/g," ").trim()}function Gt(r,e){let t=r.node,i=t.children.filter((a)=>typeof a!=="string"),s=t.children.filter((a)=>typeof a==="string").join("").trim();if(t.type==="Svg"||t.type==="G")return t.children=i,t;if(t.type==="SvgText"){let a=ge(t);return t.children=a?[a]:[],t}if(ze.has(t.type)&&i.length===0&&s)return t.type="Text",t.children=[s],t;if(t.type==="Text"&&!s&&i.length===0&&typeof t.props.text==="string")return t.children=t.props.text?[t.props.text]:[],delete t.props.text,t;if(t.type==="Text"&&i.length>0){let a=ge(t);return e.push({kind:"flattened-text",tag:r.tag}),t.children=a?[a]:[],t}if(ze.has(t.type)&&i.length>0)t.children=i;return t}async function Kt(r,e={}){let t=[],i=[],s=[],a=new Set;function c(u){let g=s[s.length-1];if(!g)i.push(u);else if(!g.dropped)g.node.children.push(u)}function d(u){if(u.node.bindings&&Object.keys(u.node.bindings).length>0){let b=u.node.children,y=b.filter((f)=>typeof f!=="string"),S=y.length===1&&y.length===b.length?y[0]:z("View",{},{},{},b);if(S.bindings={...u.node.bindings,...S.bindings},S.bindingId===void 0&&u.node.bindingId!==void 0)S.bindingId=u.node.bindingId;c(S);return}let g=s[s.length-1];for(let b of u.node.children){if(typeof b==="string"){if(g&&!g.dropped)g.node.children.push(b);continue}if(!g)i.push(b);else if(!g.dropped)g.node.children.push(b)}}function l(u,g){let b=s[s.length-1];if(u==="svg"||b?.svg)return p(u,g,b);let y=Ve.has(u)&&!Y.has(u),S=s[s.length-1]?.dropped??!1,{props:f,style:w,events:k,bindings:E,classes:h,inline:v}=y||S?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:He(u,g,t),x=f["data-native"],N;if(typeof x==="string"&&$e.has(x))N=x,delete f["data-native"];else N=Y.has(u)?"View":Be(u);if(N===u&&!$e.has(N)&&!Ve.has(u)&&!We.has(u)&&!a.has(u))a.add(u),t.push({kind:"unmapped-tag",tag:u});if((y||Y.has(u))&&!a.has(`drop:${u}`))a.add(`drop:${u}`),t.push({kind:"dropped-subtree",tag:u});if(N==="Video"&&f.source===void 0&&f.src!==void 0)f.source=f.src,delete f.src;if(N==="Icon"){let P=J(h).icon,L=ue(String(f.symbol||f.name||P||""),Boolean(f.symbol));if(f.symbol=L.symbol,L.iconify)f.iconify=L.iconify}if(N==="FlatList"||N==="SectionList"){let P=new Set([...Object.keys(f),...Object.keys(E)].map((L)=>L.toLowerCase()));for(let[L,D]of jt)if(P.has(L))t.push({kind:"unsupported-list-prop",tag:N,name:D})}let A=z(N,f,w,k);A._inlineStyle=v;let O=f["data-stx-b"];if(typeof O==="number"&&Number.isInteger(O))A.bindingId=O;if(delete f["data-stx-b"],h)A._classes=h;if(Object.keys(E).length>0)A.bindings=E;if(typeof f.key==="string")A.key=f.key,delete f.key;return{tag:u,node:A,dropped:y||S||Y.has(u),discard:y||S,unwrap:We.has(u)}}function p(u,g,b){let y=b?.dropped??!1,S=se[u];if(y||!S){if(!y&&!a.has(`drop:${u}`))a.add(`drop:${u}`),t.push({kind:_e.has(u)?"dropped-subtree":"unmapped-tag",tag:u});return{tag:u,node:z("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let{props:f,style:w,events:k,bindings:E,classes:h,inline:v}=He(u,g,t);if(S==="Svg"){let O=ce(f.viewBox);if(O)f.viewBox=O;else delete f.viewBox;for(let P of["width","height"]){if(typeof f[P]==="number"&&w[P]===void 0)w[P]=f[P];delete f[P]}}if(typeof f.strokeDasharray==="string"||typeof f.strokeDasharray==="number"){let O=String(f.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);f.strokeDasharray=O}let x=le(S,f);if(x)f.geometry=x;let N=z(S,f,w,k);N._inlineStyle=v;let A=f["data-stx-b"];if(typeof A==="number"&&Number.isInteger(A))N.bindingId=A;if(delete f["data-stx-b"],h)N._classes=h;if(Object.keys(E).length>0)N.bindings=E;if(typeof f.key==="string")N.key=f.key,delete f.key;return{tag:u,node:N,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(u){let g=u.tagName.toLowerCase(),b=l(g,[...u.attributes]),y=!0;try{u.onEndTag(()=>{if(s.pop(),b.discard)return;if(b.unwrap)d(b);else c(Gt(b,t))})}catch{y=!1}if(y)s.push(b);else if(!b.discard)c(b.node)},text(u){let g=s[s.length-1];if(!g||g.dropped)return;let b=j(u.text).replace(/\s+/g," ");if(!b.trim())return;g.node.children.push(b)}}).transform(new Response(r)).text(),i.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);return{root:i.length===1?i[0]:z("View",{},{},{},i),diagnostics:t}}async function qe(r,e={}){let{root:t,diagnostics:i}=await Kt(r,e),s=e.script??{exports:{},functions:[],code:""};return{document:Fe(t,s,{source:e.source??"unknown"}),diagnostics:i}}var Ge=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Jt=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Yt=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,Ke=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function he(r){let e=[];Ge.lastIndex=0;for(let a of r.matchAll(Ge)){let c=a[1]??"";if(/\bserver\b/.test(c))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
|
|
3
3
|
|
|
4
|
-
`),i=[];for(let a of[
|
|
4
|
+
`),i=[];for(let a of[Jt,Yt]){a.lastIndex=0;for(let c of t.matchAll(a))if(!i.includes(c[1]))i.push(c[1])}let s={};Ke.lastIndex=0;for(let a of t.matchAll(Ke)){let c=a[2];try{s[a[1]]=JSON.parse(c.replace(/^'(.*)'$/,'"$1"'))}catch{s[a[1]]=c}}return{exports:s,functions:i,code:t}}var Q=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,Je=/function\s+(__stx_setup_[\w$]+)\s*\(/,Qt=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function me(r){Q.lastIndex=0;for(let e of r.matchAll(Q)){let t=e[2].trim(),i=Je.exec(t)?.[1];if(i)return{name:i,code:t}}return null}function Ye(r){let e=[];Q.lastIndex=0;for(let t of r.matchAll(Q)){let i=t[1],s=t[2].trim(),a=Qt.exec(i)?.[1],c=/\bdata-stx-component-factories\b/i.test(i);if(!s||!a&&!c&&!Je.test(s))continue;e.push(a?{code:s,owner:a}:{code:s})}return e}function en(){let r=[H.join(import.meta.dir,"..","primitives"),H.join(import.meta.dir,"native","primitives")];for(let e of r)if(Zt(H.join(e,"View.stx")))return e;return r[0]}async function tn(r,e,t={}){let i=t.root??H.dirname(e),s=await o(i),a={root:i,componentsDir:t.componentsDir??H.join(i,"components"),buildMode:"serve",cache:!1,_targetComponentDirs:[en()],_pluginComponentDirs:s._pluginComponentDirs??[]},c={...t.context??{},__stx_inject_css:!1},d=new Set([e]),l=await n(r,c,e,a,d),{html:p,manifest:m}=Re(l),{document:u,diagnostics:g}=await qe(p,{source:e,script:he(r)}),b=me(p),y=Ye(p);if(he(r).code.trim()){let S=await Kn(r,e,t.context,{forceClientSetup:!0}),f=me(S.setupCode??"");if(b=f??b,f&&!y.some((w)=>w.code===f.code))y.push({code:f.code})}return{document:u,manifest:m,setup:b,scripts:y,diagnostics:g,html:p,dependencies:[...d]}}async function Z(r,e={}){return tn(await Bun.file(r).text(),r,e)}var ee="__app";function be(r){let t=[F.join(import.meta.dir,"..","runtime",`${r}.ts`),F.join(import.meta.dir,"..","runtime",`${r}.js`),F.join(import.meta.dir,"native","runtime",`${r}.js`)].find((i)=>Qe(i));if(!t)throw Error(`Native runtime module ${r} is missing`);return t}async function rn(r,e,t,i){let s={name:"stx-screen-inputs",setup(c){c.onLoad({filter:/.*/,namespace:"file"},({path:d})=>{i.add(d);return})}},a=await Bun.build({entrypoints:[r],target:"browser",format:"iife",minify:t,plugins:[s,...e],define:{"process.env.NODE_ENV":JSON.stringify(t?"production":"development")}});if(!a.success){let c=a.logs.map((d)=>String(d.message??d)).join(`
|
|
5
5
|
`);throw Error(`Could not bundle ${r}:
|
|
6
|
-
${c}`)}return(await a.outputs[0].text()).trim()}async function
|
|
7
|
-
var isApp = ${l?`routeName === ${JSON.stringify(
|
|
6
|
+
${c}`)}return(await a.outputs[0].text()).trim()}async function ye(r){let e=Object.keys(r.screens);if(e.length===0)throw Error("screens must name at least one .stx file");let t=r.routed??!0,i=r.initialScreen??e[0];if(!r.screens[i])throw Error(`Initial screen ${i} is not in screens`);let s=F.resolve(r.root??process.cwd()),a=[];for(let v of e){let x=F.resolve(s,r.screens[v]);if(!x.endsWith(".stx"))throw Error(`Screen ${v} must name a .stx file`);a.push({name:v,file:x,compiled:await Z(x,{root:s})})}let c=be("jsc-globals"),d=be("shared-screen"),l=r.app?F.resolve(s,r.app):null;if(l&&!Qe(l))throw Error(`The app script ${r.app} does not exist`);if(l&&!t)throw Error("An app script needs a routed bundle");if(l&&r.screens[ee])throw Error(`${ee} is the app script's route, not a screen name`);let p=r.browser,m=t?`var routeName = g.__stxNativeRoute || ${JSON.stringify(i)};
|
|
7
|
+
var isApp = ${l?`routeName === ${JSON.stringify(ee)}`:"false"};
|
|
8
8
|
if (!isApp && routeNames.indexOf(routeName) === -1) throw new Error(['Unknown native screen:', routeName].join(' '));`:`var routeName = 'main';
|
|
9
|
-
var isApp = false;`,u=a.map(({name:
|
|
9
|
+
var isApp = false;`,u=a.map(({name:v,compiled:x},N)=>`${N===0?"if":"else if"} (routeName === ${JSON.stringify(t?v:"main")}) {
|
|
10
10
|
nativeDocument = ${JSON.stringify(x.document)};
|
|
11
11
|
manifest = ${JSON.stringify(x.manifest)};
|
|
12
12
|
}`).join(`
|
|
13
|
-
`),
|
|
14
|
-
|
|
13
|
+
`),g=a.map(({name:v,compiled:x},N)=>`${N===0?"if":"else if"} (routeName === ${JSON.stringify(t?v:"main")}) {
|
|
14
|
+
g.__stx_latestSetup = null;
|
|
15
|
+
${x.scripts.map((A)=>A.owner?` g.__STX_SETUP_ROOT__ = screen && screen.scopeRoot(${JSON.stringify(A.owner)});
|
|
16
|
+
try {
|
|
17
|
+
${A.code}
|
|
18
|
+
}
|
|
19
|
+
finally { g.__STX_SETUP_ROOT__ = null; }`:A.code).join(`
|
|
20
|
+
`)}
|
|
15
21
|
}`).join(`
|
|
16
|
-
`),b=
|
|
22
|
+
`),b=p?be("browser-screen"):null,y=p?Bun.resolveSync(p.platformModule,s):null,S=`
|
|
17
23
|
import { installJSCGlobals } from ${JSON.stringify(c)};
|
|
18
24
|
import { prepareNativeApp, prepareSharedNativeScreen } from ${JSON.stringify(d)};
|
|
19
|
-
${
|
|
20
|
-
import { createBrowserPlatform } from ${JSON.stringify(
|
|
25
|
+
${p?`import { createBrowserScreenBridge } from ${JSON.stringify(b)};
|
|
26
|
+
import { createBrowserPlatform } from ${JSON.stringify(y)};`:""}
|
|
21
27
|
${l?`import * as nativeAppModule from ${JSON.stringify(l)};`:"var nativeAppModule = null;"}
|
|
22
|
-
${
|
|
28
|
+
${p?"(async function() {":""}
|
|
23
29
|
var g = globalThis;
|
|
24
30
|
installJSCGlobals(g);
|
|
25
|
-
${
|
|
26
|
-
var browserBridge = createBrowserScreenBridge(browserPlatform, ${JSON.stringify(
|
|
31
|
+
${p?`var browserPlatform = await createBrowserPlatform(${JSON.stringify(p.platformOptions??{})});
|
|
32
|
+
var browserBridge = createBrowserScreenBridge(browserPlatform, ${JSON.stringify(p)});
|
|
27
33
|
var bridge = browserBridge;
|
|
28
34
|
g.__stxNativeRoute = ${JSON.stringify(i)};`:"var bridge = g.__stxNativeBridge;"}
|
|
29
35
|
if (!bridge) throw new Error('Missing __stxNativeBridge');
|
|
@@ -45,13 +51,13 @@ else {
|
|
|
45
51
|
g.__stxNativeUnmount = function() { screen.unmount(); };
|
|
46
52
|
}
|
|
47
53
|
${De()}
|
|
48
|
-
${
|
|
54
|
+
${g}
|
|
49
55
|
if (isApp) app.start(nativeAppModule);
|
|
50
56
|
else screen.mount(g.stx, g.__stx_latestSetup || null);
|
|
51
|
-
${
|
|
57
|
+
${p?`var stopApp = nativeAppModule && typeof nativeAppModule.default === 'function' ? nativeAppModule.default(g.craft) : null;
|
|
52
58
|
var unmount = g.__stxNativeUnmount;
|
|
53
59
|
var ended = false;
|
|
54
60
|
g.__stxNativeUnmount = function() { if (ended) return; ended = true; if (typeof stopApp === 'function') stopApp(); unmount(); browserBridge.dispose(); };
|
|
55
61
|
g.addEventListener('pagehide', function(event) { if (!event.persisted) g.__stxNativeUnmount(); });
|
|
56
|
-
})().catch(function(error) { console.error('[stx browser screen]', error); var node = document.querySelector(${JSON.stringify(
|
|
57
|
-
`,
|
|
62
|
+
})().catch(function(error) { console.error('[stx browser screen]', error); var node = document.querySelector(${JSON.stringify(p.container)}); if (node) { node.textContent = 'This screen could not start. Reload to try again.'; node.setAttribute('role', 'alert'); } });`:""}
|
|
63
|
+
`,f={name:"stx-native-shared-screens",setup(v){v.onResolve({filter:/^stx:native-shared-screens$/},()=>({path:"entry",namespace:"stx-native-shared-screens"})),v.onLoad({filter:/.*/,namespace:"stx-native-shared-screens"},()=>({contents:S,loader:"js"}))}},w=new Set(a.flatMap(({compiled:v})=>v.dependencies)),k=await rn("stx:native-shared-screens",[f],r.minify??!1,w),E=a.flatMap(({compiled:v})=>v.diagnostics).map((v)=>({level:"warning",message:[v.kind,v.tag,v.name].filter(Boolean).join(": ")}));if(!r.outFile)return{code:k,diagnostics:E,dependencies:[...w]};let h=F.resolve(s,r.outFile);return nn(F.dirname(h),{recursive:!0}),await Bun.write(h,k),{code:k,outFile:h,diagnostics:E,dependencies:[...w]}}async function on(r,e={}){return ye({...e,screens:{main:r},routed:!1})}function Ze(r,e={}){return on(r,e)}var et=["native.config.json","stx-native.config.json"];function cn(r=process.cwd(),e){let t=e?C.resolve(r,e):et.map((l)=>C.join(r,l)).find((l)=>te(l));if(!t)return null;if(!te(t))throw Error(`Native config not found: ${t}`);let i=JSON.parse(an(t,"utf8")),s=Object.entries(i.screens??{});if(s.length===0)throw Error(`${C.basename(t)} must name at least one screen in "screens"`);let a={};for(let[l,p]of s){if(!/^[A-Z][\w-]*$/i.test(l))throw Error(`Invalid native screen name: ${l}`);if(typeof p!=="string"||!p.endsWith(".stx"))throw Error(`Screen ${l} must name a .stx file`);if(a[l]=C.resolve(C.dirname(t),p),!te(a[l]))throw Error(`Screen ${l} not found: ${a[l]}`)}let c=i.initialScreen||s[0][0];if(!a[c])throw Error(`Initial screen ${c} is not in screens`);if(i.app!==void 0&&typeof i.app!=="string")throw Error(`"app" must name the app script's file`);let d=i.app?C.resolve(C.dirname(t),i.app):void 0;if(d&&!te(d))throw Error(`App script not found: ${d}`);return{initialScreen:c,screens:a,file:t,...d?{app:d}:{}}}async function Ar(r,e={}){let t=C.resolve(e.cwd??process.cwd()),i=e.format??"ir";if(i!=="ir"&&i!=="bundle")throw Error(`Unknown compile format: ${i}. Expected ir or bundle.`);let s=r?null:cn(t,e.config);if(!r&&!s)throw Error(`Please specify an input file: stx native compile <file.stx>, or add ${et[0]}`);let a,c=[];if(i==="bundle"){let l=s?await ye({screens:s.screens,initialScreen:s.initialScreen,minify:e.minify,root:t,...s.app?{app:s.app}:{}}):await Ze(C.resolve(t,r),{minify:e.minify});a=l.code,c=l.diagnostics}else{let l=async(m)=>{let u=await Z(m);return c.push(...u.diagnostics.map((g)=>({level:"warning",message:[g.kind,g.tag,g.name].filter(Boolean).join(": ")}))),u.document},p=s?{initialScreen:s.initialScreen,screens:Object.fromEntries(await Promise.all(Object.entries(s.screens).map(async([m,u])=>[m,await l(u)])))}:await l(C.resolve(t,r));a=JSON.stringify(p,null,2)}if(!e.output)return{output:a,diagnostics:c};let d=C.resolve(t,e.output);return sn(C.dirname(d),{recursive:!0}),await Bun.write(d,a),{output:a,written:d,diagnostics:c}}export{Ar as runNativeCompile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var c=0;function l(){return`suspense-${++c}-${Date.now().toString(36)}`}function
|
|
2
|
+
var c=0;function l(){return`suspense-${++c}-${Date.now().toString(36)}`}function Yl(s,n={},t){let e=/@suspense(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@endsuspense/gi;return s.replace(e,(r,i,o,d)=>{let u=l(),a=p(i||"");return f(u,o.trim(),d.trim(),a)})}function p(s){let n={},t=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,e;while((e=t.exec(s))!==null){let r=e[1],i=e[2]||e[3],o=e[4];switch(r){case"id":n.id=i;break;case"timeout":n.timeout=o?parseInt(o,10):void 0;break}}return n}function f(s,n,t,e){let r=e.timeout||30000,i=e.id||s;return`
|
|
3
3
|
<div class="stx-suspense" data-suspense-id="${s}" data-custom-id="${i}" data-status="pending">
|
|
4
4
|
<div class="stx-suspense-fallback" data-suspense-fallback="${s}">
|
|
5
5
|
${t}
|
|
@@ -189,7 +189,7 @@ else {
|
|
|
189
189
|
}, 0);
|
|
190
190
|
})();
|
|
191
191
|
</script>
|
|
192
|
-
`}function
|
|
192
|
+
`}function Zl(s,n,t){return{id:s,fallback:t,content:n}}async function Ql(s){let n=s.map((e)=>`
|
|
193
193
|
<div id="stx-ssr-suspense-${e.id}" class="stx-ssr-suspense">
|
|
194
194
|
${e.fallback}
|
|
195
195
|
</div>
|
|
@@ -214,7 +214,7 @@ else {
|
|
|
214
214
|
}
|
|
215
215
|
})();
|
|
216
216
|
</script>
|
|
217
|
-
`}}return{initial:n,streaming:t()}}function
|
|
217
|
+
`}}return{initial:n,streaming:t()}}function ed(){return`
|
|
218
218
|
/* STX Suspense Styles */
|
|
219
219
|
.stx-suspense {
|
|
220
220
|
position: relative;
|
|
@@ -270,7 +270,7 @@ else {
|
|
|
270
270
|
background-size: 200% 100%;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`}function
|
|
273
|
+
`}function td(){return`
|
|
274
274
|
// STX Suspense Runtime
|
|
275
275
|
(function() {
|
|
276
276
|
if (typeof window === 'undefined') return;
|
|
@@ -338,4 +338,4 @@ else {
|
|
|
338
338
|
console.log('[stx] Suspense runtime initialized');
|
|
339
339
|
})();
|
|
340
340
|
`}
|
|
341
|
-
export{
|
|
341
|
+
export{Yl,Zl,Ql,ed,td};
|
|
@@ -298,5 +298,5 @@ catch (error) {
|
|
|
298
298
|
init();
|
|
299
299
|
}
|
|
300
300
|
})();
|
|
301
|
-
</script>`}var
|
|
302
|
-
export{
|
|
301
|
+
</script>`}var Qc={name:"pwa.installButton",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return r(t,n)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},el={name:"pwa.updatePrompt",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return p(t,n)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},tl={name:"pwa.offlineIndicator",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return d(t,n)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},nl={name:"pwa.pushSubscribe",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return l(t,n)},hasEndTag:!0,description:"Renders a push notification subscription button"},hr=[Qc,el,tl,nl];function vu(t){return[...t,...hr]}
|
|
302
|
+
export{Qc,el,tl,nl,hr,vu};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-a5kaw8sc.js";import"./chunk-ec8k75ep.js";import"./chunk-1b50m7e7.js";import{a}from"./chunk-4cmqjmqr.js";import f from"fs";import l from"path";async function d(e,t={}){let s=Date.now(),n={total:0,passed:0,failed:0,new:0,failures:[],duration:0},o=t.snapshotDir||a(e.root,"story","snapshots");await f.promises.mkdir(o,{recursive:!0});let r=e.storyFiles;if(t.filter&&t.filter.length>0)r=r.filter((i)=>t.filter.some((p)=>i.fileName.toLowerCase().includes(p.toLowerCase())));for(let i of r)await h(i,o,t,n);return n.duration=Date.now()-s,n}async function h(e,t,s,n){let o=e.story;if(!o)return;for(let r of o.variants){n.total++;let i=l.join(t,`${e.id}-${r.id}.snap`),p=g(r.source||""),c=await w(i);if(s.update||!c){let u={storyId:e.id,variantId:r.id,component:e.fileName,timestamp:Date.now(),hash:p};if(await f.promises.writeFile(i,JSON.stringify(u,null,2)),!c)n.new++;n.passed++}else try{let u=await f.promises.readFile(i,"utf-8"),m=JSON.parse(u);if(m.hash===p)n.passed++;else n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:"Snapshot mismatch",difference:y(m.hash,p)})}catch(u){n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:`Error reading snapshot: ${u}`})}}}async function x(e,t={}){return(await d(e,{...t,update:!0})).total}function g(e){let t=0;for(let s=0;s<e.length;s++){let n=e.charCodeAt(s);t=(t<<5)-t+n,t=t&t}return t.toString(16)}function y(e,t){if(e===t)return 0;let s=Math.abs(Number.parseInt(e,16)-Number.parseInt(t,16));return Math.min(s/1e6,1)}async function w(e){try{return await f.promises.access(e),!0}catch{return!1}}function F(e){let t=[];if(t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(" STX Story Visual Regression Tests"),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),e.failures.length>0){t.push(" \u274C Failures:"),t.push("");for(let s of e.failures){if(t.push(` \u2022 ${s.component} / ${s.variantId}`),t.push(` ${s.message}`),s.difference!==void 0)t.push(` Difference: ${(s.difference*100).toFixed(2)}%`);t.push("")}}if(t.push(" Summary:"),t.push(` Total: ${e.total}`),t.push(` Passed: ${e.passed} \u2713`),t.push(` Failed: ${e.failed} \u2717`),e.new>0)t.push(` New: ${e.new} \u26A1`);return t.push(` Time: ${e.duration}ms`),t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),t.join(`
|
|
3
3
|
`)}export{F as formatTestResults,d as runVisualTests,x as updateSnapshots};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Xi,Ji}from"./chunk-652v9mq4.js";import"./chunk-mbazkfy1.js";import"./chunk-1m3k0exr.js";import"./chunk-b9jb44kv.js";import"./chunk-frgpx23w.js";import"./chunk-ys3640vq.js";import"./chunk-yq1mvakj.js";import"./chunk-3v1av932.js";import{co}from"./chunk-me81wras.js";import"./chunk-vvkfde23.js";import"./chunk-ah7h9q0x.js";import"./chunk-nrnq7x7p.js";import"./chunk-75hb7wg6.js";import"./chunk-3nc2fr4q.js";import"./chunk-myndj1r8.js";import"./chunk-v79qs0qh.js";import"./chunk-8nwzd6eg.js";import"./chunk-gjx5256r.js";import"./chunk-pz8mf91e.js";import"./chunk-77j26p6r.js";import"./chunk-d37enreq.js";import"./chunk-zmq9hwta.js";import"./chunk-b2fkxk6k.js";import"./chunk-kch9a9v1.js";import"./chunk-39tkfkp7.js";import"./chunk-7ze47qgv.js";import"./chunk-wy4hfmjs.js";import"./chunk-m6m19hwd.js";import"./chunk-vyjsrvpr.js";import"./chunk-5hdby5qp.js";import"./chunk-7dn3bdeh.js";import"./chunk-cr4ab43x.js";import"./chunk-tqnh98j7.js";import"./chunk-wk85dz07.js";import"./chunk-6wktqt18.js";import"./chunk-ssthwjpr.js";import"./chunk-azb58ven.js";import{ye,sn,on,K,d,n,Zn,R,o,de}from"./chunk-hmehxwzj.js";import"./chunk-1b50m7e7.js";import"./chunk-ec8k75ep.js";import"./chunk-dyreg5df.js";import"./chunk-q04fdq91.js";import"./chunk-e124cgb6.js";import"./chunk-jmvp99ay.js";import"./chunk-j2erwdgt.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-kvmg6r89.js";import"./chunk-1xgs9gd5.js";export{Zn as buildWebComponents,on as cacheTemplate,sn as checkCache,co as classifyAllScripts,Xi as createMiddleware,Ji as createRoute,R as defaultConfig,d as extractVariables,K as injectRouterScript,o as loadStxConfig,ye as processClientScript,n as processDirectives,de as readMarkdownFile};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function
|
|
3
|
-
export{
|
|
2
|
+
var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function ca(e,n,t={}){let o=Math.min(t.width??1440,h),s=Math.min(t.height??2200,h),i=t.waitMs??800,r=t.timeoutMs??15000,m=t.format??"png",c=M(e),u=(f)=>new p({width:o,height:f,headless:!0,...t.backend?{backend:t.backend}:{}}),a=u(s);try{if(await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r);if(t.fullPage){let d=await T(a);if(d>s){if(a.close(),a=u(d),await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r)}}let f=await a.screenshot({encoding:"buffer",format:m});b(l.dirname(l.resolve(n)),{recursive:!0}),await Bun.write(n,f)}finally{a.close()}if(!y(n))throw Error(`Screenshot was not produced for ${e}`);return{input:e,output:n,bytes:S(n).size}}async function ul(e,n,t={}){b(n,{recursive:!0});let o;if(!/^https?:\/\//.test(e)&&y(e)&&S(e).isDirectory())o=v(e).filter((r)=>r.endsWith(".html")).map((r)=>l.join(e,r));else o=[e];let s=t.format??"png",i=[];for(let r of o){let m=/^https?:\/\//.test(r)?new URL(r).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":l.basename(r).replace(/\.html?$/,"");i.push(await ca(r,l.join(n,`${m}.${s}`),t))}return i}
|
|
3
|
+
export{ca,ul};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{y}from"./chunk-
|
|
2
|
+
import{y}from"./chunk-r4199q6x.js";import{q,Ve,as,cs,ti,ni,ri,si,Gn,ls,oi,ii,ai,Tt,o}from"./chunk-hmehxwzj.js";import{Fr}from"./chunk-b2fkxk6k.js";import{a}from"./chunk-4cmqjmqr.js";import{existsSync as M,readFileSync as K}from"fs";import h from"path";var me=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),te=Tt.filter((e)=>!me.has(e)).sort(),ne=[...y].sort(),he=[...new Set([...te,...ne])].sort(),be=new Set(te),ye=new Set(ne),xe=new Set(he),ee=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Se(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ie(e,t){let s=[];for(let u of t){if(u.offset===void 0)continue;let i=u.kind==="server"?be:ye;ee.lastIndex=0;for(let l of u.code.matchAll(ee)){let g=l.index+l[0].indexOf("{")+1;for(let m of l[1].matchAll(/[^,]+/g)){let S=m[0];if(/^\s*type\s/.test(S))continue;let x=/^\s*([A-Za-z_$][\w$]*)/.exec(S);if(!x)continue;let r=x[1];if(!xe.has(r)||i.has(r))continue;let f=u.offset+g+m.index+x[0].length-r.length,p=e.slice(0,f),w=p.split(`
|
|
3
3
|
`).length;s.push({line:w,column:f-(p.lastIndexOf(`
|
|
4
|
-
`)+1)+1,offset:f,length:r.length,name:r,kind:u.kind,message:Se(r,u.kind)})}}}return s}import T from"path";var ke="@stacksjs/stx-typescript-plugin";function we(e,t){let s=T.resolve(e);for(;;){let u=T.join(s,"tsconfig.json");if(t(u))return u;let i=T.dirname(s);if(i===s)return;s=i}}function se(e,t,s){let u=we(e,s);if(!u)return;let i=new Set,l=(g)=>{if(i.has(g))return;i.add(g);let m=t(g);if(!m)return;let S=m.compilerOptions?.plugins;if(Array.isArray(S)){let r=S.find((p)=>p?.name===ke),f=Array.isArray(r?.libs)?r.libs.filter((p)=>typeof p==="string"):[];return r?{configPath:g,libs:f.map((p)=>T.resolve(T.dirname(g),p))}:null}let x=typeof m.extends==="string"?[m.extends]:Array.isArray(m.extends)?m.extends:[];for(let r of[...x].reverse()){if(typeof r!=="string"||!r.startsWith("."))continue;let f=T.resolve(T.dirname(g),r.endsWith(".json")?r:`${r}.json`),p=l(f);if(p!==void 0)return p}return};return l(u)??void 0}function
|
|
5
|
-
`.repeat(e.startLine-1):"",i=
|
|
4
|
+
`)+1)+1,offset:f,length:r.length,name:r,kind:u.kind,message:Se(r,u.kind)})}}}return s}import T from"path";var ke="@stacksjs/stx-typescript-plugin";function we(e,t){let s=T.resolve(e);for(;;){let u=T.join(s,"tsconfig.json");if(t(u))return u;let i=T.dirname(s);if(i===s)return;s=i}}function se(e,t,s){let u=we(e,s);if(!u)return;let i=new Set,l=(g)=>{if(i.has(g))return;i.add(g);let m=t(g);if(!m)return;let S=m.compilerOptions?.plugins;if(Array.isArray(S)){let r=S.find((p)=>p?.name===ke),f=Array.isArray(r?.libs)?r.libs.filter((p)=>typeof p==="string"):[];return r?{configPath:g,libs:f.map((p)=>T.resolve(T.dirname(g),p))}:null}let x=typeof m.extends==="string"?[m.extends]:Array.isArray(m.extends)?m.extends:[];for(let r of[...x].reverse()){if(typeof r!=="string"||!r.startsWith("."))continue;let f=T.resolve(T.dirname(g),r.endsWith(".json")?r:`${r}.json`),p=l(f);if(p!==void 0)return p}return};return l(u)??void 0}function oa(e,t="",s=""){let u=e.startLine>1?`
|
|
5
|
+
`.repeat(e.startLine-1):"",i=ls(e)+cs(as(e.code)),l=e.kind==="client"||e.kind==="plain"?ri(t,e.code):"";return Gn(`${u+i}
|
|
6
6
|
${l}
|
|
7
7
|
export {}
|
|
8
8
|
`,s)}var $e=new Set(["name","status","length","location","history","origin","closed","close","open","focus","blur","print","scroll","scrollTo","scrollBy","stop","top","parent","self","frames","event","external","menubar","toolbar"]);function ve(e){if(e.length===0)return"";let t=["// Generated \u2014 the composables the runtime publishes as bare globals."],s=new Set(y),u=[];for(let{file:i,names:l}of e){let g=JSON.stringify(i.replace(/\\/g,"/").replace(/\.ts$/,""));u.push(` export * from ${g}`);for(let m of l){if(s.has(m)||$e.has(m))continue;s.add(m),t.push(`declare const ${m}: typeof import(${g})[${JSON.stringify(m)}]`)}}return t.push("declare module '@composables' {",...u,"}"),t.join(`
|
|
9
|
-
`)}function ao(e,t,s){return`${e}.__stx_${t}${s}.ts`}function
|
|
9
|
+
`)}function ao(e,t,s){return`${e}.__stx_${t}${s}.ts`}function cl(e){return e.replace(/\.__stx_(?:server|client|plain|template)\d+\.ts$/,"")}function ia(){return re("stx.d.ts")}function aa(){return re("stx-module.d.ts")}function re(e){for(let t of[h.resolve(import.meta.dir,"..",e),h.resolve(import.meta.dir,"..","..",e)])if(M(t))return t;return null}var Te=/^(.*?)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;function De(e){return e>=1000&&e<2000}function oe(e){let t="",s=!1,u=!1;for(let i=0;i<e.length;i++){let l=e[i];if(s){if(t+=l,u)u=!1;else if(l==="\\")u=!0;else if(l==='"')s=!1;continue}if(l==='"'){s=!0,t+=l;continue}if(l==="/"&&e[i+1]==="/"){while(i<e.length&&e[i]!==`
|
|
10
10
|
`)i++;t+=`
|
|
11
|
-
`;continue}if(l==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=l}return t.replace(/,(\s*[}\]])/g,"$1")}function Ee(e){try{return JSON.parse(oe(K(e,"utf8")))}catch{return}}function Oe(e){let t=h.resolve(e),s;for(;;){let r=h.join(t,"tsconfig.json");if(M(r)){s=r;break}let f=h.dirname(t);if(f===t)break;t=f}if(!s)return{};let u=new Set,i=s,l,g,m=s;while(i&&!u.has(i)){u.add(i);let r;try{r=JSON.parse(oe(K(i,"utf8")))}catch{break}let f=r?.compilerOptions??{};if(!l&&f.paths&&typeof f.paths==="object")l=f.paths,m=i;if(!g&&typeof f.baseUrl==="string")g=h.resolve(h.dirname(i),f.baseUrl);if(l&&g)break;i=typeof r?.extends==="string"?h.resolve(h.dirname(i),r.extends.endsWith(".json")?r.extends:`${r.extends}.json`):void 0}if(!l)return{};let S=g??h.dirname(m),x={};for(let[r,f]of Object.entries(l)){if(!Array.isArray(f))continue;x[r]=f.map((p)=>typeof p==="string"&&!h.isAbsolute(p)?h.resolve(S,p):p)}return{paths:x}}async function
|
|
12
|
-
`);for(let d of ie(c,b))S.push({file:n,line:d.line,column:d.column,code:0,message:d.message,category:"error",blockKind:d.kind});if(s&&k){let d=b.filter((O)=>O.kind!=="server"),E=[...new Set(d.flatMap((O)=>si(k,O.code)))];if(E.length>0)m.set(n,{names:E,line:d[0].startLine,kind:d[0].kind})}let D=h.dirname(h.resolve(n)),v=i?oi(c,{runtimeGlobals:!p,originDir:D,filePath:h.resolve(n),componentsDir:l}):null,R=v?[...v.lineMap.values()].filter((d)=>d.expression).length:0;if(b.length===0&&R===0)continue;if(x.push(n),r+=b.length,f+=R,b.forEach((d,E)=>{g.set(ao(n,d.kind,E),{source:
|
|
13
|
-
`),ve(await
|
|
11
|
+
`;continue}if(l==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=l}return t.replace(/,(\s*[}\]])/g,"$1")}function Ee(e){try{return JSON.parse(oe(K(e,"utf8")))}catch{return}}function Oe(e){let t=h.resolve(e),s;for(;;){let r=h.join(t,"tsconfig.json");if(M(r)){s=r;break}let f=h.dirname(t);if(f===t)break;t=f}if(!s)return{};let u=new Set,i=s,l,g,m=s;while(i&&!u.has(i)){u.add(i);let r;try{r=JSON.parse(oe(K(i,"utf8")))}catch{break}let f=r?.compilerOptions??{};if(!l&&f.paths&&typeof f.paths==="object")l=f.paths,m=i;if(!g&&typeof f.baseUrl==="string")g=h.resolve(h.dirname(i),f.baseUrl);if(l&&g)break;i=typeof r?.extends==="string"?h.resolve(h.dirname(i),r.extends.endsWith(".json")?r.extends:`${r.extends}.json`):void 0}if(!l)return{};let S=g??h.dirname(m),x={};for(let[r,f]of Object.entries(l)){if(!Array.isArray(f))continue;x[r]=f.map((p)=>typeof p==="string"&&!h.isAbsolute(p)?h.resolve(S,p):p)}return{paths:x}}async function ll(e,t={}){let s=t.client!==!1,u=t.server!==!1,i=t.templates!==!1,l=t.componentsDir??(i?(await o()).componentsDir:void 0),g=new Map,m=new Map,S=[],x=[],r=0,f=0,p=ia();for(let n of e){let c=await Bun.file(n).text(),b=Ve(c).filter((d)=>{if(d.kind==="server")return u;return s}),k=Ve(c).filter((d)=>d.kind==="server").map((d)=>d.code).join(`
|
|
12
|
+
`);for(let d of ie(c,b))S.push({file:n,line:d.line,column:d.column,code:0,message:d.message,category:"error",blockKind:d.kind});if(s&&k){let d=b.filter((O)=>O.kind!=="server"),E=[...new Set(d.flatMap((O)=>si(k,O.code)))];if(E.length>0)m.set(n,{names:E,line:d[0].startLine,kind:d[0].kind})}let D=h.dirname(h.resolve(n)),v=i?oi(c,{runtimeGlobals:!p,originDir:D,filePath:h.resolve(n),componentsDir:l}):null,R=v?[...v.lineMap.values()].filter((d)=>d.expression).length:0;if(b.length===0&&R===0)continue;if(x.push(n),r+=b.length,f+=R,b.forEach((d,E)=>{g.set(ao(n,d.kind,E),{source:oa(d,k,D),origin:n,kind:d.kind})}),v&&R>0)g.set(ao(n,"template",0),{source:v.text,origin:n,kind:"template",virtual:v})}if(g.size===0)return{diagnostics:S,checkedFiles:x,blockCount:0,expressionCount:0};let w=(t.extraLibs??[]).map((n)=>h.resolve(n)),ce=se(e.length>0?h.dirname(h.resolve(e[0])):process.cwd(),Ee,M);for(let n of ce?.libs??[])if(!w.includes(n)&&M(n))w.push(n);if(p)w.push(p);let G=p?aa():null;if(G)w.push(G);let X=`${a()}/typecheck/__stx_globals.d.ts`,ae=["// Generated \u2014 the context serve.ts injects into <script server> blocks.",ti(p?ni(K(p,"utf8")):void 0),...p?[]:["declare const window: any",...y.map((n)=>`declare const ${n}: any`)],["// Generated \u2014 the names stx auto-imports from @stacksjs/browser.",...q.map((n)=>`declare const ${n}: any`)].join(`
|
|
13
|
+
`),ve(await Fr())].filter(Boolean).join(`
|
|
14
14
|
`),_=`${a()}/typecheck`;await Bun.$`rm -rf ${_}`.quiet().nothrow(),await Bun.$`mkdir -p ${_}`.quiet().nothrow(),await Bun.write(X,ae);let N=new Map,le=0;for(let[n,c]of g){let b=`${le++}_${n.replace(/[^\w.-]+/g,"_")}`;await Bun.write(`${_}/${b}`,c.source),N.set(b,c)}let ue={target:"ESNext",module:"ESNext",moduleResolution:"bundler",strict:!0,noEmit:!0,skipLibCheck:!0,allowJs:!0,esModuleInterop:!0,resolveJsonModule:!0,lib:["ESNext","DOM","DOM.Iterable"],types:[],...Oe(e.length>0?h.dirname(h.resolve(e[0])):process.cwd()),...t.compilerOptions??{}},F=async(n,c)=>{let b=`${_}/tsconfig${c===1?"":`.${c}`}.json`;await Bun.write(b,JSON.stringify({compilerOptions:ue,files:n.map((D)=>`${_}/${D}`).concat(X,...w)},null,2));let k=Bun.spawnSync(["bun","x","tsc","-p",b,"--pretty","false"],{stdout:"pipe",stderr:"pipe"});return{output:new TextDecoder().decode(k.stdout)+new TextDecoder().decode(k.stderr),exitCode:k.exitCode??0}},V=await F([...N.keys()],1),J=V.output,I=[],U=V.exitCode,W=0,pe=new Set(w.map((n)=>n.split("/").pop())),z=0,B=new Set,H=(n)=>{for(let c of n.replace(/\n[\t ]+([^\n]*)/g," $1").split(`
|
|
15
15
|
`)){let b=c.match(Te);if(!b)continue;if(W++,pe.has(b[1].split("/").pop()))z++;let[,k,D,v,R,d,E]=b,O=k.split("/").pop(),C=N.get(O);if(!C)continue;if(De(Number(d)))B.add(O);let A=Number(D),L=Number(v),Y;if(C.virtual){let P=ai(C.virtual,A,L);if(!P?.expression)continue;if(ii(P,Number(d)))continue;A=P.line,L=P.column,Y=P.expression.code.trim()}I.push({file:C.origin,line:A,column:L,code:Number(d),message:E,category:R==="error"?"error":"warning",blockKind:C.kind,expression:Y})}};H(J);let de=W,fe=z;if(B.size>0&&B.size<N.size){let n=[...N.keys()].filter((c)=>!B.has(c));H((await F(n,2)).output)}if(s)for(let[n,c]of m){if(c.names.length===0)continue;I.push({file:n,line:c.line,column:1,code:0,message:`${c.names.length===1?"1 value reaches":`${c.names.length} values reach`} this block on the implicit bridge and ${c.names.length===1?"is":"are"} untyped: ${c.names.join(", ")}. Declare them with defineClientPayload({ ${c.names.join(", ")} }) in the server block to have them checked.`,category:"warning",blockKind:c.kind})}I.push(...S);let Z=new Set,j=I.filter((n)=>{let c=`${n.file}:${n.line}:${n.column}:${n.code}:${n.message}`;if(Z.has(c))return!1;return Z.add(c),!0});j.sort((n,c)=>n.file.localeCompare(c.file)||n.line-c.line||n.column-c.column);let Q=fe>0&&j.length===0,ge=Q||U!==0&&de===0?`${Q?"a file passed with --lib has errors of its own, so nothing in your code was checked":`tsc exited ${U} without reporting any diagnostic, so nothing was checked`}. `+"A syntax error in an ambient declaration file does this \u2014 skipLibCheck suppresses "+`SEMANTIC diagnostics only. tsc said:
|
|
16
16
|
${J.trim().split(`
|
|
17
17
|
`).slice(0,12).join(`
|
|
18
|
-
`)||"(no output)"}`:void 0;return{diagnostics:j,checkedFiles:x,blockCount:r,expressionCount:f,failure:ge}}function
|
|
18
|
+
`)||"(no output)"}`:void 0;return{diagnostics:j,checkedFiles:x,blockCount:r,expressionCount:f,failure:ge}}function dl(e){return e.map((t)=>{let s=t.blockKind==="template"?`[template: ${t.expression??""}]`:`[${t.blockKind==="plain"?"<script>":`<script ${t.blockKind}>`}]`;return`${t.file}:${t.line}:${t.column} ${t.category} TS${t.code} ${t.message} ${s}`}).join(`
|
|
19
19
|
`)}
|
|
20
|
-
export{
|
|
20
|
+
export{oa,ao,cl,ia,aa,ll,dl};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import s from"path";var h=new Set([".jpg",".jpeg",".png",".gif"]),d=[{ext:".avif",mime:"image/avif"},{ext:".webp",mime:"image/webp"}];async function
|
|
3
|
-
export{
|
|
2
|
+
import s from"path";var h=new Set([".jpg",".jpeg",".png",".gif"]),d=[{ext:".avif",mime:"image/avif"},{ext:".webp",mime:"image/webp"}];async function za(e,r){let a=r.formats??d;if(!r.publicDir)return e;let i=y(e),o=[],m=/<img\b[^>]*?>/gi,c=[],u;while((u=m.exec(e))!==null){let t=u[0],n=t.match(/\bsrc=["']([^"']+)["']/i);if(!n)continue;if(A(u.index,i))continue;c.push({idx:u.index,length:t.length,src:n[1],raw:t})}if(c.length===0)return e;let f=await Promise.all(c.map(async(t)=>{let n=await S(t.src,r.publicDir,a);return{match:t,sources:n}}));for(let{match:t,sources:n}of f){if(n.length===0)continue;let x=`<picture>${n.map((p)=>`<source type="${p.mime}" srcset="${P(p.url)}">`).join("")}${t.raw}</picture>`;o.push({start:t.idx,end:t.idx+t.length,replacement:x})}if(o.length===0)return e;let l="",g=0;for(let t of o)l+=e.slice(g,t.start),l+=t.replacement,g=t.end;return l+=e.slice(g),l}async function S(e,r,a){if(!w(e))return[];let i=s.extname(e).toLowerCase();if(!h.has(i))return[];if(!e.startsWith("/"))return[];let o=s.join(r,e.slice(1)),m=s.dirname(o),c=s.basename(o,i),u=s.resolve(m),f=s.resolve(r);if(!u.startsWith(f))return[];let l=s.posix.dirname(e),g=a.map(async(n)=>{let b=s.join(m,`${c}${n.ext}`);if(!await Bun.file(b).exists())return null;return{url:s.posix.join(l,`${c}${n.ext}`),mime:n.mime}});return(await Promise.all(g)).filter((n)=>n!==null)}function w(e){if(!e)return!1;if(e.startsWith("http://")||e.startsWith("https://"))return!1;if(e.startsWith("//"))return!1;if(e.startsWith("data:"))return!1;return!0}function y(e){let r=[],a=/<picture\b[^>]*>[\s\S]*?<\/picture>/gi,i;while((i=a.exec(e))!==null)r.push([i.index,i.index+i[0].length]);return r}function A(e,r){for(let[a,i]of r)if(e>=a&&e<i)return!0;return!1}function P(e){return e.replace(/&/g,"&").replace(/"/g,""")}
|
|
3
|
+
export{za};
|