jq79 0.8.1 → 0.8.2

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/dev/vite.ts CHANGED
@@ -366,16 +366,61 @@ const declaredComponents = (source: string): string[] => {
366
366
  // content replaced. Attribute values are matched as quoted chunks so a ">"
367
367
  // inside one doesn't end the tag early
368
368
  const STYLE_BLOCK_RE = /<style((?:"[^"]*"|'[^']*'|[^>"'])*)>([\s\S]*?)<\/style\s*>/gi
369
- const LANG_ATTR_RE = /\blang\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i
370
- const TYPE_ATTR_RE = /\btype\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i
371
-
372
- // one attribute's value out of a tag's attribute string, whichever way it was
373
- // quoted - null when the attribute isn't there at all
374
- const attrValue = (attrs: string, re: RegExp): string | null => {
375
- const found = attrs.match(re)
376
- return found ? found[1] ?? found[2] ?? found[3] : null
369
+ // one attribute of a tag's attribute string: its name (lowercased, as the HTML
370
+ // parser reads it), its value (null for a bare `scoped`), and where it sits -
371
+ // `start` at the whitespace before it, so cutting [start, end) removes it cleanly
372
+ type AttrSpan = { name: string; value: string | null; start: number; end: number }
373
+
374
+ // a tag's attribute string read the way the HTML parser reads it: name, then an
375
+ // optional `=` and a double-quoted, single-quoted or bare value. A regex over the
376
+ // whole string can't do this - `\blang\s*=` also matches *inside* a value, and a
377
+ // prop with a default (`:setup="{ lang = 'en' }"`) then reads as the script's
378
+ // language, ahead of the real `lang="ts"`
379
+ const readAttrs = (attrs: string): AttrSpan[] => {
380
+ const spans: AttrSpan[] = []
381
+ const space = /[\s/]/
382
+ let i = 0
383
+ while (i < attrs.length) {
384
+ const start = i
385
+ while (i < attrs.length && space.test(attrs[i])) i++
386
+ const nameStart = i
387
+ while (i < attrs.length && !/[\s/=>]/.test(attrs[i])) i++
388
+ if (i === nameStart) {
389
+ if (i >= attrs.length) break
390
+ i++ // a stray `=` or `>`: skip it
391
+ continue
392
+ }
393
+ const name = attrs.slice(nameStart, i).toLowerCase()
394
+ let j = i
395
+ while (j < attrs.length && /\s/.test(attrs[j])) j++
396
+ let value: string | null = null
397
+ if (attrs[j] === "=") {
398
+ j++
399
+ while (j < attrs.length && /\s/.test(attrs[j])) j++
400
+ const quote = attrs[j]
401
+ if (quote === '"' || quote === "'") {
402
+ const close = attrs.indexOf(quote, j + 1)
403
+ const end = close === -1 ? attrs.length : close
404
+ value = attrs.slice(j + 1, end)
405
+ i = close === -1 ? end : end + 1
406
+ } else {
407
+ const valueStart = j
408
+ while (j < attrs.length && !/[\s>]/.test(attrs[j])) j++
409
+ value = attrs.slice(valueStart, j)
410
+ i = j
411
+ }
412
+ }
413
+ spans.push({ name, value, start, end: i })
414
+ }
415
+ return spans
377
416
  }
378
417
 
418
+ const findAttr = (attrs: string, name: string): AttrSpan | undefined =>
419
+ readAttrs(attrs).find(a => a.name === name)
420
+
421
+ // the attribute string without one attribute (and the whitespace before it)
422
+ const dropAttr = (attrs: string, span: AttrSpan): string => attrs.slice(0, span.start) + attrs.slice(span.end)
423
+
379
424
  // compiles <style lang="scss|less|styl|sass"> blocks to plain CSS with Vite's
380
425
  // own preprocessing (the same call @vitejs/plugin-vue makes), so the runtime
381
426
  // only ever sees CSS. The preprocessor picks its parser from the extension,
@@ -393,11 +438,11 @@ const compileStyleBlocks = async (
393
438
  const blocks = [...source.matchAll(STYLE_BLOCK_RE)]
394
439
  const compiled = await Promise.all(
395
440
  blocks.map(async ([, attrs, content]) => {
396
- const extension = attrValue(attrs, LANG_ATTR_RE)
397
- if (extension === null) return null
398
- const result = await preprocessCSS(content, `${file}.${extension}`, config)
441
+ const lang = findAttr(attrs, "lang")
442
+ if (!lang?.value) return null
443
+ const result = await preprocessCSS(content, `${file}.${lang.value}`, config)
399
444
  result.deps?.forEach(addWatchFile)
400
- return { attrs: attrs.replace(LANG_ATTR_RE, "").trimEnd(), css: result.code }
445
+ return { attrs: dropAttr(attrs, lang).trimEnd(), css: result.code }
401
446
  })
402
447
  )
403
448
 
@@ -429,11 +474,11 @@ const TS_TYPE_RE = /^(?:text|application)\/(?:x-)?typescript$/
429
474
  // types whichever one carried it. A `lang` answers on its own: `lang="coffee"`
430
475
  // is a language this plugin doesn't compile, and reading `type` past it would
431
476
  // compile a block the author said was something else
432
- const typescriptAttr = (attrs: string): RegExp | null => {
433
- const lang = attrValue(attrs, LANG_ATTR_RE)
434
- if (lang !== null) return TS_LANGS.has(lang.trim().toLowerCase()) ? LANG_ATTR_RE : null
435
- const type = attrValue(attrs, TYPE_ATTR_RE)
436
- return type !== null && TS_TYPE_RE.test(type.trim().toLowerCase()) ? TYPE_ATTR_RE : null
477
+ const typescriptAttr = (attrs: string): AttrSpan | null => {
478
+ const lang = findAttr(attrs, "lang")
479
+ if (lang?.value != null) return TS_LANGS.has(lang.value.trim().toLowerCase()) ? lang : null
480
+ const type = findAttr(attrs, "type")
481
+ return type?.value != null && TS_TYPE_RE.test(type.value.trim().toLowerCase()) ? type : null
437
482
  }
438
483
 
439
484
  type ViteTransform = (code: string, id: string, options?: unknown) => Promise<{ code: string }>
@@ -465,9 +510,6 @@ const stripTypes = async (ts: string, file: string): Promise<string> => {
465
510
  return code.replace(/^[ \t]*export\s*\{\s*\}\s*;?[ \t]*$/m, "")
466
511
  }
467
512
 
468
- // the `:setup` attribute, when it carries a value (a bare `:setup` is the
469
- // closed signature and can't be typed)
470
- const SETUP_ATTR_RE = /(:setup\s*=\s*)(?:"([^"]*)"|'([^']*)')/i
471
513
  // the arrow body the signature is wrapped in, so the parameter list can be
472
514
  // found again in the output without matching brackets
473
515
  const SIGNATURE_MARKER = "__jq79_signature__"
@@ -518,13 +560,14 @@ const compileScriptBlocks = async (source: string, file: string): Promise<string
518
560
  const marker = typescriptAttr(attrs)
519
561
  if (!marker) return null
520
562
 
521
- let rest = attrs.replace(marker, "").trimEnd()
522
- const setup = rest.match(SETUP_ATTR_RE)
523
- if (setup) {
524
- const signature = await stripSignatureTypes(setup[2] ?? setup[3], `${file}.signature.ts`)
525
- // a function replacement, not a string: `$&` and friends are live in a
526
- // replacement string and a default value is arbitrary source
527
- rest = rest.replace(SETUP_ATTR_RE, () => `${setup[1]}"${quoteAttrValue(signature)}"`)
563
+ let rest = dropAttr(attrs, marker).trimEnd()
564
+ // the `:setup` attribute, when it carries a value (a bare `:setup` is the
565
+ // closed signature and can't be typed)
566
+ const setup = findAttr(rest, ":setup")
567
+ if (setup?.value != null) {
568
+ const signature = await stripSignatureTypes(setup.value, `${file}.signature.ts`)
569
+ const before = rest.slice(setup.start, setup.end).match(/^\s*/)![0]
570
+ rest = rest.slice(0, setup.start) + `${before}:setup="${quoteAttrValue(signature)}"` + rest.slice(setup.end)
528
571
  }
529
572
 
530
573
  return { attrs: rest, js: await stripTypes(content, `${file}.ts`) }
package/dist/jq79.cjs CHANGED
@@ -14,7 +14,7 @@ ${e}
14
14
  ;$__exports.done = true })()`,ls=e=>{let t=e.attrs[":setup"];return t===void 0?null:t.trim()===""?[]:je(t)},as=(e,t,n=at)=>{let s=new Set;return e.forEach(r=>{(n(r.content)??t(r))?.forEach(({name:o})=>s.add(o))}),s};var cs="__jq79precompiled",ds="jq79-precompiled",us=(e,t)=>`function anonymous(${e.join(",")}
15
15
  ) {
16
16
  ${t}
17
- }`;var xl={};var Po="0.8.1",qs=e=>Object.fromEntries(Array.from(e.attributes).map(t=>[t.name,t.value])),Fs="http://www.w3.org/1999/xhtml",Ws=e=>{let t=qs(e),n=e.namespaceURI,s=t[Le];delete t[Le];let r=n!==null&&n!==Fs;return{tag:r?e.tagName:e.tagName.toLowerCase(),attrs:t,...s===void 0?{}:{component:s},...r?{ns:n}:{},children:Array.from((e instanceof HTMLTemplateElement?e.content:e).childNodes).flatMap(l=>{if(l.nodeType===Node.TEXT_NODE){let o=l.textContent??"";return o?[o]:[]}return l.nodeType===Node.ELEMENT_NODE?[Ws(l)]:[]})}},mt=new Map,gt=new Map,pn=!1,tn,Ae=class extends Error{constructor(n,s){super(`${n}. ${s}`);A(this,"reason",n);A(this,"hint",s)}},ko=()=>new Ae("was not precompiled","Safe mode never builds code at runtime: the component's precompiled functions did not reach the page."),Co=(e,t)=>{let n=globalThis[cs];if(Array.isArray(n)&&n.length>0)for(let[s,r,l]of n.splice(0))gt.set(ft(s,r),l);return gt.size===0?void 0:gt.get(ft(e,t))},Nt=(e,t,n="")=>{let s=Co(e,t);if(s===null)throw new SyntaxError("jq79: this code did not compile when it was precompiled");if(s!==void 0)return s;if(tn!==void 0)return Mo(e,t,n,tn);if(pn)throw ko();return new Function(...e,t+n)},hn=()=>{if(!(typeof document>"u"))for(let e of Array.from(document.querySelectorAll("script[nonce]"))){let t=e.nonce||e.getAttribute("nonce");if(t)return t}},fs="__jq79built",Mo=(e,t,n,s)=>{let r=document.createElement("script");r.setAttribute("nonce",s),r.textContent=`document.currentScript.${fs} = ${us(e,t)}${n}`;let l,o=a=>{l=a.error??new SyntaxError(a.message),a.preventDefault()};window.addEventListener("error",o);try{(document.head??document.documentElement).append(r)}finally{window.removeEventListener("error",o),r.remove()}let i=r[fs];if(typeof i=="function")return gt.set(ft(e,t),i),i;throw l!==void 0?l:new Ae("could not be built","The page's CSP refused a <script> carrying the nonce jq79 read from the page.")},ps=new Set,Ao=(e,t)=>{ps.has(e)||(ps.add(e),console.error(`jq79: safeEval() is on, and "${e}" ${t.reason}, so it rendered as nothing. ${t.hint}`))},Me=(e,t)=>{if(!(t in e)){if(t in globalThis)return globalThis[t];throw new ReferenceError(`${t} is not defined`)}},Bs=(e,t)=>{try{return Nt([...Gt,...t],ts(e))}catch(n){return n instanceof Ae&&Ao(e,n),null}},Oo=(e,t)=>{if(!X.scopedNames)return null;let n=ns(e,t);if(n===null)return null;try{return Nt([...Gt,...t],n)}catch{return null}},gn=(e,t,n)=>{let s=mt.get(e);if(s===void 0){let r=Oo(t,n);s=r?{fn:r,scoped:!0}:{fn:Bs(t,n),scoped:!1},mt.set(e,s)}return s},Ie=(e,t)=>`${t.join(",")}|${e}`,_o=(e,t)=>gn(Ie(e,t),e,t).fn,Us=(e,t,n)=>{let s=Bs(t,n);return mt.set(e,{fn:s,scoped:!1}),s},jo=/^(?:([\w$]+) is not defined|Can't find variable: ([\w$]+))/,Lo=100,Te=new Map,mn=new Set,yt=0,nn=!1,sn=new Set,Do=()=>{nn=!1,!(yt>0)&&(Te.forEach(({name:e,expr:t,scope:n},s)=>{e in n||(mn.add(s),console.warn(`jq79: ${e} is not defined - evaluating "${t}". Template expressions resolve against the component store: a top-level let/var/const in a :setup script, a declared prop, or a global. Note a "function name() {}" declaration is not on the store - write "const name = () => {}".`))}),Te.clear())},Ks=()=>{nn||yt>0||!Te.size||(nn=!0,queueMicrotask(Do))},zs=e=>{yt++;let t=()=>{yt--,Ks()};e.then(t,t)},Io=(e,t)=>{if(sn.has(e))return;sn.add(e);let n=t?.message||String(t);console.error(`jq79: ${n} - evaluating "${e}". The expression rendered as nothing. If the value arrives later, guard it - "a?.b", or :if on the element.`)},yn=(e,t,n)=>{if(!(n instanceof ReferenceError))return Io(e,n);let s=jo.exec(n.message),r=s?.[1]??s?.[2];if(!r)return;let l=`${r}|${e}`;mn.has(l)||Te.has(l)||Te.size>=Lo||(Te.set(l,{name:r,expr:e,scope:t}),Ks())},Gs=(e,t,n)=>{let s=n?Object.keys(n):[],r=Ie(e,s),{fn:l,scoped:o}=gn(r,e,s);if(!l)return;let i=n?Object.values(n):[];if(!o)return l(t,Me,...i);try{return l(t,Me,...i)}catch(a){if(!(a instanceof ReferenceError))throw a;let c=Us(r,e,s);if(!c)throw a;return c(t,Me,...i)}},He=[],Ho=(e,t,n)=>{try{let{fn:s,scoped:r}=gn(e,t,He);if(!s)return;if(!r)return s(n,Me);try{return s(n,Me)}catch(l){if(!(l instanceof ReferenceError))throw l;let o=Us(e,t,He);if(!o)throw l;return o(n,Me)}}catch(s){yn(t,n,s);return}},j=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){yn(e,t,s);return}},Vs=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){if(!(s instanceof ReferenceError))throw s;yn(e,t,s);return}},rn=(e,t)=>{if(e.length===1){let s=e[0];return typeof s=="string"?s:String(j(s.expr,t)??"")}let n="";for(let s of e)n+=typeof s=="string"?s:String(j(s.expr,t)??"");return n},En=(e,t,n,s)=>{if(!X.cachedSetters){s.effect(()=>{let l=rn(t,n);e.textContent!==l&&(e.textContent=l)});return}let r=e.data;s.effect(()=>{let l=rn(t,n);l!==r&&(e.data=r=l)})},hs=new Map,qo=e=>{if(!X.cachedSetters)return dt(e);let t=hs.get(e);return t||hs.set(e,t=dt(e)),t},gs=(e,t,n,s)=>{let r=Vs(t,n,{$event:s});typeof r=="function"&&r.call(e,s)},wn=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l);e.addEventListener(r,i=>{o.has("self")&&i.target!==e||(o.has("prevent")&&i.preventDefault(),o.has("stop")&&i.stopPropagation(),X.batchHandlers?Ee(()=>gs(e,n,s,i)):gs(e,n,s,i))},{once:o.has("once"),capture:o.has("capture")})},Fo=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l),i=a=>{o.has("prevent")&&a.preventDefault(),o.has("stop")&&a.stopPropagation(),o.has("once")&&e.off(r,i);let c=()=>{let d=Vs(n,s,{$event:a});typeof d=="function"&&d(a)};Pe(X.batchHandlers?()=>Ee(c):c)};e.on(r,i)},Sn=e=>e instanceof DocumentFragment?{first:e.firstChild,last:e.lastChild}:{first:e,last:e},vt=({first:e,last:t})=>{for(let n=e;n;){let s=n===t?null:n.nextSibling;n.parentNode?.removeChild(n),n=s}},Wo=e=>{e.forEach(t=>{if(t.first===t.last)return vt(t);if(!t.first.parentNode)return;let s=document.createRange();s.setStartBefore(t.first),s.setEndAfter(t.last),s.deleteContents()})},Bo=(e,t)=>{let n=[],s=null;return e.forEach(r=>{if(!t(r)){s=null;return}s&&s.last.nextSibling===r.range.first?s.last=r.range.last:n.push(s={first:r.range.first,last:r.range.last})}),n},Uo=({first:e,last:t},n)=>{let s=n.nextSibling;for(let r=e;r;){let l=r===t?null:r.nextSibling;n.parentNode.insertBefore(r,s),r=l}},ms=(e,t)=>{let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s))for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r;return null},$e=null,Et=null,Zs=new WeakSet,Ko=e=>{let t={memo:$e,base:Et};return $e=new Map,Et=e,t},zo=e=>{$e=e.memo,Et=e.base},ys=(e,t)=>e.component!==void 0?Es(t,e.component):e.tag.includes("-")?Es(t,e.tag):null,ee=e=>e.component??e.tag,Es=(e,t)=>{if(!$e)return ms(e,t);let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s)){if(s===Et){if($e.has(t))return $e.get(t);let r=ms(s,t);return $e.set(t,r),r}if(!Zs.has(s)){for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r}}return null},Go=e=>{let t=new Set;for(let n=e;n&&n!==Object.prototype;n=Object.getPrototypeOf(n))for(let s of Object.keys(n))/^[A-Z]/.test(s)&&t.add(s);return[...t].sort()},Vo=(e,t)=>{let n=Go(t);return new Error(`jq79: <${e}> is not defined - no component of that name is in scope, and nothing renders here. Import it in a :setup script, declare it as a prop, or add a <template name="${e}"> to this file. In scope: ${n.length?n.join(", "):"(none)"}.`)},ws=100,Zt=0,Qs=Symbol("jq79.slots"),Fe=e=>Object.keys(e.attrs).find(t=>t===":slot"||t.startsWith(":slot.")),Zo=e=>e==="default"?":slot":`:slot.${e}`,Qo=e=>typeof e!="string"||e.trim()!=="",Xo=e=>{let t={},n=[];e.children.forEach(r=>{let l=typeof r=="object"&&r.tag==="template"?Fe(r):void 0;if(typeof r=="string"||l===void 0){n.push(r);return}let o=Kt(l.slice(6));if(o in t){console.warn(`jq79: two <template ${Zo(o)}> in <${ee(e)}>; the second was ignored`);return}t[o]={nodes:r.children,binder:r.attrs[l]||void 0}});let s=n.some(Qo);return s&&"default"in t?console.warn(`jq79: <${ee(e)}> has both a <template :slot> and content outside it - the <template> is the default slot's content, and the rest was ignored`):s&&(t.default={nodes:n,binder:e.attrs[":slot"]||void 0}),t},Yo=(e,t,n)=>{je(t)?.forEach(({name:s,as:r,default:l})=>{let o=r??s;Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>{let i=n[s]?.();return i===void 0&&l!==void 0?j(l,e):i},set:()=>console.warn(`jq79: "${o}" is a slot prop - it comes from the component, so assigning to it does nothing`)})})},Jo=e=>{let t=Fe(e);return console.warn(`jq79: <template ${t}> fills a slot only as a direct child of a component tag; here it rendered nothing`),document.createComment(`misplaced ${t}`)},ei=(e,t)=>{let n=Object.entries(Xo(e));if(!n.length)return null;let s={};return n.forEach(([r,l])=>{s[r]=ti(l,t)}),s},ti=(e,t)=>(n,s,r,l)=>{let o=Object.create(t);Yo(o,e.binder,n);let i=o[Ye]??[];Object.defineProperty(o,Ye,{value:[...i,s]});let a=Se(o);return a.ownedBy(s),r.onDispose(()=>a.dispose()),xe(e.nodes,o,a,l)},ni=(e,t,n,s)=>{let r=Kt(e.tag.slice(5)),l=document.createDocumentFragment(),o=document.createComment(e.tag),i=document.createComment(`/${e.tag}`);l.append(o,i);let a=t[Qs]?.[r];if(!a)return l.insertBefore(xe(e.children,t,n,s),i),l;let c={};return Object.entries(e.attrs).forEach(([d,p])=>{if(!(d===Oe||be(d)||d.startsWith("@")))if(d.startsWith(":")){let $=p||d.slice(1);c[ce(d.slice(1))]=()=>j($,t)}else c[ce(d)]=()=>p}),l.insertBefore(a(c,t,n,s),i),l},Xs="data-c79-box",si=(e,t,n)=>{if(t.ns!==void 0)return document.createDocumentFragment();let s=document.createElement(De(e));s.setAttribute(Xs,"");let r=t.attrs[Oe];return r!==void 0&&s.setAttribute(Oe,r),n||Xi(),s},Ss=new WeakSet,ri=(e,t)=>{if(e.ns===void 0||Ss.has(e))return;let n=t.template.find(r=>typeof r=="object");if(n===void 0||n.ns!==void 0)return;Ss.add(e);let s=e.ns==="http://www.w3.org/1998/Math/MathML"?"<math>":"<svg>";console.warn(`jq79: <${ee(e)}> is used inside ${s} and its template starts with <${n.tag.toLowerCase()}>, which is parsed as HTML - it renders and never draws. A component's template decides its own namespace, so root it at ${s}`)},bs=(e,t,n,s,r)=>{let l=si(e,t,r),o=!(l instanceof DocumentFragment),i=o?null:document.createComment(`/${e}`);o||l.append(document.createComment(e),i);let a=ei(t,n),c={},d={},p=[],$=[],C=!1,O;Object.entries(t.attrs).forEach(([E,T])=>{if(E!==Oe){if(E===":props"||E.startsWith(":props.")){C=!0,$.push({expr:T});return}if(be(E)){ll.has(E)&&(O??(O=[])).push(E.slice(1));return}if(E.startsWith("@"))p.push([E,T]);else if(E===":model"||E.startsWith(":model.")){let N=E===":model"?"default":ce(E.slice(7));d[N]=T||(E===":model"?"model":N)}else if(E.startsWith(":")){let N=ce(E.slice(1));c[N]=T||N,$.push({name:N,expr:T||N})}else{let N=ce(E),q=JSON.stringify(T);c[N]=q,$.push({name:N,expr:q})}}});let D=E=>E==="default"?":model":`:model.${E}`,L=E=>E==="default"?"model":E,x=new Set;Object.entries(d).forEach(([E,T])=>{let N=L(E);c[N]!==void 0&&console.warn(`jq79: <${ee(t)}> binds prop "${N}" through both :${N} and ${D(E)} - ${D(E)} wins`),c[N]=T,_o(zt(T),["$value"])===null&&(x.add(E),console.warn(`jq79: ${D(E)}="${T}" is not assignable - updates from <${ee(t)}> will be dropped`))});let I=()=>{let E={};return $.forEach(({name:T,expr:N})=>{if(T!==void 0)E[T]=j(N,n);else{let q=j(N,n);q!==null&&typeof q=="object"&&Object.assign(E,q)}}),Object.entries(d).forEach(([T,N])=>{E[L(T)]=j(N,n)}),E},H=null,K=null,G=null,z=new Set,J=E=>{if(E==null){if(!n[mr]?.has(e)||z.has("unfilled"))return;z.add("unfilled"),console.error(`jq79: <${ee(t)}> is declared as a prop and the parent passed nothing - nothing renders here. Pass it (:${e}="\u2026"), or drop it from the signature to use the one declared in this file.`);return}z.has("type")||(z.add("type"),console.error(`jq79: <${ee(t)}> is ${typeof E}, not a component - nothing renders here`))};return s.effect(()=>{let E=j(e,n),T=E instanceof de?E:null;if(T||J(E),T===K||(G?.dispose(),G=null,H?.destroy(),H=null,K=T,!T))return;ri(t,T);let N=new de({template:T.template,scripts:T.scripts,styles:T.styles,modules:T.modules,filename:T.filename,siblings:T.siblings,name:T.name});if(a&&(N.slots=a),Object.keys(d).length){let P=new Set;N.modelWriteback=(_,B)=>{let V=_==null?"default":ce(String(_)),ne=d[V];return ne===void 0?(P.has(V)||(P.add(V),console.warn(`jq79: <${ee(t)}> has no ${D(V)} - bound: ${Object.keys(d).map(D).join(", ")}`)),!1):x.has(V)?!1:(Pe(()=>j(zt(ne),n,{$value:B})),!0)}}p.forEach(([P,_])=>Fo(N,P,_,n));let q=ol(N.scripts);il(t,e,Object.keys(c),q),O&&al(t,e,O,q);let W=Os(Pe(I),q),U=document.createDocumentFragment();if(Zt>=ws){console.error(`jq79: <${ee(t)}> is ${ws} levels deep inside itself; giving up here. A component that renders itself stops when its data stops - is there a cycle in it?`);return}Zt++;try{(r?N.renderShadow(W):N.render(W)).mount(U)}finally{Zt--}let w=n[Tt];w&&N.holdOwner(w.owner),i?i.parentNode.insertBefore(U,i):l.appendChild(U);let M=Se(n,!0);if(C){let P=[];M.effect(()=>{let _=Os(I(),q),B=Object.keys(_);P.forEach(V=>{V in _||(N.data[V]=void 0)}),B.forEach(V=>{N.data[V]=_[V]}),P=B})}else Object.entries(c).forEach(([P,_])=>{q!==null&&!q.has(P)||M.effect(()=>{N.data[P]=j(_,n)})});G=M,H=N}),s.onDispose(()=>{G?.dispose(),H?.destroy()}),l},oi=(e,t)=>{let n=()=>{let s=j(e,t);return s!==null&&typeof s=="object"?s:null};return new Proxy(t,{has(s,r){let l=n();return l!==null&&Reflect.has(l,r)||Reflect.has(s,r)},get(s,r){let l=n();return l!==null&&Reflect.has(l,r)?l[r]:Reflect.get(s,r)},set(s,r,l){let o=n();return o!==null&&Reflect.has(o,r)?(o[r]=l,!0):Reflect.set(s,r,l)}})},wt=e=>typeof e=="string"?e.split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(wt):e!==null&&typeof e=="object"?Object.entries(e).flatMap(([t,n])=>n?wt(t):[]):[],We=(e,t)=>{if(typeof e=="string"){if(e&&!/\s/.test(e))t.push(e);else if(e)for(let n of e.split(/\s+/))n&&t.push(n)}else if(Array.isArray(e))for(let n of e)We(n,t);else if(e!==null&&typeof e=="object")for(let n in e)e[n]&&We(n,t)},Ys=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Js=(e,t,n,s,r,l)=>{let o=[];l.effect(()=>{let i=[];if(t!==void 0&&We(j(t,r),i),n)for(let[a,c]of n)j(c,r)&&We(a,i);if(!X.cachedSetters)o.forEach(a=>{!i.includes(a)&&!s.has(a)&&e.classList.remove(a)}),e.classList.add(...i);else if(!Ys(o,i)){for(let a of o)!i.includes(a)&&!s.has(a)&&e.classList.remove(a);for(let a of i)o.includes(a)||e.classList.add(a)}o=i})},ii=e=>typeof e=="function"?(t,n,s)=>{try{return!!e(t,n,s)}catch{return!1}}:typeof e=="string"||Array.isArray(e)?kn(e):()=>!1,li=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),bn=e=>e.ns===void 0?document.createElement(e.tag):document.createElementNS(e.ns,e.tag),ai={"http://www.w3.org/2000/svg":["svg","feGaussianBlur"],"http://www.w3.org/1998/Math/MathML":["math","mi"]},$s=new Map,ci=(e,t)=>{let n=`${e} ${t}`,s=$s.get(n);if(s!==void 0)return s;let r=ai[e],l=t;if(r!==void 0&&typeof DOMParser<"u"&&/^[a-z][a-z0-9]*$/.test(t)){let[o,i]=r;l=new DOMParser().parseFromString(`<${o}><${i} ${t}="x"/></${o}>`,"text/html").querySelector(i)?.getAttributeNames().find(c=>c.toLowerCase()===t)??t}return $s.set(n,l),l},er=(e,t)=>{let n=e.namespaceURI;if(n===null||n===Fs)return t;let s=t.replace(/-/g,"").toLowerCase(),r=ci(n,s);return r===s?t:r},$n=(e,t,n)=>{let s=li.has(t);(s?!n:n==null)?e.removeAttribute(t):e.setAttribute(t,s?"":String(n))},X={cloneSkeletons:!0,scopedNames:!0,batchHandlers:!0,cachedSetters:!0,compileSkeletons:!0},di=new Set([":text",":html",":value",":checked",":selected"]),ui=e=>e.startsWith("@")||e===":class"||e.startsWith(":class.")||di.has(e)?!0:e.startsWith(":")?e===":model"?!1:!be(e)&&!e.includes("."):e!==Le,tr=e=>{if(e.component||e.tag.includes("-")||ut(e.tag)||e.tag==="template"||e.ns===void 0&&document.createElement(e.tag)instanceof HTMLUnknownElement)return!1;for(let t in e.attrs)if(!ui(t))return!1;return e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?!0:e.children.every(t=>typeof t=="string"||tr(t))},nr=(e,t,n)=>{let s=bn(e),r,l=null;for(let p in e.attrs){let $=e.attrs[p];if(p.startsWith("@"))n.push({kind:"event",path:t,attr:p,expr:$});else if(p===":class")r=$;else if(p.startsWith(":class."))(l??(l=[])).push([p.slice(7),$]);else if(!be(p))if(p.startsWith(":")){let C=p.slice(1);n.push({kind:"attr",path:t,name:er(s,C),expr:$||ce(C)})}else s.setAttribute(p,$)}(r!==void 0||l)&&n.push({kind:"class",path:t,classExpr:r,toggles:l,staticClasses:new Set(wt(e.attrs.class??""))});let o=e.attrs[":text"],i=e.attrs[":html"];o!==void 0?n.push({kind:"textContent",path:t,expr:o}):i!==void 0?n.push({kind:"html",path:t,expr:i}):e.children.forEach((p,$)=>{if(typeof p=="string"){p.includes("{{")?(n.push({kind:"text",path:[...t,$],parts:dt(p)}),s.appendChild(document.createTextNode(""))):s.appendChild(document.createTextNode(p));return}s.appendChild(nr(p,[...t,$],n))});let a=e.attrs[":value"];a!==void 0&&n.push({kind:"value",path:t,expr:a});let c=e.attrs[":checked"];c!==void 0&&n.push({kind:"checked",path:t,expr:c});let d=e.attrs[":selected"];return d!==void 0&&n.push({kind:"selected",path:t,expr:d}),s},fi=3,sr=e=>e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?1:1+e.children.reduce((t,n)=>t+(typeof n=="string"?0:sr(n)),0),Ts=new WeakMap,Rs=new WeakSet,pi=e=>{let t=Ts.get(e);if(t!==void 0)return t;if(!Rs.has(e))return Rs.add(e),null;let n=null;if(tr(e)&&sr(e)>=fi){let s=[];n={skeleton:nr(e,[],s),ops:s}}return Ts.set(e,n),n},hi=(e,t)=>{let n=e;for(let s=0;s<t.length;s++){n=n.firstChild;for(let r=t[s];r>0;r--)n=n.nextSibling}return n},gi=["r","s","fx","o","K","h"],mi={ev:Ho,evalExpr:j,bindText:En,bindEvent:wn,renderText:rn,bindClassNames:(e,t,n,s)=>{for(let r of t)!n.includes(r)&&!s.has(r)&&e.classList.remove(r);for(let r of n)t.includes(r)||e.classList.add(r)},collectClassNames:(e,t)=>We(e,t),sameNames:(e,t)=>Ys(e,t),applyAttr:(e,t,n)=>$n(e,t,n),sanitizeHTML:e=>ze(e)},xs=new Map,yi=e=>{let t=[],n=new Map([["","r"]]),s=0,r=o=>{let i=o.join("."),a=n.get(i);if(a)return a;let c=o.slice(0,-1),d=o[o.length-1],p=`${r(c)}.firstChild`,$=d;for(let O=d-1;O>=0;O--){let D=n.get([...c,O].join("."));if(D){p=D,$=d-O;break}}for(let O=0;O<$;O++)p+=".nextSibling";let C=`n${s++}`;return t.push(`const ${C} = ${p}`),n.set(i,C),C},l=(o,i)=>t.push(`{ ${o}; fx.effect(() => { ${i} }) }`);return e.forEach((o,i)=>{let a=r(o.path),c=`o[${i}]`;if(o.kind==="text"){let[d]=o.parts;o.parts.length===1&&typeof d!="string"?l(`const t${i} = ${a}, e${i} = ${c}.parts[0].expr, k${i} = K[${i}]; let last${i} = t${i}.data`,`{ const v = h.ev(k${i}, e${i}, s); const x = v == null ? "" : String(v); if (x !== last${i}) t${i}.data = last${i} = x }`):l(`const t${i} = ${a}, p${i} = ${c}.parts; let last${i} = t${i}.data`,`{ const x = h.renderText(p${i}, s); if (x !== last${i}) t${i}.data = last${i} = x }`)}else if(o.kind==="event")t.push(`h.bindEvent(${a}, ${c}.attr, ${c}.expr, s)`);else if(o.kind==="attr")l(`const el${i} = ${a}, c${i} = ${c}`,`h.applyAttr(el${i}, c${i}.name, h.ev(K[${i}], c${i}.expr, s))`);else if(o.kind==="class")l(`const el${i} = ${a}, c${i} = ${c}, k${i} = K[${i}]; let b${i} = []`,`{ const next = []; if (c${i}.classExpr !== undefined) h.collectClassNames(h.ev(k${i}, c${i}.classExpr, s), next); if (c${i}.toggles) for (const [n, e] of c${i}.toggles) if (h.evalExpr(e, s)) h.collectClassNames(n, next); if (!h.sameNames(b${i}, next)) h.bindClassNames(el${i}, b${i}, next, c${i}.staticClasses); b${i} = next }`);else if(o.kind==="textContent")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.textContent !== x) el${i}.textContent = x }`);else if(o.kind==="html")l(`const el${i} = ${a}, c${i} = ${c}`,`el${i}.innerHTML = h.sanitizeHTML(String(h.ev(K[${i}], c${i}.expr, s) ?? ""))`);else if(o.kind==="value")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.value !== x) el${i}.value = x }`);else if(o.kind==="checked")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.checked !== x) el${i}.checked = x }`);else if(o.kind==="selected")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.selected !== x) el${i}.selected = x }`);else{let d=o}}),`"use strict"
17
+ }`;var xl={};var Po="0.8.2",qs=e=>Object.fromEntries(Array.from(e.attributes).map(t=>[t.name,t.value])),Fs="http://www.w3.org/1999/xhtml",Ws=e=>{let t=qs(e),n=e.namespaceURI,s=t[Le];delete t[Le];let r=n!==null&&n!==Fs;return{tag:r?e.tagName:e.tagName.toLowerCase(),attrs:t,...s===void 0?{}:{component:s},...r?{ns:n}:{},children:Array.from((e instanceof HTMLTemplateElement?e.content:e).childNodes).flatMap(l=>{if(l.nodeType===Node.TEXT_NODE){let o=l.textContent??"";return o?[o]:[]}return l.nodeType===Node.ELEMENT_NODE?[Ws(l)]:[]})}},mt=new Map,gt=new Map,pn=!1,tn,Ae=class extends Error{constructor(n,s){super(`${n}. ${s}`);A(this,"reason",n);A(this,"hint",s)}},ko=()=>new Ae("was not precompiled","Safe mode never builds code at runtime: the component's precompiled functions did not reach the page."),Co=(e,t)=>{let n=globalThis[cs];if(Array.isArray(n)&&n.length>0)for(let[s,r,l]of n.splice(0))gt.set(ft(s,r),l);return gt.size===0?void 0:gt.get(ft(e,t))},Nt=(e,t,n="")=>{let s=Co(e,t);if(s===null)throw new SyntaxError("jq79: this code did not compile when it was precompiled");if(s!==void 0)return s;if(tn!==void 0)return Mo(e,t,n,tn);if(pn)throw ko();return new Function(...e,t+n)},hn=()=>{if(!(typeof document>"u"))for(let e of Array.from(document.querySelectorAll("script[nonce]"))){let t=e.nonce||e.getAttribute("nonce");if(t)return t}},fs="__jq79built",Mo=(e,t,n,s)=>{let r=document.createElement("script");r.setAttribute("nonce",s),r.textContent=`document.currentScript.${fs} = ${us(e,t)}${n}`;let l,o=a=>{l=a.error??new SyntaxError(a.message),a.preventDefault()};window.addEventListener("error",o);try{(document.head??document.documentElement).append(r)}finally{window.removeEventListener("error",o),r.remove()}let i=r[fs];if(typeof i=="function")return gt.set(ft(e,t),i),i;throw l!==void 0?l:new Ae("could not be built","The page's CSP refused a <script> carrying the nonce jq79 read from the page.")},ps=new Set,Ao=(e,t)=>{ps.has(e)||(ps.add(e),console.error(`jq79: safeEval() is on, and "${e}" ${t.reason}, so it rendered as nothing. ${t.hint}`))},Me=(e,t)=>{if(!(t in e)){if(t in globalThis)return globalThis[t];throw new ReferenceError(`${t} is not defined`)}},Bs=(e,t)=>{try{return Nt([...Gt,...t],ts(e))}catch(n){return n instanceof Ae&&Ao(e,n),null}},Oo=(e,t)=>{if(!X.scopedNames)return null;let n=ns(e,t);if(n===null)return null;try{return Nt([...Gt,...t],n)}catch{return null}},gn=(e,t,n)=>{let s=mt.get(e);if(s===void 0){let r=Oo(t,n);s=r?{fn:r,scoped:!0}:{fn:Bs(t,n),scoped:!1},mt.set(e,s)}return s},Ie=(e,t)=>`${t.join(",")}|${e}`,_o=(e,t)=>gn(Ie(e,t),e,t).fn,Us=(e,t,n)=>{let s=Bs(t,n);return mt.set(e,{fn:s,scoped:!1}),s},jo=/^(?:([\w$]+) is not defined|Can't find variable: ([\w$]+))/,Lo=100,Te=new Map,mn=new Set,yt=0,nn=!1,sn=new Set,Do=()=>{nn=!1,!(yt>0)&&(Te.forEach(({name:e,expr:t,scope:n},s)=>{e in n||(mn.add(s),console.warn(`jq79: ${e} is not defined - evaluating "${t}". Template expressions resolve against the component store: a top-level let/var/const in a :setup script, a declared prop, or a global. Note a "function name() {}" declaration is not on the store - write "const name = () => {}".`))}),Te.clear())},Ks=()=>{nn||yt>0||!Te.size||(nn=!0,queueMicrotask(Do))},zs=e=>{yt++;let t=()=>{yt--,Ks()};e.then(t,t)},Io=(e,t)=>{if(sn.has(e))return;sn.add(e);let n=t?.message||String(t);console.error(`jq79: ${n} - evaluating "${e}". The expression rendered as nothing. If the value arrives later, guard it - "a?.b", or :if on the element.`)},yn=(e,t,n)=>{if(!(n instanceof ReferenceError))return Io(e,n);let s=jo.exec(n.message),r=s?.[1]??s?.[2];if(!r)return;let l=`${r}|${e}`;mn.has(l)||Te.has(l)||Te.size>=Lo||(Te.set(l,{name:r,expr:e,scope:t}),Ks())},Gs=(e,t,n)=>{let s=n?Object.keys(n):[],r=Ie(e,s),{fn:l,scoped:o}=gn(r,e,s);if(!l)return;let i=n?Object.values(n):[];if(!o)return l(t,Me,...i);try{return l(t,Me,...i)}catch(a){if(!(a instanceof ReferenceError))throw a;let c=Us(r,e,s);if(!c)throw a;return c(t,Me,...i)}},He=[],Ho=(e,t,n)=>{try{let{fn:s,scoped:r}=gn(e,t,He);if(!s)return;if(!r)return s(n,Me);try{return s(n,Me)}catch(l){if(!(l instanceof ReferenceError))throw l;let o=Us(e,t,He);if(!o)throw l;return o(n,Me)}}catch(s){yn(t,n,s);return}},j=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){yn(e,t,s);return}},Vs=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){if(!(s instanceof ReferenceError))throw s;yn(e,t,s);return}},rn=(e,t)=>{if(e.length===1){let s=e[0];return typeof s=="string"?s:String(j(s.expr,t)??"")}let n="";for(let s of e)n+=typeof s=="string"?s:String(j(s.expr,t)??"");return n},En=(e,t,n,s)=>{if(!X.cachedSetters){s.effect(()=>{let l=rn(t,n);e.textContent!==l&&(e.textContent=l)});return}let r=e.data;s.effect(()=>{let l=rn(t,n);l!==r&&(e.data=r=l)})},hs=new Map,qo=e=>{if(!X.cachedSetters)return dt(e);let t=hs.get(e);return t||hs.set(e,t=dt(e)),t},gs=(e,t,n,s)=>{let r=Vs(t,n,{$event:s});typeof r=="function"&&r.call(e,s)},wn=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l);e.addEventListener(r,i=>{o.has("self")&&i.target!==e||(o.has("prevent")&&i.preventDefault(),o.has("stop")&&i.stopPropagation(),X.batchHandlers?Ee(()=>gs(e,n,s,i)):gs(e,n,s,i))},{once:o.has("once"),capture:o.has("capture")})},Fo=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l),i=a=>{o.has("prevent")&&a.preventDefault(),o.has("stop")&&a.stopPropagation(),o.has("once")&&e.off(r,i);let c=()=>{let d=Vs(n,s,{$event:a});typeof d=="function"&&d(a)};Pe(X.batchHandlers?()=>Ee(c):c)};e.on(r,i)},Sn=e=>e instanceof DocumentFragment?{first:e.firstChild,last:e.lastChild}:{first:e,last:e},vt=({first:e,last:t})=>{for(let n=e;n;){let s=n===t?null:n.nextSibling;n.parentNode?.removeChild(n),n=s}},Wo=e=>{e.forEach(t=>{if(t.first===t.last)return vt(t);if(!t.first.parentNode)return;let s=document.createRange();s.setStartBefore(t.first),s.setEndAfter(t.last),s.deleteContents()})},Bo=(e,t)=>{let n=[],s=null;return e.forEach(r=>{if(!t(r)){s=null;return}s&&s.last.nextSibling===r.range.first?s.last=r.range.last:n.push(s={first:r.range.first,last:r.range.last})}),n},Uo=({first:e,last:t},n)=>{let s=n.nextSibling;for(let r=e;r;){let l=r===t?null:r.nextSibling;n.parentNode.insertBefore(r,s),r=l}},ms=(e,t)=>{let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s))for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r;return null},$e=null,Et=null,Zs=new WeakSet,Ko=e=>{let t={memo:$e,base:Et};return $e=new Map,Et=e,t},zo=e=>{$e=e.memo,Et=e.base},ys=(e,t)=>e.component!==void 0?Es(t,e.component):e.tag.includes("-")?Es(t,e.tag):null,ee=e=>e.component??e.tag,Es=(e,t)=>{if(!$e)return ms(e,t);let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s)){if(s===Et){if($e.has(t))return $e.get(t);let r=ms(s,t);return $e.set(t,r),r}if(!Zs.has(s)){for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r}}return null},Go=e=>{let t=new Set;for(let n=e;n&&n!==Object.prototype;n=Object.getPrototypeOf(n))for(let s of Object.keys(n))/^[A-Z]/.test(s)&&t.add(s);return[...t].sort()},Vo=(e,t)=>{let n=Go(t);return new Error(`jq79: <${e}> is not defined - no component of that name is in scope, and nothing renders here. Import it in a :setup script, declare it as a prop, or add a <template name="${e}"> to this file. In scope: ${n.length?n.join(", "):"(none)"}.`)},ws=100,Zt=0,Qs=Symbol("jq79.slots"),Fe=e=>Object.keys(e.attrs).find(t=>t===":slot"||t.startsWith(":slot.")),Zo=e=>e==="default"?":slot":`:slot.${e}`,Qo=e=>typeof e!="string"||e.trim()!=="",Xo=e=>{let t={},n=[];e.children.forEach(r=>{let l=typeof r=="object"&&r.tag==="template"?Fe(r):void 0;if(typeof r=="string"||l===void 0){n.push(r);return}let o=Kt(l.slice(6));if(o in t){console.warn(`jq79: two <template ${Zo(o)}> in <${ee(e)}>; the second was ignored`);return}t[o]={nodes:r.children,binder:r.attrs[l]||void 0}});let s=n.some(Qo);return s&&"default"in t?console.warn(`jq79: <${ee(e)}> has both a <template :slot> and content outside it - the <template> is the default slot's content, and the rest was ignored`):s&&(t.default={nodes:n,binder:e.attrs[":slot"]||void 0}),t},Yo=(e,t,n)=>{je(t)?.forEach(({name:s,as:r,default:l})=>{let o=r??s;Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>{let i=n[s]?.();return i===void 0&&l!==void 0?j(l,e):i},set:()=>console.warn(`jq79: "${o}" is a slot prop - it comes from the component, so assigning to it does nothing`)})})},Jo=e=>{let t=Fe(e);return console.warn(`jq79: <template ${t}> fills a slot only as a direct child of a component tag; here it rendered nothing`),document.createComment(`misplaced ${t}`)},ei=(e,t)=>{let n=Object.entries(Xo(e));if(!n.length)return null;let s={};return n.forEach(([r,l])=>{s[r]=ti(l,t)}),s},ti=(e,t)=>(n,s,r,l)=>{let o=Object.create(t);Yo(o,e.binder,n);let i=o[Ye]??[];Object.defineProperty(o,Ye,{value:[...i,s]});let a=Se(o);return a.ownedBy(s),r.onDispose(()=>a.dispose()),xe(e.nodes,o,a,l)},ni=(e,t,n,s)=>{let r=Kt(e.tag.slice(5)),l=document.createDocumentFragment(),o=document.createComment(e.tag),i=document.createComment(`/${e.tag}`);l.append(o,i);let a=t[Qs]?.[r];if(!a)return l.insertBefore(xe(e.children,t,n,s),i),l;let c={};return Object.entries(e.attrs).forEach(([d,p])=>{if(!(d===Oe||be(d)||d.startsWith("@")))if(d.startsWith(":")){let $=p||d.slice(1);c[ce(d.slice(1))]=()=>j($,t)}else c[ce(d)]=()=>p}),l.insertBefore(a(c,t,n,s),i),l},Xs="data-c79-box",si=(e,t,n)=>{if(t.ns!==void 0)return document.createDocumentFragment();let s=document.createElement(De(e));s.setAttribute(Xs,"");let r=t.attrs[Oe];return r!==void 0&&s.setAttribute(Oe,r),n||Xi(),s},Ss=new WeakSet,ri=(e,t)=>{if(e.ns===void 0||Ss.has(e))return;let n=t.template.find(r=>typeof r=="object");if(n===void 0||n.ns!==void 0)return;Ss.add(e);let s=e.ns==="http://www.w3.org/1998/Math/MathML"?"<math>":"<svg>";console.warn(`jq79: <${ee(e)}> is used inside ${s} and its template starts with <${n.tag.toLowerCase()}>, which is parsed as HTML - it renders and never draws. A component's template decides its own namespace, so root it at ${s}`)},bs=(e,t,n,s,r)=>{let l=si(e,t,r),o=!(l instanceof DocumentFragment),i=o?null:document.createComment(`/${e}`);o||l.append(document.createComment(e),i);let a=ei(t,n),c={},d={},p=[],$=[],C=!1,O;Object.entries(t.attrs).forEach(([E,T])=>{if(E!==Oe){if(E===":props"||E.startsWith(":props.")){C=!0,$.push({expr:T});return}if(be(E)){ll.has(E)&&(O??(O=[])).push(E.slice(1));return}if(E.startsWith("@"))p.push([E,T]);else if(E===":model"||E.startsWith(":model.")){let N=E===":model"?"default":ce(E.slice(7));d[N]=T||(E===":model"?"model":N)}else if(E.startsWith(":")){let N=ce(E.slice(1));c[N]=T||N,$.push({name:N,expr:T||N})}else{let N=ce(E),q=JSON.stringify(T);c[N]=q,$.push({name:N,expr:q})}}});let D=E=>E==="default"?":model":`:model.${E}`,L=E=>E==="default"?"model":E,x=new Set;Object.entries(d).forEach(([E,T])=>{let N=L(E);c[N]!==void 0&&console.warn(`jq79: <${ee(t)}> binds prop "${N}" through both :${N} and ${D(E)} - ${D(E)} wins`),c[N]=T,_o(zt(T),["$value"])===null&&(x.add(E),console.warn(`jq79: ${D(E)}="${T}" is not assignable - updates from <${ee(t)}> will be dropped`))});let I=()=>{let E={};return $.forEach(({name:T,expr:N})=>{if(T!==void 0)E[T]=j(N,n);else{let q=j(N,n);q!==null&&typeof q=="object"&&Object.assign(E,q)}}),Object.entries(d).forEach(([T,N])=>{E[L(T)]=j(N,n)}),E},H=null,K=null,G=null,z=new Set,J=E=>{if(E==null){if(!n[mr]?.has(e)||z.has("unfilled"))return;z.add("unfilled"),console.error(`jq79: <${ee(t)}> is declared as a prop and the parent passed nothing - nothing renders here. Pass it (:${e}="\u2026"), or drop it from the signature to use the one declared in this file.`);return}z.has("type")||(z.add("type"),console.error(`jq79: <${ee(t)}> is ${typeof E}, not a component - nothing renders here`))};return s.effect(()=>{let E=j(e,n),T=E instanceof de?E:null;if(T||J(E),T===K||(G?.dispose(),G=null,H?.destroy(),H=null,K=T,!T))return;ri(t,T);let N=new de({template:T.template,scripts:T.scripts,styles:T.styles,modules:T.modules,filename:T.filename,siblings:T.siblings,name:T.name});if(a&&(N.slots=a),Object.keys(d).length){let P=new Set;N.modelWriteback=(_,B)=>{let V=_==null?"default":ce(String(_)),ne=d[V];return ne===void 0?(P.has(V)||(P.add(V),console.warn(`jq79: <${ee(t)}> has no ${D(V)} - bound: ${Object.keys(d).map(D).join(", ")}`)),!1):x.has(V)?!1:(Pe(()=>j(zt(ne),n,{$value:B})),!0)}}p.forEach(([P,_])=>Fo(N,P,_,n));let q=ol(N.scripts);il(t,e,Object.keys(c),q),O&&al(t,e,O,q);let W=Os(Pe(I),q),U=document.createDocumentFragment();if(Zt>=ws){console.error(`jq79: <${ee(t)}> is ${ws} levels deep inside itself; giving up here. A component that renders itself stops when its data stops - is there a cycle in it?`);return}Zt++;try{(r?N.renderShadow(W):N.render(W)).mount(U)}finally{Zt--}let w=n[Tt];w&&N.holdOwner(w.owner),i?i.parentNode.insertBefore(U,i):l.appendChild(U);let M=Se(n,!0);if(C){let P=[];M.effect(()=>{let _=Os(I(),q),B=Object.keys(_);P.forEach(V=>{V in _||(N.data[V]=void 0)}),B.forEach(V=>{N.data[V]=_[V]}),P=B})}else Object.entries(c).forEach(([P,_])=>{q!==null&&!q.has(P)||M.effect(()=>{N.data[P]=j(_,n)})});G=M,H=N}),s.onDispose(()=>{G?.dispose(),H?.destroy()}),l},oi=(e,t)=>{let n=()=>{let s=j(e,t);return s!==null&&typeof s=="object"?s:null};return new Proxy(t,{has(s,r){let l=n();return l!==null&&Reflect.has(l,r)||Reflect.has(s,r)},get(s,r){let l=n();return l!==null&&Reflect.has(l,r)?l[r]:Reflect.get(s,r)},set(s,r,l){let o=n();return o!==null&&Reflect.has(o,r)?(o[r]=l,!0):Reflect.set(s,r,l)}})},wt=e=>typeof e=="string"?e.split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(wt):e!==null&&typeof e=="object"?Object.entries(e).flatMap(([t,n])=>n?wt(t):[]):[],We=(e,t)=>{if(typeof e=="string"){if(e&&!/\s/.test(e))t.push(e);else if(e)for(let n of e.split(/\s+/))n&&t.push(n)}else if(Array.isArray(e))for(let n of e)We(n,t);else if(e!==null&&typeof e=="object")for(let n in e)e[n]&&We(n,t)},Ys=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Js=(e,t,n,s,r,l)=>{let o=[];l.effect(()=>{let i=[];if(t!==void 0&&We(j(t,r),i),n)for(let[a,c]of n)j(c,r)&&We(a,i);if(!X.cachedSetters)o.forEach(a=>{!i.includes(a)&&!s.has(a)&&e.classList.remove(a)}),e.classList.add(...i);else if(!Ys(o,i)){for(let a of o)!i.includes(a)&&!s.has(a)&&e.classList.remove(a);for(let a of i)o.includes(a)||e.classList.add(a)}o=i})},ii=e=>typeof e=="function"?(t,n,s)=>{try{return!!e(t,n,s)}catch{return!1}}:typeof e=="string"||Array.isArray(e)?kn(e):()=>!1,li=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),bn=e=>e.ns===void 0?document.createElement(e.tag):document.createElementNS(e.ns,e.tag),ai={"http://www.w3.org/2000/svg":["svg","feGaussianBlur"],"http://www.w3.org/1998/Math/MathML":["math","mi"]},$s=new Map,ci=(e,t)=>{let n=`${e} ${t}`,s=$s.get(n);if(s!==void 0)return s;let r=ai[e],l=t;if(r!==void 0&&typeof DOMParser<"u"&&/^[a-z][a-z0-9]*$/.test(t)){let[o,i]=r;l=new DOMParser().parseFromString(`<${o}><${i} ${t}="x"/></${o}>`,"text/html").querySelector(i)?.getAttributeNames().find(c=>c.toLowerCase()===t)??t}return $s.set(n,l),l},er=(e,t)=>{let n=e.namespaceURI;if(n===null||n===Fs)return t;let s=t.replace(/-/g,"").toLowerCase(),r=ci(n,s);return r===s?t:r},$n=(e,t,n)=>{let s=li.has(t);(s?!n:n==null)?e.removeAttribute(t):e.setAttribute(t,s?"":String(n))},X={cloneSkeletons:!0,scopedNames:!0,batchHandlers:!0,cachedSetters:!0,compileSkeletons:!0},di=new Set([":text",":html",":value",":checked",":selected"]),ui=e=>e.startsWith("@")||e===":class"||e.startsWith(":class.")||di.has(e)?!0:e.startsWith(":")?e===":model"?!1:!be(e)&&!e.includes("."):e!==Le,tr=e=>{if(e.component||e.tag.includes("-")||ut(e.tag)||e.tag==="template"||e.ns===void 0&&document.createElement(e.tag)instanceof HTMLUnknownElement)return!1;for(let t in e.attrs)if(!ui(t))return!1;return e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?!0:e.children.every(t=>typeof t=="string"||tr(t))},nr=(e,t,n)=>{let s=bn(e),r,l=null;for(let p in e.attrs){let $=e.attrs[p];if(p.startsWith("@"))n.push({kind:"event",path:t,attr:p,expr:$});else if(p===":class")r=$;else if(p.startsWith(":class."))(l??(l=[])).push([p.slice(7),$]);else if(!be(p))if(p.startsWith(":")){let C=p.slice(1);n.push({kind:"attr",path:t,name:er(s,C),expr:$||ce(C)})}else s.setAttribute(p,$)}(r!==void 0||l)&&n.push({kind:"class",path:t,classExpr:r,toggles:l,staticClasses:new Set(wt(e.attrs.class??""))});let o=e.attrs[":text"],i=e.attrs[":html"];o!==void 0?n.push({kind:"textContent",path:t,expr:o}):i!==void 0?n.push({kind:"html",path:t,expr:i}):e.children.forEach((p,$)=>{if(typeof p=="string"){p.includes("{{")?(n.push({kind:"text",path:[...t,$],parts:dt(p)}),s.appendChild(document.createTextNode(""))):s.appendChild(document.createTextNode(p));return}s.appendChild(nr(p,[...t,$],n))});let a=e.attrs[":value"];a!==void 0&&n.push({kind:"value",path:t,expr:a});let c=e.attrs[":checked"];c!==void 0&&n.push({kind:"checked",path:t,expr:c});let d=e.attrs[":selected"];return d!==void 0&&n.push({kind:"selected",path:t,expr:d}),s},fi=3,sr=e=>e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?1:1+e.children.reduce((t,n)=>t+(typeof n=="string"?0:sr(n)),0),Ts=new WeakMap,Rs=new WeakSet,pi=e=>{let t=Ts.get(e);if(t!==void 0)return t;if(!Rs.has(e))return Rs.add(e),null;let n=null;if(tr(e)&&sr(e)>=fi){let s=[];n={skeleton:nr(e,[],s),ops:s}}return Ts.set(e,n),n},hi=(e,t)=>{let n=e;for(let s=0;s<t.length;s++){n=n.firstChild;for(let r=t[s];r>0;r--)n=n.nextSibling}return n},gi=["r","s","fx","o","K","h"],mi={ev:Ho,evalExpr:j,bindText:En,bindEvent:wn,renderText:rn,bindClassNames:(e,t,n,s)=>{for(let r of t)!n.includes(r)&&!s.has(r)&&e.classList.remove(r);for(let r of n)t.includes(r)||e.classList.add(r)},collectClassNames:(e,t)=>We(e,t),sameNames:(e,t)=>Ys(e,t),applyAttr:(e,t,n)=>$n(e,t,n),sanitizeHTML:e=>ze(e)},xs=new Map,yi=e=>{let t=[],n=new Map([["","r"]]),s=0,r=o=>{let i=o.join("."),a=n.get(i);if(a)return a;let c=o.slice(0,-1),d=o[o.length-1],p=`${r(c)}.firstChild`,$=d;for(let O=d-1;O>=0;O--){let D=n.get([...c,O].join("."));if(D){p=D,$=d-O;break}}for(let O=0;O<$;O++)p+=".nextSibling";let C=`n${s++}`;return t.push(`const ${C} = ${p}`),n.set(i,C),C},l=(o,i)=>t.push(`{ ${o}; fx.effect(() => { ${i} }) }`);return e.forEach((o,i)=>{let a=r(o.path),c=`o[${i}]`;if(o.kind==="text"){let[d]=o.parts;o.parts.length===1&&typeof d!="string"?l(`const t${i} = ${a}, e${i} = ${c}.parts[0].expr, k${i} = K[${i}]; let last${i} = t${i}.data`,`{ const v = h.ev(k${i}, e${i}, s); const x = v == null ? "" : String(v); if (x !== last${i}) t${i}.data = last${i} = x }`):l(`const t${i} = ${a}, p${i} = ${c}.parts; let last${i} = t${i}.data`,`{ const x = h.renderText(p${i}, s); if (x !== last${i}) t${i}.data = last${i} = x }`)}else if(o.kind==="event")t.push(`h.bindEvent(${a}, ${c}.attr, ${c}.expr, s)`);else if(o.kind==="attr")l(`const el${i} = ${a}, c${i} = ${c}`,`h.applyAttr(el${i}, c${i}.name, h.ev(K[${i}], c${i}.expr, s))`);else if(o.kind==="class")l(`const el${i} = ${a}, c${i} = ${c}, k${i} = K[${i}]; let b${i} = []`,`{ const next = []; if (c${i}.classExpr !== undefined) h.collectClassNames(h.ev(k${i}, c${i}.classExpr, s), next); if (c${i}.toggles) for (const [n, e] of c${i}.toggles) if (h.evalExpr(e, s)) h.collectClassNames(n, next); if (!h.sameNames(b${i}, next)) h.bindClassNames(el${i}, b${i}, next, c${i}.staticClasses); b${i} = next }`);else if(o.kind==="textContent")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.textContent !== x) el${i}.textContent = x }`);else if(o.kind==="html")l(`const el${i} = ${a}, c${i} = ${c}`,`el${i}.innerHTML = h.sanitizeHTML(String(h.ev(K[${i}], c${i}.expr, s) ?? ""))`);else if(o.kind==="value")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.value !== x) el${i}.value = x }`);else if(o.kind==="checked")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.checked !== x) el${i}.checked = x }`);else if(o.kind==="selected")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.selected !== x) el${i}.selected = x }`);else{let d=o}}),`"use strict"
18
18
  ${t.join(`
19
19
  `)}`},Ei=e=>e.map(t=>{if(t.kind==="text"){let[n]=t.parts;return t.parts.length===1&&typeof n!="string"?Ie(n.expr,He):""}return t.kind==="class"?t.classExpr!==void 0?Ie(t.classExpr,He):"":t.kind==="event"?"":Ie(t.expr,He)}),wi=e=>{let t=yi(e.ops),n=xs.get(t);if(n===void 0){try{n=Nt(gi,t)}catch{return null}xs.set(t,n)}return e.keys=Ei(e.ops),n},Si=(e,t,n)=>{let s=e.skeleton.cloneNode(!0);if(X.compileSkeletons&&X.cachedSetters&&(e.factory===void 0&&(e.factory=wi(e)),e.factory))return e.factory(s,t,n,e.ops,e.keys,mi),s;for(let r of e.ops){let l=r.path.length===0?s:hi(s,r.path);if(r.kind==="text")En(l,r.parts,t,n);else if(r.kind==="event")wn(l,r.attr,r.expr,t);else if(r.kind==="attr"){let o=l,{name:i,expr:a}=r;n.effect(()=>$n(o,i,j(a,t)))}else if(r.kind==="class")Js(l,r.classExpr,r.toggles,r.staticClasses,t,n);else if(r.kind==="textContent"){let o=l,{expr:i}=r;n.effect(()=>{let a=String(j(i,t)??"");o.textContent!==a&&(o.textContent=a)})}else if(r.kind==="html"){let o=l,{expr:i}=r;n.effect(()=>{o.innerHTML=ze(String(j(i,t)??""))})}else if(r.kind==="value"){let o=l,{expr:i}=r;n.effect(()=>{let a=String(j(i,t)??"");o.value!==a&&(o.value=a)})}else if(r.kind==="checked"){let o=l,{expr:i}=r;n.effect(()=>{let a=!!j(i,t);o.checked!==a&&(o.checked=a)})}else if(r.kind==="selected"){let o=l,{expr:i}=r;n.effect(()=>{let a=!!j(i,t);o.selected!==a&&(o.selected=a)})}else{let o=r}}return s},Tn=(e,t,n,s)=>{let r=e.attrs[":with"],l=r!==void 0?oi(r,t):t;if(ut(e.tag))return ni(e,l,n,s);if(e.tag==="template"&&Fe(e)!==void 0)return Jo(e);let o=ys(e,l);if(o)return bs(o,e,l,n,s);if(X.cloneSkeletons){let x=pi(e);if(x)return Si(x,l,n)}let i=bn(e);if(e.component!==void 0&&l[Tt]?.count===0)throw Vo(e.component,l);let a=e.ns===void 0&&(e.component!==void 0||e.tag.includes("-"));if(a){let x=!1;n.effect(()=>{if(x)return;let I=ys(e,l);if(!I)return;x=!0;let H=bs(I,e,l,n,s),K=Sn(H);n.onDispose(()=>vt(K)),i.replaceWith(H)})}for(let x in e.attrs){let I=e.attrs[x];if(x.startsWith("@"))wn(i,x,I,l);else if(x===":model"||x.startsWith(":model."))a||console.warn(`jq79: ${x} on <${ee(e)}> does nothing - :model binds component tags only (for now)`);else if(!be(x))if(x.startsWith(":"))if(a)i.setAttribute(x,I);else{let H=x.slice(1),K=I||ce(H),G=er(i,H);n.effect(()=>$n(i,G,j(K,l)))}else i.setAttribute(x,I)}let c=e.attrs[":class"],d=null;for(let x in e.attrs)x.startsWith(":class.")&&(d??(d=[])).push([x.slice(7),e.attrs[x]]);(c!==void 0||d)&&Js(i,c,d,new Set(wt(e.attrs.class??"")),l,n);let p=e.attrs[":text"],$=e.attrs[":html"],C=e.attrs[":html.allowed"];C!==void 0&&$===void 0&&console.warn("jq79: :html.allowed without :html on the same element does nothing"),p!==void 0?n.effect(()=>{let x=String(j(p,l)??"");i.textContent!==x&&(i.textContent=x)}):$!==void 0?n.effect(()=>{let x=C!==void 0?{allowUrl:ii(j(C,l))}:void 0;i.innerHTML=ze(String(j($,l)??""),x)}):i instanceof HTMLTemplateElement?xe(e.children,l,n,s,i.content):xe(e.children,l,n,s,i);let O=e.attrs[":value"];O!==void 0&&n.effect(()=>{let x=String(j(O,l)??"");i.value!==x&&(i.value=x)});let D=e.attrs[":checked"];D!==void 0&&n.effect(()=>{let x=!!j(D,l);i.checked!==x&&(i.checked=x)});let L=e.attrs[":selected"];return L!==void 0&&n.effect(()=>{let x=!!j(L,l);i.selected!==x&&(i.selected=x)}),i},bi=(e,t,n,s)=>{let r=document.createComment("if"),l=document.createDocumentFragment();l.appendChild(r);let o=null,i=null,a=null;return n.effect(()=>{let c=e.find(p=>p.expr===void 0||j(p.expr,t))??null;if(c===i||(a?.dispose(),o&&vt(o),o=null,i=c,!c))return;a=Se(t);let d=Tn(c.node,t,a,s);o=Sn(d),r.parentNode.insertBefore(d,r.nextSibling)}),n.onDispose(()=>a?.dispose()),l},ke=(e,t,n)=>{Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})},$i=e=>{let t=new Uint8Array(e.length),n=[],s=new Int32Array(e.length).fill(-1);for(let r=0;r<e.length;r++){let l=e[r];if(l<0)continue;let o=0,i=n.length;for(;o<i;){let a=o+i>>1;e[n[a]]<l?o=a+1:i=a}o>0&&(s[r]=n[o-1]),n[o]=r}for(let r=n.length?n[n.length-1]:-1;r!==-1;r=s[r])t[r]=1;return t},Ti=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},rr=(e,t)=>typeof e=="string"?t.some(n=>vs(e,n)):Object.values(e.attrs).some(n=>t.some(s=>vs(n,s)))||e.children.some(n=>rr(n,t)),or=e=>typeof e!="string"&&(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs||":each"in e.attrs||e.component!==void 0||e.tag.includes("-")||ut(e.tag)||e.children.some(or)),Ns=/[A-Za-z0-9_$]/,Ri=/^[A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*$/,vs=(e,t)=>{for(let n=e.indexOf(t);n!==-1;n=e.indexOf(t,n+1)){let s=n===0?"":e[n-1],r=e[n+t.length]??"";if(!Ns.test(s)&&!Ns.test(r))return!0}return!1},Qt=new WeakMap,xi=e=>{let t=Qt.get(e);if(t!==void 0)return t;let n=e.attrs[":each"].match(es);if(!n)return Qt.set(e,null),null;let[,s,r,l]=n,o=e.attrs[":key"],i=o===s,a=o!==void 0&&!i&&Ri.test(o)&&o.startsWith(`${s}.`)?o.slice(s.length+1):void 0,{[":each"]:c,[":key"]:d,[":window"]:p,...$}=e.attrs,C={...e,attrs:$},O=["$index",...r?[r]:[]],D=rr(C,O),L=/^[A-Z]/.test(s)||r!==void 0&&/^[A-Z]/.test(r),x=o!==void 0&&or(C),I={itemName:s,atName:r,listExpr:l,keyExpr:o,keyIsItem:i,keyProp:a,itemNode:C,readsPosition:D,namesComponent:L,nestsScopes:x,windowExpr:p};return Qt.set(e,I),I},pt=8,Ni=/^(auto|scroll|overlay)$/,vi=e=>{for(let t=e;t;t=t instanceof ShadowRoot?t.host:t.parentNode)if(!(!(t instanceof HTMLElement)||t===document.body||t===document.documentElement)&&Ni.test(getComputedStyle(t).overflowY))return t;return null},Pi=(e,t,n,s,r)=>{let l=()=>{let E=e.component!==void 0||e.tag.includes("-")?document.createElement("div"):bn(e);return E.setAttribute("aria-hidden","true"),E.setAttribute("style","height: 0px; margin: 0; padding: 0; border: 0; list-style: none; visibility: hidden"),E},o=l(),i=l(),a=we({start:0,count:-1}),c=0,d=0,p=null,$=!1,C=0,O=null,D=null,L=E=>Math.ceil(E/c)+1+2*pt,x=(E,T)=>{E=Math.max(0,Math.min(E,Math.max(0,d-T))),(a.start!==E||a.count!==T)&&Ee(()=>{a.start=E,a.count=T})},I=()=>{let E=o.getBoundingClientRect().top;if(p){let T=p.getBoundingClientRect(),N=p.scrollTop;return{listTop:E-T.top-p.clientTop+N,scrollTop:N,height:p.clientHeight||window.innerHeight}}return{listTop:E+window.scrollY,scrollTop:window.scrollY,height:window.innerHeight}},H=()=>{if(C=0,!(c>0)||!o.isConnected)return;let{listTop:E,scrollTop:T,height:N}=I();x(Math.floor((T-E)/c)-pt,L(N))},K=()=>{C||(C=typeof requestAnimationFrame=="function"?requestAnimationFrame(H):setTimeout(H,16))},G=(E,{block:T="nearest"}={})=>{if(z(),c>0&&o.isConnected){let{listTop:W,scrollTop:U,height:w}=I(),M=W+E*c,P=M+c,_=U;T==="start"?_=M:T==="end"?_=P-w:T==="center"?_=M-(w-c)/2:M<U?_=M:P>U+w&&(_=P-w),_!==U&&(p?p.scrollTop=_:window.scrollTo(window.scrollX,_)),H()}let N=a.count>0?a.count:L(window.innerHeight||800);(E<a.start||E>=a.start+N)&&x(E-pt,N);let q=r().find(W=>W.scope.$index===E);return q?q.range.first:null},z=()=>{$||!o.isConnected||($=!0,D=o.parentElement,p=vi(o.parentNode),(p??window).addEventListener("scroll",K,{passive:!0}),window.addEventListener("resize",K),p&&typeof ResizeObserver=="function"&&(O=new ResizeObserver(K),O.observe(p)),D&&Object.defineProperty(D,"$scrollTo",{value:G,configurable:!0,writable:!0}),H())};s.onDispose(()=>{C&&(typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout)(C),$&&((p??window).removeEventListener("scroll",K),window.removeEventListener("resize",K),O?.disconnect(),D&&D.$scrollTo===G&&delete D.$scrollTo)});let J=!1;return{top:o,bottom:i,range:E=>{d=E;let T=Number(j(t,n)),N=c;if(c=T>0?T:0,c&&c!==N&&$&&o.isConnected){let{listTop:w,scrollTop:M,height:P}=I(),_=Z(a);_.count=L(P),_.start=Math.max(0,Math.floor((M-w)/c)-pt)}if(!c)return o.style.height=i.style.height="0px",[0,E];let q=a.count>0?a.count:L(window.innerHeight||800),W=Math.max(0,Math.min(a.start,E-q)),U=Math.min(E,W+q);return o.style.height=`${W*c}px`,i.style.height=`${(E-U)*c}px`,[W,U]},settled:()=>{$||J||(J=!0,queueMicrotask(()=>{J=!1,z()}))}}},ki=(e,t,n,s)=>{let r=xi(e);if(!r)return document.createComment(`invalid :each expression "${e.attrs[":each"]}"`);let{itemName:l,atName:o,listExpr:i,keyExpr:a,keyIsItem:c,keyProp:d,itemNode:p,readsPosition:$,namesComponent:C,nestsScopes:O,windowExpr:D}=r,L=document.createComment("each"),x=document.createDocumentFragment();x.appendChild(L);let I=D===void 0?null:Pi(p,D,t,n,()=>H);I&&x.append(I.top,I.bottom),(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs)&&console.warn("jq79: :if/:elseif/:else on a :each element is ignored; filter the list expression instead");let H=[],K=!1;return n.effect(()=>{let G=Ko(t);try{let z=j(i,t),J=Array.isArray(z),E=J?null:Ti(z)?Object.keys(z):[],T=J?z.length:E.length,[N,q]=I?I.range(T):[0,T],W=new Map;H.forEach((u,g)=>{u.pos=g;let h=W.get(u.key);h?h.push(u):W.set(u.key,[u])});let U=new Set,w=[],M=[],P=[],_=[],B;for(let u=N;u<q;u++){let g=J?u:E[u],h=J?z[u]:z[g],S=g;c?S=h:d!==void 0&&h!==null&&typeof h=="object"?S=h[d]:a!==void 0&&(B===void 0?(B=Object.create(t),ke(B,l,h),o&&ke(B,o,g),ke(B,"$index",u)):(B[l]=h,o&&(B[o]=g),B.$index=u),S=j(a,B)),U.has(S)&&!K&&(K=!0,console.warn(`jq79: duplicate :key in :each "${e.attrs[":each"]}"; duplicates pair up by position`)),U.add(S);let m=W.get(S)?.shift();if(m&&Object.is(m.item,h)){let k=m.scope;k.$index!==u&&($&&w.push(m),k.$index=u),o&&k[o]!==g&&(k[o]=g),P.push(m),_.push(m.pos);continue}if(m&&a!==void 0){let k=m.scope;k[l]=h,k.$index!==u&&(k.$index=u),o&&k[o]!==g&&(k[o]=g),m.item=h,M.push(m),P.push(m),_.push(m.pos);continue}m&&(m.fx.dispose(),vt(m.range));let y=Object.create(t);ke(y,l,h),o&&ke(y,o,g),ke(y,"$index",u),C||Zs.add(y);let b=Se(t);O&&Object.defineProperty(y,jt,{value:b});let R=Sn(Tn(p,y,b,s));P.push({key:S,item:h,scope:y,fx:b,range:R,pos:u}),_.push(-1)}let V=new Set;W.forEach(u=>u.forEach(g=>V.add(g))),V.size&&(V.forEach(u=>{u.dead=!0,u.fx.dispose()}),Wo(Bo(H,u=>u.dead===!0)));let ne=I?I.top:L,f=$i(_);P.forEach((u,g)=>{!f[g]&&ne.nextSibling!==u.range.first&&Uo(u.range,ne),ne=u.range.last}),w.forEach(u=>Pe(()=>u.fx.refresh())),M.forEach(u=>Pe(()=>u.fx.rerun())),H=P}finally{zo(G)}I?.settled()}),n.onDispose(()=>H.forEach(G=>G.fx.dispose())),x},ir=(e,t)=>{let n=t;for(;n<e.length&&typeof e[n]=="string"&&!e[n].trim();)n++;return n},Xt=e=>{let t=":if"in e.attrs,n=":elseif"in e.attrs,s=":else"in e.attrs;if((t?1:0)+(n?1:0)+(s?1:0)<2)return;let r=[t?":if":null,n?":elseif":null,s?":else":null].filter(Boolean);console.warn(`jq79: ${r.join(" and ")} on the same <${ee(e)}> - only ${r[0]} applies; the branches of a chain are sibling elements, one directive each`)},Ci=(e,t)=>{let n=":elseif"in e.attrs?":elseif":":else";console.warn(t?`jq79: a second ${n} on <${ee(e)}> - the chain before it already ended with :else, which closes it. One :if, any number of :elseif, at most one :else`:`jq79: ${n} on <${ee(e)}> continues no :if - it renders unconditionally. A chain is :if, then :elseif, then :else, on adjacent siblings: anything but whitespace between them breaks it`)},Mi=[":if",":elseif",":else",":each"],Ai=(e,t)=>{if(e.tag!=="template"||e.ns!==void 0)return;let n=Mi.find(s=>s in e.attrs);if(n!==void 0){if(Fe(e)!==void 0){if(t?.component===void 0)return;console.warn(`jq79: ${n} on <template ${Fe(e)}> is ignored - a slot is filled with its children as written. Put ${n} on the elements inside it, or on the component's tag`);return}console.warn(`jq79: ${n} on a nested <template> shows nothing - a <template>'s children live in its .content and never reach the page. Put ${n} on the elements themselves`)}},Oi=[...Ut,":model",":slot"].map(e=>e.slice(1)),_i={":attrs":':attrs was removed in 0.7 - it now binds an attribute called "attrs". Bind them one at a time (:disabled="x", :title="y"), or :class for classes'},ji=e=>{for(let t in e.attrs){let n=_i[t];n!==void 0&&console.warn(`jq79: ${n}`)}},Li=e=>{if(!(e.component!==void 0||e.tag.includes("-")))for(let t in e.attrs){if(!t.startsWith(":")||be(t)||t===":model"||t.startsWith(":model."))continue;let n=t.slice(1);if(n.includes(".")){console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". Dotted modifiers belong to an event: if you meant @${n}, that is the spelling`);continue}let s=Oi.find(r=>n!==r&&n.startsWith(r));s!==void 0&&console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". A ":name" jq79 does not recognize binds that attribute (which is what :src and :disabled are). If you meant :${s}, that is the spelling`)}},lr=(e,t)=>{e.forEach(s=>{typeof s!="string"&&(Ai(s,t),ji(s),Li(s),lr(s.children,s))});let n=!1;for(let s=0;s<e.length;){let r=e[s];if(typeof r=="string"){r.trim()&&(n=!1),s++;continue}if(":each"in r.attrs){n=!1,s++;continue}if(Xt(r),":if"in r.attrs){s++;let l=i=>{let a=ir(e,s),c=e[a];if(typeof c=="object"&&i in c.attrs)return s=a+1,c};for(let i=l(":elseif");i;i=l(":elseif"))Xt(i);let o=l(":else");o&&Xt(o),n=o!==void 0;continue}(":elseif"in r.attrs||":else"in r.attrs)&&Ci(r,n),n=!1,s++}},Ps=new WeakMap,Di=(e,t,n)=>{let s=Ps.get(t);if(s)return s;let r=[{expr:t.attrs[":if"],node:t}],l=n+1,o=c=>{let d=ir(e,l),p=e[d];if(typeof p=="object"&&c in p.attrs)return l=d+1,p};for(let c=o(":elseif");c;c=o(":elseif"))r.push({expr:c.attrs[":elseif"],node:c});let i=o(":else");i&&r.push({node:i});let a={branches:r,next:l};return Ps.set(t,a),a},xe=(e,t,n,s=!1,r)=>{let l=r??document.createDocumentFragment(),o=0;for(;o<e.length;){let i=e[o];if(typeof i=="string"){let a=document.createTextNode(i);i.includes("{{")&&En(a,qo(i),t,n),l.appendChild(a),o++;continue}if(":each"in i.attrs){l.appendChild(ki(i,t,n,s)),o++;continue}if(":if"in i.attrs){let a=Di(e,i,o);l.appendChild(bi(a.branches,t,n,s)),o=a.next;continue}l.appendChild(Tn(i,t,n,s)),o++}return l},Ii=(e,t,n=!1)=>xe(e.template,t,Se(t),n),Oe="data-jq79",Hi=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0).toString(36)},ar=(e,t)=>{e.forEach(n=>{typeof n!="string"&&(n.attrs[Oe]=t,ar(n.children,t))})},qi=/^:(before|after|first-line|first-letter)(?![\w-])/i,cr=(e,t)=>{let n=0;for(let s=0;s<e.length;s++){let r=e[s];if(r==="\\")s++;else if(r==='"'||r==="'")for(s++;s<e.length&&e[s]!==r;)s+=e[s]==="\\"?2:1;else if(r==="("||r==="[")n++;else if(r===")"||r==="]")n--;else if(n===0&&t(s))return}},Fi=(e,t)=>{let n=e.length;return cr(e,s=>e[s]!==":"||e[s+1]!==":"&&!qi.test(e.slice(s))?!1:(n=s,!0)),`${e.slice(0,n)}[${Oe}="${t}"]${e.slice(n)}`},Wi=(e,t)=>{let n=dr(e),s=n.match(/^\s*/)[0],r=n.match(/\s*$/)[0],l=n.slice(s.length,n.length-r.length);if(!l)return e;let o=[],i=0;return cr(l,a=>{l[a]===","&&(o.push(l.slice(i,a)),i=a+1)}),o.push(l.slice(i)),s+o.map(a=>a.trim()&&Fi(a.trim(),t)).join(", ")+r},dr=e=>{let t="";for(let n=0;n<e.length;){let s=e[n];if(s==="/"&&e[n+1]==="*"){let r=e.indexOf("*/",n+2);n=r===-1?e.length:r+2}else if(s==='"'||s==="'"){let r=n+1;for(;r<e.length&&e[r]!==s;)r+=e[r]==="\\"?2:1;t+=e.slice(n,r+1),n=r+1}else s==="\\"?(t+=e.slice(n,n+2),n+=2):(t+=s,n++)}return t},Bi=/(^|[\s>+~,(])([A-Z][A-Za-z0-9]*)(?![\w-])/g,Ui=/[a-z]/,Ki=e=>e.replace(Bi,(t,n,s)=>Ui.test(s)?`${n}${De(s)}`:t),ur=/^\s*@(media|supports|container|layer|scope|document)\b/i,fr=/^\s*@/,zi=e=>{let t="",n="",s="",r=[],l=()=>r.length===0||r[r.length-1],o=()=>{t+=l()&&!fr.test(s)?Ki(n):n,n=""},i=c=>{o(),t+=c,s+=c},a=(c,d)=>{o(),t+=c,s="",d!==void 0?r.push(d):c==="}"&&r.pop()};for(let c=0;c<e.length;){let d=e[c];if(d==="/"&&e[c+1]==="*"){let p=e.indexOf("*/",c+2),$=p===-1?e.length:p+2;i(e.slice(c,$)),c=$}else if(d==='"'||d==="'"){let p=c+1;for(;p<e.length&&e[p]!==d;)p+=e[p]==="\\"?2:1;i(e.slice(c,Math.min(p+1,e.length))),c=p+1}else d==="{"?(a("{",ur.test(s)),c++):d==="}"||d===";"?(a(d),c++):(n+=d,s+=d,c++)}return o(),t},Gi=(e,t)=>{/:deep\(|::v-deep|>>>/.test(e)&&console.warn("jq79: :deep()/::v-deep/>>> are not supported in <style scoped>; the rule will be dropped by the browser");let n="",s="",r=[],l=()=>r.length===0||r[r.length-1];for(let o=0;o<e.length;){let i=e[o],a=i;if(i==="/"&&e[o+1]==="*"){let c=e.indexOf("*/",o+2);a=e.slice(o,c===-1?e.length:c+2)}else if(i==='"'||i==="'"){let c=o+1;for(;c<e.length&&e[c]!==i;)c+=e[c]==="\\"?2:1;a=e.slice(o,c+1)}else i==="\\"&&(a=e.slice(o,o+2));if(o+=a.length,!l())n+=a,a==="{"?r.push(!1):a==="}"&&r.pop();else if(a==="{"){let c=dr(s),d=fr.test(c);n+=(d?s:Wi(s,t))+"{",r.push(d&&ur.test(c)),s=""}else a==="}"||a===";"?(n+=s+a,s="",a==="}"&&r.pop()):s+=a}return n+s},on=e=>{let t=Yn(e),s=new DOMParser().parseFromString(`<template>${t}</template>`,"text/html").querySelector("template"),r=[],l=[];Array.from(s.content.children).forEach(a=>{a.tagName==="TEMPLATE"?l.push(a):r.push(a)});let o=ks(r,e),i={};return l.forEach(a=>{let c=a.getAttribute("name");if(c===null){console.warn("jq79: a top-level <template> without a name declares nothing and was ignored");return}if(!Jn.test(c)){console.warn(`jq79: <template name="${c}"> was ignored - a component name has to be PascalCase, or no tag could ever reference it (only capitalized names resolve as components)`);return}if(c in i){console.warn(`jq79: two <template name="${c}"> in one file; the second was ignored`);return}i[c]=new de({...ks(Array.from(a.content.children),a.innerHTML),siblings:i,name:c})}),Object.keys(i).length&&(o.siblings=i),o},Vi=/^(?:text|application)\/(?:x-)?typescript$/i,Zi=e=>"lang"in e?`lang="${e.lang}"`:Vi.test(e.type?.trim()??"")?`type="${e.type}"`:null,ks=(e,t)=>{let n=[],s=[],r=[];e.forEach(o=>{let i={attrs:qs(o),content:o.textContent??""};o.tagName==="SCRIPT"?n.push(i):o.tagName==="STYLE"?s.push(i):r.push(Ws(o))}),n.forEach(o=>{let i=Zi(o.attrs);i&&console.warn(`jq79: <script ${i}> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its types were never stripped: the script will throw, or - for a plain \`let x: T = ...\` - silently fail to declare x.`)}),s.forEach(o=>{"lang"in o.attrs&&console.warn(`jq79: <style lang="${o.attrs.lang}"> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its styles were left uncompiled and the browser will ignore them.`)}),s.forEach(o=>{"lang"in o.attrs||(o.content=zi(o.content))});let l=o=>"scoped"in o.attrs&&!("lang"in o.attrs);if(s.some(l)){let o=Hi(t);ar(r,o),s.forEach(i=>{l(i)&&(i.scoped=Gi(i.content,o))})}return lr(r),{template:r,scripts:n,styles:s}},pr=/\.html?([?#]|$)/,St=e=>pr.test(e)?fn(e):import(e),Rn=/^(?:\.\.?\/|\/|[a-z][a-z0-9+.-]*:)/i,ln=(e,t)=>{if(!Rn.test(e))return e;try{return new URL(e,new URL(t??"",document.baseURI)).href}catch{return e}},Qi=(e,t)=>e?`
20
20
  //# sourceURL=${e}?jq79-script=${t}`:"",hr=(e,t,n)=>{try{return Nt(e,t,Qi(n.filename,n.index??0))}catch(s){throw s instanceof Ae?new Error(`jq79: safeEval() is on, and script ${n.index??0} of ${n.filename??"a component built from a string"} ${s.reason}. ${s.hint}`):s}},Cs=e=>e.scoped??e.content,qe=`:where([${Xs}]) { display: contents }`,xn=()=>pn&&typeof Document<"u"&&"adoptedStyleSheets"in Document.prototype,bt=e=>{let t=new CSSStyleSheet;return t.replaceSync(e),t},Nn=(e,t)=>{e.adoptedStyleSheets.includes(t)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])},an=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(n=>n!==t)},ht=null,cn=null,Xi=()=>{if(xn()){Nn(document,cn??(cn=bt(qe)));return}ht?.isConnected||(ht=document.createElement("style"),ht.textContent=qe,document.head.appendChild(ht))},$t=new Map,Yi=e=>{let t=$t.get(e);if(!t){if(xn()){let n=bt(e);Nn(document,n),t={sheet:n,count:0}}else{let n=document.createElement("style");n.textContent=e,document.head.appendChild(n),t={el:n,count:0}}$t.set(e,t)}t.count++},Ji=e=>{let t=$t.get(e);t&&--t.count<=0&&(t.sheet?an(document,t.sheet):t.el?.remove(),$t.delete(e))},el=(e,t,n,s={},r=St,l={})=>{let o={...Rr,...s},i=new Proxy(t,{has:(d,p)=>p!=="$__effect"&&p!=="$__import"&&p!=="$__state"&&(Reflect.has(d,p)||!(p in globalThis)&&!(p in o))}),a={},c=hr(ss(Object.keys(o)),rs(e),l)(i,n,r,a,...Object.values(o));return c.catch(d=>console.error("jq79: error in :setup script",d)),zs(c),{settled:c,sync:a.done===!0}},Ms=(e,t)=>{t?.forEach(({name:n,default:s})=>{e[n]===void 0&&(e[n]=s===void 0?void 0:j(s,e))})},Pt=e=>{let t=new Map;return n=>{if(t.has(n))return t.get(n);let s=e(n);return t.set(n,s),s}},gr=e=>(e?.forEach(t=>Object.freeze(t)),e&&Object.freeze(e),e),tl=Pt(Gn),dn=Pt(e=>gr(at(e))),nl=Pt(e=>{let t=it(e);return Object.freeze(t.vars),Object.freeze(t)}),sl=Pt(e=>gr(ls({attrs:{":setup":e},content:""}))),un=e=>{let t=e.attrs[":setup"],n=t===void 0?null:sl(t);return!n&&e.attrs[":setup"]!==void 0&&rl(e,e.attrs[":setup"]),n},As=new WeakSet,rl=(e,t)=>{t.trim()==="_"||As.has(e)||(As.add(e),console.warn(`jq79: :setup="${t}" is not a props pattern, so this component declares no signature and takes whatever a parent passes - write the props it takes ("{ a, b }"), a bare :setup for none, or "_" to stay open on purpose`))},ol=e=>{let t=null;return e.forEach(n=>{let s=dn(n.content)??un(n);if(!s)return;let r=t??(t=new Set);s.forEach(({name:l})=>r.add(l))}),t},Os=(e,t)=>{if(t===null)return e;let n={};return Object.keys(e).forEach(s=>{t.has(s)&&(n[s]=e[s])}),n},_s=new WeakMap,il=(e,t,n,s)=>{if(s===null)return;let r=_s.get(e)??new Set;_s.set(e,r),n.forEach(l=>{s.has(l)||r.has(l)||(r.add(l),console.warn(`jq79: :${l} is not declared by <${t}> - add it to the :setup signature, or drop it`))})},ll=new Set([":value",":checked",":selected",":text",":html",":class"]),js=new WeakSet,al=(e,t,n,s)=>{if(s===null||js.has(e))return;let r=n.filter(l=>s.has(l));r.length&&(js.add(e),r.forEach(l=>console.warn(`jq79: :${l} on <${t}> is a directive, not a prop - <${t}> never receives its "${l}". Rename the prop (${r.map(o=>`:${o}`).join(", ")} are reserved on a component tag), or use :model for a value that goes both ways`)))},cl=(e,t)=>{if(!e)return null;let n=Object.create(null),s=!1;return Object.entries(e).forEach(([r,l])=>{t.has(r)||(n[r]=l,s=!0)}),s?n:null},mr=Symbol("jq79.unfilledProps"),Tt=Symbol("jq79.pendingScripts"),dl=e=>e&&e.default!==void 0?e.default:e,ul=(e,t,n,s={},r=St,l={})=>{let o={...Rr,...s},i={},a=hr(os(Object.keys(o)),is(e),l)(i,dl,r,...Object.values(o)),c=O=>console.error("jq79: error in factory script",O),d=!1,p,$=()=>{if(d)return p;d=!0;let O=i.default;if(typeof O!="function")return;let D=L=>{L&&typeof L=="object"&&Object.assign(t,L)};try{let L=O(t,{$data:t,$props:t,$effect:n,...s});L instanceof Promise?p=L.then(D).catch(c):D(L)}catch(L){c(L)}return p},C=a.then($,c);return zs(C),i.done&&$(),{settled:C,sync:i.done===!0&&p===void 0}},fl="__JQ79_HMR_ENABLED__",pl="__JQ79_HMR__",Re=null,hl=e=>{if(!Re||!e.filename)return;let t=Re.get(e.filename);t||Re.set(e.filename,t=new Set),t.add(new WeakRef(e))},Yt=e=>{try{return new URL(e,document.baseURI).pathname}catch{return e}},yr=(e,t)=>{if(!Re)return 0;let n=Yt(e),s=on(t);te?.forEach((i,a)=>{Yt(a)===n&&te.set(a,Promise.resolve(t))});let r=!1,l=i=>i.name===void 0?s:s.siblings?.[i.name]??null,o=0;for(let[i,a]of Re)if(Yt(i)===n){for(let c of a){let d=c.deref();if(!d){a.delete(c);continue}let p=l(d);if(!p){r=!0;continue}d.hotReplace(p)&&o++}a.size||Re.delete(i)}return r?0:o},Er=()=>{Re??(Re=new Map),globalThis[pl]={update:yr}},Ls=3e3,gl=(e,t)=>{let n=setTimeout(()=>{console.warn(`jq79: ${e.name?`<${e.name}>`:"a component"}${e.filename?` (${e.filename})`:""} has been waiting ${Ls/1e3}s for a :setup script and has rendered nothing. The template waits until every script returns or calls $mounted() - add an await $mounted() above the slow part to render first and fill in after.`)},Ls);n?.unref?.(),Promise.all(t).then(()=>clearTimeout(n))},wr=e=>{if(Rn.test(e))return e;let t=xl.resolve;if(typeof t!="function")return e;try{return t(e)}catch{return e}},te=new Map,Sr=e=>{try{return new URL(e,document.baseURI).href.replace(/#.*$/,"")}catch{return e}},Ds=e=>Promise.all([fetch(e).then(t=>{if(!t.ok)throw new Error(`failed to fetch component from ${e}: ${t.status}`);return t.text()}),Tr?.then(()=>$l(e))]).then(([t])=>t),br=e=>{if(!te)return Ds(e);let t=Sr(e),n=te.get(t);if(!n){n=Ds(e),te.set(t,n);let s=n;s.catch(()=>{te?.get(t)===s&&te.delete(t)})}return n},fn=async e=>{let t=wr(e),n=await br(t);return new de(n,{filename:t})},Is=new WeakSet,Hs=new Set,ml=e=>{if(Hs.has(e))return;Hs.add(e);let t=document.createElement("link");t.rel="modulepreload";let n=hn();n&&t.setAttribute("nonce",n),t.href=e,document.head.append(t)},yl=/<script\b(?:"[^"]*"|'[^']*'|[^>"'])*>([\s\S]*?)<\/script\s*>/gi,Rt=new Set,$r=(e,t,n)=>{for(let{spec:s,kind:r}of Vn(e)){if(r==="component"&&n&&s in n)continue;let l=wr(r==="fetch"?s:ln(s,r==="component"?t:void 0));r==="fetch"||pr.test(l)?te&&br(l).then(o=>El(o,l),()=>{}):Rn.test(l)&&ml(l)}},El=(e,t)=>{let n=Sr(t);if(!Rt.has(n)){Rt.add(n);for(let[,s]of e.matchAll(yl))$r(s,t,void 0)}},wl=(e,t,n)=>{for(let s of e)Is.has(s)||(Is.add(s),$r(s.content,t,n))},Tr,Sl="/jq79-sw.js",bl=async e=>{let t=typeof navigator>"u"?void 0:navigator.serviceWorker;if(!t)throw new Error("jq79: safeEval() compiles components in a service worker, and this page can't have one - service workers need https (or localhost). Precompile with the jq79/vite plugin instead, or use safeEval({ nonce: true }) on a page whose server issues a nonce.");let n;try{n=await t.register(e)}catch(s){throw new Error(`jq79: safeEval() couldn't register its service worker at ${e} (${s.message}). Serve jq79-sw.js from the jq79 package at your site's root, or pass its URL: safeEval({ worker: "/path/jq79-sw.js" }).`)}await t.ready,!t.controller&&await new Promise(s=>{t.addEventListener("controllerchange",()=>s(),{once:!0}),t.controller?s():n.active?.postMessage("jq79:claim")})},$l=e=>{let t=new URL(e,document.baseURI);return t.hash="",t.searchParams.set(ds,""),new Promise((n,s)=>{let r=document.createElement("script"),l=hn();l&&r.setAttribute("nonce",l),r.src=t.href,r.onload=()=>{r.remove(),n()},r.onerror=()=>{r.remove(),s(new Error(`jq79: the precompiled functions of ${e} did not load, and safeEval() can't render it without them`))},document.head.append(r)})},pe=class pe{constructor(t,n={}){A(this,"template");A(this,"scripts");A(this,"styles");A(this,"modules");A(this,"filename");A(this,"siblings");A(this,"name");A(this,"slots");A(this,"modelWriteback");A(this,"data",null);A(this,"fx",null);A(this,"content",null);A(this,"startMarker",null);A(this,"endMarker",null);A(this,"styleEls",[]);A(this,"shadowCss",null);A(this,"shadowSheets",[]);A(this,"sheetRoot",null);A(this,"ownsSharedStyles",!1);A(this,"useShadow",!1);A(this,"mountRoot",null);A(this,"resolveMounted",null);A(this,"renderDone",!1);A(this,"held",0);A(this,"onPaint",null);A(this,"destroyHooks",null);A(this,"attachHooks",null);A(this,"detachHooks",null);A(this,"onPage",!1);A(this,"emitListeners",new Map);let s=typeof t=="string"?on(t):t;this.template=s.template,this.scripts=s.scripts,this.styles=s.styles,this.modules=n.modules??(typeof t=="string"?void 0:t.modules),this.filename=n.filename??(typeof t=="string"?void 0:t.filename),this.siblings=s.siblings,this.name=s.name,this.adoptSiblings(),hl(this)}adoptSiblings(){this.siblings&&Object.entries(this.siblings).forEach(([t,n])=>{n.filename??(n.filename=this.filename),n.modules??(n.modules=this.modules),this.name||(this[t]=n)})}hotReplace(t){let n=typeof t=="string"?on(t):t;mn.clear(),Te.clear(),sn.clear();let s=this.startMarker,r=!!(s&&this.content),l=r&&s.isConnected,o=l?s.parentNode:null,i=l?this.endMarker.nextSibling:null,a={...this.data},c=this.useShadow;return r&&this.destroy(),this.template=n.template,this.scripts=n.scripts,this.styles=n.styles,this.siblings=n.siblings,this.adoptSiblings(),!r||(this.renderWith(a,c),!o)?!1:(c&&this.placeShadowStyles(o,i),o.insertBefore(this.content,i),this.mountRoot=o,this.settleMounted(),!0)}static debug(t){if(t){let n=X.scopedNames;for(let s in t){let r=t[s];Object.prototype.hasOwnProperty.call(X,s)?typeof r=="boolean"?X[s]=r:console.warn(`jq79: Component79.debug ignored "${s}" - the flags are booleans, and the ones it knows are: ${Object.keys(X).join(", ")}`):console.warn(`jq79: Component79.debug does not know "${s}" - the flags it has are: ${Object.keys(X).join(", ")}`)}X.scopedNames!==n&&mt.clear()}return{...X}}static safeEval(t={}){pn=!0;let n=[];if(t.nonce){let r=hn();r===void 0?n.push(Promise.reject(new Error("jq79: safeEval({ nonce: true }) found no nonce on this page - no <script> carries one. The nonce belongs on the script that loads the page, the one the CSP names."))):tn=r}let s=t.worker??(t.nonce?!1:Sl);return s!==!1&&n.push(Tr??(Tr=bl(s))),Promise.all(n).then(()=>{})}static cache(t){return t===!1?(te=null,Rt.clear()):t===!0&&(te??(te=new Map)),!!te}static clearCache(){te?.clear(),Rt.clear()}static fetch(t){if(Array.isArray(t))throw new TypeError("Component79.fetch takes one URL; use fetchAll for an array");return new xt(fn(t))}static fetchAll(t){return Promise.all(t.map(fn))}static importAll(t){if(!Array.isArray(t))throw new TypeError("Component79.importAll takes an array; use import() for one");return Promise.all(t.map(n=>St(ln(n,void 0))))}on(t,n){return this.emitListeners.has(t)||this.emitListeners.set(t,new Set),this.emitListeners.get(t).add(n),this}off(t,n){return this.emitListeners.get(t)?.delete(n),this}render(t={}){return this.renderWith(t,!1)}renderShadow(t={}){return this.renderWith(t,!0)}renderWith(t,n){this.destroy();let s=as(this.scripts,un,dn),r=cl(this.siblings,s),l=r?Object.assign(Object.create(r),t):{...t},o=new Set([...s].filter(w=>!(w in t)));o.size&&Object.defineProperty(l,mr,{value:o}),this.slots&&Object.defineProperty(l,Qs,{value:this.slots}),Object.defineProperty(l,Tt,{value:{count:0,owner:this}});let i=we(l),a=Se(i);this.data=i,this.fx=a,this.useShadow=n,this.startMarker=document.createComment("jq79"),this.endMarker=document.createComment("/jq79");let c=this.startMarker,d=!1,p=(w,M)=>{w==="model:update"&&!d&&(d=!0,console.warn("jq79: $emit('model:update', \u2026) no longer feeds :model - call $updateModel(value) or $updateModel(name, value) instead"));let P=new CustomEvent(w,{detail:M,bubbles:!0,composed:!0,cancelable:!0});return c===this.startMarker&&this.emitListeners.get(w)?.forEach(_=>_(P,M)),P.cancelBubble||c.dispatchEvent(P),!P.defaultPrevented},$,C=new Promise(w=>{$=w});this.resolveMounted=$,this.renderDone=!1,this.held=0;let O=w=>{if(typeof w!="function")throw new TypeError("jq79: $destroyed expects a function");return c!==this.startMarker?(Ce(w,"$destroyed"),()=>{}):Jt(this.destroyHooks??(this.destroyHooks=[]),w)},D=(w,{immediate:M=!0}={})=>{if(typeof w!="function")throw new TypeError("jq79: $attached expects a function");if(c!==this.startMarker)return()=>{};this.watchPage();let P=Jt(this.attachHooks??(this.attachHooks=[]),w);return M&&this.onPage&&Ce(w,"$attached"),P},L=w=>{if(typeof w!="function")throw new TypeError("jq79: $detached expects a function");return c!==this.startMarker?(Ce(w,"$detached"),()=>{}):(this.watchPage(),Jt(this.detachHooks??(this.detachHooks=[]),w))},x=w=>{let M=Je(w);return O(()=>M.$dispose()),M},I=this.endMarker,H=(w=>{let M=[];for(let P=c.nextSibling;P&&P!==I;P=P.nextSibling)P instanceof Element&&(P.matches(w)&&M.push(P),M.push(...Array.from(P.querySelectorAll(w))));return M}),K=(w=>H(w)[0]??null),G=this.modules,z=w=>G&&w in G?Promise.resolve(G[w]):St(ln(w,this.filename)),J=w=>{if(!Array.isArray(w))throw new TypeError("$importAll takes an array; use import() for one");return Promise.all(w.map(z))},T=Object.assign(Object.create(null),{$emit:p,$updateModel:(...w)=>{let[M,P]=w.length>1?w:[void 0,w[0]];return c!==this.startMarker?!1:this.modelWriteback?.(M,P)??!1},$slots:Object.fromEntries(Object.keys(this.slots??{}).map(w=>[w,!0]))}),N=[],q=!0;wl(this.scripts,this.filename,this.modules),this.scripts.forEach((w,M)=>{let P;N.push(new Promise(S=>{P=S}));let _=!1,B=()=>{_=!0,P()},ne={$mounted:()=>(B(),C),$destroyed:O,$attached:D,$detached:L,$computed:x,$self:K,$$self:H,...T,$importAll:J,...r},f={filename:this.filename,index:M},u=":mounted"in w.attrs,g=tl(w.content),h=(()=>{if(g!==null){u&&console.warn("jq79: :mounted on a factory script renders the template before the factory has returned, so none of its bindings exist yet - await $mounted() inside the factory instead."),Ms(i,dn(w.content));let b=u?Vt(g):g;return ul(b,i,R=>a.effect(R),ne,z,f)}let{vars:S,code:m}=nl(w.content);Ms(i,un(w)),S.forEach(b=>{b in i||(i[b]=void 0)});let y=u?Vt(m):m;return el(y,i,b=>a.effect(b),ne,z,f)})();if(h.sync)h.settled.then(B,B);else{let S=l[Tt];S.count++;let m=()=>{S.count--,B()};h.settled.then(m,m)}!h.sync&&!_&&(q=!1)});let W=document.createDocumentFragment(),U=new Proxy(i,{has:(w,M)=>typeof M=="string"&&M in T||Reflect.has(w,M),get:(w,M,P)=>typeof M=="string"&&M in T&&!Reflect.has(w,M)?T[M]:Reflect.get(w,M,P)});if(W.append(this.startMarker,this.endMarker),this.content=W,q?(this.endMarker.parentNode.insertBefore(xe(this.template,U,a,n),this.endMarker),this.renderDone=!0,this.settleMounted()):(Promise.all(N).then(()=>{c===this.startMarker&&(this.endMarker.parentNode.insertBefore(xe(this.template,U,a,n),this.endMarker),this.renderDone=!0,this.settleMounted(),pe.settleAttached())}),gl(this,N)),n)if(xn())this.shadowCss=[...this.styles.map(w=>w.content),qe];else{let w=document.createElement("style");w.textContent=qe,this.styleEls=[...this.styles.map(M=>{let P=document.createElement("style");return P.textContent=M.content,P}),w]}else this.styles.forEach(w=>Yi(Cs(w))),this.ownsSharedStyles=!0;return this}mount(t,n){let s=typeof t=="string"?Ne(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0)&&this.renderWith(n??{},this.useShadow),this.attach(s)}mountShadow(t,n){let s=typeof t=="string"?Ne(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0||!this.useShadow)&&this.renderWith(n??{},!0),this.attach(s)}attach(t){this.mountRoot&&this.detach();let n=this.useShadow&&t instanceof Element?t.shadowRoot??t.attachShadow({mode:"open"}):t;return this.useShadow&&this.placeShadowStyles(n,null),n.appendChild(this.content),this.mountRoot=n,this.settleMounted(),pe.settleAttached(),this}isOnPage(){return this.renderDone&&this.startMarker?.isConnected===!0}watchPage(){me.has(this)||(me.add(this),this.onPage=this.isOnPage(),this.onPage||pe.queueSettle())}static queueSettle(){en||(en=!0,queueMicrotask(()=>{en=!1,pe.settleAttached()}))}static settleAttached(){if(me.size===0)return;let t=[...me].filter(n=>!n.onPage&&n.isOnPage());pe.inDocumentOrder(t).forEach(n=>{n.onPage||!me.has(n)||(n.onPage=!0,n.attachHooks?.slice().forEach(s=>Ce(s,"$attached")))})}notifyDetached(){if(me.size===0)return;let t=[];if(this.startMarker?.isConnected){let n=new Set;for(let r=this.startMarker;r&&(n.add(r),r!==this.endMarker);r=r.nextSibling);let s=r=>{for(;r;r=r.parentNode)if(n.has(r))return!0;return!1};t=pe.inDocumentOrder([...me].filter(r=>r.onPage&&s(r.startMarker)))}else this.onPage&&(t=[this]);t.forEach(n=>{n.onPage&&(n.onPage=!1,n.detachHooks?.slice().forEach(s=>Ce(s,"$detached")))})}static inDocumentOrder(t){return t.sort((n,s)=>n.startMarker.compareDocumentPosition(s.startMarker)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}placeShadowStyles(t,n){if(this.shadowCss&&typeof ShadowRoot<"u"&&t instanceof ShadowRoot){this.sheetRoot&&this.sheetRoot!==t&&this.shadowSheets.forEach(s=>an(this.sheetRoot,s)),this.shadowSheets.length===0&&(this.shadowSheets=this.shadowCss.map(s=>s===qe?cn??(cn=bt(s)):bt(s))),this.shadowSheets.forEach(s=>Nn(t,s)),this.sheetRoot=t;return}this.shadowCss&&this.styleEls.length===0&&(this.styleEls=this.shadowCss.map(s=>{let r=document.createElement("style");return r.textContent=s,r})),this.styleEls.forEach(s=>t.insertBefore(s,n))}settleMounted(){if(!this.renderDone||this.held>0)return;let t=this.onPaint;this.onPaint=null,t?.(),this.mountRoot&&this.resolveMounted?.()}holdOwner(t){this.renderDone&&this.held===0||(t.held++,this.onPaint=()=>{t.held--,t.settleMounted()})}detach(){if(!this.mountRoot||!this.content||!this.startMarker||!this.endMarker)return this;this.notifyDetached();let t=this.startMarker;for(;t;){let n=t.nextSibling;if(this.content.appendChild(t),t===this.endMarker)break;t=n}return this.mountRoot=null,this}destroy(){this.notifyDetached(),me.delete(this),this.attachHooks=null,this.detachHooks=null,this.onPage=!1;let t=this.destroyHooks;this.destroyHooks=null,t?.forEach(s=>Ce(s,"$destroyed")),this.resolveMounted=null;let n=this.onPaint;return this.onPaint=null,n?.(),this.detach(),this.fx?.dispose(),this.fx=null,this.data?.$dispose(),this.styleEls.forEach(s=>s.parentNode?.removeChild(s)),this.styleEls=[],this.sheetRoot&&this.shadowSheets.forEach(s=>{s!==cn&&an(this.sheetRoot,s)}),this.shadowCss=null,this.shadowSheets=[],this.sheetRoot=null,this.ownsSharedStyles&&(this.styles.forEach(s=>Ji(Cs(s))),this.ownsSharedStyles=!1),this.content=null,this.startMarker=null,this.endMarker=null,this.renderDone=!1,this.data=null,this.resolveMounted=null,this}};A(pe,"version",Po);var de=pe,xt=class{constructor(t){A(this,"chain");this.chain=t}queue(t){return this.chain=this.chain.then(n=>(t(n),n)),this}then(t,n){return this.chain.then(t,n)}catch(t){return this.chain.catch(t)}finally(t){return this.chain.finally(t)}mount(t,n){return this.queue(s=>s.mount(t,n))}mountShadow(t,n){return this.queue(s=>s.mountShadow(t,n))}render(t={}){return this.queue(n=>n.render(t))}renderShadow(t={}){return this.queue(n=>n.renderShadow(t))}on(t,n){return this.queue(s=>s.on(t,n))}off(t,n){return this.queue(s=>s.off(t,n))}detach(){return this.queue(t=>t.detach())}destroy(){return this.queue(t=>t.destroy())}};var Tl=e=>new de(e),Ce=(e,t)=>{try{e()}catch(n){console.error(`jq79: error in a ${t} hook`,n)}},Jt=(e,t)=>(e.push(t),()=>{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}),me=new Set,en=!1,Rr={$:Ne,$$:Ue,$create:Ke,$reactive:we,$toRaw:Z,$raw:Ze,$batch:Ee,$tick:Xe,Component79:de,C79:de};typeof globalThis<"u"&&globalThis[fl]&&Er();0&&(module.exports={$,$$,$batch,$computed,$create,$raw,$reactive,$tick,$toRaw,C79,Component79,PendingComponent79,enableHotReload,hotUpdate,parseComponent,renderComponent});
@@ -14,7 +14,7 @@ ${e}
14
14
  ;$__exports.done = true })()`,ls=e=>{let t=e.attrs[":setup"];return t===void 0?null:t.trim()===""?[]:je(t)},as=(e,t,n=at)=>{let s=new Set;return e.forEach(r=>{(n(r.content)??t(r))?.forEach(({name:o})=>s.add(o))}),s};var cs="__jq79precompiled",ds="jq79-precompiled",us=(e,t)=>`function anonymous(${e.join(",")}
15
15
  ) {
16
16
  ${t}
17
- }`;var xl={};var Po="0.8.1",qs=e=>Object.fromEntries(Array.from(e.attributes).map(t=>[t.name,t.value])),Fs="http://www.w3.org/1999/xhtml",Ws=e=>{let t=qs(e),n=e.namespaceURI,s=t[Le];delete t[Le];let r=n!==null&&n!==Fs;return{tag:r?e.tagName:e.tagName.toLowerCase(),attrs:t,...s===void 0?{}:{component:s},...r?{ns:n}:{},children:Array.from((e instanceof HTMLTemplateElement?e.content:e).childNodes).flatMap(l=>{if(l.nodeType===Node.TEXT_NODE){let o=l.textContent??"";return o?[o]:[]}return l.nodeType===Node.ELEMENT_NODE?[Ws(l)]:[]})}},mt=new Map,gt=new Map,pn=!1,tn,Ae=class extends Error{constructor(n,s){super(`${n}. ${s}`);A(this,"reason",n);A(this,"hint",s)}},ko=()=>new Ae("was not precompiled","Safe mode never builds code at runtime: the component's precompiled functions did not reach the page."),Co=(e,t)=>{let n=globalThis[cs];if(Array.isArray(n)&&n.length>0)for(let[s,r,l]of n.splice(0))gt.set(ft(s,r),l);return gt.size===0?void 0:gt.get(ft(e,t))},Nt=(e,t,n="")=>{let s=Co(e,t);if(s===null)throw new SyntaxError("jq79: this code did not compile when it was precompiled");if(s!==void 0)return s;if(tn!==void 0)return Mo(e,t,n,tn);if(pn)throw ko();return new Function(...e,t+n)},hn=()=>{if(!(typeof document>"u"))for(let e of Array.from(document.querySelectorAll("script[nonce]"))){let t=e.nonce||e.getAttribute("nonce");if(t)return t}},fs="__jq79built",Mo=(e,t,n,s)=>{let r=document.createElement("script");r.setAttribute("nonce",s),r.textContent=`document.currentScript.${fs} = ${us(e,t)}${n}`;let l,o=a=>{l=a.error??new SyntaxError(a.message),a.preventDefault()};window.addEventListener("error",o);try{(document.head??document.documentElement).append(r)}finally{window.removeEventListener("error",o),r.remove()}let i=r[fs];if(typeof i=="function")return gt.set(ft(e,t),i),i;throw l!==void 0?l:new Ae("could not be built","The page's CSP refused a <script> carrying the nonce jq79 read from the page.")},ps=new Set,Ao=(e,t)=>{ps.has(e)||(ps.add(e),console.error(`jq79: safeEval() is on, and "${e}" ${t.reason}, so it rendered as nothing. ${t.hint}`))},Me=(e,t)=>{if(!(t in e)){if(t in globalThis)return globalThis[t];throw new ReferenceError(`${t} is not defined`)}},Bs=(e,t)=>{try{return Nt([...Gt,...t],ts(e))}catch(n){return n instanceof Ae&&Ao(e,n),null}},Oo=(e,t)=>{if(!X.scopedNames)return null;let n=ns(e,t);if(n===null)return null;try{return Nt([...Gt,...t],n)}catch{return null}},gn=(e,t,n)=>{let s=mt.get(e);if(s===void 0){let r=Oo(t,n);s=r?{fn:r,scoped:!0}:{fn:Bs(t,n),scoped:!1},mt.set(e,s)}return s},Ie=(e,t)=>`${t.join(",")}|${e}`,_o=(e,t)=>gn(Ie(e,t),e,t).fn,Us=(e,t,n)=>{let s=Bs(t,n);return mt.set(e,{fn:s,scoped:!1}),s},jo=/^(?:([\w$]+) is not defined|Can't find variable: ([\w$]+))/,Lo=100,Te=new Map,mn=new Set,yt=0,nn=!1,sn=new Set,Do=()=>{nn=!1,!(yt>0)&&(Te.forEach(({name:e,expr:t,scope:n},s)=>{e in n||(mn.add(s),console.warn(`jq79: ${e} is not defined - evaluating "${t}". Template expressions resolve against the component store: a top-level let/var/const in a :setup script, a declared prop, or a global. Note a "function name() {}" declaration is not on the store - write "const name = () => {}".`))}),Te.clear())},Ks=()=>{nn||yt>0||!Te.size||(nn=!0,queueMicrotask(Do))},zs=e=>{yt++;let t=()=>{yt--,Ks()};e.then(t,t)},Io=(e,t)=>{if(sn.has(e))return;sn.add(e);let n=t?.message||String(t);console.error(`jq79: ${n} - evaluating "${e}". The expression rendered as nothing. If the value arrives later, guard it - "a?.b", or :if on the element.`)},yn=(e,t,n)=>{if(!(n instanceof ReferenceError))return Io(e,n);let s=jo.exec(n.message),r=s?.[1]??s?.[2];if(!r)return;let l=`${r}|${e}`;mn.has(l)||Te.has(l)||Te.size>=Lo||(Te.set(l,{name:r,expr:e,scope:t}),Ks())},Gs=(e,t,n)=>{let s=n?Object.keys(n):[],r=Ie(e,s),{fn:l,scoped:o}=gn(r,e,s);if(!l)return;let i=n?Object.values(n):[];if(!o)return l(t,Me,...i);try{return l(t,Me,...i)}catch(a){if(!(a instanceof ReferenceError))throw a;let c=Us(r,e,s);if(!c)throw a;return c(t,Me,...i)}},He=[],Ho=(e,t,n)=>{try{let{fn:s,scoped:r}=gn(e,t,He);if(!s)return;if(!r)return s(n,Me);try{return s(n,Me)}catch(l){if(!(l instanceof ReferenceError))throw l;let o=Us(e,t,He);if(!o)throw l;return o(n,Me)}}catch(s){yn(t,n,s);return}},j=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){yn(e,t,s);return}},Vs=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){if(!(s instanceof ReferenceError))throw s;yn(e,t,s);return}},rn=(e,t)=>{if(e.length===1){let s=e[0];return typeof s=="string"?s:String(j(s.expr,t)??"")}let n="";for(let s of e)n+=typeof s=="string"?s:String(j(s.expr,t)??"");return n},En=(e,t,n,s)=>{if(!X.cachedSetters){s.effect(()=>{let l=rn(t,n);e.textContent!==l&&(e.textContent=l)});return}let r=e.data;s.effect(()=>{let l=rn(t,n);l!==r&&(e.data=r=l)})},hs=new Map,qo=e=>{if(!X.cachedSetters)return dt(e);let t=hs.get(e);return t||hs.set(e,t=dt(e)),t},gs=(e,t,n,s)=>{let r=Vs(t,n,{$event:s});typeof r=="function"&&r.call(e,s)},wn=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l);e.addEventListener(r,i=>{o.has("self")&&i.target!==e||(o.has("prevent")&&i.preventDefault(),o.has("stop")&&i.stopPropagation(),X.batchHandlers?Ee(()=>gs(e,n,s,i)):gs(e,n,s,i))},{once:o.has("once"),capture:o.has("capture")})},Fo=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l),i=a=>{o.has("prevent")&&a.preventDefault(),o.has("stop")&&a.stopPropagation(),o.has("once")&&e.off(r,i);let c=()=>{let d=Vs(n,s,{$event:a});typeof d=="function"&&d(a)};Pe(X.batchHandlers?()=>Ee(c):c)};e.on(r,i)},Sn=e=>e instanceof DocumentFragment?{first:e.firstChild,last:e.lastChild}:{first:e,last:e},vt=({first:e,last:t})=>{for(let n=e;n;){let s=n===t?null:n.nextSibling;n.parentNode?.removeChild(n),n=s}},Wo=e=>{e.forEach(t=>{if(t.first===t.last)return vt(t);if(!t.first.parentNode)return;let s=document.createRange();s.setStartBefore(t.first),s.setEndAfter(t.last),s.deleteContents()})},Bo=(e,t)=>{let n=[],s=null;return e.forEach(r=>{if(!t(r)){s=null;return}s&&s.last.nextSibling===r.range.first?s.last=r.range.last:n.push(s={first:r.range.first,last:r.range.last})}),n},Uo=({first:e,last:t},n)=>{let s=n.nextSibling;for(let r=e;r;){let l=r===t?null:r.nextSibling;n.parentNode.insertBefore(r,s),r=l}},ms=(e,t)=>{let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s))for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r;return null},$e=null,Et=null,Zs=new WeakSet,Ko=e=>{let t={memo:$e,base:Et};return $e=new Map,Et=e,t},zo=e=>{$e=e.memo,Et=e.base},ys=(e,t)=>e.component!==void 0?Es(t,e.component):e.tag.includes("-")?Es(t,e.tag):null,ee=e=>e.component??e.tag,Es=(e,t)=>{if(!$e)return ms(e,t);let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s)){if(s===Et){if($e.has(t))return $e.get(t);let r=ms(s,t);return $e.set(t,r),r}if(!Zs.has(s)){for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r}}return null},Go=e=>{let t=new Set;for(let n=e;n&&n!==Object.prototype;n=Object.getPrototypeOf(n))for(let s of Object.keys(n))/^[A-Z]/.test(s)&&t.add(s);return[...t].sort()},Vo=(e,t)=>{let n=Go(t);return new Error(`jq79: <${e}> is not defined - no component of that name is in scope, and nothing renders here. Import it in a :setup script, declare it as a prop, or add a <template name="${e}"> to this file. In scope: ${n.length?n.join(", "):"(none)"}.`)},ws=100,Zt=0,Qs=Symbol("jq79.slots"),Fe=e=>Object.keys(e.attrs).find(t=>t===":slot"||t.startsWith(":slot.")),Zo=e=>e==="default"?":slot":`:slot.${e}`,Qo=e=>typeof e!="string"||e.trim()!=="",Xo=e=>{let t={},n=[];e.children.forEach(r=>{let l=typeof r=="object"&&r.tag==="template"?Fe(r):void 0;if(typeof r=="string"||l===void 0){n.push(r);return}let o=Kt(l.slice(6));if(o in t){console.warn(`jq79: two <template ${Zo(o)}> in <${ee(e)}>; the second was ignored`);return}t[o]={nodes:r.children,binder:r.attrs[l]||void 0}});let s=n.some(Qo);return s&&"default"in t?console.warn(`jq79: <${ee(e)}> has both a <template :slot> and content outside it - the <template> is the default slot's content, and the rest was ignored`):s&&(t.default={nodes:n,binder:e.attrs[":slot"]||void 0}),t},Yo=(e,t,n)=>{je(t)?.forEach(({name:s,as:r,default:l})=>{let o=r??s;Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>{let i=n[s]?.();return i===void 0&&l!==void 0?j(l,e):i},set:()=>console.warn(`jq79: "${o}" is a slot prop - it comes from the component, so assigning to it does nothing`)})})},Jo=e=>{let t=Fe(e);return console.warn(`jq79: <template ${t}> fills a slot only as a direct child of a component tag; here it rendered nothing`),document.createComment(`misplaced ${t}`)},ei=(e,t)=>{let n=Object.entries(Xo(e));if(!n.length)return null;let s={};return n.forEach(([r,l])=>{s[r]=ti(l,t)}),s},ti=(e,t)=>(n,s,r,l)=>{let o=Object.create(t);Yo(o,e.binder,n);let i=o[Ye]??[];Object.defineProperty(o,Ye,{value:[...i,s]});let a=Se(o);return a.ownedBy(s),r.onDispose(()=>a.dispose()),xe(e.nodes,o,a,l)},ni=(e,t,n,s)=>{let r=Kt(e.tag.slice(5)),l=document.createDocumentFragment(),o=document.createComment(e.tag),i=document.createComment(`/${e.tag}`);l.append(o,i);let a=t[Qs]?.[r];if(!a)return l.insertBefore(xe(e.children,t,n,s),i),l;let c={};return Object.entries(e.attrs).forEach(([d,p])=>{if(!(d===Oe||be(d)||d.startsWith("@")))if(d.startsWith(":")){let $=p||d.slice(1);c[ce(d.slice(1))]=()=>j($,t)}else c[ce(d)]=()=>p}),l.insertBefore(a(c,t,n,s),i),l},Xs="data-c79-box",si=(e,t,n)=>{if(t.ns!==void 0)return document.createDocumentFragment();let s=document.createElement(De(e));s.setAttribute(Xs,"");let r=t.attrs[Oe];return r!==void 0&&s.setAttribute(Oe,r),n||Xi(),s},Ss=new WeakSet,ri=(e,t)=>{if(e.ns===void 0||Ss.has(e))return;let n=t.template.find(r=>typeof r=="object");if(n===void 0||n.ns!==void 0)return;Ss.add(e);let s=e.ns==="http://www.w3.org/1998/Math/MathML"?"<math>":"<svg>";console.warn(`jq79: <${ee(e)}> is used inside ${s} and its template starts with <${n.tag.toLowerCase()}>, which is parsed as HTML - it renders and never draws. A component's template decides its own namespace, so root it at ${s}`)},bs=(e,t,n,s,r)=>{let l=si(e,t,r),o=!(l instanceof DocumentFragment),i=o?null:document.createComment(`/${e}`);o||l.append(document.createComment(e),i);let a=ei(t,n),c={},d={},p=[],$=[],C=!1,O;Object.entries(t.attrs).forEach(([E,T])=>{if(E!==Oe){if(E===":props"||E.startsWith(":props.")){C=!0,$.push({expr:T});return}if(be(E)){ll.has(E)&&(O??(O=[])).push(E.slice(1));return}if(E.startsWith("@"))p.push([E,T]);else if(E===":model"||E.startsWith(":model.")){let N=E===":model"?"default":ce(E.slice(7));d[N]=T||(E===":model"?"model":N)}else if(E.startsWith(":")){let N=ce(E.slice(1));c[N]=T||N,$.push({name:N,expr:T||N})}else{let N=ce(E),q=JSON.stringify(T);c[N]=q,$.push({name:N,expr:q})}}});let D=E=>E==="default"?":model":`:model.${E}`,L=E=>E==="default"?"model":E,x=new Set;Object.entries(d).forEach(([E,T])=>{let N=L(E);c[N]!==void 0&&console.warn(`jq79: <${ee(t)}> binds prop "${N}" through both :${N} and ${D(E)} - ${D(E)} wins`),c[N]=T,_o(zt(T),["$value"])===null&&(x.add(E),console.warn(`jq79: ${D(E)}="${T}" is not assignable - updates from <${ee(t)}> will be dropped`))});let I=()=>{let E={};return $.forEach(({name:T,expr:N})=>{if(T!==void 0)E[T]=j(N,n);else{let q=j(N,n);q!==null&&typeof q=="object"&&Object.assign(E,q)}}),Object.entries(d).forEach(([T,N])=>{E[L(T)]=j(N,n)}),E},H=null,K=null,G=null,z=new Set,J=E=>{if(E==null){if(!n[mr]?.has(e)||z.has("unfilled"))return;z.add("unfilled"),console.error(`jq79: <${ee(t)}> is declared as a prop and the parent passed nothing - nothing renders here. Pass it (:${e}="\u2026"), or drop it from the signature to use the one declared in this file.`);return}z.has("type")||(z.add("type"),console.error(`jq79: <${ee(t)}> is ${typeof E}, not a component - nothing renders here`))};return s.effect(()=>{let E=j(e,n),T=E instanceof de?E:null;if(T||J(E),T===K||(G?.dispose(),G=null,H?.destroy(),H=null,K=T,!T))return;ri(t,T);let N=new de({template:T.template,scripts:T.scripts,styles:T.styles,modules:T.modules,filename:T.filename,siblings:T.siblings,name:T.name});if(a&&(N.slots=a),Object.keys(d).length){let P=new Set;N.modelWriteback=(_,B)=>{let V=_==null?"default":ce(String(_)),ne=d[V];return ne===void 0?(P.has(V)||(P.add(V),console.warn(`jq79: <${ee(t)}> has no ${D(V)} - bound: ${Object.keys(d).map(D).join(", ")}`)),!1):x.has(V)?!1:(Pe(()=>j(zt(ne),n,{$value:B})),!0)}}p.forEach(([P,_])=>Fo(N,P,_,n));let q=ol(N.scripts);il(t,e,Object.keys(c),q),O&&al(t,e,O,q);let W=Os(Pe(I),q),U=document.createDocumentFragment();if(Zt>=ws){console.error(`jq79: <${ee(t)}> is ${ws} levels deep inside itself; giving up here. A component that renders itself stops when its data stops - is there a cycle in it?`);return}Zt++;try{(r?N.renderShadow(W):N.render(W)).mount(U)}finally{Zt--}let w=n[Tt];w&&N.holdOwner(w.owner),i?i.parentNode.insertBefore(U,i):l.appendChild(U);let M=Se(n,!0);if(C){let P=[];M.effect(()=>{let _=Os(I(),q),B=Object.keys(_);P.forEach(V=>{V in _||(N.data[V]=void 0)}),B.forEach(V=>{N.data[V]=_[V]}),P=B})}else Object.entries(c).forEach(([P,_])=>{q!==null&&!q.has(P)||M.effect(()=>{N.data[P]=j(_,n)})});G=M,H=N}),s.onDispose(()=>{G?.dispose(),H?.destroy()}),l},oi=(e,t)=>{let n=()=>{let s=j(e,t);return s!==null&&typeof s=="object"?s:null};return new Proxy(t,{has(s,r){let l=n();return l!==null&&Reflect.has(l,r)||Reflect.has(s,r)},get(s,r){let l=n();return l!==null&&Reflect.has(l,r)?l[r]:Reflect.get(s,r)},set(s,r,l){let o=n();return o!==null&&Reflect.has(o,r)?(o[r]=l,!0):Reflect.set(s,r,l)}})},wt=e=>typeof e=="string"?e.split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(wt):e!==null&&typeof e=="object"?Object.entries(e).flatMap(([t,n])=>n?wt(t):[]):[],We=(e,t)=>{if(typeof e=="string"){if(e&&!/\s/.test(e))t.push(e);else if(e)for(let n of e.split(/\s+/))n&&t.push(n)}else if(Array.isArray(e))for(let n of e)We(n,t);else if(e!==null&&typeof e=="object")for(let n in e)e[n]&&We(n,t)},Ys=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Js=(e,t,n,s,r,l)=>{let o=[];l.effect(()=>{let i=[];if(t!==void 0&&We(j(t,r),i),n)for(let[a,c]of n)j(c,r)&&We(a,i);if(!X.cachedSetters)o.forEach(a=>{!i.includes(a)&&!s.has(a)&&e.classList.remove(a)}),e.classList.add(...i);else if(!Ys(o,i)){for(let a of o)!i.includes(a)&&!s.has(a)&&e.classList.remove(a);for(let a of i)o.includes(a)||e.classList.add(a)}o=i})},ii=e=>typeof e=="function"?(t,n,s)=>{try{return!!e(t,n,s)}catch{return!1}}:typeof e=="string"||Array.isArray(e)?kn(e):()=>!1,li=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),bn=e=>e.ns===void 0?document.createElement(e.tag):document.createElementNS(e.ns,e.tag),ai={"http://www.w3.org/2000/svg":["svg","feGaussianBlur"],"http://www.w3.org/1998/Math/MathML":["math","mi"]},$s=new Map,ci=(e,t)=>{let n=`${e} ${t}`,s=$s.get(n);if(s!==void 0)return s;let r=ai[e],l=t;if(r!==void 0&&typeof DOMParser<"u"&&/^[a-z][a-z0-9]*$/.test(t)){let[o,i]=r;l=new DOMParser().parseFromString(`<${o}><${i} ${t}="x"/></${o}>`,"text/html").querySelector(i)?.getAttributeNames().find(c=>c.toLowerCase()===t)??t}return $s.set(n,l),l},er=(e,t)=>{let n=e.namespaceURI;if(n===null||n===Fs)return t;let s=t.replace(/-/g,"").toLowerCase(),r=ci(n,s);return r===s?t:r},$n=(e,t,n)=>{let s=li.has(t);(s?!n:n==null)?e.removeAttribute(t):e.setAttribute(t,s?"":String(n))},X={cloneSkeletons:!0,scopedNames:!0,batchHandlers:!0,cachedSetters:!0,compileSkeletons:!0},di=new Set([":text",":html",":value",":checked",":selected"]),ui=e=>e.startsWith("@")||e===":class"||e.startsWith(":class.")||di.has(e)?!0:e.startsWith(":")?e===":model"?!1:!be(e)&&!e.includes("."):e!==Le,tr=e=>{if(e.component||e.tag.includes("-")||ut(e.tag)||e.tag==="template"||e.ns===void 0&&document.createElement(e.tag)instanceof HTMLUnknownElement)return!1;for(let t in e.attrs)if(!ui(t))return!1;return e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?!0:e.children.every(t=>typeof t=="string"||tr(t))},nr=(e,t,n)=>{let s=bn(e),r,l=null;for(let p in e.attrs){let $=e.attrs[p];if(p.startsWith("@"))n.push({kind:"event",path:t,attr:p,expr:$});else if(p===":class")r=$;else if(p.startsWith(":class."))(l??(l=[])).push([p.slice(7),$]);else if(!be(p))if(p.startsWith(":")){let C=p.slice(1);n.push({kind:"attr",path:t,name:er(s,C),expr:$||ce(C)})}else s.setAttribute(p,$)}(r!==void 0||l)&&n.push({kind:"class",path:t,classExpr:r,toggles:l,staticClasses:new Set(wt(e.attrs.class??""))});let o=e.attrs[":text"],i=e.attrs[":html"];o!==void 0?n.push({kind:"textContent",path:t,expr:o}):i!==void 0?n.push({kind:"html",path:t,expr:i}):e.children.forEach((p,$)=>{if(typeof p=="string"){p.includes("{{")?(n.push({kind:"text",path:[...t,$],parts:dt(p)}),s.appendChild(document.createTextNode(""))):s.appendChild(document.createTextNode(p));return}s.appendChild(nr(p,[...t,$],n))});let a=e.attrs[":value"];a!==void 0&&n.push({kind:"value",path:t,expr:a});let c=e.attrs[":checked"];c!==void 0&&n.push({kind:"checked",path:t,expr:c});let d=e.attrs[":selected"];return d!==void 0&&n.push({kind:"selected",path:t,expr:d}),s},fi=3,sr=e=>e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?1:1+e.children.reduce((t,n)=>t+(typeof n=="string"?0:sr(n)),0),Ts=new WeakMap,Rs=new WeakSet,pi=e=>{let t=Ts.get(e);if(t!==void 0)return t;if(!Rs.has(e))return Rs.add(e),null;let n=null;if(tr(e)&&sr(e)>=fi){let s=[];n={skeleton:nr(e,[],s),ops:s}}return Ts.set(e,n),n},hi=(e,t)=>{let n=e;for(let s=0;s<t.length;s++){n=n.firstChild;for(let r=t[s];r>0;r--)n=n.nextSibling}return n},gi=["r","s","fx","o","K","h"],mi={ev:Ho,evalExpr:j,bindText:En,bindEvent:wn,renderText:rn,bindClassNames:(e,t,n,s)=>{for(let r of t)!n.includes(r)&&!s.has(r)&&e.classList.remove(r);for(let r of n)t.includes(r)||e.classList.add(r)},collectClassNames:(e,t)=>We(e,t),sameNames:(e,t)=>Ys(e,t),applyAttr:(e,t,n)=>$n(e,t,n),sanitizeHTML:e=>ze(e)},xs=new Map,yi=e=>{let t=[],n=new Map([["","r"]]),s=0,r=o=>{let i=o.join("."),a=n.get(i);if(a)return a;let c=o.slice(0,-1),d=o[o.length-1],p=`${r(c)}.firstChild`,$=d;for(let O=d-1;O>=0;O--){let D=n.get([...c,O].join("."));if(D){p=D,$=d-O;break}}for(let O=0;O<$;O++)p+=".nextSibling";let C=`n${s++}`;return t.push(`const ${C} = ${p}`),n.set(i,C),C},l=(o,i)=>t.push(`{ ${o}; fx.effect(() => { ${i} }) }`);return e.forEach((o,i)=>{let a=r(o.path),c=`o[${i}]`;if(o.kind==="text"){let[d]=o.parts;o.parts.length===1&&typeof d!="string"?l(`const t${i} = ${a}, e${i} = ${c}.parts[0].expr, k${i} = K[${i}]; let last${i} = t${i}.data`,`{ const v = h.ev(k${i}, e${i}, s); const x = v == null ? "" : String(v); if (x !== last${i}) t${i}.data = last${i} = x }`):l(`const t${i} = ${a}, p${i} = ${c}.parts; let last${i} = t${i}.data`,`{ const x = h.renderText(p${i}, s); if (x !== last${i}) t${i}.data = last${i} = x }`)}else if(o.kind==="event")t.push(`h.bindEvent(${a}, ${c}.attr, ${c}.expr, s)`);else if(o.kind==="attr")l(`const el${i} = ${a}, c${i} = ${c}`,`h.applyAttr(el${i}, c${i}.name, h.ev(K[${i}], c${i}.expr, s))`);else if(o.kind==="class")l(`const el${i} = ${a}, c${i} = ${c}, k${i} = K[${i}]; let b${i} = []`,`{ const next = []; if (c${i}.classExpr !== undefined) h.collectClassNames(h.ev(k${i}, c${i}.classExpr, s), next); if (c${i}.toggles) for (const [n, e] of c${i}.toggles) if (h.evalExpr(e, s)) h.collectClassNames(n, next); if (!h.sameNames(b${i}, next)) h.bindClassNames(el${i}, b${i}, next, c${i}.staticClasses); b${i} = next }`);else if(o.kind==="textContent")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.textContent !== x) el${i}.textContent = x }`);else if(o.kind==="html")l(`const el${i} = ${a}, c${i} = ${c}`,`el${i}.innerHTML = h.sanitizeHTML(String(h.ev(K[${i}], c${i}.expr, s) ?? ""))`);else if(o.kind==="value")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.value !== x) el${i}.value = x }`);else if(o.kind==="checked")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.checked !== x) el${i}.checked = x }`);else if(o.kind==="selected")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.selected !== x) el${i}.selected = x }`);else{let d=o}}),`"use strict"
17
+ }`;var xl={};var Po="0.8.2",qs=e=>Object.fromEntries(Array.from(e.attributes).map(t=>[t.name,t.value])),Fs="http://www.w3.org/1999/xhtml",Ws=e=>{let t=qs(e),n=e.namespaceURI,s=t[Le];delete t[Le];let r=n!==null&&n!==Fs;return{tag:r?e.tagName:e.tagName.toLowerCase(),attrs:t,...s===void 0?{}:{component:s},...r?{ns:n}:{},children:Array.from((e instanceof HTMLTemplateElement?e.content:e).childNodes).flatMap(l=>{if(l.nodeType===Node.TEXT_NODE){let o=l.textContent??"";return o?[o]:[]}return l.nodeType===Node.ELEMENT_NODE?[Ws(l)]:[]})}},mt=new Map,gt=new Map,pn=!1,tn,Ae=class extends Error{constructor(n,s){super(`${n}. ${s}`);A(this,"reason",n);A(this,"hint",s)}},ko=()=>new Ae("was not precompiled","Safe mode never builds code at runtime: the component's precompiled functions did not reach the page."),Co=(e,t)=>{let n=globalThis[cs];if(Array.isArray(n)&&n.length>0)for(let[s,r,l]of n.splice(0))gt.set(ft(s,r),l);return gt.size===0?void 0:gt.get(ft(e,t))},Nt=(e,t,n="")=>{let s=Co(e,t);if(s===null)throw new SyntaxError("jq79: this code did not compile when it was precompiled");if(s!==void 0)return s;if(tn!==void 0)return Mo(e,t,n,tn);if(pn)throw ko();return new Function(...e,t+n)},hn=()=>{if(!(typeof document>"u"))for(let e of Array.from(document.querySelectorAll("script[nonce]"))){let t=e.nonce||e.getAttribute("nonce");if(t)return t}},fs="__jq79built",Mo=(e,t,n,s)=>{let r=document.createElement("script");r.setAttribute("nonce",s),r.textContent=`document.currentScript.${fs} = ${us(e,t)}${n}`;let l,o=a=>{l=a.error??new SyntaxError(a.message),a.preventDefault()};window.addEventListener("error",o);try{(document.head??document.documentElement).append(r)}finally{window.removeEventListener("error",o),r.remove()}let i=r[fs];if(typeof i=="function")return gt.set(ft(e,t),i),i;throw l!==void 0?l:new Ae("could not be built","The page's CSP refused a <script> carrying the nonce jq79 read from the page.")},ps=new Set,Ao=(e,t)=>{ps.has(e)||(ps.add(e),console.error(`jq79: safeEval() is on, and "${e}" ${t.reason}, so it rendered as nothing. ${t.hint}`))},Me=(e,t)=>{if(!(t in e)){if(t in globalThis)return globalThis[t];throw new ReferenceError(`${t} is not defined`)}},Bs=(e,t)=>{try{return Nt([...Gt,...t],ts(e))}catch(n){return n instanceof Ae&&Ao(e,n),null}},Oo=(e,t)=>{if(!X.scopedNames)return null;let n=ns(e,t);if(n===null)return null;try{return Nt([...Gt,...t],n)}catch{return null}},gn=(e,t,n)=>{let s=mt.get(e);if(s===void 0){let r=Oo(t,n);s=r?{fn:r,scoped:!0}:{fn:Bs(t,n),scoped:!1},mt.set(e,s)}return s},Ie=(e,t)=>`${t.join(",")}|${e}`,_o=(e,t)=>gn(Ie(e,t),e,t).fn,Us=(e,t,n)=>{let s=Bs(t,n);return mt.set(e,{fn:s,scoped:!1}),s},jo=/^(?:([\w$]+) is not defined|Can't find variable: ([\w$]+))/,Lo=100,Te=new Map,mn=new Set,yt=0,nn=!1,sn=new Set,Do=()=>{nn=!1,!(yt>0)&&(Te.forEach(({name:e,expr:t,scope:n},s)=>{e in n||(mn.add(s),console.warn(`jq79: ${e} is not defined - evaluating "${t}". Template expressions resolve against the component store: a top-level let/var/const in a :setup script, a declared prop, or a global. Note a "function name() {}" declaration is not on the store - write "const name = () => {}".`))}),Te.clear())},Ks=()=>{nn||yt>0||!Te.size||(nn=!0,queueMicrotask(Do))},zs=e=>{yt++;let t=()=>{yt--,Ks()};e.then(t,t)},Io=(e,t)=>{if(sn.has(e))return;sn.add(e);let n=t?.message||String(t);console.error(`jq79: ${n} - evaluating "${e}". The expression rendered as nothing. If the value arrives later, guard it - "a?.b", or :if on the element.`)},yn=(e,t,n)=>{if(!(n instanceof ReferenceError))return Io(e,n);let s=jo.exec(n.message),r=s?.[1]??s?.[2];if(!r)return;let l=`${r}|${e}`;mn.has(l)||Te.has(l)||Te.size>=Lo||(Te.set(l,{name:r,expr:e,scope:t}),Ks())},Gs=(e,t,n)=>{let s=n?Object.keys(n):[],r=Ie(e,s),{fn:l,scoped:o}=gn(r,e,s);if(!l)return;let i=n?Object.values(n):[];if(!o)return l(t,Me,...i);try{return l(t,Me,...i)}catch(a){if(!(a instanceof ReferenceError))throw a;let c=Us(r,e,s);if(!c)throw a;return c(t,Me,...i)}},He=[],Ho=(e,t,n)=>{try{let{fn:s,scoped:r}=gn(e,t,He);if(!s)return;if(!r)return s(n,Me);try{return s(n,Me)}catch(l){if(!(l instanceof ReferenceError))throw l;let o=Us(e,t,He);if(!o)throw l;return o(n,Me)}}catch(s){yn(t,n,s);return}},j=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){yn(e,t,s);return}},Vs=(e,t,n)=>{try{return Gs(e,t,n)}catch(s){if(!(s instanceof ReferenceError))throw s;yn(e,t,s);return}},rn=(e,t)=>{if(e.length===1){let s=e[0];return typeof s=="string"?s:String(j(s.expr,t)??"")}let n="";for(let s of e)n+=typeof s=="string"?s:String(j(s.expr,t)??"");return n},En=(e,t,n,s)=>{if(!X.cachedSetters){s.effect(()=>{let l=rn(t,n);e.textContent!==l&&(e.textContent=l)});return}let r=e.data;s.effect(()=>{let l=rn(t,n);l!==r&&(e.data=r=l)})},hs=new Map,qo=e=>{if(!X.cachedSetters)return dt(e);let t=hs.get(e);return t||hs.set(e,t=dt(e)),t},gs=(e,t,n,s)=>{let r=Vs(t,n,{$event:s});typeof r=="function"&&r.call(e,s)},wn=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l);e.addEventListener(r,i=>{o.has("self")&&i.target!==e||(o.has("prevent")&&i.preventDefault(),o.has("stop")&&i.stopPropagation(),X.batchHandlers?Ee(()=>gs(e,n,s,i)):gs(e,n,s,i))},{once:o.has("once"),capture:o.has("capture")})},Fo=(e,t,n,s)=>{let[r,...l]=t.slice(1).split("."),o=new Set(l),i=a=>{o.has("prevent")&&a.preventDefault(),o.has("stop")&&a.stopPropagation(),o.has("once")&&e.off(r,i);let c=()=>{let d=Vs(n,s,{$event:a});typeof d=="function"&&d(a)};Pe(X.batchHandlers?()=>Ee(c):c)};e.on(r,i)},Sn=e=>e instanceof DocumentFragment?{first:e.firstChild,last:e.lastChild}:{first:e,last:e},vt=({first:e,last:t})=>{for(let n=e;n;){let s=n===t?null:n.nextSibling;n.parentNode?.removeChild(n),n=s}},Wo=e=>{e.forEach(t=>{if(t.first===t.last)return vt(t);if(!t.first.parentNode)return;let s=document.createRange();s.setStartBefore(t.first),s.setEndAfter(t.last),s.deleteContents()})},Bo=(e,t)=>{let n=[],s=null;return e.forEach(r=>{if(!t(r)){s=null;return}s&&s.last.nextSibling===r.range.first?s.last=r.range.last:n.push(s={first:r.range.first,last:r.range.last})}),n},Uo=({first:e,last:t},n)=>{let s=n.nextSibling;for(let r=e;r;){let l=r===t?null:r.nextSibling;n.parentNode.insertBefore(r,s),r=l}},ms=(e,t)=>{let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s))for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r;return null},$e=null,Et=null,Zs=new WeakSet,Ko=e=>{let t={memo:$e,base:Et};return $e=new Map,Et=e,t},zo=e=>{$e=e.memo,Et=e.base},ys=(e,t)=>e.component!==void 0?Es(t,e.component):e.tag.includes("-")?Es(t,e.tag):null,ee=e=>e.component??e.tag,Es=(e,t)=>{if(!$e)return ms(e,t);let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s)){if(s===Et){if($e.has(t))return $e.get(t);let r=ms(s,t);return $e.set(t,r),r}if(!Zs.has(s)){for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r}}return null},Go=e=>{let t=new Set;for(let n=e;n&&n!==Object.prototype;n=Object.getPrototypeOf(n))for(let s of Object.keys(n))/^[A-Z]/.test(s)&&t.add(s);return[...t].sort()},Vo=(e,t)=>{let n=Go(t);return new Error(`jq79: <${e}> is not defined - no component of that name is in scope, and nothing renders here. Import it in a :setup script, declare it as a prop, or add a <template name="${e}"> to this file. In scope: ${n.length?n.join(", "):"(none)"}.`)},ws=100,Zt=0,Qs=Symbol("jq79.slots"),Fe=e=>Object.keys(e.attrs).find(t=>t===":slot"||t.startsWith(":slot.")),Zo=e=>e==="default"?":slot":`:slot.${e}`,Qo=e=>typeof e!="string"||e.trim()!=="",Xo=e=>{let t={},n=[];e.children.forEach(r=>{let l=typeof r=="object"&&r.tag==="template"?Fe(r):void 0;if(typeof r=="string"||l===void 0){n.push(r);return}let o=Kt(l.slice(6));if(o in t){console.warn(`jq79: two <template ${Zo(o)}> in <${ee(e)}>; the second was ignored`);return}t[o]={nodes:r.children,binder:r.attrs[l]||void 0}});let s=n.some(Qo);return s&&"default"in t?console.warn(`jq79: <${ee(e)}> has both a <template :slot> and content outside it - the <template> is the default slot's content, and the rest was ignored`):s&&(t.default={nodes:n,binder:e.attrs[":slot"]||void 0}),t},Yo=(e,t,n)=>{je(t)?.forEach(({name:s,as:r,default:l})=>{let o=r??s;Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>{let i=n[s]?.();return i===void 0&&l!==void 0?j(l,e):i},set:()=>console.warn(`jq79: "${o}" is a slot prop - it comes from the component, so assigning to it does nothing`)})})},Jo=e=>{let t=Fe(e);return console.warn(`jq79: <template ${t}> fills a slot only as a direct child of a component tag; here it rendered nothing`),document.createComment(`misplaced ${t}`)},ei=(e,t)=>{let n=Object.entries(Xo(e));if(!n.length)return null;let s={};return n.forEach(([r,l])=>{s[r]=ti(l,t)}),s},ti=(e,t)=>(n,s,r,l)=>{let o=Object.create(t);Yo(o,e.binder,n);let i=o[Ye]??[];Object.defineProperty(o,Ye,{value:[...i,s]});let a=Se(o);return a.ownedBy(s),r.onDispose(()=>a.dispose()),xe(e.nodes,o,a,l)},ni=(e,t,n,s)=>{let r=Kt(e.tag.slice(5)),l=document.createDocumentFragment(),o=document.createComment(e.tag),i=document.createComment(`/${e.tag}`);l.append(o,i);let a=t[Qs]?.[r];if(!a)return l.insertBefore(xe(e.children,t,n,s),i),l;let c={};return Object.entries(e.attrs).forEach(([d,p])=>{if(!(d===Oe||be(d)||d.startsWith("@")))if(d.startsWith(":")){let $=p||d.slice(1);c[ce(d.slice(1))]=()=>j($,t)}else c[ce(d)]=()=>p}),l.insertBefore(a(c,t,n,s),i),l},Xs="data-c79-box",si=(e,t,n)=>{if(t.ns!==void 0)return document.createDocumentFragment();let s=document.createElement(De(e));s.setAttribute(Xs,"");let r=t.attrs[Oe];return r!==void 0&&s.setAttribute(Oe,r),n||Xi(),s},Ss=new WeakSet,ri=(e,t)=>{if(e.ns===void 0||Ss.has(e))return;let n=t.template.find(r=>typeof r=="object");if(n===void 0||n.ns!==void 0)return;Ss.add(e);let s=e.ns==="http://www.w3.org/1998/Math/MathML"?"<math>":"<svg>";console.warn(`jq79: <${ee(e)}> is used inside ${s} and its template starts with <${n.tag.toLowerCase()}>, which is parsed as HTML - it renders and never draws. A component's template decides its own namespace, so root it at ${s}`)},bs=(e,t,n,s,r)=>{let l=si(e,t,r),o=!(l instanceof DocumentFragment),i=o?null:document.createComment(`/${e}`);o||l.append(document.createComment(e),i);let a=ei(t,n),c={},d={},p=[],$=[],C=!1,O;Object.entries(t.attrs).forEach(([E,T])=>{if(E!==Oe){if(E===":props"||E.startsWith(":props.")){C=!0,$.push({expr:T});return}if(be(E)){ll.has(E)&&(O??(O=[])).push(E.slice(1));return}if(E.startsWith("@"))p.push([E,T]);else if(E===":model"||E.startsWith(":model.")){let N=E===":model"?"default":ce(E.slice(7));d[N]=T||(E===":model"?"model":N)}else if(E.startsWith(":")){let N=ce(E.slice(1));c[N]=T||N,$.push({name:N,expr:T||N})}else{let N=ce(E),q=JSON.stringify(T);c[N]=q,$.push({name:N,expr:q})}}});let D=E=>E==="default"?":model":`:model.${E}`,L=E=>E==="default"?"model":E,x=new Set;Object.entries(d).forEach(([E,T])=>{let N=L(E);c[N]!==void 0&&console.warn(`jq79: <${ee(t)}> binds prop "${N}" through both :${N} and ${D(E)} - ${D(E)} wins`),c[N]=T,_o(zt(T),["$value"])===null&&(x.add(E),console.warn(`jq79: ${D(E)}="${T}" is not assignable - updates from <${ee(t)}> will be dropped`))});let I=()=>{let E={};return $.forEach(({name:T,expr:N})=>{if(T!==void 0)E[T]=j(N,n);else{let q=j(N,n);q!==null&&typeof q=="object"&&Object.assign(E,q)}}),Object.entries(d).forEach(([T,N])=>{E[L(T)]=j(N,n)}),E},H=null,K=null,G=null,z=new Set,J=E=>{if(E==null){if(!n[mr]?.has(e)||z.has("unfilled"))return;z.add("unfilled"),console.error(`jq79: <${ee(t)}> is declared as a prop and the parent passed nothing - nothing renders here. Pass it (:${e}="\u2026"), or drop it from the signature to use the one declared in this file.`);return}z.has("type")||(z.add("type"),console.error(`jq79: <${ee(t)}> is ${typeof E}, not a component - nothing renders here`))};return s.effect(()=>{let E=j(e,n),T=E instanceof de?E:null;if(T||J(E),T===K||(G?.dispose(),G=null,H?.destroy(),H=null,K=T,!T))return;ri(t,T);let N=new de({template:T.template,scripts:T.scripts,styles:T.styles,modules:T.modules,filename:T.filename,siblings:T.siblings,name:T.name});if(a&&(N.slots=a),Object.keys(d).length){let P=new Set;N.modelWriteback=(_,B)=>{let V=_==null?"default":ce(String(_)),ne=d[V];return ne===void 0?(P.has(V)||(P.add(V),console.warn(`jq79: <${ee(t)}> has no ${D(V)} - bound: ${Object.keys(d).map(D).join(", ")}`)),!1):x.has(V)?!1:(Pe(()=>j(zt(ne),n,{$value:B})),!0)}}p.forEach(([P,_])=>Fo(N,P,_,n));let q=ol(N.scripts);il(t,e,Object.keys(c),q),O&&al(t,e,O,q);let W=Os(Pe(I),q),U=document.createDocumentFragment();if(Zt>=ws){console.error(`jq79: <${ee(t)}> is ${ws} levels deep inside itself; giving up here. A component that renders itself stops when its data stops - is there a cycle in it?`);return}Zt++;try{(r?N.renderShadow(W):N.render(W)).mount(U)}finally{Zt--}let w=n[Tt];w&&N.holdOwner(w.owner),i?i.parentNode.insertBefore(U,i):l.appendChild(U);let M=Se(n,!0);if(C){let P=[];M.effect(()=>{let _=Os(I(),q),B=Object.keys(_);P.forEach(V=>{V in _||(N.data[V]=void 0)}),B.forEach(V=>{N.data[V]=_[V]}),P=B})}else Object.entries(c).forEach(([P,_])=>{q!==null&&!q.has(P)||M.effect(()=>{N.data[P]=j(_,n)})});G=M,H=N}),s.onDispose(()=>{G?.dispose(),H?.destroy()}),l},oi=(e,t)=>{let n=()=>{let s=j(e,t);return s!==null&&typeof s=="object"?s:null};return new Proxy(t,{has(s,r){let l=n();return l!==null&&Reflect.has(l,r)||Reflect.has(s,r)},get(s,r){let l=n();return l!==null&&Reflect.has(l,r)?l[r]:Reflect.get(s,r)},set(s,r,l){let o=n();return o!==null&&Reflect.has(o,r)?(o[r]=l,!0):Reflect.set(s,r,l)}})},wt=e=>typeof e=="string"?e.split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(wt):e!==null&&typeof e=="object"?Object.entries(e).flatMap(([t,n])=>n?wt(t):[]):[],We=(e,t)=>{if(typeof e=="string"){if(e&&!/\s/.test(e))t.push(e);else if(e)for(let n of e.split(/\s+/))n&&t.push(n)}else if(Array.isArray(e))for(let n of e)We(n,t);else if(e!==null&&typeof e=="object")for(let n in e)e[n]&&We(n,t)},Ys=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Js=(e,t,n,s,r,l)=>{let o=[];l.effect(()=>{let i=[];if(t!==void 0&&We(j(t,r),i),n)for(let[a,c]of n)j(c,r)&&We(a,i);if(!X.cachedSetters)o.forEach(a=>{!i.includes(a)&&!s.has(a)&&e.classList.remove(a)}),e.classList.add(...i);else if(!Ys(o,i)){for(let a of o)!i.includes(a)&&!s.has(a)&&e.classList.remove(a);for(let a of i)o.includes(a)||e.classList.add(a)}o=i})},ii=e=>typeof e=="function"?(t,n,s)=>{try{return!!e(t,n,s)}catch{return!1}}:typeof e=="string"||Array.isArray(e)?kn(e):()=>!1,li=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),bn=e=>e.ns===void 0?document.createElement(e.tag):document.createElementNS(e.ns,e.tag),ai={"http://www.w3.org/2000/svg":["svg","feGaussianBlur"],"http://www.w3.org/1998/Math/MathML":["math","mi"]},$s=new Map,ci=(e,t)=>{let n=`${e} ${t}`,s=$s.get(n);if(s!==void 0)return s;let r=ai[e],l=t;if(r!==void 0&&typeof DOMParser<"u"&&/^[a-z][a-z0-9]*$/.test(t)){let[o,i]=r;l=new DOMParser().parseFromString(`<${o}><${i} ${t}="x"/></${o}>`,"text/html").querySelector(i)?.getAttributeNames().find(c=>c.toLowerCase()===t)??t}return $s.set(n,l),l},er=(e,t)=>{let n=e.namespaceURI;if(n===null||n===Fs)return t;let s=t.replace(/-/g,"").toLowerCase(),r=ci(n,s);return r===s?t:r},$n=(e,t,n)=>{let s=li.has(t);(s?!n:n==null)?e.removeAttribute(t):e.setAttribute(t,s?"":String(n))},X={cloneSkeletons:!0,scopedNames:!0,batchHandlers:!0,cachedSetters:!0,compileSkeletons:!0},di=new Set([":text",":html",":value",":checked",":selected"]),ui=e=>e.startsWith("@")||e===":class"||e.startsWith(":class.")||di.has(e)?!0:e.startsWith(":")?e===":model"?!1:!be(e)&&!e.includes("."):e!==Le,tr=e=>{if(e.component||e.tag.includes("-")||ut(e.tag)||e.tag==="template"||e.ns===void 0&&document.createElement(e.tag)instanceof HTMLUnknownElement)return!1;for(let t in e.attrs)if(!ui(t))return!1;return e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?!0:e.children.every(t=>typeof t=="string"||tr(t))},nr=(e,t,n)=>{let s=bn(e),r,l=null;for(let p in e.attrs){let $=e.attrs[p];if(p.startsWith("@"))n.push({kind:"event",path:t,attr:p,expr:$});else if(p===":class")r=$;else if(p.startsWith(":class."))(l??(l=[])).push([p.slice(7),$]);else if(!be(p))if(p.startsWith(":")){let C=p.slice(1);n.push({kind:"attr",path:t,name:er(s,C),expr:$||ce(C)})}else s.setAttribute(p,$)}(r!==void 0||l)&&n.push({kind:"class",path:t,classExpr:r,toggles:l,staticClasses:new Set(wt(e.attrs.class??""))});let o=e.attrs[":text"],i=e.attrs[":html"];o!==void 0?n.push({kind:"textContent",path:t,expr:o}):i!==void 0?n.push({kind:"html",path:t,expr:i}):e.children.forEach((p,$)=>{if(typeof p=="string"){p.includes("{{")?(n.push({kind:"text",path:[...t,$],parts:dt(p)}),s.appendChild(document.createTextNode(""))):s.appendChild(document.createTextNode(p));return}s.appendChild(nr(p,[...t,$],n))});let a=e.attrs[":value"];a!==void 0&&n.push({kind:"value",path:t,expr:a});let c=e.attrs[":checked"];c!==void 0&&n.push({kind:"checked",path:t,expr:c});let d=e.attrs[":selected"];return d!==void 0&&n.push({kind:"selected",path:t,expr:d}),s},fi=3,sr=e=>e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?1:1+e.children.reduce((t,n)=>t+(typeof n=="string"?0:sr(n)),0),Ts=new WeakMap,Rs=new WeakSet,pi=e=>{let t=Ts.get(e);if(t!==void 0)return t;if(!Rs.has(e))return Rs.add(e),null;let n=null;if(tr(e)&&sr(e)>=fi){let s=[];n={skeleton:nr(e,[],s),ops:s}}return Ts.set(e,n),n},hi=(e,t)=>{let n=e;for(let s=0;s<t.length;s++){n=n.firstChild;for(let r=t[s];r>0;r--)n=n.nextSibling}return n},gi=["r","s","fx","o","K","h"],mi={ev:Ho,evalExpr:j,bindText:En,bindEvent:wn,renderText:rn,bindClassNames:(e,t,n,s)=>{for(let r of t)!n.includes(r)&&!s.has(r)&&e.classList.remove(r);for(let r of n)t.includes(r)||e.classList.add(r)},collectClassNames:(e,t)=>We(e,t),sameNames:(e,t)=>Ys(e,t),applyAttr:(e,t,n)=>$n(e,t,n),sanitizeHTML:e=>ze(e)},xs=new Map,yi=e=>{let t=[],n=new Map([["","r"]]),s=0,r=o=>{let i=o.join("."),a=n.get(i);if(a)return a;let c=o.slice(0,-1),d=o[o.length-1],p=`${r(c)}.firstChild`,$=d;for(let O=d-1;O>=0;O--){let D=n.get([...c,O].join("."));if(D){p=D,$=d-O;break}}for(let O=0;O<$;O++)p+=".nextSibling";let C=`n${s++}`;return t.push(`const ${C} = ${p}`),n.set(i,C),C},l=(o,i)=>t.push(`{ ${o}; fx.effect(() => { ${i} }) }`);return e.forEach((o,i)=>{let a=r(o.path),c=`o[${i}]`;if(o.kind==="text"){let[d]=o.parts;o.parts.length===1&&typeof d!="string"?l(`const t${i} = ${a}, e${i} = ${c}.parts[0].expr, k${i} = K[${i}]; let last${i} = t${i}.data`,`{ const v = h.ev(k${i}, e${i}, s); const x = v == null ? "" : String(v); if (x !== last${i}) t${i}.data = last${i} = x }`):l(`const t${i} = ${a}, p${i} = ${c}.parts; let last${i} = t${i}.data`,`{ const x = h.renderText(p${i}, s); if (x !== last${i}) t${i}.data = last${i} = x }`)}else if(o.kind==="event")t.push(`h.bindEvent(${a}, ${c}.attr, ${c}.expr, s)`);else if(o.kind==="attr")l(`const el${i} = ${a}, c${i} = ${c}`,`h.applyAttr(el${i}, c${i}.name, h.ev(K[${i}], c${i}.expr, s))`);else if(o.kind==="class")l(`const el${i} = ${a}, c${i} = ${c}, k${i} = K[${i}]; let b${i} = []`,`{ const next = []; if (c${i}.classExpr !== undefined) h.collectClassNames(h.ev(k${i}, c${i}.classExpr, s), next); if (c${i}.toggles) for (const [n, e] of c${i}.toggles) if (h.evalExpr(e, s)) h.collectClassNames(n, next); if (!h.sameNames(b${i}, next)) h.bindClassNames(el${i}, b${i}, next, c${i}.staticClasses); b${i} = next }`);else if(o.kind==="textContent")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.textContent !== x) el${i}.textContent = x }`);else if(o.kind==="html")l(`const el${i} = ${a}, c${i} = ${c}`,`el${i}.innerHTML = h.sanitizeHTML(String(h.ev(K[${i}], c${i}.expr, s) ?? ""))`);else if(o.kind==="value")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = String(h.ev(K[${i}], c${i}.expr, s) ?? ""); if (el${i}.value !== x) el${i}.value = x }`);else if(o.kind==="checked")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.checked !== x) el${i}.checked = x }`);else if(o.kind==="selected")l(`const el${i} = ${a}, c${i} = ${c}`,`{ const x = !!h.ev(K[${i}], c${i}.expr, s); if (el${i}.selected !== x) el${i}.selected = x }`);else{let d=o}}),`"use strict"
18
18
  ${t.join(`
