@getv.design/embed 0.6.0 → 0.6.1

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/LICENSE CHANGED
@@ -15,7 +15,7 @@ publishes them, and any copy of them. It does not include the third-party
15
15
  components described in clause 6.
16
16
 
17
17
  "Licensor" means vDesign, an individual. You can contact the Licensor at
18
- sagar@getv.design.
18
+ teams@getv.design.
19
19
 
20
20
  "You" means the person or organisation that uses, copies or redistributes the
21
21
  Software under this licence.
package/README.md CHANGED
@@ -36,7 +36,7 @@ rebundling), so the editor and the font code still load only when needed:
36
36
  ```html
37
37
  <div id="design"></div>
38
38
  <script type="module">
39
- import { view } from 'https://cdn.jsdelivr.net/npm/@getv.design/embed@0.6.0/dist/view.js';
39
+ import { view } from 'https://cdn.jsdelivr.net/npm/@getv.design/embed@0.6.1/dist/view.js';
40
40
 
41
41
  const text = await (await fetch('/designs/home.vd')).text();
42
42
  await view(document.querySelector('#design'), text);
@@ -230,7 +230,7 @@ has no `problems` or `fonts` event yet to say so.
230
230
  ### Where the faces come from
231
231
 
232
232
  The faces come from `fontBase`, by default this package's `fonts/` folder on
233
- jsDelivr (`https://cdn.jsdelivr.net/npm/@getv.design/embed@0.6.0/fonts/`). That means
233
+ jsDelivr (`https://cdn.jsdelivr.net/npm/@getv.design/embed@0.6.1/fonts/`). That means
234
234
  your readers' browsers request the faces from jsDelivr, and a content security
235
235
  policy needs it in `connect-src`. To keep those requests on your own origin,
236
236
  copy `node_modules/@getv.design/embed/fonts/` to your site and point `fontBase` at it:
@@ -259,7 +259,7 @@ The embed's styles reach the page by one of two routes.
259
259
  ```
260
260
 
261
261
  Link them before the embed runs, from your own origin or from the CDN
262
- (`https://cdn.jsdelivr.net/npm/@getv.design/embed@0.6.0/view.css`). The id is what
262
+ (`https://cdn.jsdelivr.net/npm/@getv.design/embed@0.6.1/view.css`). The id is what
263
263
  the embed looks for: linked without it, the stylesheet still works, but
264
264
  the embed inserts its `<style>` as well.
265
265
 
@@ -1,4 +1,4 @@
1
- @getv.design/embed v0.6.0
1
+ @getv.design/embed v0.6.1
2
2
 
3
3
  Third-party notices.
4
4
 
