@stacksjs/stx 0.2.333 → 0.2.335

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.
@@ -120,7 +120,7 @@ export async function renderEmail(templatePath, props = {}, options = {}) {
120
120
  let html = await renderView(templatePath, props, emailOptions);
121
121
  html = await inlineCssClasses(html);
122
122
  html = html.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, "");
123
- html = html.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi, "");
123
+ html = html.replace(/<style\b([^>]*)>[\s\S]*?<\/style>/gi, (block, attrs) => /\bdata-(?:css=["']generated["']|stx-)/i.test(attrs) ? "" : block);
124
124
  html = html.replace(/<!--\s*stx SEO Tags\s*-->/gi, "");
125
125
  html = html.replace(/\n\s*\n\s*\n/g, `
126
126
 
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Wf as a}from"./chunk-kk7p8ekz.js";import"./chunk-gdbkqatx.js";import"./chunk-cmtjq1db.js";import"./chunk-dvvx1wny.js";import"./chunk-71y3bhcw.js";import"./chunk-t41aaehf.js";import"./chunk-4jdj52c5.js";import"./chunk-p1hy2bwn.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as buildForProduction};
2
+ import{Wf as a}from"./chunk-wdvyn2va.js";import"./chunk-gdbkqatx.js";import"./chunk-y085rdre.js";import"./chunk-dvvx1wny.js";import"./chunk-71y3bhcw.js";import"./chunk-t41aaehf.js";import"./chunk-4jdj52c5.js";import"./chunk-p1hy2bwn.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as buildForProduction};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ue as a}from"./chunk-ef0ra05n.js";import"./chunk-dvvx1wny.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as buildApp};
2
+ import{Ue as a}from"./chunk-dghr3zxy.js";import"./chunk-dvvx1wny.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as buildApp};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Xe as F$}from"./chunk-q4p1h741.js";import{hg as d7,lg as z$,mg as h6,ng as E6,pg as B1,qg as d6,rg as J5,sg as H$,tg as O$,ug as u6,vg as m6,zg as B5}from"./chunk-cmtjq1db.js";import{lj as f5}from"./chunk-71y3bhcw.js";import{Bj as l1,Cj as I1,Dj as R1,Ej as i$,Fj as a$,Gj as a5,Ij as r5}from"./chunk-t41aaehf.js";import{ck as K$,dk as _$}from"./chunk-fkdnfjc2.js";import{Gk as m5,Hk as p5}from"./chunk-e1sxe3q4.js";import{Nk as n7,Ok as o7}from"./chunk-4jdj52c5.js";import{gl as U1}from"./chunk-zz8qgqa1.js";import{Bl as A5,Cl as U8}from"./chunk-p1hy2bwn.js";import{$m as G5,Br as T$,Cp as m7,Dr as s0,Er as w0,Fm as n0,Ir as T0,Jp as g6,Kp as f6,To as M0,Xm as y6,bp as o0,cn as T1,dn as C1,eq as V0,go as W$,or as U$,sq as G6,tm as h7,tq as x1,vo as j$,xo as v6,xq as t0,yo as A6}from"./chunk-kxtqbrfr.js";import{$r as e$,Qr as r1,Tr as H6,bs as $5,es as s1,is as X5,ls as G$,ms as O6,xs as J6}from"./chunk-caaenc3w.js";import{Bt as Z5,Vt as B,au as B$,bu as L$,fu as J0}from"./chunk-kffndzch.js";import{Cu as u0}from"./chunk-gptwwv3c.js";import{$v as k6,Ev as Y5,Fv as M6,Jv as D6,Kv as w6,Zv as T6,_v as C6,aw as x6,bw as S6,cw as P6,ew as b6,iw as V6}from"./chunk-hzfd8cz0.js";import{sw as r}from"./chunk-hyfjnn7g.js";var s5={read:($)=>{try{return JSON.parse($)}catch{return $}},write:($)=>{return JSON.stringify($)}};function Y3($,X,Z={}){let{storage:Q="local",serializer:Y=s5,mergeDefaults:J=!1,listenToStorageChanges:G=!0}=Z,W=new Set,K=typeof window<"u",_=()=>{if(!K)return null;return Q==="session"?sessionStorage:localStorage},U=()=>{let L=_();if(!L)return X;try{let O=L.getItem($);if(O===null)return X;let A=Y.read(O);if(J&&typeof X==="object"&&X!==null)return{...X,...A};return A}catch{return X}},F=(L)=>{let O=_();if(!O)return;try{if(L===null||L===void 0)O.removeItem($);else O.setItem($,Y.write(L))}catch(A){console.warn(`[useStorage] Failed to write key "${$}":`,A)}},z=U(),j=(L,O)=>{for(let A of W)try{A(L,O)}catch(V){console.error("[useStorage] Subscriber error:",V)}};if(K&&G){let L=(A)=>{if(A.key===$&&A.storageArea===_()){let V=z;try{z=A.newValue?Y.read(A.newValue):X}catch(E){console.warn(`[useStorage] Failed to read key "${$}" from a cross-tab update:`,E);return}j(z,V)}};window.addEventListener("storage",L);let O=globalThis.onDestroy;if(typeof O==="function")O(()=>window.removeEventListener("storage",L))}let H={get value(){return z},set value(L){let O=z;z=L,F(L),j(L,O)},get:()=>z,set:(L)=>{H.value=L},remove:()=>{let L=_();if(L){L.removeItem($);let O=z;z=X,j(X,O)}},subscribe:(L)=>{return W.add(L),L(z,void 0),()=>W.delete(L)}};return H}function n5($,X,Z,Q,Y={}){let{serializer:J=s5,mergeDefaults:G=!1,listenToStorageChanges:W=!0}=Y,K=typeof window<"u",_=()=>{if(!K)return null;return $==="session"?sessionStorage:localStorage},U=(j)=>{if(j===null||j===void 0)return Q;try{let H=J.read(j);if(G&&typeof Q==="object"&&Q!==null)return{...Q,...H};return H}catch(H){return console.warn(`[${X}] Failed to read key "${Z}":`,H),Q}},z=a5((()=>{let j=_();if(!j)return Q;try{return U(j.getItem(Z))}catch(H){return console.warn(`[${X}] Cannot read "${Z}":`,H),Q}})());if(r5(()=>{let j=z(),H=_();if(!H)return;try{if(j===null||j===void 0)H.removeItem(Z);else H.setItem(Z,J.write(j))}catch(L){console.warn(`[${X}] Cannot persist "${Z}":`,L)}}),K&&W){let j=(L)=>{if(L.key!==Z)return;if(L.storageArea&&L.storageArea!==_())return;z.set(U(L.newValue))};window.addEventListener("storage",j);let H=globalThis.onDestroy;if(typeof H==="function")H(()=>window.removeEventListener("storage",j))}return z}function J3($,X,Z){return n5("local","useLocalStorage",$,X,Z)}function G3($,X,Z){return n5("session","useSessionStorage",$,X,Z)}function W3($="local"){if(typeof window>"u")return;($==="session"?sessionStorage:localStorage).clear()}function K3($="local"){if(typeof window>"u")return[];let X=$==="session"?sessionStorage:localStorage;return Object.keys(X)}function _3($="local"){if(typeof window>"u")return 0;let X=$==="session"?sessionStorage:localStorage,Z=0;for(let Q in X)if(Object.prototype.hasOwnProperty.call(X,Q))Z+=(Q.length+(X.getItem(Q)?.length||0))*2;return Z}var t=null;function c1($,X,Z=new WeakSet){if(Object.is($,X))return!0;if(typeof $!=="object"||typeof X!=="object"||$===null||X===null)return!1;if(Z.has($))return!0;if(Z.add($),$ instanceof Date&&X instanceof Date)return $.getTime()===X.getTime();if($ instanceof RegExp&&X instanceof RegExp)return $.source===X.source&&$.flags===X.flags;if(Array.isArray($)){if(!Array.isArray(X)||$.length!==X.length)return!1;for(let J=0;J<$.length;J++)if(!c1($[J],X[J],Z))return!1;return!0}if(Array.isArray(X))return!1;if($ instanceof Map){if(!(X instanceof Map)||$.size!==X.size)return!1;for(let[J,G]of $)if(!X.has(J)||!c1(G,X.get(J),Z))return!1;return!0}if(X instanceof Map)return!1;if($ instanceof Set){if(!(X instanceof Set)||$.size!==X.size)return!1;for(let J of $)if(!X.has(J))return!1;return!0}if(X instanceof Set)return!1;let Q=Object.keys($),Y=Object.keys(X);if(Q.length!==Y.length)return!1;for(let J of Q){if(!Object.prototype.hasOwnProperty.call(X,J))return!1;if(!c1($[J],X[J],Z))return!1}return!0}function ZJ($){t=$}function QJ(){return t}function YJ(){return{isMounted:!1,isUnmounted:!1,hooks:{beforeMount:[],mounted:[],beforeUpdate:[],updated:[],beforeUnmount:[],unmounted:[]},effects:[],scope:U3()}}function U3(){return{refs:new Map,effects:new Set,cleanups:[]}}function JJ($){let X=new Set,Z=new Set,Q=$,Y=Symbol("ref"),J={get value(){let G=l1();if(G)Z.add(G);return Q},set value(G){if(!Object.is(G,Q)){let W=Q;Q=G;for(let K of X)K(G,W);for(let K of Z)if(i$())a$(K);else K()}},subscribe(G){return X.add(G),()=>{X.delete(G)}}};if(t)t.scope.refs.set(Y,J);return J}var o5=new WeakMap;function B3($){let X=o5.get($);if(X)return X;let Z=new Map,Q=(G)=>{let W=Z.get(G);if(!W)return;for(let K of[...W])if(i$())a$(K);else K()},Y=(G,W)=>{if(!Z.has(G))Z.set(G,new Set);return Z.get(G).add(W),()=>{Z.get(G)?.delete(W)}},J=new Proxy($,{get(G,W,K){let _=Reflect.get(G,W,K),U=l1();if(U)Y(W,U);if(_!==null&&typeof _==="object"&&!Array.isArray(_)){let F=Object.getPrototypeOf(_);if(F===Object.prototype||F===null)return B3(_)}return _},set(G,W,K,_){let U=Reflect.get(G,W,_),F=Reflect.set(G,W,K,_);if(!Object.is(K,U))Q(W);return F},deleteProperty(G,W){let K=Reflect.deleteProperty(G,W);return Q(W),K}});return o5.set($,J),J}function GJ($){let X,Z=!0,Q=new Set,Y=new Set,J=()=>{Z=!0,G()},G=()=>{if(Z){let K=X,_=I1(J);if(X=$(),R1(_),Z=!1,!Object.is(X,K)){for(let U of Q)U(X,K);for(let U of Y)U()}}},W=I1(J);return X=$(),Z=!1,R1(W),{get value(){let K=l1();if(K)Y.add(K);return G(),X},set value(K){console.warn("[stx] Computed properties are readonly")},subscribe(K){return Q.add(K),()=>{Q.delete(K)}}}}function L3($){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(()=>{requestAnimationFrame($)});return}setTimeout($,0)}function WJ($,X,Z={}){let{immediate:Q=!1,deep:Y=!1,flush:J="post"}=Z,G,W,K=!1,_=()=>{if(K)return;let H=j();if((Y?!c1(H,G):!Object.is(H,G))||Q)if(X(H,G),Y&&H!==null&&typeof H==="object")try{G=structuredClone(H)}catch{G=H}else G=H},U=(H)=>{if(J==="sync")H();else if(J==="pre")Promise.resolve().then(H);else L3(H)},F=!1,z=()=>{if(K||F)return;F=!0,U(()=>{F=!1,_()})},j=()=>{if(typeof $==="function"){let H=I1(z);try{return $()}finally{R1(H)}}return $.value};if(typeof $!=="function"){let H=$.subscribe(()=>{U(_)});W=()=>{K=!0,H()}}else W=()=>{K=!0};if(G=j(),Q)U(_);if(t)t.scope.cleanups.push(()=>W?.());return()=>W?.()}function KJ($,X,Z={}){let Q=[],Y=$.map((J)=>J.value);for(let J of $){let G=J.subscribe(()=>{let W=$.map((K)=>K.value);X(W,Y),Y=[...W]});Q.push(G)}if(Z.immediate){let J=$.map((G)=>G.value);X(J,Y)}return()=>{for(let J of Q)J()}}function _J($){let X,Z=!1,Q=()=>{if(Z)return;if(X)X();let Y=I1(Q);X=$(),R1(Y)};if(Q(),t)t.scope.cleanups.push(()=>{if(Z=!0,X)X()});return()=>{if(Z=!0,X)X()}}function UJ($){if(t)t.hooks.beforeMount.push($);else console.warn("[stx] onBeforeMount called outside of component setup")}function BJ($){if(t)t.hooks.mounted.push($);else console.warn("[stx] onMounted called outside of component setup")}function LJ($){if(t)t.hooks.beforeUpdate.push($);else console.warn("[stx] onBeforeUpdate called outside of component setup")}function FJ($){if(t)t.hooks.updated.push($);else console.warn("[stx] onUpdated called outside of component setup")}function zJ($){if(t)t.hooks.beforeUnmount.push($);else console.warn("[stx] onBeforeUnmount called outside of component setup")}function jJ($){if(t)t.hooks.unmounted.push($);else console.warn("[stx] onUnmounted called outside of component setup")}async function Y1($,X){let Z=$.hooks[X];for(let Q of Z)await Q()}async function HJ($){await Y1($,"beforeMount"),$.isMounted=!0,await Y1($,"mounted")}async function OJ($){if(!$.isMounted||$.isUnmounted)return;await Y1($,"beforeUpdate"),await Y1($,"updated")}async function AJ($){if($.isUnmounted)return;await Y1($,"beforeUnmount");for(let X of $.scope.cleanups)X();$.isUnmounted=!0,await Y1($,"unmounted")}function qJ(){return`
2
+ import{Xe as F$}from"./chunk-zbtd1ceq.js";import{hg as d7,lg as z$,mg as h6,ng as E6,pg as B1,qg as d6,rg as J5,sg as H$,tg as O$,ug as u6,vg as m6,zg as B5}from"./chunk-y085rdre.js";import{lj as f5}from"./chunk-71y3bhcw.js";import{Bj as l1,Cj as I1,Dj as R1,Ej as i$,Fj as a$,Gj as a5,Ij as r5}from"./chunk-t41aaehf.js";import{ck as K$,dk as _$}from"./chunk-fkdnfjc2.js";import{Gk as m5,Hk as p5}from"./chunk-e1sxe3q4.js";import{Nk as n7,Ok as o7}from"./chunk-4jdj52c5.js";import{gl as U1}from"./chunk-zz8qgqa1.js";import{Bl as A5,Cl as U8}from"./chunk-p1hy2bwn.js";import{$m as G5,Br as T$,Cp as m7,Dr as s0,Er as w0,Fm as n0,Ir as T0,Jp as g6,Kp as f6,To as M0,Xm as y6,bp as o0,cn as T1,dn as C1,eq as V0,go as W$,or as U$,sq as G6,tm as h7,tq as x1,vo as j$,xo as v6,xq as t0,yo as A6}from"./chunk-kxtqbrfr.js";import{$r as e$,Qr as r1,Tr as H6,bs as $5,es as s1,is as X5,ls as G$,ms as O6,xs as J6}from"./chunk-caaenc3w.js";import{Bt as Z5,Vt as B,au as B$,bu as L$,fu as J0}from"./chunk-kffndzch.js";import{Cu as u0}from"./chunk-gptwwv3c.js";import{$v as k6,Ev as Y5,Fv as M6,Jv as D6,Kv as w6,Zv as T6,_v as C6,aw as x6,bw as S6,cw as P6,ew as b6,iw as V6}from"./chunk-hzfd8cz0.js";import{sw as r}from"./chunk-hyfjnn7g.js";var s5={read:($)=>{try{return JSON.parse($)}catch{return $}},write:($)=>{return JSON.stringify($)}};function Y3($,X,Z={}){let{storage:Q="local",serializer:Y=s5,mergeDefaults:J=!1,listenToStorageChanges:G=!0}=Z,W=new Set,K=typeof window<"u",_=()=>{if(!K)return null;return Q==="session"?sessionStorage:localStorage},U=()=>{let L=_();if(!L)return X;try{let O=L.getItem($);if(O===null)return X;let A=Y.read(O);if(J&&typeof X==="object"&&X!==null)return{...X,...A};return A}catch{return X}},F=(L)=>{let O=_();if(!O)return;try{if(L===null||L===void 0)O.removeItem($);else O.setItem($,Y.write(L))}catch(A){console.warn(`[useStorage] Failed to write key "${$}":`,A)}},z=U(),j=(L,O)=>{for(let A of W)try{A(L,O)}catch(V){console.error("[useStorage] Subscriber error:",V)}};if(K&&G){let L=(A)=>{if(A.key===$&&A.storageArea===_()){let V=z;try{z=A.newValue?Y.read(A.newValue):X}catch(E){console.warn(`[useStorage] Failed to read key "${$}" from a cross-tab update:`,E);return}j(z,V)}};window.addEventListener("storage",L);let O=globalThis.onDestroy;if(typeof O==="function")O(()=>window.removeEventListener("storage",L))}let H={get value(){return z},set value(L){let O=z;z=L,F(L),j(L,O)},get:()=>z,set:(L)=>{H.value=L},remove:()=>{let L=_();if(L){L.removeItem($);let O=z;z=X,j(X,O)}},subscribe:(L)=>{return W.add(L),L(z,void 0),()=>W.delete(L)}};return H}function n5($,X,Z,Q,Y={}){let{serializer:J=s5,mergeDefaults:G=!1,listenToStorageChanges:W=!0}=Y,K=typeof window<"u",_=()=>{if(!K)return null;return $==="session"?sessionStorage:localStorage},U=(j)=>{if(j===null||j===void 0)return Q;try{let H=J.read(j);if(G&&typeof Q==="object"&&Q!==null)return{...Q,...H};return H}catch(H){return console.warn(`[${X}] Failed to read key "${Z}":`,H),Q}},z=a5((()=>{let j=_();if(!j)return Q;try{return U(j.getItem(Z))}catch(H){return console.warn(`[${X}] Cannot read "${Z}":`,H),Q}})());if(r5(()=>{let j=z(),H=_();if(!H)return;try{if(j===null||j===void 0)H.removeItem(Z);else H.setItem(Z,J.write(j))}catch(L){console.warn(`[${X}] Cannot persist "${Z}":`,L)}}),K&&W){let j=(L)=>{if(L.key!==Z)return;if(L.storageArea&&L.storageArea!==_())return;z.set(U(L.newValue))};window.addEventListener("storage",j);let H=globalThis.onDestroy;if(typeof H==="function")H(()=>window.removeEventListener("storage",j))}return z}function J3($,X,Z){return n5("local","useLocalStorage",$,X,Z)}function G3($,X,Z){return n5("session","useSessionStorage",$,X,Z)}function W3($="local"){if(typeof window>"u")return;($==="session"?sessionStorage:localStorage).clear()}function K3($="local"){if(typeof window>"u")return[];let X=$==="session"?sessionStorage:localStorage;return Object.keys(X)}function _3($="local"){if(typeof window>"u")return 0;let X=$==="session"?sessionStorage:localStorage,Z=0;for(let Q in X)if(Object.prototype.hasOwnProperty.call(X,Q))Z+=(Q.length+(X.getItem(Q)?.length||0))*2;return Z}var t=null;function c1($,X,Z=new WeakSet){if(Object.is($,X))return!0;if(typeof $!=="object"||typeof X!=="object"||$===null||X===null)return!1;if(Z.has($))return!0;if(Z.add($),$ instanceof Date&&X instanceof Date)return $.getTime()===X.getTime();if($ instanceof RegExp&&X instanceof RegExp)return $.source===X.source&&$.flags===X.flags;if(Array.isArray($)){if(!Array.isArray(X)||$.length!==X.length)return!1;for(let J=0;J<$.length;J++)if(!c1($[J],X[J],Z))return!1;return!0}if(Array.isArray(X))return!1;if($ instanceof Map){if(!(X instanceof Map)||$.size!==X.size)return!1;for(let[J,G]of $)if(!X.has(J)||!c1(G,X.get(J),Z))return!1;return!0}if(X instanceof Map)return!1;if($ instanceof Set){if(!(X instanceof Set)||$.size!==X.size)return!1;for(let J of $)if(!X.has(J))return!1;return!0}if(X instanceof Set)return!1;let Q=Object.keys($),Y=Object.keys(X);if(Q.length!==Y.length)return!1;for(let J of Q){if(!Object.prototype.hasOwnProperty.call(X,J))return!1;if(!c1($[J],X[J],Z))return!1}return!0}function ZJ($){t=$}function QJ(){return t}function YJ(){return{isMounted:!1,isUnmounted:!1,hooks:{beforeMount:[],mounted:[],beforeUpdate:[],updated:[],beforeUnmount:[],unmounted:[]},effects:[],scope:U3()}}function U3(){return{refs:new Map,effects:new Set,cleanups:[]}}function JJ($){let X=new Set,Z=new Set,Q=$,Y=Symbol("ref"),J={get value(){let G=l1();if(G)Z.add(G);return Q},set value(G){if(!Object.is(G,Q)){let W=Q;Q=G;for(let K of X)K(G,W);for(let K of Z)if(i$())a$(K);else K()}},subscribe(G){return X.add(G),()=>{X.delete(G)}}};if(t)t.scope.refs.set(Y,J);return J}var o5=new WeakMap;function B3($){let X=o5.get($);if(X)return X;let Z=new Map,Q=(G)=>{let W=Z.get(G);if(!W)return;for(let K of[...W])if(i$())a$(K);else K()},Y=(G,W)=>{if(!Z.has(G))Z.set(G,new Set);return Z.get(G).add(W),()=>{Z.get(G)?.delete(W)}},J=new Proxy($,{get(G,W,K){let _=Reflect.get(G,W,K),U=l1();if(U)Y(W,U);if(_!==null&&typeof _==="object"&&!Array.isArray(_)){let F=Object.getPrototypeOf(_);if(F===Object.prototype||F===null)return B3(_)}return _},set(G,W,K,_){let U=Reflect.get(G,W,_),F=Reflect.set(G,W,K,_);if(!Object.is(K,U))Q(W);return F},deleteProperty(G,W){let K=Reflect.deleteProperty(G,W);return Q(W),K}});return o5.set($,J),J}function GJ($){let X,Z=!0,Q=new Set,Y=new Set,J=()=>{Z=!0,G()},G=()=>{if(Z){let K=X,_=I1(J);if(X=$(),R1(_),Z=!1,!Object.is(X,K)){for(let U of Q)U(X,K);for(let U of Y)U()}}},W=I1(J);return X=$(),Z=!1,R1(W),{get value(){let K=l1();if(K)Y.add(K);return G(),X},set value(K){console.warn("[stx] Computed properties are readonly")},subscribe(K){return Q.add(K),()=>{Q.delete(K)}}}}function L3($){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(()=>{requestAnimationFrame($)});return}setTimeout($,0)}function WJ($,X,Z={}){let{immediate:Q=!1,deep:Y=!1,flush:J="post"}=Z,G,W,K=!1,_=()=>{if(K)return;let H=j();if((Y?!c1(H,G):!Object.is(H,G))||Q)if(X(H,G),Y&&H!==null&&typeof H==="object")try{G=structuredClone(H)}catch{G=H}else G=H},U=(H)=>{if(J==="sync")H();else if(J==="pre")Promise.resolve().then(H);else L3(H)},F=!1,z=()=>{if(K||F)return;F=!0,U(()=>{F=!1,_()})},j=()=>{if(typeof $==="function"){let H=I1(z);try{return $()}finally{R1(H)}}return $.value};if(typeof $!=="function"){let H=$.subscribe(()=>{U(_)});W=()=>{K=!0,H()}}else W=()=>{K=!0};if(G=j(),Q)U(_);if(t)t.scope.cleanups.push(()=>W?.());return()=>W?.()}function KJ($,X,Z={}){let Q=[],Y=$.map((J)=>J.value);for(let J of $){let G=J.subscribe(()=>{let W=$.map((K)=>K.value);X(W,Y),Y=[...W]});Q.push(G)}if(Z.immediate){let J=$.map((G)=>G.value);X(J,Y)}return()=>{for(let J of Q)J()}}function _J($){let X,Z=!1,Q=()=>{if(Z)return;if(X)X();let Y=I1(Q);X=$(),R1(Y)};if(Q(),t)t.scope.cleanups.push(()=>{if(Z=!0,X)X()});return()=>{if(Z=!0,X)X()}}function UJ($){if(t)t.hooks.beforeMount.push($);else console.warn("[stx] onBeforeMount called outside of component setup")}function BJ($){if(t)t.hooks.mounted.push($);else console.warn("[stx] onMounted called outside of component setup")}function LJ($){if(t)t.hooks.beforeUpdate.push($);else console.warn("[stx] onBeforeUpdate called outside of component setup")}function FJ($){if(t)t.hooks.updated.push($);else console.warn("[stx] onUpdated called outside of component setup")}function zJ($){if(t)t.hooks.beforeUnmount.push($);else console.warn("[stx] onBeforeUnmount called outside of component setup")}function jJ($){if(t)t.hooks.unmounted.push($);else console.warn("[stx] onUnmounted called outside of component setup")}async function Y1($,X){let Z=$.hooks[X];for(let Q of Z)await Q()}async function HJ($){await Y1($,"beforeMount"),$.isMounted=!0,await Y1($,"mounted")}async function OJ($){if(!$.isMounted||$.isUnmounted)return;await Y1($,"beforeUpdate"),await Y1($,"updated")}async function AJ($){if($.isUnmounted)return;await Y1($,"beforeUnmount");for(let X of $.scope.cleanups)X();$.isUnmounted=!0,await Y1($,"unmounted")}function qJ(){return`
3
3
  <script data-stx-client-runtime>
4
4
  (function() {
5
5
  'use strict';
@@ -1120,7 +1120,7 @@ ${O}`}if(H=await A6(H),W.forEach((L)=>Q.add(L)),Z.cache&&Z.cachePath){if(await _
1120
1120
  <h1>Something went wrong</h1>
1121
1121
  <p>An internal error occurred. Please try again later.</p>
1122
1122
  </body>
1123
- </html>`,loader:"html"}}})}};async function V4($,X={}){let Z=X.port||3000,Q=X.watch!==!1,Y=X.hotReload!==!1&&Q,J=null,G=X.hmrPort||Z+1,W=Q0.resolve($);if(!E0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return t$(W,X);else if(!W.endsWith(".stx"))return console.error(`${B.red}Error: Unsupported file type: ${B.bright}${W}${B.reset}. Only .stx and .md files are supported.`),!1;let K=u0(process.cwd(),"output");E0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let I={name:"public-assets",setup(T){T.onResolve({filter:/^\/(images|fonts|assets|public)\//},(f)=>{return{path:f.path,external:!0}})}},M=await Bun.build({entrypoints:[W],outdir:K,plugins:[I,_1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!M.success)return console.error(`${B.red}Build failed:${B.reset}`,M.logs),!1;let w=M.outputs.find((T)=>T.path.endsWith(".html"));if(!w)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(w.path).text(),!0}catch(I){return console.error(`${B.red}Error building stx file:${B.reset}`,I),!1}};if(!await U())return!1;let z=Q0.dirname(W);await B$(z);let j=Z;try{if(j=await h0(Z),j!==Z)console.log(`${B.yellow}Port ${Z} is busy, using port ${j} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let I=X.hmrPort||j+1;J=J$({wsPort:I,verbose:!1}),G=J.start(I)}let H={},L=null,O;try{let{loadStxConfig:I}=await import("./chunk-c1c2a5es.js"),M=await I();if(O=X.stxOptions?.serverApi??M.serverApi,M?.apiRouter)L=M?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(M?.apiRoutes){H=M.apiRoutes;let w=Object.keys(H).length;if(w>0)console.log(`${B.blue}Loaded ${B.bright}${w} API route${w>1?"s":""}${B.reset}`)}if(M?.broadcasting?.enabled)try{let{startBroadcasting:w,loadChannels:D}=await import("./chunk-cdqx2c2h.js"),T=M.broadcasting;await w(T);let f=T.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${f}/ws${B.reset}`);let c=Q0.join(process.cwd(),"channels.ts");if(E0.existsSync(c))try{let v=await D(c);console.log(`${B.blue}Loaded ${B.bright}${v} broadcast channel${v!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(v){console.warn(`${B.yellow}Failed to load channels.ts: ${v.message}${B.reset}`)}}catch(w){console.warn(`${B.yellow}Broadcasting failed to start: ${w.message}${B.reset}`)}}catch{}let{createServerApi:A,isServerApiSource:V}=await import("./chunk-jnahcd4d.js"),E=await A(process.cwd(),O);if(console.log(`${B.blue}Starting server on ${B.cyan}http://localhost:${j}/${B.reset}...`),Y)console.log(`${B.magenta}Hot reload enabled on ws://localhost:${G}${B.reset}`);let q=M4({port:j,async fetch(I){return F$(I,await(async()=>{let M=new URL(I.url);if([K,Q0.dirname(W),Q0.join(process.cwd(),"public")].some((v)=>V(Q0.join(v,M.pathname),process.cwd(),O)))return new Response("Not Found",{status:404});if(L)try{let v=await L.handleRequest(I);if(v.status!==404)return v}catch{}if(H[M.pathname])try{return await H[M.pathname](I)}catch(v){return new Response(JSON.stringify({error:v.message}),{status:500,headers:{"Content-Type":"application/json"}})}let w=await E(I);if(w)return w;if(M.pathname==="/")return(async()=>{let S=await J0(_||"");if(Y)S=P0(S,G);if(X.native)if(S.includes("<head>"))S=S.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else if(S.includes("<html"))S=S.replace(/(<html[^>]*>)/,"$1<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>");else S="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+S;if(X.titlebarHidden)if(S.includes("<head>"))S=S.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else if(S.includes("<html"))S=S.replace(/(<html[^>]*>)/,"$1<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>");else S=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${S}`;return S})().then((S)=>new Response(S,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}}));let D=Q0.join(K,M.pathname);if(E0.existsSync(D)&&E0.statSync(D).isFile()){let v=Bun.file(D),S=Q0.extname(D).toLowerCase(),k="text/plain";if(S===".ts"||S===".tsx"){let H0=new Bun.Transpiler({loader:S===".tsx"?"tsx":"ts"}),G0=await v.text(),r0=H0.transformSync(G0);return new Response(r0,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(S){case".html":k="text/html";break;case".css":k="text/css";break;case".js":k="text/javascript";break;case".json":k="application/json";break;case".png":k="image/png";break;case".jpg":case".jpeg":k="image/jpeg";break;case".gif":k="image/gif";break;case".woff":k="font/woff";break;case".woff2":k="font/woff2";break;case".ttf":k="font/ttf";break;case".otf":k="font/otf";break;case".eot":k="application/vnd.ms-fontobject";break}return new Response(v,{headers:{"Content-Type":k}})}let T=Q0.dirname(W),f=Q0.join(T,M.pathname);if(E0.existsSync(f)&&E0.statSync(f).isFile()){let v=Bun.file(f),S=Q0.extname(f).toLowerCase(),k="text/plain";if(S===".ts"||S===".tsx"){let H0=new Bun.Transpiler({loader:S===".tsx"?"tsx":"ts"}),G0=await v.text(),r0=H0.transformSync(G0);return new Response(r0,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(S){case".html":k="text/html";break;case".css":k="text/css";break;case".js":k="text/javascript";break;case".json":k="application/json";break;case".png":k="image/png";break;case".jpg":case".jpeg":k="image/jpeg";break;case".gif":k="image/gif";break;case".svg":k="image/svg+xml";break;case".ico":k="image/x-icon";break;case".woff":k="font/woff";break;case".woff2":k="font/woff2";break;case".ttf":k="font/ttf";break;case".otf":k="font/otf";break;case".eot":k="application/vnd.ms-fontobject";break}return new Response(v,{headers:{"Content-Type":k}})}let c=Q0.join(process.cwd(),"public",M.pathname);if(E0.existsSync(c)&&E0.statSync(c).isFile()){let v=Bun.file(c),S=Q0.extname(c).toLowerCase(),k="application/octet-stream";if(S===".ts"||S===".tsx"){let H0=new Bun.Transpiler({loader:S===".tsx"?"tsx":"ts"}),G0=await v.text(),r0=H0.transformSync(G0);return new Response(r0,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(S){case".html":k="text/html";break;case".css":k="text/css";break;case".js":k="text/javascript";break;case".json":k="application/json";break;case".png":k="image/png";break;case".jpg":case".jpeg":k="image/jpeg";break;case".gif":k="image/gif";break;case".svg":k="image/svg+xml";break;case".ico":k="image/x-icon";break;case".woff":k="font/woff";break;case".woff2":k="font/woff2";break;case".ttf":k="font/ttf";break;case".otf":k="font/otf";break;case".eot":k="application/vnd.ms-fontobject";break}return new Response(v,{headers:{"Content-Type":k}})}return new Response("Not Found",{status:404})})())},error(I){return new Response(`<pre>${I}
1123
+ </html>`,loader:"html"}}})}};async function V4($,X={}){let Z=X.port||3000,Q=X.watch!==!1,Y=X.hotReload!==!1&&Q,J=null,G=X.hmrPort||Z+1,W=Q0.resolve($);if(!E0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return t$(W,X);else if(!W.endsWith(".stx"))return console.error(`${B.red}Error: Unsupported file type: ${B.bright}${W}${B.reset}. Only .stx and .md files are supported.`),!1;let K=u0(process.cwd(),"output");E0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let I={name:"public-assets",setup(T){T.onResolve({filter:/^\/(images|fonts|assets|public)\//},(f)=>{return{path:f.path,external:!0}})}},M=await Bun.build({entrypoints:[W],outdir:K,plugins:[I,_1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!M.success)return console.error(`${B.red}Build failed:${B.reset}`,M.logs),!1;let w=M.outputs.find((T)=>T.path.endsWith(".html"));if(!w)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(w.path).text(),!0}catch(I){return console.error(`${B.red}Error building stx file:${B.reset}`,I),!1}};if(!await U())return!1;let z=Q0.dirname(W);await B$(z);let j=Z;try{if(j=await h0(Z),j!==Z)console.log(`${B.yellow}Port ${Z} is busy, using port ${j} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let I=X.hmrPort||j+1;J=J$({wsPort:I,verbose:!1}),G=J.start(I)}let H={},L=null,O;try{let{loadStxConfig:I}=await import("./chunk-q86snkvs.js"),M=await I();if(O=X.stxOptions?.serverApi??M.serverApi,M?.apiRouter)L=M?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(M?.apiRoutes){H=M.apiRoutes;let w=Object.keys(H).length;if(w>0)console.log(`${B.blue}Loaded ${B.bright}${w} API route${w>1?"s":""}${B.reset}`)}if(M?.broadcasting?.enabled)try{let{startBroadcasting:w,loadChannels:D}=await import("./chunk-cdqx2c2h.js"),T=M.broadcasting;await w(T);let f=T.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${f}/ws${B.reset}`);let c=Q0.join(process.cwd(),"channels.ts");if(E0.existsSync(c))try{let v=await D(c);console.log(`${B.blue}Loaded ${B.bright}${v} broadcast channel${v!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(v){console.warn(`${B.yellow}Failed to load channels.ts: ${v.message}${B.reset}`)}}catch(w){console.warn(`${B.yellow}Broadcasting failed to start: ${w.message}${B.reset}`)}}catch{}let{createServerApi:A,isServerApiSource:V}=await import("./chunk-jnahcd4d.js"),E=await A(process.cwd(),O);if(console.log(`${B.blue}Starting server on ${B.cyan}http://localhost:${j}/${B.reset}...`),Y)console.log(`${B.magenta}Hot reload enabled on ws://localhost:${G}${B.reset}`);let q=M4({port:j,async fetch(I){return F$(I,await(async()=>{let M=new URL(I.url);if([K,Q0.dirname(W),Q0.join(process.cwd(),"public")].some((v)=>V(Q0.join(v,M.pathname),process.cwd(),O)))return new Response("Not Found",{status:404});if(L)try{let v=await L.handleRequest(I);if(v.status!==404)return v}catch{}if(H[M.pathname])try{return await H[M.pathname](I)}catch(v){return new Response(JSON.stringify({error:v.message}),{status:500,headers:{"Content-Type":"application/json"}})}let w=await E(I);if(w)return w;if(M.pathname==="/")return(async()=>{let S=await J0(_||"");if(Y)S=P0(S,G);if(X.native)if(S.includes("<head>"))S=S.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else if(S.includes("<html"))S=S.replace(/(<html[^>]*>)/,"$1<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>");else S="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+S;if(X.titlebarHidden)if(S.includes("<head>"))S=S.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else if(S.includes("<html"))S=S.replace(/(<html[^>]*>)/,"$1<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>");else S=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${S}`;return S})().then((S)=>new Response(S,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}}));let D=Q0.join(K,M.pathname);if(E0.existsSync(D)&&E0.statSync(D).isFile()){let v=Bun.file(D),S=Q0.extname(D).toLowerCase(),k="text/plain";if(S===".ts"||S===".tsx"){let H0=new Bun.Transpiler({loader:S===".tsx"?"tsx":"ts"}),G0=await v.text(),r0=H0.transformSync(G0);return new Response(r0,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(S){case".html":k="text/html";break;case".css":k="text/css";break;case".js":k="text/javascript";break;case".json":k="application/json";break;case".png":k="image/png";break;case".jpg":case".jpeg":k="image/jpeg";break;case".gif":k="image/gif";break;case".woff":k="font/woff";break;case".woff2":k="font/woff2";break;case".ttf":k="font/ttf";break;case".otf":k="font/otf";break;case".eot":k="application/vnd.ms-fontobject";break}return new Response(v,{headers:{"Content-Type":k}})}let T=Q0.dirname(W),f=Q0.join(T,M.pathname);if(E0.existsSync(f)&&E0.statSync(f).isFile()){let v=Bun.file(f),S=Q0.extname(f).toLowerCase(),k="text/plain";if(S===".ts"||S===".tsx"){let H0=new Bun.Transpiler({loader:S===".tsx"?"tsx":"ts"}),G0=await v.text(),r0=H0.transformSync(G0);return new Response(r0,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(S){case".html":k="text/html";break;case".css":k="text/css";break;case".js":k="text/javascript";break;case".json":k="application/json";break;case".png":k="image/png";break;case".jpg":case".jpeg":k="image/jpeg";break;case".gif":k="image/gif";break;case".svg":k="image/svg+xml";break;case".ico":k="image/x-icon";break;case".woff":k="font/woff";break;case".woff2":k="font/woff2";break;case".ttf":k="font/ttf";break;case".otf":k="font/otf";break;case".eot":k="application/vnd.ms-fontobject";break}return new Response(v,{headers:{"Content-Type":k}})}let c=Q0.join(process.cwd(),"public",M.pathname);if(E0.existsSync(c)&&E0.statSync(c).isFile()){let v=Bun.file(c),S=Q0.extname(c).toLowerCase(),k="application/octet-stream";if(S===".ts"||S===".tsx"){let H0=new Bun.Transpiler({loader:S===".tsx"?"tsx":"ts"}),G0=await v.text(),r0=H0.transformSync(G0);return new Response(r0,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(S){case".html":k="text/html";break;case".css":k="text/css";break;case".js":k="text/javascript";break;case".json":k="application/json";break;case".png":k="image/png";break;case".jpg":case".jpeg":k="image/jpeg";break;case".gif":k="image/gif";break;case".svg":k="image/svg+xml";break;case".ico":k="image/x-icon";break;case".woff":k="font/woff";break;case".woff2":k="font/woff2";break;case".ttf":k="font/ttf";break;case".otf":k="font/otf";break;case".eot":k="application/vnd.ms-fontobject";break}return new Response(v,{headers:{"Content-Type":k}})}return new Response("Not Found",{status:404})})())},error(I){return new Response(`<pre>${I}
1124
1124
  ${I.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),console.log(`
1125
1125
  ${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
1126
1126
  ${B.bright}\u2192 ${B.cyan}http://localhost:${j}/${B.reset}`),console.log(`
@@ -1607,7 +1607,7 @@ ${H.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),con
1607
1607
  ${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
1608
1608
  ${B.bright}\u2192 ${B.cyan}http://localhost:${U}/${B.reset}`),console.log(`
1609
1609
  ${B.yellow}Routes:${B.reset}`);let z=new Set(W.map((H)=>H.routeTemplate)),j=Object.entries(G).filter(([H])=>!z.has(H)).sort(([H],[L])=>H.localeCompare(L)).map(([H,L])=>({route:H==="/"?"/":H,filePath:B0.relative(process.cwd(),L.filePath),fileType:L.fileType}));for(let H of W){let L=H.routeTemplate.replace(/\[([^\]]+)\]/g,":$1");j.push({route:L,filePath:B0.relative(process.cwd(),H.filePath),fileType:"stx"})}if(j.sort((H,L)=>H.route.localeCompare(L.route)),j.forEach((H,L)=>{let A=L===j.length-1?"\u2514\u2500 ":"\u251C\u2500 ",V=H.fileType==="md"?`${B.magenta}(markdown)${B.reset}`:"";console.log(` ${B.green}${A}${H.route}${B.reset} \u2192 ${B.bright}${H.filePath}${B.reset} ${V}`)}),console.log(`
1610
- Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),d0(F.url.toString(),()=>{if(Q)m0.watch(J,{recursive:!0}).close();F.stop()}),Q){console.log(`${B.blue}Watching for changes...${B.reset}`);let H=m0.watch(J,{recursive:!0},async(L,O)=>{if(!O)return;if(O.endsWith(".stx")||O.endsWith(".js")||O.endsWith(".ts")||O.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${O}${B.yellow} changed, rebuilding...${B.reset}`),o0.clear(),t0(),await K()});process.on("SIGINT",()=>{H.close(),F.stop(),process.exit(0)})}return!0}function N6($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var{serve:R4}=globalThis.Bun;import e from"fs";import m from"path";async function R6($){try{return G5(await Bun.file($).text())}catch{return}}function Q5($){let X=Bun.file($),Z=m.extname($).toLowerCase(),Q={".html":"text/html",".css":"text/css",".js":"text/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"},J=[".js",".css",".json"].includes(Z)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Q[Z]||"application/octet-stream",...J}})}async function D4($=".",X={}){let Z=X.port||3000,Q=X.watch!==!1,Y=X.hotReload!==!1&&Q,J=null,G=X.hmrPort||Z+1,W=m.resolve($),{loadStxConfig:K}=await import("./chunk-c1c2a5es.js"),_=await K(W),{createServerApi:U,isServerApiSource:F}=await import("./chunk-jnahcd4d.js"),z=X.stxOptions?.serverApi??_.serverApi,j=await U(W,z),H=_.root&&_.root!=="."?m.join(W,_.root):W,L=X.pagesDir||_.pagesDir||"pages",O=m.join(H,L);if(!e.existsSync(O)&&!_._layerPageDirs?.some((R)=>e.existsSync(R)))return console.error(`${B.red}Error: No '${L}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${O}${B.reset}`),console.log(`${B.dim}Run stx dev from the app directory, pass it as an argument (stx dev <dir>),${B.reset}`),console.log(`${B.dim}point at another directory with --pages <dir>, or set pagesDir in stx.config.ts.${B.reset}`),console.log(`${B.dim}Starting fresh? Create ${L}/index.stx for the homepage.${B.reset}`),!1;let A=j$(H,{pagesDir:L,pagesDirs:_._layerPageDirs?[O,..._._layerPageDirs.slice(1)]:void 0});if(A.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${O}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${A.length}${B.blue} routes${B.reset}`);let V=_?._pluginPageDirs||[],E=[];for(let{dir:R,prefix:x}of V)if(e.existsSync(R)){let P=j$(m.dirname(R),{pagesDir:m.basename(R)});for(let y of P){let Z0=x==="/"?y.pattern:`${x}${y.pattern==="/"?"":y.pattern}`;E.push({route:{...y,pattern:Z0},prefix:x})}if(P.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${P.length}${B.blue} routes at ${B.cyan}${x}${B.reset}`)}let q=new Map,N=null,I=null;if(X.stxOptions?.shell!==!1){if(I=await d6(W,X.stxOptions?.shell),I){if(N=await J5(I,X.stxOptions||{}),N)console.log(`${B.blue}Using app shell: ${B.bright}${m.relative(W,I)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}T6(),await k6(W);let M=C6();if(M.length>0)console.log(`${B.blue}Loaded ${B.bright}${M.length}${B.blue} middleware: ${B.dim}${M.join(", ")}${B.reset}`);let w={},D=null;try{let{loadStxConfig:R}=await import("./chunk-c1c2a5es.js"),x=await R(W);if(x?.apiRouter)D=x?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(x?.apiRoutes){w=x.apiRoutes;let P=Object.keys(w).length;if(P>0)console.log(`${B.blue}Loaded ${B.bright}${P} API route${P>1?"s":""}${B.reset}`)}if(x?.broadcasting?.enabled)try{let{startBroadcasting:P,loadChannels:y}=await import("./chunk-cdqx2c2h.js"),Z0=x.broadcasting;await P(Z0);let R0=Z0.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${R0}/ws${B.reset}`);let g0=m.join(process.cwd(),"channels.ts");if(e.existsSync(g0))try{let p=await y(g0);console.log(`${B.blue}Loaded ${B.bright}${p} broadcast channel${p!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(p){console.warn(`${B.yellow}Failed to load channels.ts: ${p.message}${B.reset}`)}}catch(P){console.warn(`${B.yellow}Broadcasting failed to start: ${P.message}${B.reset}`)}}catch{}let T=u0(W,"output");e.mkdirSync(T,{recursive:!0});let f=new Map,c=new Set,v=async(R)=>{let x=D6(O,R);if(!x)return null;try{let P=await Bun.build({entrypoints:[x],outdir:T,plugins:[_1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!P.success)return null;let y=P.outputs.find((Z0)=>Z0.path.endsWith(".html"));if(!y)return null;return await Bun.file(y.path).text()}catch{return null}},S=new Map,k=async(R,x)=>{try{let{processDirectives:P,extractVariables:y,defaultConfig:Z0,loadStxConfig:R0,injectRouterScript:g0}=await import("./chunk-c1c2a5es.js"),{checkCache:p,cacheTemplate:u,readFileCached:g,templateCache:h}=await import("./chunk-yzxm75jp.js"),Y0=await R0(W),f0=(i)=>{if(!i)return i;if(m.isAbsolute(i))return i;return m.resolve(W,i)},C={...Z0,...Y0,...X.stxOptions,autoShell:!0};if(X.debugDirectives)C.debug=!0;C.partialsDir=f0(C.partialsDir),C.componentsDir=f0(C.componentsDir),C.layoutsDir=f0(C.layoutsDir),C.storesDir=f0(C.storesDir||"stores"),C.cachePath=f0(C.cachePath)??u0(W,"cache");let X0=!x&&!X.profile,a=C.cache!==!1;if(a&&X0){let i=h.get(R.filePath);if(i)try{if((await e.promises.stat(R.filePath)).mtime.getTime()<=i.mtime){let N0=!0;for(let _0 of i.dependencies){if(!e.existsSync(_0)){N0=!1;break}if((await e.promises.stat(_0)).mtime.getTime()>i.mtime){N0=!1;break}}if(N0){let _0=i.output;if(N)_0=O$(_0,{preserveHead:!0});let E1=S.get(R.filePath);return{route:R,content:_0,status:E1?.status??await R6(R.filePath),headers:E1?.headers}}}}catch{}let A0=await p(R.filePath,C);if(A0){let q0=A0;if(N)q0=O$(q0,{preserveHead:!0});let N0=S.get(R.filePath);return{route:R,content:q0,status:N0?.status??await R6(R.filePath),headers:N0?.headers}}}let o=a?await g(R.filePath):await Bun.file(R.filePath).text(),K0=G5(o),{classifyAllScripts:d}=await import("./chunk-c1c2a5es.js"),O0=d(o),D0=O0.server.map((i)=>i.content),s=o;for(let i of O0.server)s=s.replace(i.fullTag,"");let n={__filename:R.filePath,__dirname:m.dirname(R.filePath),__stx_options:C,params:x??{},__stx_runtime_head:{}};for(let i of D0)try{await y(i,n,R.filePath)}catch(A0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",R.filePath,A0?.message||A0)}let S0=new Set,j0;if(X.profile){let i=performance.now();j0=await P(s,n,R.filePath,C,S0);let A0=performance.now()-i,q0=m.relative(W,R.filePath)||R.filePath;console.log(`[stx:profile] ${q0} \u2192 ${A0.toFixed(2)}ms`)}else j0=await P(s,n,R.filePath,C,S0);if(!N)j0=await g0(j0,{router:C.router});{let{interpolateScriptExpressions:i}=await import("./chunk-q2hvne0v.js");j0=j0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(A0,q0,N0)=>{if(!/function\s+__stx_setup_/.test(N0))return A0;return`<script${q0}>${i(N0,n)}</script>`})}if(N)j0=O$(j0,{preserveHead:!0});if(a&&X0)await u(R.filePath,j0,S0,C);let{extractStreamBoundaries:Q3}=await import("./chunk-7ywnkv1f.js"),Q1=Q3(n),V1=n.__streamTemplates;if(V1&&typeof V1==="object"&&Object.keys(V1).length>0){let i=n.streamBoundaries||{},A0={...C,autoShell:!1},q0=Object.keys(V1).map((_0)=>({id:_0,render:async()=>{let E1=typeof i[_0]==="function"?await i[_0]():void 0;return P(V1[_0],{...n,$boundary:E1},R.filePath,A0,new Set)}})),N0=new Set(q0.map((_0)=>_0.id));Q1=[...(Q1||[]).filter((_0)=>!N0.has(_0.id)),...q0]}if(Q1&&Q1.length>0)c.add(R.pattern);else Q1=void 0;let l5=T1(n),i5=C1(n);if(X0)S.set(R.filePath,{status:l5,headers:i5});return{route:R,content:j0,status:l5??K0,headers:i5,boundaries:Q1}}catch(P){return console.error(`${B.red}Error building ${B.bright}${R.pattern}${B.reset}:`,P),null}},H0=8,G0=async()=>{f.clear(),q.clear();for(let R=0;R<A.length;R+=H0){let x=A.slice(R,R+H0),P=await Promise.all(x.map((y)=>k(y)));for(let y of P)if(y)f.set(y.route.pattern,y)}for(let R=0;R<E.length;R+=H0){let x=E.slice(R,R+H0),P=await Promise.all(x.map(({route:y})=>k(y)));for(let y of P)if(y)q.set(y.route.pattern,y)}return f.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await G0())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await B$(W);let v0=Z;try{if(v0=await h0(Z),v0!==Z)console.log(`${B.yellow}Port ${Z} is busy, using port ${v0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let R=X.hmrPort||v0+1;J=J$({wsPort:R,verbose:!1}),G=J.start(R)}let z0=(R,x)=>{let y=`<script data-stx-route-params>(function(){var p=${JSON.stringify(x).replace(/</g,"\\u003C").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")};window.__stx_rp=p;if(window.stx){window.stx._rp=p;if(window.stx.setRouteParams)window.stx.setRouteParams(p)}})()</script>`;if(R.includes("</head>"))return R.replace("</head>",`${y}</head>`);if(R.includes("<body"))return R.replace(/<body([^>]*)>/,`<body$1>${y}`);return y+R};console.log(`${B.blue}Starting server...${B.reset}`);let Z1=R4({port:v0,async fetch(R){let x=new URL(R.url),P=_?.publicDir||"public",y=m.join(W,P,x.pathname),Z0=m.join(W,x.pathname),R0=m.join(T,x.pathname);if([y,Z0,R0].some((C)=>F(C,W,z)))return new Response("Not Found",{status:404});let[g0,p,u]=await Promise.all([e.promises.stat(y).catch(()=>null),e.promises.stat(Z0).catch(()=>null),e.promises.stat(R0).catch(()=>null)]);if(g0?.isFile()&&!F(y,W,z))return Q5(y);if(p?.isFile()&&!F(Z0,W,z))return Q5(Z0);if(u?.isFile()&&!F(R0,W,z))return Q5(R0);if(x.pathname.startsWith("/_stx/component/")){let C=decodeURIComponent(x.pathname.slice(16));if(C)try{let X0=`<${C} />`,a={...buildConfig,autoShell:!1},o=await processDirectives(X0,{},m.join(W,"components",`${C}.stx`),a,new Set);return new Response(o,{headers:{"Content-Type":"text/html"}})}catch(X0){return new Response(`<div class="stx-async-error">${X0.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(x.pathname==="/_stx/img"){let{handleImageRequest:C}=await import("./chunk-gbz6pfs8.js"),X0=await C(R,{publicDir:m.join(W,P),cacheDir:u0(W,"cache","img")});if(X0)return X0}if(D)try{let C=await D.handleRequest(R);if(C.status!==404)return C}catch{}if(w[x.pathname])try{return await w[x.pathname](R)}catch(C){return new Response(JSON.stringify({error:C.message}),{status:500,headers:{"Content-Type":"application/json"}})}let g=await j(R);if(g)return g;let h=Y5(x.pathname,A);if(h){let C=f.get(h.route.pattern),X0=c.has(h.route.pattern);if(h.route.isDynamic&&Object.keys(h.params).length>0||X0){let a=await k(h.route,h.params);if(a)C=a}if(C){let a=C.status??200,o=C.headers??{},K0=(h.route.filePath?y6(await Bun.file(h.route.filePath).text().catch(()=>"")):null)??{};if(K0.validate){if(!await K0.validate({params:h.params})){let D0=await v(404);if(D0){let s=D0;if(s=await J0(s,W),Y)s=P0(s,G);return new Response(s,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(K0.middleware){let O0=x6(x.pathname,h.params,K0,x.search),D0=S6(O0,null,R,{isServer:!0}),s=await P6(K0.middleware,D0);if(s.redirect){let n=s.redirect.path,S0=s.redirect.options.redirectCode||302,j0=new Headers(s.responseHeaders);return j0.set("Location",n),new Response(null,{status:S0,headers:j0})}if(s.abort){let{statusCode:n,message:S0}=s.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${n}</title></head><body><h1>Error ${n}</h1><p>${S0}</p></body></html>`,{status:n,headers:{"Content-Type":"text/html"}})}if(Object.keys(s.state).length>0){let n=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(s.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;C.content=C.content.replace("</head>",`${n}</head>`)}}let d=C.content;if(N&&u6(R)){let O0=b6(d),D0=v6(d),s=d.match(/<title[^>]*>([\s\S]*?)<\/title>/i),n=s?h6(s[1].trim()):"";if(Object.keys(h.params).length>0)d=z0(d,h.params);d=await J0(d,W);let S0=_?.router?.container||"main";return d=m6(d,S0),new Response(d,{status:a,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":O0.layout,"X-STX-Layout-Group":O0.group,"X-STX-Runtime":D0?"true":"false",...n&&{"X-STX-Title":encodeURIComponent(n)},[g6]:f6(),...B1(),"Cache-Control":z$}})}if(N)d=H$(N,d);if(Object.keys(h.params).length>0)d=z0(d,h.params);if(d=await J0(d,W),Y)d=P0(d,G);if(X.native)if(d.includes("<head>"))d=d.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else d="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+d;if(X.titlebarHidden)if(d.includes("<head>"))d=d.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else d=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${d}`;if(C.boundaries&&C.boundaries.length>0){let{renderStreamingPage:O0,streamToResponse:D0}=await import("./chunk-7ywnkv1f.js");return D0(O0(d,C.boundaries,{timeoutMs:30000}),{status:a,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(d,{status:a,headers:{"Content-Type":"text/html",...B1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...o}})}}if(E.length>0){let C=E.map((a)=>a.route),X0=Y5(x.pathname,C);if(X0){let a=q.get(X0.route.pattern);if(a){let o=a.content;if(N)o=H$(N,o);if(Object.keys(X0.params).length>0)o=z0(o,X0.params);if(o=await J0(o,W),Y)o=P0(o,G);return new Response(o,{status:a.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:a}of V)if(a!=="/"&&x.pathname.startsWith(a)){let o=q.get(a)||q.get(a+"/");if(o){let K0=o.content;if(N)K0=H$(N,K0);if(K0=await J0(K0,W),Y)K0=P0(K0,G);return new Response(K0,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let Y0=f.get("/");if(Y0){let C=Y0.content;if(C=await J0(C,W),Y)C=P0(C,G);if(X.native)if(C.includes("<head>"))C=C.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else C="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+C;return new Response(C,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let f0=await v(404);if(f0){let C=f0;if(C=await J0(C,W),Y)C=P0(C,G);return new Response(C,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(R){let x=await v(500);if(x)return new Response(x,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${R}
1610
+ Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),d0(F.url.toString(),()=>{if(Q)m0.watch(J,{recursive:!0}).close();F.stop()}),Q){console.log(`${B.blue}Watching for changes...${B.reset}`);let H=m0.watch(J,{recursive:!0},async(L,O)=>{if(!O)return;if(O.endsWith(".stx")||O.endsWith(".js")||O.endsWith(".ts")||O.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${O}${B.yellow} changed, rebuilding...${B.reset}`),o0.clear(),t0(),await K()});process.on("SIGINT",()=>{H.close(),F.stop(),process.exit(0)})}return!0}function N6($){return String($??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var{serve:R4}=globalThis.Bun;import e from"fs";import m from"path";async function R6($){try{return G5(await Bun.file($).text())}catch{return}}function Q5($){let X=Bun.file($),Z=m.extname($).toLowerCase(),Q={".html":"text/html",".css":"text/css",".js":"text/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"},J=[".js",".css",".json"].includes(Z)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Q[Z]||"application/octet-stream",...J}})}async function D4($=".",X={}){let Z=X.port||3000,Q=X.watch!==!1,Y=X.hotReload!==!1&&Q,J=null,G=X.hmrPort||Z+1,W=m.resolve($),{loadStxConfig:K}=await import("./chunk-q86snkvs.js"),_=await K(W),{createServerApi:U,isServerApiSource:F}=await import("./chunk-jnahcd4d.js"),z=X.stxOptions?.serverApi??_.serverApi,j=await U(W,z),H=_.root&&_.root!=="."?m.join(W,_.root):W,L=X.pagesDir||_.pagesDir||"pages",O=m.join(H,L);if(!e.existsSync(O)&&!_._layerPageDirs?.some((R)=>e.existsSync(R)))return console.error(`${B.red}Error: No '${L}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${O}${B.reset}`),console.log(`${B.dim}Run stx dev from the app directory, pass it as an argument (stx dev <dir>),${B.reset}`),console.log(`${B.dim}point at another directory with --pages <dir>, or set pagesDir in stx.config.ts.${B.reset}`),console.log(`${B.dim}Starting fresh? Create ${L}/index.stx for the homepage.${B.reset}`),!1;let A=j$(H,{pagesDir:L,pagesDirs:_._layerPageDirs?[O,..._._layerPageDirs.slice(1)]:void 0});if(A.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${O}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${A.length}${B.blue} routes${B.reset}`);let V=_?._pluginPageDirs||[],E=[];for(let{dir:R,prefix:x}of V)if(e.existsSync(R)){let P=j$(m.dirname(R),{pagesDir:m.basename(R)});for(let y of P){let Z0=x==="/"?y.pattern:`${x}${y.pattern==="/"?"":y.pattern}`;E.push({route:{...y,pattern:Z0},prefix:x})}if(P.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${P.length}${B.blue} routes at ${B.cyan}${x}${B.reset}`)}let q=new Map,N=null,I=null;if(X.stxOptions?.shell!==!1){if(I=await d6(W,X.stxOptions?.shell),I){if(N=await J5(I,X.stxOptions||{}),N)console.log(`${B.blue}Using app shell: ${B.bright}${m.relative(W,I)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}T6(),await k6(W);let M=C6();if(M.length>0)console.log(`${B.blue}Loaded ${B.bright}${M.length}${B.blue} middleware: ${B.dim}${M.join(", ")}${B.reset}`);let w={},D=null;try{let{loadStxConfig:R}=await import("./chunk-q86snkvs.js"),x=await R(W);if(x?.apiRouter)D=x?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(x?.apiRoutes){w=x.apiRoutes;let P=Object.keys(w).length;if(P>0)console.log(`${B.blue}Loaded ${B.bright}${P} API route${P>1?"s":""}${B.reset}`)}if(x?.broadcasting?.enabled)try{let{startBroadcasting:P,loadChannels:y}=await import("./chunk-cdqx2c2h.js"),Z0=x.broadcasting;await P(Z0);let R0=Z0.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${R0}/ws${B.reset}`);let g0=m.join(process.cwd(),"channels.ts");if(e.existsSync(g0))try{let p=await y(g0);console.log(`${B.blue}Loaded ${B.bright}${p} broadcast channel${p!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(p){console.warn(`${B.yellow}Failed to load channels.ts: ${p.message}${B.reset}`)}}catch(P){console.warn(`${B.yellow}Broadcasting failed to start: ${P.message}${B.reset}`)}}catch{}let T=u0(W,"output");e.mkdirSync(T,{recursive:!0});let f=new Map,c=new Set,v=async(R)=>{let x=D6(O,R);if(!x)return null;try{let P=await Bun.build({entrypoints:[x],outdir:T,plugins:[_1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!P.success)return null;let y=P.outputs.find((Z0)=>Z0.path.endsWith(".html"));if(!y)return null;return await Bun.file(y.path).text()}catch{return null}},S=new Map,k=async(R,x)=>{try{let{processDirectives:P,extractVariables:y,defaultConfig:Z0,loadStxConfig:R0,injectRouterScript:g0}=await import("./chunk-q86snkvs.js"),{checkCache:p,cacheTemplate:u,readFileCached:g,templateCache:h}=await import("./chunk-yzxm75jp.js"),Y0=await R0(W),f0=(i)=>{if(!i)return i;if(m.isAbsolute(i))return i;return m.resolve(W,i)},C={...Z0,...Y0,...X.stxOptions,autoShell:!0};if(X.debugDirectives)C.debug=!0;C.partialsDir=f0(C.partialsDir),C.componentsDir=f0(C.componentsDir),C.layoutsDir=f0(C.layoutsDir),C.storesDir=f0(C.storesDir||"stores"),C.cachePath=f0(C.cachePath)??u0(W,"cache");let X0=!x&&!X.profile,a=C.cache!==!1;if(a&&X0){let i=h.get(R.filePath);if(i)try{if((await e.promises.stat(R.filePath)).mtime.getTime()<=i.mtime){let N0=!0;for(let _0 of i.dependencies){if(!e.existsSync(_0)){N0=!1;break}if((await e.promises.stat(_0)).mtime.getTime()>i.mtime){N0=!1;break}}if(N0){let _0=i.output;if(N)_0=O$(_0,{preserveHead:!0});let E1=S.get(R.filePath);return{route:R,content:_0,status:E1?.status??await R6(R.filePath),headers:E1?.headers}}}}catch{}let A0=await p(R.filePath,C);if(A0){let q0=A0;if(N)q0=O$(q0,{preserveHead:!0});let N0=S.get(R.filePath);return{route:R,content:q0,status:N0?.status??await R6(R.filePath),headers:N0?.headers}}}let o=a?await g(R.filePath):await Bun.file(R.filePath).text(),K0=G5(o),{classifyAllScripts:d}=await import("./chunk-q86snkvs.js"),O0=d(o),D0=O0.server.map((i)=>i.content),s=o;for(let i of O0.server)s=s.replace(i.fullTag,"");let n={__filename:R.filePath,__dirname:m.dirname(R.filePath),__stx_options:C,params:x??{},__stx_runtime_head:{}};for(let i of D0)try{await y(i,n,R.filePath)}catch(A0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",R.filePath,A0?.message||A0)}let S0=new Set,j0;if(X.profile){let i=performance.now();j0=await P(s,n,R.filePath,C,S0);let A0=performance.now()-i,q0=m.relative(W,R.filePath)||R.filePath;console.log(`[stx:profile] ${q0} \u2192 ${A0.toFixed(2)}ms`)}else j0=await P(s,n,R.filePath,C,S0);if(!N)j0=await g0(j0,{router:C.router});{let{interpolateScriptExpressions:i}=await import("./chunk-q2hvne0v.js");j0=j0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(A0,q0,N0)=>{if(!/function\s+__stx_setup_/.test(N0))return A0;return`<script${q0}>${i(N0,n)}</script>`})}if(N)j0=O$(j0,{preserveHead:!0});if(a&&X0)await u(R.filePath,j0,S0,C);let{extractStreamBoundaries:Q3}=await import("./chunk-7ywnkv1f.js"),Q1=Q3(n),V1=n.__streamTemplates;if(V1&&typeof V1==="object"&&Object.keys(V1).length>0){let i=n.streamBoundaries||{},A0={...C,autoShell:!1},q0=Object.keys(V1).map((_0)=>({id:_0,render:async()=>{let E1=typeof i[_0]==="function"?await i[_0]():void 0;return P(V1[_0],{...n,$boundary:E1},R.filePath,A0,new Set)}})),N0=new Set(q0.map((_0)=>_0.id));Q1=[...(Q1||[]).filter((_0)=>!N0.has(_0.id)),...q0]}if(Q1&&Q1.length>0)c.add(R.pattern);else Q1=void 0;let l5=T1(n),i5=C1(n);if(X0)S.set(R.filePath,{status:l5,headers:i5});return{route:R,content:j0,status:l5??K0,headers:i5,boundaries:Q1}}catch(P){return console.error(`${B.red}Error building ${B.bright}${R.pattern}${B.reset}:`,P),null}},H0=8,G0=async()=>{f.clear(),q.clear();for(let R=0;R<A.length;R+=H0){let x=A.slice(R,R+H0),P=await Promise.all(x.map((y)=>k(y)));for(let y of P)if(y)f.set(y.route.pattern,y)}for(let R=0;R<E.length;R+=H0){let x=E.slice(R,R+H0),P=await Promise.all(x.map(({route:y})=>k(y)));for(let y of P)if(y)q.set(y.route.pattern,y)}return f.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await G0())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await B$(W);let v0=Z;try{if(v0=await h0(Z),v0!==Z)console.log(`${B.yellow}Port ${Z} is busy, using port ${v0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let R=X.hmrPort||v0+1;J=J$({wsPort:R,verbose:!1}),G=J.start(R)}let z0=(R,x)=>{let y=`<script data-stx-route-params>(function(){var p=${JSON.stringify(x).replace(/</g,"\\u003C").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")};window.__stx_rp=p;if(window.stx){window.stx._rp=p;if(window.stx.setRouteParams)window.stx.setRouteParams(p)}})()</script>`;if(R.includes("</head>"))return R.replace("</head>",`${y}</head>`);if(R.includes("<body"))return R.replace(/<body([^>]*)>/,`<body$1>${y}`);return y+R};console.log(`${B.blue}Starting server...${B.reset}`);let Z1=R4({port:v0,async fetch(R){let x=new URL(R.url),P=_?.publicDir||"public",y=m.join(W,P,x.pathname),Z0=m.join(W,x.pathname),R0=m.join(T,x.pathname);if([y,Z0,R0].some((C)=>F(C,W,z)))return new Response("Not Found",{status:404});let[g0,p,u]=await Promise.all([e.promises.stat(y).catch(()=>null),e.promises.stat(Z0).catch(()=>null),e.promises.stat(R0).catch(()=>null)]);if(g0?.isFile()&&!F(y,W,z))return Q5(y);if(p?.isFile()&&!F(Z0,W,z))return Q5(Z0);if(u?.isFile()&&!F(R0,W,z))return Q5(R0);if(x.pathname.startsWith("/_stx/component/")){let C=decodeURIComponent(x.pathname.slice(16));if(C)try{let X0=`<${C} />`,a={...buildConfig,autoShell:!1},o=await processDirectives(X0,{},m.join(W,"components",`${C}.stx`),a,new Set);return new Response(o,{headers:{"Content-Type":"text/html"}})}catch(X0){return new Response(`<div class="stx-async-error">${X0.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(x.pathname==="/_stx/img"){let{handleImageRequest:C}=await import("./chunk-gbz6pfs8.js"),X0=await C(R,{publicDir:m.join(W,P),cacheDir:u0(W,"cache","img")});if(X0)return X0}if(D)try{let C=await D.handleRequest(R);if(C.status!==404)return C}catch{}if(w[x.pathname])try{return await w[x.pathname](R)}catch(C){return new Response(JSON.stringify({error:C.message}),{status:500,headers:{"Content-Type":"application/json"}})}let g=await j(R);if(g)return g;let h=Y5(x.pathname,A);if(h){let C=f.get(h.route.pattern),X0=c.has(h.route.pattern);if(h.route.isDynamic&&Object.keys(h.params).length>0||X0){let a=await k(h.route,h.params);if(a)C=a}if(C){let a=C.status??200,o=C.headers??{},K0=(h.route.filePath?y6(await Bun.file(h.route.filePath).text().catch(()=>"")):null)??{};if(K0.validate){if(!await K0.validate({params:h.params})){let D0=await v(404);if(D0){let s=D0;if(s=await J0(s,W),Y)s=P0(s,G);return new Response(s,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(K0.middleware){let O0=x6(x.pathname,h.params,K0,x.search),D0=S6(O0,null,R,{isServer:!0}),s=await P6(K0.middleware,D0);if(s.redirect){let n=s.redirect.path,S0=s.redirect.options.redirectCode||302,j0=new Headers(s.responseHeaders);return j0.set("Location",n),new Response(null,{status:S0,headers:j0})}if(s.abort){let{statusCode:n,message:S0}=s.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${n}</title></head><body><h1>Error ${n}</h1><p>${S0}</p></body></html>`,{status:n,headers:{"Content-Type":"text/html"}})}if(Object.keys(s.state).length>0){let n=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(s.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;C.content=C.content.replace("</head>",`${n}</head>`)}}let d=C.content;if(N&&u6(R)){let O0=b6(d),D0=v6(d),s=d.match(/<title[^>]*>([\s\S]*?)<\/title>/i),n=s?h6(s[1].trim()):"";if(Object.keys(h.params).length>0)d=z0(d,h.params);d=await J0(d,W);let S0=_?.router?.container||"main";return d=m6(d,S0),new Response(d,{status:a,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":O0.layout,"X-STX-Layout-Group":O0.group,"X-STX-Runtime":D0?"true":"false",...n&&{"X-STX-Title":encodeURIComponent(n)},[g6]:f6(),...B1(),"Cache-Control":z$}})}if(N)d=H$(N,d);if(Object.keys(h.params).length>0)d=z0(d,h.params);if(d=await J0(d,W),Y)d=P0(d,G);if(X.native)if(d.includes("<head>"))d=d.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else d="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+d;if(X.titlebarHidden)if(d.includes("<head>"))d=d.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else d=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${d}`;if(C.boundaries&&C.boundaries.length>0){let{renderStreamingPage:O0,streamToResponse:D0}=await import("./chunk-7ywnkv1f.js");return D0(O0(d,C.boundaries,{timeoutMs:30000}),{status:a,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(d,{status:a,headers:{"Content-Type":"text/html",...B1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...o}})}}if(E.length>0){let C=E.map((a)=>a.route),X0=Y5(x.pathname,C);if(X0){let a=q.get(X0.route.pattern);if(a){let o=a.content;if(N)o=H$(N,o);if(Object.keys(X0.params).length>0)o=z0(o,X0.params);if(o=await J0(o,W),Y)o=P0(o,G);return new Response(o,{status:a.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:a}of V)if(a!=="/"&&x.pathname.startsWith(a)){let o=q.get(a)||q.get(a+"/");if(o){let K0=o.content;if(N)K0=H$(N,K0);if(K0=await J0(K0,W),Y)K0=P0(K0,G);return new Response(K0,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let Y0=f.get("/");if(Y0){let C=Y0.content;if(C=await J0(C,W),Y)C=P0(C,G);if(X.native)if(C.includes("<head>"))C=C.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else C="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+C;return new Response(C,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let f0=await v(404);if(f0){let C=f0;if(C=await J0(C,W),Y)C=P0(C,G);return new Response(C,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(R){let x=await v(500);if(x)return new Response(x,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${R}
1611
1611
  ${R.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});if(console.clear(),console.log(`
1612
1612
  ${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
1613
1613
  ${B.bright}\u2192 ${B.cyan}http://localhost:${v0}/${B.reset}`),Y)console.log(`${B.dim} HMR: ws://localhost:${G}${B.reset}`);console.log(`
@@ -4313,7 +4313,7 @@ else {
4313
4313
  `),css:R$()}}function wQ(){let{script:$,css:X}=D7(),Z=$.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/\s+/g," ").replace(/\s*([{};,:])\s*/g,"$1").trim(),Q=X.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{};,:])\s*/g,"$1").trim();return{script:Z,css:Q}}var g_={enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3]},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}};import w$ from"fs";import X1 from"path";async function w7($,X={},Z={}){let Q=await Bun.file($).text(),Y=Q.match(/<script\s+server\s*>([\s\S]*?)<\/script>/i),J=Y?Y[1]:"",G=Y?Q.replace(/<script\s+server\s*>[\s\S]*?<\/script>/i,""):Q;G=G.replace(/<script\s+client\s*>/gi,"<script>");let W={__filename:$,__dirname:X1.dirname($),props:X,...X};if(J)await M0(J,W,$);let K={...T$,...Z};return await V0(G,W,$,K,new Set)}async function TQ($){let X=performance.now(),Z={success:!0,views:[],errors:[],duration:0},{viewsDir:Q,outputDir:Y,componentsDir:J=X1.join(Q,"components"),layoutsDir:G=X1.join(Q,"layouts"),partialsDir:W=X1.join(Q,"partials"),globalProps:K={},placeholders:_={},views:U,debug:F=!1,generateManifest:z=!0}=$;if(F)console.log("Building STX views..."),console.log(` Source: ${Q}`),console.log(` Output: ${Y}`);w$.mkdirSync(Y,{recursive:!0});let j={componentsDir:J,layoutsDir:G,partialsDir:W,debug:F},H;if(U&&U.length>0)H=U;else H=w$.readdirSync(Q).filter((O)=>O.endsWith(".stx")).map((O)=>({input:O}));for(let L of H){let O=X1.join(Q,L.input),A=L.output||L.input.replace(/\.stx$/,".html"),V=X1.join(Y,A);if(F)console.log(` Building ${L.input}...`);try{let E={...K,...L.props,..._},q=await w7(O,E,j);await Bun.write(V,q),Z.views.push(A)}catch(E){let q=E instanceof Error?E.message:String(E);if(Z.errors.push({file:L.input,error:q}),Z.success=!1,F)console.error(` Error: ${q}`)}}if(z){let L={buildTime:new Date().toISOString(),views:Z.views,placeholders:_,errors:Z.errors.length>0?Z.errors:void 0};await Bun.write(X1.join(Y,"manifest.json"),JSON.stringify(L,null,2))}if(Z.duration=performance.now()-X,F)if(Z.success)console.log(`
4314
4314
  \u2705 Built ${Z.views.length} views in ${Z.duration.toFixed(0)}ms`);else console.log(`
4315
4315
  \u26A0\uFE0F Built ${Z.views.length} views with ${Z.errors.length} errors`);return Z}function e_($,X){let Z=w$.watch($.viewsDir,{recursive:!0},async(Q,Y)=>{if(!Y)return;if(Y.endsWith(".stx")||Y.endsWith(".ts")||Y.endsWith(".js")){if($.debug)console.log(`
4316
- File changed: ${Y}, rebuilding...`);let J=await TQ($);X?.(J)}});return{close:()=>Z.close()}}async function $9($,X={},Z={}){let Q={...Z,skipDefaultSeoTags:!0,skipSignalsRuntime:!0},Y=await w7($,X,Q);Y=await CQ(Y),Y=Y.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),Y=Y.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,""),Y=Y.replace(/<!--\s*stx SEO Tags\s*-->/gi,""),Y=Y.replace(/\n\s*\n\s*\n/g,`
4316
+ File changed: ${Y}, rebuilding...`);let J=await TQ($);X?.(J)}});return{close:()=>Z.close()}}async function $9($,X={},Z={}){let Q={...Z,skipDefaultSeoTags:!0,skipSignalsRuntime:!0},Y=await w7($,X,Q);Y=await CQ(Y),Y=Y.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),Y=Y.replace(/<style\b([^>]*)>[\s\S]*?<\/style>/gi,(G,W)=>/\bdata-(?:css=["']generated["']|stx-)/i.test(W)?"":G),Y=Y.replace(/<!--\s*stx SEO Tags\s*-->/gi,""),Y=Y.replace(/\n\s*\n\s*\n/g,`
4317
4317
 
4318
4318
  `).trim();let J=xQ(Y);return{html:Y,text:J}}async function CQ($){try{let{generateCss:X,extractClassNames:Z}=await import("./chunk-k6ky5et7.js");if(Z($).size===0)return $;let Y=await X($);if(!Y)return $;let J=kQ(Y);if(J.size===0)return $;return $.replace(/(<[a-z][a-z0-9]*)((?:\s+[a-z][a-z0-9-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s+)class\s*=\s*"([^"]*)"((?:\s+[a-z][a-z0-9-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)(\/?>)/gi,(G,W,K,_,U,F)=>{let z=_.split(/\s+/).filter(Boolean),j=[];for(let A of z){let V=J.get(A);if(V)j.push(V)}if(j.length===0)return`${W}${K}class="${_}"${U}${F}`;let H=j.join("; "),O=`${K}${U}`.match(/style\s*=\s*"([^"]*)"/);if(O){let A=`${H}; ${O[1]}`,V=K.replace(/style\s*=\s*"[^"]*"/,`style="${A}"`),E=U.replace(/style\s*=\s*"[^"]*"/,`style="${A}"`);return`${W}${V}class="${_}"${E}${F}`}return`${W}${K}class="${_}" style="${H}"${U}${F}`})}catch{return $}}function kQ($){let X=new Map,Z=/\.([a-zA-Z0-9_-]+(?:\\:[a-zA-Z0-9_-]+)*)\s*\{([^}]+)\}/g,Q=Z.exec($);while(Q!==null){let Y=Q[1].replace(/\\/g,""),J=Q[2].split(";").map((G)=>G.trim()).filter(Boolean).join("; ");if(J)X.set(Y,J);Q=Z.exec($)}return X}function xQ($){return $.replace(/<br\s*\/?>/gi,`
4319
4319
  `).replace(/<\/(p|div|h[1-6]|li|tr)>/gi,`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ye as a}from"./chunk-q4p1h741.js";import"./chunk-cmtjq1db.js";import"./chunk-dvvx1wny.js";import"./chunk-p1hy2bwn.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as startProductionServer};
2
+ import{Ye as a}from"./chunk-zbtd1ceq.js";import"./chunk-y085rdre.js";import"./chunk-dvvx1wny.js";import"./chunk-p1hy2bwn.js";import"./chunk-kxtqbrfr.js";import"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{a as startProductionServer};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Hg as I}from"./chunk-dvvx1wny.js";import{Dr as H}from"./chunk-kxtqbrfr.js";import{sw as G}from"./chunk-hyfjnn7g.js";import L from"path";async function Q(k={}){let J=performance.now(),A=k.root||process.cwd(),j=await H(A),B=k.ssr?.routeRules??j.routeRules??{};if(I(B),!j.ssr&&Object.keys(B).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!j.ssr&&(k.ssr?.serverApi??j.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let D,E;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");D=await z({pagesDir:L.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-v0v1pxwh.js");E=await z({root:A,outputDir:".output",debug:k.debug,...k.ssr})}let K=Math.round(performance.now()-J);return{mode:q,ssg:D,ssr:E,duration:K}}
2
+ import{Hg as I}from"./chunk-dvvx1wny.js";import{Dr as H}from"./chunk-kxtqbrfr.js";import{sw as G}from"./chunk-hyfjnn7g.js";import L from"path";async function Q(k={}){let J=performance.now(),A=k.root||process.cwd(),j=await H(A),B=k.ssr?.routeRules??j.routeRules??{};if(I(B),!j.ssr&&Object.keys(B).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!j.ssr&&(k.ssr?.serverApi??j.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let D,E;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");D=await z({pagesDir:L.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-207j85rm.js");E=await z({root:A,outputDir:".output",debug:k.debug,...k.ssr})}let K=Math.round(performance.now()-J);return{mode:q,ssg:D,ssr:E,duration:K}}
3
3
  export{Q as Ue};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$ as Xl,$a as $n,$b as kp,$c as kq,$d as kr,A as Hk,Aa as ln,Ab as Fo,Ac as Lp,Ad as Lq,Ae as Rr,B as Ik,Ba as mn,Bb as Go,Bc as Mp,Bd as Mq,Be as Sr,C as Jk,Ca as zn,Cb as Ho,Cc as Np,Cd as Nq,Ce as Tr,D as Kk,Da as An,Db as Io,Dc as Op,Dd as Oq,De as Ur,E as Al,Ea as Bn,Eb as Jo,Ec as Pp,Ed as Pq,Ee as Vr,F as Bl,Fa as Cn,Fb as Ko,Fc as Qp,Fd as Qq,Fe as Wr,G as Cl,Ga as Dn,Gb as Lo,Gc as Rp,Gd as Rq,Ge as Xr,H as Dl,Ha as En,Hb as Mo,Hc as Sp,Hd as Sq,He as Yr,I as El,Ia as In,Ib as No,Ic as Tp,Id as Tq,Ie as Zr,J as Fl,Ja as Jn,Jb as Oo,Jc as Up,Jd as Uq,Je as _r,K as Gl,Ka as Kn,Kb as Po,Kc as Vp,Kd as Vq,Ke as $r,L as Hl,La as Ln,Lb as Qo,Lc as Wp,Ld as Wq,M as Il,Ma as Mn,Mb as Ro,Mc as Xp,Md as Xq,N as Jl,Na as Nn,Nb as Yo,Nc as Yp,Nd as Yq,O as Kl,Oa as On,Ob as Zo,Oc as Zp,Od as Zq,P as Ll,Pa as Pn,Pb as _o,Pc as _p,Pd as _q,Q as Ml,Qa as Qn,Qb as $o,Qc as $p,Qd as $q,R as Nl,Ra as Rn,Rb as ap,Rc as aq,Rd as ar,S as Ol,Sa as Sn,Sb as bp,Sc as bq,Sd as br,T as Pl,Ta as Tn,Tb as cp,Tc as cq,Td as cr,U as Ql,Ua as Un,Ub as dp,Uc as dq,Ud as dr,V as Rl,Va as Vn,Vb as ep,Vc as eq,Vd as er,W as Sl,Wa as Wn,Wb as fp,Wc as fq,Wd as fr,X as Tl,Xa as Xn,Xb as gp,Xc as gq,Xd as gr,Y as Ul,Ya as Yn,Yb as hp,Yc as hq,Yd as hr,Z as Vl,Za as Zn,Zb as ip,Zc as iq,Zd as ir,_ as Wl,_a as _n,_b as jp,_c as jq,_d as jr,aa as Yl,ab as ao,ac as lp,ad as lq,ae as lr,ba as Zl,bb as bo,bc as mp,bd as mq,be as sr,ca as _l,cb as co,cc as np,cd as nq,ce as tr,da as $l,db as eo,dc as op,dd as oq,de as ur,ea as am,eb as fo,ec as pp,ed as pq,ee as vr,fa as bm,fb as go,fc as qp,fd as qq,fe as wr,ga as cm,gb as ho,gc as rp,gd as rq,ge as xr,ha as dm,hb as io,hc as sp,hd as sq,he as yr,ia as em,ib as jo,ic as tp,id as tq,ie as zr,ja as fm,jb as ko,jc as up,jd as uq,je as Ar,ka as gm,kb as lo,kc as vp,kd as vq,ke as Br,la as hm,lb as mo,lc as wp,ld as wq,le as Cr,ma as im,mb as no,mc as xp,md as xq,me as Dr,na as jm,nb as qo,nc as yp,nd as yq,ne as Er,o as a,oa as km,ob as ro,oc as zp,od as zq,oe as Fr,p as sk,pa as $m,pb as so,pc as Ap,pd as Aq,pe as Gr,q as tk,qa as an,qb as to,qc as Bp,qd as Bq,qe as Hr,r as uk,ra as bn,rb as vo,rc as Cp,rd as Cq,re as Ir,s as vk,sa as cn,sb as wo,sc as Dp,sd as Dq,se as Jr,t as wk,ta as dn,tb as xo,tc as Ep,td as Eq,te as Kr,u as xk,ua as en,ub as yo,uc as Fp,ud as Fq,ue as Lr,v as yk,va as fn,vb as Ao,vc as Gp,vd as Gq,ve as Mr,w as zk,wa as gn,wb as Bo,wc as Hp,wd as Hq,we as Nr,x as Ak,xa as hn,xb as Co,xc as Ip,xd as Iq,xe as Or,y as Fk,ya as jn,yb as Do,yc as Jp,yd as Jq,ye as Pr,z as Gk,za as kn,zb as Eo,zc as Kp,zd as Kq,ze as Qr}from"./chunk-2ye35vms.js";import{Le as So,Me as To,Ne as Uo,Oe as Vo,Pe as Wo,Qe as Xo}from"./chunk-m8kezfrt.js";import{Re as oo,Se as po}from"./chunk-2ver2s2y.js";import{Te as uo}from"./chunk-6k8h1fj1.js";import{Ue as _m}from"./chunk-ef0ra05n.js";import{Ve as Fn,We as Gn,Xe as Hn,Ye as zo}from"./chunk-q4p1h741.js";import{$e as Nk,Ze as Lk,_e as Mk,af as Ok,bf as Pk,cf as Qk,df as Rk,ef as Sk,ff as Tk,gf as Uk,hf as Vk,if as Wk,jf as Xk,kf as Yk,lf as Zk}from"./chunk-ym3r8ktq.js";import{mf as ol,nf as pl,of as ql,pf as rl,qf as sl,rf as tl,sf as ul,tf as vl,uf as wl,vf as xl,wf as yl,xf as zl}from"./chunk-crj19mqr.js";import{yf as ml,zf as nl}from"./chunk-x7yc7e9v.js";import{Af as _k,Bf as $k,Cf as al,Df as bl,Ef as cl,Ff as dl,Gf as el,If as fl,Jf as gl,Kf as hl,Lf as il,Mf as jl,Nf as kl,Qf as ll}from"./chunk-j2dj21ay.js";import{Rf as Hm,Sf as Im,Tf as Jm,Uf as Km,Vf as Nm,Wf as Zm}from"./chunk-kk7p8ekz.js";import{Xf as Lm,_f as Mm}from"./chunk-gdbkqatx.js";import{Ag as Sm,Bg as Tm,Cg as Um,Dg as Vm,Eg as Wm,Fg as Xm,Gg as Ym,gg as lm,hg as mm,ig as nm,jg as om,kg as pm,lg as qm,mg as rm,ng as sm,og as tm,pg as um,qg as vm,rg as wm,sg as xm,tg as ym,ug as zm,vg as Am,wg as Om,xg as Pm,yg as Qm,zg as Rm}from"./chunk-cmtjq1db.js";import{Hg as Bm,Ig as Cm}from"./chunk-dvvx1wny.js";import{Jg as nn,Kg as on,Lg as pn,Mg as qn,Ng as rn,Og as sn,Pg as tn,Qg as un,Rg as vn,Sg as wn,Tg as xn,Ug as yn}from"./chunk-xz3evxqp.js";import{Vg as ci,Wg as di,Xg as ei,Yg as fi,Zg as gi,_g as hi}from"./chunk-farwrdr2.js";import{$g as wj,ah as xj,bh as yj,fh as zj,gh as Aj,hh as Bj}from"./chunk-wx5zf66r.js";import{ih as Hj,jh as Ij,kh as Jj,lh as Kj,mh as Lj,nh as Mj,oh as Nj,ph as Oj,qh as Pj,rh as Qj,sh as Rj}from"./chunk-yk6446kr.js";import{Ah as sj,Bh as tj,Ch as uj,Dh as vj,th as mj,uh as nj,vh as oj,wh as pj,xh as qj,zh as rj}from"./chunk-vd5xvsnv.js";import{Eh as hk,Gh as ik}from"./chunk-64djh88a.js";import{Mh as Fh,Nh as Gh,Oh as Hh,Ph as Ih,Qh as Jh,Rh as Kh,Sh as Lh,Th as Mh,Uh as Nh,Vh as Oh,Wh as Ph,Xh as Qh,Yh as Rh,Zh as Sh}from"./chunk-9368t9jm.js";import{$h as Th,ai as Uh,bi as Vh,ci as Wh}from"./chunk-5tefa8qb.js";import{hi as Xh}from"./chunk-mwh3ymwc.js";import{ii as $g}from"./chunk-fqq5k9ve.js";import{ji as ah,ki as bh}from"./chunk-ya5m5vbn.js";import{li as ch,mi as dh,ni as eh,oi as fh,pi as gh,qi as hh}from"./chunk-y4nzmkea.js";import{ri as ih,si as jh,ti as kh,ui as lh,vi as mh}from"./chunk-7kw3grq5.js";import{Ai as rh,wi as nh,xi as oh,yi as ph,zi as qh}from"./chunk-c79nfdyj.js";import{Bi as sh,Ci as th,Di as uh,Ei as vh,Fi as wh,Gi as xh,Hi as yh}from"./chunk-ej8mv2k6.js";import{Ii as zh,Ji as Ah,Ki as Bh,Li as Ch,Mi as Dh,Ni as Eh}from"./chunk-cr8v8k53.js";import{Pi as Yg,Qi as Zg}from"./chunk-q05eh1n4.js";import{Ti as _g}from"./chunk-4k0ce745.js";import"./chunk-xwxdwqn9.js";import{$i as Ie,Xi as Ee,Yi as Fe,Zi as Ge,_i as He,aj as Je,bj as Ke,cj as Le,dj as Me,ej as Ne,fj as Oe,gj as Pe,hj as Qe,ij as Re}from"./chunk-ymrxpwr8.js";import{jj as gf,kj as hf,lj as jf,mj as kf,nj as lf,oj as mf,pj as nf,qj as of,rj as pf,sj as qf,tj as rf,uj as sf,vj as tf,wj as uf,xj as vf,yj as wf,zj as xf}from"./chunk-71y3bhcw.js";import{Gj as Ue,Hj as Ve,Ij as We,Jj as Xe,Kj as Ye,Lj as Ze,Mj as _e,Nj as $e,Oj as af,Pj as bf,Qj as cf,Rj as df,Sj as ef,Tj as ff}from"./chunk-t41aaehf.js";import{$j as Ff,Uj as yf,Vj as zf,Wj as Af,Xj as Bf,Yj as Cf,Zj as Df,_j as Ef,ak as Gf,bk as Hf,ck as If,dk as Jf,ek as Kf}from"./chunk-fkdnfjc2.js";import{Ak as or,Bk as pr,Ck as qr,Dk as rr,yk as mr,zk as nr}from"./chunk-08w4gtyf.js";import{Ek as Bk,Fk as Ck,Gk as Dk,Hk as Ek,Ik as Dm,Jk as Em,Kk as Fm,Lk as Gm}from"./chunk-e1sxe3q4.js";import"./chunk-4jdj52c5.js";import"./chunk-zz8qgqa1.js";import{Bl as _b,wl as Yb,xl as Zb}from"./chunk-p1hy2bwn.js";import{$m as Zc,$n as ne,$o as Tf,$p as Tg,$q as gj,Am as qc,An as yd,Ap as sg,Aq as yi,Ar as gk,Bm as rc,Bn as zd,Bp as tg,Bq as Ii,Br as jk,Cm as sc,Cn as Ad,Cp as ug,Cq as Ji,Cr as kk,Dl as xa,Dm as tc,Dn as Bd,Dp as vg,Dq as Ki,Dr as lk,El as ya,Em as uc,En as Cd,Ep as wg,Eq as Li,Er as mk,Fl as za,Fm as vc,Fn as Dd,Fp as xg,Fq as Mi,Fr as nk,Gl as Aa,Gm as wc,Gn as Ed,Gp as yg,Gq as Ni,Gr as ok,Hl as Ba,Hm as xc,Hn as Fd,Hp as zg,Hq as Oi,Hr as pk,Il as Ca,Im as yc,In as Gd,Ip as Ag,Iq as Pi,Ir as qk,Jl as Da,Jm as zc,Jn as Hd,Jp as Bg,Jq as Qi,Jr as rk,Kl as Ea,Km as Ac,Kn as Id,Kp as Cg,Kq as Ri,Ll as Fa,Lm as Bc,Ln as Jd,Lp as Dg,Lq as Si,Ml as Ga,Mm as Cc,Mn as Kd,Mp as Eg,Mq as Ti,Nl as Ha,Nm as Dc,Nn as Ld,No as Mf,Np as Fg,Nq as Ui,Ol as Ia,Om as Ec,On as Md,Op as Gg,Oq as Vi,Pl as Ja,Pm as Fc,Pn as Nd,Pp as Hg,Pq as Wi,Ql as Ka,Qm as Pc,Qn as Od,Qp as Ig,Qq as Xi,Rl as La,Rm as Qc,Rn as Pd,Rp as Jg,Rq as Yi,Sl as Ma,Sm as Rc,Sn as Qd,Sp as Kg,Sq as Zi,Tl as Na,Tm as Sc,Tn as Rd,To as Nf,Tp as Lg,Tq as _i,Ul as Oa,Um as Tc,Un as ge,Up as Mg,Uq as $i,Vl as ib,Vm as Uc,Vn as he,Vo as Of,Vp as Ng,Vq as aj,Wl as jb,Wm as Vc,Wn as ie,Wp as Og,Wq as bj,Xl as kb,Xn as je,Xo as Pf,Xp as Pg,Xq as cj,Yl as lb,Ym as Wc,Yn as ke,Yo as Qf,Yp as Qg,Yq as dj,Zl as mb,Zm as Xc,Zn as le,Zo as Rf,Zp as Rg,Zq as ej,_l as nb,_m as Yc,_n as me,_o as Sf,_p as Sg,_q as fj,an as _c,ao as oe,ap as Uf,aq as Ug,ar as hj,bm as Fb,bn as $c,bo as pe,bp as Vf,bq as Vg,br as ij,cm as Gb,cn as ad,co as qe,cp as Wf,cq as Wg,cr as jj,dm as Hb,dn as bd,do as re,dp as Xf,dq as Xg,dr as kj,em as Ib,en as cd,eo as se,ep as Yf,eq as Yh,er as lj,fm as Jb,fn as dd,fo as te,fp as Zf,fq as Zh,fr as Cj,gm as Nb,gn as ed,gp as _f,gq as _h,gr as Dj,hm as Ob,hn as fd,hp as $f,hq as $h,hr as Ej,im as Pb,in as gd,ip as ag,iq as ai,ir as Fj,jm as $b,jn as hd,jp as bg,jq as bi,jr as Gj,km as ac,kn as id,kp as cg,kq as ii,kr as Sj,lm as bc,ln as jd,lo as xe,lp as dg,lq as ji,lr as Tj,mm as cc,mn as kd,mo as ye,mp as eg,mq as ki,mr as Uj,nm as dc,nn as ld,no as ze,np as fg,nq as li,nr as Vj,om as ec,on as md,oo as Ae,op as gg,oq as mi,or as Wj,pm as fc,pn as nd,po as Be,pp as hg,pq as ni,pr as Xj,qm as gc,qn as od,qo as Ce,qp as ig,qq as oi,qr as Yj,rm as hc,rn as pd,ro as De,rp as jg,rq as pi,rr as Zj,sm as ic,sn as qd,sp as kg,sq as qi,sr as _j,tm as jc,tn as rd,tp as lg,tq as ri,tr as $j,um as kc,un as sd,up as mg,uq as si,ur as ak,vm as lc,vn as td,vo as Se,vp as ng,vq as ti,vr as bk,wm as mc,wn as ud,wo as Te,wp as og,wq as ui,wr as ck,xm as nc,xn as vd,xp as pg,xq as vi,xr as dk,ym as oc,yn as wd,yo as Lf,yp as qg,yq as wi,yr as ek,zm as pc,zn as xd,zp as rg,zq as xi,zr as fk}from"./chunk-kxtqbrfr.js";import{$r as s,$s as la,Cs as M,Ds as N,Es as O,Fs as P,Gs as Q,Hs as R,Is as S,Js as T,Kr as b,Ks as U,Lr as c,Ls as V,Mr as d,Ms as W,Nr as e,Ns as X,Or as f,Os as Y,Pr as g,Ps as Z,Qr as h,Qs as _,Rr as i,Rs as $,Sr as j,Ss as aa,Tr as k,Ts as ba,Ur as l,Us as ca,Vr as m,Vs as da,Wr as n,Ws as ea,Xr as o,Xs as fa,Yr as p,Ys as ia,Zr as q,Zs as ja,_r as r,_s as ka,as as t,at as ma,bs as u,bt as na,cs as v,ct as oa,ds as w,dt as pa,es as x,et as qa,fs as y,ft as ra,gs as z,gt as sa,hs as A,ht as ta,is as B,it as ua,js as C,jt as va,ks as D,kt as wa,ls as E,ms as F,ns as G,os as H,ps as I,qs as J,rs as K,ss as L}from"./chunk-caaenc3w.js";import{lt as ga,mt as ha}from"./chunk-amxtypkp.js";import{nt as Kb,ot as Lb,pt as Mb}from"./chunk-nat3actx.js";import{qt as zi,rt as Ai,st as Bi,tt as Ci,ut as Di,vt as Ei,wt as Fi,xt as Gi,yt as Hi}from"./chunk-q0g5c39d.js";import{Qt as Gc,Rt as Hc,St as Ic,Tt as Jc,Ut as Kc,Wt as Lc,du as Mc,eu as Nc,fu as Oc}from"./chunk-kffndzch.js";import{mu as ue,ou as ve,ru as we}from"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import{Au as Sb,Bu as Tb,Cu as Ub,Du as Vb,yu as Qb,zu as Rb}from"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import{Iu as Wb,Ju as Xb}from"./chunk-vvd659y4.js";import{$u as ee,Nu as Sd,Ou as Td,Pu as Ud,Qu as Vd,Ru as Wd,Su as Xd,Tu as Yd,Uu as Zd,Vu as _d,Wu as $d,Xu as ae,Yu as be,Zu as ce,_u as de,av as fe}from"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import{gv as ob,hv as pb,iv as qb,jv as rb,kv as sb,lv as tb,mv as ub,nv as vb,ov as wb,pv as xb,qv as yb,rv as zb,sv as Ab,tv as Bb,uv as Cb,vv as Db,wv as Eb}from"./chunk-deqnt1w5.js";import{$v as db,Av as Pa,Bv as Qa,Ev as Ra,Jv as Sa,Kv as Ta,Qv as Ua,Rv as Va,Sv as Wa,Tv as Xa,Uv as Ya,Vv as Za,Wv as _a,Xv as $a,Yv as ab,Zv as bb,_v as cb,aw as eb,bw as fb,cw as gb,ew as hb}from"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{Vk as writeNetlifyConfig,Pm as writeManifest,yl as writeImageManifest,fp as wrapComponentForHMR,Or as withDefaults,gk as webComponentDirectiveHandler,Wp as watermark,Yq as watchViews,Il as watchMultiple,Jl as watchEffect,Hl as watch,Be as warmImagePlaceholders,Wl as waitForStore,X as waitForLocale,To as virtualPathFor,Vj as videoDirective,G as validators,Sr as validated,re as validateValueEnhanced,Zh as validateTemplate,Bm as validateRouteRules,$p as validateParams,se as validateFormEnhanced,Nq as validateFile,ne as validateFields,me as validateField,$h as validateDirective,Md as validateCspDirectives,ok as validateConfig,an as validateComponentScripts,zn as validateComponentProps,Xg as validateClientScript,Wh as v,xc as usesSignalsInScript,ub as usesReactiveRuntime,mi as userComponentFileExists,Ch as useVirtualList,_d as useTitle,Vl as useStoreOrThrow,xp as useStore,Fk as useStorage,pf as useSlots,Hk as useSessionStorage,Wb as useServerRuntimeConfig,Mf as useServerData,Xd as useSeoMeta,Xb as useRuntimeConfig,Xl as useRouteParams,Zl as useRouteParamOrThrow,Yl as useRouteParam,_d as usePageTitle,ff as useOptimistic,uf as useModel,$l as useMiddlewareValue,_l as useMiddlewareState,Gk as useLocalStorage,_o as useLoadingIndicator,Vd as useHead,Th as useForm,rf as useAttrs,Pq as uploadFiles,Oq as uploadFile,Sl as updateInstance,df as untrack,Ci as unregisterDirective,Tl as unmountInstance,Fc as unescapeHtml,Wo as typecheckStxFiles,li as transpileTypeScript,Br as translate,Ba as transitionDirective,dc as transformAutoImports,tn as toUsers,sn as toUser,Fp as thumbnail,Gq as thumbHashToRGBA,Hq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,yf as templateCache,cd as syncRecordedResponse,cp as stxClientHelpers,hg as structuredDataDirective,Er as stripLocalePrefix,ym as stripDocumentWrapper,Lb as stripCommentsAndLiterals,eo as stringToStream,Ad as strictCspPreset,Me as streamingSuspenseDirective,Qe as streamToResponse,Ke as streamTemplateSimple,Ee as streamTemplate,Ak as stopHmrServer,pn as stopBroadcasting,Tb as stateDirName,Ub as stateDir,Ue as state,Rg as startsDocument,zo as startProductionServer,uo as startInteractive,on as startBroadcasting,Gr as stampLocaleLayoutGroup,Ia as staggerDirective,Zp as srcsetUrls,Ja as springDirective,jd as splitByPipe,um as spaNavVaryHeaders,Uo as sourcePathFor,eq as smartBatchSign,oi as slotContentHasExpressions,cq as signUrl,ji as shouldTranspileTypeScript,xk as shouldReloadOnChange,hq as shouldRefreshSignature,yk as shouldIgnoreFile,uh as shouldCacheComponent,Jp as sharpen,Vr as shape,Sb as setStateDir,dm as setRouteParams,em as setMiddlewareState,Ae as setImagePlaceholder,jf as setGlobalProvide,b as setErrorLocale,Al as setCurrentInstance,Jj as setCachedVideoResult,yj as setCachedImageResult,sj as setCached,Yr as serveStxFile,_r as serveMultipleStxFiles,sk as serveMarkdownFile,Ko as serveFile,$r as serveApp,Jo as serve,ip as serializeState,Rm as serializeSetCookie,Lp as sepia,Yd as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Zj as scopeHTML,Yj as scopeCSS,kg as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,Pp as saturation,aq as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,ag as runPreProcessingMiddleware,bg as runPostProcessingMiddleware,Um as runPageAction,_e as runMountCallbacks,gb as runMiddleware,Ql as runHooks,ur as runDoctor,$e as runDestroyCallbacks,pg as runComposers,Qp as rotate,Xh as rewriteImagesWithSiblings,dd as responseBindings,si as resolveTemplatePath,ha as resolveStxTargets,kk as resolveStxDirectories,Ar as resolveI18n,Dp as resize,Uf as resetUnscopedSignalWarnings,Dc as resetRejectedExpressionWarnings,kc as resetPlaceholders,Ud as resetHead,hp as resetHMRHandler,o as resetErrorConfig,Qr as required,Sf as reportDeferredLoopWarnings,oc as replacePlaceholders,Wq as renderView,Sj as renderVideoComponent,ac as renderVendorStyleTags,dr as renderToString,er as renderToStream,fr as renderToDOM,Fq as renderThumbhashToCanvas,rr as renderTemplateString,pr as renderTemplate,qr as renderString,He as renderStreamingPage,ei as renderSlot,kh as renderSSRSuspense,pq as renderProtectedVideo,oq as renderProtectedImg,bq as renderMediaUpload,or as renderMarkdownView,Fm as renderLayoutTypes,Cj as renderImgComponent,ol as renderImageComponent,ae as renderHtmlAttrs,$d as renderHead,Zq as renderEmail,qi as renderComponentWithSlot,be as renderBodyAttrs,sp as render,Cd as relaxedCspPreset,le as registerValidationRule,Oe as registerStreamingDirectives,zp as registerStoresClient,bm as registerStore,ig as registerSeoDirectives,_a as registerMiddleware,sc as registerFilters,rc as registerFilter,d as registerErrorMessages,qe as registerEnhancedValidationRule,zi as registerDirective,Ld as registerCspDirectives,Cn as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,ec as referencesName,El as ref,mo as redirect,_c as recordResponseStatus,$c as recordResponseHeader,Vb as rebaseOntoStateDir,ad as readResponseStatus,bd as readResponseHeaders,qk as readMarkdownFile,zf as readFileCached,Fl as reactive,Up as quality,mq as pruneSignatureCache,vj as pruneCache,gf as provide,nr as protectCodeBlocks,Pr as prop,sg as processVueTemplate,Ah as processVirtualListDirectives,Eh as processVirtualGridDirectives,Rj as processVideo,oe as processValidateDirective,ea as processTranslateDirective,eh as processTransitionDirectives,hh as processTransitionAttributes,ee as processTitleDirective,Sc as processTemplateBindings,ah as processTeleportDirectives,ih as processSuspenseDirectives,dg as processStructuredData,Ie as processStreamDirectives,ed as processStatusDirective,Rh as processStaticDirectives,_f as processStackReplacements,Zf as processStackPushDirectives,fi as processSlots,wm as processShell,De as processServerBindings,eg as processSeoDirective,Pe as processSectionDirectives,Kc as processScopedStyles,Qc as processReactiveBindings,qq as processProtectedMedia,Kh as processPartialHydrationDirectives,Wg as processOnceDirective,$f as processMiddleware,cg as processMetaDirectives,fe as processMetaDirective,rk as processMarkdownFileDirectives,xi as processMarkdownDirectives,Tf as processLoops,sh as processKeepAliveDirectives,Vg as processJsonDirective,Dh as processInfiniteListDirectives,Yf as processIncludes,Ej as processImgComponents,ql as processImageComponents,dl as processImage,de as processHeadDirective,he as processForms,je as processFormInputDirectives,Bc as processExpressions,Ib as processEventDirectives,ke as processErrorDirective,tg as processDynamicComponents,Yh as processDirectives,Hi as processDirectiveAttributes,$g as processDeferDirectives,Qd as processCustomDirectives,Id as processCspDirectives,Wr as processComponentProps,jc as processClientScript,ie as processBasicFormDirectives,nh as processAsyncDirectives,Rd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,we as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,Zo as preloadIslandHandlers,Ce as preloadIconCollection,kn as poolStrings,ik as pluginManager,ye as placeholdersWarmed,dh as performLeave,ch as performEnter,af as pendingLifecycleCounts,ef as peek,Vf as partialsCache,Tj as parseVideoDirectiveOptions,Bp as parseUrl,Iq as parseThumbhashString,pd as parseSwitchBlock,ci as parseSlots,di as parseSlotElement,ud as parseScriptDeclarations,ek as parseSFCComponent,rq as parseProtectedArgs,Rf as parseLoopBinding,Dj as parseImgComponent,Vi as parseImageUrl,pl as parseImageComponent,Sm as parseFormBody,rd as parseExpressionWithFilters,Dn as parseDefaults,jo as parseCookies,nm as parseContainerSelector,md as parseConditionalBlock,sd as parseArguments,Ma as parseAnimationShorthand,Rr as optional,ln as optimizeTemplate,vl as optimizeImage,wl as optimizeDirectory,Tr as oneOf,Wf as onceStore,Nl as onUpdated,Pc as onUpdate,Pl as onUnmounted,im as onServer,Ll as onMounted,Ye as onMount,Qh as onHydrated,nf as onErrorCaptured,Ze as onDestroy,yh as onDeactivated,hm as onClient,Ml as onBeforeUpdate,Ol as onBeforeUnmount,Kl as onBeforeMount,xh as onActivated,Bq as observeElement,no as notFound,yg as normalizeCriticalHeadOrder,mf as nextTick,Gn as negotiateEncoding,Ua as navigateTo,Rl as mountInstance,Ea as motionDirective,Bd as moderateCspPreset,jn as minifyHtml,gg as metaDirective,Jg as metaDedupKey,Cp as mergeParams,Lg as mergeHtmlAttrs,Wd as mergeHeadConfigs,Hc as mergeCssConfig,Fd as mergeCspDirectives,Ra as matchRoute,yi as markdownDirectiveHandler,pk as markdownCache,ga as looksLikeGlob,Dr as localizePath,U as loadTranslationLazy,_ as loadTranslation,lk as loadStxConfig,db as loadMiddlewareFromDirectory,Qm as loadManifest,xq as loadElement,qn as loadChannels,Kr as lintStxStrict,zq as lazyLoadAll,yq as lazyLoad,Ha as keyframeDirective,br as jsxs,cr as jsxDEV,ar as jsx,lo as jsonResponse,Ne as islandDirective,l as isTest,zm as isSpaNavigation,sm as isSpaNavRequest,fq as isSignatureValid,bf as isSignal,bl as isSharpAvailable,Yn as isServerEnvironment,fm as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,uq as isNativeLazySupported,mr as isMarkdownPath,Q as isLoading,R as isLoaded,ii as isJavaScriptScript,vq as isIntersectionObserverSupported,jl as isImageFile,cl as isImageBackendAvailable,aa as isICUFormat,Ph as isHydrated,ni as isHydrateTrigger,Yc as isHttpStatus,Xn as isEdgeEnvironment,Lr as isDirectiveKind,k as isDevelopment,cf as isDerived,wk as isCssOnlyChange,Fn as isCompressible,gm as isClient,ph as isAsyncComponent,Tm as isActionableMethod,Mp as invert,Bf as invalidateFileCacheByDir,Af as invalidateFileCache,Ac as interpolateScriptsInTemplate,yc as interpolateScriptExpressions,zc as interpolateScriptAttributes,x as inlineError,zr as injectThemeBootstrap,fg as injectSeoTags,wr as injectSeo,Lf as injectRouterScript,vk as injectHotReload,kb as injectHeatmap,Oc as injectCss,Gd as injectCspMetaTag,Tg as injectConfigHeadTags,xg as injectColorModeBootScript,Ng as injectCloakStyle,Eg as injectBuildId,cc as injectBrowserCoreAutoImports,Uc as injectAnalytics,hf as inject,am as initStoreRegistry,Yk as initNetlify,$o as initLoadingIndicator,wq as initLazyLoading,to as initFile,Eq as initBlurUp,Kq as initAllBlurUp,Gj as imgDirective,tl as imageDirective,Xm as hydrateTemplateStream,Wm as hydrateTemplate,Yo as hydrateIslands,Mh as hydrateIsland,Ym as hydrateFragment,Nh as hydrateByStrategy,Oh as hydrateAll,pp as hydrate,Io as htmlResponse,Pg as hoistLeadingHeadTags,zg as hoistColorModeBootScript,lb as heatmapDirective,oj as hashString,Kf as hashFilePath,mj as hashFile,nj as hashBuffer,rg as hasVueTemplateSyntax,Qf as hasVariables,up as hasStore,pc as hasPlaceholders,Wk as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,Sg as hasDocumentShell,ai as hasDirectives,ma as hasDOMSupport,ml as handleImageRequest,of as handleError,jr as h,il as groupVariantsByFormat,Kp as grayscale,Bo as gitHash,cn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,Rk as getTotalSize,gq as getTimeUntilExpiry,Yg as getStoreScript,vp as getStoreNames,tp as getStore,Kk as getStorageSize,Jk as getStorageKeys,ti as getSourceLineInfo,ki as getSharedTranspiler,Ff as getServeClientAsset,la as getScreenReaderOnlyStyle,_j as getScopeAttribute,Te as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,_h as getPositionInfo,mc as getPlaceholderRegistry,lj as getPlaceholderCacheStats,Td as getPageMeta,wd as getNonce,kl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,xe as getImagePlaceholder,el as getImageMetadata,ue as getImageDelivery,op as getHydrationRuntime,cm as getHydratedStoreState,zk as getHmrServer,Sd as getHead,gp as getHMRHandler,Zi as getFormatExtension,qj as getFileMtime,hl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Bi as getDirectives,Ai as getDirective,Bl as getCurrentInstance,Lc as getCssServeAsset,Ed as getCspPreset,Nd as getCspHeaderName,wi as getComponentCacheStats,Ij as getCachedVideoResult,kq as getCachedSignature,Df as getCachedSignalsRuntime,Ef as getCachedRouterScript,jj as getCachedPlaceholder,xj as getCachedImageResult,rj as getCached,uj as getCacheStats,Cg as getBuildId,nn as getBroadcastServer,Yi as getBestVariant,tc as getAllFilters,Mi as generateWidthSrcset,Bh as generateVirtualListCSS,Rq as generateVideoPreview,te as generateValidationScript,Sq as generateUploadRuntime,dn as generateTreeShakenBundle,gh as generateTransitionRuntime,fh as generateTransitionCSS,Mj as generateThumbnails,cj as generateThumbhashPlaceholder,Pn as generateTemplatesDocs,mh as generateSuspenseRuntime,lh as generateSuspenseCSS,jp as generateStateScript,Wi as generateSrcsetData,Bj as generateSrcset,fl as generateSrcSet,Nj as generateSpriteSheet,_q as generateSpaShell,Xi as generateSourceTags,Si as generateSizesFromBreakpoints,Ri as generateSizesAttribute,gl as generateSizes,jg as generateSitemapIndex,xr as generateSitemap,tq as generateSimpleMediaPicker,nq as generateSignatureRuntime,xf as generateSignalsRuntimeDev,wf as generateSignalsRuntime,ic as generateServerDataBridge,Xj as generateScopeId,fk as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,lg as generateRobotsTxt,yr as generateRobots,Aj as generateResponsiveVariants,bk as generateReactiveWebComponentTS,ak as generateReactiveWebComponent,dk as generateReactiveRuntime,ck as generateReactiveMixin,Lj as generatePoster,ij as generatePlaceholderStyle,hj as generatePlaceholderCSS,bj as generatePlaceholder,Lh as generatePartialHydrationCSS,vd as generateNonce,Sk as generateNetlifyToml,Uq as generateMinifiedMediaRuntime,Tq as generateMediaRuntime,sq as generateMediaManagerEmbed,Om as generateManifest,bp as generateLoadingIndicatorHtml,Dq as generateLazyLoadRuntime,Gm as generateLayoutTypes,ej as generateLQIP,wh as generateKeepAliveRuntime,vh as generateKeepAliveCSS,Sh as generateIslandManifest,Qq as generateImagePreview,xl as generateImageManifest,np as generateHydrationScript,Re as generateHydrationRuntime,qp as generateHydrationCSS,Fh as generateHydrationBootstrap,uk as generateHotReloadScript,jb as generateHeatmapScript,ep as generateHMRClientScript,Oj as generateHLSManifest,kp as generateEventBindings,Qi as generateDprSrcsetWithVariableQuality,Pi as generateDprSrcset,Qg as generateDocumentShell,Un as generateDocs,Qn as generateDirectivesDocs,Gi as generateDirectiveRuntime,mg as generateDefaultRobotsTxt,Pj as generateDASHManifest,Nc as generateCss,zd as generateCspMetaTag,yd as generateCspHeader,tf as generateCompositionRuntime,On as generateComponentsDocs,Gh as generateComponentManifest,Mn as generateComponentDoc,gj as generateColorPlaceholder,wg as generateColorModeBootScript,Ul as generateClientRuntime,pj as generateCacheKey,gc as generateBrowserAutoImportDestructuring,Lq as generateBlurUpRuntime,Mq as generateBlurUpCSS,Rc as generateBindingsRuntime,Ni as generateAutoWidthSrcset,fc as generateAutoImportDestructuring,rh as generateAsyncComponentRuntime,qh as generateAsyncComponentCSS,Zb as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,Tc as generateAnalyticsScript,Xo as formatTypecheckDiagnostics,Ro as formatTypeErrors,qo as formatStxContent,Qk as formatSize,Ta as formatRoutes,ro as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,vr as formatDoctorReport,Rn as formatDocsAsMarkdown,Tn as formatDocsAsJson,Sn as formatDocsAsHtml,Tp as format,hn as foldConstants,Sp as flipVertical,Rp as flipHorizontal,Hm as fingerprint,Vo as findRuntimeTypeDeclarations,tr as findPantryPackage,ld as findMatchingEndTag,hd as findMatchingDelimiter,Kb as findInterpolationEnd,nd as findIfBlocks,qd as findExpressions,Sa as findErrorPage,Ic as findDuplicateScopedStyleRanges,od as findDirectiveBlocks,en as findDeadCode,en as findDeadBranches,om as findContainerRegion,Nn as findComponentFiles,Zr as findCommonDir,Pk as filterRequiredFiles,ri as fileExists,Nf as extractVariables,Mm as extractTemplateExpressions,Je as extractStreamBoundaries,lp as extractState,gi as extractSlotContent,Pf as extractScriptFromTemplate,Lm as extractScriptBlocks,nc as extractPlaceholders,kd as extractParenthesizedExpression,Zc as extractPageResponseStatus,hb as extractLayoutMetadata,fj as extractDominantColor,td as extractDirectiveParams,bi as extractDirectiveNames,Am as extractContainerContent,Kn as extractComponentProps,Hh as extractComponentName,Ln as extractComponentDescription,Mc as extractClassNames,hc as extractBridgeData,Ih as extractBoundProps,id as extractBalancedExpression,$b as extractAndStripCssImports,$j as extractAndScopeStyles,Hb as extractAndProcessEvents,Dk as externalizeSharedAssets,Ek as externalizeRepeatedAssets,Ck as externalizeHtml,Ec as evaluateExpression,gn as evaluateConstant,fd as evaluateAuthExpression,wc as escapeHtmlValue,vc as escapeHtml,C as errorRecovery,E as errorLogger,bh as ensureTeleportTargets,Ug as ensureDocumentShell,pe as enhancedValidationRules,In as enableDevTools,fn as eliminateDeadCode,We as effect,_p as dprUrls,Vn as docsCommand,Yb as discoverServerApi,Em as discoverLayoutNames,Cq as disconnectObserver,Jn as disableDevTools,F as devHelpers,vm as detectShell,Wn as detectRuntime,Tk as detectProjectConfig,_i as detectFormat,$m as detectBuildMode,Ve as derived,Xk as deploy,nk as defineStxConfig,yp as defineStore,qf as defineSlots,Jr as defineSiteConfig,Nr as definePropsWithValidation,Mr as defineProps,hk as definePlugin,Zd as definePageMeta,Wa as defineMiddleware,Uh as defineForm,lf as defineExpose,kf as defineEmits,Di as defineDirective,lr as defineCustomElement,yo as defineConfig,Ei as defineClientDirective,oh as defineAsyncComponent,Ao as defineApiHandler,Vq as defaultMediaConfig,zl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,ge as defaultFormClasses,qc as defaultFilters,Pd as defaultCspConfig,jk as defaultConfig,Xr as default,Gc as deepMergeThemes,Jc as dedupeScopedStyles,rm as decodeTitleEntities,dj as decodeThumbhash,Kd as cspNonceDirective,Jd as cspDirective,Jq as crossfadeTransition,Ep as crop,zh as createVirtualList,Uj as createVideoDirective,ho as createVercelHandler,Oo as createTypeChecker,fa as createTranslateFilter,co as createTextEncoderStream,kr as createStxApp,bo as createStreamingResponse,Le as createStreamRenderer,wp as createStore,Za as createStorageManager,Xa as createServerCookieManager,_b as createServerApi,Dl as createScope,jh as createSSRSuspense,Se as createRouter,Cm as createRouteRuleResolver,eb as createRouteLocation,Mo as createRoute,El as createRef,Fl as createReactive,sf as createProvideContext,Do as createProject,xo as createProductionBuild,lc as createPlaceholder,mn as createOptimizedBuild,io as createNetlifyHandler,Lk as createNetlifyClient,fb as createMiddlewareContext,Lo as createMiddleware,Aq as createLazyObserver,th as createKeepAliveCache,_n as createKVNamespace,Jh as createIslandRegistry,Fj as createImgDirective,ul as createImagePlugin,nl as createImageHandler,sl as createImageDirective,nb as createHeatmapAggregator,Ok as createFileManifest,Zn as createEnvAccessor,z as createEnhancedError,ao as createEdgeHandler,$n as createEdgeCache,ui as createDetailedErrorMessage,go as createDenoHandler,Uk as createDefaultNetlifyConfig,Od as createCspHeaders,ko as createCookie,Gl as createComputed,Cl as createComponentInstance,fo as createCloudflareHandler,Ya as createClientCookieManager,Fi as createBuiltinDirectives,kr as createApp,Ka as createAnimationTimeline,Hp as cover,Of as convertToCommonJS,Op as contrast,Gp as contain,y as consoleError,m as configureErrorHandling,mk as config,Gl as computed,Hn as compressResponse,og as composerPattern,ng as composer,xm as composeShellWithPage,Bn as componentDirective,pi as componentClientSignalNames,Nm as compileTemplate,a as collectRepeatedFlag,Nk as collectDeployFiles,Og as cloakStyleFragment,Kj as clearVideoCache,N as clearTranslationCache,Zg as clearStoreCache,Ik as clearStorage,lq as clearSignatureCache,vf as clearServerData,kj as clearPlaceholderCache,Xf as clearOnceStore,xd as clearNonce,bb as clearMiddleware,ze as clearImagePlaceholders,ve as clearImageDeliveryCatalog,rl as clearImageCache,e as clearErrorMessages,Gf as clearDevCaches,uc as clearCustomFilters,qg as clearComposers,_g as clearComposableCache,vi as clearComponentCache,tj as clearCache,Db as clearBlankCache,ap as cleanupLoadingIndicator,lm as classifyScript,mm as classifyAllScripts,Po as checkTemplateFile,Qo as checkTemplate,If as checkCache,iq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,wn as channel,po as captureScreenshots,oo as captureScreenshot,Z as cancelPendingLoads,Mk as calculateSha1,Oi as calculateOptimalWidths,Jf as cacheTemplate,Hf as cacheEngineFingerprint,Wj as buildWebComponents,So as buildVirtualSource,Xq as buildViews,Ap as buildUrl,Fe as buildSuspenseResolveScript,Ir as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Im as buildRuntimeAsset,Jm as buildRouterAsset,Hr as buildLangPickerScript,Ui as buildImageUrl,Fg as buildIdFragment,Kg as buildHtmlAttrs,Zm as buildForProduction,En as buildComponentLibrary,jq as buildAuthParams,_m as buildApp,Fr as buildAlternateLinks,wo as build,un as broadcastPrivate,vn as broadcastPresence,rn as broadcast,Np as brightness,Mb as bracketDepths,Ip as blur,Eb as blankInertHtmlRegions,dq as batchSignUrls,Xe as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,Vp as auto,ja as attributeValue,Km as assetTags,Fb as asInvocableStatement,Ur as arrayOf,Cr as applyTranslations,zj as applyTransformations,hi as applySlots,An as applyPropDefaults,Yp as applyPreset,Mg as applyHtmlAttrs,ce as applyHead,Cc as applyFilters,tm as appendVary,Dd as apiCspPreset,Da as animationGroupDirective,Qj as analyzeVideo,bn as analyzeUsage,jm as analyzeTemplate,km as analyzeProject,bn as analyzeDirectiveUsage,Vc as analyticsDirective,Go as addStore,Fo as addPage,Hd as addNonceToInlineContent,Ho as addLayout,Eo as addComponent,Vm as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Cf as __setSignalsGeneratorsForTest,Dg as __setBuildIdForTest,Hj as VideoProcessorCache,Vh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,gd as Tokenizer,No as TemplateTypeChecker,so as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,gr as Show,Ge as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,bc as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,pm as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Wc as RESPONSE_STATUS_KEY,Xc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,vo as ProductionBuild,ir as Portal,Co as PROJECT_TEMPLATES,Xp as PRESETS,sb as NON_CLIENT_PRIMITIVES,rp as MemorySessionStore,Li as MIME_TYPES,Ii as MEDIA_DEFAULT_WIDTHS,Ki as MEDIA_DEFAULT_FORMATS,Dm as LAYOUT_TYPES_FILE,wj as ImageProcessorCache,ll as ImageProcessingError,mp as HydrationRuntime,tk as HotReloadServer,mb as HeatmapAggregator,Ig as HTML_CLASS_MARKER,Hg as HTML_ATTRS_MARKER,$q as Fragment,hr as For,qm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Bk as EXTERNALIZED_ASSET_DIR,Zk as DeployError,_k as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,al as DEFAULT_QUALITY,$i as DEFAULT_PLACEHOLDER_OPTIONS,$k as DEFAULT_FORMATS,Ji as DEFAULT_DPR_VALUES,dp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,Ti as COMMON_SIZES,ug as COLOR_MODE_BOOT_MARKER,vg as COLOR_MODE_BOOT_GLOBAL,Gg as CLOAK_STYLE,yn as BroadcastServer,xn as Broadcast,Ag as BUILD_ID_META,Bg as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,aj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,sr as $path};
2
+ import{$ as Xl,$a as $n,$b as kp,$c as kq,$d as kr,A as Hk,Aa as ln,Ab as Fo,Ac as Lp,Ad as Lq,Ae as Rr,B as Ik,Ba as mn,Bb as Go,Bc as Mp,Bd as Mq,Be as Sr,C as Jk,Ca as zn,Cb as Ho,Cc as Np,Cd as Nq,Ce as Tr,D as Kk,Da as An,Db as Io,Dc as Op,Dd as Oq,De as Ur,E as Al,Ea as Bn,Eb as Jo,Ec as Pp,Ed as Pq,Ee as Vr,F as Bl,Fa as Cn,Fb as Ko,Fc as Qp,Fd as Qq,Fe as Wr,G as Cl,Ga as Dn,Gb as Lo,Gc as Rp,Gd as Rq,Ge as Xr,H as Dl,Ha as En,Hb as Mo,Hc as Sp,Hd as Sq,He as Yr,I as El,Ia as In,Ib as No,Ic as Tp,Id as Tq,Ie as Zr,J as Fl,Ja as Jn,Jb as Oo,Jc as Up,Jd as Uq,Je as _r,K as Gl,Ka as Kn,Kb as Po,Kc as Vp,Kd as Vq,Ke as $r,L as Hl,La as Ln,Lb as Qo,Lc as Wp,Ld as Wq,M as Il,Ma as Mn,Mb as Ro,Mc as Xp,Md as Xq,N as Jl,Na as Nn,Nb as Yo,Nc as Yp,Nd as Yq,O as Kl,Oa as On,Ob as Zo,Oc as Zp,Od as Zq,P as Ll,Pa as Pn,Pb as _o,Pc as _p,Pd as _q,Q as Ml,Qa as Qn,Qb as $o,Qc as $p,Qd as $q,R as Nl,Ra as Rn,Rb as ap,Rc as aq,Rd as ar,S as Ol,Sa as Sn,Sb as bp,Sc as bq,Sd as br,T as Pl,Ta as Tn,Tb as cp,Tc as cq,Td as cr,U as Ql,Ua as Un,Ub as dp,Uc as dq,Ud as dr,V as Rl,Va as Vn,Vb as ep,Vc as eq,Vd as er,W as Sl,Wa as Wn,Wb as fp,Wc as fq,Wd as fr,X as Tl,Xa as Xn,Xb as gp,Xc as gq,Xd as gr,Y as Ul,Ya as Yn,Yb as hp,Yc as hq,Yd as hr,Z as Vl,Za as Zn,Zb as ip,Zc as iq,Zd as ir,_ as Wl,_a as _n,_b as jp,_c as jq,_d as jr,aa as Yl,ab as ao,ac as lp,ad as lq,ae as lr,ba as Zl,bb as bo,bc as mp,bd as mq,be as sr,ca as _l,cb as co,cc as np,cd as nq,ce as tr,da as $l,db as eo,dc as op,dd as oq,de as ur,ea as am,eb as fo,ec as pp,ed as pq,ee as vr,fa as bm,fb as go,fc as qp,fd as qq,fe as wr,ga as cm,gb as ho,gc as rp,gd as rq,ge as xr,ha as dm,hb as io,hc as sp,hd as sq,he as yr,ia as em,ib as jo,ic as tp,id as tq,ie as zr,ja as fm,jb as ko,jc as up,jd as uq,je as Ar,ka as gm,kb as lo,kc as vp,kd as vq,ke as Br,la as hm,lb as mo,lc as wp,ld as wq,le as Cr,ma as im,mb as no,mc as xp,md as xq,me as Dr,na as jm,nb as qo,nc as yp,nd as yq,ne as Er,o as a,oa as km,ob as ro,oc as zp,od as zq,oe as Fr,p as sk,pa as $m,pb as so,pc as Ap,pd as Aq,pe as Gr,q as tk,qa as an,qb as to,qc as Bp,qd as Bq,qe as Hr,r as uk,ra as bn,rb as vo,rc as Cp,rd as Cq,re as Ir,s as vk,sa as cn,sb as wo,sc as Dp,sd as Dq,se as Jr,t as wk,ta as dn,tb as xo,tc as Ep,td as Eq,te as Kr,u as xk,ua as en,ub as yo,uc as Fp,ud as Fq,ue as Lr,v as yk,va as fn,vb as Ao,vc as Gp,vd as Gq,ve as Mr,w as zk,wa as gn,wb as Bo,wc as Hp,wd as Hq,we as Nr,x as Ak,xa as hn,xb as Co,xc as Ip,xd as Iq,xe as Or,y as Fk,ya as jn,yb as Do,yc as Jp,yd as Jq,ye as Pr,z as Gk,za as kn,zb as Eo,zc as Kp,zd as Kq,ze as Qr}from"./chunk-c9wmv6n1.js";import{Le as So,Me as To,Ne as Uo,Oe as Vo,Pe as Wo,Qe as Xo}from"./chunk-m8kezfrt.js";import{Re as oo,Se as po}from"./chunk-2ver2s2y.js";import{Te as uo}from"./chunk-6k8h1fj1.js";import{Ue as _m}from"./chunk-dghr3zxy.js";import{Ve as Fn,We as Gn,Xe as Hn,Ye as zo}from"./chunk-zbtd1ceq.js";import{$e as Nk,Ze as Lk,_e as Mk,af as Ok,bf as Pk,cf as Qk,df as Rk,ef as Sk,ff as Tk,gf as Uk,hf as Vk,if as Wk,jf as Xk,kf as Yk,lf as Zk}from"./chunk-ym3r8ktq.js";import{mf as ol,nf as pl,of as ql,pf as rl,qf as sl,rf as tl,sf as ul,tf as vl,uf as wl,vf as xl,wf as yl,xf as zl}from"./chunk-crj19mqr.js";import{yf as ml,zf as nl}from"./chunk-x7yc7e9v.js";import{Af as _k,Bf as $k,Cf as al,Df as bl,Ef as cl,Ff as dl,Gf as el,If as fl,Jf as gl,Kf as hl,Lf as il,Mf as jl,Nf as kl,Qf as ll}from"./chunk-j2dj21ay.js";import{Rf as Hm,Sf as Im,Tf as Jm,Uf as Km,Vf as Nm,Wf as Zm}from"./chunk-wdvyn2va.js";import{Xf as Lm,_f as Mm}from"./chunk-gdbkqatx.js";import{Ag as Sm,Bg as Tm,Cg as Um,Dg as Vm,Eg as Wm,Fg as Xm,Gg as Ym,gg as lm,hg as mm,ig as nm,jg as om,kg as pm,lg as qm,mg as rm,ng as sm,og as tm,pg as um,qg as vm,rg as wm,sg as xm,tg as ym,ug as zm,vg as Am,wg as Om,xg as Pm,yg as Qm,zg as Rm}from"./chunk-y085rdre.js";import{Hg as Bm,Ig as Cm}from"./chunk-dvvx1wny.js";import{Jg as nn,Kg as on,Lg as pn,Mg as qn,Ng as rn,Og as sn,Pg as tn,Qg as un,Rg as vn,Sg as wn,Tg as xn,Ug as yn}from"./chunk-xz3evxqp.js";import{Vg as ci,Wg as di,Xg as ei,Yg as fi,Zg as gi,_g as hi}from"./chunk-farwrdr2.js";import{$g as wj,ah as xj,bh as yj,fh as zj,gh as Aj,hh as Bj}from"./chunk-wx5zf66r.js";import{ih as Hj,jh as Ij,kh as Jj,lh as Kj,mh as Lj,nh as Mj,oh as Nj,ph as Oj,qh as Pj,rh as Qj,sh as Rj}from"./chunk-yk6446kr.js";import{Ah as sj,Bh as tj,Ch as uj,Dh as vj,th as mj,uh as nj,vh as oj,wh as pj,xh as qj,zh as rj}from"./chunk-vd5xvsnv.js";import{Eh as hk,Gh as ik}from"./chunk-64djh88a.js";import{Mh as Fh,Nh as Gh,Oh as Hh,Ph as Ih,Qh as Jh,Rh as Kh,Sh as Lh,Th as Mh,Uh as Nh,Vh as Oh,Wh as Ph,Xh as Qh,Yh as Rh,Zh as Sh}from"./chunk-9368t9jm.js";import{$h as Th,ai as Uh,bi as Vh,ci as Wh}from"./chunk-5tefa8qb.js";import{hi as Xh}from"./chunk-mwh3ymwc.js";import{ii as $g}from"./chunk-fqq5k9ve.js";import{ji as ah,ki as bh}from"./chunk-ya5m5vbn.js";import{li as ch,mi as dh,ni as eh,oi as fh,pi as gh,qi as hh}from"./chunk-y4nzmkea.js";import{ri as ih,si as jh,ti as kh,ui as lh,vi as mh}from"./chunk-7kw3grq5.js";import{Ai as rh,wi as nh,xi as oh,yi as ph,zi as qh}from"./chunk-c79nfdyj.js";import{Bi as sh,Ci as th,Di as uh,Ei as vh,Fi as wh,Gi as xh,Hi as yh}from"./chunk-ej8mv2k6.js";import{Ii as zh,Ji as Ah,Ki as Bh,Li as Ch,Mi as Dh,Ni as Eh}from"./chunk-cr8v8k53.js";import{Pi as Yg,Qi as Zg}from"./chunk-q05eh1n4.js";import{Ti as _g}from"./chunk-4k0ce745.js";import"./chunk-xwxdwqn9.js";import{$i as Ie,Xi as Ee,Yi as Fe,Zi as Ge,_i as He,aj as Je,bj as Ke,cj as Le,dj as Me,ej as Ne,fj as Oe,gj as Pe,hj as Qe,ij as Re}from"./chunk-ymrxpwr8.js";import{jj as gf,kj as hf,lj as jf,mj as kf,nj as lf,oj as mf,pj as nf,qj as of,rj as pf,sj as qf,tj as rf,uj as sf,vj as tf,wj as uf,xj as vf,yj as wf,zj as xf}from"./chunk-71y3bhcw.js";import{Gj as Ue,Hj as Ve,Ij as We,Jj as Xe,Kj as Ye,Lj as Ze,Mj as _e,Nj as $e,Oj as af,Pj as bf,Qj as cf,Rj as df,Sj as ef,Tj as ff}from"./chunk-t41aaehf.js";import{$j as Ff,Uj as yf,Vj as zf,Wj as Af,Xj as Bf,Yj as Cf,Zj as Df,_j as Ef,ak as Gf,bk as Hf,ck as If,dk as Jf,ek as Kf}from"./chunk-fkdnfjc2.js";import{Ak as or,Bk as pr,Ck as qr,Dk as rr,yk as mr,zk as nr}from"./chunk-08w4gtyf.js";import{Ek as Bk,Fk as Ck,Gk as Dk,Hk as Ek,Ik as Dm,Jk as Em,Kk as Fm,Lk as Gm}from"./chunk-e1sxe3q4.js";import"./chunk-4jdj52c5.js";import"./chunk-zz8qgqa1.js";import{Bl as _b,wl as Yb,xl as Zb}from"./chunk-p1hy2bwn.js";import{$m as Zc,$n as ne,$o as Tf,$p as Tg,$q as gj,Am as qc,An as yd,Ap as sg,Aq as yi,Ar as gk,Bm as rc,Bn as zd,Bp as tg,Bq as Ii,Br as jk,Cm as sc,Cn as Ad,Cp as ug,Cq as Ji,Cr as kk,Dl as xa,Dm as tc,Dn as Bd,Dp as vg,Dq as Ki,Dr as lk,El as ya,Em as uc,En as Cd,Ep as wg,Eq as Li,Er as mk,Fl as za,Fm as vc,Fn as Dd,Fp as xg,Fq as Mi,Fr as nk,Gl as Aa,Gm as wc,Gn as Ed,Gp as yg,Gq as Ni,Gr as ok,Hl as Ba,Hm as xc,Hn as Fd,Hp as zg,Hq as Oi,Hr as pk,Il as Ca,Im as yc,In as Gd,Ip as Ag,Iq as Pi,Ir as qk,Jl as Da,Jm as zc,Jn as Hd,Jp as Bg,Jq as Qi,Jr as rk,Kl as Ea,Km as Ac,Kn as Id,Kp as Cg,Kq as Ri,Ll as Fa,Lm as Bc,Ln as Jd,Lp as Dg,Lq as Si,Ml as Ga,Mm as Cc,Mn as Kd,Mp as Eg,Mq as Ti,Nl as Ha,Nm as Dc,Nn as Ld,No as Mf,Np as Fg,Nq as Ui,Ol as Ia,Om as Ec,On as Md,Op as Gg,Oq as Vi,Pl as Ja,Pm as Fc,Pn as Nd,Pp as Hg,Pq as Wi,Ql as Ka,Qm as Pc,Qn as Od,Qp as Ig,Qq as Xi,Rl as La,Rm as Qc,Rn as Pd,Rp as Jg,Rq as Yi,Sl as Ma,Sm as Rc,Sn as Qd,Sp as Kg,Sq as Zi,Tl as Na,Tm as Sc,Tn as Rd,To as Nf,Tp as Lg,Tq as _i,Ul as Oa,Um as Tc,Un as ge,Up as Mg,Uq as $i,Vl as ib,Vm as Uc,Vn as he,Vo as Of,Vp as Ng,Vq as aj,Wl as jb,Wm as Vc,Wn as ie,Wp as Og,Wq as bj,Xl as kb,Xn as je,Xo as Pf,Xp as Pg,Xq as cj,Yl as lb,Ym as Wc,Yn as ke,Yo as Qf,Yp as Qg,Yq as dj,Zl as mb,Zm as Xc,Zn as le,Zo as Rf,Zp as Rg,Zq as ej,_l as nb,_m as Yc,_n as me,_o as Sf,_p as Sg,_q as fj,an as _c,ao as oe,ap as Uf,aq as Ug,ar as hj,bm as Fb,bn as $c,bo as pe,bp as Vf,bq as Vg,br as ij,cm as Gb,cn as ad,co as qe,cp as Wf,cq as Wg,cr as jj,dm as Hb,dn as bd,do as re,dp as Xf,dq as Xg,dr as kj,em as Ib,en as cd,eo as se,ep as Yf,eq as Yh,er as lj,fm as Jb,fn as dd,fo as te,fp as Zf,fq as Zh,fr as Cj,gm as Nb,gn as ed,gp as _f,gq as _h,gr as Dj,hm as Ob,hn as fd,hp as $f,hq as $h,hr as Ej,im as Pb,in as gd,ip as ag,iq as ai,ir as Fj,jm as $b,jn as hd,jp as bg,jq as bi,jr as Gj,km as ac,kn as id,kp as cg,kq as ii,kr as Sj,lm as bc,ln as jd,lo as xe,lp as dg,lq as ji,lr as Tj,mm as cc,mn as kd,mo as ye,mp as eg,mq as ki,mr as Uj,nm as dc,nn as ld,no as ze,np as fg,nq as li,nr as Vj,om as ec,on as md,oo as Ae,op as gg,oq as mi,or as Wj,pm as fc,pn as nd,po as Be,pp as hg,pq as ni,pr as Xj,qm as gc,qn as od,qo as Ce,qp as ig,qq as oi,qr as Yj,rm as hc,rn as pd,ro as De,rp as jg,rq as pi,rr as Zj,sm as ic,sn as qd,sp as kg,sq as qi,sr as _j,tm as jc,tn as rd,tp as lg,tq as ri,tr as $j,um as kc,un as sd,up as mg,uq as si,ur as ak,vm as lc,vn as td,vo as Se,vp as ng,vq as ti,vr as bk,wm as mc,wn as ud,wo as Te,wp as og,wq as ui,wr as ck,xm as nc,xn as vd,xp as pg,xq as vi,xr as dk,ym as oc,yn as wd,yo as Lf,yp as qg,yq as wi,yr as ek,zm as pc,zn as xd,zp as rg,zq as xi,zr as fk}from"./chunk-kxtqbrfr.js";import{$r as s,$s as la,Cs as M,Ds as N,Es as O,Fs as P,Gs as Q,Hs as R,Is as S,Js as T,Kr as b,Ks as U,Lr as c,Ls as V,Mr as d,Ms as W,Nr as e,Ns as X,Or as f,Os as Y,Pr as g,Ps as Z,Qr as h,Qs as _,Rr as i,Rs as $,Sr as j,Ss as aa,Tr as k,Ts as ba,Ur as l,Us as ca,Vr as m,Vs as da,Wr as n,Ws as ea,Xr as o,Xs as fa,Yr as p,Ys as ia,Zr as q,Zs as ja,_r as r,_s as ka,as as t,at as ma,bs as u,bt as na,cs as v,ct as oa,ds as w,dt as pa,es as x,et as qa,fs as y,ft as ra,gs as z,gt as sa,hs as A,ht as ta,is as B,it as ua,js as C,jt as va,ks as D,kt as wa,ls as E,ms as F,ns as G,os as H,ps as I,qs as J,rs as K,ss as L}from"./chunk-caaenc3w.js";import{lt as ga,mt as ha}from"./chunk-amxtypkp.js";import{nt as Kb,ot as Lb,pt as Mb}from"./chunk-nat3actx.js";import{qt as zi,rt as Ai,st as Bi,tt as Ci,ut as Di,vt as Ei,wt as Fi,xt as Gi,yt as Hi}from"./chunk-q0g5c39d.js";import{Qt as Gc,Rt as Hc,St as Ic,Tt as Jc,Ut as Kc,Wt as Lc,du as Mc,eu as Nc,fu as Oc}from"./chunk-kffndzch.js";import{mu as ue,ou as ve,ru as we}from"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import{Au as Sb,Bu as Tb,Cu as Ub,Du as Vb,yu as Qb,zu as Rb}from"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import{Iu as Wb,Ju as Xb}from"./chunk-vvd659y4.js";import{$u as ee,Nu as Sd,Ou as Td,Pu as Ud,Qu as Vd,Ru as Wd,Su as Xd,Tu as Yd,Uu as Zd,Vu as _d,Wu as $d,Xu as ae,Yu as be,Zu as ce,_u as de,av as fe}from"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import{gv as ob,hv as pb,iv as qb,jv as rb,kv as sb,lv as tb,mv as ub,nv as vb,ov as wb,pv as xb,qv as yb,rv as zb,sv as Ab,tv as Bb,uv as Cb,vv as Db,wv as Eb}from"./chunk-deqnt1w5.js";import{$v as db,Av as Pa,Bv as Qa,Ev as Ra,Jv as Sa,Kv as Ta,Qv as Ua,Rv as Va,Sv as Wa,Tv as Xa,Uv as Ya,Vv as Za,Wv as _a,Xv as $a,Yv as ab,Zv as bb,_v as cb,aw as eb,bw as fb,cw as gb,ew as hb}from"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import"./chunk-hyfjnn7g.js";export{Vk as writeNetlifyConfig,Pm as writeManifest,yl as writeImageManifest,fp as wrapComponentForHMR,Or as withDefaults,gk as webComponentDirectiveHandler,Wp as watermark,Yq as watchViews,Il as watchMultiple,Jl as watchEffect,Hl as watch,Be as warmImagePlaceholders,Wl as waitForStore,X as waitForLocale,To as virtualPathFor,Vj as videoDirective,G as validators,Sr as validated,re as validateValueEnhanced,Zh as validateTemplate,Bm as validateRouteRules,$p as validateParams,se as validateFormEnhanced,Nq as validateFile,ne as validateFields,me as validateField,$h as validateDirective,Md as validateCspDirectives,ok as validateConfig,an as validateComponentScripts,zn as validateComponentProps,Xg as validateClientScript,Wh as v,xc as usesSignalsInScript,ub as usesReactiveRuntime,mi as userComponentFileExists,Ch as useVirtualList,_d as useTitle,Vl as useStoreOrThrow,xp as useStore,Fk as useStorage,pf as useSlots,Hk as useSessionStorage,Wb as useServerRuntimeConfig,Mf as useServerData,Xd as useSeoMeta,Xb as useRuntimeConfig,Xl as useRouteParams,Zl as useRouteParamOrThrow,Yl as useRouteParam,_d as usePageTitle,ff as useOptimistic,uf as useModel,$l as useMiddlewareValue,_l as useMiddlewareState,Gk as useLocalStorage,_o as useLoadingIndicator,Vd as useHead,Th as useForm,rf as useAttrs,Pq as uploadFiles,Oq as uploadFile,Sl as updateInstance,df as untrack,Ci as unregisterDirective,Tl as unmountInstance,Fc as unescapeHtml,Wo as typecheckStxFiles,li as transpileTypeScript,Br as translate,Ba as transitionDirective,dc as transformAutoImports,tn as toUsers,sn as toUser,Fp as thumbnail,Gq as thumbHashToRGBA,Hq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,yf as templateCache,cd as syncRecordedResponse,cp as stxClientHelpers,hg as structuredDataDirective,Er as stripLocalePrefix,ym as stripDocumentWrapper,Lb as stripCommentsAndLiterals,eo as stringToStream,Ad as strictCspPreset,Me as streamingSuspenseDirective,Qe as streamToResponse,Ke as streamTemplateSimple,Ee as streamTemplate,Ak as stopHmrServer,pn as stopBroadcasting,Tb as stateDirName,Ub as stateDir,Ue as state,Rg as startsDocument,zo as startProductionServer,uo as startInteractive,on as startBroadcasting,Gr as stampLocaleLayoutGroup,Ia as staggerDirective,Zp as srcsetUrls,Ja as springDirective,jd as splitByPipe,um as spaNavVaryHeaders,Uo as sourcePathFor,eq as smartBatchSign,oi as slotContentHasExpressions,cq as signUrl,ji as shouldTranspileTypeScript,xk as shouldReloadOnChange,hq as shouldRefreshSignature,yk as shouldIgnoreFile,uh as shouldCacheComponent,Jp as sharpen,Vr as shape,Sb as setStateDir,dm as setRouteParams,em as setMiddlewareState,Ae as setImagePlaceholder,jf as setGlobalProvide,b as setErrorLocale,Al as setCurrentInstance,Jj as setCachedVideoResult,yj as setCachedImageResult,sj as setCached,Yr as serveStxFile,_r as serveMultipleStxFiles,sk as serveMarkdownFile,Ko as serveFile,$r as serveApp,Jo as serve,ip as serializeState,Rm as serializeSetCookie,Lp as sepia,Yd as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Zj as scopeHTML,Yj as scopeCSS,kg as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,Pp as saturation,aq as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,ag as runPreProcessingMiddleware,bg as runPostProcessingMiddleware,Um as runPageAction,_e as runMountCallbacks,gb as runMiddleware,Ql as runHooks,ur as runDoctor,$e as runDestroyCallbacks,pg as runComposers,Qp as rotate,Xh as rewriteImagesWithSiblings,dd as responseBindings,si as resolveTemplatePath,ha as resolveStxTargets,kk as resolveStxDirectories,Ar as resolveI18n,Dp as resize,Uf as resetUnscopedSignalWarnings,Dc as resetRejectedExpressionWarnings,kc as resetPlaceholders,Ud as resetHead,hp as resetHMRHandler,o as resetErrorConfig,Qr as required,Sf as reportDeferredLoopWarnings,oc as replacePlaceholders,Wq as renderView,Sj as renderVideoComponent,ac as renderVendorStyleTags,dr as renderToString,er as renderToStream,fr as renderToDOM,Fq as renderThumbhashToCanvas,rr as renderTemplateString,pr as renderTemplate,qr as renderString,He as renderStreamingPage,ei as renderSlot,kh as renderSSRSuspense,pq as renderProtectedVideo,oq as renderProtectedImg,bq as renderMediaUpload,or as renderMarkdownView,Fm as renderLayoutTypes,Cj as renderImgComponent,ol as renderImageComponent,ae as renderHtmlAttrs,$d as renderHead,Zq as renderEmail,qi as renderComponentWithSlot,be as renderBodyAttrs,sp as render,Cd as relaxedCspPreset,le as registerValidationRule,Oe as registerStreamingDirectives,zp as registerStoresClient,bm as registerStore,ig as registerSeoDirectives,_a as registerMiddleware,sc as registerFilters,rc as registerFilter,d as registerErrorMessages,qe as registerEnhancedValidationRule,zi as registerDirective,Ld as registerCspDirectives,Cn as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,ec as referencesName,El as ref,mo as redirect,_c as recordResponseStatus,$c as recordResponseHeader,Vb as rebaseOntoStateDir,ad as readResponseStatus,bd as readResponseHeaders,qk as readMarkdownFile,zf as readFileCached,Fl as reactive,Up as quality,mq as pruneSignatureCache,vj as pruneCache,gf as provide,nr as protectCodeBlocks,Pr as prop,sg as processVueTemplate,Ah as processVirtualListDirectives,Eh as processVirtualGridDirectives,Rj as processVideo,oe as processValidateDirective,ea as processTranslateDirective,eh as processTransitionDirectives,hh as processTransitionAttributes,ee as processTitleDirective,Sc as processTemplateBindings,ah as processTeleportDirectives,ih as processSuspenseDirectives,dg as processStructuredData,Ie as processStreamDirectives,ed as processStatusDirective,Rh as processStaticDirectives,_f as processStackReplacements,Zf as processStackPushDirectives,fi as processSlots,wm as processShell,De as processServerBindings,eg as processSeoDirective,Pe as processSectionDirectives,Kc as processScopedStyles,Qc as processReactiveBindings,qq as processProtectedMedia,Kh as processPartialHydrationDirectives,Wg as processOnceDirective,$f as processMiddleware,cg as processMetaDirectives,fe as processMetaDirective,rk as processMarkdownFileDirectives,xi as processMarkdownDirectives,Tf as processLoops,sh as processKeepAliveDirectives,Vg as processJsonDirective,Dh as processInfiniteListDirectives,Yf as processIncludes,Ej as processImgComponents,ql as processImageComponents,dl as processImage,de as processHeadDirective,he as processForms,je as processFormInputDirectives,Bc as processExpressions,Ib as processEventDirectives,ke as processErrorDirective,tg as processDynamicComponents,Yh as processDirectives,Hi as processDirectiveAttributes,$g as processDeferDirectives,Qd as processCustomDirectives,Id as processCspDirectives,Wr as processComponentProps,jc as processClientScript,ie as processBasicFormDirectives,nh as processAsyncDirectives,Rd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,we as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,Zo as preloadIslandHandlers,Ce as preloadIconCollection,kn as poolStrings,ik as pluginManager,ye as placeholdersWarmed,dh as performLeave,ch as performEnter,af as pendingLifecycleCounts,ef as peek,Vf as partialsCache,Tj as parseVideoDirectiveOptions,Bp as parseUrl,Iq as parseThumbhashString,pd as parseSwitchBlock,ci as parseSlots,di as parseSlotElement,ud as parseScriptDeclarations,ek as parseSFCComponent,rq as parseProtectedArgs,Rf as parseLoopBinding,Dj as parseImgComponent,Vi as parseImageUrl,pl as parseImageComponent,Sm as parseFormBody,rd as parseExpressionWithFilters,Dn as parseDefaults,jo as parseCookies,nm as parseContainerSelector,md as parseConditionalBlock,sd as parseArguments,Ma as parseAnimationShorthand,Rr as optional,ln as optimizeTemplate,vl as optimizeImage,wl as optimizeDirectory,Tr as oneOf,Wf as onceStore,Nl as onUpdated,Pc as onUpdate,Pl as onUnmounted,im as onServer,Ll as onMounted,Ye as onMount,Qh as onHydrated,nf as onErrorCaptured,Ze as onDestroy,yh as onDeactivated,hm as onClient,Ml as onBeforeUpdate,Ol as onBeforeUnmount,Kl as onBeforeMount,xh as onActivated,Bq as observeElement,no as notFound,yg as normalizeCriticalHeadOrder,mf as nextTick,Gn as negotiateEncoding,Ua as navigateTo,Rl as mountInstance,Ea as motionDirective,Bd as moderateCspPreset,jn as minifyHtml,gg as metaDirective,Jg as metaDedupKey,Cp as mergeParams,Lg as mergeHtmlAttrs,Wd as mergeHeadConfigs,Hc as mergeCssConfig,Fd as mergeCspDirectives,Ra as matchRoute,yi as markdownDirectiveHandler,pk as markdownCache,ga as looksLikeGlob,Dr as localizePath,U as loadTranslationLazy,_ as loadTranslation,lk as loadStxConfig,db as loadMiddlewareFromDirectory,Qm as loadManifest,xq as loadElement,qn as loadChannels,Kr as lintStxStrict,zq as lazyLoadAll,yq as lazyLoad,Ha as keyframeDirective,br as jsxs,cr as jsxDEV,ar as jsx,lo as jsonResponse,Ne as islandDirective,l as isTest,zm as isSpaNavigation,sm as isSpaNavRequest,fq as isSignatureValid,bf as isSignal,bl as isSharpAvailable,Yn as isServerEnvironment,fm as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,uq as isNativeLazySupported,mr as isMarkdownPath,Q as isLoading,R as isLoaded,ii as isJavaScriptScript,vq as isIntersectionObserverSupported,jl as isImageFile,cl as isImageBackendAvailable,aa as isICUFormat,Ph as isHydrated,ni as isHydrateTrigger,Yc as isHttpStatus,Xn as isEdgeEnvironment,Lr as isDirectiveKind,k as isDevelopment,cf as isDerived,wk as isCssOnlyChange,Fn as isCompressible,gm as isClient,ph as isAsyncComponent,Tm as isActionableMethod,Mp as invert,Bf as invalidateFileCacheByDir,Af as invalidateFileCache,Ac as interpolateScriptsInTemplate,yc as interpolateScriptExpressions,zc as interpolateScriptAttributes,x as inlineError,zr as injectThemeBootstrap,fg as injectSeoTags,wr as injectSeo,Lf as injectRouterScript,vk as injectHotReload,kb as injectHeatmap,Oc as injectCss,Gd as injectCspMetaTag,Tg as injectConfigHeadTags,xg as injectColorModeBootScript,Ng as injectCloakStyle,Eg as injectBuildId,cc as injectBrowserCoreAutoImports,Uc as injectAnalytics,hf as inject,am as initStoreRegistry,Yk as initNetlify,$o as initLoadingIndicator,wq as initLazyLoading,to as initFile,Eq as initBlurUp,Kq as initAllBlurUp,Gj as imgDirective,tl as imageDirective,Xm as hydrateTemplateStream,Wm as hydrateTemplate,Yo as hydrateIslands,Mh as hydrateIsland,Ym as hydrateFragment,Nh as hydrateByStrategy,Oh as hydrateAll,pp as hydrate,Io as htmlResponse,Pg as hoistLeadingHeadTags,zg as hoistColorModeBootScript,lb as heatmapDirective,oj as hashString,Kf as hashFilePath,mj as hashFile,nj as hashBuffer,rg as hasVueTemplateSyntax,Qf as hasVariables,up as hasStore,pc as hasPlaceholders,Wk as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,Sg as hasDocumentShell,ai as hasDirectives,ma as hasDOMSupport,ml as handleImageRequest,of as handleError,jr as h,il as groupVariantsByFormat,Kp as grayscale,Bo as gitHash,cn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,Rk as getTotalSize,gq as getTimeUntilExpiry,Yg as getStoreScript,vp as getStoreNames,tp as getStore,Kk as getStorageSize,Jk as getStorageKeys,ti as getSourceLineInfo,ki as getSharedTranspiler,Ff as getServeClientAsset,la as getScreenReaderOnlyStyle,_j as getScopeAttribute,Te as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,_h as getPositionInfo,mc as getPlaceholderRegistry,lj as getPlaceholderCacheStats,Td as getPageMeta,wd as getNonce,kl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,xe as getImagePlaceholder,el as getImageMetadata,ue as getImageDelivery,op as getHydrationRuntime,cm as getHydratedStoreState,zk as getHmrServer,Sd as getHead,gp as getHMRHandler,Zi as getFormatExtension,qj as getFileMtime,hl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Bi as getDirectives,Ai as getDirective,Bl as getCurrentInstance,Lc as getCssServeAsset,Ed as getCspPreset,Nd as getCspHeaderName,wi as getComponentCacheStats,Ij as getCachedVideoResult,kq as getCachedSignature,Df as getCachedSignalsRuntime,Ef as getCachedRouterScript,jj as getCachedPlaceholder,xj as getCachedImageResult,rj as getCached,uj as getCacheStats,Cg as getBuildId,nn as getBroadcastServer,Yi as getBestVariant,tc as getAllFilters,Mi as generateWidthSrcset,Bh as generateVirtualListCSS,Rq as generateVideoPreview,te as generateValidationScript,Sq as generateUploadRuntime,dn as generateTreeShakenBundle,gh as generateTransitionRuntime,fh as generateTransitionCSS,Mj as generateThumbnails,cj as generateThumbhashPlaceholder,Pn as generateTemplatesDocs,mh as generateSuspenseRuntime,lh as generateSuspenseCSS,jp as generateStateScript,Wi as generateSrcsetData,Bj as generateSrcset,fl as generateSrcSet,Nj as generateSpriteSheet,_q as generateSpaShell,Xi as generateSourceTags,Si as generateSizesFromBreakpoints,Ri as generateSizesAttribute,gl as generateSizes,jg as generateSitemapIndex,xr as generateSitemap,tq as generateSimpleMediaPicker,nq as generateSignatureRuntime,xf as generateSignalsRuntimeDev,wf as generateSignalsRuntime,ic as generateServerDataBridge,Xj as generateScopeId,fk as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,lg as generateRobotsTxt,yr as generateRobots,Aj as generateResponsiveVariants,bk as generateReactiveWebComponentTS,ak as generateReactiveWebComponent,dk as generateReactiveRuntime,ck as generateReactiveMixin,Lj as generatePoster,ij as generatePlaceholderStyle,hj as generatePlaceholderCSS,bj as generatePlaceholder,Lh as generatePartialHydrationCSS,vd as generateNonce,Sk as generateNetlifyToml,Uq as generateMinifiedMediaRuntime,Tq as generateMediaRuntime,sq as generateMediaManagerEmbed,Om as generateManifest,bp as generateLoadingIndicatorHtml,Dq as generateLazyLoadRuntime,Gm as generateLayoutTypes,ej as generateLQIP,wh as generateKeepAliveRuntime,vh as generateKeepAliveCSS,Sh as generateIslandManifest,Qq as generateImagePreview,xl as generateImageManifest,np as generateHydrationScript,Re as generateHydrationRuntime,qp as generateHydrationCSS,Fh as generateHydrationBootstrap,uk as generateHotReloadScript,jb as generateHeatmapScript,ep as generateHMRClientScript,Oj as generateHLSManifest,kp as generateEventBindings,Qi as generateDprSrcsetWithVariableQuality,Pi as generateDprSrcset,Qg as generateDocumentShell,Un as generateDocs,Qn as generateDirectivesDocs,Gi as generateDirectiveRuntime,mg as generateDefaultRobotsTxt,Pj as generateDASHManifest,Nc as generateCss,zd as generateCspMetaTag,yd as generateCspHeader,tf as generateCompositionRuntime,On as generateComponentsDocs,Gh as generateComponentManifest,Mn as generateComponentDoc,gj as generateColorPlaceholder,wg as generateColorModeBootScript,Ul as generateClientRuntime,pj as generateCacheKey,gc as generateBrowserAutoImportDestructuring,Lq as generateBlurUpRuntime,Mq as generateBlurUpCSS,Rc as generateBindingsRuntime,Ni as generateAutoWidthSrcset,fc as generateAutoImportDestructuring,rh as generateAsyncComponentRuntime,qh as generateAsyncComponentCSS,Zb as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,Tc as generateAnalyticsScript,Xo as formatTypecheckDiagnostics,Ro as formatTypeErrors,qo as formatStxContent,Qk as formatSize,Ta as formatRoutes,ro as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,vr as formatDoctorReport,Rn as formatDocsAsMarkdown,Tn as formatDocsAsJson,Sn as formatDocsAsHtml,Tp as format,hn as foldConstants,Sp as flipVertical,Rp as flipHorizontal,Hm as fingerprint,Vo as findRuntimeTypeDeclarations,tr as findPantryPackage,ld as findMatchingEndTag,hd as findMatchingDelimiter,Kb as findInterpolationEnd,nd as findIfBlocks,qd as findExpressions,Sa as findErrorPage,Ic as findDuplicateScopedStyleRanges,od as findDirectiveBlocks,en as findDeadCode,en as findDeadBranches,om as findContainerRegion,Nn as findComponentFiles,Zr as findCommonDir,Pk as filterRequiredFiles,ri as fileExists,Nf as extractVariables,Mm as extractTemplateExpressions,Je as extractStreamBoundaries,lp as extractState,gi as extractSlotContent,Pf as extractScriptFromTemplate,Lm as extractScriptBlocks,nc as extractPlaceholders,kd as extractParenthesizedExpression,Zc as extractPageResponseStatus,hb as extractLayoutMetadata,fj as extractDominantColor,td as extractDirectiveParams,bi as extractDirectiveNames,Am as extractContainerContent,Kn as extractComponentProps,Hh as extractComponentName,Ln as extractComponentDescription,Mc as extractClassNames,hc as extractBridgeData,Ih as extractBoundProps,id as extractBalancedExpression,$b as extractAndStripCssImports,$j as extractAndScopeStyles,Hb as extractAndProcessEvents,Dk as externalizeSharedAssets,Ek as externalizeRepeatedAssets,Ck as externalizeHtml,Ec as evaluateExpression,gn as evaluateConstant,fd as evaluateAuthExpression,wc as escapeHtmlValue,vc as escapeHtml,C as errorRecovery,E as errorLogger,bh as ensureTeleportTargets,Ug as ensureDocumentShell,pe as enhancedValidationRules,In as enableDevTools,fn as eliminateDeadCode,We as effect,_p as dprUrls,Vn as docsCommand,Yb as discoverServerApi,Em as discoverLayoutNames,Cq as disconnectObserver,Jn as disableDevTools,F as devHelpers,vm as detectShell,Wn as detectRuntime,Tk as detectProjectConfig,_i as detectFormat,$m as detectBuildMode,Ve as derived,Xk as deploy,nk as defineStxConfig,yp as defineStore,qf as defineSlots,Jr as defineSiteConfig,Nr as definePropsWithValidation,Mr as defineProps,hk as definePlugin,Zd as definePageMeta,Wa as defineMiddleware,Uh as defineForm,lf as defineExpose,kf as defineEmits,Di as defineDirective,lr as defineCustomElement,yo as defineConfig,Ei as defineClientDirective,oh as defineAsyncComponent,Ao as defineApiHandler,Vq as defaultMediaConfig,zl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,ge as defaultFormClasses,qc as defaultFilters,Pd as defaultCspConfig,jk as defaultConfig,Xr as default,Gc as deepMergeThemes,Jc as dedupeScopedStyles,rm as decodeTitleEntities,dj as decodeThumbhash,Kd as cspNonceDirective,Jd as cspDirective,Jq as crossfadeTransition,Ep as crop,zh as createVirtualList,Uj as createVideoDirective,ho as createVercelHandler,Oo as createTypeChecker,fa as createTranslateFilter,co as createTextEncoderStream,kr as createStxApp,bo as createStreamingResponse,Le as createStreamRenderer,wp as createStore,Za as createStorageManager,Xa as createServerCookieManager,_b as createServerApi,Dl as createScope,jh as createSSRSuspense,Se as createRouter,Cm as createRouteRuleResolver,eb as createRouteLocation,Mo as createRoute,El as createRef,Fl as createReactive,sf as createProvideContext,Do as createProject,xo as createProductionBuild,lc as createPlaceholder,mn as createOptimizedBuild,io as createNetlifyHandler,Lk as createNetlifyClient,fb as createMiddlewareContext,Lo as createMiddleware,Aq as createLazyObserver,th as createKeepAliveCache,_n as createKVNamespace,Jh as createIslandRegistry,Fj as createImgDirective,ul as createImagePlugin,nl as createImageHandler,sl as createImageDirective,nb as createHeatmapAggregator,Ok as createFileManifest,Zn as createEnvAccessor,z as createEnhancedError,ao as createEdgeHandler,$n as createEdgeCache,ui as createDetailedErrorMessage,go as createDenoHandler,Uk as createDefaultNetlifyConfig,Od as createCspHeaders,ko as createCookie,Gl as createComputed,Cl as createComponentInstance,fo as createCloudflareHandler,Ya as createClientCookieManager,Fi as createBuiltinDirectives,kr as createApp,Ka as createAnimationTimeline,Hp as cover,Of as convertToCommonJS,Op as contrast,Gp as contain,y as consoleError,m as configureErrorHandling,mk as config,Gl as computed,Hn as compressResponse,og as composerPattern,ng as composer,xm as composeShellWithPage,Bn as componentDirective,pi as componentClientSignalNames,Nm as compileTemplate,a as collectRepeatedFlag,Nk as collectDeployFiles,Og as cloakStyleFragment,Kj as clearVideoCache,N as clearTranslationCache,Zg as clearStoreCache,Ik as clearStorage,lq as clearSignatureCache,vf as clearServerData,kj as clearPlaceholderCache,Xf as clearOnceStore,xd as clearNonce,bb as clearMiddleware,ze as clearImagePlaceholders,ve as clearImageDeliveryCatalog,rl as clearImageCache,e as clearErrorMessages,Gf as clearDevCaches,uc as clearCustomFilters,qg as clearComposers,_g as clearComposableCache,vi as clearComponentCache,tj as clearCache,Db as clearBlankCache,ap as cleanupLoadingIndicator,lm as classifyScript,mm as classifyAllScripts,Po as checkTemplateFile,Qo as checkTemplate,If as checkCache,iq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,wn as channel,po as captureScreenshots,oo as captureScreenshot,Z as cancelPendingLoads,Mk as calculateSha1,Oi as calculateOptimalWidths,Jf as cacheTemplate,Hf as cacheEngineFingerprint,Wj as buildWebComponents,So as buildVirtualSource,Xq as buildViews,Ap as buildUrl,Fe as buildSuspenseResolveScript,Ir as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Im as buildRuntimeAsset,Jm as buildRouterAsset,Hr as buildLangPickerScript,Ui as buildImageUrl,Fg as buildIdFragment,Kg as buildHtmlAttrs,Zm as buildForProduction,En as buildComponentLibrary,jq as buildAuthParams,_m as buildApp,Fr as buildAlternateLinks,wo as build,un as broadcastPrivate,vn as broadcastPresence,rn as broadcast,Np as brightness,Mb as bracketDepths,Ip as blur,Eb as blankInertHtmlRegions,dq as batchSignUrls,Xe as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,Vp as auto,ja as attributeValue,Km as assetTags,Fb as asInvocableStatement,Ur as arrayOf,Cr as applyTranslations,zj as applyTransformations,hi as applySlots,An as applyPropDefaults,Yp as applyPreset,Mg as applyHtmlAttrs,ce as applyHead,Cc as applyFilters,tm as appendVary,Dd as apiCspPreset,Da as animationGroupDirective,Qj as analyzeVideo,bn as analyzeUsage,jm as analyzeTemplate,km as analyzeProject,bn as analyzeDirectiveUsage,Vc as analyticsDirective,Go as addStore,Fo as addPage,Hd as addNonceToInlineContent,Ho as addLayout,Eo as addComponent,Vm as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Cf as __setSignalsGeneratorsForTest,Dg as __setBuildIdForTest,Hj as VideoProcessorCache,Vh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,gd as Tokenizer,No as TemplateTypeChecker,so as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,gr as Show,Ge as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,bc as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,pm as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Wc as RESPONSE_STATUS_KEY,Xc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,vo as ProductionBuild,ir as Portal,Co as PROJECT_TEMPLATES,Xp as PRESETS,sb as NON_CLIENT_PRIMITIVES,rp as MemorySessionStore,Li as MIME_TYPES,Ii as MEDIA_DEFAULT_WIDTHS,Ki as MEDIA_DEFAULT_FORMATS,Dm as LAYOUT_TYPES_FILE,wj as ImageProcessorCache,ll as ImageProcessingError,mp as HydrationRuntime,tk as HotReloadServer,mb as HeatmapAggregator,Ig as HTML_CLASS_MARKER,Hg as HTML_ATTRS_MARKER,$q as Fragment,hr as For,qm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Bk as EXTERNALIZED_ASSET_DIR,Zk as DeployError,_k as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,al as DEFAULT_QUALITY,$i as DEFAULT_PLACEHOLDER_OPTIONS,$k as DEFAULT_FORMATS,Ji as DEFAULT_DPR_VALUES,dp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,Ti as COMMON_SIZES,ug as COLOR_MODE_BOOT_MARKER,vg as COLOR_MODE_BOOT_GLOBAL,Gg as CLOAK_STYLE,yn as BroadcastServer,xn as Broadcast,Ag as BUILD_ID_META,Bg as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,aj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,sr as $path};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{$f as e}from"./chunk-gdbkqatx.js";import{Fg as EF,tg as t,vg as kF,wg as UF,xg as wF}from"./chunk-cmtjq1db.js";import{Ig as BF}from"./chunk-dvvx1wny.js";import{yj as l,zj as d}from"./chunk-71y3bhcw.js";import{Mk as HF,Nk as IF,Ok as KF}from"./chunk-4jdj52c5.js";import{wl as YF,yl as ZF}from"./chunk-p1hy2bwn.js";import{$m as s,Br as o,Dr as M,Fp as $F,Up as GF,aq as VF,eq as r,um as p,vo as zF,wm as i}from"./chunk-kxtqbrfr.js";import{fu as qF}from"./chunk-kffndzch.js";import{xu as XF}from"./chunk-r8rbf28v.js";import{Fu as WF}from"./chunk-n66k2v2q.js";import{Ku as QF}from"./chunk-vvd659y4.js";import{gw as h,iw as _F}from"./chunk-hzfd8cz0.js";import G from"fs";import q from"path";import{createHash as NF}from"crypto";_F();function u(Q){return NF("sha256").update(Q).digest("hex").slice(0,8)}function c(Q=!1){let z=Q?d():l(),Z=u(z);return{content:z,filename:`runtime.${Z}.js`,hash:Z}}function a(){let Q=h(),z=u(Q);return{content:Q,filename:`router.${z}.js`,hash:z}}function bF(Q){return{runtimeTag:Q.runtime?`<script src="/__stx/${Q.runtime.filename}"></script>`:"",routerTag:Q.router?`<script src="/__stx/${Q.router.filename}"></script>`:"",cssTag:Q.css?`<link rel="stylesheet" href="/__stx/${Q.css.filename}">`:""}}import n from"path";import{createHash as OF}from"crypto";function TF(Q={}){let z=new Set;return{context:new Proxy(Q,{get(X,F){if(F in X)return X[F];if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return},has(X,F){if(F in X)return!0;if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return!1}}),accessedKeys:z}}async function FF(Q,z,Z={}){let X=n.resolve(Q),F=await Bun.file(X).text(),U=OF("sha256").update(F).digest("hex").slice(0,16);p();let w={};try{w=await M(Z.configDir)}catch{}let H=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(F))!==null){let E=k[1];if(/\bserver\b/.test(E))H.push(k[2])}let W=new Set(H.flatMap((E)=>e(E))),{context:_}=TF({__filename:X,__dirname:n.dirname(X),__stx_serverDeclared:W}),N=new Set,x={...o,...w,...Z,buildMode:"compile",strict:!1},I=await r(F,_,X,x,N),O=t(I),j=i();return{route:z,sourceFile:Q,html:I,fragment:O,placeholders:j,hasServerScripts:H.length>0,serverScriptContent:H,dependencies:Array.from(N),contentHash:U,status:s(F),streamTemplates:_.__streamTemplates}}var MF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function JF(Q,z){let Z=0,X=0;if(!G.existsSync(Q))return{copied:Z,bytes:X};G.mkdirSync(z,{recursive:!0});function F(U,w){let H=G.readdirSync(U,{withFileTypes:!0});for(let V of H){if(MF.has(V.name))continue;let k=q.join(U,V.name),W=q.join(w,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),F(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),Z++,X+=G.statSync(W).size}}}return F(Q,z),{copied:Z,bytes:X}}async function qJ(Q={}){let z=Date.now(),Z=q.resolve(Q.root||process.cwd()),X=q.resolve(Z,Q.outputDir||".output");console.log("[stx build] Starting production build...");let F=await M(Z),U=q.resolve(Z,Q.componentsDir??F.componentsDir??"components"),w=q.resolve(Z,Q.partialsDir??F.partialsDir??"partials"),H=q.resolve(Z,Q.layoutsDir??F.layoutsDir??"layouts"),V=Q.publicDir??F.publicDir??"public",k=F.app?.head||{},W=F.app?.colorMode,_=F.router?.container||"main",N=Q.routeRules??F.routeRules??{},x=BF(N),I=Q.serverApi??F.serverApi,O=typeof I==="object"?I:{};if(I)YF(Z,O);if(F.runtimeConfig)QF(F.runtimeConfig,{});if(G.existsSync(X))G.rmSync(X,{recursive:!0});let j=[q.join(X,"public","__stx"),q.join(X,"public","assets"),q.join(X,"server","pages"),q.join(X,"server","fragments")];for(let Y of j)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let E=zF(Z,{pagesDirs:F._layerPageDirs}),LF=["components","layouts","partials"],y=E.filter((Y)=>{return!LF.some((B)=>Y.pattern.startsWith(`/${B}/`)||Y.pattern===`/${B}`)});console.log(`[stx build] Found ${y.length} page routes (${E.length-y.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let L=c(Q.debug),K=a();await Bun.write(q.join(X,"public","__stx",L.filename),L.content),await Bun.write(q.join(X,"public","__stx",K.filename),K.content),console.log(`[stx build] Runtime: ${L.filename} (${(L.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${K.filename} (${(K.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let R=[],v=[];for(let Y of y){let B=x(Y.pattern),b=B.rendering==="prerender";if(b&&(Y.pattern.includes(":")||Y.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${Y.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let J=await FF(Y.filePath,Y.pattern,{configDir:Z,componentsDir:U,partialsDir:w,layoutsDir:H,debug:Q.debug});if(R.push(J),J.html=J.html.replace(/runtime\.__STX_HASH__\.js/g,L.filename).replace(/router\.__STX_HASH__\.js/g,K.filename),J.html=VF(J.html,k,{bodyScripts:[`<script src="/__stx/${K.filename}"></script>`],...W&&{colorMode:W}}),W)J.html=$F(J.html,W);if(k.htmlAttrs)J.html=GF(J.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(J.html)){let $=J.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if($&&$[1]){let m=$[1];J.html=J.html.replace(" "+m,""),J.html=J.html.replace(/<body([^>]*)>/,`<body$1 ${m}>`)}}if(J.html=J.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),J.html=await qF(J.html),b){let $=await EF(J,{params:{},request:new Request(`http://stx.build${Y.pattern}`),method:"GET",__stx_strict_hydration:!0});if($.redirect||$.cookies?.length||$.boundaries?.length||$.headers&&Object.keys($.headers).length)throw Error(`Prerendered route ${Y.pattern} cannot set response headers/cookies, redirect or stream`);J.html=$.html,J.status=$.status??J.status,J.hasServerScripts=!1,J.serverScriptContent=[],J.placeholders={}}J.fragment=kF(J.html,_);let C=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),g=q.join("server","pages",`${C}.compiled.json`),f=q.join("server","fragments",`${C}.html`);await Bun.write(q.join(X,g),JSON.stringify(J,null,2)),await Bun.write(q.join(X,f),J.fragment),v.push({pattern:Y.pattern,compiledPath:g,fragmentPath:f,isDynamic:J.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("["),prerendered:b}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(J){if(Object.keys(B).length)throw J;console.error(`[stx build] \u2717 ${Y.pattern}:`,J instanceof Error?J.message:J)}}let P=q.resolve(Z,V);if(G.existsSync(P)){let{copied:Y,bytes:B}=JF(P,q.join(X,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${V}/`)}let A=KF(Z);if(A){let{copied:Y,bytes:B}=JF(A,q.join(X,"public",IF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${HF}/`)}let S={runtime:L.filename,router:K.filename},T=UF(v,S,X);if(T.routeRules=N,T.routerContainer=_,I)T.apiRoutes=await ZF(Z,X,O);if(F.runtimeConfig)await Bun.write(q.join(X,"server/runtime-config.json"),JSON.stringify(F.runtimeConfig)),await WF(Z,F.runtimeConfig);if(F._layerGraph)await Bun.write(q.join(X,"server/layers.json"),JSON.stringify(XF(F._layerGraph),null,2));wF(T,X);let D=Date.now()-z;return console.log(`
2
+ import{$f as e}from"./chunk-gdbkqatx.js";import{Fg as EF,tg as t,vg as kF,wg as UF,xg as wF}from"./chunk-y085rdre.js";import{Ig as BF}from"./chunk-dvvx1wny.js";import{yj as l,zj as d}from"./chunk-71y3bhcw.js";import{Mk as HF,Nk as IF,Ok as KF}from"./chunk-4jdj52c5.js";import{wl as YF,yl as ZF}from"./chunk-p1hy2bwn.js";import{$m as s,Br as o,Dr as M,Fp as $F,Up as GF,aq as VF,eq as r,um as p,vo as zF,wm as i}from"./chunk-kxtqbrfr.js";import{fu as qF}from"./chunk-kffndzch.js";import{xu as XF}from"./chunk-r8rbf28v.js";import{Fu as WF}from"./chunk-n66k2v2q.js";import{Ku as QF}from"./chunk-vvd659y4.js";import{gw as h,iw as _F}from"./chunk-hzfd8cz0.js";import G from"fs";import q from"path";import{createHash as NF}from"crypto";_F();function u(Q){return NF("sha256").update(Q).digest("hex").slice(0,8)}function c(Q=!1){let z=Q?d():l(),Z=u(z);return{content:z,filename:`runtime.${Z}.js`,hash:Z}}function a(){let Q=h(),z=u(Q);return{content:Q,filename:`router.${z}.js`,hash:z}}function bF(Q){return{runtimeTag:Q.runtime?`<script src="/__stx/${Q.runtime.filename}"></script>`:"",routerTag:Q.router?`<script src="/__stx/${Q.router.filename}"></script>`:"",cssTag:Q.css?`<link rel="stylesheet" href="/__stx/${Q.css.filename}">`:""}}import n from"path";import{createHash as OF}from"crypto";function TF(Q={}){let z=new Set;return{context:new Proxy(Q,{get(X,F){if(F in X)return X[F];if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return},has(X,F){if(F in X)return!0;if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return!1}}),accessedKeys:z}}async function FF(Q,z,Z={}){let X=n.resolve(Q),F=await Bun.file(X).text(),U=OF("sha256").update(F).digest("hex").slice(0,16);p();let w={};try{w=await M(Z.configDir)}catch{}let H=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(F))!==null){let E=k[1];if(/\bserver\b/.test(E))H.push(k[2])}let W=new Set(H.flatMap((E)=>e(E))),{context:_}=TF({__filename:X,__dirname:n.dirname(X),__stx_serverDeclared:W}),N=new Set,x={...o,...w,...Z,buildMode:"compile",strict:!1},I=await r(F,_,X,x,N),O=t(I),j=i();return{route:z,sourceFile:Q,html:I,fragment:O,placeholders:j,hasServerScripts:H.length>0,serverScriptContent:H,dependencies:Array.from(N),contentHash:U,status:s(F),streamTemplates:_.__streamTemplates}}var MF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function JF(Q,z){let Z=0,X=0;if(!G.existsSync(Q))return{copied:Z,bytes:X};G.mkdirSync(z,{recursive:!0});function F(U,w){let H=G.readdirSync(U,{withFileTypes:!0});for(let V of H){if(MF.has(V.name))continue;let k=q.join(U,V.name),W=q.join(w,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),F(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),Z++,X+=G.statSync(W).size}}}return F(Q,z),{copied:Z,bytes:X}}async function qJ(Q={}){let z=Date.now(),Z=q.resolve(Q.root||process.cwd()),X=q.resolve(Z,Q.outputDir||".output");console.log("[stx build] Starting production build...");let F=await M(Z),U=q.resolve(Z,Q.componentsDir??F.componentsDir??"components"),w=q.resolve(Z,Q.partialsDir??F.partialsDir??"partials"),H=q.resolve(Z,Q.layoutsDir??F.layoutsDir??"layouts"),V=Q.publicDir??F.publicDir??"public",k=F.app?.head||{},W=F.app?.colorMode,_=F.router?.container||"main",N=Q.routeRules??F.routeRules??{},x=BF(N),I=Q.serverApi??F.serverApi,O=typeof I==="object"?I:{};if(I)YF(Z,O);if(F.runtimeConfig)QF(F.runtimeConfig,{});if(G.existsSync(X))G.rmSync(X,{recursive:!0});let j=[q.join(X,"public","__stx"),q.join(X,"public","assets"),q.join(X,"server","pages"),q.join(X,"server","fragments")];for(let Y of j)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let E=zF(Z,{pagesDirs:F._layerPageDirs}),LF=["components","layouts","partials"],y=E.filter((Y)=>{return!LF.some((B)=>Y.pattern.startsWith(`/${B}/`)||Y.pattern===`/${B}`)});console.log(`[stx build] Found ${y.length} page routes (${E.length-y.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let L=c(Q.debug),K=a();await Bun.write(q.join(X,"public","__stx",L.filename),L.content),await Bun.write(q.join(X,"public","__stx",K.filename),K.content),console.log(`[stx build] Runtime: ${L.filename} (${(L.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${K.filename} (${(K.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let R=[],v=[];for(let Y of y){let B=x(Y.pattern),b=B.rendering==="prerender";if(b&&(Y.pattern.includes(":")||Y.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${Y.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let J=await FF(Y.filePath,Y.pattern,{configDir:Z,componentsDir:U,partialsDir:w,layoutsDir:H,debug:Q.debug});if(R.push(J),J.html=J.html.replace(/runtime\.__STX_HASH__\.js/g,L.filename).replace(/router\.__STX_HASH__\.js/g,K.filename),J.html=VF(J.html,k,{bodyScripts:[`<script src="/__stx/${K.filename}"></script>`],...W&&{colorMode:W}}),W)J.html=$F(J.html,W);if(k.htmlAttrs)J.html=GF(J.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(J.html)){let $=J.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if($&&$[1]){let m=$[1];J.html=J.html.replace(" "+m,""),J.html=J.html.replace(/<body([^>]*)>/,`<body$1 ${m}>`)}}if(J.html=J.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),J.html=await qF(J.html),b){let $=await EF(J,{params:{},request:new Request(`http://stx.build${Y.pattern}`),method:"GET",__stx_strict_hydration:!0});if($.redirect||$.cookies?.length||$.boundaries?.length||$.headers&&Object.keys($.headers).length)throw Error(`Prerendered route ${Y.pattern} cannot set response headers/cookies, redirect or stream`);J.html=$.html,J.status=$.status??J.status,J.hasServerScripts=!1,J.serverScriptContent=[],J.placeholders={}}J.fragment=kF(J.html,_);let C=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),g=q.join("server","pages",`${C}.compiled.json`),f=q.join("server","fragments",`${C}.html`);await Bun.write(q.join(X,g),JSON.stringify(J,null,2)),await Bun.write(q.join(X,f),J.fragment),v.push({pattern:Y.pattern,compiledPath:g,fragmentPath:f,isDynamic:J.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("["),prerendered:b}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(J){if(Object.keys(B).length)throw J;console.error(`[stx build] \u2717 ${Y.pattern}:`,J instanceof Error?J.message:J)}}let P=q.resolve(Z,V);if(G.existsSync(P)){let{copied:Y,bytes:B}=JF(P,q.join(X,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${V}/`)}let A=KF(Z);if(A){let{copied:Y,bytes:B}=JF(A,q.join(X,"public",IF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${HF}/`)}let S={runtime:L.filename,router:K.filename},T=UF(v,S,X);if(T.routeRules=N,T.routerContainer=_,I)T.apiRoutes=await ZF(Z,X,O);if(F.runtimeConfig)await Bun.write(q.join(X,"server/runtime-config.json"),JSON.stringify(F.runtimeConfig)),await WF(Z,F.runtimeConfig);if(F._layerGraph)await Bun.write(q.join(X,"server/layers.json"),JSON.stringify(XF(F._layerGraph),null,2));wF(T,X);let D=Date.now()-z;return console.log(`
3
3
  [stx build] Done in ${D}ms \u2014 ${R.length} pages compiled`),{pageCount:R.length,assets:S,outputDir:X,duration:D}}
4
4
  export{u as Rf,c as Sf,a as Tf,bF as Uf,FF as Vf,qJ as Wf};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Gm as R,Om as k,Oo as l,To as T,Zp as m,cn as d,dn as c,ym as P,zm as D}from"./chunk-kxtqbrfr.js";import{Ht as S,Jt as v}from"./chunk-kffndzch.js";import{fw as XJ,hw as YJ,iw as ZJ}from"./chunk-hzfd8cz0.js";import{pw as QJ,sw as q}from"./chunk-hyfjnn7g.js";var n=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function r(J,Y,Q){let X={fullTag:Q,content:Y,attrs:J};if(/\bserver\b/.test(J))return{...X,type:"server"};if(/\bdata-stx-scoped\b/.test(J))return{...X,type:"client"};if(n.test(Y))return{...X,type:"signals"};if(/\bclient\b/.test(J)||/\btype\s*=\s*["']module["']/.test(J)||/\bsrc\s*=/.test(J))return{...X,type:"client"};return{...X,type:"server"}}var s=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function y(J){let Y=[],Q=[],X=[],$=0;while($<J.length){let Z=J.indexOf("<",$);if(Z===-1)break;let U=v(J,Z);if(U>Z){$=U;continue}let W=S(J,Z);if(W>Z){let j=J.slice(Z,W),F=s.exec(j);if(F){let K=r(F[1],F[2],j);switch(K.type){case"signals":Y.push(K);break;case"client":Q.push(K);break;case"server":X.push(K);break}}$=W;continue}$=Z+(J.startsWith("<!--",Z)?4:1)}return{signals:Y,client:Q,server:X}}var o=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function a(J){let Y=[],Q=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,X;while((X=Q.exec(J))!==null)Y.push({start:X.index,end:X.index+X[0].length});return Y}function C(J,Y){return Y.some((Q)=>J>=Q.start&&J<Q.end)}function t(J){let Y=(J||"").trim();if(!Y)return null;if(/[\s>+~,:]/.test(Y))return null;let Q={},X=Y,$=X.match(/^[a-z][\w-]*/i);if($)Q.tag=$[0].toLowerCase(),X=X.slice($[0].length);while(X.length>0){let Z=X.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(Z){if(Q.attr=Z[1],Z[3]!==void 0&&Z[3]!=="")Q.attrValue=Z[3];X=X.slice(Z[0].length);continue}let U=X.match(/^#([\w-]+)/);if(U){Q.id=U[1],X=X.slice(U[0].length);continue}let W=X.match(/^\.([\w-]+)/);if(W){Q.className=W[1],X=X.slice(W[0].length);continue}return null}if(!Q.tag&&!Q.attr&&!Q.id&&!Q.className)return null;return Q}function e(J,Y){if(Y.attr){if(!(Y.attrValue===void 0?new RegExp(`\\b${Y.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${Y.attr}\\s*=\\s*(["'])\\s*${Y.attrValue}\\s*\\1`,"i")).test(J))return!1}if(Y.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${Y.id}\\s*\\1`,"i").test(J))return!1}if(Y.className){let Q=J.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!Q)return!1;if(!Q[2].split(/\s+/).includes(Y.className))return!1}return!0}function x(J,Y="main"){let Q=t(Y);if(!Q)return null;let X=/<([a-z][\w-]*)\b([^>]*)>/gi,$=a(J),Z;while((Z=X.exec(J))!==null){if(C(Z.index,$))continue;let U=Z[1].toLowerCase(),W=Z[2]||"";if(W.trimEnd().endsWith("/")||o.has(U))continue;if(Q.tag&&Q.tag!==U)continue;if(!e(W,Q))continue;let j=Z[0],F=Z.index+j.length,K=new RegExp(`<(/?)${U}\\b([^>]*)>`,"gi");K.lastIndex=F;let G=1,B;while((B=K.exec(J))!==null){if(C(B.index,$))continue;let w=B[1]==="/";if(!w&&(B[2]||"").trimEnd().endsWith("/"))continue;if(G+=w?-1:1,G===0)return{openTag:j,openIndex:Z.index,start:F,end:B.index,tagName:U}}return null}return null}var wJ="X-STX-Router",NJ="private, no-store";function AJ(J){return J.replace(/&#(\d+);/g,(Y,Q)=>f(Number(Q),Y)).replace(/&#x([0-9a-f]+);/gi,(Y,Q)=>f(Number.parseInt(Q,16),Y)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function f(J,Y){if(!Number.isInteger(J)||J<0||J>1114111)return Y;try{return String.fromCodePoint(J)}catch{return Y}}function g(J){return J.headers.get("X-STX-Router")==="true"}function JJ(J,Y){if(!J)return Y;return J.split(",").some((X)=>X.trim().toLowerCase()===Y.toLowerCase())?J:`${J}, ${Y}`}function IJ(J){return{Vary:JJ(J,"X-STX-Router")}}import E from"path";XJ();var $J="stx-page-head:",UJ=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,O=null;function WJ(){if(O!==null)return O;try{let{getRouterScript:J}=(ZJ(),QJ(YJ));O=`<script>${J()}</script>`}catch{O=""}return O}async function MJ(J,Y){if(Y===!1)return null;if(Y&&typeof Y==="string"){let X=E.resolve(J,Y);if(await Bun.file(X).exists())return X;return null}let Q=E.join(J,"app.stx");if(await Bun.file(Q).exists())return Q;return null}async function bJ(J,Y){try{let Q=await Bun.file(J).text(),X=Q,$=Q.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)X=$[1].trim();let Z=y(Q),U=[...Z.client.map((V)=>V.fullTag),...Z.signals.map((V)=>V.fullTag)],W=[],j=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,F;while((F=j.exec(Q))!==null)W.push(F[0]);let K=X;for(let V of Z.server)K=K.replace(V.fullTag,"");for(let V of Z.client)K=K.replace(V.fullTag,"");K=K.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let G="<!--__STX_PAGE_SLOT__-->";if(K=K.replace(/<slot\s*\/>/gi,G).replace(/<slot\s*>\s*<\/slot>/gi,G),!K.includes(G))return console.warn(`[stx] Shell ${J} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:B,extractVariables:w,defaultConfig:N,loadStxConfig:I}=await import("./chunk-c1c2a5es.js"),_=await I(),z={__filename:J,__dirname:E.dirname(J)};for(let V of U){let L=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(L&&!V.includes("client")&&!V.includes('type="module"'))await w(L[1],z,J)}let A=await B(K,z,J,{...N,..._,...Y},new Set),H=A.indexOf(G);if(H===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:A.substring(0,H),afterSlot:A.substring(H+G.length),filePath:J,shellScripts:U,shellStyles:W}}catch(Q){return console.error(`[stx] Error processing shell ${J}:`,Q),null}}function PJ(J,Y,Q){let X,$="",Z=Y.match(UJ);if(Z){Y=Y.replace(Z[0],"");try{let K=Buffer.from(Z[1],"base64").toString("utf8"),G=K.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(G)X=G[1].trim();$=K.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let U=Q||X||"stx App",W=WJ(),j="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
2
+ import{Gm as R,Om as k,Oo as l,To as T,Zp as m,cn as d,dn as c,ym as P,zm as D}from"./chunk-kxtqbrfr.js";import{Ht as S,Jt as v}from"./chunk-kffndzch.js";import{fw as XJ,hw as YJ,iw as ZJ}from"./chunk-hzfd8cz0.js";import{pw as QJ,sw as q}from"./chunk-hyfjnn7g.js";var n=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function r(J,Y,Q){let X={fullTag:Q,content:Y,attrs:J};if(/\bserver\b/.test(J))return{...X,type:"server"};if(/\bdata-stx-scoped\b/.test(J))return{...X,type:"client"};if(n.test(Y))return{...X,type:"signals"};if(/\bclient\b/.test(J)||/\btype\s*=\s*["']module["']/.test(J)||/\bsrc\s*=/.test(J))return{...X,type:"client"};return{...X,type:"server"}}var s=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function y(J){let Y=[],Q=[],X=[],$=0;while($<J.length){let Z=J.indexOf("<",$);if(Z===-1)break;let U=v(J,Z);if(U>Z){$=U;continue}let W=S(J,Z);if(W>Z){let j=J.slice(Z,W),F=s.exec(j);if(F){let K=r(F[1],F[2],j);switch(K.type){case"signals":Y.push(K);break;case"client":Q.push(K);break;case"server":X.push(K);break}}$=W;continue}$=Z+(J.startsWith("<!--",Z)?4:1)}return{signals:Y,client:Q,server:X}}var o=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function a(J){let Y=[],Q=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,X;while((X=Q.exec(J))!==null)Y.push({start:X.index,end:X.index+X[0].length});return Y}function C(J,Y){return Y.some((Q)=>J>=Q.start&&J<Q.end)}function t(J){let Y=(J||"").trim();if(!Y)return null;if(/[\s>+~,:]/.test(Y))return null;let Q={},X=Y,$=X.match(/^[a-z][\w-]*/i);if($)Q.tag=$[0].toLowerCase(),X=X.slice($[0].length);while(X.length>0){let Z=X.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(Z){if(Q.attr=Z[1],Z[3]!==void 0&&Z[3]!=="")Q.attrValue=Z[3];X=X.slice(Z[0].length);continue}let U=X.match(/^#([\w-]+)/);if(U){Q.id=U[1],X=X.slice(U[0].length);continue}let W=X.match(/^\.([\w-]+)/);if(W){Q.className=W[1],X=X.slice(W[0].length);continue}return null}if(!Q.tag&&!Q.attr&&!Q.id&&!Q.className)return null;return Q}function e(J,Y){if(Y.attr){if(!(Y.attrValue===void 0?new RegExp(`\\b${Y.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${Y.attr}\\s*=\\s*(["'])\\s*${Y.attrValue}\\s*\\1`,"i")).test(J))return!1}if(Y.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${Y.id}\\s*\\1`,"i").test(J))return!1}if(Y.className){let Q=J.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!Q)return!1;if(!Q[2].split(/\s+/).includes(Y.className))return!1}return!0}function x(J,Y="main"){let Q=t(Y);if(!Q)return null;let X=/<([a-z][\w-]*)\b([^>]*)>/gi,$=a(J),Z;while((Z=X.exec(J))!==null){if(C(Z.index,$))continue;let U=Z[1].toLowerCase(),W=Z[2]||"";if(W.trimEnd().endsWith("/")||o.has(U))continue;if(Q.tag&&Q.tag!==U)continue;if(!e(W,Q))continue;let j=Z[0],F=Z.index+j.length,K=new RegExp(`<(/?)${U}\\b([^>]*)>`,"gi");K.lastIndex=F;let G=1,B;while((B=K.exec(J))!==null){if(C(B.index,$))continue;let w=B[1]==="/";if(!w&&(B[2]||"").trimEnd().endsWith("/"))continue;if(G+=w?-1:1,G===0)return{openTag:j,openIndex:Z.index,start:F,end:B.index,tagName:U}}return null}return null}var wJ="X-STX-Router",NJ="private, no-store";function AJ(J){return J.replace(/&#(\d+);/g,(Y,Q)=>f(Number(Q),Y)).replace(/&#x([0-9a-f]+);/gi,(Y,Q)=>f(Number.parseInt(Q,16),Y)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function f(J,Y){if(!Number.isInteger(J)||J<0||J>1114111)return Y;try{return String.fromCodePoint(J)}catch{return Y}}function g(J){return J.headers.get("X-STX-Router")==="true"}function JJ(J,Y){if(!J)return Y;return J.split(",").some((X)=>X.trim().toLowerCase()===Y.toLowerCase())?J:`${J}, ${Y}`}function IJ(J){return{Vary:JJ(J,"X-STX-Router")}}import E from"path";XJ();var $J="stx-page-head:",UJ=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,O=null;function WJ(){if(O!==null)return O;try{let{getRouterScript:J}=(ZJ(),QJ(YJ));O=`<script>${J()}</script>`}catch{O=""}return O}async function MJ(J,Y){if(Y===!1)return null;if(Y&&typeof Y==="string"){let X=E.resolve(J,Y);if(await Bun.file(X).exists())return X;return null}let Q=E.join(J,"app.stx");if(await Bun.file(Q).exists())return Q;return null}async function bJ(J,Y){try{let Q=await Bun.file(J).text(),X=Q,$=Q.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)X=$[1].trim();let Z=y(Q),U=[...Z.client.map((V)=>V.fullTag),...Z.signals.map((V)=>V.fullTag)],W=[],j=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,F;while((F=j.exec(Q))!==null)W.push(F[0]);let K=X;for(let V of Z.server)K=K.replace(V.fullTag,"");for(let V of Z.client)K=K.replace(V.fullTag,"");K=K.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let G="<!--__STX_PAGE_SLOT__-->";if(K=K.replace(/<slot\s*\/>/gi,G).replace(/<slot\s*>\s*<\/slot>/gi,G),!K.includes(G))return console.warn(`[stx] Shell ${J} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:B,extractVariables:w,defaultConfig:N,loadStxConfig:I}=await import("./chunk-q86snkvs.js"),_=await I(),z={__filename:J,__dirname:E.dirname(J)};for(let V of U){let L=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(L&&!V.includes("client")&&!V.includes('type="module"'))await w(L[1],z,J)}let A=await B(K,z,J,{...N,..._,...Y},new Set),H=A.indexOf(G);if(H===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:A.substring(0,H),afterSlot:A.substring(H+G.length),filePath:J,shellScripts:U,shellStyles:W}}catch(Q){return console.error(`[stx] Error processing shell ${J}:`,Q),null}}function PJ(J,Y,Q){let X,$="",Z=Y.match(UJ);if(Z){Y=Y.replace(Z[0],"");try{let K=Buffer.from(Z[1],"base64").toString("utf8"),G=K.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(G)X=G[1].trim();$=K.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let U=Q||X||"stx App",W=WJ(),j="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Bg as WJ,Dg as YJ,Fg as jJ,lg as ZJ,ng as g,pg as A,vg as n,yg as GJ}from"./chunk-cmtjq1db.js";import{Ig as $J}from"./chunk-dvvx1wny.js";import{Al as XJ}from"./chunk-p1hy2bwn.js";import{xo as h}from"./chunk-kxtqbrfr.js";import{zt as e}from"./chunk-kffndzch.js";import{Gu as QJ,Ku as i,Mu as p}from"./chunk-vvd659y4.js";import{Dv as KJ,ew as l,iw as VJ}from"./chunk-hzfd8cz0.js";import{sw as DJ}from"./chunk-hyfjnn7g.js";import JJ from"fs";import k from"path";var{serve:wJ}=globalThis.Bun;VJ();import y from"zlib";import{promisify as a}from"util";var IJ=a(y.brotliCompress),OJ=a(y.gzip),UJ=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],BJ=["text/event-stream","multipart/x-mixed-replace"],_J=1024;function zJ(K){if(!K)return!1;let J=K.toLowerCase();if(BJ.some((G)=>J.startsWith(G)))return!1;return UJ.some((G)=>J.startsWith(G))}function FJ(K){let J=new Map;for(let G of K.split(",")){let[Z,...W]=G.trim().split(";"),O=Z.trim().toLowerCase();if(!O)continue;let U=1;for(let B of W){let w=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(B);if(!w)continue;let F=Number.parseFloat(w[1]);if(Number.isFinite(F))U=F}J.set(O,U)}return J}function LJ(K){if(!K)return null;let J=FJ(K),G=J.get("*"),Z=(W)=>J.get(W)??G??0;if(Z("br")>0)return"br";if(Z("gzip")>0)return"gzip";return null}async function t(K,J,G={}){if(J.headers.get("content-encoding"))return J;if(J.status===204||J.status===304||!J.body)return J;if(!zJ(J.headers.get("content-type")))return J;let Z=LJ(K.headers.get("accept-encoding"));if(!Z)return J;let W;try{W=new Uint8Array(await J.arrayBuffer())}catch{return J}let O=()=>new Response(W,{status:J.status,statusText:J.statusText,headers:s(J.headers)});if(W.length<(G.threshold??_J))return O();try{let U=Z==="br"?await IJ(W,{params:{[y.constants.BROTLI_PARAM_QUALITY]:G.quality??5,[y.constants.BROTLI_PARAM_SIZE_HINT]:W.length}}):await OJ(W);if(U.length>=W.length)return O();let B=s(J.headers);return B.set("Content-Encoding",Z),B.set("Content-Length",String(U.length)),new Response(U,{status:J.status,statusText:J.statusText,headers:B})}catch{return O()}}function s(K){let J=new Headers(K),G=J.get("Vary");if(!G)return J.set("Vary","Accept-Encoding"),J;if(!G.split(",").some((W)=>W.trim().toLowerCase()==="accept-encoding"))J.set("Vary",`${G}, Accept-Encoding`);return J}class d{now;entries=new e(1000,{maxBytes:33554432,sizeOf:(K)=>K.body.byteLength+JSON.stringify(K.headers).length*2});pending=new Map;generation=0;constructor(K=Date.now){this.now=K}invalidate(K){this.generation++,this.pending.clear();for(let J of Array.from(this.entries.keys()))if(K===void 0||this.entries.get(J)?.path===K)this.entries.delete(J)}async respond(K,J,G){let Z,W=async()=>{let X=Z??await G();return X.headers.set("Cache-Control","private, no-store"),X.headers.set("Vary",A(X.headers.get("Vary")).Vary),X};if(!J||K.method!=="GET"||K.headers.has("Cookie")||K.headers.has("Authorization")||K.headers.has("Range"))return W();let O=new URL(K.url),U=`${O.origin}${O.pathname}${O.search}|${g(K)?"fragment":"document"}`,B=this.entries.get(U),w=(X)=>{let T=new Headers(X.headers);return T.set("Cache-Control","private, no-store"),T.set("Age",String(Math.max(0,Math.floor((this.now()-X.created)/1000)))),new Response(X.body.slice(0),{headers:T})},F=B?(this.now()-B.created)/1000:1/0;if(B&&F<J.maxAge)return w(B);let S=this.generation,q=async()=>{let X=await G();Z=X;let T=(X.headers.get("Vary")??"").toLowerCase().split(",").map((L)=>L.trim()).filter(Boolean);if(X.status!==200||X.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(X.headers.get("Cache-Control")??"")||T.some((L)=>L!=="x-stx-router"&&L!=="accept-encoding"))return null;let M=await X.clone().arrayBuffer();if(M.byteLength>1048576)return null;X.headers.set("Vary",A(X.headers.get("Vary")).Vary);let Q={body:M,headers:Array.from(X.headers.entries()),created:this.now(),path:O.pathname};if(this.generation===S)this.entries.set(U,Q);return Q},H=this.pending.get(U);if(!H){if(this.pending.size>=1000)return W();H=q().finally(()=>{if(this.pending.get(U)===H)this.pending.delete(U)}),this.pending.set(U,H)}if(B&&F<J.maxAge+(J.swr??0))return H.catch(()=>{}),w(B);let x=await H;return x?w(x):W()}}var HJ={".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 uJ(K={}){let J=k.resolve(K.outputDir||".output"),G=K.port??3000,Z=GJ(J);if(!Z)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${Z.routes.length} routes...`);let W=$J(Z.routeRules),O=new d,U=XJ(J,Z.apiRoutes??[]),B=Bun.file(k.join(J,"server/runtime-config.json")),w=K.runtimeConfig??(await B.exists()?await B.json():void 0),F=w?i(w):void 0,S=new Map,q=new Map,H=new Map,x=new Map;for(let Q of Z.routes)try{let L=k.join(J,Q.compiledPath),Y=JSON.parse(await Bun.file(L).text());if(F)Y.html=p(Y.html,F);S.set(Q.pattern,Y),H.set(Q.pattern,l(Y.html)),x.set(Q.pattern,h(Y.html));let C=k.join(J,Q.fragmentPath);if(await Bun.file(C).exists()){let P=await Bun.file(C).text();q.set(Q.pattern,F?p(P,F):P)}}catch(L){console.warn(`[stx] Failed to load route ${Q.pattern}:`,L)}let X=new Map,T=[];for(let Q of Z.routes)if(Q.hasParams){let{regex:L,params:Y}=KJ(Q.pattern);T.push({regex:L,route:Q,paramNames:Y})}else X.set(Q.pattern,Q);let M=wJ({port:G,async fetch(Q){return t(Q,await QJ(F??i(),async()=>{let Y=new URL(Q.url).pathname;if(K.onRequest){let j=await K.onRequest(Q);if(j)return j}if(K.apiRouter){let j=await K.apiRouter.handleRequest(Q);if(j.status!==404)return j}if(K.apiRoutes?.[Y])return K.apiRoutes[Y](Q);let C=await U(Q);if(C)return C;if((Q.method==="GET"||Q.method==="HEAD")&&Y!=="/"){let j=k.resolve(J,"public"),_;try{_=decodeURIComponent(Y)}catch{_=Y}if(!_.includes("\x00")){let I=k.resolve(j,`.${_}`);if(I===j||I.startsWith(`${j}${k.sep}`))try{if(JJ.existsSync(I)&&JJ.statSync(I).isFile()){let z=k.extname(I).toLowerCase(),E=HJ[z]||"application/octet-stream",v=Y.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(Y);return new Response(Bun.file(I),{headers:{"Content-Type":E,"Cache-Control":v?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let P=g(Q),D=null,o={};if(D=X.get(Y)||null,!D)for(let{regex:j,route:_,paramNames:I}of T){let $=Y.match(j);if($){D=_,I.forEach((z,E)=>{o[z]=$[E+1]});break}}if(!D){let j=X.get("/404")||null;if(j){let _=S.get(j.pattern);if(_)return new Response(_.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}let R=W(Y),r=Object.keys(R).length>0;return O.respond(Q,R.cache,async()=>{let j=S.get(D.pattern);if(P&&Q.method==="GET"&&j&&!j.hasServerScripts&&Object.keys(j.placeholders).length===0){let $=q.get(D.pattern);if($){let z=H.get(D.pattern);return new Response($,{status:j.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...x.has(D.pattern)?{"X-STX-Runtime":x.get(D.pattern)?"true":"false"}:{},...z?{"X-STX-Layout":z.layout,"X-STX-Layout-Group":z.group}:{},...A(),...R.cache?{}:{"Cache-Control":ZJ}}})}}let _=WJ(Q.method),I=S.get(D.pattern);if(!I){let $=X.get("/500")||null;if($){let z=S.get($.pattern);if(z)return new Response(z.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(D.prerendered&&_)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!_&&!I.hasServerScripts&&Object.keys(I.placeholders).length===0)return new Response(I.html,{status:I.status??200,headers:{"Content-Type":"text/html",...A(),"Cache-Control":"public, max-age=60"}});try{let{html:$,boundaries:z,redirect:E,cookies:v,status:m,headers:c}=await jJ(I,{params:o,request:Q,method:Q.method,__stx_strict_hydration:r,__stx_runtime_config:F});if(E)return YJ(E,v,c);if(z&&z.length>0){let{renderStreamingPage:N,streamToResponse:u}=await import("./chunk-7ywnkv1f.js"),b=new Headers({...A(),...c,"Cache-Control":"private, no-store"});for(let f of v??[])b.append("Set-Cookie",f);if(P&&!_){let f=l($);b.set("X-STX-Fragment","true"),b.set("X-STX-Runtime",h($)?"true":"false"),b.set("X-STX-Layout",f.layout),b.set("X-STX-Layout-Group",f.group)}return u(N(P&&!_?n($,Z.routerContainer||"main"):$,z,{timeoutMs:30000}),{status:m??I.status??200,headers:b})}let V=new Headers({"Content-Type":"text/html",...A(),...R.cache?{}:{"Cache-Control":"private, no-store"}});for(let N of v??[])V.append("Set-Cookie",N);for(let[N,u]of Object.entries(c??{}))V.set(N,u);if(V.set("Vary",A(V.get("Vary")).Vary),P&&!_){let N=l($);return V.set("X-STX-Fragment","true"),V.set("X-STX-Runtime",h($)?"true":"false"),V.set("X-STX-Layout",N.layout),V.set("X-STX-Layout-Group",N.group),new Response(n($,Z.routerContainer||"main"),{status:m??I.status??200,headers:V})}return new Response($,{status:m??I.status??200,headers:V})}catch($){if(console.error(`[stx] Hydration error for ${Y}:`,$),r)return new Response("Internal Server Error",{status:500});return new Response(I.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${M.port}`),console.log(`[stx] Serving ${Z.routes.length} routes (${S.size} pre-loaded)`),{port:M.port,stop:()=>{O.invalidate(),M.stop()},invalidate:(Q)=>O.invalidate(Q)}}
2
+ import{Bg as WJ,Dg as YJ,Fg as jJ,lg as ZJ,ng as g,pg as A,vg as n,yg as GJ}from"./chunk-y085rdre.js";import{Ig as $J}from"./chunk-dvvx1wny.js";import{Al as XJ}from"./chunk-p1hy2bwn.js";import{xo as h}from"./chunk-kxtqbrfr.js";import{zt as e}from"./chunk-kffndzch.js";import{Gu as QJ,Ku as i,Mu as p}from"./chunk-vvd659y4.js";import{Dv as KJ,ew as l,iw as VJ}from"./chunk-hzfd8cz0.js";import{sw as DJ}from"./chunk-hyfjnn7g.js";import JJ from"fs";import k from"path";var{serve:wJ}=globalThis.Bun;VJ();import y from"zlib";import{promisify as a}from"util";var IJ=a(y.brotliCompress),OJ=a(y.gzip),UJ=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],BJ=["text/event-stream","multipart/x-mixed-replace"],_J=1024;function zJ(K){if(!K)return!1;let J=K.toLowerCase();if(BJ.some((G)=>J.startsWith(G)))return!1;return UJ.some((G)=>J.startsWith(G))}function FJ(K){let J=new Map;for(let G of K.split(",")){let[Z,...W]=G.trim().split(";"),O=Z.trim().toLowerCase();if(!O)continue;let U=1;for(let B of W){let w=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(B);if(!w)continue;let F=Number.parseFloat(w[1]);if(Number.isFinite(F))U=F}J.set(O,U)}return J}function LJ(K){if(!K)return null;let J=FJ(K),G=J.get("*"),Z=(W)=>J.get(W)??G??0;if(Z("br")>0)return"br";if(Z("gzip")>0)return"gzip";return null}async function t(K,J,G={}){if(J.headers.get("content-encoding"))return J;if(J.status===204||J.status===304||!J.body)return J;if(!zJ(J.headers.get("content-type")))return J;let Z=LJ(K.headers.get("accept-encoding"));if(!Z)return J;let W;try{W=new Uint8Array(await J.arrayBuffer())}catch{return J}let O=()=>new Response(W,{status:J.status,statusText:J.statusText,headers:s(J.headers)});if(W.length<(G.threshold??_J))return O();try{let U=Z==="br"?await IJ(W,{params:{[y.constants.BROTLI_PARAM_QUALITY]:G.quality??5,[y.constants.BROTLI_PARAM_SIZE_HINT]:W.length}}):await OJ(W);if(U.length>=W.length)return O();let B=s(J.headers);return B.set("Content-Encoding",Z),B.set("Content-Length",String(U.length)),new Response(U,{status:J.status,statusText:J.statusText,headers:B})}catch{return O()}}function s(K){let J=new Headers(K),G=J.get("Vary");if(!G)return J.set("Vary","Accept-Encoding"),J;if(!G.split(",").some((W)=>W.trim().toLowerCase()==="accept-encoding"))J.set("Vary",`${G}, Accept-Encoding`);return J}class d{now;entries=new e(1000,{maxBytes:33554432,sizeOf:(K)=>K.body.byteLength+JSON.stringify(K.headers).length*2});pending=new Map;generation=0;constructor(K=Date.now){this.now=K}invalidate(K){this.generation++,this.pending.clear();for(let J of Array.from(this.entries.keys()))if(K===void 0||this.entries.get(J)?.path===K)this.entries.delete(J)}async respond(K,J,G){let Z,W=async()=>{let X=Z??await G();return X.headers.set("Cache-Control","private, no-store"),X.headers.set("Vary",A(X.headers.get("Vary")).Vary),X};if(!J||K.method!=="GET"||K.headers.has("Cookie")||K.headers.has("Authorization")||K.headers.has("Range"))return W();let O=new URL(K.url),U=`${O.origin}${O.pathname}${O.search}|${g(K)?"fragment":"document"}`,B=this.entries.get(U),w=(X)=>{let T=new Headers(X.headers);return T.set("Cache-Control","private, no-store"),T.set("Age",String(Math.max(0,Math.floor((this.now()-X.created)/1000)))),new Response(X.body.slice(0),{headers:T})},F=B?(this.now()-B.created)/1000:1/0;if(B&&F<J.maxAge)return w(B);let S=this.generation,q=async()=>{let X=await G();Z=X;let T=(X.headers.get("Vary")??"").toLowerCase().split(",").map((L)=>L.trim()).filter(Boolean);if(X.status!==200||X.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(X.headers.get("Cache-Control")??"")||T.some((L)=>L!=="x-stx-router"&&L!=="accept-encoding"))return null;let M=await X.clone().arrayBuffer();if(M.byteLength>1048576)return null;X.headers.set("Vary",A(X.headers.get("Vary")).Vary);let Q={body:M,headers:Array.from(X.headers.entries()),created:this.now(),path:O.pathname};if(this.generation===S)this.entries.set(U,Q);return Q},H=this.pending.get(U);if(!H){if(this.pending.size>=1000)return W();H=q().finally(()=>{if(this.pending.get(U)===H)this.pending.delete(U)}),this.pending.set(U,H)}if(B&&F<J.maxAge+(J.swr??0))return H.catch(()=>{}),w(B);let x=await H;return x?w(x):W()}}var HJ={".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 uJ(K={}){let J=k.resolve(K.outputDir||".output"),G=K.port??3000,Z=GJ(J);if(!Z)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${Z.routes.length} routes...`);let W=$J(Z.routeRules),O=new d,U=XJ(J,Z.apiRoutes??[]),B=Bun.file(k.join(J,"server/runtime-config.json")),w=K.runtimeConfig??(await B.exists()?await B.json():void 0),F=w?i(w):void 0,S=new Map,q=new Map,H=new Map,x=new Map;for(let Q of Z.routes)try{let L=k.join(J,Q.compiledPath),Y=JSON.parse(await Bun.file(L).text());if(F)Y.html=p(Y.html,F);S.set(Q.pattern,Y),H.set(Q.pattern,l(Y.html)),x.set(Q.pattern,h(Y.html));let C=k.join(J,Q.fragmentPath);if(await Bun.file(C).exists()){let P=await Bun.file(C).text();q.set(Q.pattern,F?p(P,F):P)}}catch(L){console.warn(`[stx] Failed to load route ${Q.pattern}:`,L)}let X=new Map,T=[];for(let Q of Z.routes)if(Q.hasParams){let{regex:L,params:Y}=KJ(Q.pattern);T.push({regex:L,route:Q,paramNames:Y})}else X.set(Q.pattern,Q);let M=wJ({port:G,async fetch(Q){return t(Q,await QJ(F??i(),async()=>{let Y=new URL(Q.url).pathname;if(K.onRequest){let j=await K.onRequest(Q);if(j)return j}if(K.apiRouter){let j=await K.apiRouter.handleRequest(Q);if(j.status!==404)return j}if(K.apiRoutes?.[Y])return K.apiRoutes[Y](Q);let C=await U(Q);if(C)return C;if((Q.method==="GET"||Q.method==="HEAD")&&Y!=="/"){let j=k.resolve(J,"public"),_;try{_=decodeURIComponent(Y)}catch{_=Y}if(!_.includes("\x00")){let I=k.resolve(j,`.${_}`);if(I===j||I.startsWith(`${j}${k.sep}`))try{if(JJ.existsSync(I)&&JJ.statSync(I).isFile()){let z=k.extname(I).toLowerCase(),E=HJ[z]||"application/octet-stream",v=Y.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(Y);return new Response(Bun.file(I),{headers:{"Content-Type":E,"Cache-Control":v?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let P=g(Q),D=null,o={};if(D=X.get(Y)||null,!D)for(let{regex:j,route:_,paramNames:I}of T){let $=Y.match(j);if($){D=_,I.forEach((z,E)=>{o[z]=$[E+1]});break}}if(!D){let j=X.get("/404")||null;if(j){let _=S.get(j.pattern);if(_)return new Response(_.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}let R=W(Y),r=Object.keys(R).length>0;return O.respond(Q,R.cache,async()=>{let j=S.get(D.pattern);if(P&&Q.method==="GET"&&j&&!j.hasServerScripts&&Object.keys(j.placeholders).length===0){let $=q.get(D.pattern);if($){let z=H.get(D.pattern);return new Response($,{status:j.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...x.has(D.pattern)?{"X-STX-Runtime":x.get(D.pattern)?"true":"false"}:{},...z?{"X-STX-Layout":z.layout,"X-STX-Layout-Group":z.group}:{},...A(),...R.cache?{}:{"Cache-Control":ZJ}}})}}let _=WJ(Q.method),I=S.get(D.pattern);if(!I){let $=X.get("/500")||null;if($){let z=S.get($.pattern);if(z)return new Response(z.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(D.prerendered&&_)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!_&&!I.hasServerScripts&&Object.keys(I.placeholders).length===0)return new Response(I.html,{status:I.status??200,headers:{"Content-Type":"text/html",...A(),"Cache-Control":"public, max-age=60"}});try{let{html:$,boundaries:z,redirect:E,cookies:v,status:m,headers:c}=await jJ(I,{params:o,request:Q,method:Q.method,__stx_strict_hydration:r,__stx_runtime_config:F});if(E)return YJ(E,v,c);if(z&&z.length>0){let{renderStreamingPage:N,streamToResponse:u}=await import("./chunk-7ywnkv1f.js"),b=new Headers({...A(),...c,"Cache-Control":"private, no-store"});for(let f of v??[])b.append("Set-Cookie",f);if(P&&!_){let f=l($);b.set("X-STX-Fragment","true"),b.set("X-STX-Runtime",h($)?"true":"false"),b.set("X-STX-Layout",f.layout),b.set("X-STX-Layout-Group",f.group)}return u(N(P&&!_?n($,Z.routerContainer||"main"):$,z,{timeoutMs:30000}),{status:m??I.status??200,headers:b})}let V=new Headers({"Content-Type":"text/html",...A(),...R.cache?{}:{"Cache-Control":"private, no-store"}});for(let N of v??[])V.append("Set-Cookie",N);for(let[N,u]of Object.entries(c??{}))V.set(N,u);if(V.set("Vary",A(V.get("Vary")).Vary),P&&!_){let N=l($);return V.set("X-STX-Fragment","true"),V.set("X-STX-Runtime",h($)?"true":"false"),V.set("X-STX-Layout",N.layout),V.set("X-STX-Layout-Group",N.group),new Response(n($,Z.routerContainer||"main"),{status:m??I.status??200,headers:V})}return new Response($,{status:m??I.status??200,headers:V})}catch($){if(console.error(`[stx] Hydration error for ${Y}:`,$),r)return new Response("Internal Server Error",{status:500});return new Response(I.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${M.port}`),console.log(`[stx] Serving ${Z.routes.length} routes (${S.size} pre-loaded)`),{port:M.port,stop:()=>{O.invalidate(),M.stop()},invalidate:(Q)=>O.invalidate(Q)}}
3
3
  export{zJ as Ve,LJ as We,t as Xe,uJ as Ye};
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{Ha as a,He as F,Je as v,Ke as P,Va as r,de as s,ee as t,nb as n,o as m,oa as l,ob as p,qb as i,wb as e}from"./chunk-2ye35vms.js";import"./chunk-m8kezfrt.js";import"./chunk-2ver2s2y.js";import"./chunk-6k8h1fj1.js";import"./chunk-ef0ra05n.js";import"./chunk-q4p1h741.js";import"./chunk-ym3r8ktq.js";import"./chunk-crj19mqr.js";import"./chunk-x7yc7e9v.js";import"./chunk-j2dj21ay.js";import"./chunk-kk7p8ekz.js";import"./chunk-gdbkqatx.js";import"./chunk-cmtjq1db.js";import"./chunk-dvvx1wny.js";import"./chunk-xz3evxqp.js";import"./chunk-farwrdr2.js";import"./chunk-wx5zf66r.js";import"./chunk-yk6446kr.js";import"./chunk-vd5xvsnv.js";import"./chunk-64djh88a.js";import"./chunk-9368t9jm.js";import"./chunk-5tefa8qb.js";import"./chunk-mwh3ymwc.js";import"./chunk-fqq5k9ve.js";import"./chunk-ya5m5vbn.js";import"./chunk-y4nzmkea.js";import"./chunk-7kw3grq5.js";import"./chunk-c79nfdyj.js";import"./chunk-ej8mv2k6.js";import"./chunk-cr8v8k53.js";import"./chunk-q05eh1n4.js";import"./chunk-4k0ce745.js";import"./chunk-xwxdwqn9.js";import"./chunk-ymrxpwr8.js";import"./chunk-71y3bhcw.js";import"./chunk-t41aaehf.js";import"./chunk-fkdnfjc2.js";import"./chunk-08w4gtyf.js";import"./chunk-e1sxe3q4.js";import"./chunk-4jdj52c5.js";import{kl as u,ll as c}from"./chunk-zz8qgqa1.js";import"./chunk-p1hy2bwn.js";import"./chunk-kxtqbrfr.js";import{dt as f}from"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import{Bt as A}from"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import{sw as B}from"./chunk-hyfjnn7g.js";import{spawn as o}from"child_process";import L from"fs";import zb from"os";import $ from"path";import w from"process";import{CLI as wb}from"@stacksjs/clapp";var N="0.2.333";var __dirname="/home/runner/work/stx/stx/packages/stx/bin",E=new wb("stx");function h(J){let Z=typeof J==="string"?Number.parseInt(J,10):J;if(Number.isNaN(Z))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(Z<1024||Z>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function d(J){try{if(!L.existsSync(J)){let K=$.dirname(J),x=$.basename(J);if(L.existsSync(K)){let z=L.readdirSync(K).filter((j)=>j.toLowerCase().includes(x.toLowerCase().substring(0,3))||j.endsWith(".stx")||j.endsWith(".md")),k=z.length>0?`File not found. Similar files in ${K}: ${z.slice(0,3).join(", ")}`:`File not found. Directory ${K} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${J}`,suggestion:k}}return{isValid:!1,error:`File does not exist: ${J}`,suggestion:"Check the file path and try again"}}if(L.statSync(J).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${J}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(Z){return{isValid:!1,error:`Cannot access file: ${J}`,suggestion:"Check file permissions and path"}}}function y(J){let Z=typeof J==="string"?Number.parseInt(J,10):J;if(Number.isNaN(Z))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(Z<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(Z>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var V=(J)=>J.includes("*")||J.includes("?")||J.includes("{")||J.includes("["),jb=(J)=>J.endsWith(".stx")||J.endsWith(".md");function S(J,Z=1){if(console.error(`\u274C ${J.error}`),J.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${J.suggestion}`);w.exit(Z)}function kb(J){if(!J)return;let Z;try{Z=JSON.parse(J)}catch(K){console.error(`\u274C --info-plist is not valid JSON: ${K.message}`),w.exit(1)}if(typeof Z!=="object"||Z===null||Array.isArray(Z))console.error(`\u274C --info-plist must be a JSON object, e.g. '{"NSFocusStatusUsageDescription":"\u2026"}'`),w.exit(1);for(let[K,x]of Object.entries(Z))if(typeof x!=="string"&&typeof x!=="number"&&typeof x!=="boolean")console.error(`\u274C --info-plist value for "${K}" must be a string, number or boolean`),w.exit(1);return Z}async function Hb(J,Z){try{let K=["test"],x=[];if(J&&J.length>0)for(let W of J)if(V(W))try{let H=await Array.fromAsync(new Bun.Glob(W).scan({onlyFiles:!0,absolute:!0}));if(H.length===0)console.warn(`Warning: No files found matching pattern: ${W}`);else if(x.push(...H),Z.verbose)console.log(`Found ${H.length} file(s) matching pattern: ${W}`)}catch(H){return console.error(`Error expanding glob pattern ${W}:`,H),!1}else x.push(W);if(x.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(K.push(...x),Z.filter)K.push("--pattern",Z.filter);if(Z.timeout)K.push("--timeout",Z.timeout.toString());if(Z.reporter&&Z.reporter!=="default")if(Z.reporter==="junit"){let W=$.join(zb.tmpdir(),`stx-test-report-${Date.now()}.xml`);K.push("--reporter",Z.reporter),K.push("--reporter-outfile",W)}else console.warn(`Warning: Reporter '${Z.reporter}' is not supported. Using default reporter.`);if(Z.coverage)K.push("--coverage");if(Z.watch)K.push("--watch");K.push("--preload",$.join(__dirname,"../../../test-utils/happy-dom.ts"));let b={...w.env,STX_TEST_MODE:"true",STX_TEST_UI:Z.ui?"true":"false",STX_TEST_VERBOSE:Z.verbose?"true":"false"},z="bun";if(Z.verbose)console.log(`Running: ${z} ${K.join(" ")}`);let k=performance.now(),j=o(z,K,{stdio:"inherit",shell:!1,env:b});return new Promise((W)=>{j.on("close",(H)=>{let Y=((performance.now()-k)/1000).toFixed(2);if(H===0)W(!0);else W(!1)}),w.on("SIGINT",()=>{console.log(`
3
+ import{Ha as a,He as F,Je as v,Ke as P,Va as r,de as s,ee as t,nb as n,o as m,oa as l,ob as p,qb as i,wb as e}from"./chunk-c9wmv6n1.js";import"./chunk-m8kezfrt.js";import"./chunk-2ver2s2y.js";import"./chunk-6k8h1fj1.js";import"./chunk-dghr3zxy.js";import"./chunk-zbtd1ceq.js";import"./chunk-ym3r8ktq.js";import"./chunk-crj19mqr.js";import"./chunk-x7yc7e9v.js";import"./chunk-j2dj21ay.js";import"./chunk-wdvyn2va.js";import"./chunk-gdbkqatx.js";import"./chunk-y085rdre.js";import"./chunk-dvvx1wny.js";import"./chunk-xz3evxqp.js";import"./chunk-farwrdr2.js";import"./chunk-wx5zf66r.js";import"./chunk-yk6446kr.js";import"./chunk-vd5xvsnv.js";import"./chunk-64djh88a.js";import"./chunk-9368t9jm.js";import"./chunk-5tefa8qb.js";import"./chunk-mwh3ymwc.js";import"./chunk-fqq5k9ve.js";import"./chunk-ya5m5vbn.js";import"./chunk-y4nzmkea.js";import"./chunk-7kw3grq5.js";import"./chunk-c79nfdyj.js";import"./chunk-ej8mv2k6.js";import"./chunk-cr8v8k53.js";import"./chunk-q05eh1n4.js";import"./chunk-4k0ce745.js";import"./chunk-xwxdwqn9.js";import"./chunk-ymrxpwr8.js";import"./chunk-71y3bhcw.js";import"./chunk-t41aaehf.js";import"./chunk-fkdnfjc2.js";import"./chunk-08w4gtyf.js";import"./chunk-e1sxe3q4.js";import"./chunk-4jdj52c5.js";import{kl as u,ll as c}from"./chunk-zz8qgqa1.js";import"./chunk-p1hy2bwn.js";import"./chunk-kxtqbrfr.js";import{dt as f}from"./chunk-caaenc3w.js";import"./chunk-amxtypkp.js";import"./chunk-nat3actx.js";import"./chunk-q0g5c39d.js";import{Bt as A}from"./chunk-kffndzch.js";import"./chunk-c2ta859c.js";import"./chunk-r8rbf28v.js";import"./chunk-gptwwv3c.js";import"./chunk-n66k2v2q.js";import"./chunk-vvd659y4.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-hzfd8cz0.js";import"./chunk-q569zmrr.js";import{sw as B}from"./chunk-hyfjnn7g.js";import{spawn as o}from"child_process";import L from"fs";import zb from"os";import $ from"path";import w from"process";import{CLI as wb}from"@stacksjs/clapp";var N="0.2.335";var __dirname="/home/runner/work/stx/stx/packages/stx/bin",E=new wb("stx");function h(J){let Z=typeof J==="string"?Number.parseInt(J,10):J;if(Number.isNaN(Z))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(Z<1024||Z>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function d(J){try{if(!L.existsSync(J)){let K=$.dirname(J),x=$.basename(J);if(L.existsSync(K)){let z=L.readdirSync(K).filter((j)=>j.toLowerCase().includes(x.toLowerCase().substring(0,3))||j.endsWith(".stx")||j.endsWith(".md")),k=z.length>0?`File not found. Similar files in ${K}: ${z.slice(0,3).join(", ")}`:`File not found. Directory ${K} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${J}`,suggestion:k}}return{isValid:!1,error:`File does not exist: ${J}`,suggestion:"Check the file path and try again"}}if(L.statSync(J).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${J}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(Z){return{isValid:!1,error:`Cannot access file: ${J}`,suggestion:"Check file permissions and path"}}}function y(J){let Z=typeof J==="string"?Number.parseInt(J,10):J;if(Number.isNaN(Z))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(Z<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(Z>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var V=(J)=>J.includes("*")||J.includes("?")||J.includes("{")||J.includes("["),jb=(J)=>J.endsWith(".stx")||J.endsWith(".md");function S(J,Z=1){if(console.error(`\u274C ${J.error}`),J.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${J.suggestion}`);w.exit(Z)}function kb(J){if(!J)return;let Z;try{Z=JSON.parse(J)}catch(K){console.error(`\u274C --info-plist is not valid JSON: ${K.message}`),w.exit(1)}if(typeof Z!=="object"||Z===null||Array.isArray(Z))console.error(`\u274C --info-plist must be a JSON object, e.g. '{"NSFocusStatusUsageDescription":"\u2026"}'`),w.exit(1);for(let[K,x]of Object.entries(Z))if(typeof x!=="string"&&typeof x!=="number"&&typeof x!=="boolean")console.error(`\u274C --info-plist value for "${K}" must be a string, number or boolean`),w.exit(1);return Z}async function Hb(J,Z){try{let K=["test"],x=[];if(J&&J.length>0)for(let W of J)if(V(W))try{let H=await Array.fromAsync(new Bun.Glob(W).scan({onlyFiles:!0,absolute:!0}));if(H.length===0)console.warn(`Warning: No files found matching pattern: ${W}`);else if(x.push(...H),Z.verbose)console.log(`Found ${H.length} file(s) matching pattern: ${W}`)}catch(H){return console.error(`Error expanding glob pattern ${W}:`,H),!1}else x.push(W);if(x.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(K.push(...x),Z.filter)K.push("--pattern",Z.filter);if(Z.timeout)K.push("--timeout",Z.timeout.toString());if(Z.reporter&&Z.reporter!=="default")if(Z.reporter==="junit"){let W=$.join(zb.tmpdir(),`stx-test-report-${Date.now()}.xml`);K.push("--reporter",Z.reporter),K.push("--reporter-outfile",W)}else console.warn(`Warning: Reporter '${Z.reporter}' is not supported. Using default reporter.`);if(Z.coverage)K.push("--coverage");if(Z.watch)K.push("--watch");K.push("--preload",$.join(__dirname,"../../../test-utils/happy-dom.ts"));let b={...w.env,STX_TEST_MODE:"true",STX_TEST_UI:Z.ui?"true":"false",STX_TEST_VERBOSE:Z.verbose?"true":"false"},z="bun";if(Z.verbose)console.log(`Running: ${z} ${K.join(" ")}`);let k=performance.now(),j=o(z,K,{stdio:"inherit",shell:!1,env:b});return new Promise((W)=>{j.on("close",(H)=>{let Y=((performance.now()-k)/1000).toFixed(2);if(H===0)W(!0);else W(!1)}),w.on("SIGINT",()=>{console.log(`
4
4
  Test run interrupted`),j.kill("SIGINT"),w.exit(1)})})}catch(K){return console.error("Error running tests:",K instanceof Error?K.message:String(K)),!1}}var Qb=w.argv.length>=3&&(jb(w.argv[2])&&L.existsSync(w.argv[2])||V(w.argv[2]));if(Qb){let J=w.argv[2],Z={port:3000,watch:!0,cache:!0,markdown:{syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0}}};for(let K=3;K<w.argv.length;K++){let x=w.argv[K];if(x==="--port"&&K+1<w.argv.length){let b=h(w.argv[++K]);if(!b.isValid)S(b);Z.port=Number.parseInt(w.argv[K],10)}else if(x==="--no-watch")Z.watch=!1;else if(x==="--highlight-theme"&&K+1<w.argv.length){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.defaultTheme=w.argv[++K]}else if(x==="--no-highlight"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.enabled=!1}else if(x==="--no-highlight-unknown"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.highlightUnknownLanguages=!1}else if(x==="--no-cache")Z.cache=!1;else if(x==="--native")Z.native=!0}if(V(J))try{let K=await Array.fromAsync(new Bun.Glob(J).scan({onlyFiles:!0,absolute:!0})),x=J.endsWith(".stx")?K.filter((j)=>j.endsWith(".stx")):J.endsWith(".md")?K.filter((j)=>j.endsWith(".md")):K.filter((j)=>j.endsWith(".stx")||j.endsWith(".md")),b=J.split("*")[0].replace(/\/$/,"")||".",z=$.resolve(b);try{let j=new Bun.Glob("**/*.stx"),H=(await Array.fromAsync(j.scan({cwd:z,onlyFiles:!0,absolute:!0}))).filter((U)=>/\[.+\]/.test($.basename(U)));for(let U of H)if(!x.includes(U))x.push(U)}catch{}if(x.length===0)console.error(`Error: No STX or Markdown files found matching pattern: ${J}`),w.exit(1);if(!await v(x,Z))w.exit(1)}catch(K){console.error("Failed to process files:",K),w.exit(1)}else F(J,Z).catch((K)=>{console.error("Failed to start dev server:",K),w.exit(1)})}else{let J=function(x,b){let z=[];for(let k=0;k<=b.length;k++)z[k]=[k];for(let k=0;k<=x.length;k++)z[0][k]=k;for(let k=1;k<=b.length;k++)for(let j=1;j<=x.length;j++)if(b.charAt(k-1)===x.charAt(j-1))z[k][j]=z[k-1][j-1];else z[k][j]=Math.min(z[k-1][j-1]+1,z[k][j-1]+1,z[k-1][j]+1);return z[b.length][x.length]};E.command("docs","Generate documentation for components, templates, and directives").option("--output <dir>","Output directory for documentation",{default:"docs"}).option("--format <format>","Documentation format (markdown, html, json)",{default:"markdown"}).option("--components-dir <dir>","Components directory",{default:"components"}).option("--templates-dir <dir>","Templates directory",{default:"."}).option("--no-components","Disable components documentation").option("--no-templates","Disable templates documentation").option("--no-directives","Disable directives documentation").option("--extra-content <content>","Extra content to include in documentation").example("stx docs --output docs --format html").action(async(x)=>{try{if(await r(x))console.log("Documentation generated successfully."),w.exit(0);else console.error("Documentation generation failed."),w.exit(1)}catch(b){console.error("Error generating documentation:",b),w.exit(1)}}),E.command("iconify <command>","Generate Iconify icon packages").option("--output <dir>","Output directory for generated packages",{default:"packages"}).option("--icons <icons>","Comma-separated list of specific icons to generate").example("stx iconify list").example("stx iconify generate mdi").example("stx iconify generate lucide --icons home,settings,user").action(async(x,b)=>{try{let{fetchCollections:z,generatePackage:k}=await import("./chunk-yxppshfd.js");if(x==="list"){console.log(`
5
5
  \uD83D\uDCDA Fetching available icon collections...
6
6
  `);let j=await z(),W=Object.entries(j).sort((H,U)=>U[1].total-H[1].total);console.log(`Available collections:
@@ -69,7 +69,7 @@ Total: ${H} issues in ${W} files`),b.output){let U=`
69
69
  File not found: ${x}`),w.exit(1);if(!x.endsWith(".stx"))console.error(`
70
70
  File must have .stx extension: ${x}`),w.exit(1)}let k=$.resolve(b.pages),j=$.resolve(b.out);if(!x&&!L.existsSync(k))console.error(`
71
71
  Pages directory not found: ${k}`),console.log(`
72
- Create a 'pages' directory with .stx files, or use --pages to specify a different directory.`),w.exit(1);let{buildApp:W}=await import("./chunk-gd2d52kn.js");c();let H=await W({root:x?$.dirname(x):void 0,debug:b.verbose,ssg:{pagesDir:b.pages,outputDir:b.out,domain:b.domain,baseUrl:b.base,sitemap:b.sitemap,rss:b.rss,minify:b.minify,cache:b.cache!==!1,cleanOutput:b.clean,concurrency:Number.parseInt(b.concurrency,10)||10,publicDir:b.public,trailingSlash:b.trailingSlash,generate404:!0,hooks:b.verbose?{onPageStart:(Y)=>console.log(` Generating: ${Y}`),onPageEnd:(Y,Q)=>console.log(` Generated: ${Y} (${Q.length} bytes)`),onError:(Y,Q)=>console.error(` Error in ${Q}: ${Y.message}`)}:void 0},ssr:{outputDir:b.out==="dist"?".output":b.out,debug:b.verbose}}),U=((performance.now()-z)/1000).toFixed(2);if(H.mode==="ssr"&&H.ssr)console.log(`
72
+ Create a 'pages' directory with .stx files, or use --pages to specify a different directory.`),w.exit(1);let{buildApp:W}=await import("./chunk-95e37e7c.js");c();let H=await W({root:x?$.dirname(x):void 0,debug:b.verbose,ssg:{pagesDir:b.pages,outputDir:b.out,domain:b.domain,baseUrl:b.base,sitemap:b.sitemap,rss:b.rss,minify:b.minify,cache:b.cache!==!1,cleanOutput:b.clean,concurrency:Number.parseInt(b.concurrency,10)||10,publicDir:b.public,trailingSlash:b.trailingSlash,generate404:!0,hooks:b.verbose?{onPageStart:(Y)=>console.log(` Generating: ${Y}`),onPageEnd:(Y,Q)=>console.log(` Generated: ${Y} (${Q.length} bytes)`),onError:(Y,Q)=>console.error(` Error in ${Q}: ${Y.message}`)}:void 0},ssr:{outputDir:b.out==="dist"?".output":b.out,debug:b.verbose}}),U=((performance.now()-z)/1000).toFixed(2);if(H.mode==="ssr"&&H.ssr)console.log(`
73
73
  Build complete! (SSR)
74
74
  `),console.log(` Pages compiled: ${H.ssr.pageCount}`),console.log(` Output: ${H.ssr.outputDir}`),console.log(` Duration: ${U}s
75
75
  `);else if(H.ssg){if(console.log(`
@@ -84,7 +84,7 @@ Total: ${H} issues in ${W} files`),b.output){let U=`
84
84
  Build completed with ${H.ssg.failedCount} error(s). Fix the issues above and try again.
85
85
  `),w.exit(1);console.log(" To preview locally:"),console.log(` cd ${b.out||"dist"} && npx serve
86
86
  `)}}catch(z){console.error(`
87
- Build failed:`,z instanceof Error?z.message:String(z)),w.exit(1)}}),E.command("start","Start the production server (serves pre-built .output/)").option("--port <number>","Server port",{default:"3000"}).option("--output <dir>","Output directory from stx build",{default:".output"}).example("stx start").example("stx start --port 8080").action(async(x)=>{try{let b=$.resolve(x.output);if(!L.existsSync($.join(b,"manifest.json")))console.error("\n No production build found. Run `stx build --out .output` first.\n"),w.exit(1);let{startProductionServer:z}=await import("./chunk-1jzdpvvx.js");await z({outputDir:b,port:Number.parseInt(x.port,10)||3000})}catch(b){console.error(`
87
+ Build failed:`,z instanceof Error?z.message:String(z)),w.exit(1)}}),E.command("start","Start the production server (serves pre-built .output/)").option("--port <number>","Server port",{default:"3000"}).option("--output <dir>","Output directory from stx build",{default:".output"}).example("stx start").example("stx start --port 8080").action(async(x)=>{try{let b=$.resolve(x.output);if(!L.existsSync($.join(b,"manifest.json")))console.error("\n No production build found. Run `stx build --out .output` first.\n"),w.exit(1);let{startProductionServer:z}=await import("./chunk-cbm6ar7z.js");await z({outputDir:b,port:Number.parseInt(x.port,10)||3000})}catch(b){console.error(`
88
88
  Failed to start production server:`,b instanceof Error?b.message:String(b)),w.exit(1)}}),E.command("deploy [directory]","Deploy built site to Netlify").option("--site-id <id>","Netlify site ID (or set NETLIFY_SITE_ID env var)").option("--token <token>","Auth token (or set NETLIFY_AUTH_TOKEN env var)").option("--production","Deploy to production (default: draft preview)").option("--message <msg>","Deploy message/title").option("--no-build","Skip build step before deploy").option("--open","Open deployed URL in browser").option("--dry-run","Preview deployment without uploading").option("--init","Initialize Netlify configuration for this project").example("stx deploy").example("stx deploy --production").example("stx deploy dist --site-id my-site-abc123").example("stx deploy --init").example("stx deploy --dry-run").action(async(x,b)=>{try{let{deploy:z,initNetlify:k,DeployError:j}=await import("./chunk-5swem3qy.js");if(console.log(`\x1B[1mstx deploy\x1B[0m \x1B[2mv${N}\x1B[0m`),b.init){console.log(`
89
89
  \uD83D\uDCDD Initializing Netlify configuration...
90
90
  `);let H=await k({directory:x||w.cwd(),siteId:b.siteId});if(console.log(`\u2713 Created ${H.configPath}`),H.siteId)console.log("\u2713 Saved site ID to .env.local");console.log(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.333",
4
+ "version": "0.2.335",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -117,12 +117,12 @@
117
117
  "dependencies": {
118
118
  "@stacksjs/ts-css": "^0.3.2",
119
119
  "@stacksjs/clapp": "^0.2.14",
120
- "@stacksjs/desktop": "0.2.333",
121
- "@stacksjs/sanitizer": "0.2.333",
120
+ "@stacksjs/desktop": "0.2.335",
121
+ "@stacksjs/sanitizer": "0.2.335",
122
122
  "@stacksjs/ts-i18n": "^0.1.11",
123
- "bun-plugin-stx": "0.2.333",
123
+ "bun-plugin-stx": "0.2.335",
124
124
  "bunfig": "^0.15.17",
125
- "stx-router": "0.2.333",
125
+ "stx-router": "0.2.335",
126
126
  "ts-broadcasting": "^0.0.9",
127
127
  "ts-images": "^0.2.22",
128
128
  "ts-syntax-highlighter": "^0.2.1"