19
19
  `)}`},Ei=e=>e.map(t=>{if(t.kind==="text"){let[n]=t.parts;return t.parts.length===1&&typeof n!="string"?Ie(n.expr,He):""}return t.kind==="class"?t.classExpr!==void 0?Ie(t.classExpr,He):"":t.kind==="event"?"":Ie(t.expr,He)}),wi=e=>{let t=yi(e.ops),n=xs.get(t);if(n===void 0){try{n=Nt(gi,t)}catch{return null}xs.set(t,n)}return e.keys=Ei(e.ops),n},Si=(e,t,n)=>{let s=e.skeleton.cloneNode(!0);if(X.compileSkeletons&&X.cachedSetters&&(e.factory===void 0&&(e.factory=wi(e)),e.factory))return e.factory(s,t,n,e.ops,e.keys,mi),s;for(let r of e.ops){let l=r.path.length===0?s:hi(s,r.path);if(r.kind==="text")En(l,r.parts,t,n);else if(r.kind==="event")wn(l,r.attr,r.expr,t);else if(r.kind==="attr"){let o=l,{name:i,expr:a}=r;n.effect(()=>$n(o,i,j(a,t)))}else if(r.kind==="class")Js(l,r.classExpr,r.toggles,r.staticClasses,t,n);else if(r.kind==="textContent"){let o=l,{expr:i}=r;n.effect(()=>{let a=String(j(i,t)??"");o.textContent!==a&&(o.textContent=a)})}else if(r.kind==="html"){let o=l,{expr:i}=r;n.effect(()=>{o.innerHTML=ze(String(j(i,t)??""))})}else if(r.kind==="value"){let o=l,{expr:i}=r;n.effect(()=>{let a=String(j(i,t)??"");o.value!==a&&(o.value=a)})}else if(r.kind==="checked"){let o=l,{expr:i}=r;n.effect(()=>{let a=!!j(i,t);o.checked!==a&&(o.checked=a)})}else if(r.kind==="selected"){let o=l,{expr:i}=r;n.effect(()=>{let a=!!j(i,t);o.selected!==a&&(o.selected=a)})}else{let o=r}}return s},Tn=(e,t,n,s)=>{let r=e.attrs[":with"],l=r!==void 0?oi(r,t):t;if(ut(e.tag))return ni(e,l,n,s);if(e.tag==="template"&&Fe(e)!==void 0)return Jo(e);let o=ys(e,l);if(o)return bs(o,e,l,n,s);if(X.cloneSkeletons){let x=pi(e);if(x)return Si(x,l,n)}let i=bn(e);if(e.component!==void 0&&l[Tt]?.count===0)throw Vo(e.component,l);let a=e.ns===void 0&&(e.component!==void 0||e.tag.includes("-"));if(a){let x=!1;n.effect(()=>{if(x)return;let I=ys(e,l);if(!I)return;x=!0;let H=bs(I,e,l,n,s),K=Sn(H);n.onDispose(()=>vt(K)),i.replaceWith(H)})}for(let x in e.attrs){let I=e.attrs[x];if(x.startsWith("@"))wn(i,x,I,l);else if(x===":model"||x.startsWith(":model."))a||console.warn(`jq79: ${x} on <${ee(e)}> does nothing - :model binds component tags only (for now)`);else if(!be(x))if(x.startsWith(":"))if(a)i.setAttribute(x,I);else{let H=x.slice(1),K=I||ce(H),G=er(i,H);n.effect(()=>$n(i,G,j(K,l)))}else i.setAttribute(x,I)}let c=e.attrs[":class"],d=null;for(let x in e.attrs)x.startsWith(":class.")&&(d??(d=[])).push([x.slice(7),e.attrs[x]]);(c!==void 0||d)&&Js(i,c,d,new Set(wt(e.attrs.class??"")),l,n);let p=e.attrs[":text"],$=e.attrs[":html"],C=e.attrs[":html.allowed"];C!==void 0&&$===void 0&&console.warn("jq79: :html.allowed without :html on the same element does nothing"),p!==void 0?n.effect(()=>{let x=String(j(p,l)??"");i.textContent!==x&&(i.textContent=x)}):$!==void 0?n.effect(()=>{let x=C!==void 0?{allowUrl:ii(j(C,l))}:void 0;i.innerHTML=ze(String(j($,l)??""),x)}):i instanceof HTMLTemplateElement?xe(e.children,l,n,s,i.content):xe(e.children,l,n,s,i);let O=e.attrs[":value"];O!==void 0&&n.effect(()=>{let x=String(j(O,l)??"");i.value!==x&&(i.value=x)});let D=e.attrs[":checked"];D!==void 0&&n.effect(()=>{let x=!!j(D,l);i.checked!==x&&(i.checked=x)});let L=e.attrs[":selected"];return L!==void 0&&n.effect(()=>{let x=!!j(L,l);i.selected!==x&&(i.selected=x)}),i},bi=(e,t,n,s)=>{let r=document.createComment("if"),l=document.createDocumentFragment();l.appendChild(r);let o=null,i=null,a=null;return n.effect(()=>{let c=e.find(p=>p.expr===void 0||j(p.expr,t))??null;if(c===i||(a?.dispose(),o&&vt(o),o=null,i=c,!c))return;a=Se(t);let d=Tn(c.node,t,a,s);o=Sn(d),r.parentNode.insertBefore(d,r.nextSibling)}),n.onDispose(()=>a?.dispose()),l},ke=(e,t,n)=>{Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})},$i=e=>{let t=new Uint8Array(e.length),n=[],s=new Int32Array(e.length).fill(-1);for(let r=0;r<e.length;r++){let l=e[r];if(l<0)continue;let o=0,i=n.length;for(;o<i;){let a=o+i>>1;e[n[a]]<l?o=a+1:i=a}o>0&&(s[r]=n[o-1]),n[o]=r}for(let r=n.length?n[n.length-1]:-1;r!==-1;r=s[r])t[r]=1;return t},Ti=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},rr=(e,t)=>typeof e=="string"?t.some(n=>vs(e,n)):Object.values(e.attrs).some(n=>t.some(s=>vs(n,s)))||e.children.some(n=>rr(n,t)),or=e=>typeof e!="string"&&(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs||":each"in e.attrs||e.component!==void 0||e.tag.includes("-")||ut(e.tag)||e.children.some(or)),Ns=/[A-Za-z0-9_$]/,Ri=/^[A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*$/,vs=(e,t)=>{for(let n=e.indexOf(t);n!==-1;n=e.indexOf(t,n+1)){let s=n===0?"":e[n-1],r=e[n+t.length]??"";if(!Ns.test(s)&&!Ns.test(r))return!0}return!1},Qt=new WeakMap,xi=e=>{let t=Qt.get(e);if(t!==void 0)return t;let n=e.attrs[":each"].match(es);if(!n)return Qt.set(e,null),null;let[,s,r,l]=n,o=e.attrs[":key"],i=o===s,a=o!==void 0&&!i&&Ri.test(o)&&o.startsWith(`${s}.`)?o.slice(s.length+1):void 0,{[":each"]:c,[":key"]:d,[":window"]:p,...$}=e.attrs,C={...e,attrs:$},O=["$index",...r?[r]:[]],D=rr(C,O),L=/^[A-Z]/.test(s)||r!==void 0&&/^[A-Z]/.test(r),x=o!==void 0&&or(C),I={itemName:s,atName:r,listExpr:l,keyExpr:o,keyIsItem:i,keyProp:a,itemNode:C,readsPosition:D,namesComponent:L,nestsScopes:x,windowExpr:p};return Qt.set(e,I),I},pt=8,Ni=/^(auto|scroll|overlay)$/,vi=e=>{for(let t=e;t;t=t instanceof ShadowRoot?t.host:t.parentNode)if(!(!(t instanceof HTMLElement)||t===document.body||t===document.documentElement)&&Ni.test(getComputedStyle(t).overflowY))return t;return null},Pi=(e,t,n,s,r)=>{let l=()=>{let E=e.component!==void 0||e.tag.includes("-")?document.createElement("div"):bn(e);return E.setAttribute("aria-hidden","true"),E.setAttribute("style","height: 0px; margin: 0; padding: 0; border: 0; list-style: none; visibility: hidden"),E},o=l(),i=l(),a=we({start:0,count:-1}),c=0,d=0,p=null,$=!1,C=0,O=null,D=null,L=E=>Math.ceil(E/c)+1+2*pt,x=(E,T)=>{E=Math.max(0,Math.min(E,Math.max(0,d-T))),(a.start!==E||a.count!==T)&&Ee(()=>{a.start=E,a.count=T})},I=()=>{let E=o.getBoundingClientRect().top;if(p){let T=p.getBoundingClientRect(),N=p.scrollTop;return{listTop:E-T.top-p.clientTop+N,scrollTop:N,height:p.clientHeight||window.innerHeight}}return{listTop:E+window.scrollY,scrollTop:window.scrollY,height:window.innerHeight}},H=()=>{if(C=0,!(c>0)||!o.isConnected)return;let{listTop:E,scrollTop:T,height:N}=I();x(Math.floor((T-E)/c)-pt,L(N))},K=()=>{C||(C=typeof requestAnimationFrame=="function"?requestAnimationFrame(H):setTimeout(H,16))},G=(E,{block:T="nearest"}={})=>{if(z(),c>0&&o.isConnected){let{listTop:W,scrollTop:U,height:w}=I(),M=W+E*c,P=M+c,_=U;T==="start"?_=M:T==="end"?_=P-w:T==="center"?_=M-(w-c)/2:M<U?_=M:P>U+w&&(_=P-w),_!==U&&(p?p.scrollTop=_:window.scrollTo(window.scrollX,_)),H()}let N=a.count>0?a.count:L(window.innerHeight||800);(E<a.start||E>=a.start+N)&&x(E-pt,N);let q=r().find(W=>W.scope.$index===E);return q?q.range.first:null},z=()=>{$||!o.isConnected||($=!0,D=o.parentElement,p=vi(o.parentNode),(p??window).addEventListener("scroll",K,{passive:!0}),window.addEventListener("resize",K),p&&typeof ResizeObserver=="function"&&(O=new ResizeObserver(K),O.observe(p)),D&&Object.defineProperty(D,"$scrollTo",{value:G,configurable:!0,writable:!0}),H())};s.onDispose(()=>{C&&(typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout)(C),$&&((p??window).removeEventListener("scroll",K),window.removeEventListener("resize",K),O?.disconnect(),D&&D.$scrollTo===G&&delete D.$scrollTo)});let J=!1;return{top:o,bottom:i,range:E=>{d=E;let T=Number(j(t,n)),N=c;if(c=T>0?T:0,c&&c!==N&&$&&o.isConnected){let{listTop:w,scrollTop:M,height:P}=I(),_=Z(a);_.count=L(P),_.start=Math.max(0,Math.floor((M-w)/c)-pt)}if(!c)return o.style.height=i.style.height="0px",[0,E];let q=a.count>0?a.count:L(window.innerHeight||800),W=Math.max(0,Math.min(a.start,E-q)),U=Math.min(E,W+q);return o.style.height=`${W*c}px`,i.style.height=`${(E-U)*c}px`,[W,U]},settled:()=>{$||J||(J=!0,queueMicrotask(()=>{J=!1,z()}))}}},ki=(e,t,n,s)=>{let r=xi(e);if(!r)return document.createComment(`invalid :each expression "${e.attrs[":each"]}"`);let{itemName:l,atName:o,listExpr:i,keyExpr:a,keyIsItem:c,keyProp:d,itemNode:p,readsPosition:$,namesComponent:C,nestsScopes:O,windowExpr:D}=r,L=document.createComment("each"),x=document.createDocumentFragment();x.appendChild(L);let I=D===void 0?null:Pi(p,D,t,n,()=>H);I&&x.append(I.top,I.bottom),(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs)&&console.warn("jq79: :if/:elseif/:else on a :each element is ignored; filter the list expression instead");let H=[],K=!1;return n.effect(()=>{let G=Ko(t);try{let z=j(i,t),J=Array.isArray(z),E=J?null:Ti(z)?Object.keys(z):[],T=J?z.length:E.length,[N,q]=I?I.range(T):[0,T],W=new Map;H.forEach((u,g)=>{u.pos=g;let h=W.get(u.key);h?h.push(u):W.set(u.key,[u])});let U=new Set,w=[],M=[],P=[],_=[],B;for(let u=N;u<q;u++){let g=J?u:E[u],h=J?z[u]:z[g],S=g;c?S=h:d!==void 0&&h!==null&&typeof h=="object"?S=h[d]:a!==void 0&&(B===void 0?(B=Object.create(t),ke(B,l,h),o&&ke(B,o,g),ke(B,"$index",u)):(B[l]=h,o&&(B[o]=g),B.$index=u),S=j(a,B)),U.has(S)&&!K&&(K=!0,console.warn(`jq79: duplicate :key in :each "${e.attrs[":each"]}"; duplicates pair up by position`)),U.add(S);let m=W.get(S)?.shift();if(m&&Object.is(m.item,h)){let k=m.scope;k.$index!==u&&($&&w.push(m),k.$index=u),o&&k[o]!==g&&(k[o]=g),P.push(m),_.push(m.pos);continue}if(m&&a!==void 0){let k=m.scope;k[l]=h,k.$index!==u&&(k.$index=u),o&&k[o]!==g&&(k[o]=g),m.item=h,M.push(m),P.push(m),_.push(m.pos);continue}m&&(m.fx.dispose(),vt(m.range));let y=Object.create(t);ke(y,l,h),o&&ke(y,o,g),ke(y,"$index",u),C||Zs.add(y);let b=Se(t);O&&Object.defineProperty(y,jt,{value:b});let R=Sn(Tn(p,y,b,s));P.push({key:S,item:h,scope:y,fx:b,range:R,pos:u}),_.push(-1)}let V=new Set;W.forEach(u=>u.forEach(g=>V.add(g))),V.size&&(V.forEach(u=>{u.dead=!0,u.fx.dispose()}),Wo(Bo(H,u=>u.dead===!0)));let ne=I?I.top:L,f=$i(_);P.forEach((u,g)=>{!f[g]&&ne.nextSibling!==u.range.first&&Uo(u.range,ne),ne=u.range.last}),w.forEach(u=>Pe(()=>u.fx.refresh())),M.forEach(u=>Pe(()=>u.fx.rerun())),H=P}finally{zo(G)}I?.settled()}),n.onDispose(()=>H.forEach(G=>G.fx.dispose())),x},ir=(e,t)=>{let n=t;for(;n<e.length&&typeof e[n]=="string"&&!e[n].trim();)n++;return n},Xt=e=>{let t=":if"in e.attrs,n=":elseif"in e.attrs,s=":else"in e.attrs;if((t?1:0)+(n?1:0)+(s?1:0)<2)return;let r=[t?":if":null,n?":elseif":null,s?":else":null].filter(Boolean);console.warn(`jq79: ${r.join(" and ")} on the same <${ee(e)}> - only ${r[0]} applies; the branches of a chain are sibling elements, one directive each`)},Ci=(e,t)=>{let n=":elseif"in e.attrs?":elseif":":else";console.warn(t?`jq79: a second ${n} on <${ee(e)}> - the chain before it already ended with :else, which closes it. One :if, any number of :elseif, at most one :else`:`jq79: ${n} on <${ee(e)}> continues no :if - it renders unconditionally. A chain is :if, then :elseif, then :else, on adjacent siblings: anything but whitespace between them breaks it`)},Mi=[":if",":elseif",":else",":each"],Ai=(e,t)=>{if(e.tag!=="template"||e.ns!==void 0)return;let n=Mi.find(s=>s in e.attrs);if(n!==void 0){if(Fe(e)!==void 0){if(t?.component===void 0)return;console.warn(`jq79: ${n} on <template ${Fe(e)}> is ignored - a slot is filled with its children as written. Put ${n} on the elements inside it, or on the component's tag`);return}console.warn(`jq79: ${n} on a nested <template> shows nothing - a <template>'s children live in its .content and never reach the page. Put ${n} on the elements themselves`)}},Oi=[...Ut,":model",":slot"].map(e=>e.slice(1)),_i={":attrs":':attrs was removed in 0.7 - it now binds an attribute called "attrs". Bind them one at a time (:disabled="x", :title="y"), or :class for classes'},ji=e=>{for(let t in e.attrs){let n=_i[t];n!==void 0&&console.warn(`jq79: ${n}`)}},Li=e=>{if(!(e.component!==void 0||e.tag.includes("-")))for(let t in e.attrs){if(!t.startsWith(":")||be(t)||t===":model"||t.startsWith(":model."))continue;let n=t.slice(1);if(n.includes(".")){console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". Dotted modifiers belong to an event: if you meant @${n}, that is the spelling`);continue}let s=Oi.find(r=>n!==r&&n.startsWith(r));s!==void 0&&console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". A ":name" jq79 does not recognize binds that attribute (which is what :src and :disabled are). If you meant :${s}, that is the spelling`)}},lr=(e,t)=>{e.forEach(s=>{typeof s!="string"&&(Ai(s,t),ji(s),Li(s),lr(s.children,s))});let n=!1;for(let s=0;s<e.length;){let r=e[s];if(typeof r=="string"){r.trim()&&(n=!1),s++;continue}if(":each"in r.attrs){n=!1,s++;continue}if(Xt(r),":if"in r.attrs){s++;let l=i=>{let a=ir(e,s),c=e[a];if(typeof c=="object"&&i in c.attrs)return s=a+1,c};for(let i=l(":elseif");i;i=l(":elseif"))Xt(i);let o=l(":else");o&&Xt(o),n=o!==void 0;continue}(":elseif"in r.attrs||":else"in r.attrs)&&Ci(r,n),n=!1,s++}},Ps=new WeakMap,Di=(e,t,n)=>{let s=Ps.get(t);if(s)return s;let r=[{expr:t.attrs[":if"],node:t}],l=n+1,o=c=>{let d=ir(e,l),p=e[d];if(typeof p=="object"&&c in p.attrs)return l=d+1,p};for(let c=o(":elseif");c;c=o(":elseif"))r.push({expr:c.attrs[":elseif"],node:c});let i=o(":else");i&&r.push({node:i});let a={branches:r,next:l};return Ps.set(t,a),a},xe=(e,t,n,s=!1,r)=>{let l=r??document.createDocumentFragment(),o=0;for(;o<e.length;){let i=e[o];if(typeof i=="string"){let a=document.createTextNode(i);i.includes("{{")&&En(a,qo(i),t,n),l.appendChild(a),o++;continue}if(":each"in i.attrs){l.appendChild(ki(i,t,n,s)),o++;continue}if(":if"in i.attrs){let a=Di(e,i,o);l.appendChild(bi(a.branches,t,n,s)),o=a.next;continue}l.appendChild(Tn(i,t,n,s)),o++}return l},Ii=(e,t,n=!1)=>xe(e.template,t,Se(t),n),Oe="data-jq79",Hi=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0).toString(36)},ar=(e,t)=>{e.forEach(n=>{typeof n!="string"&&(n.attrs[Oe]=t,ar(n.children,t))})},qi=/^:(before|after|first-line|first-letter)(?![\w-])/i,cr=(e,t)=>{let n=0;for(let s=0;s<e.length;s++){let r=e[s];if(r==="\\")s++;else if(r==='"'||r==="'")for(s++;s<e.length&&e[s]!==r;)s+=e[s]==="\\"?2:1;else if(r==="("||r==="[")n++;else if(r===")"||r==="]")n--;else if(n===0&&t(s))return}},Fi=(e,t)=>{let n=e.length;return cr(e,s=>e[s]!==":"||e[s+1]!==":"&&!qi.test(e.slice(s))?!1:(n=s,!0)),`${e.slice(0,n)}[${Oe}="${t}"]${e.slice(n)}`},Wi=(e,t)=>{let n=dr(e),s=n.match(/^\s*/)[0],r=n.match(/\s*$/)[0],l=n.slice(s.length,n.length-r.length);if(!l)return e;let o=[],i=0;return cr(l,a=>{l[a]===","&&(o.push(l.slice(i,a)),i=a+1)}),o.push(l.slice(i)),s+o.map(a=>a.trim()&&Fi(a.trim(),t)).join(", ")+r},dr=e=>{let t="";for(let n=0;n<e.length;){let s=e[n];if(s==="/"&&e[n+1]==="*"){let r=e.indexOf("*/",n+2);n=r===-1?e.length:r+2}else if(s==='"'||s==="'"){let r=n+1;for(;r<e.length&&e[r]!==s;)r+=e[r]==="\\"?2:1;t+=e.slice(n,r+1),n=r+1}else s==="\\"?(t+=e.slice(n,n+2),n+=2):(t+=s,n++)}return t},Bi=/(^|[\s>+~,(])([A-Z][A-Za-z0-9]*)(?![\w-])/g,Ui=/[a-z]/,Ki=e=>e.replace(Bi,(t,n,s)=>Ui.test(s)?`${n}${De(s)}`:t),ur=/^\s*@(media|supports|container|layer|scope|document)\b/i,fr=/^\s*@/,zi=e=>{let t="",n="",s="",r=[],l=()=>r.length===0||r[r.length-1],o=()=>{t+=l()&&!fr.test(s)?Ki(n):n,n=""},i=c=>{o(),t+=c,s+=c},a=(c,d)=>{o(),t+=c,s="",d!==void 0?r.push(d):c==="}"&&r.pop()};for(let c=0;c<e.length;){let d=e[c];if(d==="/"&&e[c+1]==="*"){let p=e.indexOf("*/",c+2),$=p===-1?e.length:p+2;i(e.slice(c,$)),c=$}else if(d==='"'||d==="'"){let p=c+1;for(;p<e.length&&e[p]!==d;)p+=e[p]==="\\"?2:1;i(e.slice(c,Math.min(p+1,e.length))),c=p+1}else d==="{"?(a("{",ur.test(s)),c++):d==="}"||d===";"?(a(d),c++):(n+=d,s+=d,c++)}return o(),t},Gi=(e,t)=>{/:deep\(|::v-deep|>>>/.test(e)&&console.warn("jq79: :deep()/::v-deep/>>> are not supported in <style scoped>; the rule will be dropped by the browser");let n="",s="",r=[],l=()=>r.length===0||r[r.length-1];for(let o=0;o<e.length;){let i=e[o],a=i;if(i==="/"&&e[o+1]==="*"){let c=e.indexOf("*/",o+2);a=e.slice(o,c===-1?e.length:c+2)}else if(i==='"'||i==="'"){let c=o+1;for(;c<e.length&&e[c]!==i;)c+=e[c]==="\\"?2:1;a=e.slice(o,c+1)}else i==="\\"&&(a=e.slice(o,o+2));if(o+=a.length,!l())n+=a,a==="{"?r.push(!1):a==="}"&&r.pop();else if(a==="{"){let c=dr(s),d=fr.test(c);n+=(d?s:Wi(s,t))+"{",r.push(d&&ur.test(c)),s=""}else a==="}"||a===";"?(n+=s+a,s="",a==="}"&&r.pop()):s+=a}return n+s},on=e=>{let t=Yn(e),s=new DOMParser().parseFromString(`<template>${t}</template>`,"text/html").querySelector("template"),r=[],l=[];Array.from(s.content.children).forEach(a=>{a.tagName==="TEMPLATE"?l.push(a):r.push(a)});let o=ks(r,e),i={};return l.forEach(a=>{let c=a.getAttribute("name");if(c===null){console.warn("jq79: a top-level <template> without a name declares nothing and was ignored");return}if(!Jn.test(c)){console.warn(`jq79: <template name="${c}"> was ignored - a component name has to be PascalCase, or no tag could ever reference it (only capitalized names resolve as components)`);return}if(c in i){console.warn(`jq79: two <template name="${c}"> in one file; the second was ignored`);return}i[c]=new de({...ks(Array.from(a.content.children),a.innerHTML),siblings:i,name:c})}),Object.keys(i).length&&(o.siblings=i),o},Vi=/^(?:text|application)\/(?:x-)?typescript$/i,Zi=e=>"lang"in e?`lang="${e.lang}"`:Vi.test(e.type?.trim()??"")?`type="${e.type}"`:null,ks=(e,t)=>{let n=[],s=[],r=[];e.forEach(o=>{let i={attrs:qs(o),content:o.textContent??""};o.tagName==="SCRIPT"?n.push(i):o.tagName==="STYLE"?s.push(i):r.push(Ws(o))}),n.forEach(o=>{let i=Zi(o.attrs);i&&console.warn(`jq79: <script ${i}> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its types were never stripped: the script will throw, or - for a plain \`let x: T = ...\` - silently fail to declare x.`)}),s.forEach(o=>{"lang"in o.attrs&&console.warn(`jq79: <style lang="${o.attrs.lang}"> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its styles were left uncompiled and the browser will ignore them.`)}),s.forEach(o=>{"lang"in o.attrs||(o.content=zi(o.content))});let l=o=>"scoped"in o.attrs&&!("lang"in o.attrs);if(s.some(l)){let o=Hi(t);ar(r,o),s.forEach(i=>{l(i)&&(i.scoped=Gi(i.content,o))})}return lr(r),{template:r,scripts:n,styles:s}},pr=/\.html?([?#]|$)/,St=e=>pr.test(e)?fn(e):import(e),Rn=/^(?:\.\.?\/|\/|[a-z][a-z0-9+.-]*:)/i,ln=(e,t)=>{if(!Rn.test(e))return e;try{return new URL(e,new URL(t??"",document.baseURI)).href}catch{return e}},Qi=(e,t)=>e?`
20
20
  //# sourceURL=${e}?jq79-script=${t}`:"",hr=(e,t,n)=>{try{return Nt(e,t,Qi(n.filename,n.index??0))}catch(s){throw s instanceof Ae?new Error(`jq79: safeEval() is on, and script ${n.index??0} of ${n.filename??"a component built from a string"} ${s.reason}. ${s.hint}`):s}},Cs=e=>e.scoped??e.content,qe=`:where([${Xs}]) { display: contents }`,xn=()=>pn&&typeof Document<"u"&&"adoptedStyleSheets"in Document.prototype,bt=e=>{let t=new CSSStyleSheet;return t.replaceSync(e),t},Nn=(e,t)=>{e.adoptedStyleSheets.includes(t)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])},an=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(n=>n!==t)},ht=null,cn=null,Xi=()=>{if(xn()){Nn(document,cn??(cn=bt(qe)));return}ht?.isConnected||(ht=document.createElement("style"),ht.textContent=qe,document.head.appendChild(ht))},$t=new Map,Yi=e=>{let t=$t.get(e);if(!t){if(xn()){let n=bt(e);Nn(document,n),t={sheet:n,count:0}}else{let n=document.createElement("style");n.textContent=e,document.head.appendChild(n),t={el:n,count:0}}$t.set(e,t)}t.count++},Ji=e=>{let t=$t.get(e);t&&--t.count<=0&&(t.sheet?an(document,t.sheet):t.el?.remove(),$t.delete(e))},el=(e,t,n,s={},r=St,l={})=>{let o={...Rr,...s},i=new Proxy(t,{has:(d,p)=>p!=="$__effect"&&p!=="$__import"&&p!=="$__state"&&(Reflect.has(d,p)||!(p in globalThis)&&!(p in o))}),a={},c=hr(ss(Object.keys(o)),rs(e),l)(i,n,r,a,...Object.values(o));return c.catch(d=>console.error("jq79: error in :setup script",d)),zs(c),{settled:c,sync:a.done===!0}},Ms=(e,t)=>{t?.forEach(({name:n,default:s})=>{e[n]===void 0&&(e[n]=s===void 0?void 0:j(s,e))})},Pt=e=>{let t=new Map;return n=>{if(t.has(n))return t.get(n);let s=e(n);return t.set(n,s),s}},gr=e=>(e?.forEach(t=>Object.freeze(t)),e&&Object.freeze(e),e),tl=Pt(Gn),dn=Pt(e=>gr(at(e))),nl=Pt(e=>{let t=it(e);return Object.freeze(t.vars),Object.freeze(t)}),sl=Pt(e=>gr(ls({attrs:{":setup":e},content:""}))),un=e=>{let t=e.attrs[":setup"],n=t===void 0?null:sl(t);return!n&&e.attrs[":setup"]!==void 0&&rl(e,e.attrs[":setup"]),n},As=new WeakSet,rl=(e,t)=>{t.trim()==="_"||As.has(e)||(As.add(e),console.warn(`jq79: :setup="${t}" is not a props pattern, so this component declares no signature and takes whatever a parent passes - write the props it takes ("{ a, b }"), a bare :setup for none, or "_" to stay open on purpose`))},ol=e=>{let t=null;return e.forEach(n=>{let s=dn(n.content)??un(n);if(!s)return;let r=t??(t=new Set);s.forEach(({name:l})=>r.add(l))}),t},Os=(e,t)=>{if(t===null)return e;let n={};return Object.keys(e).forEach(s=>{t.has(s)&&(n[s]=e[s])}),n},_s=new WeakMap,il=(e,t,n,s)=>{if(s===null)return;let r=_s.get(e)??new Set;_s.set(e,r),n.forEach(l=>{s.has(l)||r.has(l)||(r.add(l),console.warn(`jq79: :${l} is not declared by <${t}> - add it to the :setup signature, or drop it`))})},ll=new Set([":value",":checked",":selected",":text",":html",":class"]),js=new WeakSet,al=(e,t,n,s)=>{if(s===null||js.has(e))return;let r=n.filter(l=>s.has(l));r.length&&(js.add(e),r.forEach(l=>console.warn(`jq79: :${l} on <${t}> is a directive, not a prop - <${t}> never receives its "${l}". Rename the prop (${r.map(o=>`:${o}`).join(", ")} are reserved on a component tag), or use :model for a value that goes both ways`)))},cl=(e,t)=>{if(!e)return null;let n=Object.create(null),s=!1;return Object.entries(e).forEach(([r,l])=>{t.has(r)||(n[r]=l,s=!0)}),s?n:null},mr=Symbol("jq79.unfilledProps"),Tt=Symbol("jq79.pendingScripts"),dl=e=>e&&e.default!==void 0?e.default:e,ul=(e,t,n,s={},r=St,l={})=>{let o={...Rr,...s},i={},a=hr(os(Object.keys(o)),is(e),l)(i,dl,r,...Object.values(o)),c=O=>console.error("jq79: error in factory script",O),d=!1,p,$=()=>{if(d)return p;d=!0;let O=i.default;if(typeof O!="function")return;let D=L=>{L&&typeof L=="object"&&Object.assign(t,L)};try{let L=O(t,{$data:t,$props:t,$effect:n,...s});L instanceof Promise?p=L.then(D).catch(c):D(L)}catch(L){c(L)}return p},C=a.then($,c);return zs(C),i.done&&$(),{settled:C,sync:i.done===!0&&p===void 0}},fl="__JQ79_HMR_ENABLED__",pl="__JQ79_HMR__",Re=null,hl=e=>{if(!Re||!e.filename)return;let t=Re.get(e.filename);t||Re.set(e.filename,t=new Set),t.add(new WeakRef(e))},Yt=e=>{try{return new URL(e,document.baseURI).pathname}catch{return e}},yr=(e,t)=>{if(!Re)return 0;let n=Yt(e),s=on(t);te?.forEach((i,a)=>{Yt(a)===n&&te.set(a,Promise.resolve(t))});let r=!1,l=i=>i.name===void 0?s:s.siblings?.[i.name]??null,o=0;for(let[i,a]of Re)if(Yt(i)===n){for(let c of a){let d=c.deref();if(!d){a.delete(c);continue}let p=l(d);if(!p){r=!0;continue}d.hotReplace(p)&&o++}a.size||Re.delete(i)}return r?0:o},Er=()=>{Re??(Re=new Map),globalThis[pl]={update:yr}},Ls=3e3,gl=(e,t)=>{let n=setTimeout(()=>{console.warn(`jq79: ${e.name?`<${e.name}>`:"a component"}${e.filename?` (${e.filename})`:""} has been waiting ${Ls/1e3}s for a :setup script and has rendered nothing. The template waits until every script returns or calls $mounted() - add an await $mounted() above the slow part to render first and fill in after.`)},Ls);n?.unref?.(),Promise.all(t).then(()=>clearTimeout(n))},wr=e=>{if(Rn.test(e))return e;let t=xl.resolve;if(typeof t!="function")return e;try{return t(e)}catch{return e}},te=new Map,Sr=e=>{try{return new URL(e,document.baseURI).href.replace(/#.*$/,"")}catch{return e}},Ds=e=>Promise.all([fetch(e).then(t=>{if(!t.ok)throw new Error(`failed to fetch component from ${e}: ${t.status}`);return t.text()}),Tr?.then(()=>$l(e))]).then(([t])=>t),br=e=>{if(!te)return Ds(e);let t=Sr(e),n=te.get(t);if(!n){n=Ds(e),te.set(t,n);let s=n;s.catch(()=>{te?.get(t)===s&&te.delete(t)})}return n},fn=async e=>{let t=wr(e),n=await br(t);return new de(n,{filename:t})},Is=new WeakSet,Hs=new Set,ml=e=>{if(Hs.has(e))return;Hs.add(e);let t=document.createElement("link");t.rel="modulepreload";let n=hn();n&&t.setAttribute("nonce",n),t.href=e,document.head.append(t)},yl=/<script\b(?:"[^"]*"|'[^']*'|[^>"'])*>([\s\S]*?)<\/script\s*>/gi,Rt=new Set,$r=(e,t,n)=>{for(let{spec:s,kind:r}of Vn(e)){if(r==="component"&&n&&s in n)continue;let l=wr(r==="fetch"?s:ln(s,r==="component"?t:void 0));r==="fetch"||pr.test(l)?te&&br(l).then(o=>El(o,l),()=>{}):Rn.test(l)&&ml(l)}},El=(e,t)=>{let n=Sr(t);if(!Rt.has(n)){Rt.add(n);for(let[,s]of e.matchAll(yl))$r(s,t,void 0)}},wl=(e,t,n)=>{for(let s of e)Is.has(s)||(Is.add(s),$r(s.content,t,n))},Tr,Sl="/jq79-sw.js",bl=async e=>{let t=typeof navigator>"u"?void 0:navigator.serviceWorker;if(!t)throw new Error("jq79: safeEval() compiles components in a service worker, and this page can't have one - service workers need https (or localhost). Precompile with the jq79/vite plugin instead, or use safeEval({ nonce: true }) on a page whose server issues a nonce.");let n;try{n=await t.register(e)}catch(s){throw new Error(`jq79: safeEval() couldn't register its service worker at ${e} (${s.message}). Serve jq79-sw.js from the jq79 package at your site's root, or pass its URL: safeEval({ worker: "/path/jq79-sw.js" }).`)}await t.ready,!t.controller&&await new Promise(s=>{t.addEventListener("controllerchange",()=>s(),{once:!0}),t.controller?s():n.active?.postMessage("jq79:claim")})},$l=e=>{let t=new URL(e,document.baseURI);return t.hash="",t.searchParams.set(ds,""),new Promise((n,s)=>{let r=document.createElement("script"),l=hn();l&&r.setAttribute("nonce",l),r.src=t.href,r.onload=()=>{r.remove(),n()},r.onerror=()=>{r.remove(),s(new Error(`jq79: the precompiled functions of ${e} did not load, and safeEval() can't render it without them`))},document.head.append(r)})},pe=class pe{constructor(t,n={}){A(this,"template");A(this,"scripts");A(this,"styles");A(this,"modules");A(this,"filename");A(this,"siblings");A(this,"name");A(this,"slots");A(this,"modelWriteback");A(this,"data",null);A(this,"fx",null);A(this,"content",null);A(this,"startMarker",null);A(this,"endMarker",null);A(this,"styleEls",[]);A(this,"shadowCss",null);A(this,"shadowSheets",[]);A(this,"sheetRoot",null);A(this,"ownsSharedStyles",!1);A(this,"useShadow",!1);A(this,"mountRoot",null);A(this,"resolveMounted",null);A(this,"renderDone",!1);A(this,"held",0);A(this,"onPaint",null);A(this,"destroyHooks",null);A(this,"attachHooks",null);A(this,"detachHooks",null);A(this,"onPage",!1);A(this,"emitListeners",new Map);let s=typeof t=="string"?on(t):t;this.template=s.template,this.scripts=s.scripts,this.styles=s.styles,this.modules=n.modules??(typeof t=="string"?void 0:t.modules),this.filename=n.filename??(typeof t=="string"?void 0:t.filename),this.siblings=s.siblings,this.name=s.name,this.adoptSiblings(),hl(this)}adoptSiblings(){this.siblings&&Object.entries(this.siblings).forEach(([t,n])=>{n.filename??(n.filename=this.filename),n.modules??(n.modules=this.modules),this.name||(this[t]=n)})}hotReplace(t){let n=typeof t=="string"?on(t):t;mn.clear(),Te.clear(),sn.clear();let s=this.startMarker,r=!!(s&&this.content),l=r&&s.isConnected,o=l?s.parentNode:null,i=l?this.endMarker.nextSibling:null,a={...this.data},c=this.useShadow;return r&&this.destroy(),this.template=n.template,this.scripts=n.scripts,this.styles=n.styles,this.siblings=n.siblings,this.adoptSiblings(),!r||(this.renderWith(a,c),!o)?!1:(c&&this.placeShadowStyles(o,i),o.insertBefore(this.content,i),this.mountRoot=o,this.settleMounted(),!0)}static debug(t){if(t){let n=X.scopedNames;for(let s in t){let r=t[s];Object.prototype.hasOwnProperty.call(X,s)?typeof r=="boolean"?X[s]=r:console.warn(`jq79: Component79.debug ignored "${s}" - the flags are booleans, and the ones it knows are: ${Object.keys(X).join(", ")}`):console.warn(`jq79: Component79.debug does not know "${s}" - the flags it has are: ${Object.keys(X).join(", ")}`)}X.scopedNames!==n&&mt.clear()}return{...X}}static safeEval(t={}){pn=!0;let n=[];if(t.nonce){let r=hn();r===void 0?n.push(Promise.reject(new Error("jq79: safeEval({ nonce: true }) found no nonce on this page - no <script> carries one. The nonce belongs on the script that loads the page, the one the CSP names."))):tn=r}let s=t.worker??(t.nonce?!1:Sl);return s!==!1&&n.push(Tr??(Tr=bl(s))),Promise.all(n).then(()=>{})}static cache(t){return t===!1?(te=null,Rt.clear()):t===!0&&(te??(te=new Map)),!!te}static clearCache(){te?.clear(),Rt.clear()}static fetch(t){if(Array.isArray(t))throw new TypeError("Component79.fetch takes one URL; use fetchAll for an array");return new xt(fn(t))}static fetchAll(t){return Promise.all(t.map(fn))}static importAll(t){if(!Array.isArray(t))throw new TypeError("Component79.importAll takes an array; use import() for one");return Promise.all(t.map(n=>St(ln(n,void 0))))}on(t,n){return this.emitListeners.has(t)||this.emitListeners.set(t,new Set),this.emitListeners.get(t).add(n),this}off(t,n){return this.emitListeners.get(t)?.delete(n),this}render(t={}){return this.renderWith(t,!1)}renderShadow(t={}){return this.renderWith(t,!0)}renderWith(t,n){this.destroy();let s=as(this.scripts,un,dn),r=cl(this.siblings,s),l=r?Object.assign(Object.create(r),t):{...t},o=new Set([...s].filter(w=>!(w in t)));o.size&&Object.defineProperty(l,mr,{value:o}),this.slots&&Object.defineProperty(l,Qs,{value:this.slots}),Object.defineProperty(l,Tt,{value:{count:0,owner:this}});let i=we(l),a=Se(i);this.data=i,this.fx=a,this.useShadow=n,this.startMarker=document.createComment("jq79"),this.endMarker=document.createComment("/jq79");let c=this.startMarker,d=!1,p=(w,M)=>{w==="model:update"&&!d&&(d=!0,console.warn("jq79: $emit('model:update', \u2026) no longer feeds :model - call $updateModel(value) or $updateModel(name, value) instead"));let P=new CustomEvent(w,{detail:M,bubbles:!0,composed:!0,cancelable:!0});return c===this.startMarker&&this.emitListeners.get(w)?.forEach(_=>_(P,M)),P.cancelBubble||c.dispatchEvent(P),!P.defaultPrevented},$,C=new Promise(w=>{$=w});this.resolveMounted=$,this.renderDone=!1,this.held=0;let O=w=>{if(typeof w!="function")throw new TypeError("jq79: $destroyed expects a function");return c!==this.startMarker?(Ce(w,"$destroyed"),()=>{}):Jt(this.destroyHooks??(this.destroyHooks=[]),w)},D=(w,{immediate:M=!0}={})=>{if(typeof w!="function")throw new TypeError("jq79: $attached expects a function");if(c!==this.startMarker)return()=>{};this.watchPage();let P=Jt(this.attachHooks??(this.attachHooks=[]),w);return M&&this.onPage&&Ce(w,"$attached"),P},L=w=>{if(typeof w!="function")throw new TypeError("jq79: $detached expects a function");return c!==this.startMarker?(Ce(w,"$detached"),()=>{}):(this.watchPage(),Jt(this.detachHooks??(this.detachHooks=[]),w))},x=w=>{let M=Je(w);return O(()=>M.$dispose()),M},I=this.endMarker,H=(w=>{let M=[];for(let P=c.nextSibling;P&&P!==I;P=P.nextSibling)P instanceof Element&&(P.matches(w)&&M.push(P),M.push(...Array.from(P.querySelectorAll(w))));return M}),K=(w=>H(w)[0]??null),G=this.modules,z=w=>G&&w in G?Promise.resolve(G[w]):St(ln(w,this.filename)),J=w=>{if(!Array.isArray(w))throw new TypeError("$importAll takes an array; use import() for one");return Promise.all(w.map(z))},T=Object.assign(Object.create(null),{$emit:p,$updateModel:(...w)=>{let[M,P]=w.length>1?w:[void 0,w[0]];return c!==this.startMarker?!1:this.modelWriteback?.(M,P)??!1},$slots:Object.fromEntries(Object.keys(this.slots??{}).map(w=>[w,!0]))}),N=[],q=!0;wl(this.scripts,this.filename,this.modules),this.scripts.forEach((w,M)=>{let P;N.push(new Promise(S=>{P=S}));let _=!1,B=()=>{_=!0,P()},ne={$mounted:()=>(B(),C),$destroyed:O,$attached:D,$detached:L,$computed:x,$self:K,$$self:H,...T,$importAll:J,...r},f={filename:this.filename,index:M},u=":mounted"in w.attrs,g=tl(w.content),h=(()=>{if(g!==null){u&&console.warn("jq79: :mounted on a factory script renders the template before the factory has returned, so none of its bindings exist yet - await $mounted() inside the factory instead."),Ms(i,dn(w.content));let b=u?Vt(g):g;return ul(b,i,R=>a.effect(R),ne,z,f)}let{vars:S,code:m}=nl(w.content);Ms(i,un(w)),S.forEach(b=>{b in i||(i[b]=void 0)});let y=u?Vt(m):m;return el(y,i,b=>a.effect(b),ne,z,f)})();if(h.sync)h.settled.then(B,B);else{let S=l[Tt];S.count++;let m=()=>{S.count--,B()};h.settled.then(m,m)}!h.sync&&!_&&(q=!1)});let W=document.createDocumentFragment(),U=new Proxy(i,{has:(w,M)=>typeof M=="string"&&M in T||Reflect.has(w,M),get:(w,M,P)=>typeof M=="string"&&M in T&&!Reflect.has(w,M)?T[M]:Reflect.get(w,M,P)});if(W.append(this.startMarker,this.endMarker),this.content=W,q?(this.endMarker.parentNode.insertBefore(xe(this.template,U,a,n),this.endMarker),this.renderDone=!0,this.settleMounted()):(Promise.all(N).then(()=>{c===this.startMarker&&(this.endMarker.parentNode.insertBefore(xe(this.template,U,a,n),this.endMarker),this.renderDone=!0,this.settleMounted(),pe.settleAttached())}),gl(this,N)),n)if(xn())this.shadowCss=[...this.styles.map(w=>w.content),qe];else{let w=document.createElement("style");w.textContent=qe,this.styleEls=[...this.styles.map(M=>{let P=document.createElement("style");return P.textContent=M.content,P}),w]}else this.styles.forEach(w=>Yi(Cs(w))),this.ownsSharedStyles=!0;return this}mount(t,n){let s=typeof t=="string"?Ne(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0)&&this.renderWith(n??{},this.useShadow),this.attach(s)}mountShadow(t,n){let s=typeof t=="string"?Ne(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0||!this.useShadow)&&this.renderWith(n??{},!0),this.attach(s)}attach(t){this.mountRoot&&this.detach();let n=this.useShadow&&t instanceof Element?t.shadowRoot??t.attachShadow({mode:"open"}):t;return this.useShadow&&this.placeShadowStyles(n,null),n.appendChild(this.content),this.mountRoot=n,this.settleMounted(),pe.settleAttached(),this}isOnPage(){return this.renderDone&&this.startMarker?.isConnected===!0}watchPage(){me.has(this)||(me.add(this),this.onPage=this.isOnPage(),this.onPage||pe.queueSettle())}static queueSettle(){en||(en=!0,queueMicrotask(()=>{en=!1,pe.settleAttached()}))}static settleAttached(){if(me.size===0)return;let t=[...me].filter(n=>!n.onPage&&n.isOnPage());pe.inDocumentOrder(t).forEach(n=>{n.onPage||!me.has(n)||(n.onPage=!0,n.attachHooks?.slice().forEach(s=>Ce(s,"$attached")))})}notifyDetached(){if(me.size===0)return;let t=[];if(this.startMarker?.isConnected){let n=new Set;for(let r=this.startMarker;r&&(n.add(r),r!==this.endMarker);r=r.nextSibling);let s=r=>{for(;r;r=r.parentNode)if(n.has(r))return!0;return!1};t=pe.inDocumentOrder([...me].filter(r=>r.onPage&&s(r.startMarker)))}else this.onPage&&(t=[this]);t.forEach(n=>{n.onPage&&(n.onPage=!1,n.detachHooks?.slice().forEach(s=>Ce(s,"$detached")))})}static inDocumentOrder(t){return t.sort((n,s)=>n.startMarker.compareDocumentPosition(s.startMarker)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}placeShadowStyles(t,n){if(this.shadowCss&&typeof ShadowRoot<"u"&&t instanceof ShadowRoot){this.sheetRoot&&this.sheetRoot!==t&&this.shadowSheets.forEach(s=>an(this.sheetRoot,s)),this.shadowSheets.length===0&&(this.shadowSheets=this.shadowCss.map(s=>s===qe?cn??(cn=bt(s)):bt(s))),this.shadowSheets.forEach(s=>Nn(t,s)),this.sheetRoot=t;return}this.shadowCss&&this.styleEls.length===0&&(this.styleEls=this.shadowCss.map(s=>{let r=document.createElement("style");return r.textContent=s,r})),this.styleEls.forEach(s=>t.insertBefore(s,n))}settleMounted(){if(!this.renderDone||this.held>0)return;let t=this.onPaint;this.onPaint=null,t?.(),this.mountRoot&&this.resolveMounted?.()}holdOwner(t){this.renderDone&&this.held===0||(t.held++,this.onPaint=()=>{t.held--,t.settleMounted()})}detach(){if(!this.mountRoot||!this.content||!this.startMarker||!this.endMarker)return this;this.notifyDetached();let t=this.startMarker;for(;t;){let n=t.nextSibling;if(this.content.appendChild(t),t===this.endMarker)break;t=n}return this.mountRoot=null,this}destroy(){this.notifyDetached(),me.delete(this),this.attachHooks=null,this.detachHooks=null,this.onPage=!1;let t=this.destroyHooks;this.destroyHooks=null,t?.forEach(s=>Ce(s,"$destroyed")),this.resolveMounted=null;let n=this.onPaint;return this.onPaint=null,n?.(),this.detach(),this.fx?.dispose(),this.fx=null,this.data?.$dispose(),this.styleEls.forEach(s=>s.parentNode?.removeChild(s)),this.styleEls=[],this.sheetRoot&&this.shadowSheets.forEach(s=>{s!==cn&&an(this.sheetRoot,s)}),this.shadowCss=null,this.shadowSheets=[],this.sheetRoot=null,this.ownsSharedStyles&&(this.styles.forEach(s=>Ji(Cs(s))),this.ownsSharedStyles=!1),this.content=null,this.startMarker=null,this.endMarker=null,this.renderDone=!1,this.data=null,this.resolveMounted=null,this}};A(pe,"version",Po);var de=pe,xt=class{constructor(t){A(this,"chain");this.chain=t}queue(t){return this.chain=this.chain.then(n=>(t(n),n)),this}then(t,n){return this.chain.then(t,n)}catch(t){return this.chain.catch(t)}finally(t){return this.chain.finally(t)}mount(t,n){return this.queue(s=>s.mount(t,n))}mountShadow(t,n){return this.queue(s=>s.mountShadow(t,n))}render(t={}){return this.queue(n=>n.render(t))}renderShadow(t={}){return this.queue(n=>n.renderShadow(t))}on(t,n){return this.queue(s=>s.on(t,n))}off(t,n){return this.queue(s=>s.off(t,n))}detach(){return this.queue(t=>t.detach())}destroy(){return this.queue(t=>t.destroy())}};var Tl=e=>new de(e),Ce=(e,t)=>{try{e()}catch(n){console.error(`jq79: error in a ${t} hook`,n)}},Jt=(e,t)=>(e.push(t),()=>{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}),me=new Set,en=!1,Rr={$:Ne,$$:Ue,$create:Ke,$reactive:we,$toRaw:Z,$raw:Ze,$batch:Ee,$tick:Xe,Component79:de,C79:de};typeof globalThis<"u"&&globalThis[fl]&&Er();return Mr(Rl);})();