@stacksjs/stx 0.2.867 → 0.2.869
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-shell.js +5 -4
- package/dist/chunk-05dtat6q.js +2 -0
- package/dist/{chunk-gxqcnn5r.js → chunk-05qpze12.js} +1 -1
- package/dist/{chunk-rnvw07ca.js → chunk-095cn3p0.js} +26 -26
- package/dist/chunk-0snga2v8.js +2 -0
- package/dist/{chunk-g0xn80gz.js → chunk-0tyyad6q.js} +9 -9
- package/dist/chunk-0xqefkqr.js +2 -0
- package/dist/{chunk-67dgp45w.js → chunk-1dt8e7ew.js} +2 -2
- package/dist/chunk-1t8tkryw.js +2 -0
- package/dist/{chunk-mzr29qkj.js → chunk-2wa1keyw.js} +1 -1
- package/dist/{chunk-5dvkphbe.js → chunk-311mrz2n.js} +1 -1
- package/dist/chunk-3eqa6hnx.js +2 -0
- package/dist/{chunk-z512gt4v.js → chunk-3f51tn2b.js} +3 -3
- package/dist/{chunk-8s6s6nd0.js → chunk-4068rmzv.js} +2 -2
- package/dist/chunk-4math14x.js +2 -0
- package/dist/{chunk-8arfg8kp.js → chunk-4vtw6f0c.js} +1 -1
- package/dist/{chunk-5kkq2eqr.js → chunk-5d0csn7w.js} +1 -1
- package/dist/chunk-5debppk8.js +2 -0
- package/dist/{chunk-3nyh76r3.js → chunk-5f9z82xp.js} +2 -2
- package/dist/{chunk-vvzys1x7.js → chunk-5h9d6jew.js} +3 -3
- package/dist/{chunk-qx8czb2j.js → chunk-5qk506kn.js} +1 -1
- package/dist/{chunk-h65shwe9.js → chunk-5sbtbfj3.js} +1 -1
- package/dist/{chunk-k32q90b2.js → chunk-60yppcbb.js} +2 -2
- package/dist/{chunk-eafqxbr0.js → chunk-6ggme8xx.js} +1 -1
- package/dist/{chunk-fmzyrg2e.js → chunk-6ksyrmpp.js} +1 -1
- package/dist/{chunk-x64afx6z.js → chunk-6mjd3pqd.js} +1 -1
- package/dist/{chunk-6k4ac74t.js → chunk-6vgr5g6d.js} +2 -2
- package/dist/{chunk-a76dtc8w.js → chunk-73vtvzb1.js} +1 -1
- package/dist/{chunk-xebx3ryb.js → chunk-7vc8b7c5.js} +1 -1
- package/dist/{chunk-6c5g6sv6.js → chunk-81kk8dnr.js} +1 -1
- package/dist/chunk-8veysx0v.js +2 -0
- package/dist/{chunk-k15hxcgs.js → chunk-9fk02w6v.js} +3 -3
- package/dist/{chunk-kandgxsh.js → chunk-9mkv1se7.js} +1 -1
- package/dist/{chunk-1vwgddct.js → chunk-9rjr7hvf.js} +1 -1
- package/dist/chunk-a9y9ghm2.js +2 -0
- package/dist/chunk-ac5sa72c.js +2 -0
- package/dist/{chunk-enxzwz0j.js → chunk-ajy9tjct.js} +2 -2
- package/dist/{chunk-jn335zs0.js → chunk-akv760py.js} +1 -1
- package/dist/{chunk-ea5pm30m.js → chunk-bfww6qxt.js} +1 -1
- package/dist/chunk-bv6rx5w4.js +2 -0
- package/dist/{chunk-efywv35k.js → chunk-cvpbgf6h.js} +1 -1
- package/dist/{chunk-1mmyxay3.js → chunk-d2m57nd1.js} +1 -1
- package/dist/{chunk-mcnwvh06.js → chunk-d9k8j44b.js} +5 -5
- package/dist/chunk-djdganvr.js +2 -0
- package/dist/{chunk-kh6njq2r.js → chunk-dy7vqv1x.js} +2 -2
- package/dist/chunk-f3d1y318.js +33 -0
- package/dist/chunk-f64wbr0j.js +2 -0
- package/dist/{chunk-b3wc86ez.js → chunk-fzz251r8.js} +9 -9
- package/dist/{chunk-ynkbv9jq.js → chunk-gcsy3z1e.js} +2 -2
- package/dist/{chunk-cr0msawk.js → chunk-gj16gta9.js} +6 -6
- package/dist/{chunk-9vzeea7p.js → chunk-gk8472hq.js} +2 -2
- package/dist/{chunk-7qmr1z81.js → chunk-gxq3jnkb.js} +1 -1
- package/dist/chunk-h2r54207.js +54 -0
- package/dist/{chunk-pqjmse0r.js → chunk-h8h97bcc.js} +1 -1
- package/dist/chunk-hb6r4pxp.js +2 -0
- package/dist/{chunk-yzh9rsqp.js → chunk-hvh7v5bx.js} +4 -4
- package/dist/{chunk-jbgj2hph.js → chunk-hvx6j4a2.js} +2 -2
- package/dist/{chunk-v5kjwkz2.js → chunk-j148k8rf.js} +1 -1
- package/dist/{chunk-w6k6nkvq.js → chunk-jsyrp1n2.js} +1 -1
- package/dist/{chunk-c6rcrh48.js → chunk-k3qh0esd.js} +7 -7
- package/dist/{chunk-5tt1xbeh.js → chunk-k4dcnc4e.js} +3 -3
- package/dist/{chunk-8me8hamk.js → chunk-k7m8659h.js} +2 -2
- package/dist/chunk-kdat1ht1.js +3 -0
- package/dist/{chunk-fpya25cc.js → chunk-kgh1xsfe.js} +74 -74
- package/dist/{chunk-cjy9cdm0.js → chunk-m4k6ndf5.js} +1 -1
- package/dist/{chunk-t5jfh1bs.js → chunk-mbp7j1a7.js} +2 -2
- package/dist/{chunk-7xhwqc0c.js → chunk-mnx6njd4.js} +4 -4
- package/dist/{chunk-7fg2sj1z.js → chunk-nqz4es8a.js} +1 -1
- package/dist/chunk-nrpqrqqe.js +2 -0
- package/dist/{chunk-qbf8re0y.js → chunk-p3yesft1.js} +1 -1
- package/dist/chunk-ps6m8n9n.js +2 -0
- package/dist/{chunk-aef82ns3.js → chunk-pxce4aag.js} +1 -1
- package/dist/{chunk-v2712w9b.js → chunk-qqvj5zra.js} +1 -1
- package/dist/{chunk-d0cjw1gn.js → chunk-r3eezdg4.js} +26 -26
- package/dist/chunk-r53eeyhv.js +42 -0
- package/dist/chunk-rhhq8k9f.js +2 -0
- package/dist/{chunk-bwdbj60y.js → chunk-rpep1ve3.js} +2 -2
- package/dist/{chunk-xfvedjvb.js → chunk-s6fe2wp6.js} +1 -1
- package/dist/{chunk-83tvkw4y.js → chunk-sbvkk4cn.js} +2 -2
- package/dist/{chunk-f6ypmk8x.js → chunk-stdddhk9.js} +1 -1
- package/dist/chunk-swp254eb.js +2 -0
- package/dist/chunk-szfh1sg3.js +2 -0
- package/dist/{chunk-d60bvtmy.js → chunk-tdd3765y.js} +39 -39
- package/dist/{chunk-6m6y9bbx.js → chunk-tjwzy9xq.js} +1 -1
- package/dist/{chunk-vdj4m9z2.js → chunk-tz7b6fdz.js} +1 -1
- package/dist/{chunk-gd56arnm.js → chunk-vrcr4b13.js} +1 -1
- package/dist/{chunk-rd751nw3.js → chunk-vzq77h80.js} +1 -1
- package/dist/{chunk-0v2yj490.js → chunk-w2hqjv5e.js} +1 -1
- package/dist/{chunk-mnf4gktz.js → chunk-wcq7a5pv.js} +3 -3
- package/dist/{chunk-q13dgfe1.js → chunk-wrgaxvxy.js} +3 -3
- package/dist/{chunk-vkb353c3.js → chunk-wxggf5aq.js} +1 -1
- package/dist/{chunk-3a4tfycz.js → chunk-xsbaha1z.js} +2 -2
- package/dist/{chunk-qvjxg8yz.js → chunk-xtcba3r1.js} +2 -2
- package/dist/chunk-ympa56f9.js +2 -0
- package/dist/{chunk-64ebysb4.js → chunk-yx3vghee.js} +1 -1
- package/dist/chunk-z2t6f4gt.js +2 -0
- package/dist/{chunk-73c3awyw.js → chunk-za61jaep.js} +2 -2
- package/dist/{chunk-2v0jdfhg.js → chunk-zfj8rfv2.js} +1 -1
- package/dist/cli.js +12 -12
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/pwa.js +2 -2
- package/dist/ssg.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-031dn0yr.js +0 -2
- package/dist/chunk-0twkeh31.js +0 -2
- package/dist/chunk-23zpvmw5.js +0 -2
- package/dist/chunk-2h41y75x.js +0 -2
- package/dist/chunk-3gk1e2b1.js +0 -2
- package/dist/chunk-4yhd0mg6.js +0 -2
- package/dist/chunk-66eszw4f.js +0 -2
- package/dist/chunk-6d39636b.js +0 -33
- package/dist/chunk-9cwag0tk.js +0 -2
- package/dist/chunk-acrgy1m7.js +0 -2
- package/dist/chunk-apkna83n.js +0 -2
- package/dist/chunk-bx29jsqg.js +0 -2
- package/dist/chunk-c9mkbjk5.js +0 -2
- package/dist/chunk-cwdg0v05.js +0 -2
- package/dist/chunk-cwdvmvc6.js +0 -2
- package/dist/chunk-f0kcmckh.js +0 -2
- package/dist/chunk-fkbh874c.js +0 -2
- package/dist/chunk-h1hcjx7e.js +0 -42
- package/dist/chunk-kd82s3ry.js +0 -2
- package/dist/chunk-s21bj83r.js +0 -3
- package/dist/chunk-tzey0xq2.js +0 -54
- package/dist/chunk-x5ap19jt.js +0 -2
- package/dist/chunk-xzb0w6mf.js +0 -2
- package/dist/chunk-ywp7tmyg.js +0 -2
- package/dist/chunk-z1rs6b4x.js +0 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Tl,$l}from"./chunk-qjey0jk6.js";import{m,O,ut,p}from"./chunk-0tyyad6q.js";import{G,_r,Fs,zs,fi,mi,Hs,Lt,Be,ye,ee,Tr,$r,pe,te,j,ct,Rr,wi,Ir,We,s,g,X,En}from"./chunk-kgh1xsfe.js";import{n}from"./chunk-kdat1ht1.js";import{ue}from"./chunk-hvx6j4a2.js";import{pr}from"./chunk-01c16zw4.js";import{r}from"./chunk-x7redxyd.js";import{b}from"./chunk-94mpe1ny.js";import{createHash as kt}from"crypto";import Y from"fs";import K from"path";import Le from"fs";function Ae(e,i,t){let o=Buffer.alloc(t),a=Le.readSync(e,o,0,t,i);return o.subarray(0,a)}function ze(e){if(e.length<25)return!1;let i=(o,a)=>String.fromCharCode(...e.subarray(o,a));if(i(0,4)!=="RIFF"||i(8,12)!=="WEBP")return!1;let t=i(12,16);if(t==="VP8X")return(e[20]&16)!==0;if(t==="VP8L")return((e[21]|e[22]<<8|e[23]<<16|e[24]<<24)>>>28&1)===1;return!1}function Ue(e){let i;try{i=Le.openSync(e,"r");let t=Ae(i,0,33);if(t.length>=3&&t[0]===255&&t[1]===216&&t[2]===255)return"none";if(t.length>=26&&t[0]===137&&t.toString("latin1",1,4)==="PNG"){let o=t[25];if(o===4||o===6)return"possible";let a=8;for(let c=0;c<64;c++){let l=Ae(i,a,8);if(l.length<8)return"unknown";let u=l.toString("latin1",4,8);if(u==="tRNS")return"possible";if(u==="IDAT"||u==="IEND")return"none";a+=12+l.readUInt32BE(0)}return"unknown"}if(t.length>=25&&t.toString("latin1",0,4)==="RIFF"&&t.toString("latin1",8,12)==="WEBP"){if(ze(t))return"possible";let o=t.toString("latin1",12,16);return o==="VP8 "||o==="VP8X"?"none":"unknown"}return"unknown"}catch{return"unknown"}finally{if(i!==void 0)Le.closeSync(i)}}import rn from"fs";import Fe from"os";import{fileURLToPath as yt}from"url";var _e=Symbol("stx.image-worker.unavailable");function sn(e=typeof Fe.availableParallelism==="function"?Fe.availableParallelism():Fe.cpus().length){return Math.max(1,Math.min(2,e-1))}var Pe=0,xt=[];async function on(){if(Pe<sn()){Pe++;return}await new Promise((e)=>xt.push(e)),Pe++}function an(){Pe--,xt.shift()?.()}var cn="@stacksjs/stx/builtins/image-warmup-worker";function ln(e=process.cwd()){let i=import.meta.url.endsWith(".ts")?"ts":"js";try{let t=new URL(`./image-warmup-worker.${i}`,import.meta.url);if(t.protocol==="file:"&&rn.existsSync(yt(t)))return yt(t)}catch{}return pr(cn,e)}var bt=!1;function fe(e){if(!bt)bt=!0,console.warn(`[stx] image worker unavailable (${e}); running the image pass on the serving thread instead. Results are the same, but requests may stall while it runs.`);return _e}function Ie(e){return e instanceof Error?e.message:String(e)}async function He(e,i){let t;try{t=(await import("worker_threads")).Worker}catch(a){return fe(`could not load node:worker_threads: ${Ie(a)}`)}if(typeof t!=="function")return fe("node:worker_threads has no Worker in this runtime");let o=ln();if(!o)return fe("no image-warmup-worker entry beside this module or in the installed @stacksjs/stx");await on();try{return await new Promise((a,c)=>{let l;try{l=new t(o)}catch(h){a(fe(`could not start ${o}: ${Ie(h)}`));return}let u=!1,f=!1,x=(h)=>{if(f)return;f=!0,h(),l.terminate()};l.on("message",(h)=>{if(h.type==="ready"){u=!0,l.postMessage({task:e,args:i});return}if(h.type==="result"){x(()=>a(h.value));return}let d=Error(h.error?.message??"image worker failed");if(h.error?.name)d.name=h.error.name;if(h.error?.stack)d.stack=h.error.stack;x(()=>c(d))}),l.on("error",(h)=>{x(()=>u?c(h instanceof Error?h:Error(Ie(h)||"image worker crashed")):a(fe(`the worker failed before it was ready: ${Ie(h)}`)))}),l.on("exit",(h)=>{x(()=>u?c(Error("image worker exited before it finished")):a(fe(`the worker exited with code ${h} before it was ready`)))})})}finally{an()}}var un=new Set([".avif",".jpeg",".jpg",".png",".webp"]),fn=[320,640,960,1280,1920],ve="/_stx/images",dn=`stx:${ve}:alpha-1`,gn=`stx:${ve}:opaque-1`,pn=["@stacksjs/ts-webp","@stacksjs/ts-avif","ts-images"],Ee;function mn(e,i){let t=K.dirname(Bun.resolveSync(e,i));while(t!==K.dirname(t)){let o=K.join(t,"package.json");if(Y.existsSync(o)){let a=JSON.parse(Y.readFileSync(o,"utf8"));if(a.name===e)return a.version}t=K.dirname(t)}return}function vt(){if(Ee!==void 0)return Ee;let e;try{e=K.dirname(Bun.resolveSync("ts-images",import.meta.dir))}catch{}return Ee=pn.map((i)=>{let t;try{t=e?mn(i,e):void 0}catch{}return`${i.replace("@stacksjs/","")}@${t??"unknown"}`}).join("+"),Ee}var wt=Symbol.for("stx.image-delivery");function we(){let e=globalThis;return e[wt]??={catalog:new Map,transparent:new Set},e[wt]}var $t=new Set;function hn(e){return`/${e.split(K.sep).map(encodeURIComponent).join("/")}`}function yn(e){let i=K.extname(e),t=e.slice(0,-i.length).replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-+|-+$/g,""),o=kt("sha256").update(e).digest("hex").slice(0,8);return`${t||"image"}-${o}`}function St(e,i=`stx:${ve}`){let t=(o)=>`${ve}/${o.split("/").map(encodeURIComponent).join("/")}`;return{cacheNamespace:i,async stat(o){let a=K.join(e,o);try{let c=await Y.promises.stat(a);return c.size>0?{bytes:c.size,path:a,url:t(o)}:null}catch{return null}},async write(o,a){let c=K.join(e,o);await Y.promises.mkdir(K.dirname(c),{recursive:!0});let l=`${c}.${process.pid}.tmp`;return await Y.promises.writeFile(l,a),await Y.promises.rename(l,c),{bytes:a.byteLength,path:c,url:t(o)}},url:t}}async function At(e,i=e){let t=await Y.promises.readdir(i,{withFileTypes:!0});t.sort((a,c)=>a.name.localeCompare(c.name));let o=[];for(let a of t){let c=K.join(i,a.name);if(a.isDirectory()){o.push(...await At(e,c));continue}if(!a.isFile()||!un.has(K.extname(a.name).toLowerCase()))continue;o.push({absolutePath:c,relativePath:K.relative(e,c)})}return o}function Ct(e,i){return e.map((t)=>({key:hn(t.relativePath),input:t.absolutePath,name:yn(t.relativePath),...bn(t.absolutePath)?{options:{storage:i}}:{}}))}function bn(e){return Ue(e)==="possible"}function xn(e){for(let i=3;i<e.length;i+=4)if(e[i]!==255)return!0;return!1}async function vn(e){let i=Object.entries(e).filter(([,c])=>c.fallback.format==="png"),t=new Set,o=8;if(i.length===0)return t;let{decode:a}=await import("ts-images");for(let c=0;c<i.length;c+=8)await Promise.all(i.slice(c,c+8).map(async([l,u])=>{let f=u.variants.filter((x)=>x.format==="png").sort((x,h)=>x.width-h.width)[0];try{let x=await a(new Uint8Array(await Y.promises.readFile(f?.path??u.fallback.path)));if(xn(x.data))t.add(l)}catch{t.add(l)}}));return t}function wn(e,i){let t=[];for(let o of i){let a=e[o],c=a?.variants.filter((u)=>u.format==="webp")??[];if(!a||c.length===0)continue;if(!c.some((u)=>{let f;try{return f=Y.openSync(u.path,"r"),!ze(Ae(f,0,32))}catch{return!0}finally{if(f!==void 0)Y.closeSync(f)}}))continue;if(a.variants=a.variants.filter((u)=>u.format!=="webp"),delete a.sources.webp,t.push(o),!$t.has(o))$t.add(o),console.warn(`[stx-images] ${o} is transparent but its WebP variants have no alpha channel; serving PNG instead. Upgrade @stacksjs/ts-webp to 0.1.6 or later.`)}return t}async function $n(e){let i=[],t=8;if(e.length===0)return i;let{generateThumbHash:o}=await import("ts-images");for(let a=0;a<e.length;a+=8){let c=e.slice(a,a+8),l=await Promise.all(c.map(async(u)=>{try{return await o(u.absolutePath),u}catch{return console.warn(`[stx-images] Skipping unreadable raster: ${u.relativePath}`),null}}));i.push(...l.filter((u)=>u!==null))}return i}function qe(e){return K.join(e,"undecodable.json")}function Sn(e){try{let i=Y.readFileSync(qe(e),"utf-8"),t=JSON.parse(i);return t&&typeof t==="object"?t:{}}catch{return{}}}function Cn(e,i){try{Y.mkdirSync(K.dirname(qe(e)),{recursive:!0}),Y.writeFileSync(qe(e),JSON.stringify(i))}catch{}}function Rt(e){try{let i=Y.statSync(e);return{mtimeMs:i.mtimeMs,size:i.size}}catch{return}}function It(e){if(!e||e.startsWith("data:")||e.startsWith("blob:")||/^https?:\/\//i.test(e)||e.startsWith("//"))return;let i=e.split(/[?#]/,1)[0];if(!i)return;try{return`/${i.replace(/^\/+/,"").split("/").map(decodeURIComponent).map(encodeURIComponent).join("/")}`}catch{return}}function Uo(e){let i=It(e);return i?we().catalog.get(i):void 0}function Wo(e){let i=It(e);return i?we().transparent.has(i):!1}function qo(e){let i=(o)=>e.variants.filter((a)=>a.format===o).reduce((a,c)=>a+c.bytes,0),t=i(e.fallback.format);return["avif","webp"].map((o)=>({format:o,srcset:e.sources[o]||"",bytes:i(o)})).filter((o)=>o.srcset&&o.bytes>0&&o.bytes<t).sort((o,a)=>o.bytes-a.bytes).map(({format:o,srcset:a})=>({format:o,srcset:a}))}function Gh(e){let i=Uo(e);if(!i)return;return{src:i.fallback.url,srcset:i.sources[i.fallback.format]||"",sources:qo(i).map(({format:t,srcset:o})=>({type:`image/${t}`,srcset:o})),width:i.source.width,height:i.source.height,placeholder:Wo(e)?void 0:i.placeholder?.dataUrl}}function ys(){let e=we();e.catalog=new Map,e.transparent=new Set}function Rn(e){let i=we();i.catalog=new Map(e.entries),i.transparent=new Set(e.transparent)}async function Xh(e,i,t={}){if(!e||!Y.existsSync(e))return ys(),{count:0,fingerprint:""};if(t.offThread){let y=await He("delivery",{publicDir:e,outputDir:i});if(y!==_e)return Rn(y.state),y.result}let o=await At(e);if(o.length===0)return ys(),{count:0,fingerprint:""};let a=Sn(i),c=o.filter((y)=>{let w=a[y.relativePath];if(!w)return!0;let A=Rt(y.absolutePath);return!A||A.mtimeMs!==w.mtimeMs||A.size!==w.size});if(c.length===0)return ys(),{count:0,fingerprint:""};let l=St(K.join(i,"_stx","images"),`${dn}:${vt()}`),u={outDir:K.join(i,"_stx","images"),storage:St(K.join(i,"_stx","images"),`${gn}:${vt()}`),baseUrl:ve,widths:fn,formats:["avif","webp"],quality:{avif:70,webp:78,jpeg:82,png:100},includeOriginal:!1,placeholder:!0,batchConcurrency:4,concurrency:4},{createImageDeliveryCatalog:f}=await import("ts-images/delivery"),x=c,h;try{h=await f({...u,entries:Ct(c,l)})}catch(y){if(x=await $n(c),x.length===c.length)throw y;let w=new Set(x.map((k)=>k.relativePath)),A=!1;for(let k of c){if(w.has(k.relativePath))continue;let R=Rt(k.absolutePath);if(!R)continue;a[k.relativePath]=R,A=!0}if(A)Cn(i,a);if(x.length===0)return ys(),{count:0,fingerprint:""};h=await f({...u,entries:Ct(x,l)})}let d=await vn(h.entries),C=wn(h.entries,d),v=we();v.catalog=new Map(Object.entries(h.entries)),v.transparent=d;let S=d.size===0&&C.length===0?h.fingerprint:kt("sha256").update(h.fingerprint).update(JSON.stringify({transparent:[...d].sort(),droppedWebp:C.sort()})).digest("hex");return{count:x.length,fingerprint:S}}class Pt{builtins=new Map;registerBuiltin(e){this.builtins.set(e.name.toLowerCase(),e);for(let i of e.aliases)this.builtins.set(i.toLowerCase(),e)}isBuiltin(e){return this.builtins.has(e.toLowerCase())}getBuiltin(e){return this.builtins.get(e.toLowerCase())??null}async resolveFile(e,i,t,o){let a=fi(e,o);if(a!==void 0)return a;for(let c of mi(e,i,t,o))if(await s(c))return c;return null}}var de=new Pt;var se="\x00stx-boolean-attribute";function Xe(e){return e.indexOf("\x00")===-1?e:e.replace(/\0/g,"")}var kn=new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","exportparts","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","part","role","slot","spellcheck","style","tabindex","title","translate","accept","action","alt","autocomplete","capture","cite","cols","colspan","content","controls","datetime","default","download","enctype","for","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","href","hreflang","kind","label","loading","loop","max","maxlength","media","method","min","minlength","multiple","muted","name","open","pattern","placeholder","playsinline","poster","preload","readonly","referrerpolicy","rel","required","reversed","rows","rowspan","scope","selected","shape","size","span","src","srcdoc","srclang","srcset","start","step","target","type","usemap","value","width","wrap"]);function Ve(e){let i=e.toLowerCase();return i.startsWith("aria-")||i.startsWith("data-")||kn.has(i)}function ie(e,i){let t=[];for(let[o,a]of Object.entries(e.static)){if(i.has(o))continue;let c=e.staticNames?.[o]??o;if(typeof a==="boolean"){if(a)t.push(g(c));continue}if(a===se){t.push(g(c));continue}t.push(`${g(c)}="${En(c,Xe(String(a)))}"`)}return t}function oe(e,i){let t=[];for(let[o,a]of Object.entries(e.serverDynamic??{})){if(i.has(o))continue;if(a===null||a===void 0||a===!1)continue;let c=e.serverDynamicNames?.[o]??o;if(a===!0){t.push(g(c));continue}if(typeof a==="object")continue;t.push(`${g(c)}="${En(c,Xe(String(a)))}"`)}return t}function An(e){if(e.clientReactive.to)return{value:e.clientReactive.to,reactive:!0};if(e.serverDynamic.to!==void 0)return{value:String(e.serverDynamic.to),reactive:!1};if(typeof e.static.to==="string")return{value:e.static.to,reactive:!1};return{value:"#",reactive:!1}}var Ze={name:"StxLink",aliases:["stx-link"],render(e,i,t){let o=An(e),a=(typeof e.static.class==="string"?e.static.class:"")||(typeof e.static.className==="string"?e.static.className:""),c=typeof e.static.activeClass==="string"?e.static.activeClass:"active",l=typeof e.static.exactActiveClass==="string"?e.static.exactActiveClass:"exact-active",u=e.static.prefetch===!0||e.static.prefetch==="true"||e.serverDynamic.prefetch===!0,f=[];if(o.reactive)f.push(`:href="${n(o.value)}"`);else f.push(`href="${n(Tr(o.value,"navigable"))}"`);if(a)f.push(`class="${n(a)}"`);if(f.push("data-stx-link"),f.push(`data-stx-active-class="${n(c)}"`),f.push(`data-stx-exact-active-class="${n(l)}"`),u)f.push("data-stx-prefetch");let x=typeof e.static.activeMatch==="string"?e.static.activeMatch.trim():"";if(x)f.push(`data-stx-active-match="${n(x)}"`);let h=new Set(["to","class","className","activeClass","exactActiveClass","activeMatch","prefetch"]);return f.push(...ie(e,h)),f.push(...oe(e,h)),`<a ${f.join(" ")}>${i}</a>`}};var In=new Map;function Ge(e){if(!e)return;let i=e.split("?")[0].split("#")[0];return In.get(i)}var Pn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Ke=[320,640,768,1024,1280,1536,1920];function H(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}function Ne(e,i,t=!1){let o=e.serverDynamic[i];if(o!==void 0)return o!==!1&&o!=="false";let a=e.static[i];if(a!==void 0)return a!=="false"&&a!==!1;return t}function Je(e){if(e.includes("(")||e.includes(","))return e;let i=e.trim().split(/\s+/),t=[];for(let o of i)if(o.includes(":")){let[a,c]=o.split(":"),l=Pn[a];if(l)t.push(`(max-width: ${l}px) ${c}`);else{let u=Number.parseInt(a);if(!Number.isNaN(u))t.push(`(max-width: ${u}px) ${c}`)}}else t.push(o);return t.join(", ")}function Ye(e,i,t,o){return i.map((a)=>`${$e(e,a,void 0,t,o)} ${a}w`).join(", ")}function _n(e,i,t,o,a){return i.map((c)=>{let l=t?t*c:void 0;return`${$e(e,l,void 0,o,a)} ${c}x`}).join(", ")}function $e(e,i,t,o,a){if(!o||o==="local"||o==="static")return e;if(o==="cloudinary"){let c=[];if(i)c.push(`w_${i}`);if(t)c.push(`h_${t}`);if(a)c.push(`f_${a}`);c.push("q_auto");let l=c.join(",");return e.replace("/upload/",`/upload/${l}/`)}if(o==="imgix"){let c=new URLSearchParams;if(i)c.set("w",String(i));if(t)c.set("h",String(t));if(a)c.set("fm",a);c.set("auto","format");let l=e.includes("?")?"&":"?";return`${e}${l}${c.toString()}`}if(o==="bunny"){let c=new URLSearchParams;if(i)c.set("width",String(i));if(t)c.set("height",String(t));if(a)c.set("format",a);let l=e.includes("?")?"&":"?";return`${e}${l}${c.toString()}`}return e}function Nn(e){return`var s=this.style;${e.map((i)=>`s.${i}=''`).join(";")}`}function On(e,i,t="#e5e7eb"){let o=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${i}"><rect width="100%" height="100%" fill="${t}"/></svg>`;return`data:image/svg+xml;base64,${btoa(o)}`}var Qe={name:"StxImage",aliases:["Image","stx-image","stx-img"],render(e,i,t){let o=H(e,"src")||"",a=Uo(o),c=H(e,"alt")||"",l=H(e,"width")||(a?String(a.source.width):void 0),u=H(e,"height")||(a?String(a.source.height):void 0),f=H(e,"sizes"),x=H(e,"srcset"),h=H(e,"densities"),d=H(e,"format"),C=Wo(o)||Ge(o)?.transparent===!0,v=H(e,"placeholder")||(a&&!C?"thumbhash":void 0),S=H(e,"placeholderColor")||"#e5e7eb",y=H(e,"provider"),w=H(e,"class")||H(e,"className")||"",A=H(e,"style")||"",k=H(e,"objectFit")||H(e,"fit"),R=H(e,"objectPosition")||H(e,"position"),E=H(e,"quality"),J=Ne(e,"lazy",!0),L=Ne(e,"preload",!1),U=Ne(e,"priority",!1),z=H(e,"loading"),N=H(e,"decoding")||"async",q=!!a||Ne(e,"picture",!1)||!!d,I=l?Number.parseInt(l):void 0,_=u?Number.parseInt(u):void 0,T=x||"",F="";if(a)T=a.sources[a.fallback.format]||"",F=f?Je(f):"100vw";else if(!T&&f&&y&&y!=="local"&&y!=="static")T=Ye(o,Ke,y,d),F=Je(f);else if(!T&&h){let Z=h.split(/\s+/).map((P)=>Number.parseFloat(P.replace("x","")));T=_n(o,Z,I,y,d)}else if(f)F=Je(f);let D=[];if(A)D.push(A);if(k)D.push(`object-fit:${k}`);if(R)D.push(`object-position:${R}`);if(I&&_)D.push(`aspect-ratio:${I}/${_}`);let re=[],ae=v==="blur"||v==="color"||v==="thumbhash";if(ae&&!C){let Z=a?.placeholder?{dataUrl:a.placeholder.dataUrl,color:S}:Ge(o);if(Z&&v==="color")D.push(`background-color:${Z.color}`),re.push("backgroundColor");else if(Z)D.push(`background-color:${Z.color}`),D.push(`background-image:url(${Z.dataUrl})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),re.push("backgroundColor","backgroundImage");else{let P=On(I||16,_||9,S);D.push(`background-image:url(${P})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),re.push("backgroundImage")}}else if(!ae&&v&&v!=="empty"&&v!=="none")D.push(`background-image:url(${n(v)})`),D.push("background-size:cover"),D.push("background-repeat:no-repeat"),re.push("backgroundImage");let M=a?.fallback.url||$e(o,I,_,y,d),V=[];if(V.push(`src="${n(Tr(M,"fetched"))}"`),V.push(`alt="${n(c)}"`),l)V.push(`width="${n(l)}"`);if(u)V.push(`height="${n(u)}"`);let Re=z||(U||L?"eager":J?"lazy":"");if(Re)V.push(`loading="${n(Re)}"`);if(U)V.push('fetchpriority="high"');if(V.push(`decoding="${n(N)}"`),w)V.push(`class="${n(w)}"`);if(D.length>0)V.push(`style="${n(D.join(";"))}"`);if(T)V.push(`srcset="${n(Tr(T,"fetched"))}"`);if(F)V.push(`sizes="${n(F)}"`);let xe=new Set(["src","alt","width","height","lazy","sizes","srcset","placeholder","placeholderColor","class","className","style","objectFit","objectPosition","fit","position","format","provider","quality","densities","preload","priority","picture","loading","decoding"]);if(re.length>0){let Z=typeof e.static.onload==="string"?e.static.onload:"",P=Nn(re)+(Z?`;${Z}`:"");V.push(`onload="${n(P)}"`),xe.add("onload")}V.push(...ie(e,xe)),V.push(...oe(e,xe));let le=`<img ${V.join(" ")} />`,Q="";if(L){let P=d==="webp"?"image/webp":d==="avif"?"image/avif":"";Q=`<link rel="preload" as="image" href="${n(M)}"${P?` type="${P}"`:""}${T?` imagesrcset="${n(T)}"`:""}${F?` imagesizes="${n(F)}"`:""} />
|
|
3
|
+
`}if(q){let Z=[];if(a)for(let P of qo(a))Z.push(`<source type="image/${P.format}" srcset="${n(P.srcset)}"${F?` sizes="${n(F)}"`:""} />`);if(!a&&(d==="avif"||d==="auto")){let P=$e(o,I,_,y,"avif"),B=T?Ye(o,Ke,y,"avif"):`${P}`;Z.push(`<source type="image/avif" srcset="${n(B)}"${F?` sizes="${n(F)}"`:""} />`)}if(!a&&(d==="webp"||d==="auto")){let P=$e(o,I,_,y,"webp"),B=T?Ye(o,Ke,y,"webp"):`${P}`;Z.push(`<source type="image/webp" srcset="${n(B)}"${F?` sizes="${n(F)}"`:""} />`)}return`${Q}<picture>
|
|
4
|
+
${Z.join(`
|
|
5
|
+
`)}
|
|
6
|
+
${le}
|
|
7
|
+
</picture>`}return`${Q}${le}`}};var _t="/images/safe-image-default.svg";function ge(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}var Bn=`<script>window.__stxSafeImageHandler||(window.__stxSafeImageHandler=function(i){if(i.__stx_fb)return;i.__stx_fb=1;var f=i.getAttribute('data-fallback')||'${_t}';var c=i.getAttribute('data-fallback-class');i.src=f;if(c)i.className=c;});</script>`,et={name:"SafeImage",aliases:["safe-image","safe-img"],render(e,i,t){let o=ge(e,"src")||"",a=ge(e,"alt")||"",c=ge(e,"fallback")||_t,l=ge(e,"class")||ge(e,"className")||"",u=ge(e,"fallbackClassName")||"",f=[];if(f.push(`src="${n(o)}"`),f.push(`alt="${n(a)}"`),l)f.push(`class="${n(l)}"`);if(f.push(`data-fallback="${n(c)}"`),u)f.push(`data-fallback-class="${n(u)}"`);f.push('onerror="window.__stxSafeImageHandler(this)"');let x=new Set(["src","alt","fallback","class","className","fallbackClassName"]);f.push(...ie(e,x)),f.push(...oe(e,x));let h=`<img ${f.join(" ")} />`,d=t.context;if(!d.__safeImageHandlerEmitted)return d.__safeImageHandlerEmitted=!0,`${Bn}${h}`;return h}};function tt(e){return e.replace(/[;{}()]/g,"").replace(/url/gi,"")}function Se(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}function Oe(e,i,t){let o=Se(e,i);if(o!==void 0){let a=Number.parseInt(o,10);if(!Number.isNaN(a))return a}return t}var nt={name:"StxLoadingIndicator",aliases:["stx-loading-indicator"],render(e,i,t){let o=tt(Se(e,"color")||"#6366f1"),a=tt(Se(e,"initialColor")||Se(e,"initial-color")||""),c=tt(Se(e,"height")||"3px"),l=Oe(e,"duration",2000),u=Oe(e,"throttle",200),f=Oe(e,"zIndex",999999)||Oe(e,"z-index",999999),x=a?`linear-gradient(to right, ${a}, ${o})`:o;return`
|
|
8
|
+
<div id="stx-loading-indicator" style="position:fixed;top:0;left:0;right:0;height:${c};background:${x};z-index:${f};transform:scaleX(0);transform-origin:left;transition:transform 0.1s ease-out,opacity 0.3s ease;opacity:0;pointer-events:none">
|
|
9
|
+
<div style="position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,0.4) 50%,transparent 100%);animation:stx-shimmer 1.5s infinite"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<style>@keyframes stx-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}</style>
|
|
12
|
+
<script>
|
|
13
|
+
(function(){var el=document.getElementById('stx-loading-indicator'),p=0,l=!1,i=null;function u(v){p=Math.min(Math.max(v,0),100);if(el){el.style.opacity=p>0?'1':'0';el.style.transform='scaleX('+(p/100)+')'}}window.stxLoading={start:function(){l=!0;p=0;u(10);if(i)clearInterval(i);i=setInterval(function(){if(!l)return;var r=90-p,inc=Math.max(0.5,r*0.1);if(p<90)u(p+inc)},${u})},finish:function(){l=!1;if(i){clearInterval(i);i=null}u(100);setTimeout(function(){if(el)el.style.opacity='0';setTimeout(function(){p=0;if(el)el.style.transform='scaleX(0)'},300)},200)},set:function(v){u(v)},clear:function(){l=!1;p=0;if(i){clearInterval(i);i=null}if(el){el.style.opacity='0';el.style.transform='scaleX(0)'}}};document.addEventListener('click',function(e){var a=e.target.closest&&e.target.closest('a');if(!a)return;var h=a.getAttribute('href');if(!h||h.startsWith('http')||h.startsWith('#')||h.startsWith('mailto:')||h.startsWith('tel:')||a.target==='_blank')return;window.stxLoading.start()});window.addEventListener('popstate',function(){window.stxLoading.start()});window.addEventListener('load',function(){window.stxLoading.finish()})})();
|
|
14
|
+
</script>`}};function Nt(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}function Tn(e,i,t){let o=Nt(e,i);if(o!==void 0){let a=Number.parseInt(o,10);if(!Number.isNaN(a))return a}return t}var Et={"top-right":"top:1rem;right:1rem","top-left":"top:1rem;left:1rem","top-center":"top:1rem;left:50%;transform:translateX(-50%)","bottom-right":"bottom:1rem;right:1rem","bottom-left":"bottom:1rem;left:1rem","bottom-center":"bottom:1rem;left:50%;transform:translateX(-50%)"},rt={name:"StxToast",aliases:["stx-toast"],render(e,i,t){let o=n(Nt(e,"position")||"top-right"),a=Tn(e,"max",5),c=Et[o]||Et["top-right"];return`<div id="stx-toast-container" data-stx-toast-position="${o}" data-stx-toast-max="${a}" style="position:fixed;${c};z-index:999999;display:flex;flex-direction:column;gap:0.5rem;pointer-events:none;max-width:24rem;width:100%"></div>
|
|
15
|
+
<style>
|
|
16
|
+
@keyframes stx-toast-in{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}
|
|
17
|
+
@keyframes stx-toast-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}
|
|
18
|
+
@keyframes stx-toast-in-left{from{opacity:0;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}
|
|
19
|
+
@keyframes stx-toast-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-100%)}}
|
|
20
|
+
@keyframes stx-toast-in-center{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}
|
|
21
|
+
@keyframes stx-toast-out-center{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}
|
|
22
|
+
</style>`}};function Te(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}var Ot={sm:"max-width:24rem",md:"max-width:32rem",lg:"max-width:42rem",xl:"max-width:56rem",full:"max-width:calc(100vw - 2rem);max-height:calc(100vh - 2rem)"},st={name:"StxModal",aliases:["stx-modal"],render(e,i,t){let o=Te(e,"id");if(!o)return console.warn('[stx] <StxModal> requires an "id" prop'),"<!-- StxModal: missing id prop -->";let a=n(o),c=Te(e,"size")||"md",l=Te(e,"closeOnBackdrop")!=="false",u=Te(e,"closeOnEscape")!=="false",f=Ot[c]||Ot.md;return`<div id="stx-modal-${a}" class="stx-modal-backdrop" data-stx-modal="${a}" data-close-backdrop="${l}" data-close-escape="${u}" style="display:none;position:fixed;inset:0;z-index:99999;align-items:center;justify-content:center;background:rgba(0,0,0,0.5);backdrop-filter:blur(2px);opacity:0;transition:opacity 0.2s ease" aria-modal="true" role="dialog">
|
|
23
|
+
<div class="stx-modal-panel" style="${f};width:100%;margin:1rem;border-radius:0.75rem;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;transform:scale(0.95) translateY(8px);transition:transform 0.2s ease,opacity 0.2s ease;opacity:0;background:var(--stx-modal-bg,#fff);color:var(--stx-modal-text,#1f2937)">
|
|
24
|
+
<div style="padding:1.5rem">${i}</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<style>
|
|
28
|
+
@media(prefers-color-scheme:dark){[data-stx-modal]{--stx-modal-bg:#1f2937;--stx-modal-text:#f3f4f6}}
|
|
29
|
+
.stx-modal-backdrop[data-stx-modal-open]{display:flex!important;opacity:1}
|
|
30
|
+
.stx-modal-backdrop[data-stx-modal-open] .stx-modal-panel{transform:scale(1) translateY(0);opacity:1}
|
|
31
|
+
</style>`}};function me(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);let t=e.static[i];if(typeof t==="string")return t;return}var Bt={sm:"16rem",md:"24rem",lg:"32rem",xl:"40rem"},it={name:"StxDrawer",aliases:["stx-drawer"],render(e,i,t){let o=me(e,"id");if(!o)return console.warn('[stx] <StxDrawer> requires an "id" prop'),"<!-- StxDrawer: missing id prop -->";let a=n(o),c=me(e,"side")||"right",l=me(e,"size")||"md",u=me(e,"closeOnBackdrop")!=="false",f=me(e,"closeOnEscape")!=="false",x=me(e,"overlay")!=="false",h=Bt[l]||Bt.md,d=c==="left",C=d?"left:0":"right:0",v=d?"translateX(-100%)":"translateX(100%)",S=d?"stx-drawer-slide-left":"stx-drawer-slide-right";return`<div id="stx-drawer-${a}" class="stx-drawer-backdrop" data-stx-drawer="${a}" data-close-backdrop="${u}" data-close-escape="${f}" style="display:none;position:fixed;inset:0;z-index:99999;${x?"background:rgba(0,0,0,0.5);backdrop-filter:blur(2px)":"background:transparent;pointer-events:none"};opacity:0;transition:opacity 0.2s ease" role="dialog" aria-modal="true">
|
|
32
|
+
<div class="stx-drawer-panel" style="position:fixed;top:0;bottom:0;${C};width:${h};max-width:100vw;transform:${v};transition:transform 0.3s cubic-bezier(0.4,0,0.2,1);background:var(--stx-drawer-bg,#fff);color:var(--stx-drawer-text,#1f2937);box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow-y:auto;pointer-events:auto">
|
|
33
|
+
<div style="padding:1.5rem">${i}</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<style>
|
|
37
|
+
@media(prefers-color-scheme:dark){[data-stx-drawer]{--stx-drawer-bg:#1f2937;--stx-drawer-text:#f3f4f6}}
|
|
38
|
+
.stx-drawer-backdrop[data-stx-drawer-open]{display:block!important;opacity:1}
|
|
39
|
+
.stx-drawer-backdrop[data-stx-drawer-open] .stx-drawer-panel{transform:translateX(0)}
|
|
40
|
+
</style>`}};import{existsSync as Dn,readFileSync as jn}from"fs";var De=new Map,Tt=new Set;function Mn(e){if(Tt.has(e))return;Tt.add(e),console.warn(`[stx] icon collection "${e}" is not installed, so its icons render as nothing. Install it with \`bun add -d @iconify-json/${e}\`.`)}function Ln(e){let i=process.cwd();for(let t of[`${i}/node_modules/@iconify-json/${e}/icons.json`,`${i}/pantry/@iconify-json/${e}/icons.json`,`${i}/node_modules/@iconify/json/json/${e}.json`,`${i}/pantry/@iconify/json/json/${e}.json`])if(Dn(t))return t;for(let t of[`@iconify-json/${e}/icons.json`,`@iconify/json/json/${e}.json`])try{return b.resolve(t)}catch{}return null}function zn(e){if(De.has(e))return De.get(e);let i=Ln(e);if(!i)return Mn(e),null;try{let t=JSON.parse(jn(i,"utf8"));return De.set(e,t),t}catch{return null}}function Un(e,i,t,o){let a=[];if(i.rotate)a.push(`rotate(${i.rotate*90} ${t/2} ${o/2})`);if(i.hFlip)a.push(`translate(${t} 0) scale(-1 1)`);if(i.vFlip)a.push(`translate(0 ${o}) scale(1 -1)`);return a.length?`<g transform="${a.join(" ")}">${e}</g>`:e}function Fn(e,i){let t=i,o=e.icons[t],a={hFlip:!1,vFlip:!1,rotate:0};for(let u=0;!o&&u<8;u++){let f=e.aliases?.[t];if(!f)return null;if(f.hFlip)a.hFlip=!a.hFlip;if(f.vFlip)a.vFlip=!a.vFlip;if(f.rotate)a.rotate=((a.rotate+f.rotate)%4+4)%4;t=f.parent,o=e.icons[t]}if(!o)return null;let c=o.width??e.width??24,l=o.height??e.height??24;return{body:Un(o.body,a,c,l),width:c,height:l}}function he(e,i){if(e.serverDynamic[i]!==void 0)return String(e.serverDynamic[i]);if(e.static[i]!==void 0)return String(e.static[i]);if(e.clientReactive[i]!==void 0)return e.clientReactive[i];return}var ot={name:"Icon",aliases:["icon","stx-icon"],render(e,i,t){let o=he(e,"name")??he(e,"icon");if(!o)return"<!-- Icon: missing name/icon prop -->";let a="lucide",c=o;if(o.includes(":")){let w=o.split(":");a=w[0],c=w[1]}let l=n(he(e,"size")||"24"),u=n(he(e,"color")||"currentColor"),f=n(he(e,"class")||""),x=n(he(e,"style")||""),h=De.get(a)??zn(a);if(!h)return`<!-- Icon: collection "${a}" not loaded -->`;let d=Fn(h,c);if(!d)return`<!-- Icon: "${c}" not found in ${a} -->`;let C=`0 0 ${d.width} ${d.height}`,v=d.body;if(u!=="currentColor")v=v.replace(/currentColor/g,u);let S=f?` class="${f}"`:"",y=x?` style="${x}"`:"";return`<svg xmlns="http://www.w3.org/2000/svg" width="${l}" height="${l}" viewBox="${C}" fill="none"${S}${y}>${v}</svg>`}};function Dt(e,...i){for(let t of i){if(e.serverDynamic[t]!==void 0)return String(e.serverDynamic[t]);let o=e.static[t];if(typeof o==="string")return o}return}function jt(e,i){let t=new RegExp(`<(template|div|span)[^>]*\\bslot=["']${i}["'][^>]*>([\\s\\S]*?)<\\/\\1>`,"i"),o=e.match(t);if(!o)return{region:null,rest:e};return{region:o[2],rest:e.replace(o[0],"")}}var at={name:"Suspense",aliases:["suspense"],render(e,i,t){let o=jt(i,"fallback"),a=o.rest,c=jt(a,"error"),l=c.rest,u=o.region??Dt(e,"fallback")??'<div class="stx-suspense-loading">Loading\u2026</div>',f=c.region??Dt(e,"errorFallback","error-fallback")??'<div class="stx-suspense-error">Something went wrong.</div>';return`<div data-stx-suspense><div data-stx-suspense-fallback>${u}</div><div data-stx-suspense-error hidden>${f}</div><div data-stx-suspense-content hidden>${l}</div></div>`}};function je(e,...i){for(let t of i){if(e.serverDynamic[t]!==void 0)return String(e.serverDynamic[t]);let o=e.static[t];if(typeof o==="string")return o}return}var lt={name:"TransitionGroup",aliases:["transition-group"],render(e,i,t){let o=(je(e,"name")||"v").replace(/["'<>]/g,""),a=(je(e,"tag")||"div").replace(/[^a-z0-9-]/gi,"")||"div",c=je(e,"class"),l=je(e,"id"),u=[`data-stx-transition-group="${o}"`,c?`class="${c}"`:"",l?`id="${l}"`:""].filter(Boolean).join(" ");return`<${a} ${u}>${i}</${a}>`}};function Mt(e=de){e.registerBuiltin(Ze),e.registerBuiltin(Qe),e.registerBuiltin(et),e.registerBuiltin(nt),e.registerBuiltin(rt),e.registerBuiltin(st),e.registerBuiltin(it),e.registerBuiltin(ot),e.registerBuiltin(at),e.registerBuiltin(lt)}var zt=new Map;function Wn(e){let i=zt.get(e.source);if(!i)i=new RegExp(`(${e.source})(?![\\w.:-])`,"y"),zt.set(e.source,i);return i}var Ut=new WeakMap;function Ft(e){let i=Ut.get(e);if(!i)i=new Set([...e].map((o)=>o.toLowerCase())),Ut.set(e,i);let t=i;return(o)=>!/[a-z]/.test(o)&&t.has(o.toLowerCase())}function Hn(e,i){let t="";for(let o=i;o<e.length;o++){let a=e[o];if(t){if(a==="\\")o++;else if(a===t)t=""}else if(a==='"'||a==="'")t=a;else if(a===">")return o}return e.length}function Wt(e,i,t){let o=[],a=0,c=typeof t==="function"?t:t?(l)=>t.has(l.toLowerCase()):void 0;while(a<e.length){let l=e.indexOf("<",a);if(l===-1)break;let u=Wn(i);u.lastIndex=l+1;let f=u.exec(e);if(!f){a=l+1;continue}let x=f[1];if(c&&c(x)){let w=l+1+x.length;while(w<e.length&&e[w]!==">")w++;a=w+1;continue}let h=l+1+x.length,d=null,C=h,v=-1,S=!1;while(h<e.length){let w=e[h];if(d){if(w==="\\"&&h+1<e.length){h+=2;continue}if(w===d)d=null;h++;continue}if(w==='"'||w==="'"){d=w,h++;continue}if(w==="/"&&h+1<e.length&&e[h+1]===">"){v=h+2,S=!0;break}if(w===">"){v=h+1;break}h++}if(v===-1){a=l+1;continue}let y=e.slice(C,S?v-2:v-1).trim();if(S)o.push({fullMatch:e.slice(l,v),tagName:x,attributes:y,content:"",startIndex:l,endIndex:v,isSelfClosing:!0}),a=v;else{let w=`<${x}`,A=`</${x}>`,k=1,R=v,E=-1;while(k>0&&R<e.length){let U=e.indexOf(w,R),z=e.indexOf(A,R);if(z===-1)break;if(U!==-1&&U<z){let N=e[U+w.length];if(N===" "||N===">"||N==="/"||N===`
|
|
41
|
+
`||N==="\t"){let q=Hn(e,U+w.length);if(e[q-1]!=="/")k++;R=q+1}else R=U+w.length}else{if(k--,k===0){E=z;break}R=z+A.length}}if(E===-1){a=v;continue}let J=e.slice(v,E),L=E+A.length;o.push({fullMatch:e.slice(l,L),tagName:x,attributes:y,content:J,startIndex:l,endIndex:L,isSelfClosing:!1}),a=L}}return o}function ft(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�?39;/g,"'").replace(/'/gi,"'").replace(/&/g,"&")}function Ht(e,i){try{let t=Buffer.from(e,"base64").toString("utf8");return JSON.parse(t)}catch{}try{let t=e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");return JSON.parse(t)}catch(t){if(i?.debug)console.error("Error decoding __stx_ prop:",t);return e}}function Me(e,i){let t=0,o="",a=i;while(a<e.length){let c=e[a];if(o){if(c==="\\")a++;else if(c===o)o=""}else if(c==='"'||c==="'"||c==="`")o=c;else if(c==="{")t++;else if(c==="}"){if(t--,t===0)return e.slice(i,a+1)}a++}return e.slice(i)}function qt(e){let i=e.trim();if(!i.startsWith("{")||!i.endsWith("}"))return null;if(Me(i,0).length!==i.length)return null;return i.slice(1,-1).trim()}function Xt(e){let i=[],t=0,o=e.length;while(t<o){while(t<o&&/\s/.test(e[t]))t++;if(t>=o)break;let a="";while(t<o&&!/[\s=]/.test(e[t]))a+=e[t],t++;if(!a)break;while(t<o&&/\s/.test(e[t]))t++;if(t<o&&e[t]==="="){t++;while(t<o&&/\s/.test(e[t]))t++;let c="";if(t<o&&(e[t]==='"'||e[t]==="'")){let l=e[t];t++;while(t<o&&e[t]!==l){if(e[t]==="\\"&&t+1<o)t++,c+=e[t];else c+=e[t];t++}if(t<o)t++}else if(e[t]==="{")c=Me(e,t),t+=c.length;else while(t<o&&!/\s/.test(e[t]))c+=e[t],t++;i.push({name:a,value:c})}else i.push({name:a,value:!0})}return i}var qn=new Set(["disabled","checked","readonly","required","autofocus","autoplay","controls","default","defer","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","reversed","selected"]),Xn=new Set([":for","x-for","v-for","@for"]),Vt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Vn(e){return dt(e).map((i)=>[i.start,i.end])}function dt(e){let i=[],t=new Map;for(let o of Lt(e)){let a=o.name.toLowerCase();if(o.closing){let x=t.get(a)?.pop();if(x)x.end=o.end;continue}let l=/(?::for|x-for|v-for|@for)\s*=/.test(o.attributes)?Xt(o.attributes).find((x)=>Xn.has(x.name)):void 0,u=typeof l?.value==="string"?l.value:null,f=u!==null?{start:o.start,end:o.end,names:te(u),tag:a}:null;if(f)i.push(f);if(!o.selfClosing&&!Vt.has(a)){let x=t.get(a);if(!x)x=[],t.set(a,x);x.push(f)}}return i}var Zn=/(?:^|\s)((?:[\w-]+:)*-?space-[xy]-(?!reverse(?:\s|$))[\w./[\]-]+)(?=\s|$)/;function Zt(e){let i=new Map,t=[];for(let o of Lt(e)){let a=o.name.toLowerCase();if(o.closing){for(let l=t.length-1;l>=0;l--)if(t[l].name===a){t.length=l;break}continue}let c=t.at(-1);if(c){if(c.utility&&c.children>0)i.set(o.start,c.utility);if(!/(?:^|\s)hidden(?=[\s=]|$)/.test(o.attributes))c.children++}if(!o.selfClosing&&!Vt.has(a)){let l=/(?:^|\s)class\s*=\s*(["'])([\s\S]*?)\1/.exec(o.attributes)?.[2];t.push({name:a,utility:l?Zn.exec(l)?.[1]??null:null,children:0})}}return i}function Gt(e){if(typeof e==="string")return e;if(Array.isArray(e))return e.filter(Boolean).map((i)=>Gt(i)).join(" ");if(e&&typeof e==="object")return Object.entries(e).filter(([,i])=>i).map(([i])=>i).join(" ");return e?String(e):""}function vc(e,i){if(!/:[\w-]+=/.test(e))return e;let t=e,o=/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi,a=[],c;while((c=o.exec(e))!==null)a.push([c.index,c.index+c[0].length]);a.push(...Vn(e));let l=new Set([...ct(i),...Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[]]);function u(d){return a.some(([C,v])=>d>=C&&d<v)}let f=[],x=new Map,h=256;for(let d of Lt(t)){if(d.closing||u(d.start))continue;let C=d.attributes.trimEnd();if(!C||!C.includes(":"))continue;let v=/(?:^|\s)data-native(?:\s|=|$)/i.test(C.replace(/"[^"]*"|'[^']*'/g,"")),S=/\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g,y,w=C,A=!1;while((y=S.exec(C))!==null){if($r(C,y.index,!0)?.kind==="attribute")continue;let k=y[1],R=y[2];if(Tl(k))continue;if(j(R,l))continue;if(R.includes("()")&&!R.includes(".get(")||R.includes("$store")||R.includes("$ref"))continue;try{let E=Object.keys(i),J=Object.values(i),L=R.match(/^([a-zA-Z_$][\w$]*)/);if(L&&!E.includes(L[1])&&!["true","false","null","undefined","Math","JSON","String","Number","Array","Object","Date","parseInt","parseFloat"].includes(L[1]))continue;let U=JSON.stringify([E,R]),z=x.get(U);if(!z){if(z=Function(...E,`return (${R})`),x.size>=h)x.clear();x.set(U,z)}let N=z(...J);if(k==="class"){let q=X(Gt(N));if(q){let I=w.match(/\sclass="([^"]*)"/);if(I)w=w.replace(I[0],()=>` class="${I[1]} ${q}"`);else w=w.replace(y[0],()=>` class="${q}"`)}else w=w.replace(y[0],"");A=!0;continue}if(qn.has(k)){if(N)w=w.replace(y[0],` ${k}`);else w=w.replace(y[0],"");A=!0;continue}if(N===null||N===void 0||N===!1)w=w.replace(y[0],"");else{let q=v&&typeof N==="object"?JSON.stringify(N):String(N),I=En(k,q);w=w.replace(y[0],()=>` ${k}="${I}"`)}A=!0}catch(E){if(E instanceof pe)throw E;continue}}if(A){let k=d.selfClosing?" /":"",E=`<${d.name}${w}${k}>`;f.push({start:d.start,end:d.end,replacement:E})}}if(f.length>0){let d=Array(f.length*2+1),C=0;for(let v=0;v<f.length;v++){let{start:S,end:y,replacement:w}=f[v];d[v*2]=t.slice(C,S),d[v*2+1]=w,C=y}d[f.length*2]=t.slice(C),t=d.join("")}return t}import Kt from"fs";import Jt from"path";var Yt=!1;function Gn(e,i,t,o=!1,a=new Set){let c={static:{},staticNames:{},serverDynamic:{},serverDynamicNames:{},clientReactive:{},events:{}},l=new Set(Array.isArray(i.__stx_client_signal_names)?i.__stx_client_signal_names:[]),u=(d)=>{if(l.size===0)return!1;let C=r(d),v=C.match(/^\s*[!+~(-]*\s*([a-zA-Z_$][\w$]*)/)?.[1];if(v&&l.has(v))return!0;for(let S of l){let y=S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`(?:^|[^\\w$.])${y}\\s*\\(`).test(C))return!0}return!1},f=new Set($l),x=(d)=>{if(!d.includes("-")||d.startsWith("@")||d.startsWith(":")||d.startsWith("x-")||d.startsWith("__"))return d;if(d.startsWith("aria-")||d.startsWith("data-"))return d;return d.replace(/-([a-z0-9])/g,(C,v)=>v.toUpperCase())},h=(d,C)=>{let v=x(d);if(c.static[v]=C,v!==d)c.staticNames[v]=d};for(let[d,C]of Object.entries(e)){let v=d.startsWith("x-")&&!f.has(d)&&!d.startsWith("x-bind:")&&!d.startsWith("x-on:")?`:${d.slice(2)}`:d;if(v.startsWith("@")){c.events[v]=C;continue}if(v.startsWith("__stx_")){let S=x(v.slice(6));c.serverDynamic[S]=Ht(C,t);continue}if(v.startsWith(":")){let S=x(v.slice(1)),y=C===se?S:C;if(S==="if"||S==="for"||S==="show"){c.clientReactive[S]=y;continue}if(o){c.clientReactive[S]=y;continue}if(j(y,a)){c.clientReactive[S]=y;continue}if(u(y)){c.clientReactive[S]=y;continue}try{if(!m(y)){if(t.debug)console.error(`Unsafe expression in :${S} binding: ${y}`);c.clientReactive[S]=y;continue}let w=Object.keys(i),A=new Set(["true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","if","else"]),k=new Set(Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[]);if(ut(y).some((L)=>!A.has(L)&&!w.includes(L)&&(!(L in globalThis)||k.has(L)))){c.clientReactive[S]=y;continue}let J=p(y,w)(...Object.values(i));if(c.serverDynamic[S]=J,S!==v.slice(1)&&c.serverDynamicNames)c.serverDynamicNames[S]=v.slice(1)}catch{c.clientReactive[S]=y}continue}if(typeof C==="string"&&C.includes("{{")&&C.includes("}}")){let S=Qn(C,a);if(S!==null){c.clientReactive[x(v)]=S;continue}let y=C.match(/^\{\{\s*([\s\S]+?)\s*\}\}$/);if(y)try{let w=y[1];if(m(w)){let k=p(w,Object.keys(i))(...Object.values(i));h(v,k!=null?String(k):"")}else{if(t.debug)console.error(`Unsafe expression in ${v}: ${w}`);h(v,C)}}catch(w){if(t.debug)console.error(`Error evaluating expression for ${v}:`,w);h(v,C)}else{let w=C,A=/\{\{\s*([\s\S]+?)\s*\}\}/g,k;while((k=A.exec(C))!==null)try{let R=k[1];if(!m(R)){if(t.debug)console.error(`Unsafe expression in ${v}: ${R}`);continue}let J=p(R,Object.keys(i))(...Object.values(i));w=w.replace(k[0],String(J??""))}catch(R){if(t.debug)console.error(`Error evaluating expression in ${v}:`,R)}h(v,w)}continue}h(v,C===se?"true":ft(C))}return c}var gt=new Set;function Jh(){gt.clear()}function Kn(e){let i=/^\s*(?:<!--[\s\S]*?-->\s*)*<(?:div|span)\b((?:[^>"']|"[^"]*"|'[^']*')*)>/.exec(e);return!!i&&/\sdata-stx-component-wrapper(?=[\s=]|$)/.test(i[1])&&!/\sstx-hydrate(?=[\s=]|$)/.test(i[1])}function Jn(e,i,t){let o=`${t}\x00${e}\x00${i}`;if(gt.has(o))return;gt.add(o);let a=/space-x-/.test(i)?"flex":"flex flex-col",c=i.replace(/space-[xy]-/,"gap-");console.warn(`[stx] <${e}> in ${t} is a later child of a "${i}" stack, so it gets no spacing: the utility puts its margin on the component's scope wrapper, which generates no box. Use "${a} ${c}" on the parent instead -- gap reaches through the wrapper.`)}var pt=new Set;function Yh(){pt.clear()}function Yn(e,i){let t=`${i}\x00${e}`;if(pt.has(t))return;pt.add(t),console.warn(`[stx] <${e}> in ${i} is inside a <template :for>, so its props and slot expressions will not see the loop variables and render empty. Put the directive on the element the loop repeats instead -- <tr :for="..."> or <span :for="..." class="contents"> -- which binds correctly.`)}function Qn(e,i){if(i.size===0)return null;let t=/\{\{\s*([\s\S]+?)\s*\}\}/g,o=[...e.matchAll(t)];if(!o.some((u)=>j(u[1],i)))return null;let a=e.match(/^\{\{\s*([\s\S]+?)\s*\}\}$/);if(a&&o.length===1)return a[1];let c="",l=0;for(let u of o)c+=e.slice(l,u.index).replace(/[`\\$]/g,(f)=>`\\${f}`),c+=`\${${u[1]}}`,l=u.index+u[0].length;return c+=e.slice(l).replace(/[`\\$]/g,(u)=>`\\${u}`),`\`${c}\``}var er=[[/@if\s*\(/,"@endif"],[/@unless\s*\(/,"@endunless"]];function tr(e,i,t){if(!e.includes("@"))return e;if(!er.some(([a,c])=>a.test(e)&&e.includes(c)))return e;try{return ue(e,i,t)}catch{return e}}function be(e){let i={},t=0,o=e.length;while(t<o){while(t<o&&/\s/.test(e[t]))t++;if(t>=o)break;let a="";while(t<o&&!/[\s=]/.test(e[t]))a+=e[t],t++;if(!a)break;while(t<o&&/\s/.test(e[t]))t++;if(t<o&&e[t]==="="){t++;while(t<o&&/\s/.test(e[t]))t++;let c="";if(t<o&&(e[t]==='"'||e[t]==="'")){let l=e[t];t++;while(t<o){let u=e[t];if(u==="\\"&&t+1<o){t++,c+=e[t],t++;continue}if(u===l){t++;break}c+=u,t++}}else if(e[t]==="{"){c=Me(e,t),t+=c.length;let l=qt(c);if(l!==null){i[`:${a}`]=l;continue}}else while(t<o&&!/\s/.test(e[t]))c+=e[t],t++;i[a]=c}else i[a]=se}return i}function Qt(e){return Object.entries(e).map(([i,t])=>t===se?i:`${i}="${nr(t)}"`).join(" ")}function nr(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function rr(e){let i=new Set,t=/<([A-Z][A-Za-z0-9]*|stx-[a-z0-9-]+)\b[^>]*>/g,o;while((o=t.exec(e))!==null){let a=o[1];if(de.isBuiltin(a))i.add(a)}return[...i].sort()}async function Xf(e,i,t,o,a){if(!/import\s/.test(e))return e;if(!i.__importedComponents)i.__importedComponents=new Map;let c=i.__importedComponents,l=Jt.dirname(t),u=[],f=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi;for(let d of e.matchAll(f)){let[C,v,S]=d,y=/import\s+(?:(\{[^}]*\})|([A-Za-z_$][\w$]*))\s+from\s+['"]([^'"]+)['"]\s*;?\s*\n?/g,w=S,A,k=[];while((A=y.exec(S))!==null){let[R,E,J,L]=A,U=null,z=null;if(L.startsWith(".")||L.startsWith("/")){let I=Jt.resolve(l,L);if(I.endsWith(".stx"))z=I;else{let _=`${I}.stx`;try{if(Kt.statSync(_).isFile())z=_}catch{try{if(Kt.statSync(I).isDirectory())U=I}catch{}}}}else U=Fs(L,l);if(!U&&!z)continue;let N=!1,q=(I,_)=>{c.set(I,_),c.set(I.toLowerCase(),_);let T=I.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();c.set(T,_),a.add(_)};if(J&&z)q(J,z),N=!0;else if(E){let I=E.slice(1,-1).split(",").map((T)=>T.trim()).filter(Boolean).map((T)=>{let F=T.match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(F)return{source:F[1],local:F[2]};return{source:T,local:T}}),_=U?_r(U):null;for(let{source:T,local:F}of I){let D=null;if(z)D=z;else if(_)D=_.get(T)??_.get(T.toLowerCase())??_.get(T.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())??null;if(D)q(F,D),N=!0}}if(N)k.push({start:A.index,end:A.index+R.length})}if(k.length===0)continue;for(let R=k.length-1;R>=0;R--)w=w.slice(0,k[R].start)+w.slice(k[R].end);u.push({start:d.index,end:d.index+C.length,value:`<script${v}>${w}</script>`})}if(u.length===0)return e;let x=[],h=0;for(let d of u)x.push(e.slice(h,d.start),d.value),h=d.end;return x.push(e.slice(h)),x.join("")}async function sr(e,i,t,o,a){let c=e;if(!i.__importedComponents)i.__importedComponents=new Map;let l=i.__importedComponents,u=/@import\s*\(\s*([^)]+)\s*\)/g,f;while((f=u.exec(c))!==null){let[x,h]=f,d=h.split(",").map((C)=>C.trim().replace(/^['"]|['"]$/g,"")).filter((C)=>C.length>0);for(let C of d){let v=C.split("/"),y=v[v.length-1].replace(/\.stx$/,""),w=y.includes("-")?y.split("-").map((R)=>R.charAt(0).toUpperCase()+R.slice(1)).join(""):y.charAt(0).toUpperCase()+y.slice(1),A=null,k=zs(C,t,o);for(let R of k)try{if(await Bun.file(R).exists()){A=R;break}}catch{}if(A){l.set(w,A),l.set(y,A),l.set(y.toLowerCase(),A);let R=w.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();if(l.set(R,A),a.add(A),o.debug)console.log(`Imported component: ${w} -> ${A}`)}else if(o.debug)console.warn(`Could not resolve imported component: ${C}`)}c=c.replace(x,""),u.lastIndex=0}return c}async function ir(e,i,t,o,a){let c=e,l=o.componentsDir||"components";if(!i.__processedComponents)i.__processedComponents=new Set;let u=i.__processedComponents,f=/@component\s*\(/g,x;while((x=f.exec(c))!==null){let h=x.index,d=h+x[0].length-1,C=1,v=d+1;while(v<c.length&&C>0){if(c[v]==="(")C++;else if(c[v]===")"){if(C--,C===0)break}v++}if(C!==0)break;let S=c.substring(d+1,v),y=v+1,w=S.match(/^\s*['"]([^'"]+)['"]/);if(!w){f.lastIndex=y;continue}let A=w[1],k,R=S.slice(w[0].length),E=R.match(/^\s*,\s*/);if(E)k=R.slice(E[0].length).trim();let J={};if(k)try{J=O(k,i)}catch(I){let _=I instanceof Error?I.message:String(I);c=c.replace(c.substring(h,y),`[Error parsing component props: ${_}]`);continue}let L="",U=y,N=c.substring(y).match(/^([\s\S]*?)@endcomponent/);if(N)L=N[1].trim(),U=y+N[0].length;let q=await We(A,J,L,l,i,t,o,u,a);c=c.substring(0,h)+q+c.substring(U),f.lastIndex=0}return c}async function or(e,i,t,o,a){if(!e)return e;let c=e,l=o.componentsDir||"components";if(!i.__processedComponents)i.__processedComponents=new Set;let u=i.__processedComponents,f=lr(c);if(f.size>0){let y=Array.isArray(i.__stx_client_declared_names)?i.__stx_client_declared_names:[];i.__stx_client_declared_names=[...new Set([...y,...f])]}let x=ee(c);c=x.output;let h=ct(i);return c=await S(c,/[a-z][a-z0-9]*-[a-z0-9-]*/,!1),c=await S(c,/[A-Z][a-zA-Z0-9]*/,!0,Ft(Rr)),c=await S(c,/[a-z][a-z0-9]*/,!1,Rr),c=x.restore(c),c;async function S(y,w,A,k){if(!y)return y;let R=y,E=Wt(R,w,k),J=dt(R),L=!o._nativeHostAttrs&&/space-[xy]-/.test(R),U,z=new Map;for(let I=E.length-1;I>=0;I--){let _=E[I],T=A?G(_.tagName):_.tagName,F=be(tr(_.attributes,i,t)),D=J.filter(({start:B,end:W})=>_.startIndex>=B&&_.startIndex<W);if(D.some((B)=>B.tag==="template"))Yn(_.tagName,t);let re=D.length>0,ae=new Set(h);for(let B of D)for(let W of B.names)ae.add(W);let M=Gn(F,i,o,re,ae);if(typeof M.clientReactive.for==="string")for(let B of te(M.clientReactive.for))ae.add(B);let V=de.getBuiltin(_.tagName),Re=V?await Ir(_.tagName,l,i,t,o):!1,xe=_.tagName==="Image"&&Hs([...Object.keys(M.static),...Object.keys(M.serverDynamic),...Object.keys(M.clientReactive)],Object.keys(M.events),{...M.static,...M.serverDynamic})&&(o._pluginComponentDirs??[]).some((B)=>_r(B).has("Image"));if(V&&!Re&&!xe){let B={context:i,filePath:t,options:o,dependencies:a},W=V.render(M,_.content,B);if(Object.keys(M.events).length>0){let ce=Qt(M.events);W=W.replace(/^(\s*<[a-zA-Z][a-zA-Z0-9-]*)/,`$1 ${ce}`)}if(Object.keys(M.clientReactive).length>0)W=en(W,M.clientReactive);z.set(I,W);continue}if(!A&&_.tagName.includes("-")&&!await Ir(T,l,i,t,o))continue;let le={};for(let[B,W]of Object.entries(M.static))le[B]=W;for(let[B,W]of Object.entries(M.serverDynamic))le[B]=W;let Q={declaredProps:new Set,consumedProps:new Set,reactiveProps:Object.keys(M.clientReactive),events:Object.keys(M.events)},Z=await We(T,le,x.restore(_.content),l,i,t,o,u,a,[...ae],Q,_.tagName);if(L&&Kn(Z)){U??=Zt(R);let B=U.get(_.startIndex);if(B)Jn(_.tagName,B,t)}let P=Z;if(P=ar(P,M,Q.declaredProps,Q.consumedProps,o._nativeHostAttrs),o._nativeHostAttrs){let B=Q.reactiveProps.filter((ne)=>!Q.consumedProps.has(ne)&&!["if","for","show","key","ref"].includes(ne)).map(G),W=mt(P,!0);if(B.length&&W){if(!Object.hasOwn(be(P.slice(W.insertPos,W.tagEnd)),"data-stx-native-host-root"))P=P.slice(0,W.insertPos)+' data-stx-native-host-root="true"'+P.slice(W.insertPos);let ne=Ce(P);P=P.slice(0,ne.insertPos)+` data-stx-native-forward="${B.join(" ")}"`+P.slice(ne.insertPos)}let ce=mt(P,!0);if(ce){let ne=be(P.slice(ce.insertPos,ce.tagEnd)),ke=Ce(P),nn=be(P.slice(ke.insertPos,ke.tagEnd));if(Object.hasOwn(ne,"data-stx-native-host-root")&&!Object.hasOwn(nn,"data-stx-native-host-owner"))P=P.slice(0,ke.insertPos)+" data-stx-native-host-owner"+P.slice(ke.insertPos)}}if(Object.keys(M.events).length>0){let B=Ce(P);if(B){let W=Qt(M.events),ce=Object.keys(M.events).map((ne)=>ne.replace(/^@/,"").split(".")[0]).join(" ");P=P.substring(0,B.insertPos)+` data-stx-parent-events="${ce}" ${W}`+P.substring(B.insertPos)}}if(Object.keys(M.clientReactive).length>0)P=en(P,M.clientReactive);z.set(I,P)}if(z.size===0)return R;let N="",q=0;for(let I=0;I<E.length;I++){let _=z.get(I);if(_===void 0)continue;N+=R.slice(q,E[I].startIndex),N+=_,q=E[I].endIndex}return N+=R.slice(q),N}}function en(e,i){let t=new Set(["if","for"]),o=new Set(["show"]),a=Object.entries(i).filter(([h])=>!t.has(h)),c=a.filter(([h])=>!o.has(h)).map(([h])=>G(h)).join(" "),l=e,u=a.length>0?Ce(l):null;if(u){let h=a.map(([C,v])=>`:${G(C)}="${v.replace(/"/g,""")}"`).join(" "),d=c?` data-stx-parent-bindings="${c}"`:"";l=l.substring(0,u.insertPos)+`${d} ${h}`+l.substring(u.insertPos)}let f=i.if;if(f)l=`<template :if="${f.replace(/"/g,""")}">${l}</template>`;let x=i.for;if(x){let h=i.key,d=h?` :key="${h.replace(/"/g,""")}"`:"";l=`<template :for="${x.replace(/"/g,""")}"${d}>${l}</template>`}return l}function ar(e,i,t=new Set,o=new Set,a=!1){let c=mt(e,a);if(!c)return e;let l=e.slice(c.insertPos,c.tagEnd),u=i.serverDynamic.class??i.static.class;if(a&&typeof u==="string"&&u&&!o.has("class")){let S=/(^|\s)class\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i,y=S.test(l)?l.replace(S,(w,A,k,R,E)=>`${A}class="${n(`${ft(k??R??E)} ${u}`)}"`):` class="${n(u)}"${l}`;e=e.slice(0,c.insertPos)+y+e.slice(c.tagEnd),c.tagEnd+=y.length-l.length,l=y}let f=a||/\bdata-native(?:\s|=)/i.test(l),x=f?o:t,h=new Set(Object.keys(be(l))),d=new Set(["class","className"]);for(let S of Object.keys(i.static)){let y=i.staticNames[S]??S;if(h.has(y)||x.has(S)||!f&&!Ve(y))d.add(S)}for(let S of Object.keys(i.serverDynamic)){let y=i.serverDynamicNames?.[S]??S;if(h.has(y)||x.has(S)||!f&&!Ve(y))d.add(S)}let C=[];if(f){for(let[S,y]of Object.entries(i.static)){if(d.has(S)||y!==!0&&y!==se)continue;d.add(S),C.push(`${n(i.staticNames?.[S]??S)}="true"`)}for(let[S,y]of Object.entries(i.serverDynamic)){if(d.has(S)||y!==!0)continue;d.add(S),C.push(`${n(i.serverDynamicNames?.[S]??S)}="true"`)}}let v=[...ie(i,d),...oe(i,d),...C];if(f){for(let[S,y]of Object.entries(i.serverDynamic)){if(d.has(S)||y!==!1)continue;let w=i.serverDynamicNames?.[S]??S;v.push(`${n(w)}="false"`)}for(let[S,y]of Object.entries(i.serverDynamic)){if(d.has(S)||y===null||typeof y!=="object")continue;let w=JSON.stringify(y);if(w!==void 0){let A=i.serverDynamicNames?.[S]??S;v.push(`${n(A)}="${n(w)}"`)}}}if(v.length===0)return e;return`${e.slice(0,c.insertPos)} ${v.join(" ")}${e.slice(c.insertPos)}`}function Ce(e){let i=tn(e,0);if(i)return i;let t=/<([a-zA-Z][a-zA-Z0-9-]*)\b[^>]*\bdata-stx-scope(?:\s|=|>)/i.exec(e);if(t)return{insertPos:t.index+1+t[1].length,tagEnd:ht(e,t.index+1+t[1].length)};return null}function mt(e,i=!1){let t=Ce(e);if(!t)return null;let o=e.slice(t.insertPos,t.tagEnd),a=/\bdata-stx-component-wrapper(?:\s|=|>|$)/i.test(o)?tn(e,t.tagEnd+1):t;return a&&i?cr(e,a)??a:a}function cr(e,i){if(!e.includes("data-stx-native-host-root"))return null;let t=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),o=e.lastIndexOf("<",i.insertPos),a=0,c;while(o>=0&&o<e.length){if(e.startsWith("<!--",o)){let h=e.indexOf("-->",o+4);if(h<0)return null;o=e.indexOf("<",h+3);continue}let l=/^<(\/?)([a-z][\w-]*)\b/i.exec(e.slice(o));if(!l){o=e.indexOf("<",o+1);continue}let u=l[2].toLowerCase(),f=o+l[0].length,x=ht(e,f);if(l[1]){if(a--,c!==void 0&&a<c)c=void 0;if(a<=0)return null}else if(u==="script"||u==="style"){let h=new RegExp(`</${u}\\s*>`,"gi");if(h.lastIndex=x+1,!h.exec(e))return null;o=e.indexOf("<",h.lastIndex);continue}else{let h=be(e.slice(f,x)),d=a>0&&(Object.hasOwn(h,"data-stx-component-wrapper")||Object.hasOwn(h,"data-stx-native-host-owner"));if(c===void 0&&!d&&Object.hasOwn(h,"data-stx-native-host-root"))return{insertPos:f,tagEnd:x};if(!t.has(u)&&e[x-1]!=="/"){if(a++,c===void 0&&d)c=a}else if(a===0)return null}o=e.indexOf("<",x+1)}return null}function tn(e,i){let t=i;while(t<e.length){let o=e.slice(t),a=o.match(/^\s+/);if(a){t+=a[0].length;continue}if(o.startsWith("<!--")){let u=e.indexOf("-->",t+4);if(u===-1)return null;t=u+3;continue}let c=o.match(/^<(script|style)\b[^>]*>/i);if(c){let u=`</${c[1].toLowerCase()}>`,f=e.toLowerCase().indexOf(u,t+c[0].length);if(f===-1)return null;t=f+u.length;continue}let l=o.match(/^<([a-zA-Z][a-zA-Z0-9-]*)(?:\s|>|\/)/);if(!l)return null;return{insertPos:t+1+l[1].length,tagEnd:ht(e,t+1+l[1].length)}}return null}function ht(e,i){let t="";for(let o=i;o<e.length;o++){let a=e[o];if(t){if(a==="\\")o++;else if(a===t)t=""}else if(a==='"'||a==="'")t=a;else if(a===">")return o}return e.length}function lr(e){let i=new Set;for(let t of e.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi)){let o=t[1];if(!/\bclient\b/.test(o)||/\bserver\b/.test(o))continue;for(let a of wi(t[2]))i.add(a);for(let a of t[2].matchAll(/^\s*import\s+(?:type\s+)?(?:([\w$]+)\s*,?\s*)?(?:\{([^}]*)\}|\*\s+as\s+([\w$]+))?\s*from\s/gm)){if(a[1])i.add(a[1]);if(a[3])i.add(a[3]);for(let c of(a[2]??"").split(",")){let l=c.replace(/^\s*type\s+/,"").split(/\s+as\s+/).pop().trim();if(/^[A-Za-z_$][\w$]*$/.test(l))i.add(l)}}}return i}async function bs(e,i,t,o,a){if(!Yt)Mt(de),Yt=!0;let c=await Xf(e,i,t,o,a);c=await sr(c,i,t,o,a),c=await ir(c,i,t,o,a);let l=[];for(let u=0;u<3;u++){let f=l.length,x=ye(c,Be,(d,C)=>`\x00STX_COMPONENT_COMMENT_${f+C}\x00`,`STX_COMPONENT_COMMENT:${f}`);l.push(...x.tokens);let h=c;if(c=await or(x.output,i,t,o,a),c===h)break}if(l.length>0)c=c.replace(/\x00STX_COMPONENT_COMMENT_(\d+)\x00/g,(u,f)=>l[Number(f)]??"");if(o.debug){let u=rr(c);if(u.length>0)console.warn(`[stx] ${t}: unresolved component tag(s) after render passes: ${u.join(", ")}. Check nested component output for malformed root tags or recursive component markup.`)}return c}
|
|
42
|
+
export{Uo,Wo,qo,Gh,ys,Xh,vc,Jh,Yh,Xf,bs};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{oe,ie,ae,zn,ve,Ie,es,su,vt,tn,Hn,Vn,Un,ce,Wn,qn,ts}from"./chunk-k7m8659h.js";import"./chunk-5h9d6jew.js";export{ie as DEFAULT_FORMATS,ae as DEFAULT_QUALITY,oe as DEFAULT_WIDTHS,ts as ImageProcessingError,qn as formatSize,tn as generateSizes,vt as generateSrcSet,Hn as getFallbackVariant,es as getImageMetadata,ce as getMimeType,Wn as getTotalSize,Vn as groupVariantsByFormat,ve as isImageBackendAvailable,Un as isImageFile,zn as isSharpAvailable,Ie as processImage,su as resizeAndConvert};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function A(){let{NODE_ENV:n}=process.env;return n==="production"}function
|
|
3
|
-
export{A,
|
|
2
|
+
function A(){let{NODE_ENV:n}=process.env;return n==="production"}function Z(){let{STX_DEBUG:n}=process.env;return!A()||n==="true"}function Pn(){let{NODE_ENV:n}=process.env;return n==="test"}function Bi(n,t){return t??(n==="compile"||A())}function In(n){if(!n)return n;try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(n).trim()}catch{return n}}
|
|
3
|
+
export{A,Z,Pn,Bi,In};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Zh,vs,Yo,xs,fr,Zo,Qo,Zf,Ss,ks,_s,ei,xc,Qf,Ct}from"./chunk-
|
|
2
|
+
import{Zh,vs,Yo,xs,fr,Zo,Qo,Zf,Ss,ks,_s,ei,xc,Qf,Ct}from"./chunk-k3qh0esd.js";import"./chunk-gj16gta9.js";import"./chunk-311mrz2n.js";import"./chunk-095cn3p0.js";import"./chunk-mbp7j1a7.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-sbvkk4cn.js";import"./chunk-dy7vqv1x.js";import{K}from"./chunk-kgh1xsfe.js";import"./chunk-h8h97bcc.js";import"./chunk-60yppcbb.js";import"./chunk-0tyyad6q.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{Zf as bindLoopInterpolations,Zh as clearScriptScanCache,Ss as convertServerLoopAttributesToDirectives,Zo as convertSignalDirectivesToAttributes,ks as convertSignalLoopsToAttributes,fr as extractClientSignalNames,K as extractExports,xc as findMarkupIndexOutsideScripts,xs as hasSignalsSyntax,Yo as parseLoopExpression,Qo as preEvalLiteralReactiveIfs,_s as processScriptSetup,ei as processSignals,Qf as rewriteStxImportSpecifiers,vs as scanScriptTags,Ct as stripStxRuntimeImports};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{t,u,Wt,qt,Kt,Ke,dt,
|
|
2
|
+
import{t,u,Wt,qt,Kt,Ke,dt,F,no,jr,Ge}from"./chunk-0tyyad6q.js";var O=/(?<![\w$@])@meta\s*\(/g,I=/(?<![\w$@])@metaTag\s*\(/g,C=/(?<![\w$@])@structuredData\s*\(/g,k=/(?<![\w$@])@seo\s*\(/g;function _(e,r){return(n)=>F(e,n,"the call has no closing parenthesis",r,t.INVALID_DIRECTIVE_SYNTAX)}function N(e){return"property"in e?`<meta property="${c(e.property)}" content="${c(e.content)}">`:`<meta name="${c(e.name)}" content="${c(e.content)}">`}function ii(e,r,n,g){if(!e.includes("@meta"))return e;let i=Wt(e,O,(a,o)=>{let s=jr(qt(a),r);if(s.kind==="tag")return N(s.tag);if(s.kind==="empty")return"";return F("Meta",o,s.message,n,s.code)},_("Meta",n));return i=Wt(i,I,(a,o)=>{let s=Kt(a,r);if(!s.ok)return F("MetaTag",o,s.message,n,s.code);if(s.value===void 0||s.value===null)return"";if(!dt(s.value))return F("MetaTag",o,`expected an object such as { name, content }, got ${Ke(s.value)}`,n,t.TYPE_ERROR);let l=s.value;if(!l.name&&!l.property&&!l.httpEquiv)return F("MetaTag",o,"the tag needs a name, property or httpEquiv",n,t.INVALID_DIRECTIVE_SYNTAX);if(l.content===void 0||l.content===null||l.content===""||l.content===!1)return"";let p="<meta";if(l.name)p+=` name="${c(l.name)}"`;if(l.property)p+=` property="${c(l.property)}"`;if(l.httpEquiv)p+=` http-equiv="${c(l.httpEquiv)}"`;return p+=` content="${c(l.content)}">`,p},_("MetaTag",n)),i}function b(e){let r=(n)=>n["@context"]?{...n}:{...n,"@context":"https://schema.org"};if(dt(e))return r(e);if(Array.isArray(e)&&e.length>0&&e.every(dt))return e.map(r);return null}function E(e){return`<script type="application/ld+json">${JSON.stringify(e).replace(/<\//g,"<\\/")}</script>`}function ai(e,r,n){if(!e.includes("@structuredData"))return e;return Wt(e,C,(g,i)=>{let a=Kt(g,r);if(!a.ok)return F("StructuredData",i,a.message,n,a.code);if(a.value===void 0||a.value===null)return"";let o=b(a.value);if(!o)return F("StructuredData",i,`expected an object or an array of objects, got ${Ke(a.value)}`,n,t.TYPE_ERROR);try{return E(o)}catch(s){let l=s instanceof Error?s.message:String(s);return F("StructuredData",i,`the data cannot be written as JSON: ${l}`,n,t.EVALUATION_ERROR)}},_("StructuredData",n))}var j=new Set(["title","description","keywords","robots","canonical","openGraph","twitter","structuredData"]),A={image:"openGraph.image",url:"canonical or openGraph.url",type:"openGraph.type",siteName:"openGraph.siteName",locale:"openGraph.locale",og:"openGraph",author:"@meta('author', ...)"};function ci(e,r,n,g){if(!e.includes("@seo"))return e;return Wt(e,k,(i,a)=>{if(!i.trim())return F("SEO",a,"expected an object: @seo({ title, description }) or @seo(seoVariable)",n,t.INVALID_DIRECTIVE_SYNTAX);let o=Kt(i,r);if(!o.ok)return F("SEO",a,o.message,n,o.code);if(o.value===void 0||o.value===null)return"";if(!dt(o.value))return F("SEO",a,`expected an object such as { title, description }, got ${Ke(o.value)}`,n,t.TYPE_ERROR);try{return L(o.value,a,n)}catch(s){let l=s instanceof Error?s.message:String(s);return F("SEO",a,`Error processing @seo directive: ${l}`,n,t.EVALUATION_ERROR)}},_("SEO",n))}function R(e,r,n,g){let i=e[r];if(i===void 0||i===null||i===!1)return;if(dt(i))return i;no(n,`${r} must be an object, got ${Ke(i)}; its tags were left out`,g);return}function L(e,r,n){let g=Object.keys(e).filter((s)=>!j.has(s));if(g.length>0){let s=g.map((l)=>A[l]?`${l} (use ${A[l]})`:l).join(", ");no(r,`@seo does not read ${s}; ${g.length===1?"it was":"they were"} ignored`,n)}let i="";if(e.title)i+=`<title>${c(e.title)}</title>
|
|
3
3
|
`,i+=`<meta name="title" content="${c(e.title)}">
|
|
4
4
|
`;if(e.description)i+=`<meta name="description" content="${c(e.description)}">
|
|
5
5
|
`;if(e.keywords){let s=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;i+=`<meta name="keywords" content="${c(s)}">
|
|
@@ -43,7 +43,7 @@ import{t,u,Wt,qt,Kt,Ke,dt,B,no,jr,Ge}from"./chunk-g0xn80gz.js";var O=/(?<![\w$@]
|
|
|
43
43
|
${y}
|
|
44
44
|
`),h;return h.replace(/<head[^>]*>/,`$&
|
|
45
45
|
${y}
|
|
46
|
-
`)}function q(e){let r=e.search(/<\/head\s*>/i);return r===-1?e:e.slice(0,r)}function v(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�*39;|'/g,"'").replace(/&/g,"&")}function M(e){let r=e.match(/<title(?:\s[^>]*)?>([\s\S]*?)<\/title\s*>/i);return r?v(r[1].trim()):""}function x(e){return(e.match(/<meta\s[^>]*>/gi)||[]).filter((r)=>/\sname\s*=\s*["']description["']/i.test(r))}function V(e){return x(e).length>0}function G(e){for(let r of x(e)){let n=r.match(/\scontent\s*=\s*(?:"([^"]*)"|'([^']*)')/i),g=(n?.[1]??n?.[2]??"").trim();if(g)return v(g)}return""}function c(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var Ps={name:"meta",rawParams:!0,handler:(e,r,n,g)=>{let i=jr(r,n??{});if(i.kind==="error")return
|
|
46
|
+
`)}function q(e){let r=e.search(/<\/head\s*>/i);return r===-1?e:e.slice(0,r)}function v(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�*39;|'/g,"'").replace(/&/g,"&")}function M(e){let r=e.match(/<title(?:\s[^>]*)?>([\s\S]*?)<\/title\s*>/i);return r?v(r[1].trim()):""}function x(e){return(e.match(/<meta\s[^>]*>/gi)||[]).filter((r)=>/\sname\s*=\s*["']description["']/i.test(r))}function V(e){return x(e).length>0}function G(e){for(let r of x(e)){let n=r.match(/\scontent\s*=\s*(?:"([^"]*)"|'([^']*)')/i),g=(n?.[1]??n?.[2]??"").trim();if(g)return v(g)}return""}function c(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var Ps={name:"meta",rawParams:!0,handler:(e,r,n,g)=>{let i=jr(r,n??{});if(i.kind==="error")return F("Meta",`@meta(${r.join(", ")})`,i.message,g,i.code);if(i.kind==="empty")return"";if(n)n.__stx_runtime_head=Ge(n.__stx_runtime_head??{},{meta:[i.tag]});return""},hasEndTag:!1},Is={name:"structuredData",handler:(e,r,n,g)=>{if(e.trim()==="")return u("StructuredData","structuredData directive requires JSON-LD content",t.INVALID_DIRECTIVE_SYNTAX);try{let i=JSON.parse(e);if(!i["@context"])i["@context"]="https://schema.org";if(!i["@type"])return u("StructuredData","structuredData requires @type property",t.INVALID_DIRECTIVE_SYNTAX);return E(i)}catch(i){let a=i instanceof Error?i.message:String(i);return u("StructuredData",a,t.EVALUATION_ERROR)}},hasEndTag:!0};function cy(){return[Ps,Is]}function ly(e,r){let{baseUrl:n,defaultChangefreq:g="weekly",defaultPriority:i=0.5,includeLastmod:a=!0}=r,o=n.replace(/\/$/,""),s=(m)=>m.startsWith("http")?m:`${o}${m.startsWith("/")?"":"/"}${m}`,l=e.map((m)=>{let d=s(m.loc),f=m.lastmod||(a?new Date().toISOString().split("T")[0]:void 0),D=m.changefreq||g,y=m.priority??i,h=` <url>
|
|
47
47
|
<loc>${T(d)}</loc>`;for(let w of m.alternates??[])h+=`
|
|
48
48
|
<xhtml:link rel="alternate" hreflang="${T(w.hreflang)}" href="${T(s(w.href))}"/>`;if(f)h+=`
|
|
49
49
|
<lastmod>${f}</lastmod>`;return h+=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Gt}from"./chunk-
|
|
2
|
+
import{Gt}from"./chunk-6mjd3pqd.js";import{c,f}from"./chunk-fd1bpv35.js";function io(e){let n=e.pwa;if(!n?.enabled)return"";let r=n.manifest,t=n.icons?.outputDir?`/${n.icons.outputDir}`:"/pwa-icons",o=Gt(e),i=`
|
|
3
3
|
<!-- stx PWA Meta Tags -->
|
|
4
4
|
<link rel="manifest" href="/manifest.json">
|
|
5
5
|
<meta name="theme-color" content="${a(r?.themeColor||"#000000")}">
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{tu,Im,nu,ru,Om,Nm}from"./chunk-akv760py.js";import"./chunk-kgh1xsfe.js";import"./chunk-h8h97bcc.js";import"./chunk-60yppcbb.js";import"./chunk-0tyyad6q.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{Nm as applySlots,Om as extractSlotContent,Im as parseSlotElement,tu as parseSlots,ru as processSlots,nu as renderSlot};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{U,rg,ri,$c,a,M,iy,ay}from"./chunk-095cn3p0.js";import"./chunk-mbp7j1a7.js";import"./chunk-tnp2ta5q.js";import"./chunk-rw5492e2.js";import"./chunk-sbvkk4cn.js";import"./chunk-dy7vqv1x.js";import"./chunk-kgh1xsfe.js";import"./chunk-h8h97bcc.js";import"./chunk-60yppcbb.js";import"./chunk-0tyyad6q.js";import"./chunk-farh4p7f.js";import"./chunk-qjey0jk6.js";export{M as config,U as defaultConfig,iy as defineStxConfig,ri as discoverConfig,a as loadStxConfig,$c as resolveInstalledPackage,rg as resolveStxDirectories,ay as validateConfig};
|