package/dist/auto.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! @getv.design/embed v0.6.0. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
- import"./chunks/chunk-UN7F6SH4.js";var f="data-vd-live";async function L(n=document,s={}){let e=[...n.querySelectorAll('figure.vd-figure[data-vd-mode="view"]')].filter(t=>!t.hasAttribute(f)&&t.dataset.vdSource);if(e.length===0)return[];for(let t of e)t.setAttribute(f,"opening");let{view:r}=await import("./view.js");return(await Promise.all(e.map(t=>w(t,r,s)))).filter(t=>t!==void 0)}async function w(n,s,e){let r;try{let d=atob(n.dataset.vdSource??"");r=new TextDecoder().decode(Uint8Array.from(d,u=>u.charCodeAt(0)))}catch{n.removeAttribute(f);return}let i=n.querySelector(".vd-figure-art"),t=n.ownerDocument.createElement("div");t.className="vd-figure-live",t.style.height=`${x(n,i)}px`,i?.after(t);let o=n.dataset.vdPage;try{let d=await s(t,r,{fit:"page",...o===void 0?{}:{page:/^\d+$/.test(o)?Number(o):o},...e.fonts?{fonts:e.fonts}:{},...e.fontBase?{fontBase:e.fontBase}:{},...e.surface?{surface:e.surface}:{},...e.onLink?{onLink:e.onLink}:{}});return i?.setAttribute("hidden",""),n.setAttribute(f,"true"),d.pages().length>1&&H(n,t,d,o),d}catch{t.remove(),n.removeAttribute(f);return}}function H(n,s,e,r){let i=(a,v,y)=>{let b=n.ownerDocument.createElement(a);return b.className=v,b.textContent=y,b},t=i("div","vd-figure-pager",""),o=i("button","vd-figure-pager__button","\u2039"),d=i("span","vd-figure-pager__label",""),u=i("button","vd-figure-pager__button","\u203A"),m=i("button","vd-figure-pager__button","Present");o.setAttribute("aria-label","Previous page"),u.setAttribute("aria-label","Next page"),d.setAttribute("aria-live","polite");for(let a of[o,u,m])a.setAttribute("type","button");t.append(o,d,u,m),s.after(t);let c=e.pages(),g=r===void 0?-1:/^\d+$/.test(r)?Number(r):c.findIndex(a=>a.id===r),l=g>=0&&g<c.length?g:0,p=()=>{let a=c[l];d.textContent=`${a?.name??a?.id??""} \xB7 ${l+1} of ${c.length}`},h=a=>{l=Math.min(c.length-1,Math.max(0,l+a)),e.goTo(l),p()};e.on("page",a=>{l=Math.max(0,c.findIndex(v=>v.id===a.id)),p()}),o.addEventListener("click",()=>h(-1)),u.addEventListener("click",()=>h(1)),m.addEventListener("click",()=>{e.play()}),p()}function x(n,s){let e=Number(n.dataset.vdHeight);if(Number.isFinite(e)&&e>0)return e;let r=s?.getBoundingClientRect().height??0;return r>0?Math.max(240,Math.round(r)):420}export{L as hydrate};
1
+ /*! @getv.design/embed v0.6.1. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
+ import"./chunks/chunk-DXK755VP.js";var f="data-vd-live";async function L(n=document,s={}){let e=[...n.querySelectorAll('figure.vd-figure[data-vd-mode="view"]')].filter(t=>!t.hasAttribute(f)&&t.dataset.vdSource);if(e.length===0)return[];for(let t of e)t.setAttribute(f,"opening");let{view:r}=await import("./view.js");return(await Promise.all(e.map(t=>w(t,r,s)))).filter(t=>t!==void 0)}async function w(n,s,e){let r;try{let d=atob(n.dataset.vdSource??"");r=new TextDecoder().decode(Uint8Array.from(d,u=>u.charCodeAt(0)))}catch{n.removeAttribute(f);return}let i=n.querySelector(".vd-figure-art"),t=n.ownerDocument.createElement("div");t.className="vd-figure-live",t.style.height=`${x(n,i)}px`,i?.after(t);let o=n.dataset.vdPage;try{let d=await s(t,r,{fit:"page",...o===void 0?{}:{page:/^\d+$/.test(o)?Number(o):o},...e.fonts?{fonts:e.fonts}:{},...e.fontBase?{fontBase:e.fontBase}:{},...e.surface?{surface:e.surface}:{},...e.onLink?{onLink:e.onLink}:{}});return i?.setAttribute("hidden",""),n.setAttribute(f,"true"),d.pages().length>1&&H(n,t,d,o),d}catch{t.remove(),n.removeAttribute(f);return}}function H(n,s,e,r){let i=(a,v,y)=>{let b=n.ownerDocument.createElement(a);return b.className=v,b.textContent=y,b},t=i("div","vd-figure-pager",""),o=i("button","vd-figure-pager__button","\u2039"),d=i("span","vd-figure-pager__label",""),u=i("button","vd-figure-pager__button","\u203A"),m=i("button","vd-figure-pager__button","Present");o.setAttribute("aria-label","Previous page"),u.setAttribute("aria-label","Next page"),d.setAttribute("aria-live","polite");for(let a of[o,u,m])a.setAttribute("type","button");t.append(o,d,u,m),s.after(t);let c=e.pages(),g=r===void 0?-1:/^\d+$/.test(r)?Number(r):c.findIndex(a=>a.id===r),l=g>=0&&g<c.length?g:0,p=()=>{let a=c[l];d.textContent=`${a?.name??a?.id??""} \xB7 ${l+1} of ${c.length}`},h=a=>{l=Math.min(c.length-1,Math.max(0,l+a)),e.goTo(l),p()};e.on("page",a=>{l=Math.max(0,c.findIndex(v=>v.id===a.id)),p()}),o.addEventListener("click",()=>h(-1)),u.addEventListener("click",()=>h(1)),m.addEventListener("click",()=>{e.play()}),p()}function x(n,s){let e=Number(n.dataset.vdHeight);if(Number.isFinite(e)&&e>0)return e;let r=s?.getBoundingClientRect().height??0;return r>0?Math.max(240,Math.round(r)):420}export{L as hydrate};
@@ -1,2 +1,2 @@
1
- /*! @getv.design/embed v0.6.0. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
1
+ /*! @getv.design/embed v0.6.1. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
2
  var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>{try{return a||b((a={exports:{}}).exports,a),a.exports}catch(c){throw a=0,c}};var l=(b,a,c,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&f(b,d,{get:()=>a[d],enumerable:!(e=h(a,d))||e.enumerable});return b};var n=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b};
@@ -1,3 +1,3 @@
1
- /*! @getv.design/embed v0.6.0. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
- import{a as m,b as w,d as g,e as O,f as P,g as S,h as y,i as p}from"./chunk-RSOCS6S4.js";import{da as R,o as v}from"./chunk-P42KFNKD.js";import{b as h}from"./chunk-VTEBIFPH.js";function E(e){return m(e)}async function L(e,n={}){let t=n.fonts??"approximate";if(!x.includes(t))throw new TypeError(`renderSvg: fonts must be one of ${x.join(", ")}; got ${String(t)}.`);let o=t==="exact"?y(n.fontBase,F()):void 0,{document:i,blocks:a,problems:s}=await O(e),r=n.page===void 0?i:D(i,n.page),u=B(a),f=n.idPrefix,d=[...s],c;if(t==="exact")if(o===void 0)d.push(p([],"no fontBase was given and this build has no default"));else{let{exactSvg:l}=await import("./fonts.js"),b=await l(r,{base:o,resolveAsset:u,...f?{idPrefix:f}:{}});"svg"in b?c=b.svg:d.push(p(b.failures))}return c??=R(r,{ids:!1,resolveAsset:u,...f?{idPrefix:f}:{}}),n.onProblems?.(d),c}function M(e){return typeof e=="string"?w(e).vd:void 0}function C(e){let{document:n,problems:t}=m(e),{document:o}=g(n),{vd:i,offset:a}=typeof e=="string"?w(e):{vd:void 0,offset:0},s=new Map;if(i!==void 0){let r=/^frame\s+(\S+)/;i.split(`
1
+ /*! @getv.design/embed v0.6.1. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
+ import{a as m,b as w,d as g,e as O,f as P,g as S,h as y,i as p}from"./chunk-FM6ZYYTD.js";import{da as R,o as v}from"./chunk-JAYW4VNL.js";import{b as h}from"./chunk-KF7NJEZQ.js";function E(e){return m(e)}async function L(e,n={}){let t=n.fonts??"approximate";if(!x.includes(t))throw new TypeError(`renderSvg: fonts must be one of ${x.join(", ")}; got ${String(t)}.`);let o=t==="exact"?y(n.fontBase,F()):void 0,{document:i,blocks:a,problems:s}=await O(e),r=n.page===void 0?i:D(i,n.page),u=B(a),f=n.idPrefix,d=[...s],c;if(t==="exact")if(o===void 0)d.push(p([],"no fontBase was given and this build has no default"));else{let{exactSvg:l}=await import("./fonts.js"),b=await l(r,{base:o,resolveAsset:u,...f?{idPrefix:f}:{}});"svg"in b?c=b.svg:d.push(p(b.failures))}return c??=R(r,{ids:!1,resolveAsset:u,...f?{idPrefix:f}:{}}),n.onProblems?.(d),c}function M(e){return typeof e=="string"?w(e).vd:void 0}function C(e){let{document:n,problems:t}=m(e),{document:o}=g(n),{vd:i,offset:a}=typeof e=="string"?w(e):{vd:void 0,offset:0},s=new Map;if(i!==void 0){let r=/^frame\s+(\S+)/;i.split(`
3
3
  `).some((u,f)=>{if(u.startsWith("--- payload"))return!0;let d=r.exec(u)?.[1];return d!==void 0&&!s.has(d)&&s.set(d,f+1+a),!1})}return{...o.title===void 0?{}:{title:o.title},pages:P(o).map(r=>({id:r.id,...r.name===void 0?{}:{name:r.name},...s.has(r.id)?{line:s.get(r.id)}:{}})),problems:t}}async function W(e={}){let n=e.fonts??"approximate";if(!x.includes(n))throw new TypeError(`createRenderer: fonts must be one of ${x.join(", ")}; got ${String(n)}.`);let t,o="approximate",i,a;if(n==="exact")if(t=y(e.fontBase,F()),t===void 0)a=p([],"no fontBase was given and this build has no default");else{let s=await import("./fonts.js"),r=await s.exactFontsAt(t).ensureAll();i=s.exactSvgNow,o=r.length<s.BUNDLED_FACE_COUNT?"exact":"approximate",r.length>0&&(a=p(r))}return N({fonts:o,base:t,exactNow:i,failed:a})}function _(){return N({fonts:"approximate",base:void 0,exactNow:void 0,failed:void 0})}function N(e){let{fonts:n,base:t,exactNow:o,failed:i}=e;return{fonts:n,renderSvg(a,s={}){let r=typeof a=="string"?g(m(a).document):g(a),u=s.page===void 0?r.document:D(r.document,s.page),f=B(r.blocks),d=s.idPrefix,c=[...r.problems],l;return n==="exact"&&t!==void 0&&o!==void 0?(l=o(u,{base:t,resolveAsset:f,...d?{idPrefix:d}:{}}),l===void 0&&i&&c.push(i)):i&&c.push(i),l??=R(u,{ids:!1,resolveAsset:f,...d?{idPrefix:d}:{}}),s.onProblems?.(c),l}}}function B(e){return n=>{let t=e.get(n.hash);return t===void 0?void 0:v(n.type,t)}}var x=["approximate","exact"];function F(){let e=import.meta.url;if(typeof e!="string")return h;let t=typeof globalThis.process?.getBuiltinModule=="function",o=/\/dist\/chunks\/[^/]*$/.test(e)?"../../fonts/":"../fonts/";return e.startsWith("file:")&&t?new URL(o,e).href:h}function D(e,n){let t=S(e,n);return{...e,root:{...e.root,children:e.root.children.map(o=>o===t?o:{...o,hidden:!0})}}}export{E as a,L as b,M as c,C as d,W as e,_ as f};
@@ -1,5 +1,5 @@
1
- /*! @getv.design/embed v0.6.0. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
- import{n as l,r as d,t as p,u as g}from"./chunk-P42KFNKD.js";import{a as m}from"./chunk-VTEBIFPH.js";var h=Symbol.for(`vdesign.embed.documents@${m}`),y=globalThis[h]??=new WeakMap,v=/^Line (\d+): /;function w(e){let n=v.exec(e.message);return{...n?{line:Number(n[1])}:{},code:e.code,message:e.message,severity:e.severity}}function f(e){if(typeof e!="string")return c(d("").document,new Map,[{code:"not-text",message:`parse() takes .vd text, not ${e===null?"null":typeof e}.`,severity:"error"}]);let n=D(e);if(n.vd===void 0)return c(d("").document,new Map,[{code:"not-vd",message:"This SVG carries no vDesign document: only a .vd.svg exported from vDesign does.",severity:"error"}]);let{head:t,blocks:o}=l(n.vd),r=d(t),s=r.problems.map(w).map(i=>i.line===void 0?i:{...i,line:i.line+n.offset});return c(r.document,o,s)}function D(e){if(!g(e))return{vd:e,offset:0};let n=p(e);if(n===void 0)return{vd:void 0,offset:0};let t=e.indexOf("<vd:document"),o=e.indexOf("</vd:document",t),r=e.indexOf("<![CDATA[",t);if(r===-1||o!==-1&&r>o){let u=e.indexOf(">",t)+1,b=e.slice(0,u).split(`
1
+ /*! @getv.design/embed v0.6.1. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
+ import{n as l,r as d,t as p,u as g}from"./chunk-JAYW4VNL.js";import{a as m}from"./chunk-KF7NJEZQ.js";var h=Symbol.for(`vdesign.embed.documents@${m}`),y=globalThis[h]??=new WeakMap,v=/^Line (\d+): /;function w(e){let n=v.exec(e.message);return{...n?{line:Number(n[1])}:{},code:e.code,message:e.message,severity:e.severity}}function f(e){if(typeof e!="string")return c(d("").document,new Map,[{code:"not-text",message:`parse() takes .vd text, not ${e===null?"null":typeof e}.`,severity:"error"}]);let n=D(e);if(n.vd===void 0)return c(d("").document,new Map,[{code:"not-vd",message:"This SVG carries no vDesign document: only a .vd.svg exported from vDesign does.",severity:"error"}]);let{head:t,blocks:o}=l(n.vd),r=d(t),s=r.problems.map(w).map(i=>i.line===void 0?i:{...i,line:i.line+n.offset});return c(r.document,o,s)}function D(e){if(!g(e))return{vd:e,offset:0};let n=p(e);if(n===void 0)return{vd:void 0,offset:0};let t=e.indexOf("<vd:document"),o=e.indexOf("</vd:document",t),r=e.indexOf("<![CDATA[",t);if(r===-1||o!==-1&&r>o){let u=e.indexOf(">",t)+1,b=e.slice(0,u).split(`
3
3
  `).length-1;return{vd:n,offset:b+(e[u]===`
4
4
  `?1:0)}}let s=r+9,i=e.slice(0,s).split(`
5
5
  `).length-1;return{vd:n,offset:i+(e[s]===`
@@ -1,4 +1,4 @@
1
- /*! @getv.design/embed v0.6.0. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
- import{f as O}from"./chunk-7P37TP37.js";import{a as k,d as P,f as S}from"./chunk-RSOCS6S4.js";import{b as x,p as F}from"./chunk-P42KFNKD.js";function _(r="vd"){let e=0;return()=>`${r}${++e}-`}var A={bytes:1e6,nodes:5e3};function Z(r){let e=/^\s*([^\s{]+)/.exec(r??"")?.[1]?.toLowerCase();return e==="vd"||e==="vdesign"}function E(r){let e={},s=(r??"").trim().replace(/^\S+/,""),t=/([A-Za-z][\w-]*)(?:=(?:"((?:[^"\\]|\\.)*)"|'([^']*)'|(\S+)))?/g;for(let a of s.matchAll(t)){let i=a[1]?.toLowerCase(),o=a[2]?.replace(/\\(.)/g,"$1")??a[3]??a[4];switch(i){case"page":o!==void 0&&o!==""&&(e.page=/^\d+$/.test(o)?Number(o):o);break;case"src":o&&(e.src=o);break;case"height":{let d=Number(o);Number.isFinite(d)&&d>0&&d<=1e4&&(e.height=d);break}case"mode":(o==="static"||o==="view")&&(e.mode=o);break;case"source":e.source=o===void 0||o==="true";break;case"alt":o!==void 0&&(e.alt=o);break;default:break}}return e}function G(r,e,s={}){let t=typeof e=="string"?E(e):e,a={...A,...s.limits},i=typeof r=="string"?r:"";if(t.src!==void 0){let n;try{n=s.resolveSrc?.(t.src)}catch{n=void 0}if(n===void 0)return l(i,[g("src-unresolved",`Could not read ${t.src}.`)]);i=n}if(i.length>a.bytes)return l(t.src===void 0?i:"",[g("too-large",`This design is over ${a.bytes} characters, the most a fence draws.`)]);let{document:o,problems:d}=k(i),h=P(o).document;if(B(h)>a.nodes)return l(t.src===void 0?i:"",[g("too-large",`This design has over ${a.nodes} shapes, the most a fence draws.`)]);if(S(h).length===0){let n=d.filter(m=>m.severity==="error");return l(t.src===void 0?i:"",[...n,...n.length===0?[g("no-pages","This design has no page to draw.")]:[]])}let R=s.renderer??O(),j=s.idPrefix??z,f,v=[];try{f=R.renderSvg(o,{...t.page===void 0?{}:{page:t.page},idPrefix:j(),onProblems:n=>v.push(...n)})}catch(n){return l(t.src===void 0?i:"",[g("no-such-page",n instanceof Error?n.message:String(n))])}let b=t.mode??s.mode??"static",$=t.alt??h.title??"Design",L=s.output==="img"||s.inlineStyles===!1&&/ style="/.test(f)?`<img class="vd-figure-art" alt="${c($)}" src="data:image/svg+xml;base64,${T(f)}">`:`<div class="vd-figure-art" role="img" aria-label="${c($)}">${N(f).trimEnd()}</div>`,y=["vd-figure"],u=[];for(let[n,m]of s.attributes??[])!/^[a-z][a-z0-9-]*$/i.test(n)||/^on/i.test(n)||n==="style"||(n==="class"?y.push(...m.split(/\s+/).filter(Boolean)):u.push(`${n}="${c(m)}"`));u.unshift(`class="${c(y.join(" "))}"`,`data-vd-mode="${b}"`),t.page!==void 0&&u.push(`data-vd-page="${c(String(t.page))}"`),t.height!==void 0&&u.push(`data-vd-height="${t.height}"`),b==="view"&&u.push(`data-vd-source="${T(i)}"`);let p=[`<figure ${u.join(" ")}>`,L],w=C([...d,...v]);return w.length>0&&p.push(I(w)),t.source&&p.push(`<details class="vd-figure-source"><summary>Source</summary><pre><code class="language-vd">${c(i)}</code></pre></details>`),p.push("</figure>"),`${p.join("")}
1
+ /*! @getv.design/embed v0.6.1. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
+ import{f as O}from"./chunk-ER6HNUNJ.js";import{a as k,d as P,f as S}from"./chunk-FM6ZYYTD.js";import{b as x,p as F}from"./chunk-JAYW4VNL.js";function _(r="vd"){let e=0;return()=>`${r}${++e}-`}var A={bytes:1e6,nodes:5e3};function Z(r){let e=/^\s*([^\s{]+)/.exec(r??"")?.[1]?.toLowerCase();return e==="vd"||e==="vdesign"}function E(r){let e={},s=(r??"").trim().replace(/^\S+/,""),t=/([A-Za-z][\w-]*)(?:=(?:"((?:[^"\\]|\\.)*)"|'([^']*)'|(\S+)))?/g;for(let a of s.matchAll(t)){let i=a[1]?.toLowerCase(),o=a[2]?.replace(/\\(.)/g,"$1")??a[3]??a[4];switch(i){case"page":o!==void 0&&o!==""&&(e.page=/^\d+$/.test(o)?Number(o):o);break;case"src":o&&(e.src=o);break;case"height":{let d=Number(o);Number.isFinite(d)&&d>0&&d<=1e4&&(e.height=d);break}case"mode":(o==="static"||o==="view")&&(e.mode=o);break;case"source":e.source=o===void 0||o==="true";break;case"alt":o!==void 0&&(e.alt=o);break;default:break}}return e}function G(r,e,s={}){let t=typeof e=="string"?E(e):e,a={...A,...s.limits},i=typeof r=="string"?r:"";if(t.src!==void 0){let n;try{n=s.resolveSrc?.(t.src)}catch{n=void 0}if(n===void 0)return l(i,[g("src-unresolved",`Could not read ${t.src}.`)]);i=n}if(i.length>a.bytes)return l(t.src===void 0?i:"",[g("too-large",`This design is over ${a.bytes} characters, the most a fence draws.`)]);let{document:o,problems:d}=k(i),h=P(o).document;if(B(h)>a.nodes)return l(t.src===void 0?i:"",[g("too-large",`This design has over ${a.nodes} shapes, the most a fence draws.`)]);if(S(h).length===0){let n=d.filter(m=>m.severity==="error");return l(t.src===void 0?i:"",[...n,...n.length===0?[g("no-pages","This design has no page to draw.")]:[]])}let R=s.renderer??O(),j=s.idPrefix??z,f,v=[];try{f=R.renderSvg(o,{...t.page===void 0?{}:{page:t.page},idPrefix:j(),onProblems:n=>v.push(...n)})}catch(n){return l(t.src===void 0?i:"",[g("no-such-page",n instanceof Error?n.message:String(n))])}let b=t.mode??s.mode??"static",$=t.alt??h.title??"Design",L=s.output==="img"||s.inlineStyles===!1&&/ style="/.test(f)?`<img class="vd-figure-art" alt="${c($)}" src="data:image/svg+xml;base64,${T(f)}">`:`<div class="vd-figure-art" role="img" aria-label="${c($)}">${N(f).trimEnd()}</div>`,y=["vd-figure"],u=[];for(let[n,m]of s.attributes??[])!/^[a-z][a-z0-9-]*$/i.test(n)||/^on/i.test(n)||n==="style"||(n==="class"?y.push(...m.split(/\s+/).filter(Boolean)):u.push(`${n}="${c(m)}"`));u.unshift(`class="${c(y.join(" "))}"`,`data-vd-mode="${b}"`),t.page!==void 0&&u.push(`data-vd-page="${c(String(t.page))}"`),t.height!==void 0&&u.push(`data-vd-height="${t.height}"`),b==="view"&&u.push(`data-vd-source="${T(i)}"`);let p=[`<figure ${u.join(" ")}>`,L],w=C([...d,...v]);return w.length>0&&p.push(I(w)),t.source&&p.push(`<details class="vd-figure-source"><summary>Source</summary><pre><code class="language-vd">${c(i)}</code></pre></details>`),p.push("</figure>"),`${p.join("")}
3
3
  `}function N(r){return r.replace(/<a href="#[^"]*">(<tspan[^>]*>[^<]*<\/tspan>)<\/a>/g,"$1")}function T(r){return F(new TextEncoder().encode(r))}var z=_();function B(r){let e=0;return x(r.root,()=>{e+=1}),e}function l(r,e){let s=e.length>0?I(e):"";return`<pre><code class="language-vd">${c(r)}</code></pre>${s}
4
4
  `}function I(r){return`<ul class="vd-problems">${r.map(s=>`<li data-severity="${s.severity}">${c(s.message)}</li>`).join("")}</ul>`}function C(r){let e=new Set;return r.filter(s=>{let t=`${s.code}\0${s.message}`;return e.has(t)?!1:(e.add(t),!0)})}function g(r,e){return{code:r,message:e,severity:"error"}}function c(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}export{_ as a,Z as b,E as c,G as d};
@@ -1,4 +1,4 @@
1
- /*! @getv.design/embed v0.6.0. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
1
+ /*! @getv.design/embed v0.6.1. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
2
  var bn=["radiusTL","radiusTR","radiusBR","radiusBL"],re=["radius",...bn];function $n(e){let n=e.radius??0,t=r=>Math.max(0,e[r]??n);return{tl:t("radiusTL"),tr:t("radiusTR"),br:t("radiusBR"),bl:t("radiusBL")}}function wn(e,n,t){let r=Math.max(0,n),o=Math.max(0,t),i=1,s=(u,a)=>{a>0&&(i=Math.min(i,u/a))};return s(r,e.tl+e.tr),s(r,e.bl+e.br),s(o,e.tl+e.bl),s(o,e.tr+e.br),i>=1?e:{tl:e.tl*i,tr:e.tr*i,br:e.br*i,bl:e.bl*i}}function Te(e,n,t){return wn($n(e),n,t)}function oe(e){return e.tl<=0&&e.tr<=0&&e.br<=0&&e.bl<=0}function Pt(e){return e.tl===e.tr&&e.tr===e.br&&e.br===e.bl}var Hi=/^(?:\d+(?:\.\d*)?|\.\d+)$/;function Ct(e){if(!e.startsWith('"'))return;let n;try{let u=JSON.parse(e);if(typeof u!="string")return;n=u}catch{return}let t=n.trim().split(/\s+/).filter(u=>u!=="");if(t.length<2)return;if(t.length>4)return{error:`the shorthand takes one to four corners, got ${t.length}: "${n}"`};for(let u of t){if(/^[$@(]/.test(u))return{error:`the shorthand takes numbers \u2014 bind one corner with its own cell, e.g. radiusTL=${u}`};if(!Hi.test(u))return/^(-?\d+(?:\.\d+)?)px$/.exec(u)&&!u.startsWith("-")?{error:`drop the unit: radius="${t.map(c=>c.replace(/px$/,"")).join(" ")}"`}:{error:/^-\d/.test(u)?`a radius cannot be negative, got ${u}`:`the shorthand takes plain numbers, got "${u}"`}}let[r,o=r,i=r,s=o]=t;return{corners:[["radiusTL",r],["radiusTR",o],["radiusBR",i],["radiusBL",s]]}}var kn=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];var He=["left","center","right","justify"],Ye=["top","middle","bottom"],fe=["cover","contain","fill"],vn=["nonzero","evenodd"],Sn=["butt","round","square"],En=["miter","round","bevel"],ro=["canvas","frame","group","instance"];function On(e){return ro.includes(e)}function D(e){return On(e.type)}function Ae(e){return e.type==="group"}function z(e){return D(e)?e.children:[]}var oo={canvas:["w","h"],connector:["x1","y1","x2","y2","strokeWidth","opacity","blur"],ellipse:["x","y","w","h","rotation","strokeWidth","opacity","blur","backdrop"],frame:["x","y","w","h","strokeWidth",...re,"blur","backdrop"],group:[],instance:["x","y","w","h"],image:["x","y","w","h","rotation","strokeWidth",...re,"opacity","blur"],rect:["x","y","w","h","rotation","strokeWidth",...re,"opacity","blur","backdrop"],text:["x","y","w","h","rotation","size","weight","lineHeight","letterSpacing","strokeWidth","opacity","blur"],video:["x","y","w","h","rotation","strokeWidth",...re,"opacity","blur"],vector:["x","y","w","h","rotation","strokeWidth","opacity","blur","backdrop"]};function Mn(e){return oo[e.type]}function C(e,n,t){if(n(e,t)!==!1&&D(e))for(let r of e.children)C(r,n,e)}function X(e,n){let t;return C(e,r=>{if(t)return!1;r.id===n&&(t=r)}),t}function le(e){let n=e.trim();if(n.startsWith("#")){let r=n.slice(1);return r===""?void 0:{kind:"frame",id:r}}let t;try{t=new URL(n)}catch{return}if(!(t.protocol!=="https:"&&t.protocol!=="mailto:"))return{kind:"url",url:n}}var Ne="--- payload base64 ---",Yi="sha256-";function io(e){let n=ns(e);return n===-1?{head:e,payload:""}:{head:e.slice(0,n),payload:e.slice(n+Ne.length)}}function qi(e){let{head:n,payload:t}=io(e);return{head:n,blocks:so(t)}}function so(e){let n=new Map;for(let t of e.split(`
3
3
  `)){let r=t.indexOf(" ");if(r===-1)continue;let o=t.slice(0,r);o.startsWith(Yi)&&n.set(o,t.slice(r+1).trim())}return n}function Zi(e,n){return`data:${e};base64,${n}`}function Qi(e){let n=e.toBase64;if(typeof n=="function")return n.call(e);let t="";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)}function es(e){let n=Uint8Array.fromBase64;if(typeof n=="function")return n(e);let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o+=1)r[o]=t.charCodeAt(o);return r}function ns(e){if(e.startsWith(Ne))return 0;let n=e.indexOf(`
4
4
  ${Ne}`);return n===-1?-1:n+1}function pe(e){return{expr:e}}function F(e){return typeof e=="object"&&e!==null&&typeof e.expr=="string"}var Dt=["light","dark"],Vt=["must","should"],Tn=["no-gradient","contrast","font-only","logo-min"];var uo=["role","logo","rule","guide","review"];function An(e){return uo.includes(e)}function Nn(e="",n=1){return{slug:e,version:n,changes:[],sources:[],roles:{},logos:{},rules:{},guides:{},review:[]}}function Lt(e){let n=/^([a-z0-9][a-z0-9-]*)(?:@(\d+))?$/.exec(e);if(!n)return;let t=n[2]===void 0?1:Number(n[2]);if(!(!Number.isSafeInteger(t)||t<1))return{slug:n[1],version:t}}var ts=8,rs=new Set(["type","id","children","component","overrides"]);function _e(e){return!rs.has(e)}function Ie(e,n){return`${e}.${n}`}function Re(e){let n=new Map,t=r=>{if(r.type!=="instance"){r.type==="frame"&&r.component===!0&&n.set(r.id,r);for(let o of z(r))t(o)}};return t(e),n}function _n(e,n){let t=[],r=o=>{if(o.type==="instance"){(n===void 0||o.component===n)&&t.push(o);return}for(let i of z(o))r(i)};return r(e),t}function he(e){let n=e;for(let t=0;t<ts;t+=1){let r=Re(n),o=ao(n,r);if(o===n)return n;n=o}return n}var jt=new WeakMap;function ao(e,n){if(e.type==="instance"){let o=n.get(e.component)??null;if(jt.has(e)&&jt.get(e)===o)return e;let i=co(e,n,new Set),s=Ut(i,e.children)?e:{...e,children:i};return jt.set(s,o),s}if(!D(e))return e;let t=!1,r=e.children.map(o=>{let i=ao(o,n);return i!==o&&(t=!0),i});return t?{...e,children:r}:e}function co(e,n,t){let r=n.get(e.component);if(!r||t.has(r.id))return[];let o=new Set(t).add(r.id),i=r.children.map(s=>Bt(s,e.id,n,o));return os(i,e.id,e.overrides)}function Bt(e,n,t,r){let o=Ie(n,e.id);if(e.type==="instance"){let i={...e,id:o};return{...i,children:co(i,t,r)}}if(e.type==="frame"){let i={...e};return delete i.component,{...i,id:o,children:e.children.map(s=>Bt(s,n,t,r))}}return D(e)?{...e,id:o,children:e.children.map(i=>Bt(i,n,t,r))}:{...e,id:o}}function os(e,n,t){if(t===void 0)return[...e];let r=new Map;for(let[i,s]of Object.entries(t))r.set(Ie(n,i),s);let o=i=>{let s=r.get(i.id),u=i;if(s){let a={...i};for(let[c,d]of Object.entries(s))_e(c)&&(a[c]=d);u=a}return D(u)?{...u,children:u.children.map(o)}:u};return e.map(o)}function Wt(e){let n=[],t=Re(e);for(let i of _n(e)){let s=t.get(i.component);if(!s){n.push({severity:"error",code:"missing-component",message:`${i.id} places ${i.component}, which is not a component \u2014 mark a frame with component, or point component= at one`,nodeId:i.id});continue}if(Ft(s,s.id,t,new Set)){n.push({severity:"error",code:"component-cycle",message:`${s.id} holds an instance of itself, so ${i.id} cannot be drawn`,nodeId:i.id});continue}for(let u of Object.keys(i.overrides??{}))X(i,Ie(i.id,u))||n.push({severity:"warning",code:"orphaned-override",message:`${i.id} overrides ${u}, which ${s.id} no longer has`,nodeId:i.id})}for(let[i]of t)e.type==="canvas"&&e.children.some(s=>s.id===i)||n.push({severity:"warning",code:"component-not-top-level",message:`${i} is a component inside another frame \u2014 keep components in the row below the pages, at the top level`,nodeId:i});let r=new Map,o=i=>{r.set(i.id,(r.get(i.id)??0)+1);for(let s of z(i))o(s)};o(e);for(let i of _n(e))for(let s of i.children){let u=a=>{(r.get(a.id)??0)>1&&n.push({severity:"error",code:"duplicate-id",message:`${a.id} is both a node and a part of ${i.id} \u2014 rename one`,nodeId:a.id});for(let c of z(a))u(c)};u(s)}return n}function Ft(e,n,t,r){return z(e).some(o=>{if(o.type==="instance"){if(o.component===n)return!0;if(r.has(o.component))return!1;r.add(o.component);let i=t.get(o.component);return i!==void 0&&Ft(i,n,t,r)}return Ft(o,n,t,r)})}function In(e){return Re(e).size>0||_n(e).length>0}function Ut(e,n){if(e===n)return!0;if(typeof e!="object"||typeof n!="object"||e===null||n===null)return!1;if(Array.isArray(e)||Array.isArray(n))return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((i,s)=>Ut(i,n[s]));let t=e,r=n,o=new Set([...Object.keys(t),...Object.keys(r)]);for(let i of o)if(!Ut(t[i],r[i]))return!1;return!0}var qe=["design","brand"],Pe="design",fo=new WeakMap;function U(e){let n=e.brand?.theme==="dark"?e.themes?.dark:void 0;if(n===void 0)return e.tokens;let t=fo.get(e);if(t!==void 0)return t;let r={...e.tokens,...n};return fo.set(e,r),r}var lo=4,po=5,ho=6,mo=7,zt=8,Rn=[1,2,3,4,5,6,7,8],Pn=zt;function ie(e){return e.root!==void 0&&go(e.root)?zt:e.root!==void 0&&yo(e.root)?mo:e.root!==void 0&&In(e.root)?ho:e.kind==="brand"||e.brand!==void 0||e.themes!==void 0||is(e.fonts)?po:lo}function go(e){let n=!1;return C(e,t=>(t.type==="video"&&(n=!0),n?!1:void 0)),n}function yo(e){let n=!1;return C(e,t=>(t.type==="connector"&&(n=!0),n?!1:void 0)),n}function is(e){return Object.values(e??{}).some(n=>(n.faces??[]).some(t=>t.asset!==void 0))}var me="doc";function Ze(e){return{type:"canvas",...e}}function Cn(e={}){let n=e.kind??Pe,t=Ce(e.themes),r=he(e.root??Ze({id:me,children:[]}));return{version:ie({kind:n,root:r,...e.fonts===void 0?{}:{fonts:e.fonts},...e.brand===void 0?{}:{brand:e.brand},...t===void 0?{}:{themes:t}}),kind:n,...e.title===void 0?{}:{title:e.title},tokens:e.tokens??{},fonts:e.fonts??{},assets:e.assets??{},...e.motion===void 0||Object.keys(e.motion).length===0?{}:{motion:e.motion},...e.brand===void 0?{}:{brand:e.brand},...t===void 0?{}:{themes:t},root:r}}function Ce(e){let n=e?.dark;return n===void 0||Object.keys(n).length===0?void 0:{dark:n}}var Dn=["beat","bar"];var ss=/^(\d+(?:\.\d+)?)(beats?|bars?)$/;function De(e){let n=ss.exec(e);if(!n)return;let t=Number(n[1]);if(Number.isFinite(t))return{count:t,unit:n[2].startsWith("bar")?"bar":"beat"}}function Ve(e,n){return`${String(Math.round(e*1e6)/1e6)}${n}${e===1?"":"s"}`}function Le(e){return typeof e=="string"&&De(e)!==void 0}function ge(e){let n=e?.bpm;if(n===void 0)return;let t=e?.meter??4,r=6e4/n;return{bpm:n,meter:t,beat:r,bar:r*t}}function Qe(e,n,t){if(e===void 0)return t;if(typeof e=="number")return e;let r=De(e);return!r||!n?t:r.count*(r.unit==="bar"?n.bar:n.beat)}var en=36e5;var Vn=["cut","fade","push","slide"],Ln=["cut","fade","rise","drop","pop","wipe","grow","count","draw"],je=["cut","fade","rise","drop","pop"],jn=["pulse"],Bn=["out","in","inout","linear","spring"],Fn=["word","letter"],ye=["left","right","top","bottom"],xo=400,nn=1e4,Un=18e4,xe=7680;function Be(e){let n=e.trim();return n==="back"?{kind:"back"}:n==="next"?{kind:"next"}:le(n)}function tn(e){return e===void 0||e.enter===void 0&&e.duration===void 0&&e.scroll!==!0&&e.length===void 0&&e.w===void 0&&e.h===void 0&&e.bpm===void 0&&e.meter===void 0&&e.music===void 0&&e.lines.length===0}function Wn(e){return e.camera===!0||e.enter!==void 0||e.exit!==void 0||e.emphasis!==void 0||e.go!==void 0}var as=["camera","emphasis","from","by","stagger","hold","at","after","with","on","ease","pad"];function bo(e){return e===void 0?!1:e.length!==void 0||e.w!==void 0||e.h!==void 0||e.bpm!==void 0||e.meter!==void 0||e.music!==void 0?!0:e.lines.some(n=>as.some(t=>n[t]!==void 0)||n.enter!==void 0&&!je.includes(n.enter)||n.exit!==void 0&&!je.includes(n.exit))}function zn(e){let n=e.motion;if(!n)return[];let t=e.root.children.map(o=>o.id).filter(o=>o in n),r=Object.keys(n).filter(o=>!t.includes(o)).sort();return[...t,...r]}function Gn(e){return new Set(e.root.children.filter(n=>n.type==="frame"&&n.component!==!0).map(n=>n.id))}function Xn(e){let n=new Map;for(let t of e.root.children)t.type!=="frame"||t.component===!0||C(t,r=>{n.set(r.id,t.id)});return n}function cs(e){let n=new Set;return C(e,t=>{n.add(t.id)}),n}function rn(e,n){let t=e.motion;if(!t)return[];let r=[],o=Gn(e),i=Xn(e),s=cs(e.root),u=(a,c)=>{let d=n?.(a,c);return d===void 0?"":`Line ${d}: `};for(let a of zn(e)){let c=t[a];if(!c)continue;if(!o.has(a)){r.push({severity:"warning",code:"motion-not-a-page",message:`${u(a)}motion ${a}: ${a} is not a page (a top-level frame), so none of it plays`,nodeId:a});continue}let d=new Set;for(let f of c.lines){let l=u(a,f.id);for(let b of["after","with"]){let $=f[b];$!==void 0&&!d.has($)&&r.push({severity:"warning",code:"motion-anchor-missing",message:`${l}motion ${a}: ${b}=${$} names no line above, so it starts after the line above instead`,nodeId:f.id})}f.camera!==!0&&d.add(f.id);let p=s.has(f.id)?X(e.root,f.id):void 0;p&&r.push(...ds(f,p,l,a)),s.has(f.id)?i.get(f.id)!==a&&r.push({severity:"warning",code:"motion-wrong-page",message:`${l}motion ${a}: ${f.id} is not on ${a}, so Play skips it`,nodeId:f.id}):r.push({severity:"warning",code:"unknown-reference",message:`${l}motion ${a}: no node ${f.id}`,nodeId:f.id});let h=f.go===void 0?void 0:Be(f.go);h?.kind==="frame"&&!ps(e,h.id)&&r.push({severity:"warning",code:"unknown-reference",message:`${l}motion ${a}: go=#${h.id} names no frame`,nodeId:f.id})}}return r}function ds(e,n,t,r){let o=[],i=(u,a)=>{o.push({severity:"warning",code:u,message:`${t}motion ${r}: ${a}`,nodeId:n.id})};if(e.camera===!0)return o;let s=e.enter??e.exit;return s==="count"&&(n.type!=="text"||!/\d/.test(Jn(n.content)))&&i("count-no-number",`${n.id} has no number to count, so it fades in instead`),s==="draw"&&!ls(n)&&i("draw-no-stroke",`${n.id} has no stroked vector to draw, so it fades in instead`),e.by!==void 0&&n.type!=="text"?i("by-not-text",`by=${e.by} splits text, and ${n.id} is a ${n.type}`):e.by!==void 0&&n.type==="text"&&fs(n)&&i("by-rotated",`${n.id} is rotated, so by=${e.by} enters it whole`),e.stagger!==void 0&&e.by===void 0&&z(n).length===0&&i("stagger-no-children",`${n.id} has no children to stagger: split a text with by=word`),o}function fs(e){let n=e.rotation;return n!==void 0&&n!==0}function ls(e){let n=!1;return C(e,t=>((t.type==="vector"&&t.stroke!==void 0||t.type==="connector")&&(n=!0),n?!1:void 0)),n}function Jn(e){return typeof e=="string"?e:e.map(n=>typeof n=="string"?n:n.text).join("")}function ps(e,n){let t=!1;return C(e.root,r=>{if(t)return!1;r.id===n&&(t=r.type==="frame")}),t}function y(e){if(!Number.isFinite(e))return"0";let n=Math.round(e*1e4)/1e4,t=Object.is(n,-0)?0:n;return Math.abs(t)>=1e21?t.toFixed(0):String(t)}var hs={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};function on(e){let n=[],t,r=0,o=0,i=0,s=0,u,a,c=ms(e),d=()=>(t||(t={anchors:[{x:r,y:o}],closed:!1},n.push(t)),t.anchors[t.anchors.length-1]),f=(b,$)=>{d(),t?.anchors.push({x:b,y:$}),r=b,o=$},l=(b,$,S,N)=>{d().out=b,t?.anchors.push({x:S,y:N,in:$}),r=S,o=N},p="",h=!0;for(;c.more();){let b=c.command();if(b!==void 0)p=b,h=!0;else if(p===""||p.toUpperCase()==="Z")return{contours:Kn(n),error:`Expected a command at ${c.at()}`};let $=p.toUpperCase(),S=p!==$,N=hs[$];if(N===void 0)return{contours:Kn(n),error:`Unknown command ${p}`};if($==="Z"){t&&(t.closed=!0),t=void 0,r=i,o=s,u=void 0,a=void 0,p="";continue}let T=$==="A"?c.arc():c.numbers(N);if(T===void 0)return{contours:Kn(n),error:`${p} expects ${N} numbers at ${c.at()}`};let A=S?r:0,_=S?o:0,O=g=>T[g];switch($){case"M":h&&(t={anchors:[{x:A+O(0),y:_+O(1)}],closed:!1},n.push(t),r=i=A+O(0),o=s=_+O(1),p=S?"l":"L"),u=a=void 0;break;case"L":f(A+O(0),_+O(1)),u=a=void 0;break;case"H":f(A+O(0),o),u=a=void 0;break;case"V":f(r,_+O(0)),u=a=void 0;break;case"C":{let g={x:A+O(2),y:_+O(3)};l({x:A+O(0),y:_+O(1)},g,A+O(4),_+O(5)),u=g,a=void 0;break}case"S":{let g=u?{x:2*r-u.x,y:2*o-u.y}:{x:r,y:o},m={x:A+O(0),y:_+O(1)};l(g,m,A+O(2),_+O(3)),u=m,a=void 0;break}case"Q":case"T":{let g=$==="Q"?{x:A+O(0),y:_+O(1)}:a?{x:2*r-a.x,y:2*o-a.y}:{x:r,y:o},m=$==="Q"?A+O(2):A+O(0),w=$==="Q"?_+O(3):_+O(1),x={x:r+2/3*(g.x-r),y:o+2/3*(g.y-o)},E={x:m+2/3*(g.x-m),y:w+2/3*(g.y-w)};l(x,E,m,w),a=g,u=void 0;break}case"A":{let g=A+O(5),m=_+O(6);for(let[w,x,E]of gs(r,o,O(0),O(1),O(2),O(3)!==0,O(4)!==0,g,m))l(w,x,E.x,E.y);(r!==g||o!==m)&&f(g,m),u=a=void 0;break}}h=!1}return{contours:Kn(n)}}function Kn(e){return e.map(n=>{let t=[...n.anchors];if(n.closed&&t.length>1){let r=t[0],o=t[t.length-1];be(r,o)&&(t.pop(),t[0]={...r,...o.in?{in:o.in}:{}})}return{anchors:t.map(ko),closed:n.closed}})}function Gt(e,n,t){return ko({x:e.x,y:e.y,...n?{in:n}:{},...t?{out:t}:{}})}function ko(e){let n={x:e.x,y:e.y};return e.in&&!be(e.in,e)&&(n.in=e.in),e.out&&!be(e.out,e)&&(n.out=e.out),n}function be(e,n,t=1e-6){return Math.abs(e.x-n.x)<t&&Math.abs(e.y-n.y)<t}function ms(e){let n=0,t=()=>{for(;n<e.length&&/[\s,]/.test(e[n]);)n+=1},r=()=>{t();let i=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/.exec(e.slice(n));if(i)return n+=i[0].length,Number(i[0])},o=()=>{t();let i=e[n];if(!(i!=="0"&&i!=="1"))return n+=1,Number(i)};return{more(){return t(),n<e.length},command(){t();let i=e[n];if(/[a-zA-Z]/.test(i))return n+=1,i},numbers(i){let s=[];for(let u=0;u<i;u+=1){let a=r();if(a===void 0)return;s.push(a)}return s},arc(){let i=this.numbers(3),s=o(),u=o(),a=this.numbers(2);if(!(!i||s===void 0||u===void 0||!a))return[...i,s,u,...a]},at(){return n}}}function gs(e,n,t,r,o,i,s,u,a){let c=Math.abs(t),d=Math.abs(r);if(c===0||d===0||e===u&&n===a)return[];let f=o*Math.PI/180,l=Math.cos(f),p=Math.sin(f),h=(e-u)/2,b=(n-a)/2,$=l*h+p*b,S=-p*h+l*b,N=$*$/(c*c)+S*S/(d*d);N>1&&(c*=Math.sqrt(N),d*=Math.sqrt(N));let T=c*c*d*d-c*c*S*S-d*d*$*$,A=c*c*S*S+d*d*$*$,_=(i===s?-1:1)*Math.sqrt(Math.max(0,T/A)),O=_*c*S/d,g=-_*d*$/c,m=l*O-p*g+(e+u)/2,w=p*O+l*g+(n+a)/2,x=(P,Z,Oe,Me)=>{let Je=P*Oe+Z*Me,xn=Math.hypot(P,Z)*Math.hypot(Oe,Me),Ke=Math.acos(Math.min(1,Math.max(-1,Je/xn)));return P*Me-Z*Oe<0?-Ke:Ke},E=x(1,0,($-O)/c,(S-g)/d),k=x(($-O)/c,(S-g)/d,(-$-O)/c,(-S-g)/d);!s&&k>0&&(k-=2*Math.PI),s&&k<0&&(k+=2*Math.PI);let M=Math.max(1,Math.ceil(Math.abs(k)/(Math.PI/2)-1e-9)),R=k/M,V=4/3*Math.tan(R/4),I=P=>({x:m+c*Math.cos(P)*l-d*Math.sin(P)*p,y:w+c*Math.cos(P)*p+d*Math.sin(P)*l}),W=P=>({x:-c*Math.sin(P)*l-d*Math.cos(P)*p,y:-c*Math.sin(P)*p+d*Math.cos(P)*l}),de=[];for(let P=0;P<M;P+=1){let Z=E+P*R,Oe=Z+R,Me=I(Z),Je=P===M-1?{x:u,y:a}:I(Oe),xn=W(Z),Ke=W(Oe);de.push([{x:Me.x+V*xn.x,y:Me.y+V*xn.y},{x:Je.x-V*Ke.x,y:Je.y-V*Ke.y},Je])}return de}function q(e){let n=[],t=r=>`${y(r.x)} ${y(r.y)}`;for(let r of e){let{anchors:o}=r,i=o[0];if(!i)continue;n.push(`M${t(i)}`);let s=$e(r);for(let u=0;u<s;u+=1){let a=o[u],c=o[(u+1)%o.length],d=r.closed&&u===o.length-1;!a.out&&!c.in?d||n.push(`L${t(c)}`):n.push(`C${t(a.out??a)} ${t(c.in??c)} ${t(c)}`)}r.closed&&n.push("Z")}return n.join(" ")}function $e(e){let n=e.anchors.length;return n<2?0:e.closed?n:n-1}function Ue(e,n){let t=e.anchors[n],r=e.anchors[(n+1)%e.anchors.length];return[{x:t.x,y:t.y},t.out??{x:t.x,y:t.y},r.in??{x:r.x,y:r.y},{x:r.x,y:r.y}]}function Xt(e,n){let[t,r,o,i]=e,s=1-n,u=s*s*s,a=3*s*s*n,c=3*s*n*n,d=n*n*n;return{x:u*t.x+a*r.x+c*o.x+d*i.x,y:u*t.y+a*r.y+c*o.y+d*i.y}}function J(e,n){return e.map(t=>({closed:t.closed,anchors:t.anchors.map(r=>{let o=n(r);return{x:o.x,y:o.y,...r.in?{in:n(r.in)}:{},...r.out?{out:n(r.out)}:{}}})}))}function We(e){let n=1/0,t=1/0,r=-1/0,o=-1/0,i=s=>{n=Math.min(n,s.x),t=Math.min(t,s.y),r=Math.max(r,s.x),o=Math.max(o,s.y)};for(let s of e){for(let a of s.anchors)i(a);let u=$e(s);for(let a=0;a<u;a+=1){let c=Ue(s,a);for(let d of ys(c))i(Xt(c,d))}}if(n!==1/0)return{x:n,y:t,w:r-n,h:o-t}}function ys(e){let[n,t,r,o]=e,i=[];for(let s of["x","y"]){let u=-n[s]+3*t[s]-3*r[s]+o[s],a=2*(n[s]-2*t[s]+r[s]),c=t[s]-n[s];if(Math.abs(u)<1e-12){Math.abs(a)>1e-12&&i.push(-c/a);continue}let d=a*a-4*u*c;if(d<0)continue;let f=Math.sqrt(d);i.push((-a+f)/(2*u),(-a-f)/(2*u))}return i.filter(s=>s>0&&s<1)}function Hn(e){if(e===void 0)return;let n=e.trim().split(/[\s,]+/).map(Number);if(n.length!==4||n.some(s=>!Number.isFinite(s)))return;let[t,r,o,i]=n;return{x:t,y:r,w:o,h:i}}function sn(e,n,t){return Hn(e)??{x:0,y:0,w:n,h:t}}function un(e,n){let t=e.w===0?1:n.w/e.w,r=e.h===0?1:n.h/e.h;return o=>({x:n.x+(o.x-e.x)*t,y:n.y+(o.y-e.y)*r})}function an(e,n=.5){let[t,r,o,i]=e;if(be(t,r)&&be(o,i))return[t,i];let u=Math.hypot(r.x-t.x,r.y-t.y)+Math.hypot(o.x-r.x,o.y-r.y)+Math.hypot(i.x-o.x,i.y-o.y),a=Math.min(256,Math.max(4,Math.ceil(Math.sqrt(u/n)))),c=[];for(let d=0;d<=a;d+=1)c.push(Xt(e,d/a));return c}function Jt(e){let n=0;for(let t of e)for(let r=0;r<$e(t);r+=1){let o=an(Ue(t,r),.25);for(let i=1;i<o.length;i+=1){let s=o[i-1],u=o[i];n+=Math.hypot(u.x-s.x,u.y-s.y)}}return n}function xs(e,n,t){let r=0,o=0;for(let i of e){let s=bs(i);if(s.length!==0){if(t.reach>0){let u=i.closed?s.length:s.length-1;for(let a=0;a<u;a+=1){let c=s[a],d=s[(a+1)%s.length];if($s(n,c,d)<=t.reach)return!0}if(s.length===1&&Math.hypot(n.x-s[0].x,n.y-s[0].y)<=t.reach)return!0}if(t.fill)for(let u=0;u<s.length;u+=1){let a=s[u],c=s[(u+1)%s.length];a.y<=n.y!=c.y<=n.y&&a.x+(n.y-a.y)/(c.y-a.y)*(c.x-a.x)>n.x&&(o+=1,r+=c.y>a.y?1:-1)}}}return t.fill?t.rule==="evenodd"?o%2===1:r!==0:!1}function bs(e){let n=e.anchors[0];if(!n)return[];let t=[{x:n.x,y:n.y}],r=$e(e);for(let o=0;o<r;o+=1)t.push(...an(Ue(e,o)).slice(1));return e.closed&&t.length>1&&t.pop(),t}function $s(e,n,t){let r=t.x-n.x,o=t.y-n.y,i=r*r+o*o,s=i===0?0:Math.max(0,Math.min(1,((e.x-n.x)*r+(e.y-n.y)*o)/i));return Math.hypot(e.x-(n.x+s*r),e.y-(n.y+s*o))}var Fe=.5522847498;function we(e,n,t=0){let r=wn(typeof t=="number"?{tl:Math.max(0,t),tr:Math.max(0,t),br:Math.max(0,t),bl:Math.max(0,t)}:t,e,n),o=[],i=(u,a,c,d)=>{if(u<=0){o.push({x:a.x,y:a.y});return}let f=Fe*u,l={x:a.x+c.x*u,y:a.y+c.y*u},p={x:a.x+d.x*u,y:a.y+d.y*u};o.push({x:l.x,y:l.y,out:{x:l.x-c.x*f,y:l.y-c.y*f}}),o.push({x:p.x,y:p.y,in:{x:p.x-d.x*f,y:p.y-d.y*f}})};i(r.tl,{x:0,y:0},{x:0,y:1},{x:1,y:0}),i(r.tr,{x:e,y:0},{x:-1,y:0},{x:0,y:1}),i(r.br,{x:e,y:n},{x:0,y:-1},{x:-1,y:0}),i(r.bl,{x:0,y:n},{x:1,y:0},{x:0,y:-1});let s=r.tl>0?o.slice(1).concat(o.slice(0,1)):o;return[{closed:!0,anchors:ws(s)}]}function cn(e,n){let t=e/2,r=n/2,o=Fe*t,i=Fe*r;return[{closed:!0,anchors:[{x:t,y:0,in:{x:t-o,y:0},out:{x:t+o,y:0}},{x:e,y:r,in:{x:e,y:r-i},out:{x:e,y:r+i}},{x:t,y:n,in:{x:t+o,y:n},out:{x:t-o,y:n}},{x:0,y:r,in:{x:0,y:r+i},out:{x:0,y:r-i}}]}]}function ws(e){let n=[];for(let o of e){let i=n[n.length-1];if(i&&be(i,o)&&!i.out&&!o.in){n[n.length-1]=Gt(i,i.in,o.out);continue}n.push(o)}let t=n[0],r=n[n.length-1];return n.length>1&&t&&r&&be(t,r)&&!r.out&&!t.in&&(n[0]=Gt(t,r.in,t.out),n.pop()),n}var Yn=["straight","elbow","curve"],qn=["none","arrow","triangle","dot","bar"];var Ht="#1F2937",Yt=2;function qt(e){return{x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),w:Math.abs(e.x2-e.x1),h:Math.abs(e.y2-e.y1)}}function vo(e){return Math.abs(e.x2-e.x1)>=Math.abs(e.y2-e.y1)?"x":"y"}function So(e,n){let t=vo(e);return{start:n.start??t,end:n.end??t}}function Eo(e,n,t={}){let{x1:r,y1:o,x2:i,y2:s}=e,u=(r+i)/2,a=(o+s)/2,c=So(e,t);switch(n){case"straight":return{closed:!1,anchors:[{x:r,y:o},{x:i,y:s}]};case"elbow":{let d=c.start==="x"?c.end==="x"?[{x:u,y:o},{x:u,y:s}]:[{x:i,y:o}]:c.end==="y"?[{x:r,y:a},{x:i,y:a}]:[{x:r,y:s}];return{closed:!1,anchors:[{x:r,y:o},...d,{x:i,y:s}]}}case"curve":{let d=c.start!==c.end,f=c.start==="x"?{x:d?i:u,y:o}:{x:r,y:d?s:a},l=c.end==="x"?{x:d?r:u,y:s}:{x:i,y:d?o:a};return{closed:!1,anchors:[{x:r,y:o,out:f},{x:i,y:s,in:l}]}}}}function Oo(e,n,t={}){let r=e.x2-e.x1,o=e.y2-e.y1;if(r===0&&o===0)return;if(n==="straight"||r===0||o===0){let a=Math.hypot(r,o),c={x:r/a,y:o/a};return{start:{x:-c.x,y:-c.y},end:c}}let i=So(e,t),s=a=>a==="x"?{x:Math.sign(r),y:0}:{x:0,y:Math.sign(o)},u=s(i.start);return{start:{x:-u.x,y:-u.y},end:s(i.end)}}function Zn(e){return 3*Math.max(0,e)+4}function Kt(e,n,t,r){let o=Zn(r),i=o/2,s={x:-t.x,y:-t.y},u={x:-t.y,y:t.x},a=(c,d)=>({x:n.x+s.x*c+u.x*d,y:n.y+s.y*c+u.y*d});switch(e){case"none":return;case"triangle":return{filled:!0,inset:i,contours:[{closed:!0,anchors:[a(0,0),a(o,i),a(o,-i)]}]};case"arrow":return{filled:!1,inset:r/2,contours:[{closed:!1,anchors:[a(o,i),a(0,0),a(o,-i)]}]};case"bar":return{filled:!1,inset:0,contours:[{closed:!1,anchors:[a(0,i),a(0,-i)]}]};case"dot":return{filled:!0,inset:0,contours:[ks(n,o*.4)]}}}function ks(e,n){let t=n*Fe,{x:r,y:o}=e;return{closed:!0,anchors:[{x:r+n,y:o,in:{x:r+n,y:o-t},out:{x:r+n,y:o+t}},{x:r,y:o+n,in:{x:r+t,y:o+n},out:{x:r-t,y:o+n}},{x:r-n,y:o,in:{x:r-n,y:o+t},out:{x:r-n,y:o-t}},{x:r,y:o-n,in:{x:r-t,y:o-n},out:{x:r+t,y:o-n}}]}}function Zt(e,n,t,r,o,i={}){let s=Eo(e,n,i),u=Oo(e,n,i);if(!u)return{route:s,filled:[],lined:[]};let a=[Kt(t,{x:e.x1,y:e.y1},u.start,o),Kt(r,{x:e.x2,y:e.y2},u.end,o)],c=vs(s,u,a[0]?.inset??0,a[1]?.inset??0),d=[],f=[];for(let l of a)l&&(l.filled?d:f).push(...l.contours);return{route:c,filled:d,lined:f}}function vs(e,n,t,r){if(t===0&&r===0)return e;let o=[...e.anchors],i=(s,u,a,c)=>{let d=o[s],f=o[u];if(!d||!f||a<=0)return;let l=Math.hypot(f.x-d.x,f.y-d.y),p=o.length===2?Math.min(a,l/2):Math.min(a,l),h=-c.x*p,b=-c.y*p,$=A=>A===void 0?void 0:{x:A.x+h,y:A.y+b},S={x:d.x+h,y:d.y+b},N=$(d.in),T=$(d.out);o[s]={...S,...N===void 0?{}:{in:N},...T===void 0?{}:{out:T}}};return i(0,1,t,n.start),i(o.length-1,o.length-2,r,n.end),{...e,anchors:o}}var Qn=["center","inside","outside"];function dn(e){let n=e.trim();if(n===""||n==="none"||n==="solid")return{error:"a solid line has no dash \u2014 unset dash rather than writing one"};let t=n.split(/[\s,]+/),r=[];for(let o of t){if(!/^\d*\.?\d+$/.test(o)){let i=/^(\d*\.?\d+)[a-z%]+$/i.exec(o);return i?{error:`lengths have no unit \u2014 write ${i[1]} for ${o}`}:/^-/.test(o)?{error:`a dash length cannot be negative, got ${o}`}:{error:`expected lengths like "6 4", got ${JSON.stringify(e)}`}}r.push(Number(y(Number(o))))}return r.some(o=>o>0)?{dash:r}:{error:"a dash needs one length above zero \u2014 unset dash for a solid line"}}function et(e){return e.map(n=>y(n)).join(" ")}function Qt(e){if(e===void 0)return[];let n=dn(e);return"error"in n?[]:n.dash.length%2===1?[...n.dash,...n.dash]:n.dash}var nt={canvas:[["name","string"],["w","numberValue"],["h","numberValue"],["background","stringValue"]],frame:[["name","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["background","stringValue"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["strokeAlign","strokeAlign"],["cap","lineCap"],["radius","numberValue"],["radiusTL","numberValue"],["radiusTR","numberValue"],["radiusBR","numberValue"],["radiusBL","numberValue"],["clip","boolean"],["skip","boolean"],["component","boolean"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["backdrop","numberValue"],["hidden","boolean"],["locked","boolean"]],connector:[["name","string"],["x1","numberValue"],["y1","numberValue"],["x2","numberValue"],["y2","numberValue"],["route","route"],["start","connectorEnd"],["end","connectorEnd"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["cap","lineCap"],["opacity","numberValue"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["hidden","boolean"],["locked","boolean"]],group:[["name","string"],["hidden","boolean"],["locked","boolean"]],instance:[["name","string"],["component","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["hidden","boolean"],["locked","boolean"]],ellipse:[["name","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["rotation","numberValue"],["fill","stringValue"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["strokeAlign","strokeAlign"],["cap","lineCap"],["opacity","numberValue"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["backdrop","numberValue"],["hidden","boolean"],["locked","boolean"]],vector:[["name","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["rotation","numberValue"],["view","string"],["d","string"],["fill","stringValue"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["strokeAlign","strokeAlign"],["opacity","numberValue"],["rule","fillRule"],["cap","lineCap"],["join","lineJoin"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["backdrop","numberValue"],["hidden","boolean"],["locked","boolean"]],video:[["name","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["rotation","numberValue"],["src","stringValue"],["fit","imageFit"],["start","number"],["end","number"],["poster","number"],["muted","boolean"],["loop","boolean"],["mask","string"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["strokeAlign","strokeAlign"],["cap","lineCap"],["radius","numberValue"],["radiusTL","numberValue"],["radiusTR","numberValue"],["radiusBR","numberValue"],["radiusBL","numberValue"],["opacity","numberValue"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["hidden","boolean"],["locked","boolean"]],rect:[["name","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["rotation","numberValue"],["fill","stringValue"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["strokeAlign","strokeAlign"],["cap","lineCap"],["radius","numberValue"],["radiusTL","numberValue"],["radiusTR","numberValue"],["radiusBR","numberValue"],["radiusBL","numberValue"],["opacity","numberValue"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["backdrop","numberValue"],["hidden","boolean"],["locked","boolean"]],image:[["name","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["rotation","numberValue"],["src","stringValue"],["fit","imageFit"],["mask","string"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["strokeAlign","strokeAlign"],["cap","lineCap"],["radius","numberValue"],["radiusTL","numberValue"],["radiusTR","numberValue"],["radiusBR","numberValue"],["radiusBL","numberValue"],["opacity","numberValue"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["hidden","boolean"],["locked","boolean"]],text:[["name","string"],["x","numberValue"],["y","numberValue"],["w","numberValue"],["h","numberValue"],["rotation","numberValue"],["font","stringValue"],["size","numberValue"],["weight","numberValue"],["lineHeight","numberValue"],["letterSpacing","numberValue"],["align","align"],["valign","valign"],["italic","boolean"],["fill","stringValue"],["stroke","stringValue"],["strokeWidth","numberValue"],["dash","dash"],["opacity","numberValue"],["blend","blendMode"],["shadow","stringValue"],["blur","numberValue"],["hidden","boolean"],["locked","boolean"]]},tt=[["font","string"],["size","number"],["weight","number"],["italic","boolean"],["underline","boolean"],["strike","boolean"],["fill","string"],["letterSpacing","number"],["link","string"]];var rt=[["enter","pageEffect"],["duration","number"],["scroll","boolean"],["length","time"],["w","number"],["h","number"],["bpm","number"],["meter","number"]],fn=[["enter","nodeEffect"],["exit","nodeEffect"],["emphasis","emphasisEffect"],["from","from"],["by","piece"],["stagger","time"],["duration","time"],["hold","time"],["delay","time"],["at","time"],["after","string"],["with","string"],["step","boolean"],["together","boolean"],["on","on"],["ease","ease"],["pad","number"],["go","string"]],ot=[["from","number"],["volume","number"],["fadein","time"],["fadeout","time"],["loop","boolean"]],er=Object.keys(nt);function it(e){return er.includes(e)}function ln(e,n){return nt[e].find(([t])=>t===n)?.[1]}function nr(e){for(let n of er){if(n==="canvas"||n==="instance")continue;let t=ln(n,e);if(t!==void 0)return t}}var tr="override";function L(e,n){if(n==="boolean")return e===""||e==="true"?{value:!0}:e==="false"?{value:!1}:{error:`Expected true or false, got ${e}`};if(e.startsWith('"')){let r=Q(e);return r===void 0?{error:`Malformed quoted string ${e}`}:Mo(r,n,e)}if(Ps(e)){if(!_s(n))return{error:Is(e,n)};let r=_o(e).trim();return r===""?{error:"Empty expression"}:{value:pe(r)}}return n==="numberValue"&&Ao.test(e)?{value:pe(e)}:Mo(e,n,e)}var Ao=/^-?\d+(?:\.\d+)?%$/;function _s(e){return e==="numberValue"||e==="stringValue"}function Is(e,n){return n==="number"?`Expected a plain number, not an expression, got ${e}`:n==="string"&&/^\$\w+$/.test(e)?`Expected a literal, got ${e} \u2014 name a token without the $: ${e.slice(1)}`:`Expected a literal, not an expression, got ${e} \u2014 quote it if you meant the text`}function No(e,n){let t=/^(-?\d+(?:\.\d+)?)([A-Za-z]+)$/.exec(e);return t?/^(?:beats?|bars?)$/.test(t[2])?" \u2014 beats and bars count motion times on a page with bpm=; this is milliseconds":t[2]==="s"&&n==="number"?` \u2014 durations are milliseconds: ${Number(t[1])*1e3}`:/^(?:px|pt|deg|ms)$/.test(t[2])?` \u2014 drop the unit: ${t[1]}`:" \u2014 units are not supported: use a number, a percentage like (100%), or an expression":n==="number"?Ao.test(e)?" \u2014 a percentage is not allowed here":"":/^-[$@(]/.test(e)?` \u2014 wrap an expression in parentheses: (${e})`:/^-?[A-Za-z_]\w*(?:\.\w+)+$/.test(e)?` \u2014 wrap an expression in parentheses: (${e})`:""}function Mo(e,n,t){switch(n){case"numberValue":case"number":{let r=Number(e);return Number.isFinite(r)&&e.trim()!==""?{value:r}:{error:`Expected a number, got ${t}${No(e,n)}`}}case"align":return He.includes(e)?{value:e}:{error:`Expected one of ${He.join(", ")}, got ${t}`};case"valign":return Ye.includes(e)?{value:e}:{error:`Expected one of ${Ye.join(", ")}, got ${t}`};case"fontStyle":return e==="normal"||e==="italic"?{value:e}:{error:`Expected normal or italic, got ${t}`};case"imageFit":return fe.includes(e)?{value:e}:{error:`Expected one of ${fe.join(", ")}, got ${t}`};case"fillRule":return K(vn,e,t);case"lineCap":return K(Sn,e,t);case"lineJoin":return K(En,e,t);case"dash":{let r=dn(e);return"error"in r?{error:r.error}:{value:et(r.dash)}}case"strokeAlign":return K(Qn,e,t);case"blendMode":return K(kn,e,t);case"route":return K(Yn,e,t);case"connectorEnd":return K(qn,e,t);case"pageEffect":return K(Vn,e,t);case"nodeEffect":return K(Ln,e,t);case"emphasisEffect":return K(jn,e,t);case"ease":return K(Bn,e,t);case"piece":return K(Fn,e,t);case"time":{let r=De(e);if(r)return{value:Ve(r.count,r.unit)};let o=Number(e);return Number.isFinite(o)&&e.trim()!==""?{value:o}:{error:`Expected milliseconds or beats, got ${t}${Rs(e)}`}}case"on":return Dn.includes(e)?{value:e}:e==="downbeat"?{error:`Expected beat or bar, got ${t} \u2014 write on=bar: a bar starts on its downbeat`}:e==="beats"||e==="bars"?{error:`Expected beat or bar, got ${t} \u2014 write on=${e.slice(0,-1)}`}:{error:`Expected beat or bar, got ${t}`};case"from":{if(ye.includes(e))return{value:e};let r=Number(e);return Number.isFinite(r)&&e.trim()!==""?{value:r}:{error:`Expected a number or one of ${ye.join(", ")}, got ${t}`}}default:return{value:e}}}function Rs(e){let n=/^(beat|bar|b)[:\s#]?(\d+(?:\.\d+)?)$/.exec(e);if(n){let r=n[1]==="bar"?"bar":"beat",o=Number(n[2]);return` \u2014 write ${Ve(Math.max(0,o-1),r)} (counted from the start: ${r} ${o}'s ${r==="bar"?"downbeat":"start"})`}let t=/^(\d+(?:\.\d+)?)\s*(b|bt|beat|bars?|beats?)$/.exec(e);if(t){let r=t[2]?.startsWith("bar")?"bar":"beat";return` \u2014 write ${Ve(Number(t[1]),r)} (counted from the start)`}return No(e,"number")}function K(e,n,t){return e.includes(n)?{value:n}:{error:`Expected one of ${e.join(", ")}, got ${t}`}}function Ps(e){return/^[$@(]/.test(e)}function st(e,n){if(e!=="radius")return;let t=Ct(n);if(t===void 0)return;if("error"in t)return t;let r=[];for(let[o,i]of t.corners){let s=L(i,"numberValue");if("error"in s)return s;r.push([o,s.value])}return{cells:r}}function Q(e){try{let n=JSON.parse(e);return typeof n=="string"?n:void 0}catch{return}}function _o(e){if(!e.startsWith("("))return e;let n=0;for(let t=0;t<e.length;t+=1){let r=e[t];if(r==="(")n+=1;else if(r===")"&&(n-=1,n===0))return t===e.length-1?e.slice(1,-1):e}return e}function Io(e){let n=[],t="",r=0,o=!1;for(let i=0;i<e.length;i+=1){let s=e[i];if(o){t+=s,s==="\\"?(t+=e[i+1]??"",i+=1):s==='"'&&(o=!1);continue}if(s==='"'){o=!0,t+=s;continue}if(s==="("?r+=1:s===")"&&(r=Math.max(0,r-1)),r===0&&/\s/.test(s)){t!==""&&n.push(t),t="";continue}t+=s}return t!==""&&n.push(t),n}function ut(e,n,t){let r=t===void 0?void 0:j(t);if(r?.value===void 0||!To(e[n]??""))return;let o=n;for(;o<e.length&&To(e[o]??"");)o+=1;let i=[_o(r.value),...e.slice(n,o)].join(" ");return r.key==="dash"&&i.split(" ").every(s=>/^\d*\.?\d+$/.test(s))?{end:o,message:`dash: quote a pattern of several lengths \u2014 write dash="${i}"`}:r.key==="radius"&&i.split(" ").every(s=>/^-?\d+(?:\.\d+)?$/.test(s))?{end:o,message:`radius: quote the four-corner shorthand \u2014 write radius="${i}"`}:{end:o,message:`${r.key}: an expression with spaces needs parentheses \u2014 write ${r.key}=(${i})`}}function To(e){return!e.includes("=")&&/^(?:[-+*/]|-?\d+(?:\.\d+)?%?|[$@][\w.]*|[A-Za-z_]\w*(?:\.\w+)+|\(.*|.*\))$/.test(e)}function j(e){let n=e.indexOf("=");return n===-1?{key:e,value:void 0}:{key:e.slice(0,n),value:e.slice(n+1)}}function rr(e,n){let t,r=0,o,i=[],s=[],u={},a={},c={},d={},f=[],l=!1,p=!1,h,b=(m,w,x)=>{n.push({severity:"warning",code:w,message:`Line ${m}: ${x}`})},$=(m,w,x)=>{e(m.number,"invalid-brand",`${w} ${x} is written twice \u2014 keep one`)},S=m=>{if(t){e(m.number,"invalid-brand",`A document has one brand line; the first is on line ${r}`);return}let w=m.words[1]===void 0?void 0:Lt(m.words[1]);if(!w){e(m.number,"invalid-brand","Expected brand <slug>@<version>, e.g. brand ember@3 \u2014 a slug is lower case, digits and dashes");return}let x=m.words.slice(2).includes("strict"),E=ne({...m,words:m.words.filter((M,R)=>R<2||M!=="strict")},2,["id","theme"],e),k=E.theme;k!==void 0&&!Dt.includes(k)&&e(m.number,"invalid-brand",`theme= is light or dark, got ${k}`),t={...w,...E.id===void 0?{}:{id:E.id},...k==="dark"||k==="light"?{theme:k}:{},...x?{strict:!0}:{}},r=m.number,h={kind:"brand"}},N=m=>{let w=m.words[0];if(w==="summary"){let x=at(m,1);x===void 0?e(m.number,"invalid-brand",'Expected summary "\u2026"'):o=x;return}if(w==="change"){let x=Number(m.words[1]),E=m.words[2]===void 0?void 0:Do(m.words[2]);if(!Number.isSafeInteger(x)||x<1||E===void 0){e(m.number,"invalid-brand",'Expected change <version> "<what changed>" at=<date>');return}let k=ne(m,3,["at"],e);i.push({version:x,note:E,...k.at===void 0?{}:{at:k.at}});return}if(w==="source"){let x=m.words[1];if(x===void 0||x.includes("=")){e(m.number,"invalid-brand","Expected source <kind> key=value\u2026, e.g. source site url=\u2026");return}s.push({kind:x,props:ne(m,2,void 0,e)});return}if(w==="rule"){_(m);return}if(w==="banned"){let x=at(m,1);if(x===void 0){e(m.number,"invalid-brand",'Expected banned "\u2026"');return}(d.voice??={entries:[]}).entries.push({kind:"banned",text:x});return}e(m.number,"invalid-brand",`"${w}" is not a line of the brand block \u2014 it holds summary, change and source, and in a design rule and banned`)},T=m=>{let w=m.words[1];if(w===void 0||w.includes("=")){e(m.number,"invalid-role","Expected role <name> light=<token or colour> dark=\u2026");return}let x=ne(m,2,["light","dark"],e),E=x.light;if(E===void 0){e(m.number,"invalid-role",`role ${w} needs light=`);return}if(Object.prototype.hasOwnProperty.call(u,w))return $(m,"role",w);let k=x.dark;u[w]={light:Ro(E),...k===void 0?{}:{dark:Ro(k)}}},A=m=>{let w=m.words[1];if(w===void 0||w.includes("=")){e(m.number,"invalid-logo","Expected logo <id> asset=<name> min=<px> clear=<fraction>");return}let x=ne(m,2,["asset","min","clear"],e),E=x.asset;if(E===void 0){e(m.number,"invalid-logo",`logo ${w} needs asset=`);return}let k={asset:E};for(let M of["min","clear"]){let R=x[M];if(R===void 0)continue;let V=Number(R);if(!Number.isFinite(V)||V<0){e(m.number,"invalid-logo",`logo ${w}: ${M} must be a number, got ${R}`);continue}k[M]=V}if(Object.prototype.hasOwnProperty.call(a,w))return $(m,"logo",w);a[w]=k},_=m=>{let w=m.words[1],x=m.words[2],E=m.words[3],k=E?.startsWith('"')===!0?Q(E):void 0;if(w===void 0||w.includes("=")){e(m.number,"invalid-rule",'Expected rule <id> must|should "<what it asks>" check=\u2026');return}if(x===void 0||!Vt.includes(x)){e(m.number,"invalid-rule",`rule ${w}: the second word is must or should`);return}if(k===void 0){e(m.number,"invalid-rule",`rule ${w} needs its words, quoted: rule ${w} ${x} "\u2026"`);return}let{check:M,...R}=ne(m,4,void 0,e);if(M!==void 0&&!Tn.includes(M)&&b(m.number,"unknown-check",`rule ${w}: this build has no check "${M}", so it is kept as words only \u2014 the checks are ${Tn.join(", ")}`),Object.prototype.hasOwnProperty.call(c,w))return $(m,"rule",w);c[w]={level:x,text:k,...M===void 0?{}:{check:M},...Object.keys(R).length===0?{}:{params:R}}},O=(m,w)=>{let x=m.words[0];if(x.startsWith('"')){let E=at(m,0);E===void 0?e(m.number,"invalid-guide",`Could not read ${m.text}`):w.push({kind:"line",text:E});return}if(x==="banned"||x==="avoid"){let E=at(m,1);E===void 0?e(m.number,"invalid-guide",`Expected ${x} "\u2026"`):w.push({kind:x,text:E});return}if(x==="rewrite"){let E=ne(m,1,["from","to"],e),k=E.from,M=E.to;if(k===void 0||M===void 0){e(m.number,"invalid-guide",'Expected rewrite from="\u2026" to="\u2026"');return}w.push({kind:"rewrite",from:k,to:M});return}if(x==="ref"||x==="approved"||x==="rejected"){let E=ne(m,1,["asset","note"],e),k=E.asset;if(k===void 0){e(m.number,"invalid-guide",`Expected ${x} asset=<name> note="\u2026"`);return}let M=E.note;w.push({kind:x,asset:k,...M===void 0?{}:{note:M}});return}e(m.number,"invalid-guide",`"${x}" is not a guide line \u2014 a guide holds quoted lines, banned, avoid, rewrite, ref, approved and rejected`)},g=m=>{let w=m.words[0];if(w.includes("=")||w.startsWith('"')){e(m.number,"invalid-review",'Expected <what>.<id> from=\u2026 note="\u2026", e.g. role.muted from=site');return}let x=ne(m,1,["from","note"],e);f.push({target:w,...x.from===void 0?{}:{from:x.from},...x.note===void 0?{}:{note:x.note}})};return{take(m){if(m.indent>0)return h?(h.kind==="brand"?N(m):h.kind==="guide"?O(m,h.entries):g(m),!0):!1;h=void 0;let w=m.words[0];if(w!=="brand"&&!An(w))return!1;switch(p=!0,w){case"brand":S(m);break;case"role":T(m);break;case"logo":A(m);break;case"rule":_(m);break;case"guide":{let x=m.words[1];if(x===void 0||x.includes("=")||m.words.length>2){e(m.number,"invalid-guide","Expected guide <id> on its own line, e.g. guide voice"),h={kind:"guide",id:"",entries:[]};break}if(Object.prototype.hasOwnProperty.call(d,x)){$(m,"guide",x),h={kind:"guide",id:"",entries:[]};break}let E=[];d[x]={entries:E},h={kind:"guide",id:x,entries:E};break}case"review":m.words.length>1&&e(m.number,"invalid-review","review is a block: its items go on the lines under it"),l=!0,h={kind:"review"};break}return!0},finish(){if(!p)return{header:!1,review:!1};let m=t??Nn();return{brand:{slug:m.slug,version:m.version,...t?.id===void 0?{}:{id:t.id},...t?.theme===void 0?{}:{theme:t.theme},...t?.strict===!0?{strict:!0}:{},...o===void 0?{}:{summary:o},changes:i,sources:s,roles:u,logos:a,rules:c,guides:d,review:f},header:t!==void 0,review:l}}}}function ne(e,n,t,r){let o={};for(let i of e.words.slice(n)){let{key:s,value:u}=j(i);if(u===void 0){r(e.number,"invalid-brand",`A stray word "${i}" \u2014 expected key=value`);continue}if(t!==void 0&&!t.includes(s)){r(e.number,"invalid-brand",`"${s}" is not allowed here; this line takes ${t.join(", ")}`);continue}o[s]=Do(u)}return o}function at(e,n){if(e.words.length!==n+1)return;let t=e.words[n];return t.startsWith('"')?Q(t):void 0}function Do(e){return e.startsWith('"')?Q(e)??e:e}function Ro(e){return e.startsWith("$")?e.slice(1):e}var Ds=new Set(["exit","delay","step","together","go","at","after","with"]),Lo=["at","after","with","together","step"],Vs=new Set(["pad","duration","delay","ease","on",...Lo]);function or(e){if(e==="at"||e==="length")return Un;if(e==="w"||e==="h")return xe;if(e==="duration"||e==="delay"||e==="stagger"||e==="hold")return nn;if(e==="pad")return xe}function ir(e,n){let t=e.words[1];if(t===void 0||t.includes("=")){n(e.number,"invalid-motion","Expected motion <page>, e.g. motion intro enter=fade");return}let r={};for(let i of e.words.slice(2)){let{key:s,value:u}=j(i),a=rt.find(([d])=>d===s)?.[1];if(a===void 0){let d=Ds.has(s)?` \u2014 ${s} goes on a node's line, under the header`:"";n(e.number,"invalid-motion",`motion ${t} has no "${s}"${d}`,t);continue}let c=L(u??"",a);"error"in c?n(e.number,"invalid-motion",`${s}: ${zs(s,u)??c.error}`,t):s==="bpm"&&!Us(c.value)?n(e.number,"invalid-motion",`bpm: expected ${20} to ${300} beats a minute, got ${u??""}`,t):s==="meter"&&!Ws(c.value)?n(e.number,"invalid-motion",`meter: expected a whole number of beats in a bar, 1 to ${16}, got ${u??""}`,t):c.value!==!1&&(r[s]=c.value)}let o=ge({...r,lines:[]});for(let[i]of rt){let s=r[i];if(s===void 0||or(i)===void 0)continue;let u=ar(i,s,o,t);u!==void 0&&(n(e.number,"invalid-motion",u,t),delete r[i])}return{page:t,number:e.number,head:r,lines:[],where:new Map,taken:new Map,numbers:[]}}function sr(e,n,t){if(n.words[0]==="music"&&!(n.words[1]??"").includes("=")){js(e,n,t);return}let r=n.words[0]==="camera"&&n.words[1]!==void 0&&!n.words[1].includes("="),o=r?n.words.slice(1):n.words,i=o[0];if(n.indent!==1){t(n.number,"invalid-motion","A motion line sits one level under its page");return}if(i.includes("=")){t(n.number,"invalid-motion",`Expected a node id first, got ${i}`);return}if(i===e.page&&!r){t(n.number,"invalid-motion",`${i} is the page: its transition goes on the header (motion ${i} enter=fade)`,i);return}let s=r?{id:i,camera:!0}:{id:i},u=!0;for(let d of o.slice(1)){let{key:f,value:l}=j(d),p=fn.find(([$])=>$===f)?.[1];if(p===void 0){t(n.number,"invalid-motion",`A motion line has no "${f}"${Gs(f)}`,i),u=!1;continue}if(r&&!Vs.has(f)){t(n.number,"invalid-motion",`A camera line moves the shot and says only pad=, duration=, delay=, ease= and when: not ${f}=`,i),u=!1;continue}let h=L(l??"",p),b="error"in h||or(f)===void 0?void 0:ar(f,h.value,ge(jo(e)),e.page);"error"in h?(t(n.number,"invalid-motion",`${f}: ${h.error}`,i),u=!1):b!==void 0?(t(n.number,"invalid-motion",`${i}: ${b}`,i),u=!1):f==="on"&&e.head.bpm===void 0?(t(n.number,"invalid-motion",`${i}: on=${String(h.value)} needs a tempo \u2014 motion ${e.page} bpm=120`,i),u=!1):f==="go"&&Be(h.value)===void 0?(t(n.number,"invalid-motion",`go: expected #<page>, back, next, or an https: or mailto: link, got ${l??""}`,i),u=!1):h.value!==!1&&(s[f]=h.value)}s.enter!==void 0&&s.exit!==void 0&&(t(n.number,"invalid-motion",`${i} either enters or exits on one line \u2014 write a second line for the other`,i),u=!1),s.emphasis!==void 0&&(s.enter!==void 0||s.exit!==void 0)&&(t(n.number,"invalid-motion",`${i} either ${s.enter!==void 0?"enters":"exits"} or is stressed on one line \u2014 write a second line for emphasis=`,i),u=!1);let a=Lo.filter(d=>s[d]!==void 0);if(s.step===!0&&s.together===!0?(t(n.number,"invalid-motion",`${i} waits for a step or starts together with the line above, not both`,i),u=!1):a.length>1?(t(n.number,"invalid-motion",`${i} says when it starts twice (${a.join(", ")}): keep one`,i),u=!1):s.on!==void 0&&(s.with!==void 0||s.together===!0)&&(t(n.number,"invalid-motion",`${i} starts with another line (${s.with===void 0?"together":"with="}), so on= could only pull it apart: keep one`,i),u=!1),u){let d=Xs(s);d!==void 0&&(t(n.number,"invalid-motion",`${i}: ${d}`,i),u=!1)}if(!u)return;let c=Fs(s);if(!Wn(c)){t(n.number,"invalid-motion",`${i} says nothing: give it enter=, exit=, emphasis= or go=`,i);return}if(r){e.where.has(i)||e.where.set(i,n.number),e.lines.push(c),e.numbers.push(n.number);return}for(let d of["enter","exit","emphasis","go"]){if(c[d]===void 0)continue;let f=e.taken.get(`${i} ${d}`);if(f!==void 0){let l=d==="go"?"has a go=":d==="enter"?"enters":d==="exit"?"exits":"has an emphasis=";t(n.number,"invalid-motion",`${i} already ${l} on line ${f}`,i);return}}for(let d of["enter","exit","emphasis","go"])c[d]!==void 0&&e.taken.set(`${i} ${d}`,n.number);e.where.has(i)||e.where.set(i,n.number),e.lines.push(c),e.numbers.push(n.number)}function ur(e){let n={...e.head.enter===void 0?{}:{enter:e.head.enter},...e.head.duration===void 0?{}:{duration:e.head.duration},...e.head.scroll===!0?{scroll:!0}:{},...e.head.length===void 0?{}:{length:e.head.length},...e.head.w===void 0?{}:{w:e.head.w},...e.head.h===void 0?{}:{h:e.head.h},...e.head.bpm===void 0?{}:{bpm:e.head.bpm},...e.head.meter===void 0?{}:{meter:e.head.meter},...e.music===void 0?{}:{music:e.music},lines:e.lines};return tn(n)?void 0:n}var Ls=new Set(["loop","step","together"]);function js(e,n,t){let r=n.words[1];if(n.indent!==1){t(n.number,"invalid-motion","A motion line sits one level under its page");return}if(r===void 0){t(n.number,"invalid-motion","Expected music <asset>, e.g. music bed fadeout=1500");return}if(Ls.has(r)){t(n.number,"invalid-motion",`music names its track first: music <asset> ${r}`);return}if(e.musicLine!==void 0){t(n.number,"invalid-motion",`motion ${e.page} already has music on line ${e.musicLine}: a page has one track`);return}let o={asset:r},i=ge(jo(e)),s=!0,u=c=>{t(n.number,"invalid-motion",`music ${r}: ${c}`),s=!1};for(let c of n.words.slice(2)){let{key:d,value:f}=j(c),l=ot.find(([h])=>h===d)?.[1];if(l===void 0){u(`the music line has no "${d}"${Bs(d)}`);continue}if(d==="from"&&f!==void 0&&/\d(?:beats?|bars?)$/.test(f)){u(`from= is where in the track to begin, in milliseconds, not ${f}`);continue}let p=L(f??"",l);if("error"in p){u(`${d}: ${p.error}`);continue}if(d==="from"&&!Vo(p.value,0,en)){u(`from: expected 0 to ${en} milliseconds, got ${f??""}`);continue}if(d==="volume"&&!Vo(p.value,0,1)){u(`volume: expected 0 to 1, got ${f??""}`);continue}if(d==="fadein"||d==="fadeout"){let h=ar(d,p.value,i,e.page);if(h!==void 0){u(h);continue}}p.value!==!1&&(o[d]=p.value)}if(!s)return;let a={asset:r};for(let[c]of ot)o[c]!==void 0&&(a[c]=o[c]);e.music=a,e.musicLine=n.number}function Vo(e,n,t){return typeof e=="number"&&e>=n&&e<=t}function Bs(e){return e==="fade"?" \u2014 write fadein= and fadeout=":e==="fade-in"||e==="fadeIn"||e==="fade_in"?" \u2014 write fadein=":e==="fade-out"||e==="fadeOut"||e==="fade_out"?" \u2014 write fadeout=":e==="start"||e==="offset"||e==="seek"?" \u2014 write from= (where in the track to begin, in milliseconds)":e==="gain"||e==="level"?" \u2014 write volume= (0 to 1)":e==="at"||e==="delay"||e==="after"||e==="with"?": the music starts with the video; from= picks where in the track":": it takes from=, volume=, fadein=, fadeout= and loop"}function Fs(e){let n=e.camera===!0?{id:e.id,camera:!0}:{id:e.id};for(let[t]of fn)e[t]!==void 0&&(n[t]=e[t]);return n}function jo(e){let{bpm:n,meter:t}=e.head;return{...n===void 0?{}:{bpm:n},...t===void 0?{}:{meter:t},lines:[]}}function ar(e,n,t,r){if(Le(n)&&!t)return`${n} needs a tempo \u2014 motion ${r} bpm=120`;let o=typeof n=="number"||Le(n)?Qe(n,t):void 0,i=or(e)??nn;if(o!==void 0&&o>=(e==="w"||e==="h"?16:0)&&o<=i)return;let u=String(n),a=Le(n)&&o!==void 0?` (${Math.round(o)} ms)`:"";return e==="w"||e==="h"?`${e}: expected 16 to ${xe} pixels, got ${u}`:e==="pad"?`pad: expected 0 to ${xe}, got ${u}`:`${e}: expected 0 to ${i} milliseconds, got ${u}${a}`}function Us(e){return typeof e=="number"&&e>=20&&e<=300}function Ws(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1&&e<=16}function zs(e,n){if(e==="meter"&&n!==void 0&&/^\d+\/\d+$/.test(n))return`Expected beats in a bar, got ${n} \u2014 meter is beats per bar: meter=${n.split("/")[0]??""}`;if(e==="duration"&&n!==void 0&&/\d(?:beats?|bars?)$/.test(n))return`Expected milliseconds, got ${n} \u2014 the page transition is milliseconds; beats are for the lines`}function Gs(e){return e==="emphasise"||e==="emphasize"?" \u2014 write emphasis=pulse":e==="easing"?" \u2014 write ease=":e==="split"?" \u2014 write by=word or by=letter":e==="start"?" \u2014 write at= (milliseconds), after= or with=":""}function Xs(e){let n=e.enter,t=e.exit,r=n??t,o=e.from;if(t==="count")return"count only enters: it runs a number up to its written value";if(o!==void 0)if(r==="count"){if(typeof o!="number")return"from= on count is the number it starts at, e.g. from=0"}else if(r==="wipe"||r==="grow"){if(typeof o=="number")return`from= on ${r} is a side: ${ye.join(", ")}`}else return"from= goes with count (a number), or wipe and grow (a side)";if(e.by!==void 0&&r!==void 0&&!je.includes(r))return`by= splits a text for ${je.join(", ")}, not ${r}`;if(e.by!==void 0&&r===void 0)return"by= goes with enter= or exit=";if(e.stagger!==void 0&&r===void 0)return"stagger= goes with enter= or exit=";if(e.hold!==void 0&&n===void 0)return"hold= goes with enter=: how long to stay before leaving the way it came"}function cr(e){return(n,t,r,o)=>{e.push({severity:"error",code:t,message:`Line ${n}: ${r}`,...o===void 0?{}:{nodeId:o}})}}function dr(e){let n=[],t=e.split(`
@@ -0,0 +1,2 @@
1
+ /*! @getv.design/embed v0.6.1. Free to use under the vDesign Embed Licence. © 2026 vDesign. https://getv.design/docs/licence/ */
2
+ var _="0.6.1",e="https://cdn.jsdelivr.net/npm/@getv.design/embed@0.6.1/fonts/";export{_ as a,e as b};