@stacksjs/stx 0.2.297 → 0.2.299
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-nqwjb8k7.js → chunk-00mag1n0.js} +1 -1
- package/dist/chunk-0dz7yme0.js +2 -0
- package/dist/chunk-0hjsgddy.js +2 -0
- package/dist/{chunk-d93d47k0.js → chunk-17389q0t.js} +22 -22
- package/dist/{chunk-75re458k.js → chunk-18kcg747.js} +2 -2
- package/dist/chunk-1bn1wp3r.js +2 -0
- package/dist/chunk-1vzgt63y.js +2 -0
- package/dist/{chunk-xtwybxtw.js → chunk-1zvyq6jj.js} +1 -1
- package/dist/{chunk-c5rehxqy.js → chunk-1zyqv8p8.js} +1 -1
- package/dist/chunk-23jg0x9d.js +2 -0
- package/dist/{chunk-cyrcdgfj.js → chunk-2d9yq3m4.js} +1 -1
- package/dist/chunk-2dsyd62p.js +2 -0
- package/dist/{chunk-mywp77gt.js → chunk-3bc8bqw2.js} +1 -1
- package/dist/{chunk-9616c6wn.js → chunk-3x05529h.js} +1 -1
- package/dist/{chunk-d3kac3mv.js → chunk-42b81qv3.js} +1 -1
- package/dist/chunk-4kzk4s3f.js +2 -0
- package/dist/{chunk-xc4b1ngp.js → chunk-4r5rpv5e.js} +1 -1
- package/dist/{chunk-jmh31a2a.js → chunk-54fnvfp1.js} +2 -2
- package/dist/{chunk-fz91fd99.js → chunk-5c8f2rt7.js} +2 -2
- package/dist/chunk-5fmpyxwr.js +2 -0
- package/dist/{chunk-8bxtvsgm.js → chunk-634gaa9d.js} +1 -1
- package/dist/{chunk-hmf9z4jx.js → chunk-683tfkz4.js} +1 -1
- package/dist/{chunk-vwqv8f0y.js → chunk-6bcw8twx.js} +1 -1
- package/dist/{chunk-k70fgb2f.js → chunk-6btbgxh1.js} +1 -1
- package/dist/{chunk-k78gvm0g.js → chunk-6rzwef28.js} +1 -1
- package/dist/chunk-6sz2hd8t.js +2 -0
- package/dist/{chunk-ynt7y2n5.js → chunk-6w8fa3b8.js} +1 -1
- package/dist/{chunk-3mbkn6vk.js → chunk-6xbscz34.js} +2 -2
- package/dist/{chunk-xtx53xyz.js → chunk-7eea1cse.js} +1 -1
- package/dist/{chunk-nmkra8q5.js → chunk-7eg7ep8f.js} +2 -2
- package/dist/{chunk-q7b4v144.js → chunk-7g37nv98.js} +2 -2
- package/dist/chunk-7v83gvj4.js +2 -0
- package/dist/{chunk-b6xqp9s4.js → chunk-7wh0eyz9.js} +3 -3
- package/dist/chunk-7xbk9755.js +2 -0
- package/dist/chunk-812p93m2.js +2 -0
- package/dist/{chunk-nnkz36zg.js → chunk-8jy8mt5m.js} +1 -1
- package/dist/{chunk-412qbr7q.js → chunk-8xzcfg5w.js} +2 -2
- package/dist/{chunk-efr3ejqt.js → chunk-91007tan.js} +1 -1
- package/dist/{chunk-ph3jj8j4.js → chunk-9k5p10e4.js} +2 -2
- package/dist/{chunk-phrd5kxe.js → chunk-9vft4bjw.js} +1 -1
- package/dist/{chunk-5ey1fdjf.js → chunk-9vpabjdm.js} +1 -1
- package/dist/{chunk-2v69c72j.js → chunk-9xa9kvtr.js} +1 -1
- package/dist/{chunk-wk8v593t.js → chunk-b24h02ck.js} +2 -2
- package/dist/{chunk-dn8006f7.js → chunk-bkbr9yz2.js} +1 -1
- package/dist/{chunk-psraz70k.js → chunk-bt6mqvzy.js} +1 -1
- package/dist/chunk-c1jkpd5e.js +2 -0
- package/dist/chunk-cgw60tse.js +2 -0
- package/dist/{chunk-jf0te8tr.js → chunk-cp60r9ck.js} +1 -1
- package/dist/{chunk-4vpsvh6x.js → chunk-ctz53mbz.js} +1 -1
- package/dist/{chunk-nx96x8sh.js → chunk-d3r5pdz7.js} +1 -1
- package/dist/{chunk-mx93vwmq.js → chunk-ddrsx18x.js} +1 -1
- package/dist/{chunk-bc7emj22.js → chunk-dfnevxkj.js} +1 -1
- package/dist/chunk-dg5mhg7t.js +2 -0
- package/dist/chunk-fc7dc3f6.js +2 -0
- package/dist/{chunk-vqxpsd6r.js → chunk-ffetkbht.js} +1 -1
- package/dist/{chunk-9a1f6dz7.js → chunk-fj6fbqgb.js} +1 -1
- package/dist/{chunk-a84j7v61.js → chunk-fsq7492g.js} +1 -1
- package/dist/chunk-geyrsxc0.js +2 -0
- package/dist/{chunk-8x7rzbww.js → chunk-gfrznj5v.js} +137 -137
- package/dist/{chunk-qzbwa5xe.js → chunk-gmfcddcw.js} +1 -1
- package/dist/{chunk-9rcrgt1d.js → chunk-gn6m4f5p.js} +2 -2
- package/dist/chunk-h58zg4p4.js +2 -0
- package/dist/{chunk-8zyv8jf3.js → chunk-hqqas72x.js} +1 -1
- package/dist/{chunk-knz3zy2t.js → chunk-jbrdrxrc.js} +2 -2
- package/dist/{chunk-4yqnabzy.js → chunk-jk4bexrn.js} +1 -1
- package/dist/chunk-jv41s3xp.js +2 -0
- package/dist/{chunk-gt6ahj63.js → chunk-k4v9k7vj.js} +1 -1
- package/dist/chunk-k8j9bt64.js +2 -0
- package/dist/{chunk-k7mewajj.js → chunk-kpgvx2p1.js} +1 -1
- package/dist/chunk-ky8g0n1e.js +2 -0
- package/dist/chunk-m7dw0h4b.js +2 -0
- package/dist/{chunk-wvxce7p4.js → chunk-m8qcap5h.js} +2 -2
- package/dist/{chunk-kp8ec2f4.js → chunk-mq0vtxe6.js} +2 -2
- package/dist/{chunk-fdnbqt4r.js → chunk-mtbtnryk.js} +1 -1
- package/dist/{chunk-vrhp2xnm.js → chunk-mzbnczgk.js} +2 -2
- package/dist/{chunk-vg8yh8te.js → chunk-nn4k6hvv.js} +1 -1
- package/dist/{chunk-pzhq87vq.js → chunk-p2aa1ak4.js} +2 -2
- package/dist/{chunk-ahdzc50z.js → chunk-peytnjme.js} +1 -1
- package/dist/{chunk-x4mab1rw.js → chunk-pt902dd9.js} +1 -1
- package/dist/{chunk-8h9xqc3p.js → chunk-q0h9kdms.js} +1 -1
- package/dist/chunk-q1pqkc22.js +2 -0
- package/dist/{chunk-ahqn4s3t.js → chunk-q6xfyasj.js} +1 -1
- package/dist/{chunk-a668m28h.js → chunk-qg6pg6ze.js} +1 -1
- package/dist/{chunk-wb00aqm7.js → chunk-qga8gyr7.js} +1 -1
- package/dist/{chunk-mdd9yk4f.js → chunk-qx1zbx35.js} +1 -1
- package/dist/{chunk-0xtnepfj.js → chunk-qx7c8qnw.js} +1 -1
- package/dist/{chunk-ns50qry3.js → chunk-r19ajkwr.js} +2 -2
- package/dist/{chunk-29hfy1xw.js → chunk-rkz0rhx4.js} +1 -1
- package/dist/{chunk-s8g3n7ym.js → chunk-rn2nsn9e.js} +2 -2
- package/dist/chunk-rxnxjw3d.js +2 -0
- package/dist/{chunk-3npkbgfm.js → chunk-s710wybv.js} +1 -1
- package/dist/{chunk-5t50pdtm.js → chunk-shem708r.js} +1 -1
- package/dist/{chunk-ama74dgk.js → chunk-snsb8nm6.js} +3 -3
- package/dist/chunk-sprn2n68.js +2 -0
- package/dist/{chunk-ahsj1r5g.js → chunk-sqqwas4j.js} +1 -1
- package/dist/chunk-syvg73q0.js +2 -0
- package/dist/{chunk-6sy85s25.js → chunk-tn1za8mt.js} +1 -1
- package/dist/chunk-trpmf02p.js +30 -0
- package/dist/{chunk-kgxkrnyt.js → chunk-v4vvm7mz.js} +1 -1
- package/dist/chunk-v54vyt8g.js +2 -0
- package/dist/chunk-v5jtjp8t.js +2 -0
- package/dist/{chunk-wvq1g6gr.js → chunk-v8474ah4.js} +1 -1
- package/dist/{chunk-hvqae2g1.js → chunk-vdzv694w.js} +1 -1
- package/dist/chunk-vk57tj7y.js +2 -0
- package/dist/chunk-vw5zxsc1.js +2 -0
- package/dist/{chunk-fed3xsp9.js → chunk-w8yac9xp.js} +1 -1
- package/dist/{chunk-2b9r38hs.js → chunk-wbq4srvy.js} +1 -1
- package/dist/{chunk-6tqbgd20.js → chunk-wdw9hb5y.js} +1 -1
- package/dist/{chunk-jem20v5k.js → chunk-weqpt9nt.js} +1 -1
- package/dist/{chunk-pfwhd5xs.js → chunk-x14vvxfh.js} +2 -2
- package/dist/{chunk-wyxw61az.js → chunk-x4prtyjs.js} +1 -1
- package/dist/chunk-xjnx0ms8.js +2 -0
- package/dist/{chunk-3qej6qse.js → chunk-y33hd9x7.js} +1 -1
- package/dist/{chunk-k0y7ta0d.js → chunk-y9nyqcha.js} +1 -1
- package/dist/chunk-yft2a2bf.js +2 -0
- package/dist/chunk-yjvd2p32.js +2 -0
- package/dist/{chunk-p9bnsy2t.js → chunk-ykgj5w4g.js} +2 -2
- package/dist/{chunk-70z62b1s.js → chunk-yq903p32.js} +2 -2
- package/dist/chunk-yvnx05f6.js +2 -0
- package/dist/{chunk-6kdb8j9d.js → chunk-ze3qgdaf.js} +1 -1
- package/dist/{chunk-6xsxkzhy.js → chunk-zqrh41k8.js} +1 -1
- package/dist/chunk-zv2hvn7r.js +2 -0
- package/dist/cli.js +14 -14
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/dev-server/serve-app.js +2 -2
- package/dist/pwa.js +2 -2
- package/dist/spa-nav.d.ts +20 -0
- package/dist/spa-nav.js +12 -0
- package/dist/ssg.js +2 -2
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-0dt7mxd4.js +0 -2
- package/dist/chunk-1286mhh3.js +0 -2
- package/dist/chunk-1hgjxmev.js +0 -2
- package/dist/chunk-21p24c6p.js +0 -2
- package/dist/chunk-2egqczsa.js +0 -2
- package/dist/chunk-2enzjhrh.js +0 -2
- package/dist/chunk-3nmkjd4b.js +0 -2
- package/dist/chunk-3y3vfypn.js +0 -30
- package/dist/chunk-4e7ws3aa.js +0 -2
- package/dist/chunk-5zdxwpr4.js +0 -2
- package/dist/chunk-c3bk5y81.js +0 -2
- package/dist/chunk-cfx3vjh6.js +0 -2
- package/dist/chunk-d54zmtbs.js +0 -2
- package/dist/chunk-f57xky9r.js +0 -2
- package/dist/chunk-fqggvrwy.js +0 -2
- package/dist/chunk-fz52r2f7.js +0 -2
- package/dist/chunk-gbewds58.js +0 -2
- package/dist/chunk-gw431w90.js +0 -2
- package/dist/chunk-hfjhybrn.js +0 -2
- package/dist/chunk-hqgnxvf8.js +0 -2
- package/dist/chunk-jt2r1vzy.js +0 -2
- package/dist/chunk-k2f4jwez.js +0 -2
- package/dist/chunk-m38tpeke.js +0 -2
- package/dist/chunk-mhgpjegm.js +0 -2
- package/dist/chunk-msc8zy8k.js +0 -2
- package/dist/chunk-pb5s3vwg.js +0 -2
- package/dist/chunk-ps3n1bvh.js +0 -2
- package/dist/chunk-q2dmpbqf.js +0 -2
- package/dist/chunk-qzrpby7b.js +0 -2
- package/dist/chunk-r6m67kjc.js +0 -2
- package/dist/chunk-s5phwqxc.js +0 -2
- package/dist/chunk-s7yjggwh.js +0 -2
- package/dist/chunk-t16fgjr4.js +0 -2
- package/dist/chunk-v24y3hz7.js +0 -2
- package/dist/chunk-vedg19rq.js +0 -2
- package/dist/chunk-vh7jr0sc.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{
|
|
2
|
+
import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{yo as V}from"./chunk-17389q0t.js";import"./chunk-6xbscz34.js";import"./chunk-bkbr9yz2.js";import"./chunk-nn4k6hvv.js";import"./chunk-1zyqv8p8.js";import"./chunk-1zvyq6jj.js";import"./chunk-snsb8nm6.js";import"./chunk-v4vvm7mz.js";import"./chunk-s710wybv.js";import"./chunk-00mag1n0.js";import"./chunk-d3r5pdz7.js";import"./chunk-ze3qgdaf.js";import"./chunk-54fnvfp1.js";import"./chunk-42b81qv3.js";import{ov as F}from"./chunk-6bcw8twx.js";import l from"fs";import R from"path";function m(z,J){let Z=[R.join(z.root,"stx.config.ts"),R.join(z.root,"stx.config.js"),R.join(z.root,"stx.config.mjs")],K=J.debounceMs??300,$=null,X=[];for(let B of Z)try{if(!l.existsSync(B))continue;let Y=l.watch(B,(W)=>{if(W==="change"){if($)clearTimeout($);$=setTimeout(async()=>{d("Config file changed, restarting...");try{await J.onChange()}catch(j){G(`Failed to restart: ${j}`)}},K)}});X.push(Y)}catch{}return{stop(){if($)clearTimeout($);for(let B of X)B.close()}}}import E from"fs";import i from"path";var Gz=".stx/story/analytics.json",Nz=1,c=1e4;class M{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(z){this.storagePath=i.join(z,Gz),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let z=E.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Nz,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let z=i.dirname(this.storagePath);if(await E.promises.mkdir(z,{recursive:!0}),this.storage.events.length>c)this.storage.events=this.storage.events.slice(-c);await E.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:Hz(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(z){this.storage.events.push({...z,timestamp:Date.now()}),this.dirty=!0}trackView(z,J){if(this.endViewTiming(z),this.viewStartTimes.set(z,Date.now()),this.track({type:"view",componentId:z,variantId:J}),this.currentSession&&!this.currentSession.componentViews.includes(z))this.currentSession.componentViews.push(z)}endViewTiming(z){let J=this.viewStartTimes.get(z);if(J){let Z=Date.now()-J;this.track({type:"view",componentId:z,metadata:{duration:Z,endView:!0}}),this.viewStartTimes.delete(z)}}trackPropChange(z,J,Z){this.track({type:"prop_change",componentId:z,propName:J,metadata:{value:Z}})}trackVariantSwitch(z,J){this.track({type:"variant_switch",componentId:z,variantId:J})}trackSearch(z,J){this.track({type:"search",query:z,metadata:{resultCount:J}})}getComponentAnalytics(z,J){let Z=this.storage.events.filter((Q)=>Q.componentId===z),K=Z.filter((Q)=>Q.type==="view"&&!Q.metadata?.endView),$=Z.filter((Q)=>Q.type==="prop_change"),X=Z.filter((Q)=>Q.type==="variant_switch"),B={};for(let Q of $)if(Q.propName)B[Q.propName]=(B[Q.propName]||0)+1;let Y={};for(let Q of X)if(Q.variantId)Y[Q.variantId]=(Y[Q.variantId]||0)+1;let W=new Set(this.storage.sessions.filter((Q)=>Q.componentViews.includes(z)).map((Q)=>Q.id)),j=Z.filter((Q)=>Q.metadata?.duration).map((Q)=>Q.metadata.duration),U=j.length>0?j.reduce((Q,D)=>Q+D,0)/j.length:0,_=Object.entries(B).sort((Q,D)=>D[1]-Q[1]).slice(0,5).map(([Q])=>Q);return{componentId:z,componentName:J,viewCount:K.length,uniqueViews:W.size,lastViewed:K[K.length-1]?.timestamp,propChanges:B,topChangedProps:_,variantViews:Y,avgTimeSpent:U}}getMostViewedComponents(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="view"&&Z.componentId&&!Z.metadata?.endView)J.set(Z.componentId,(J.get(Z.componentId)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({componentId:Z,viewCount:K})).sort((Z,K)=>K.viewCount-Z.viewCount).slice(0,z)}getMostChangedProps(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="prop_change"&&Z.propName)J.set(Z.propName,(J.get(Z.propName)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({propName:Z,changeCount:K})).sort((Z,K)=>K.changeCount-Z.changeCount).slice(0,z)}getSearchAnalytics(){let z=this.storage.events.filter(($)=>$.type==="search"),J=new Map,Z=0;for(let $ of z){if($.query)J.set($.query,(J.get($.query)||0)+1);if($.metadata?.resultCount!==void 0)Z+=$.metadata.resultCount}let K=Array.from(J.entries()).map(([$,X])=>({query:$,count:X})).sort(($,X)=>X.count-$.count).slice(0,10);return{totalSearches:z.length,topQueries:K,avgResultCount:z.length>0?Z/z.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function Hz(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import P from"fs";import p from"path";var Fz=".stx/story/bookmarks.json",Vz=1;class T{storage;storagePath;dirty=!1;constructor(z){this.storagePath=p.join(z,Fz),this.storage=this.loadStorage()}loadStorage(){try{let z=P.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Vz,bookmarks:[]}}}async save(){if(!this.dirty)return;let z=p.dirname(this.storagePath);await P.promises.mkdir(z,{recursive:!0}),await P.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(z,J,Z,K={}){let $={id:Rz(),name:K.name||`${z}/${J}`,storyId:z,variantId:J,props:Z,created:Date.now(),notes:K.notes,color:K.color};return this.storage.bookmarks.push($),this.dirty=!0,$}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(z){return this.storage.bookmarks.filter((J)=>J.storyId===z)}getBookmark(z){return this.storage.bookmarks.find((J)=>J.id===z)}isBookmarked(z,J){return this.storage.bookmarks.some((Z)=>Z.storyId===z&&Z.variantId===J)}updateBookmark(z,J){let Z=this.getBookmark(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deleteBookmark(z){let J=this.storage.bookmarks.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.bookmarks.splice(J,1),this.dirty=!0,!0}toggleBookmark(z,J,Z){let K=this.storage.bookmarks.find((X)=>X.storyId===z&&X.variantId===J);if(K)return this.deleteBookmark(K.id),{added:!1};return{added:!0,bookmark:this.addBookmark(z,J,Z)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(z,J=!0){let Z=JSON.parse(z),K=0;for(let $ of Z.bookmarks){if(J){let X=this.storage.bookmarks.find((B)=>B.id===$.id);if(X)Object.assign(X,$);else this.storage.bookmarks.push($)}else this.storage.bookmarks.push($);K++}if(K>0)this.dirty=!0;return K}}function Rz(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var N=new Set;function s(){return{open(z){N.add(z),z.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(z){N.delete(z)},message(z,J){}}}function q(z){let J=JSON.stringify({...z,timestamp:z.timestamp||Date.now()});for(let Z of N)try{Z.send(J)}catch{N.delete(Z)}}function n(z,J){q({type:"story-update",data:{storyId:z,...J}})}function a(z,J){q({type:"story-add",data:{storyId:z,...J}})}function o(z){q({type:"story-remove",data:{storyId:z}})}function r(z){return`
|
|
3
3
|
<script>
|
|
4
4
|
(function() {
|
|
5
5
|
const ws = new WebSocket('${z}');
|
|
@@ -556,7 +556,7 @@ window.__stxPerformance = {
|
|
|
556
556
|
|
|
557
557
|
window.clearPerformanceMetrics = () => window.__stxPerformance.clear();
|
|
558
558
|
</script>
|
|
559
|
-
`}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-
|
|
559
|
+
`}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-ky8g0n1e.js"),j={},U=A(Y);if(U)try{await V(U,j,J)}catch(O){$.push(`Warning: Could not extract script variables: ${O instanceof Error?O.message:String(O)}`)}if(Z.props)Object.assign(j,Z.props);let Q=await W(Y,j,J,{},new Set),D=Wz(Y),L=A(Y);return Q=jz(Q),Q=Dz(Q,j),{html:Q,css:D,js:L,errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}async function qz(z){try{let J=await S.promises.readFile(z,"utf-8"),Z=A(J);if(!Z)return null;let K={};if(await V(Z,K,z),Array.isArray(K.variants))return K.variants;return null}catch{return null}}async function Bz(z,J,Z,K){let $=J.story?.variants;if(!$){let Y=await qz(J.path);if(Y)$=Y}if(!$&&Z==="default")return H(z,J.path,{props:K||{}});if(!$)return H(z,J.path,{props:K||{}});let X=$.find((Y)=>Y.id===Z);if(!X&&Z==="default")return H(z,J.path,{props:K||{}});if(!X)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${Z}' not found`],duration:0};let B={...X.state,...K};if(X.source)return wz(z,X.source,B);return H(z,J.path,{props:B})}async function wz(z,J,Z={}){let K=performance.now(),$=[];try{let{processDirectives:X}=await import("./chunk-ky8g0n1e.js"),B={...Z},Y=A(J);if(Y)try{await V(Y,B,"inline-template.stx")}catch{}let j=await X(J,B,"inline-template.stx",{},new Set);return j=jz(j),j=Dz(j,B),{html:j,css:Wz(J),js:A(J),errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}function Wz(z){let J=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
|
|
560
560
|
`)}function jz(z){return z.replace(/<!--[\s\S]*?-->/g,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/^\s*\n/gm,"").trim()}function A(z){let J=[],Z=/<script\b[^>]*>([\s\S]*?)<\/script>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
|
|
561
561
|
`)}function Dz(z,J){let Z=`<script>window.__stxProps = ${JSON.stringify(J)};</script>`;return z+Z}function Lz(z){return z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}async function Oz(z,J){let Z=await I(z);f(z,Z);let K=v(z.config,Z);g(z,K),console.log(` Found ${Z.length} story files`);let $=typeof J.host==="string"?J.host:J.host===!0?"0.0.0.0":"localhost",X=new k(z.root),B=new T(z.root),Y=new M(z.root),W=s(),j=Bun.serve({port:J.port,hostname:$,fetch:async(Q,D)=>{let O=new URL(Q.url).pathname;if(O==="/__hmr"){if(D.upgrade(Q,{data:{isHmr:!0}}))return;return new Response("WebSocket upgrade failed",{status:400})}if(O.startsWith("/api/"))return Cz(z,O,Q,{presetsManager:X,bookmarksManager:B,analyticsTracker:Y});return kz(z,O,J.port)},websocket:{open(Q){W.open(Q)},close(Q){W.close(Q)},message(Q,D){W.message(Q,D)}}}),U=`http://${$}:${J.port}`,_=Uz(z,async(Q,D)=>{console.log(` [${Q}] ${D.relativePath}`);let L=await I(z);f(z,L);let O=v(z.config,L);if(g(z,O),Q==="add")a(D.id,{fileName:D.fileName});else if(Q==="unlink")o(D.id);else n(D.id,{fileName:D.fileName})});if(J.open){let Q=U;try{let{exec:D}=await import("child_process"),L=process.platform;D(`${L==="darwin"?"open":L==="win32"?"start":"xdg-open"} ${Q}`)}catch{}}return{server:j,url:U,close:async()=>{_(),j.stop()}}}async function Cz(z,J,Z,K){let{presetsManager:$,bookmarksManager:X,analyticsTracker:B}=K;if(J==="/api/stories")return Response.json({files:z.storyFiles.map((Y)=>({id:Y.id,fileName:Y.fileName,relativePath:Y.relativePath,treePath:Y.treePath})),tree:z.tree});if(J.startsWith("/api/story/")){let Y=J.slice(11),W=z.storyFiles.find((j)=>j.id===Y);if(!W)return new Response("Story not found",{status:404});try{let j=await Bun.file(W.path).text();return Response.json({id:W.id,fileName:W.fileName,relativePath:W.relativePath,content:j})}catch{return new Response("Error reading story",{status:500})}}if(J==="/api/config")return Response.json({theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets});if(J.startsWith("/api/render/")){let Y=new URL(Z.url),W=J.slice(12).split("/"),j=W[0],U=W[1]||"default",_,Q=Y.searchParams.get("props");if(Q)try{_=JSON.parse(Q)}catch{}let D=z.storyFiles.find((L)=>L.id===j);if(!D)return new Response("Story not found",{status:404});try{let L=await Bz(z,D,U,_);return Response.json({html:L.html,css:L.css,js:L.js,errors:L.errors,duration:L.duration})}catch(L){return Response.json({html:"",css:"",js:"",errors:[L instanceof Error?L.message:String(L)],duration:0},{status:500})}}if(J==="/api/presets"&&Z.method==="GET")return Response.json({presets:$.getAllPresets()});if(J==="/api/presets"&&Z.method==="POST")try{let Y=await Z.json(),W=$.createPreset(Y.name,Y.props,{componentId:Y.componentId,description:Y.description});return await $.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/presets/")&&!J.includes("/use")&&Z.method==="GET"){let Y=J.slice(13),W=$.getPreset(Y);if(!W)return new Response("Preset not found",{status:404});return Response.json(W)}if(J.endsWith("/use")&&Z.method==="POST"){let Y=J.slice(13,-4),W=$.usePreset(Y);if(!W)return new Response("Preset not found",{status:404});return await $.save(),Response.json(W)}if(J.startsWith("/api/presets/")&&Z.method==="DELETE"){let Y=J.slice(13);if(!$.deletePreset(Y))return new Response("Preset not found",{status:404});return await $.save(),Response.json({success:!0})}if(J==="/api/bookmarks"&&Z.method==="GET")return Response.json({bookmarks:X.getAllBookmarks()});if(J==="/api/bookmarks"&&Z.method==="POST")try{let Y=await Z.json(),W=X.addBookmark(Y.storyId,Y.variantId,Y.props,{name:Y.name,notes:Y.notes,color:Y.color});return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/bookmarks/toggle"&&Z.method==="POST")try{let Y=await Z.json(),W=X.toggleBookmark(Y.storyId,Y.variantId,Y.props);return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/bookmarks/")&&J!=="/api/bookmarks/toggle"&&Z.method==="GET"){let Y=J.slice(15),W=X.getBookmark(Y);if(!W)return new Response("Bookmark not found",{status:404});return Response.json(W)}if(J.startsWith("/api/bookmarks/")&&Z.method==="DELETE"){let Y=J.slice(15);if(!X.deleteBookmark(Y))return new Response("Bookmark not found",{status:404});return await X.save(),Response.json({success:!0})}if(J==="/api/analytics/track"&&Z.method==="POST")try{let Y=await Z.json();if(Y.type==="view"&&Y.componentId)B.trackView(Y.componentId,Y.variantId);else if(Y.type==="prop_change"&&Y.componentId&&Y.propName)B.trackPropChange(Y.componentId,Y.propName,null);else if(Y.type==="variant_switch"&&Y.componentId&&Y.variantId)B.trackVariantSwitch(Y.componentId,Y.variantId);else if(Y.type==="search"&&Y.query)B.trackSearch(Y.query,0);return await B.save(),Response.json({success:!0})}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/analytics/summary"&&Z.method==="GET")return Response.json({mostViewed:B.getMostViewedComponents(10),mostChangedProps:B.getMostChangedProps(10),searchAnalytics:B.getSearchAnalytics()});if(J.startsWith("/api/analytics/component/")&&Z.method==="GET"){let Y=J.slice(25),W=z.storyFiles.find((U)=>U.id===Y),j=B.getComponentAnalytics(Y,W?.fileName||Y);return Response.json(j)}return new Response("Not found",{status:404})}function kz(z,J,Z){let K=Sz(z,Z);return new Response(K,{headers:{"Content-Type":"text/html; charset=utf-8"}})}function Sz(z,J){let{theme:Z}=z.config,K=Z.title||"STX Story",$=`ws://localhost:${J}/__hmr`,X=r($);return`<!DOCTYPE html>
|
|
562
562
|
<html lang="en" class="${Z.darkClass||"dark"}">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import z from"fs";function B(x){return[...x].sort().map((b)=>{try{let j=z.statSync(b);return`${b}:${j.size}:${j.mtimeMs}`}catch{return`${b}:missing`}}).join(`
|
|
3
3
|
`)}function C(x,b,j){let q=x.get(b);return q!==void 0&&q.signature===j?q.value:void 0}function D(x,b,j,q){return x.set(b,{signature:j,value:q}),q}
|
|
4
|
-
export{B as
|
|
4
|
+
export{B as cj,C as dj,D as ej};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{cj as v,dj as F,ej as P}from"./chunk-91007tan.js";import{Tp as B,Vl as K,ir as S}from"./chunk-17389q0t.js";import{Zt as _,_t as x}from"./chunk-00mag1n0.js";import{cu as N}from"./chunk-ze3qgdaf.js";import U from"path";var j=new Map,E=new Map,h=["composables","functions"];function T(Q){let z=U.basename(Q,".ts");return z==="index"||z==="types"||Q.endsWith(".d.ts")}async function D(Q){if(Q)return U.resolve(Q);let z=`<default>:${process.cwd()}`,Y=E.get(z);if(Y!==void 0)return Y;let J=await u();if(J!==null)E.set(z,J);return J}async function u(){let Q=await S(),z=Q.root||process.cwd(),Y=Q.composablesDir;if(Y)return U.resolve(z,Y);for(let J of h){let V=U.resolve(z,J);try{let W=new Bun.Glob("**/*.ts");for await(let Z of W.scan({cwd:V,absolute:!0}))if(!T(Z))return V}catch{}}return null}async function i(Q){let z=await D(Q);if(!z)return[];let Y=[];try{let W=new Bun.Glob("**/*.ts");for await(let Z of W.scan({cwd:z,absolute:!0}))if(!T(Z))Y.push(Z)}catch{return[]}Y.sort();let J=B({loader:"ts",target:"browser",define:K()}),V=[];for(let W of Y)try{let Z=await Bun.file(W).text(),$=J.scan(Z).exports.filter((G)=>G!=="default");if($.length>0)V.push({file:W,names:$})}catch{}return V}function f(Q,z){return new RegExp(`\\b${z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(Q)}function p(Q,z,Y){let J=new Map;for(let{file:$,names:G}of Q)for(let O of G)if(!J.has(O))J.set(O,$);let V=($)=>{let G=[];for(let[O,L]of J)if(f($,O))G.push(L);return G},W=new Set,Z=Y.flatMap(V);while(Z.length>0){let $=[];for(let G of Z){if(W.has(G))continue;W.add(G);for(let O of V(z.get(G)??""))if(!W.has(O))$.push(O)}Z=$}return W}async function o(Q,z,Y){let J=await D(Q);if(!J)return null;let V=[];try{let q=new Bun.Glob("**/*.ts");for await(let H of q.scan({cwd:J,absolute:!0})){if(T(H))continue;V.push(H)}}catch{return P(j,J,"",""),null}let W=v(V);if(V.length===0)return P(j,J,W,""),null;V.sort();let Z=B({loader:"ts",target:"browser",define:K()}),$=new Map,G=[];for(let q of V)try{let H=await Bun.file(q).text();$.set(q,H);let w=Z.scan(H).exports.filter((X)=>X!=="default");if(w.length>0)G.push({file:q,names:w})}catch{$.set(q,"")}let O=z===void 0?new Set(V):p(G,$,Y?[z,...Y]:[z]);if(O.size===0)return null;let L=V.filter((q)=>O.has(q)),A=`${J}\x00${L.join("\x00")}`,I=F(j,A,W);if(I!==void 0)return I||null;let M=[],R=new Set,k=new Set;for(let q of L)try{let H=$.get(q)??await Bun.file(q).text(),w=U.basename(q,".ts");for(let X of H.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(X[1])k.add(X[1]);try{for(let X of Z.scan(H).exports)if(X!=="default")R.add(X)}catch{}H=_(H),H=x(H),H=H.replace(/^export\s+(default\s+)?/gm,""),H=Z.transformSync(H),M.push(`// Composable: ${w}
|
|
3
3
|
${H.trim()}`)}catch(H){console.warn(`[stx] Failed to load composable ${q}:`,H)}if(M.length===0||R.size===0)return P(j,A,W,""),null;let b=[...R].map((q)=>` try { __c[${JSON.stringify(q)}] = ${q}; } catch (e) {}`).join(`
|
|
4
4
|
`),g=JSON.stringify([...R]),y=M.join(`
|
|
5
5
|
|
|
@@ -25,4 +25,4 @@ ${b}
|
|
|
25
25
|
window[__n] = __c[__n];
|
|
26
26
|
}
|
|
27
27
|
})();`;return P(j,A,W,C),C}function e(){j.clear(),E.clear()}
|
|
28
|
-
export{i as
|
|
28
|
+
export{i as $i,o as aj,e as bj};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-
|
|
2
|
+
import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-6bcw8twx.js";import E from"fs";import K from"path";var V=[];function _(U){V=[];for(let A of U.storyFiles)if(V.push({text:A.fileName.toLowerCase(),original:A.fileName,type:"story",storyId:A.id}),V.push({text:A.relativePath.toLowerCase(),original:A.relativePath,type:"story",storyId:A.id}),A.story)for(let z of A.story.variants)V.push({text:z.title.toLowerCase(),original:z.title,type:"story",storyId:A.id,variantId:z.id})}function $(){return JSON.stringify(V)}async function O(U={}){let A=Date.now();N();let z=await k({mode:"build"});if(!z.config.enabled){W("Story feature is disabled in config.");return}let P=await H(z);w(z,P);let Y=J(z.config,P);B(z,Y),R(P.length);let X=U.outDir??z.config.outDir,Q=K.resolve(z.root,X);await E.promises.mkdir(Q,{recursive:!0}),console.log(` Building to ${X}...`);let M=F(z);await E.promises.writeFile(K.join(Q,"index.html"),M);let v={files:P.map((G)=>({id:G.id,fileName:G.fileName,relativePath:G.relativePath,treePath:G.treePath})),tree:Y};await E.promises.writeFile(K.join(Q,"stories.json"),JSON.stringify(v,null,2));let L={theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets};await E.promises.writeFile(K.join(Q,"config.json"),JSON.stringify(L,null,2));let Z=K.join(Q,"stories");await E.promises.mkdir(Z,{recursive:!0});for(let G of P){let g=await E.promises.readFile(G.path,"utf-8");await E.promises.writeFile(K.join(Z,`${G.id}.stx`),g)}_(z);let T=$();await E.promises.writeFile(K.join(Q,"search-index.json"),T);let C=Date.now()-A;j(P.length,X,C)}function F(U){let{theme:A}=U.config,z=A.title||"STX Story";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$g as
|
|
2
|
+
import{$g as h,Ug as a,Vg as b,Wg as c,Xg as d,Yg as e,Zg as f,_g as g,ah as i}from"./chunk-shem708r.js";import"./chunk-6rzwef28.js";import"./chunk-6bcw8twx.js";export{c as setCachedImageResult,e as processImage,f as optimizeImage,b as getCachedImageResult,i as generateSrcset,h as generateResponsiveVariants,d as clearImageCache,g as applyTransformations,a as ImageProcessorCache};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ov as y}from"./chunk-6bcw8twx.js";function S4(){if(typeof Notification<"u"&&Notification.permission==="granted")return!0;return!1}function jZ(){return typeof window<"u"&&typeof document<"u"}async function w4(){if(typeof Notification>"u")return!1;if(Notification.permission==="granted")return!0;if(Notification.permission==="denied")return!1;return await Notification.requestPermission()==="granted"}var g=new Map;function B4(){return`alert-${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function f4(Z){switch(Z){case"info":return"ℹ";case"success":return"✔";case"warning":return"⚠";case"error":return"✖";default:return"ℹ"}}function v4(Z="top-right"){if(!jZ())throw Error("Toast container requires browser environment");try{let $=document.querySelector(`.stx-toast-container[data-position="${Z}"]`);if($)return $}catch{}let Y=document.createElement("div");Y.className=`stx-toast-container ${Z}`,Y.dataset.position=Z;try{if(document.body)document.body.appendChild(Y)}catch{}return Y}function y4(Z){let{options:Y}=Z,$=f4(Y.type),J=Y.type||"info",Q=Y.duration!==0;return`
|
|
3
3
|
<div class="stx-toast ${J}" data-alert-id="${Z.id}" role="alert" aria-live="polite">
|
|
4
4
|
<div class="stx-toast-icon">${$}</div>
|
|
5
5
|
<div class="stx-toast-content">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
`),B;try{let{bundleClientScript:j}=await import("./chunk-
|
|
2
|
+
import{ov as H}from"./chunk-6bcw8twx.js";import P from"path";var $=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function G(...v){let w=new Set;for(let q of v){if(!q||!q.includes("__stxModules["))continue;for(let z of q.matchAll($))try{w.add(JSON.parse(`"${z[1]}"`))}catch{}}return[...w].sort()}async function T(v,w={}){if(v.length===0)return null;let q=process.cwd(),z=[],J=[];v.forEach((j,X)=>{let Z=j.startsWith("npm:")?j.slice(4):P.resolve(q,j),N=`__stxRegistered${X}`,O=JSON.stringify(j);z.push(`import * as ${N} from ${JSON.stringify(Z)};`),J.push(`if (!globalThis.__stxModules[${O}]) globalThis.__stxModules[${O}] = ${N};`)});let L=[...z,"globalThis.__stxModules = globalThis.__stxModules || {};",...J].join(`
|
|
3
|
+
`),B;try{let{bundleClientScript:j}=await import("./chunk-0hjsgddy.js");B=await j(L,P.join(q,".stx-module-registry.ts"),{projectRoot:q,minify:w.minify,externalizeUserModules:!1})}catch(j){return console.warn("[stx] could not build the page module registry (#1957):",j),null}let{transformAutoImports:Q,generateAutoImportDestructuring:U}=await import("./chunk-cgw60tse.js"),F=Q(B),V=U(F.stxImports,F.browserImports),{transformStoreImports:W}=await import("./chunk-jv41s3xp.js");B=W(F.code);let M=JSON.stringify(new Bun.CryptoHasher("md5").update(L).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${M}]) return;`,` __stxBundles[${M}] = true;`,V,B,"})();"].join(`
|
|
4
4
|
`)}export{G as registeredModuleIdsIn,T as buildModuleRegistryScript};
|
|
@@ -144,4 +144,4 @@ var N=new Map,Q=new Map;function T(A){if(N.set(A.name,A),A.client)Q.set(A.name,A
|
|
|
144
144
|
console.log('[stx] Directive runtime initialized');
|
|
145
145
|
})();
|
|
146
146
|
`}function $(A){let B=/v-(\w+)(?::(\w+))?(?:\.([\w.]+))?="([^"]*)"/g;return A.replace(B,(C,F,H,L,J)=>{let E=(L?L.split("."):[]).reduce((M,S)=>{return M[S]=!0,M},{});return`data-stx-directive="${F}:${J}" data-stx-directive-arg="${H||""}" data-stx-directive-modifiers='${JSON.stringify(E)}'`})}
|
|
147
|
-
export{T as
|
|
147
|
+
export{T as Rs,V as Ss,W as Ts,X as Us,G as Vs,Y as Ws,Z as Xs,_ as Ys,$ as Zs};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-6bcw8twx.js";function F(){return`<script data-stx-scoped data-stx-x-element-runtime data-stx-run="always">
|
|
3
3
|
(function() {
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$ as wl,$a as rn,$b as Jo,$c as Jp,$d as Jq,A as gk,Aa as Bm,Ab as bo,Ac as ip,Ad as iq,Ae as or,B as hk,Ba as Cm,Bb as co,Bc as jp,Bd as jq,Be as pr,C as ik,Ca as Pm,Cb as eo,Cc as kp,Cd as kq,Ce as qr,D as jk,Da as Qm,Db as fo,Dc as lp,Dd as lq,De as rr,E as $k,Ea as Rm,Eb as go,Ec as mp,Ed as mq,Ee as sr,F as al,Fa as Sm,Fb as ho,Fc as np,Fd as nq,Fe as tr,G as bl,Ga as Tm,Gb as io,Gc as op,Gd as oq,Ge as ur,H as cl,Ha as Um,Hb as jo,Hc as pp,Hd as pq,He as vr,I as dl,Ia as Ym,Ib as ko,Ic as qp,Id as qq,Ie as wr,J as el,Ja as Zm,Jb as lo,Jc as rp,Jd as rq,Je as xr,K as fl,Ka as _m,Kb as mo,Kc as sp,Kd as sq,Ke as yr,L as gl,La as $m,Lb as no,Lc as tp,Ld as tq,Le as zr,M as hl,Ma as an,Mb as uo,Mc as up,Md as uq,Me as Ar,N as il,Na as bn,Nb as vo,Nc as vp,Nd as vq,Ne as Br,O as jl,Oa as cn,Ob as wo,Oc as wp,Od as wq,Oe as Cr,P as kl,Pa as dn,Pb as xo,Pc as xp,Pd as xq,Pe as Dr,Q as ll,Qa as en,Qb as yo,Qc as yp,Qd as yq,Qe as Er,R as ml,Ra as fn,Rb as zo,Rc as zp,Rd as zq,Re as Fr,S as nl,Sa as gn,Sb as Ao,Sc as Ap,Sd as Aq,Se as Gr,T as ol,Ta as hn,Tb as Bo,Tc as Bp,Td as Bq,Te as Hr,U as pl,Ua as jn,Ub as Co,Uc as Cp,Ud as Cq,Ue as Ir,V as ql,Va as kn,Vb as Do,Vc as Dp,Vd as Dq,Ve as Jr,W as rl,Wa as mn,Wb as Eo,Wc as Ep,Wd as Eq,We as Kr,X as sl,Xa as nn,Xb as Fo,Xc as Fp,Xd as Fq,Y as tl,Ya as on,Yb as Go,Yc as Gp,Yd as Gq,Z as ul,Za as pn,Zb as Ho,Zc as Hp,Zd as Hq,_ as vl,_a as qn,_b as Io,_c as Ip,_d as Iq,aa as xl,ab as sn,ac as Ko,ad as Kp,ae as Kq,ba as yl,bb as tn,bc as Lo,bd as Lp,be as Lq,ca as zl,cb as un,cc as Mo,cd as Mp,ce as Mq,da as Al,db as vn,dc as No,dd as Np,de as Nq,ea as Bl,eb as wn,ec as Oo,ed as Op,ee as Oq,fa as Cl,fb as xn,fc as Po,fd as Pp,fe as Pq,ga as Dl,gb as yn,gc as Qo,gd as Qp,ge as Qq,ha as El,hb as zn,hc as Ro,hd as Rp,he as Rq,ia as Fl,ib as An,ic as So,id as Sp,ie as Sq,ja as Gl,jb as Bn,jc as To,jd as Tp,je as Tq,ka as Hl,kb as Cn,kc as Uo,kd as Up,ke as Uq,la as Il,lb as Dn,lc as Vo,ld as Vp,le as Vq,ma as Jl,mb as En,mc as Wo,md as Wp,me as Wq,na as Kl,nb as Hn,nc as Xo,nd as Xp,ne as br,o as a,oa as Ll,ob as In,oc as Yo,od as Yp,oe as cr,p as Tj,pa as qm,pb as Jn,pc as Zo,pd as Zp,pe as dr,q as Uj,qa as rm,qb as Kn,qc as _o,qd as _p,qe as er,r as Vj,ra as sm,rb as Qn,rc as $o,rd as $p,re as fr,s as Wj,sa as tm,sb as Rn,sc as ap,sd as aq,se as gr,t as Xj,ta as um,tb as Sn,tc as bp,td as bq,te as hr,u as Yj,ua as vm,ub as Tn,uc as cp,ud as cq,ue as ir,v as Zj,va as wm,vb as Yn,vc as dp,vd as dq,ve as jr,w as _j,wa as xm,wb as Zn,wc as ep,wd as eq,we as kr,x as $j,xa as ym,xb as _n,xc as fp,xd as fq,xe as lr,y as ek,ya as zm,yb as $n,yc as gp,yd as gq,ye as mr,z as fk,za as Am,zb as ao,zc as hp,zd as hq,ze as nr}from"./chunk-gfrznj5v.js";import{Xe as Ln}from"./chunk-sqqwas4j.js";import{$e as ln,Ye as Vm,Ze as Wm,_e as Xm,af as Mn,bf as Nn,cf as On,df as Pn,ef as Un,ff as Vn,gf as Wn,hf as Xn}from"./chunk-pt902dd9.js";import{if as kk,jf as lk,kf as mk,lf as nk,mf as ok,nf as pk,of as qk,pf as rk,qf as sk,rf as tk,sf as uk,tf as vk,uf as wk,vf as xk,wf as yk}from"./chunk-ps20v1ah.js";import{Af as Sk,Bf as Tk,Cf as Uk,Df as Vk,Ef as Wk,Ff as Xk,Gf as Yk,Hf as Zk,If as _k,xf as Pk,yf as Qk,zf as Rk}from"./chunk-kpgvx2p1.js";import{Jf as oo,Kf as po,Lf as qo,Mf as ro,Nf as so,Of as to}from"./chunk-2d9yq3m4.js";import{Pf as Fn,Qf as Gn}from"./chunk-mjpqz66q.js";import{Rf as em,Sf as fm,Tf as gm,Uf as hm,Vf as km,Wf as om}from"./chunk-k4v9k7vj.js";import{$f as Ql,Xf as Ml,Yf as Nl,Zf as Ol,_f as Pl,ag as Rl,bg as Sl,cg as Tl,dg as Ul,eg as Vl,fg as Wl,gg as Xl,hg as Yl,ig as Zl,jg as _l,kg as $l,lg as lm,mg as mm,ng as nm}from"./chunk-trpmf02p.js";import{og as im,rg as jm}from"./chunk-yq903p32.js";import{Ag as Em,Bg as Fm,Cg as Gm,Dg as Hm,Eg as Im,Fg as Jm,Gg as Km,Hg as Lm,Ig as Mm,Jg as Nm,Kg as Om,zg as Dm}from"./chunk-634gaa9d.js";import{Lg as Nk,Mg as Ok}from"./chunk-mzbnczgk.js";import{Ng as pm}from"./chunk-ykgj5w4g.js";import{Og as Dh,Pg as Eh,Qg as Fh,Rg as Gh,Sg as Hh,Tg as Ih}from"./chunk-p2aa1ak4.js";import{$g as $i,Ug as Xi,Vg as Yi,Wg as Zi,_g as _i,ah as aj}from"./chunk-shem708r.js";import{bh as gj,ch as hj,dh as ij,eh as jj,fh as kj,gh as lj,hh as mj,ih as nj,jh as oj,kh as pj,lh as qj}from"./chunk-5c8f2rt7.js";import{mh as Ni,nh as Oi,oh as Pi,ph as Qi,qh as Ri,sh as Si,th as Ti,uh as Ui,vh as Vi,wh as Wi}from"./chunk-6rzwef28.js";import{xh as Ij,zh as Jj}from"./chunk-683tfkz4.js";import{Fh as zk,Gh as Ak,Hh as Bk,Ih as Ck,Jh as Dk,Kh as Ek,Lh as Fk,Nh as Gk,Oh as Hk,Ph as Ik,Qh as Jk,Rh as Kk,Sh as Lk,Vh as Mk}from"./chunk-x14vvxfh.js";import{$h as jh,Wh as eh,Xh as fh,Yh as gh,Zh as hh,_h as ih,ai as kh,bi as lh,ci as mh,di as nh,ei as oh,fi as ph,gi as qh,hi as rh}from"./chunk-3bc8bqw2.js";import{ji as sh,ki as th,li as uh,mi as vh}from"./chunk-7eg7ep8f.js";import{ri as wh}from"./chunk-y9nyqcha.js";import{si as Ag}from"./chunk-qg6pg6ze.js";import{ti as Bg,ui as Cg}from"./chunk-6w8fa3b8.js";import{Ai as Ig,vi as Dg,wi as Eg,xi as Fg,yi as Gg,zi as Hg}from"./chunk-v8474ah4.js";import{Bi as Jg,Ci as Kg,Di as Lg,Ei as Mg,Fi as Ng}from"./chunk-x4prtyjs.js";import{Gi as Og,Hi as Pg,Ii as Qg,Ji as Rg,Ki as Sg}from"./chunk-6btbgxh1.js";import{Li as Tg,Mi as Ug,Ni as Vg,Oi as Wg,Pi as Xg,Qi as Yg,Ri as Zg}from"./chunk-ctz53mbz.js";import{Si as _g,Ti as $g,Ui as ah,Vi as bh,Wi as ch,Xi as dh}from"./chunk-weqpt9nt.js";import{Zi as xg,_i as yg}from"./chunk-rn2nsn9e.js";import{bj as zg}from"./chunk-9k5p10e4.js";import"./chunk-91007tan.js";import{fj as ue,gj as ve,hj as we,ij as xe,jj as ye,kj as ze,lj as Ae,mj as Be,nj as Ce,oj as De,pj as Ee,qj as Fe,rj as Ge,sj as He}from"./chunk-18kcg747.js";import{tj as Ye,uj as Ze}from"./chunk-mq0vtxe6.js";import{Bj as Ke,Cj as Le,Dj as Me,Ej as Ne,Fj as Oe,Gj as Pe,Hj as Qe,Ij as Re,Jj as Se,Kj as Te,Lj as Ue,Mj as Ve,Nj as We,Oj as Xe}from"./chunk-w8yac9xp.js";import{Pj as _e,Qj as $e,Rj as af,Sj as bf,Tj as cf,Uj as df,Vj as ef,Wj as ff,Xj as gf,Yj as hf,Zj as jf,_j as kf}from"./chunk-gn6m4f5p.js";import{sk as Xq,tk as Yq,uk as Zq,vk as _q,wk as $q,xk as ar}from"./chunk-7wh0eyz9.js";import{Ak as ck,Bk as dk,Ck as am,Dk as bm,Ek as cm,Fk as dm,yk as ak,zk as bk}from"./chunk-m8qcap5h.js";import"./chunk-7eea1cse.js";import"./chunk-r19ajkwr.js";import{$l as _b,$m as bd,$n as te,$o as Nf,$p as Th,$q as Bj,Al as Ia,Am as xc,An as Cd,Ao as nf,Ap as mg,Aq as Bi,Bl as Ja,Bm as yc,Bn as Dd,Bp as ng,Bq as Ci,Cl as Ka,Cm as Fc,Cn as Ed,Co as of,Cp as og,Cq as Di,Dl as La,Dm as Gc,Dn as Fd,Do as pf,Dp as pg,Dq as Ei,El as Ma,Em as Hc,En as Gd,Eo as qf,Ep as qg,Eq as Fi,Fl as Na,Fm as Ic,Fn as Hd,Fo as rf,Fp as rg,Fq as Gi,Gl as Oa,Gm as Jc,Gn as Yd,Go as sf,Gp as sg,Gq as Hi,Hl as ib,Hm as Kc,Hn as Zd,Ho as tf,Hp as tg,Hq as Ii,Il as jb,Im as Lc,In as _d,Io as uf,Ip as ug,Iq as Ji,Jl as kb,Jn as $d,Jo as vf,Jp as vg,Jq as Ki,Kl as lb,Km as Mc,Kn as ae,Ko as wf,Kp as wg,Kq as Li,Ll as mb,Lm as Nc,Ln as be,Lo as xf,Lp as xh,Lq as Mi,Ml as nb,Mm as Oc,Mn as ce,Mo as yf,Mp as yh,Mq as bj,Nm as Pc,Nn as de,No as zf,Np as zh,Nq as cj,Om as Qc,On as ee,Oo as Af,Op as Ah,Oq as dj,Pl as Fb,Pm as Rc,Pn as fe,Po as Bf,Pp as Bh,Pq as ej,Ql as Gb,Qm as Sc,Qn as ge,Qo as Cf,Qp as Ch,Qq as fj,Rl as Hb,Rm as Tc,Rn as he,Ro as Df,Rp as Jh,Rq as rj,Sl as Ib,Sm as Uc,Sn as ie,So as Ef,Sp as Kh,Sq as sj,Tl as Jb,Tm as Vc,Tn as je,To as Ff,Tp as Lh,Tq as tj,Ul as Nb,Um as Wc,Uo as Gf,Up as Mh,Uq as uj,Vl as Ob,Vm as Xc,Vn as ne,Vo as Hf,Vp as Nh,Vq as vj,Wl as Pb,Wm as Yc,Wn as oe,Wo as If,Wp as Oh,Wq as wj,Xl as Wb,Xm as Zc,Xn as pe,Xo as Jf,Xp as Ph,Xq as xj,Yl as Xb,Ym as _c,Yn as qe,Yo as Kf,Yp as Qh,Yq as yj,Zl as Yb,Zm as $c,Zn as re,Zo as Lf,Zp as Rh,Zq as zj,_l as Zb,_m as ad,_n as se,_o as Mf,_p as Sh,_q as Aj,am as $b,an as cd,ap as Of,aq as Uh,ar as Cj,bm as ac,bn as dd,bp as Pf,bq as Vh,br as Dj,cm as bc,cn as ed,cp as Qf,cq as Wh,cr as Ej,dm as cc,dn as fd,do as Ie,dp as Rf,dq as Xh,dr as Fj,em as dc,en as gd,eo as Je,ep as Sf,eq as Yh,er as Gj,fm as ec,fn as hd,fp as Tf,fq as Zh,fr as Hj,gm as fc,gn as id,go as lf,gp as Uf,gq as hi,gr as Kj,hm as gc,hn as jd,hp as Vf,hq as ii,hr as Lj,im as hc,in as kd,ip as Wf,iq as ji,ir as Mj,jm as ic,jn as ld,jp as Xf,jq as ki,jr as Nj,km as jc,kn as md,kp as Yf,kq as li,kr as Oj,ln as nd,lp as Zf,lq as mi,lr as Pj,mn as od,mp as _f,mq as ni,mr as Qj,nm as kc,nn as pd,np as $f,nq as oi,nr as Rj,om as lc,on as qd,op as ag,oq as pi,or as Sj,pl as xa,pm as mc,pn as rd,pp as bg,pq as qi,ql as ya,qm as nc,qn as sd,qp as cg,qq as ri,rl as za,rm as oc,rn as td,rp as dg,rq as si,sl as Aa,sm as pc,sn as ud,sp as eg,sq as ti,tl as Ba,tm as qc,tn as vd,tp as fg,tq as ui,ul as Ca,um as rc,un as wd,up as gg,uq as vi,vl as Da,vm as sc,vn as xd,vp as hg,vq as wi,wl as Ea,wm as tc,wn as yd,wp as ig,wq as xi,xl as Fa,xm as uc,xn as zd,xp as jg,xq as yi,yl as Ga,ym as vc,yn as Ad,yo as mf,yp as kg,yq as zi,zl as Ha,zm as wc,zn as Bd,zp as lg,zq as Ai}from"./chunk-17389q0t.js";import{Ar as m,As as ea,Br as n,Bs as fa,Cr as o,Cs as ia,Dr as p,Ds as ja,Er as q,Es as ka,Fr as r,Fs as la,Gr as s,Gs as ma,Hr as t,Hs as na,Ir as u,Is as oa,Jr as v,Js as pa,Kr as w,Ks as qa,Lr as x,Ls as ra,Mr as y,Ms as sa,Nr as z,Ns as ta,Or as A,Os as ua,Pr as B,Ps as va,Qr as C,Qs as wa,Rr as D,Sr as E,Tr as F,Ur as G,Vr as H,Wr as I,Xr as J,Yr as K,Zr as L,gs as M,hs as N,is as O,js as P,ks as Q,ls as R,ms as S,ns as T,os as U,pr as b,ps as V,qr as c,qs as W,rr as d,rs as X,sr as e,ss as Y,tr as f,ts as Z,ur as g,us as _,vr as h,vs as $,wr as i,ws as aa,xr as j,xs as ba,yr as k,ys as ca,zr as l,zs as da}from"./chunk-6xbscz34.js";import{Rs as _h,Ss as $h,Ts as ai,Us as bi,Vs as ci,Ws as di,Xs as ei,Ys as fi,Zs as gi}from"./chunk-bkbr9yz2.js";import{$s as ha,_s as ga}from"./chunk-nn4k6hvv.js";import{at as Kb,bt as Lb,ct as Mb}from"./chunk-1zyqv8p8.js";import{dt as ke,et as le,ft as me}from"./chunk-1zvyq6jj.js";import{At as Cc,Bt as Dc,Ct as Ec,ot as zc,pt as Ac,rt as Bc}from"./chunk-snsb8nm6.js";import{Dt as Qb,Et as Rb,Ft as Sb,Gt as Tb,Ht as Ub,It as Vb}from"./chunk-v4vvm7mz.js";import{Jt as Id,Kt as Jd,Lt as Kd,Mt as Ld,Nt as Md,Ot as Nd,Pt as Od,Qt as Pd,Rt as Qd,St as Rd,Tt as Sd,Ut as Td,Vt as Ud,Wt as Vd,Xt as Wd,Yt as Xd}from"./chunk-s710wybv.js";import"./chunk-00mag1n0.js";import"./chunk-d3r5pdz7.js";import{cu as ob,du as pb,eu as qb,fu as rb,gu as sb,hu as tb,iu as ub,ju as vb,ku as wb,lu as xb,mu as yb,nu as zb,ou as Ab,pu as Bb,qu as Cb,ru as Db,su as Eb}from"./chunk-ze3qgdaf.js";import{Au as Ra,Fu as Sa,Gu as Ta,Mu as Ua,Nu as Va,Ou as Wa,Pu as Xa,Qu as Ya,Ru as Za,Su as _a,Tu as $a,Uu as ab,Vu as bb,Wu as cb,Xu as db,Yu as eb,Zu as fb,_u as gb,av as hb,wu as Pa,xu as Qa}from"./chunk-54fnvfp1.js";import"./chunk-42b81qv3.js";import"./chunk-6bcw8twx.js";export{uk as writeNetlifyConfig,mm as writeManifest,Zk as writeImageManifest,Do as wrapComponentForHMR,xr as withDefaults,Hj as webComponentDirectiveHandler,sp as watermark,uq as watchViews,hl as watchMultiple,il as watchEffect,gl as watch,re as warmImagePlaceholders,vl as waitForStore,X as waitForLocale,po as virtualPathFor,uj as videoDirective,G as validators,Br as validated,he as validateValueEnhanced,yh as validateTemplate,xp as validateParams,ie as validateFormEnhanced,jq as validateFile,de as validateFields,ce as validateField,Ah as validateDirective,Cd as validateCspDirectives,Pj as validateConfig,rm as validateComponentScripts,Pm as validateComponentProps,wg as validateClientScript,vh as v,rc as usesSignalsInScript,ub as usesReactiveRuntime,Nh as userComponentFileExists,bh as useVirtualList,Qd as useTitle,ul as useStoreOrThrow,Vo as useStore,ek as useStorage,Fq as useSlots,gk as useSessionStorage,Nd as useSeoMeta,wl as useRouteParams,yl as useRouteParamOrThrow,xl as useRouteParam,Qd as usePageTitle,Xe as useOptimistic,Al as useMiddlewareValue,zl as useMiddlewareState,fk as useLocalStorage,wo as useLoadingIndicator,Ld as useHead,sh as useForm,Hq as useAttrs,lq as uploadFiles,kq as uploadFile,rl as updateInstance,Ve as untrack,bi as unregisterDirective,sl as unmountInstance,yc as unescapeHtml,so as typecheckStxFiles,Mh as transpileTypeScript,kr as translate,Ba as transitionDirective,_b as transformAutoImports,Jm as toUsers,Im as toUser,bp as thumbnail,cq as thumbHashToRGBA,dq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,_e as templateCache,Uc as syncRecordedResponse,Ao as stxClientHelpers,Gf as structuredDataDirective,nr as stripLocalePrefix,Zl as stripDocumentWrapper,Lb as stripCommentsAndLiterals,vn as stringToStream,qd as strictCspPreset,Ce as streamingSuspenseDirective,Ge as streamToResponse,Ae as streamTemplateSimple,ue as streamTemplate,$j as stopHmrServer,Fm as stopBroadcasting,Tb as stateDirName,Ub as stateDir,Ke as state,qg as startsDocument,Xn as startProductionServer,Ln as startInteractive,Em as startBroadcasting,pr as stampLocaleLayoutGroup,Ia as staggerDirective,vp as srcsetUrls,Ja as springDirective,$c as splitByPipe,Vl as spaNavVaryHeaders,qo as sourcePathFor,Cp as smartBatchSign,Ph as slotContentHasExpressions,Ap as signUrl,Kh as shouldTranspileTypeScript,Yj as shouldReloadOnChange,Fp as shouldRefreshSignature,Zj as shouldIgnoreFile,Vg as shouldCacheComponent,fp as sharpen,Er as shape,Sb as setStateDir,El as setRouteParams,Fl as setMiddlewareState,qe as setImagePlaceholder,zq as setGlobalProvide,b as setErrorLocale,$k as setCurrentInstance,ij as setCachedVideoResult,Zi as setCachedImageResult,Ti as setCached,Hr as serveStxFile,Jr as serveMultipleStxFiles,Tj as serveMarkdownFile,go as serveFile,Kr as serveApp,fo as serve,Go as serializeState,ln as serializeSetCookie,hp as sepia,Od as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,yj as scopeHTML,xj as scopeCSS,Jf as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,lp as saturation,yp as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,zf as runPreProcessingMiddleware,Af as runPostProcessingMiddleware,On as runPageAction,Qe as runMountCallbacks,gb as runMiddleware,pl as runHooks,dr as runDoctor,Re as runDestroyCallbacks,Of as runComposers,mp as rotate,wh as rewriteImagesWithSiblings,Vc as responseBindings,Th as resolveTemplatePath,ha as resolveStxTargets,Lj as resolveStxDirectories,jr as resolveI18n,$o as resize,ec as resetPlaceholders,Kd as resetHead,Fo as resetHMRHandler,o as resetErrorConfig,zr as required,ic as replacePlaceholders,sq as renderView,rj as renderVideoComponent,Xb as renderVendorStyleTags,Oq as renderToString,Pq as renderToStream,Qq as renderToDOM,bq as renderThumbhashToCanvas,ar as renderTemplateString,_q as renderTemplate,$q as renderString,xe as renderStreamingPage,Fh as renderSlot,Lg as renderSSRSuspense,Np as renderProtectedVideo,Mp as renderProtectedImg,zp as renderMediaUpload,Zq as renderMarkdownView,cm as renderLayoutTypes,bj as renderImgComponent,Pk as renderImageComponent,Sd as renderHtmlAttrs,Rd as renderHead,vq as renderEmail,Rh as renderComponentWithSlot,Td as renderBodyAttrs,Qo as render,sd as relaxedCspPreset,be as registerValidationRule,Ee as registerStreamingDirectives,Xo as registerStoresClient,Cl as registerStore,Hf as registerSeoDirectives,_a as registerMiddleware,mc as registerFilters,lc as registerFilter,d as registerErrorMessages,ge as registerEnhancedValidationRule,_h as registerDirective,Bd as registerCspDirectives,Sm as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,dl as ref,Dn as redirect,Qc as recordResponseStatus,Rc as recordResponseHeader,Vb as rebaseOntoStateDir,Sc as readResponseStatus,Tc as readResponseHeaders,Rj as readMarkdownFile,$e as readFileCached,el as reactive,qp as quality,Kp as pruneSignatureCache,Wi as pruneCache,xq as provide,Yq as protectCodeBlocks,yr as prop,Rf as processVueTemplate,$g as processVirtualListDirectives,dh as processVirtualGridDirectives,qj as processVideo,ee as processValidateDirective,ea as processTranslateDirective,Fg as processTransitionDirectives,Ig as processTransitionAttributes,Wd as processTitleDirective,Ic as processTemplateBindings,Bg as processTeleportDirectives,Jg as processSuspenseDirectives,Cf as processStructuredData,ye as processStreamDirectives,Wc as processStatusDirective,qh as processStaticDirectives,xf as processStackReplacements,wf as processStackPushDirectives,Gh as processSlots,Xl as processShell,te as processServerBindings,Df as processSeoDirective,Fe as processSectionDirectives,Uf as processScopedStyles,Gc as processReactiveBindings,Op as processProtectedMedia,jh as processPartialHydrationDirectives,vg as processOnceDirective,yf as processMiddleware,Bf as processMetaDirectives,Xd as processMetaDirective,Sj as processMarkdownFileDirectives,Yh as processMarkdownDirectives,rf as processLoops,Tg as processKeepAliveDirectives,ug as processJsonDirective,ch as processInfiniteListDirectives,vf as processIncludes,dj as processImgComponents,Rk as processImageComponents,Ek as processImage,Vd as processHeadDirective,Zd as processForms,$d as processFormInputDirectives,vc as processExpressions,Ib as processEventDirectives,ae as processErrorDirective,Sf as processDynamicComponents,xh as processDirectives,gi as processDirectiveAttributes,Ag as processDeferDirectives,Gd as processCustomDirectives,yd as processCspDirectives,Fr as processComponentProps,dc as processClientScript,_d as processBasicFormDirectives,Og as processAsyncDirectives,Hd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,me as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,vo as preloadIslandHandlers,se as preloadIconCollection,Am as poolStrings,Jj as pluginManager,oe as placeholdersWarmed,Eg as performLeave,Dg as performEnter,Se as pendingLifecycleCounts,We as peek,sf as partialsCache,sj as parseVideoDirectiveOptions,Zo as parseUrl,eq as parseThumbhashString,fd as parseSwitchBlock,Dh as parseSlots,Eh as parseSlotElement,kd as parseScriptDeclarations,Fj as parseSFCComponent,Pp as parseProtectedArgs,qf as parseLoopBinding,cj as parseImgComponent,ui as parseImageUrl,Qk as parseImageComponent,Mn as parseFormBody,hd as parseExpressionWithFilters,Tm as parseDefaults,An as parseCookies,Ol as parseContainerSelector,cd as parseConditionalBlock,id as parseArguments,Ma as parseAnimationShorthand,Ar as optional,Bm as optimizeTemplate,Wk as optimizeImage,Xk as optimizeDirectory,Cr as oneOf,tf as onceStore,ml as onUpdated,Fc as onUpdate,ol as onUnmounted,Jl as onServer,kl as onMounted,Oe as onMount,ph as onHydrated,Dq as onErrorCaptured,Pe as onDestroy,Zg as onDeactivated,Il as onClient,ll as onBeforeUpdate,nl as onBeforeUnmount,jl as onBeforeMount,Yg as onActivated,Zp as observeElement,En as notFound,Zf as normalizeCriticalHeadOrder,Cq as nextTick,Wm as negotiateEncoding,Ua as navigateTo,ql as mountInstance,Ea as motionDirective,rd as moderateCspPreset,zm as minifyHtml,Ff as metaDirective,ig as metaDedupKey,_o as mergeParams,kg as mergeHtmlAttrs,Md as mergeHeadConfigs,Ac as mergeCssConfig,vd as mergeCspDirectives,Ra as matchRoute,Zh as markdownDirectiveHandler,Qj as markdownCache,ga as looksLikeGlob,mr as localizePath,U as loadTranslationLazy,_ as loadTranslation,Mj as loadStxConfig,db as loadMiddlewareFromDirectory,nm as loadManifest,Vp as loadElement,Gm as loadChannels,tr as lintStxStrict,Xp as lazyLoadAll,Wp as lazyLoad,Ha as keyframeDirective,Mq as jsxs,Nq as jsxDEV,Lq as jsx,Cn as jsonResponse,De as islandDirective,l as isTest,_l as isSpaNavigation,Tl as isSpaNavRequest,Dp as isSignatureValid,Te as isSignal,Ck as isSharpAvailable,on as isServerEnvironment,Gl as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Sp as isNativeLazySupported,Xq as isMarkdownPath,Q as isLoading,R as isLoaded,Jh as isJavaScriptScript,Tp as isIntersectionObserverSupported,Kk as isImageFile,Dk as isImageBackendAvailable,aa as isICUFormat,oh as isHydrated,Oh as isHydrateTrigger,Oc as isHttpStatus,nn as isEdgeEnvironment,ur as isDirectiveKind,k as isDevelopment,Ue as isDerived,Xj as isCssOnlyChange,Vm as isCompressible,Hl as isClient,Qg as isAsyncComponent,Nn as isActionableMethod,ip as invert,bf as invalidateFileCacheByDir,af as invalidateFileCache,uc as interpolateScriptsInTemplate,sc as interpolateScriptExpressions,tc as interpolateScriptAttributes,x as inlineError,ir as injectThemeBootstrap,Ef as injectSeoTags,fr as injectSeo,lf as injectRouterScript,Wj as injectHotReload,kb as injectHeatmap,Ec as injectCss,wd as injectCspMetaTag,sg as injectConfigHeadTags,Yf as injectColorModeBootScript,mg as injectCloakStyle,dg as injectBuildId,Zb as injectBrowserCoreAutoImports,Kc as injectAnalytics,yq as inject,Bl as initStoreRegistry,xk as initNetlify,xo as initLoadingIndicator,Up as initLazyLoading,Kn as initFile,aq as initBlurUp,gq as initAllBlurUp,fj as imgDirective,Uk as imageDirective,Vn as hydrateTemplateStream,Un as hydrateTemplate,uo as hydrateIslands,lh as hydrateIsland,Wn as hydrateFragment,mh as hydrateByStrategy,nh as hydrateAll,No as hydrate,eo as htmlResponse,og as hoistLeadingHeadTags,_f as hoistColorModeBootScript,lb as heatmapDirective,Pi as hashString,kf as hashFilePath,Ni as hashFile,Oi as hashBuffer,Qf as hasVueTemplateSyntax,pf as hasVariables,So as hasStore,jc as hasPlaceholders,vk as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,rg as hasDocumentShell,Bh as hasDirectives,ma as hasDOMSupport,Nk as handleImageRequest,Eq as handleError,Uq as h,Jk as groupVariantsByFormat,gp as grayscale,Yn as gitHash,tm as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,qk as getTotalSize,Ep as getTimeUntilExpiry,xg as getStoreScript,To as getStoreNames,Ro as getStore,jk as getStorageSize,ik as getStorageKeys,Uh as getSourceLineInfo,Lh as getSharedTranspiler,ff as getServeClientAsset,la as getScreenReaderOnlyStyle,zj as getScopeAttribute,Je as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,zh as getPositionInfo,gc as getPlaceholderRegistry,Mi as getPlaceholderCacheStats,Jd as getPageMeta,md as getNonce,Lk as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,ne as getImagePlaceholder,Fk as getImageMetadata,ke as getImageDelivery,Mo as getHydrationRuntime,Dl as getHydratedStoreState,_j as getHmrServer,Id as getHead,Eo as getHMRHandler,yi as getFormatExtension,Ri as getFileMtime,Ik as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,ai as getDirectives,$h as getDirective,al as getCurrentInstance,Bc as getCssServeAsset,ud as getCspPreset,Dd as getCspHeaderName,Xh as getComponentCacheStats,hj as getCachedVideoResult,Ip as getCachedSignature,df as getCachedSignalsRuntime,ef as getCachedRouterScript,Ki as getCachedPlaceholder,Yi as getCachedImageResult,Si as getCached,Vi as getCacheStats,bg as getBuildId,Dm as getBroadcastServer,xi as getBestVariant,nc as getAllFilters,li as generateWidthSrcset,ah as generateVirtualListCSS,nq as generateVideoPreview,je as generateValidationScript,oq as generateUploadRuntime,um as generateTreeShakenBundle,Hg as generateTransitionRuntime,Gg as generateTransitionCSS,lj as generateThumbnails,Di as generateThumbhashPlaceholder,dn as generateTemplatesDocs,Ng as generateSuspenseRuntime,Mg as generateSuspenseCSS,Ho as generateStateScript,vi as generateSrcsetData,aj as generateSrcset,Gk as generateSrcSet,mj as generateSpriteSheet,wq as generateSpaShell,wi as generateSourceTags,ri as generateSizesFromBreakpoints,qi as generateSizesAttribute,Hk as generateSizes,If as generateSitemapIndex,gr as generateSitemap,Rp as generateSimpleMediaPicker,Lp as generateSignatureRuntime,Ze as generateSignalsRuntimeDev,Ye as generateSignalsRuntime,cc as generateServerDataBridge,wj as generateScopeId,Gj as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,Kf as generateRobotsTxt,hr as generateRobots,$i as generateResponsiveVariants,Cj as generateReactiveWebComponentTS,Bj as generateReactiveWebComponent,Ej as generateReactiveRuntime,Dj as generateReactiveMixin,kj as generatePoster,Ji as generatePlaceholderStyle,Ii as generatePlaceholderCSS,Ci as generatePlaceholder,kh as generatePartialHydrationCSS,ld as generateNonce,rk as generateNetlifyToml,qq as generateMinifiedMediaRuntime,pq as generateMediaRuntime,Qp as generateMediaManagerEmbed,lm as generateManifest,zo as generateLoadingIndicatorHtml,$p as generateLazyLoadRuntime,dm as generateLayoutTypes,Fi as generateLQIP,Xg as generateKeepAliveRuntime,Wg as generateKeepAliveCSS,rh as generateIslandManifest,mq as generateImagePreview,Yk as generateImageManifest,Lo as generateHydrationScript,He as generateHydrationRuntime,Oo as generateHydrationCSS,eh as generateHydrationBootstrap,Vj as generateHotReloadScript,jb as generateHeatmapScript,Co as generateHMRClientScript,nj as generateHLSManifest,Io as generateEventBindings,pi as generateDprSrcsetWithVariableQuality,oi as generateDprSrcset,pg as generateDocumentShell,jn as generateDocs,en as generateDirectivesDocs,fi as generateDirectiveRuntime,Lf as generateDefaultRobotsTxt,oj as generateDASHManifest,Dc as generateCss,pd as generateCspMetaTag,od as generateCspHeader,Jq as generateCompositionRuntime,cn as generateComponentsDocs,fh as generateComponentManifest,an as generateComponentDoc,Hi as generateColorPlaceholder,Xf as generateColorModeBootScript,tl as generateClientRuntime,Qi as generateCacheKey,ac as generateBrowserAutoImportDestructuring,hq as generateBlurUpRuntime,iq as generateBlurUpCSS,Hc as generateBindingsRuntime,mi as generateAutoWidthSrcset,$b as generateAutoImportDestructuring,Sg as generateAsyncComponentRuntime,Rg as generateAsyncComponentCSS,Na as generateAnimationRuntime,La as generateAnimationCSS,Jc as generateAnalyticsScript,to as formatTypecheckDiagnostics,no as formatTypeErrors,Hn as formatStxContent,pk as formatSize,Ta as formatRoutes,In as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,er as formatDoctorReport,fn as formatDocsAsMarkdown,hn as formatDocsAsJson,gn as formatDocsAsHtml,pp as format,ym as foldConstants,op as flipVertical,np as flipHorizontal,em as fingerprint,ro as findRuntimeTypeDeclarations,cr as findPantryPackage,bd as findMatchingEndTag,Zc as findMatchingDelimiter,Kb as findInterpolationEnd,dd as findIfBlocks,gd as findExpressions,Sa as findErrorPage,ed as findDirectiveBlocks,vm as findDeadCode,vm as findDeadBranches,Pl as findContainerRegion,bn as findComponentFiles,Ir as findCommonDir,ok as filterRequiredFiles,Sh as fileExists,mf as extractVariables,jm as extractTemplateExpressions,ze as extractStreamBoundaries,Jo as extractState,Hh as extractSlotContent,of as extractScriptFromTemplate,im as extractScriptBlocks,hc as extractPlaceholders,ad as extractParenthesizedExpression,Pc as extractPageResponseStatus,hb as extractLayoutMetadata,Gi as extractDominantColor,jd as extractDirectiveParams,Ch as extractDirectiveNames,$l as extractContainerContent,_m as extractComponentProps,gh as extractComponentName,$m as extractComponentDescription,Cc as extractClassNames,bc as extractBridgeData,hh as extractBoundProps,_c as extractBalancedExpression,Wb as extractAndStripCssImports,Aj as extractAndScopeStyles,Hb as extractAndProcessEvents,ck as externalizeSharedAssets,dk as externalizeRepeatedAssets,bk as externalizeHtml,xc as evaluateExpression,xm as evaluateConstant,Xc as evaluateAuthExpression,qc as escapeHtmlValue,pc as escapeHtml,C as errorRecovery,E as errorLogger,Cg as ensureTeleportTargets,tg as ensureDocumentShell,fe as enhancedValidationRules,Ym as enableDevTools,wm as eliminateDeadCode,Me as effect,wp as dprUrls,kn as docsCommand,bm as discoverLayoutNames,_p as disconnectObserver,Zm as disableDevTools,F as devHelpers,Wl as detectShell,mn as detectRuntime,sk as detectProjectConfig,zi as detectFormat,qm as detectBuildMode,Le as derived,wk as deploy,Oj as defineStxConfig,Wo as defineStore,Gq as defineSlots,sr as defineSiteConfig,wr as definePropsWithValidation,vr as defineProps,Ij as definePlugin,Pd as definePageMeta,Wa as defineMiddleware,th as defineForm,Bq as defineExpose,Aq as defineEmits,ci as defineDirective,Wq as defineCustomElement,Tn as defineConfig,di as defineClientDirective,Pg as defineAsyncComponent,rq as defaultMediaConfig,_k as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,Yd as defaultFormClasses,kc as defaultFilters,Fd as defaultCspConfig,Kj as defaultConfig,Gr as default,zc as deepMergeThemes,Tf as dedupeScopedStyles,Sl as decodeTitleEntities,Ei as decodeThumbhash,Ad as cspNonceDirective,zd as cspDirective,fq as crossfadeTransition,ap as crop,_g as createVirtualList,tj as createVideoDirective,yn as createVercelHandler,ko as createTypeChecker,fa as createTranslateFilter,un as createTextEncoderStream,Vq as createStxApp,tn as createStreamingResponse,Be as createStreamRenderer,Uo as createStore,Za as createStorageManager,Xa as createServerCookieManager,cl as createScope,Kg as createSSRSuspense,Ie as createRouter,eb as createRouteLocation,io as createRoute,dl as createRef,el as createReactive,Iq as createProvideContext,_n as createProject,Sn as createProductionBuild,fc as createPlaceholder,Cm as createOptimizedBuild,zn as createNetlifyHandler,kk as createNetlifyClient,fb as createMiddlewareContext,ho as createMiddleware,Yp as createLazyObserver,Ug as createKeepAliveCache,qn as createKVNamespace,ih as createIslandRegistry,ej as createImgDirective,Vk as createImagePlugin,Ok as createImageHandler,Tk as createImageDirective,nb as createHeatmapAggregator,nk as createFileManifest,pn as createEnvAccessor,z as createEnhancedError,sn as createEdgeHandler,rn as createEdgeCache,Vh as createDetailedErrorMessage,xn as createDenoHandler,tk as createDefaultNetlifyConfig,Ed as createCspHeaders,Bn as createCookie,fl as createComputed,bl as createComponentInstance,wn as createCloudflareHandler,Ya as createClientCookieManager,ei as createBuiltinDirectives,Vq as createApp,Ka as createAnimationTimeline,dp as cover,nf as convertToCommonJS,kp as contrast,cp as contain,y as consoleError,m as configureErrorHandling,Nj as config,fl as computed,Xm as compressResponse,Nf as composerPattern,Mf as composer,Yl as composeShellWithPage,Rm as componentDirective,Qh as componentClientSignalNames,km as compileTemplate,a as collectRepeatedFlag,mk as collectDeployFiles,ng as cloakStyleFragment,jj as clearVideoCache,N as clearTranslationCache,yg as clearStoreCache,hk as clearStorage,Jp as clearSignatureCache,Li as clearPlaceholderCache,uf as clearOnceStore,nd as clearNonce,bb as clearMiddleware,pe as clearImagePlaceholders,le as clearImageDeliveryCatalog,Sk as clearImageCache,e as clearErrorMessages,gf as clearDevCaches,oc as clearCustomFilters,Pf as clearComposers,zg as clearComposableCache,Wh as clearComponentCache,Ui as clearCache,Db as clearBlankCache,yo as cleanupLoadingIndicator,Ml as classifyScript,Nl as classifyAllScripts,lo as checkTemplateFile,mo as checkTemplate,hf as checkCache,Gp as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Mm as channel,Gn as captureScreenshots,Fn as captureScreenshot,Z as cancelPendingLoads,lk as calculateSha1,ni as calculateOptimalWidths,jf as cacheTemplate,vj as buildWebComponents,oo as buildVirtualSource,tq as buildViews,Yo as buildUrl,ve as buildSuspenseResolveScript,rr as buildStaticSite,qb as buildRuntimeGlobalsDestructure,fm as buildRuntimeAsset,gm as buildRouterAsset,qr as buildLangPickerScript,ti as buildImageUrl,eg as buildIdFragment,jg as buildHtmlAttrs,om as buildForProduction,Um as buildComponentLibrary,Hp as buildAuthParams,pm as buildApp,or as buildAlternateLinks,Rn as build,Km as broadcastPrivate,Lm as broadcastPresence,Hm as broadcast,jp as brightness,Mb as bracketDepths,ep as blur,Eb as blankInertHtmlRegions,Bp as batchSignUrls,Ne as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,rp as auto,ja as attributeValue,hm as assetTags,Fb as asInvocableStatement,Dr as arrayOf,lr as applyTranslations,_i as applyTransformations,Ih as applySlots,Qm as applyPropDefaults,up as applyPreset,lg as applyHtmlAttrs,Ud as applyHead,wc as applyFilters,Ul as appendVary,td as apiCspPreset,Da as animationGroupDirective,pj as analyzeVideo,sm as analyzeUsage,Kl as analyzeTemplate,Ll as analyzeProject,sm as analyzeDirectiveUsage,Lc as analyticsDirective,bo as addStore,ao as addPage,xd as addNonceToInlineContent,co as addLayout,$n as addComponent,Pn as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,cf as __setSignalsGeneratorsForTest,cg as __setBuildIdForTest,gj as VideoProcessorCache,uh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,Yc as Tokenizer,jo as TemplateTypeChecker,Jn as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,Rq as Show,we as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,Yb as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Ql as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Mc as RESPONSE_STATUS_KEY,Nc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,Qn as ProductionBuild,Tq as Portal,Zn as PROJECT_TEMPLATES,tp as PRESETS,sb as NON_CLIENT_PRIMITIVES,Po as MemorySessionStore,ki as MIME_TYPES,hi as MEDIA_DEFAULT_WIDTHS,ji as MEDIA_DEFAULT_FORMATS,am as LAYOUT_TYPES_FILE,Xi as ImageProcessorCache,Mk as ImageProcessingError,Ko as HydrationRuntime,Uj as HotReloadServer,mb as HeatmapAggregator,hg as HTML_CLASS_MARKER,gg as HTML_ATTRS_MARKER,Kq as Fragment,Sq as For,Rl as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,ak as EXTERNALIZED_ASSET_DIR,yk as DeployError,zk as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,Bk as DEFAULT_QUALITY,Ai as DEFAULT_PLACEHOLDER_OPTIONS,Ak as DEFAULT_FORMATS,ii as DEFAULT_DPR_VALUES,Bo as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,si as COMMON_SIZES,Vf as COLOR_MODE_BOOT_MARKER,Wf as COLOR_MODE_BOOT_GLOBAL,fg as CLOAK_STYLE,Om as BroadcastServer,Nm as Broadcast,$f as BUILD_ID_META,ag as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,Bi as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,br as $path};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$l as h,Ul as c,Xl as d,Yl as e,Zl as f,_l as g,am as i,bm as j,cm as k,dm as l,em as m}from"./chunk-17389q0t.js";import"./chunk-6xbscz34.js";import"./chunk-bkbr9yz2.js";import"./chunk-nn4k6hvv.js";import{at as a,bt as b}from"./chunk-1zyqv8p8.js";import"./chunk-1zvyq6jj.js";import"./chunk-snsb8nm6.js";import"./chunk-v4vvm7mz.js";import"./chunk-s710wybv.js";import"./chunk-00mag1n0.js";import"./chunk-d3r5pdz7.js";import"./chunk-ze3qgdaf.js";import"./chunk-54fnvfp1.js";import"./chunk-42b81qv3.js";import"./chunk-6bcw8twx.js";export{h as transformAutoImports,b as stripCommentsAndLiterals,e as renderVendorStyleTags,m as processClientScript,g as injectBrowserCoreAutoImports,l as generateServerDataBridge,j as generateBrowserAutoImportDestructuring,i as generateAutoImportDestructuring,a as findInterpolationEnd,k as extractBridgeData,d as extractAndStripCssImports,f as STX_AUTO_IMPORTS,c as BROWSER_CORE_IMPORTS};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Tp as M,Vl as x}from"./chunk-17389q0t.js";import"./chunk-6xbscz34.js";import"./chunk-bkbr9yz2.js";import"./chunk-nn4k6hvv.js";import"./chunk-1zyqv8p8.js";import"./chunk-1zvyq6jj.js";import{jt as B,lt as P}from"./chunk-snsb8nm6.js";import"./chunk-v4vvm7mz.js";import"./chunk-s710wybv.js";import"./chunk-00mag1n0.js";import"./chunk-d3r5pdz7.js";import"./chunk-ze3qgdaf.js";import"./chunk-54fnvfp1.js";import"./chunk-42b81qv3.js";import"./chunk-6bcw8twx.js";import G from"path";var T=["broadcast","calculateDistance","canNotify","clearCookies","clearFetchCache","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],O=new Set(T);var K=new Map,U=B(64),V=new Set,D=0,N=new Set(T);function f(){K.clear(),U.clear()}function S(H){let J=new Map;for(let Q of H){let Z=G.basename(Q);if(Z.endsWith(".d.ts"))continue;let z=Z.replace(/\.[jt]s$/,"");if(z==="index")continue;if(z===Z)continue;let X=J.get(z);if(X&&!X.endsWith(".js"))continue;J.set(z,Q)}return[...J.values()].sort()}function g(H,J){let Q=J.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${Q}\\b`).test(H)}function y(H){if(!H)return[];let J=P(H,D),Q=U.get(J);if(Q)return Q.slice();let Z=H.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),z=[];for(let X of N){if(V.has(X))continue;let A=X.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${A}\\s*\\(`).test(Z))z.push(X)}return z.sort(),U.set(J,z),z.slice()}async function p(H,J){let Q=y(H);if(Q.length===0)return null;let Z=J??G.join(import.meta.dir,"composables"),z=`${Z}\x00${Q.join(",")}`,X=K.get(z);if(X!==void 0)return X||null;let A=M({loader:"ts",target:"browser",define:x()}),L=new Set(Q),W=[],C=new Set,F=[];try{let q=new Bun.Glob("*.{ts,js}");for await(let j of q.scan({cwd:Z,absolute:!0}))F.push(j)}catch{return K.set(z,""),null}F=S(F);for(let q of F){let j;try{j=await Bun.file(q).text()}catch{continue}let I=[];try{I=A.scan(j).exports.filter(($)=>$!=="default")}catch{continue}if(!I.some(($)=>L.has($)))continue;try{j=j.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^import\s+type\s+.*$/gm,""),j=j.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),j=j.replace(/^export\s+default\s+/gm,""),j=j.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),W.push(`// ${G.basename(q).replace(/\.[jt]s$/,"")}
|
|
3
3
|
${A.transformSync(j).trim()}`);for(let $ of I)C.add($)}catch($){console.warn(`[stx] framework composable ${G.basename(q)} could not be bundled:`,$)}}let Y=Q.filter((q)=>!C.has(q)&&!g(H,q));if(Y.length>0)console.warn(`[stx] could not bundle ${Y.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(W.length===0)return K.set(z,""),null;let k=[...C].map((q)=>` try { if (!(${JSON.stringify(q)} in __s)) { __s[${JSON.stringify(q)}] = ${q}; if (!(${JSON.stringify(q)} in window)) window[${JSON.stringify(q)}] = ${q}; } } catch (e) {}`).join(`
|
|
4
4
|
`),w=`<script data-stx-framework-composables>
|
|
5
5
|
;(function(){
|
|
@@ -348,4 +348,4 @@ else {
|
|
|
348
348
|
console.log('[stx] Keep-alive runtime initialized');
|
|
349
349
|
})();
|
|
350
350
|
`}function Z(f){if(typeof document<"u")document.addEventListener("stx:activated",(j)=>{f(j.detail)})}function _(f){if(typeof document<"u")document.addEventListener("stx:deactivated",(j)=>{f(j.detail)})}
|
|
351
|
-
export{Q as
|
|
351
|
+
export{Q as Li,T as Mi,W as Ni,X as Oi,Y as Pi,Z as Qi,_ as Ri};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function X(Q){return Q.replace(/[^\n]/g," ")}function R(Q){let H=Q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,X).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,X).replace(/<!--[\s\S]*?-->/g,X).replace(/\{\{\{[\s\S]*?\}\}\}/g,X).replace(/\{\{[\s\S]*?\}\}/g,X).replace(/\{!![\s\S]*?!!\}/g,X),F=new Map,J=new Map,Y=/<(\/?)([A-Za-z][\w-]*)\b(?:[^>"']|"[^"]*"|'[^']*')*?(\/?)>/g,z;while((z=Y.exec(H))!==null){let j=z[1]==="/",q=z[2],W=z[3]==="/";if(E.has(q.toLowerCase()))continue;if(W)continue;if(j)J.set(q,(J.get(q)??0)+1);else{let Z=F.get(q);if(Z)Z.count++;else{let B=H.slice(0,z.index).split(`
|
|
3
3
|
`).length;F.set(q,{count:1,firstLine:B})}}}let M=[];for(let j of new Set([...F.keys(),...J.keys()])){if(N.has(j.toLowerCase()))continue;let q=F.get(j)?.count??0,W=J.get(j)??0;if(q!==W)M.push({tag:j,opened:q,closed:W,firstOpenLine:F.get(j)?.firstLine??0})}return M}var $=new Set;function U(Q,H){let F;try{F=R(Q)}catch{return}if(F.length===0)return;let J=`${H}:${Q.length}`;if($.has(J))return;$.add(J);let Y=H?H.split(/[/\\]/).pop()||H:"template";for(let{tag:z,opened:M,closed:j,firstOpenLine:q}of F)if(M>j){let W=q?` (first opened at line ${q})`:"";console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 an unclosed <${z}>${W} may swallow the content that follows it.`)}else console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 ${j-M} stray </${z}>.`)}
|
|
4
|
-
export{R as
|
|
4
|
+
export{R as $t,U as au};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Li as a,Mi as b,Ni as c,Oi as d,Pi as e,Qi as f,Ri as g}from"./chunk-ctz53mbz.js";import"./chunk-6bcw8twx.js";export{c as shouldCacheComponent,a as processKeepAliveDirectives,g as onDeactivated,f as onActivated,e as generateKeepAliveRuntime,d as generateKeepAliveCSS,b as createKeepAliveCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pf as a,Qf as b}from"./chunk-mjpqz66q.js";import"./chunk-
|
|
2
|
+
import{Pf as a,Qf as b}from"./chunk-mjpqz66q.js";import"./chunk-6bcw8twx.js";export{b as captureScreenshots,a as captureScreenshot};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ng as a}from"./chunk-ykgj5w4g.js";import"./chunk-17389q0t.js";import"./chunk-6xbscz34.js";import"./chunk-bkbr9yz2.js";import"./chunk-nn4k6hvv.js";import"./chunk-1zyqv8p8.js";import"./chunk-1zvyq6jj.js";import"./chunk-snsb8nm6.js";import"./chunk-v4vvm7mz.js";import"./chunk-s710wybv.js";import"./chunk-00mag1n0.js";import"./chunk-d3r5pdz7.js";import"./chunk-ze3qgdaf.js";import"./chunk-54fnvfp1.js";import"./chunk-42b81qv3.js";import"./chunk-6bcw8twx.js";export{a as buildApp};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ao as b,bo as c,co as d}from"./chunk-17389q0t.js";import{cs as a}from"./chunk-6xbscz34.js";import"./chunk-bkbr9yz2.js";import"./chunk-nn4k6hvv.js";import"./chunk-1zyqv8p8.js";import"./chunk-1zvyq6jj.js";import"./chunk-snsb8nm6.js";import"./chunk-v4vvm7mz.js";import"./chunk-s710wybv.js";import"./chunk-00mag1n0.js";import"./chunk-d3r5pdz7.js";import"./chunk-ze3qgdaf.js";import"./chunk-54fnvfp1.js";import"./chunk-42b81qv3.js";import"./chunk-6bcw8twx.js";export{b as rendersAsElement,c as processESImports,d as processComponents,a as freeIdentifiers};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-6bcw8twx.js";import v from"fs";import H from"path";import{gzipSync as z}from"zlib";import{createHash as g}from"crypto";var D={".js":"js",".mjs":"js",".cjs":"js",".ts":"js",".jsx":"js",".tsx":"js",".css":"css",".scss":"css",".sass":"css",".less":"css",".html":"html",".htm":"html",".png":"image",".jpg":"image",".jpeg":"image",".gif":"image",".svg":"image",".webp":"image",".avif":"image",".ico":"image",".woff":"font",".woff2":"font",".ttf":"font",".eot":"font",".otf":"font"},b=[/node_modules/,/vendor/,/bower_components/,/\.min\./],B=[/index\.(js|ts|html)$/,/main\.(js|ts)$/,/app\.(js|ts)$/,/entry\.(js|ts)$/];async function L(X,Z={}){let{includeSourceMaps:Q=!1,parseImports:$=!0,detectDuplicates:U=!0,topModulesCount:K=20}=Z;if(!v.existsSync(X))throw Error(`Build directory not found: ${X}`);if(!v.statSync(X).isDirectory())throw Error(`Not a directory: ${X}`);let q=await k(X,Q),J=[],F=[];for(let A of q)try{let O=await f(A,X,$);J.push(O)}catch(O){F.push(`Failed to process ${A}: ${O}`)}let Y=c(J,X),V=J.reduce((A,O)=>A+O.size,0),_=J.reduce((A,O)=>A+O.gzipSize,0),w=m(J),G=U?p(J):[],C=[...J].sort((A,O)=>O.size-A.size).slice(0,K);return{timestamp:Date.now(),buildDir:H.resolve(X),chunks:Y,totalSize:V,totalGzipSize:_,moduleCount:J.length,duplicates:G,byType:w,largestModules:C,warnings:F}}async function k(X,Z){let Q=[];async function $(U){let K=await v.promises.readdir(U,{withFileTypes:!0});for(let j of K){let q=H.join(U,j.name);if(j.isDirectory()){if(!j.name.startsWith(".")&&j.name!=="node_modules")await $(q)}else if(j.isFile()){if(!Z&&j.name.endsWith(".map"))continue;Q.push(q)}}}return await $(X),Q}async function f(X,Z,Q){let $=await v.promises.readFile(X),U=H.relative(Z,X),K=H.extname(X).toLowerCase(),j=$.length,q=y($),J=h($,K),F=g("md5").update($).digest("hex").slice(0,8),Y=D[K]||"other",V=[];if(Q&&Y==="js")V.push(...d($.toString("utf-8")));return{id:U,path:U,size:j,gzipSize:q,parsedSize:J,extension:K,type:Y,imports:V,importedBy:[],hash:F}}function y(X){try{let Z=z(X,{level:9}).length;return Math.min(Z,X.length)}catch{return X.length}}function h(X,Z){if(Z.includes(".min.")||X.length<1000)return X.length;let $=D[Z];if($==="js")return Math.round(X.length*0.6);if($==="css")return Math.round(X.length*0.7);return X.length}function d(X){let Z=[],Q=/import\s+(?:[\w*{}\s,]+\s+from\s+)?['"]([^'"]+)['"]/g,$;while(($=Q.exec(X))!==null)Z.push($[1]);let U=/import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while(($=U.exec(X))!==null)Z.push($[1]);let K=/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while(($=K.exec(X))!==null)Z.push($[1]);return[...new Set(Z)]}function c(X,Z){let Q=new Map;for(let U of X){let K=U.path.split(H.sep),j;if(K.length===1)j=H.basename(U.path,U.extension);else j=K[0];let q=Q.get(j)||[];q.push(U),Q.set(j,q)}let $=[];for(let[U,K]of Q){let j=K.reduce((Y,V)=>Y+V.size,0),q=K.reduce((Y,V)=>Y+V.gzipSize,0),J=K.some((Y)=>B.some((V)=>V.test(Y.path))),F=K.some((Y)=>b.some((V)=>V.test(Y.path)));$.push({name:U,files:K.map((Y)=>Y.path),modules:K,size:j,gzipSize:q,isEntry:J,isVendor:F})}return $.sort((U,K)=>K.size-U.size)}function m(X){let Z={js:{count:0,size:0,gzipSize:0},css:{count:0,size:0,gzipSize:0},html:{count:0,size:0,gzipSize:0},image:{count:0,size:0,gzipSize:0},font:{count:0,size:0,gzipSize:0},other:{count:0,size:0,gzipSize:0}};for(let Q of X)Z[Q.type].count++,Z[Q.type].size+=Q.size,Z[Q.type].gzipSize+=Q.gzipSize;return Z}function p(X){let Z=new Map;for(let $ of X){let U=Z.get($.hash)||[];U.push($),Z.set($.hash,U)}let Q=[];for(let[,$]of Z)if($.length>1){let U=$[0];Q.push({path:U.path,count:$.length,wastedBytes:U.size*($.length-1),locations:$.map((K)=>K.path)})}return Q.sort(($,U)=>U.wastedBytes-$.wastedBytes)}function W(X){if(X<1024)return`${X} B`;if(X<1048576)return`${(X/1024).toFixed(2)} KB`;return`${(X/1048576).toFixed(2)} MB`}function I(X){let Z=X.match(/^([\d.]+)\s*(B|KB|MB|GB)?$/i);if(!Z)return 0;let Q=Number.parseFloat(Z[1]);switch((Z[2]||"B").toUpperCase()){case"KB":return Q*1024;case"MB":return Q*1024*1024;case"GB":return Q*1024*1024*1024;default:return Q}}function E(X,Z){if(Z===0)return"0%";return`${(X/Z*100).toFixed(1)}%`}function R(X,Z){switch(Z.format){case"json":return u(X,Z);case"markdown":return l(X,Z);case"text":default:return r(X,Z)}}function u(X,Z){let Q=N(X,Z);return JSON.stringify({timestamp:X.timestamp,buildDir:X.buildDir,summary:{totalSize:X.totalSize,totalSizeFormatted:W(X.totalSize),totalGzipSize:X.totalGzipSize,totalGzipSizeFormatted:W(X.totalGzipSize),moduleCount:X.moduleCount,chunkCount:X.chunks.length,duplicateCount:X.duplicates.length},byType:Object.fromEntries(Object.entries(X.byType).map(([$,U])=>[$,{...U,sizeFormatted:W(U.size),gzipSizeFormatted:W(U.gzipSize)}])),chunks:X.chunks.map(($)=>({name:$.name,size:$.size,sizeFormatted:W($.size),gzipSize:$.gzipSize,gzipSizeFormatted:W($.gzipSize),moduleCount:$.modules.length,isEntry:$.isEntry,isVendor:$.isVendor})),largestModules:X.largestModules.slice(0,Z.topModules||10).map(($)=>({path:$.path,size:$.size,sizeFormatted:W($.size),gzipSize:$.gzipSize,gzipSizeFormatted:W($.gzipSize),type:$.type})),duplicates:X.duplicates,analysis:Q,warnings:X.warnings},null,2)}function r(X,Z){let Q=[],$=Z.showGzip!==!1;if(Q.push(""),Q.push("Bundle Analysis Report"),Q.push("\u2550".repeat(50)),Q.push(""),Q.push("Summary"),Q.push("\u2500".repeat(50)),$)Q.push(`Total Size: ${W(X.totalSize)} (${W(X.totalGzipSize)} gzip)`);else Q.push(`Total Size: ${W(X.totalSize)}`);if(Q.push(`Modules: ${X.moduleCount}`),Q.push(`Chunks: ${X.chunks.length}`),X.duplicates.length>0)Q.push(`Duplicates: ${X.duplicates.length}`);if(Q.push(""),Z.threshold&&X.totalSize>Z.threshold)Q.push(`\u26A0\uFE0F Bundle exceeds threshold of ${W(Z.threshold)}!`),Q.push("");Q.push("Size by Type"),Q.push("\u2500".repeat(50));let U=["js","css","html","image","font","other"];for(let j of U){let q=X.byType[j];if(q.count>0){let J=E(q.size,X.totalSize),F=$?` (${W(q.gzipSize)} gzip)`:"";Q.push(` ${j.padEnd(8)} ${W(q.size).padStart(12)}${F} ${J.padStart(6)} (${q.count} files)`)}}Q.push(""),Q.push("Chunks"),Q.push("\u2500".repeat(50));for(let j of X.chunks.slice(0,10)){let q=[];if(j.isEntry)q.push("entry");if(j.isVendor)q.push("vendor");let J=q.length>0?` [${q.join(", ")}]`:"",F=$?` (${W(j.gzipSize)} gzip)`:"";Q.push(` ${j.name.padEnd(20)} ${W(j.size).padStart(12)}${F}${J}`)}if(X.chunks.length>10)Q.push(` ... and ${X.chunks.length-10} more chunks`);Q.push("");let K=Z.topModules||10;Q.push(`Largest Modules (Top ${K})`),Q.push("\u2500".repeat(50));for(let j=0;j<Math.min(K,X.largestModules.length);j++){let q=X.largestModules[j],J=$?` (${W(q.gzipSize)} gzip)`:"";Q.push(` ${(j+1).toString().padStart(2)}. ${q.path}`),Q.push(` ${W(q.size)}${J}`)}if(Q.push(""),X.duplicates.length>0){Q.push("Duplicate Modules"),Q.push("\u2500".repeat(50));for(let j of X.duplicates.slice(0,5))Q.push(` ${j.path}`),Q.push(` ${j.count} copies, wasting ${W(j.wastedBytes)}`);if(X.duplicates.length>5)Q.push(` ... and ${X.duplicates.length-5} more duplicates`);Q.push("")}if(Z.recommendations!==!1){let j=N(X,Z);if(j.recommendations.length>0){Q.push("Recommendations"),Q.push("\u2500".repeat(50));for(let q of j.recommendations.slice(0,5)){let J=q.impact==="high"?"\u26A1":q.impact==="medium"?"\uD83D\uDCCA":"\uD83D\uDCA1";Q.push(` ${J} ${q.title}`),Q.push(` ${q.description}`)}Q.push("")}}if(X.warnings.length>0){Q.push("Warnings"),Q.push("\u2500".repeat(50));for(let j of X.warnings)Q.push(` \u26A0\uFE0F ${j}`);Q.push("")}return Q.join(`
|
|
3
3
|
`)}function l(X,Z){let Q=[],$=Z.showGzip!==!1;if(Q.push("# Bundle Analysis Report"),Q.push(""),Q.push(`Generated: ${new Date(X.timestamp).toISOString()}`),Q.push(""),Q.push("## Summary"),Q.push(""),Q.push("| Metric | Value |"),Q.push("|--------|-------|"),Q.push(`| Total Size | ${W(X.totalSize)} |`),$)Q.push(`| Gzip Size | ${W(X.totalGzipSize)} |`);Q.push(`| Modules | ${X.moduleCount} |`),Q.push(`| Chunks | ${X.chunks.length} |`),Q.push(`| Duplicates | ${X.duplicates.length} |`),Q.push(""),Q.push("## Size by Type"),Q.push(""),Q.push("| Type | Size | Gzip | % | Files |"),Q.push("|------|------|------|---|-------|");let U=["js","css","html","image","font","other"];for(let j of U){let q=X.byType[j];if(q.count>0)Q.push(`| ${j} | ${W(q.size)} | ${W(q.gzipSize)} | ${E(q.size,X.totalSize)} | ${q.count} |`)}Q.push(""),Q.push("## Chunks"),Q.push(""),Q.push("| Name | Size | Gzip | Modules | Type |"),Q.push("|------|------|------|---------|------|");for(let j of X.chunks.slice(0,15)){let q=j.isEntry?"Entry":j.isVendor?"Vendor":"-";Q.push(`| ${j.name} | ${W(j.size)} | ${W(j.gzipSize)} | ${j.modules.length} | ${q} |`)}Q.push("");let K=Z.topModules||10;Q.push(`## Largest Modules (Top ${K})`),Q.push(""),Q.push("| # | Path | Size | Gzip |"),Q.push("|---|------|------|------|");for(let j=0;j<Math.min(K,X.largestModules.length);j++){let q=X.largestModules[j];Q.push(`| ${j+1} | \`${q.path}\` | ${W(q.size)} | ${W(q.gzipSize)} |`)}if(Q.push(""),X.duplicates.length>0){Q.push("## Duplicates"),Q.push(""),Q.push("| Path | Copies | Wasted |"),Q.push("|------|--------|--------|");for(let j of X.duplicates.slice(0,10))Q.push(`| \`${j.path}\` | ${j.count} | ${W(j.wastedBytes)} |`);Q.push("")}if(Z.recommendations!==!1){let j=N(X,Z);if(j.recommendations.length>0){Q.push("## Recommendations"),Q.push("");for(let q of j.recommendations)Q.push(`### ${q.title}`),Q.push(""),Q.push(q.description),Q.push(""),Q.push(`- **Impact:** ${q.impact}`),Q.push(`- **Effort:** ${q.effort}`),Q.push("")}}return Q.join(`
|
|
4
4
|
`)}function N(X,Z){let Q=[],$=[];if(Z.threshold&&X.totalSize>Z.threshold)Q.push({severity:"error",message:`Bundle size (${W(X.totalSize)}) exceeds threshold (${W(Z.threshold)})`});if(X.totalSize>1048576)Q.push({severity:"warning",message:`Bundle is over 1MB (${W(X.totalSize)})`,details:"Large bundles can significantly impact load time"});if(X.duplicates.length>0){let q=X.duplicates.reduce((J,F)=>J+F.wastedBytes,0);Q.push({severity:"warning",message:`${X.duplicates.length} duplicate modules found, wasting ${W(q)}`}),$.push({title:"Remove Duplicate Modules",description:"Consider using import aliases or ensuring consistent package versions to eliminate duplicates.",impact:"medium",effort:"low"})}if(X.byType.js.size/X.totalSize>0.8&&X.totalSize>512000)$.push({title:"Code Splitting",description:"Over 80% of your bundle is JavaScript. Consider splitting code by route or feature.",impact:"high",effort:"medium"});let K=X.largestModules.filter((q)=>q.size>102400);if(K.length>0){Q.push({severity:"info",message:`${K.length} modules are over 100KB`});for(let q of K){if(q.path.includes("lodash")&&!q.path.includes("lodash-es"))$.push({title:"Use lodash-es instead of lodash",description:"lodash-es supports tree-shaking and can significantly reduce bundle size.",impact:"high",effort:"low"});if(q.path.includes("moment"))$.push({title:"Replace moment.js",description:"Consider using date-fns or dayjs for smaller date handling libraries.",impact:"high",effort:"medium"})}}if(X.byType.image.size>512000)$.push({title:"Optimize Images",description:`Images account for ${W(X.byType.image.size)}. Consider using WebP/AVIF formats and responsive images.`,impact:"high",effort:"low"});let j=100;if(X.totalSize>1048576)j-=20;else if(X.totalSize>512000)j-=10;if(j-=Math.min(20,X.duplicates.length*2),j-=Math.min(15,K.length*3),Z.threshold&&X.totalSize>Z.threshold)j-=25;return{score:Math.max(0,j),issues:Q,recommendations:$}}var i={lodash:{alternative:"lodash-es or individual imports",savings:"~70%"},moment:{alternative:"date-fns or dayjs",savings:"~90%"},"chart.js":{alternative:"chart.js with tree-shaking",savings:"~50%"},"highlight.js":{alternative:"Selective language imports",savings:"~80%"},fontawesome:{alternative:"Individual icon imports",savings:"~90%"},"material-ui":{alternative:"Named imports from @mui/*",savings:"~60%"}};function n(X){for(let[Z,Q]of Object.entries(i))if(X.includes(Z))return{title:`Optimize ${Z}`,description:`Consider using ${Q.alternative}. Potential savings: ${Q.savings}`,impact:"high",effort:"low"};return null}var o={default:{js:"#f7df1e",css:"#264de4",html:"#e34c26",image:"#4caf50",font:"#9c27b0",other:"#607d8b",vendor:"#ff5722"},pastel:{js:"#fff3b0",css:"#b0d4ff",html:"#ffb0b0",image:"#b0ffb0",font:"#e0b0ff",other:"#d0d0d0",vendor:"#ffcfb0"},monochrome:{js:"#333333",css:"#555555",html:"#777777",image:"#999999",font:"#bbbbbb",other:"#dddddd",vendor:"#444444"}};function x(X,Z={}){let{title:Q="Bundle Analysis",gzip:$=!0,colorScheme:U="default"}=Z,K=o[U],j=a(X),q=JSON.stringify(j);return`<!DOCTYPE html>
|
|
5
5
|
<html lang="en">
|
|
@@ -5,4 +5,4 @@ import Q from"fs";import U from"path";function W(H){let v=[],j=H.pwa;if(v.push({
|
|
|
5
5
|
`);let J=["required","recommended","optional"];for(let L of J){let N=H.checks.filter((K)=>K.category===L);if(N.length===0)continue;v.push(`
|
|
6
6
|
${L.toUpperCase()}:`);for(let K of N){let T=K.passed?"\x1B[32m\u2713\x1B[0m":"\x1B[31m\u2717\x1B[0m";if(v.push(` ${T} ${K.name}: ${K.message}`),K.details)v.push(` ${K.details}`)}}return v.push(""),v.join(`
|
|
7
7
|
`)}
|
|
8
|
-
export{W as
|
|
8
|
+
export{W as Jk,X as Kk,Y as Lk,A as Mk,B as Nk};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{bt as _}from"./chunk-1zyqv8p8.js";import"./chunk-6bcw8twx.js";function W(j,G,H=240){return j.slice(G,G+H)}var v=[{rule:"route-params",pattern:/\blocation\s*\.\s*pathname\s*\.\s*(?:match|split)\s*\(/g,primitive:"useRoute() / useRouteParams() / useRouteParam(name)",why:"parsing the URL by hand re-implements the router and does not update on SPA navigation"},{rule:"alert",pattern:/(?<![.#\w$])(?:(?:window|globalThis)\s*\.\s*)?alert\s*\(/g,primitive:"stxAlert(message)",why:"themed, focus-trapped and non-blocking \u2014 but `await` it if the code after it "+"depended on the native dialog blocking until dismissal",reject:(j)=>/\b(?:async\s+)?function\s+alert\s*\(/.test(j)||/\b(?:const|let|var)\s+alert\s*=/.test(j)},{rule:"search-params",pattern:/new\s+URLSearchParams\s*\(/g,primitive:"useSearchParams()",why:"reactive, and writes back through the router instead of history.replaceState",reject:(j,G)=>{let H=j.indexOf("(",G);if(H===-1)return!0;let Q=j.slice(H+1,j.indexOf(")",H)+1);return!/\b(?:location|search|href|url)\b/i.test(Q)}},{rule:"navigate",pattern:/\blocation\s*\.\s*(?:assign|replace)\s*\(|\blocation\s*\.\s*href\s*=/g,primitive:"navigate(path) / goBack()",why:"a full document load throws away every store and the scroll position; navigate() is an SPA transition",reject:(j,G)=>/^[^\n]*?(?:['"`]\s*)?(?:mailto:|tel:|sms:|https?:\/\/|\/\/)/.test(W(j,G,160))},{rule:"fetch",pattern:/new\s+AbortController\s*\(/g,primitive:"useFetch(url) / useAsyncData(key, fn)",why:"cancellation, loading and error state are already wired; hand-rolling them is where the races live"},{rule:"polling",pattern:/setInterval\s*\(/g,primitive:"useEventSource() / useSSE() / useWebSocket() / useChannel()",why:"polling burns requests and lags; the push primitives are delivered",reject:(j,G)=>!/\bfetch\s*\(|\$fetch\b|useFetch\b|\.get\s*\(|axios\b/.test(W(j,G))},{rule:"debounce",pattern:/\bclearTimeout\s*\(/g,primitive:"useDebounce(fn, ms) / useThrottle(fn, ms)",why:"a hand-held timer handle per call site is the usual source of stale-result bugs",requires:(j)=>/setTimeout\s*\(/.test(j)},{rule:"click-outside",pattern:/document\s*\.\s*addEventListener\s*\(\s*['"](?:click|mousedown|pointerdown)['"]/g,primitive:"useClickOutside(ref, fn)",why:"the document-level listener plus the blur race is exactly what this composable exists to remove"},{rule:"focus",pattern:/\.\s*(?:getElementById|querySelector)\s*\([^)]*\)\s*(?:\?\.)?\s*\.?focus\s*\(/g,primitive:"useFocus(ref) with x-ref",why:"a query by id breaks under nested scopes and SPA navigation; a ref does not"},{rule:"clipboard",pattern:/navigator\s*\.\s*(?:clipboard|share)\b/g,primitive:"useClipboard() / useShare()",why:"permission state, the copied flag and the unsupported-browser fallback are already handled"},{rule:"watch",pattern:/\beffect\s*\(\s*\(\s*\)\s*=>\s*\{[^}]*\bvoid\s+\w+\s*\(\s*\)/g,primitive:"watch(source, cb) / watchMultiple([...], cb)",why:"the `void a(); void b()` dance is a manual dependency list; watch takes one directly"}],U=["confirm","tooltip",...v.map((j)=>j.rule)];function N(j,G){let H=1;for(let Q=0;Q<G;Q++)if(j[Q]===`
|
|
3
3
|
`)H++;return H}function P(j,G){let H=j.lastIndexOf(`
|
|
4
4
|
`,G)+1,Q=j.indexOf(`
|
|
5
5
|
`,G);return j.slice(H,Q===-1?j.length:Q).trim().slice(0,120)}function q(j,G){let H=j.slice(0,G),Q=H.lastIndexOf("function"),X=H.lastIndexOf("=>"),M=Math.max(Q,X);if(M===-1)return!1;let z=j.slice(Math.max(0,M-120),M);return/\basync\b[^;{}]*$/.test(z)}function L(j){return/\b(?:async\s+)?function\s+confirm\s*\(/.test(j)||/\b(?:const|let|var)\s+confirm\s*=/.test(j)||/\bimport\s*\{[^}]*\bconfirm\b[^}]*\}/.test(j)}function O(j,G,H){if(L(j))return j;let Q=/(^|[^\w$.])(?:(?:window|globalThis)\s*\.\s*)?confirm\s*\(/g,X=F(j),M="",z=0,Y;while((Y=Q.exec(X))!==null){let Z=Y.index+Y[1].length,$=N(j,Z),J=P(j,Z);if(/stxConfirm\s*\($/.test(j.slice(0,Z+8)))continue;let D=q(j,Z);if(H.push({file:G,line:$,rule:"confirm",applied:D,snippet:J,reason:D?void 0:"stxConfirm() returns a Promise and native confirm() is synchronous, so this needs `await` inside an async function. Rewriting it here would make the condition always true."}),D)M+=j.slice(z,Z)+"await stxConfirm(",z=Z+(Y[0].length-Y[1].length)}return M+j.slice(z)}function w(j,G,H){let Q=/(<[a-z][\w-]*\b[^>]*?)\stitle=(["'])(.*?)\2/gis,X=C(j),M="",z=0,Y;while((Y=Q.exec(X))!==null){let[Z,$,J,D]=Y,K=N(j,Y.index),B=P(j,Y.index),V=$.match(/^<([A-Za-z][\w-]*)/)?.[1]??"";if(/^[A-Z]/.test(V)){H.push({file:G,line:K,rule:"tooltip",applied:!1,snippet:B,reason:`\`title\` on <${V}> is a component prop, not an HTML attribute \u2014 `+"adding x-tooltip here would put a tooltip on a component and may duplicate text it already renders."});continue}if(/\bx-tooltip[=\s]/.test($)||D.trim()===""){H.push({file:G,line:K,rule:"tooltip",applied:!1,snippet:B,reason:/\bx-tooltip[=\s]/.test($)?"already has x-tooltip":"empty title"});continue}H.push({file:G,line:K,rule:"tooltip",applied:!0,snippet:B}),M+=j.slice(z,Y.index)+`${$} x-tooltip=${J}${D}${J} title=${J}${D}${J}`,z=Y.index+Z.length}return M+j.slice(z)}function C(j){return j.replace(/<!--[\s\S]*?-->/g,(G)=>G.replace(/[^\n]/g," ")).replace(/\{\{--[\s\S]*?--\}\}/g,(G)=>G.replace(/[^\n]/g," "))}function E(j){let G=(H)=>H.replace(/[^\n]/g," ");return j.replace(/\/\*[\s\S]*?\*\//g,G).replace(/\/\/[^\n]*/g,G)}function F(j,G=!1){let H=C(j);return(G?E(H):_(H)).replace(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi,(X,M)=>/\bclient\b/i.test(M)?X:X.replace(/[^\n]/g," "))}function S(j,G,H,Q){let X=F(j),M=F(j,!0);for(let z of v){if(!H.includes(z.rule))continue;if(z.requires&&!z.requires(j))continue;z.pattern.lastIndex=0;let Y,Z=/['"]/.test(z.pattern.source)?M:X;z.pattern.lastIndex=0;while((Y=z.pattern.exec(Z))!==null){if(z.reject?.(j,Y.index))continue;Q.push({file:G,line:N(j,Y.index),rule:z.rule,applied:!1,snippet:P(j,Y.index),reason:`${z.primitive} \u2014 ${z.why}`})}}}function k(j,G={}){let H=G.rules??U,Q=G.file??"<source>",X=[];S(j,Q,H,X);let M=j;if(H.includes("confirm"))M=O(M,Q,X);if(H.includes("tooltip"))M=w(M,Q,X);X.sort((Z,$)=>Z.line-$.line);let z=new Set,Y=X.filter((Z)=>{let $=`${Z.rule}:${Z.line}`;if(z.has($))return!1;return z.add($),!0});return{code:M,findings:Y}}var I=new Set(["confirm","tooltip"]);function A(j,G){if(j.length===0)return"No hand-rolled equivalents found.";let H=j.filter((z)=>z.applied),Q=j.filter((z)=>!z.applied&&I.has(z.rule)),X=j.filter((z)=>!z.applied&&!I.has(z.rule)),M=[];if(H.length>0){M.push(G?`Rewrote ${H.length} site(s):`:`Would rewrite ${H.length} site(s) (pass --fix):`);for(let z of H)M.push(` ${z.file}:${z.line} [${z.rule}] ${z.snippet}`)}if(Q.length>0){M.push("",`Needs a human \u2014 ${Q.length} site(s):`);for(let z of Q)M.push(` ${z.file}:${z.line} [${z.rule}] ${z.snippet}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{kk as a,lk as b,mk as c,nk as d}from"./chunk-7g37nv98.js";import"./chunk-7wh0eyz9.js";import"./chunk-17389q0t.js";import"./chunk-6xbscz34.js";import"./chunk-bkbr9yz2.js";import"./chunk-nn4k6hvv.js";import"./chunk-1zyqv8p8.js";import"./chunk-1zvyq6jj.js";import"./chunk-snsb8nm6.js";import"./chunk-v4vvm7mz.js";import"./chunk-s710wybv.js";import"./chunk-00mag1n0.js";import"./chunk-d3r5pdz7.js";import"./chunk-ze3qgdaf.js";import"./chunk-54fnvfp1.js";import"./chunk-42b81qv3.js";import"./chunk-6bcw8twx.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
|