@nil-/xit 0.4.6 → 0.4.8

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/assets/bundler.js CHANGED
@@ -14,7 +14,7 @@ import Component from "${e.replace(/\\/g,"/")}";
14
14
  export const action = (target, context) => {
15
15
  const ref = mount(Component, { target, context });
16
16
  return { destroy: () => unmount(ref) };
17
- };`,ml=new Map,uS=/^(@[^/]*\/[^/]*)(?:\/(.*))?$/s,DS=/^([^/]*)(?:\/(.*))?$/s,dS=async(e,A)=>{if(A!=null){const t=new URL(A);return new URL(e,t).href}return e},Fn=async(e,A)=>(await fetch(new URL(e,A),{method:"HEAD"})).url,pS=async e=>{const A=await fetch(e);if(A.ok)return JSON.parse(await A.text())},wS=async(e,A)=>{const[t,g,I=""]=e.split(e.startsWith("@")?uS:DS),Q=g=="@nil-/xit"?`${A}/${g}@0.4.6`:`${A}/${g}`,C=`${Q}/package.json`;if(ml.has(C))return{...ml.get(C),rest:I};const i=await pS(C);if(i!=null)return ml.set(C,{base:Q,json:i}),{base:Q,json:i,rest:I}},fS=(e,A)=>({input:t=>({resolved:t}),hook:async(t,g)=>{if(t.startsWith(Xd))return t;if(t.startsWith(".")){if(g!=null&&g.startsWith(Jn))return await dS(t,g);if(g!=null&&g.startsWith(uI))return`${uI}${await Fn(t,g.slice(uI.length))}`}if(t.startsWith("$")){const Q=t.indexOf("/"),C=t.slice(1,Q);return C in A?`${Jn}${A[C]}${t.slice(Q)}`:null}if(t.startsWith("https://"))return null;const I=await wS(t,e);if(I!=null){const Q=lS(I.json,I.rest,{browser:!0,conditions:["svelte","production"]});if(Q!=null){if(Array.isArray(Q)&&Q.length>0)return`${uI}${await Fn(`${I.base}/${Q[0]}`)}`;if(typeof Q=="string")return`${uI}${await Fn(`${I.base}/${Q}`)}`}else{const C=cS(I.json);if(C!=null)return`${uI}${await Fn(`${I.base}/${C}`)}`}}throw"unknown file, should be unreachable"}});function ZA(e,A,t){const g=t._;let I=!1;function Q(i,{next:B,state:s}){B(s)}function C(i,B,s){if(I||!i.type)return;let a;const n={},o={path:B,state:s,next:(f=s)=>{B.push(i);for(const d in i){if(d==="type")continue;const l=i[d];if(l&&typeof l=="object")if(Array.isArray(l)){const c={};l.forEach((h,w)=>{if(h&&typeof h=="object"){const N=C(h,B,f);N&&(c[w]=N)}}),Object.keys(c).length>0&&(n[d]=l.map((h,w)=>c[w]??h))}else{const c=C(l,B,f);c&&(n[d]=c)}}if(B.pop(),Object.keys(n).length>0)return zd(i,n)},stop:()=>{I=!0},visit:(f,d=s)=>{B.push(i);const l=C(f,B,d)??f;return B.pop(),l}};let D=t[i.type]??Q;if(g){let f;a=g(i,{...o,next:(d=s)=>(s=d,f=D(i,{...o,state:d}),f)}),!a&&f&&(a=f)}else a=D(i,o);if(a||Object.keys(n).length>0&&(a=zd(i,n)),a)return a}return C(e,[],A)??e}function zd(e,A){const t={},g=Object.getOwnPropertyDescriptors(e);for(const I in g)Object.defineProperty(t,I,g[I]);for(const I in A)t[I]=A[I];return t}const KQ=/\s/,Nl=/\s+/,Sn=/^\r?\n/,yS=/^\s/,TC=/^[ \t\r\n]+/,$d=/\s$/,_Q=/[ \t\r\n]+$/,PQ=/[^ \t\r\n]/,Ap=/[ \t\n\r\f]+/g,kS=/^[ \t\n\r\f]+$/,ep=/[^\n]/g,tp=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/,GS=/(^[^a-zA-Z_$]|[^a-zA-Z0-9_$])/g,mS=/^[aeiou]/,NS=/^h[1-6]$/,MS=/(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/,Ln=/[\u202a\u202b\u202c\u202d\u202e\u2066\u2067\u2068\u2069]+/g,Ml=1,Yn=2,RS=4,JS=8,FS=16,SS=1,LS=2,YS=4,US=8,bS=16,qS=1,vS=2,xS=4,HS=1,gp=2,KS=4,_S=8,PS="[",TS="[!",jS="]",OS=1,Ip=2,Qp="http://www.w3.org/2000/svg",Cp="http://www.w3.org/1998/Math/MathML",ZS=["state_snapshot_uncloneable","binding_property_non_reactive","hydration_attribute_changed","hydration_html_changed","ownership_invalid_binding","ownership_invalid_mutation"];function Un(e,A){if(A.length===0)return null;const g=new $S(A).get(e);return g&&g[0][0]>.7?g[0][1]:null}const Rl=2,Jl=3;function VS(e,A){if(e===null&&A===null)throw"Trying to compare two null values";return e===null||A===null?0:(e=String(e),A=String(A),1-WS(e,A)/Math.max(e.length,A.length))}function WS(e,A){const t=[];let g=0,I=0;for(let Q=0;Q<=A.length;Q++)for(let C=0;C<=e.length;C++)Q&&C?e.charAt(C-1)===A.charAt(Q-1)?I=g:I=Math.min(t[C],t[C-1],g)+1:I=Q+C,g=t[C],t[C]=I;return t.pop()}const XS=/[^\w, ]+/;function zS(e,A=2){const t="-"+e.toLowerCase().replace(XS,"")+"-",g=A-t.length,I=[];if(g>0)for(let Q=0;Q<g;++Q)e+="-";for(let Q=0;Q<t.length-A+1;++Q)I.push(t.slice(Q,Q+A));return I}function ip(e,A=2){const t={},g=zS(e,A);let I=0;for(I;I<g.length;++I)g[I]in t?t[g[I]]+=1:t[g[I]]=1;return t}function Bp(e,A){return A[0]-e[0]}class $S{constructor(A){nA(this,"exact_set",{});nA(this,"match_dict",{});nA(this,"items",{});for(let t=Rl;t<Jl+1;++t)this.items[t]=[];for(let t=0;t<A.length;++t)this.add(A[t])}add(A){if(A.toLowerCase()in this.exact_set)return!1;let g=Rl;for(g;g<Jl+1;++g)this._add(A,g)}_add(A,t){const g=A.toLowerCase(),I=this.items[t]||[],Q=I.length;I.push(0);const C=ip(g,t);let i=0,B,s;for(B in C)s=C[B],i+=Math.pow(s,2),B in this.match_dict?this.match_dict[B].push([Q,s]):this.match_dict[B]=[[Q,s]];const a=Math.sqrt(i);I[Q]=[a,g],this.items[t]=I,this.exact_set[g]=A}get(A){const t=A.toLowerCase(),g=this.exact_set[t];if(g)return[[1,g]];for(let I=Jl;I>=Rl;--I){const Q=this.__get(A,I);if(Q.length>0)return Q}return null}__get(A,t){const g=A.toLowerCase(),I={},Q=ip(g,t),C=this.items[t];let i=0,B,s,a,n,o;for(B in Q)if(s=Q[B],i+=Math.pow(s,2),B in this.match_dict)for(a=0;a<this.match_dict[B].length;++a)n=this.match_dict[B][a][0],o=this.match_dict[B][a][1],n in I?I[n]+=s*o:I[n]=s*o;const D=Math.sqrt(i);let f=[],d;for(const h in I)d=I[h],f.push([d/(D*C[h][0]),C[h][1]]);f.sort(Bp);let l=[];const c=Math.min(50,f.length);for(let h=0;h<c;++h)l.push([VS(f[h][1],g),f[h][1]]);f=l,f.sort(Bp),l=[];for(let h=0;h<f.length;++h)f[h][0]===f[0][0]&&l.push([f[h][0],this.exact_set[f[h][1]]]);return l}}function AL(e,A){return e.start<=A&&A<e.end}function sp(e,A={}){const{offsetLine:t=0,offsetColumn:g=0}=A;let I=0;const Q=e.split(`
17
+ };`,ml=new Map,uS=/^(@[^/]*\/[^/]*)(?:\/(.*))?$/s,DS=/^([^/]*)(?:\/(.*))?$/s,dS=async(e,A)=>{if(A!=null){const t=new URL(A);return new URL(e,t).href}return e},Fn=async(e,A)=>(await fetch(new URL(e,A),{method:"HEAD"})).url,pS=async e=>{const A=await fetch(e);if(A.ok)return JSON.parse(await A.text())},wS=async(e,A)=>{const[t,g,I=""]=e.split(e.startsWith("@")?uS:DS),Q=g=="@nil-/xit"?`${A}/${g}@0.4.8`:`${A}/${g}`,C=`${Q}/package.json`;if(ml.has(C))return{...ml.get(C),rest:I};const i=await pS(C);if(i!=null)return ml.set(C,{base:Q,json:i}),{base:Q,json:i,rest:I}},fS=(e,A)=>({input:t=>({resolved:t}),hook:async(t,g)=>{if(t.startsWith(Xd))return t;if(t.startsWith(".")){if(g!=null&&g.startsWith(Jn))return await dS(t,g);if(g!=null&&g.startsWith(uI))return`${uI}${await Fn(t,g.slice(uI.length))}`}if(t.startsWith("$")){const Q=t.indexOf("/"),C=t.slice(1,Q);return C in A?`${Jn}${A[C]}${t.slice(Q)}`:null}if(t.startsWith("https://"))return null;const I=await wS(t,e);if(I!=null){const Q=lS(I.json,I.rest,{browser:!0,conditions:["svelte","production"]});if(Q!=null){if(Array.isArray(Q)&&Q.length>0)return`${uI}${await Fn(`${I.base}/${Q[0]}`)}`;if(typeof Q=="string")return`${uI}${await Fn(`${I.base}/${Q}`)}`}else{const C=cS(I.json);if(C!=null)return`${uI}${await Fn(`${I.base}/${C}`)}`}}throw"unknown file, should be unreachable"}});function ZA(e,A,t){const g=t._;let I=!1;function Q(i,{next:B,state:s}){B(s)}function C(i,B,s){if(I||!i.type)return;let a;const n={},o={path:B,state:s,next:(f=s)=>{B.push(i);for(const d in i){if(d==="type")continue;const l=i[d];if(l&&typeof l=="object")if(Array.isArray(l)){const c={};l.forEach((h,w)=>{if(h&&typeof h=="object"){const N=C(h,B,f);N&&(c[w]=N)}}),Object.keys(c).length>0&&(n[d]=l.map((h,w)=>c[w]??h))}else{const c=C(l,B,f);c&&(n[d]=c)}}if(B.pop(),Object.keys(n).length>0)return zd(i,n)},stop:()=>{I=!0},visit:(f,d=s)=>{B.push(i);const l=C(f,B,d)??f;return B.pop(),l}};let D=t[i.type]??Q;if(g){let f;a=g(i,{...o,next:(d=s)=>(s=d,f=D(i,{...o,state:d}),f)}),!a&&f&&(a=f)}else a=D(i,o);if(a||Object.keys(n).length>0&&(a=zd(i,n)),a)return a}return C(e,[],A)??e}function zd(e,A){const t={},g=Object.getOwnPropertyDescriptors(e);for(const I in g)Object.defineProperty(t,I,g[I]);for(const I in A)t[I]=A[I];return t}const KQ=/\s/,Nl=/\s+/,Sn=/^\r?\n/,yS=/^\s/,TC=/^[ \t\r\n]+/,$d=/\s$/,_Q=/[ \t\r\n]+$/,PQ=/[^ \t\r\n]/,Ap=/[ \t\n\r\f]+/g,kS=/^[ \t\n\r\f]+$/,ep=/[^\n]/g,tp=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/,GS=/(^[^a-zA-Z_$]|[^a-zA-Z0-9_$])/g,mS=/^[aeiou]/,NS=/^h[1-6]$/,MS=/(^[0-9-.])|[\^$@%&#?!|()[\]{}^*+~;]/,Ln=/[\u202a\u202b\u202c\u202d\u202e\u2066\u2067\u2068\u2069]+/g,Ml=1,Yn=2,RS=4,JS=8,FS=16,SS=1,LS=2,YS=4,US=8,bS=16,qS=1,vS=2,xS=4,HS=1,gp=2,KS=4,_S=8,PS="[",TS="[!",jS="]",OS=1,Ip=2,Qp="http://www.w3.org/2000/svg",Cp="http://www.w3.org/1998/Math/MathML",ZS=["state_snapshot_uncloneable","binding_property_non_reactive","hydration_attribute_changed","hydration_html_changed","ownership_invalid_binding","ownership_invalid_mutation"];function Un(e,A){if(A.length===0)return null;const g=new $S(A).get(e);return g&&g[0][0]>.7?g[0][1]:null}const Rl=2,Jl=3;function VS(e,A){if(e===null&&A===null)throw"Trying to compare two null values";return e===null||A===null?0:(e=String(e),A=String(A),1-WS(e,A)/Math.max(e.length,A.length))}function WS(e,A){const t=[];let g=0,I=0;for(let Q=0;Q<=A.length;Q++)for(let C=0;C<=e.length;C++)Q&&C?e.charAt(C-1)===A.charAt(Q-1)?I=g:I=Math.min(t[C],t[C-1],g)+1:I=Q+C,g=t[C],t[C]=I;return t.pop()}const XS=/[^\w, ]+/;function zS(e,A=2){const t="-"+e.toLowerCase().replace(XS,"")+"-",g=A-t.length,I=[];if(g>0)for(let Q=0;Q<g;++Q)e+="-";for(let Q=0;Q<t.length-A+1;++Q)I.push(t.slice(Q,Q+A));return I}function ip(e,A=2){const t={},g=zS(e,A);let I=0;for(I;I<g.length;++I)g[I]in t?t[g[I]]+=1:t[g[I]]=1;return t}function Bp(e,A){return A[0]-e[0]}class $S{constructor(A){nA(this,"exact_set",{});nA(this,"match_dict",{});nA(this,"items",{});for(let t=Rl;t<Jl+1;++t)this.items[t]=[];for(let t=0;t<A.length;++t)this.add(A[t])}add(A){if(A.toLowerCase()in this.exact_set)return!1;let g=Rl;for(g;g<Jl+1;++g)this._add(A,g)}_add(A,t){const g=A.toLowerCase(),I=this.items[t]||[],Q=I.length;I.push(0);const C=ip(g,t);let i=0,B,s;for(B in C)s=C[B],i+=Math.pow(s,2),B in this.match_dict?this.match_dict[B].push([Q,s]):this.match_dict[B]=[[Q,s]];const a=Math.sqrt(i);I[Q]=[a,g],this.items[t]=I,this.exact_set[g]=A}get(A){const t=A.toLowerCase(),g=this.exact_set[t];if(g)return[[1,g]];for(let I=Jl;I>=Rl;--I){const Q=this.__get(A,I);if(Q.length>0)return Q}return null}__get(A,t){const g=A.toLowerCase(),I={},Q=ip(g,t),C=this.items[t];let i=0,B,s,a,n,o;for(B in Q)if(s=Q[B],i+=Math.pow(s,2),B in this.match_dict)for(a=0;a<this.match_dict[B].length;++a)n=this.match_dict[B][a][0],o=this.match_dict[B][a][1],n in I?I[n]+=s*o:I[n]=s*o;const D=Math.sqrt(i);let f=[],d;for(const h in I)d=I[h],f.push([d/(D*C[h][0]),C[h][1]]);f.sort(Bp);let l=[];const c=Math.min(50,f.length);for(let h=0;h<c;++h)l.push([VS(f[h][1],g),f[h][1]]);f=l,f.sort(Bp),l=[];for(let h=0;h<f.length;++h)f[h][0]===f[0][0]&&l.push([f[h][0],this.exact_set[f[h][1]]]);return l}}function AL(e,A){return e.start<=A&&A<e.end}function sp(e,A={}){const{offsetLine:t=0,offsetColumn:g=0}=A;let I=0;const Q=e.split(`
18
18
  `).map((B,s)=>{const a=I+B.length+1,n={start:I,end:a,line:s};return I=a,n});let C=0;function i(B,s){if(typeof B=="string"&&(B=e.indexOf(B,s??0)),B===-1)return;let a=Q[C];const n=B>=a.end?1:-1;for(;a;){if(AL(a,B))return{line:t+a.line,column:g+B-a.start,character:B};C+=n,a=Q[C]}}return i}const eL=/\r/g;function tL(e){e=e.replace(eL,"");let A=5381,t=e.length;for(;t--;)A=(A<<5)-A^e.charCodeAt(t);return(A>>>0).toString(36)}const gL=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function jC(e){return gL.includes(e)||e.toLowerCase()==="!doctype"}const IL=["arguments","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"];function Ep(e){return IL.includes(e)}function ap(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const QL=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function op(e){return QL.includes(e)}const np=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];function Fl(e){return np.includes(e)}const CL={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function iL(e){return e=e.toLowerCase(),CL[e]??e}const BL=[...np,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];function sL(e){return BL.includes(e)}const EL=["autofocus","muted","defaultValue","defaultChecked"];function Sl(e){return EL.includes(e)}const aL=["touchstart","touchmove"];function oL(e){return aL.includes(e)}const nL=["textContent","innerHTML","innerText"];function Ll(e){return nL.includes(e)}const rL=["body","embed","iframe","img","link","object","script","style","track"];function bn(e){return rL.includes(e)}const cL=["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hatch","hatchpath","hkern","image","line","linearGradient","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tref","tspan","unknown","use","view","vkern"];function Yl(e){return cL.includes(e)}const lL=["annotation","annotation-xml","maction","math","merror","mfrac","mi","mmultiscripts","mn","mo","mover","mpadded","mphantom","mprescripts","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics"];function rp(e){return lL.includes(e)}const cp=["$state","$state.raw","$derived","$derived.by"],hL=[...cp,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];function DI(e){return hL.includes(e)}function uL(e){return cp.includes(e)}function DL(e){return e==null?void 0:e.replace(/\//g,"/​")}let TQ=[],xt,qn,MA,Gt=sp("",{offsetLine:1});function lp(e){const A=Gt(e.start);return`${DL(xt)}:${A==null?void 0:A.line}:${A.column}`}let hp,ZI=[],vn=new Map;function dL(e){const A=new Set([...ZI.at(-1)||[],...e]);ZI.push(A)}function pL(){ZI.pop()}function up(e=()=>!0){hp=e}function vg(e,A){var t;return MA&&!!((t=vn.get(e))!=null&&t.some(g=>g.has(A)))}function Dp(e,A){var g;qn=e;const t=(g=A.rootDir)==null?void 0:g.replace(/\\/g,"/");xt=A.filename.replace(/\\/g,"/"),MA=!!A.dev,typeof t=="string"&&xt.startsWith(t)&&(xt=xt.replace(t,"").replace(/^[/\\]/,"")),Gt=sp(qn,{offsetLine:1}),TQ=[],ZI=[],vn.clear()}const wL=/^\t+/;function Ul(e){return e.replace(wL,A=>A.split(" ").join(" "))}function fL(e,A,t){const g=e.split(`
