@stacksjs/stx 0.2.801 → 0.2.802
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-gzfvj15b.js → chunk-06hc6rs6.js} +1 -1
- package/dist/{chunk-wqt2hep2.js → chunk-077dwzpp.js} +1 -1
- package/dist/{chunk-2fh4wvtv.js → chunk-0vztrb90.js} +32 -32
- package/dist/chunk-1338vj5g.js +2 -0
- package/dist/chunk-14qhn86r.js +2 -0
- package/dist/{chunk-kydgndkt.js → chunk-1pz11ez9.js} +1 -1
- package/dist/{chunk-25q462jp.js → chunk-24x7s0x5.js} +3 -3
- package/dist/chunk-27p6cxa2.js +2 -0
- package/dist/chunk-2jwmtbsj.js +2 -0
- package/dist/{chunk-akcyaxwv.js → chunk-2vqpz4qv.js} +2 -2
- package/dist/{chunk-1htxem27.js → chunk-3dtp59r9.js} +1 -1
- package/dist/{chunk-wz3gk8js.js → chunk-3j9zzpbd.js} +2 -2
- package/dist/{chunk-e08hzdpw.js → chunk-3vfxn6g5.js} +1 -1
- package/dist/{chunk-hyz90d8w.js → chunk-4gf3khd9.js} +2 -2
- package/dist/{chunk-c2x9wea0.js → chunk-4q2fh4r4.js} +1 -1
- package/dist/{chunk-2ehn5r6d.js → chunk-50be1xy0.js} +1 -1
- package/dist/{chunk-h72d9174.js → chunk-5hgghq24.js} +1 -1
- package/dist/chunk-6cgak0k1.js +2 -0
- package/dist/{chunk-pmf53mgj.js → chunk-7j4tf0ba.js} +1 -1
- package/dist/{chunk-zfzjn93c.js → chunk-7tkxshah.js} +8 -8
- package/dist/{chunk-26505qjh.js → chunk-8fnhv8jq.js} +1 -1
- package/dist/{chunk-j0bbr6ee.js → chunk-8fvgsd9v.js} +3 -3
- package/dist/chunk-8hm4a8p2.js +2 -0
- package/dist/{chunk-vse4ewax.js → chunk-9767yz39.js} +1 -1
- package/dist/{chunk-3gcdq401.js → chunk-a0xxm3eh.js} +1 -1
- package/dist/{chunk-2yb1rwmy.js → chunk-a5byhf8f.js} +1 -1
- package/dist/{chunk-v47yfe9k.js → chunk-aj5na3d3.js} +1 -1
- package/dist/{chunk-9kadf7pv.js → chunk-antc6crh.js} +1 -1
- package/dist/chunk-b22yj5j5.js +2 -0
- package/dist/{chunk-vy92xwbg.js → chunk-b29x9hsz.js} +1 -1
- package/dist/{chunk-sprgkk9j.js → chunk-bs02d6mm.js} +8 -8
- package/dist/{chunk-x8m28yea.js → chunk-byatzyvf.js} +2 -2
- package/dist/chunk-bz3papjy.js +2 -0
- package/dist/{chunk-f52esq8m.js → chunk-c36bj74x.js} +1 -1
- package/dist/{chunk-fw9dhsd9.js → chunk-casq5t61.js} +1 -1
- package/dist/{chunk-k3rcpnzm.js → chunk-cmnze7at.js} +2 -2
- package/dist/{chunk-gctyy7r9.js → chunk-cs38hg43.js} +8 -8
- package/dist/chunk-d3gncxq1.js +2 -0
- package/dist/{chunk-j2v9f2dk.js → chunk-dbbc84mj.js} +2 -2
- package/dist/{chunk-r32pqvpq.js → chunk-ddk34ppv.js} +5 -5
- package/dist/chunk-dwn8ye99.js +2 -0
- package/dist/{chunk-6162chg7.js → chunk-dxemdr58.js} +41 -41
- package/dist/{chunk-8xx1yf34.js → chunk-e1g3ns8y.js} +2 -2
- package/dist/{chunk-s85s2kd3.js → chunk-e5fszb5z.js} +1 -1
- package/dist/chunk-e88bsw36.js +2 -0
- package/dist/{chunk-ddhkhhc7.js → chunk-eayewa2s.js} +2 -2
- package/dist/{chunk-q3dsjk2b.js → chunk-esm9sdyf.js} +3 -3
- package/dist/chunk-ewhkvqce.js +72 -0
- package/dist/chunk-fq1dw4ph.js +3 -0
- package/dist/{chunk-3ajbbtqx.js → chunk-fsfj0s13.js} +6 -6
- package/dist/{chunk-gqdkvwjp.js → chunk-fy6sdbak.js} +48 -48
- package/dist/{chunk-gqgcsgc3.js → chunk-g02jnsz5.js} +1 -1
- package/dist/chunk-g4sdthck.js +2 -0
- package/dist/chunk-gabw11g3.js +2 -0
- package/dist/{chunk-s763dt8e.js → chunk-gk214p91.js} +2 -2
- package/dist/{chunk-dd1vqndp.js → chunk-gxrpf87x.js} +1 -1
- package/dist/{chunk-dwydz68f.js → chunk-h1dwth11.js} +1 -1
- package/dist/{chunk-8kvj2wz0.js → chunk-hzhsg5j7.js} +6 -6
- package/dist/chunk-j0jgc426.js +2 -0
- package/dist/{chunk-qkck7zx0.js → chunk-jdjv5x6q.js} +1 -1
- package/dist/chunk-jkn9garq.js +2 -0
- package/dist/chunk-jy9qmwpm.js +2 -0
- package/dist/chunk-krqj3cx9.js +2 -0
- package/dist/chunk-kzny87pz.js +2 -0
- package/dist/{chunk-1yhrq2nx.js → chunk-kzt46v41.js} +1 -1
- package/dist/{chunk-8adf5x29.js → chunk-m0c64sna.js} +1 -1
- package/dist/{chunk-9nbv6nk4.js → chunk-m4w61tyq.js} +2 -2
- package/dist/{chunk-nm20k22y.js → chunk-md55r6zp.js} +1 -1
- package/dist/chunk-mv9k42dn.js +2 -0
- package/dist/{chunk-8ey61ppd.js → chunk-mz1kffvs.js} +2 -2
- package/dist/{chunk-33vr7x2t.js → chunk-n7arptzc.js} +3 -3
- package/dist/chunk-nhfksrce.js +3 -0
- package/dist/{chunk-cas0vn5m.js → chunk-ntwgk0tf.js} +1 -1
- package/dist/{chunk-t0bcbhvs.js → chunk-nya33asw.js} +3 -3
- package/dist/{chunk-83myk906.js → chunk-p4aaxpaw.js} +1 -1
- package/dist/{chunk-hcwjdpzv.js → chunk-p8wq37hd.js} +2 -2
- package/dist/{chunk-nn1f1h3q.js → chunk-pamtcna7.js} +1 -1
- package/dist/{chunk-gvnfb6s2.js → chunk-q7zwv88b.js} +2 -2
- package/dist/{chunk-61h00ba5.js → chunk-qx5jhe7h.js} +5 -5
- package/dist/{chunk-2yxva96k.js → chunk-r9e0r6jx.js} +2 -2
- package/dist/{chunk-xtwcz8dg.js → chunk-r9eyepbk.js} +6 -6
- package/dist/{chunk-vzmkex8f.js → chunk-rs0ejvjm.js} +1 -1
- package/dist/{chunk-t5vjt37c.js → chunk-rxhymzj8.js} +1 -1
- package/dist/{chunk-t0qh1m5e.js → chunk-s81y1dw3.js} +4 -4
- package/dist/chunk-sfvdj9dj.js +2 -0
- package/dist/chunk-szma9dby.js +2 -0
- package/dist/{chunk-x8h81amr.js → chunk-t4j2rw91.js} +2 -2
- package/dist/chunk-txyyvtdp.js +2 -0
- package/dist/{chunk-vg3scf4d.js → chunk-v18816jj.js} +8 -8
- package/dist/chunk-ved3r01r.js +420 -0
- package/dist/chunk-vxd3akt4.js +2 -0
- package/dist/{chunk-hp9e8nz6.js → chunk-we6jnjjp.js} +1 -1
- package/dist/{chunk-k4nhwd9p.js → chunk-wes7vsze.js} +2 -2
- package/dist/chunk-wf6vjd41.js +2 -0
- package/dist/{chunk-ps9fcjyg.js → chunk-wghv9vr6.js} +1 -1
- package/dist/{chunk-w0zayhmg.js → chunk-wpendr22.js} +2 -2
- package/dist/{chunk-hzs3h76s.js → chunk-wvnzq8w8.js} +3 -3
- package/dist/{chunk-qxt6hdat.js → chunk-wy0gghvh.js} +1 -1
- package/dist/{chunk-56j2egg3.js → chunk-x0ttkvr7.js} +2 -2
- package/dist/chunk-xbvx8j82.js +2 -0
- package/dist/{chunk-2vejgrj7.js → chunk-xndhzwdj.js} +5 -5
- package/dist/{chunk-dq87xd5c.js → chunk-xrvdef6x.js} +3 -3
- package/dist/{chunk-fn4jk05k.js → chunk-yxsrerew.js} +1 -1
- package/dist/chunk-z0kx564w.js +2 -0
- package/dist/{chunk-jce3scvg.js → chunk-zwptpjjt.js} +16 -16
- package/dist/cli.js +13 -13
- package/dist/client-parameter-bindings.js +10 -6
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/native/compiler/inline-style.js +51 -28
- package/dist/native/runtime/craft-bridge.js +37 -4
- package/dist/performance-utils.d.ts +255 -115
- package/dist/pwa.js +2 -2
- package/dist/safe-evaluator.js +28 -3
- package/dist/ssg.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-1zy94dxs.js +0 -2
- package/dist/chunk-3rgb6kc1.js +0 -2
- package/dist/chunk-5fzvcr9v.js +0 -2
- package/dist/chunk-6b10096c.js +0 -2
- package/dist/chunk-6mdvx2bf.js +0 -2
- package/dist/chunk-6q0c9j7p.js +0 -2
- package/dist/chunk-7m4eesp0.js +0 -2
- package/dist/chunk-92te36hf.js +0 -2
- package/dist/chunk-9sgzv5ze.js +0 -2
- package/dist/chunk-acwqb3ys.js +0 -2
- package/dist/chunk-amc8xdcz.js +0 -2
- package/dist/chunk-b3b9tfpx.js +0 -2
- package/dist/chunk-bb3y1g34.js +0 -2
- package/dist/chunk-bf3va62c.js +0 -2
- package/dist/chunk-ef8p88as.js +0 -2
- package/dist/chunk-ej8q3kyc.js +0 -2
- package/dist/chunk-eszpqrxy.js +0 -2
- package/dist/chunk-kdhsev5v.js +0 -3
- package/dist/chunk-nq4d91zm.js +0 -2
- package/dist/chunk-nv0n2hjg.js +0 -431
- package/dist/chunk-p9j909eq.js +0 -2
- package/dist/chunk-pxxhhaaw.js +0 -3
- package/dist/chunk-q38vjqv2.js +0 -2
- package/dist/chunk-q78jxqnr.js +0 -2
- package/dist/chunk-se44tmvx.js +0 -61
- package/dist/chunk-shag9bcm.js +0 -2
- package/dist/chunk-t4yy48dh.js +0 -2
- package/dist/chunk-t55nk8sw.js +0 -2
- package/dist/chunk-ys46rqxg.js +0 -2
- package/dist/chunk-zhz8er14.js +0 -2
package/dist/chunk-p9j909eq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{El,Tl}from"./chunk-6162chg7.js";import"./chunk-hrrrf46j.js";import"./chunk-nn1f1h3q.js";import"./chunk-e08hzdpw.js";import"./chunk-kdhsev5v.js";import"./chunk-r32pqvpq.js";import"./chunk-8ey61ppd.js";import"./chunk-9nbv6nk4.js";import"./chunk-hyz90d8w.js";import"./chunk-2vejgrj7.js";import"./chunk-x82zksaj.js";import"./chunk-hp9e8nz6.js";import"./chunk-sxee2rxz.js";import"./chunk-s85s2kd3.js";import"./chunk-ddhkhhc7.js";import"./chunk-s9b6abkb.js";import"./chunk-s90m43sm.js";import"./chunk-bphwhfbd.js";import"./chunk-q3dsjk2b.js";import"./chunk-c1bsagbe.js";import"./chunk-1htxem27.js";import"./chunk-s763dt8e.js";import"./chunk-549end3k.js";import"./chunk-fn3q1gtr.js";import"./chunk-hcwjdpzv.js";import"./chunk-tb4wmzzd.js";import"./chunk-t0qh1m5e.js";import"./chunk-k4nhwd9p.js";import"./chunk-6n5cbyes.js";import"./chunk-25q462jp.js";import"./chunk-33vr7x2t.js";import"./chunk-gjf8cjdt.js";import{Qt}from"./chunk-v47yfe9k.js";import"./chunk-gctyy7r9.js";import"./chunk-wz3gk8js.js";import"./chunk-7sh9fa3q.js";import{Re,i}from"./chunk-2fh4wvtv.js";import"./chunk-t0bcbhvs.js";import"./chunk-vg3scf4d.js";import"./chunk-c84pxd2k.js";import"./chunk-3ajbbtqx.js";import"./chunk-pxxhhaaw.js";import"./chunk-61h00ba5.js";import"./chunk-2yb1rwmy.js";import"./chunk-xtwcz8dg.js";import{we}from"./chunk-8kvj2wz0.js";import"./chunk-kydgndkt.js";import{lr,ur}from"./chunk-x8m28yea.js";import{Ss,j,a}from"./chunk-gqdkvwjp.js";import"./chunk-56j2egg3.js";import"./chunk-9gwhs0gk.js";import"./chunk-qpvwxppw.js";import"./chunk-dq87xd5c.js";import"./chunk-j2v9f2dk.js";import{m,Le}from"./chunk-nv0n2hjg.js";import"./chunk-fw9dhsd9.js";import"./chunk-akcyaxwv.js";import"./chunk-se44tmvx.js";import"./chunk-2yxva96k.js";import"./chunk-t65tn8ee.js";import"./chunk-9kadf7pv.js";import"./chunk-j0bbr6ee.js";export{Ss as buildWebComponents,ur as cacheTemplate,lr as checkCache,Qt as classifyAllScripts,El as createMiddleware,Tl as createRoute,j as defaultConfig,m as extractVariables,we as injectRouterScript,a as loadStxConfig,Le as processClientScript,i as processDirectives,Re as readMarkdownFile};
|
package/dist/chunk-pxxhhaaw.js
DELETED
package/dist/chunk-q38vjqv2.js
DELETED
package/dist/chunk-q78jxqnr.js
DELETED
package/dist/chunk-se44tmvx.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{X}from"./chunk-w0zayhmg.js";import Ne from"path";var t={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function Y(e){for(let[n,r]of Object.entries(t))if(r===e)return n;return}import at from"path";var ct={showRelativePaths:!1,enableAutoRecovery:X(),logRecoveryWarnings:!0},J={...ct};function M(){return{...J}}function P(e){if(!J.showRelativePaths||!e)return e;let n=J.baseDir||process.cwd();try{let r=at.relative(n,e);return r.startsWith("..")?e:r}catch{return e}}class L extends Error{code;filePath;line;column;context;numericCode;constructor(e,n,r,i,s,o,a){super(e);this.code=n;this.filePath=r;this.line=i;this.column=s;this.context=o;if(this.name="StxError",this.numericCode=a||t.EVALUATION_ERROR,this.filePath)this.filePath=P(this.filePath)}}class ae extends L{constructor(e,n,r,i,s,o){super(e,"stx_RUNTIME_ERROR",n,r,i,s,o||t.EVALUATION_ERROR);this.name="StxRuntimeError"}}class Tr extends L{constructor(e,n,r,i,s,o){super(e,"stx_FILE_ERROR",n,r,i,s,o||t.FILE_NOT_FOUND);this.name="StxFileError"}}class q extends L{isFatal=!0;constructor(e,n,r,i,s,o){super(e,"stx_VALIDATION_ERROR",n,r,i,s,o||t.DOM_API_VIOLATION);this.name="StxValidationError"}}function he(e){let{type:n,message:r,code:i,filePath:s,line:o,column:a,template:c,offset:p,snippet:g,suggestion:h,format:m="text"}=e,y=o,b=a;if(!y&&c&&p!==void 0){let G=dt(c,p);y=G.line,b=G.column}let S=s?P(s):void 0,x=i?Y(i):void 0,C={type:n,code:i,codeName:x,message:r,filePath:S,line:y,column:b,snippet:g,suggestion:h,timestamp:new Date().toISOString()},A;switch(m){case"html":A=ut(C);break;case"json":A=JSON.stringify(C,null,2);break;case"console":A=gt(C,c,p);break;case"text":default:A=lt(C,c,p);break}return{formatted:A,data:C}}function lt(e,n,r){let i=[],s=e.code?` [${e.codeName||e.code}]`:"";if(i.push(`[${e.type} Error${s}]`),e.filePath){let o=e.filePath;if(e.line){if(o+=`:${e.line}`,e.column)o+=`:${e.column}`}i.push(`at ${o}`)}if(i.push(`
|
|
3
|
-
${e.message}`),n&&e.line){let o=pt(n,e.line,2);if(o)i.push(`
|
|
4
|
-
${o}`)}if(e.snippet)i.push(`
|
|
5
|
-
Snippet: ${e.snippet}`);if(e.suggestion)i.push(`
|
|
6
|
-
Suggestion: ${e.suggestion}`);return i.join(" ")}function ut(e){let n=e.code?` [${e.code}]`:"",r=e.filePath?` in ${e.filePath}${e.line?`:${e.line}`:""}`:"",i=`<!-- [${e.type} Error${n}]${r}: ${me(e.message)}`;if(e.suggestion)i+=` | Suggestion: ${me(e.suggestion)}`;return i+=" -->",i}function gt(e,n,r){let g=[],h=e.code?` [${e.codeName||e.code}]`:"";if(g.push(`\x1B[1m${"\x1B[31m"}\u2501\u2501\u2501 ${e.type} Error${h} \u2501\u2501\u2501${"\x1B[0m"}`),e.filePath){let m=`\x1B[36m${e.filePath}\x1B[0m`;if(e.line){if(m+=`\x1B[90m:${e.line}\x1B[0m`,e.column)m+=`\x1B[90m:${e.column}\x1B[0m`}g.push(`
|
|
7
|
-
\x1B[90mat\x1B[0m ${m}`)}if(g.push(`
|
|
8
|
-
|
|
9
|
-
${e.message}`),n&&e.line){let m=ft(n,e.line,2);if(m)g.push(`
|
|
10
|
-
|
|
11
|
-
\x1B[90mContext:\x1B[0m
|
|
12
|
-
${m}`)}if(e.suggestion)g.push(`
|
|
13
|
-
|
|
14
|
-
\x1B[33mSuggestion:\x1B[0m ${e.suggestion}`);return g.push(`
|
|
15
|
-
${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501${"\x1B[0m"}`),g.join("")}function pt(e,n,r){let i=e.split(`
|
|
16
|
-
`),s=Math.max(0,n-r-1),o=Math.min(i.length-1,n+r-1),a=[];for(let c=s;c<=o;c++){let p=(c+1).toString().padStart(4),g=c===n-1?">":" ";a.push(`${g}${p} | ${i[c]}`)}return a.join(`
|
|
17
|
-
`)}function ft(e,n,r){let i=e.split(`
|
|
18
|
-
`),s=Math.max(0,n-r-1),o=Math.min(i.length-1,n+r-1),a="\x1B[90m",c="\x1B[31m",p="\x1B[0m",g=[];for(let h=s;h<=o;h++){let m=(h+1).toString().padStart(4),y=h===n-1,b=y?"\x1B[31m>\x1B[0m":" ",S=y?`\x1B[31m${i[h]}\x1B[0m`:`\x1B[90m${i[h]}\x1B[0m`;g.push(`${b}\x1B[90m${m}\x1B[0m | ${S}`)}return g.join(`
|
|
19
|
-
`)}function me(e){return e.replace(/--/g,"- -").replace(/>/g,">")}function dt(e,n){let i=e.substring(0,n).split(`
|
|
20
|
-
`);return{line:i.length,column:i[i.length-1].length}}function l(e,n,r){return he({type:e,message:n,code:r,format:"html"}).formatted}async function ke(e,n,r){try{return await e()}catch(i){if(r&&i instanceof Error)r(i);return n}}var _i={isEnabled(){return M().enableAutoRecovery},fixCommonSyntaxErrors(e){let n=M();if(!n.enableAutoRecovery)return{fixed:e,fixes:[]};let r=e,i=[],s=(r.match(/\{\{/g)||[]).length,o=(r.match(/\}\}/g)||[]).length;if(s>o){let c=s-o;r+="}}".repeat(c),i.push(`Added ${c} missing closing braces '}}'`)}let a=["if","foreach","for","switch","section"];for(let c of a){let p=(r.match(new RegExp(`@${c}\\b`,"g"))||[]).length,g=(r.match(new RegExp(`@end${c}\\b`,"g"))||[]).length;if(p>g){let h=p-g;for(let m=0;m<h;m++)r+=`
|
|
21
|
-
@end${c}`;i.push(`Added ${h} missing @end${c}`)}}if(i.length>0&&n.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),i.forEach((c)=>console.warn(` - ${c}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:r,fixes:i}},createFallbackContent(e,n){if(X())return`<!-- ${e} failed: ${n.message} -->`;return"<!-- stx rendering error -->"}};class Z{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(e={}){this.maxErrors=e.maxErrors??1000,this.enableFileLogging=e.enableFileLogging??!1,this.logFilePath=e.logFilePath??".stx/errors.log",this.logFormat=e.logFormat??"json",this.maxFileSize=e.maxFileSize??10485760,this.maxLogFiles=e.maxLogFiles??5,this.minLevel=e.minLevel??"all"}configure(e){if(e.maxErrors!==void 0)this.maxErrors=e.maxErrors;if(e.enableFileLogging!==void 0)this.enableFileLogging=e.enableFileLogging;if(e.logFilePath!==void 0)this.logFilePath=e.logFilePath;if(e.logFormat!==void 0)this.logFormat=e.logFormat;if(e.maxFileSize!==void 0)this.maxFileSize=e.maxFileSize;if(e.maxLogFiles!==void 0)this.maxLogFiles=e.maxLogFiles;if(e.minLevel!==void 0)this.minLevel=e.minLevel}log(e,n,r="error"){let i={timestamp:new Date,error:e,context:n,level:r};if(this.errors.push(i),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(r))this.writeToFile(i)}shouldLog(e){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return e==="error"||e==="warning";if(this.minLevel==="error")return e==="error";return!0}formatEntry(e){if(this.logFormat==="json")return JSON.stringify({timestamp:e.timestamp.toISOString(),level:e.level||"error",type:e.error.constructor.name,message:e.error.message,stack:e.error.stack,context:e.context});let n=[`[${e.timestamp.toISOString()}] [${(e.level||"error").toUpperCase()}] ${e.error.constructor.name}: ${e.error.message}`];if(e.error.stack)n.push(` Stack: ${e.error.stack.split(`
|
|
22
|
-
`).slice(1).join(`
|
|
23
|
-
`)}`);if(e.context)n.push(` Context: ${JSON.stringify(e.context)}`);return n.join(`
|
|
24
|
-
`)}writeToFile(e){this.writeQueue=this.writeQueue.then(async()=>{try{let n=await import("fs"),r=await import("path"),i=r.dirname(this.logFilePath);if(!n.existsSync(i))n.mkdirSync(i,{recursive:!0});await this.rotateIfNeeded(n);let s=`${this.formatEntry(e)}
|
|
25
|
-
`;n.appendFileSync(this.logFilePath,s,"utf-8")}catch(n){if(process.env.STX_DEBUG==="true")console.error("Failed to write to error log:",n)}})}async rotateIfNeeded(e){try{if(!e.existsSync(this.logFilePath))return;if(e.statSync(this.logFilePath).size<this.maxFileSize)return;for(let r=this.maxLogFiles-1;r>=1;r--){let i=`${this.logFilePath}.${r}`,s=`${this.logFilePath}.${r+1}`;if(e.existsSync(i))if(r>=this.maxLogFiles-1)e.unlinkSync(i);else e.renameSync(i,s)}if(this.maxLogFiles<=1)e.writeFileSync(this.logFilePath,"");else e.renameSync(this.logFilePath,`${this.logFilePath}.1`)}catch(n){if(process.env.STX_DEBUG==="true")console.error("Failed to rotate error logs:",n)}}getRecentErrors(e=10){return this.errors.slice(-e)}getErrorsByType(e){return this.errors.filter((n)=>n.error.constructor.name===e)}getErrorsByLevel(e){return this.errors.filter((n)=>n.level===e)}clear(){this.errors.length=0}async clearLogFile(){try{let e=await import("fs");if(e.existsSync(this.logFilePath))e.writeFileSync(this.logFilePath,"","utf-8")}catch(e){if(process.env.STX_DEBUG==="true")console.error("Failed to clear error log:",e)}}getStats(){let e={},n={error:0,warning:0,info:0};for(let r of this.errors){let i=r.error.constructor.name;e[i]=(e[i]||0)+1;let s=r.level||"error";n[s]=(n[s]||0)+1}return{total:this.errors.length,byType:e,byLevel:n}}async exportToFile(e,n="json"){let r=await import("fs"),i=await import("path"),s=i.dirname(e);if(!r.existsSync(s))r.mkdirSync(s,{recursive:!0});if(n==="json"){let o=this.errors.map((a)=>({timestamp:a.timestamp.toISOString(),level:a.level||"error",type:a.error.constructor.name,message:a.error.message,stack:a.error.stack,context:a.context}));r.writeFileSync(e,JSON.stringify(o,null,2),"utf-8")}else{let o=this.errors.map((a)=>this.formatEntry(a));r.writeFileSync(e,o.join(`
|
|
26
|
-
|
|
27
|
-
`),"utf-8")}}async flush(){await this.writeQueue}}var B=new Z,Sn={isDevelopment(){return X()},logDetailedError(e,n){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",e.message),console.error("Stack:",e.stack),n)console.error("Context:",n);console.error("========================")},createErrorReport(e,n){let r=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${e.message}`,`Type: ${e.constructor.name}`,`Stack: ${e.stack}`];if(n)r.push(`Context: ${JSON.stringify(n,null,2)}`);return r.push("========================"),r.join(`
|
|
28
|
-
`)}};function w(e,n,r,i=0){let s=0,o=i,a=null,c=0,p=!1;while(o<e.length){let g=e[o];if(a&&p){p=!1,o++;continue}if(a&&g==="\\"){p=!0,o++;continue}if(p=!1,(g==='"'||g==="'"||g==="`")&&!a){a=g,o++;continue}if(g===a&&a!=="`"){a=null,o++;continue}if(a==="`"&&g==="$"&&e[o+1]==="{"){c++,o+=2;continue}if(c>0&&g==="}"){c--,o++;continue}if(g==="`"&&a==="`"&&c===0){a=null,o++;continue}if(a){o++;continue}if(g===n)s++;else if(g===r){if(s--,s===0)return o}o++}return-1}function rl(e,n){let r=n,i={paren:0,bracket:0,brace:0},s=null,o=0;while(r<e.length){let a=e[r];if((r>0?e[r-1]:"")==="\\"&&s){r++;continue}if((a==='"'||a==="'")&&!s){s=a,r++;continue}if(a===s&&s!=="`"){s=null,r++;continue}if(a==="`"&&!s){s="`",r++;continue}if(a==="`"&&s==="`"&&o===0){s=null,r++;continue}if(s==="`"&&a==="$"&&e[r+1]==="{"){o++,r+=2;continue}if(o>0){if(a==="{")o++;else if(a==="}")o--;r++;continue}if(s){r++;continue}if(i.paren===0&&i.bracket===0&&i.brace===0){if(e.slice(r,r+2)==="}}"||e.slice(r,r+3)==="!!}")break;if(a===","||a===";")break}if(a==="(")i.paren++;else if(a===")"){if(i.paren--,i.paren<0)break}else if(a==="[")i.bracket++;else if(a==="]"){if(i.bracket--,i.bracket<0)break}else if(a==="{")i.brace++;else if(a==="}"){if(i.brace--,i.brace<0)break}r++}return{expression:e.slice(n,r),endPos:r}}var mt={maxSanitizeDepth:10,allowBracketNotation:!1},Se={...mt};var j=/\bnew\s+/,z="__stx_safe_ctors",ve=["Bun","Deno","Buffer","fetch","atob","btoa","console","Response","Request","Headers","WebAssembly","structuredClone","queueMicrotask","crypto","performance","navigator","Worker","WebSocket","BroadcastChannel","EventSource","XMLHttpRequest","localStorage","sessionStorage"],Q=[...ve,"Function","setTimeout","setInterval","setImmediate","process","require","exports","module","window","document","global","globalThis","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry"],ye=Q.map(()=>{return}),ee=Object.freeze(Object.assign(Object.create(null),{keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign,hasOwn:Object.hasOwn,is:Object.is})),ne=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,j,/\bdelete\s+/,/\bthis\b/,/\\u(?:\{[\dA-Fa-f]+\}|[\dA-Fa-f]{4})/],re=new Set([...ve,"eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",z]),ie=new Set(["__proto__","constructor","prototype"]);function $e(e){let n="",r=[],i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o];if(s){s=!1;continue}if(a==="\\"&&i){s=!0;continue}if(i){if(i==="`"&&a==="$"&&o+1<e.length&&e[o+1]==="{"){let c=1;o+=2;while(o<e.length&&c>0){if(e[o]==="{")c++;else if(e[o]==="}")c--;if(c>0)n+=e[o],r.push(o),o++}continue}if(a===i)i=null;continue}if(a==='"'||a==="'"||a==="`"){i=a;continue}n+=a,r.push(o)}return{text:n,map:r}}function Re(e){return $e(e).text}var Ce=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],Te=(()=>{let e={Date,URL,URLSearchParams},n=Intl;for(let r of Ce)if(typeof n[r]==="function")e[`Intl_${r}`]=n[r];return Object.freeze(Object.assign(Object.create(null),e))})(),ht=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,Ee=/(?<![\w$])new(?![\w$])/g,be=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${Ce.join(",")}}() are allowed`;function yt(e){let{text:n,map:r}=$e(e),i=[];Ee.lastIndex=0;let s;while((s=Ee.exec(n))!==null){let a=s.index;if(/(?<!\.)\.\s*$/.test(n.slice(0,a)))continue;let c=ht.exec(n.slice(a)),p=c?.[3],g=!c?null:p?`Intl_${p}`:c[2];if(!c||!g||!(g in Te))throw new k(`matched /${j.source}/; ${be}`,e);let h=a+c[0].length,m=r[a],y=r[h-1]+1;if(e.slice(m,y)!==n.slice(a,h))throw new k(`matched /${j.source}/; ${be}`,e);let b=m+3+c[1].length;i.push({start:b,end:b+c[2].length,key:g})}let o=e;for(let a=i.length-1;a>=0;a--){let c=i[a];o=`${o.slice(0,c.start)}${z}.${c.key}${o.slice(c.end)}`}return{source:o,usesSafeConstructors:i.length>0}}class k extends Error{rule;expression;constructor(e,n,r){super(r??`Potentially unsafe expression (${e}): ${n}`);this.name="UnsafeExpressionError",this.rule=e,this.expression=n}}function qs(e){try{return se(e),null}catch(n){return n instanceof k?n.rule:n instanceof Error?n.message:String(n)}}function Ae(e,n){let r=/[$A-Z_a-z][$\w]*/g,i;while((i=r.exec(e))!==null){let s=i[0],o=e[i.index-1];if(re.has(s))throw new k(`matched /\\b${s}\\b/; identifier ${s}`,n);if(o==="."&&ie.has(s))throw new k(`matched /.${s}/; property ${s}`,n)}}function Ie(e,n=!0){let r=/(?:[$\w)\].]|\?\.)\s*\[([^\]]*)\]/g,i=new Set,s;while((s=r.exec(e))!==null){let o=s.index+s[0].indexOf("["),a=e.slice(0,o);if(/(?:^|[^$\w])(?:let|const|var)\s*$/.test(a))continue;let c=s[1].trim(),p=/^'(?:[^'\\]|\\.)*'$/.test(c),g=/^"(?:[^"\\]|\\.)*"$/.test(c);if(/^\d+$/.test(c))continue;if(p||g){let m=c.slice(1,-1);if(ie.has(m))throw new k(`bracket key ${m}`,e);if(!Se.allowBracketNotation)throw new k("bracket notation with a string key; enable with configureSafeEvaluator({ allowBracketNotation: true })",e,`Bracket notation with strings not allowed: ${e}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);continue}if(n&&/^[$A-Z_a-z][$\w]*$/.test(c)){i.add(c);continue}throw new k("dynamic bracket notation is not allowed",e)}return[...i]}function se(e){let n=e.trim(),r=Re(n);Ae(r,n);let i=Ie(n);for(let s of ne){if(s===j)continue;if(s.test(r))throw new k(`matched /${s.source}/`,n)}return{...yt(n),dynamicKeys:i}}function ki(e){return se(e),e.trim()}var Xs=Symbol("stx.sanitizeCache"),Et=4000,F=new Map;function bt(e){let n=F.get(e);if(n===void 0){if(n=ne.some((r)=>r.test(e)),F.size>=Et)F.clear();F.set(e,n)}return n}function H(e){let n={},r=e[Xs];n.Math=Math,n.JSON=JSON,n.Date=Date,n.String=String,n.Number=Number,n.Boolean=Boolean,n.Array=Array,n.Object=ee,n.parseInt=Number.parseInt,n.parseFloat=Number.parseFloat,n.isNaN=Number.isNaN,n.isFinite=Number.isFinite,n.encodeURIComponent=encodeURIComponent,n.decodeURIComponent=decodeURIComponent;for(let[i,s]of Object.entries(e)){if(i.startsWith("__")||bt(i))continue;if(s&&typeof s==="object"&&!Array.isArray(s)){let o=r?.get(s);if(o===void 0)o=te(s),r?.set(s,o);n[i]=o}else n[i]=s}return n}function te(e,n=0){if(n>=Se.maxSanitizeDepth)return"[Object too deep]";if(e===null||typeof e!=="object")return e;if(Array.isArray(e))return e.map((i)=>te(i,n+1));if(e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error)return e;let r={};for(let[i,s]of Object.entries(e)){if(i.startsWith("__")||i==="constructor"||i==="prototype")continue;if(s&&typeof s==="object")r[i]=te(s,n+1);else r[i]=s}return r}function u(e,n){try{let r=H(n),i=Object.keys(r),s=Object.values(r);return d(e,i)(...s)}catch{return}}function f(e){try{return ki(e),!0}catch{return!1}}function nl(e,n){try{let r=H(n),i=Object.keys(r),s=Object.values(r),o=!1,c=d(e,i,()=>{o=!0})(...s);return!o&&Boolean(c)}catch{return!1}}function R(e,n){try{let r=u(e,n);if(r&&typeof r==="object"&&!Array.isArray(r))return r;return{}}catch{return{}}}var Oe=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),xt=2000,D=new Map;function xe(e,n){let r=`${e.join(",")}\x00${n}`,i=D.get(r);if(i)return i;let s=Function(...e,n);if(D.size>=xt)D.clear();return D.set(r,s),s}function st(e){return e.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var wt=/^[A-Za-z_$][\w$]*$/;function jt(e){return wt.test(e)&&!Oe.has(e)}function d(e,n,r){let{source:i,usesSafeConstructors:s,dynamicKeys:o}=se(e),a=[];for(let m=0;m<n.length;m++){if(!jt(n[m]))continue;if(n[m]===z||n[m]==="Object"||re.has(n[m]))continue;a.push({key:n[m],index:m})}a.sort((m,y)=>m.key<y.key?-1:1);let c=a.map((m)=>m.key),p=a.map((m)=>m.index),g=`
|
|
29
|
-
'use strict';
|
|
30
|
-
try {
|
|
31
|
-
return ${i};
|
|
32
|
-
}
|
|
33
|
-
catch (e) {
|
|
34
|
-
if (e instanceof TypeError) {
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
throw e;
|
|
38
|
-
}
|
|
39
|
-
`;return St(kt(s?(m)=>{let y=xe([z,"Object",...Q,...c,...m],g);return(...b)=>y(Te,ee,...ye,...b)}:(m)=>{let y=xe(["Object",...Q,...c,...m],g);return(...b)=>y(ee,...ye,...b)},c,n,a,p,r),n,o)}function St(e,n,r){if(r.length===0)return e;let i=r.map((s)=>n.indexOf(s));return(...s)=>{for(let o of i){if(o<0)continue;let a=s[o];if(typeof a==="string"&&ie.has(a))return}return e(...s)}}function kt(e,n,r,i,s,o){let a=e([]),c=i.every((g,h)=>g.index===h);if(n.length===r.length&&c)return we(a,n,e,void 0,o);return we((...g)=>{let h=Array(s.length);for(let m=0;m<s.length;m++)h[m]=g[s[m]];return a(...h)},n,e,(g)=>{a=e(g)},o)}function we(e,n,r,i,s){let a=/^(\w+) is not defined$/,c=e,p=[],g=new Set(n);return(...h)=>{for(let m=0;m<=8;m++)try{return c(...h)}catch(y){let b=y instanceof Error?y.message:"",S=a.exec(b);if(!(y instanceof ReferenceError)||!S)return;let x=S[1];if(g.has(x)||Oe.has(x)||re.has(x))return;if(s?.(x),g.add(x),p.push(x),i)i(p);else c=r(p)}return}}function Ks(e){let n=e.trim();try{let r=Re(n);if(/\b(?:eval|function|import|require|process|globalthis|window|document|fetch|bun|deno|buffer|console|reflect|proxy|prototype|constructor|this)\b/i.test(r))return!1;Ae(r,n),Ie(n);for(let i of ne)if(i.test(r))return!1}catch{return!1}return!0}function Ci(e,n){let r=[];n.lastIndex=0;let i;while((i=n.exec(e))!==null){let s=i.index,o=s+i[0].length-1,a=w(e,"(",")",o);if(a===-1){r.push({start:s,end:-1,args:"",call:e.slice(s,Math.min(e.length,s+80))}),n.lastIndex=o+1;continue}r.push({start:s,end:a+1,args:e.slice(o+1,a),call:e.slice(s,a+1)}),n.lastIndex=a+1}return r}function Bt(e,n,r,i){let s="",o=0;for(let a of Ci(e,n)){if(s+=e.slice(o,a.start),a.end===-1){s+=i(a.call),o=a.start;continue}s+=r(a.args,a.call),o=a.end}return s+e.slice(o)}function Ft(e){let n=[],r=0,i=null,s="";for(let o=0;o<e.length;o++){let a=e[o];if(i){if(s+=a,a==="\\"&&o+1<e.length){s+=e[++o];continue}if(a===i)i=null;continue}if(a==="'"||a==='"'||a==="`")i=a;else if(a==="("||a==="["||a==="{")r++;else if(a===")"||a==="]"||a==="}")r--;else if(a===","&&r===0){n.push(s.trim()),s="";continue}s+=a}if(s.trim())n.push(s.trim());return n}function ce(e){let n=e.trim(),r=n[0];if(r!=="'"&&r!=='"'&&r!=="`"||n.length<2||n.at(-1)!==r)return null;let i="";for(let s=1;s<n.length-1;s++){let o=n[s];if(o==="\\"&&s+1<n.length-1){let a=n[++s];i+=a==="n"?`
|
|
40
|
-
`:a==="t"?"\t":a;continue}if(o===r)return null;if(r==="`"&&o==="$"&&n[s+1]==="{")return null;i+=o}return i}var vt=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function zt(e,n){let r=e.trim();if(!r)return{ok:!1,message:"the argument is empty",code:t.INVALID_DIRECTIVE_SYNTAX};let i=qs(r);if(i)return{ok:!1,message:`the expression is not allowed (${i})`,code:t.UNSAFE_EXPRESSION};let s=H(n),o;try{o=d(r,Object.keys(s))(...Object.values(s))}catch(c){return{ok:!1,message:`the expression could not be evaluated: ${c instanceof Error?c.message:String(c)}`,code:t.EVALUATION_ERROR}}if(o!==void 0&&o!==null)return{ok:!0,value:o};let a=[...new Set(st(r))].filter((c)=>!vt.has(c)&&!(c in s)&&!(c in globalThis));if(a.length>0)return{ok:!1,message:`${a.map((p)=>`"${p}"`).join(", ")} ${a.length===1?"is":"are"} not defined here. Values a directive reads must come from <script server> or the render context; a plain <script> runs in the browser. To pass literal text, quote it.`,code:t.UNDEFINED_VARIABLE};if(o===void 0&&(r.startsWith("{")||r.startsWith("[")))return{ok:!1,message:"the expression threw while it was evaluated",code:t.EVALUATION_ERROR};return{ok:!0,value:o}}function He(e){if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e==="object")return"an object";if(typeof e==="string")return`a string ("${e.length>40?`${e.slice(0,40)}...`:e}")`;return`${/^[aeiou]/.test(typeof e)?"an":"a"} ${typeof e}`}function ot(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Le(e){if(!e)return"";return Ne.isAbsolute(e)?Ne.relative(process.cwd(),e)||e:e}function oe(e){let n=e.replace(/\s+/g," ").trim();return n.length>80?`${n.slice(0,77)}...`:n}function N(e,n,r,i,s=t.EVALUATION_ERROR){let o=i?` in ${Le(i)}`:"";return console.warn(`[stx] ${oe(n)}${o}: ${r}`),l(e,`${oe(n)}: ${r}`,s)}function Gs(e,n,r){let i=r?` in ${Le(r)}`:"";console.warn(`[stx] ${oe(e)}${i}: ${n}`)}function Ei(){return{afterOpen:[],beforeClose:[]}}function $t(e){return e.afterOpen.length>0||e.beforeClose.length>0}function sl(e,n){if(!$t(n))return e;let r=n.afterOpen.join(""),i=n.beforeClose.join(""),s=e.lastIndexOf("</head>"),o=r?$r(e):null,a=i&&s!==-1?s:null;if(o===null&&a===null)return e;if(o!==null&&a!==null)return`${e.slice(0,o)}${r}${e.slice(o,a)}${i}${e.slice(a)}`;if(o!==null)return`${e.slice(0,o)}${r}${e.slice(o)}`;return`${e.slice(0,a)}${i}${e.slice(a)}`}var Me=/\s*<meta\b[^>]*\bcharset\b[^>]*>/iy;function $r(e){let n=/<head\b[^>]*>/i.exec(e);if(!n)return null;let r=n.index+n[0].length;Me.lastIndex=r;let i=Me.exec(e);return i?r+i[0].length:r}var ue="data-stx-color-mode-boot",Pe="__STX_COLOR_MODE__",Rt=new Set(["light","dark","auto","system"]),Ct=new Set(["auto","system"]),Tt=/^[a-z][\w:-]*$/i,At=/^[\w-]+$/;function _t(e){let n=e.storageKey??"stx-color-mode",r=e.initialMode??"auto",i=e.darkClass===void 0?"dark":e.darkClass,s=e.attribute??null,o=e.autoValue??null,a=e.respectExisting===!0;if(typeof n!=="string"||n.length===0)throw Error("colorMode.storageKey must be a non-empty string");if(!Rt.has(r))throw Error(`colorMode.initialMode must be one of light, dark, auto, system \u2014 got ${JSON.stringify(r)}`);if(i!==null&&(typeof i!=="string"||!At.test(i)))throw Error(`colorMode.darkClass must be a single CSS class name, or null to opt out \u2014 got ${JSON.stringify(i)}`);if(s!==null&&(typeof s!=="string"||!Tt.test(s)))throw Error(`colorMode.attribute must be a valid HTML attribute name \u2014 got ${JSON.stringify(s)}`);if(o!==null&&!Ct.has(o))throw Error(`colorMode.autoValue must be 'auto' or 'system' \u2014 got ${JSON.stringify(o)}`);if(i===null&&s===null)throw Error("colorMode needs at least one of darkClass or attribute \u2014 with both null nothing would mark the mode on <html>");if(a&&s===null)throw Error("colorMode.respectExisting needs an attribute to read \u2014 the dark class alone cannot say whether a mode was chosen");return{storageKey:n,initialMode:r==="system"?"auto":r,darkClass:i,attribute:s,autoValue:o,respectExisting:a}}function It(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ge(e={}){let n=_t(e),r=It(n),i=`(function(){"use strict";var o=window.${Pe};if(o&&typeof o.sync==="function"){o.sync();return}var c=${r};var r=document.documentElement;function read(){var p=c.initialMode,a=c.autoValue;try{var v=localStorage.getItem(c.storageKey);if(v==="light"||v==="dark"){p=v}else if(v==="auto"||v==="system"){p="auto";if(!a)a=v}}catch(e){}return{p:p,a:a}}function sys(){try{return matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return"light"}}function stamp(m){if(c.attribute)r.setAttribute(c.attribute,m);if(c.darkClass){if(m==="dark")r.classList.add(c.darkClass);else r.classList.remove(c.darkClass)}}var s=read();var f=null;if(c.respectExisting&&c.attribute){var x=r.getAttribute(c.attribute);if(x==="light"||x==="dark")f=x}var m=f||(s.p==="auto"?sys():s.p);var p=s.p;stamp(m);var g=null;function sync(){var t=read(),n=f||(t.p==="auto"?sys():t.p);var moved=n!==m,chose=t.p!==p;if(moved){r.style.setProperty("transition","none","important");stamp(n);void r.offsetHeight;r.style.removeProperty("transition")}else stamp(n);m=n;p=t.p;if(g){g.mode=n;g.preference=t.p;if(t.a)g.autoValue=t.a}if(moved||chose){try{window.dispatchEvent(new CustomEvent("stx:color-mode",{detail:{mode:n,preference:t.p}}))}catch(e){}}}try{g=window.${Pe}={storageKey:c.storageKey,initialMode:c.initialMode,darkClass:c.darkClass,attribute:c.attribute,autoValue:s.a||"auto",respectExisting:c.respectExisting,forced:f,preference:p,mode:m,watching:true,sync:sync}}catch(e){}try{var q=matchMedia("(prefers-color-scheme: dark)");if(q.addEventListener)q.addEventListener("change",sync);else if(q.addListener)q.addListener(sync)}catch(e){}try{addEventListener("pageshow",sync);addEventListener("storage",function(e){if(e.key===null||e.key===c.storageKey)sync()});document.addEventListener("visibilitychange",function(){if(document.visibilityState==="visible")sync()})}catch(e){}}());`;return`<script ${ue}>${i}</script>`}function Rr(e,n={}){if(e.includes(ue))return e;let r=le(e);if(r===null)return e;let i=ge(n);return`${e.slice(0,r)}
|
|
41
|
-
${i}${e.slice(r)}`}var le=$r,Ot=new RegExp(`<script\\b[^>]*\\b${ue}\\b[^>]*>[\\s\\S]*?<\\/script>`,"i"),Fe=/<meta\b[^>]*\bcharset\b[^>]*>/gi,De=/<\/head>/gi;function Nt(e){let n=/<head\b[^>]*>/i.exec(e);if(!n)return e;let r=n.index+n[0].length;De.lastIndex=r;let i=De.exec(e),s=i?i.index:e.length;Fe.lastIndex=r;let o=Fe.exec(e);if(!o||o.index>=s)return e;if(e.slice(r,o.index).trim()==="")return e;let a=o.index+o[0].length;return`${e.slice(0,r)}
|
|
42
|
-
${o[0]}${e.slice(r,o.index)}${e.slice(a,s)}${e.slice(s)}`}function ol(e){return Lt(Nt(e))}function Lt(e){let n=Ot.exec(e);if(!n)return e;let r=le(e);if(r===null)return e;if(n.index<=r||e.slice(r,n.index).trim()==="")return e;let i=e.slice(0,n.index)+e.slice(n.index+n[0].length),s=le(i);if(s===null)return e;return`${i.slice(0,s)}
|
|
43
|
-
${n[0]}${i.slice(s)}`}var Mt="[data-stx-component-wrapper]:not([stx-hydrate]){display:contents}",Be=`<style data-stx-cloak>[x-cloak]{display:none !important}${Mt}</style>`,U="data-stx-html-attrs",V="data-stx-html-class",Ue=/^[A-Za-z_:][\w:.-]*$/;function v(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Pt(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function it(e){if(e.name)return`name="${e.name}"`;if(e.property)return`property="${e.property}"`;if(e.charset!=null)return"charset=";if(e["http-equiv"])return`http-equiv="${e["http-equiv"]}"`;return""}function Dt(e){let n=/^\s*<meta\b([^>]*)>/i.exec(e);if(!n)return null;let r={};for(let i of n[1].matchAll(/([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g))r[i[1].toLowerCase()]=i[2]??i[3]??i[4]??"";return r}function _(e,n){return Object.entries(e).filter(([r])=>!n?.(r)).map(([r,i])=>`${r}="${v(String(i))}"`).join(" ")}function W(e){let n=String(e.content),r=typeof e.type==="string"?e.type.trim().toLowerCase():"";return/json$|^importmap$/.test(r)?n.replace(/<\//g,"<\\/"):n}function We(e){let n=_(e,(r)=>r==="content");return`<script${n?` ${n}`:""}>${W(e)}</script>`}function Ht(e={},n="en"){let r=[],i=[],s="",o=n;for(let[c,p]of Object.entries(e||{})){if(p==null)continue;let g=c.trim();if(!Ue.test(g))continue;let h=g.toLowerCase();if(h==="lang"){o=String(p);continue}if(h==="class"){s=String(p).trim();continue}r.push(` ${g}="${v(String(p))}"`),i.push(g)}let a=` lang="${v(o)}"`;if(s)a+=` class="${v(s)}"`;if(a+=r.join(""),s)a+=` ${V}="${v(s)}"`;if(i.length)a+=` ${U}="${v(i.join(" "))}"`;return a}function il(e={},n={}){let r={...e,...n};if(e.class&&n.class){let i=e.class.split(/\s+/).filter(Boolean);for(let s of n.class.split(/\s+/).filter(Boolean))if(!i.includes(s))i.push(s);r.class=i.join(" ")}return r}function Ar(e,n={}){if(!n||Object.keys(n).length===0)return e;let r=e.match(/<html\b([^>]*)>/i);if(!r)return e;let i={},s=[],o=/([A-Za-z_:][\w:.-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g,a;while((a=o.exec(r[1]))!==null){let h=a[1];if(!(h in i))s.push(h);i[h]=a[2]??a[3]??a[4]??""}let c=[],p=[];for(let[h,m]of Object.entries(n)){if(m==null)continue;let y=h.trim();if(!Ue.test(y))continue;let b=y.toLowerCase();if(b==="class"){let S=(i.class||"").split(/\s+/).filter(Boolean);for(let x of String(m).split(/\s+/).filter(Boolean))if(!S.includes(x))S.push(x),c.push(x);if(!("class"in i))s.push("class");i.class=S.join(" ");continue}if(!(y in i))s.push(y);if(i[y]=String(m),b!=="lang")p.push(y)}if(c.length){if(!(V in i))s.push(V);i[V]=c.join(" ")}if(p.length){if(!(U in i))s.push(U);i[U]=p.join(" ")}let g=s.map((h)=>` ${h}="${v(i[h])}"`).join("");return e.replace(r[0],()=>`<html${g}>`)}function al(e){if(e.includes("data-stx-cloak"))return null;if(e.lastIndexOf("</head>")===-1)return null;return`${Be}
|
|
44
|
-
`}function Ut(e){let n=[],r=0;while(r<e.length){let o=e.slice(r),a=o.match(/^\s+/);if(a){r+=a[0].length;continue}if(o.startsWith("<!--")){let m=e.indexOf("-->",r);if(m===-1)break;r=m+3;continue}let c=o.match(/^<script\b[^>]*>/i);if(c){let m=e.toLowerCase().indexOf("</script>",r+c[0].length);if(m===-1)break;r=m+9;continue}let p=o.match(/^<link\b[^>]*>/i);if(p){n.push(p[0]),r+=p[0].length;continue}let g=o.match(/^<meta\b[^>]*>/i);if(g){n.push(g[0]),r+=g[0].length;continue}let h=o.match(/^<style\b[^>]*>[\s\S]*?<\/style>/i);if(h){n.push(h[0]),r+=h[0].length;continue}break}if(n.length===0)return{body:e,hoisted:n};let i="",s=0;while(s<e.length&&s<r){let o=e.slice(s),a=o.match(/^<link\b[^>]*>/i);if(a&&n.includes(a[0])){s+=a[0].length;continue}let c=o.match(/^<meta\b[^>]*>/i);if(c&&n.includes(c[0])){s+=c[0].length;continue}let p=o.match(/^<style\b[^>]*>[\s\S]*?<\/style>/i);if(p&&n.includes(p[0])){s+=p[0].length;continue}i+=e[s],s++}return i+=e.slice(r),{body:i,hoisted:n}}function Vt(e,n={},r={}){let{title:i="stx App",lang:s="en",meta:o=[],link:a=[],script:c=[],headRaw:p="",htmlAttrs:g={},bodyClass:h="",bodyAttrs:m={}}=n,y=r.title||i,b=[{charset:"UTF-8"},{name:"viewport",content:"width=device-width, initial-scale=1.0"}],S=new Set(o.map(it).filter(Boolean)),{body:x,hoisted:C}=Ut(e),A=new Set(C.flatMap((E)=>{let O=Dt(E);return O?[it(O)].filter(Boolean):[]})),Ye=[...b.filter((E)=>!S.has(it(E))),...o].filter((E)=>!A.has(it(E))).map((E)=>` <meta ${_(E)}>`).join(`
|
|
45
|
-
`),Je=a.map((E)=>` <link ${_(E)}>`).join(`
|
|
46
|
-
`),Ze=c.map((E)=>{if(E.src)return` <script ${_(E,(O)=>O==="content")}></script>`;if(E.content)return` ${We(E)}`;return""}).filter(Boolean).join(`
|
|
47
|
-
`),Qe=Ht(g,s),et=Object.entries(m).map(([E,O])=>` ${E}="${v(String(O))}"`).join(""),tt=h?` class="${v(h)}"`:"",nt=[Ye,r.colorMode?` ${ge(r.colorMode)}`:"",` <title>${r.titleIsHtml?y:Pt(y)}</title>`,` ${Be}`,Je,Ze,p?` ${p}`:"",...(r.styles||[]).map((E)=>` ${E}`),...C.map((E)=>` ${E}`),...(r.headScripts||[]).map((E)=>` ${E}`),r.headStack||""].filter(Boolean),rt=[x,...(r.bodyScripts||[]).map((E)=>E),r.bodyStack||""].filter(Boolean);return`<!DOCTYPE html>
|
|
48
|
-
<html${Qe}>
|
|
49
|
-
<head>
|
|
50
|
-
${nt.join(`
|
|
51
|
-
`)}
|
|
52
|
-
</head>
|
|
53
|
-
<body${tt}${et}>
|
|
54
|
-
${rt.join(`
|
|
55
|
-
`)}
|
|
56
|
-
</body>
|
|
57
|
-
</html>`}var pe=/\s+/y,fe=/<(script|style)\b[^>]*>/iy,Wt=/<\/script>/gi,Xt=/<\/style>/gi,je=/<!DOCTYPE\b/iy,ze=/<html[\s>]/iy;function kn(e){let n=0;while(n<e.length){if(pe.lastIndex=n,pe.exec(e)){n=pe.lastIndex;continue}if(e.startsWith("<!--",n)){let s=e.indexOf("-->",n);if(s===-1)return!1;n=s+3;continue}fe.lastIndex=n;let i=fe.exec(e);if(i){let s=i[1].toLowerCase()==="script"?Wt:Xt;s.lastIndex=fe.lastIndex;let o=s.exec(e);if(o===null)return!1;n=o.index+o[0].length;continue}if(je.lastIndex=n,je.test(e))return!0;return ze.lastIndex=n,ze.test(e)}return!1}function Ti(e){return kn(e)}function cl(e,n={}){let r=e.lastIndexOf("</head>");if(r===-1)return e;let{meta:i=[],link:s=[],script:o=[],headRaw:a=""}=n,c=e.slice(0,r),p=[];for(let g of i){let h=it(g);if(h&&c.includes(h))continue;p.push(` <meta ${_(g)}>`)}for(let g of s){if(g.href&&c.includes(`href="${g.href}"`))continue;p.push(` <link ${_(g)}>`)}for(let g of o)if(g.src){if(c.includes(`src="${g.src}"`))continue;p.push(` <script ${_(g,(h)=>h==="content")}></script>`)}else if(g.content){if(c.includes(W(g)))continue;p.push(` ${We(g)}`)}if(a&&!c.includes(a))p.push(` ${a}`);if(p.length===0)return e;return`${e.slice(0,r)}${p.join(`
|
|
58
|
-
`)}
|
|
59
|
-
${e.slice(r)}`}function Pr(e,n={},r={},i){if(i??Ti(e))return e;return Vt(e,n,r)}var Kt=["og:","article:","book:","profile:","fb:","music:","video:"],qt=/^[a-z][\w-]*(?::[\w:-]+)?$/i;function Ir(e,n){if(e.length<1)return{kind:"error",message:"meta directive requires at least the meta name",code:t.INVALID_DIRECTIVE_SYNTAX};if(e.length>2)return{kind:"error",message:`@meta takes a name and a value, got ${e.length} arguments`,code:t.INVALID_DIRECTIVE_SYNTAX};let r=Gt(e[0],n);if(typeof r!=="string")return r;let i;if(e.length===2){let o=Yt(e[1],n);if(typeof o!=="string")return o;i=o}else{let o=r.includes(":")?r.slice(r.indexOf(":")+1):r,a=n.openGraph,c=n[o]??(ot(a)?a[o]:void 0);i=c===void 0||c===null||typeof c==="object"?"":String(c)}if(!i)return{kind:"empty"};return{kind:"tag",tag:Kt.some((o)=>r.startsWith(o))?{property:r,content:i}:{name:r,content:i}}}function Gt(e,n){let r=ce(e);if(r!==null)return r.trim()?r:{kind:"error",message:"the meta name is empty",code:t.INVALID_DIRECTIVE_SYNTAX};if(qt.test(e.trim()))return e.trim();let i=zt(e,n);if(!i.ok)return{kind:"error",message:`meta name: ${i.message}`,code:i.code};if(typeof i.value!=="string"||!i.value.trim())return{kind:"error",message:`the meta name must be a non-empty string, got ${He(i.value)}`,code:t.TYPE_ERROR};return i.value}function Yt(e,n){let r=ce(e);if(r!==null)return r;let i=zt(e,n);if(!i.ok)return{kind:"error",message:i.message,code:i.code};let s=i.value;if(s===void 0||s===null||s===!1)return"";if(Array.isArray(s))return s.filter((o)=>o!==void 0&&o!==null&&o!=="").map(String).join(", ");if(typeof s==="object"&&!(s instanceof Date))return{kind:"error",message:`the content must be text, got ${He(s)}`,code:t.TYPE_ERROR};return String(s)}var Or=["title","lang","meta","link","script","headRaw","htmlAttrs","bodyClass","bodyAttrs"],Js=["title","titleTemplate","base","meta","link","script","style","htmlAttrs","bodyAttrs"],qe={links:"link",metas:"meta",scripts:"script",styles:"style"},Xe=new Set,Ke=new WeakMap;function de(e){if(Xe.has(e))return;Xe.add(e),console.warn(e)}function Jt(e,n){let r=Array.from({length:n.length+1},(i,s)=>s);for(let i=1;i<=e.length;i++){let s=r[0];r[0]=i;for(let o=1;o<=n.length;o++){let a=r[o];r[o]=Math.min(r[o]+1,r[o-1]+1,s+(e[i-1]===n[o-1]?0:1)),s=a}}return r[n.length]}function Zt(e,n){let r=e.toLowerCase(),i=n.find((p)=>p.toLowerCase()===r);if(i)return i;let s=qe[r];if(s&&n.includes(s))return s;let o,a=1/0;for(let p of n){let g=Jt(r,p.toLowerCase());if(g<a)o=p,a=g}let c=Math.min(e.length,o?.length??0)<=4?1:2;return a<=c?o:void 0}function _e(e,n){if(!e||typeof e!=="object"||Array.isArray(e))return e||{};let r=Ke.get(e);if(r)return r;let{known:i,source:s}=n,o=e;for(let a of Object.keys(e)){if(i.includes(a))continue;let c=qe[a];if(c&&i.includes(c)&&Array.isArray(e[a])){if(o===e)o={...e};let g=Array.isArray(o[c])?o[c]:[];o[c]=[...g,...e[a]],delete o[a],de(`[stx] ${s}.${a} is not a head key; reading it as ${s}.${c}. Rename it to \`${c}\`.`);continue}if(/^styles?$/.test(a)&&!i.includes("style")){de(`[stx] ${s}.${a} is not a head key and is ignored. Use \`link\` with rel: 'stylesheet', or \`headRaw\` for an inline <style>.`);continue}let p=Zt(a,i);de(p?`[stx] ${s}.${a} is not a head key and is ignored. Did you mean \`${p}\`?`:`[stx] ${s}.${a} is not a head key and is ignored. Known keys: ${i.join(", ")}.`)}return Ke.set(e,o),o}var T={},Qt=[],K={};function $i(){return T}function ey(){return K}function ty(){T={},Qt.length=0,K={}}function ll(e){T=Ve(T,_e(e,{known:Js,source:"useHead()"}))}function Ge(e,n,r){let i=[...e||[]];for(let s of n||[]){let o=r(s),a=o?i.findIndex((c)=>r(c)===o):-1;if(a<0)i.push(s);else i[a]=s}return i}function Ve(e,n){return{title:n.title??e.title,titleTemplate:n.titleTemplate??e.titleTemplate,base:n.base??e.base,meta:Ge(e.meta,n.meta,(r)=>r.name||r.property||(r.httpEquiv?`http:${r.httpEquiv}`:void 0)),link:Ge(e.link,n.link,(r)=>["icon","apple-touch-icon","canonical"].includes(r.rel||"")?[r.rel,r.type,r.media,r.sizes].join(":"):void 0),script:[...e.script||[],...n.script||[]],style:[...e.style||[],...n.style||[]],htmlAttrs:{...e.htmlAttrs,...n.htmlAttrs},bodyAttrs:{...e.bodyAttrs,...n.bodyAttrs}}}function wg(e){ll(Ys(e))}function Ys(e){let n=[];if(e.description)n.push({name:"description",content:e.description});if(e.keywords){let p=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;n.push({name:"keywords",content:p})}if(e.author)n.push({name:"author",content:e.author});if(e.robots)n.push({name:"robots",content:e.robots});let r=e.ogTitle??e.title,i=e.ogDescription??e.description;if(r)n.push({property:"og:title",content:r});if(i)n.push({property:"og:description",content:i});if(e.ogImage){if(n.push({property:"og:image",content:e.ogImage}),e.ogImageType)n.push({property:"og:image:type",content:e.ogImageType});if(e.ogImageWidth)n.push({property:"og:image:width",content:String(e.ogImageWidth)});if(e.ogImageHeight)n.push({property:"og:image:height",content:String(e.ogImageHeight)});if(e.ogImageAlt)n.push({property:"og:image:alt",content:e.ogImageAlt})}if(e.ogUrl)n.push({property:"og:url",content:e.ogUrl});if(e.ogType)n.push({property:"og:type",content:e.ogType});if(e.ogSiteName)n.push({property:"og:site_name",content:e.ogSiteName});if(e.ogLocale)n.push({property:"og:locale",content:e.ogLocale});if(e.profileFirstName)n.push({property:"profile:first_name",content:e.profileFirstName});if(e.profileLastName)n.push({property:"profile:last_name",content:e.profileLastName});if(e.profileUsername)n.push({property:"profile:username",content:e.profileUsername});let s=e.twitterTitle??e.title,o=e.twitterDescription??e.description,a=e.twitterImage??e.ogImage;if(e.twitterCard)n.push({name:"twitter:card",content:e.twitterCard});if(s)n.push({name:"twitter:title",content:s});if(o)n.push({name:"twitter:description",content:o});if(a){n.push({name:"twitter:image",content:a});let p=e.twitterImageAlt??(e.twitterImage?void 0:e.ogImageAlt);if(p)n.push({name:"twitter:image:alt",content:p})}if(e.twitterSite)n.push({name:"twitter:site",content:e.twitterSite});if(e.twitterCreator)n.push({name:"twitter:creator",content:e.twitterCreator});if(e.articleAuthor)n.push({property:"article:author",content:e.articleAuthor});if(e.articlePublishedTime)n.push({property:"article:published_time",content:e.articlePublishedTime});if(e.articleModifiedTime)n.push({property:"article:modified_time",content:e.articleModifiedTime});if(e.articleSection)n.push({property:"article:section",content:e.articleSection});if(e.articleTags)for(let p of e.articleTags)n.push({property:"article:tag",content:p});let c=[];if(e.canonical)c.push({rel:"canonical",href:e.canonical});return{title:e.title,titleTemplate:e.titleTemplate,meta:n,link:c}}function ny(e){if(K={...K,...e},e.title||e.description)wg({title:e.title,description:e.description})}function ry(e){let n=typeof e==="function"?e():e;ll({title:n})}function sy(e=T){let n=[];if(e.title){let r=e.title;if(e.titleTemplate)r=typeof e.titleTemplate==="function"?e.titleTemplate(r):e.titleTemplate.replace("%s",r);n.push(`<title>${I(r)}</title>`)}if(e.base){let r=Object.entries(e.base).map(([i,s])=>`${i}="${I(s)}"`).join(" ");n.push(`<base ${r}>`)}for(let r of e.meta||[]){let i=Object.entries(r).filter(([s,o])=>o!==void 0).map(([s,o])=>`${s==="httpEquiv"?"http-equiv":s}="${I(String(o))}"`).join(" ");n.push(`<meta ${i}>`)}for(let r of e.link||[]){let i=Object.entries(r).filter(([s,o])=>o!==void 0).map(([s,o])=>`${s}="${I(String(o))}"`).join(" ");n.push(`<link ${i}>`)}for(let r of e.script||[]){let{content:i,...s}=r,o=Object.entries(s).filter(([a,c])=>c!==void 0).map(([a,c])=>{if(typeof c==="boolean")return c?a:"";return`${a}="${I(String(c))}"`}).filter(Boolean).join(" ");if(i)n.push(`<script ${o}>${W(r)}</script>`);else n.push(`<script ${o}></script>`)}for(let r of e.style||[]){let i=r.type?` type="${r.type}"`:"";n.push(`<style${i}>${r.content}</style>`)}return n.join(`
|
|
60
|
-
`)}function oy(e=T){if(!e.htmlAttrs)return"";return Object.entries(e.htmlAttrs).map(([n,r])=>`${n}="${I(r)}"`).join(" ")}function iy(e=T){if(!e.bodyAttrs)return"";return Object.entries(e.bodyAttrs).map(([n,r])=>`${n}="${I(r)}"`).join(" ")}function I(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ay(e=T){if(typeof document>"u")return;if(e.title){let n=e.title;if(e.titleTemplate)n=typeof e.titleTemplate==="function"?e.titleTemplate(n):e.titleTemplate.replace("%s",n);document.title=n}for(let n of e.meta||[]){let r=n.name?`meta[name="${n.name}"]`:n.property?`meta[property="${n.property}"]`:null;if(r){let i=document.querySelector(r);if(!i){if(i=document.createElement("meta"),n.name)i.setAttribute("name",n.name);if(n.property)i.setAttribute("property",n.property);document.head.appendChild(i)}i.setAttribute("content",n.content)}}for(let n of e.link||[]){let r=`link[rel="${n.rel}"]${n.href?`[href="${n.href}"]`:""}`,i=document.querySelector(r);if(!i)i=document.createElement("link"),document.head.appendChild(i);for(let[s,o]of Object.entries(n))if(o!==void 0)i.setAttribute(s,String(o))}if(e.htmlAttrs)for(let[n,r]of Object.entries(e.htmlAttrs))if(n==="class")for(let i of String(r).split(/\s+/).filter(Boolean))document.documentElement.classList.add(i);else document.documentElement.setAttribute(n,r);if(e.bodyAttrs)for(let[n,r]of Object.entries(e.bodyAttrs))document.body.setAttribute(n,r)}function cy(e){let n="";return{content:e.replace(/@head\s*([\s\S]*?)@endhead/g,(i,s)=>(n+=s.trim()+`
|
|
61
|
-
`,"")),headContent:n.trim()}}function ly(e,n){return e.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(r,i,s,o)=>{let a=i?s:n[(o||"").trim()]??o,c=n.__stx_runtime_head??{};return n.__stx_runtime_head=Ve(c,{title:a}),""})}function uy(e,n,r=""){if(!e.includes("@meta"))return e;return Bt(e,/(?<![\w$@])@meta\s*\(/g,(i,s)=>{let o=Ir(Ft(i),n);if(o.kind==="error")return N("Meta",s,o.message,r,o.code);if(o.kind==="tag"){let a=n.__stx_runtime_head??{};n.__stx_runtime_head=Ve(a,{meta:[o.tag]})}return""},(i)=>N("Meta",i,"the call has no closing parenthesis",r,t.INVALID_DIRECTIVE_SYNTAX))}export{qs,ki,Xs,u,f,nl,R,st,jt,d,Ks,t,ae,Tr,q,l,ke,_i,B,Sn,w,rl,Ci,Bt,Ft,zt,He,ot,N,Gs,Ei,sl,$r,Rr,ol,it,il,Ar,al,kn,Ti,cl,Pr,Ir,Or,Js,_e,$i,ey,ty,ll,Ve,wg,Ys,ny,ry,sy,oy,iy,ay,cy,ly,uy};
|
package/dist/chunk-shag9bcm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Om,wa,uu,Nm,Mm,Dm,Lm,jm,du,pu,Bm,Fm,zm,Hm}from"./chunk-s763dt8e.js";import"./chunk-2fh4wvtv.js";import"./chunk-t0bcbhvs.js";import"./chunk-vg3scf4d.js";import"./chunk-c84pxd2k.js";import"./chunk-3ajbbtqx.js";import"./chunk-pxxhhaaw.js";import"./chunk-61h00ba5.js";import"./chunk-2yb1rwmy.js";import"./chunk-xtwcz8dg.js";import"./chunk-8kvj2wz0.js";import"./chunk-kydgndkt.js";import"./chunk-x8m28yea.js";import"./chunk-gqdkvwjp.js";import"./chunk-56j2egg3.js";import"./chunk-9gwhs0gk.js";import"./chunk-qpvwxppw.js";import"./chunk-dq87xd5c.js";import"./chunk-j2v9f2dk.js";import"./chunk-nv0n2hjg.js";import"./chunk-fw9dhsd9.js";import"./chunk-akcyaxwv.js";import"./chunk-se44tmvx.js";import"./chunk-2yxva96k.js";import"./chunk-t65tn8ee.js";export{uu as SUSPENSE_RESOLVER_RUNTIME,wa as buildSuspenseResolveScript,jm as createStreamRenderer,Dm as extractStreamBoundaries,Hm as generateHydrationRuntime,pu as islandDirective,Fm as processSectionDirectives,Mm as processStreamDirectives,Bm as registerStreamingDirectives,Nm as renderStreamingPage,Om as streamTemplate,Lm as streamTemplateSimple,zm as streamToResponse,du as streamingSuspenseDirective};
|
package/dist/chunk-t4yy48dh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Wg}from"./chunk-nn1f1h3q.js";import"./chunk-2fh4wvtv.js";import"./chunk-t0bcbhvs.js";import"./chunk-vg3scf4d.js";import"./chunk-c84pxd2k.js";import"./chunk-3ajbbtqx.js";import"./chunk-pxxhhaaw.js";import"./chunk-61h00ba5.js";import"./chunk-2yb1rwmy.js";import"./chunk-xtwcz8dg.js";import"./chunk-8kvj2wz0.js";import"./chunk-kydgndkt.js";import"./chunk-x8m28yea.js";import"./chunk-gqdkvwjp.js";import"./chunk-56j2egg3.js";import"./chunk-9gwhs0gk.js";import"./chunk-qpvwxppw.js";import"./chunk-dq87xd5c.js";import"./chunk-j2v9f2dk.js";import"./chunk-nv0n2hjg.js";import"./chunk-fw9dhsd9.js";import"./chunk-akcyaxwv.js";import"./chunk-se44tmvx.js";import"./chunk-2yxva96k.js";import"./chunk-t65tn8ee.js";export{Wg as startInteractive};
|
package/dist/chunk-t55nk8sw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ea,Ta,$a,Ra,xh}from"./chunk-zfzjn93c.js";import"./chunk-sprgkk9j.js";import"./chunk-25q462jp.js";import"./chunk-33vr7x2t.js";import"./chunk-2fh4wvtv.js";import"./chunk-t0bcbhvs.js";import"./chunk-vg3scf4d.js";import"./chunk-c84pxd2k.js";import"./chunk-3ajbbtqx.js";import"./chunk-pxxhhaaw.js";import"./chunk-61h00ba5.js";import"./chunk-2yb1rwmy.js";import"./chunk-xtwcz8dg.js";import"./chunk-8kvj2wz0.js";import"./chunk-kydgndkt.js";import"./chunk-x8m28yea.js";import"./chunk-gqdkvwjp.js";import"./chunk-56j2egg3.js";import"./chunk-9gwhs0gk.js";import"./chunk-qpvwxppw.js";import"./chunk-dq87xd5c.js";import"./chunk-j2v9f2dk.js";import"./chunk-nv0n2hjg.js";import"./chunk-fw9dhsd9.js";import"./chunk-akcyaxwv.js";import"./chunk-se44tmvx.js";import"./chunk-2yxva96k.js";import"./chunk-t65tn8ee.js";export{Ea as buildNative,xh as default,Ta as findCraftBinary,Ra as getAvailableFormats,$a as getAvailableTargets};
|
package/dist/chunk-ys46rqxg.js
DELETED
package/dist/chunk-zhz8er14.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Of,ds}from"./chunk-3ajbbtqx.js";import"./chunk-pxxhhaaw.js";import"./chunk-2yb1rwmy.js";import"./chunk-kydgndkt.js";import{kr}from"./chunk-nv0n2hjg.js";import"./chunk-fw9dhsd9.js";import"./chunk-akcyaxwv.js";import{st}from"./chunk-se44tmvx.js";import"./chunk-2yxva96k.js";import"./chunk-t65tn8ee.js";export{st as freeIdentifiers,ds as processComponents,Of as processESImports,kr as rendersAsElement};
|