@stacksjs/stx 0.2.490 → 0.2.491
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/app-service-worker.d.ts +12 -0
- package/dist/{chunk-rd2w20hg.js → chunk-0acycggt.js} +1 -1
- package/dist/{chunk-9gqkdzhq.js → chunk-0gx8he4p.js} +1 -1
- package/dist/{chunk-hem4ak5x.js → chunk-0zs1fd9z.js} +1 -1
- package/dist/{chunk-rcn6m3cj.js → chunk-1x4b64mx.js} +1 -1
- package/dist/{chunk-nr7qak48.js → chunk-2b1zg7xp.js} +1 -1
- package/dist/{chunk-2cybh8dh.js → chunk-4tb1mqr8.js} +1 -1
- package/dist/{chunk-2hbygqzj.js → chunk-52fcqzmc.js} +1 -1
- package/dist/{chunk-yhv65tpd.js → chunk-6mqb6vf7.js} +1 -1
- package/dist/{chunk-rn4cppcj.js → chunk-7c18zqdc.js} +1 -1
- package/dist/{chunk-93wkn776.js → chunk-86vgttef.js} +1 -1
- package/dist/{chunk-ah4ww997.js → chunk-aertsqje.js} +1 -1
- package/dist/chunk-af944jrx.js +2 -0
- package/dist/{chunk-4b5hg8y1.js → chunk-b6xrqx6w.js} +1 -1
- package/dist/{chunk-egax8990.js → chunk-bay6snzz.js} +1 -1
- package/dist/{chunk-jva1bbpw.js → chunk-bt58m9y8.js} +1 -1
- package/dist/{chunk-0ttq5enq.js → chunk-c0jedy4d.js} +1 -1
- package/dist/{chunk-ftdabyt6.js → chunk-cfj3c9ss.js} +1 -1
- package/dist/{chunk-p5bwcppv.js → chunk-djwms13g.js} +1 -1
- package/dist/{chunk-rt71qxdq.js → chunk-dnq9fhwf.js} +1 -1
- package/dist/{chunk-s6v5p03w.js → chunk-e43ckdk2.js} +1 -1
- package/dist/{chunk-6ejfx4qw.js → chunk-emx5wsaa.js} +1 -1
- package/dist/{chunk-qv3rrz9a.js → chunk-f324yttz.js} +1 -1
- package/dist/{chunk-p6trwjap.js → chunk-fh3r97cq.js} +1 -1
- package/dist/{chunk-hsywkvng.js → chunk-fh7w72xm.js} +1 -1
- package/dist/{chunk-0ma6yhg9.js → chunk-ft6k76e4.js} +1 -1
- package/dist/{chunk-ezvy497d.js → chunk-fzwy4nny.js} +1 -1
- package/dist/{chunk-8b71njp8.js → chunk-g3hn7ncc.js} +2 -2
- package/dist/{chunk-rbsn2vf5.js → chunk-gparzn81.js} +1 -1
- package/dist/{chunk-vzxkwr23.js → chunk-gwvg2c50.js} +1 -1
- package/dist/{chunk-1yckkva7.js → chunk-j1d4aemv.js} +1 -1
- package/dist/{chunk-qk5j55r0.js → chunk-jaghd4j0.js} +2 -2
- package/dist/{chunk-baprpeby.js → chunk-jnf8vt18.js} +1 -1
- package/dist/{chunk-5f7qy42x.js → chunk-jws8btr5.js} +115 -115
- package/dist/{chunk-nxxmhrd0.js → chunk-kzg3h5wg.js} +1 -1
- package/dist/{chunk-svywp38a.js → chunk-nf9fhj10.js} +1 -1
- package/dist/{chunk-34154wz1.js → chunk-nfd56dgj.js} +1 -1
- package/dist/{chunk-yxgfw906.js → chunk-nnqjjtqz.js} +1 -1
- package/dist/{chunk-g7jcpd5j.js → chunk-nwy97xaa.js} +1 -1
- package/dist/{chunk-9ds5dn6f.js → chunk-perp76wy.js} +1 -1
- package/dist/{chunk-8j8egh39.js → chunk-q21e52cb.js} +1 -1
- package/dist/chunk-q9w7sb6r.js +2 -0
- package/dist/chunk-qnyfg99e.js +2 -0
- package/dist/{chunk-9mywx2x0.js → chunk-sdxq5ej9.js} +1 -1
- package/dist/{chunk-jd9c46cc.js → chunk-vbthtg0x.js} +1 -1
- package/dist/{chunk-368zt1db.js → chunk-z26ty1t1.js} +1 -1
- package/dist/{chunk-24jeywdh.js → chunk-z7bqn398.js} +5 -5
- package/dist/{chunk-aabzyk88.js → chunk-ze9vhhvc.js} +2 -2
- package/dist/{chunk-zkjp87ak.js → chunk-zxkzdbcv.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/composables/use-network.d.ts +4 -0
- package/dist/composables/use-network.js +4 -3
- package/dist/composables/use-outbox.d.ts +1 -0
- package/dist/composables/use-outbox.js +51 -22
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/offline/app-service-worker.d.ts +12 -0
- package/dist/offline/app-service-worker.js +56 -12
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/package.json +5 -5
- package/dist/chunk-0jfrzq0r.js +0 -2
- package/dist/chunk-5cd0jbt4.js +0 -2
- package/dist/chunk-vwybce48.js +0 -2
|
@@ -34,6 +34,12 @@
|
|
|
34
34
|
* before the app's last write is not answered at once (the write would
|
|
35
35
|
* seem not to have happened), nor is one for a request made with
|
|
36
36
|
* `cache: 'no-cache'` (a pull to refresh) or under a `networkFirst` prefix.
|
|
37
|
+
* - Whether the server can be reached: a page whose reads are all answered
|
|
38
|
+
* from kept copies cannot tell that the network behind them is gone (a
|
|
39
|
+
* phone on one bar of gym wifi says it is online). When a request to the
|
|
40
|
+
* server fails for want of a network, or succeeds again, every open page
|
|
41
|
+
* hears `stx:reachability` { reachable, at }, `at` being when the server
|
|
42
|
+
* last answered; `useNetwork()` counts an unreachable server as offline.
|
|
37
43
|
* - Writes are never cached or replayed here. The page queues them itself
|
|
38
44
|
* (`useOutbox`), where it can tell the person what happened.
|
|
39
45
|
* - A new build installs beside the running one and waits. It takes over when
|
|
@@ -50,6 +56,12 @@ export interface OfflineAppConfig {
|
|
|
50
56
|
* Listed pages whose HTML is an account-independent shell. These may be
|
|
51
57
|
* retained despite the server's default no-store header. Never list pages
|
|
52
58
|
* containing server-rendered personal data; API no-store remains enforced.
|
|
59
|
+
*
|
|
60
|
+
* A route of `routes` may be listed too (`/m/go/:id`, as written there):
|
|
61
|
+
* its kept page, the one every value of it stands in with offline, is then
|
|
62
|
+
* refreshed by each visit despite no-store. Without that, a server that
|
|
63
|
+
* marks every page no-store left a route only the copy fetched when the
|
|
64
|
+
* worker installed, and a page in `pages` none at all after its first visit.
|
|
53
65
|
*/
|
|
54
66
|
staticPages?: string[];
|
|
55
67
|
/** Path prefix of the app's API, whose GET answers are kept for offline. Default '/api/'. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{_o,To,Ro,$u}from"./chunk-
|
|
2
|
+
import{_o,To,Ro,$u}from"./chunk-f324yttz.js";import"./chunk-ze9vhhvc.js";import"./chunk-jws8btr5.js";import"./chunk-szry3s17.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-kzg3h5wg.js";import"./chunk-1erc0vrb.js";import"./chunk-qmcmjdy7.js";import"./chunk-b77v56fz.js";import"./chunk-2pph3dh0.js";import"./chunk-d4k4nyj0.js";import"./chunk-v7vkqg8f.js";import"./chunk-rmavqxd8.js";import"./chunk-e6y6s7q8.js";export{_o as buildNative,$u as default,Ro as getAvailableFormats,To as getAvailableTargets};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-2pph3dh0.js";import"./chunk-c57j92td.js";import"./chunk-rmavqxd8.js";import{cr,js,Bi}from"./chunk-v7vkqg8f.js";import"./chunk-d4k4nyj0.js";import{Hn,qn,n,o}from"./chunk-5f7qy42x.js";import"./chunk-b77v56fz.js";import"./chunk-qmcmjdy7.js";import"./chunk-1erc0vrb.js";import"./chunk-nxxmhrd0.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import{De}from"./chunk-25m2wqsd.js";import"./chunk-szry3s17.js";import{existsSync as le,mkdirSync as Qt,readFileSync as Zt}from"fs";import O from"path";import{existsSync as qt,mkdirSync as Yt}from"fs";import P from"path";import{existsSync as Gt}from"fs";import j from"path";var Ke="data-stx-b",he=new Set(js),Qe=new Set(cr);function Ze(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(he.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(Bi(e))return"event";if(r.startsWith("@"))return"event";return"attr"}if(r.startsWith("x-")){let e=r.split(".")[0];if(!Qe.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 he.has(t)?t==="if"?"if":t:"attr"}return null}function et(r){let e=[];for(let[t,i]of r){let s=Ze(t);if(s)e.push({name:t,value:i,kind:s})}return e}var tt=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,Q=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function be(r){let e=[],t=0;return{html:r.replace(tt,(s,a,c)=>{if(!c||!/[:@]|x-/.test(c))return s;let u=[];Q.lastIndex=0;for(let h=Q.exec(c);h;h=Q.exec(c))u.push([h[1],h[2]??h[3]??h[4]??""]);let d=et(u);if(!d.length)return s;let m={id:t++,bindings:d};if(d.some((h)=>h.kind==="for"))m.template=!0;e.push(m);let p=s.endsWith("/>");return`${s.slice(0,p?-2:-1).trimEnd()} ${Ke}="${m.id}"${p?"/>":">"}`}),manifest:{entries:e}}}var ee={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText"},we=new Set(Object.values(ee));var ye=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),Te=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight"];function C(r){let e=typeof r==="number"?r:Number.parseFloat(String(r??""));return Number.isFinite(e)?e:0}function A(r){return Math.round(r*1000)/1000}function ke(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 nt(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 xe=/[MLHVCSQTAZ]/i,Z=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function rt(r){let e=[],t=r,i=xe.exec(t);while(i){let s=i.index;t=t.slice(s);let a=t[0];t=t.slice(1);let c=xe.exec(t),u=c?t.slice(0,c.index):t,d;if(a==="A"||a==="a"){d=[];let m=0,p=u.trim(),l=0;while(l<p.length){let h=m%7,b=p.slice(l).replace(/^[\s,]+/,"");if(l=p.length-b.length,!b)break;if(h===3||h===4)d.push(b[0]==="1"?1:0),l+=1;else{Z.lastIndex=0;let S=Z.exec(b);if(!S||S.index!==0)break;d.push(Number.parseFloat(S[0])),l+=S[0].length}m++}}else d=(u.match(Z)||[]).map(Number.parseFloat);e.push({command:a,args:d}),i=c}return e}function it(r,e,t,i,s,a,c,u,d){if(r===u&&e===d)return[];let m=Math.abs(t),p=Math.abs(i);if(!m||!p)return[1,u,d];let l=s*Math.PI/180,h=Math.cos(l),b=Math.sin(l),S=(r-u)/2,x=(e-d)/2,f=h*S+b*x,w=-b*S+h*x,T=f*f/(m*m)+w*w/(p*p);if(T>1)m*=Math.sqrt(T),p*=Math.sqrt(T);let N=m*m*p*p-m*m*w*w-p*p*f*f,g=m*m*w*w+p*p*f*f,R=Math.sqrt(Math.max(0,N/g));if(a===c)R=-R;let k=R*(m*w)/p,v=R*-(p*f)/m,I=h*k-b*v+(r+u)/2,B=b*k+h*v+(e+d)/2,W=(E,_,L,z)=>{let J=E*z-_*L<0?-1:1,K=(E*L+_*z)/(Math.hypot(E,_)*Math.hypot(L,z));return J*Math.acos(Math.min(1,Math.max(-1,K)))},qe=W(1,0,(f-k)/m,(w-v)/p),V=W((f-k)/m,(w-v)/p,(-f-k)/m,(-w-v)/p);if(!c&&V>0)V-=2*Math.PI;if(c&&V<0)V+=2*Math.PI;let G=Math.max(1,Math.ceil(Math.abs(V)/(Math.PI/2))),ue=V/G,H=1.3333333333333333*Math.tan(ue/4),de=[],fe=(E)=>{let _=m*Math.cos(E),L=p*Math.sin(E);return[h*_-b*L+I,b*_+h*L+B]},pe=(E)=>{let _=-m*Math.sin(E),L=p*Math.cos(E);return[h*_-b*L,b*_+h*L]},U=qe;for(let E=0;E<G;E++){let _=U+ue,[L,z]=fe(U),[J,K]=pe(U),[ge,me]=fe(_),[Ye,Je]=pe(_);de.push(2,L+H*J,z+H*K,ge-H*Ye,me-H*Je,E===G-1?u:ge,E===G-1?d:me),U=_}return de}function ot(r){let e=[],t=0,i=0,s=0,a=0,c=0,u=0,d=0,m=0,p="";for(let{command:l,args:h}of rt(String(r??""))){let b=l===l.toLowerCase(),S=l.toUpperCase(),x=()=>b?t:0,f=()=>b?i:0,w=0,T=(g)=>{if(w+g>h.length)return null;let R=h.slice(w,w+g);return w+=g,R};if(S==="Z"){e.push(4),t=s,i=a,p="Z";continue}let N=!0;while(w<h.length||N&&S==="Z"){switch(S){case"M":{let g=T(2);if(!g)return e;if(t=g[0]+x(),i=g[1]+f(),N)e.push(0,t,i),s=t,a=i;else e.push(1,t,i);p=N?"M":"L";break}case"L":{let g=T(2);if(!g)return e;t=g[0]+x(),i=g[1]+f(),e.push(1,t,i),p="L";break}case"H":{let g=T(1);if(!g)return e;t=g[0]+x(),e.push(1,t,i),p="L";break}case"V":{let g=T(1);if(!g)return e;i=g[0]+f(),e.push(1,t,i),p="L";break}case"C":{let g=T(6);if(!g)return e;let R=g[0]+x(),k=g[1]+f();c=g[2]+x(),u=g[3]+f(),t=g[4]+x(),i=g[5]+f(),e.push(2,R,k,c,u,t,i),p="C";break}case"S":{let g=T(4);if(!g)return e;let R=p==="C"?2*t-c:t,k=p==="C"?2*i-u:i;c=g[0]+x(),u=g[1]+f(),t=g[2]+x(),i=g[3]+f(),e.push(2,R,k,c,u,t,i),p="C";break}case"Q":{let g=T(4);if(!g)return e;d=g[0]+x(),m=g[1]+f(),t=g[2]+x(),i=g[3]+f(),e.push(3,d,m,t,i),p="Q";break}case"T":{let g=T(2);if(!g)return e;d=p==="Q"?2*t-d:t,m=p==="Q"?2*i-m:i,t=g[0]+x(),i=g[1]+f(),e.push(3,d,m,t,i),p="Q";break}case"A":{let g=T(7);if(!g)return e;let R=g[5]+x(),k=g[6]+f();e.push(...it(t,i,g[0],g[1],g[2],g[3],g[4],R,k)),t=R,i=k,p="A";break}default:return e}N=!1}}return e.map((l)=>A(l))}function Se(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(A)}function ve(r,e){switch(r){case"Path":return ot(String(e.d??""));case"Line":return[0,C(e.x1),C(e.y1),1,C(e.x2),C(e.y2)].map(A);case"Rect":{let t=C(e.x),i=C(e.y),s=C(e.width),a=C(e.height);if(s<=0||a<=0)return[];let c=e.rx===void 0?C(e.ry):C(e.rx),u=e.ry===void 0?c:C(e.ry);if(c=Math.min(Math.max(0,c),s/2),u=Math.min(Math.max(0,u),a/2),!c||!u)return[0,t,i,1,t+s,i,1,t+s,i+a,1,t,i+a,4].map(A);let d=0.5522847498;return[0,t+c,i,1,t+s-c,i,2,t+s-c+d*c,i,t+s,i+u-d*u,t+s,i+u,1,t+s,i+a-u,2,t+s,i+a-u+d*u,t+s-c+d*c,i+a,t+s-c,i+a,1,t+c,i+a,2,t+c-d*c,i+a,t,i+a-u+d*u,t,i+a-u,1,t,i+u,2,t,i+u-d*u,t+c-d*c,i,t+c,i,4].map(A)}case"Circle":return Se(C(e.cx),C(e.cy),C(e.r),C(e.r));case"Ellipse":return Se(C(e.cx),C(e.cy),C(e.rx),C(e.ry));case"Polyline":case"Polygon":{let t=nt(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(A)}default:return null}}var st=[...Te,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumTrackTintColor","minimumValue","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize"],at=new Map(st.map((r)=>[Ce(r),r]));function Ce(r){return r.replace(/[-_]/g,"").toLowerCase()}function te(r){return at.get(Ce(r))??r}var ct={view:"View",text:"Text",button:"Button",image:"Image",img:"Image",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",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 Re(r){return ct[r.toLowerCase()]||r}var lt={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",archive:"archivebox","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","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100",bed:"bed.double",bell:"bell","bell-off":"bell.slash",bike:"figure.outdoor.cycle",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",brain:"brain",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-line":"chart.xyaxis.line",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-check":"checkmark.circle","circle-check-big":"checkmark.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",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",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",heart:"heart","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-grid":"square.grid.2x2",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",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",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","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",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","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",sparkles:"sparkles",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront",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",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",video:"video","volume-2":"speaker.wave.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 Ee(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=lt[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 ut={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Ie={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},_e={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},D={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function M(r){let e=r.lastIndexOf("/");if(e>0&&!r.endsWith("]")){let i=M(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 dt(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=ut[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 dt(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 ne(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 y(r){if(r.startsWith("[")&&r.endsWith("]")){let e=r.slice(1,-1),t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return Ie[r]}var ft={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 pt(r,e){if(!r.startsWith("bg-"))return!1;let t=r.slice(3),i=M(t);if(i)return e.backgroundColor=i,!0;return!1}function gt(r,e){if(!r.startsWith("text-"))return!1;let t=r.slice(5);if(_e[t])return e.fontSize=_e[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=M(t);if(i)return e.color=i,!0;return!1}var mt=new Set(["t","tr","r","br","b","bl","l","tl"]);function ht(r,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(r);if(t&&mt.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let i=/^(from|via|to)-(.+)$/.exec(r);if(!i)return!1;let s=M(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 bt(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=M(s);if(a)return e[t]=a,!0}return!1}function xt(r,e){if(r.startsWith("p-")){let t=y(r.slice(2));if(t!==void 0)return e.padding=t,!0}if(r.startsWith("px-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(r.startsWith("py-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(r.startsWith("pt-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(r.startsWith("pr-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(r.startsWith("pb-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(r.startsWith("pl-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function St(r,e){if(r.startsWith("m-")){let t=y(r.slice(2));if(t!==void 0)return e.margin=t,!0}if(r.startsWith("mx-")){let t=y(r.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(r.startsWith("my-")){let t=y(r.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(r.startsWith("mt-")){let t=y(r.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(r.startsWith("mr-")){let t=y(r.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(r.startsWith("mb-")){let t=y(r.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(r.startsWith("ml-")){let t=y(r.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function wt(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=y(t);if(i!==void 0)return e.width=i,!0;return!1}function yt(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=y(t);if(i!==void 0)return e.height=i,!0;return!1}function Tt(r,e){if(!r.startsWith("rounded"))return!1;if(r==="rounded")return e.borderRadius=D.DEFAULT,!0;let t=r.slice(8);if(t==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(t);if(i){let a=ne(i[2]);if(a===void 0)return!1;let c={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let u of i[1]?c[i[1]]:["borderRadius"])e[u]=a;return!0}if(t.startsWith("t-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderTopLeftRadius=a,e.borderTopRightRadius=a,!0}if(t.startsWith("b-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderBottomLeftRadius=a,e.borderBottomRightRadius=a,!0}if(t.startsWith("l-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderTopLeftRadius=a,e.borderBottomLeftRadius=a,!0}if(t.startsWith("r-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderTopRightRadius=a,e.borderBottomRightRadius=a,!0}let s=D[t];if(s!==void 0)return e.borderRadius=s,!0;return!1}function kt(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 vt(r,e){if(!r.startsWith("border-"))return!1;let t=r.slice(7),i=M(t);if(i)return e.borderColor=i,!0;return!1}function Ct(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 Rt(r,e){if(r.startsWith("tracking-[")){let t=ne(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:ne(t,i):s[t]!==void 0?s[t]*i:Ie[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Et(r,e){let t=/^grid-cols-(\d+)$/.exec(r);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function _t(r,e){if(!r.startsWith("size-"))return!1;let t=r.slice(5),i=t==="full"?"100%":y(t);if(i===void 0)return!1;return e.width=i,e.height=i,!0}var Nt={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function It(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"&&Nt[a]||y(a);if(c===void 0&&a!=="none")return!1;let u=`${i}${s==="w"?"Width":"Height"}`;if(c===void 0)delete e[u];else e[u]=c;return!0}function Lt(r,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(r);if(!t)return!1;let i=t[3]==="full"?"100%":y(t[3]);if(i===void 0)return!1;return e[t[2]]=typeof i==="number"&&t[1]?-i:i,!0}function Bt(r,e){let t=/^space-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=y(t[2]);if(i===void 0)return!1;return e.gap=i,!0}function Wt(r,e){if(r.startsWith("gap-")){let t=y(r.slice(4));if(t!==void 0)return e.gap=t,!0}if(r.startsWith("gap-x-")){let t=y(r.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(r.startsWith("gap-y-")){let t=y(r.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function re(r){let e=[],t=[],i=[];function s(d,m){let p=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(d),l=p&&Hn[p[2]];return l?`${p[1]}-${l[m]}${p[3]||""}`:d}for(let d of r.split(/\s+/).filter(Boolean))if(d.startsWith("dark:"))t.push(s(d.slice(5),"dark"));else if(!d.includes(":")||d.startsWith("[")){if(e.push(s(d,"light")),s(d,"dark")!==d)i.push(s(d,"dark"))}let a=[],u={style:Ne(e.join(" "),a),unknown:a};if(t.length||i.length)u.dark=Ne([...i,...t].join(" "),a);for(let d of e){if(d==="truncate")u.numberOfLines=1;let m=/^line-clamp-(\d+)$/.exec(d);if(m)u.numberOfLines=Number(m[1]);if(!u.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(d))u.icon=d}return u.unknown=a.filter((d)=>!/^line-clamp-\d+$/.test(d)),u}function Ne(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=ft[s];if(a){a("",t);continue}if(ht(s,t))continue;if(pt(s,t))continue;if(bt(s,t))continue;if(gt(s,t))continue;if(xt(s,t))continue;if(St(s,t))continue;if(wt(s,t))continue;if(yt(s,t))continue;if(Tt(s,t))continue;if(kt(s,t))continue;if(vt(s,t))continue;if(Ct(s,t))continue;if(Wt(s,t))continue;if(Rt(s,t))continue;if(_t(s,t))continue;if(It(s,t))continue;if(Et(s,t))continue;if(Lt(s,t))continue;if(Bt(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 X(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 Be=new Set(["script","style","head","meta","link","title","base","noscript"]),We=new Set(["template","body","html","main","fragment"]),q=new Set,Dt={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",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"},Ot=new Set(["onBlur","onChangeText","onDismiss","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onPress","onPressIn","onPressOut","onRequestClose","onRefresh","onScroll","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),ie=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"]),Pt=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"]),Vt=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"]),Oe=new Set(["View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","FlatList","SectionList","Switch","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...we]),Pe=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),At={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function F(r){return r.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let i=At[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 Ve(r){return r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Ae(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 Me(r,e,t){let i={},s={},a={},c="",u={};for(let[m,p]of e){let l=m.toLowerCase();if(l==="class"||l==="classname"){c=c?`${c} ${p}`:p;continue}if(l==="style"){u={...u,...Mt(r,p,t)};continue}if(l.startsWith(":")||l.startsWith("x-")&&l!=="x-cloak"){a[l.startsWith(":")?l.slice(1):l.slice(2)]=F(p);continue}if(l==="x-cloak")continue;if(l.startsWith("@")||l.startsWith("v-on:")){let b=l.startsWith("@")?l.slice(1):l.slice(5),[S]=b.split("."),x=Dt[S]??(S.startsWith("on")?S:"");if(!x||!Ot.has(x)){t.push({kind:"unread-event",tag:r,name:m});continue}s[x]=F(p);continue}if(l==="key"){i.key=p;continue}let h=F(p);try{i[te(m)]=JSON.parse(h)}catch{i[te(m)]=h}}let d={...c?re(c).style:{},...u};return{props:i,style:d,events:s,bindings:a,classes:c,inline:u}}function Xe(r,e){if(Pt.has(r))return!1;if(Vt.has(r))return/^-?[\d.]+%$/.test(e);return!0}function Mt(r,e,t){let i={},s=F(e);try{let a=JSON.parse(s);if(a&&typeof a==="object"&&!Array.isArray(a)){for(let[c,u]of Object.entries(a)){let d=ie.has(c)?c:Ve(c.trim().toLowerCase());if(!ie.has(d)){t.push({kind:"unknown-style",tag:r,name:d});continue}if(u===null||u===void 0)continue;let m=typeof u==="string"?Ae(u):u;if(typeof m!=="string"&&typeof m!=="number")continue;if(typeof m==="string"&&!Xe(d,m)){t.push({kind:"non-numeric-style",tag:r,name:d});continue}i[d]=m}return i}}catch{}for(let a of s.split(";")){let c=a.indexOf(":");if(c===-1)continue;let u=Ve(a.slice(0,c).trim().toLowerCase()),d=a.slice(c+1).trim();if(!u||!d)continue;if(!ie.has(u)){t.push({kind:"unknown-style",tag:r,name:u});continue}let m=Ae(d);if(typeof m==="string"&&!Xe(u,m)){t.push({kind:"non-numeric-style",tag:r,name:u});continue}i[u]=m}return i}function oe(r){return r.children.map((e)=>typeof e==="string"?e:oe(e)).join("").replace(/\s+/g," ").trim()}function Xt(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=oe(t);return t.children=a?[a]:[],t}if(Pe.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=oe(t);return e.push({kind:"flattened-text",tag:r.tag}),t.children=a?[a]:[],t}if(Pe.has(t.type)&&i.length>0)t.children=i;return t}async function $t(r,e={}){let t=[],i=[],s=[],a=new Set;function c(l){let h=s[s.length-1];if(!h)i.push(l);else if(!h.dropped)h.node.children.push(l)}function u(l){if(l.node.bindings&&Object.keys(l.node.bindings).length>0){let b=l.node.children,S=b.filter((f)=>typeof f!=="string"),x=S.length===1&&S.length===b.length?S[0]:X("View",{},{},{},b);if(x.bindings={...l.node.bindings,...x.bindings},x.bindingId===void 0&&l.node.bindingId!==void 0)x.bindingId=l.node.bindingId;c(x);return}let h=s[s.length-1];for(let b of l.node.children){if(typeof b==="string"){if(h&&!h.dropped)h.node.children.push(b);continue}if(!h)i.push(b);else if(!h.dropped)h.node.children.push(b)}}function d(l,h){let b=s[s.length-1];if(l==="svg"||b?.svg)return m(l,h,b);let S=Be.has(l)&&!q.has(l),x=s[s.length-1]?.dropped??!1,{props:f,style:w,events:T,bindings:N,classes:g,inline:R}=S||x?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:Me(l,h,t),k=f["data-native"],v;if(typeof k==="string"&&Oe.has(k))v=k,delete f["data-native"];else v=q.has(l)?"View":Re(l);if(v===l&&!Oe.has(v)&&!Be.has(l)&&!We.has(l)&&!a.has(l))a.add(l),t.push({kind:"unmapped-tag",tag:l});if((S||q.has(l))&&!a.has(`drop:${l}`))a.add(`drop:${l}`),t.push({kind:"dropped-subtree",tag:l});if(v==="Icon"){let W=re(g).icon;f.symbol=Ee(String(f.symbol||f.name||W||""),Boolean(f.symbol)).symbol}let I=X(v,f,w,T);I._inlineStyle=R;let B=f["data-stx-b"];if(typeof B==="number"&&Number.isInteger(B))I.bindingId=B;if(delete f["data-stx-b"],g)I._classes=g;if(Object.keys(N).length>0)I.bindings=N;if(typeof f.key==="string")I.key=f.key,delete f.key;return{tag:l,node:I,dropped:S||x||q.has(l),discard:S||x,unwrap:We.has(l)}}function m(l,h,b){let S=b?.dropped??!1,x=ee[l];if(S||!x){if(!S&&!a.has(`drop:${l}`))a.add(`drop:${l}`),t.push({kind:ye.has(l)?"dropped-subtree":"unmapped-tag",tag:l});return{tag:l,node:X("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let{props:f,style:w,events:T,bindings:N,classes:g,inline:R}=Me(l,h,t);if(x==="Svg"){let B=ke(f.viewBox);if(B)f.viewBox=B;else delete f.viewBox;for(let W of["width","height"]){if(typeof f[W]==="number"&&w[W]===void 0)w[W]=f[W];delete f[W]}}if(typeof f.strokeDasharray==="string"||typeof f.strokeDasharray==="number"){let B=String(f.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);f.strokeDasharray=B}let k=ve(x,f);if(k)f.geometry=k;let v=X(x,f,w,T);v._inlineStyle=R;let I=f["data-stx-b"];if(typeof I==="number"&&Number.isInteger(I))v.bindingId=I;if(delete f["data-stx-b"],g)v._classes=g;if(Object.keys(N).length>0)v.bindings=N;if(typeof f.key==="string")v.key=f.key,delete f.key;return{tag:l,node:v,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(l){let h=l.tagName.toLowerCase(),b=d(h,[...l.attributes]),S=!0;try{l.onEndTag(()=>{if(s.pop(),b.discard)return;if(b.unwrap)u(b);else c(Xt(b,t))})}catch{S=!1}if(S)s.push(b);else if(!b.discard)c(b.node)},text(l){let h=s[s.length-1];if(!h||h.dropped)return;let b=F(l.text).replace(/\s+/g," ");if(!b.trim())return;h.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]:X("View",{},{},{},i),diagnostics:t}}async function $e(r,e={}){let{root:t,diagnostics:i}=await $t(r,e),s=e.script??{exports:{},functions:[],code:""};return{document:Le(t,s,{source:e.source??"unknown"}),diagnostics:i}}var ze=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,zt=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Ft=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,Fe=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function se(r){let e=[];ze.lastIndex=0;for(let a of r.matchAll(ze)){let c=a[1]??"";if(/\bserver\b/.test(c))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
|
|
2
|
+
import"./chunk-2pph3dh0.js";import"./chunk-c57j92td.js";import"./chunk-rmavqxd8.js";import{cr,js,Bi}from"./chunk-v7vkqg8f.js";import"./chunk-d4k4nyj0.js";import{Hn,qn,n,o}from"./chunk-jws8btr5.js";import"./chunk-b77v56fz.js";import"./chunk-qmcmjdy7.js";import"./chunk-1erc0vrb.js";import"./chunk-kzg3h5wg.js";import"./chunk-e6y6s7q8.js";import"./chunk-kp4mzspk.js";import{De}from"./chunk-25m2wqsd.js";import"./chunk-szry3s17.js";import{existsSync as le,mkdirSync as Qt,readFileSync as Zt}from"fs";import O from"path";import{existsSync as qt,mkdirSync as Yt}from"fs";import P from"path";import{existsSync as Gt}from"fs";import j from"path";var Ke="data-stx-b",he=new Set(js),Qe=new Set(cr);function Ze(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(he.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(Bi(e))return"event";if(r.startsWith("@"))return"event";return"attr"}if(r.startsWith("x-")){let e=r.split(".")[0];if(!Qe.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 he.has(t)?t==="if"?"if":t:"attr"}return null}function et(r){let e=[];for(let[t,i]of r){let s=Ze(t);if(s)e.push({name:t,value:i,kind:s})}return e}var tt=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,Q=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function be(r){let e=[],t=0;return{html:r.replace(tt,(s,a,c)=>{if(!c||!/[:@]|x-/.test(c))return s;let u=[];Q.lastIndex=0;for(let h=Q.exec(c);h;h=Q.exec(c))u.push([h[1],h[2]??h[3]??h[4]??""]);let d=et(u);if(!d.length)return s;let m={id:t++,bindings:d};if(d.some((h)=>h.kind==="for"))m.template=!0;e.push(m);let p=s.endsWith("/>");return`${s.slice(0,p?-2:-1).trimEnd()} ${Ke}="${m.id}"${p?"/>":">"}`}),manifest:{entries:e}}}var ee={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText"},we=new Set(Object.values(ee));var ye=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),Te=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight"];function C(r){let e=typeof r==="number"?r:Number.parseFloat(String(r??""));return Number.isFinite(e)?e:0}function A(r){return Math.round(r*1000)/1000}function ke(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 nt(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 xe=/[MLHVCSQTAZ]/i,Z=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function rt(r){let e=[],t=r,i=xe.exec(t);while(i){let s=i.index;t=t.slice(s);let a=t[0];t=t.slice(1);let c=xe.exec(t),u=c?t.slice(0,c.index):t,d;if(a==="A"||a==="a"){d=[];let m=0,p=u.trim(),l=0;while(l<p.length){let h=m%7,b=p.slice(l).replace(/^[\s,]+/,"");if(l=p.length-b.length,!b)break;if(h===3||h===4)d.push(b[0]==="1"?1:0),l+=1;else{Z.lastIndex=0;let S=Z.exec(b);if(!S||S.index!==0)break;d.push(Number.parseFloat(S[0])),l+=S[0].length}m++}}else d=(u.match(Z)||[]).map(Number.parseFloat);e.push({command:a,args:d}),i=c}return e}function it(r,e,t,i,s,a,c,u,d){if(r===u&&e===d)return[];let m=Math.abs(t),p=Math.abs(i);if(!m||!p)return[1,u,d];let l=s*Math.PI/180,h=Math.cos(l),b=Math.sin(l),S=(r-u)/2,x=(e-d)/2,f=h*S+b*x,w=-b*S+h*x,T=f*f/(m*m)+w*w/(p*p);if(T>1)m*=Math.sqrt(T),p*=Math.sqrt(T);let N=m*m*p*p-m*m*w*w-p*p*f*f,g=m*m*w*w+p*p*f*f,R=Math.sqrt(Math.max(0,N/g));if(a===c)R=-R;let k=R*(m*w)/p,v=R*-(p*f)/m,I=h*k-b*v+(r+u)/2,B=b*k+h*v+(e+d)/2,W=(E,_,L,z)=>{let J=E*z-_*L<0?-1:1,K=(E*L+_*z)/(Math.hypot(E,_)*Math.hypot(L,z));return J*Math.acos(Math.min(1,Math.max(-1,K)))},qe=W(1,0,(f-k)/m,(w-v)/p),V=W((f-k)/m,(w-v)/p,(-f-k)/m,(-w-v)/p);if(!c&&V>0)V-=2*Math.PI;if(c&&V<0)V+=2*Math.PI;let G=Math.max(1,Math.ceil(Math.abs(V)/(Math.PI/2))),ue=V/G,H=1.3333333333333333*Math.tan(ue/4),de=[],fe=(E)=>{let _=m*Math.cos(E),L=p*Math.sin(E);return[h*_-b*L+I,b*_+h*L+B]},pe=(E)=>{let _=-m*Math.sin(E),L=p*Math.cos(E);return[h*_-b*L,b*_+h*L]},U=qe;for(let E=0;E<G;E++){let _=U+ue,[L,z]=fe(U),[J,K]=pe(U),[ge,me]=fe(_),[Ye,Je]=pe(_);de.push(2,L+H*J,z+H*K,ge-H*Ye,me-H*Je,E===G-1?u:ge,E===G-1?d:me),U=_}return de}function ot(r){let e=[],t=0,i=0,s=0,a=0,c=0,u=0,d=0,m=0,p="";for(let{command:l,args:h}of rt(String(r??""))){let b=l===l.toLowerCase(),S=l.toUpperCase(),x=()=>b?t:0,f=()=>b?i:0,w=0,T=(g)=>{if(w+g>h.length)return null;let R=h.slice(w,w+g);return w+=g,R};if(S==="Z"){e.push(4),t=s,i=a,p="Z";continue}let N=!0;while(w<h.length||N&&S==="Z"){switch(S){case"M":{let g=T(2);if(!g)return e;if(t=g[0]+x(),i=g[1]+f(),N)e.push(0,t,i),s=t,a=i;else e.push(1,t,i);p=N?"M":"L";break}case"L":{let g=T(2);if(!g)return e;t=g[0]+x(),i=g[1]+f(),e.push(1,t,i),p="L";break}case"H":{let g=T(1);if(!g)return e;t=g[0]+x(),e.push(1,t,i),p="L";break}case"V":{let g=T(1);if(!g)return e;i=g[0]+f(),e.push(1,t,i),p="L";break}case"C":{let g=T(6);if(!g)return e;let R=g[0]+x(),k=g[1]+f();c=g[2]+x(),u=g[3]+f(),t=g[4]+x(),i=g[5]+f(),e.push(2,R,k,c,u,t,i),p="C";break}case"S":{let g=T(4);if(!g)return e;let R=p==="C"?2*t-c:t,k=p==="C"?2*i-u:i;c=g[0]+x(),u=g[1]+f(),t=g[2]+x(),i=g[3]+f(),e.push(2,R,k,c,u,t,i),p="C";break}case"Q":{let g=T(4);if(!g)return e;d=g[0]+x(),m=g[1]+f(),t=g[2]+x(),i=g[3]+f(),e.push(3,d,m,t,i),p="Q";break}case"T":{let g=T(2);if(!g)return e;d=p==="Q"?2*t-d:t,m=p==="Q"?2*i-m:i,t=g[0]+x(),i=g[1]+f(),e.push(3,d,m,t,i),p="Q";break}case"A":{let g=T(7);if(!g)return e;let R=g[5]+x(),k=g[6]+f();e.push(...it(t,i,g[0],g[1],g[2],g[3],g[4],R,k)),t=R,i=k,p="A";break}default:return e}N=!1}}return e.map((l)=>A(l))}function Se(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(A)}function ve(r,e){switch(r){case"Path":return ot(String(e.d??""));case"Line":return[0,C(e.x1),C(e.y1),1,C(e.x2),C(e.y2)].map(A);case"Rect":{let t=C(e.x),i=C(e.y),s=C(e.width),a=C(e.height);if(s<=0||a<=0)return[];let c=e.rx===void 0?C(e.ry):C(e.rx),u=e.ry===void 0?c:C(e.ry);if(c=Math.min(Math.max(0,c),s/2),u=Math.min(Math.max(0,u),a/2),!c||!u)return[0,t,i,1,t+s,i,1,t+s,i+a,1,t,i+a,4].map(A);let d=0.5522847498;return[0,t+c,i,1,t+s-c,i,2,t+s-c+d*c,i,t+s,i+u-d*u,t+s,i+u,1,t+s,i+a-u,2,t+s,i+a-u+d*u,t+s-c+d*c,i+a,t+s-c,i+a,1,t+c,i+a,2,t+c-d*c,i+a,t,i+a-u+d*u,t,i+a-u,1,t,i+u,2,t,i+u-d*u,t+c-d*c,i,t+c,i,4].map(A)}case"Circle":return Se(C(e.cx),C(e.cy),C(e.r),C(e.r));case"Ellipse":return Se(C(e.cx),C(e.cy),C(e.rx),C(e.ry));case"Polyline":case"Polygon":{let t=nt(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(A)}default:return null}}var st=[...Te,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumTrackTintColor","minimumValue","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize"],at=new Map(st.map((r)=>[Ce(r),r]));function Ce(r){return r.replace(/[-_]/g,"").toLowerCase()}function te(r){return at.get(Ce(r))??r}var ct={view:"View",text:"Text",button:"Button",image:"Image",img:"Image",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",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 Re(r){return ct[r.toLowerCase()]||r}var lt={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",archive:"archivebox","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","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100",bed:"bed.double",bell:"bell","bell-off":"bell.slash",bike:"figure.outdoor.cycle",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",brain:"brain",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-line":"chart.xyaxis.line",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-check":"checkmark.circle","circle-check-big":"checkmark.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",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",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",heart:"heart","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-grid":"square.grid.2x2",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",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",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","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",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","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",sparkles:"sparkles",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront",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",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",video:"video","volume-2":"speaker.wave.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 Ee(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=lt[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 ut={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Ie={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},_e={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},D={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function M(r){let e=r.lastIndexOf("/");if(e>0&&!r.endsWith("]")){let i=M(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 dt(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=ut[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 dt(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 ne(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 y(r){if(r.startsWith("[")&&r.endsWith("]")){let e=r.slice(1,-1),t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return Ie[r]}var ft={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 pt(r,e){if(!r.startsWith("bg-"))return!1;let t=r.slice(3),i=M(t);if(i)return e.backgroundColor=i,!0;return!1}function gt(r,e){if(!r.startsWith("text-"))return!1;let t=r.slice(5);if(_e[t])return e.fontSize=_e[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=M(t);if(i)return e.color=i,!0;return!1}var mt=new Set(["t","tr","r","br","b","bl","l","tl"]);function ht(r,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(r);if(t&&mt.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let i=/^(from|via|to)-(.+)$/.exec(r);if(!i)return!1;let s=M(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 bt(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=M(s);if(a)return e[t]=a,!0}return!1}function xt(r,e){if(r.startsWith("p-")){let t=y(r.slice(2));if(t!==void 0)return e.padding=t,!0}if(r.startsWith("px-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(r.startsWith("py-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(r.startsWith("pt-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(r.startsWith("pr-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(r.startsWith("pb-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(r.startsWith("pl-")){let t=y(r.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function St(r,e){if(r.startsWith("m-")){let t=y(r.slice(2));if(t!==void 0)return e.margin=t,!0}if(r.startsWith("mx-")){let t=y(r.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(r.startsWith("my-")){let t=y(r.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(r.startsWith("mt-")){let t=y(r.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(r.startsWith("mr-")){let t=y(r.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(r.startsWith("mb-")){let t=y(r.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(r.startsWith("ml-")){let t=y(r.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function wt(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=y(t);if(i!==void 0)return e.width=i,!0;return!1}function yt(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=y(t);if(i!==void 0)return e.height=i,!0;return!1}function Tt(r,e){if(!r.startsWith("rounded"))return!1;if(r==="rounded")return e.borderRadius=D.DEFAULT,!0;let t=r.slice(8);if(t==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(t);if(i){let a=ne(i[2]);if(a===void 0)return!1;let c={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let u of i[1]?c[i[1]]:["borderRadius"])e[u]=a;return!0}if(t.startsWith("t-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderTopLeftRadius=a,e.borderTopRightRadius=a,!0}if(t.startsWith("b-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderBottomLeftRadius=a,e.borderBottomRightRadius=a,!0}if(t.startsWith("l-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderTopLeftRadius=a,e.borderBottomLeftRadius=a,!0}if(t.startsWith("r-")){let a=D[t.slice(2)]??D.DEFAULT;return e.borderTopRightRadius=a,e.borderBottomRightRadius=a,!0}let s=D[t];if(s!==void 0)return e.borderRadius=s,!0;return!1}function kt(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 vt(r,e){if(!r.startsWith("border-"))return!1;let t=r.slice(7),i=M(t);if(i)return e.borderColor=i,!0;return!1}function Ct(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 Rt(r,e){if(r.startsWith("tracking-[")){let t=ne(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:ne(t,i):s[t]!==void 0?s[t]*i:Ie[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Et(r,e){let t=/^grid-cols-(\d+)$/.exec(r);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function _t(r,e){if(!r.startsWith("size-"))return!1;let t=r.slice(5),i=t==="full"?"100%":y(t);if(i===void 0)return!1;return e.width=i,e.height=i,!0}var Nt={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function It(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"&&Nt[a]||y(a);if(c===void 0&&a!=="none")return!1;let u=`${i}${s==="w"?"Width":"Height"}`;if(c===void 0)delete e[u];else e[u]=c;return!0}function Lt(r,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(r);if(!t)return!1;let i=t[3]==="full"?"100%":y(t[3]);if(i===void 0)return!1;return e[t[2]]=typeof i==="number"&&t[1]?-i:i,!0}function Bt(r,e){let t=/^space-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=y(t[2]);if(i===void 0)return!1;return e.gap=i,!0}function Wt(r,e){if(r.startsWith("gap-")){let t=y(r.slice(4));if(t!==void 0)return e.gap=t,!0}if(r.startsWith("gap-x-")){let t=y(r.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(r.startsWith("gap-y-")){let t=y(r.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function re(r){let e=[],t=[],i=[];function s(d,m){let p=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(d),l=p&&Hn[p[2]];return l?`${p[1]}-${l[m]}${p[3]||""}`:d}for(let d of r.split(/\s+/).filter(Boolean))if(d.startsWith("dark:"))t.push(s(d.slice(5),"dark"));else if(!d.includes(":")||d.startsWith("[")){if(e.push(s(d,"light")),s(d,"dark")!==d)i.push(s(d,"dark"))}let a=[],u={style:Ne(e.join(" "),a),unknown:a};if(t.length||i.length)u.dark=Ne([...i,...t].join(" "),a);for(let d of e){if(d==="truncate")u.numberOfLines=1;let m=/^line-clamp-(\d+)$/.exec(d);if(m)u.numberOfLines=Number(m[1]);if(!u.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(d))u.icon=d}return u.unknown=a.filter((d)=>!/^line-clamp-\d+$/.test(d)),u}function Ne(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=ft[s];if(a){a("",t);continue}if(ht(s,t))continue;if(pt(s,t))continue;if(bt(s,t))continue;if(gt(s,t))continue;if(xt(s,t))continue;if(St(s,t))continue;if(wt(s,t))continue;if(yt(s,t))continue;if(Tt(s,t))continue;if(kt(s,t))continue;if(vt(s,t))continue;if(Ct(s,t))continue;if(Wt(s,t))continue;if(Rt(s,t))continue;if(_t(s,t))continue;if(It(s,t))continue;if(Et(s,t))continue;if(Lt(s,t))continue;if(Bt(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 X(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 Be=new Set(["script","style","head","meta","link","title","base","noscript"]),We=new Set(["template","body","html","main","fragment"]),q=new Set,Dt={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",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"},Ot=new Set(["onBlur","onChangeText","onDismiss","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onPress","onPressIn","onPressOut","onRequestClose","onRefresh","onScroll","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),ie=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"]),Pt=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"]),Vt=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"]),Oe=new Set(["View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","FlatList","SectionList","Switch","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...we]),Pe=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),At={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function F(r){return r.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let i=At[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 Ve(r){return r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Ae(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 Me(r,e,t){let i={},s={},a={},c="",u={};for(let[m,p]of e){let l=m.toLowerCase();if(l==="class"||l==="classname"){c=c?`${c} ${p}`:p;continue}if(l==="style"){u={...u,...Mt(r,p,t)};continue}if(l.startsWith(":")||l.startsWith("x-")&&l!=="x-cloak"){a[l.startsWith(":")?l.slice(1):l.slice(2)]=F(p);continue}if(l==="x-cloak")continue;if(l.startsWith("@")||l.startsWith("v-on:")){let b=l.startsWith("@")?l.slice(1):l.slice(5),[S]=b.split("."),x=Dt[S]??(S.startsWith("on")?S:"");if(!x||!Ot.has(x)){t.push({kind:"unread-event",tag:r,name:m});continue}s[x]=F(p);continue}if(l==="key"){i.key=p;continue}let h=F(p);try{i[te(m)]=JSON.parse(h)}catch{i[te(m)]=h}}let d={...c?re(c).style:{},...u};return{props:i,style:d,events:s,bindings:a,classes:c,inline:u}}function Xe(r,e){if(Pt.has(r))return!1;if(Vt.has(r))return/^-?[\d.]+%$/.test(e);return!0}function Mt(r,e,t){let i={},s=F(e);try{let a=JSON.parse(s);if(a&&typeof a==="object"&&!Array.isArray(a)){for(let[c,u]of Object.entries(a)){let d=ie.has(c)?c:Ve(c.trim().toLowerCase());if(!ie.has(d)){t.push({kind:"unknown-style",tag:r,name:d});continue}if(u===null||u===void 0)continue;let m=typeof u==="string"?Ae(u):u;if(typeof m!=="string"&&typeof m!=="number")continue;if(typeof m==="string"&&!Xe(d,m)){t.push({kind:"non-numeric-style",tag:r,name:d});continue}i[d]=m}return i}}catch{}for(let a of s.split(";")){let c=a.indexOf(":");if(c===-1)continue;let u=Ve(a.slice(0,c).trim().toLowerCase()),d=a.slice(c+1).trim();if(!u||!d)continue;if(!ie.has(u)){t.push({kind:"unknown-style",tag:r,name:u});continue}let m=Ae(d);if(typeof m==="string"&&!Xe(u,m)){t.push({kind:"non-numeric-style",tag:r,name:u});continue}i[u]=m}return i}function oe(r){return r.children.map((e)=>typeof e==="string"?e:oe(e)).join("").replace(/\s+/g," ").trim()}function Xt(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=oe(t);return t.children=a?[a]:[],t}if(Pe.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=oe(t);return e.push({kind:"flattened-text",tag:r.tag}),t.children=a?[a]:[],t}if(Pe.has(t.type)&&i.length>0)t.children=i;return t}async function $t(r,e={}){let t=[],i=[],s=[],a=new Set;function c(l){let h=s[s.length-1];if(!h)i.push(l);else if(!h.dropped)h.node.children.push(l)}function u(l){if(l.node.bindings&&Object.keys(l.node.bindings).length>0){let b=l.node.children,S=b.filter((f)=>typeof f!=="string"),x=S.length===1&&S.length===b.length?S[0]:X("View",{},{},{},b);if(x.bindings={...l.node.bindings,...x.bindings},x.bindingId===void 0&&l.node.bindingId!==void 0)x.bindingId=l.node.bindingId;c(x);return}let h=s[s.length-1];for(let b of l.node.children){if(typeof b==="string"){if(h&&!h.dropped)h.node.children.push(b);continue}if(!h)i.push(b);else if(!h.dropped)h.node.children.push(b)}}function d(l,h){let b=s[s.length-1];if(l==="svg"||b?.svg)return m(l,h,b);let S=Be.has(l)&&!q.has(l),x=s[s.length-1]?.dropped??!1,{props:f,style:w,events:T,bindings:N,classes:g,inline:R}=S||x?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:Me(l,h,t),k=f["data-native"],v;if(typeof k==="string"&&Oe.has(k))v=k,delete f["data-native"];else v=q.has(l)?"View":Re(l);if(v===l&&!Oe.has(v)&&!Be.has(l)&&!We.has(l)&&!a.has(l))a.add(l),t.push({kind:"unmapped-tag",tag:l});if((S||q.has(l))&&!a.has(`drop:${l}`))a.add(`drop:${l}`),t.push({kind:"dropped-subtree",tag:l});if(v==="Icon"){let W=re(g).icon;f.symbol=Ee(String(f.symbol||f.name||W||""),Boolean(f.symbol)).symbol}let I=X(v,f,w,T);I._inlineStyle=R;let B=f["data-stx-b"];if(typeof B==="number"&&Number.isInteger(B))I.bindingId=B;if(delete f["data-stx-b"],g)I._classes=g;if(Object.keys(N).length>0)I.bindings=N;if(typeof f.key==="string")I.key=f.key,delete f.key;return{tag:l,node:I,dropped:S||x||q.has(l),discard:S||x,unwrap:We.has(l)}}function m(l,h,b){let S=b?.dropped??!1,x=ee[l];if(S||!x){if(!S&&!a.has(`drop:${l}`))a.add(`drop:${l}`),t.push({kind:ye.has(l)?"dropped-subtree":"unmapped-tag",tag:l});return{tag:l,node:X("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let{props:f,style:w,events:T,bindings:N,classes:g,inline:R}=Me(l,h,t);if(x==="Svg"){let B=ke(f.viewBox);if(B)f.viewBox=B;else delete f.viewBox;for(let W of["width","height"]){if(typeof f[W]==="number"&&w[W]===void 0)w[W]=f[W];delete f[W]}}if(typeof f.strokeDasharray==="string"||typeof f.strokeDasharray==="number"){let B=String(f.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);f.strokeDasharray=B}let k=ve(x,f);if(k)f.geometry=k;let v=X(x,f,w,T);v._inlineStyle=R;let I=f["data-stx-b"];if(typeof I==="number"&&Number.isInteger(I))v.bindingId=I;if(delete f["data-stx-b"],g)v._classes=g;if(Object.keys(N).length>0)v.bindings=N;if(typeof f.key==="string")v.key=f.key,delete f.key;return{tag:l,node:v,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(l){let h=l.tagName.toLowerCase(),b=d(h,[...l.attributes]),S=!0;try{l.onEndTag(()=>{if(s.pop(),b.discard)return;if(b.unwrap)u(b);else c(Xt(b,t))})}catch{S=!1}if(S)s.push(b);else if(!b.discard)c(b.node)},text(l){let h=s[s.length-1];if(!h||h.dropped)return;let b=F(l.text).replace(/\s+/g," ");if(!b.trim())return;h.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]:X("View",{},{},{},i),diagnostics:t}}async function $e(r,e={}){let{root:t,diagnostics:i}=await $t(r,e),s=e.script??{exports:{},functions:[],code:""};return{document:Le(t,s,{source:e.source??"unknown"}),diagnostics:i}}var ze=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,zt=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Ft=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,Fe=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function se(r){let e=[];ze.lastIndex=0;for(let a of r.matchAll(ze)){let c=a[1]??"";if(/\bserver\b/.test(c))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
|
|
3
3
|
|
|
4
4
|
`),i=[];for(let a of[zt,Ft]){a.lastIndex=0;for(let c of t.matchAll(a))if(!i.includes(c[1]))i.push(c[1])}let s={};Fe.lastIndex=0;for(let a of t.matchAll(Fe)){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 je=/<script\b[^>]*\bdata-stx-scoped\b[^>]*>([\s\S]*?)<\/script>/gi,jt=/function\s+(__stx_setup_[\w$]+)\s*\(/;function ae(r){je.lastIndex=0;for(let e of r.matchAll(je)){let t=e[1].trim(),i=jt.exec(t)?.[1];if(i)return{name:i,code:t}}return null}function Ht(){let r=[j.join(import.meta.dir,"..","primitives"),j.join(import.meta.dir,"native","primitives")];for(let e of r)if(Gt(j.join(e,"View.stx")))return e;return r[0]}async function Ut(r,e,t={}){let i=t.root??j.dirname(e),s=await o(i),a={root:i,componentsDir:t.componentsDir??j.join(i,"components"),buildMode:"serve",cache:!1,_pluginComponentDirs:[Ht(),...s._pluginComponentDirs??[]]},c={...t.context??{},__stx_inject_css:!1},u=await n(r,c,e,a,new Set),{html:d,manifest:m}=be(u),{document:p,diagnostics:l}=await $e(d,{source:e,script:se(r)}),h=ae(d);if(se(r).code.trim()){let b=await qn(r,e,t.context,{forceClientSetup:!0});h=ae(b.setupCode??"")??h}return{document:p,manifest:m,setup:h,diagnostics:l,html:d}}async function Y(r,e={}){return Ut(await Bun.file(r).text(),r,e)}function Ge(r){let t=[P.join(import.meta.dir,"..","runtime",`${r}.ts`),P.join(import.meta.dir,"..","runtime",`${r}.js`),P.join(import.meta.dir,"native","runtime",`${r}.js`)].find((i)=>qt(i));if(!t)throw Error(`Native runtime module ${r} is missing`);return t}async function Jt(r,e,t){let i=await Bun.build({entrypoints:[r],target:"browser",format:"iife",minify:t,plugins:e,define:{"process.env.NODE_ENV":JSON.stringify(t?"production":"development")}});if(!i.success){let s=i.logs.map((a)=>String(a.message??a)).join(`
|
|
5
5
|
`);throw Error(`Could not bundle ${r}:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Qc}from"./chunk-
|
|
2
|
+
import{Qc}from"./chunk-2b1zg7xp.js";import"./chunk-g3hn7ncc.js";import"./chunk-nfd56dgj.js";import"./chunk-jws8btr5.js";import"./chunk-szry3s17.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-kzg3h5wg.js";import"./chunk-1erc0vrb.js";import"./chunk-qmcmjdy7.js";import"./chunk-b77v56fz.js";import"./chunk-2pph3dh0.js";import"./chunk-d4k4nyj0.js";import"./chunk-v7vkqg8f.js";import"./chunk-rmavqxd8.js";import"./chunk-e6y6s7q8.js";export{Qc as startProductionServer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{wl}from"./chunk-
|
|
2
|
+
import{wl}from"./chunk-52fcqzmc.js";import"./chunk-jws8btr5.js";import"./chunk-szry3s17.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-kzg3h5wg.js";import"./chunk-1erc0vrb.js";import"./chunk-qmcmjdy7.js";import"./chunk-b77v56fz.js";import"./chunk-2pph3dh0.js";import"./chunk-d4k4nyj0.js";import"./chunk-v7vkqg8f.js";import"./chunk-rmavqxd8.js";import"./chunk-e6y6s7q8.js";export{wl as buildApp};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{M,ce}from"./chunk-
|
|
2
|
+
import{M,ce}from"./chunk-jws8btr5.js";import{ue,C,Xe}from"./chunk-1erc0vrb.js";import{Qe,G,ke}from"./chunk-rmavqxd8.js";import{Ae,ne,_,re,fo,$r,go,Ot}from"./chunk-g3hn7ncc.js";import{Kr}from"./chunk-nfd56dgj.js";import{Mt}from"./chunk-7cbtcdqw.js";import F from"zlib";import{promisify as Z}from"util";var ee=Z(F.brotliCompress),te=Z(F.gzip),se=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],oe=["text/event-stream","multipart/x-mixed-replace"],ae=1024;function ie(t){if(!t)return!1;let e=t.toLowerCase();if(oe.some((o)=>e.startsWith(o)))return!1;return se.some((o)=>e.startsWith(o))}function pe(t){let e=new Map;for(let o of t.split(",")){let[r,...a]=o.trim().split(";"),f=r.trim().toLowerCase();if(!f)continue;let h=1;for(let g of a){let l=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(g);if(!l)continue;let m=Number.parseFloat(l[1]);if(Number.isFinite(m))h=m}e.set(f,h)}return e}function le(t){if(!t)return null;let e=pe(t),o=e.get("*"),r=(a)=>e.get(a)??o??0;if(r("br")>0)return"br";if(r("gzip")>0)return"gzip";return null}var J=33554432,H=new Map,U=0;function me(t,e){if(e.length>J/8)return;H.set(t,e),U+=e.length;for(let[o,r]of H){if(U<=J)break;H.delete(o),U-=r.length}}async function It(t,e,o={}){if(e.headers.get("content-encoding"))return e;if(e.status===204||e.status===304||!e.body)return e;if(!ie(e.headers.get("content-type")))return e;let r=le(t.headers.get("accept-encoding"));if(!r)return e;let a;try{a=new Uint8Array(await e.arrayBuffer())}catch{return e}let f=()=>new Response(a,{status:e.status,statusText:e.statusText,headers:Q(e.headers)});if(a.length<(o.threshold??ae))return f();try{let h=o.quality??5,g=`${r}:${h}:${a.length}:${Bun.hash(a)}`,l=H.get(g);if(!l)l=r==="br"?await ee(a,{params:{[F.constants.BROTLI_PARAM_QUALITY]:h,[F.constants.BROTLI_PARAM_SIZE_HINT]:a.length}}):await te(a),me(g,l);if(l.length>=a.length)return f();let m=Q(e.headers);return m.set("Content-Encoding",r),m.set("Content-Length",String(l.length)),new Response(l,{status:e.status,statusText:e.statusText,headers:m})}catch{return f()}}function Q(t){let e=new Headers(t),o=e.get("Vary");if(!o)return e.set("Vary","Accept-Encoding"),e;if(!o.split(",").some((a)=>a.trim().toLowerCase()==="accept-encoding"))e.set("Vary",`${o}, Accept-Encoding`);return e}import K from"fs";import P from"path";var{serve:fe}=globalThis.Bun;class q{now;entries=new M(1000,{maxBytes:33554432,sizeOf:(t)=>t.body.byteLength+JSON.stringify(t.headers).length*2});pending=new Map;generation=0;constructor(t=Date.now){this.now=t}invalidate(t){this.generation++,this.pending.clear();for(let e of Array.from(this.entries.keys()))if(t===void 0||this.entries.get(e)?.path===t)this.entries.delete(e)}async respond(t,e,o){let r,a=async()=>{let s=r??await o();return s.headers.set("Cache-Control","private, no-store"),s.headers.set("Vary",_(s.headers.get("Vary")).Vary),s};if(!e||t.method!=="GET"||t.headers.has("Cookie")||t.headers.has("Authorization")||t.headers.has("Range"))return a();let f=new URL(t.url),h=`${f.origin}${f.pathname}${f.search}|${ne(t)?"fragment":"document"}`,g=this.entries.get(h),l=(s)=>{let S=new Headers(s.headers);return S.set("Cache-Control","private, no-store"),S.set("Age",String(Math.max(0,Math.floor((this.now()-s.created)/1000)))),new Response(s.body.slice(0),{headers:S})},m=g?(this.now()-g.created)/1000:1/0;if(g&&m<e.maxAge)return l(g);let b=this.generation,k=async()=>{let s=await o();r=s;let S=(s.headers.get("Vary")??"").toLowerCase().split(",").map((y)=>y.trim()).filter(Boolean);if(s.status!==200||s.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(s.headers.get("Cache-Control")??"")||S.some((y)=>y!=="x-stx-router"&&y!=="accept-encoding"))return null;let B=await s.clone().arrayBuffer();if(B.byteLength>1048576)return null;s.headers.set("Vary",_(s.headers.get("Vary")).Vary);let n={body:B,headers:Array.from(s.headers.entries()),created:this.now(),path:f.pathname};if(this.generation===b)this.entries.set(h,n);return n},v=this.pending.get(h);if(!v){if(this.pending.size>=1000)return a();v=k().finally(()=>{if(this.pending.get(h)===v)this.pending.delete(h)}),this.pending.set(h,v)}if(g&&m<e.maxAge+(e.swr??0))return v.catch(()=>{}),l(g);let E=await v;return E?l(E):a()}}var de={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function Qc(t={}){let e=P.resolve(t.outputDir||".output"),o=t.port??3000,r=fo(e);if(!r)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${r.routes.length} routes...`);let a=Mt(r.routeRules),f=new q,h=Kr(e,r.apiRoutes??[]),g=Bun.file(P.join(e,"server/runtime-config.json")),l=t.runtimeConfig??(await g.exists()?await g.json():void 0),m=l?C(l):void 0,b=new Map,k=new Map,v=new Map,E=new Map;for(let n of r.routes)try{let y=P.join(e,n.compiledPath),i=JSON.parse(await Bun.file(y).text());if(m)i.html=Xe(i.html,m);b.set(n.pattern,i),v.set(n.pattern,ke(i.html)),E.set(n.pattern,ce(i.html));let X=P.join(e,n.fragmentPath);if(await Bun.file(X).exists()){let A=await Bun.file(X).text();k.set(n.pattern,m?Xe(A,m):A)}}catch(y){console.warn(`[stx] Failed to load route ${n.pattern}:`,y)}let s=new Map,S=[];for(let n of r.routes)if(n.hasParams){let{regex:y,params:i}=G(n.pattern,{page:!0});S.push({regex:y,route:n,paramNames:i})}else s.set(n.pattern,n);let B=fe({port:o,async fetch(n){return It(n,await ue(m??C(),async()=>{let i=new URL(n.url).pathname;if(t.onRequest){let p=await t.onRequest(n);if(p)return p}if(t.apiRouter){let p=await t.apiRouter.handleRequest(n);if(p.status!==404)return p}if(t.apiRoutes?.[i])return t.apiRoutes[i](n);let X=await h(n);if(X)return X;if((n.method==="GET"||n.method==="HEAD")&&i!=="/"){let p=P.resolve(e,"public"),d;try{d=decodeURIComponent(i)}catch{d=i}if(!d.includes("\x00")){let u=P.resolve(p,`.${d}`);if(u===p||u.startsWith(`${p}${P.sep}`))try{if(K.existsSync(u)&&K.statSync(u).isFile()){let R=P.extname(u).toLowerCase(),L=de[R]||"application/octet-stream",N=i.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(i);return new Response(Bun.file(u),{headers:{"Content-Type":L,"Cache-Control":N?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let A=ne(n),w=null,W={};if(w=s.get(i)||null,!w)for(let{regex:p,route:d,paramNames:u}of S){let c=i.match(p);if(c){w=d,u.forEach((R,L)=>{W[R]=c[L+1]});break}}if(!w){let p=Qe(i)?null:s.get("/404")||null;if(p){let d=b.get(p.pattern);if(d)return new Response(d.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain; charset=utf-8"}})}let O=a(i),Y=Object.keys(O).length>0;return f.respond(n,O.cache,async()=>{let p=b.get(w.pattern);if(A&&n.method==="GET"&&p&&!p.hasServerScripts&&Object.keys(p.placeholders).length===0){let c=k.get(w.pattern);if(c){let R=v.get(w.pattern);return new Response(c,{status:p.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...E.has(w.pattern)?{"X-STX-Runtime":E.get(w.pattern)?"true":"false"}:{},...R?{"X-STX-Layout":R.layout,"X-STX-Layout-Group":R.group}:{},..._(),...O.cache?{}:{"Cache-Control":Ae}}})}}let d=$r(n.method),u=b.get(w.pattern);if(!u){let c=s.get("/500")||null;if(c){let R=b.get(c.pattern);if(R)return new Response(R.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(w.prerendered&&d)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!d&&!u.hasServerScripts&&Object.keys(u.placeholders).length===0)return new Response(u.html,{status:u.status??200,headers:{"Content-Type":"text/html",..._(),"Cache-Control":"public, max-age=60"}});try{let{html:c,boundaries:R,redirect:L,cookies:N,status:I,headers:D}=await Ot(u,{params:W,request:n,method:n.method,__stx_strict_hydration:Y,__stx_runtime_config:m});if(L)return go(L,N,D);if(R&&R.length>0){let{renderStreamingPage:T,streamToResponse:z}=await import("./chunk-emx5wsaa.js"),j=new Headers({..._(),...D,"Cache-Control":"private, no-store"});for(let V of N??[])j.append("Set-Cookie",V);if(A&&!d){let V=ke(c);j.set("X-STX-Fragment","true"),j.set("X-STX-Runtime",ce(c)?"true":"false"),j.set("X-STX-Layout",V.layout),j.set("X-STX-Layout-Group",V.group)}return z(T(A&&!d?re(c,r.routerContainer||"main"):c,R,{timeoutMs:30000}),{status:I??u.status??200,headers:j})}let x=new Headers({"Content-Type":"text/html",..._(),...O.cache?{}:{"Cache-Control":"private, no-store"}});for(let T of N??[])x.append("Set-Cookie",T);for(let[T,z]of Object.entries(D??{}))x.set(T,z);if(x.set("Vary",_(x.get("Vary")).Vary),A&&!d){let T=ke(c);return x.set("X-STX-Fragment","true"),x.set("X-STX-Runtime",ce(c)?"true":"false"),x.set("X-STX-Layout",T.layout),x.set("X-STX-Layout-Group",T.group),new Response(re(c,r.routerContainer||"main"),{status:I??u.status??200,headers:x})}return new Response(c,{status:I??u.status??200,headers:x})}catch(c){if(console.error(`[stx] Hydration error for ${i}:`,c),Y)return new Response("Internal Server Error",{status:500});return new Response(u.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${B.port}`),console.log(`[stx] Serving ${r.routes.length} routes (${b.size} pre-loaded)`),{port:B.port,stop:()=>{f.invalidate(),B.stop()},invalidate:(n)=>f.invalidate(n)}}
|
|
3
3
|
export{It,Qc};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{p,l}from"./chunk-2pph3dh0.js";import{b}from"./chunk-
|
|
2
|
+
import{p,l}from"./chunk-2pph3dh0.js";import{b}from"./chunk-jws8btr5.js";function y(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var w=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function x(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function N(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);n=g===-1?t.length:g+3;continue}let a=x(t,s+1);if(a===-1)return-1;let f=t.slice(s,a),u=f.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(u&&u[2].toLowerCase()===r){if(u[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(f))e++}n=a}return-1}function A(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let c=t.indexOf("-->",n+4);e=c===-1?t.length:c+3;continue}let s=x(t,n+1);if(s===-1)break;let a=t.slice(n,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){e=s;continue}let u=f[2].toLowerCase();if(f[1]==="/"){let c=i.lastIndexOf(u);if(c!==-1)i.splice(c);e=s;continue}let g=/\/\s*>$/.test(a),d=i.length===0?a.match(r):null;if(d){let c=d[1]||d[2],m=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),h=g||w.has(u)?-1:N(t,u,s);if(h===-1)o.push({start:n,end:s,slotName:c,element:m}),e=s;else o.push({start:n,end:h,slotName:c,element:m+t.slice(s,h)}),e=h;continue}if(!g&&!w.has(u)){if(i.push(u),u==="script"||u==="style"){let c=t.toLowerCase().indexOf(`</${u}>`,s);if(c!==-1){e=c;continue}}}e=s}return o}function O(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let c=t.indexOf("-->",n+4);e=c===-1?t.length:c+3;continue}let s=x(t,n+1);if(s===-1)break;let a=t.slice(n,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){e=s;continue}let u=f[1]==="/",g=f[2].toLowerCase();if(u){let c=i.lastIndexOf(g);if(c!==-1)i.splice(c);e=s;continue}if(g==="template"&&i.length===0){let c=a.match(r);if(c){let m=y(t,s);if(m!==-1){let h=c[1]||c[2]||c[3];o.push({start:n,end:m,slotName:h,content:t.slice(s,m-11).trim(),propsBinding:c[4]||void 0}),e=m;continue}}}if(!/\/\s*>$/.test(a)&&!w.has(g)){if(i.push(g),g==="script"||g==="style"){let c=t.toLowerCase().indexOf(`</${g}>`,s);if(c!==-1){e=c;continue}}}e=s}return o}function aa(t){let o={default:"",named:new Map},i=t,r=O(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=A(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function xl(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function ca(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r};if(n.startsWith("{")&&n.endsWith("}")){let a=n.slice(1,-1).split(",").map((f)=>f.trim()).filter(Boolean);for(let f of a){let[u,g]=f.split(":").map((c)=>c.trim()),d=g||u;if(o[u]!==void 0)s[d]=o[u]}}else s[n]=o;e=C(e,s)}return e}function C(t,o){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(i,r)=>{try{let e=r.trim(),n=k(e,o);return b(String(n??""))}catch{return`{{ ${r} }}`}})}function k(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!p(t))return;return l(t,Object.keys(o))(...Object.values(o))}catch{return}}async function la(t,o,i){let r=t;r=await M(r,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(s,a,f,u)=>{let g=o.named.get(a),d=u?.trim()||"",c=f||"",m={},h=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,S;while((S=h.exec(c))!==null){let E=S[1],R=S[2];m[E]=k(R,i)}return await ca(g,m,d,i)});let n=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return r=r.replace(n,(s,a,f)=>{if(/\bname\s*=/.test(a||""))return s;let u=f?.trim()||"";return o.default||u}),r}async function M(t,o,i){let r=[],e=[];t.replace(o,(a,...f)=>{let u=f[f.length-2];return e.push({match:a,index:u}),r.push(i(a,...f.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:f,index:u}=e[a];s=s.slice(0,u)+n[a]+s.slice(u+f.length)}return s}function Sl(t){let o=aa(t);return{defaultSlot:o.default,namedSlots:o.named}}async function kl(t,o,i,r){return await la(t,{default:o,named:i},r)}
|
|
3
3
|
export{aa,xl,ca,la,Sl,kl};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{o}from"./chunk-
|
|
2
|
+
import{o}from"./chunk-jws8btr5.js";import{Er}from"./chunk-7cbtcdqw.js";import p from"path";async function wl(t={}){let d=performance.now(),s=t.root||process.cwd(),e=await o(s),u=t.ssr?.routeRules??e.routeRules??{};if(Er(u),!e.ssr&&Object.keys(u).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let n,l;if(r==="ssg"){let{generateStaticSite:i}=await import("./ssg.js");n=await i({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:i}=await import("./chunk-nwy97xaa.js");l=await i({root:s,outputDir:".output",debug:t.debug,...t.ssr})}let a=Math.round(performance.now()-d);return{mode:r,ssg:n,ssr:l,duration:a}}
|
|
3
3
|
export{wl};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{De,Kt}from"./chunk-25m2wqsd.js";import{Ce}from"./chunk-rmavqxd8.js";import{Uo,Wo,f,Ct,Q,N,n,I,o}from"./chunk-
|
|
2
|
+
import{De,Kt}from"./chunk-25m2wqsd.js";import{Ce}from"./chunk-rmavqxd8.js";import{Uo,Wo,f,Ct,Q,N,n,I,o}from"./chunk-jws8btr5.js";import{C}from"./chunk-1erc0vrb.js";import{Cs}from"./chunk-kzg3h5wg.js";import{pn,fn,gn,hn,pe}from"./chunk-b77v56fz.js";import{ki}from"./chunk-kp4mzspk.js";import{me,re,uo,po,Ot}from"./chunk-g3hn7ncc.js";import{wt,qr}from"./chunk-nfd56dgj.js";import{Mt}from"./chunk-7cbtcdqw.js";import{ft,Yt,Zt}from"./chunk-g7ey7mtw.js";import{createHash as ee}from"crypto";function J(i){return ee("sha256").update(i).digest("hex").slice(0,8)}function U(i=!1){let l=i?Kt():De(),a=J(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let i=Ce(),l=J(i);return{content:i,filename:`router.${l}.js`,hash:l}}import m from"fs";import c from"path";import q from"path";import{createHash as te}from"crypto";function se(i={}){let l=new Set;return{context:new Proxy(i,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(i,l,a={}){let r=q.resolve(i),e=await Bun.file(r).text(),S=te("sha256").update(e).digest("hex").slice(0,16);Uo();let _={};try{_=await o(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let R=g[1];if(/\bserver\b/.test(R))y.push(g[2])}let u=new Set(y.flatMap((R)=>Q(R))),{context:D}=se({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),A=new Set,j={...I,..._,...a,buildMode:"compile",strict:!1},b=await n(e,D,r,j,A),w=me(b),P=Wo();return{route:l,sourceFile:i,html:b,fragment:w,placeholders:P,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(A),contentHash:S,status:Ct(e),streamTemplates:D.__streamTemplates}}var ne=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(i,l){let a=0,r=0;if(!m.existsSync(i))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(ne.has(d.name))continue;let g=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(g,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(g,u),a++,r+=m.statSync(u).size}}}return e(i,l),{copied:a,bytes:r}}async function al(i={}){let l=Date.now(),a=c.resolve(i.root||process.cwd()),r=c.resolve(a,i.outputDir||".output");console.log("[stx build] Starting production build...");let e=await o(a),S=c.resolve(a,i.componentsDir??e.componentsDir??"components"),_=c.resolve(a,i.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,i.layoutsDir??e.layoutsDir??"layouts"),d=i.publicDir??e.publicDir??"public",g=pe(e.app?.head,{known:hn,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",A=i.routeRules??e.routeRules??{},j=Mt(A),b=i.serverApi??e.serverApi,w=typeof b==="object"?b:{};if(b)wt(a,w);if(e.runtimeConfig)C(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let P=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of P)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=N(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],B=R.filter((s)=>!Y.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${B.length} page routes (${R.length-B.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=U(i.debug),x=V();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let M=[],k=[];for(let s of B){let h=j(s.pattern),O=h.rendering==="prerender";if(O&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(s.filePath,s.pattern,{configDir:a,componentsDir:S,partialsDir:_,layoutsDir:y,debug:i.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=gn(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=pn(t.html,u);if(g.htmlAttrs)t.html=fn(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let W=p[1];t.html=t.html.replace(" "+W,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${W}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await f(t.html),O){let p=await Ot(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=re(t.html,D);let L=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),z=c.join("server","pages",`${L}.compiled.json`),G=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,G),t.fragment),k.push({pattern:s.pattern,compiledPath:z,fragmentPath:G,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:O}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let E=c.resolve(a,d);if(m.existsSync(E)){let{copied:s,bytes:h}=Z(E,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let H=Zt(a);if(H){let{copied:s,bytes:h}=Z(H,c.join(r,"public",Yt));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${ft}/`)}let F={runtime:v.filename,router:x.filename},T=uo(k,F,r);if(T.routeRules=A,T.routerContainer=D,b)T.apiRoutes=await qr(a,r,w);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Cs(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(ki(e._layerGraph),null,2));po(T,r);let K=Date.now()-l;return console.log(`
|
|
3
3
|
[stx build] Done in ${K}ms \u2014 ${M.length} pages compiled`),{pageCount:M.length,assets:F,outputDir:r,duration:K}}
|
|
4
4
|
export{al};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{en,ae}from"./chunk-2hc5mbw8.js";import{m,tn,w,Ne,o,R}from"./chunk-
|
|
2
|
+
import{en,ae}from"./chunk-2hc5mbw8.js";import{m,tn,w,Ne,o,R}from"./chunk-jws8btr5.js";import{Xr}from"./chunk-nfd56dgj.js";import{s,we}from"./chunk-x8mp9yvn.js";import{a}from"./chunk-jbj6xh7f.js";import h from"path";import v from"fs";var pe=10;function V(e,n,i){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(h.basename(e))||Xr(e,n,i)}var ne=1,re=new Map,W=600,fe=100,P=new Map;async function me(e){let n=P.get(e)??0;if(n>0&&n<fe){P.set(e,n+1);return}P.set(e,1);try{let i=(await v.promises.readdir(e)).filter((u)=>u.endsWith(".js"));if(i.length<=W)return;let g=(await Promise.all(i.map(async(u)=>{try{return{name:u,at:(await v.promises.stat(h.join(e,u))).mtimeMs}}catch{return null}}))).filter((u)=>u!==null);g.sort((u,l)=>l.at-u.at);for(let u of g.slice(W)){let l=u.name.slice(0,-3);await v.promises.rm(h.join(e,`${l}.js`),{force:!0}),await v.promises.rm(h.join(e,`${l}.deps.json`),{force:!0})}I("pruned bundle cache to",W,"entries")}catch{}}function ie(e){return re.get(e)??[]}function X(e,n){if(e)re.set(e,n)}function qa(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function I(...e){if(qa())console.log("[stx:bundler]",...e)}var Z=[];function Fo(e,n,i){Z.push({filePath:e||"<inline>",message:n,details:i})}function mt(){return Z.slice()}function ht(){Z.length=0}var q;function _u(e){q=e}function zo(){if(q)return q;try{let e=R.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var H=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function yt(e){let n=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,i;while((i=n.exec(e))!==null){let g=i[1];if(!H.some((l)=>l.test(g)))return I("detected user import:",g),!0}let c=/^[ \t]*import[ \t]*['"]([^'"]+)['"]/gm;while((i=c.exec(e))!==null){let g=i[1];if(/\.css(?:\?.*)?$/.test(g))continue;if(!H.some((l)=>l.test(g)))return I("detected side-effect import:",g),!0}return!1}var Qt="stx-module:",ge=/\.(?:[cm]?[jt]sx?|json)$/i;function Ka(e,n){return h.relative(e,n).split(h.sep).join("/")}function Xa(e,n){if(n.size===0)return e;return e.replace(/^([ \t]*import(?:(?:\s+|(?=[{*]))[^;"']*?\s*from\s*|\s*))(["'])([^"']+)\2/gm,(i,c,g,u)=>{let l=n.get(u);return l&&!u.startsWith(Qt)?`${c}${g}${l}${g}`:i})}function Ga(e,n){let i=0,c=(u)=>{let l=`__stxMod${i++}`,S=JSON.stringify(u);return n.push(`var ${l} = globalThis.__stxModules && globalThis.__stxModules[${S}];`,`if (${l} === undefined) throw new Error("[stx] module " + ${JSON.stringify(S)} + " is not registered on this page (#1957)");`),l},g=(u,l)=>{for(let S of u.split(",")){let M=S.trim();if(!M)continue;let f=M.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!f)continue;let t=f[1].startsWith('"')?JSON.parse(f[1]):f[1],r=f[2]??t;n.push(`var ${r} = ${l}[${JSON.stringify(t)}];`)}};return e=e.replace(/^[ \t]*import(?:\s+|(?=[{*]))([^;"']+?)\s*from\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l,S)=>{let M=S.slice(Qt.length),f=c(M),t=l.trim(),r=t.match(/^([\w$]+)\s*(?:,\s*|$)/);if(r&&!t.startsWith("{")&&!t.startsWith("*"))n.push(`var ${r[1]} = ${f}.default;`),t=t.slice(r[0].length).trim();let d=t.match(/^\*\s*as\s+([\w$]+)$/);if(d)n.push(`var ${d[1]} = ${f};`);else if(t.startsWith("{"))g(t.replace(/^\{|\}$/g,""),f);return""}),e=e.replace(/^[ \t]*import\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l)=>(c(l.slice(Qt.length)),"")),e}function ee(e){let n=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,h.join(e,"index.ts"),h.join(e,"index.tsx"),h.join(e,"index.js"),h.join(e,"index.mjs")];for(let i of n)try{if(v.existsSync(i)&&v.statSync(i,{throwIfNoEntry:!1})?.isFile())return i}catch{}return}function he(e,n,i,c,g,u=new Map,l){let S=(f,t,r)=>{if(V(t,e,l))return null;if(!g||f!==i||!ge.test(t))return null;try{if(!v.statSync(t,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}c.add(t);let d=`${Qt}${Ka(process.cwd(),t)}`;return u.set(r,d),{path:d,external:!0}},M=(f,t)=>{let r=f===i?n:h.dirname(f),d=h.resolve(r,t);return ee(d)??d};return{name:"stx-client-bundle",setup(f){if(f.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(t)=>({path:t.path,external:!0})),f.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(t)=>({path:t.path,external:!0})),f.onResolve({filter:/^\//},(t)=>{let r=ee(t.path);if(r){let d=S(t.importer,r,t.path);if(d)return d;if(r!==i)c.add(r);return{path:r}}return{path:t.path,external:!0}}),f.onResolve({filter:/^\.\.?\//},(t)=>{let r=M(t.importer,t.path),d=S(t.importer,r,t.path);if(d)return d;return c.add(r),{path:r}}),f.onResolve({filter:/^[@~]\//},(t)=>{let r=h.resolve(e,t.path.slice(2)),d=[r,`${r}.ts`,`${r}.tsx`,`${r}.js`,`${r}.mjs`,`${r}.jsx`,h.join(r,"index.ts"),h.join(r,"index.tsx"),h.join(r,"index.js"),h.join(r,"index.mjs")];for(let E of d)if(v.existsSync(E)&&v.statSync(E,{throwIfNoEntry:!1})?.isFile()){let C=S(t.importer,E,t.path);if(C)return C;return I(`resolved ${t.path[0]}/ import:`,t.path,"\u2192",E),c.add(E),{path:E}}return console.warn(`[stx:bundler] could not resolve ${t.path[0]}/ import:`,t.path),{path:r}}),g)f.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(t)=>{if(t.importer!==i)return;let r=`${Qt}npm:${t.path}`;return u.set(t.path,r),{path:r,external:!0}});f.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(t)=>{if(V(t.path,e,l))throw Error(`Server-only API source cannot be imported by a client script: ${t.path}`);let r=h.extname(t.path).toLowerCase(),d=r===".json"?"json":r===".tsx"?"tsx":r===".jsx"?"jsx":r===".ts"||r===".mts"||r===".cts"?"ts":"js";if(t.path!==i)c.add(t.path);return{contents:v.readFileSync(t.path,"utf8"),loader:d}})}}}var G=new Map,L=m(64),te=Symbol.for("stx.client-bundle-build-queue");function Ja(e){let n=globalThis,c=(n[te]??Promise.resolve()).then(e,e);return n[te]=c.then(()=>{return},()=>{return}),c}async function bt(e,n,i={}){let c=i.projectRoot||process.cwd(),g=(await o(c)).serverApi,u=i.minify??!1,l=i.externalizeUserModules??!0,S=i.expose?.length?[...new Set(i.expose)].sort():void 0,M=i.cacheDir||a(c,"bundle-cache"),f=new Bun.CryptoHasher("md5");f.update(`${pe}\x00${Ne()}\x00${JSON.stringify(g??!1)}\x00${l?"registry":"inline"}\x00${S?S.join(","):"*"}\x00${e}\x00${n}`);let t=f.digest("hex").slice(0,12),r=h.join(M,`${t}.js`),d=L.get(r);if(d){if(tn(d.files)&&d.files.every((A)=>!V(A.path,c,g))){I("memo hit:",t);let A=d.files.map((B)=>B.path);return X(n,A),i.collectInputs?.push(...A),d.code}L.delete(r),I("memo invalidated by dep change:",t)}let E=h.join(M,`${t}.deps.json`),C=Bun.file(r);if(await C.exists()){let A=Bun.file(E),B=!1,N=null;if(await A.exists())try{let O=JSON.parse(await A.text());if(O.metadataVersion!==ne||!Array.isArray(O.files))B=!1;else N=O.files,B=!0;if(N&&(!tn(N)||N.some((D)=>V(D.path,c,g))))B=!1}catch{B=!1}if(B){if(I("cache hit:",t),N)X(n,N.map((D)=>D.path)),i.collectInputs?.push(...N.map((D)=>D.path));let O=await C.text();if(N)L.set(r,{code:O,files:N});return O}I("cache invalidated by dep change:",t)}let _=G.get(t);if(_){let A=await _;if(i.collectInputs)i.collectInputs.push(...(L.get(r)?.files??[]).map((B)=>B.path));return A}let z=Ja(()=>$e(e,n,{projectRoot:c,minify:u,cacheDir:M,hash:t,cachePath:r,depsPath:E,collectInputs:i.collectInputs,externalizeUserModules:l,serverApi:g,expose:S,throwOnFailure:i.throwOnFailure}));G.set(t,z);try{return await z}finally{G.delete(t)}}var xe=0;function Ya(e){return`${e}-${process.pid}-${++xe}`}async function $e(e,n,i){let{projectRoot:c,minify:g,cacheDir:u,hash:l,cachePath:S,depsPath:M,externalizeUserModules:f}=i,t=a(c,"bundle-tmp"),r=Ya(l),d=h.join(t,`${r}.ts`),E=h.join(t,"out",r);v.mkdirSync(t,{recursive:!0}),v.mkdirSync(E,{recursive:!0});let C=h.dirname(n),_=new Set,z=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,A=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,B=s(e),{depths:N,balanced:O}=we(B),D=(j)=>!O||N[j]===0,y;while((y=z.exec(B))!==null){if(y[1])continue;if(!D(y.index))continue;if(y[2])y[2].split(",").forEach((j)=>{let p=ye(j);if(p)_.add(p)});else if(y[3])_.add(y[3])}while((y=A.exec(B))!==null){if(y[1])continue;if(!D(y.index))continue;_.add(y[2])}let se=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((y=se.exec(B))!==null){if(!D(y.index))continue;let j=/^\s*['"]([^'"]+)['"]/.exec(e.slice(y.index+y[0].length))?.[1];if(j&&H.some((p)=>p.test(j)))continue;if(y[1])_.add(y[1]);if(y[2])_.add(y[2]);for(let p of(y[3]??"").split(",")){let b=p.trim();if(!b||/^type\s/.test(b))continue;let U=/\bas\s+(\w+)\s*$/.exec(b)?.[1]??/^\w+$/.exec(b)?.[0];if(U)_.add(U)}}for(let j of B.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let p of j[1].split(",")){let b=/\bas\s+(\w+)\s*$/.exec(p)?.[1]??/^\s*(\w+)\s*$/.exec(p)?.[1];if(b)_.delete(b)}let oe=_.size>0?`
|
|
3
3
|
export { ${[..._].join(", ")} }`:"";await Bun.write(d,e+oe),I("bundling:",l,"from:",h.basename(n));let Y=new Set,Q=new Map;try{let j=await Bun.build({entrypoints:[d],outdir:E,target:"browser",format:"esm",minify:g?{whitespace:!1,identifiers:!0,syntax:!0}:!1,plugins:[he(c,C,d,Y,f,Q,i.serverApi)],define:{"process.env.NODE_ENV":g?'"production"':'"development"',...w()},root:c});if(!j.success){let F=j.logs.filter((T)=>T.level==="error").map((T)=>T.message).join(", ")||`Unable to bundle ${h.basename(n)}`,k=en(j.logs,n||void 0);if(console.warn("[stx:bundler] build failed:",F),Fo(n||"",F,k),i.throwOnFailure||zo()==="error")throw Error(F);return e}let p="";for(let x of j.outputs){p=await x.text();break}let b=[];for(let x of p.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let F of x[1].split(",")){let k=F.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(k){b.push([k[2],k[1]]);continue}let T=F.trim();if(/^[A-Za-z_$][\w$]*$/.test(T))b.push([T,T])}if(i.expose){let x=new Set(i.expose);for(let F=b.length-1;F>=0;F--)if(!x.has(b[F][0]))b.splice(F,1)}let U=[];p=Ga(Xa(p,Q),U);let le=p.match(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm)||[];if(p=p.replace(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),g&&p)try{p=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(p)}catch{}let K=`__stxBundle_${l}`,ce=b.map(([x,F])=>`${JSON.stringify(x)}: ${F}`).join(", "),ue=b.map(([x])=>`var ${x} = undefined;`).join(`
|
|
4
4
|
`),de=b.map(([x])=>`${x} = ${K}[${JSON.stringify(x)}];`).join(`
|
|
5
5
|
`);if(p=`${le.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import m from"path";var y=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function I(...o){let r=new Set;for(let s of o){if(!s||!s.includes("__stxModules["))continue;for(let e of s.matchAll(y))try{r.add(JSON.parse(`"${e[1]}"`))}catch{}}return[...r].sort()}async function w(o,r={}){if(o.length===0)return null;let s=process.cwd(),e=[],a=[];o.forEach((t,c)=>{let i=t.startsWith("npm:")?t.slice(4):m.resolve(s,t),l=`__stxRegistered${c}`,p=JSON.stringify(t);e.push(`import * as ${l} from ${JSON.stringify(i)};`),a.push(`if (!globalThis.__stxModules[${p}]) globalThis.__stxModules[${p}] = ${l};`)});let d=[...e,"globalThis.__stxModules = globalThis.__stxModules || {};",...a].join(`
|
|
3
|
-
`),n;try{let{bundleClientScript:t}=await import("./chunk-
|
|
3
|
+
`),n;try{let{bundleClientScript:t}=await import("./chunk-nnqjjtqz.js");n=await t(d,m.join(s,".stx-module-registry.ts"),{projectRoot:s,minify:r.minify,externalizeUserModules:!1,collectInputs:r.collectInputs,throwOnFailure:!0})}catch(t){let{formatBuildFailure:c}=await import("./chunk-0fad6jf4.js"),i=c(t);console.warn(`[stx] could not build the page module registry (#1957): ${i}`);let l=`[stx] the page module registry did not build, so ${o.join(", ")} cannot load (#1957): ${i}`;return`;console.error(${JSON.stringify(l)});`}let{transformAutoImports:f,generateAutoImportDestructuring:_}=await import("./chunk-vbthtg0x.js"),u=f(n),h=_(u.stxImports,u.browserImports),{transformStoreImports:x}=await import("./chunk-2grygc4b.js");n=x(u.code);let g=JSON.stringify(new Bun.CryptoHasher("md5").update(d).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${g}]) return;`,` __stxBundles[${g}] = true;`,h,n,"})();"].join(`
|
|
4
4
|
`)}export{w as buildModuleRegistryScript,I as registeredModuleIdsIn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{un,Cs}from"./chunk-
|
|
2
|
+
import{un,Cs}from"./chunk-kzg3h5wg.js";import"./chunk-1erc0vrb.js";export{Cs as generateRuntimeConfigTypes,un as prepareRuntimeConfig};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{nu,ru}from"./chunk-q21e52cb.js";import"./chunk-7c18zqdc.js";import"./chunk-nfd56dgj.js";import"./chunk-2hc5mbw8.js";import"./chunk-jws8btr5.js";import"./chunk-szry3s17.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-kzg3h5wg.js";import"./chunk-1erc0vrb.js";import"./chunk-qmcmjdy7.js";import"./chunk-b77v56fz.js";import"./chunk-2pph3dh0.js";import"./chunk-d4k4nyj0.js";import"./chunk-v7vkqg8f.js";import"./chunk-rmavqxd8.js";import"./chunk-e6y6s7q8.js";export{ru as clearStoreCache,nu as getStoreScript};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Xu,Ec,be,di,Gu,ms,hs,ys}from"./chunk-
|
|
2
|
+
import{Xu,Ec,be,di,Gu,ms,hs,ys}from"./chunk-jws8btr5.js";import"./chunk-szry3s17.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-kzg3h5wg.js";import"./chunk-1erc0vrb.js";import"./chunk-qmcmjdy7.js";import"./chunk-b77v56fz.js";import"./chunk-2pph3dh0.js";import"./chunk-d4k4nyj0.js";import"./chunk-v7vkqg8f.js";import"./chunk-rmavqxd8.js";import"./chunk-e6y6s7q8.js";export{Gu as clearOnceStore,di as onceStore,be as partialsCache,ms as processIncludes,hs as processStackPushDirectives,ys as processStackReplacements,Xu as resetUnscopedSignalWarnings,Ec as topLevelElements};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{on,gc,as}from"./chunk-
|
|
2
|
+
import{on,gc,as}from"./chunk-jws8btr5.js";import"./chunk-szry3s17.js";import"./chunk-c57j92td.js";import"./chunk-kp4mzspk.js";import"./chunk-kzg3h5wg.js";import"./chunk-1erc0vrb.js";import"./chunk-qmcmjdy7.js";import"./chunk-b77v56fz.js";import{Se}from"./chunk-2pph3dh0.js";import"./chunk-d4k4nyj0.js";import"./chunk-v7vkqg8f.js";import"./chunk-rmavqxd8.js";import"./chunk-e6y6s7q8.js";export{Se as freeIdentifiers,as as processComponents,gc as processESImports,on as rendersAsElement};
|