19
19
  `),I=Math.max(0,A-2),Q=Math.min(A+3,g.length),C=String(Q+1).length;return g.slice(I,Q).map((i,B)=>{const s=I+B===A,a=String(B+I+1).padStart(C," ");if(s){const n=" ".repeat(C+2+Ul(i.slice(0,t)).length)+"^";return`${a}: ${Ul(i)}
20
20
  ${n}`}return`${a}: ${Ul(i)}`}).join(`
@@ -281,4 +281,4 @@ Either change the import in "${FA(i)}" to point directly to the exporting module
281
281
  `,s:";"},E=w?"const":"var",r=(R,{isAsync:S,name:v})=>`${S?"async ":""}function${v?` ${v}`:""}${m}(${R.join(`,${m}`)})${m}`,u=h?(R,{isAsync:S,name:v})=>{const b=R.length===1;return`${v?`${E} ${v}${m}=${m}`:""}${S?`async${b?" ":m}`:""}${b?R[0]:`(${R.join(`,${m}`)})`}${m}=>${m}`}:r,p=(R,{functionReturn:S,lineBreakIndent:v,name:b})=>[`${u(R,{isAsync:!1,name:b})}${h?v?`${G}${v.base}${v.t}`:"":`{${v?`${G}${v.base}${v.t}`:m}${S?"return ":""}`}`,h?`${b?";":""}${v?`${G}${v.base}`:""}`:`${F}${v?`${G}${v.base}`:m}}`],M=k?R=>Wr.test(R):R=>!Zr.has(R)&&Wr.test(R);return{_:m,cnst:E,getDirectReturnFunction:p,getDirectReturnIifeLeft:(R,S,{needsArrowReturnParens:v,needsWrappedFunction:b})=>{const[Y,K]=p(R,{functionReturn:!0,lineBreakIndent:null,name:null});return`${bJ(`${Y}${bJ(S,h&&v)}${K}`,h||b)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:r,getObject(R,{lineBreakIndent:S}){const v=S?`${G}${S.base}${S.t}`:m;return`{${R.map(([b,Y])=>{if(b===null)return`${v}${Y}`;const K=Xr(b);return b===Y&&N&&b===K?v+b:`${v}${K}:${m}${Y}`}).join(",")}${R.length===0?"":S?`${G}${S.base}`:m}}`},getPropertyAccess:R=>M(R)?`.${R}`:`[${JSON.stringify(R)}]`,n:G,s:F}}(this.outputOptions),s=function(c){const h=[];for(const w of c.values())w instanceof xe&&(w.isIncluded()||w.info.isEntry||w.includedDynamicImporters.length>0)&&h.push(w);return h}(this.graph.modulesById),a=function(c){if(c.length===0)return"/";if(c.length===1)return QQ(c[0]);const h=c.slice(1).reduce((w,N)=>{const k=N.split(/\/+|\\+/);let m;for(m=0;w[m]===k[m]&&m<Math.min(w.length,k.length);m++);return w.slice(0,m)},c[0].split(/\/+|\\+/));return h.length>1?h.join("/"):"/"}(function(c,h){const w=[];for(const N of c)(N.info.isEntry||h)&&$g(N.id)&&w.push(N.id);return w}(s,C)),n=function(c,h,w){const N=new Map;for(const k of c.values())k instanceof Fe&&N.set(k,new fQ(k,h,w));return N}(this.graph.modulesById,this.outputOptions,a),o=I?[{alias:null,modules:s}]:C?s.map(c=>({alias:null,modules:[c]})):s4(this.graph.entryModules,i,g,this.inputOptions.onLog),D=new Array(o.length),f=new Map;let d=0;for(const{alias:c,modules:h}of o){h.sort(n4);const w=new _I(h,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,f,n,this.facadeChunkByModule,this.includedNamespaces,c,t,A,a,B);D[d++]=w}for(const c of D)c.link();const l=[];for(const c of D)l.push(...c.generateFacades());return[...D,...l]}}function TJ(e,A,t){const g=t.get(A);if(typeof g=="string"&&g!==e)return BA((I=A.id,Q=e,C=g,{code:"INVALID_CHUNK",message:`Cannot assign "${FA(I)}" to the "${Q}" chunk as it is already in the "${C}" chunk.`}));var I,Q,C;t.set(A,e)}class u4 extends $R{constructor(){super(),this.parent=null,this.variables.set("undefined",new D0)}findVariable(A){let t=this.variables.get(A);return t||(t=new Fu(A),this.variables.set(A,t)),t}}const el=e=>()=>BA(function(A){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${A}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:_e("plugin-development/#a-simple-example")}}(e)),D4=el("fs.mkdir"),d4=el("fs.readFile"),p4=el("fs.writeFile");async function jJ(e,A,t,g,I,Q,C,i,B){const s=await function(a,n,o,D,f,d,l,c){let h=null,w=null;if(f){h=new Set;for(const N of f)a===N.source&&n===N.importer&&h.add(N.plugin);w=(N,k)=>({...N,resolve:(m,G,{attributes:F,custom:E,isEntry:r,skipSelf:u}=$e)=>(u??(u=!0),u&&f.findIndex(p=>p.plugin===k&&p.source===m&&p.importer===G)!==-1?Promise.resolve(null):D(m,G,E,r,F||At,u?[...f,{importer:G,plugin:k,source:m}]:f))})}return o.hookFirstAndGetPlugin("resolveId",[a,n,{attributes:c,custom:d,isEntry:l}],w,h)}(e,A,g,I,Q,C,i,B);return s==null?el("path.resolve")():s[0]}function OJ(e){return e.charCodeAt(0)===65279?OJ(e.slice(1)):e}const bD="at position ",qD="at output position ",w4={delete:()=>!1,get(){},has:()=>!1,set(){}};function tl(e){return e.startsWith(bD)||e.startsWith(qD)?BA({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):BA({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const ZJ=(e,A,t=y4)=>{const{onwarn:g,onLog:I}=e,Q=f4(t,g);if(I){const C=oQ[A];return(i,B)=>I(i,VJ(B),(s,a)=>{if(s==="error")return BA(Rg(a));oQ[s]>=C&&Q(s,Rg(a))})}return Q},f4=(e,A)=>A?(t,g)=>{t===JA?A(VJ(g),I=>e(JA,Rg(I))):e(t,g)}:e,VJ=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),Rg=e=>typeof e=="string"?{message:e}:typeof e=="function"?Rg(e()):e,y4=(e,{message:A})=>{switch(e){case JA:return console.warn(A);case Uo:return console.debug(A);default:return console.info(A)}};function WJ(e,A,t,g,I=/$./){const Q=new Set(A),C=Object.keys(e).filter(i=>!(Q.has(i)||I.test(i)));C.length>0&&g(JA,function(i,B,s){return{code:"UNKNOWN_OPTION",message:`Unknown ${i}: ${B.join(", ")}. Allowed options: ${s.join(", ")}`}}(t,C,[...Q].sort()))}const k4={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Je,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:Je,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Je,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},G4={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},m4={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},vD=(e,A,t,g,I)=>{const Q=e==null?void 0:e.preset;if(Q){const C=A[Q];if(C)return{...C,...e};BA(ve(`${t}.preset`,g,`valid values are ${tI(Object.keys(A))}`,Q))}return((C,i,B,s)=>a=>{if(typeof a=="string"){const n=C[a];if(n)return n;BA(ve(i,B,`valid values are ${s}${tI(Object.keys(C))}. You can also supply an object for more fine-grained control`,a))}return(n=>n&&typeof n=="object"?n:{})(a)})(A,t,g,I)(e)},gl=async e=>(await async function(A){do A=(await Promise.all(A)).flat(1/0);while(A.some(t=>t==null?void 0:t.then));return A}([e])).filter(Boolean);async function N4(e,A,t,g){const I=A.id,Q=[];let C=e.map===null?null:RC(e.map);const i=e.code;let B=e.ast;const s=[],a=[];let n=!1;const o=()=>n=!0;let D="",f=e.code;const d=c=>(h,w)=>{h=Rg(h),w&&_r(h,w,f,I),h.id=I,h.hook="transform",c(h)};let l;try{l=await t.hookReduceArg0("transform",[f,I],function(c,h,w){let N,k;if(typeof h=="string")N=h;else{if(!h||typeof h!="object")return c;if(A.updateOptions(h),h.code==null)return(h.map||h.ast)&&g(JA,function(m){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${m}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(w.name)),c;({code:N,map:k,ast:B}=h)}return k!==null&&Q.push(RC(typeof k=="string"?JSON.parse(k):k)||{missing:!0,plugin:w.name}),f=N,N},(c,h)=>{return D=h.name,{...c,addWatchFile(k){s.push(k),c.addWatchFile(k)},cache:n?c.cache:(w=c.cache,N=o,{delete:k=>(N(),w.delete(k)),get:k=>(N(),w.get(k)),has:k=>(N(),w.has(k)),set:(k,m)=>(N(),w.set(k,m))}),debug:d(c.debug),emitFile:k=>(a.push(k),t.emitFile(k)),error:(k,m)=>(typeof k=="string"&&(k={message:k}),m&&_r(k,m,f,I),k.id=I,k.hook="transform",c.error(k)),getCombinedSourcemap(){const k=function(m,G,F,E,r){return E.length===0?F:RC({version:3,...xJ(m,G,F,E,vJ(r)).traceMappings()})}(I,i,C,Q,g);return k?(C!==k&&(C=k,Q.length=0),new Ur({...k,file:null,sourcesContent:k.sourcesContent})):new IQ(i).generateMap({hires:!0,includeContent:!0,source:I})},info:d(c.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:d(c.warn)};var w,N})}catch(c){return BA(qo(c,D,{hook:"transform",id:I}))}return!n&&a.length>0&&(A.transformFiles=a),{ast:B,code:l,customTransformCache:n,originalCode:i,originalSourcemap:C,sourcemapChain:Q,transformDependencies:s}}const xD="resolveDependencies";class M4{constructor(A,t,g,I){this.graph=A,this.modulesById=t,this.options=g,this.pluginDriver=I,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(Q,C,i,B,s,a=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(Q,C,!1)&&await jJ(Q,C,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,a,i,typeof B=="boolean"?B:!C,s),C,Q),s),this.hasModuleSideEffects=g.treeshake?g.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(A,t){const g=this.extendLoadModulesPromise(Promise.all(A.map(I=>this.loadEntryModule(I,!1,void 0,null,t))));return await this.awaitLoadModulesPromise(),g}async addEntryModules(A,t){const g=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=A.length;const I=this.nextChunkNamePriority;this.nextChunkNamePriority+=A.length;const Q=await this.extendLoadModulesPromise(Promise.all(A.map(({id:C,importer:i})=>this.loadEntryModule(C,!0,i,null))).then(C=>{for(const[i,B]of C.entries()){B.isUserDefinedEntryPoint=B.isUserDefinedEntryPoint||t,zJ(B,A[i],t,I+i);const s=this.indexedEntryModules.find(a=>a.module===B);s?s.index=Math.min(s.index,g+i):this.indexedEntryModules.push({index:g+i,module:B})}return this.indexedEntryModules.sort(({index:i},{index:B})=>i>B?1:-1),C}));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map(({module:C})=>C),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:Q}}async emitChunk({fileName:A,id:t,importer:g,name:I,implicitlyLoadedAfterOneOf:Q,preserveSignature:C}){const i={fileName:A||null,id:t,importer:g,name:I||null},B=Q?await this.addEntryWithImplicitDependants(i,Q):(await this.addEntryModules([i],!1)).newEntryModules[0];return C!=null&&(B.preserveSignature=C),B}async preloadModule(A){return(await this.fetchModule(this.getResolvedIdWithDefaults(A,At),void 0,!1,!A.resolveDependencies||xD)).info}addEntryWithImplicitDependants(A,t){const g=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(A.id,!1,A.importer,null).then(async I=>{if(zJ(I,A,!1,g),!I.info.isEntry){const Q=await Promise.all(t.map(C=>this.loadEntryModule(C,!1,A.importer,I.id)));if(!I.info.isEntry){this.implicitEntryModules.add(I);for(const C of Q)I.implicitlyLoadedAfter.add(C);for(const C of I.implicitlyLoadedAfter)C.implicitlyLoadedBefore.add(I)}}return I}))}async addModuleSource(A,t,g){let I;try{I=await this.graph.fileOperationQueue.run(async()=>{const i=await this.pluginDriver.hookFirst("load",[A]);return i!==null?i:(this.graph.watchFiles[A]=!0,await d4(A,"utf8"))})}catch(i){let B=`Could not load ${A}`;throw t&&(B+=` (imported by ${FA(t)})`),B+=`: ${i.message}`,i.message=B,i}const Q=typeof I=="string"?{code:I}:I!=null&&typeof I=="object"&&typeof I.code=="string"?I:BA(function(i){return{code:"BAD_LOADER",message:`Error loading "${FA(i)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(A));Q.code=OJ(Q.code);const C=this.graph.cachedModules.get(A);if(!C||C.customTransformCache||C.originalCode!==Q.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:C.ast,code:C.code,id:C.id,meta:C.meta,moduleSideEffects:C.moduleSideEffects,resolvedSources:C.resolvedIds,syntheticNamedExports:C.syntheticNamedExports}]))g.updateOptions(Q),await g.setSource(await N4(Q,g,this.pluginDriver,this.options.onLog));else{if(C.transformFiles)for(const i of C.transformFiles)this.pluginDriver.emitFile(i);await g.setSource(C)}}async awaitLoadModulesPromise(){let A;do A=this.latestLoadModulesPromise,await A;while(A!==this.latestLoadModulesPromise)}extendLoadModulesPromise(A){return this.latestLoadModulesPromise=Promise.all([A,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch(()=>{}),A}async fetchDynamicDependencies(A,t){const g=await Promise.all(t.map(I=>I.then(async([Q,C])=>C===null?null:typeof C=="string"?(Q.resolution=C,null):Q.resolution=await this.fetchResolvedDependency(FA(C.id),A.id,C))));for(const I of g)I&&(A.dynamicDependencies.add(I),I.dynamicImporters.push(A.id))}async fetchModule({attributes:A,id:t,meta:g,moduleSideEffects:I,syntheticNamedExports:Q},C,i,B){const s=this.modulesById.get(t);if(s instanceof xe)return C&&Wc(A,s.info.attributes)&&this.options.onLog(JA,Pr(s.info.attributes,A,t,C)),await this.handleExistingModule(s,i,B),s;if(s instanceof Fe)return BA({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${s.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const a=new xe(this.graph,t,this.options,i,I,Q,g,A);this.modulesById.set(t,a);const n=this.addModuleSource(t,C,a).then(()=>[this.getResolveStaticDependencyPromises(a),this.getResolveDynamicImportPromises(a),o]),o=$J(n).then(()=>this.pluginDriver.hookParallel("moduleParsed",[a.info]));o.catch(()=>{}),this.moduleLoadPromises.set(a,n);const D=await n;return B?B===xD&&await o:await this.fetchModuleDependencies(a,...D),a}async fetchModuleDependencies(A,t,g,I){this.modulesWithLoadedDependencies.has(A)||(this.modulesWithLoadedDependencies.add(A),await Promise.all([this.fetchStaticDependencies(A,t),this.fetchDynamicDependencies(A,g)]),A.linkImports(),await I)}fetchResolvedDependency(A,t,g){if(g.external){const{attributes:I,external:Q,id:C,moduleSideEffects:i,meta:B}=g;let s=this.modulesById.get(C);if(s){if(!(s instanceof Fe))return BA(function(a,n){return{code:"INVALID_EXTERNAL_ID",message:`"${a}" is imported as an external by "${FA(n)}", but is already an existing non-external module id.`}}(A,t));Wc(s.info.attributes,I)&&this.options.onLog(JA,Pr(s.info.attributes,I,A,t))}else s=new Fe(this.options,C,i,B,Q!=="absolute"&&$g(C),I),this.modulesById.set(C,s);return Promise.resolve(s)}return this.fetchModule(g,t,!1,!1)}async fetchStaticDependencies(A,t){for(const g of await Promise.all(t.map(I=>I.then(([Q,C])=>this.fetchResolvedDependency(Q,A.id,C)))))A.dependencies.add(g),g.importers.push(A.id);if(!this.options.treeshake||A.info.moduleSideEffects==="no-treeshake")for(const g of A.dependencies)g instanceof xe&&(g.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(A,t,g){const{makeAbsoluteExternalsRelative:I}=this.options;if(A){if(typeof A=="object"){const i=A.external||this.options.external(A.id,t,!0);return{...A,external:i&&(i==="relative"||!$g(A.id)||i===!0&&HD(A.id,g,I)||"absolute")}}const C=this.options.external(A,t,!0);return{external:C&&(HD(A,g,I)||"absolute"),id:C&&I?XJ(A,t):A}}const Q=I?XJ(g,t):g;return A===!1||this.options.external(Q,t,!0)?{external:HD(Q,g,I)||"absolute",id:Q}:null}getResolveDynamicImportPromises(A){return A.dynamicImports.map(async t=>{const g=await this.resolveDynamicImport(A,t.argument,A.id,uJ(t.node));return g&&typeof g=="object"&&(t.id=g.id),[t,g]})}getResolveStaticDependencyPromises(A){return Array.from(A.sourcesWithAttributes,async([t,g])=>[t,A.resolvedIds[t]=A.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,A.id,At,!1,g),t,A.id,g)])}getResolvedIdWithDefaults(A,t){if(!A)return null;const g=A.external||!1;return{attributes:A.attributes||t,external:g,id:A.id,meta:A.meta||{},moduleSideEffects:A.moduleSideEffects??this.hasModuleSideEffects(A.id,!!g),resolvedBy:A.resolvedBy??"rollup",syntheticNamedExports:A.syntheticNamedExports??!1}}async handleExistingModule(A,t,g){const I=this.moduleLoadPromises.get(A);if(g)return g===xD?$J(I):I;if(t){A.info.isEntry=!0,this.implicitEntryModules.delete(A);for(const Q of A.implicitlyLoadedAfter)Q.implicitlyLoadedBefore.delete(A);A.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(A,...await I)}handleInvalidResolvedId(A,t,g,I){return A===null?tu(t)?BA(function(Q,C){return{code:fR,exporter:Q,id:C,message:`Could not resolve "${Q}" from "${FA(C)}"`}}(t,g)):(this.options.onLog(JA,function(Q,C){return{code:fR,exporter:Q,id:C,message:`"${Q}" is imported by "${FA(C)}", but could not be resolved – treating it as an external dependency.`,url:_e("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,g)),{attributes:I,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(A.external&&A.syntheticNamedExports&&this.options.onLog(JA,function(Q,C){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:Q,message:`External "${Q}" cannot have "syntheticNamedExports" enabled (imported by "${FA(C)}").`}}(t,g)),A)}async loadEntryModule(A,t,g,I,Q=!1){const C=await jJ(A,g,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,At,!0,At);if(C==null)return BA(I===null?function(B){return{code:wR,message:`Could not resolve entry module "${FA(B)}".`}}(A):function(B,s){return{code:hu,message:`Module "${FA(B)}" that should be implicitly loaded before "${FA(s)}" could not be resolved.`}}(A,I));const i=typeof C=="object"&&C.external;return C===!1||i?BA(I===null?i&&Q?{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${A}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}:function(B){return{code:wR,message:`Entry module "${FA(B)}" cannot be external.`}}(A):function(B,s){return{code:hu,message:`Module "${FA(B)}" that should be implicitly loaded before "${FA(s)}" cannot be external.`}}(A,I)):this.fetchModule(this.getResolvedIdWithDefaults(typeof C=="object"?C:{id:C},At),void 0,t,!1)}async resolveDynamicImport(A,t,g,I){const Q=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,g,{attributes:I}]);if(typeof t!="string")return typeof Q=="string"?Q:Q?this.getResolvedIdWithDefaults(Q,I):null;if(Q==null){const C=A.resolvedIds[t];return C?(Wc(C.attributes,I)&&this.options.onLog(JA,Pr(C.attributes,I,t,g)),C):A.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,A.id,At,!1,I),t,A.id,I)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(Q,g,t),I),t,g,I)}}function XJ(e,A){return tu(e)?A?Ht(A,"..",e):Ht(e):e}function zJ(e,{fileName:A,name:t},g,I){var Q;if(A!==null)e.chunkFileNames.add(A);else if(t!==null){let C=0;for(;((Q=e.chunkNames[C])==null?void 0:Q.priority)<I;)C++;e.chunkNames.splice(C,0,{isUserDefined:g,name:t,priority:I})}}function HD(e,A,t){return t===!0||t==="ifRelativeSource"&&tu(A)||!$g(e)}async function $J(e){const[A,t]=await e;return Promise.all([...A,...t])}function AF(e,A,t,g,I,Q,C,i,B){const s=C.sanitizeFileName(e||"asset");return SD(FD(typeof C.assetFileNames=="function"?C.assetFileNames({get name(){return nQ('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',rC,!1,B),e},names:A,get originalFileName(){return nQ('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',rC,!1,B),g},originalFileNames:I,source:t,type:"asset"}):C.assetFileNames,"output.assetFileNames",{ext:()=>YI(s).slice(1),extname:()=>YI(s),hash:a=>Q.slice(0,Math.min(Math.max(0,a||8),21)),name:()=>s.slice(0,Math.max(0,s.length-YI(s).length))}),i)}function eF(e,{bundle:A},t){A[zc].has(e.toLowerCase())?t(JA,function(g){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${g}" overwrites a previously emitted file of the same name.`}}(e)):A[e]=JD}const R4=new Set(["chunk","asset","prebuilt-chunk"]);function tF(e,A,t){if(!(typeof e=="string"||e instanceof Uint8Array)){const g=A.fileName||A.name||t;return BA(dt(`Could not set source for ${typeof g=="string"?`asset "${g}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class J4{constructor(A,t,g){this.graph=A,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=I=>function(Q){return!!(Q&&R4.has(Q.type))}(I)?I.type==="prebuilt-chunk"?this.emitPrebuiltChunk(I):function(Q){const C=Q.fileName||Q.name;return!C||typeof C=="string"&&!Hr(C)}(I)?I.type==="chunk"?this.emitChunk(I):this.emitAsset(I):BA(dt(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${I.fileName||I.name}".`)):BA(dt(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${I&&I.type}".`)),this.finaliseAssets=()=>{for(const[I,Q]of this.filesByReferenceId)if(Q.type==="asset"&&typeof Q.fileName!="string")return BA({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${Q.name||I}" - no asset source set.`})},this.getFileName=I=>{const Q=this.filesByReferenceId.get(I);return Q?Q.type==="chunk"?(C=Q,i=this.facadeChunkByModule,C.fileName?C.fileName:i?i.get(C.module).getFileName():BA({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${C.fileName||C.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):Q.type==="prebuilt-chunk"?Q.fileName:function(B,s){return typeof B.fileName!="string"?BA({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${B.name||s}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_<referenceId>, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`}):B.fileName}(Q,I):BA({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${I}".`});var C,i},this.setAssetSource=(I,Q)=>{const C=this.filesByReferenceId.get(I);if(!C)return BA({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${I}".`});if(C.type!=="asset")return BA(dt(`Asset sources can only be set for emitted assets but "${I}" is an emitted chunk.`));if(C.source!==void 0)return BA({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${C.name||I}", source already set.`});const i=tF(Q,C,I);if(this.output)this.finalizeAdditionalAsset(C,i,this.output);else{C.source=i;for(const B of this.outputFileEmitters)B.finalizeAdditionalAsset(C,i,B.output)}},this.setChunkInformation=I=>{this.facadeChunkByModule=I},this.setOutputBundle=(I,Q)=>{const C=YD[Q.hashCharacters],i=this.output={bundle:I,fileNamesBySourceHash:new Map,getHash:C,outputOptions:Q};for(const s of this.filesByReferenceId.values())s.fileName&&eF(s.fileName,i,this.options.onLog);const B=new Map;for(const s of this.filesByReferenceId.values())s.type==="asset"&&s.source!==void 0?s.fileName?this.finalizeAdditionalAsset(s,s.source,i):rt(B,C(s.source),()=>[]).push(s):s.type==="prebuilt-chunk"&&(this.output.bundle[s.fileName]=this.createPrebuiltChunk(s));for(const[s,a]of B)this.finalizeAssetsWithSameSource(a,s,i)},this.filesByReferenceId=g?new Map(g.filesByReferenceId):new Map,g==null||g.addOutputFileEmitter(this)}addOutputFileEmitter(A){this.outputFileEmitters.push(A)}assignReferenceId(A,t){let g=t;do g=KJ(g).slice(0,8).replaceAll("-","$");while(this.filesByReferenceId.has(g)||this.outputFileEmitters.some(({filesByReferenceId:I})=>I.has(g)));A.referenceId=g,this.filesByReferenceId.set(g,A);for(const{filesByReferenceId:I}of this.outputFileEmitters)I.set(g,A);return g}createPrebuiltChunk(A){return{code:A.code,dynamicImports:[],exports:A.exports||[],facadeModuleId:null,fileName:A.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:A.map||null,moduleIds:[],modules:{},name:A.fileName,preliminaryFileName:A.fileName,referencedFiles:[],sourcemapFileName:A.sourcemapFileName||null,type:"chunk"}}emitAsset(A){const t=A.source===void 0?void 0:tF(A.source,A,null),g=A.originalFileName||null;typeof g=="string"&&(this.graph.watchFiles[g]=!0);const I={fileName:A.fileName,name:A.name,needsCodeReference:!!A.needsCodeReference,originalFileName:g,referenceId:"",source:t,type:"asset"},Q=this.assignReferenceId(I,A.fileName||A.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(I,this.output);else for(const C of this.outputFileEmitters)C.emitAssetWithReferenceId(I,C.output);return Q}emitAssetWithReferenceId(A,t){const{fileName:g,source:I}=A;g&&eF(g,t,this.options.onLog),I!==void 0&&this.finalizeAdditionalAsset(A,I,t)}emitChunk(A){if(this.graph.phase>mQ.LOAD_AND_PARSE)return BA({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if(typeof A.id!="string")return BA(dt(`Emitted chunks need to have a valid string id, received "${A.id}"`));const t={fileName:A.fileName,module:null,name:A.name||A.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(A).then(g=>t.module=g).catch(()=>{}),this.assignReferenceId(t,A.id)}emitPrebuiltChunk(A){if(typeof A.code!="string")return BA(dt(`Emitted prebuilt chunks need to have a valid string code, received "${A.code}".`));if(typeof A.fileName!="string"||Hr(A.fileName))return BA(dt(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${A.fileName}".`));const t={code:A.code,exports:A.exports,fileName:A.fileName,map:A.map,referenceId:"",type:"prebuilt-chunk"},g=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),g}finalizeAdditionalAsset(A,t,{bundle:g,fileNamesBySourceHash:I,getHash:Q,outputOptions:C}){let{fileName:i,name:B,needsCodeReference:s,originalFileName:a,referenceId:n}=A;if(!i){const f=Q(t);i=I.get(f),i||(i=AF(B,B?[B]:[],t,a,a?[a]:[],f,C,g,this.options),I.set(f,i))}const o={...A,fileName:i,source:t};this.filesByReferenceId.set(n,o);const D=g[i];if((D==null?void 0:D.type)==="asset")D.needsCodeReference&&(D.needsCodeReference=s),B&&D.names.push(B),a&&D.originalFileNames.push(a);else{const{options:f}=this;g[i]={fileName:i,get name(){return nQ('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',rC,!1,f),B},names:B?[B]:[],needsCodeReference:s,get originalFileName(){return nQ('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',rC,!1,f),a},originalFileNames:a?[a]:[],source:t,type:"asset"}}}finalizeAssetsWithSameSource(A,t,{bundle:g,fileNamesBySourceHash:I,outputOptions:Q}){const{names:C,originalFileNames:i}=function(o){const D=[],f=[];for(const{name:d,originalFileName:l}of o)typeof d=="string"&&D.push(d),l&&f.push(l);return f.sort(),D.sort((d,l)=>d.length-l.length||(d>l?1:d===l?0:-1)),{names:D,originalFileNames:f}}(A);let B,s="",a=!0;for(const o of A){a&&(a=o.needsCodeReference);const D=AF(o.name,C,o.source,o.originalFileName,i,t,Q,g,this.options);(!s||D.length<s.length||D.length===s.length&&D<s)&&(s=D,B=o)}I.set(t,s);for(const o of A){const D={...o,fileName:s};this.filesByReferenceId.set(o.referenceId,D)}const{options:n}=this;g[s]={fileName:s,get name(){return nQ('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',rC,!1,n),B.name},names:C,needsCodeReference:a,get originalFileName(){return nQ('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',rC,!1,n),B.originalFileName},originalFileNames:i,source:B.source,type:"asset"}}}function JC(e,A,t,g,I){return oQ[e]<oQ[I]?eg:(Q,C)=>{C!=null&&t(JA,{code:"INVALID_LOG_POSITION",message:`Plugin "${g}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(Q=Rg(Q)).code&&!Q.pluginCode&&(Q.pluginCode=Q.code),Q.code=A,Q.plugin=g,t(e,Q)}}function F4(e,A,t,g,I,Q){const{logLevel:C,onLog:i}=g;let B,s=!0;if(typeof e.cacheKey!="string"&&(e.name.startsWith(bD)||e.name.startsWith(qD)||Q.has(e.name)?s=!1:Q.add(e.name)),A)if(s){const o=e.cacheKey||e.name;n=A[o]||(A[o]=Object.create(null)),B={delete:D=>delete n[D],get(D){const f=n[D];if(f)return f[0]=0,f[1]},has(D){const f=n[D];return!!f&&(f[0]=0,!0)},set(D,f){n[D]=[0,f]}}}else a=e.name,B={delete:()=>tl(a),get:()=>tl(a),has:()=>tl(a),set:()=>tl(a)};else B=w4;var a,n;return{addWatchFile(o){t.watchFiles[o]=!0},cache:B,debug:JC(Uo,"PLUGIN_LOG",i,e.name,C),emitFile:I.emitFile.bind(I),error:o=>BA(qo(Rg(o),e.name)),getFileName:I.getFileName,getModuleIds:()=>t.modulesById.keys(),getModuleInfo:t.getModuleInfo,getWatchFiles:()=>Object.keys(t.watchFiles),info:JC(aQ,"PLUGIN_LOG",i,e.name,C),load:o=>t.moduleLoader.preloadModule(o),meta:{rollupVersion:$h,watchMode:t.watchMode},parse:kD,resolve:(o,D,{attributes:f,custom:d,isEntry:l,skipSelf:c}=$e)=>(c??(c=!0),t.moduleLoader.resolveId(o,D,d,l,f||At,c?[{importer:D,plugin:e,source:o}]:null)),setAssetSource:I.setAssetSource,warn:JC(JA,"PLUGIN_WARNING",i,e.name,C)}}function KD(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function gF(e){if(e instanceof RegExp)return I=>{const Q=AI(I),C=e.test(Q);return e.lastIndex=0,C};const A=process.cwd(),t=function(I,Q){return I.startsWith("**")||$g(I)?AI(I):AI(Ht(Q,I))}(e,A),g=JO(t,{dot:!0});return I=>{const Q=AI(I);return g(Q)}}function IF(e){return e instanceof RegExp?A=>{const t=e.test(A);return e.lastIndex=0,t}:A=>A.includes(e)}function QF(e,A){if(e||A)return t=>!(e!=null&&e.some(g=>g(t)))&&(!!(A!=null&&A.some(g=>g(t)))||!(A&&A.length>0))}function CF(e){return typeof e=="string"||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?KD(e.exclude):void 0,include:e.include?KD(e.include):void 0}}function iF(e){if(!e)return;const{exclude:A,include:t}=CF(e),g=A==null?void 0:A.map(gF),I=t==null?void 0:t.map(gF);return QF(g,I)}function S4(e,A){if(!e&&!A)return;const t=iF(e),g=function(I){if(!I)return;const{exclude:Q,include:C}=CF(I),i=Q==null?void 0:Q.map(IF),B=C==null?void 0:C.map(IF);return QF(i,B)}(A);return(I,Q)=>{let C=!0;return t&&C&&(C=t(I)),!!C&&(g&&C&&(C=g(Q)),C)}}const L4=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class _D{constructor(A,t,g,I,Q){this.graph=A,this.options=t,this.pluginCache=I,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new J4(A,t,Q&&Q.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...Q?Q.plugins:[],...g];const C=new Set;if(this.pluginContexts=new Map(this.plugins.map(B=>[B,F4(B,I,A,t,this.fileEmitter,C)])),Q)for(const B of g)for(const s of L4)s in B&&t.onLog(JA,(i=B.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${s}" hook used by the output plugin ${i} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var i}createOutputPluginDriver(A){return new _D(this.graph,this.options,A,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(A,t,g,I){return this.hookFirstAndGetPlugin(A,t,g,I).then(Q=>Q&&Q[0])}async hookFirstAndGetPlugin(A,t,g,I){for(const Q of this.getSortedPlugins(A)){if(I!=null&&I.has(Q))continue;const C=await this.runHook(A,t,Q,g);if(C!=null)return[C,Q]}return null}hookFirstSync(A,t,g){for(const I of this.getSortedPlugins(A)){const Q=this.runHookSync(A,t,I,g);if(Q!=null)return Q}return null}async hookParallel(A,t,g){const I=[];for(const Q of this.getSortedPlugins(A))Q[A].sequential?(await Promise.all(I),I.length=0,await this.runHook(A,t,Q,g)):I.push(this.runHook(A,t,Q,g));await Promise.all(I)}hookReduceArg0(A,[t,...g],I,Q){let C=Promise.resolve(t);for(const i of this.getSortedPlugins(A))C=C.then(B=>this.runHook(A,[B,...g],i,Q).then(s=>I.call(this.pluginContexts.get(i),B,s,i)));return C}hookReduceArg0Sync(A,[t,...g],I,Q){for(const C of this.getSortedPlugins(A)){const i=[t,...g],B=this.runHookSync(A,i,C,Q);t=I.call(this.pluginContexts.get(C),t,B,C)}return t}async hookReduceValue(A,t,g,I){const Q=[],C=[];for(const i of this.getSortedPlugins(A,U4))i[A].sequential?(Q.push(...await Promise.all(C)),C.length=0,Q.push(await this.runHook(A,g,i))):C.push(this.runHook(A,g,i));return Q.push(...await Promise.all(C)),Q.reduce(I,await t)}hookReduceValueSync(A,t,g,I,Q){let C=t;for(const i of this.getSortedPlugins(A)){const B=this.runHookSync(A,g,i,Q);C=I.call(this.pluginContexts.get(i),C,B,i)}return C}hookSeq(A,t,g){let I=Promise.resolve();for(const Q of this.getSortedPlugins(A))I=I.then(()=>this.runHook(A,t,Q,g));return I.then(b4)}getSortedPlugins(A,t){return rt(this.sortedPlugins,A,()=>PD(A,this.plugins,t))}runHook(A,t,g,I){const Q=g[A],C=typeof Q=="object"?Q.handler:Q;if(typeof Q=="object"&&"filter"in Q&&Q.filter){if(A==="transform"){const s=Q.filter,a=t,n=rt(this.compiledPluginFilters.transformFilter,s,()=>S4(s.id,s.code));if(n&&!n(a[1],a[0]))return Promise.resolve()}else if(A==="resolveId"||A==="load"){const s=Q.filter,a=t,n=rt(this.compiledPluginFilters.idOnlyFilter,s,()=>function(o){const D=iF(o);return D?f=>!!D(f):void 0}(s.id));if(n&&!n(a[0]))return Promise.resolve()}}let i=this.pluginContexts.get(g);I&&(i=I(i,g));let B=null;return Promise.resolve().then(()=>{if(typeof C!="function")return C;const s=C.apply(i,t);return s!=null&&s.then?(B=[g.name,A,t],this.unfulfilledActions.add(B),Promise.resolve(s).then(a=>(this.unfulfilledActions.delete(B),a))):s}).catch(s=>(B!==null&&this.unfulfilledActions.delete(B),BA(qo(s,g.name,{hook:A}))))}runHookSync(A,t,g,I){const Q=g[A],C=typeof Q=="object"?Q.handler:Q;let i=this.pluginContexts.get(g);I&&(i=I(i,g));try{return C.apply(i,t)}catch(B){return BA(qo(B,g.name,{hook:A}))}}}function PD(e,A,t=Y4){const g=[],I=[],Q=[];for(const C of A){const i=C[e];if(i){if(typeof i=="object"){if(t(i.handler,e,C),i.order==="pre"){g.push(C);continue}if(i.order==="post"){Q.push(C);continue}}else t(i,e,C);I.push(C)}}return[...g,...I,...Q]}function Y4(e,A,t){typeof e!="function"&&BA(function(g,I){return{code:lR,hook:g,message:`Error running plugin hook "${g}" for plugin "${I}", expected a function hook or an object with a "handler" function.`,plugin:I}}(A,t.name))}function U4(e,A,t){if(typeof e!="string"&&typeof e!="function")return BA(function(g,I){return{code:lR,hook:g,message:`Error running plugin hook "${g}" for plugin "${I}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:I}}(A,t.name))}function b4(){}class q4{constructor(A){this.maxParallel=A,this.queue=[],this.workerCount=0}run(A){return new Promise((t,g)=>{this.queue.push({reject:g,resolve:t,task:A}),this.work()})}async work(){if(this.workerCount>=this.maxParallel)return;let A;for(this.workerCount++;A=this.queue.shift();){const{reject:t,resolve:g,task:I}=A;try{g(await I())}catch(Q){t(Q)}}this.workerCount--}}class v4{constructor(A,t){var g,I;if(this.options=A,this.astLru=function(Q){var C,i,B,s=Q;function a(o,D){++C>s&&(B=i,n(1),++C),i[o]=D}function n(o){C=0,i=Object.create(null),o||(B=Object.create(null))}return n(),{clear:n,has:function(o){return i[o]!==void 0||B[o]!==void 0},get:function(o){var D=i[o];return D!==void 0?D:(D=B[o])!==void 0?(a(o,D),D):void 0},set:function(o,D){i[o]!==void 0?i[o]=D:a(o,D)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new nC,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=mQ.LOAD_AND_PARSE,this.scope=new u4,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=Q=>{const C=this.modulesById.get(Q);return C?C.info:null},A.cache!==!1){if((g=A.cache)!=null&&g.modules)for(const Q of A.cache.modules)this.cachedModules.set(Q.id,Q);this.pluginCache=((I=A.cache)==null?void 0:I.plugins)||Object.create(null);for(const Q in this.pluginCache){const C=this.pluginCache[Q];for(const i of Object.values(C))i[0]++}}if(t){this.watchMode=!0;const Q=(...i)=>this.pluginDriver.hookParallel("watchChange",i),C=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",Q),t.onCurrentRun("close",C)}this.pluginDriver=new _D(this,A,A.plugins,this.pluginCache),this.moduleLoader=new M4(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new q4(A.maxParallelFileOps),this.pureFunctions=(({treeshake:Q})=>{const C=Object.create(null);for(const i of Q?Q.manualPureFunctions:[]){let B=C;for(const s of i.split("."))B=B[s]||(B[s]=Object.create(null));B[Du]=!0}return C})(A)}async build(){je("generate module graph",2),await this.generateModuleGraph(),Pe("generate module graph",2),je("sort and bind modules",2),this.phase=mQ.ANALYSE,this.sortModules(),Pe("sort and bind modules",2),je("mark included statements",2),this.includeStatements(),Pe("mark included statements",2),this.phase=mQ.GENERATE}getCache(){for(const A in this.pluginCache){const t=this.pluginCache[A];let g=!0;for(const[I,Q]of Object.entries(t))Q[0]>=this.options.experimentalCacheExpiry?delete t[I]:g=!1;g&&delete this.pluginCache[A]}return{modules:this.modules.map(A=>A.toJSON()),plugins:this.pluginCache}}async generateModuleGraph(){var A;if({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((A=this.options.input,Array.isArray(A)?A.map(t=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:null})):Object.entries(A).map(([t,g])=>({fileName:null,id:g,implicitlyLoadedAfter:[],importer:void 0,name:t}))),!0),this.entryModules.length===0)throw new Error("You must supply options.input to rollup");for(const t of this.modulesById.values())t.cacheInfoGetters(),t instanceof xe?this.modules.push(t):this.externalModules.push(t)}includeStatements(){const A=[...this.entryModules,...this.implicitEntryModules];for(const t of A)uC(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{je(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const g of this.modules)if(g.isExecuted){g.hasTreeShakingPassStarted=!0,g.info.moduleSideEffects==="no-treeshake"?g.includeAllInBundle():g.include();for(const I of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(I),I.include(Ag(),!1)}if(t===1)for(const g of A)g.preserveSignature!==!1&&(g.includeAllExports(!1),this.needsTreeshakingPass=!0);Pe("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const t of this.modules)t.includeAllInBundle();for(const t of this.externalModules)t.warnUnusedImports();for(const t of this.implicitEntryModules)for(const g of t.implicitlyLoadedAfter)g.info.isEntry||g.isIncluded()||BA(b3(g))}sortModules(){const{orderedModules:A,cyclePaths:t}=r4(this.entryModules);for(const g of t)this.options.onLog(JA,L3(g));this.modules=A;for(const g of this.modules)g.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const A of this.modules)for(const t of A.importDescriptions.values())t.name==="*"||t.module.getVariableForExportName(t.name)[0]||A.log(JA,Tr(t.name,A.id,t.module.id),t.start)}}function BF(e,A){return A()}function sF(e,A,t,g){e=PD("onLog",e);const I=oQ[g],Q=(C,i,B=XM)=>{if(nR(i),!(oQ[C]<I)){for(const s of e){if(B.has(s))continue;const{onLog:a}=s,n=o=>oQ[o]<I?eg:D=>Q(o,Rg(D),new Set(B).add(s));if(("handler"in a?a.handler:a).call({debug:n(Uo),error:o=>BA(Rg(o)),info:n(aQ),meta:{rollupVersion:$h,watchMode:t},warn:n(JA)},C,i)===!1)return}A(C,i)}};return Q}const x4=e=>{var A;return e.cache===!0?void 0:((A=e.cache)==null?void 0:A.cache)||e.cache},H4=e=>{if(e===!0)return()=>!0;if(typeof e=="function")return(A,...t)=>!A.startsWith("\0")&&e(A,...t)||!1;if(e){const A=new Set,t=[];for(const g of KD(e))g instanceof RegExp?t.push(g):A.add(g);return(g,...I)=>A.has(g)||t.some(Q=>Q.test(g))}return()=>!1},K4=e=>{const A=e.input;return A==null?[]:typeof A=="string"?[A]:A},_4=e=>{const A=e.jsx;if(!A)return!1;const t=vD(A,G4,"jsx",Kr,"false, "),{factory:g,importSource:I,mode:Q}=t;switch(Q){case"automatic":return{factory:g||"React.createElement",importSource:I||"react",jsxImportSource:t.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!I||g||t.fragment||BA(ve("jsx",Kr,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:g||null,fragment:t.fragment||null,importSource:I||null,mode:"preserve"};default:return Q&&Q!=="classic"&&BA(ve("jsx.mode",Kr,'mode must be "automatic", "classic" or "preserve"',Q)),{factory:g||"React.createElement",fragment:t.fragment||"React.Fragment",importSource:I||null,mode:"classic"}}},P4=e=>{const A=e.maxParallelFileOps;return typeof A=="number"?A<=0?1/0:A:20},T4=(e,A)=>{const t=e.moduleContext;if(typeof t=="function")return g=>t(g)??A;if(t){const g=Object.create(null);for(const[I,Q]of Object.entries(t))g[Ht(I)]=Q;return I=>g[I]??A}return()=>A},j4=e=>{if(e.treeshake===!1)return!1;const A=vD(e.treeshake,k4,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:A.annotations!==!1,correctVarValueBeforeDeclaration:A.correctVarValueBeforeDeclaration===!0,manualPureFunctions:A.manualPureFunctions??Je,moduleSideEffects:O4(A.moduleSideEffects),propertyReadSideEffects:A.propertyReadSideEffects==="always"?"always":A.propertyReadSideEffects!==!1,tryCatchDeoptimization:A.tryCatchDeoptimization!==!1,unknownGlobalSideEffects:A.unknownGlobalSideEffects!==!1}},O4=e=>{if(typeof e=="boolean")return()=>e;if(e==="no-external")return(A,t)=>!t;if(typeof e=="function")return(A,t)=>!!A.startsWith("\0")||e(A,t)!==!1;if(Array.isArray(e)){const A=new Set(e);return t=>A.has(t)}return e&&BA(ve("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Z4=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,V4=/^[a-z]:/i;function W4(e){const A=V4.exec(e),t=A?A[0]:"";return t+e.slice(t.length).replace(Z4,"_")}const X4=(e,A,t)=>{const{file:g}=e;if(typeof g=="string"){if(A)return BA(ve("output.file",bo,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(t.input))return BA(ve("output.file",bo,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return g},z4=e=>{const A=e.format;switch(A){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return A;default:return BA(ve("output.format",BR,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',A))}},$4=(e,A)=>{const t=e.inlineDynamicImports||!1,{input:g}=A;return t&&(Array.isArray(g)?g:Object.keys(g)).length>1?BA(ve("output.inlineDynamicImports",sR,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):t},AZ=(e,A,t)=>{const g=e.preserveModules||!1;if(g){if(A)return BA(ve("output.inlineDynamicImports",sR,'this option is not supported for "output.preserveModules"'));if(t.preserveEntrySignatures===!1)return BA(ve("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return g},eZ=e=>{const{preserveModulesRoot:A}=e;if(A!=null)return Ht(A)},tZ=e=>{const A={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(A.autoId||A.basePath)&&A.id?BA(ve("output.amd.id",iR,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):A.basePath&&!A.autoId?BA(ve("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):A.autoId?{autoId:!0,basePath:A.basePath,define:A.define,forceJsExtensionForImports:A.forceJsExtensionForImports}:{autoId:!1,define:A.define,forceJsExtensionForImports:A.forceJsExtensionForImports,id:A.id}},Il=(e,A)=>{const t=e[A];return typeof t=="function"?t:()=>t||""},gZ=(e,A)=>{const{dir:t}=e;return typeof t=="string"&&typeof A=="string"?BA(ve("output.dir",bo,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):t},IZ=(e,A)=>{const t=e.entryFileNames;return t==null&&A.add("entryFileNames"),t??"[name].js"};function QZ(e,A){const t=e.exports;if(t==null)A.add("exports");else if(!["default","named","none","auto"].includes(t))return BA({code:rR,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${t}".`,url:_e(cu)});return t||"auto"}const CZ=(e,A)=>(e.externalImportAssertions!=null&&nQ('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,A),e.externalImportAttributes??e.externalImportAssertions??!0),iZ=e=>{const A=vD(e.generatedCode,m4,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:A.arrowFunctions===!0,constBindings:A.constBindings===!0,objectShorthand:A.objectShorthand===!0,reservedNamesAsProps:A.reservedNamesAsProps!==!1,symbols:A.symbols===!0}},BZ=(e,A)=>{if(A)return"";const t=e.indent;return t===!1?"":t??!0},EF=new Set(["compat","auto","esModule","default","defaultOnly"]),sZ=e=>{const A=e.interop;if(typeof A=="function"){const t=Object.create(null);let g=null;return I=>I===null?g||TD(g=A(I)):I in t?t[I]:TD(t[I]=A(I))}return A===void 0?()=>"default":()=>TD(A)},TD=e=>EF.has(e)?e:BA(ve("output.interop",lu,`use one of ${Array.from(EF,A=>JSON.stringify(A)).join(", ")}`,e)),EZ=(e,A,t)=>{const g=e.manualChunks;if(g){if(A)return BA(ve("output.manualChunks",ER,'this option is not supported for "output.inlineDynamicImports"'));if(t)return BA(ve("output.manualChunks",ER,'this option is not supported for "output.preserveModules"'))}return g||{}},aZ=(e,A,t)=>e.minifyInternalExports??(t||A==="es"||A==="system"),oZ=(e,A)=>{const t=e.sourcemapFileNames;return t==null&&A.add("sourcemapFileNames"),t},nZ=e=>{const{sourcemapBaseUrl:A}=e;if(A)return function(g){try{new URL(g)}catch{return!1}return!0}(A)?(t=A).endsWith("/")?t:t+"/":BA(ve("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(A)}`));var t};function rZ(e){return async function(A,t){const{options:g,unsetOptions:I}=await async function(B,s){if(!B)throw new Error("You must supply an options object to rollup");const a=await async function(D,f){const d=PD("options",await gl(D.plugins)),l=D.logLevel||aQ,c=sF(d,ZJ(D,l),f,l);for(const h of d){const{name:w,options:N}=h,k="handler"in N?N.handler:N,m=await k.call({debug:JC(Uo,"PLUGIN_LOG",c,w,l),error:G=>BA(qo(Rg(G),w,{hook:"onLog"})),info:JC(aQ,"PLUGIN_LOG",c,w,l),meta:{rollupVersion:$h,watchMode:f},warn:JC(JA,"PLUGIN_WARNING",c,w,l)},D);m&&(D=m)}return D}(B,s),{options:n,unsetOptions:o}=await async function(D,f){const d=new Set,l=D.context??"undefined",c=await gl(D.plugins),h=D.logLevel||aQ,w=sF(c,ZJ(D,h),f,h),N=D.strictDeprecations||!1,k=P4(D),m={cache:x4(D),context:l,experimentalCacheExpiry:D.experimentalCacheExpiry??10,experimentalLogSideEffects:D.experimentalLogSideEffects||!1,external:H4(D.external),input:K4(D),jsx:_4(D),logLevel:h,makeAbsoluteExternalsRelative:D.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:k,moduleContext:T4(D,l),onLog:w,perf:D.perf||!1,plugins:c,preserveEntrySignatures:D.preserveEntrySignatures??"exports-only",preserveSymlinks:D.preserveSymlinks||!1,shimMissingExports:D.shimMissingExports||!1,strictDeprecations:N,treeshake:j4(D)};return WJ(D,[...Object.keys(m),"onwarn","watch"],"input options",w,/^(output)$/),{options:m,unsetOptions:d}}(a,s);return aF(n.plugins,bD),{options:n,unsetOptions:o}}(A,t!==null);(function(B){B.perf?(rn=new Map,je=ZO,Pe=VO,B.plugins=B.plugins.map(zO)):(je=eg,Pe=eg)})(g),await async function(){await x0()}();const Q=new v4(g,t),C=A.cache!==!1;A.cache&&(g.cache=void 0,A.cache=void 0),je("BUILD",1),await BF(Q.pluginDriver,async()=>{try{je("initialize",2),await Q.pluginDriver.hookParallel("buildStart",[g]),Pe("initialize",2),await Q.build()}catch(B){const s=Object.keys(Q.watchFiles);s.length>0&&(B.watchFiles=s);try{await Q.pluginDriver.hookParallel("buildEnd",[B])}catch(a){const n=cC({...B,message:`There was an error during the build:
282
282
  ${B.message}
283
283
  Additionally, handling the error in the 'buildEnd' hook caused the following error:
284
- ${a.message}`});throw await Q.pluginDriver.hookParallel("closeBundle",[n]),n}throw await Q.pluginDriver.hookParallel("closeBundle",[B]),B}try{await Q.pluginDriver.hookParallel("buildEnd",[])}catch(B){throw await Q.pluginDriver.hookParallel("closeBundle",[B]),B}}),Pe("BUILD",1);const i={cache:C?Q.getCache():void 0,async close(){i.closed||(i.closed=!0,await Q.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async B=>i.closed?BA({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):oF(!1,g,I,B,Q),get watchFiles(){return Object.keys(Q.watchFiles)},write:async B=>i.closed?BA({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):oF(!0,g,I,B,Q)};return g.perf&&(i.getTimings=WO),i}(e,null)}function aF(e,A){for(const[t,g]of e.entries())g.name||(g.name=`${A}${t+1}`)}async function oF(e,A,t,g,I){const{options:Q,outputPluginDriver:C,unsetOptions:i}=await async function(B,s,a,n){if(!B)throw new Error("You must supply an options object");const o=await gl(B.plugins);aF(o,qD);const D=s.createOutputPluginDriver(o);return{...await cZ(a,n,B,D),outputPluginDriver:D}}(g,I.pluginDriver,A,t);return BF(0,async()=>{const B=new h4(Q,i,A,C,I),s=await B.generate(e);if(e){if(je("WRITE",1),!Q.dir&&!Q.file)return BA({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:_e(bo)});await Promise.all(Object.values(s).map(n=>I.fileOperationQueue.run(()=>async function(o,D){const f=Ht(D.dir||QQ(D.file),o.fileName);return await D4(QQ(f),{recursive:!0}),p4(f,o.type==="asset"?o.source:o.code)}(n,Q)))),await C.hookParallel("writeBundle",[Q,s]),Pe("WRITE",1)}return a=s,{output:Object.values(a).filter(n=>Object.keys(n).length>0).sort((n,o)=>nF(n)-nF(o))};var a})}function cZ(e,A,t,g){return async function(I,Q,C){const i=new Set(C),B=I.compact||!1,s=z4(I),a=$4(I,Q),n=AZ(I,a,Q),o=X4(I,n,Q),D=iZ(I),f=CZ(I,Q),d={amd:tZ(I),assetFileNames:I.assetFileNames??"assets/[name]-[hash][extname]",banner:Il(I,"banner"),chunkFileNames:I.chunkFileNames??"[name]-[hash].js",compact:B,dir:gZ(I,o),dynamicImportInCjs:I.dynamicImportInCjs??!0,entryFileNames:IZ(I,i),esModule:I.esModule??"if-default-prop",experimentalMinChunkSize:I.experimentalMinChunkSize??1,exports:QZ(I,i),extend:I.extend||!1,externalImportAssertions:f,externalImportAttributes:f,externalLiveBindings:I.externalLiveBindings??!0,file:o,footer:Il(I,"footer"),format:s,freeze:I.freeze??!0,generatedCode:D,globals:I.globals||{},hashCharacters:I.hashCharacters??"base64",hoistTransitiveImports:I.hoistTransitiveImports??!0,importAttributesKey:I.importAttributesKey??"assert",indent:BZ(I,B),inlineDynamicImports:a,interop:sZ(I),intro:Il(I,"intro"),manualChunks:EZ(I,a,n),minifyInternalExports:aZ(I,s,B),name:I.name,noConflict:I.noConflict||!1,outro:Il(I,"outro"),paths:I.paths||{},plugins:await gl(I.plugins),preserveModules:n,preserveModulesRoot:eZ(I),reexportProtoFromExternal:I.reexportProtoFromExternal??!0,sanitizeFileName:typeof I.sanitizeFileName=="function"?I.sanitizeFileName:I.sanitizeFileName===!1?l=>l:W4,sourcemap:I.sourcemap||!1,sourcemapBaseUrl:nZ(I),sourcemapDebugIds:I.sourcemapDebugIds||!1,sourcemapExcludeSources:I.sourcemapExcludeSources||!1,sourcemapFile:I.sourcemapFile,sourcemapFileNames:oZ(I,i),sourcemapIgnoreList:typeof I.sourcemapIgnoreList=="function"?I.sourcemapIgnoreList:I.sourcemapIgnoreList===!1?()=>!1:l=>l.includes("node_modules"),sourcemapPathTransform:I.sourcemapPathTransform,strict:I.strict??!0,systemNullSetters:I.systemNullSetters??!0,validate:I.validate||!1,virtualDirname:I.virtualDirname||"_virtual"};return WJ(I,Object.keys(d),"output options",Q.onLog),{options:d,unsetOptions:i}}(g.hookReduceArg0Sync("outputOptions",[t],(I,Q)=>Q||I,I=>{const Q=()=>I.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...I,emitFile:Q,setAssetSource:Q}}),e,A)}var cn;function nF(e){return e.type==="asset"?cn.ASSET:e.isEntry?cn.ENTRY_CHUNK:cn.SECONDARY_CHUNK}Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose")),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(cn||(cn={}));const lZ=async(e,A,t)=>{const g=new qC,I=t!=null?new Id(A,t):new Cd(A);return g.finish(I.pack(g)),await El(e,t!=null?Lt.Client_Tagged_FrameInfo_Request:Lt.Client_Unique_FrameInfo_Request,g.asUint8Array(),t!=null?(Q,C)=>{if(Q===Lt.Server_Tagged_FrameInfo_File_Response){const i=Tt.getRootAsTaggedFrameInfoResponse(new sg(C));if(i.tag()===t)return{file:i.value()}}else if(Q===Lt.Server_Tagged_FrameInfo_Content_Response){const i=Tt.getRootAsTaggedFrameInfoResponse(new sg(C));if(i.tag()===t)return{content:i.value()}}}:(Q,C)=>{if(Q===Lt.Server_Unique_FrameInfo_File_Response)return{file:Eg.getRootAsUniqueFrameInfoResponse(new sg(C)).value()};if(Q===Lt.Server_Unique_FrameInfo_Content_Response)return{content:Eg.getRootAsUniqueFrameInfoResponse(new sg(C)).value()}})},hZ=async e=>{const A=new qC,t=new ed;return A.finish(t.pack(A)),await El(e,Lt.Client_File_Alias_Request,A.asUint8Array(),(g,I)=>{if(g===Lt.Server_File_Alias_Response){const Q=Yg.getRootAsFileAliasResponse(new sg(I)),C={};for(let i=0;i<Q.aliasesLength();++i){const B=Q.aliases(i);C[B.key()]=B.value()}return C}})};self.addEventListener("message",async e=>{try{if(e.data.type=="init"){const{host:A,cdn_url:t,id:g,tag:I}=e.data,Q=await lZ(A,g,I);if("content"in Q){self.postMessage({ok:!0,code:Q.content});return}if("file"in Q){const C=[],s=(await(await rZ({input:`${Xd}/index.js`,plugins:[E3(A,t,hS(Q.file),await hZ(A),(a,n)=>C.push({target:a,metadata:n})),nS()],external:a=>a.startsWith("svelte")||a.startsWith("https://"),onwarn:C3})).generate({format:"esm"})).output[0].code;self.postMessage({ok:!0,target:Q.file,code:s,files:C})}}}catch(A){self.postMessage({ok:!1,err:A})}})})();
284
+ ${a.message}`});throw await Q.pluginDriver.hookParallel("closeBundle",[n]),n}throw await Q.pluginDriver.hookParallel("closeBundle",[B]),B}try{await Q.pluginDriver.hookParallel("buildEnd",[])}catch(B){throw await Q.pluginDriver.hookParallel("closeBundle",[B]),B}}),Pe("BUILD",1);const i={cache:C?Q.getCache():void 0,async close(){i.closed||(i.closed=!0,await Q.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async B=>i.closed?BA({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):oF(!1,g,I,B,Q),get watchFiles(){return Object.keys(Q.watchFiles)},write:async B=>i.closed?BA({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):oF(!0,g,I,B,Q)};return g.perf&&(i.getTimings=WO),i}(e,null)}function aF(e,A){for(const[t,g]of e.entries())g.name||(g.name=`${A}${t+1}`)}async function oF(e,A,t,g,I){const{options:Q,outputPluginDriver:C,unsetOptions:i}=await async function(B,s,a,n){if(!B)throw new Error("You must supply an options object");const o=await gl(B.plugins);aF(o,qD);const D=s.createOutputPluginDriver(o);return{...await cZ(a,n,B,D),outputPluginDriver:D}}(g,I.pluginDriver,A,t);return BF(0,async()=>{const B=new h4(Q,i,A,C,I),s=await B.generate(e);if(e){if(je("WRITE",1),!Q.dir&&!Q.file)return BA({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:_e(bo)});await Promise.all(Object.values(s).map(n=>I.fileOperationQueue.run(()=>async function(o,D){const f=Ht(D.dir||QQ(D.file),o.fileName);return await D4(QQ(f),{recursive:!0}),p4(f,o.type==="asset"?o.source:o.code)}(n,Q)))),await C.hookParallel("writeBundle",[Q,s]),Pe("WRITE",1)}return a=s,{output:Object.values(a).filter(n=>Object.keys(n).length>0).sort((n,o)=>nF(n)-nF(o))};var a})}function cZ(e,A,t,g){return async function(I,Q,C){const i=new Set(C),B=I.compact||!1,s=z4(I),a=$4(I,Q),n=AZ(I,a,Q),o=X4(I,n,Q),D=iZ(I),f=CZ(I,Q),d={amd:tZ(I),assetFileNames:I.assetFileNames??"assets/[name]-[hash][extname]",banner:Il(I,"banner"),chunkFileNames:I.chunkFileNames??"[name]-[hash].js",compact:B,dir:gZ(I,o),dynamicImportInCjs:I.dynamicImportInCjs??!0,entryFileNames:IZ(I,i),esModule:I.esModule??"if-default-prop",experimentalMinChunkSize:I.experimentalMinChunkSize??1,exports:QZ(I,i),extend:I.extend||!1,externalImportAssertions:f,externalImportAttributes:f,externalLiveBindings:I.externalLiveBindings??!0,file:o,footer:Il(I,"footer"),format:s,freeze:I.freeze??!0,generatedCode:D,globals:I.globals||{},hashCharacters:I.hashCharacters??"base64",hoistTransitiveImports:I.hoistTransitiveImports??!0,importAttributesKey:I.importAttributesKey??"assert",indent:BZ(I,B),inlineDynamicImports:a,interop:sZ(I),intro:Il(I,"intro"),manualChunks:EZ(I,a,n),minifyInternalExports:aZ(I,s,B),name:I.name,noConflict:I.noConflict||!1,outro:Il(I,"outro"),paths:I.paths||{},plugins:await gl(I.plugins),preserveModules:n,preserveModulesRoot:eZ(I),reexportProtoFromExternal:I.reexportProtoFromExternal??!0,sanitizeFileName:typeof I.sanitizeFileName=="function"?I.sanitizeFileName:I.sanitizeFileName===!1?l=>l:W4,sourcemap:I.sourcemap||!1,sourcemapBaseUrl:nZ(I),sourcemapDebugIds:I.sourcemapDebugIds||!1,sourcemapExcludeSources:I.sourcemapExcludeSources||!1,sourcemapFile:I.sourcemapFile,sourcemapFileNames:oZ(I,i),sourcemapIgnoreList:typeof I.sourcemapIgnoreList=="function"?I.sourcemapIgnoreList:I.sourcemapIgnoreList===!1?()=>!1:l=>l.includes("node_modules"),sourcemapPathTransform:I.sourcemapPathTransform,strict:I.strict??!0,systemNullSetters:I.systemNullSetters??!0,validate:I.validate||!1,virtualDirname:I.virtualDirname||"_virtual"};return WJ(I,Object.keys(d),"output options",Q.onLog),{options:d,unsetOptions:i}}(g.hookReduceArg0Sync("outputOptions",[t],(I,Q)=>Q||I,I=>{const Q=()=>I.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...I,emitFile:Q,setAssetSource:Q}}),e,A)}var cn;function nF(e){return e.type==="asset"?cn.ASSET:e.isEntry?cn.ENTRY_CHUNK:cn.SECONDARY_CHUNK}Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose")),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(cn||(cn={}));const lZ=async(e,A,t)=>{const g=new qC,I=t!=null?new Id(A,t):new Cd(A);return g.finish(I.pack(g)),await El(e,t!=null?Lt.Client_Tagged_FrameInfo_Request:Lt.Client_Unique_FrameInfo_Request,g.asUint8Array(),t!=null?(Q,C)=>{if(Q===Lt.Server_Tagged_FrameInfo_File_Response){const i=Tt.getRootAsTaggedFrameInfoResponse(new sg(C));if(i.tag()===t)return{file:i.value()}}else if(Q===Lt.Server_Tagged_FrameInfo_Content_Response){const i=Tt.getRootAsTaggedFrameInfoResponse(new sg(C));if(i.tag()===t)return{content:i.value()}}}:(Q,C)=>{if(Q===Lt.Server_Unique_FrameInfo_File_Response)return{file:Eg.getRootAsUniqueFrameInfoResponse(new sg(C)).value()};if(Q===Lt.Server_Unique_FrameInfo_Content_Response)return{content:Eg.getRootAsUniqueFrameInfoResponse(new sg(C)).value()}})},hZ=async e=>{const A=new qC,t=new ed;return A.finish(t.pack(A)),await El(e,Lt.Client_File_Alias_Request,A.asUint8Array(),(g,I)=>{if(g===Lt.Server_File_Alias_Response){const Q=Yg.getRootAsFileAliasResponse(new sg(I)),C={};for(let i=0;i<Q.aliasesLength();++i){const B=Q.aliases(i);C[B.key()]=B.value()}return C}})};self.addEventListener("message",async e=>{try{if(e.data.type=="init"){const{host:A,cdn_url:t,id:g,tag:I}=e.data,Q=await lZ(A,g,I);if("content"in Q){self.postMessage({ok:!0,code:Q.content});return}if("file"in Q){const C=await hZ(A),i=[],B=(()=>{if(Q.file.startsWith("$")){const o=Q.file.indexOf("/"),D=Q.file.slice(1,o);return D in C?`${C[D]}${Q.file.slice(o)}`:null}return Q.file})(),n=(await(await rZ({input:`${Xd}/index.js`,plugins:[E3(A,t,hS(Q.file),C,(o,D)=>i.push({target:o,metadata:D})),nS()],external:o=>o.startsWith("svelte")||o.startsWith("https://"),onwarn:C3})).generate({format:"esm"})).output[0].code;self.postMessage({ok:!0,target:Q.file,full_target:B,code:n,files:i})}}}catch(A){self.postMessage({ok:!1,err:A})}})})();
package/assets/index.js CHANGED
@@ -731,13 +731,13 @@ class N {
731
731
  return N.startFileInfo(t), N.addTarget(t, e), N.addMetadata(t, i), N.endFileInfo(t);
732
732
  }
733
733
  unpack() {
734
- return new Ct(this.target(), this.bb.createScalarList(this.metadata.bind(this), this.metadataLength()));
734
+ return new Bt(this.target(), this.bb.createScalarList(this.metadata.bind(this), this.metadataLength()));
735
735
  }
736
736
  unpackTo(t) {
737
737
  t.target = this.target(), t.metadata = this.bb.createScalarList(this.metadata.bind(this), this.metadataLength());
738
738
  }
739
739
  }
740
- class Ct {
740
+ class Bt {
741
741
  constructor(t = null, e = []) {
742
742
  n(this, "target");
743
743
  n(this, "metadata");
@@ -748,7 +748,7 @@ class Ct {
748
748
  return N.createFileInfo(t, e, i);
749
749
  }
750
750
  }
751
- class R {
751
+ class q {
752
752
  constructor() {
753
753
  n(this, "bb", null);
754
754
  n(this, "bb_pos", 0);
@@ -757,10 +757,10 @@ class R {
757
757
  return this.bb_pos = t, this.bb = e, this;
758
758
  }
759
759
  static getRootAsFrameCache(t, e) {
760
- return (e || new R()).__init(t.readInt32(t.position()) + t.position(), t);
760
+ return (e || new q()).__init(t.readInt32(t.position()) + t.position(), t);
761
761
  }
762
762
  static getSizePrefixedRootAsFrameCache(t, e) {
763
- return t.setPosition(t.position() + f), (e || new R()).__init(t.readInt32(t.position()) + t.position(), t);
763
+ return t.setPosition(t.position() + f), (e || new q()).__init(t.readInt32(t.position()) + t.position(), t);
764
764
  }
765
765
  id(t) {
766
766
  const e = this.bb.__offset(this.bb_pos, 4);
@@ -770,20 +770,24 @@ class R {
770
770
  const e = this.bb.__offset(this.bb_pos, 6);
771
771
  return e ? this.bb.__string(this.bb_pos + e, t) : null;
772
772
  }
773
- content(t) {
773
+ fullTarget(t) {
774
774
  const e = this.bb.__offset(this.bb_pos, 8);
775
775
  return e ? this.bb.__string(this.bb_pos + e, t) : null;
776
776
  }
777
+ content(t) {
778
+ const e = this.bb.__offset(this.bb_pos, 10);
779
+ return e ? this.bb.__string(this.bb_pos + e, t) : null;
780
+ }
777
781
  files(t, e) {
778
- const i = this.bb.__offset(this.bb_pos, 10);
782
+ const i = this.bb.__offset(this.bb_pos, 12);
779
783
  return i ? (e || new N()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + i) + t * 4), this.bb) : null;
780
784
  }
781
785
  filesLength() {
782
- const t = this.bb.__offset(this.bb_pos, 10);
786
+ const t = this.bb.__offset(this.bb_pos, 12);
783
787
  return t ? this.bb.__vector_len(this.bb_pos + t) : 0;
784
788
  }
785
789
  static startFrameCache(t) {
786
- t.startObject(4);
790
+ t.startObject(5);
787
791
  }
788
792
  static addId(t, e) {
789
793
  t.addFieldOffset(0, e, 0);
@@ -791,12 +795,15 @@ class R {
791
795
  static addTarget(t, e) {
792
796
  t.addFieldOffset(1, e, 0);
793
797
  }
794
- static addContent(t, e) {
798
+ static addFullTarget(t, e) {
795
799
  t.addFieldOffset(2, e, 0);
796
800
  }
797
- static addFiles(t, e) {
801
+ static addContent(t, e) {
798
802
  t.addFieldOffset(3, e, 0);
799
803
  }
804
+ static addFiles(t, e) {
805
+ t.addFieldOffset(4, e, 0);
806
+ }
800
807
  static createFilesVector(t, e) {
801
808
  t.startVector(4, e.length, 4);
802
809
  for (let i = e.length - 1; i >= 0; i--)
@@ -808,39 +815,40 @@ class R {
808
815
  }
809
816
  static endFrameCache(t) {
810
817
  const e = t.endObject();
811
- return t.requiredField(e, 4), t.requiredField(e, 6), t.requiredField(e, 8), t.requiredField(e, 10), e;
818
+ return t.requiredField(e, 4), t.requiredField(e, 6), t.requiredField(e, 8), t.requiredField(e, 10), t.requiredField(e, 12), e;
812
819
  }
813
- static createFrameCache(t, e, i, a, r) {
814
- return R.startFrameCache(t), R.addId(t, e), R.addTarget(t, i), R.addContent(t, a), R.addFiles(t, r), R.endFrameCache(t);
820
+ static createFrameCache(t, e, i, a, r, o) {
821
+ return q.startFrameCache(t), q.addId(t, e), q.addTarget(t, i), q.addFullTarget(t, a), q.addContent(t, r), q.addFiles(t, o), q.endFrameCache(t);
815
822
  }
816
823
  unpack() {
817
- return new Bt(this.id(), this.target(), this.content(), this.bb.createObjList(this.files.bind(this), this.filesLength()));
824
+ return new Ct(this.id(), this.target(), this.fullTarget(), this.content(), this.bb.createObjList(this.files.bind(this), this.filesLength()));
818
825
  }
819
826
  unpackTo(t) {
820
- t.id = this.id(), t.target = this.target(), t.content = this.content(), t.files = this.bb.createObjList(this.files.bind(this), this.filesLength());
827
+ t.id = this.id(), t.target = this.target(), t.fullTarget = this.fullTarget(), t.content = this.content(), t.files = this.bb.createObjList(this.files.bind(this), this.filesLength());
821
828
  }
822
829
  }
823
- class Bt {
824
- constructor(t = null, e = null, i = null, a = []) {
830
+ class Ct {
831
+ constructor(t = null, e = null, i = null, a = null, r = []) {
825
832
  n(this, "id");
826
833
  n(this, "target");
834
+ n(this, "fullTarget");
827
835
  n(this, "content");
828
836
  n(this, "files");
829
- this.id = t, this.target = e, this.content = i, this.files = a;
837
+ this.id = t, this.target = e, this.fullTarget = i, this.content = a, this.files = r;
830
838
  }
831
839
  pack(t) {
832
- const e = this.id !== null ? t.createString(this.id) : 0, i = this.target !== null ? t.createString(this.target) : 0, a = this.content !== null ? t.createString(this.content) : 0, r = R.createFilesVector(t, t.createObjectOffsetList(this.files));
833
- return R.createFrameCache(t, e, i, a, r);
840
+ const e = this.id !== null ? t.createString(this.id) : 0, i = this.target !== null ? t.createString(this.target) : 0, a = this.fullTarget !== null ? t.createString(this.fullTarget) : 0, r = this.content !== null ? t.createString(this.content) : 0, o = q.createFilesVector(t, t.createObjectOffsetList(this.files));
841
+ return q.createFrameCache(t, e, i, a, r, o);
834
842
  }
835
843
  }
836
844
  var _;
837
845
  (function(s) {
838
846
  s[s.Client_Unique_FrameInfo_Request = 0] = "Client_Unique_FrameInfo_Request", s[s.Client_Tagged_FrameInfo_Request = 1] = "Client_Tagged_FrameInfo_Request", s[s.Server_Unique_FrameInfo_File_Response = 2] = "Server_Unique_FrameInfo_File_Response", s[s.Server_Tagged_FrameInfo_File_Response = 3] = "Server_Tagged_FrameInfo_File_Response", s[s.Server_Unique_FrameInfo_Content_Response = 4] = "Server_Unique_FrameInfo_Content_Response", s[s.Server_Tagged_FrameInfo_Content_Response = 5] = "Server_Tagged_FrameInfo_Content_Response", s[s.Client_File_Request = 6] = "Client_File_Request", s[s.Server_File_Response = 7] = "Server_File_Response", s[s.Client_File_Alias_Request = 8] = "Client_File_Alias_Request", s[s.Server_File_Alias_Response = 9] = "Server_File_Alias_Response", s[s.Client_Unique_FrameCache = 10] = "Client_Unique_FrameCache", s[s.Client_Tagged_FrameCache = 11] = "Client_Tagged_FrameCache", s[s.Client_Unique_Frame_Loaded = 12] = "Client_Unique_Frame_Loaded", s[s.Client_Tagged_Frame_Loaded = 13] = "Client_Tagged_Frame_Loaded", s[s.Client_Unique_Frame_Subscribe = 14] = "Client_Unique_Frame_Subscribe", s[s.Client_Tagged_Frame_Subscribe = 15] = "Client_Tagged_Frame_Subscribe", s[s.Client_Unique_Frame_Unsubscribe = 16] = "Client_Unique_Frame_Unsubscribe", s[s.Client_Tagged_Frame_Unsubscribe = 17] = "Client_Tagged_Frame_Unsubscribe", s[s.Client_Unique_Value_Request = 18] = "Client_Unique_Value_Request", s[s.Client_Tagged_Value_Request = 19] = "Client_Tagged_Value_Request", s[s.Server_Unique_Value_Response = 20] = "Server_Unique_Value_Response", s[s.Server_Tagged_Value_Response = 21] = "Server_Tagged_Value_Response", s[s.Unique_Value_Update = 22] = "Unique_Value_Update", s[s.Tagged_Value_Update = 23] = "Tagged_Value_Update", s[s.Client_Unique_Signal_Request = 24] = "Client_Unique_Signal_Request", s[s.Client_Tagged_Signal_Request = 25] = "Client_Tagged_Signal_Request", s[s.Server_Unique_Signal_Response = 26] = "Server_Unique_Signal_Response", s[s.Server_Tagged_Signal_Response = 27] = "Server_Tagged_Signal_Response", s[s.Client_Unique_Signal_Notify = 28] = "Client_Unique_Signal_Notify", s[s.Client_Tagged_Signal_Notify = 29] = "Client_Tagged_Signal_Notify";
839
847
  })(_ || (_ = {}));
840
- var q;
848
+ var T;
841
849
  (function(s) {
842
850
  s[s.None = 0] = "None", s[s.Boolean = 1] = "Boolean", s[s.Number = 2] = "Number", s[s.Double = 3] = "Double", s[s.String = 4] = "String", s[s.Buffer = 5] = "Buffer";
843
- })(q || (q = {}));
851
+ })(T || (T = {}));
844
852
  class j {
845
853
  constructor() {
846
854
  n(this, "bb", null);
@@ -861,7 +869,7 @@ class j {
861
869
  }
862
870
  type() {
863
871
  const t = this.bb.__offset(this.bb_pos, 6);
864
- return t ? this.bb.readInt32(this.bb_pos + t) : q.None;
872
+ return t ? this.bb.readInt32(this.bb_pos + t) : T.None;
865
873
  }
866
874
  static startSignal(t) {
867
875
  t.startObject(2);
@@ -870,7 +878,7 @@ class j {
870
878
  t.addFieldOffset(0, e, 0);
871
879
  }
872
880
  static addType(t, e) {
873
- t.addFieldInt32(1, e, q.None);
881
+ t.addFieldInt32(1, e, T.None);
874
882
  }
875
883
  static endSignal(t) {
876
884
  const e = t.endObject();
@@ -887,7 +895,7 @@ class j {
887
895
  }
888
896
  }
889
897
  class le {
890
- constructor(t = null, e = q.None) {
898
+ constructor(t = null, e = T.None) {
891
899
  n(this, "id");
892
900
  n(this, "type");
893
901
  this.id = t, this.type = e;
@@ -1422,7 +1430,7 @@ class Gt {
1422
1430
  return X.createTaggedSignalRequest(t, e, i);
1423
1431
  }
1424
1432
  }
1425
- class T {
1433
+ class R {
1426
1434
  constructor() {
1427
1435
  n(this, "bb", null);
1428
1436
  n(this, "bb_pos", 0);
@@ -1431,10 +1439,10 @@ class T {
1431
1439
  return this.bb_pos = t, this.bb = e, this;
1432
1440
  }
1433
1441
  static getRootAsTaggedSignalResponse(t, e) {
1434
- return (e || new T()).__init(t.readInt32(t.position()) + t.position(), t);
1442
+ return (e || new R()).__init(t.readInt32(t.position()) + t.position(), t);
1435
1443
  }
1436
1444
  static getSizePrefixedRootAsTaggedSignalResponse(t, e) {
1437
- return t.setPosition(t.position() + f), (e || new T()).__init(t.readInt32(t.position()) + t.position(), t);
1445
+ return t.setPosition(t.position() + f), (e || new R()).__init(t.readInt32(t.position()) + t.position(), t);
1438
1446
  }
1439
1447
  id(t) {
1440
1448
  const e = this.bb.__offset(this.bb_pos, 4);
@@ -1478,7 +1486,7 @@ class T {
1478
1486
  return t.requiredField(e, 4), t.requiredField(e, 6), t.requiredField(e, 8), e;
1479
1487
  }
1480
1488
  static createTaggedSignalResponse(t, e, i, a) {
1481
- return T.startTaggedSignalResponse(t), T.addId(t, e), T.addTag(t, i), T.addSignals(t, a), T.endTaggedSignalResponse(t);
1489
+ return R.startTaggedSignalResponse(t), R.addId(t, e), R.addTag(t, i), R.addSignals(t, a), R.endTaggedSignalResponse(t);
1482
1490
  }
1483
1491
  unpack() {
1484
1492
  return new ce(this.id(), this.tag(), this.bb.createObjList(this.signals.bind(this), this.signalsLength()));
@@ -1495,8 +1503,8 @@ class ce {
1495
1503
  this.id = t, this.tag = e, this.signals = i;
1496
1504
  }
1497
1505
  pack(t) {
1498
- const e = this.id !== null ? t.createString(this.id) : 0, i = this.tag !== null ? t.createString(this.tag) : 0, a = T.createSignalsVector(t, t.createObjectOffsetList(this.signals));
1499
- return T.createTaggedSignalResponse(t, e, i, a);
1506
+ const e = this.id !== null ? t.createString(this.id) : 0, i = this.tag !== null ? t.createString(this.tag) : 0, a = R.createSignalsVector(t, t.createObjectOffsetList(this.signals));
1507
+ return R.createTaggedSignalResponse(t, e, i, a);
1500
1508
  }
1501
1509
  }
1502
1510
  class $ {
@@ -1795,13 +1803,13 @@ class st {
1795
1803
  return st.startUniqueFrameLoaded(t), st.addId(t, e), st.endUniqueFrameLoaded(t);
1796
1804
  }
1797
1805
  unpack() {
1798
- return new Ut(this.id());
1806
+ return new Tt(this.id());
1799
1807
  }
1800
1808
  unpackTo(t) {
1801
1809
  t.id = this.id();
1802
1810
  }
1803
1811
  }
1804
- class Ut {
1812
+ class Tt {
1805
1813
  constructor(t = null) {
1806
1814
  n(this, "id");
1807
1815
  this.id = t;
@@ -1843,13 +1851,13 @@ class it {
1843
1851
  return it.startUniqueFrameSubscribe(t), it.addId(t, e), it.endUniqueFrameSubscribe(t);
1844
1852
  }
1845
1853
  unpack() {
1846
- return new Rt(this.id());
1854
+ return new Ut(this.id());
1847
1855
  }
1848
1856
  unpackTo(t) {
1849
1857
  t.id = this.id();
1850
1858
  }
1851
1859
  }
1852
- class Rt {
1860
+ class Ut {
1853
1861
  constructor(t = null) {
1854
1862
  n(this, "id");
1855
1863
  this.id = t;
@@ -1985,7 +1993,7 @@ class Xt {
1985
1993
  return nt.createUniqueSignalRequest(t, e);
1986
1994
  }
1987
1995
  }
1988
- class C {
1996
+ class B {
1989
1997
  constructor() {
1990
1998
  n(this, "bb", null);
1991
1999
  n(this, "bb_pos", 0);
@@ -1994,10 +2002,10 @@ class C {
1994
2002
  return this.bb_pos = t, this.bb = e, this;
1995
2003
  }
1996
2004
  static getRootAsUniqueSignalResponse(t, e) {
1997
- return (e || new C()).__init(t.readInt32(t.position()) + t.position(), t);
2005
+ return (e || new B()).__init(t.readInt32(t.position()) + t.position(), t);
1998
2006
  }
1999
2007
  static getSizePrefixedRootAsUniqueSignalResponse(t, e) {
2000
- return t.setPosition(t.position() + f), (e || new C()).__init(t.readInt32(t.position()) + t.position(), t);
2008
+ return t.setPosition(t.position() + f), (e || new B()).__init(t.readInt32(t.position()) + t.position(), t);
2001
2009
  }
2002
2010
  id(t) {
2003
2011
  const e = this.bb.__offset(this.bb_pos, 4);
@@ -2034,7 +2042,7 @@ class C {
2034
2042
  return t.requiredField(e, 4), t.requiredField(e, 6), e;
2035
2043
  }
2036
2044
  static createUniqueSignalResponse(t, e, i) {
2037
- return C.startUniqueSignalResponse(t), C.addId(t, e), C.addSignals(t, i), C.endUniqueSignalResponse(t);
2045
+ return B.startUniqueSignalResponse(t), B.addId(t, e), B.addSignals(t, i), B.endUniqueSignalResponse(t);
2038
2046
  }
2039
2047
  unpack() {
2040
2048
  return new he(this.id(), this.bb.createObjList(this.signals.bind(this), this.signalsLength()));
@@ -2050,8 +2058,8 @@ class he {
2050
2058
  this.id = t, this.signals = e;
2051
2059
  }
2052
2060
  pack(t) {
2053
- const e = this.id !== null ? t.createString(this.id) : 0, i = C.createSignalsVector(t, t.createObjectOffsetList(this.signals));
2054
- return C.createUniqueSignalResponse(t, e, i);
2061
+ const e = this.id !== null ? t.createString(this.id) : 0, i = B.createSignalsVector(t, t.createObjectOffsetList(this.signals));
2062
+ return B.createUniqueSignalResponse(t, e, i);
2055
2063
  }
2056
2064
  }
2057
2065
  class at {
@@ -2102,7 +2110,7 @@ class $t {
2102
2110
  return at.createUniqueValueRequest(t, e);
2103
2111
  }
2104
2112
  }
2105
- class B {
2113
+ class C {
2106
2114
  constructor() {
2107
2115
  n(this, "bb", null);
2108
2116
  n(this, "bb_pos", 0);
@@ -2111,10 +2119,10 @@ class B {
2111
2119
  return this.bb_pos = t, this.bb = e, this;
2112
2120
  }
2113
2121
  static getRootAsUniqueValueResponse(t, e) {
2114
- return (e || new B()).__init(t.readInt32(t.position()) + t.position(), t);
2122
+ return (e || new C()).__init(t.readInt32(t.position()) + t.position(), t);
2115
2123
  }
2116
2124
  static getSizePrefixedRootAsUniqueValueResponse(t, e) {
2117
- return t.setPosition(t.position() + f), (e || new B()).__init(t.readInt32(t.position()) + t.position(), t);
2125
+ return t.setPosition(t.position() + f), (e || new C()).__init(t.readInt32(t.position()) + t.position(), t);
2118
2126
  }
2119
2127
  id(t) {
2120
2128
  const e = this.bb.__offset(this.bb_pos, 4);
@@ -2151,7 +2159,7 @@ class B {
2151
2159
  return t.requiredField(e, 4), t.requiredField(e, 6), e;
2152
2160
  }
2153
2161
  static createUniqueValueResponse(t, e, i) {
2154
- return B.startUniqueValueResponse(t), B.addId(t, e), B.addValues(t, i), B.endUniqueValueResponse(t);
2162
+ return C.startUniqueValueResponse(t), C.addId(t, e), C.addValues(t, i), C.endUniqueValueResponse(t);
2155
2163
  }
2156
2164
  unpack() {
2157
2165
  return new de(this.id(), this.bb.createObjList(this.values.bind(this), this.valuesLength()));
@@ -2167,8 +2175,8 @@ class de {
2167
2175
  this.id = t, this.values = e;
2168
2176
  }
2169
2177
  pack(t) {
2170
- const e = this.id !== null ? t.createString(this.id) : 0, i = B.createValuesVector(t, t.createObjectOffsetList(this.values));
2171
- return B.createUniqueValueResponse(t, e, i);
2178
+ const e = this.id !== null ? t.createString(this.id) : 0, i = C.createValuesVector(t, t.createObjectOffsetList(this.values));
2179
+ return C.createUniqueValueResponse(t, e, i);
2172
2180
  }
2173
2181
  }
2174
2182
  class tt {
@@ -2235,11 +2243,12 @@ const _e = async (s) => new Promise((t, e) => {
2235
2243
  }), i.addEventListener("message", async (a) => {
2236
2244
  if (a.data.ok) {
2237
2245
  if (a.data.files) {
2238
- const r = new y(), o = new Bt(
2246
+ const r = new y(), o = new Ct(
2239
2247
  s.id,
2240
2248
  a.data.target,
2249
+ a.data.full_target,
2241
2250
  a.data.code,
2242
- a.data.files.map((h) => new Ct(h.target, h.metadata))
2251
+ a.data.files.map((h) => new Bt(h.target, h.metadata))
2243
2252
  );
2244
2253
  r.finish(o.pack(r)), St(
2245
2254
  s.host,
@@ -2299,7 +2308,7 @@ const _e = async (s) => new Promise((t, e) => {
2299
2308
  }
2300
2309
  } : (c, d) => {
2301
2310
  if (c === _.Server_Unique_Value_Response) {
2302
- const b = B.getRootAsUniqueValueResponse(
2311
+ const b = C.getRootAsUniqueValueResponse(
2303
2312
  new P(d)
2304
2313
  );
2305
2314
  if (b.id() === s)
@@ -2343,14 +2352,14 @@ const _e = async (s) => new Promise((t, e) => {
2343
2352
  if (p === l.ValueBuffer) {
2344
2353
  const G = new Uint8Array(
2345
2354
  m.unpack().value.value.value
2346
- ), Tt = Nt(I);
2355
+ ), Rt = Nt(I);
2347
2356
  let gt = !0;
2348
- if (G.length != Tt.length)
2357
+ if (G.length != Rt.length)
2349
2358
  gt = !1;
2350
2359
  else {
2351
2360
  const ie = G.length;
2352
2361
  for (let pt = 0; pt < ie; pt++)
2353
- if (G[pt] !== Tt[pt]) {
2362
+ if (G[pt] !== Rt[pt]) {
2354
2363
  gt = !1;
2355
2364
  break;
2356
2365
  }
@@ -2378,9 +2387,9 @@ const _e = async (s) => new Promise((t, e) => {
2378
2387
  (h, c) => {
2379
2388
  if (t != null) {
2380
2389
  if (h === _.Server_Tagged_Signal_Response)
2381
- return T.getRootAsTaggedSignalResponse(new P(c));
2390
+ return R.getRootAsTaggedSignalResponse(new P(c));
2382
2391
  } else if (h === _.Server_Unique_Signal_Response)
2383
- return C.getRootAsUniqueSignalResponse(new P(c));
2392
+ return B.getRootAsUniqueSignalResponse(new P(c));
2384
2393
  }
2385
2394
  ), r = [
2386
2395
  /* @__PURE__ */ new Map(),
@@ -2425,15 +2434,15 @@ const _e = async (s) => new Promise((t, e) => {
2425
2434
  return et(e);
2426
2435
  }
2427
2436
  }), ee = (s) => ({
2428
- none: (t) => s[q.None].get(t) ?? (() => {
2437
+ none: (t) => s[T.None].get(t) ?? (() => {
2429
2438
  }),
2430
- boolean: (t) => s[q.Boolean].get(t) ?? ct,
2431
- double: (t) => s[q.Double].get(t) ?? ct,
2432
- number: (t) => s[q.Number].get(t) ?? ct,
2433
- string: (t) => s[q.String].get(t) ?? ct,
2434
- buffer: (t) => s[q.Buffer].get(t) ?? ct,
2439
+ boolean: (t) => s[T.Boolean].get(t) ?? ct,
2440
+ double: (t) => s[T.Double].get(t) ?? ct,
2441
+ number: (t) => s[T.Number].get(t) ?? ct,
2442
+ string: (t) => s[T.String].get(t) ?? ct,
2443
+ buffer: (t) => s[T.Buffer].get(t) ?? ct,
2435
2444
  json: (t, e) => {
2436
- const i = s[q.Buffer].get(t);
2445
+ const i = s[T.Buffer].get(t);
2437
2446
  return i != null ? (a) => i(e(a)) : ct;
2438
2447
  }
2439
2448
  }), pe = async (s, t, e, i, a, r) => {
@@ -2459,12 +2468,12 @@ const _e = async (s) => new Promise((t, e) => {
2459
2468
  p
2460
2469
  ), { action: O } = await d(F);
2461
2470
  o.on_connect(() => {
2462
- const p = new y(), I = e != null ? new qt(t, e) : new Rt(t);
2471
+ const p = new y(), I = e != null ? new qt(t, e) : new Ut(t);
2463
2472
  p.finish(I.pack(p));
2464
2473
  const G = e != null ? _.Client_Tagged_Frame_Subscribe : _.Client_Unique_Frame_Subscribe;
2465
2474
  o.publish(dt([ht(G), p.asUint8Array()]));
2466
2475
  }), o.start();
2467
- const V = new y(), m = e != null ? new Ot(t, e) : new Ut(t);
2476
+ const V = new y(), m = e != null ? new Ot(t, e) : new Tt(t);
2468
2477
  return V.finish(m.pack(V)), St(
2469
2478
  s,
2470
2479
  e != null ? _.Client_Tagged_Frame_Loaded : _.Client_Unique_Frame_Loaded,
@@ -2498,12 +2507,12 @@ const _e = async (s) => new Promise((t, e) => {
2498
2507
  Mt({ id: t, tag: e ?? null, host: s, service: i })
2499
2508
  ]);
2500
2509
  i.on_connect(() => {
2501
- const d = new y(), b = e != null ? new qt(t, e) : new Rt(t);
2510
+ const d = new y(), b = e != null ? new qt(t, e) : new Ut(t);
2502
2511
  d.finish(b.pack(d));
2503
2512
  const F = e != null ? _.Client_Tagged_Frame_Subscribe : _.Client_Unique_Frame_Subscribe;
2504
2513
  i.publish(dt([ht(F), d.asUint8Array()]));
2505
2514
  }), i.start();
2506
- const o = new y(), h = e != null ? new Ot(t, e) : new Ut(t);
2515
+ const o = new y(), h = e != null ? new Ot(t, e) : new Tt(t);
2507
2516
  o.finish(h.pack(o));
2508
2517
  const c = e != null ? _.Client_Tagged_Frame_Loaded : _.Client_Unique_Frame_Loaded;
2509
2518
  return St(s, c, o.asUint8Array()), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nil-/xit",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "peerDependencies": {
5
5
  "svelte": "^5.7.1"
6
6
  },
@@ -23,6 +23,10 @@
23
23
  "types": "./test/ReadOnlyValueLoader.svelte.d.ts",
24
24
  "svelte": "./test/ReadOnlyValueLoader.svelte"
25
25
  },
26
+ "./test/ReactiveValueLoader.svelte": {
27
+ "types": "./test/ReactiveValueLoader.svelte.d.ts",
28
+ "svelte": "./test/ReactiveValueLoader.svelte"
29
+ },
26
30
  "./components/layouts/Container.svelte": {
27
31
  "types": "./components/layouts/Container.svelte.d.ts",
28
32
  "svelte": "./components/layouts/Container.svelte"
package/test/Main.svelte CHANGED
@@ -2,6 +2,7 @@
2
2
  import Split from "../components/layouts/Split.svelte";
3
3
  import Scrollable from "../components/layouts/Scrollable.svelte";
4
4
  import { config } from "$xit/config.js";
5
+ let { children } = $props();
5
6
  let selected = $state(-1);
6
7
  </script>
7
8
 
@@ -30,11 +31,20 @@ let selected = $state(-1);
30
31
  <Scrollable>
31
32
  <Split vertical offset={200}>
32
33
  {#snippet side_a()}
33
- {@render side(outputs)}
34
+ <Scrollable>
35
+ <div class="items">
36
+ {#each outputs as { action }}
37
+ <div style:display="contents" use:action></div>
38
+ {/each}
39
+ </div>
40
+ </Scrollable>
34
41
  {/snippet}
35
42
  {#snippet side_b()}
36
43
  {@render combo(tags)}
37
- {@render side(inputs)}
44
+ {@render children?.(tags[selected])}
45
+ {#each inputs as { name }}
46
+ <a href={`/?frame=${name}&tag=${tags[selected]}`} target="_blank">{name}</a>
47
+ {/each}
38
48
  {/snippet}
39
49
  </Split>
40
50
  </Scrollable>
@@ -1,3 +1,7 @@
1
- declare const Main: import("svelte").Component<Record<string, never>, {}, "">;
1
+ import type { Snippet } from "svelte";
2
+ type $$ComponentProps = {
3
+ children?: Snippet<[string]>;
4
+ };
5
+ declare const Main: import("svelte").Component<$$ComponentProps, {}, "">;
2
6
  type Main = ReturnType<typeof Main>;
3
7
  export default Main;
@@ -7,25 +7,27 @@ const {
7
7
  const { load_frame_data } = xit();
8
8
  let unmounted = false;
9
9
  const unsubs = [];
10
- let data = $state(frames.map((v) => null));
10
+ let data = $state(frames.map((v) => ({})));
11
11
  const load = async (frame, index) => {
12
12
  const frame_data = await load_frame_data(frame.id, frame.tag);
13
13
  if (unmounted) {
14
14
  frame_data.unsub();
15
15
  } else {
16
16
  unsubs.push(frame_data.unsub);
17
- if (frame.type == "boolean") {
18
- data[index] = frame_data.values.boolean(frame.key, false);
19
- } else if (frame.type == "double") {
20
- data[index] = frame_data.values.double(frame.key, 0);
21
- } else if (frame.type == "number") {
22
- data[index] = frame_data.values.number(frame.key, 0);
23
- } else if (frame.type == "string") {
24
- data[index] = frame_data.values.string(frame.key, "");
25
- } else if (frame.type == "buffer") {
26
- data[index] = frame_data.values.buffer(frame.key, new Uint8Array());
27
- } else if (frame.type == "json") {
28
- data[index] = frame_data.values.json(frame.key, null, frame.codec);
17
+ for (const item of frame.items) {
18
+ if (item.type == "boolean") {
19
+ data[index][item.key] = frame_data.values.boolean(item.key, item.default);
20
+ } else if (item.type == "double") {
21
+ data[index][item.key] = frame_data.values.double(item.key, item.default);
22
+ } else if (item.type == "number") {
23
+ data[index][item.key] = frame_data.values.number(item.key, item.default);
24
+ } else if (item.type == "string") {
25
+ data[index][item.key] = frame_data.values.string(item.key, item.default);
26
+ } else if (item.type == "buffer") {
27
+ data[index][item.key] = frame_data.values.buffer(item.key, item.default);
28
+ } else if (item.type == "json") {
29
+ data[index][item.key] = frame_data.values.json(item.key, item.default, item.codec);
30
+ }
29
31
  }
30
32
  }
31
33
  };
@@ -2,15 +2,33 @@ import type { Snippet } from "svelte";
2
2
  import { type CoDec } from "..";
3
3
  type FrameDetails = {
4
4
  id: string;
5
- key: string;
6
5
  tag?: string;
7
- type: "boolean" | "double" | "number" | "string" | "buffer";
8
- } | {
9
- id: string;
10
- key: string;
11
- tag?: string;
12
- type: "json";
13
- codec: CoDec<any>;
6
+ items: ({
7
+ key: string;
8
+ default: boolean;
9
+ type: "boolean";
10
+ } | {
11
+ key: string;
12
+ default: number;
13
+ type: "number";
14
+ } | {
15
+ key: string;
16
+ default: number;
17
+ type: "double";
18
+ } | {
19
+ key: string;
20
+ default: string;
21
+ type: "string";
22
+ } | {
23
+ key: string;
24
+ default: Uint8Array;
25
+ type: "buffer";
26
+ } | {
27
+ key: string;
28
+ default: any;
29
+ type: "json";
30
+ codec: CoDec<any>;
31
+ })[];
14
32
  };
15
33
  type $$ComponentProps = {
16
34
  loaded_data?: Snippet<[any[]]>;
@@ -7,25 +7,40 @@ const {
7
7
  const { load_frame_data } = xit();
8
8
  let unmounted = false;
9
9
  const unsubs = [];
10
- let data = $state(frames.map((v) => null));
10
+ let data = $state(frames.map((v) => ({})));
11
11
  const load = async (frame, index) => {
12
12
  const frame_data = await load_frame_data(frame.id, frame.tag);
13
13
  if (unmounted) {
14
14
  frame_data.unsub();
15
15
  } else {
16
16
  unsubs.push(frame_data.unsub);
17
- if (frame.type == "boolean") {
18
- unsubs.push(frame_data.values.boolean(frame.key, false).subscribe((v) => data[index] = v));
19
- } else if (frame.type == "double") {
20
- unsubs.push(frame_data.values.double(frame.key, 0).subscribe((v) => data[index] = v));
21
- } else if (frame.type == "number") {
22
- unsubs.push(frame_data.values.number(frame.key, 0).subscribe((v) => data[index] = v));
23
- } else if (frame.type == "string") {
24
- unsubs.push(frame_data.values.string(frame.key, "").subscribe((v) => data[index] = v));
25
- } else if (frame.type == "buffer") {
26
- unsubs.push(frame_data.values.buffer(frame.key, new Uint8Array()).subscribe((v) => data[index] = v));
27
- } else if (frame.type == "json") {
28
- unsubs.push(frame_data.values.json(frame.key, null, frame.codec).subscribe((v) => data[index] = v));
17
+ for (const item of frame.items) {
18
+ const { key } = item;
19
+ if (item.type == "boolean") {
20
+ unsubs.push(
21
+ frame_data.values.boolean(item.key, item.default).subscribe((v) => data[index][key] = v)
22
+ );
23
+ } else if (item.type == "double") {
24
+ unsubs.push(
25
+ frame_data.values.double(item.key, item.default).subscribe((v) => data[index][key] = v)
26
+ );
27
+ } else if (item.type == "number") {
28
+ unsubs.push(
29
+ frame_data.values.number(item.key, item.default).subscribe((v) => data[index][key] = v)
30
+ );
31
+ } else if (item.type == "string") {
32
+ unsubs.push(
33
+ frame_data.values.string(item.key, item.default).subscribe((v) => data[index][key] = v)
34
+ );
35
+ } else if (item.type == "buffer") {
36
+ unsubs.push(
37
+ frame_data.values.buffer(item.key, item.default).subscribe((v) => data[index] = v)
38
+ );
39
+ } else if (item.type == "json") {
40
+ unsubs.push(
41
+ frame_data.values.json(item.key, item.default, item.codec).subscribe((v) => data[index][key] = v)
42
+ );
43
+ }
29
44
  }
30
45
  }
31
46
  };
@@ -2,15 +2,33 @@ import type { Snippet } from "svelte";
2
2
  import { type CoDec } from "..";
3
3
  type FrameDetails = {
4
4
  id: string;
5
- key: string;
6
5
  tag?: string;
7
- type: "boolean" | "double" | "number" | "string" | "buffer";
8
- } | {
9
- id: string;
10
- key: string;
11
- tag?: string;
12
- type: "json";
13
- codec: CoDec<any>;
6
+ items: ({
7
+ key: string;
8
+ default: boolean;
9
+ type: "boolean";
10
+ } | {
11
+ key: string;
12
+ default: number;
13
+ type: "number";
14
+ } | {
15
+ key: string;
16
+ default: number;
17
+ type: "double";
18
+ } | {
19
+ key: string;
20
+ default: string;
21
+ type: "string";
22
+ } | {
23
+ key: string;
24
+ default: Uint8Array;
25
+ type: "buffer";
26
+ } | {
27
+ key: string;
28
+ default: any;
29
+ type: "json";
30
+ codec: CoDec<any>;
31
+ })[];
14
32
  };
15
33
  type $$ComponentProps = {
16
34
  loaded_data?: Snippet<[any[]]>;