@stacksjs/stx 0.2.248 → 0.2.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-7v2v2z4f.js → chunk-3k5jkjm6.js} +1 -1
- package/dist/{chunk-7e3dks04.js → chunk-3kcf3khz.js} +4 -4
- package/dist/{chunk-xp5935a3.js → chunk-5880yp78.js} +1 -1
- package/dist/{chunk-axvmngpm.js → chunk-58ynytka.js} +1 -1
- package/dist/{chunk-8qax49p0.js → chunk-65ds4gey.js} +1 -1
- package/dist/{chunk-8vz7gc9b.js → chunk-7mv0k3tw.js} +1 -1
- package/dist/{chunk-ccma7ay5.js → chunk-b15n9vpw.js} +1 -1
- package/dist/{chunk-pzxytzqw.js → chunk-bzcy2s4p.js} +1 -1
- package/dist/{chunk-stepbjtr.js → chunk-jvxrftpe.js} +1 -1
- package/dist/{chunk-s2hzefvz.js → chunk-p733w90w.js} +1 -1
- package/dist/cli.js +3 -3
- package/package.json +5 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Mf as a}from"./chunk-
|
|
2
|
+
import{Mf as a}from"./chunk-jvxrftpe.js";import"./chunk-vhnnryps.js";import"./chunk-65ds4gey.js";import"./chunk-7bemc914.js";import"./chunk-w95sp0k9.js";import"./chunk-58f0mthg.js";import"./chunk-h7aynn48.js";import"./chunk-0athjw48.js";import"./chunk-135mme4g.js";import"./chunk-f3m0q482.js";import"./chunk-f1jd5qjb.js";import"./chunk-v0y3drpw.js";import"./chunk-0pdrnxg2.js";import"./chunk-j26v67km.js";import"./chunk-3gjrq8m7.js";import"./chunk-mh4hd2wt.js";import"./chunk-fa3pamx8.js";import"./chunk-5ec3m8hk.js";import"./chunk-snh1ahqp.js";import"./chunk-p3kn55v4.js";export{a as buildForProduction};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ng as _$,og as K5}from"./chunk-
|
|
2
|
+
import{ng as _$,og as K5}from"./chunk-5880yp78.js";import{Ag as U$,Bg as q6,Dg as Z1,Eg as y6,Fg as Q5,Gg as B$,Hg as L$,Ig as v6,Jg as g6,yg as y7}from"./chunk-65ds4gey.js";import{Aj as p5,Cj as c5,vj as u1,wj as O1,xj as H1,yj as m$,zj as p$}from"./chunk-w95sp0k9.js";import{Wj as Y$,Xj as J$}from"./chunk-4fybwpba.js";import{yk as g5,zk as f5}from"./chunk-gh1vsaa0.js";import{Fk as l7,Gk as i7}from"./chunk-58f0mthg.js";import{il as Q1}from"./chunk-d8y85xdy.js";import{$l as b7,$o as X5,Bm as s$,Bp as m0,Fq as O0,Jm as x6,Nm as Z5,Pr as G$,Qm as N1,Rm as M1,Tq as Q6,Uq as E1,Xo as Z$,Yq as p0,an as c1,as as E$,bm as X6,bp as S6,cp as z6,cs as d0,dn as L6,dq as g7,ds as M0,hs as V0,kq as P6,ln as n$,lq as b6,nn as o$,qn as l1,rm as u0,tp as j0,un as t$,xn as Q$,yn as F6}from"./chunk-h7aynn48.js";import{Ns as B,Vs as W$,Ws as K$,_s as o}from"./chunk-v0y3drpw.js";import{kt as S0}from"./chunk-j26v67km.js";import{$t as $5,Bu as k6,Fu as A6,au as H6,eu as V6,fu as E6,uu as I6,vu as R6,wu as D6,xu as w6,yu as T6,zu as C6}from"./chunk-5ec3m8hk.js";import{Pu as p}from"./chunk-p3kn55v4.js";var l5={read:($)=>{try{return JSON.parse($)}catch{return $}},write:($)=>{return JSON.stringify($)}};function e7($,X,Q={}){let{storage:Z="local",serializer:Y=l5,mergeDefaults:J=!1,listenToStorageChanges:G=!0}=Q,W=new Set,K=typeof window<"u",_=()=>{if(!K)return null;return Z==="session"?sessionStorage:localStorage},U=()=>{let L=_();if(!L)return X;try{let H=L.getItem($);if(H===null)return X;let q=Y.read(H);if(J&&typeof X==="object"&&X!==null)return{...X,...q};return q}catch{return X}},F=(L)=>{let H=_();if(!H)return;try{if(L===null||L===void 0)H.removeItem($);else H.setItem($,Y.write(L))}catch(q){console.warn(`[useStorage] Failed to write key "${$}":`,q)}},z=U(),j=(L,H)=>{for(let q of W)try{q(L,H)}catch(A){console.error("[useStorage] Subscriber error:",A)}};if(K&&G){let L=(q)=>{if(q.key===$&&q.storageArea===_()){let A=z;try{z=q.newValue?Y.read(q.newValue):X}catch(N){console.warn(`[useStorage] Failed to read key "${$}" from a cross-tab update:`,N);return}j(z,A)}};window.addEventListener("storage",L);let H=globalThis.onDestroy;if(typeof H==="function")H(()=>window.removeEventListener("storage",L))}let O={get value(){return z},set value(L){let H=z;z=L,F(L),j(L,H)},get:()=>z,set:(L)=>{O.value=L},remove:()=>{let L=_();if(L){L.removeItem($);let H=z;z=X,j(X,H)}},subscribe:(L)=>{return W.add(L),L(z,void 0),()=>W.delete(L)}};return O}function i5($,X,Q,Z,Y={}){let{serializer:J=l5,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 Z;try{let O=J.read(j);if(G&&typeof Z==="object"&&Z!==null)return{...Z,...O};return O}catch(O){return console.warn(`[${X}] Failed to read key "${Q}":`,O),Z}},z=p5((()=>{let j=_();if(!j)return Z;try{return U(j.getItem(Q))}catch(O){return console.warn(`[${X}] Cannot read "${Q}":`,O),Z}})());if(c5(()=>{let j=z(),O=_();if(!O)return;try{if(j===null||j===void 0)O.removeItem(Q);else O.setItem(Q,J.write(j))}catch(L){console.warn(`[${X}] Cannot persist "${Q}":`,L)}}),K&&W){let j=(L)=>{if(L.key!==Q)return;if(L.storageArea&&L.storageArea!==_())return;z.set(U(L.newValue))};window.addEventListener("storage",j);let O=globalThis.onDestroy;if(typeof O==="function")O(()=>window.removeEventListener("storage",j))}return z}function $3($,X,Q){return i5("local","useLocalStorage",$,X,Q)}function X3($,X,Q){return i5("session","useSessionStorage",$,X,Q)}function Q3($="local"){if(typeof window>"u")return;($==="session"?sessionStorage:localStorage).clear()}function Z3($="local"){if(typeof window>"u")return[];let X=$==="session"?sessionStorage:localStorage;return Object.keys(X)}function Y3($="local"){if(typeof window>"u")return 0;let X=$==="session"?sessionStorage:localStorage,Q=0;for(let Z in X)if(Object.prototype.hasOwnProperty.call(X,Z))Q+=(Z.length+(X.getItem(Z)?.length||0))*2;return Q}var l=null;function d1($,X,Q=new WeakSet){if(Object.is($,X))return!0;if(typeof $!=="object"||typeof X!=="object"||$===null||X===null)return!1;if(Q.has($))return!0;if(Q.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(!d1($[J],X[J],Q))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)||!d1(G,X.get(J),Q))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 Z=Object.keys($),Y=Object.keys(X);if(Z.length!==Y.length)return!1;for(let J of Z){if(!Object.prototype.hasOwnProperty.call(X,J))return!1;if(!d1($[J],X[J],Q))return!1}return!0}function BJ($){l=$}function LJ(){return l}function FJ(){return{isMounted:!1,isUnmounted:!1,hooks:{beforeMount:[],mounted:[],beforeUpdate:[],updated:[],beforeUnmount:[],unmounted:[]},effects:[],scope:J3()}}function J3(){return{refs:new Map,effects:new Set,cleanups:[]}}function zJ($){let X=new Set,Q=new Set,Z=$,Y=Symbol("ref"),J={get value(){let G=u1();if(G)Q.add(G);return Z},set value(G){if(!Object.is(G,Z)){let W=Z;Z=G;for(let K of X)K(G,W);for(let K of Q)if(m$())p$(K);else K()}},subscribe(G){return X.add(G),()=>{X.delete(G)}}};if(l)l.scope.refs.set(Y,J);return J}var a5=new WeakMap;function G3($){let X=a5.get($);if(X)return X;let Q=new Map,Z=(G)=>{let W=Q.get(G);if(!W)return;for(let K of[...W])if(m$())p$(K);else K()},Y=(G,W)=>{if(!Q.has(G))Q.set(G,new Set);return Q.get(G).add(W),()=>{Q.get(G)?.delete(W)}},J=new Proxy($,{get(G,W,K){let _=Reflect.get(G,W,K),U=u1();if(U)Y(W,U);if(_!==null&&typeof _==="object"&&!Array.isArray(_)){let F=Object.getPrototypeOf(_);if(F===Object.prototype||F===null)return G3(_)}return _},set(G,W,K,_){let U=Reflect.get(G,W,_),F=Reflect.set(G,W,K,_);if(!Object.is(K,U))Z(W);return F},deleteProperty(G,W){let K=Reflect.deleteProperty(G,W);return Z(W),K}});return a5.set($,J),J}function jJ($){let X,Q=!0,Z=new Set,Y=new Set,J=()=>{Q=!0,G()},G=()=>{if(Q){let K=X,_=O1(J);if(X=$(),H1(_),Q=!1,!Object.is(X,K)){for(let U of Z)U(X,K);for(let U of Y)U()}}},W=O1(J);return X=$(),Q=!1,H1(W),{get value(){let K=u1();if(K)Y.add(K);return G(),X},set value(K){console.warn("[stx] Computed properties are readonly")},subscribe(K){return Z.add(K),()=>{Z.delete(K)}}}}function W3($){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(()=>{requestAnimationFrame($)});return}setTimeout($,0)}function OJ($,X,Q={}){let{immediate:Z=!1,deep:Y=!1,flush:J="post"}=Q,G,W,K=!1,_=()=>{if(K)return;let O=j();if((Y?!d1(O,G):!Object.is(O,G))||Z)if(X(O,G),Y&&O!==null&&typeof O==="object")try{G=structuredClone(O)}catch{G=O}else G=O},U=(O)=>{if(J==="sync")O();else if(J==="pre")Promise.resolve().then(O);else W3(O)},F=!1,z=()=>{if(K||F)return;F=!0,U(()=>{F=!1,_()})},j=()=>{if(typeof $==="function"){let O=O1(z);try{return $()}finally{H1(O)}}return $.value};if(typeof $!=="function"){let O=$.subscribe(()=>{U(_)});W=()=>{K=!0,O()}}else W=()=>{K=!0};if(G=j(),Z)U(_);if(l)l.scope.cleanups.push(()=>W?.());return()=>W?.()}function HJ($,X,Q={}){let Z=[],Y=$.map((J)=>J.value);for(let J of $){let G=J.subscribe(()=>{let W=$.map((K)=>K.value);X(W,Y),Y=[...W]});Z.push(G)}if(Q.immediate){let J=$.map((G)=>G.value);X(J,Y)}return()=>{for(let J of Z)J()}}function AJ($){let X,Q=!1,Z=()=>{if(Q)return;if(X)X();let Y=O1(Z);X=$(),H1(Y)};if(Z(),l)l.scope.cleanups.push(()=>{if(Q=!0,X)X()});return()=>{if(Q=!0,X)X()}}function qJ($){if(l)l.hooks.beforeMount.push($);else console.warn("[stx] onBeforeMount called outside of component setup")}function NJ($){if(l)l.hooks.mounted.push($);else console.warn("[stx] onMounted called outside of component setup")}function MJ($){if(l)l.hooks.beforeUpdate.push($);else console.warn("[stx] onBeforeUpdate called outside of component setup")}function VJ($){if(l)l.hooks.updated.push($);else console.warn("[stx] onUpdated called outside of component setup")}function EJ($){if(l)l.hooks.beforeUnmount.push($);else console.warn("[stx] onBeforeUnmount called outside of component setup")}function IJ($){if(l)l.hooks.unmounted.push($);else console.warn("[stx] onUnmounted called outside of component setup")}async function n0($,X){let Q=$.hooks[X];for(let Z of Q)await Z()}async function RJ($){await n0($,"beforeMount"),$.isMounted=!0,await n0($,"mounted")}async function DJ($){if(!$.isMounted||$.isUnmounted)return;await n0($,"beforeUpdate"),await n0($,"updated")}async function wJ($){if($.isUnmounted)return;await n0($,"beforeUnmount");for(let X of $.scope.cleanups)X();$.isUnmounted=!0,await n0($,"unmounted")}function TJ(){return`
|
|
3
3
|
<script data-stx-client-runtime>
|
|
4
4
|
(function() {
|
|
5
5
|
'use strict';
|
|
@@ -685,7 +685,7 @@ else {
|
|
|
685
685
|
<span class="frontmatter-label">${X}:</span>
|
|
686
686
|
<span>${Array.isArray(Q)?Q.join(", "):String(Q)}</span>
|
|
687
687
|
</div>`).join("")}
|
|
688
|
-
</div>`}import U6 from"net";async function J4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"0.0.0.0")})}async function G4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"::")})}async function W4($){if(!await J4($))return!1;return await G4($)}async function k0($,X=20){$=Number($);for(let Q=0;Q<X;Q++){let Z=$+Q;if(await W4(Z))return Z}throw Error(`Could not find an available port between ${$} and ${$+X-1}`)}var K4={title:"stx Development",width:1400,height:900,darkMode:!0,hotReload:!0,titlebarHidden:!1,nativeSidebar:!1,sidebarWidth:260,sidebarConfig:void 0};async function _4(){try{let $=await import("./chunk-
|
|
688
|
+
</div>`}import U6 from"net";async function J4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"0.0.0.0")})}async function G4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"::")})}async function W4($){if(!await J4($))return!1;return await G4($)}async function k0($,X=20){$=Number($);for(let Q=0;Q<X;Q++){let Z=$+Q;if(await W4(Z))return Z}throw Error(`Could not find an available port between ${$} and ${$+X-1}`)}var K4={title:"stx Development",width:1400,height:900,darkMode:!0,hotReload:!0,titlebarHidden:!1,nativeSidebar:!1,sidebarWidth:260,sidebarConfig:void 0};async function _4(){try{let $=await import("./chunk-p733w90w.js");if(typeof $.openDevWindow!=="function")return null;return $}catch{return null}}async function t0($,X={}){let Q={...K4,...X},Z=await _4();if(!Z)return console.log(`${B.yellow}\u26A0${B.reset} Native window requested, but @stacksjs/desktop is not available.`),console.log(" Install & build the desktop package to enable --native."),!1;try{let Y=await Z.openDevWindow($,{title:Q.title,width:Q.width,height:Q.height,darkMode:Q.darkMode,hotReload:Q.hotReload,titlebarHidden:Q.titlebarHidden,nativeSidebar:Q.nativeSidebar,sidebarWidth:Q.sidebarWidth,sidebarConfig:Q.sidebarConfig});if(Y&&Q.nativeSidebar)console.log(`${B.green}\u2713${B.reset} Native sidebar enabled (macOS Tahoe style)`);return Y}catch(Y){return console.log(`${B.red}\u2717${B.reset} Could not open native window:`,Y),!1}}function o1($){if($.match(/<Sidebar[\s\S]*?variant=["'](?:tahoe|vibrancy|desktop)["'][\s\S]*?\/>/i)){let Y=$.match(/<script\s+server[^>]*>([\s\S]*?)<\/script>/i);if(Y){let J=Y[1];try{let G=`
|
|
689
689
|
${J}
|
|
690
690
|
return typeof sidebarConfig !== 'undefined' ? sidebarConfig : null;
|
|
691
691
|
`,K=Function(G)();if(K)return K}catch(G){console.warn("Invalid sidebarConfig:",G)}}return{sections:[]}}let Q=$.match(/@nativeSidebar\s*\(\s*(\{[\s\S]*?\})\s*\)/m);if(Q)try{return JSON.parse(Q[1])}catch{console.warn("Invalid @nativeSidebar configuration")}let Z=$.match(/<script\s+native-sidebar[^>]*>([\s\S]*?)<\/script>/i);if(Z)try{let Y=Z[1].match(/(?:export\s+(?:default\s+)?|const\s+\w+\s*=\s*)(\{[\s\S]*\})/m);if(Y)return Function(`return ${Y[1]}`)()}catch(Y){console.warn("Invalid native-sidebar script configuration:",Y)}return}function i$(){console.log(`
|
|
@@ -1120,7 +1120,7 @@ ${H}`}if(O=await z6(O),W.forEach((L)=>Z.add(L)),Q.cache&&Q.cachePath){if(await J
|
|
|
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 H4($,X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=Y0.resolve($);if(!H0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return r$(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=S0(process.cwd(),"output");H0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let A={name:"public-assets",setup(I){I.onResolve({filter:/^\/(images|fonts|assets|public)\//},(w)=>{return{path:w.path,external:!0}})}},N=await Bun.build({entrypoints:[W],outdir:K,plugins:[A,X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!N.success)return console.error(`${B.red}Build failed:${B.reset}`,N.logs),!1;let V=N.outputs.find((I)=>I.path.endsWith(".html"));if(!V)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(V.path).text(),!0}catch(A){return console.error(`${B.red}Error building stx file:${B.reset}`,A),!1}};if(!await U())return!1;let z=Y0.dirname(W);await W$(z);let j=Q;try{if(j=await k0(Q),j!==Q)console.log(`${B.yellow}Port ${Q} 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 A=X.hmrPort||j+1;J=X$({wsPort:A,verbose:!1}),G=J.start(A)}let O={},L=null;try{let{loadStxConfig:A}=await import("./chunk-
|
|
1123
|
+
</html>`,loader:"html"}}})}};async function H4($,X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=Y0.resolve($);if(!H0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return r$(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=S0(process.cwd(),"output");H0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let A={name:"public-assets",setup(I){I.onResolve({filter:/^\/(images|fonts|assets|public)\//},(w)=>{return{path:w.path,external:!0}})}},N=await Bun.build({entrypoints:[W],outdir:K,plugins:[A,X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!N.success)return console.error(`${B.red}Build failed:${B.reset}`,N.logs),!1;let V=N.outputs.find((I)=>I.path.endsWith(".html"));if(!V)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(V.path).text(),!0}catch(A){return console.error(`${B.red}Error building stx file:${B.reset}`,A),!1}};if(!await U())return!1;let z=Y0.dirname(W);await W$(z);let j=Q;try{if(j=await k0(Q),j!==Q)console.log(`${B.yellow}Port ${Q} 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 A=X.hmrPort||j+1;J=X$({wsPort:A,verbose:!1}),G=J.start(A)}let O={},L=null;try{let{loadStxConfig:A}=await import("./chunk-bzcy2s4p.js"),N=await A();if(N?.apiRouter)L=N?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(N?.apiRoutes){O=N.apiRoutes;let V=Object.keys(O).length;if(V>0)console.log(`${B.blue}Loaded ${B.bright}${V} API route${V>1?"s":""}${B.reset}`)}if(N?.broadcasting?.enabled)try{let{startBroadcasting:V,loadChannels:M}=await import("./chunk-21195t36.js"),I=N.broadcasting;await V(I);let w=I.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${w}/ws${B.reset}`);let C=Y0.join(process.cwd(),"channels.ts");if(H0.existsSync(C))try{let R=await M(C);console.log(`${B.blue}Loaded ${B.bright}${R} broadcast channel${R!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(R){console.warn(`${B.yellow}Failed to load channels.ts: ${R.message}${B.reset}`)}}catch(V){console.warn(`${B.yellow}Broadcasting failed to start: ${V.message}${B.reset}`)}}catch{}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 H=O4({port:j,async fetch(A){return _$(A,await(async()=>{let N=new URL(A.url);if(L)try{let C=await L.handleRequest(A);if(C.status!==404)return C}catch{}if(O[N.pathname])try{return await O[N.pathname](A)}catch(C){return new Response(JSON.stringify({error:C.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(N.pathname==="/")return(async()=>{let R=await o(_||"");if(Y)R=D0(R,G);if(X.native)if(R.includes("<head>"))R=R.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(R.includes("<html"))R=R.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 R="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+R;if(X.titlebarHidden)if(R.includes("<head>"))R=R.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(R.includes("<html"))R=R.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 R=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${R}`;return R})().then((R)=>new Response(R,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}}));let V=Y0.join(K,N.pathname);if(H0.existsSync(V)&&H0.statSync(V).isFile()){let C=Bun.file(V),R=Y0.extname(V).toLowerCase(),E="text/plain";if(R===".ts"||R===".tsx"){let h=new Bun.Transpiler({loader:R===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(R){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}let M=Y0.dirname(W),I=Y0.join(M,N.pathname);if(H0.existsSync(I)&&H0.statSync(I).isFile()){let C=Bun.file(I),R=Y0.extname(I).toLowerCase(),E="text/plain";if(R===".ts"||R===".tsx"){let h=new Bun.Transpiler({loader:R===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(R){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".svg":E="image/svg+xml";break;case".ico":E="image/x-icon";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}let w=Y0.join(process.cwd(),"public",N.pathname);if(H0.existsSync(w)&&H0.statSync(w).isFile()){let C=Bun.file(w),R=Y0.extname(w).toLowerCase(),E="application/octet-stream";if(R===".ts"||R===".tsx"){let h=new Bun.Transpiler({loader:R===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(R){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".svg":E="image/svg+xml";break;case".ico":E="image/x-icon";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}return new Response("Not Found",{status:404})})())},error(A){return new Response(`<pre>${A}
|
|
1124
1124
|
${A.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 @@ ${O.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((O)=>O.routeTemplate)),j=Object.entries(G).filter(([O])=>!z.has(O)).sort(([O],[L])=>O.localeCompare(L)).map(([O,L])=>({route:O==="/"?"/":O,filePath:Q0.relative(process.cwd(),L.filePath),fileType:L.fileType}));for(let O of W){let L=O.routeTemplate.replace(/\[([^\]]+)\]/g,":$1");j.push({route:L,filePath:Q0.relative(process.cwd(),O.filePath),fileType:"stx"})}if(j.sort((O,L)=>O.route.localeCompare(L.route)),j.forEach((O,L)=>{let q=L===j.length-1?"\u2514\u2500 ":"\u251C\u2500 ",A=O.fileType==="md"?`${B.magenta}(markdown)${B.reset}`:"";console.log(` ${B.green}${q}${O.route}${B.reset} \u2192 ${B.bright}${O.filePath}${B.reset} ${A}`)}),console.log(`
|
|
1610
|
-
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(F.url.toString(),()=>{if(Z)P0.watch(J,{recursive:!0}).close();F.stop()}),Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let O=P0.watch(J,{recursive:!0},async(L,H)=>{if(!H)return;if(H.endsWith(".stx")||H.endsWith(".js")||H.endsWith(".ts")||H.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${H}${B.yellow} changed, rebuilding...${B.reset}`),m0.clear(),p0(),await K()});process.on("SIGINT",()=>{O.close(),F.stop(),process.exit(0)})}return!0}function O6($){return String($??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var{serve:N4}=globalThis.Bun;import J0 from"fs";import g from"path";async function M6($){try{return Z5(await Bun.file($).text())}catch{return}}function e$($){let X=Bun.file($),Q=g.extname($).toLowerCase(),Z={".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(Q)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Z[Q]||"application/octet-stream",...J}})}async function M4($=".",X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=g.resolve($),{loadStxConfig:K}=await import("./chunk-pzxytzqw.js"),_=await K(W),U=_.root&&_.root!=="."?g.join(W,_.root):W,F=X.pagesDir||_.pagesDir||"pages",z=g.join(U,F);if(!J0.existsSync(z))return console.error(`${B.red}Error: No '${F}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${z}${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 ${F}/index.stx for the homepage.${B.reset}`),!1;let j=X5(U,{pagesDir:F});if(j.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${z}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${j.length}${B.blue} routes${B.reset}`);let O=_?._pluginPageDirs||[],L=[];for(let{dir:D,prefix:T}of O)if(J0.existsSync(D)){let x=X5(g.dirname(D),{pagesDir:g.basename(D)});for(let S of x){let b=T==="/"?S.pattern:`${T}${S.pattern==="/"?"":S.pattern}`;L.push({route:{...S,pattern:b},prefix:T})}if(x.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${x.length}${B.blue} routes at ${B.cyan}${T}${B.reset}`)}let H=new Map,q=null,A=null;if(X.stxOptions?.shell!==!1){if(A=await y6(W,X.stxOptions?.shell),A){if(q=await Q5(A,X.stxOptions||{}),q)console.log(`${B.blue}Using app shell: ${B.bright}${g.relative(W,A)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}I6(),await D6(W);let N=R6();if(N.length>0)console.log(`${B.blue}Loaded ${B.bright}${N.length}${B.blue} middleware: ${B.dim}${N.join(", ")}${B.reset}`);let V={},M=null;try{let{loadStxConfig:D}=await import("./chunk-pzxytzqw.js"),T=await D(W);if(T?.apiRouter)M=T?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(T?.apiRoutes){V=T.apiRoutes;let x=Object.keys(V).length;if(x>0)console.log(`${B.blue}Loaded ${B.bright}${x} API route${x>1?"s":""}${B.reset}`)}if(T?.broadcasting?.enabled)try{let{startBroadcasting:x,loadChannels:S}=await import("./chunk-21195t36.js"),b=T.broadcasting;await x(b);let _0=b.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${_0}/ws${B.reset}`);let K0=g.join(process.cwd(),"channels.ts");if(J0.existsSync(K0))try{let C0=await S(K0);console.log(`${B.blue}Loaded ${B.bright}${C0} broadcast channel${C0!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(C0){console.warn(`${B.yellow}Failed to load channels.ts: ${C0.message}${B.reset}`)}}catch(x){console.warn(`${B.yellow}Broadcasting failed to start: ${x.message}${B.reset}`)}}catch{}let I=S0(W,"output");J0.mkdirSync(I,{recursive:!0});let w=new Map,C=new Set,R=async(D)=>{let T=V6(z,D);if(!T)return null;try{let x=await Bun.build({entrypoints:[T],outdir:I,plugins:[X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!x.success)return null;let S=x.outputs.find((b)=>b.path.endsWith(".html"));if(!S)return null;return await Bun.file(S.path).text()}catch{return null}},E=new Map,h=async(D,T)=>{try{let{processDirectives:x,extractVariables:S,defaultConfig:b,loadStxConfig:_0,injectRouterScript:K0}=await import("./chunk-pzxytzqw.js"),{checkCache:C0,cacheTemplate:u$,readFileCached:r,templateCache:f1}=await import("./chunk-d1ezh03e.js"),h1=await _0(W),k=(d)=>{if(!d)return d;if(g.isAbsolute(d))return d;return g.resolve(W,d)},y={...b,...h1,...X.stxOptions,autoShell:!0};if(X.debugDirectives)y.debug=!0;y.partialsDir=k(y.partialsDir),y.componentsDir=k(y.componentsDir),y.layoutsDir=k(y.layoutsDir),y.storesDir=k(y.storesDir||"stores"),y.cachePath=k(y.cachePath)??S0(W,"cache");let m=!T&&!X.profile,c=y.cache!==!1;if(c&&m){let d=f1.get(D.filePath);if(d)try{if((await J0.promises.stat(D.filePath)).mtime.getTime()<=d.mtime){let z0=!0;for(let $0 of d.dependencies){if(!J0.existsSync($0)){z0=!1;break}if((await J0.promises.stat($0)).mtime.getTime()>d.mtime){z0=!1;break}}if(z0){let $0=d.output;if(q)$0=L$($0,{preserveHead:!0});let j1=E.get(D.filePath);return{route:D,content:$0,status:j1?.status??await M6(D.filePath),headers:j1?.headers}}}}catch{}let L0=await C0(D.filePath,y);if(L0){let F0=L0;if(q)F0=L$(F0,{preserveHead:!0});let z0=E.get(D.filePath);return{route:D,content:F0,status:z0?.status??await M6(D.filePath),headers:z0?.headers}}}let s=c?await r(D.filePath):await Bun.file(D.filePath).text(),v=Z5(s),{classifyAllScripts:U0}=await import("./chunk-pzxytzqw.js"),B0=U0(s),a=B0.server.map((d)=>d.content),e=s;for(let d of B0.server)e=e.replace(d.fullTag,"");let n={__filename:D.filePath,__dirname:g.dirname(D.filePath),params:T??{},__stx_runtime_head:{}};for(let d of a)try{await S(d,n,D.filePath)}catch(L0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",D.filePath,L0?.message||L0)}let r0=new Set,N0;if(X.profile){let d=performance.now();N0=await x(e,n,D.filePath,y,r0);let L0=performance.now()-d,F0=g.relative(W,D.filePath)||D.filePath;console.log(`[stx:profile] ${F0} \u2192 ${L0.toFixed(2)}ms`)}else N0=await x(e,n,D.filePath,y,r0);if(!q)N0=await K0(N0,{router:y.router});{let{interpolateScriptExpressions:d}=await import("./chunk-rkhqmedy.js");N0=N0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(L0,F0,z0)=>{if(!/function\s+__stx_setup_/.test(z0))return L0;return`<script${F0}>${d(z0,n)}</script>`})}if(q)N0=L$(N0,{preserveHead:!0});if(c&&m)await u$(D.filePath,N0,r0,y);let{extractStreamBoundaries:t7}=await import("./chunk-qh4bhceg.js"),s0=t7(n),z1=n.__streamTemplates;if(z1&&typeof z1==="object"&&Object.keys(z1).length>0){let d=n.streamBoundaries||{},L0={...y,autoShell:!1},F0=Object.keys(z1).map(($0)=>({id:$0,render:async()=>{let j1=typeof d[$0]==="function"?await d[$0]():void 0;return x(z1[$0],{...n,$boundary:j1},D.filePath,L0,new Set)}})),z0=new Set(F0.map(($0)=>$0.id));s0=[...(s0||[]).filter(($0)=>!z0.has($0.id)),...F0]}if(s0&&s0.length>0)C.add(D.pattern);else s0=void 0;let u5=N1(n),m5=M1(n);if(m)E.set(D.filePath,{status:u5,headers:m5});return{route:D,content:N0,status:u5??v,headers:m5,boundaries:s0}}catch(x){return console.error(`${B.red}Error building ${B.bright}${D.pattern}${B.reset}:`,x),null}},u=8,t=async()=>{w.clear(),H.clear();for(let D=0;D<j.length;D+=u){let T=j.slice(D,D+u),x=await Promise.all(T.map((S)=>h(S)));for(let S of x)if(S)w.set(S.route.pattern,S)}for(let D=0;D<L.length;D+=u){let T=L.slice(D,D+u),x=await Promise.all(T.map(({route:S})=>h(S)));for(let S of x)if(S)H.set(S.route.pattern,S)}return w.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await t())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await W$(W);let W0=Q;try{if(W0=await k0(Q),W0!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${W0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let D=X.hmrPort||W0+1;J=X$({wsPort:D,verbose:!1}),G=J.start(D)}let v1=(D,T)=>{let S=`<script data-stx-route-params>(function(){var p=${JSON.stringify(T).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(D.includes("</head>"))return D.replace("</head>",`${S}</head>`);if(D.includes("<body"))return D.replace(/<body([^>]*)>/,`<body$1>${S}`);return S+D};console.log(`${B.blue}Starting server...${B.reset}`);let g1=N4({port:W0,async fetch(D){let T=new URL(D.url),x=_?.publicDir||"public",S=g.join(W,x,T.pathname),b=g.join(W,T.pathname),_0=g.join(I,T.pathname),[K0,C0,u$]=await Promise.all([J0.promises.stat(S).catch(()=>null),J0.promises.stat(b).catch(()=>null),J0.promises.stat(_0).catch(()=>null)]);if(K0?.isFile())return e$(S);if(C0?.isFile())return e$(b);if(u$?.isFile())return e$(_0);if(T.pathname.startsWith("/_stx/component/")){let k=decodeURIComponent(T.pathname.slice(16));if(k)try{let y=`<${k} />`,m={...buildConfig,autoShell:!1},c=await processDirectives(y,{},g.join(W,"components",`${k}.stx`),m,new Set);return new Response(c,{headers:{"Content-Type":"text/html"}})}catch(y){return new Response(`<div class="stx-async-error">${y.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(T.pathname==="/_stx/img"){let{handleImageRequest:k}=await import("./chunk-074bfahy.js"),y=await k(D,{publicDir:g.join(W,x),cacheDir:S0(W,"cache","img")});if(y)return y}if(M)try{let k=await M.handleRequest(D);if(k.status!==404)return k}catch{}if(V[T.pathname])try{return await V[T.pathname](D)}catch(k){return new Response(JSON.stringify({error:k.message}),{status:500,headers:{"Content-Type":"application/json"}})}let r=$5(T.pathname,j);if(r){let k=w.get(r.route.pattern),y=C.has(r.route.pattern);if(r.route.isDynamic&&Object.keys(r.params).length>0||y){let m=await h(r.route,r.params);if(m)k=m}if(k){let m=k.status??200,c=k.headers??{},s=(r.route.filePath?x6(await Bun.file(r.route.filePath).text().catch(()=>"")):null)??{};if(s.validate){if(!await s.validate({params:r.params})){let B0=await R(404);if(B0){let a=B0;if(a=await o(a,W),Y)a=D0(a,G);return new Response(a,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(s.middleware){let U0=w6(T.pathname,r.params,s,T.search),B0=T6(U0,null,D,{isServer:!0}),a=await C6(s.middleware,B0);if(a.redirect){let e=a.redirect.path,n=a.redirect.options.redirectCode||302,r0=new Headers(a.responseHeaders);return r0.set("Location",e),new Response(null,{status:n,headers:r0})}if(a.abort){let{statusCode:e,message:n}=a.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${e}</title></head><body><h1>Error ${e}</h1><p>${n}</p></body></html>`,{status:e,headers:{"Content-Type":"text/html"}})}if(Object.keys(a.state).length>0){let e=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(a.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;k.content=k.content.replace("</head>",`${e}</head>`)}}let v=k.content;if(q&&v6(D)){let U0=k6(v),B0=S6(v),a=v.match(/<title[^>]*>([\s\S]*?)<\/title>/i),e=a?a[1].trim():"";if(Object.keys(r.params).length>0)v=v1(v,r.params);v=await o(v,W);let n=_?.router?.container||"main";return v=g6(v,n),new Response(v,{status:m,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":U0.layout,"X-STX-Layout-Group":U0.group,"X-STX-Runtime":B0?"true":"false",...e&&{"X-STX-Title":encodeURIComponent(e)},[P6]:b6(),...Z1(),"Cache-Control":U$}})}if(q)v=B$(q,v);if(Object.keys(r.params).length>0)v=v1(v,r.params);if(v=await o(v,W),Y)v=D0(v,G);if(X.native)if(v.includes("<head>"))v=v.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 v="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+v;if(X.titlebarHidden)if(v.includes("<head>"))v=v.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 v=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${v}`;if(k.boundaries&&k.boundaries.length>0){let{renderStreamingPage:U0,streamToResponse:B0}=await import("./chunk-qh4bhceg.js");return B0(U0(v,k.boundaries,{timeoutMs:30000}),{status:m,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(v,{status:m,headers:{"Content-Type":"text/html",...Z1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...c}})}}if(L.length>0){let k=L.map((m)=>m.route),y=$5(T.pathname,k);if(y){let m=H.get(y.route.pattern);if(m){let c=m.content;if(q)c=B$(q,c);if(Object.keys(y.params).length>0)c=v1(c,y.params);if(c=await o(c,W),Y)c=D0(c,G);return new Response(c,{status:m.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:m}of O)if(m!=="/"&&T.pathname.startsWith(m)){let c=H.get(m)||H.get(m+"/");if(c){let s=c.content;if(q)s=B$(q,s);if(s=await o(s,W),Y)s=D0(s,G);return new Response(s,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let f1=w.get("/");if(f1){let k=f1.content;if(k=await o(k,W),Y)k=D0(k,G);if(X.native)if(k.includes("<head>"))k=k.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 k="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+k;return new Response(k,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let h1=await R(404);if(h1){let k=h1;if(k=await o(k,W),Y)k=D0(k,G);return new Response(k,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(D){let T=await R(500);if(T)return new Response(T,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${D}
|
|
1610
|
+
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(F.url.toString(),()=>{if(Z)P0.watch(J,{recursive:!0}).close();F.stop()}),Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let O=P0.watch(J,{recursive:!0},async(L,H)=>{if(!H)return;if(H.endsWith(".stx")||H.endsWith(".js")||H.endsWith(".ts")||H.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${H}${B.yellow} changed, rebuilding...${B.reset}`),m0.clear(),p0(),await K()});process.on("SIGINT",()=>{O.close(),F.stop(),process.exit(0)})}return!0}function O6($){return String($??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var{serve:N4}=globalThis.Bun;import J0 from"fs";import g from"path";async function M6($){try{return Z5(await Bun.file($).text())}catch{return}}function e$($){let X=Bun.file($),Q=g.extname($).toLowerCase(),Z={".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(Q)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Z[Q]||"application/octet-stream",...J}})}async function M4($=".",X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=g.resolve($),{loadStxConfig:K}=await import("./chunk-bzcy2s4p.js"),_=await K(W),U=_.root&&_.root!=="."?g.join(W,_.root):W,F=X.pagesDir||_.pagesDir||"pages",z=g.join(U,F);if(!J0.existsSync(z))return console.error(`${B.red}Error: No '${F}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${z}${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 ${F}/index.stx for the homepage.${B.reset}`),!1;let j=X5(U,{pagesDir:F});if(j.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${z}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${j.length}${B.blue} routes${B.reset}`);let O=_?._pluginPageDirs||[],L=[];for(let{dir:D,prefix:T}of O)if(J0.existsSync(D)){let x=X5(g.dirname(D),{pagesDir:g.basename(D)});for(let S of x){let b=T==="/"?S.pattern:`${T}${S.pattern==="/"?"":S.pattern}`;L.push({route:{...S,pattern:b},prefix:T})}if(x.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${x.length}${B.blue} routes at ${B.cyan}${T}${B.reset}`)}let H=new Map,q=null,A=null;if(X.stxOptions?.shell!==!1){if(A=await y6(W,X.stxOptions?.shell),A){if(q=await Q5(A,X.stxOptions||{}),q)console.log(`${B.blue}Using app shell: ${B.bright}${g.relative(W,A)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}I6(),await D6(W);let N=R6();if(N.length>0)console.log(`${B.blue}Loaded ${B.bright}${N.length}${B.blue} middleware: ${B.dim}${N.join(", ")}${B.reset}`);let V={},M=null;try{let{loadStxConfig:D}=await import("./chunk-bzcy2s4p.js"),T=await D(W);if(T?.apiRouter)M=T?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(T?.apiRoutes){V=T.apiRoutes;let x=Object.keys(V).length;if(x>0)console.log(`${B.blue}Loaded ${B.bright}${x} API route${x>1?"s":""}${B.reset}`)}if(T?.broadcasting?.enabled)try{let{startBroadcasting:x,loadChannels:S}=await import("./chunk-21195t36.js"),b=T.broadcasting;await x(b);let _0=b.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${_0}/ws${B.reset}`);let K0=g.join(process.cwd(),"channels.ts");if(J0.existsSync(K0))try{let C0=await S(K0);console.log(`${B.blue}Loaded ${B.bright}${C0} broadcast channel${C0!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(C0){console.warn(`${B.yellow}Failed to load channels.ts: ${C0.message}${B.reset}`)}}catch(x){console.warn(`${B.yellow}Broadcasting failed to start: ${x.message}${B.reset}`)}}catch{}let I=S0(W,"output");J0.mkdirSync(I,{recursive:!0});let w=new Map,C=new Set,R=async(D)=>{let T=V6(z,D);if(!T)return null;try{let x=await Bun.build({entrypoints:[T],outdir:I,plugins:[X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!x.success)return null;let S=x.outputs.find((b)=>b.path.endsWith(".html"));if(!S)return null;return await Bun.file(S.path).text()}catch{return null}},E=new Map,h=async(D,T)=>{try{let{processDirectives:x,extractVariables:S,defaultConfig:b,loadStxConfig:_0,injectRouterScript:K0}=await import("./chunk-bzcy2s4p.js"),{checkCache:C0,cacheTemplate:u$,readFileCached:r,templateCache:f1}=await import("./chunk-d1ezh03e.js"),h1=await _0(W),k=(d)=>{if(!d)return d;if(g.isAbsolute(d))return d;return g.resolve(W,d)},y={...b,...h1,...X.stxOptions,autoShell:!0};if(X.debugDirectives)y.debug=!0;y.partialsDir=k(y.partialsDir),y.componentsDir=k(y.componentsDir),y.layoutsDir=k(y.layoutsDir),y.storesDir=k(y.storesDir||"stores"),y.cachePath=k(y.cachePath)??S0(W,"cache");let m=!T&&!X.profile,c=y.cache!==!1;if(c&&m){let d=f1.get(D.filePath);if(d)try{if((await J0.promises.stat(D.filePath)).mtime.getTime()<=d.mtime){let z0=!0;for(let $0 of d.dependencies){if(!J0.existsSync($0)){z0=!1;break}if((await J0.promises.stat($0)).mtime.getTime()>d.mtime){z0=!1;break}}if(z0){let $0=d.output;if(q)$0=L$($0,{preserveHead:!0});let j1=E.get(D.filePath);return{route:D,content:$0,status:j1?.status??await M6(D.filePath),headers:j1?.headers}}}}catch{}let L0=await C0(D.filePath,y);if(L0){let F0=L0;if(q)F0=L$(F0,{preserveHead:!0});let z0=E.get(D.filePath);return{route:D,content:F0,status:z0?.status??await M6(D.filePath),headers:z0?.headers}}}let s=c?await r(D.filePath):await Bun.file(D.filePath).text(),v=Z5(s),{classifyAllScripts:U0}=await import("./chunk-bzcy2s4p.js"),B0=U0(s),a=B0.server.map((d)=>d.content),e=s;for(let d of B0.server)e=e.replace(d.fullTag,"");let n={__filename:D.filePath,__dirname:g.dirname(D.filePath),params:T??{},__stx_runtime_head:{}};for(let d of a)try{await S(d,n,D.filePath)}catch(L0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",D.filePath,L0?.message||L0)}let r0=new Set,N0;if(X.profile){let d=performance.now();N0=await x(e,n,D.filePath,y,r0);let L0=performance.now()-d,F0=g.relative(W,D.filePath)||D.filePath;console.log(`[stx:profile] ${F0} \u2192 ${L0.toFixed(2)}ms`)}else N0=await x(e,n,D.filePath,y,r0);if(!q)N0=await K0(N0,{router:y.router});{let{interpolateScriptExpressions:d}=await import("./chunk-rkhqmedy.js");N0=N0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(L0,F0,z0)=>{if(!/function\s+__stx_setup_/.test(z0))return L0;return`<script${F0}>${d(z0,n)}</script>`})}if(q)N0=L$(N0,{preserveHead:!0});if(c&&m)await u$(D.filePath,N0,r0,y);let{extractStreamBoundaries:t7}=await import("./chunk-qh4bhceg.js"),s0=t7(n),z1=n.__streamTemplates;if(z1&&typeof z1==="object"&&Object.keys(z1).length>0){let d=n.streamBoundaries||{},L0={...y,autoShell:!1},F0=Object.keys(z1).map(($0)=>({id:$0,render:async()=>{let j1=typeof d[$0]==="function"?await d[$0]():void 0;return x(z1[$0],{...n,$boundary:j1},D.filePath,L0,new Set)}})),z0=new Set(F0.map(($0)=>$0.id));s0=[...(s0||[]).filter(($0)=>!z0.has($0.id)),...F0]}if(s0&&s0.length>0)C.add(D.pattern);else s0=void 0;let u5=N1(n),m5=M1(n);if(m)E.set(D.filePath,{status:u5,headers:m5});return{route:D,content:N0,status:u5??v,headers:m5,boundaries:s0}}catch(x){return console.error(`${B.red}Error building ${B.bright}${D.pattern}${B.reset}:`,x),null}},u=8,t=async()=>{w.clear(),H.clear();for(let D=0;D<j.length;D+=u){let T=j.slice(D,D+u),x=await Promise.all(T.map((S)=>h(S)));for(let S of x)if(S)w.set(S.route.pattern,S)}for(let D=0;D<L.length;D+=u){let T=L.slice(D,D+u),x=await Promise.all(T.map(({route:S})=>h(S)));for(let S of x)if(S)H.set(S.route.pattern,S)}return w.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await t())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await W$(W);let W0=Q;try{if(W0=await k0(Q),W0!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${W0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let D=X.hmrPort||W0+1;J=X$({wsPort:D,verbose:!1}),G=J.start(D)}let v1=(D,T)=>{let S=`<script data-stx-route-params>(function(){var p=${JSON.stringify(T).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(D.includes("</head>"))return D.replace("</head>",`${S}</head>`);if(D.includes("<body"))return D.replace(/<body([^>]*)>/,`<body$1>${S}`);return S+D};console.log(`${B.blue}Starting server...${B.reset}`);let g1=N4({port:W0,async fetch(D){let T=new URL(D.url),x=_?.publicDir||"public",S=g.join(W,x,T.pathname),b=g.join(W,T.pathname),_0=g.join(I,T.pathname),[K0,C0,u$]=await Promise.all([J0.promises.stat(S).catch(()=>null),J0.promises.stat(b).catch(()=>null),J0.promises.stat(_0).catch(()=>null)]);if(K0?.isFile())return e$(S);if(C0?.isFile())return e$(b);if(u$?.isFile())return e$(_0);if(T.pathname.startsWith("/_stx/component/")){let k=decodeURIComponent(T.pathname.slice(16));if(k)try{let y=`<${k} />`,m={...buildConfig,autoShell:!1},c=await processDirectives(y,{},g.join(W,"components",`${k}.stx`),m,new Set);return new Response(c,{headers:{"Content-Type":"text/html"}})}catch(y){return new Response(`<div class="stx-async-error">${y.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(T.pathname==="/_stx/img"){let{handleImageRequest:k}=await import("./chunk-074bfahy.js"),y=await k(D,{publicDir:g.join(W,x),cacheDir:S0(W,"cache","img")});if(y)return y}if(M)try{let k=await M.handleRequest(D);if(k.status!==404)return k}catch{}if(V[T.pathname])try{return await V[T.pathname](D)}catch(k){return new Response(JSON.stringify({error:k.message}),{status:500,headers:{"Content-Type":"application/json"}})}let r=$5(T.pathname,j);if(r){let k=w.get(r.route.pattern),y=C.has(r.route.pattern);if(r.route.isDynamic&&Object.keys(r.params).length>0||y){let m=await h(r.route,r.params);if(m)k=m}if(k){let m=k.status??200,c=k.headers??{},s=(r.route.filePath?x6(await Bun.file(r.route.filePath).text().catch(()=>"")):null)??{};if(s.validate){if(!await s.validate({params:r.params})){let B0=await R(404);if(B0){let a=B0;if(a=await o(a,W),Y)a=D0(a,G);return new Response(a,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(s.middleware){let U0=w6(T.pathname,r.params,s,T.search),B0=T6(U0,null,D,{isServer:!0}),a=await C6(s.middleware,B0);if(a.redirect){let e=a.redirect.path,n=a.redirect.options.redirectCode||302,r0=new Headers(a.responseHeaders);return r0.set("Location",e),new Response(null,{status:n,headers:r0})}if(a.abort){let{statusCode:e,message:n}=a.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${e}</title></head><body><h1>Error ${e}</h1><p>${n}</p></body></html>`,{status:e,headers:{"Content-Type":"text/html"}})}if(Object.keys(a.state).length>0){let e=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(a.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;k.content=k.content.replace("</head>",`${e}</head>`)}}let v=k.content;if(q&&v6(D)){let U0=k6(v),B0=S6(v),a=v.match(/<title[^>]*>([\s\S]*?)<\/title>/i),e=a?a[1].trim():"";if(Object.keys(r.params).length>0)v=v1(v,r.params);v=await o(v,W);let n=_?.router?.container||"main";return v=g6(v,n),new Response(v,{status:m,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":U0.layout,"X-STX-Layout-Group":U0.group,"X-STX-Runtime":B0?"true":"false",...e&&{"X-STX-Title":encodeURIComponent(e)},[P6]:b6(),...Z1(),"Cache-Control":U$}})}if(q)v=B$(q,v);if(Object.keys(r.params).length>0)v=v1(v,r.params);if(v=await o(v,W),Y)v=D0(v,G);if(X.native)if(v.includes("<head>"))v=v.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 v="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+v;if(X.titlebarHidden)if(v.includes("<head>"))v=v.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 v=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${v}`;if(k.boundaries&&k.boundaries.length>0){let{renderStreamingPage:U0,streamToResponse:B0}=await import("./chunk-qh4bhceg.js");return B0(U0(v,k.boundaries,{timeoutMs:30000}),{status:m,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(v,{status:m,headers:{"Content-Type":"text/html",...Z1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...c}})}}if(L.length>0){let k=L.map((m)=>m.route),y=$5(T.pathname,k);if(y){let m=H.get(y.route.pattern);if(m){let c=m.content;if(q)c=B$(q,c);if(Object.keys(y.params).length>0)c=v1(c,y.params);if(c=await o(c,W),Y)c=D0(c,G);return new Response(c,{status:m.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:m}of O)if(m!=="/"&&T.pathname.startsWith(m)){let c=H.get(m)||H.get(m+"/");if(c){let s=c.content;if(q)s=B$(q,s);if(s=await o(s,W),Y)s=D0(s,G);return new Response(s,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let f1=w.get("/");if(f1){let k=f1.content;if(k=await o(k,W),Y)k=D0(k,G);if(X.native)if(k.includes("<head>"))k=k.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 k="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+k;return new Response(k,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let h1=await R(404);if(h1){let k=h1;if(k=await o(k,W),Y)k=D0(k,G);return new Response(k,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(D){let T=await R(500);if(T)return new Response(T,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${D}
|
|
1611
1611
|
${D.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:${W0}/${B.reset}`),Y)console.log(`${B.dim} HMR: ws://localhost:${G}${B.reset}`);console.log(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ag as t,Bg as e,Dg as b,Mg as JJ}from"./chunk-8qax49p0.js";import{Qm as u,Rm as l,bp as o,im as y,jm as P,sm as x,tp as g,zm as v}from"./chunk-h7aynn48.js";import{Bu as s,Fu as OJ,_t as a}from"./chunk-5ec3m8hk.js";import{Pu as R}from"./chunk-p3kn55v4.js";import r from"fs";import B from"path";var{serve:IJ}=globalThis.Bun;function q(J,K,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(K)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function KJ(J){let K=J.headers.get("content-type")||"",Q={},X=(Z,$)=>{let G=Q[Z];if(G===void 0)Q[Z]=$;else if(Array.isArray(G))G.push($);else Q[Z]=[G,$]};if(K.includes("multipart/form-data")){let Z=await J.formData();for(let[$,G]of Z.entries())if(typeof G==="string")X($,G);return Q}if(K.includes("application/x-www-form-urlencoded")){for(let[Z,$]of new URLSearchParams(await J.text()).entries())X(Z,$);return Q}return Q}function f(J){if(!J)return!1;let K=J.toUpperCase();return K!=="GET"&&K!=="HEAD"}async function h(J,K={}){let Q=K.request,X=K.method??Q?.method;if(!Q||!f(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let Z={};try{Z=await KJ(Q)}catch{}let $=await J.action({request:Q,form:Z,params:K.params??{},query:J.query??{},cookies:K.cookies??{}});if($&&typeof $==="object"){let G=$,W=QJ(G.cookies),I=G.redirect;if(typeof I==="string"&&I)return{redirect:I,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:_,redirect:N,...U}=G;if(Object.assign(J,U),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function QJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let K=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){K.push(q(Q,X));continue}if(X&&typeof X==="object"){let Z=X;if(typeof Z.value!=="string")continue;K.push(q(Q,Z.value,Z))}}return K}function m(J,K=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let Z of K)X.append("Set-Cookie",Z);for(let[Z,$]of Object.entries(Q??{}))if(Z.toLowerCase()!=="location")X.set(Z,$);return new Response(null,{status:303,headers:X})}async function wJ(J,K={}){return(await c(J,K)).html}async function d(J,K={}){let{html:Q,context:X,redirect:Z,cookies:$}=await c(J,K),G=u(X),W=l(X);if(Z)return{html:Q,redirect:Z,cookies:$,status:G,headers:W};let{extractStreamBoundaries:I}=await import("./chunk-qh4bhceg.js"),_=I(X),N=J.streamTemplates;if(N&&Object.keys(N).length>0){let{processDirectives:U}=await import("./chunk-1vd6bg7v.js"),{defaultConfig:z}=await import("./chunk-3mm46ez1.js"),O=X.streamBoundaries||{},w={...z,autoShell:!1},D=Object.keys(N).map((V)=>({id:V,render:async()=>{let F=typeof O[V]==="function"?await O[V]():void 0;return U(N[V],{...X,$boundary:F},J.sourceFile,w,new Set)}})),E=new Set(D.map((V)=>V.id));_=[...(_||[]).filter((V)=>!E.has(V.id)),...D]}return{html:Q,boundaries:_&&_.length>0?_:void 0,cookies:$,status:G,headers:W}}async function c(J,K){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};if(!J.hasServerScripts&&!P(J.html))return{html:J.html,context:Q};for(let $ of J.serverScriptContent)try{await g($,Q,J.sourceFile)}catch(G){console.warn(`[stx] Server script error in ${J.sourceFile}:`,G)}let X=await h(Q,{request:K.request,method:K.method,params:K.params??{},cookies:K.cookies??{}});if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!P(J.html))return{html:J.html,context:Q,cookies:X.cookies};let Z=new Map;for(let[$,G]of Object.entries(J.placeholders))if(G.expression)try{let W=v(G.expression,Q);if(G.type==="raw")Z.set($,W!==void 0&&W!==null?String(W):"");else Z.set($,W!==void 0&&W!==null?x(String(W)):"")}catch{Z.set($,"")}return{html:y(J.html,Z),context:Q,cookies:X.cookies}}async function AJ(J,K={}){if(!J.hasServerScripts&&!P(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};for(let Z of J.serverScriptContent)try{await g(Z,Q,J.sourceFile)}catch($){console.warn(`[stx] Server script error in ${J.sourceFile}:`,$)}if(!P(J.fragment))return J.fragment;let X=new Map;for(let[Z,$]of Object.entries(J.placeholders))if($.expression)try{let G=v($.expression,Q);if($.type==="raw")X.set(Z,G!==void 0&&G!==null?String(G):"");else X.set(Z,G!==void 0&&G!==null?x(String(G)):"")}catch{X.set(Z,"")}return y(J.fragment,X)}OJ();import C from"zlib";import{promisify as n}from"util";var XJ=n(C.brotliCompress),ZJ=n(C.gzip),$J=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],GJ=["text/event-stream","multipart/x-mixed-replace"],UJ=1024;function WJ(J){if(!J)return!1;let K=J.toLowerCase();if(GJ.some((Q)=>K.startsWith(Q)))return!1;return $J.some((Q)=>K.startsWith(Q))}function jJ(J){let K=new Map;for(let Q of J.split(",")){let[X,...Z]=Q.trim().split(";"),$=X.trim().toLowerCase();if(!$)continue;let G=1;for(let W of Z){let I=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(W);if(!I)continue;let _=Number.parseFloat(I[1]);if(Number.isFinite(_))G=_}K.set($,G)}return K}function YJ(J){if(!J)return null;let K=jJ(J),Q=K.get("*"),X=(Z)=>K.get(Z)??Q??0;if(X("br")>0)return"br";if(X("gzip")>0)return"gzip";return null}async function i(J,K,Q={}){if(K.headers.get("content-encoding"))return K;if(K.status===204||K.status===304||!K.body)return K;if(!WJ(K.headers.get("content-type")))return K;let X=YJ(J.headers.get("accept-encoding"));if(!X)return K;let Z;try{Z=new Uint8Array(await K.arrayBuffer())}catch{return K}let $=()=>new Response(Z,{status:K.status,statusText:K.statusText,headers:p(K.headers)});if(Z.length<(Q.threshold??UJ))return $();try{let G=X==="br"?await XJ(Z,{params:{[C.constants.BROTLI_PARAM_QUALITY]:Q.quality??5,[C.constants.BROTLI_PARAM_SIZE_HINT]:Z.length}}):await ZJ(Z);if(G.length>=Z.length)return $();let W=p(K.headers);return W.set("Content-Encoding",X),W.set("Content-Length",String(G.length)),new Response(G,{status:K.status,statusText:K.statusText,headers:W})}catch{return $()}}function p(J){let K=new Headers(J),Q=K.get("Vary");if(!Q)return K.set("Vary","Accept-Encoding"),K;if(!Q.split(",").some((Z)=>Z.trim().toLowerCase()==="accept-encoding"))K.set("Vary",`${Q}, Accept-Encoding`);return K}var _J={".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 mJ(J={}){let K=B.resolve(J.outputDir||".output"),Q=J.port||3000,X=JJ(K);if(!X)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${X.routes.length} routes...`);let Z=new Map,$=new Map,G=new Map,W=new Map;for(let U of X.routes)try{let z=B.join(K,U.compiledPath),O=JSON.parse(await Bun.file(z).text());Z.set(U.pattern,O),G.set(U.pattern,s(O.html)),W.set(U.pattern,o(O.html));let w=B.join(K,U.fragmentPath);if(await Bun.file(w).exists())$.set(U.pattern,await Bun.file(w).text())}catch(z){console.warn(`[stx] Failed to load route ${U.pattern}:`,z)}let I=new Map,_=[];for(let U of X.routes)if(U.hasParams){let{regex:z,params:O}=a(U.pattern);_.push({regex:z,route:U,paramNames:O})}else I.set(U.pattern,U);let N=IJ({port:Q,async fetch(U){return i(U,await(async()=>{let O=new URL(U.url).pathname;if(J.onRequest){let j=await J.onRequest(U);if(j)return j}if(J.apiRoutes?.[O])return J.apiRoutes[O](U);if((U.method==="GET"||U.method==="HEAD")&&O!=="/"){let j=B.resolve(K,"public"),Y;try{Y=decodeURIComponent(O)}catch{Y=O}if(!Y.includes("\x00")){let L=B.resolve(j,`.${Y}`);if(L===j||L.startsWith(`${j}${B.sep}`))try{if(r.existsSync(L)&&r.statSync(L).isFile()){let M=B.extname(L).toLowerCase(),S=_J[M]||"application/octet-stream",H=O.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(O);return new Response(Bun.file(L),{headers:{"Content-Type":S,"Cache-Control":H?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let w=e(U),D=null,E={};if(D=I.get(O)||null,!D)for(let{regex:j,route:Y,paramNames:L}of _){let A=O.match(j);if(A){D=Y,L.forEach((M,S)=>{E[M]=A[S+1]});break}}if(!D){let j=I.get("/404")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}if(w){let j=$.get(D.pattern);if(j){let Y=G.get(D.pattern);return new Response(j,{headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...W.has(D.pattern)?{"X-STX-Runtime":W.get(D.pattern)?"true":"false"}:{},...Y?{"X-STX-Layout":Y.layout,"X-STX-Layout-Group":Y.group}:{},...b(),"Cache-Control":t}})}}let V=f(U.method),F=Z.get(D.pattern);if(!F){let j=I.get("/500")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(!V&&!F.hasServerScripts&&Object.keys(F.placeholders).length===0)return new Response(F.html,{status:F.status??200,headers:{"Content-Type":"text/html",...b(),"Cache-Control":"public, max-age=60"}});try{let{html:j,boundaries:Y,redirect:L,cookies:A,status:M,headers:S}=await d(F,{params:E,request:U,method:U.method});if(L)return m(L,A,S);if(Y&&Y.length>0){let{renderStreamingPage:T,streamToResponse:k}=await import("./chunk-qh4bhceg.js");return k(T(j,Y,{timeoutMs:30000}),{status:M??F.status??200,headers:{"Cache-Control":"no-cache",...S}})}let H=new Headers({"Content-Type":"text/html",...b(),"Cache-Control":"no-cache"});for(let T of A??[])H.append("Set-Cookie",T);for(let[T,k]of Object.entries(S??{}))H.set(T,k);return new Response(j,{status:M??F.status??200,headers:H})}catch(j){return console.error(`[stx] Hydration error for ${O}:`,j),new Response(F.html,{headers:{"Content-Type":"text/html"}})}})())}});return console.log(`[stx] Production server running at http://localhost:${Q}`),console.log(`[stx] Serving ${X.routes.length} routes (${Z.size} pre-loaded)`),{port:Q,stop:()=>N.stop()}}
|
|
2
|
+
import{Ag as t,Bg as e,Dg as b,Mg as JJ}from"./chunk-65ds4gey.js";import{Qm as u,Rm as l,bp as o,im as y,jm as P,sm as x,tp as g,zm as v}from"./chunk-h7aynn48.js";import{Bu as s,Fu as OJ,_t as a}from"./chunk-5ec3m8hk.js";import{Pu as R}from"./chunk-p3kn55v4.js";import r from"fs";import B from"path";var{serve:IJ}=globalThis.Bun;function q(J,K,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(K)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function KJ(J){let K=J.headers.get("content-type")||"",Q={},X=(Z,$)=>{let G=Q[Z];if(G===void 0)Q[Z]=$;else if(Array.isArray(G))G.push($);else Q[Z]=[G,$]};if(K.includes("multipart/form-data")){let Z=await J.formData();for(let[$,G]of Z.entries())if(typeof G==="string")X($,G);return Q}if(K.includes("application/x-www-form-urlencoded")){for(let[Z,$]of new URLSearchParams(await J.text()).entries())X(Z,$);return Q}return Q}function f(J){if(!J)return!1;let K=J.toUpperCase();return K!=="GET"&&K!=="HEAD"}async function h(J,K={}){let Q=K.request,X=K.method??Q?.method;if(!Q||!f(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let Z={};try{Z=await KJ(Q)}catch{}let $=await J.action({request:Q,form:Z,params:K.params??{},query:J.query??{},cookies:K.cookies??{}});if($&&typeof $==="object"){let G=$,W=QJ(G.cookies),I=G.redirect;if(typeof I==="string"&&I)return{redirect:I,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:_,redirect:N,...U}=G;if(Object.assign(J,U),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function QJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let K=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){K.push(q(Q,X));continue}if(X&&typeof X==="object"){let Z=X;if(typeof Z.value!=="string")continue;K.push(q(Q,Z.value,Z))}}return K}function m(J,K=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let Z of K)X.append("Set-Cookie",Z);for(let[Z,$]of Object.entries(Q??{}))if(Z.toLowerCase()!=="location")X.set(Z,$);return new Response(null,{status:303,headers:X})}async function wJ(J,K={}){return(await c(J,K)).html}async function d(J,K={}){let{html:Q,context:X,redirect:Z,cookies:$}=await c(J,K),G=u(X),W=l(X);if(Z)return{html:Q,redirect:Z,cookies:$,status:G,headers:W};let{extractStreamBoundaries:I}=await import("./chunk-qh4bhceg.js"),_=I(X),N=J.streamTemplates;if(N&&Object.keys(N).length>0){let{processDirectives:U}=await import("./chunk-1vd6bg7v.js"),{defaultConfig:z}=await import("./chunk-3mm46ez1.js"),O=X.streamBoundaries||{},w={...z,autoShell:!1},D=Object.keys(N).map((V)=>({id:V,render:async()=>{let F=typeof O[V]==="function"?await O[V]():void 0;return U(N[V],{...X,$boundary:F},J.sourceFile,w,new Set)}})),E=new Set(D.map((V)=>V.id));_=[...(_||[]).filter((V)=>!E.has(V.id)),...D]}return{html:Q,boundaries:_&&_.length>0?_:void 0,cookies:$,status:G,headers:W}}async function c(J,K){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};if(!J.hasServerScripts&&!P(J.html))return{html:J.html,context:Q};for(let $ of J.serverScriptContent)try{await g($,Q,J.sourceFile)}catch(G){console.warn(`[stx] Server script error in ${J.sourceFile}:`,G)}let X=await h(Q,{request:K.request,method:K.method,params:K.params??{},cookies:K.cookies??{}});if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!P(J.html))return{html:J.html,context:Q,cookies:X.cookies};let Z=new Map;for(let[$,G]of Object.entries(J.placeholders))if(G.expression)try{let W=v(G.expression,Q);if(G.type==="raw")Z.set($,W!==void 0&&W!==null?String(W):"");else Z.set($,W!==void 0&&W!==null?x(String(W)):"")}catch{Z.set($,"")}return{html:y(J.html,Z),context:Q,cookies:X.cookies}}async function AJ(J,K={}){if(!J.hasServerScripts&&!P(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};for(let Z of J.serverScriptContent)try{await g(Z,Q,J.sourceFile)}catch($){console.warn(`[stx] Server script error in ${J.sourceFile}:`,$)}if(!P(J.fragment))return J.fragment;let X=new Map;for(let[Z,$]of Object.entries(J.placeholders))if($.expression)try{let G=v($.expression,Q);if($.type==="raw")X.set(Z,G!==void 0&&G!==null?String(G):"");else X.set(Z,G!==void 0&&G!==null?x(String(G)):"")}catch{X.set(Z,"")}return y(J.fragment,X)}OJ();import C from"zlib";import{promisify as n}from"util";var XJ=n(C.brotliCompress),ZJ=n(C.gzip),$J=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],GJ=["text/event-stream","multipart/x-mixed-replace"],UJ=1024;function WJ(J){if(!J)return!1;let K=J.toLowerCase();if(GJ.some((Q)=>K.startsWith(Q)))return!1;return $J.some((Q)=>K.startsWith(Q))}function jJ(J){let K=new Map;for(let Q of J.split(",")){let[X,...Z]=Q.trim().split(";"),$=X.trim().toLowerCase();if(!$)continue;let G=1;for(let W of Z){let I=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(W);if(!I)continue;let _=Number.parseFloat(I[1]);if(Number.isFinite(_))G=_}K.set($,G)}return K}function YJ(J){if(!J)return null;let K=jJ(J),Q=K.get("*"),X=(Z)=>K.get(Z)??Q??0;if(X("br")>0)return"br";if(X("gzip")>0)return"gzip";return null}async function i(J,K,Q={}){if(K.headers.get("content-encoding"))return K;if(K.status===204||K.status===304||!K.body)return K;if(!WJ(K.headers.get("content-type")))return K;let X=YJ(J.headers.get("accept-encoding"));if(!X)return K;let Z;try{Z=new Uint8Array(await K.arrayBuffer())}catch{return K}let $=()=>new Response(Z,{status:K.status,statusText:K.statusText,headers:p(K.headers)});if(Z.length<(Q.threshold??UJ))return $();try{let G=X==="br"?await XJ(Z,{params:{[C.constants.BROTLI_PARAM_QUALITY]:Q.quality??5,[C.constants.BROTLI_PARAM_SIZE_HINT]:Z.length}}):await ZJ(Z);if(G.length>=Z.length)return $();let W=p(K.headers);return W.set("Content-Encoding",X),W.set("Content-Length",String(G.length)),new Response(G,{status:K.status,statusText:K.statusText,headers:W})}catch{return $()}}function p(J){let K=new Headers(J),Q=K.get("Vary");if(!Q)return K.set("Vary","Accept-Encoding"),K;if(!Q.split(",").some((Z)=>Z.trim().toLowerCase()==="accept-encoding"))K.set("Vary",`${Q}, Accept-Encoding`);return K}var _J={".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 mJ(J={}){let K=B.resolve(J.outputDir||".output"),Q=J.port||3000,X=JJ(K);if(!X)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${X.routes.length} routes...`);let Z=new Map,$=new Map,G=new Map,W=new Map;for(let U of X.routes)try{let z=B.join(K,U.compiledPath),O=JSON.parse(await Bun.file(z).text());Z.set(U.pattern,O),G.set(U.pattern,s(O.html)),W.set(U.pattern,o(O.html));let w=B.join(K,U.fragmentPath);if(await Bun.file(w).exists())$.set(U.pattern,await Bun.file(w).text())}catch(z){console.warn(`[stx] Failed to load route ${U.pattern}:`,z)}let I=new Map,_=[];for(let U of X.routes)if(U.hasParams){let{regex:z,params:O}=a(U.pattern);_.push({regex:z,route:U,paramNames:O})}else I.set(U.pattern,U);let N=IJ({port:Q,async fetch(U){return i(U,await(async()=>{let O=new URL(U.url).pathname;if(J.onRequest){let j=await J.onRequest(U);if(j)return j}if(J.apiRoutes?.[O])return J.apiRoutes[O](U);if((U.method==="GET"||U.method==="HEAD")&&O!=="/"){let j=B.resolve(K,"public"),Y;try{Y=decodeURIComponent(O)}catch{Y=O}if(!Y.includes("\x00")){let L=B.resolve(j,`.${Y}`);if(L===j||L.startsWith(`${j}${B.sep}`))try{if(r.existsSync(L)&&r.statSync(L).isFile()){let M=B.extname(L).toLowerCase(),S=_J[M]||"application/octet-stream",H=O.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(O);return new Response(Bun.file(L),{headers:{"Content-Type":S,"Cache-Control":H?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let w=e(U),D=null,E={};if(D=I.get(O)||null,!D)for(let{regex:j,route:Y,paramNames:L}of _){let A=O.match(j);if(A){D=Y,L.forEach((M,S)=>{E[M]=A[S+1]});break}}if(!D){let j=I.get("/404")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}if(w){let j=$.get(D.pattern);if(j){let Y=G.get(D.pattern);return new Response(j,{headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...W.has(D.pattern)?{"X-STX-Runtime":W.get(D.pattern)?"true":"false"}:{},...Y?{"X-STX-Layout":Y.layout,"X-STX-Layout-Group":Y.group}:{},...b(),"Cache-Control":t}})}}let V=f(U.method),F=Z.get(D.pattern);if(!F){let j=I.get("/500")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(!V&&!F.hasServerScripts&&Object.keys(F.placeholders).length===0)return new Response(F.html,{status:F.status??200,headers:{"Content-Type":"text/html",...b(),"Cache-Control":"public, max-age=60"}});try{let{html:j,boundaries:Y,redirect:L,cookies:A,status:M,headers:S}=await d(F,{params:E,request:U,method:U.method});if(L)return m(L,A,S);if(Y&&Y.length>0){let{renderStreamingPage:T,streamToResponse:k}=await import("./chunk-qh4bhceg.js");return k(T(j,Y,{timeoutMs:30000}),{status:M??F.status??200,headers:{"Cache-Control":"no-cache",...S}})}let H=new Headers({"Content-Type":"text/html",...b(),"Cache-Control":"no-cache"});for(let T of A??[])H.append("Set-Cookie",T);for(let[T,k]of Object.entries(S??{}))H.set(T,k);return new Response(j,{status:M??F.status??200,headers:H})}catch(j){return console.error(`[stx] Hydration error for ${O}:`,j),new Response(F.html,{headers:{"Content-Type":"text/html"}})}})())}});return console.log(`[stx] Production server running at http://localhost:${Q}`),console.log(`[stx] Serving ${X.routes.length} routes (${Z.size} pre-loaded)`),{port:Q,stop:()=>N.stop()}}
|
|
3
3
|
export{WJ as lg,YJ as mg,i as ng,q as og,KJ as pg,f as qg,h as rg,m as sg,wJ as tg,d as ug,AJ as vg,mJ as wg};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{wg as a}from"./chunk-
|
|
2
|
+
import{wg as a}from"./chunk-5880yp78.js";import"./chunk-65ds4gey.js";import"./chunk-h7aynn48.js";import"./chunk-0athjw48.js";import"./chunk-135mme4g.js";import"./chunk-f3m0q482.js";import"./chunk-f1jd5qjb.js";import"./chunk-v0y3drpw.js";import"./chunk-0pdrnxg2.js";import"./chunk-j26v67km.js";import"./chunk-3gjrq8m7.js";import"./chunk-mh4hd2wt.js";import"./chunk-fa3pamx8.js";import"./chunk-5ec3m8hk.js";import"./chunk-snh1ahqp.js";import"./chunk-p3kn55v4.js";export{a as startProductionServer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{km as E,lm as M,yq as T}from"./chunk-h7aynn48.js";import{Cu as d,Eu as c,Fu as i}from"./chunk-5ec3m8hk.js";import{Mu as m,Pu as p}from"./chunk-p3kn55v4.js";var y=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function f(z,Q,F){let J={fullTag:F,content:Q,attrs:z};if(/\bserver\b/.test(z))return{...J,type:"server"};if(/\bdata-stx-scoped\b/.test(z))return{...J,type:"client"};if(y.test(Q))return{...J,type:"signals"};if(/\bclient\b/.test(z)||/\btype\s*=\s*["']module["']/.test(z)||/\bsrc\s*=/.test(z))return{...J,type:"client"};return{...J,type:"server"}}var g=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function P(z){let Q=[],F=[],J=[],$=0;while($<z.length){let Y=z.indexOf("<",$);if(Y===-1)break;let K=M(z,Y);if(K>Y){$=K;continue}let Z=E(z,Y);if(Z>Y){let B=z.slice(Y,Z),U=g.exec(B);if(U){let X=f(U[1],U[2],B);switch(X.type){case"signals":Q.push(X);break;case"client":F.push(X);break;case"server":J.push(X);break}}$=Z;continue}$=Y+(z.startsWith("<!--",Y)?4:1)}return{signals:Q,client:F,server:J}}var s="X-STX-Router",a="private, no-store";function R(z){return z.headers.get("X-STX-Router")==="true"}function u(z,Q){if(!z)return Q;return z.split(",").some((J)=>J.trim().toLowerCase()===Q.toLowerCase())?z:`${z}, ${Q}`}function t(z){return{Vary:u(z,"X-STX-Router")}}import L from"path";d();var h="stx-page-head:",o=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,I=null;function r(){if(I!==null)return I;try{let{getRouterScript:z}=(i(),m(c));I=`<script>${z()}</script>`}catch{I=""}return I}async function Yz(z,Q){if(Q===!1)return null;if(Q&&typeof Q==="string"){let J=L.resolve(z,Q);if(await Bun.file(J).exists())return J;return null}let F=L.join(z,"app.stx");if(await Bun.file(F).exists())return F;return null}async function Zz(z,Q){try{let F=await Bun.file(z).text(),J=F,$=F.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)J=$[1].trim();let Y=P(F),K=[...Y.client.map((j)=>j.fullTag),...Y.signals.map((j)=>j.fullTag)],Z=[],B=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,U;while((U=B.exec(F))!==null)Z.push(U[0]);let X=J;for(let j of Y.server)X=X.replace(j.fullTag,"");for(let j of Y.client)X=X.replace(j.fullTag,"");X=X.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let W="<!--__STX_PAGE_SLOT__-->";if(X=X.replace(/<slot\s*\/>/gi,W).replace(/<slot\s*>\s*<\/slot>/gi,W),!X.includes(W))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:q,extractVariables:k,defaultConfig:v,loadStxConfig:H}=await import("./chunk-
|
|
2
|
+
import{km as E,lm as M,yq as T}from"./chunk-h7aynn48.js";import{Cu as d,Eu as c,Fu as i}from"./chunk-5ec3m8hk.js";import{Mu as m,Pu as p}from"./chunk-p3kn55v4.js";var y=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function f(z,Q,F){let J={fullTag:F,content:Q,attrs:z};if(/\bserver\b/.test(z))return{...J,type:"server"};if(/\bdata-stx-scoped\b/.test(z))return{...J,type:"client"};if(y.test(Q))return{...J,type:"signals"};if(/\bclient\b/.test(z)||/\btype\s*=\s*["']module["']/.test(z)||/\bsrc\s*=/.test(z))return{...J,type:"client"};return{...J,type:"server"}}var g=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function P(z){let Q=[],F=[],J=[],$=0;while($<z.length){let Y=z.indexOf("<",$);if(Y===-1)break;let K=M(z,Y);if(K>Y){$=K;continue}let Z=E(z,Y);if(Z>Y){let B=z.slice(Y,Z),U=g.exec(B);if(U){let X=f(U[1],U[2],B);switch(X.type){case"signals":Q.push(X);break;case"client":F.push(X);break;case"server":J.push(X);break}}$=Z;continue}$=Y+(z.startsWith("<!--",Y)?4:1)}return{signals:Q,client:F,server:J}}var s="X-STX-Router",a="private, no-store";function R(z){return z.headers.get("X-STX-Router")==="true"}function u(z,Q){if(!z)return Q;return z.split(",").some((J)=>J.trim().toLowerCase()===Q.toLowerCase())?z:`${z}, ${Q}`}function t(z){return{Vary:u(z,"X-STX-Router")}}import L from"path";d();var h="stx-page-head:",o=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,I=null;function r(){if(I!==null)return I;try{let{getRouterScript:z}=(i(),m(c));I=`<script>${z()}</script>`}catch{I=""}return I}async function Yz(z,Q){if(Q===!1)return null;if(Q&&typeof Q==="string"){let J=L.resolve(z,Q);if(await Bun.file(J).exists())return J;return null}let F=L.join(z,"app.stx");if(await Bun.file(F).exists())return F;return null}async function Zz(z,Q){try{let F=await Bun.file(z).text(),J=F,$=F.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)J=$[1].trim();let Y=P(F),K=[...Y.client.map((j)=>j.fullTag),...Y.signals.map((j)=>j.fullTag)],Z=[],B=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,U;while((U=B.exec(F))!==null)Z.push(U[0]);let X=J;for(let j of Y.server)X=X.replace(j.fullTag,"");for(let j of Y.client)X=X.replace(j.fullTag,"");X=X.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let W="<!--__STX_PAGE_SLOT__-->";if(X=X.replace(/<slot\s*\/>/gi,W).replace(/<slot\s*>\s*<\/slot>/gi,W),!X.includes(W))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:q,extractVariables:k,defaultConfig:v,loadStxConfig:H}=await import("./chunk-bzcy2s4p.js"),w=await H(),A={__filename:z,__dirname:L.dirname(z)};for(let j of K){let N=j.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(N&&!j.includes("client")&&!j.includes('type="module"'))await k(N[1],A,z)}let V=await q(X,A,z,{...v,...w,...Q},new Set),G=V.indexOf(W);if(G===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:V.substring(0,G),afterSlot:V.substring(G+W.length),filePath:z,shellScripts:K,shellStyles:Z}}catch(F){return console.error(`[stx] Error processing shell ${z}:`,F),null}}function $z(z,Q,F){let J,$="",Y=Q.match(o);if(Y){Q=Q.replace(Y[0],"");try{let X=Buffer.from(Y[1],"base64").toString("utf8"),W=X.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(W)J=W[1].trim();$=X.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let K=F||J||"stx App",Z=r(),B="<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{cs as E}from"./chunk-h7aynn48.js";import{Pu as D}from"./chunk-p3kn55v4.js";import I from"path";async function M(q={}){let G=performance.now(),J=q.root||process.cwd(),j=await E(),y=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${y.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(y==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");A=await z({pagesDir:I.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,...q.ssg})}else{let{buildForProduction:z}=await import("./chunk-
|
|
2
|
+
import{cs as E}from"./chunk-h7aynn48.js";import{Pu as D}from"./chunk-p3kn55v4.js";import I from"path";async function M(q={}){let G=performance.now(),J=q.root||process.cwd(),j=await E(),y=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${y.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(y==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");A=await z({pagesDir:I.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,...q.ssg})}else{let{buildForProduction:z}=await import("./chunk-3k5jkjm6.js");B=await z({outputDir:".output",debug:q.debug,...q.ssr})}let H=Math.round(performance.now()-G);return{mode:y,ssg:A,ssr:B,duration:H}}
|
|
3
3
|
export{M as kg};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{kg as a}from"./chunk-
|
|
2
|
+
import{kg as a}from"./chunk-7mv0k3tw.js";import"./chunk-h7aynn48.js";import"./chunk-0athjw48.js";import"./chunk-135mme4g.js";import"./chunk-f3m0q482.js";import"./chunk-f1jd5qjb.js";import"./chunk-v0y3drpw.js";import"./chunk-0pdrnxg2.js";import"./chunk-j26v67km.js";import"./chunk-3gjrq8m7.js";import"./chunk-mh4hd2wt.js";import"./chunk-fa3pamx8.js";import"./chunk-5ec3m8hk.js";import"./chunk-snh1ahqp.js";import"./chunk-p3kn55v4.js";export{a as buildApp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as ll,$a as cn,$b as vo,$c as vp,$d as vq,A as Xj,Aa as nm,Ab as Pn,Ac as Wo,Ad as Wp,Ae as ar,B as Yj,Ba as om,Bb as Qn,Bc as Xo,Bd as Xp,Be as br,C as Zj,Ca as Bm,Cb as Rn,Cc as Yo,Cd as Yp,Ce as cr,D as _j,Da as Cm,Db as Sn,Dc as Zo,Dd as Zp,De as dr,E as Qk,Ea as Dm,Eb as Tn,Ec as _o,Ed as _p,Ee as er,F as Rk,Fa as Em,Fb as Un,Fc as $o,Fd as $p,Fe as fr,G as Sk,Ga as Fm,Gb as Vn,Gc as ap,Gd as aq,Ge as gr,H as Tk,Ha as Gm,Hb as Wn,Hc as bp,Hd as bq,He as hr,I as Uk,Ia as Km,Ib as Xn,Ic as cp,Id as cq,Ie as ir,J as Vk,Ja as Lm,Jb as Yn,Jc as dp,Jd as dq,Je as jr,K as Wk,Ka as Mm,Kb as Zn,Kc as ep,Kd as eq,Ke as kr,L as Xk,La as Nm,Lb as _n,Lc as fp,Ld as fq,Le as lr,M as Yk,Ma as Om,Mb as $n,Mc as gp,Md as gq,Me as mr,N as Zk,Na as Pm,Nb as ao,Nc as hp,Nd as hq,Ne as nr,O as _k,Oa as Qm,Ob as io,Oc as ip,Od as iq,Oe as or,P as $k,Pa as Rm,Pb as jo,Pc as jp,Pd as jq,Pe as pr,Q as al,Qa as Sm,Qb as ko,Qc as kp,Qd as kq,Qe as qr,R as bl,Ra as Tm,Rb as lo,Rc as lp,Rd as lq,Re as rr,S as cl,Sa as Um,Sb as mo,Sc as mp,Sd as mq,Se as sr,T as dl,Ta as Vm,Tb as no,Tc as np,Td as nq,Te as tr,U as el,Ua as Wm,Ub as oo,Uc as op,Ud as oq,Ue as ur,V as fl,Va as Xm,Vb as po,Vc as pp,Vd as pq,Ve as vr,W as gl,Wa as Ym,Wb as qo,Wc as qp,Wd as qq,We as wr,X as hl,Xa as Zm,Xb as ro,Xc as rp,Xd as rq,Xe as xr,Y as il,Ya as $m,Yb as so,Yc as sp,Yd as sq,Ye as yr,Z as jl,Za as an,Zb as to,Zc as tp,Zd as tq,_ as kl,_a as bn,_b as uo,_c as up,_d as uq,aa as ml,ab as dn,ac as wo,ad as wp,ae as wq,ba as nl,bb as en,bc as xo,bd as xp,be as xq,ca as ol,cb as fn,cc as yo,cd as yp,ce as yq,da as pl,db as gn,dc as zo,dd as zp,de as zq,ea as ql,eb as hn,ec as Ao,ed as Ap,ee as Aq,fa as rl,fb as jn,fc as Bo,fd as Bp,fe as Bq,ga as sl,gb as kn,gc as Co,gd as Cp,ge as Cq,ha as tl,hb as ln,hc as Do,hd as Dp,he as Dq,ia as ul,ib as mn,ic as Eo,id as Ep,ie as Eq,ja as vl,jb as nn,jc as Fo,jd as Fp,je as Fq,ka as wl,kb as on,kc as Go,kd as Gp,ke as Gq,la as xl,lb as pn,lc as Ho,ld as Hp,le as Hq,ma as yl,mb as qn,mc as Io,md as Ip,me as Iq,na as zl,nb as rn,nc as Jo,nd as Jp,ne as Jq,o as a,oa as Al,ob as sn,oc as Ko,od as Kp,oe as Kq,p as Ij,pa as cm,pb as vn,pc as Lo,pd as Lp,pe as Rq,q as Jj,qa as dm,qb as wn,qc as Mo,qd as Mp,qe as Sq,r as Kj,ra as em,rb as xn,rc as No,rd as Np,re as Tq,s as Lj,sa as fm,sb as yn,sc as Oo,sd as Op,se as Uq,t as Mj,ta as gm,tb as En,tc as Po,td as Pp,te as Vq,u as Nj,ua as hm,ub as Fn,uc as Qo,ud as Qp,ue as Wq,v as Oj,va as im,vb as Gn,vc as Ro,vd as Rp,ve as Xq,w as Pj,wa as jm,wb as Hn,wc as So,wd as Sp,we as Yq,x as Qj,xa as km,xb as Mn,xc as To,xd as Tp,xe as Zq,y as Vj,ya as lm,yb as Nn,yc as Uo,yd as Up,ye as _q,z as Wj,za as mm,zb as On,zc as Vo,zd as Vp,ze as $q}from"./chunk-7e3dks04.js";import{$e as bk,Ze as $j,_e as ak,af as ck,bf as dk,cf as ek,df as fk,ef as gk,ff as hk,gf as ik,hf as jk,if as kk,jf as lk,kf as mk,lf as nk}from"./chunk-ym3r8ktq.js";import{mf as Ek,nf as Fk,of as Gk,pf as Hk,qf as Ik,rf as Jk,sf as Kk,tf as Lk,uf as Mk,vf as Nk,wf as Ok,xf as Pk}from"./chunk-dgg8a6c8.js";import{Af as eo,Bf as fo,Cf as go,Df as ho,yf as bo,zf as co}from"./chunk-r1p9hha3.js";import{Ef as tn,Ff as un}from"./chunk-pbsfbgx7.js";import{Gf as zn}from"./chunk-z1yd16w1.js";import{Hf as Sl,If as Tl,Jf as Ul,Kf as Vl,Lf as Yl,Mf as am}from"./chunk-stepbjtr.js";import{Nf as Wl,Qf as Xl}from"./chunk-vhnnryps.js";import{$f as sm,Yf as pm,Zf as qm,_f as rm,ag as tm,bg as um,cg as vm,dg as wm,eg as xm,fg as ym,gg as zm,hg as Am}from"./chunk-0j9hrzjj.js";import{ig as Ck,jg as Dk}from"./chunk-91e3916g.js";import{kg as bm}from"./chunk-8vz7gc9b.js";import{lg as Hm,mg as Im,ng as Jm,og as _m,pg as An,qg as Bn,rg as Cn,sg as Dn,tg as In,ug as Jn,vg as Kn,wg as Ln}from"./chunk-xp5935a3.js";import{Ag as El,Bg as Fl,Cg as Gl,Dg as Hl,Eg as Il,Fg as Jl,Gg as Kl,Hg as Ll,Ig as Ml,Jg as Nl,Kg as Zl,Lg as _l,Mg as $l,xg as Bl,yg as Cl,zg as Dl}from"./chunk-8qax49p0.js";import{Ng as Xi,Og as Yi,Pg as Zi,Qg as _i,Rg as $i,Sg as aj,Tg as bj,Ug as cj,Vg as dj,Wg as ej,Xg as fj}from"./chunk-temdqamx.js";import{Yg as xj,_g as yj}from"./chunk-f5v2qf95.js";import{eh as ok,fh as pk,gh as qk,hh as rk,ih as sk,jh as tk,kh as uk,mh as vk,nh as wk,oh as xk,ph as yk,qh as zk,rh as Ak,uh as Bk}from"./chunk-6twytnbh.js";import{vh as hh,wh as ih,xh as jh,yh as kh}from"./chunk-49kk0s96.js";import{Dh as lh}from"./chunk-w3ycm4na.js";import{Eh as sh,Fh as th,Gh as uh,Hh as vh,Ih as wh,Jh as xh}from"./chunk-w8cdwh41.js";import{Kh as Mi,Lh as Ni,Mh as Oi,Qh as Pi,Rh as Qi,Sh as Ri}from"./chunk-gpmpcrww.js";import{$h as Ji,Th as Ci,Uh as Di,Vh as Ei,Wh as Fi,Xh as Gi,Zh as Hi,_h as Ii,ai as Ki,bi as Li}from"./chunk-74cv4ta1.js";import{ci as sg,di as tg,ei as ug,fi as vg,gi as wg,hi as xg}from"./chunk-wcm80anz.js";import{ii as yg,ji as zg,ki as Ag,li as Bg,mi as Cg}from"./chunk-y7m2dpd3.js";import{ni as Dg,oi as Eg,pi as Fg,qi as Gg,ri as Hg}from"./chunk-9y0g8kzt.js";import{si as Ig,ti as Jg,ui as Kg,vi as Lg,wi as Mg,xi as Ng,yi as Og}from"./chunk-t6nseeb9.js";import{Ai as Qg,Bi as Rg,Ci as Sg,Di as Tg,Ei as Ug,zi as Pg}from"./chunk-xttsqmkm.js";import{Gi as Vg,Hi as Wg,Ii as Xg,Ji as Yg,Ki as Zg,Li as _g,Mi as $g,Ni as ah,Oi as bh,Pi as ch,Qi as dh,Ri as eh,Si as fh,Ti as gh}from"./chunk-54st8g2j.js";import{Vi as mg,Wi as ng}from"./chunk-6nxf4pb0.js";import{Zi as og}from"./chunk-qhcwqxsr.js";import"./chunk-9n0gvfrg.js";import{bj as pg}from"./chunk-7q9mwh4v.js";import{cj as qg,dj as rg}from"./chunk-refwkt87.js";import{ej as fe,fj as ge,gj as he,hj as ie,ij as je,jj as ke,kj as le,lj as me,mj as ne,nj as oe,oj as pe,pj as qe,qj as re,rj as se}from"./chunk-1e0kazb9.js";import{sj as Pe,tj as Qe}from"./chunk-7bemc914.js";import{Aj as Be,Bj as Ce,Cj as De,Dj as Ee,Ej as Fe,Fj as Ge,Gj as He,Hj as Ie,Ij as Je,Jj as Ke,Kj as Le,Lj as Me,Mj as Ne,Nj as Oe}from"./chunk-w95sp0k9.js";import{Oj as Re,Pj as Se,Qj as Te,Rj as Ue,Sj as Ve,Tj as We,Uj as Xe,Vj as Ye,Wj as Ze,Xj as _e,Yj as $e}from"./chunk-4fybwpba.js";import{qk as Lq,rk as Mq,sk as Nq,tk as Oq,uk as Pq,vk as Qq}from"./chunk-bmfnxh4y.js";import{Ak as Ol,Bk as Pl,Ck as Ql,Dk as Rl,wk as Rj,xk as Sj,yk as Tj,zk as Uj}from"./chunk-gh1vsaa0.js";import"./chunk-58f0mthg.js";import"./chunk-d8y85xdy.js";import{$l as Xa,$m as Vb,$n as Vc,$o as ze,$p as If,$q as Oh,$r as wj,Al as J,Am as qb,An as uc,Ao as Kd,Ap as gf,Aq as hg,Ar as wi,Bl as da,Bn as vc,Bo as Ld,Bp as hf,Bq as ig,Br as xi,Cl as ea,Cm as xb,Cn as wc,Co as Md,Cp as jf,Cq as jg,Cr as yi,Dl as fa,Dm as yb,Dn as xc,Do as Nd,Dp as kf,Dq as kg,Dr as zi,El as ga,Em as zb,En as yc,Eo as Od,Ep as lf,Eq as lg,Er as Ai,Fl as ha,Fm as Ab,Fn as zc,Fo as Pd,Fp as mf,Fq as mh,Fr as Bi,Gl as ia,Gm as Bb,Gn as Ac,Go as Qd,Gp as nf,Gq as nh,Gr as Si,Hm as Cb,Hn as Bc,Ho as Rd,Hp as of,Hq as oh,Hr as Ti,Im as Db,In as Cc,Io as Sd,Ip as pf,Iq as ph,Ir as Ui,Jl as za,Jn as Dc,Jo as Td,Jp as qf,Jq as qh,Jr as Vi,Kl as Aa,Km as Eb,Kn as Ec,Ko as Ud,Kp as rf,Kq as rh,Kr as Wi,Ll as Ba,Lm as Fb,Ln as Fc,Lo as Vd,Lp as sf,Lq as yh,Lr as gj,Ml as Ca,Mm as Gb,Mn as Gc,Mo as Wd,Mp as tf,Mq as zh,Mr as hj,Nl as Da,Nm as Hb,Nn as Hc,No as Xd,Np as uf,Nq as Ah,Nr as ij,Om as Ib,On as Ic,Oo as Yd,Op as vf,Oq as Bh,Or as jj,Pm as Jb,Pn as Jc,Po as Zd,Pp as wf,Pq as Ch,Pr as kj,Ql as Ga,Qm as Kb,Qn as Kc,Qo as _d,Qp as xf,Qq as Dh,Qr as lj,Rl as Ha,Rm as Lb,Rn as Lc,Ro as $d,Rp as yf,Rq as Eh,Rr as mj,Sl as Ia,Sm as Mb,Sn as Mc,So as ae,Sp as zf,Sq as Fh,Sr as nj,Tl as Pa,Tm as Nb,Tn as Nc,To as be,Tp as Af,Tq as Gh,Tr as oj,Ul as Qa,Um as Ob,Un as Oc,Uo as ce,Up as Bf,Uq as Hh,Ur as pj,Vl as Ra,Vm as Pb,Vn as Pc,Vo as de,Vp as Cf,Vq as Ih,Vr as qj,Wl as Sa,Wm as Qb,Wn as Qc,Wo as ee,Wp as Df,Wq as Jh,Wr as rj,Xl as Ta,Xm as Rb,Xn as Rc,Xp as Ef,Xq as Kh,Xr as sj,Yl as Ua,Ym as Sb,Yn as Sc,Yo as ye,Yp as Ff,Yq as Lh,Yr as tj,Zl as Va,Zm as Tb,Zn as Tc,Zp as Gf,Zq as Mh,Zr as uj,_l as Wa,_m as Ub,_n as Uc,_p as Hf,_q as Nh,_r as vj,an as Wb,ao as Wc,ap as Ae,aq as Jf,ar as Yh,as as zj,bn as Xb,bo as Xc,bq as Kf,br as Zh,bs as Aj,cn as Yb,co as Yc,cp as af,cq as Lf,cr as _h,cs as Bj,dn as Zb,do as Zc,dq as Mf,dr as $h,ds as Cj,em as Ya,en as _b,eo as _c,eq as Nf,er as ai,es as Dj,fm as Za,fn as $b,fo as $c,fq as Of,fr as bi,fs as Ej,gm as _a,gn as ac,go as ad,gq as Pf,gr as ci,gs as Fj,hm as $a,hn as bc,ho as bd,hq as Qf,hr as di,hs as Gj,im as ab,in as cc,io as cd,iq as Rf,ir as ei,is as Hj,jl as s,jm as bb,jn as dc,jo as dd,jq as Sf,jr as fi,kl as t,kn as ec,ko as ed,kq as Tf,kr as gi,ll as u,ln as fc,lo as fd,lq as Uf,lr as hi,ml as v,mm as cb,mn as gc,mo as gd,mq as Vf,mr as ii,nl as w,nm as db,nn as hc,no as hd,nq as Wf,nr as ji,ol as x,om as eb,on as ic,oo as id,oq as Xf,or as ki,pl as y,pm as fb,pn as jc,po as zd,pq as Yf,pr as li,ql as z,qm as gb,qn as kc,qo as Ad,qq as Zf,qr as mi,rl as A,rm as hb,rn as lc,ro as Bd,rq as _f,rr as ni,sl as B,sm as ib,sn as mc,so as Cd,sq as $f,sr as oi,tl as C,tm as jb,tn as nc,to as Dd,tp as bf,tq as ag,tr as pi,ul as D,um as kb,un as oc,uo as Ed,uq as bg,ur as qi,vl as E,vm as lb,vn as pc,vo as Fd,vp as cf,vq as cg,vr as ri,wl as F,wm as mb,wn as qc,wo as Gd,wq as dg,wr as si,xl as G,xm as nb,xn as rc,xo as Hd,xp as df,xq as eg,xr as ti,yl as H,ym as ob,yn as sc,yo as Id,yp as ef,yq as fg,yr as ui,zl as I,zm as pb,zn as tc,zo as Jd,zp as ff,zq as gg,zr as vi}from"./chunk-h7aynn48.js";import{js as d,ks as e,ls as f,ms as g,ns as h,os as i,ps as j,qs as k,rs as l,ss as m,ts as n,us as o,vs as p,ws as q,xs as r}from"./chunk-0athjw48.js";import{As as Rh,Bs as Sh,Cs as Th,Ds as Uh,Es as Vh,Fs as Wh,Gs as Xh,ys as Ph,zs as Qh}from"./chunk-135mme4g.js";import{Hs as b,Is as c}from"./chunk-f3m0q482.js";import{Js as Ea,Ks as Fa}from"./chunk-f1jd5qjb.js";import{Ls as rb,Ms as sb,Os as tb,Ys as ub,Zs as vb,_s as wb}from"./chunk-v0y3drpw.js";import{$s as te,at as ue,bt as ve,ct as we,ft as xe}from"./chunk-0pdrnxg2.js";import{gt as Ja,ht as Ka,it as La,jt as Ma,kt as Na,lt as Oa}from"./chunk-j26v67km.js";import{At as xd,Bt as yd,mt as jd,nt as kd,ot as ld,pt as md,qt as nd,rt as od,st as pd,tt as qd,ut as rd,vt as sd,wt as td,xt as ud,yt as vd,zt as wd}from"./chunk-3gjrq8m7.js";import"./chunk-mh4hd2wt.js";import{Et as ja,Ft as ka,Gt as la,Ht as ma,It as na,Jt as oa,Kt as pa,Lt as qa,Mt as ra,Nt as sa,Ot as ta,Pt as ua,Qt as va,Rt as wa,St as xa,Tt as ya}from"./chunk-fa3pamx8.js";import{$t as M,Bu as ca,Xt as K,Yt as L,eu as N,fu as O,lu as P,mu as Q,nu as R,ou as S,pu as T,qu as U,ru as V,su as W,tu as X,uu as Y,vu as Z,wu as _,xu as $,yu as aa,zu as ba}from"./chunk-5ec3m8hk.js";import"./chunk-snh1ahqp.js";import"./chunk-p3kn55v4.js";export{jk as writeNetlifyConfig,_l as writeManifest,Ok as writeImageManifest,ro as wrapComponentForHMR,lr as withDefaults,wj as webComponentDirectiveHandler,gp as watermark,iq as watchViews,Yk as watchMultiple,Zk as watchEffect,Xk as watch,xe as warmImagePlaceholders,kl as waitForStore,Yd as waitForLocale,co as virtualPathFor,jj as videoDirective,tc as validators,pr as validated,Kd as validateValueEnhanced,nh as validateTemplate,lp as validateParams,Ld as validateFormEnhanced,Zp as validateFile,Gd as validateFields,Fd as validateField,ph as validateDirective,dd as validateCspDirectives,Ej as validateConfig,dm as validateComponentScripts,Bm as validateComponentProps,lg as validateClientScript,kh as v,jb as usesSignalsInScript,pa as usesReactiveRuntime,Ch as userComponentFileExists,Sg as useVirtualList,rd as useTitle,jl as useStoreOrThrow,Jo as useStore,Vj as useStorage,tq as useSlots,Xj as useSessionStorage,od as useSeoMeta,ll as useRouteParams,nl as useRouteParamOrThrow,ml as useRouteParam,rd as usePageTitle,Oe as useOptimistic,pl as useMiddlewareValue,ol as useMiddlewareState,Wj as useLocalStorage,ko as useLoadingIndicator,md as useHead,hh as useForm,vq as useAttrs,$p as uploadFiles,_p as uploadFile,gl as updateInstance,Me as untrack,Sh as unregisterDirective,hl as unmountInstance,qb as unescapeHtml,go as typecheckStxFiles,Bh as transpileTypeScript,_q as translate,w as transitionDirective,vm as toUsers,um as toUser,Ro as thumbnail,Sp as thumbHashToRGBA,Tp as thumbHashToDataURL,ra as templateNeedsRuntime,qa as templateHasReactiveContext,Re as templateCache,Mb as syncRecordedResponse,oo as stxClientHelpers,wf as structuredDataDirective,br as stripLocalePrefix,Ll as stripDocumentWrapper,Fa as stripCommentsAndLiterals,jn as stringToStream,Tc as strictCspPreset,ne as streamingSuspenseDirective,re as streamToResponse,le as streamTemplateSimple,fe as streamTemplate,Qj as stopHmrServer,rm as stopBroadcasting,Ma as stateDirName,Na as stateDir,Be as state,fg as startsDocument,Ln as startProductionServer,zn as startInteractive,qm as startBroadcasting,dr as stampLocaleLayoutGroup,D as staggerDirective,jp as srcsetUrls,E as springDirective,Cc as splitByPipe,Hl as spaNavVaryHeaders,eo as sourcePathFor,qp as smartBatchSign,Eh as slotContentHasExpressions,op as signUrl,zh as shouldTranspileTypeScript,Nj as shouldReloadOnChange,tp as shouldRefreshSignature,Oj as shouldIgnoreFile,Kg as shouldCacheComponent,Vo as sharpen,sr as shape,La as setStateDir,tl as setRouteParams,ul as setMiddlewareState,we as setImagePlaceholder,nq as setGlobalProvide,Qb as setErrorLocale,Qk as setCurrentInstance,Zi as setCachedVideoResult,Oi as setCachedImageResult,Ii as setCached,vr as serveStxFile,xr as serveMultipleStxFiles,Ij as serveMarkdownFile,Vn as serveFile,yr as serveApp,Un as serve,uo as serializeState,_m as serializeSetCookie,Xo as sepia,pd as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,nj as scopeHTML,mj as scopeCSS,zf as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,$o as saturation,mp as sanitizeParams,vc as sanitizeFilePath,wc as sanitizeExpression,xc as sanitizeDirectiveParams,uc as sanitizeDirectiveParam,yc as sanitizeComponentProps,oc as safeExecuteAsync,nc as safeExecute,xa as runtimeHandledXAttrsLiteral,pf as runPreProcessingMiddleware,qf as runPostProcessingMiddleware,Cn as runPageAction,He as runMountCallbacks,ba as runMiddleware,el as runHooks,Tq as runDoctor,Ie as runDestroyCallbacks,Ef as runComposers,ap as rotate,lh as rewriteImagesWithSiblings,Nb as responseBindings,Ih as resolveTemplatePath,c as resolveStxTargets,Aj as resolveStxDirectories,Zq as resolveI18n,Po as resize,Ya as resetPlaceholders,ld as resetHead,to as resetHMRHandler,bc as resetErrorConfig,nr as required,ab as replacePlaceholders,gq as renderView,gj as renderVideoComponent,Qa as renderVendorStyleTags,Cq as renderToString,Dq as renderToStream,Eq as renderToDOM,Rp as renderThumbhashToCanvas,Qq as renderTemplateString,Oq as renderTemplate,Pq as renderString,ie as renderStreamingPage,uh as renderSlot,Ag as renderSSRSuspense,Bp as renderProtectedVideo,Ap as renderProtectedImg,np as renderMediaUpload,Nq as renderMarkdownView,Ql as renderLayoutTypes,Si as renderImgComponent,Ek as renderImageComponent,td as renderHtmlAttrs,sd as renderHead,jq as renderEmail,Gh as renderComponentWithSlot,ud as renderBodyAttrs,Eo as render,Vc as relaxedCspPreset,Ed as registerValidationRule,pe as registerStreamingDirectives,Lo as registerStoresClient,rl as registerStore,xf as registerSeoDirectives,V as registerMiddleware,eb as registerFilters,db as registerFilter,Sb as registerErrorMessages,Jd as registerEnhancedValidationRule,Ph as registerDirective,cd as registerCspDirectives,Em as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Uk as ref,rn as redirect,Ib as recordResponseStatus,Jb as recordResponseHeader,Oa as rebaseOntoStateDir,Kb as readResponseStatus,Lb as readResponseHeaders,Gj as readMarkdownFile,Se as readFileCached,Vk as reactive,ep as quality,yp as pruneSignatureCache,Li as pruneCache,lq as provide,Mq as protectCodeBlocks,mr as prop,If as processVueTemplate,Qg as processVirtualListDirectives,Ug as processVirtualGridDirectives,fj as processVideo,Hd as processValidateDirective,de as processTranslateDirective,ug as processTransitionDirectives,xg as processTransitionAttributes,xd as processTitleDirective,Ab as processTemplateBindings,qg as processTeleportDirectives,yg as processSuspenseDirectives,sf as processStructuredData,je as processStreamDirectives,Ob as processStatusDirective,fh as processStaticDirectives,nf as processStackReplacements,mf as processStackPushDirectives,vh as processSlots,Jl as processShell,Gf as processServerBindings,tf as processSeoDirective,qe as processSectionDirectives,Lf as processScopedStyles,yb as processReactiveBindings,Cp as processProtectedMedia,_g as processPartialHydrationDirectives,kg as processOnceDirective,of as processMiddleware,rf as processMetaDirectives,yd as processMetaDirective,Hj as processMarkdownFileDirectives,Nh as processMarkdownDirectives,gf as processLoops,Ig as processKeepAliveDirectives,jg as processJsonDirective,Tg as processInfiniteListDirectives,lf as processIncludes,Ui as processImgComponents,Gk as processImageComponents,tk as processImage,wd as processHeadDirective,Ad as processForms,Cd as processFormInputDirectives,nb as processExpressions,Ca as processEventDirectives,Dd as processErrorDirective,Jf as processDynamicComponents,mh as processDirectives,Xh as processDirectiveAttributes,pg as processDeferDirectives,hd as processCustomDirectives,$c as processCspDirectives,tr as processComponentProps,Xa as processClientScript,Bd as processBasicFormDirectives,Dg as processAsyncDirectives,id as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Ud as preloadTranslationsBackground,Td as preloadTranslations,jo as preloadIslandHandlers,ye as preloadIconCollection,mm as poolStrings,yj as pluginManager,ue as placeholdersWarmed,tg as performLeave,sg as performEnter,Je as pendingLifecycleCounts,Ne as peek,hf as partialsCache,hj as parseVideoDirectiveOptions,No as parseUrl,Up as parseThumbhashString,Ic as parseSwitchBlock,sh as parseSlots,th as parseSlotElement,Nc as parseScriptDeclarations,uj as parseSFCComponent,Dp as parseProtectedArgs,ff as parseLoopBinding,Ti as parseImgComponent,ji as parseImageUrl,Fk as parseImageComponent,An as parseFormBody,Kc as parseExpressionWithFilters,Fm as parseDefaults,on as parseCookies,Km as parseContainerSelector,Fc as parseConditionalBlock,Lc as parseArguments,H as parseAnimationShorthand,or as optional,nm as optimizeTemplate,Lk as optimizeImage,Mk as optimizeDirectory,qr as oneOf,jf as onceStore,bl as onUpdated,xb as onUpdate,dl as onUnmounted,yl as onServer,$k as onMounted,Fe as onMount,eh as onHydrated,rq as onErrorCaptured,Ge as onDestroy,Og as onDeactivated,xl as onClient,al as onBeforeUpdate,cl as onBeforeUnmount,_k as onBeforeMount,Ng as onActivated,Np as observeElement,sn as notFound,Qf as normalizeCriticalHeadOrder,qq as nextTick,Im as negotiateEncoding,P as navigateTo,fl as mountInstance,z as motionDirective,Uc as moderateCspPreset,lm as minifyHtml,vf as metaDirective,_f as metaDedupKey,Oo as mergeParams,ag as mergeHtmlAttrs,nd as mergeHeadConfigs,Yc as mergeCspDirectives,sb as mergeCrosswindConfig,M as matchRoute,Oh as markdownDirectiveHandler,Fj as markdownCache,b as looksLikeGlob,ar as localizePath,Vd as loadTranslationLazy,$d as loadTranslation,Bj as loadStxConfig,_ as loadMiddlewareFromDirectory,$l as loadManifest,Jp as loadElement,sm as loadChannels,hr as lintStxStrict,Lp as lazyLoadAll,Kp as lazyLoad,C as keyframeDirective,Aq as jsxs,Bq as jsxDEV,zq as jsx,qn as jsonResponse,oe as islandDirective,_b as isTest,Ml as isSpaNavigation,Fl as isSpaNavRequest,rp as isSignatureValid,Ke as isSignal,rk as isSharpAvailable,bn as isServerEnvironment,vl as isServer,ta as isRuntimeOwnedColonAttr,Yb as isProduction,d as isPresentationalRole,Gp as isNativeLazySupported,Lq as isMarkdownPath,Rd as isLoading,Sd as isLoaded,yh as isJavaScriptScript,Hp as isIntersectionObserverSupported,zk as isImageFile,sk as isImageBackendAvailable,be as isICUFormat,dh as isHydrated,Dh as isHydrateTrigger,Gb as isHttpStatus,an as isEdgeEnvironment,ir as isDirectiveKind,Zb as isDevelopment,Le as isDerived,Mj as isCssOnlyChange,Hm as isCompressible,wl as isClient,Fg as isAsyncComponent,Bn as isActionableMethod,Yo as invert,Ue as invalidateFileCacheByDir,Te as invalidateFileCache,mb as interpolateScriptsInTemplate,kb as interpolateScriptExpressions,lb as interpolateScriptAttributes,kc as inlineError,Yq as injectThemeBootstrap,uf as injectSeoTags,Vq as injectSeo,af as injectRouterScript,Lj as injectHotReload,fa as injectHeatmap,Zc as injectCspMetaTag,wb as injectCrosswindCSS,hg as injectConfigHeadTags,Pf as injectColorModeBootScript,cg as injectCloakStyle,Wf as injectBuildId,Sa as injectBrowserCoreAutoImports,Cb as injectAnalytics,mq as inject,ql as initStoreRegistry,mk as initNetlify,lo as initLoadingIndicator,Ip as initLazyLoading,yn as initFile,Qp as initBlurUp,Wp as initAllBlurUp,Wi as imgDirective,Jk as imageDirective,Jn as hydrateTemplateStream,In as hydrateTemplate,io as hydrateIslands,ah as hydrateIsland,Kn as hydrateFragment,bh as hydrateByStrategy,ch as hydrateAll,Bo as hydrate,Tn as htmlResponse,dg as hoistLeadingHeadTags,Rf as hoistColorModeBootScript,ga as heatmapDirective,Ei as hashString,$e as hashFilePath,Ci as hashFile,Di as hashBuffer,Hf as hasVueTemplateSyntax,ef as hasVariables,Go as hasStore,bb as hasPlaceholders,kk as hasNetlifyConfig,X as hasMiddleware,Da as hasEventDirectives,gg as hasDocumentShell,qh as hasDirectives,h as hasDOMSupport,Ck as handleImageRequest,sq as handleError,Iq as h,yk as groupVariantsByFormat,Wo as grayscale,Mn as gitHash,fm as getUnusedDirectives,Wd as getTranslationSync,Pd as getTranslationCacheStats,Xd as getTranslationAsync,ce as getTranslation,fk as getTotalSize,sp as getTimeUntilExpiry,mg as getStoreScript,Ho as getStoreNames,Fo as getStore,_j as getStorageSize,Zj as getStorageKeys,Jh as getSourceLineInfo,Ah as getSharedTranspiler,g as getScreenReaderOnlyStyle,oj as getScopeAttribute,Ae as getRouteParams,Ha as getPublicEnvDefine,Ia as getPublicEnv,oh as getPositionInfo,_a as getPlaceholderRegistry,Bi as getPlaceholderCacheStats,kd as getPageMeta,Pc as getNonce,Ak as getMimeType,Z as getMiddlewareNames,W as getMiddleware,Qd as getLoadingState,Zd as getLoadingLocales,te as getImagePlaceholder,uk as getImageMetadata,Ao as getHydrationRuntime,sl as getHydratedStoreState,Pj as getHmrServer,jd as getHead,so as getHMRHandler,ni as getFormatExtension,Gi as getFileMtime,xk as getFallbackVariant,Ub as getErrorMessage,Rb as getErrorLocale,ac as getErrorConfig,Xb as getErrorCodeName,Rh as getDirectives,Qh as getDirective,Rk as getCurrentInstance,Xc as getCspPreset,ed as getCspHeaderName,tb as getCrosswindServeAsset,Mh as getComponentCacheStats,Yi as getCachedVideoResult,wp as getCachedSignature,We as getCachedSignalsRuntime,Xe as getCachedRouterScript,zi as getCachedPlaceholder,Ni as getCachedImageResult,Hi as getCached,Ki as getCacheStats,Uf as getBuildId,pm as getBroadcastServer,mi as getBestVariant,fb as getAllFilters,ai as generateWidthSrcset,Rg as generateVirtualListCSS,bq as generateVideoPreview,Md as generateValidationScript,cq as generateUploadRuntime,gm as generateTreeShakenBundle,wg as generateTransitionRuntime,vg as generateTransitionCSS,aj as generateThumbnails,si as generateThumbhashPlaceholder,Tm as generateTemplatesDocs,Cg as generateSuspenseRuntime,Bg as generateSuspenseCSS,vo as generateStateScript,ki as generateSrcsetData,Ri as generateSrcset,vk as generateSrcSet,bj as generateSpriteSheet,kq as generateSpaShell,li as generateSourceTags,gi as generateSizesFromBreakpoints,fi as generateSizesAttribute,wk as generateSizes,yf as generateSitemapIndex,Wq as generateSitemap,Fp as generateSimpleMediaPicker,zp as generateSignatureRuntime,Qe as generateSignalsRuntimeDev,Pe as generateSignalsRuntime,Wa as generateServerDataBridge,lj as generateScopeId,vj as generateSFCWebComponent,Aa as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,Af as generateRobotsTxt,Xq as generateRobots,Qi as generateResponsiveVariants,rj as generateReactiveWebComponentTS,qj as generateReactiveWebComponent,tj as generateReactiveRuntime,sj as generateReactiveMixin,$i as generatePoster,yi as generatePlaceholderStyle,xi as generatePlaceholderCSS,ri as generatePlaceholder,$g as generatePartialHydrationCSS,Oc as generateNonce,gk as generateNetlifyToml,eq as generateMinifiedMediaRuntime,dq as generateMediaRuntime,Ep as generateMediaManagerEmbed,Zl as generateManifest,no as generateLoadingIndicatorHtml,Pp as generateLazyLoadRuntime,Rl as generateLayoutTypes,ui as generateLQIP,Mg as generateKeepAliveRuntime,Lg as generateKeepAliveCSS,gh as generateIslandManifest,aq as generateImagePreview,Nk as generateImageManifest,zo as generateHydrationScript,se as generateHydrationRuntime,Co as generateHydrationCSS,Vg as generateHydrationBootstrap,Kj as generateHotReloadScript,ea as generateHeatmapScript,qo as generateHMRClientScript,cj as generateHLSManifest,wo as generateEventBindings,ei as generateDprSrcsetWithVariableQuality,di as generateDprSrcset,eg as generateDocumentShell,Ym as generateDocs,Um as generateDirectivesDocs,Wh as generateDirectiveRuntime,Bf as generateDefaultRobotsTxt,dj as generateDASHManifest,Sc as generateCspMetaTag,Rc as generateCspHeader,vb as generateCrosswindCSS,xq as generateCompositionRuntime,Sm as generateComponentsDocs,Wg as generateComponentManifest,Qm as generateComponentDoc,wi as generateColorPlaceholder,Of as generateColorModeBootScript,il as generateClientRuntime,Fi as generateCacheKey,Ua as generateBrowserAutoImportDestructuring,Xp as generateBlurUpRuntime,Yp as generateBlurUpCSS,zb as generateBindingsRuntime,bi as generateAutoWidthSrcset,Ta as generateAutoImportDestructuring,Hg as generateAsyncComponentRuntime,Gg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,Bb as generateAnalyticsScript,ho as formatTypecheckDiagnostics,ao as formatTypeErrors,vn as formatStxContent,ek as formatSize,O as formatRoutes,wn as formatMarkdownContent,Vb as formatLocalizedError,ae as formatICU,cc as formatFilePath,jc as formatError,Uq as formatDoctorReport,Vm as formatDocsAsMarkdown,Xm as formatDocsAsJson,Wm as formatDocsAsHtml,dp as format,km as foldConstants,cp as flipVertical,bp as flipHorizontal,Sl as fingerprint,fo as findRuntimeTypeDeclarations,Sq as findPantryPackage,Ec as findMatchingEndTag,Ac as findMatchingDelimiter,Ea as findInterpolationEnd,Gc as findIfBlocks,Jc as findExpressions,N as findErrorPage,Hc as findDirectiveBlocks,hm as findDeadCode,hm as findDeadBranches,Lm as findContainerRegion,Rm as findComponentFiles,wr as findCommonDir,dk as filterRequiredFiles,Hh as fileExists,bf as extractVariables,Xl as extractTemplateExpressions,ke as extractStreamBoundaries,xo as extractState,wh as extractSlotContent,df as extractScriptFromTemplate,Wl as extractScriptBlocks,$a as extractPlaceholders,Dc as extractParenthesizedExpression,Hb as extractPageResponseStatus,ca as extractLayoutMetadata,vi as extractDominantColor,Mc as extractDirectiveParams,rh as extractDirectiveNames,Nl as extractContainerContent,Om as extractComponentProps,Xg as extractComponentName,Pm as extractComponentDescription,ub as extractClassNames,Va as extractBridgeData,Yg as extractBoundProps,Bc as extractBalancedExpression,Pa as extractAndStripCssImports,pj as extractAndScopeStyles,Ba as extractAndProcessEvents,Tj as externalizeSharedAssets,Uj as externalizeRepeatedAssets,Sj as externalizeHtml,pb as evaluateExpression,jm as evaluateConstant,Pb as evaluateAuthExpression,ib as escapeHtmlValue,hb as escapeHtml,pc as errorRecovery,rc as errorLogger,rg as ensureTeleportTargets,ig as ensureDocumentShell,Id as enhancedValidationRules,Mm as enableDevTools,im as eliminateDeadCode,De as effect,kp as dprUrls,Zm as docsCommand,Pl as discoverLayoutNames,Op as disconnectObserver,Nm as disableDevTools,sc as devHelpers,Il as detectShell,$m as detectRuntime,hk as detectProjectConfig,oi as detectFormat,cm as detectBuildMode,Ce as derived,lk as deploy,Dj as defineStxConfig,Ko as defineStore,uq as defineSlots,gr as defineSiteConfig,kr as definePropsWithValidation,jr as defineProps,xj as definePlugin,qd as definePageMeta,R as defineMiddleware,ih as defineForm,pq as defineExpose,oq as defineEmits,Th as defineDirective,Kq as defineCustomElement,Hn as defineConfig,Uh as defineClientDirective,Eg as defineAsyncComponent,fq as defaultMediaConfig,Pk as defaultImageConfig,Nd as defaultI18nConfig,da as defaultHeatmapConfig,zd as defaultFormClasses,cb as defaultFilters,gd as defaultCspConfig,zj as defaultConfig,ur as default,rb as deepMergeThemes,Kf as dedupeScopedStyles,ti as decodeThumbhash,bd as cspNonceDirective,ad as cspDirective,Vp as crossfadeTransition,Qo as crop,Pg as createVirtualList,ij as createVideoDirective,mn as createVercelHandler,Zn as createTypeChecker,ee as createTranslateFilter,hn as createTextEncoderStream,Jq as createStxApp,gn as createStreamingResponse,me as createStreamRenderer,Io as createStore,U as createStorageManager,S as createServerCookieManager,Tk as createScope,zg as createSSRSuspense,ze as createRouter,$ as createRouteLocation,Xn as createRoute,Uk as createRef,Vk as createReactive,wq as createProvideContext,On as createProject,Gn as createProductionBuild,Za as createPlaceholder,om as createOptimizedBuild,nn as createNetlifyHandler,$j as createNetlifyClient,aa as createMiddlewareContext,Wn as createMiddleware,Mp as createLazyObserver,Jg as createKeepAliveCache,dn as createKVNamespace,Zg as createIslandRegistry,Vi as createImgDirective,Kk as createImagePlugin,Dk as createImageHandler,Ik as createImageDirective,ia as createHeatmapAggregator,ck as createFileManifest,cn as createEnvAccessor,mc as createEnhancedError,fn as createEdgeHandler,en as createEdgeCache,Kh as createDetailedErrorMessage,ln as createDenoHandler,ik as createDefaultNetlifyConfig,fd as createCspHeaders,pn as createCookie,Wk as createComputed,Sk as createComponentInstance,kn as createCloudflareHandler,T as createClientCookieManager,Vh as createBuiltinDirectives,Jq as createApp,F as createAnimationTimeline,To as cover,cf as convertToCommonJS,_o as contrast,So as contain,lc as consoleError,$b as configureErrorHandling,Cj as config,Wk as computed,Jm as compressResponse,Df as composerPattern,Cf as composer,Kl as composeShellWithPage,Dm as componentDirective,Fh as componentClientSignalNames,Yl as compileTemplate,a as collectRepeatedFlag,bk as collectDeployFiles,_i as clearVideoCache,Od as clearTranslationCache,ng as clearStoreCache,Yj as clearStorage,xp as clearSignatureCache,Ai as clearPlaceholderCache,kf as clearOnceStore,Qc as clearNonce,Y as clearMiddleware,ve as clearImagePlaceholders,Hk as clearImageCache,Tb as clearErrorMessages,Ye as clearDevCaches,gb as clearCustomFilters,Ff as clearComposers,og as clearComposableCache,Lh as clearComponentCache,Ji as clearCache,mo as cleanupLoadingIndicator,Bl as classifyScript,Cl as classifyAllScripts,_n as checkTemplateFile,$n as checkTemplate,Ze as checkCache,up as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,ym as channel,un as captureScreenshots,tn as captureScreenshot,_d as cancelPendingLoads,ak as calculateSha1,ci as calculateOptimalWidths,_e as cacheTemplate,kj as buildWebComponents,bo as buildVirtualSource,hq as buildViews,Mo as buildUrl,ge as buildSuspenseResolveScript,fr as buildStaticSite,la as buildRuntimeGlobalsDestructure,Tl as buildRuntimeAsset,Ul as buildRouterAsset,er as buildLangPickerScript,ii as buildImageUrl,$f as buildHtmlAttrs,am as buildForProduction,Gm as buildComponentLibrary,vp as buildAuthParams,bm as buildApp,cr as buildAlternateLinks,Fn as build,wm as broadcastPrivate,xm as broadcastPresence,tm as broadcast,Zo as brightness,Uo as blur,ya as blankInertHtmlRegions,pp as batchSignUrls,Ee as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,fp as auto,e as attributeValue,Vl as assetTags,za as asInvocableStatement,rr as arrayOf,$q as applyTranslations,Pi as applyTransformations,xh as applySlots,Cm as applyPropDefaults,ip as applyPreset,bg as applyHtmlAttrs,vd as applyHead,ob as applyFilters,Gl as appendVary,Wc as apiCspPreset,y as animationGroupDirective,ej as analyzeVideo,em as analyzeUsage,zl as analyzeTemplate,Al as analyzeProject,em as analyzeDirectiveUsage,Db as analyticsDirective,Rn as addStore,Qn as addPage,_c as addNonceToInlineContent,Sn as addLayout,Pn as addComponent,Dn as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,Ve as __setSignalsGeneratorsForTest,Vf as __setBuildIdForTest,Xi as VideoProcessorCache,jh as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,zc as Tokenizer,Yn as TemplateTypeChecker,xn as TEMPLATE_PRESETS,ic as StxValidationError,ec as StxSyntaxError,gc as StxSecurityError,fc as StxRuntimeError,hc as StxFileError,dc as StxError,Fq as Show,he as SUSPENSE_RESOLVER_RUNTIME,ja as STX_RUNTIME_GLOBALS,Ra as STX_AUTO_IMPORTS,Ka as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,Dl as SPA_NAV_HEADER,sa as RUNTIME_OWNED_COLON_ATTRS,ua as RUNTIME_HANDLED_X_ATTRS,Eb as RESPONSE_STATUS_KEY,Fb as RESPONSE_HEADERS_KEY,oa as REACTIVE_RUNTIME_GLOBALS,En as ProductionBuild,Hq as Portal,Nn as PROJECT_TEMPLATES,hp as PRESETS,na as NON_CLIENT_PRIMITIVES,Do as MemorySessionStore,$h as MIME_TYPES,Yh as MEDIA_DEFAULT_WIDTHS,_h as MEDIA_DEFAULT_FORMATS,Ol as LAYOUT_TYPES_FILE,Mi as ImageProcessorCache,Bk as ImageProcessingError,yo as HydrationRuntime,Jj as HotReloadServer,ha as HeatmapAggregator,Zf as HTML_CLASS_MARKER,Yf as HTML_ATTRS_MARKER,yq as Fragment,Gq as For,El as FRAGMENT_CACHE_CONTROL,qc as ErrorLogger,Wb as ErrorCodes,Rj as EXTERNALIZED_ASSET_DIR,nk as DeployError,ok as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,Ja as DEFAULT_STATE_DIR,qk as DEFAULT_QUALITY,pi as DEFAULT_PLACEHOLDER_OPTIONS,pk as DEFAULT_FORMATS,Zh as DEFAULT_DPR_VALUES,po as ComponentHMRHandler,ka as COMPONENT_SCOPE_LOCAL_GLOBALS,wa as COMPONENT_PASSTHROUGH_X_ATTRS,ma as COMPILE_TIME_ONLY_GLOBALS,hi as COMMON_SIZES,Mf as COLOR_MODE_BOOT_MARKER,Nf as COLOR_MODE_BOOT_GLOBAL,Xf as CLOAK_STYLE,Am as BroadcastServer,zm as Broadcast,Sf as BUILD_ID_META,Tf as BUILD_ID_HEADER,Ga as BROWSER_CORE_IMPORTS,qi as BLUR_UP_CSS,va as ALPINE_BRIDGE_X_ATTRS,Rq as $path};
|
|
2
|
+
import{$ as ll,$a as cn,$b as vo,$c as vp,$d as vq,A as Xj,Aa as nm,Ab as Pn,Ac as Wo,Ad as Wp,Ae as ar,B as Yj,Ba as om,Bb as Qn,Bc as Xo,Bd as Xp,Be as br,C as Zj,Ca as Bm,Cb as Rn,Cc as Yo,Cd as Yp,Ce as cr,D as _j,Da as Cm,Db as Sn,Dc as Zo,Dd as Zp,De as dr,E as Qk,Ea as Dm,Eb as Tn,Ec as _o,Ed as _p,Ee as er,F as Rk,Fa as Em,Fb as Un,Fc as $o,Fd as $p,Fe as fr,G as Sk,Ga as Fm,Gb as Vn,Gc as ap,Gd as aq,Ge as gr,H as Tk,Ha as Gm,Hb as Wn,Hc as bp,Hd as bq,He as hr,I as Uk,Ia as Km,Ib as Xn,Ic as cp,Id as cq,Ie as ir,J as Vk,Ja as Lm,Jb as Yn,Jc as dp,Jd as dq,Je as jr,K as Wk,Ka as Mm,Kb as Zn,Kc as ep,Kd as eq,Ke as kr,L as Xk,La as Nm,Lb as _n,Lc as fp,Ld as fq,Le as lr,M as Yk,Ma as Om,Mb as $n,Mc as gp,Md as gq,Me as mr,N as Zk,Na as Pm,Nb as ao,Nc as hp,Nd as hq,Ne as nr,O as _k,Oa as Qm,Ob as io,Oc as ip,Od as iq,Oe as or,P as $k,Pa as Rm,Pb as jo,Pc as jp,Pd as jq,Pe as pr,Q as al,Qa as Sm,Qb as ko,Qc as kp,Qd as kq,Qe as qr,R as bl,Ra as Tm,Rb as lo,Rc as lp,Rd as lq,Re as rr,S as cl,Sa as Um,Sb as mo,Sc as mp,Sd as mq,Se as sr,T as dl,Ta as Vm,Tb as no,Tc as np,Td as nq,Te as tr,U as el,Ua as Wm,Ub as oo,Uc as op,Ud as oq,Ue as ur,V as fl,Va as Xm,Vb as po,Vc as pp,Vd as pq,Ve as vr,W as gl,Wa as Ym,Wb as qo,Wc as qp,Wd as qq,We as wr,X as hl,Xa as Zm,Xb as ro,Xc as rp,Xd as rq,Xe as xr,Y as il,Ya as $m,Yb as so,Yc as sp,Yd as sq,Ye as yr,Z as jl,Za as an,Zb as to,Zc as tp,Zd as tq,_ as kl,_a as bn,_b as uo,_c as up,_d as uq,aa as ml,ab as dn,ac as wo,ad as wp,ae as wq,ba as nl,bb as en,bc as xo,bd as xp,be as xq,ca as ol,cb as fn,cc as yo,cd as yp,ce as yq,da as pl,db as gn,dc as zo,dd as zp,de as zq,ea as ql,eb as hn,ec as Ao,ed as Ap,ee as Aq,fa as rl,fb as jn,fc as Bo,fd as Bp,fe as Bq,ga as sl,gb as kn,gc as Co,gd as Cp,ge as Cq,ha as tl,hb as ln,hc as Do,hd as Dp,he as Dq,ia as ul,ib as mn,ic as Eo,id as Ep,ie as Eq,ja as vl,jb as nn,jc as Fo,jd as Fp,je as Fq,ka as wl,kb as on,kc as Go,kd as Gp,ke as Gq,la as xl,lb as pn,lc as Ho,ld as Hp,le as Hq,ma as yl,mb as qn,mc as Io,md as Ip,me as Iq,na as zl,nb as rn,nc as Jo,nd as Jp,ne as Jq,o as a,oa as Al,ob as sn,oc as Ko,od as Kp,oe as Kq,p as Ij,pa as cm,pb as vn,pc as Lo,pd as Lp,pe as Rq,q as Jj,qa as dm,qb as wn,qc as Mo,qd as Mp,qe as Sq,r as Kj,ra as em,rb as xn,rc as No,rd as Np,re as Tq,s as Lj,sa as fm,sb as yn,sc as Oo,sd as Op,se as Uq,t as Mj,ta as gm,tb as En,tc as Po,td as Pp,te as Vq,u as Nj,ua as hm,ub as Fn,uc as Qo,ud as Qp,ue as Wq,v as Oj,va as im,vb as Gn,vc as Ro,vd as Rp,ve as Xq,w as Pj,wa as jm,wb as Hn,wc as So,wd as Sp,we as Yq,x as Qj,xa as km,xb as Mn,xc as To,xd as Tp,xe as Zq,y as Vj,ya as lm,yb as Nn,yc as Uo,yd as Up,ye as _q,z as Wj,za as mm,zb as On,zc as Vo,zd as Vp,ze as $q}from"./chunk-3kcf3khz.js";import{$e as bk,Ze as $j,_e as ak,af as ck,bf as dk,cf as ek,df as fk,ef as gk,ff as hk,gf as ik,hf as jk,if as kk,jf as lk,kf as mk,lf as nk}from"./chunk-ym3r8ktq.js";import{mf as Ek,nf as Fk,of as Gk,pf as Hk,qf as Ik,rf as Jk,sf as Kk,tf as Lk,uf as Mk,vf as Nk,wf as Ok,xf as Pk}from"./chunk-dgg8a6c8.js";import{Af as eo,Bf as fo,Cf as go,Df as ho,yf as bo,zf as co}from"./chunk-r1p9hha3.js";import{Ef as tn,Ff as un}from"./chunk-pbsfbgx7.js";import{Gf as zn}from"./chunk-z1yd16w1.js";import{Hf as Sl,If as Tl,Jf as Ul,Kf as Vl,Lf as Yl,Mf as am}from"./chunk-jvxrftpe.js";import{Nf as Wl,Qf as Xl}from"./chunk-vhnnryps.js";import{$f as sm,Yf as pm,Zf as qm,_f as rm,ag as tm,bg as um,cg as vm,dg as wm,eg as xm,fg as ym,gg as zm,hg as Am}from"./chunk-0j9hrzjj.js";import{ig as Ck,jg as Dk}from"./chunk-91e3916g.js";import{kg as bm}from"./chunk-7mv0k3tw.js";import{lg as Hm,mg as Im,ng as Jm,og as _m,pg as An,qg as Bn,rg as Cn,sg as Dn,tg as In,ug as Jn,vg as Kn,wg as Ln}from"./chunk-5880yp78.js";import{Ag as El,Bg as Fl,Cg as Gl,Dg as Hl,Eg as Il,Fg as Jl,Gg as Kl,Hg as Ll,Ig as Ml,Jg as Nl,Kg as Zl,Lg as _l,Mg as $l,xg as Bl,yg as Cl,zg as Dl}from"./chunk-65ds4gey.js";import{Ng as Xi,Og as Yi,Pg as Zi,Qg as _i,Rg as $i,Sg as aj,Tg as bj,Ug as cj,Vg as dj,Wg as ej,Xg as fj}from"./chunk-temdqamx.js";import{Yg as xj,_g as yj}from"./chunk-f5v2qf95.js";import{eh as ok,fh as pk,gh as qk,hh as rk,ih as sk,jh as tk,kh as uk,mh as vk,nh as wk,oh as xk,ph as yk,qh as zk,rh as Ak,uh as Bk}from"./chunk-6twytnbh.js";import{vh as hh,wh as ih,xh as jh,yh as kh}from"./chunk-49kk0s96.js";import{Dh as lh}from"./chunk-w3ycm4na.js";import{Eh as sh,Fh as th,Gh as uh,Hh as vh,Ih as wh,Jh as xh}from"./chunk-w8cdwh41.js";import{Kh as Mi,Lh as Ni,Mh as Oi,Qh as Pi,Rh as Qi,Sh as Ri}from"./chunk-gpmpcrww.js";import{$h as Ji,Th as Ci,Uh as Di,Vh as Ei,Wh as Fi,Xh as Gi,Zh as Hi,_h as Ii,ai as Ki,bi as Li}from"./chunk-74cv4ta1.js";import{ci as sg,di as tg,ei as ug,fi as vg,gi as wg,hi as xg}from"./chunk-wcm80anz.js";import{ii as yg,ji as zg,ki as Ag,li as Bg,mi as Cg}from"./chunk-y7m2dpd3.js";import{ni as Dg,oi as Eg,pi as Fg,qi as Gg,ri as Hg}from"./chunk-9y0g8kzt.js";import{si as Ig,ti as Jg,ui as Kg,vi as Lg,wi as Mg,xi as Ng,yi as Og}from"./chunk-t6nseeb9.js";import{Ai as Qg,Bi as Rg,Ci as Sg,Di as Tg,Ei as Ug,zi as Pg}from"./chunk-xttsqmkm.js";import{Gi as Vg,Hi as Wg,Ii as Xg,Ji as Yg,Ki as Zg,Li as _g,Mi as $g,Ni as ah,Oi as bh,Pi as ch,Qi as dh,Ri as eh,Si as fh,Ti as gh}from"./chunk-54st8g2j.js";import{Vi as mg,Wi as ng}from"./chunk-6nxf4pb0.js";import{Zi as og}from"./chunk-qhcwqxsr.js";import"./chunk-9n0gvfrg.js";import{bj as pg}from"./chunk-7q9mwh4v.js";import{cj as qg,dj as rg}from"./chunk-refwkt87.js";import{ej as fe,fj as ge,gj as he,hj as ie,ij as je,jj as ke,kj as le,lj as me,mj as ne,nj as oe,oj as pe,pj as qe,qj as re,rj as se}from"./chunk-1e0kazb9.js";import{sj as Pe,tj as Qe}from"./chunk-7bemc914.js";import{Aj as Be,Bj as Ce,Cj as De,Dj as Ee,Ej as Fe,Fj as Ge,Gj as He,Hj as Ie,Ij as Je,Jj as Ke,Kj as Le,Lj as Me,Mj as Ne,Nj as Oe}from"./chunk-w95sp0k9.js";import{Oj as Re,Pj as Se,Qj as Te,Rj as Ue,Sj as Ve,Tj as We,Uj as Xe,Vj as Ye,Wj as Ze,Xj as _e,Yj as $e}from"./chunk-4fybwpba.js";import{qk as Lq,rk as Mq,sk as Nq,tk as Oq,uk as Pq,vk as Qq}from"./chunk-bmfnxh4y.js";import{Ak as Ol,Bk as Pl,Ck as Ql,Dk as Rl,wk as Rj,xk as Sj,yk as Tj,zk as Uj}from"./chunk-gh1vsaa0.js";import"./chunk-58f0mthg.js";import"./chunk-d8y85xdy.js";import{$l as Xa,$m as Vb,$n as Vc,$o as ze,$p as If,$q as Oh,$r as wj,Al as J,Am as qb,An as uc,Ao as Kd,Ap as gf,Aq as hg,Ar as wi,Bl as da,Bn as vc,Bo as Ld,Bp as hf,Bq as ig,Br as xi,Cl as ea,Cm as xb,Cn as wc,Co as Md,Cp as jf,Cq as jg,Cr as yi,Dl as fa,Dm as yb,Dn as xc,Do as Nd,Dp as kf,Dq as kg,Dr as zi,El as ga,Em as zb,En as yc,Eo as Od,Ep as lf,Eq as lg,Er as Ai,Fl as ha,Fm as Ab,Fn as zc,Fo as Pd,Fp as mf,Fq as mh,Fr as Bi,Gl as ia,Gm as Bb,Gn as Ac,Go as Qd,Gp as nf,Gq as nh,Gr as Si,Hm as Cb,Hn as Bc,Ho as Rd,Hp as of,Hq as oh,Hr as Ti,Im as Db,In as Cc,Io as Sd,Ip as pf,Iq as ph,Ir as Ui,Jl as za,Jn as Dc,Jo as Td,Jp as qf,Jq as qh,Jr as Vi,Kl as Aa,Km as Eb,Kn as Ec,Ko as Ud,Kp as rf,Kq as rh,Kr as Wi,Ll as Ba,Lm as Fb,Ln as Fc,Lo as Vd,Lp as sf,Lq as yh,Lr as gj,Ml as Ca,Mm as Gb,Mn as Gc,Mo as Wd,Mp as tf,Mq as zh,Mr as hj,Nl as Da,Nm as Hb,Nn as Hc,No as Xd,Np as uf,Nq as Ah,Nr as ij,Om as Ib,On as Ic,Oo as Yd,Op as vf,Oq as Bh,Or as jj,Pm as Jb,Pn as Jc,Po as Zd,Pp as wf,Pq as Ch,Pr as kj,Ql as Ga,Qm as Kb,Qn as Kc,Qo as _d,Qp as xf,Qq as Dh,Qr as lj,Rl as Ha,Rm as Lb,Rn as Lc,Ro as $d,Rp as yf,Rq as Eh,Rr as mj,Sl as Ia,Sm as Mb,Sn as Mc,So as ae,Sp as zf,Sq as Fh,Sr as nj,Tl as Pa,Tm as Nb,Tn as Nc,To as be,Tp as Af,Tq as Gh,Tr as oj,Ul as Qa,Um as Ob,Un as Oc,Uo as ce,Up as Bf,Uq as Hh,Ur as pj,Vl as Ra,Vm as Pb,Vn as Pc,Vo as de,Vp as Cf,Vq as Ih,Vr as qj,Wl as Sa,Wm as Qb,Wn as Qc,Wo as ee,Wp as Df,Wq as Jh,Wr as rj,Xl as Ta,Xm as Rb,Xn as Rc,Xp as Ef,Xq as Kh,Xr as sj,Yl as Ua,Ym as Sb,Yn as Sc,Yo as ye,Yp as Ff,Yq as Lh,Yr as tj,Zl as Va,Zm as Tb,Zn as Tc,Zp as Gf,Zq as Mh,Zr as uj,_l as Wa,_m as Ub,_n as Uc,_p as Hf,_q as Nh,_r as vj,an as Wb,ao as Wc,ap as Ae,aq as Jf,ar as Yh,as as zj,bn as Xb,bo as Xc,bq as Kf,br as Zh,bs as Aj,cn as Yb,co as Yc,cp as af,cq as Lf,cr as _h,cs as Bj,dn as Zb,do as Zc,dq as Mf,dr as $h,ds as Cj,em as Ya,en as _b,eo as _c,eq as Nf,er as ai,es as Dj,fm as Za,fn as $b,fo as $c,fq as Of,fr as bi,fs as Ej,gm as _a,gn as ac,go as ad,gq as Pf,gr as ci,gs as Fj,hm as $a,hn as bc,ho as bd,hq as Qf,hr as di,hs as Gj,im as ab,in as cc,io as cd,iq as Rf,ir as ei,is as Hj,jl as s,jm as bb,jn as dc,jo as dd,jq as Sf,jr as fi,kl as t,kn as ec,ko as ed,kq as Tf,kr as gi,ll as u,ln as fc,lo as fd,lq as Uf,lr as hi,ml as v,mm as cb,mn as gc,mo as gd,mq as Vf,mr as ii,nl as w,nm as db,nn as hc,no as hd,nq as Wf,nr as ji,ol as x,om as eb,on as ic,oo as id,oq as Xf,or as ki,pl as y,pm as fb,pn as jc,po as zd,pq as Yf,pr as li,ql as z,qm as gb,qn as kc,qo as Ad,qq as Zf,qr as mi,rl as A,rm as hb,rn as lc,ro as Bd,rq as _f,rr as ni,sl as B,sm as ib,sn as mc,so as Cd,sq as $f,sr as oi,tl as C,tm as jb,tn as nc,to as Dd,tp as bf,tq as ag,tr as pi,ul as D,um as kb,un as oc,uo as Ed,uq as bg,ur as qi,vl as E,vm as lb,vn as pc,vo as Fd,vp as cf,vq as cg,vr as ri,wl as F,wm as mb,wn as qc,wo as Gd,wq as dg,wr as si,xl as G,xm as nb,xn as rc,xo as Hd,xp as df,xq as eg,xr as ti,yl as H,ym as ob,yn as sc,yo as Id,yp as ef,yq as fg,yr as ui,zl as I,zm as pb,zn as tc,zo as Jd,zp as ff,zq as gg,zr as vi}from"./chunk-h7aynn48.js";import{js as d,ks as e,ls as f,ms as g,ns as h,os as i,ps as j,qs as k,rs as l,ss as m,ts as n,us as o,vs as p,ws as q,xs as r}from"./chunk-0athjw48.js";import{As as Rh,Bs as Sh,Cs as Th,Ds as Uh,Es as Vh,Fs as Wh,Gs as Xh,ys as Ph,zs as Qh}from"./chunk-135mme4g.js";import{Hs as b,Is as c}from"./chunk-f3m0q482.js";import{Js as Ea,Ks as Fa}from"./chunk-f1jd5qjb.js";import{Ls as rb,Ms as sb,Os as tb,Ys as ub,Zs as vb,_s as wb}from"./chunk-v0y3drpw.js";import{$s as te,at as ue,bt as ve,ct as we,ft as xe}from"./chunk-0pdrnxg2.js";import{gt as Ja,ht as Ka,it as La,jt as Ma,kt as Na,lt as Oa}from"./chunk-j26v67km.js";import{At as xd,Bt as yd,mt as jd,nt as kd,ot as ld,pt as md,qt as nd,rt as od,st as pd,tt as qd,ut as rd,vt as sd,wt as td,xt as ud,yt as vd,zt as wd}from"./chunk-3gjrq8m7.js";import"./chunk-mh4hd2wt.js";import{Et as ja,Ft as ka,Gt as la,Ht as ma,It as na,Jt as oa,Kt as pa,Lt as qa,Mt as ra,Nt as sa,Ot as ta,Pt as ua,Qt as va,Rt as wa,St as xa,Tt as ya}from"./chunk-fa3pamx8.js";import{$t as M,Bu as ca,Xt as K,Yt as L,eu as N,fu as O,lu as P,mu as Q,nu as R,ou as S,pu as T,qu as U,ru as V,su as W,tu as X,uu as Y,vu as Z,wu as _,xu as $,yu as aa,zu as ba}from"./chunk-5ec3m8hk.js";import"./chunk-snh1ahqp.js";import"./chunk-p3kn55v4.js";export{jk as writeNetlifyConfig,_l as writeManifest,Ok as writeImageManifest,ro as wrapComponentForHMR,lr as withDefaults,wj as webComponentDirectiveHandler,gp as watermark,iq as watchViews,Yk as watchMultiple,Zk as watchEffect,Xk as watch,xe as warmImagePlaceholders,kl as waitForStore,Yd as waitForLocale,co as virtualPathFor,jj as videoDirective,tc as validators,pr as validated,Kd as validateValueEnhanced,nh as validateTemplate,lp as validateParams,Ld as validateFormEnhanced,Zp as validateFile,Gd as validateFields,Fd as validateField,ph as validateDirective,dd as validateCspDirectives,Ej as validateConfig,dm as validateComponentScripts,Bm as validateComponentProps,lg as validateClientScript,kh as v,jb as usesSignalsInScript,pa as usesReactiveRuntime,Ch as userComponentFileExists,Sg as useVirtualList,rd as useTitle,jl as useStoreOrThrow,Jo as useStore,Vj as useStorage,tq as useSlots,Xj as useSessionStorage,od as useSeoMeta,ll as useRouteParams,nl as useRouteParamOrThrow,ml as useRouteParam,rd as usePageTitle,Oe as useOptimistic,pl as useMiddlewareValue,ol as useMiddlewareState,Wj as useLocalStorage,ko as useLoadingIndicator,md as useHead,hh as useForm,vq as useAttrs,$p as uploadFiles,_p as uploadFile,gl as updateInstance,Me as untrack,Sh as unregisterDirective,hl as unmountInstance,qb as unescapeHtml,go as typecheckStxFiles,Bh as transpileTypeScript,_q as translate,w as transitionDirective,vm as toUsers,um as toUser,Ro as thumbnail,Sp as thumbHashToRGBA,Tp as thumbHashToDataURL,ra as templateNeedsRuntime,qa as templateHasReactiveContext,Re as templateCache,Mb as syncRecordedResponse,oo as stxClientHelpers,wf as structuredDataDirective,br as stripLocalePrefix,Ll as stripDocumentWrapper,Fa as stripCommentsAndLiterals,jn as stringToStream,Tc as strictCspPreset,ne as streamingSuspenseDirective,re as streamToResponse,le as streamTemplateSimple,fe as streamTemplate,Qj as stopHmrServer,rm as stopBroadcasting,Ma as stateDirName,Na as stateDir,Be as state,fg as startsDocument,Ln as startProductionServer,zn as startInteractive,qm as startBroadcasting,dr as stampLocaleLayoutGroup,D as staggerDirective,jp as srcsetUrls,E as springDirective,Cc as splitByPipe,Hl as spaNavVaryHeaders,eo as sourcePathFor,qp as smartBatchSign,Eh as slotContentHasExpressions,op as signUrl,zh as shouldTranspileTypeScript,Nj as shouldReloadOnChange,tp as shouldRefreshSignature,Oj as shouldIgnoreFile,Kg as shouldCacheComponent,Vo as sharpen,sr as shape,La as setStateDir,tl as setRouteParams,ul as setMiddlewareState,we as setImagePlaceholder,nq as setGlobalProvide,Qb as setErrorLocale,Qk as setCurrentInstance,Zi as setCachedVideoResult,Oi as setCachedImageResult,Ii as setCached,vr as serveStxFile,xr as serveMultipleStxFiles,Ij as serveMarkdownFile,Vn as serveFile,yr as serveApp,Un as serve,uo as serializeState,_m as serializeSetCookie,Xo as sepia,pd as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,nj as scopeHTML,mj as scopeCSS,zf as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,$o as saturation,mp as sanitizeParams,vc as sanitizeFilePath,wc as sanitizeExpression,xc as sanitizeDirectiveParams,uc as sanitizeDirectiveParam,yc as sanitizeComponentProps,oc as safeExecuteAsync,nc as safeExecute,xa as runtimeHandledXAttrsLiteral,pf as runPreProcessingMiddleware,qf as runPostProcessingMiddleware,Cn as runPageAction,He as runMountCallbacks,ba as runMiddleware,el as runHooks,Tq as runDoctor,Ie as runDestroyCallbacks,Ef as runComposers,ap as rotate,lh as rewriteImagesWithSiblings,Nb as responseBindings,Ih as resolveTemplatePath,c as resolveStxTargets,Aj as resolveStxDirectories,Zq as resolveI18n,Po as resize,Ya as resetPlaceholders,ld as resetHead,to as resetHMRHandler,bc as resetErrorConfig,nr as required,ab as replacePlaceholders,gq as renderView,gj as renderVideoComponent,Qa as renderVendorStyleTags,Cq as renderToString,Dq as renderToStream,Eq as renderToDOM,Rp as renderThumbhashToCanvas,Qq as renderTemplateString,Oq as renderTemplate,Pq as renderString,ie as renderStreamingPage,uh as renderSlot,Ag as renderSSRSuspense,Bp as renderProtectedVideo,Ap as renderProtectedImg,np as renderMediaUpload,Nq as renderMarkdownView,Ql as renderLayoutTypes,Si as renderImgComponent,Ek as renderImageComponent,td as renderHtmlAttrs,sd as renderHead,jq as renderEmail,Gh as renderComponentWithSlot,ud as renderBodyAttrs,Eo as render,Vc as relaxedCspPreset,Ed as registerValidationRule,pe as registerStreamingDirectives,Lo as registerStoresClient,rl as registerStore,xf as registerSeoDirectives,V as registerMiddleware,eb as registerFilters,db as registerFilter,Sb as registerErrorMessages,Jd as registerEnhancedValidationRule,Ph as registerDirective,cd as registerCspDirectives,Em as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Uk as ref,rn as redirect,Ib as recordResponseStatus,Jb as recordResponseHeader,Oa as rebaseOntoStateDir,Kb as readResponseStatus,Lb as readResponseHeaders,Gj as readMarkdownFile,Se as readFileCached,Vk as reactive,ep as quality,yp as pruneSignatureCache,Li as pruneCache,lq as provide,Mq as protectCodeBlocks,mr as prop,If as processVueTemplate,Qg as processVirtualListDirectives,Ug as processVirtualGridDirectives,fj as processVideo,Hd as processValidateDirective,de as processTranslateDirective,ug as processTransitionDirectives,xg as processTransitionAttributes,xd as processTitleDirective,Ab as processTemplateBindings,qg as processTeleportDirectives,yg as processSuspenseDirectives,sf as processStructuredData,je as processStreamDirectives,Ob as processStatusDirective,fh as processStaticDirectives,nf as processStackReplacements,mf as processStackPushDirectives,vh as processSlots,Jl as processShell,Gf as processServerBindings,tf as processSeoDirective,qe as processSectionDirectives,Lf as processScopedStyles,yb as processReactiveBindings,Cp as processProtectedMedia,_g as processPartialHydrationDirectives,kg as processOnceDirective,of as processMiddleware,rf as processMetaDirectives,yd as processMetaDirective,Hj as processMarkdownFileDirectives,Nh as processMarkdownDirectives,gf as processLoops,Ig as processKeepAliveDirectives,jg as processJsonDirective,Tg as processInfiniteListDirectives,lf as processIncludes,Ui as processImgComponents,Gk as processImageComponents,tk as processImage,wd as processHeadDirective,Ad as processForms,Cd as processFormInputDirectives,nb as processExpressions,Ca as processEventDirectives,Dd as processErrorDirective,Jf as processDynamicComponents,mh as processDirectives,Xh as processDirectiveAttributes,pg as processDeferDirectives,hd as processCustomDirectives,$c as processCspDirectives,tr as processComponentProps,Xa as processClientScript,Bd as processBasicFormDirectives,Dg as processAsyncDirectives,id as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Ud as preloadTranslationsBackground,Td as preloadTranslations,jo as preloadIslandHandlers,ye as preloadIconCollection,mm as poolStrings,yj as pluginManager,ue as placeholdersWarmed,tg as performLeave,sg as performEnter,Je as pendingLifecycleCounts,Ne as peek,hf as partialsCache,hj as parseVideoDirectiveOptions,No as parseUrl,Up as parseThumbhashString,Ic as parseSwitchBlock,sh as parseSlots,th as parseSlotElement,Nc as parseScriptDeclarations,uj as parseSFCComponent,Dp as parseProtectedArgs,ff as parseLoopBinding,Ti as parseImgComponent,ji as parseImageUrl,Fk as parseImageComponent,An as parseFormBody,Kc as parseExpressionWithFilters,Fm as parseDefaults,on as parseCookies,Km as parseContainerSelector,Fc as parseConditionalBlock,Lc as parseArguments,H as parseAnimationShorthand,or as optional,nm as optimizeTemplate,Lk as optimizeImage,Mk as optimizeDirectory,qr as oneOf,jf as onceStore,bl as onUpdated,xb as onUpdate,dl as onUnmounted,yl as onServer,$k as onMounted,Fe as onMount,eh as onHydrated,rq as onErrorCaptured,Ge as onDestroy,Og as onDeactivated,xl as onClient,al as onBeforeUpdate,cl as onBeforeUnmount,_k as onBeforeMount,Ng as onActivated,Np as observeElement,sn as notFound,Qf as normalizeCriticalHeadOrder,qq as nextTick,Im as negotiateEncoding,P as navigateTo,fl as mountInstance,z as motionDirective,Uc as moderateCspPreset,lm as minifyHtml,vf as metaDirective,_f as metaDedupKey,Oo as mergeParams,ag as mergeHtmlAttrs,nd as mergeHeadConfigs,Yc as mergeCspDirectives,sb as mergeCrosswindConfig,M as matchRoute,Oh as markdownDirectiveHandler,Fj as markdownCache,b as looksLikeGlob,ar as localizePath,Vd as loadTranslationLazy,$d as loadTranslation,Bj as loadStxConfig,_ as loadMiddlewareFromDirectory,$l as loadManifest,Jp as loadElement,sm as loadChannels,hr as lintStxStrict,Lp as lazyLoadAll,Kp as lazyLoad,C as keyframeDirective,Aq as jsxs,Bq as jsxDEV,zq as jsx,qn as jsonResponse,oe as islandDirective,_b as isTest,Ml as isSpaNavigation,Fl as isSpaNavRequest,rp as isSignatureValid,Ke as isSignal,rk as isSharpAvailable,bn as isServerEnvironment,vl as isServer,ta as isRuntimeOwnedColonAttr,Yb as isProduction,d as isPresentationalRole,Gp as isNativeLazySupported,Lq as isMarkdownPath,Rd as isLoading,Sd as isLoaded,yh as isJavaScriptScript,Hp as isIntersectionObserverSupported,zk as isImageFile,sk as isImageBackendAvailable,be as isICUFormat,dh as isHydrated,Dh as isHydrateTrigger,Gb as isHttpStatus,an as isEdgeEnvironment,ir as isDirectiveKind,Zb as isDevelopment,Le as isDerived,Mj as isCssOnlyChange,Hm as isCompressible,wl as isClient,Fg as isAsyncComponent,Bn as isActionableMethod,Yo as invert,Ue as invalidateFileCacheByDir,Te as invalidateFileCache,mb as interpolateScriptsInTemplate,kb as interpolateScriptExpressions,lb as interpolateScriptAttributes,kc as inlineError,Yq as injectThemeBootstrap,uf as injectSeoTags,Vq as injectSeo,af as injectRouterScript,Lj as injectHotReload,fa as injectHeatmap,Zc as injectCspMetaTag,wb as injectCrosswindCSS,hg as injectConfigHeadTags,Pf as injectColorModeBootScript,cg as injectCloakStyle,Wf as injectBuildId,Sa as injectBrowserCoreAutoImports,Cb as injectAnalytics,mq as inject,ql as initStoreRegistry,mk as initNetlify,lo as initLoadingIndicator,Ip as initLazyLoading,yn as initFile,Qp as initBlurUp,Wp as initAllBlurUp,Wi as imgDirective,Jk as imageDirective,Jn as hydrateTemplateStream,In as hydrateTemplate,io as hydrateIslands,ah as hydrateIsland,Kn as hydrateFragment,bh as hydrateByStrategy,ch as hydrateAll,Bo as hydrate,Tn as htmlResponse,dg as hoistLeadingHeadTags,Rf as hoistColorModeBootScript,ga as heatmapDirective,Ei as hashString,$e as hashFilePath,Ci as hashFile,Di as hashBuffer,Hf as hasVueTemplateSyntax,ef as hasVariables,Go as hasStore,bb as hasPlaceholders,kk as hasNetlifyConfig,X as hasMiddleware,Da as hasEventDirectives,gg as hasDocumentShell,qh as hasDirectives,h as hasDOMSupport,Ck as handleImageRequest,sq as handleError,Iq as h,yk as groupVariantsByFormat,Wo as grayscale,Mn as gitHash,fm as getUnusedDirectives,Wd as getTranslationSync,Pd as getTranslationCacheStats,Xd as getTranslationAsync,ce as getTranslation,fk as getTotalSize,sp as getTimeUntilExpiry,mg as getStoreScript,Ho as getStoreNames,Fo as getStore,_j as getStorageSize,Zj as getStorageKeys,Jh as getSourceLineInfo,Ah as getSharedTranspiler,g as getScreenReaderOnlyStyle,oj as getScopeAttribute,Ae as getRouteParams,Ha as getPublicEnvDefine,Ia as getPublicEnv,oh as getPositionInfo,_a as getPlaceholderRegistry,Bi as getPlaceholderCacheStats,kd as getPageMeta,Pc as getNonce,Ak as getMimeType,Z as getMiddlewareNames,W as getMiddleware,Qd as getLoadingState,Zd as getLoadingLocales,te as getImagePlaceholder,uk as getImageMetadata,Ao as getHydrationRuntime,sl as getHydratedStoreState,Pj as getHmrServer,jd as getHead,so as getHMRHandler,ni as getFormatExtension,Gi as getFileMtime,xk as getFallbackVariant,Ub as getErrorMessage,Rb as getErrorLocale,ac as getErrorConfig,Xb as getErrorCodeName,Rh as getDirectives,Qh as getDirective,Rk as getCurrentInstance,Xc as getCspPreset,ed as getCspHeaderName,tb as getCrosswindServeAsset,Mh as getComponentCacheStats,Yi as getCachedVideoResult,wp as getCachedSignature,We as getCachedSignalsRuntime,Xe as getCachedRouterScript,zi as getCachedPlaceholder,Ni as getCachedImageResult,Hi as getCached,Ki as getCacheStats,Uf as getBuildId,pm as getBroadcastServer,mi as getBestVariant,fb as getAllFilters,ai as generateWidthSrcset,Rg as generateVirtualListCSS,bq as generateVideoPreview,Md as generateValidationScript,cq as generateUploadRuntime,gm as generateTreeShakenBundle,wg as generateTransitionRuntime,vg as generateTransitionCSS,aj as generateThumbnails,si as generateThumbhashPlaceholder,Tm as generateTemplatesDocs,Cg as generateSuspenseRuntime,Bg as generateSuspenseCSS,vo as generateStateScript,ki as generateSrcsetData,Ri as generateSrcset,vk as generateSrcSet,bj as generateSpriteSheet,kq as generateSpaShell,li as generateSourceTags,gi as generateSizesFromBreakpoints,fi as generateSizesAttribute,wk as generateSizes,yf as generateSitemapIndex,Wq as generateSitemap,Fp as generateSimpleMediaPicker,zp as generateSignatureRuntime,Qe as generateSignalsRuntimeDev,Pe as generateSignalsRuntime,Wa as generateServerDataBridge,lj as generateScopeId,vj as generateSFCWebComponent,Aa as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,Af as generateRobotsTxt,Xq as generateRobots,Qi as generateResponsiveVariants,rj as generateReactiveWebComponentTS,qj as generateReactiveWebComponent,tj as generateReactiveRuntime,sj as generateReactiveMixin,$i as generatePoster,yi as generatePlaceholderStyle,xi as generatePlaceholderCSS,ri as generatePlaceholder,$g as generatePartialHydrationCSS,Oc as generateNonce,gk as generateNetlifyToml,eq as generateMinifiedMediaRuntime,dq as generateMediaRuntime,Ep as generateMediaManagerEmbed,Zl as generateManifest,no as generateLoadingIndicatorHtml,Pp as generateLazyLoadRuntime,Rl as generateLayoutTypes,ui as generateLQIP,Mg as generateKeepAliveRuntime,Lg as generateKeepAliveCSS,gh as generateIslandManifest,aq as generateImagePreview,Nk as generateImageManifest,zo as generateHydrationScript,se as generateHydrationRuntime,Co as generateHydrationCSS,Vg as generateHydrationBootstrap,Kj as generateHotReloadScript,ea as generateHeatmapScript,qo as generateHMRClientScript,cj as generateHLSManifest,wo as generateEventBindings,ei as generateDprSrcsetWithVariableQuality,di as generateDprSrcset,eg as generateDocumentShell,Ym as generateDocs,Um as generateDirectivesDocs,Wh as generateDirectiveRuntime,Bf as generateDefaultRobotsTxt,dj as generateDASHManifest,Sc as generateCspMetaTag,Rc as generateCspHeader,vb as generateCrosswindCSS,xq as generateCompositionRuntime,Sm as generateComponentsDocs,Wg as generateComponentManifest,Qm as generateComponentDoc,wi as generateColorPlaceholder,Of as generateColorModeBootScript,il as generateClientRuntime,Fi as generateCacheKey,Ua as generateBrowserAutoImportDestructuring,Xp as generateBlurUpRuntime,Yp as generateBlurUpCSS,zb as generateBindingsRuntime,bi as generateAutoWidthSrcset,Ta as generateAutoImportDestructuring,Hg as generateAsyncComponentRuntime,Gg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,Bb as generateAnalyticsScript,ho as formatTypecheckDiagnostics,ao as formatTypeErrors,vn as formatStxContent,ek as formatSize,O as formatRoutes,wn as formatMarkdownContent,Vb as formatLocalizedError,ae as formatICU,cc as formatFilePath,jc as formatError,Uq as formatDoctorReport,Vm as formatDocsAsMarkdown,Xm as formatDocsAsJson,Wm as formatDocsAsHtml,dp as format,km as foldConstants,cp as flipVertical,bp as flipHorizontal,Sl as fingerprint,fo as findRuntimeTypeDeclarations,Sq as findPantryPackage,Ec as findMatchingEndTag,Ac as findMatchingDelimiter,Ea as findInterpolationEnd,Gc as findIfBlocks,Jc as findExpressions,N as findErrorPage,Hc as findDirectiveBlocks,hm as findDeadCode,hm as findDeadBranches,Lm as findContainerRegion,Rm as findComponentFiles,wr as findCommonDir,dk as filterRequiredFiles,Hh as fileExists,bf as extractVariables,Xl as extractTemplateExpressions,ke as extractStreamBoundaries,xo as extractState,wh as extractSlotContent,df as extractScriptFromTemplate,Wl as extractScriptBlocks,$a as extractPlaceholders,Dc as extractParenthesizedExpression,Hb as extractPageResponseStatus,ca as extractLayoutMetadata,vi as extractDominantColor,Mc as extractDirectiveParams,rh as extractDirectiveNames,Nl as extractContainerContent,Om as extractComponentProps,Xg as extractComponentName,Pm as extractComponentDescription,ub as extractClassNames,Va as extractBridgeData,Yg as extractBoundProps,Bc as extractBalancedExpression,Pa as extractAndStripCssImports,pj as extractAndScopeStyles,Ba as extractAndProcessEvents,Tj as externalizeSharedAssets,Uj as externalizeRepeatedAssets,Sj as externalizeHtml,pb as evaluateExpression,jm as evaluateConstant,Pb as evaluateAuthExpression,ib as escapeHtmlValue,hb as escapeHtml,pc as errorRecovery,rc as errorLogger,rg as ensureTeleportTargets,ig as ensureDocumentShell,Id as enhancedValidationRules,Mm as enableDevTools,im as eliminateDeadCode,De as effect,kp as dprUrls,Zm as docsCommand,Pl as discoverLayoutNames,Op as disconnectObserver,Nm as disableDevTools,sc as devHelpers,Il as detectShell,$m as detectRuntime,hk as detectProjectConfig,oi as detectFormat,cm as detectBuildMode,Ce as derived,lk as deploy,Dj as defineStxConfig,Ko as defineStore,uq as defineSlots,gr as defineSiteConfig,kr as definePropsWithValidation,jr as defineProps,xj as definePlugin,qd as definePageMeta,R as defineMiddleware,ih as defineForm,pq as defineExpose,oq as defineEmits,Th as defineDirective,Kq as defineCustomElement,Hn as defineConfig,Uh as defineClientDirective,Eg as defineAsyncComponent,fq as defaultMediaConfig,Pk as defaultImageConfig,Nd as defaultI18nConfig,da as defaultHeatmapConfig,zd as defaultFormClasses,cb as defaultFilters,gd as defaultCspConfig,zj as defaultConfig,ur as default,rb as deepMergeThemes,Kf as dedupeScopedStyles,ti as decodeThumbhash,bd as cspNonceDirective,ad as cspDirective,Vp as crossfadeTransition,Qo as crop,Pg as createVirtualList,ij as createVideoDirective,mn as createVercelHandler,Zn as createTypeChecker,ee as createTranslateFilter,hn as createTextEncoderStream,Jq as createStxApp,gn as createStreamingResponse,me as createStreamRenderer,Io as createStore,U as createStorageManager,S as createServerCookieManager,Tk as createScope,zg as createSSRSuspense,ze as createRouter,$ as createRouteLocation,Xn as createRoute,Uk as createRef,Vk as createReactive,wq as createProvideContext,On as createProject,Gn as createProductionBuild,Za as createPlaceholder,om as createOptimizedBuild,nn as createNetlifyHandler,$j as createNetlifyClient,aa as createMiddlewareContext,Wn as createMiddleware,Mp as createLazyObserver,Jg as createKeepAliveCache,dn as createKVNamespace,Zg as createIslandRegistry,Vi as createImgDirective,Kk as createImagePlugin,Dk as createImageHandler,Ik as createImageDirective,ia as createHeatmapAggregator,ck as createFileManifest,cn as createEnvAccessor,mc as createEnhancedError,fn as createEdgeHandler,en as createEdgeCache,Kh as createDetailedErrorMessage,ln as createDenoHandler,ik as createDefaultNetlifyConfig,fd as createCspHeaders,pn as createCookie,Wk as createComputed,Sk as createComponentInstance,kn as createCloudflareHandler,T as createClientCookieManager,Vh as createBuiltinDirectives,Jq as createApp,F as createAnimationTimeline,To as cover,cf as convertToCommonJS,_o as contrast,So as contain,lc as consoleError,$b as configureErrorHandling,Cj as config,Wk as computed,Jm as compressResponse,Df as composerPattern,Cf as composer,Kl as composeShellWithPage,Dm as componentDirective,Fh as componentClientSignalNames,Yl as compileTemplate,a as collectRepeatedFlag,bk as collectDeployFiles,_i as clearVideoCache,Od as clearTranslationCache,ng as clearStoreCache,Yj as clearStorage,xp as clearSignatureCache,Ai as clearPlaceholderCache,kf as clearOnceStore,Qc as clearNonce,Y as clearMiddleware,ve as clearImagePlaceholders,Hk as clearImageCache,Tb as clearErrorMessages,Ye as clearDevCaches,gb as clearCustomFilters,Ff as clearComposers,og as clearComposableCache,Lh as clearComponentCache,Ji as clearCache,mo as cleanupLoadingIndicator,Bl as classifyScript,Cl as classifyAllScripts,_n as checkTemplateFile,$n as checkTemplate,Ze as checkCache,up as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,ym as channel,un as captureScreenshots,tn as captureScreenshot,_d as cancelPendingLoads,ak as calculateSha1,ci as calculateOptimalWidths,_e as cacheTemplate,kj as buildWebComponents,bo as buildVirtualSource,hq as buildViews,Mo as buildUrl,ge as buildSuspenseResolveScript,fr as buildStaticSite,la as buildRuntimeGlobalsDestructure,Tl as buildRuntimeAsset,Ul as buildRouterAsset,er as buildLangPickerScript,ii as buildImageUrl,$f as buildHtmlAttrs,am as buildForProduction,Gm as buildComponentLibrary,vp as buildAuthParams,bm as buildApp,cr as buildAlternateLinks,Fn as build,wm as broadcastPrivate,xm as broadcastPresence,tm as broadcast,Zo as brightness,Uo as blur,ya as blankInertHtmlRegions,pp as batchSignUrls,Ee as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,fp as auto,e as attributeValue,Vl as assetTags,za as asInvocableStatement,rr as arrayOf,$q as applyTranslations,Pi as applyTransformations,xh as applySlots,Cm as applyPropDefaults,ip as applyPreset,bg as applyHtmlAttrs,vd as applyHead,ob as applyFilters,Gl as appendVary,Wc as apiCspPreset,y as animationGroupDirective,ej as analyzeVideo,em as analyzeUsage,zl as analyzeTemplate,Al as analyzeProject,em as analyzeDirectiveUsage,Db as analyticsDirective,Rn as addStore,Qn as addPage,_c as addNonceToInlineContent,Sn as addLayout,Pn as addComponent,Dn as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,Ve as __setSignalsGeneratorsForTest,Vf as __setBuildIdForTest,Xi as VideoProcessorCache,jh as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,zc as Tokenizer,Yn as TemplateTypeChecker,xn as TEMPLATE_PRESETS,ic as StxValidationError,ec as StxSyntaxError,gc as StxSecurityError,fc as StxRuntimeError,hc as StxFileError,dc as StxError,Fq as Show,he as SUSPENSE_RESOLVER_RUNTIME,ja as STX_RUNTIME_GLOBALS,Ra as STX_AUTO_IMPORTS,Ka as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,Dl as SPA_NAV_HEADER,sa as RUNTIME_OWNED_COLON_ATTRS,ua as RUNTIME_HANDLED_X_ATTRS,Eb as RESPONSE_STATUS_KEY,Fb as RESPONSE_HEADERS_KEY,oa as REACTIVE_RUNTIME_GLOBALS,En as ProductionBuild,Hq as Portal,Nn as PROJECT_TEMPLATES,hp as PRESETS,na as NON_CLIENT_PRIMITIVES,Do as MemorySessionStore,$h as MIME_TYPES,Yh as MEDIA_DEFAULT_WIDTHS,_h as MEDIA_DEFAULT_FORMATS,Ol as LAYOUT_TYPES_FILE,Mi as ImageProcessorCache,Bk as ImageProcessingError,yo as HydrationRuntime,Jj as HotReloadServer,ha as HeatmapAggregator,Zf as HTML_CLASS_MARKER,Yf as HTML_ATTRS_MARKER,yq as Fragment,Gq as For,El as FRAGMENT_CACHE_CONTROL,qc as ErrorLogger,Wb as ErrorCodes,Rj as EXTERNALIZED_ASSET_DIR,nk as DeployError,ok as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,Ja as DEFAULT_STATE_DIR,qk as DEFAULT_QUALITY,pi as DEFAULT_PLACEHOLDER_OPTIONS,pk as DEFAULT_FORMATS,Zh as DEFAULT_DPR_VALUES,po as ComponentHMRHandler,ka as COMPONENT_SCOPE_LOCAL_GLOBALS,wa as COMPONENT_PASSTHROUGH_X_ATTRS,ma as COMPILE_TIME_ONLY_GLOBALS,hi as COMMON_SIZES,Mf as COLOR_MODE_BOOT_MARKER,Nf as COLOR_MODE_BOOT_GLOBAL,Xf as CLOAK_STYLE,Am as BroadcastServer,zm as Broadcast,Sf as BUILD_ID_META,Tf as BUILD_ID_HEADER,Ga as BROWSER_CORE_IMPORTS,qi as BLUR_UP_CSS,va as ALPINE_BRIDGE_X_ATTRS,Rq as $path};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Rf as p}from"./chunk-vhnnryps.js";import{Hg as a,Jg as JF,Kg as ZF,Lg as qF}from"./chunk-
|
|
2
|
+
import{Rf as p}from"./chunk-vhnnryps.js";import{Hg as a,Jg as JF,Kg as ZF,Lg as qF}from"./chunk-65ds4gey.js";import{sj as C,tj as D}from"./chunk-7bemc914.js";import{Ek as QF,Fk as XF,Gk as YF}from"./chunk-58f0mthg.js";import{$o as o,Bq as FF,Fq as c,Nm as u,as as n,cs as N,em as l,gm as d,gq as e,uq as t}from"./chunk-h7aynn48.js";import{_s as r}from"./chunk-v0y3drpw.js";import{Du as S,Fu as WF}from"./chunk-5ec3m8hk.js";import G from"fs";import Z from"path";import{createHash as $F}from"crypto";WF();function g(J){return $F("sha256").update(J).digest("hex").slice(0,8)}function f(J=!1){let q=J?D():C(),z=g(q);return{content:q,filename:`runtime.${z}.js`,hash:z}}function m(){let J=S(),q=g(J);return{content:J,filename:`router.${q}.js`,hash:q}}function UF(J){return{runtimeTag:J.runtime?`<script src="/__stx/${J.runtime.filename}"></script>`:"",routerTag:J.router?`<script src="/__stx/${J.router.filename}"></script>`:"",cssTag:J.css?`<link rel="stylesheet" href="/__stx/${J.css.filename}">`:""}}import h from"path";import{createHash as GF}from"crypto";function VF(J={}){let q=new Set;return{context:new Proxy(J,{get(Q,X){if(X in Q)return Q[X];if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return},has(Q,X){if(X in Q)return!0;if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return!1}}),accessedKeys:q}}async function i(J,q,z={}){let Q=h.resolve(J),X=await Bun.file(Q).text(),I=GF("sha256").update(X).digest("hex").slice(0,16);l();let K={};try{K=await N()}catch{}let B=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(X))!==null){let $=k[1];if(/\bserver\b/.test($))B.push(k[2])}let W=new Set(B.flatMap(($)=>p($))),{context:E}=VF({__filename:Q,__dirname:h.dirname(Q),__stx_serverDeclared:W}),L=new Set,_={...n,...K,...z,buildMode:"compile",strict:!1},w=await c(X,E,Q,_,L),U=a(w),H=d();return{route:q,sourceFile:J,html:w,fragment:U,placeholders:H,hasServerScripts:B.length>0,serverScriptContent:B,dependencies:Array.from(L),contentHash:I,status:u(X),streamTemplates:E.__streamTemplates}}var kF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function s(J,q){let z=0,Q=0;if(!G.existsSync(J))return{copied:z,bytes:Q};G.mkdirSync(q,{recursive:!0});function X(I,K){let B=G.readdirSync(I,{withFileTypes:!0});for(let V of B){if(kF.has(V.name))continue;let k=Z.join(I,V.name),W=Z.join(K,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),X(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),z++,Q+=G.statSync(W).size}}}return X(J,q),{copied:z,bytes:Q}}async function lF(J={}){let q=Date.now(),z=Z.resolve(J.root||process.cwd()),Q=Z.resolve(z,J.outputDir||".output");console.log("[stx build] Starting production build...");let X={};try{X=await N()}catch{}let I=J.componentsDir??X.componentsDir??"components",K=J.partialsDir??X.partialsDir??"partials",B=J.layoutsDir??X.layoutsDir??"layouts",V=J.publicDir??X.publicDir??"public",k=X.app?.head||{},W=X.app?.colorMode,E=X.router?.container||"main";if(G.existsSync(Q))G.rmSync(Q,{recursive:!0});let L=[Z.join(Q,"public","__stx"),Z.join(Q,"public","assets"),Z.join(Q,"server","pages"),Z.join(Q,"server","fragments")];for(let Y of L)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let _=o(z),w=["components","layouts","partials"],U=_.filter((Y)=>{return!w.some((F)=>Y.pattern.startsWith(`/${F}/`)||Y.pattern===`/${F}`)});console.log(`[stx build] Found ${U.length} page routes (${_.length-U.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let H=f(J.debug),$=m();await Bun.write(Z.join(Q,"public","__stx",H.filename),H.content),await Bun.write(Z.join(Q,"public","__stx",$.filename),$.content),console.log(`[stx build] Runtime: ${H.filename} (${(H.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${$.filename} (${($.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let O=[],j=[];for(let Y of U)try{let F=await i(Y.filePath,Y.pattern,{componentsDir:I,partialsDir:K,layoutsDir:B,debug:J.debug});if(O.push(F),F.html=F.html.replace(/runtime\.__STX_HASH__\.js/g,H.filename).replace(/router\.__STX_HASH__\.js/g,$.filename),F.html=FF(F.html,k,{bodyScripts:[`<script src="/__stx/${$.filename}"></script>`],...W&&{colorMode:W}}),W)F.html=e(F.html,W);if(k.htmlAttrs)F.html=t(F.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(F.html)){let T=F.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(T&&T[1]){let P=T[1];F.html=F.html.replace(" "+P,""),F.html=F.html.replace(/<body([^>]*)>/,`<body$1 ${P}>`)}}F.html=F.html.replace(/<style data-crosswind="generated">[\s\S]*?<\/style>\s*/g,""),F.html=await r(F.html),F.fragment=JF(F.html,E);let y=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),b=Z.join("server","pages",`${y}.compiled.json`),A=Z.join("server","fragments",`${y}.html`);await Bun.write(Z.join(Q,b),JSON.stringify(F,null,2)),await Bun.write(Z.join(Q,A),F.fragment),j.push({pattern:Y.pattern,compiledPath:b,fragmentPath:A,isDynamic:F.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("[")}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(F){console.error(`[stx build] \u2717 ${Y.pattern}:`,F instanceof Error?F.message:F)}let M=Z.resolve(z,V);if(G.existsSync(M)){let{copied:Y,bytes:F}=s(M,Z.join(Q,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${V}/`)}let v=YF(z);if(v){let{copied:Y,bytes:F}=s(v,Z.join(Q,"public",XF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${QF}/`)}let R={runtime:H.filename,router:$.filename},zF=ZF(j,R,Q);qF(zF,Q);let x=Date.now()-q;return console.log(`
|
|
3
3
|
[stx build] Done in ${x}ms \u2014 ${O.length} pages compiled`),{pageCount:O.length,assets:R,outputDir:Q,duration:x}}
|
|
4
4
|
export{g as Hf,f as If,m as Jf,UF as Kf,i as Lf,lF as Mf};
|
|
@@ -891,7 +891,7 @@ NoDisplay=true`:""}
|
|
|
891
891
|
`;if(!h(G))nZ(G,{recursive:!0});aZ(J,F,"utf-8")}else if(h(J))oZ(J)}async function g6(Z){return h(sZ(Z))}async function b6(Z){let Y=tZ(Z);if(!h(Y))return!1;try{let $=f6(Y,"utf-8");if($.includes("X-GNOME-Autostart-enabled=false"))return!1;if($.includes("Hidden=true"))return!1;return!0}catch{return!1}}function u6(Z){return Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function m6(Z,Y={}){let $=iZ();switch($){case"darwin":return v6(Z,Y);case"linux":return y6(Z,Y);default:throw Error(`Auto-launch is not yet supported on ${$}`)}}async function h6(Z){let Y=Z||"StxApp";switch(iZ()){case"darwin":return g6(Y);case"linux":return b6(Y);default:return!1}}var B=new Map,c6=0,JZ=!1;function eZ(Z){let Y=Z.split("+").map((J)=>J.trim()),$={key:"",meta:!1,ctrl:!1,shift:!1,alt:!1};for(let J of Y){let G=J.toLowerCase();switch(G){case"cmd":case"command":case"meta":case"\u2318":$.meta=!0;break;case"ctrl":case"control":case"\u2303":$.ctrl=!0;break;case"shift":case"\u21E7":$.shift=!0;break;case"alt":case"option":case"opt":case"\u2325":$.alt=!0;break;case"cmdorctrl":case"commandorcontrol":if(typeof process<"u"&&process.platform==="darwin")$.meta=!0;else $.ctrl=!0;break;default:$.key=G}}return $}function p6(Z){let Y=[];if(Z.ctrl)Y.push("\u2303");if(Z.alt)Y.push("\u2325");if(Z.shift)Y.push("\u21E7");if(Z.meta)Y.push("\u2318");return Y.push(Z.key.toUpperCase()),Y.join("")}function l6(Z,Y){if(Y.meta!==Z.metaKey)return!1;if(Y.ctrl!==Z.ctrlKey)return!1;if(Y.shift!==Z.shiftKey)return!1;if(Y.alt!==Z.altKey)return!1;return Z.key.toLowerCase()===Y.key||Z.code.toLowerCase()===`key${Y.key}`}function Z4(Z){for(let[,Y]of B)if(l6(Z,Y.parsed)){Z.preventDefault(),Z.stopPropagation();try{Y.handler()}catch{}break}}function d6(){if(JZ)return;if(typeof document>"u")return;document.addEventListener("keydown",Z4,!0),JZ=!0}function LZ(){if(!JZ)return;if(typeof document>"u")return;document.removeEventListener("keydown",Z4,!0),JZ=!1}async function r6(Z,Y){if(typeof window>"u")return!1;let $=window.craft;if(!$?.hotkeys?.register)return!1;try{return await $.hotkeys.register(Z,Y),!0}catch{return!1}}async function WZ(Z){if(typeof window>"u")return;let Y=window.craft;if(!Y?.hotkeys?.unregister)return;try{await Y.hotkeys.unregister(Z)}catch{}}function n6(Z,Y){let $=`hotkey_${++c6}_${Date.now()}`,J=eZ(Z);B.set($,{shortcut:Z,handler:Y,parsed:J}),r6($,Z),d6();let G={shortcut:Z,id:$,unregister(){Y4(G)}};return G}function Y4(Z){if(B.delete(Z.id),WZ(Z.id),B.size===0)LZ()}function o6(){for(let[Z]of B)WZ(Z);B.clear(),LZ()}function a6(){return Array.from(B.entries()).map(([Z,Y])=>({shortcut:Y.shortcut,id:Z,unregister(){if(B.delete(Z),WZ(Z),B.size===0)LZ()}}))}class $4{_duration;_tickInterval;_remaining;_running=!1;_paused=!1;_complete=!1;_intervalId=null;_lastTick=0;_completionHandlers=new Set;_tickHandlers=new Set;constructor(Z){if(this._duration=Z.duration,this._tickInterval=Z.tickInterval||1000,this._remaining=Z.duration,Z.onComplete)this._completionHandlers.add(Z.onComplete);if(Z.onTick)this._tickHandlers.add(Z.onTick);if(Z.autoStart)this.start()}get isRunning(){return this._running&&!this._paused}get isPaused(){return this._paused}get isComplete(){return this._complete}get remaining(){if(this._running&&!this._paused){let Z=Date.now()-this._lastTick;return Math.max(0,this._remaining-Z)}return Math.max(0,this._remaining)}get elapsed(){return this._duration-this.remaining}get duration(){return this._duration}get progress(){if(this._duration===0)return 1;return Math.min(1,this.elapsed/this._duration)}start(){if(this._running)return;this._running=!0,this._paused=!1,this._complete=!1,this._lastTick=Date.now(),this._startInterval()}stop(){this._clearInterval(),this._running=!1,this._paused=!1,this._remaining=this._duration}pause(){if(!this._running||this._paused)return;let Z=Date.now()-this._lastTick;this._remaining=Math.max(0,this._remaining-Z),this._clearInterval(),this._paused=!0}resume(){if(!this._paused)return;this._paused=!1,this._lastTick=Date.now(),this._startInterval()}reset(){this._clearInterval(),this._running=!1,this._paused=!1,this._complete=!1,this._remaining=this._duration}onComplete(Z){return this._completionHandlers.add(Z),()=>{this._completionHandlers.delete(Z)}}onTick(Z){return this._tickHandlers.add(Z),()=>{this._tickHandlers.delete(Z)}}_startInterval(){this._clearInterval(),this._intervalId=setInterval(()=>{let Z=Date.now(),Y=Z-this._lastTick;this._lastTick=Z,this._remaining=Math.max(0,this._remaining-Y);for(let $ of this._tickHandlers)try{$(this._remaining)}catch{}if(this._remaining<=0){this._clearInterval(),this._running=!1,this._complete=!0;for(let $ of this._completionHandlers)try{$()}catch{}}},this._tickInterval)}_clearInterval(){if(this._intervalId!==null)clearInterval(this._intervalId),this._intervalId=null}}class J4{_interval;_handler;_immediate;_running=!1;_intervalId=null;constructor(Z){if(this._interval=Z.interval,this._handler=Z.handler,this._immediate=Z.immediate!==!1,this._immediate)this.start()}get isRunning(){return this._running}start(){if(this._running)return;this._running=!0,this._intervalId=setInterval(()=>{try{this._handler()}catch{}},this._interval)}stop(){if(this._intervalId!==null)clearInterval(this._intervalId),this._intervalId=null;this._running=!1}}function i6(Z){return new $4(Z)}function s6(Z){return new J4(Z)}function t6(Z){return new Promise((Y)=>setTimeout(Y,Z))}function e6(Z){let Y=Math.ceil(Z/1000),$=Math.floor(Y/3600),J=Math.floor(Y%3600/60),G=Y%60;if($>0)return`${$}:${String(J).padStart(2,"0")}:${String(G).padStart(2,"0")}`;return`${J}:${String(G).padStart(2,"0")}`}function Z8(Z){let Y=Math.ceil(Z/1000),$=Math.floor(Y/3600),J=Math.floor(Y%3600/60),G=Y%60;if($>0){if(J>0)return`${$}h ${J}m`;return`${$}h`}if(J>0){if(G>0)return`${J}m ${G}s`;return`${J}m`}return`${G}s`}function Q(Z){if(typeof window>"u")return!1;let Y=window.craft;return!!(Y&&Y[Z])}function M(Z){if(!Q(Z))throw Error(`craft.${Z} is not available \u2014 this API requires a Craft native window`);return window.craft[Z]}function P(Z,Y){if(typeof window>"u")return()=>{};let $=(J)=>Y(J.detail??{});return window.addEventListener(Z,$),()=>window.removeEventListener(Z,$)}var Y8={async writeText(Z){if(Q("clipboard")){await window.craft.clipboard.writeText(Z);return}if(typeof navigator<"u"&&navigator.clipboard)await navigator.clipboard.writeText(Z)},async readText(){if(Q("clipboard")){let Z=await window.craft.clipboard.readText();return typeof Z==="string"?Z:""}if(typeof navigator<"u"&&navigator.clipboard?.readText)try{return await navigator.clipboard.readText()}catch{return""}return""},async writeHTML(Z){if(Q("clipboard")){await window.craft.clipboard.writeHTML(Z);return}if(typeof navigator<"u"&&navigator.clipboard?.write)try{let Y=new window.ClipboardItem({"text/html":new Blob([Z],{type:"text/html"}),"text/plain":new Blob([$8(Z)],{type:"text/plain"})});await navigator.clipboard.write([Y])}catch{}},async readHTML(){if(Q("clipboard")){let Z=await window.craft.clipboard.readHTML();return typeof Z==="string"?Z:""}if(typeof navigator<"u"&&navigator.clipboard?.read)try{let Z=await navigator.clipboard.read();for(let Y of Z)if(Y.types.includes("text/html"))return await(await Y.getType("text/html")).text()}catch{}return""},async clear(){if(Q("clipboard")){await window.craft.clipboard.clear();return}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText("")}catch{}},async hasText(){if(Q("clipboard"))return await window.craft.clipboard.hasText();return(await this.readText()).length>0},async hasHTML(){if(Q("clipboard"))return await window.craft.clipboard.hasHTML();return(await this.readHTML()).length>0},async hasImage(){if(Q("clipboard"))return await window.craft.clipboard.hasImage();return!1}};function $8(Z){return Z.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/gi,"").replace(/<\/?(br|p|div|li|h[1-6])\b[^>]*>/gi,`
|
|
892
892
|
`).replace(/<[^>]+>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/\n{3,}/g,`
|
|
893
893
|
|
|
894
|
-
`).trim()}var J8={async show(Z){if(!Z.title)throw Error("notification title is required");if(Q("notifications")){await window.craft.notifications.show(Z);return}if(typeof window<"u"&&"Notification"in window){let Y=window.Notification;if(Y.permission==="granted")new Y(Z.title,{body:Z.body,icon:Z.icon});else if(Y.permission==="default"){if(await Y.requestPermission()==="granted")new Y(Z.title,{body:Z.body,icon:Z.icon})}}},async schedule(Z){if(Q("notifications")){let J={...Z};if(J.triggerAt instanceof Date)J.triggerAt=J.triggerAt.toISOString();await window.craft.notifications.schedule(J);return}let Y=Q8(Z.triggerAt),$=Math.max(0,Y-Date.now());setTimeout(()=>{this.show(Z).catch(()=>{})},$)},async cancel(Z){if(Q("notifications"))await window.craft.notifications.cancel(Z)},async cancelAll(){if(Q("notifications"))await window.craft.notifications.cancelAll()},async setBadge(Z){let Y=Math.max(0,Math.round(Number.isFinite(Z)?Z:0));if(Q("notifications")){await window.craft.notifications.setBadge(Y);return}if(typeof navigator<"u"&&navigator.setAppBadge)try{await navigator.setAppBadge(Y)}catch{}},async clearBadge(){if(Q("notifications")){await window.craft.notifications.clearBadge();return}if(typeof navigator<"u"&&navigator.clearAppBadge)try{await navigator.clearAppBadge()}catch{}},async requestPermission(){if(Q("notifications"))return await window.craft.notifications.requestPermission();if(typeof window<"u"&&"Notification"in window){let Z=window.Notification;if(Z.permission==="granted")return!0;if(Z.permission==="denied")return!1;return await Z.requestPermission()==="granted"}return!1},async registerCategories(Z){if(!Array.isArray(Z)||Z.length===0)return;if(Q("notifications")){let Y=window.craft.notifications.registerCategories;if(typeof Y==="function")await Y(Z)}},onActionClicked(Z){return P("craft:notification:actionClicked",Z)},onReply(Z){return P("craft:notification:reply",Z)}};function Q8(Z){if(Z==null)return Date.now();if(Z instanceof Date)return Z.getTime();if(typeof Z==="number")return Z;let Y=Date.parse(Z);return Number.isNaN(Y)?Date.now():Y}var G8={async readFile(Z){let Y=await M("fs").readFile(Z);return Y&&Y.data||""},async readBuffer(Z){let Y=await M("fs").readFile(Z),$=Y&&Y.data||"";if(Y&&Y.base64===!0)return z8($);return new TextEncoder().encode($)},async writeFile(Z,Y){await M("fs").writeFile(Z,Y)},async writeBuffer(Z,Y){let $=X8(Y),J=M("fs");if(typeof J.writeFileBytes==="function")await J.writeFileBytes(Z,$);else await J.writeFile(Z,$)},async copy(Z,Y){if(Z===Y)throw Error("fs.copy: source and destination must differ");await M("fs").copy(Z,Y)},async move(Z,Y){if(Z===Y)throw Error("fs.move: source and destination must differ");await M("fs").move(Z,Y)},async appendFile(Z,Y){await M("fs").appendFile(Z,Y)},async deleteFile(Z){await M("fs").deleteFile(Z)},async exists(Z){return await M("fs").exists(Z)},async stat(Z){return F8(await M("fs").stat(Z))},async readDir(Z){let Y=await M("fs").readDir(Z),$=Y&&Y.entries||[],J=Z.endsWith("/")?Z.slice(0,-1):Z;return $.map((G)=>({name:G.name,path:`${J}/${G.name}`,isDirectory:!!G.isDirectory}))},async mkdir(Z,Y){await M("fs").mkdir(Z,Y)},async rmdir(Z,Y){await M("fs").rmdir(Z,Y)},async watch(Z,Y){await M("fs").watch(Z,Y)},async unwatch(Z){await M("fs").unwatch(Z)},onChange(Z){return P("craft:fs:change",Z)},async watchTree(Z,Y,$){let J=`watch-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,G=M("fs");await G.watch(Z,J,{recursive:!!Y.recursive});let X=Y.kinds&&Y.kinds.length>0?new Set(Y.kinds):null,R=Math.max(0,Math.floor(Y.coalesceMs??0)),z=[],F=null,K=!1,j=()=>{if(F=null,z.length===0)return;let O=z;z=[];try{$(O)}catch{}},V=P("craft:fs:change",(O)=>{if(K)return;if(O.id!==J)return;if(X&&O.kind&&!X.has(O.kind))return;if(z.push(O),R===0){j();return}if(F==null)F=setTimeout(j,R)});return{id:J,async stop(){if(K)return;if(K=!0,V(),F)clearTimeout(F),F=null;if(z.length>0)j();try{await G.unwatch(J)}catch{}}}},async homeDir(){return await M("fs").homeDir()},async tempDir(){return await M("fs").tempDir()},async appDataDir(){return await M("fs").appDataDir()}};function X8(Z){let Y="";for(let $=0;$<Z.length;$++)Y+=String.fromCharCode(Z[$]);return typeof btoa==="function"?btoa(Y):Buffer.from(Z).toString("base64")}function z8(Z){let Y=typeof atob==="function"?atob(Z):Buffer.from(Z,"base64").toString("binary"),$=new Uint8Array(Y.length);for(let J=0;J<Y.length;J++)$[J]=Y.charCodeAt(J);return $}function F8(Z){return{isFile:!!Z.isFile,isDirectory:!!Z.isDirectory,isSymlink:!!Z.isSymlink,size:Number(Z.size)||0,modifiedAt:Z.modifiedAt!=null?Z.modifiedAt<1000000000000?Z.modifiedAt*1000:Z.modifiedAt:0}}var r=new Set,Q4=!1;function R8(){if(Q4)return;if(typeof window>"u"||typeof window.addEventListener!=="function")return;window.addEventListener("craft:shell:exit",(Z)=>{let Y=Z.detail;if(Y?.id)r.delete(Y.id)}),Q4=!0}var K8=new Set(["javascript:","data:","file:","vbscript:"]),O8={async openExternal(Z){let Y=Z.trim().toLowerCase();for(let $ of K8)if(Y.startsWith($))throw Error(`shell.openExternal: ${$} URLs are blocked for safety`);if(Q("shell")){await window.craft.shell.openExternal(Z);return}if(typeof window<"u"&&typeof window.open==="function")window.open(Z,"_blank","noopener,noreferrer")},async openPath(Z){await M("shell").openPath(Z)},async showInFinder(Z){await M("shell").showInFinder(Z)},async spawn(Z,Y,$=[],J={}){if(R8(),!Z||typeof Z!=="string")throw Error("shell.spawn: id must be a non-empty string");if(!Y||typeof Y!=="string")throw Error("shell.spawn: command must be a non-empty string");if(!Array.isArray($))throw Error("shell.spawn: args must be an array");for(let G of $)if(typeof G!=="string")throw Error("shell.spawn: args entries must be strings");if(r.has(Z))throw Error(`shell.spawn: id "${Z}" is already in use \u2014 call kill(id) first or pick a different id`);r.add(Z);try{await M("shell").spawn(Z,Y,$,J)}catch(G){throw r.delete(Z),G}},async kill(Z){await M("shell").kill(Z),r.delete(Z)},async getEnv(Z){if(Q("shell")){let Y=await window.craft.shell.getEnv(Z);return Y==null?void 0:String(Y)}return},async setEnv(Z,Y){await M("shell").setEnv(Z,Y)},onStdout(Z){return P("craft:shell:stdout",Z)},onStderr(Z){return P("craft:shell:stderr",Z)},onExit(Z){return P("craft:shell:exit",Z)}};var j8={async register(Z,Y,$){if(!Q("shortcuts"))return;await window.craft.shortcuts.register(Z,Y,$)},async unregister(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.unregister(Z)},async unregisterAll(){if(!Q("shortcuts"))return;await window.craft.shortcuts.unregisterAll()},async enable(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.enable(Z)},async disable(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.disable(Z)},async isRegistered(Z){if(!Q("shortcuts"))return!1;return await window.craft.shortcuts.isRegistered(Z)},async list(){if(!Q("shortcuts"))return[];return await window.craft.shortcuts.list()},on(Z){return P("craft:shortcut",Z)}};var V8={get(){if(Q("theme"))try{return window.craft.theme.get()}catch{}return{appearance:q8()}},onChange(Z){if(Z(this.get()),Q("theme"))return P("craft:theme",Z);if(typeof window<"u"&&window.matchMedia){let Y=window.matchMedia("(prefers-color-scheme: dark)"),$=()=>Z({appearance:Y.matches?"dark":"light"});return Y.addEventListener("change",$),()=>Y.removeEventListener("change",$)}return()=>{}},async current(){return this.get()}};function q8(){if(typeof window>"u"||!window.matchMedia)return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}async function P8(Z,Y={}){if(!Q("dragOut"))throw Error("dragOut requires a Craft native window");let $=Array.isArray(Z)?Z:[Z];if($.length===0)throw Error("dragOut: at least one path required");await window.craft.dragOut.start($,Y)}function U8(){return Q("dragOut")}var L8={onUrl(Z){if(!Q("deepLink"))return()=>{};return P("craft:deepLink",Z)},getInitialUrl(){if(typeof window>"u")return null;if(Q("deepLink"))try{return window.craft.deepLink.getInitialUrl()}catch{return null}return window.__craftPendingDeepLink||null},consumeInitialUrl(){let Z=this.getInitialUrl();if(typeof window<"u")window.__craftPendingDeepLink=void 0;return Z},isAvailable(){return Q("deepLink")}};var W8={async isCharging(){if(Q("power"))return await window.craft.power.isCharging();let Z=await QZ();return Z?!!Z.charging:!1},async isPluggedIn(){if(Q("power"))return await window.craft.power.isPluggedIn();let Z=await QZ();return Z?!!Z.charging||Z.level>=0.999:!1},async isLowPowerMode(){if(Q("power"))return await window.craft.power.isLowPowerMode();return!1},async level(){if(Q("power")){let Y=await window.craft.power.batteryLevel();return typeof Y==="number"?Y:null}let Z=await QZ();return Z?Z.level:null},async timeRemaining(){if(Q("power")){let $=await window.craft.power.timeRemaining();return typeof $==="number"?$:null}let Z=await QZ();if(!Z)return null;let Y=Z.charging?Z.chargingTime:Z.dischargingTime;return Number.isFinite(Y)?Math.round(Y/60):null},async thermalState(){if(Q("power"))return await window.craft.power.thermalState()||"unknown";return"unknown"},async uptimeSeconds(){if(Q("power"))return await window.craft.power.uptimeSeconds();if(typeof performance<"u"&&typeof performance.now==="function")return Math.round(performance.now()/1000);return 0},async preventSleep(Z="app is busy"){if(Q("power")){await window.craft.power.preventSleep(Z);return}if(typeof navigator>"u"||!navigator.wakeLock)return;let Y=window;if(Y.__craftWebWakeLock?.release){try{await Y.__craftWebWakeLock.release()}catch{}Y.__craftWebWakeLock=null}try{let $=await navigator.wakeLock.request("screen");Y.__craftWebWakeLock=$}catch{}},async allowSleep(){if(Q("power")){await window.craft.power.allowSleep();return}let Z=window.__craftWebWakeLock;if(Z&&typeof Z.release==="function"){try{await Z.release()}catch{}window.__craftWebWakeLock=null}},onSleep(Z){return P("craft:powerSleep",Z)},onWake(Z){return P("craft:powerWake",Z)}};async function QZ(){if(typeof navigator>"u")return null;let Z=navigator;if(typeof Z.getBattery!=="function")return null;try{return await Z.getBattery()}catch{return null}}var D8={async connectionType(){if(Q("network"))return await window.craft.network.connectionType();return G4()},async wifiSSID(){if(Q("network"))return await window.craft.network.wifiSSID()||void 0;return},async wifiSignalStrength(){if(Q("network")){let Z=await window.craft.network.wifiSignalStrength();return typeof Z==="number"?Z:void 0}return},async ipAddress(){if(Q("network"))return await window.craft.network.ipAddress();return""},async macAddress(){if(Q("network"))return await window.craft.network.macAddress();return""},async interfaces(){if(Q("network"))return await window.craft.network.interfaces();return[]},async isVPNConnected(){if(Q("network"))return await window.craft.network.isVPNConnected();return!1},async proxySettings(){if(Q("network"))return await window.craft.network.proxySettings()||{};return{}},async openPreferences(){if(Q("network"))await window.craft.network.openPreferences()},onChange(Z){if(Q("network"))return P("craft:networkChange",Z);if(typeof window>"u")return()=>{};let Y=()=>Z({type:G4(),online:!0}),$=()=>Z({type:"none",online:!1});return window.addEventListener("online",Y),window.addEventListener("offline",$),()=>{window.removeEventListener("online",Y),window.removeEventListener("offline",$)}}};function G4(){if(typeof navigator>"u")return"unknown";if(navigator.onLine===!1)return"none";let Z=navigator.connection;if(!Z)return"unknown";let Y=String(Z.type||Z.effectiveType||"unknown").toLowerCase();if(Y==="wifi"||Y==="cellular"||Y==="ethernet"||Y==="bluetooth"||Y==="none")return Y;return"unknown"}var M8={async checkForUpdates(){if(!Q("updater"))return;await window.craft.updater.checkForUpdates()},async checkInBackground(){if(!Q("updater"))return;await window.craft.updater.checkInBackground()},async setAutomaticChecks(Z){if(!Q("updater"))return;await window.craft.updater.setAutomaticChecks(Z)},async setCheckInterval(Z){if(!Q("updater"))return;if(!Number.isFinite(Z))throw Error("setCheckInterval: must be a finite number");let Y=Z<=0?0:Math.max(60,Math.round(Z));await window.craft.updater.setCheckInterval(Y)},async setFeedURL(Z){if(!Q("updater"))return;await window.craft.updater.setFeedURL(Z)},async getLastUpdateCheckDate(){if(!Q("updater"))return null;return await window.craft.updater.getLastUpdateCheckDate()||null},async getUpdateInfo(){if(!Q("updater"))return null;let Z=await window.craft.updater.getUpdateInfo();if(!Z||typeof Z.version!=="string"||Z.version.length===0)return null;return Z},onAvailable(Z){return P("craft:updateAvailable",Z)},onDownloaded(Z){return P("craft:updateDownloaded",Z)},async verifySignature({payload:Z,signatureB64:Y,publicKeyB64:$}){let J=X4(Z),G;try{G=await crypto.subtle.importKey("raw",GZ($),{name:"Ed25519"},!1,["verify"])}catch{return!1}try{return await crypto.subtle.verify("Ed25519",G,GZ(Y),J)}catch{return!1}},async verifyDownload({url:Z,signatureB64:Y,publicKeyB64:$,fetchInit:J}){let G;try{G=await fetch(Z,J)}catch{return{ok:!1,reason:"fetch-failed"}}if(!G.ok)return{ok:!1,reason:"http-error",status:G.status};let X=new Uint8Array(await G.arrayBuffer()),R;try{R=await crypto.subtle.importKey("raw",GZ($),{name:"Ed25519"},!1,["verify"])}catch{return{ok:!1,reason:"bad-key"}}let z=!1;try{z=await crypto.subtle.verify("Ed25519",R,GZ(Y),X4(X))}catch{z=!1}if(!z)return{ok:!1,reason:"bad-signature"};return{ok:!0,payload:X}}};function X4(Z){if(Z instanceof ArrayBuffer)return new Uint8Array(Z);let Y=new ArrayBuffer(Z.byteLength),$=new Uint8Array(Y);return $.set(Z),$}function GZ(Z){if(typeof atob==="function"){let J=atob(Z),G=new ArrayBuffer(J.length),X=new Uint8Array(G);for(let R=0;R<J.length;R++)X[R]=J.charCodeAt(R);return X}let Y=Buffer.from(Z,"base64"),$=new ArrayBuffer(Y.length);return new Uint8Array($).set(Y),new Uint8Array($)}var T8={onFocus(Z){if(Q("window"))return P("craft:window:focus",()=>Z());return DZ("focus",Z)},onBlur(Z){if(Q("window"))return P("craft:window:blur",()=>Z());return DZ("blur",Z)},onResize(Z){if(Q("window"))return P("craft:window:resize",Z);if(typeof window>"u")return()=>{};let Y=()=>Z({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},onMove(Z){if(Q("window"))return P("craft:window:move",Z);return()=>{}},onClose(Z){if(Q("window"))return P("craft:window:close",()=>Z());return DZ("beforeunload",Z)},onMinimize(Z){if(Q("window"))return P("craft:window:minimize",()=>Z());if(typeof document>"u")return()=>{};let Y=()=>{if(document.visibilityState==="hidden")Z()};return document.addEventListener("visibilitychange",Y),()=>document.removeEventListener("visibilitychange",Y)},onRestore(Z){if(Q("window"))return P("craft:window:restore",()=>Z());if(typeof document>"u")return()=>{};let Y=()=>{if(document.visibilityState==="visible")Z()};return document.addEventListener("visibilitychange",Y),()=>document.removeEventListener("visibilitychange",Y)}};function DZ(Z,Y){if(typeof window>"u")return()=>{};let $=()=>Y();return window.addEventListener(Z,$),()=>window.removeEventListener(Z,$)}var z4={name:"",version:"0.0.0"},_8={async hideDockIcon(){if(Q("app"))await window.craft.app.hideDockIcon()},async showDockIcon(){if(Q("app"))await window.craft.app.showDockIcon()},async quit(){if(Q("app"))await window.craft.app.quit()},async getInfo(){if(!Q("app"))return z4;let Z=await window.craft.app.getInfo();return{...z4,...Z||{}}},async notify(Z){if(!Z.title)throw Error("notify: title is required");if(Q("app"))await window.craft.app.notify(Z)},async setBadge(Z){if(Q("app"))await window.craft.app.setBadge(Z)},async bounce(Z="informational"){if(Q("app"))await window.craft.app.bounce(Z)}};var N8={app(Z){return{label:Z,items:[{label:`About ${Z}`,role:"about"},{separator:!0},{label:`Hide ${Z}`,role:"hide",shortcut:"cmd+h"},{label:"Hide Others",role:"hideOthers",shortcut:"cmd+alt+h"},{label:"Show All",role:"showAll"},{separator:!0},{label:`Quit ${Z}`,role:"quit",shortcut:"cmd+q"}]}},edit(){return{label:"Edit",items:[{label:"Undo",role:"undo",shortcut:"cmd+z"},{label:"Redo",role:"redo",shortcut:"cmd+shift+z"},{separator:!0},{label:"Cut",role:"cut",shortcut:"cmd+x"},{label:"Copy",role:"copy",shortcut:"cmd+c"},{label:"Paste",role:"paste",shortcut:"cmd+v"},{label:"Select All",role:"selectAll",shortcut:"cmd+a"}]}},window(){return{label:"Window",items:[{label:"Minimize",role:"minimize",shortcut:"cmd+m"},{label:"Zoom",role:"zoom"},{separator:!0},{label:"Close Window",role:"close",shortcut:"cmd+w"}]}},leading(Z){return[this.app(Z),this.edit()]}},E8=0;function A8(Z){let Y=new Map;return{payload:{menus:Z.menus.map((J)=>({label:J.label,items:J.items.map((G)=>{let{onClick:X,...R}=G;if(!X)return R;let z=R.id??`stx.menu.${E8++}`;return Y.set(z,X),{...R,id:z}})}))},handlers:Y}}var F4=null,k8={async set(Z){if(!Q("menu"))return!1;let{payload:Y,handlers:$}=A8(Z);return F4?.(),F4=$.size>0?P("craft:menu:action",(J)=>{$.get(J.id)?.()}):null,await window.craft.menu.set(Y),!0},async setDock(Z){if(Q("menu"))await window.craft.menu.setDock(Z)},async addItem(Z,Y){if(Q("menu"))await window.craft.menu.addItem(Z,Y)},async removeItem(Z){if(Q("menu"))await window.craft.menu.removeItem(Z)},async enableItem(Z){if(Q("menu"))await window.craft.menu.enableItem(Z)},async disableItem(Z){if(Q("menu"))await window.craft.menu.disableItem(Z)},async checkItem(Z){if(Q("menu"))await window.craft.menu.checkItem(Z)},async uncheckItem(Z){if(Q("menu"))await window.craft.menu.uncheckItem(Z)},async setItemLabel(Z,Y){if(Q("menu"))await window.craft.menu.setItemLabel(Z,Y)},async clearDock(){if(Q("menu"))await window.craft.menu.clearDock()},onAction(Z){return P("craft:menu:action",Z)}};function R4(Z){if(Z.separator)return{id:Z.id||"",title:"",type:"separator"};return{id:Z.id||"",title:Z.title||"",icon:Z.icon,shortcut:Z.shortcut,enabled:Z.disabled?!1:void 0,submenu:Z.submenu?.map(R4)}}var H8={available(){return Q("nativeUI")},async show(Z){if(!Z.items||Z.items.length===0)throw Error("contextMenu.show requires at least one item");if(!Q("nativeUI"))return!1;return await window.craft.nativeUI.showContextMenu({targetId:Z.targetId||"",targetType:"general",x:Math.round(Z.x),y:Math.round(Z.y),items:Z.items.map(R4)}),!0},onAction(Z){return P("craft:menu:action",Z)}};var x8={accentColor:()=>x("system","accentColor",()=>""),highlightColor:()=>x("system","highlightColor",()=>""),language:()=>x("system","language",()=>{if(typeof navigator>"u")return"";return navigator.language?.split("-")[0]||""}),locale:()=>x("system","locale",()=>{if(typeof navigator>"u")return"";return navigator.language||""}),timezone:()=>x("system","timezone",()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch{return""}}),is24HourTime:()=>x("system","is24HourTime",()=>{try{let Z=new Intl.DateTimeFormat([],{hour:"numeric"}).resolvedOptions();return Z.hourCycle==="h23"||Z.hourCycle==="h24"}catch{return!1}}),reduceMotion:()=>x("system","reduceMotion",()=>MZ("(prefers-reduced-motion: reduce)")),reduceTransparency:()=>x("system","reduceTransparency",()=>MZ("(prefers-reduced-transparency: reduce)")),increaseContrast:()=>x("system","increaseContrast",()=>MZ("(prefers-contrast: more)")),systemVersion:()=>x("system","systemVersion",()=>""),hostname:()=>x("system","hostname",()=>""),username:()=>x("system","username",()=>""),async openPreferences(){if(Q("system"))await window.craft.system.openPreferences()}};async function x(Z,Y,$){if(Q(Z))return await window.craft[Z][Y]();return await $()}function MZ(Z){if(typeof window>"u"||!window.matchMedia)return!1;return window.matchMedia(Z).matches}var C8={async getDisplays(){if(Q("screen"))return await window.craft.screen.getDisplays();return K4()},async getPrimary(){if(Q("screen")){let Z=await window.craft.screen.getPrimary();return Z&&typeof Z.width==="number"?Z:null}return K4()[0]??null},onChange(Z){if(Q("screen"))return P("craft:screen:change",()=>Z());if(typeof window>"u")return()=>{};let Y=()=>Z();return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)}};function K4(){if(typeof window>"u"||!window.screen)return[];let Z=window.screen;return[{id:0,x:Z.left??0,y:Z.top??0,width:Z.width||0,height:Z.height||0,workX:Z.availLeft??0,workY:Z.availTop??0,workWidth:Z.availWidth??Z.width??0,workHeight:Z.availHeight??Z.height??0,scaleFactor:window.devicePixelRatio||1}]}var I8={async set(Z,Y,$){if(!Z)throw Error("keychain.set: service is required");if(!Y)throw Error("keychain.set: account is required");await M("keychain").set(Z,Y,$)},async get(Z,Y){if(!Z)throw Error("keychain.get: service is required");if(!Y)throw Error("keychain.get: account is required");let $=await M("keychain").get(Z,Y);return typeof $==="string"?$:null},async delete(Z,Y){if(!Z)throw Error("keychain.delete: service is required");if(!Y)throw Error("keychain.delete: account is required");await M("keychain").delete(Z,Y)},async has(Z,Y){if(!Z)throw Error("keychain.has: service is required");if(!Y)throw Error("keychain.has: account is required");return await M("keychain").has(Z,Y)}};var S8={async check(Z){if(Q("permissions"))return await window.craft.permissions.check(Z);return await O4(Z)},async request(Z){if(Q("permissions"))return await window.craft.permissions.request(Z);return await w8(Z)},async openSettings(Z){if(Q("permissions"))await window.craft.permissions.openSettings(Z)}};async function O4(Z){if(typeof navigator>"u"||!navigator.permissions?.query)return"not-supported";try{let Y=await navigator.permissions.query({name:Z});return B8(Y.state)}catch{return"not-supported"}}async function w8(Z){if(Z==="notifications"&&typeof window<"u"&&"Notification"in window){let Y=await window.Notification.requestPermission();return Y==="granted"?"granted":Y==="denied"?"denied":"undetermined"}return await O4(Z)}function B8(Z){if(Z==="granted")return"granted";if(Z==="denied")return"denied";if(Z==="prompt")return"undetermined";return"undetermined"}var f8={async print(){if(Q("printing")){await window.craft.printing.print();return}if(typeof window<"u"&&typeof window.print==="function")window.print()},async printToPDF(Z){if(!Z)throw Error("printToPDF: path is required");let Y=Z.startsWith("/"),$=/^[a-zA-Z]:[\\/]/.test(Z)||Z.startsWith("\\\\");if(!Y&&!$)throw Error("printToPDF: path must be absolute");let J=await M("printing").printToPDF(Z);return{ok:!!(J&&J.ok),path:J?.path}}};var v8={async enable(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.enable()},async disable(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.disable()},async isEnabled(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.isEnabled()}};var y8={async addItem(Z){if(Q("touchbar"))await window.craft.touchbar.addItem(Z)},async removeItem(Z){if(Q("touchbar"))await window.craft.touchbar.removeItem(Z)},async updateItem(Z,Y){if(Q("touchbar"))await window.craft.touchbar.updateItem(Z,Y)},async setLabel(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setLabel(Z,Y)},async setIcon(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setIcon(Z,Y)},async setEnabled(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setEnabled(Z,Y)},async setSliderValue(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setSliderValue(Z,Y)},async clear(){if(Q("touchbar"))await window.craft.touchbar.clear()},async show(){if(Q("touchbar"))await window.craft.touchbar.show()},async hide(){if(Q("touchbar"))await window.craft.touchbar.hide()},onAction(Z){return P("craft:touchbar:action",Z)}};var g8=/^[\da-f]*$/i;function b8(Z,Y){if(typeof Y!=="string"||!g8.test(Y)||Y.length%2!==0)throw Error(`${Z}: must be a hex string with even length, got ${JSON.stringify(Y)}`)}var u8={async isEnabled(){return Q("bluetooth")?await window.craft.bluetooth.isEnabled():!1},async powerState(){return Q("bluetooth")?await window.craft.bluetooth.powerState():"unknown"},async connectedDevices(){return Q("bluetooth")?await window.craft.bluetooth.connectedDevices():[]},async pairedDevices(){return Q("bluetooth")?await window.craft.bluetooth.pairedDevices():[]},async startDiscovery(){if(Q("bluetooth"))await window.craft.bluetooth.startDiscovery()},async stopDiscovery(){if(Q("bluetooth"))await window.craft.bluetooth.stopDiscovery()},async isDiscovering(){return Q("bluetooth")?await window.craft.bluetooth.isDiscovering():!1},async connect(Z){if(Q("bluetooth"))await window.craft.bluetooth.connect(Z)},async disconnect(Z){if(Q("bluetooth"))await window.craft.bluetooth.disconnect(Z)},async openPreferences(){if(Q("bluetooth"))await window.craft.bluetooth.openPreferences()},async discoverServices(Z){if(!Z)throw Error("bluetooth.discoverServices: deviceId is required");if(!Q("bluetooth"))return[];let Y=await window.craft.bluetooth.discoverServices(Z);return Array.isArray(Y)?Y:[]},async discoverCharacteristics(Z,Y){if(!Z||!Y)throw Error("bluetooth.discoverCharacteristics: deviceId and serviceUuid are required");if(!Q("bluetooth"))return[];let $=await window.craft.bluetooth.discoverCharacteristics(Z,Y);return Array.isArray($)?$:[]},async readCharacteristic(Z,Y,$){if(!Z||!Y||!$)throw Error("bluetooth.readCharacteristic: deviceId, serviceUuid, characteristicUuid are required");if(!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.readCharacteristic(Z,Y,$)},async writeCharacteristic(Z,Y,$,J,G="with-response"){if(!Z||!Y||!$)throw Error("bluetooth.writeCharacteristic: deviceId, serviceUuid, characteristicUuid are required");if(b8("bluetooth.writeCharacteristic.valueHex",J),!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.writeCharacteristic(Z,Y,$,J,G)},async setCharacteristicNotify(Z,Y,$,J){if(!Z||!Y||!$)throw Error("bluetooth.setCharacteristicNotify: deviceId, serviceUuid, characteristicUuid are required");if(!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.setCharacteristicNotify(Z,Y,$,J)},onDeviceFound(Z){return P("craft:bluetooth:deviceFound",Z)},onDeviceConnected(Z){return P("craft:bluetooth:deviceConnected",Z)},onDeviceDisconnected(Z){return P("craft:bluetooth:deviceDisconnected",Z)},onCharacteristicValue(Z){return P("craft:bluetooth:characteristicValue",Z)}};var m8={async speak(Z,Y){if(!Z)throw Error("speech.speak: text is required");if(Q("speech")){await window.craft.speech.speak(Z,Y);return}if(typeof window<"u"&&window.speechSynthesis){let $=new window.SpeechSynthesisUtterance(Z);if(Y){if(Y.rate!=null)$.rate=Y.rate;if(Y.pitch!=null)$.pitch=Y.pitch;if(Y.volume!=null)$.volume=Y.volume;if(Y.voice){let G=window.speechSynthesis.getVoices().find((X)=>X.voiceURI===Y.voice||X.name===Y.voice||X.lang===Y.voice);if(G)$.voice=G}}window.speechSynthesis.speak($)}},async stop(){if(Q("speech")){await window.craft.speech.stop();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.cancel()},async pause(){if(Q("speech")){await window.craft.speech.pause();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.pause()},async resume(){if(Q("speech")){await window.craft.speech.resume();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.resume()},async isSpeaking(){if(Q("speech"))return await window.craft.speech.isSpeaking();if(typeof window<"u"&&window.speechSynthesis)return!!window.speechSynthesis.speaking;return!1},async getVoices(){if(Q("speech"))return await window.craft.speech.getVoices();if(typeof window<"u"&&window.speechSynthesis)return window.speechSynthesis.getVoices().map((Y)=>({id:Y.voiceURI||Y.name,name:Y.name,language:Y.lang||"",quality:"default"}));return[]}};var n=[],TZ=!0,_Z,NZ,o={async report(Z){if(Q("crashReporter")){await window.craft.crashReporter.report(Z);return}if(!TZ)return;let Y=Z instanceof Error?{timestamp:Date.now(),severity:"error",message:Z.message,source:"js",stack:Z.stack||"",userId:_Z,appVersion:NZ}:{timestamp:Date.now(),severity:Z.severity||"error",message:Z.message||"",source:Z.source||"js",stack:Z.stack||"",userId:_Z,appVersion:NZ};if(n.length>=64)n.shift();n.push(Y)},async flush(){if(Q("crashReporter"))return await window.craft.crashReporter.flush();return[...n]},async clear(){if(Q("crashReporter")){await window.craft.crashReporter.clear();return}n.length=0},async setEnabled(Z){if(Q("crashReporter")){await window.craft.crashReporter.setEnabled(Z);return}TZ=Z},async isEnabled(){if(Q("crashReporter"))return await window.craft.crashReporter.isEnabled();return TZ},async setUser(Z){if(Q("crashReporter")){await window.craft.crashReporter.setUser(Z);return}_Z=Z||void 0},async setAppVersion(Z){if(Q("crashReporter")){await window.craft.crashReporter.setAppVersion(Z);return}NZ=Z||void 0},attachGlobalHandlers(){if(Q("crashReporter")&&window.craft.crashReporter.attachGlobalHandlers)return window.craft.crashReporter.attachGlobalHandlers();if(typeof window>"u")return()=>{};let Z=($)=>{o.report({severity:"error",message:$.message,source:"js",stack:$.error?.stack||`${$.message}
|
|
894
|
+
`).trim()}var J8={async show(Z){if(!Z.title)throw Error("notification title is required");if(Q("notifications")){await window.craft.notifications.show(Z);return}if(typeof window<"u"&&"Notification"in window){let Y=window.Notification;if(Y.permission==="granted")new Y(Z.title,{body:Z.body,icon:Z.icon});else if(Y.permission==="default"){if(await Y.requestPermission()==="granted")new Y(Z.title,{body:Z.body,icon:Z.icon})}}},async schedule(Z){if(Q("notifications")){let J={...Z};if(J.triggerAt instanceof Date)J.triggerAt=J.triggerAt.toISOString();await window.craft.notifications.schedule(J);return}let Y=Q8(Z.triggerAt),$=Math.max(0,Y-Date.now());setTimeout(()=>{this.show(Z).catch(()=>{})},$)},async cancel(Z){if(Q("notifications"))await window.craft.notifications.cancel(Z)},async cancelAll(){if(Q("notifications"))await window.craft.notifications.cancelAll()},async setBadge(Z){let Y=Math.max(0,Math.round(Number.isFinite(Z)?Z:0));if(Q("notifications")){await window.craft.notifications.setBadge(Y);return}if(typeof navigator<"u"&&navigator.setAppBadge)try{await navigator.setAppBadge(Y)}catch{}},async clearBadge(){if(Q("notifications")){await window.craft.notifications.clearBadge();return}if(typeof navigator<"u"&&navigator.clearAppBadge)try{await navigator.clearAppBadge()}catch{}},async requestPermission(){if(Q("notifications"))return await window.craft.notifications.requestPermission();if(typeof window<"u"&&"Notification"in window){let Z=window.Notification;if(Z.permission==="granted")return!0;if(Z.permission==="denied")return!1;return await Z.requestPermission()==="granted"}return!1},async registerCategories(Z){if(!Array.isArray(Z)||Z.length===0)return;if(Q("notifications")){let Y=window.craft.notifications.registerCategories;if(typeof Y==="function")await Y(Z)}},onActionClicked(Z){return P("craft:notification:actionClicked",Z)},onReply(Z){return P("craft:notification:reply",Z)}};function Q8(Z){if(Z==null)return Date.now();if(Z instanceof Date)return Z.getTime();if(typeof Z==="number")return Z;let Y=Date.parse(Z);return Number.isNaN(Y)?Date.now():Y}var G8={async readFile(Z){let Y=await M("fs").readFile(Z);return Y&&Y.data||""},async readBuffer(Z){let Y=await M("fs").readFile(Z),$=Y&&Y.data||"";if(Y&&Y.base64===!0)return z8($);return new TextEncoder().encode($)},async writeFile(Z,Y){await M("fs").writeFile(Z,Y)},async writeBuffer(Z,Y){let $=X8(Y),J=M("fs");if(typeof J.writeFileBytes==="function")await J.writeFileBytes(Z,$);else await J.writeFile(Z,$)},async copy(Z,Y){if(Z===Y)throw Error("fs.copy: source and destination must differ");await M("fs").copy(Z,Y)},async move(Z,Y){if(Z===Y)throw Error("fs.move: source and destination must differ");await M("fs").move(Z,Y)},async appendFile(Z,Y){await M("fs").appendFile(Z,Y)},async deleteFile(Z){await M("fs").deleteFile(Z)},async exists(Z){return await M("fs").exists(Z)},async stat(Z){return F8(await M("fs").stat(Z))},async readDir(Z){let Y=await M("fs").readDir(Z),$=Y&&Y.entries||[],J=Z.endsWith("/")?Z.slice(0,-1):Z;return $.map((G)=>({name:G.name,path:`${J}/${G.name}`,isDirectory:!!G.isDirectory}))},async mkdir(Z,Y){await M("fs").mkdir(Z,Y)},async rmdir(Z,Y){await M("fs").rmdir(Z,Y)},async watch(Z,Y){await M("fs").watch(Z,Y)},async unwatch(Z){await M("fs").unwatch(Z)},onChange(Z){return P("craft:fs:change",Z)},async watchTree(Z,Y,$){let J=`watch-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,G=M("fs");await G.watch(Z,J,{recursive:!!Y.recursive});let X=Y.kinds&&Y.kinds.length>0?new Set(Y.kinds):null,R=Math.max(0,Math.floor(Y.coalesceMs??0)),z=[],F=null,K=!1,j=()=>{if(F=null,z.length===0)return;let O=z;z=[];try{$(O)}catch{}},V=P("craft:fs:change",(O)=>{if(K)return;if(O.id!==J)return;if(X&&O.kind&&!X.has(O.kind))return;if(z.push(O),R===0){j();return}if(F==null)F=setTimeout(j,R)});return{id:J,async stop(){if(K)return;if(K=!0,V(),F)clearTimeout(F),F=null;if(z.length>0)j();try{await G.unwatch(J)}catch{}}}},async homeDir(){return await M("fs").homeDir()},async tempDir(){return await M("fs").tempDir()},async appDataDir(){return await M("fs").appDataDir()}};function X8(Z){let Y="";for(let $=0;$<Z.length;$++)Y+=String.fromCharCode(Z[$]);return typeof btoa==="function"?btoa(Y):Buffer.from(Z).toString("base64")}function z8(Z){let Y=typeof atob==="function"?atob(Z):Buffer.from(Z,"base64").toString("binary"),$=new Uint8Array(Y.length);for(let J=0;J<Y.length;J++)$[J]=Y.charCodeAt(J);return $}function F8(Z){return{isFile:!!Z.isFile,isDirectory:!!Z.isDirectory,isSymlink:!!Z.isSymlink,size:Number(Z.size)||0,modifiedAt:Z.modifiedAt!=null?Z.modifiedAt<1000000000000?Z.modifiedAt*1000:Z.modifiedAt:0}}var r=new Set,Q4=!1;function R8(){if(Q4)return;if(typeof window>"u"||typeof window.addEventListener!=="function")return;window.addEventListener("craft:shell:exit",(Z)=>{let Y=Z.detail;if(Y?.id)r.delete(Y.id)}),Q4=!0}var K8=new Set(["javascript:","data:","file:","vbscript:"]),O8={async openExternal(Z){let Y=Z.trim().toLowerCase();for(let $ of K8)if(Y.startsWith($))throw Error(`shell.openExternal: ${$} URLs are blocked for safety`);if(Q("shell")){await window.craft.shell.openExternal(Z);return}if(typeof window<"u"&&typeof window.open==="function")window.open(Z,"_blank","noopener,noreferrer")},async openPath(Z){await M("shell").openPath(Z)},async showInFinder(Z){await M("shell").showInFinder(Z)},async spawn(Z,Y,$=[],J={}){if(R8(),!Z||typeof Z!=="string")throw Error("shell.spawn: id must be a non-empty string");if(!Y||typeof Y!=="string")throw Error("shell.spawn: command must be a non-empty string");if(!Array.isArray($))throw Error("shell.spawn: args must be an array");for(let G of $)if(typeof G!=="string")throw Error("shell.spawn: args entries must be strings");if(r.has(Z))throw Error(`shell.spawn: id "${Z}" is already in use \u2014 call kill(id) first or pick a different id`);r.add(Z);try{await M("shell").spawn(Z,Y,$,J)}catch(G){throw r.delete(Z),G}},async kill(Z){await M("shell").kill(Z),r.delete(Z)},async getEnv(Z){if(Q("shell")){let Y=await window.craft.shell.getEnv(Z);return Y==null?void 0:String(Y)}return},async setEnv(Z,Y){await M("shell").setEnv(Z,Y)},onStdout(Z){return P("craft:shell:stdout",Z)},onStderr(Z){return P("craft:shell:stderr",Z)},onExit(Z){return P("craft:shell:exit",Z)}};var j8={async register(Z,Y,$){if(!Q("shortcuts"))return;await window.craft.shortcuts.register(Z,Y,$)},async unregister(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.unregister(Z)},async unregisterAll(){if(!Q("shortcuts"))return;await window.craft.shortcuts.unregisterAll()},async enable(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.enable(Z)},async disable(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.disable(Z)},async isRegistered(Z){if(!Q("shortcuts"))return!1;return await window.craft.shortcuts.isRegistered(Z)},async list(){if(!Q("shortcuts"))return[];return await window.craft.shortcuts.list()},on(Z){return P("craft:shortcut",Z)}};var V8={get(){if(Q("theme"))try{return window.craft.theme.get()}catch{}return{appearance:q8()}},onChange(Z){if(Z(this.get()),Q("theme"))return P("craft:theme",Z);if(typeof window<"u"&&window.matchMedia){let Y=window.matchMedia("(prefers-color-scheme: dark)"),$=()=>Z({appearance:Y.matches?"dark":"light"});return Y.addEventListener("change",$),()=>Y.removeEventListener("change",$)}return()=>{}},async current(){return this.get()}};function q8(){if(typeof window>"u"||!window.matchMedia)return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}async function P8(Z,Y={}){if(!Q("dragOut"))throw Error("dragOut requires a Craft native window");let $=Array.isArray(Z)?Z:[Z];if($.length===0)throw Error("dragOut: at least one path required");await window.craft.dragOut.start($,Y)}function U8(){return Q("dragOut")}var L8={onUrl(Z){if(!Q("deepLink"))return()=>{};return P("craft:deepLink",Z)},getInitialUrl(){if(typeof window>"u")return null;if(Q("deepLink"))try{return window.craft.deepLink.getInitialUrl()}catch{return null}return window.__craftPendingDeepLink||null},consumeInitialUrl(){let Z=this.getInitialUrl();if(typeof window<"u")window.__craftPendingDeepLink=void 0;return Z},isAvailable(){return Q("deepLink")}};var W8={async isCharging(){if(Q("power"))return await window.craft.power.isCharging();let Z=await QZ();return Z?!!Z.charging:!1},async isPluggedIn(){if(Q("power"))return await window.craft.power.isPluggedIn();let Z=await QZ();return Z?!!Z.charging||Z.level>=0.999:!1},async isLowPowerMode(){if(Q("power"))return await window.craft.power.isLowPowerMode();return!1},async level(){if(Q("power")){let Y=await window.craft.power.batteryLevel();return typeof Y==="number"?Y:null}let Z=await QZ();return Z?Z.level:null},async timeRemaining(){if(Q("power")){let $=await window.craft.power.timeRemaining();return typeof $==="number"?$:null}let Z=await QZ();if(!Z)return null;let Y=Z.charging?Z.chargingTime:Z.dischargingTime;return Number.isFinite(Y)?Math.round(Y/60):null},async thermalState(){if(Q("power"))return await window.craft.power.thermalState()||"unknown";return"unknown"},async uptimeSeconds(){if(Q("power"))return await window.craft.power.uptimeSeconds();if(typeof performance<"u"&&typeof performance.now==="function")return Math.round(performance.now()/1000);return 0},async preventSleep(Z="app is busy"){if(Q("power")){await window.craft.power.preventSleep(Z);return}if(typeof navigator>"u"||!navigator.wakeLock)return;let Y=window;if(Y.__craftWebWakeLock?.release){try{await Y.__craftWebWakeLock.release()}catch{}Y.__craftWebWakeLock=null}try{let $=await navigator.wakeLock.request("screen");Y.__craftWebWakeLock=$}catch{}},async allowSleep(){if(Q("power")){await window.craft.power.allowSleep();return}let Z=window.__craftWebWakeLock;if(Z&&typeof Z.release==="function"){try{await Z.release()}catch{}window.__craftWebWakeLock=null}},onSleep(Z){return P("craft:powerSleep",Z)},onWake(Z){return P("craft:powerWake",Z)}};async function QZ(){if(typeof navigator>"u")return null;let Z=navigator;if(typeof Z.getBattery!=="function")return null;try{return await Z.getBattery()}catch{return null}}var D8={async connectionType(){if(Q("network"))return await window.craft.network.connectionType();return G4()},async wifiSSID(){if(Q("network"))return await window.craft.network.wifiSSID()||void 0;return},async wifiSignalStrength(){if(Q("network")){let Z=await window.craft.network.wifiSignalStrength();return typeof Z==="number"?Z:void 0}return},async ipAddress(){if(Q("network"))return await window.craft.network.ipAddress();return""},async macAddress(){if(Q("network"))return await window.craft.network.macAddress();return""},async interfaces(){if(Q("network"))return await window.craft.network.interfaces();return[]},async isVPNConnected(){if(Q("network"))return await window.craft.network.isVPNConnected();return!1},async proxySettings(){if(Q("network"))return await window.craft.network.proxySettings()||{};return{}},async openPreferences(){if(Q("network"))await window.craft.network.openPreferences()},onChange(Z){if(Q("network"))return P("craft:networkChange",Z);if(typeof window>"u")return()=>{};let Y=()=>Z({type:G4(),online:!0}),$=()=>Z({type:"none",online:!1});return window.addEventListener("online",Y),window.addEventListener("offline",$),()=>{window.removeEventListener("online",Y),window.removeEventListener("offline",$)}}};function G4(){if(typeof navigator>"u")return"unknown";if(navigator.onLine===!1)return"none";let Z=navigator.connection;if(!Z)return"unknown";let Y=String(Z.type||Z.effectiveType||"unknown").toLowerCase();if(Y==="wifi"||Y==="cellular"||Y==="ethernet"||Y==="bluetooth"||Y==="none")return Y;return"unknown"}var M8={async checkForUpdates(){if(!Q("updater"))return;await window.craft.updater.checkForUpdates()},async checkInBackground(){if(!Q("updater"))return;await window.craft.updater.checkInBackground()},async setAutomaticChecks(Z){if(!Q("updater"))return;await window.craft.updater.setAutomaticChecks(Z)},async setCheckInterval(Z){if(!Q("updater"))return;if(!Number.isFinite(Z))throw Error("setCheckInterval: must be a finite number");let Y=Z<=0?0:Math.max(60,Math.round(Z));await window.craft.updater.setCheckInterval(Y)},async setFeedURL(Z){if(!Q("updater"))return;await window.craft.updater.setFeedURL(Z)},async getLastUpdateCheckDate(){if(!Q("updater"))return null;return await window.craft.updater.getLastUpdateCheckDate()||null},async getUpdateInfo(){if(!Q("updater"))return null;let Z=await window.craft.updater.getUpdateInfo();if(!Z||typeof Z.version!=="string"||Z.version.length===0)return null;return Z},onAvailable(Z){return P("craft:updateAvailable",Z)},onDownloaded(Z){return P("craft:updateDownloaded",Z)},async verifySignature({payload:Z,signatureB64:Y,publicKeyB64:$}){let J=X4(Z),G;try{G=await crypto.subtle.importKey("raw",GZ($),{name:"Ed25519"},!1,["verify"])}catch{return!1}try{return await crypto.subtle.verify("Ed25519",G,GZ(Y),J)}catch{return!1}},async verifyDownload({url:Z,signatureB64:Y,publicKeyB64:$,fetchInit:J}){let G;try{G=await fetch(Z,J)}catch{return{ok:!1,reason:"fetch-failed"}}if(!G.ok)return{ok:!1,reason:"http-error",status:G.status};let X=new Uint8Array(await G.arrayBuffer()),R;try{R=await crypto.subtle.importKey("raw",GZ($),{name:"Ed25519"},!1,["verify"])}catch{return{ok:!1,reason:"bad-key"}}let z=!1;try{z=await crypto.subtle.verify("Ed25519",R,GZ(Y),X4(X))}catch{z=!1}if(!z)return{ok:!1,reason:"bad-signature"};return{ok:!0,payload:X}}};function X4(Z){if(Z instanceof ArrayBuffer)return new Uint8Array(Z);let Y=new ArrayBuffer(Z.byteLength),$=new Uint8Array(Y);return $.set(Z),$}function GZ(Z){if(typeof atob==="function"){let J=atob(Z),G=new ArrayBuffer(J.length),X=new Uint8Array(G);for(let R=0;R<J.length;R++)X[R]=J.charCodeAt(R);return X}let Y=Buffer.from(Z,"base64"),$=new ArrayBuffer(Y.length);return new Uint8Array($).set(Y),new Uint8Array($)}var T8={onFocus(Z){if(Q("window"))return P("craft:window:focus",()=>Z());return DZ("focus",Z)},onBlur(Z){if(Q("window"))return P("craft:window:blur",()=>Z());return DZ("blur",Z)},onResize(Z){if(Q("window"))return P("craft:window:resize",Z);if(typeof window>"u")return()=>{};let Y=()=>Z({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},onMove(Z){if(Q("window"))return P("craft:window:move",Z);return()=>{}},onClose(Z){if(Q("window"))return P("craft:window:close",()=>Z());return DZ("beforeunload",Z)},onMinimize(Z){if(Q("window"))return P("craft:window:minimize",()=>Z());if(typeof document>"u")return()=>{};let Y=()=>{if(document.visibilityState==="hidden")Z()};return document.addEventListener("visibilitychange",Y),()=>document.removeEventListener("visibilitychange",Y)},onRestore(Z){if(Q("window"))return P("craft:window:restore",()=>Z());if(typeof document>"u")return()=>{};let Y=()=>{if(document.visibilityState==="visible")Z()};return document.addEventListener("visibilitychange",Y),()=>document.removeEventListener("visibilitychange",Y)}};function DZ(Z,Y){if(typeof window>"u")return()=>{};let $=()=>Y();return window.addEventListener(Z,$),()=>window.removeEventListener(Z,$)}var z4={name:"",version:"0.0.0"},_8={async hideDockIcon(){if(Q("app"))await window.craft.app.hideDockIcon()},async showDockIcon(){if(Q("app"))await window.craft.app.showDockIcon()},async quit(){if(Q("app"))await window.craft.app.quit()},async getInfo(){if(!Q("app"))return z4;let Z=await window.craft.app.getInfo();return{...z4,...Z||{}}},async notify(Z){if(!Z.title)throw Error("notify: title is required");if(Q("app"))await window.craft.app.notify(Z)},async setBadge(Z){if(Q("app"))await window.craft.app.setBadge(Z)},async bounce(Z="informational"){if(Q("app"))await window.craft.app.bounce(Z)}};var N8={app(Z){return{label:Z,items:[{label:`About ${Z}`,role:"about"},{separator:!0},{label:`Hide ${Z}`,role:"hide",shortcut:"cmd+h"},{label:"Hide Others",role:"hideOthers",shortcut:"cmd+alt+h"},{label:"Show All",role:"showAll"},{separator:!0},{label:`Quit ${Z}`,role:"quit",shortcut:"cmd+q"}]}},edit(){return{label:"Edit",items:[{label:"Undo",role:"undo",shortcut:"cmd+z"},{label:"Redo",role:"redo",shortcut:"cmd+shift+z"},{separator:!0},{label:"Cut",role:"cut",shortcut:"cmd+x"},{label:"Copy",role:"copy",shortcut:"cmd+c"},{label:"Paste",role:"paste",shortcut:"cmd+v"},{label:"Select All",role:"selectAll",shortcut:"cmd+a"}]}},window(){return{label:"Window",items:[{label:"Minimize",role:"minimize",shortcut:"cmd+m"},{label:"Zoom",role:"zoom"},{separator:!0},{label:"Close Window",role:"close",shortcut:"cmd+w"}]}},leading(Z){return[this.app(Z),this.edit()]}},E8=0;function A8(Z){let Y=new Map;return{payload:{menus:Z.menus.map((J)=>({label:J.label,items:J.items.map((G)=>{let{onClick:X,...R}=G;if(R.separator)return R;let z=R.id??`stx.menu.${E8++}`;if(X)Y.set(z,X);return{...R,id:z}})}))},handlers:Y}}var F4=null,k8={async set(Z){if(!Q("menu"))return!1;let{payload:Y,handlers:$}=A8(Z);return F4?.(),F4=$.size>0?P("craft:menu:action",(J)=>{$.get(J.id)?.()}):null,await window.craft.menu.set(Y),!0},async setDock(Z){if(Q("menu"))await window.craft.menu.setDock(Z)},async addItem(Z,Y){if(Q("menu"))await window.craft.menu.addItem(Z,Y)},async removeItem(Z){if(Q("menu"))await window.craft.menu.removeItem(Z)},async enableItem(Z){if(Q("menu"))await window.craft.menu.enableItem(Z)},async disableItem(Z){if(Q("menu"))await window.craft.menu.disableItem(Z)},async checkItem(Z){if(Q("menu"))await window.craft.menu.checkItem(Z)},async uncheckItem(Z){if(Q("menu"))await window.craft.menu.uncheckItem(Z)},async setItemLabel(Z,Y){if(Q("menu"))await window.craft.menu.setItemLabel(Z,Y)},async clearDock(){if(Q("menu"))await window.craft.menu.clearDock()},onAction(Z){return P("craft:menu:action",Z)}};function R4(Z){if(Z.separator)return{id:Z.id||"",title:"",type:"separator"};return{id:Z.id||"",title:Z.title||"",icon:Z.icon,shortcut:Z.shortcut,enabled:Z.disabled?!1:void 0,submenu:Z.submenu?.map(R4)}}var H8={available(){return Q("nativeUI")},async show(Z){if(!Z.items||Z.items.length===0)throw Error("contextMenu.show requires at least one item");if(!Q("nativeUI"))return!1;return await window.craft.nativeUI.showContextMenu({targetId:Z.targetId||"",targetType:"general",x:Math.round(Z.x),y:Math.round(Z.y),items:Z.items.map(R4)}),!0},onAction(Z){return P("craft:menu:action",Z)}};var x8={accentColor:()=>x("system","accentColor",()=>""),highlightColor:()=>x("system","highlightColor",()=>""),language:()=>x("system","language",()=>{if(typeof navigator>"u")return"";return navigator.language?.split("-")[0]||""}),locale:()=>x("system","locale",()=>{if(typeof navigator>"u")return"";return navigator.language||""}),timezone:()=>x("system","timezone",()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch{return""}}),is24HourTime:()=>x("system","is24HourTime",()=>{try{let Z=new Intl.DateTimeFormat([],{hour:"numeric"}).resolvedOptions();return Z.hourCycle==="h23"||Z.hourCycle==="h24"}catch{return!1}}),reduceMotion:()=>x("system","reduceMotion",()=>MZ("(prefers-reduced-motion: reduce)")),reduceTransparency:()=>x("system","reduceTransparency",()=>MZ("(prefers-reduced-transparency: reduce)")),increaseContrast:()=>x("system","increaseContrast",()=>MZ("(prefers-contrast: more)")),systemVersion:()=>x("system","systemVersion",()=>""),hostname:()=>x("system","hostname",()=>""),username:()=>x("system","username",()=>""),async openPreferences(){if(Q("system"))await window.craft.system.openPreferences()}};async function x(Z,Y,$){if(Q(Z))return await window.craft[Z][Y]();return await $()}function MZ(Z){if(typeof window>"u"||!window.matchMedia)return!1;return window.matchMedia(Z).matches}var C8={async getDisplays(){if(Q("screen"))return await window.craft.screen.getDisplays();return K4()},async getPrimary(){if(Q("screen")){let Z=await window.craft.screen.getPrimary();return Z&&typeof Z.width==="number"?Z:null}return K4()[0]??null},onChange(Z){if(Q("screen"))return P("craft:screen:change",()=>Z());if(typeof window>"u")return()=>{};let Y=()=>Z();return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)}};function K4(){if(typeof window>"u"||!window.screen)return[];let Z=window.screen;return[{id:0,x:Z.left??0,y:Z.top??0,width:Z.width||0,height:Z.height||0,workX:Z.availLeft??0,workY:Z.availTop??0,workWidth:Z.availWidth??Z.width??0,workHeight:Z.availHeight??Z.height??0,scaleFactor:window.devicePixelRatio||1}]}var I8={async set(Z,Y,$){if(!Z)throw Error("keychain.set: service is required");if(!Y)throw Error("keychain.set: account is required");await M("keychain").set(Z,Y,$)},async get(Z,Y){if(!Z)throw Error("keychain.get: service is required");if(!Y)throw Error("keychain.get: account is required");let $=await M("keychain").get(Z,Y);return typeof $==="string"?$:null},async delete(Z,Y){if(!Z)throw Error("keychain.delete: service is required");if(!Y)throw Error("keychain.delete: account is required");await M("keychain").delete(Z,Y)},async has(Z,Y){if(!Z)throw Error("keychain.has: service is required");if(!Y)throw Error("keychain.has: account is required");return await M("keychain").has(Z,Y)}};var S8={async check(Z){if(Q("permissions"))return await window.craft.permissions.check(Z);return await O4(Z)},async request(Z){if(Q("permissions"))return await window.craft.permissions.request(Z);return await w8(Z)},async openSettings(Z){if(Q("permissions"))await window.craft.permissions.openSettings(Z)}};async function O4(Z){if(typeof navigator>"u"||!navigator.permissions?.query)return"not-supported";try{let Y=await navigator.permissions.query({name:Z});return B8(Y.state)}catch{return"not-supported"}}async function w8(Z){if(Z==="notifications"&&typeof window<"u"&&"Notification"in window){let Y=await window.Notification.requestPermission();return Y==="granted"?"granted":Y==="denied"?"denied":"undetermined"}return await O4(Z)}function B8(Z){if(Z==="granted")return"granted";if(Z==="denied")return"denied";if(Z==="prompt")return"undetermined";return"undetermined"}var f8={async print(){if(Q("printing")){await window.craft.printing.print();return}if(typeof window<"u"&&typeof window.print==="function")window.print()},async printToPDF(Z){if(!Z)throw Error("printToPDF: path is required");let Y=Z.startsWith("/"),$=/^[a-zA-Z]:[\\/]/.test(Z)||Z.startsWith("\\\\");if(!Y&&!$)throw Error("printToPDF: path must be absolute");let J=await M("printing").printToPDF(Z);return{ok:!!(J&&J.ok),path:J?.path}}};var v8={async enable(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.enable()},async disable(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.disable()},async isEnabled(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.isEnabled()}};var y8={async addItem(Z){if(Q("touchbar"))await window.craft.touchbar.addItem(Z)},async removeItem(Z){if(Q("touchbar"))await window.craft.touchbar.removeItem(Z)},async updateItem(Z,Y){if(Q("touchbar"))await window.craft.touchbar.updateItem(Z,Y)},async setLabel(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setLabel(Z,Y)},async setIcon(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setIcon(Z,Y)},async setEnabled(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setEnabled(Z,Y)},async setSliderValue(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setSliderValue(Z,Y)},async clear(){if(Q("touchbar"))await window.craft.touchbar.clear()},async show(){if(Q("touchbar"))await window.craft.touchbar.show()},async hide(){if(Q("touchbar"))await window.craft.touchbar.hide()},onAction(Z){return P("craft:touchbar:action",Z)}};var g8=/^[\da-f]*$/i;function b8(Z,Y){if(typeof Y!=="string"||!g8.test(Y)||Y.length%2!==0)throw Error(`${Z}: must be a hex string with even length, got ${JSON.stringify(Y)}`)}var u8={async isEnabled(){return Q("bluetooth")?await window.craft.bluetooth.isEnabled():!1},async powerState(){return Q("bluetooth")?await window.craft.bluetooth.powerState():"unknown"},async connectedDevices(){return Q("bluetooth")?await window.craft.bluetooth.connectedDevices():[]},async pairedDevices(){return Q("bluetooth")?await window.craft.bluetooth.pairedDevices():[]},async startDiscovery(){if(Q("bluetooth"))await window.craft.bluetooth.startDiscovery()},async stopDiscovery(){if(Q("bluetooth"))await window.craft.bluetooth.stopDiscovery()},async isDiscovering(){return Q("bluetooth")?await window.craft.bluetooth.isDiscovering():!1},async connect(Z){if(Q("bluetooth"))await window.craft.bluetooth.connect(Z)},async disconnect(Z){if(Q("bluetooth"))await window.craft.bluetooth.disconnect(Z)},async openPreferences(){if(Q("bluetooth"))await window.craft.bluetooth.openPreferences()},async discoverServices(Z){if(!Z)throw Error("bluetooth.discoverServices: deviceId is required");if(!Q("bluetooth"))return[];let Y=await window.craft.bluetooth.discoverServices(Z);return Array.isArray(Y)?Y:[]},async discoverCharacteristics(Z,Y){if(!Z||!Y)throw Error("bluetooth.discoverCharacteristics: deviceId and serviceUuid are required");if(!Q("bluetooth"))return[];let $=await window.craft.bluetooth.discoverCharacteristics(Z,Y);return Array.isArray($)?$:[]},async readCharacteristic(Z,Y,$){if(!Z||!Y||!$)throw Error("bluetooth.readCharacteristic: deviceId, serviceUuid, characteristicUuid are required");if(!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.readCharacteristic(Z,Y,$)},async writeCharacteristic(Z,Y,$,J,G="with-response"){if(!Z||!Y||!$)throw Error("bluetooth.writeCharacteristic: deviceId, serviceUuid, characteristicUuid are required");if(b8("bluetooth.writeCharacteristic.valueHex",J),!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.writeCharacteristic(Z,Y,$,J,G)},async setCharacteristicNotify(Z,Y,$,J){if(!Z||!Y||!$)throw Error("bluetooth.setCharacteristicNotify: deviceId, serviceUuid, characteristicUuid are required");if(!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.setCharacteristicNotify(Z,Y,$,J)},onDeviceFound(Z){return P("craft:bluetooth:deviceFound",Z)},onDeviceConnected(Z){return P("craft:bluetooth:deviceConnected",Z)},onDeviceDisconnected(Z){return P("craft:bluetooth:deviceDisconnected",Z)},onCharacteristicValue(Z){return P("craft:bluetooth:characteristicValue",Z)}};var m8={async speak(Z,Y){if(!Z)throw Error("speech.speak: text is required");if(Q("speech")){await window.craft.speech.speak(Z,Y);return}if(typeof window<"u"&&window.speechSynthesis){let $=new window.SpeechSynthesisUtterance(Z);if(Y){if(Y.rate!=null)$.rate=Y.rate;if(Y.pitch!=null)$.pitch=Y.pitch;if(Y.volume!=null)$.volume=Y.volume;if(Y.voice){let G=window.speechSynthesis.getVoices().find((X)=>X.voiceURI===Y.voice||X.name===Y.voice||X.lang===Y.voice);if(G)$.voice=G}}window.speechSynthesis.speak($)}},async stop(){if(Q("speech")){await window.craft.speech.stop();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.cancel()},async pause(){if(Q("speech")){await window.craft.speech.pause();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.pause()},async resume(){if(Q("speech")){await window.craft.speech.resume();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.resume()},async isSpeaking(){if(Q("speech"))return await window.craft.speech.isSpeaking();if(typeof window<"u"&&window.speechSynthesis)return!!window.speechSynthesis.speaking;return!1},async getVoices(){if(Q("speech"))return await window.craft.speech.getVoices();if(typeof window<"u"&&window.speechSynthesis)return window.speechSynthesis.getVoices().map((Y)=>({id:Y.voiceURI||Y.name,name:Y.name,language:Y.lang||"",quality:"default"}));return[]}};var n=[],TZ=!0,_Z,NZ,o={async report(Z){if(Q("crashReporter")){await window.craft.crashReporter.report(Z);return}if(!TZ)return;let Y=Z instanceof Error?{timestamp:Date.now(),severity:"error",message:Z.message,source:"js",stack:Z.stack||"",userId:_Z,appVersion:NZ}:{timestamp:Date.now(),severity:Z.severity||"error",message:Z.message||"",source:Z.source||"js",stack:Z.stack||"",userId:_Z,appVersion:NZ};if(n.length>=64)n.shift();n.push(Y)},async flush(){if(Q("crashReporter"))return await window.craft.crashReporter.flush();return[...n]},async clear(){if(Q("crashReporter")){await window.craft.crashReporter.clear();return}n.length=0},async setEnabled(Z){if(Q("crashReporter")){await window.craft.crashReporter.setEnabled(Z);return}TZ=Z},async isEnabled(){if(Q("crashReporter"))return await window.craft.crashReporter.isEnabled();return TZ},async setUser(Z){if(Q("crashReporter")){await window.craft.crashReporter.setUser(Z);return}_Z=Z||void 0},async setAppVersion(Z){if(Q("crashReporter")){await window.craft.crashReporter.setAppVersion(Z);return}NZ=Z||void 0},attachGlobalHandlers(){if(Q("crashReporter")&&window.craft.crashReporter.attachGlobalHandlers)return window.craft.crashReporter.attachGlobalHandlers();if(typeof window>"u")return()=>{};let Z=($)=>{o.report({severity:"error",message:$.message,source:"js",stack:$.error?.stack||`${$.message}
|
|
895
895
|
at ${$.filename}:${$.lineno}:${$.colno}`}).catch(()=>{})},Y=($)=>{let J=$.reason;o.report({severity:"error",message:J?.message||String(J),source:"js",stack:J?.stack||""}).catch(()=>{})};return window.addEventListener("error",Z),window.addEventListener("unhandledrejection",Y),()=>{window.removeEventListener("error",Z),window.removeEventListener("unhandledrejection",Y)}},forwardTo(Z){return r8(Z)}},h8="craft:crashReporter:pending",c8=/[\w.+-]+@[\w-]+\.[\w.-]+/g,p8=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,l8=/\/(?:Users|home)\/[^\s/'"`]+/g;function V4(Z){let Y=($)=>$.replace(c8,"<email>").replace(p8,"<ip>").replace(l8,"/<home>");return{...Z,message:Y(Z.message),stack:Y(Z.stack)}}async function q4(Z,Y){let $=new TextEncoder,J=await crypto.subtle.importKey("raw",$.encode(Z),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),G=await crypto.subtle.sign("HMAC",J,$.encode(Y));return[...new Uint8Array(G)].map((X)=>X.toString(16).padStart(2,"0")).join("")}function d8(Z){if(!Z||typeof localStorage>"u")return[];try{let Y=localStorage.getItem(Z);if(!Y)return[];let $=JSON.parse(Y);return Array.isArray($)?$:[]}catch{return[]}}function j4(Z,Y){if(!Z||typeof localStorage>"u")return;try{if(Y.length===0)localStorage.removeItem(Z);else localStorage.setItem(Z,JSON.stringify(Y))}catch{}}function r8(Z){let{endpoint:Y,intervalMs:$=60000,signingSecret:J,redact:G=!0,headers:X={},maxRetries:R=5,persistKey:z}=Z,F=z===null?null:z??h8,K=d8(F),j=!1,V=null,O=null,U=typeof G==="function"?G:G===!1?(N)=>N:V4;async function L(N){let E=JSON.stringify({entries:N}),S={"Content-Type":"application/json",...X};if(J)S["X-Craft-Signature"]=await q4(J,E);let i=0,w=1000;while(!j)try{let b=await fetch(Y,{method:"POST",headers:S,body:E});if(b.ok)return;if(b.status>=400&&b.status<500)return;throw Error(`HTTP ${b.status}`)}catch(b){if(i+=1,i>R)throw K=[...N,...K],j4(F,K),b;await new Promise((T4)=>{setTimeout(T4,w)}),w=Math.min(w*2,60000)}}async function _(){if(j||O)return O??void 0;let N=await o.flush();if(N.length>0)await o.clear();if(K=[...K,...N.map((S)=>U(S))],K.length===0)return;let E=K;return K=[],j4(F,K),O=L(E).catch(()=>{}).finally(()=>{O=null}),O}if($>0)V=setInterval(()=>{_().catch(()=>{})},$);return{async flushNow(){await _()},stop(){if(j=!0,V)clearInterval(V);V=null},pending(){return[...K]}}}var n8={async isAvailable(){if(!Q("iap"))return!1;return await window.craft.iap.isAvailable()},async getProducts(Z){if(!Q("iap"))return[];let Y=Array.isArray(Z)?Z:[String(Z)];return await window.craft.iap.getProducts(Y)},async purchase(Z){if(!Q("iap"))return{queued:!1,productId:Z,reason:"IAP bridge not available"};let Y=await window.craft.iap.purchase(Z);return{queued:!!(Y&&Y.queued),productId:Y?.productId,reason:Y?.reason}},async restorePurchases(){if(!Q("iap"))return{ok:!1};let Z=await window.craft.iap.restorePurchases();return{ok:!!(Z&&Z.ok)}},async finishTransaction(Z){if(!Q("iap"))return;await window.craft.iap.finishTransaction(Z)},async getReceiptData(){if(!Q("iap"))return null;let Z=await window.craft.iap.getReceiptData();return Z?String(Z):null},onPurchased(Z){return P("craft:iap:purchased",Z)},onFailed(Z){return P("craft:iap:failed",Z)},onRestored(Z){return P("craft:iap:restored",Z)},onProductsLoaded(Z){return P("craft:iap:productsLoaded",(Y)=>Z(Y.products||[]))},onRefunded(Z){return P("craft:iap:refunded",Z)},onSubscriptionStatusChanged(Z){return P("craft:iap:subscriptionStatusChanged",Z)},async getActiveSubscriptions(){if(!Q("iap"))return[];let Z=window.craft.iap.getActiveSubscriptions;if(typeof Z!=="function")return[];let Y=await Z();return Array.isArray(Y)?Y:[]},async isEligibleForIntroOffer(Z){if(!Q("iap"))return!1;let Y=window.craft.iap.isEligibleForIntroOffer;if(typeof Y!=="function")return!1;return!!await Y(Z)}};var a={async startActivity(Z,Y){if(!Z)throw Error("handoff.startActivity: type is required");if(!Q("handoff"))return!1;let $=await window.craft.handoff.startActivity(Z,Y);return typeof $==="boolean"?$:!!($&&$.ok)},async updateActivity(Z){if(!Q("handoff"))return!1;let Y=await window.craft.handoff.updateActivity(Z);return typeof Y==="boolean"?Y:!!(Y&&Y.ok)},async stopActivity(){if(!Q("handoff"))return;await window.craft.handoff.stopActivity()},async getCurrentActivity(){if(!Q("handoff"))return null;let Z=await window.craft.handoff.getCurrentActivity();return Z&&typeof Z.type==="string"?Z:null},onIncoming(Z){return P("craft:handoff:incoming",Z)}};var o8={async start(Z,Y){return a.startActivity(Z,{title:Y?.title,webpageURL:Y?.webpageURL,userInfo:Y?.state})},async update(Z){return a.updateActivity({title:Z.title,webpageURL:Z.webpageURL,userInfo:Z.state})},async stop(){await a.stopActivity()}};var a8={async requestPermission(Z="whenInUse"){if(Q("location"))return await window.craft.location.requestPermission(Z);if(typeof navigator<"u"&&navigator.geolocation)return"undetermined";return"not-supported"},async getAuthorization(){if(Q("location"))return await window.craft.location.getAuthorization();return"unknown"},async getCurrentLocation(){if(Q("location"))return await window.craft.location.getCurrentLocation();if(typeof navigator<"u"&&navigator.geolocation)return navigator.geolocation.getCurrentPosition((Z)=>{window.dispatchEvent(new CustomEvent("craft:location:update",{detail:{latitude:Z.coords.latitude,longitude:Z.coords.longitude,altitude:Z.coords.altitude,horizontalAccuracy:Z.coords.accuracy,verticalAccuracy:Z.coords.altitudeAccuracy,speed:Z.coords.speed}}))},(Z)=>{window.dispatchEvent(new CustomEvent("craft:location:error",{detail:{message:Z.message||String(Z)}}))}),{requested:!0};return{requested:!1}},async startWatching(Z){if(Q("location"))return await window.craft.location.startWatching(Z);if(typeof navigator<"u"&&navigator.geolocation){let Y=navigator.geolocation.watchPosition(($)=>{window.dispatchEvent(new CustomEvent("craft:location:update",{detail:{latitude:$.coords.latitude,longitude:$.coords.longitude,altitude:$.coords.altitude,horizontalAccuracy:$.coords.accuracy,verticalAccuracy:$.coords.altitudeAccuracy,speed:$.coords.speed}}))});return window.__craftWebLocationWatchId=Y,!0}return!1},async stopWatching(){if(Q("location")){await window.craft.location.stopWatching();return}if(typeof navigator<"u"&&navigator.geolocation){let Z=window.__craftWebLocationWatchId;if(Z!=null)navigator.geolocation.clearWatch(Z),window.__craftWebLocationWatchId=null}},onUpdate(Z){return P("craft:location:update",Z)},onError(Z){return P("craft:location:error",Z)},onAuthChanged(Z){return P("craft:location:authChanged",Z)}};var i8={async captureScreen(){if(!Q("screenCapture"))return null;let Z=await window.craft.screenCapture.captureScreen();return Z?String(Z):null},async captureWindow(Z){if(!Q("screenCapture"))return null;if(!Number.isFinite(Z)||Z<=0)throw Error("captureWindow: id must be a positive number");let Y=await window.craft.screenCapture.captureWindow(Z);return Y?String(Y):null},async listWindows(){if(!Q("screenCapture"))return[];return await window.craft.screenCapture.listWindows()}};var U4=250,L4=60000,EZ=2000,P4={sharing:!1,signals:{systemScreenShare:!1,remoteSession:!1,conferenceSharing:!1,screenRecording:!1},sources:[]};function s8(){return{...P4,signals:{...P4.signals},sources:[]}}var XZ={async getState(){if(!Q("screenSharing"))return s8();return await window.craft.screenSharing.getState()},async watch(Z=EZ){let Y=Math.min(L4,Math.max(U4,Math.round(Z)));if(!Q("screenSharing"))return Y;let $=await window.craft.screenSharing.watch(Y);return $&&$.intervalMs||Y},async stop(){if(!Q("screenSharing"))return;await window.craft.screenSharing.unwatch()},onChange(Z){return P("craft:screenSharing:change",Z)}};async function t8(Z,Y=EZ){let $=XZ.onChange(Z);return await XZ.watch(Y),()=>{$(),XZ.stop()}}var e8={supported:!1,isFocused:null,authorization:"unsupported"};function W4(){return{ok:!1,error:"Focus control is only available in a Craft window on macOS"}}var AZ={async getStatus(){if(!Q("focus"))return{...e8};return await window.craft.focus.getStatus()},async requestAuthorization(){if(!Q("focus"))return"unsupported";return await window.craft.focus.requestAuthorization()},async setEnabled(Z,Y={}){if(!Q("focus"))return W4();if(!(Z?Y.onShortcut:Y.offShortcut))return{ok:!1,error:`focus.setEnabled: no ${Z?"onShortcut":"offShortcut"} configured`};return await window.craft.focus.setEnabled(Z,Y)},async runShortcut(Z){if(!Q("focus"))return W4();if(!Z)throw Error("focus.runShortcut: name is required");return await window.craft.focus.runShortcut(Z)},async listShortcuts(){if(!Q("focus"))return[];return await window.craft.focus.listShortcuts()},async listShortcutsResult(){if(!Q("focus"))return{canList:!1,shortcuts:[]};let Y=await window.craft.focus.listShortcutsResult?.();return{canList:Boolean(Y?.canList),shortcuts:Y?.shortcuts??[]}}};async function Z9(...Z){if(Z.length===0)return!1;let Y=new Set(await AZ.listShortcuts());return Z.every(($)=>Y.has($))}async function Y9(...Z){if(Z.length===0)return!1;let{canList:Y,shortcuts:$}=await AZ.listShortcutsResult();if(!Y)return"unknown";let J=new Set($);return Z.every((G)=>J.has(G))}var $9={async start(Z=0,Y="127.0.0.1"){if(!Q("localServer"))return{port:0,started:!1,reason:"bridge unavailable"};return await window.craft.localServer.start(Z,Y)},async stop(){if(!Q("localServer"))return;await window.craft.localServer.stop()},async respond(Z){if(!Q("localServer"))return;await window.craft.localServer.respond(Z||{status:200,body:"OK"})},onRequest(Z){return P("craft:localServer:request",Z)},async awaitOAuthCallback(Z={}){M("localServer");let{port:Y=0,host:$="127.0.0.1",timeoutMs:J=300000,successHTML:G}=Z,X=await this.start(Y,$);if(!X.started)throw Error(`localServer: start failed${X.reason?` \u2014 ${X.reason}`:""}`);return new Promise((R,z)=>{let F=setTimeout(()=>{K(),this.stop().catch(()=>{}),z(Error("localServer: OAuth callback timed out"))},J),K=this.onRequest(({url:j})=>{clearTimeout(F),K();let V=G??`<!doctype html><meta charset="utf-8"><title>Done</title>
|
|
896
896
|
<style>body{font-family:-apple-system,BlinkMacSystemFont,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#f5f5f7}</style>
|
|
897
897
|
<div><h1>You can close this tab.</h1><p>Returning to the app\u2026</p></div>
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import{Ha as a,Ve as F,Xa as r,Xe as v,Ye as P,o as m,oa as l,pb as n,qb as p,re as s,sb as i,se as t,xb as e}from"./chunk-
|
|
3
|
+
import{Ha as a,Ve as F,Xa as r,Xe as v,Ye as P,o as m,oa as l,pb as n,qb as p,re as s,sb as i,se as t,xb as e}from"./chunk-3kcf3khz.js";import"./chunk-ym3r8ktq.js";import"./chunk-dgg8a6c8.js";import"./chunk-r1p9hha3.js";import"./chunk-pbsfbgx7.js";import"./chunk-z1yd16w1.js";import"./chunk-jvxrftpe.js";import"./chunk-vhnnryps.js";import"./chunk-0j9hrzjj.js";import"./chunk-91e3916g.js";import"./chunk-7mv0k3tw.js";import"./chunk-5880yp78.js";import"./chunk-65ds4gey.js";import"./chunk-temdqamx.js";import"./chunk-f5v2qf95.js";import"./chunk-6twytnbh.js";import"./chunk-49kk0s96.js";import"./chunk-w3ycm4na.js";import"./chunk-w8cdwh41.js";import"./chunk-gpmpcrww.js";import"./chunk-74cv4ta1.js";import"./chunk-wcm80anz.js";import"./chunk-y7m2dpd3.js";import"./chunk-9y0g8kzt.js";import"./chunk-t6nseeb9.js";import"./chunk-xttsqmkm.js";import"./chunk-54st8g2j.js";import"./chunk-6nxf4pb0.js";import"./chunk-qhcwqxsr.js";import"./chunk-9n0gvfrg.js";import"./chunk-7q9mwh4v.js";import"./chunk-refwkt87.js";import"./chunk-1e0kazb9.js";import"./chunk-7bemc914.js";import"./chunk-w95sp0k9.js";import"./chunk-4fybwpba.js";import"./chunk-bmfnxh4y.js";import"./chunk-gh1vsaa0.js";import"./chunk-58f0mthg.js";import{al as u,bl as c}from"./chunk-e2nzn35y.js";import"./chunk-d8y85xdy.js";import{Bm as A}from"./chunk-h7aynn48.js";import{qs as f}from"./chunk-0athjw48.js";import"./chunk-135mme4g.js";import"./chunk-f3m0q482.js";import"./chunk-f1jd5qjb.js";import"./chunk-v0y3drpw.js";import"./chunk-0pdrnxg2.js";import"./chunk-j26v67km.js";import"./chunk-3gjrq8m7.js";import"./chunk-mh4hd2wt.js";import"./chunk-fa3pamx8.js";import"./chunk-5ec3m8hk.js";import"./chunk-snh1ahqp.js";import{Pu as B}from"./chunk-p3kn55v4.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.249";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-absrtcb0.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-
|
|
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-b15n9vpw.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-
|
|
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-58ynytka.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-3p4txpk9.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.
|
|
4
|
+
"version": "0.2.249",
|
|
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
|
"@cwcss/crosswind": "^0.2.19",
|
|
119
119
|
"@stacksjs/clapp": "^0.2.14",
|
|
120
|
-
"@stacksjs/desktop": "0.2.
|
|
121
|
-
"@stacksjs/sanitizer": "0.2.
|
|
120
|
+
"@stacksjs/desktop": "0.2.249",
|
|
121
|
+
"@stacksjs/sanitizer": "0.2.249",
|
|
122
122
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
123
|
-
"bun-plugin-stx": "0.2.
|
|
123
|
+
"bun-plugin-stx": "0.2.249",
|
|
124
124
|
"bunfig": "^0.15.17",
|
|
125
|
-
"stx-router": "0.2.
|
|
125
|
+
"stx-router": "0.2.249",
|
|
126
126
|
"ts-broadcasting": "^0.0.9",
|
|
127
127
|
"ts-images": "^0.2.11",
|
|
128
128
|
"ts-syntax-highlighter": "^0.2.1"
|