@bendyline/squisq-react 2.11.16 → 2.11.17
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/README.md +12 -0
- package/dist/{chunk-BSDTS72D.js → chunk-2FZUFQO3.js} +2 -2
- package/dist/{chunk-62UYYVCB.js → chunk-2VSD55NT.js} +123 -415
- package/dist/chunk-5FJZDX7H.js +298 -0
- package/dist/{chunk-5JGUJDPD.js → chunk-622IA3KB.js} +11 -9
- package/dist/{chunk-4L5MZ5OL.js → chunk-63G5OJWY.js} +16 -0
- package/dist/{chunk-VZ43ACHC.js → chunk-L4LIIOU2.js} +1 -1
- package/dist/{chunk-UD3VI5UB.js → chunk-PSAO2CTF.js} +1 -1
- package/dist/{chunk-GFUEFU6X.js → chunk-PZCWGBRQ.js} +2 -2
- package/dist/{chunk-RJ3SNKB7.js → chunk-QXZXQPL3.js} +1 -1
- package/dist/{chunk-CYXFNHWK.js → chunk-SVVPYDV3.js} +1 -1
- package/dist/diagram-pictures/index.d.ts +61 -0
- package/dist/diagram-pictures/index.js +213 -0
- package/dist/hooks/index.js +2 -2
- package/dist/index.js +24 -22
- package/dist/json-view/index.js +4 -4
- package/dist/layers/index.js +3 -3
- package/dist/markdown/index.js +3 -3
- package/dist/page/index.js +7 -6
- package/dist/player/index.js +10 -9
- package/dist/squisq-player.full.global.js +202 -202
- package/dist/squisq-player.global.js +16 -16
- package/dist/standalone-player-full.d.ts +1 -0
- package/dist/standalone-player-full.js +4 -0
- package/dist/standalone-source.js +1 -1
- package/package.json +10 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var SquisqPlayer=(function(exports){'use strict';var s5=Object.create;var Ku=Object.defineProperty;var l5=Object.getOwnPropertyDescriptor;var c5=Object.getOwnPropertyNames;var u5=Object.getPrototypeOf,d5=Object.prototype.hasOwnProperty;var m5=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var Ng=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Qu=(e,t)=>{for(var n in t)Ku(e,n,{get:t[n],enumerable:true});},f5=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of c5(t))!d5.call(e,i)&&i!==n&&Ku(e,i,{get:()=>t[i],enumerable:!(r=l5(t,i))||r.enumerable});return e};var Dg=(e,t,n)=>(n=e!=null?s5(u5(e)):{},f5(Ku(n,"default",{value:e,enumerable:true}),e));var iw=Ng((UW,rw)=>{"use strict";var Xl=Object.prototype.hasOwnProperty,nw=Object.prototype.toString,Kb=Object.defineProperty,Qb=Object.getOwnPropertyDescriptor,Zb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):nw.call(t)==="[object Array]"},Jb=function(t){if(!t||nw.call(t)!=="[object Object]")return !1;var n=Xl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Xl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return !1;var i;for(i in t);return typeof i>"u"||Xl.call(t,i)},ew=function(t,n){Kb&&n.name==="__proto__"?Kb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue;},tw=function(t,n){if(n==="__proto__")if(Xl.call(t,n)){if(Qb)return Qb(t,n).value}else return;return t[n]};rw.exports=function e(){var t,n,r,i,a,o,s=arguments[0],l=1,c=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=tw(s,n),i=tw(t,n),s!==i&&(d&&i&&(Jb(i)||(a=Zb(i)))?(a?(a=!1,o=r&&Zb(r)?r:[]):o=r&&Jb(r)?r:{},ew(s,{name:n,newValue:e(d,o,i)})):typeof i<"u"&&ew(s,{name:n,newValue:i}));return s};});var Wk=Ng((nte,Kf)=>{"use strict";(function(){var e;typeof Kf<"u"?e=Kf.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=n,typeof console<"u"&&typeof console.log=="function"&&(e.printf=t);function t(){console.log(r.apply(null,arguments));}function n(i,a){return r.apply(null,[i].concat(a))}function r(i){for(var a=1,o=[].slice.call(arguments),s=0,l=i.length,c="",d,u=!1,f,m,h=!1,y,g=function(){return o[a++]},w=function(){for(var x="";/\d/.test(i[s]);)x+=i[s++],d=i[s];return x.length>0?parseInt(x):null};s<l;++s)if(d=i[s],u)switch(u=!1,d=="."?(h=!1,d=i[++s]):d=="0"&&i[s+1]=="."?(h=!0,s+=2,d=i[s]):h=!0,y=w(),d){case "b":c+=parseInt(g(),10).toString(2);break;case "c":f=g(),typeof f=="string"||f instanceof String?c+=f:c+=String.fromCharCode(parseInt(f,10));break;case "d":c+=parseInt(g(),10);break;case "f":m=String(parseFloat(g()).toFixed(y||6)),c+=h?m:m.replace(/^0/,"");break;case "j":c+=JSON.stringify(g());break;case "o":c+="0"+parseInt(g(),10).toString(8);break;case "s":c+=g();break;case "x":c+="0x"+parseInt(g(),10).toString(16);break;case "X":c+="0x"+parseInt(g(),10).toString(16).toUpperCase();break;default:c+=d;break}else d==="%"?u=!0:c+=d;return c}})();});var CE={};Qu(CE,{default:()=>O$});var D$,O$,IE=m5(()=>{"use strict";D$={initialize(){},async render(){throw new Error("Mermaid rendering is not included in the light standalone player. Use the /standalone/full export.")}},O$=D$;});var Gs,_e,$g,Er,Og,Hg,zg,Ug,nd,Zu,Ju,jg,js={},Ws=[],h5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ga=Array.isArray;function rr(e,t){for(var n in t)e[n]=t[n];return e}function rd(e){e&&e.parentNode&&e.parentNode.removeChild(e);}function ir(e,t,n){var r,i,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Gs.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Us(e,o,r,i,null)}function Us(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++$g,__i:-1,__u:0};return i==null&&_e.vnode!=null&&_e.vnode(a),a}function Pe(e){return e.children}function un(e,t){this.props=e,this.context=t;}function Yi(e,t){if(t==null)return e.__?Yi(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Yi(e):null}function g5(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=rr({},t);a.__v=t.__v+1,_e.vnode&&_e.vnode(a),id(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Yi(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Yg(r,a,i),t.__e=t.__=null,a.__e!=n&&Wg(a);}}function Wg(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Wg(e)}function ed(e){(!e.__d&&(e.__d=true)&&Er.push(e)&&!Vs.__r++||Og!=_e.debounceRendering)&&((Og=_e.debounceRendering)||Hg)(Vs);}function Vs(){try{for(var e,t=1;Er.length;)Er.length>t&&Er.sort(zg),e=Er.shift(),t=Er.length,g5(e);}finally{Er.length=Vs.__r=0;}}function Vg(e,t,n,r,i,a,o,s,l,c,d){var u,f,m,h,y,g,w,x=r&&r.__k||Ws,v=t.length;for(l=y5(n,t,x,l,v),u=0;u<v;u++)(m=n.__k[u])!=null&&(f=m.__i!=-1&&x[m.__i]||js,m.__i=u,g=id(e,m,f,i,a,o,s,l,c,d),h=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&ad(f.ref,null,m),d.push(m.ref,m.__c||h,m)),y==null&&h!=null&&(y=h),(w=!!(4&m.__u))||f.__k===m.__k?l=Gg(m,l,e,w):typeof m.type=="function"&&g!==void 0?l=g:h&&(l=h.nextSibling),m.__u&=-7);return n.__e=y,l}function y5(e,t,n,r,i){var a,o,s,l,c,d=n.length,u=d,f=0;for(e.__k=new Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=e.__k[a]=Us(null,o,null,null,null):Ga(o)?o=e.__k[a]=Us(Pe,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=Us(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,l=a+f,o.__=e,o.__b=e.__b+1,s=null,(c=o.__i=b5(o,n,l,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(i>d?f--:i<d&&f++),typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<d;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=Yi(s)),Kg(s,s));return r}function Gg(e,t,n,r){var i,a;if(typeof e.type=="function"){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Gg(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Yi(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ya(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ga(e)?e.some(function(n){Ya(n,t);}):t.push(e)),t}function b5(e,t,n,r){var i,a,o,s=e.key,l=e.type,c=t[n],d=c!=null&&(2&c.__u)==0;if(c===null&&s==null||d&&s==c.key&&l==c.type)return n;if(r>(d?1:0)){for(i=n-1,a=n+1;i>=0||a<t.length;)if((c=t[o=i>=0?i--:a++])!=null&&(2&c.__u)==0&&s==c.key&&l==c.type)return o}return -1}function Fg(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||h5.test(t)?n:n+"px";}function zs(e,t,n,r,i){var a,o;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else {if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Fg(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Fg(e.style,t,n[t]);}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Ug,"$1")),o=t.toLowerCase(),t=o in e||t=="onFocusOut"||t=="onFocusIn"?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=nd,e.addEventListener(t,a?Ju:Zu,a)):e.removeEventListener(t,a?Ju:Zu,a);else {if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===false&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n));}}function Bg(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=nd++;else if(t.t<n.u)return;return n(_e.event?_e.event(t):t)}}}function id(e,t,n,r,i,a,o,s,l,c){var d,u,f,m,h,y,g,w,x,v,T,S,k,E,I,_=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),a=[s=t.__e=n.__e]),(d=_e.__b)&&d(t);e:if(typeof _=="function")try{if(w=t.props,x=_.prototype&&_.prototype.render,v=(d=_.contextType)&&r[d.__c],T=d?v?v.props.value:d.__:r,n.__c?g=(u=t.__c=n.__c).__=u.__E:(x?t.__c=u=new _(w,T):(t.__c=u=new un(w,T),u.constructor=_,u.render=k5),v&&v.sub(u),u.state||(u.state={}),u.__n=r,f=u.__d=!0,u.__h=[],u._sb=[]),x&&u.__s==null&&(u.__s=u.state),x&&_.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=rr({},u.__s)),rr(u.__s,_.getDerivedStateFromProps(w,u.__s))),m=u.props,h=u.state,u.__v=t,f)x&&_.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),x&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else {if(x&&_.getDerivedStateFromProps==null&&w!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(w,T),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(w,u.__s,T)===!1){t.__v!=n.__v&&(u.props=w,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(A){A&&(A.__=t);}),Ws.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(w,u.__s,T),x&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,h,y);});}if(u.context=T,u.props=w,u.__P=e,u.__e=!1,S=_e.__r,k=0,x)u.state=u.__s,u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),Ws.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++k<25);u.state=u.__s,u.getChildContext!=null&&(r=rr(rr({},r),u.getChildContext())),x&&!f&&u.getSnapshotBeforeUpdate!=null&&(y=u.getSnapshotBeforeUpdate(m,h)),E=d!=null&&d.type===Pe&&d.key==null?Xg(d.props.children):d,s=Vg(e,Ga(E)?E:[E],t,n,r,i,a,o,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),g&&(u.__E=u.__=null);}catch(A){if(t.__v=null,l||a!=null)if(A.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s;}else {for(I=a.length;I--;)rd(a[I]);td(t);}else t.__e=n.__e,t.__k=n.__k,A.then||td(t);_e.__e(A,t,n);}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=w5(n.__e,t,n,r,i,a,o,l,c);return (d=_e.diffed)&&d(t),128&t.__u?void 0:s}function td(e){e&&(e.__c&&(e.__c.__e=true),e.__k&&e.__k.some(td));}function Yg(e,t,n){for(var r=0;r<n.length;r++)ad(n[r],n[++r],n[++r]);_e.__c&&_e.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i);});}catch(a){_e.__e(a,i.__v);}});}function Xg(e){return typeof e!="object"||e==null||e.__b>0?e:Ga(e)?e.map(Xg):rr({},e)}function w5(e,t,n,r,i,a,o,s,l){var c,d,u,f,m,h,y,g=n.props||js,w=t.props,x=t.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((m=a[c])&&"setAttribute"in m==!!x&&(x?m.localName==x:m.nodeType==3)){e=m,a[c]=null;break}}if(e==null){if(x==null)return document.createTextNode(w);e=document.createElementNS(i,x,w.is&&w),s&&(_e.__m&&_e.__m(t,a),s=false),a=null;}if(x==null)g===w||s&&e.data==w||(e.data=w);else {if(a=a&&Gs.call(e.childNodes),!s&&a!=null)for(g={},c=0;c<e.attributes.length;c++)g[(m=e.attributes[c]).name]=m.value;for(c in g)m=g[c],c=="dangerouslySetInnerHTML"?u=m:c=="children"||c in w||c=="value"&&"defaultValue"in w||c=="checked"&&"defaultChecked"in w||zs(e,c,null,m,i);for(c in w)m=w[c],c=="children"?f=m:c=="dangerouslySetInnerHTML"?d=m:c=="value"?h=m:c=="checked"?y=m:s&&typeof m!="function"||g[c]===m||zs(e,c,m,g[c],i);if(d)s||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Vg(t.type=="template"?e.content:e,Ga(f)?f:[f],t,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,a,o,a?a[0]:n.__k&&Yi(n,0),s,l),a!=null)for(c=a.length;c--;)rd(a[c]);s||(c="value",x=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||x=="progress"&&!h||x=="option"&&h!=g[c])&&zs(e,c,h,g[c],i),c="checked",y!=null&&y!=e[c]&&zs(e,c,y,g[c],i));}return e}function ad(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t));}else e.current=t;}catch(i){_e.__e(i,n);}}function Kg(e,t,n){var r,i;if(_e.unmount&&_e.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ad(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount();}catch(a){_e.__e(a,t);}r.base=r.__P=null;}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Kg(r[i],t,n||typeof e.type!="function");n||rd(e.__e),e.__c=e.__=e.__e=void 0;}function k5(e,t,n){return this.constructor(e,n)}function od(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),_e.__&&_e.__(e,t),i=(r="undefined"=="function")?null:t.__k,a=[],o=[],id(t,e=(t).__k=ir(Pe,null,[e]),i||js,js,t.namespaceURI,i?null:t.firstChild?Gs.call(t.childNodes):null,a,i?i.__e:t.firstChild,r,o),Yg(a,e,o);}function ar(e){function t(n){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null;},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&r.forEach(function(o){o.__e=true,ed(o);});},this.sub=function(a){r.add(a);var o=a.componentWillUnmount;a.componentWillUnmount=function(){r&&r.delete(a),o&&o.call(a);};}),n.children}return t.__c="__cC"+jg++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Gs=Ws.slice,_e={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(s){e=s;}throw e}},$g=0,un.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=rr({},this.state),typeof e=="function"&&(e=e(rr({},n),this.props)),e&&rr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ed(this));},un.prototype.forceUpdate=function(e){this.__v&&(this.__e=true,e&&this.__h.push(e),ed(this));},un.prototype.render=Pe,Er=[],Hg=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zg=function(e,t){return e.__v.__b-t.__v.__b},Vs.__r=0,Ug=/(PointerCapture)$|Capture$/i,nd=0,Zu=Bg(false),Ju=Bg(true),jg=0;var Sr,Qe,sd,Qg,Xa=0,ay=[],dt=_e,Zg=dt.__b,Jg=dt.__r,ey=dt.diffed,ty=dt.__c,ny=dt.unmount,ry=dt.__;function Xi(e,t){dt.__h&&dt.__h(Qe,e,Xa||t),Xa=0;var n=Qe.__H||(Qe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ge(e){return Xa=1,oy(sy,e)}function oy(e,t,n){var r=Xi(Sr++,2);if(r.t=e,!r.__c&&(r.__=[sy(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}));}],r.__c=Qe,!Qe.__f)){var i=function(s,l,c){if(!r.__c.__H)return true;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return !f.__N}))return !a||a.call(this,s,l,c);var u=r.__c.props!==s;return d.some(function(f){if(f.__N){var m=f.__[0];f.__=f.__N,f.__N=void 0,m!==f.__[0]&&(u=true);}}),a&&a.call(this,s,l,c)||u};Qe.__f=true;var a=Qe.shouldComponentUpdate,o=Qe.componentWillUpdate;Qe.componentWillUpdate=function(s,l,c){if(this.__e){var d=a;a=void 0,i(s,l,c),a=d;}o&&o.call(this,s,l,c);},Qe.shouldComponentUpdate=i;}return r.__N||r.__}function he(e,t){var n=Xi(Sr++,3);!dt.__s&&cd(n.__H,t)&&(n.__=e,n.u=t,Qe.__H.__h.push(n));}function bn(e,t){var n=Xi(Sr++,4);!dt.__s&&cd(n.__H,t)&&(n.__=e,n.u=t,Qe.__h.push(n));}function ue(e){return Xa=5,de(function(){return {current:e}},[])}function de(e,t){var n=Xi(Sr++,7);return cd(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ke(e,t){return Xa=8,de(function(){return e},t)}function _r(e){var t=Qe.context[e.__c],n=Xi(Sr++,9);return n.c=e,t?(n.__==null&&(n.__=true,t.sub(Qe)),t.props.value):e.__}function Wt(){var e=Xi(Sr++,11);if(!e.__){for(var t=Qe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++;}return e.__}function x5(){for(var e;e=ay.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ys),t.__h.some(ld),t.__h=[];}catch(n){t.__h=[],dt.__e(n,e.__v);}}}dt.__b=function(e){Qe=null,Zg&&Zg(e);},dt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ry&&ry(e,t);},dt.__r=function(e){Jg&&Jg(e),Sr=0;var t=(Qe=e.__c).__H;t&&(sd===Qe?(t.__h=[],Qe.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0;})):(t.__h.some(Ys),t.__h.some(ld),t.__h=[],Sr=0)),sd=Qe;},dt.diffed=function(e){ey&&ey(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ay.push(t)!==1&&Qg===dt.requestAnimationFrame||((Qg=dt.requestAnimationFrame)||v5)(x5)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0;})),sd=Qe=null;},dt.__c=function(e,t){t.some(function(n){try{n.__h.some(Ys),n.__h=n.__h.filter(function(r){return !r.__||ld(r)});}catch(r){t.some(function(i){i.__h&&(i.__h=[]);}),t=[],dt.__e(r,n.__v);}}),ty&&ty(e,t);},dt.unmount=function(e){ny&&ny(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Ys(r);}catch(i){t=i;}}),n.__H=void 0,t&&dt.__e(t,n.__v));};var iy=typeof requestAnimationFrame=="function";function v5(e){var t,n=function(){clearTimeout(r),iy&&cancelAnimationFrame(t),setTimeout(e);},r=setTimeout(n,35);iy&&(t=requestAnimationFrame(n));}function Ys(e){var t=Qe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Qe=t;}function ld(e){var t=Qe;e.__c=e.__(),Qe=t;}function cd(e,t){return !e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function sy(e,t){return typeof t=="function"?t(e):t}function E5(e,t){for(var n in t)e[n]=t[n];return e}function ly(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return true;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return true;return false}function yy(e,t){var n=t(),r=ge({t:{__:n,u:t}}),i=r[0].t,a=r[1];return bn(function(){i.__=n,i.u=t,ud(i)&&a({t:i});},[e,n,t]),he(function(){return ud(i)&&a({t:i}),e(function(){ud(i)&&a({t:i});})},[e]),n}function ud(e){try{return !((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return true}var t,n;}function cy(e,t){this.props=e,this.context=t;}(cy.prototype=new un).isPureReactComponent=true,cy.prototype.shouldComponentUpdate=function(e,t){return ly(this.props,e)||ly(this.state,t)};var uy=_e.__b;_e.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),uy&&uy(e);};var S5=_e.__e;_e.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}S5(e,t,n,r);};var dy=_e.unmount;function by(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c();}),e.__c.__H=null),(e=E5({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=true,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return by(r,t,n)})),e}function wy(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return wy(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=true,e.__c.__P=n)),e}function dd(){this.__u=0,this.o=null,this.__b=null;}function ky(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Xs(){this.i=null,this.l=null;}_e.unmount=function(e){var t=e.__c;t&&(t.__z=true),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),dy&&dy(e);},(dd.prototype=new un).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=ky(r.__v),a=false,o=function(){a||r.__z||(a=true,n.__R=null,i?i(l):l());};n.__R=o;var s=n.__P;n.__P=null;var l=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=wy(c,c.__c.__P,c.__c.__O);}var d;for(r.setState({__a:r.__b=null});d=r.o.pop();)d.__P=s,d.forceUpdate();}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o);},dd.prototype.componentWillUnmount=function(){this.o=[];},dd.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=by(this.__b,n,r.__O=r.__P);}this.__b=null;}var i=t.__a&&ir(Pe,null,e.fallback);return i&&(i.__u&=-33),[ir(Pe,null,t.__a?null:e.children),i]};var my=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2];}};(Xs.prototype=new un).__a=function(e){var t=this,n=ky(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),my(t,e,r)):i();};n?n(a):a();}},Xs.prototype.render=function(e){this.i=null,this.l=new Map;var t=Ya(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Xs.prototype.componentDidUpdate=Xs.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){my(e,n,t);});};var _5=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,A5=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C5=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,I5=/[A-Z0-9]/g,M5=typeof document<"u",q5=function(e){return (typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function xy(e,t,n){return t.__k==null&&(t.textContent=""),od(e,t),e?e.__c:null}un.prototype.isReactComponent=true,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(un.prototype,e,{configurable:true,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:true,writable:true,value:t});}});});var fy=_e.event;_e.event=function(e){return fy&&(e=fy(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var L5={configurable:true,get:function(){return this.class}},py=_e.vnode;_e.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,i={},a=r.indexOf("-")==-1;for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||M5&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var l=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===true?s="":l==="translate"&&s==="no"?s=false:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?o="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||q5(n.type)?l==="onfocus"?o="onfocusin":l==="onblur"?o="onfocusout":C5.test(o)&&(o=l):l=o="oninput":a&&A5.test(o)?o=o.replace(I5,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[o=l]&&(o="oninputCapture"),i[o]=s;}}r=="select"&&(i.multiple&&Array.isArray(i.value)&&(i.value=Ya(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1;})),i.defaultValue!=null&&(i.value=Ya(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value;}))),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",L5)):n.className&&(i.class=i.className=n.className),t.props=i;})(e),e.$$typeof=_5,py&&py(e);};var hy=_e.__r;_e.__r=function(e){hy&&hy(e),e.__c;};var gy=_e.diffed;_e.diffed=function(e){gy&&gy(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value);};function Ty(e){return !!e.__k&&(od(null,e),true)}var Ey=function(e,t){var n=_e.debounceRendering;_e.debounceRendering=function(i){return i()};var r=e(t);return _e.debounceRendering=n,r};function Sy(e){return {render:function(t){xy(t,e);},unmount:function(){Ty(e);}}}var md=["highpass","denoise","debreath","loudness"],Cy=Object.freeze({highpass:{defaultValue:80,min:20,max:300},denoise:{defaultValue:.8,min:0,max:1},debreath:{defaultValue:-15,min:-40,max:0},loudness:{defaultValue:-16,min:-31,max:-5}}),Zs=[{key:"fx",htmlSuffix:"fx"},{key:"cuts",htmlSuffix:"cuts"},{key:"gain",htmlSuffix:"gain"},{key:"fadeIn",htmlSuffix:"fade-in"},{key:"fadeOut",htmlSuffix:"fade-out"},{key:"crop",htmlSuffix:"crop"},{key:"group",htmlSuffix:"group"}];function Iy(e,t){let n=Zs.find(r=>r.key===t);return `data-squisq-${e}-${n?.htmlSuffix??t}`}function My(e,t=3){let n=Number(e.toFixed(t));return Object.is(n,-0)?"0":String(n)}function Js(e){if(e==null)return null;let t=e.trim();if(!/^[-+]?(\d+(\.\d*)?|\.\d+)$/.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}function Ki(e,t,n){return Math.min(n,Math.max(t,e))}function Qs(e){let t=e.trim(),n=Js(t);if(n!=null)return n>=0?n:null;let r=t.match(/^(\d+(?:\.\d+)?)ms$/i);if(r)return Number(r[1])/1e3;let i=t.match(/^(\d+):([0-5]?\d)(?:\.(\d+))?$/);return i?Number(i[1])*60+Number(i[2])+ +`0.${i[3]??"0"}`:null}function P5(e){return md.includes(e)}function qy(e){if(e==null)return null;let t=e.split(/[\s,]+/).filter(Boolean);if(t.length===0)return null;let n=new Map,r=[];for(let a of t){let o=a.indexOf(":"),s=(o===-1?a:a.slice(0,o)).toLowerCase();if(!P5(s)){r.push(a);continue}let l=Cy[s],c=l.defaultValue;if(o!==-1&&(c=Js(a.slice(o+1)),c!=null&&s==="debreath"&&(c=-Math.abs(c))),c==null){r.push(a);continue}n.set(s,Ki(c,l.min,l.max));}return {ops:md.filter(a=>n.has(a)).map(a=>({id:a,value:n.get(a)})),unknown:r}}var _y=.001;function el(e,t=0,n=Number.POSITIVE_INFINITY){let r=e.filter(a=>Number.isFinite(a.start)&&Number.isFinite(a.end)).map(a=>({start:Math.max(t,Math.min(a.start,a.end)),end:Math.min(n,Math.max(a.start,a.end))})).filter(a=>a.end-a.start>=_y).sort((a,o)=>a.start-o.start),i=[];for(let a of r){let o=i[i.length-1];o&&a.start<=o.end+_y?o.end=Math.max(o.end,a.end):i.push({...a});}return i}function Ly(e){if(e==null)return null;let t=[];for(let r of e.split(/[\s,]+/).filter(Boolean)){let i=r.indexOf("-",1);if(i===-1)continue;let a=Qs(r.slice(0,i)),o=Qs(r.slice(i+1));a==null||o==null||o<=a||t.push({start:a,end:o});}let n=el(t);return n.length>0?n:null}var Ks=.02;function Py(e){if(e==null)return null;let t=e.split(/[\s,]+/).filter(Boolean).map(n=>Js(n));return t.length!==4||t.some(n=>n==null)?null:Ry({x:t[0],y:t[1],w:t[2],h:t[3]})}function Ry(e){let t=Ki(e.x,0,1-Ks),n=Ki(e.y,0,1-Ks),r=Ki(e.w,Ks,1-t),i=Ki(e.h,Ks,1-n);return t<1e-4&&n<1e-4&&r>1-1e-4&&i>1-1e-4?null:{x:t,y:n,w:r,h:i}}function fd(e){return [e.x,e.y,e.w,e.h].map(t=>My(t,4)).join(" ")}var Ay={min:-60,max:24},R5=/^[A-Za-z0-9_-]{1,64}$/;function tl(e){let t={},n=qy(e.fx);n&&(n.ops.length>0||n.unknown.length>0)&&(t.fx=n);let r=Ly(e.cuts);r&&(t.cuts=r);let i=Js(e.gain);i!=null&&i!==0&&(t.gain=Ki(i,Ay.min,Ay.max));let a=e.fadeIn==null?null:Qs(e.fadeIn);a!=null&&a>0&&(t.fadeIn=a);let o=e.fadeOut==null?null:Qs(e.fadeOut);o!=null&&o>0&&(t.fadeOut=o);let s=Py(e.crop);s&&(t.crop=s);let l=e.group?.trim();return l&&R5.test(l)&&(t.group=l),Object.keys(t).length>0?t:void 0}function pd(e){let t={};for(let{key:n}of Zs)e[n]!=null&&(t[n]=e[n]);return t}function hd(e,t){let n={};for(let{key:r}of Zs){let i=t[Iy(e,r)];i!=null&&(n[r]=i);}return n}function nl(e){let t=Math.max(0,e.clipStart??0),n=e.clipEnd??Number.POSITIVE_INFINITY;e.sourceDuration!=null&&Number.isFinite(e.sourceDuration)&&(n=Math.min(n,e.sourceDuration)),n=Math.max(t,n);let r=el(e.cuts??[],t,n),i=[],a=t;for(let f of r)f.start>a&&i.push({start:a,end:f.start}),a=Math.max(a,f.end);n>a&&i.push({start:a,end:n});let o=[],s=0;for(let f of i)o.push(s),s+=f.end-f.start;let l=s,c=f=>{for(let m=0;m<i.length;m++){let h=i[m];if(f>=h.start&&(f<h.end||m===i.length-1&&f===h.end))return o[m]+(f-h.start)}return null},d=f=>{if(i.length===0||f<=t)return 0;for(let m=0;m<i.length;m++){let h=i[m];if(f<h.start)return o[m];if(f<h.end)return o[m]+(f-h.start)}return l},u=f=>{if(i.length===0)return t;if(f<=0)return i[0].start;for(let m=0;m<i.length;m++){let h=i[m].end-i[m].start;if(f<o[m]+h)return i[m].start+(f-o[m])}return i[i.length-1].end};return {windowStart:t,windowEnd:n,cuts:r,hasCuts:r.length>0,playedDuration:l,keptRanges:()=>i.map(f=>({...f})),sourceToPlayed:c,snapSourceToPlayed:d,playedToSource:u}}function gd(e,t=[]){for(let n of e)t.push(n),n.children&&n.children.length>0&&gd(n.children,t);return t}function yd(e,t){return nl({clipStart:e.clipStart,clipEnd:e.clipEnd,cuts:e.edits?.cuts,sourceDuration:t})}function Ny(e){return e.clipEnd==null?null:e.edits?.cuts?.length?yd(e).playedDuration:Math.max(0,e.clipEnd-(e.clipStart??0))}function Dy(e,t){if(e.clipEnd!=null||e.lockToBlock===true)return null;let n=t?.intrinsicDuration?.(e);if(n==null||!Number.isFinite(n)||n<=0)return null;let r=e.edits?.cuts?.length?yd(e,n).playedDuration:n-(e.clipStart??0);return r>0?r:null}function Oy(e,t,n,r,i,a,o){let s=t.edits,l=s?.fx?o?.processedAudio?.(t):void 0,c={src:t.src,kind:t.kind,...t.placement?{placement:t.placement}:{},...t.pipSize?{pipSize:t.pipSize}:{},...t.pipShape?{pipShape:t.pipShape}:{},...t.pipPosition?{pipPosition:t.pipPosition}:{},...t.lockToBlock!=null?{lockToBlock:t.lockToBlock}:{},anchor:i,...a!==void 0?{blockId:a}:{},...t.sourceLine!=null?{sourceLine:t.sourceLine}:{},...s?.gain!=null?{gain:s.gain}:{},...t.kind==="video"&&s?.crop?{crop:s.crop}:{}};l&&t.kind==="audio"&&(c.src=l,c.originalSrc=t.src),l&&t.kind==="video"&&(c.audioMuted=true);let d=Math.max(n,r),u=[];if(!s?.cuts?.length)u.push({absoluteStart:n,absoluteEnd:d,sourceIn:t.clipStart??0});else {let m=0;for(let h of yd(t).keptRanges()){let y=n+m;if(y>=d)break;let g=Math.min(d,y+(h.end-h.start));u.push({absoluteStart:y,absoluteEnd:g,sourceIn:h.start}),m+=h.end-h.start;}u.length===0&&u.push({absoluteStart:n,absoluteEnd:n,sourceIn:t.clipStart??0});}let f=u.length;u.forEach((m,h)=>{let y={...c,id:f>1?`${t.id}#${h}`:t.id,...m,...h===0&&s?.fadeIn?{fadeIn:s.fadeIn}:{},...h===f-1&&s?.fadeOut?{fadeOut:s.fadeOut}:{},...f>1?{segment:{groupId:t.id,index:h,count:f}}:{}};e.push(y),l&&t.kind==="video"&&e.push(N5(y,t,l));});}function N5(e,t,n){let r={...e,id:`${e.id}~audio`,kind:"audio",src:n,originalSrc:t.src,derivedFrom:t.id};return delete r.crop,delete r.audioMuted,delete r.placement,delete r.pipSize,delete r.pipShape,delete r.pipPosition,e.segment&&(r.segment={...e.segment,groupId:`${t.id}~audio`}),r}function Fy(e){let t=gd(e.blocks).reduce((n,r)=>{let i=r.startTime+r.duration;return Number.isFinite(i)?Math.max(n,i):n},0);return Math.max(e.duration??0,t)}function Qi(e,t){let n=[],r=Fy(e);for(let i of gd(e.blocks)){let a=i.startTime+i.duration;for(let o of i.media??[]){let s=i.startTime+o.startAt,l=Ny(o),c;o.spillover?c=l!=null?s+l:a:c=l!=null?Math.min(s+l,a):a;let d=Dy(o,t);d!=null&&(c=Math.min(c,s+d)),Oy(n,o,s,c,"block",i.id,t);}}for(let i of e.documentMedia??[]){let a=i.startAt,o=Ny(i),s=o!=null?a+o:r,l=Dy(i,t);l!=null&&(s=Math.min(s,a+l)),Oy(n,i,a,s,"document",void 0,t);}return n}function rl(e,t){let n=Fy(e),r=Qi(e,t).reduce((i,a)=>Math.max(i,a.absoluteEnd),0);return Math.max(n,r)}var D5={standard:"clean",minimalist:"clean",documentary:"documentary",magazine:"editorial",bold:"brutalist","tech-dark":"terminal",cinematic:"cinematic","warm-earth":"organic","morning-light":"soft",gezellig:"soft"},O5={clean:{sectionSpacing:"comfortable",divider:"hairline",backgroundRhythm:"alternate",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"none"},quoteMark:"accent-bar",numeralStyle:"plain",accentStrategy:"cycle"},editorial:{sectionSpacing:"comfortable",divider:"double-rule",backgroundRhythm:"flat",heroStyle:"split",headingTreatment:{eyebrow:"kicker",scale:"display",underline:"none"},quoteMark:"oversized-glyph",numeralStyle:"oversized",accentStrategy:"alternate-two"},brutalist:{sectionSpacing:"compact",divider:"thick-rule",backgroundRhythm:"accent-bands",heroStyle:"oversized-type",headingTreatment:{eyebrow:"kicker",scale:"oversized",case:"uppercase"},quoteMark:"none",numeralStyle:"oversized",accentStrategy:"cycle"},terminal:{sectionSpacing:"compact",divider:"hairline",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"mono-tag",scale:"regular",underline:"none"},quoteMark:"none",numeralStyle:"mono",accentStrategy:"primary-only"},cinematic:{sectionSpacing:"generous",divider:"gap-only",backgroundRhythm:"flat",heroStyle:"full-bleed",headingTreatment:{eyebrow:"kicker",scale:"display",case:"uppercase"},quoteMark:"none",numeralStyle:"oversized",accentStrategy:"primary-only"},documentary:{sectionSpacing:"generous",divider:"thick-rule",backgroundRhythm:"flat",heroStyle:"letterbox",headingTreatment:{eyebrow:"numbered",scale:"display",underline:"none"},quoteMark:"accent-bar",numeralStyle:"boxed",accentStrategy:"primary-only"},organic:{sectionSpacing:"comfortable",divider:"thick-rule",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"accent-bar"},quoteMark:"oversized-glyph",numeralStyle:"boxed",accentStrategy:"alternate-two"},soft:{sectionSpacing:"comfortable",divider:"dotted",backgroundRhythm:"tinted-panels",heroStyle:"split",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"none"},quoteMark:"oversized-glyph",numeralStyle:"plain",accentStrategy:"alternate-two"}};function F5(e){let t=[...e.persistentLayers?.bottomLayers??[],...e.persistentLayers?.topLayers??[]];for(let n of t)if(typeof n=="object"&&n!==null&&"template"in n&&n.template==="patternBackground"){let i=n.config?.pattern;if(i==="dots"||i==="grid"||i==="diagonal"||i==="noise")return i}}function il(e){let t=D5[e.renderStyle?.name??""]??"clean",n=O5[t],r=e.style?.borderRadius??6,i=e.style?.imageTreatment?.type,a=i==="mono"||i==="duotone"?"letterboxed":r>0?"rounded":"flush",o={contentMaxWidth:760,wideMaxWidth:1100,sectionSpacing:n.sectionSpacing,cornerRadius:r,divider:n.divider,backgroundRhythm:n.backgroundRhythm,heroStyle:n.heroStyle,headingTreatment:{...n.headingTreatment},imageFraming:a,shadow:e.style?.textShadow?"soft":"none",quoteMark:n.quoteMark,numeralStyle:n.numeralStyle},s=F5(e);return s&&(o.pattern=s),{family:t,tokens:o,accentRotation:{strategy:n.accentStrategy}}}var By=.7,al=["cut","fade","dissolve","push","wipe","split","reveal","randomBars","shape","uncover","cover","zoom","pan","flash","fallOver","drape","curtains","wind","prestige","fracture","crush","peelOff","pageCurl","airplane","origami","checkerboard","blinds","clock","ripple","honeycomb","glitter","vortex","shred","switch","flip","gallery","cube","doors","box","ferrisWheel","conveyor","rotate","window","orbit","flyThrough","morph","checker","circle","comb","diamond","newsflash","plus","pull","random","randomBar","strips","wedge","wheel","prism","warp","ferris","flythrough","wheelReverse","pageCurlDouble","pageCurlSingle","slideLeft","slideRight","slideUp","slideDown"];var B5=new Set(al),$5={none:"cut",randombars:"randomBars",randombar:"randomBar",checkerboards:"checkerboard",shapes:"shape",ferris:"ferrisWheel",ferriswheel:"ferrisWheel",flythrough:"flyThrough",flythru:"flyThrough",pagecurl:"pageCurl",pagecurldouble:"pageCurlDouble",pagecurlsingle:"pageCurlSingle",wheelreverse:"wheelReverse",slideleft:"slideLeft",slideright:"slideRight",slideup:"slideUp",slidedown:"slideDown"},H5=new Map(al.map(e=>[kd(e),e]));function ol(e){return B5.has(e)}function bd(e){let t=e.trim();if(!t)return null;if(ol(t))return t;let n=kd(t);return $5[n]??H5.get(n)??null}function wd(e){switch(kd(e)){case "left":case "l":return "left";case "right":case "r":return "right";case "up":case "u":return "up";case "down":case "d":return "down";case "in":return "in";case "out":return "out";case "horizontal":case "horz":case "h":return "horizontal";case "vertical":case "vert":case "v":return "vertical";default:return null}}function Zi(e,t=By){let n=e?.duration;return n!=null&&Number.isFinite(n)&&n>0?n:t}function Ka(e,t,n){if(e.transition)return e.transition;if(n!==0)return t.renderStyle.defaultTransition}function kd(e){return e.toLowerCase().replace(/[\s_-]+/g,"")}var z5=["calm","documentary","vibrant"],Wy="squisq-motion",U5="cubic-bezier(0.34, 1.4, 0.64, 1)",j5="cubic-bezier(0.22, 1, 0.36, 1)",ni=Object.freeze({calm:Object.freeze({name:"calm",textEntrance:Object.freeze({type:"fadeIn",duration:1,delayScale:1}),chartGrowth:false,chartGrowthDuration:1,countUp:false,countUpDuration:1.5,diagramBuild:false,photoGridStagger:0,coverWordReveal:false}),documentary:Object.freeze({name:"documentary",textEntrance:Object.freeze({type:"fadeInUp",duration:.8,easing:j5,delayScale:1}),chartGrowth:true,chartGrowthDuration:1.1,countUp:true,countUpDuration:1.6,diagramBuild:true,photoGridStagger:.22,coverWordReveal:false}),vibrant:Object.freeze({name:"vibrant",textEntrance:Object.freeze({type:"fadeInUp",duration:.55,easing:U5,delayScale:.8}),chartGrowth:true,chartGrowthDuration:.9,countUp:true,countUpDuration:1.2,diagramBuild:true,photoGridStagger:.16,coverWordReveal:false})});function ri(e){return typeof e=="string"&&z5.includes(e)}function Vy(e,t="calm"){if(e==null)return ni[t];if(typeof e=="string")return ni[ri(e)?e:t];if(typeof e!="object")return ni[t];let n=e,r=ri(n.profile)?n.profile:ri(n.name)?n.name:t,i=ni[r],{profile:a,name:o,...s}=e,l={...i};for(let[c,d]of Object.entries(s))d!==void 0&&(c==="textEntrance"&&typeof d=="object"&&d!==null?l.textEntrance={...i.textEntrance,...d}:c in i&&typeof d==typeof i[c]&&(l[c]=d));return l}function ul(e){if(!e)return;let t=e[Wy]??e.motion;if(typeof t=="string"){let n=t.trim();return ri(n)?n:void 0}if(t&&typeof t=="object"&&!Array.isArray(t))return t}function Ji(e,t,n){let r=t?.renderStyle.motionProfile,i=ri(r)?r:"calm",a=n??e?.motion??ul(e?.frontmatter);return Vy(a,i)}var Ze={landscape:{width:1920,height:1080,name:"16:9 Landscape"},portrait:{width:1080,height:1920,name:"9:16 Portrait"},square:{width:1080,height:1080,name:"1:1 Square"}};var W5=Math.sqrt(1920*1920+1080*1080);function Qa(e){return Math.sqrt(e.width*e.width+e.height*e.height)/W5}function Bn(e){let t=e.width/e.height;return Math.abs(t-1)<.05?"square":t>1?"landscape":"portrait"}var V5={landscape:{primaryY:"35%",secondaryY:"55%",tertiaryY:"75%",titleScale:1,bodyScale:1,columnLeftX:"25%",columnRightX:"75%",columnTopY:"35%",columnBottomY:"65%",stackColumns:false,maxTextWidth:"80%",horizontalPadding:"10%",captionY:"85%",captionScale:1},portrait:{primaryY:"25%",secondaryY:"42%",tertiaryY:"58%",titleScale:.7,bodyScale:1.5,columnLeftX:"50%",columnRightX:"50%",columnTopY:"30%",columnBottomY:"55%",stackColumns:true,maxTextWidth:"90%",horizontalPadding:"5%",captionY:"75%",captionScale:.85},square:{primaryY:"30%",secondaryY:"50%",tertiaryY:"70%",titleScale:.85,bodyScale:.9,columnLeftX:"25%",columnRightX:"75%",columnTopY:"35%",columnBottomY:"65%",stackColumns:false,maxTextWidth:"85%",horizontalPadding:"7.5%",captionY:"82%",captionScale:.9}};function Za(e){return V5[e]}function Gy(e,t,n,r=false){let i=Qa(t),a=Za(n),o=r?a.titleScale:a.bodyScale;return Math.round(e*i*o)}function dl(e){let t=Za(e);return t.stackColumns?{left:{x:"50%",y:t.columnTopY},right:{x:"50%",y:t.columnBottomY}}:{left:{x:t.columnLeftX,y:"50%"},right:{x:t.columnRightX,y:"50%"}}}var Ja='system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';function tn(e){return "template"in e&&typeof e.template=="string"}function _n(e,t,n,r=Ze.landscape,i={}){let a=Bn(r),o=e.renderStyle.layoutOverrides,s=Za(a);return {theme:e,blockIndex:t,totalBlocks:n,viewport:r,fontScale:Qa(r),orientation:a,layout:o?{...s,...o}:s,motion:Ji(null,e,i.motion)}}function ml(e,t,n=false){return Gy(e,t.viewport,t.orientation,n)}function Ed(e){return "template"in e&&typeof e.template=="string"}var G5=new Set(["image","text","shape","path","map","video","table","tree","mermaid"]),Y5=new Set(["none","fadeIn","fadeOut","slowZoom","zoomIn","zoomOut","panLeft","panRight","typewriter","fadeInUp","slideIn","wordReveal","countUp","drawOn","grow","reveal","drift","tween"]),X5=["center","left","right","top","bottom"],K5=class{constructor(){this.errors=[];}error(e,t){this.errors.push({path:e,message:t});}object(e,t){return !e||typeof e!="object"||Array.isArray(e)?(this.error(t,"expected object"),false):true}string(e,t,n=false){return typeof e!="string"||n&&e.trim().length===0?(this.error(t,n?"expected non-empty string":"expected string"),false):true}number(e,t){return typeof e!="number"||!Number.isFinite(e)?(this.error(t,"expected finite number"),false):true}boolean(e,t){return typeof e!="boolean"?(this.error(t,"expected boolean"),false):true}enum(e,t,n){return typeof e!="string"||!n.has(e)?(this.error(t,`expected one of: ${Array.from(n).join(", ")}`),false):true}};function ze(e,t,n,r){t[n]!==void 0&&e.string(t[n],`${r}.${n}`);}function Ve(e,t,n,r){t[n]!==void 0&&e.number(t[n],`${r}.${n}`);}function fl(e,t,n,r){t[n]!==void 0&&e.boolean(t[n],`${r}.${n}`);}function vt(e,t,n,r,i){t[n]!==void 0&&e.enum(t[n],`${r}.${n}`,new Set(i));}function Q5(e,t,n){if(e.object(t,n)){for(let r of ["x","y"])$y(e,t[r],`${n}.${r}`);for(let r of ["width","height"])t[r]!==void 0&&$y(e,t[r],`${n}.${r}`);vt(e,t,"anchor",n,["center","top-left","top-right","bottom-left","bottom-right"]);}}function $y(e,t,n){typeof t=="number"&&Number.isFinite(t)||typeof t=="string"&&Number.isFinite(Number.parseFloat(t))||e.error(n,"expected finite number or numeric string");}function Z5(e,t,n){if(!e.object(t,n))return;e.enum(t.type,`${n}.type`,Y5),Ve(e,t,"duration",n),Ve(e,t,"delay",n),ze(e,t,"easing",n),vt(e,t,"direction",n,["in","out"]),vt(e,t,"panDirection",n,["left","right","up","down"]),vt(e,t,"origin",n,X5),vt(e,t,"shape",n,["wipe","iris"]),Ve(e,t,"stagger",n),t.wordTimes!==void 0&&(!Array.isArray(t.wordTimes)||t.wordTimes.some(i=>typeof i!="number"))&&e.error(`${n}.wordTimes`,"expected array of numbers");let r=t.count;r!==void 0&&e.object(r,`${n}.count`)&&(typeof r.to!="number"&&e.error(`${n}.count.to`,"expected number"),Ve(e,r,"from",`${n}.count`),Ve(e,r,"decimals",`${n}.count`),ze(e,r,"prefix",`${n}.count`),ze(e,r,"suffix",`${n}.count`));for(let i of ["fromState","toState"]){let a=t[i];if(a!==void 0&&e.object(a,`${n}.${i}`))for(let o of ["scale","x","y","opacity","rotate"])Ve(e,a,o,`${n}.${i}`);}}function J5(e,t,n){e.object(t,n)&&(e.enum(t.source,`${n}.source`,new Set(["images","children","listItems"])),vt(e,t,"direction",n,["row","column"]),Ve(e,t,"gap",n),t.max!==void 0&&e.number(t.max,`${n}.max`)&&(!Number.isInteger(t.max)||t.max<0)&&e.error(`${n}.max`,"expected non-negative integer"));}function Sd(e,t,n){e.object(t,n)&&(e.string(t.from,`${n}.from`),e.string(t.to,`${n}.to`),Ve(e,t,"angle",n));}function e_(e,t,n){e.object(t,n)&&(e.number(t.fontSize,`${n}.fontSize`),e.string(t.color,`${n}.color`),ze(e,t,"fontFamily",n),vt(e,t,"fontWeight",n,["normal","bold"]),vt(e,t,"fontStyle",n,["normal","italic"]),vt(e,t,"textAlign",n,["left","center","right"]),vt(e,t,"verticalAlign",n,["top","middle","bottom"]),Ve(e,t,"lineHeight",n),fl(e,t,"shadow",n),ze(e,t,"background",n),Ve(e,t,"backgroundOpacity",n),t.backgroundGradient!==void 0&&Sd(e,t.backgroundGradient,`${n}.backgroundGradient`),ze(e,t,"borderColor",n),Ve(e,t,"borderWidth",n),vt(e,t,"borderStyle",n,["solid","dashed","dotted"]),Ve(e,t,"padding",n),Ve(e,t,"maxLines",n));}function t_(e,t,n){if(e.object(t,n)&&(e.string(t.src,`${n}.src`),e.string(t.alt,`${n}.alt`),vt(e,t,"fit",n,["cover","contain","fill"]),ze(e,t,"credit",n),ze(e,t,"license",n),Ve(e,t,"blur",n),t.treatment!==void 0)){let r=`${n}.treatment`;e.object(t.treatment,r)&&(e.enum(t.treatment.type,`${r}.type`,new Set(["none","mono","duotone","warm","cool"])),Ve(e,t.treatment,"strength",r),ze(e,t.treatment,"color",r));}}function n_(e,t,n){if(e.object(t,n)){if(e.enum(t.shape,`${n}.shape`,new Set(["rect","circle","line"])),ze(e,t,"fill",n),Ve(e,t,"fillOpacity",n),t.gradient!==void 0&&Sd(e,t.gradient,`${n}.gradient`),ze(e,t,"stroke",n),Ve(e,t,"strokeWidth",n),vt(e,t,"borderStyle",n,["solid","dashed","dotted"]),Ve(e,t,"borderRadius",n),t.pattern!==void 0){let r=`${n}.pattern`;e.object(t.pattern,r)&&(e.enum(t.pattern.kind,`${r}.kind`,new Set(["dots","grid","diagonal"])),e.string(t.pattern.color,`${r}.color`),Ve(e,t.pattern,"size",r),Ve(e,t.pattern,"opacity",r));}if(t.filter!==void 0){let r=`${n}.filter`;e.object(t.filter,r)&&(e.enum(t.filter.type,`${r}.type`,new Set(["noise"])),Ve(e,t.filter,"baseFrequency",r),Ve(e,t.filter,"opacity",r));}}}function r_(e,t,n){if(!e.object(t,n))return;e.string(t.d,`${n}.d`),ze(e,t,"shapeKind",n),ze(e,t,"stroke",n),Ve(e,t,"strokeWidth",n),ze(e,t,"fill",n),Ve(e,t,"fillOpacity",n),t.gradient!==void 0&&Sd(e,t.gradient,`${n}.gradient`),vt(e,t,"borderStyle",n,["solid","dashed","dotted"]),ze(e,t,"dasharray",n);let r=["none","arrow","open","diamond","circle","square"];vt(e,t,"startMarker",n,r),vt(e,t,"endMarker",n,r);}function i_(e,t,n){e.object(t,n)&&(e.object(t.center,`${n}.center`)&&(e.number(t.center.lat,`${n}.center.lat`),e.number(t.center.lng,`${n}.center.lng`)),e.number(t.zoom,`${n}.zoom`),e.enum(t.style,`${n}.style`,new Set(["terrain","satellite","road","toner","watercolor"])),ze(e,t,"staticSrc",n),fl(e,t,"showAttribution",n),t.markers!==void 0&&(Array.isArray(t.markers)?t.markers.forEach((r,i)=>{let a=`${n}.markers[${i}]`;e.object(r,a)&&(e.number(r.lat,`${a}.lat`),e.number(r.lng,`${a}.lng`),ze(e,r,"label",a),ze(e,r,"color",a),vt(e,r,"icon",a,["pin","circle","star"]));}):e.error(`${n}.markers`,"expected array")));}function a_(e,t,n){e.object(t,n)&&(e.string(t.src,`${n}.src`),e.string(t.alt,`${n}.alt`),e.number(t.clipStart,`${n}.clipStart`),e.number(t.clipEnd,`${n}.clipEnd`),ze(e,t,"posterSrc",n),vt(e,t,"fit",n,["cover","contain","fill"]),Ve(e,t,"sourceDuration",n),Ve(e,t,"startAt",n),fl(e,t,"spillover",n),ze(e,t,"credit",n),ze(e,t,"license",n));}function o_(e,t,n){if(e.object(t,n)){if(Hy(e,t.headers,`${n}.headers`),Array.isArray(t.rows)?t.rows.forEach((r,i)=>Hy(e,r,`${n}.rows[${i}]`)):e.error(`${n}.rows`,"expected array"),Ve(e,t,"maxVisibleRows",n),t.align!==void 0)if(!Array.isArray(t.align))e.error(`${n}.align`,"expected array");else {let r=new Set(["left","right","center"]);t.align.forEach((i,a)=>{i!==null&&e.enum(i,`${n}.align[${a}]`,r);});}if(e.object(t.style,`${n}.style`)){for(let r of ["headerBackground","headerColor","cellBackground","cellColor","borderColor"])e.string(t.style[r],`${n}.style.${r}`);e.number(t.style.fontSize,`${n}.style.fontSize`),ze(e,t.style,"fontFamily",`${n}.style`),ze(e,t.style,"headerFontFamily",`${n}.style`),Ve(e,t.style,"borderRadius",`${n}.style`);}}}function Hy(e,t,n){if(!Array.isArray(t)){e.error(n,"expected string array");return}t.forEach((r,i)=>e.string(r,`${n}[${i}]`));}function s_(e,t,n){if(e.object(t,n)&&(Array.isArray(t.items)?t.items.forEach((r,i)=>Yy(e,r,`${n}.items[${i}]`,0)):e.error(`${n}.items`,"expected array"),e.object(t.style,`${n}.style`))){for(let r of ["rowColor","dirColor","connectorColor","iconColor","commentColor"])e.string(t.style[r],`${n}.style.${r}`);e.number(t.style.fontSize,`${n}.style.fontSize`),e.number(t.style.indentPx,`${n}.style.indentPx`),ze(e,t.style,"fontFamily",`${n}.style`),ze(e,t.style,"monoFontFamily",`${n}.style`),ze(e,t.style,"folderIcon",`${n}.style`),ze(e,t.style,"fileIcon",`${n}.style`);}}function Yy(e,t,n,r){if(r>100){e.error(n,"tree nesting exceeds 100 levels");return}e.object(t,n)&&(e.string(t.id,`${n}.id`),e.string(t.label,`${n}.label`),fl(e,t,"isDir",n),ze(e,t,"comment",n),Array.isArray(t.children)?t.children.forEach((i,a)=>Yy(e,i,`${n}.children[${a}]`,r+1)):e.error(`${n}.children`,"expected array"));}function l_(e,t,n){e.object(t,n)&&(e.string(t.source,`${n}.source`),ze(e,t,"background",n),ze(e,t,"foreground",n),Ve(e,t,"padding",n));}function c_(e,t,n){if(!e.object(t,n)||(e.string(t.id,`${n}.id`,true),Q5(e,t.position,`${n}.position`),t.animation!==void 0&&Z5(e,t.animation,`${n}.animation`),t.repeat!==void 0&&J5(e,t.repeat,`${n}.repeat`),!e.enum(t.type,`${n}.type`,G5)))return;let r=`${n}.content`;switch(t.type){case "image":t_(e,t.content,r);break;case "text":e.object(t.content,r)&&(e.string(t.content.text,`${r}.text`),ze(e,t.content,"html",r),e_(e,t.content.style,`${r}.style`));break;case "shape":n_(e,t.content,r);break;case "path":r_(e,t.content,r);break;case "map":i_(e,t.content,r);break;case "video":a_(e,t.content,r);break;case "table":o_(e,t.content,r);break;case "tree":s_(e,t.content,r);break;case "mermaid":l_(e,t.content,r);break}}function _d(e){let t=new K5;if(!t.object(e,"$"))return {valid:false,errors:t.errors};if(t.string(e.name,"$.name",true),t.string(e.label,"$.label",true),e.description!==void 0&&t.string(e.description,"$.description"),t.object(e.viewport,"$.viewport")&&(t.number(e.viewport.width,"$.viewport.width")&&e.viewport.width<=0&&t.error("$.viewport.width","expected number greater than zero"),t.number(e.viewport.height,"$.viewport.height")&&e.viewport.height<=0&&t.error("$.viewport.height","expected number greater than zero")),!Array.isArray(e.layers))t.error("$.layers","expected array");else {let n=new Set;e.layers.forEach((r,i)=>{if(c_(t,r,`$.layers[${i}]`),r&&typeof r=="object"&&!Array.isArray(r)){let a=r.id;typeof a=="string"&&(n.has(a)&&t.error(`$.layers[${i}].id`,`duplicate layer id "${a}"`),n.add(a));}});}return t.errors.length>0?{valid:false,errors:t.errors}:{valid:true,errors:[],template:e}}var eo="squisq-custom-templates",ll="1",Xy=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Ad(e){return Xy.test(e)}function pl(e){if(!Xy.test(e))return null;let t=e.slice(1);return t.length===3&&(t=t.split("").map(n=>n+n).join("")),[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255]}function u_(e){let t=n=>Math.max(0,Math.min(255,Math.round(n*255))).toString(16).padStart(2,"0");return "#"+t(e[0])+t(e[1])+t(e[2])}function sl(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function xd(e){return e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055}function d_(e){let[t,n,r]=e,i=sl(t),a=sl(n),o=sl(r),s=.4122214708*i+.5363325363*a+.0514459929*o,l=.2119034982*i+.6806995451*a+.1073969566*o,c=.0883024619*i+.2817188376*a+.6299787005*o,d=Math.cbrt(s),u=Math.cbrt(l),f=Math.cbrt(c),m=.2104542553*d+.793617785*u-.0040720468*f,h=1.9779984951*d-2.428592205*u+.4505937099*f,y=.0259040371*d+.7827717662*u-.808675766*f,g=Math.sqrt(h*h+y*y),w=Math.atan2(y,h)*180/Math.PI;return w<0&&(w+=360),{L:m,C:g,h:w}}function m_({L:e,C:t,h:n}){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,l=e-.0894841775*i-1.291485548*a,c=o*o*o,d=s*s*s,u=l*l*l,f=4.0767416621*c-3.3077115913*d+.2309699292*u,m=-1.2684380046*c+2.6097574011*d-.3413193965*u,h=-0.0041960863*c-.7034186147*d+1.707614701*u;return [Math.max(0,Math.min(1,xd(f))),Math.max(0,Math.min(1,xd(m))),Math.max(0,Math.min(1,xd(h)))]}function to(e,t){let n=pl(e);if(!n)return e;let r=d_(n);return r.L=Math.max(0,Math.min(1,r.L+t)),u_(m_(r))}function or(e,t){return to(e,-t)}function Fn(e){let t=pl(e);if(!t)return 0;let[n,r,i]=t.map(sl);return .2126*n+.7152*r+.0722*i}function Cd(e){let t=pl(e);if(!t)return 0;let[n,r,i]=t,a=Math.max(n,r,i),o=Math.min(n,r,i);if(a===o)return 0;let s=a-o,l;return a===n?l=(r-i)/s%6:a===r?l=(i-n)/s+2:l=(n-r)/s+4,Math.round((l*60+360)%360)}function le(e,t){let n=pl(e);if(!n)return e;let r=Math.max(0,Math.min(1,t)),i=a=>Math.round(a*255);return `rgba(${i(n[0])}, ${i(n[1])}, ${i(n[2])}, ${r})`}function vd(e,t){let n=Fn(e),r=Fn(t),i=Math.max(n,r),a=Math.min(n,r);return (i+.05)/(a+.05)}function ii(e,t="#f7fafc",n="#1a202c"){return vd(e,n)>=vd(e,t)?n:t}var Id=["hero","banner","stat-band","quote-band","feature-split","media-figure","gallery","callout","card-grid","item-list","timeline-rail","table-section","canvas-embed","prose","footer"];var Md=["clean","editorial","brutalist","terminal","cinematic","documentary","organic","soft"],Ky=["compact","comfortable","generous"],Qy=["none","gap-only","hairline","thick-rule","double-rule","dotted"],Zy=["flat","alternate","accent-bands","tinted-panels"],Jy=["stacked","split","full-bleed","letterbox","oversized-type"],e0=["none","kicker","numbered","mono-tag"],t0=["regular","display","oversized"],n0=["none","uppercase"],r0=["none","accent-bar","full-rule"],i0=["flush","rounded","bordered","polaroid","letterboxed","circle-accent"],a0=["none","soft","crisp","heavy"],o0=["none","oversized-glyph","accent-bar"],s0=["plain","oversized","boxed","mono"],Td=["none","dots","grid","diagonal","noise"],qd=["lead","strong","standard","quiet"],Ld=["base","alternate","accent","media"],Pd=["primary-only","cycle","alternate-two","none"],f_=new Set(["serif","sans-serif","monospace","system-ui"]),zy=new Set(Id),p_=new Set(Md),h_=new Set(qd),g_=new Set(Ld),y_=new Set(Pd),b_={sectionSpacing:new Set(Ky),divider:new Set(Qy),backgroundRhythm:new Set(Zy),heroStyle:new Set(Jy),imageFraming:new Set(i0),shadow:new Set(a0),quoteMark:new Set(o0),numeralStyle:new Set(s0)},w_={eyebrow:{values:new Set(e0),required:true},scale:{values:new Set(t0),required:true},case:{values:new Set(n0),required:false},underline:{values:new Set(r0),required:false}},k_=new Set(["normal","bold"]),Uy=new Set(["dark-vignette","radial-dark","warm-sunset","cool-blue","earth-tones"]),x_=class{constructor(){this.errors=[];}err(e,t){this.errors.push({path:e,message:t});}isObject(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}isString(e){return typeof e=="string"}isNumber(e){return typeof e=="number"&&Number.isFinite(e)}isBoolean(e){return typeof e=="boolean"}hex(e,t){this.isString(t)?Ad(t)||this.err(e,`expected #rgb or #rrggbb hex color, got "${t}"`):this.err(e,`expected hex color string, got ${typeof t}`);}palette(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}let n=["primary","secondary","background","backgroundLight","text","textMuted","highlight","warning"];for(let r of n)this.hex(`${e}.${r}`,t[r]);}colorScheme(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}this.hex(`${e}.bg`,t.bg),this.hex(`${e}.text`,t.text),this.hex(`${e}.accent`,t.accent);}colorSchemes(e,t){if(!this.isObject(t)){this.err(e,"expected object map");return}for(let n of Object.keys(t))this.colorScheme(`${e}.${n}`,t[n]);}fontFamily(e,t){if(!this.isObject(t)){this.err(e,"expected FontFamily object ({ stackId } or { custom })");return}if("stackId"in t){(!this.isString(t.stackId)||t.stackId.length===0)&&this.err(`${e}.stackId`,"expected non-empty string");return}if("custom"in t){let n=t.custom;if(!this.isObject(n)){this.err(`${e}.custom`,"expected { name, fallback } object");return}!this.isString(n.name)||n.name.length===0?this.err(`${e}.custom.name`,"expected non-empty string"):(/[<>{};]/.test(n.name)||[...n.name].some(r=>{let i=r.codePointAt(0);return i<32||i===127}))&&this.err(`${e}.custom.name`,"font name contains control characters or CSS/HTML delimiters"),(!this.isString(n.fallback)||!f_.has(n.fallback))&&this.err(`${e}.custom.fallback`,"expected one of: serif, sans-serif, monospace, system-ui");return}this.err(e,"expected { stackId } or { custom: { name, fallback } }");}typography(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}this.fontFamily(`${e}.bodyFont`,t.bodyFont),this.fontFamily(`${e}.titleFont`,t.titleFont),t.monoFont!==void 0&&this.fontFamily(`${e}.monoFont`,t.monoFont);for(let n of ["titleScale","bodyScale","lineHeight","titleLineHeight"])t[n]!==void 0&&!this.isNumber(t[n])&&this.err(`${e}.${n}`,`expected number, got ${typeof t[n]}`);t.titleWeight!==void 0&&(!this.isString(t.titleWeight)||!k_.has(t.titleWeight))&&this.err(`${e}.titleWeight`,'expected "normal" or "bold"');}style(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.borderRadius!==void 0&&!this.isNumber(t.borderRadius)&&this.err(`${e}.borderRadius`,"expected number"),t.textShadow!==void 0&&!this.isBoolean(t.textShadow)&&this.err(`${e}.textShadow`,"expected boolean");for(let n of ["overlayOpacity","animationSpeed"])t[n]!==void 0&&!this.isNumber(t[n])&&this.err(`${e}.${n}`,"expected number");t.blockPadding!==void 0&&!this.isString(t.blockPadding)&&this.err(`${e}.blockPadding`,'expected string (percentage e.g. "5%")'),t.imageTreatment!==void 0&&this.imageTreatment(`${e}.imageTreatment`,t.imageTreatment),t.pip!==void 0&&this.pip(`${e}.pip`,t.pip);}pip(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.cornerRadius!==void 0&&!this.isNumber(t.cornerRadius)&&!this.isString(t.cornerRadius)&&this.err(`${e}.cornerRadius`,"expected number or string"),t.border!==void 0&&t.border!=="none"&&!this.isObject(t.border)&&this.err(`${e}.border`,"expected 'none' or { width?, color? }"),t.shadow!==void 0&&!this.isBoolean(t.shadow)&&!this.isString(t.shadow)&&this.err(`${e}.shadow`,"expected boolean or string");}imageTreatment(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}let n=["none","mono","duotone","warm","cool"];(!this.isString(t.type)||!n.includes(t.type))&&this.err(`${e}.type`,`expected one of ${n.join("|")}`),t.strength!==void 0&&!this.isNumber(t.strength)&&this.err(`${e}.strength`,"expected number (0..1)"),t.color!==void 0&&this.hex(`${e}.color`,t.color);}renderStyle(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}(!this.isString(t.name)||t.name.length===0)&&this.err(`${e}.name`,"expected non-empty string"),t.ambientMotion!==void 0&&!this.isBoolean(t.ambientMotion)&&this.err(`${e}.ambientMotion`,"expected boolean"),t.motionProfile!==void 0&&!ri(t.motionProfile)&&this.err(`${e}.motionProfile`,"expected calm | documentary | vibrant");for(let n of ["defaultTextAnimation","defaultImageAnimation"])t[n]!==void 0&&!this.isString(t[n])&&this.err(`${e}.${n}`,"expected animation type string");if(t.defaultTransition!==void 0){let n=t.defaultTransition;this.isObject(n)?((!this.isString(n.type)||!ol(n.type))&&this.err(`${e}.defaultTransition.type`,"expected valid transition type"),n.duration!==void 0&&!this.isNumber(n.duration)&&this.err(`${e}.defaultTransition.duration`,"expected number")):this.err(`${e}.defaultTransition`,"expected object");}if(t.layoutOverrides!==void 0&&!this.isObject(t.layoutOverrides)&&this.err(`${e}.layoutOverrides`,"expected object"),t.templateHints!==void 0)if(!this.isObject(t.templateHints))this.err(`${e}.templateHints`,"expected object map");else for(let n of Object.keys(t.templateHints)){let r=t.templateHints[n];if(!this.isObject(r)){this.err(`${e}.templateHints.${n}`,"expected object");continue}for(let i of Object.keys(r)){let o=typeof r[i];o!=="string"&&o!=="number"&&o!=="boolean"&&this.err(`${e}.templateHints.${n}.${i}`,`expected string|number|boolean, got ${o}`);}}}seedColors(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.primary===void 0?this.err(`${e}.primary`,"required when seedColors is present"):this.hex(`${e}.primary`,t.primary);for(let n of ["secondary","accent","background","text"])t[n]!==void 0&&this.hex(`${e}.${n}`,t[n]);}persistentLayer(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}if("template"in t){if(!this.isString(t.template)){this.err(`${e}.template`,"expected string");return}let n=t.config;if(!this.isObject(n)){this.err(`${e}.config`,"expected object");return}if(n.type!==t.template&&this.err(`${e}.config.type`,`expected "${t.template}", got "${String(n.type)}"`),t.template==="gradientBackground"&&n.preset!==void 0&&(!this.isString(n.preset)||!Uy.has(n.preset))&&this.err(`${e}.config.preset`,`expected one of: ${Array.from(Uy).join(", ")}`),t.template==="gradientBackground"&&"gradient"in n&&this.err(`${e}.config.gradient`,"raw CSS gradient strings are not allowed in Theme JSON; use a `preset`"),t.template==="patternBackground"){let r=["dots","grid","diagonal","noise"];(!this.isString(n.pattern)||!r.includes(n.pattern))&&this.err(`${e}.config.pattern`,`expected one of ${r.join("|")}`);for(let i of ["opacity","scale"])n[i]!==void 0&&!this.isNumber(n[i])&&this.err(`${e}.config.${i}`,"expected number");n.color!==void 0&&this.hex(`${e}.config.color`,n.color);}if(t.template==="vignette"&&(n.strength!==void 0&&!this.isNumber(n.strength)&&this.err(`${e}.config.strength`,"expected number (0..1)"),n.color!==void 0&&this.hex(`${e}.config.color`,n.color)),t.template==="ambientGradient"){n.duration!==void 0&&!this.isNumber(n.duration)&&this.err(`${e}.config.duration`,"expected number (seconds)");for(let r of ["from","to"])n[r]!==void 0&&this.hex(`${e}.config.${r}`,n[r]);}}}persistentLayers(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}for(let n of ["bottomLayers","topLayers"]){let r=t[n];if(r!==void 0){if(!Array.isArray(r)){this.err(`${e}.${n}`,"expected array");continue}r.forEach((i,a)=>this.persistentLayer(`${e}.${n}[${a}]`,i));}}}scalarHints(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}for(let n of Object.keys(t)){let r=typeof t[n];r!=="string"&&r!=="number"&&r!=="boolean"&&this.err(`${e}.${n}`,`expected string|number|boolean, got ${r}`);}}pageSectionOverride(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.kind!==void 0&&(!this.isString(t.kind)||!zy.has(t.kind))&&this.err(`${e}.kind`,`expected one of: ${Id.join(", ")}`),t.variant!==void 0&&!this.isString(t.variant)&&this.err(`${e}.variant`,"expected string"),t.emphasis!==void 0&&(!this.isString(t.emphasis)||!h_.has(t.emphasis))&&this.err(`${e}.emphasis`,`expected one of: ${qd.join(", ")}`),t.background!==void 0&&(!this.isString(t.background)||!g_.has(t.background))&&this.err(`${e}.background`,`expected one of: ${Ld.join(", ")}`),t.hints!==void 0&&this.scalarHints(`${e}.hints`,t.hints);}pageTokens(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}for(let r of ["contentMaxWidth","wideMaxWidth","cornerRadius"])this.isNumber(t[r])||this.err(`${e}.${r}`,"expected number");for(let[r,i]of Object.entries(b_))(!this.isString(t[r])||!i.has(t[r]))&&this.err(`${e}.${r}`,`expected one of: ${Array.from(i).join(", ")}`);t.pattern!==void 0&&(!this.isString(t.pattern)||!Td.includes(t.pattern))&&this.err(`${e}.pattern`,`expected one of: ${Td.join(", ")}`);let n=t.headingTreatment;if(!this.isObject(n)){this.err(`${e}.headingTreatment`,"expected object");return}for(let[r,i]of Object.entries(w_)){let a=n[r];if(a===void 0){i.required&&this.err(`${e}.headingTreatment.${r}`,"required");continue}(!this.isString(a)||!i.values.has(a))&&this.err(`${e}.headingTreatment.${r}`,`expected one of: ${Array.from(i.values).join(", ")}`);}}pageStyle(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}if((!this.isString(t.family)||!p_.has(t.family))&&this.err(`${e}.family`,`expected one of: ${Md.join(", ")}`),t.tokens===void 0?this.err(`${e}.tokens`,"required"):this.pageTokens(`${e}.tokens`,t.tokens),t.sections!==void 0)if(!this.isObject(t.sections))this.err(`${e}.sections`,"expected object map");else for(let n of Object.keys(t.sections)){if(!zy.has(n)){this.err(`${e}.sections.${n}`,"unknown section kind");continue}this.pageSectionOverride(`${e}.sections.${n}`,t.sections[n]);}if(t.templates!==void 0)if(!this.isObject(t.templates))this.err(`${e}.templates`,"expected object map");else for(let n of Object.keys(t.templates))this.pageSectionOverride(`${e}.templates.${n}`,t.templates[n]);if(t.accentRotation===void 0)this.err(`${e}.accentRotation`,"required");else if(!this.isObject(t.accentRotation))this.err(`${e}.accentRotation`,"expected object");else {let n=t.accentRotation;(!this.isString(n.strategy)||!y_.has(n.strategy))&&this.err(`${e}.accentRotation.strategy`,`expected one of: ${Pd.join(", ")}`),n.schemes!==void 0&&(!Array.isArray(n.schemes)||n.schemes.some(r=>typeof r!="string"))&&this.err(`${e}.accentRotation.schemes`,"expected array of strings");}}};function hl(e){let t=new x_;return t.isObject(e)?(e.schemaVersion!==ll&&t.err("schemaVersion",`expected "${ll}", got "${String(e.schemaVersion)}"`),(!t.isString(e.id)||e.id.length===0)&&t.err("id","expected non-empty string"),(!t.isString(e.name)||e.name.length===0)&&t.err("name","expected non-empty string"),e.description!==void 0&&!t.isString(e.description)&&t.err("description","expected string"),e.basedOn!==void 0&&!t.isString(e.basedOn)&&t.err("basedOn","expected string"),e.seedColors!==void 0&&t.seedColors("seedColors",e.seedColors),e.colors===void 0?t.err("colors","required"):t.palette("colors",e.colors),e.typography===void 0?t.err("typography","required"):t.typography("typography",e.typography),e.style===void 0?t.err("style","required"):t.style("style",e.style),e.renderStyle===void 0?t.err("renderStyle","required"):t.renderStyle("renderStyle",e.renderStyle),e.colorSchemes===void 0?t.err("colorSchemes","required"):t.colorSchemes("colorSchemes",e.colorSchemes),e.persistentLayers!==void 0&&t.persistentLayers("persistentLayers",e.persistentLayers),e.pageStyle!==void 0&&t.pageStyle("pageStyle",e.pageStyle),t.errors.length===0?{valid:true,errors:[],theme:e}:{valid:false,errors:t.errors}):{valid:false,errors:[{path:"",message:"expected object"}]}}function dn(e,t="theme"){let n=hl(e);if(!n.valid||!n.theme){let r=n.errors.slice(0,5).map(a=>` ${a.path||"<root>"}: ${a.message}`).join(`
|
|
1
|
+
var SquisqPlayer=(function(exports){'use strict';var s5=Object.create;var Ku=Object.defineProperty;var l5=Object.getOwnPropertyDescriptor;var c5=Object.getOwnPropertyNames;var u5=Object.getPrototypeOf,d5=Object.prototype.hasOwnProperty;var m5=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var Ng=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Qu=(e,t)=>{for(var n in t)Ku(e,n,{get:t[n],enumerable:true});},f5=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of c5(t))!d5.call(e,i)&&i!==n&&Ku(e,i,{get:()=>t[i],enumerable:!(r=l5(t,i))||r.enumerable});return e};var Dg=(e,t,n)=>(n=e!=null?s5(u5(e)):{},f5(Ku(n,"default",{value:e,enumerable:true}),e));var iw=Ng((WW,rw)=>{"use strict";var Xl=Object.prototype.hasOwnProperty,nw=Object.prototype.toString,Kb=Object.defineProperty,Qb=Object.getOwnPropertyDescriptor,Zb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):nw.call(t)==="[object Array]"},Jb=function(t){if(!t||nw.call(t)!=="[object Object]")return !1;var n=Xl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Xl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return !1;var i;for(i in t);return typeof i>"u"||Xl.call(t,i)},ew=function(t,n){Kb&&n.name==="__proto__"?Kb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue;},tw=function(t,n){if(n==="__proto__")if(Xl.call(t,n)){if(Qb)return Qb(t,n).value}else return;return t[n]};rw.exports=function e(){var t,n,r,i,a,o,s=arguments[0],l=1,c=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=tw(s,n),i=tw(t,n),s!==i&&(d&&i&&(Jb(i)||(a=Zb(i)))?(a?(a=!1,o=r&&Zb(r)?r:[]):o=r&&Jb(r)?r:{},ew(s,{name:n,newValue:e(d,o,i)})):typeof i<"u"&&ew(s,{name:n,newValue:i}));return s};});var Wk=Ng((ite,Kf)=>{"use strict";(function(){var e;typeof Kf<"u"?e=Kf.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=n,typeof console<"u"&&typeof console.log=="function"&&(e.printf=t);function t(){console.log(r.apply(null,arguments));}function n(i,a){return r.apply(null,[i].concat(a))}function r(i){for(var a=1,o=[].slice.call(arguments),s=0,l=i.length,c="",d,u=!1,f,m,h=!1,y,g=function(){return o[a++]},w=function(){for(var x="";/\d/.test(i[s]);)x+=i[s++],d=i[s];return x.length>0?parseInt(x):null};s<l;++s)if(d=i[s],u)switch(u=!1,d=="."?(h=!1,d=i[++s]):d=="0"&&i[s+1]=="."?(h=!0,s+=2,d=i[s]):h=!0,y=w(),d){case "b":c+=parseInt(g(),10).toString(2);break;case "c":f=g(),typeof f=="string"||f instanceof String?c+=f:c+=String.fromCharCode(parseInt(f,10));break;case "d":c+=parseInt(g(),10);break;case "f":m=String(parseFloat(g()).toFixed(y||6)),c+=h?m:m.replace(/^0/,"");break;case "j":c+=JSON.stringify(g());break;case "o":c+="0"+parseInt(g(),10).toString(8);break;case "s":c+=g();break;case "x":c+="0x"+parseInt(g(),10).toString(16);break;case "X":c+="0x"+parseInt(g(),10).toString(16).toUpperCase();break;default:c+=d;break}else d==="%"?u=!0:c+=d;return c}})();});var CE={};Qu(CE,{default:()=>B$});var F$,B$,IE=m5(()=>{"use strict";F$={initialize(){},async render(){throw new Error("Mermaid rendering is not included in the light standalone player. Use the /standalone/full export.")}},B$=F$;});var Gs,_e,$g,Er,Og,Hg,zg,Ug,nd,Zu,Ju,jg,js={},Ws=[],h5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ga=Array.isArray;function rr(e,t){for(var n in t)e[n]=t[n];return e}function rd(e){e&&e.parentNode&&e.parentNode.removeChild(e);}function ir(e,t,n){var r,i,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?Gs.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Us(e,o,r,i,null)}function Us(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++$g,__i:-1,__u:0};return i==null&&_e.vnode!=null&&_e.vnode(a),a}function Pe(e){return e.children}function un(e,t){this.props=e,this.context=t;}function Yi(e,t){if(t==null)return e.__?Yi(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Yi(e):null}function g5(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=rr({},t);a.__v=t.__v+1,_e.vnode&&_e.vnode(a),id(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Yi(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Yg(r,a,i),t.__e=t.__=null,a.__e!=n&&Wg(a);}}function Wg(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Wg(e)}function ed(e){(!e.__d&&(e.__d=true)&&Er.push(e)&&!Vs.__r++||Og!=_e.debounceRendering)&&((Og=_e.debounceRendering)||Hg)(Vs);}function Vs(){try{for(var e,t=1;Er.length;)Er.length>t&&Er.sort(zg),e=Er.shift(),t=Er.length,g5(e);}finally{Er.length=Vs.__r=0;}}function Vg(e,t,n,r,i,a,o,s,l,c,d){var u,f,m,h,y,g,w,x=r&&r.__k||Ws,v=t.length;for(l=y5(n,t,x,l,v),u=0;u<v;u++)(m=n.__k[u])!=null&&(f=m.__i!=-1&&x[m.__i]||js,m.__i=u,g=id(e,m,f,i,a,o,s,l,c,d),h=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&ad(f.ref,null,m),d.push(m.ref,m.__c||h,m)),y==null&&h!=null&&(y=h),(w=!!(4&m.__u))||f.__k===m.__k?l=Gg(m,l,e,w):typeof m.type=="function"&&g!==void 0?l=g:h&&(l=h.nextSibling),m.__u&=-7);return n.__e=y,l}function y5(e,t,n,r,i){var a,o,s,l,c,d=n.length,u=d,f=0;for(e.__k=new Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=e.__k[a]=Us(null,o,null,null,null):Ga(o)?o=e.__k[a]=Us(Pe,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=Us(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,l=a+f,o.__=e,o.__b=e.__b+1,s=null,(c=o.__i=b5(o,n,l,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(i>d?f--:i<d&&f++),typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?f--:c==l+1?f++:(c>l?f--:f++,o.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<d;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=Yi(s)),Kg(s,s));return r}function Gg(e,t,n,r){var i,a;if(typeof e.type=="function"){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Gg(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Yi(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ya(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ga(e)?e.some(function(n){Ya(n,t);}):t.push(e)),t}function b5(e,t,n,r){var i,a,o,s=e.key,l=e.type,c=t[n],d=c!=null&&(2&c.__u)==0;if(c===null&&s==null||d&&s==c.key&&l==c.type)return n;if(r>(d?1:0)){for(i=n-1,a=n+1;i>=0||a<t.length;)if((c=t[o=i>=0?i--:a++])!=null&&(2&c.__u)==0&&s==c.key&&l==c.type)return o}return -1}function Fg(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||h5.test(t)?n:n+"px";}function zs(e,t,n,r,i){var a,o;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else {if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Fg(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Fg(e.style,t,n[t]);}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Ug,"$1")),o=t.toLowerCase(),t=o in e||t=="onFocusOut"||t=="onFocusIn"?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=nd,e.addEventListener(t,a?Ju:Zu,a)):e.removeEventListener(t,a?Ju:Zu,a);else {if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===false&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n));}}function Bg(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=nd++;else if(t.t<n.u)return;return n(_e.event?_e.event(t):t)}}}function id(e,t,n,r,i,a,o,s,l,c){var d,u,f,m,h,y,g,w,x,v,T,S,k,E,I,_=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),a=[s=t.__e=n.__e]),(d=_e.__b)&&d(t);e:if(typeof _=="function")try{if(w=t.props,x=_.prototype&&_.prototype.render,v=(d=_.contextType)&&r[d.__c],T=d?v?v.props.value:d.__:r,n.__c?g=(u=t.__c=n.__c).__=u.__E:(x?t.__c=u=new _(w,T):(t.__c=u=new un(w,T),u.constructor=_,u.render=k5),v&&v.sub(u),u.state||(u.state={}),u.__n=r,f=u.__d=!0,u.__h=[],u._sb=[]),x&&u.__s==null&&(u.__s=u.state),x&&_.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=rr({},u.__s)),rr(u.__s,_.getDerivedStateFromProps(w,u.__s))),m=u.props,h=u.state,u.__v=t,f)x&&_.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),x&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else {if(x&&_.getDerivedStateFromProps==null&&w!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(w,T),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(w,u.__s,T)===!1){t.__v!=n.__v&&(u.props=w,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(A){A&&(A.__=t);}),Ws.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&o.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(w,u.__s,T),x&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,h,y);});}if(u.context=T,u.props=w,u.__P=e,u.__e=!1,S=_e.__r,k=0,x)u.state=u.__s,u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),Ws.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++k<25);u.state=u.__s,u.getChildContext!=null&&(r=rr(rr({},r),u.getChildContext())),x&&!f&&u.getSnapshotBeforeUpdate!=null&&(y=u.getSnapshotBeforeUpdate(m,h)),E=d!=null&&d.type===Pe&&d.key==null?Xg(d.props.children):d,s=Vg(e,Ga(E)?E:[E],t,n,r,i,a,o,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),g&&(u.__E=u.__=null);}catch(A){if(t.__v=null,l||a!=null)if(A.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s;}else {for(I=a.length;I--;)rd(a[I]);td(t);}else t.__e=n.__e,t.__k=n.__k,A.then||td(t);_e.__e(A,t,n);}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=w5(n.__e,t,n,r,i,a,o,l,c);return (d=_e.diffed)&&d(t),128&t.__u?void 0:s}function td(e){e&&(e.__c&&(e.__c.__e=true),e.__k&&e.__k.some(td));}function Yg(e,t,n){for(var r=0;r<n.length;r++)ad(n[r],n[++r],n[++r]);_e.__c&&_e.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i);});}catch(a){_e.__e(a,i.__v);}});}function Xg(e){return typeof e!="object"||e==null||e.__b>0?e:Ga(e)?e.map(Xg):rr({},e)}function w5(e,t,n,r,i,a,o,s,l){var c,d,u,f,m,h,y,g=n.props||js,w=t.props,x=t.type;if(x=="svg"?i="http://www.w3.org/2000/svg":x=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((m=a[c])&&"setAttribute"in m==!!x&&(x?m.localName==x:m.nodeType==3)){e=m,a[c]=null;break}}if(e==null){if(x==null)return document.createTextNode(w);e=document.createElementNS(i,x,w.is&&w),s&&(_e.__m&&_e.__m(t,a),s=false),a=null;}if(x==null)g===w||s&&e.data==w||(e.data=w);else {if(a=a&&Gs.call(e.childNodes),!s&&a!=null)for(g={},c=0;c<e.attributes.length;c++)g[(m=e.attributes[c]).name]=m.value;for(c in g)m=g[c],c=="dangerouslySetInnerHTML"?u=m:c=="children"||c in w||c=="value"&&"defaultValue"in w||c=="checked"&&"defaultChecked"in w||zs(e,c,null,m,i);for(c in w)m=w[c],c=="children"?f=m:c=="dangerouslySetInnerHTML"?d=m:c=="value"?h=m:c=="checked"?y=m:s&&typeof m!="function"||g[c]===m||zs(e,c,m,g[c],i);if(d)s||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Vg(t.type=="template"?e.content:e,Ga(f)?f:[f],t,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":i,a,o,a?a[0]:n.__k&&Yi(n,0),s,l),a!=null)for(c=a.length;c--;)rd(a[c]);s||(c="value",x=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||x=="progress"&&!h||x=="option"&&h!=g[c])&&zs(e,c,h,g[c],i),c="checked",y!=null&&y!=e[c]&&zs(e,c,y,g[c],i));}return e}function ad(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t));}else e.current=t;}catch(i){_e.__e(i,n);}}function Kg(e,t,n){var r,i;if(_e.unmount&&_e.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ad(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount();}catch(a){_e.__e(a,t);}r.base=r.__P=null;}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Kg(r[i],t,n||typeof e.type!="function");n||rd(e.__e),e.__c=e.__=e.__e=void 0;}function k5(e,t,n){return this.constructor(e,n)}function od(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),_e.__&&_e.__(e,t),i=(r="undefined"=="function")?null:t.__k,a=[],o=[],id(t,e=(t).__k=ir(Pe,null,[e]),i||js,js,t.namespaceURI,i?null:t.firstChild?Gs.call(t.childNodes):null,a,i?i.__e:t.firstChild,r,o),Yg(a,e,o);}function ar(e){function t(n){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null;},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&r.forEach(function(o){o.__e=true,ed(o);});},this.sub=function(a){r.add(a);var o=a.componentWillUnmount;a.componentWillUnmount=function(){r&&r.delete(a),o&&o.call(a);};}),n.children}return t.__c="__cC"+jg++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Gs=Ws.slice,_e={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(s){e=s;}throw e}},$g=0,un.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=rr({},this.state),typeof e=="function"&&(e=e(rr({},n),this.props)),e&&rr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ed(this));},un.prototype.forceUpdate=function(e){this.__v&&(this.__e=true,e&&this.__h.push(e),ed(this));},un.prototype.render=Pe,Er=[],Hg=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zg=function(e,t){return e.__v.__b-t.__v.__b},Vs.__r=0,Ug=/(PointerCapture)$|Capture$/i,nd=0,Zu=Bg(false),Ju=Bg(true),jg=0;var Sr,Qe,sd,Qg,Xa=0,ay=[],dt=_e,Zg=dt.__b,Jg=dt.__r,ey=dt.diffed,ty=dt.__c,ny=dt.unmount,ry=dt.__;function Xi(e,t){dt.__h&&dt.__h(Qe,e,Xa||t),Xa=0;var n=Qe.__H||(Qe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ge(e){return Xa=1,oy(sy,e)}function oy(e,t,n){var r=Xi(Sr++,2);if(r.t=e,!r.__c&&(r.__=[sy(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}));}],r.__c=Qe,!Qe.__f)){var i=function(s,l,c){if(!r.__c.__H)return true;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return !f.__N}))return !a||a.call(this,s,l,c);var u=r.__c.props!==s;return d.some(function(f){if(f.__N){var m=f.__[0];f.__=f.__N,f.__N=void 0,m!==f.__[0]&&(u=true);}}),a&&a.call(this,s,l,c)||u};Qe.__f=true;var a=Qe.shouldComponentUpdate,o=Qe.componentWillUpdate;Qe.componentWillUpdate=function(s,l,c){if(this.__e){var d=a;a=void 0,i(s,l,c),a=d;}o&&o.call(this,s,l,c);},Qe.shouldComponentUpdate=i;}return r.__N||r.__}function he(e,t){var n=Xi(Sr++,3);!dt.__s&&cd(n.__H,t)&&(n.__=e,n.u=t,Qe.__H.__h.push(n));}function bn(e,t){var n=Xi(Sr++,4);!dt.__s&&cd(n.__H,t)&&(n.__=e,n.u=t,Qe.__h.push(n));}function ue(e){return Xa=5,de(function(){return {current:e}},[])}function de(e,t){var n=Xi(Sr++,7);return cd(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ke(e,t){return Xa=8,de(function(){return e},t)}function _r(e){var t=Qe.context[e.__c],n=Xi(Sr++,9);return n.c=e,t?(n.__==null&&(n.__=true,t.sub(Qe)),t.props.value):e.__}function Wt(){var e=Xi(Sr++,11);if(!e.__){for(var t=Qe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++;}return e.__}function x5(){for(var e;e=ay.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ys),t.__h.some(ld),t.__h=[];}catch(n){t.__h=[],dt.__e(n,e.__v);}}}dt.__b=function(e){Qe=null,Zg&&Zg(e);},dt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ry&&ry(e,t);},dt.__r=function(e){Jg&&Jg(e),Sr=0;var t=(Qe=e.__c).__H;t&&(sd===Qe?(t.__h=[],Qe.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0;})):(t.__h.some(Ys),t.__h.some(ld),t.__h=[],Sr=0)),sd=Qe;},dt.diffed=function(e){ey&&ey(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ay.push(t)!==1&&Qg===dt.requestAnimationFrame||((Qg=dt.requestAnimationFrame)||v5)(x5)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0;})),sd=Qe=null;},dt.__c=function(e,t){t.some(function(n){try{n.__h.some(Ys),n.__h=n.__h.filter(function(r){return !r.__||ld(r)});}catch(r){t.some(function(i){i.__h&&(i.__h=[]);}),t=[],dt.__e(r,n.__v);}}),ty&&ty(e,t);},dt.unmount=function(e){ny&&ny(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Ys(r);}catch(i){t=i;}}),n.__H=void 0,t&&dt.__e(t,n.__v));};var iy=typeof requestAnimationFrame=="function";function v5(e){var t,n=function(){clearTimeout(r),iy&&cancelAnimationFrame(t),setTimeout(e);},r=setTimeout(n,35);iy&&(t=requestAnimationFrame(n));}function Ys(e){var t=Qe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Qe=t;}function ld(e){var t=Qe;e.__c=e.__(),Qe=t;}function cd(e,t){return !e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function sy(e,t){return typeof t=="function"?t(e):t}function E5(e,t){for(var n in t)e[n]=t[n];return e}function ly(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return true;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return true;return false}function yy(e,t){var n=t(),r=ge({t:{__:n,u:t}}),i=r[0].t,a=r[1];return bn(function(){i.__=n,i.u=t,ud(i)&&a({t:i});},[e,n,t]),he(function(){return ud(i)&&a({t:i}),e(function(){ud(i)&&a({t:i});})},[e]),n}function ud(e){try{return !((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return true}var t,n;}function cy(e,t){this.props=e,this.context=t;}(cy.prototype=new un).isPureReactComponent=true,cy.prototype.shouldComponentUpdate=function(e,t){return ly(this.props,e)||ly(this.state,t)};var uy=_e.__b;_e.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),uy&&uy(e);};var S5=_e.__e;_e.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}S5(e,t,n,r);};var dy=_e.unmount;function by(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c();}),e.__c.__H=null),(e=E5({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=true,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return by(r,t,n)})),e}function wy(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return wy(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=true,e.__c.__P=n)),e}function dd(){this.__u=0,this.o=null,this.__b=null;}function ky(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Xs(){this.i=null,this.l=null;}_e.unmount=function(e){var t=e.__c;t&&(t.__z=true),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),dy&&dy(e);},(dd.prototype=new un).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=ky(r.__v),a=false,o=function(){a||r.__z||(a=true,n.__R=null,i?i(l):l());};n.__R=o;var s=n.__P;n.__P=null;var l=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=wy(c,c.__c.__P,c.__c.__O);}var d;for(r.setState({__a:r.__b=null});d=r.o.pop();)d.__P=s,d.forceUpdate();}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o);},dd.prototype.componentWillUnmount=function(){this.o=[];},dd.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=by(this.__b,n,r.__O=r.__P);}this.__b=null;}var i=t.__a&&ir(Pe,null,e.fallback);return i&&(i.__u&=-33),[ir(Pe,null,t.__a?null:e.children),i]};var my=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2];}};(Xs.prototype=new un).__a=function(e){var t=this,n=ky(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),my(t,e,r)):i();};n?n(a):a();}},Xs.prototype.render=function(e){this.i=null,this.l=new Map;var t=Ya(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Xs.prototype.componentDidUpdate=Xs.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){my(e,n,t);});};var _5=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,A5=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C5=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,I5=/[A-Z0-9]/g,M5=typeof document<"u",q5=function(e){return (typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function xy(e,t,n){return t.__k==null&&(t.textContent=""),od(e,t),e?e.__c:null}un.prototype.isReactComponent=true,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(un.prototype,e,{configurable:true,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:true,writable:true,value:t});}});});var fy=_e.event;_e.event=function(e){return fy&&(e=fy(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var L5={configurable:true,get:function(){return this.class}},py=_e.vnode;_e.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,i={},a=r.indexOf("-")==-1;for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||M5&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var l=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===true?s="":l==="translate"&&s==="no"?s=false:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?o="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||q5(n.type)?l==="onfocus"?o="onfocusin":l==="onblur"?o="onfocusout":C5.test(o)&&(o=l):l=o="oninput":a&&A5.test(o)?o=o.replace(I5,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[o=l]&&(o="oninputCapture"),i[o]=s;}}r=="select"&&(i.multiple&&Array.isArray(i.value)&&(i.value=Ya(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1;})),i.defaultValue!=null&&(i.value=Ya(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value;}))),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",L5)):n.className&&(i.class=i.className=n.className),t.props=i;})(e),e.$$typeof=_5,py&&py(e);};var hy=_e.__r;_e.__r=function(e){hy&&hy(e),e.__c;};var gy=_e.diffed;_e.diffed=function(e){gy&&gy(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value);};function Ty(e){return !!e.__k&&(od(null,e),true)}var Ey=function(e,t){var n=_e.debounceRendering;_e.debounceRendering=function(i){return i()};var r=e(t);return _e.debounceRendering=n,r};function Sy(e){return {render:function(t){xy(t,e);},unmount:function(){Ty(e);}}}var md=["highpass","denoise","debreath","loudness"],Cy=Object.freeze({highpass:{defaultValue:80,min:20,max:300},denoise:{defaultValue:.8,min:0,max:1},debreath:{defaultValue:-15,min:-40,max:0},loudness:{defaultValue:-16,min:-31,max:-5}}),Zs=[{key:"fx",htmlSuffix:"fx"},{key:"cuts",htmlSuffix:"cuts"},{key:"gain",htmlSuffix:"gain"},{key:"fadeIn",htmlSuffix:"fade-in"},{key:"fadeOut",htmlSuffix:"fade-out"},{key:"crop",htmlSuffix:"crop"},{key:"group",htmlSuffix:"group"}];function Iy(e,t){let n=Zs.find(r=>r.key===t);return `data-squisq-${e}-${n?.htmlSuffix??t}`}function My(e,t=3){let n=Number(e.toFixed(t));return Object.is(n,-0)?"0":String(n)}function Js(e){if(e==null)return null;let t=e.trim();if(!/^[-+]?(\d+(\.\d*)?|\.\d+)$/.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}function Ki(e,t,n){return Math.min(n,Math.max(t,e))}function Qs(e){let t=e.trim(),n=Js(t);if(n!=null)return n>=0?n:null;let r=t.match(/^(\d+(?:\.\d+)?)ms$/i);if(r)return Number(r[1])/1e3;let i=t.match(/^(\d+):([0-5]?\d)(?:\.(\d+))?$/);return i?Number(i[1])*60+Number(i[2])+ +`0.${i[3]??"0"}`:null}function P5(e){return md.includes(e)}function qy(e){if(e==null)return null;let t=e.split(/[\s,]+/).filter(Boolean);if(t.length===0)return null;let n=new Map,r=[];for(let a of t){let o=a.indexOf(":"),s=(o===-1?a:a.slice(0,o)).toLowerCase();if(!P5(s)){r.push(a);continue}let l=Cy[s],c=l.defaultValue;if(o!==-1&&(c=Js(a.slice(o+1)),c!=null&&s==="debreath"&&(c=-Math.abs(c))),c==null){r.push(a);continue}n.set(s,Ki(c,l.min,l.max));}return {ops:md.filter(a=>n.has(a)).map(a=>({id:a,value:n.get(a)})),unknown:r}}var _y=.001;function el(e,t=0,n=Number.POSITIVE_INFINITY){let r=e.filter(a=>Number.isFinite(a.start)&&Number.isFinite(a.end)).map(a=>({start:Math.max(t,Math.min(a.start,a.end)),end:Math.min(n,Math.max(a.start,a.end))})).filter(a=>a.end-a.start>=_y).sort((a,o)=>a.start-o.start),i=[];for(let a of r){let o=i[i.length-1];o&&a.start<=o.end+_y?o.end=Math.max(o.end,a.end):i.push({...a});}return i}function Ly(e){if(e==null)return null;let t=[];for(let r of e.split(/[\s,]+/).filter(Boolean)){let i=r.indexOf("-",1);if(i===-1)continue;let a=Qs(r.slice(0,i)),o=Qs(r.slice(i+1));a==null||o==null||o<=a||t.push({start:a,end:o});}let n=el(t);return n.length>0?n:null}var Ks=.02;function Py(e){if(e==null)return null;let t=e.split(/[\s,]+/).filter(Boolean).map(n=>Js(n));return t.length!==4||t.some(n=>n==null)?null:Ry({x:t[0],y:t[1],w:t[2],h:t[3]})}function Ry(e){let t=Ki(e.x,0,1-Ks),n=Ki(e.y,0,1-Ks),r=Ki(e.w,Ks,1-t),i=Ki(e.h,Ks,1-n);return t<1e-4&&n<1e-4&&r>1-1e-4&&i>1-1e-4?null:{x:t,y:n,w:r,h:i}}function fd(e){return [e.x,e.y,e.w,e.h].map(t=>My(t,4)).join(" ")}var Ay={min:-60,max:24},R5=/^[A-Za-z0-9_-]{1,64}$/;function tl(e){let t={},n=qy(e.fx);n&&(n.ops.length>0||n.unknown.length>0)&&(t.fx=n);let r=Ly(e.cuts);r&&(t.cuts=r);let i=Js(e.gain);i!=null&&i!==0&&(t.gain=Ki(i,Ay.min,Ay.max));let a=e.fadeIn==null?null:Qs(e.fadeIn);a!=null&&a>0&&(t.fadeIn=a);let o=e.fadeOut==null?null:Qs(e.fadeOut);o!=null&&o>0&&(t.fadeOut=o);let s=Py(e.crop);s&&(t.crop=s);let l=e.group?.trim();return l&&R5.test(l)&&(t.group=l),Object.keys(t).length>0?t:void 0}function pd(e){let t={};for(let{key:n}of Zs)e[n]!=null&&(t[n]=e[n]);return t}function hd(e,t){let n={};for(let{key:r}of Zs){let i=t[Iy(e,r)];i!=null&&(n[r]=i);}return n}function nl(e){let t=Math.max(0,e.clipStart??0),n=e.clipEnd??Number.POSITIVE_INFINITY;e.sourceDuration!=null&&Number.isFinite(e.sourceDuration)&&(n=Math.min(n,e.sourceDuration)),n=Math.max(t,n);let r=el(e.cuts??[],t,n),i=[],a=t;for(let f of r)f.start>a&&i.push({start:a,end:f.start}),a=Math.max(a,f.end);n>a&&i.push({start:a,end:n});let o=[],s=0;for(let f of i)o.push(s),s+=f.end-f.start;let l=s,c=f=>{for(let m=0;m<i.length;m++){let h=i[m];if(f>=h.start&&(f<h.end||m===i.length-1&&f===h.end))return o[m]+(f-h.start)}return null},d=f=>{if(i.length===0||f<=t)return 0;for(let m=0;m<i.length;m++){let h=i[m];if(f<h.start)return o[m];if(f<h.end)return o[m]+(f-h.start)}return l},u=f=>{if(i.length===0)return t;if(f<=0)return i[0].start;for(let m=0;m<i.length;m++){let h=i[m].end-i[m].start;if(f<o[m]+h)return i[m].start+(f-o[m])}return i[i.length-1].end};return {windowStart:t,windowEnd:n,cuts:r,hasCuts:r.length>0,playedDuration:l,keptRanges:()=>i.map(f=>({...f})),sourceToPlayed:c,snapSourceToPlayed:d,playedToSource:u}}function gd(e,t=[]){for(let n of e)t.push(n),n.children&&n.children.length>0&&gd(n.children,t);return t}function yd(e,t){return nl({clipStart:e.clipStart,clipEnd:e.clipEnd,cuts:e.edits?.cuts,sourceDuration:t})}function Ny(e){return e.clipEnd==null?null:e.edits?.cuts?.length?yd(e).playedDuration:Math.max(0,e.clipEnd-(e.clipStart??0))}function Dy(e,t){if(e.clipEnd!=null||e.lockToBlock===true)return null;let n=t?.intrinsicDuration?.(e);if(n==null||!Number.isFinite(n)||n<=0)return null;let r=e.edits?.cuts?.length?yd(e,n).playedDuration:n-(e.clipStart??0);return r>0?r:null}function Oy(e,t,n,r,i,a,o){let s=t.edits,l=s?.fx?o?.processedAudio?.(t):void 0,c={src:t.src,kind:t.kind,...t.placement?{placement:t.placement}:{},...t.pipSize?{pipSize:t.pipSize}:{},...t.pipShape?{pipShape:t.pipShape}:{},...t.pipPosition?{pipPosition:t.pipPosition}:{},...t.lockToBlock!=null?{lockToBlock:t.lockToBlock}:{},anchor:i,...a!==void 0?{blockId:a}:{},...t.sourceLine!=null?{sourceLine:t.sourceLine}:{},...s?.gain!=null?{gain:s.gain}:{},...t.kind==="video"&&s?.crop?{crop:s.crop}:{}};l&&t.kind==="audio"&&(c.src=l,c.originalSrc=t.src),l&&t.kind==="video"&&(c.audioMuted=true);let d=Math.max(n,r),u=[];if(!s?.cuts?.length)u.push({absoluteStart:n,absoluteEnd:d,sourceIn:t.clipStart??0});else {let m=0;for(let h of yd(t).keptRanges()){let y=n+m;if(y>=d)break;let g=Math.min(d,y+(h.end-h.start));u.push({absoluteStart:y,absoluteEnd:g,sourceIn:h.start}),m+=h.end-h.start;}u.length===0&&u.push({absoluteStart:n,absoluteEnd:n,sourceIn:t.clipStart??0});}let f=u.length;u.forEach((m,h)=>{let y={...c,id:f>1?`${t.id}#${h}`:t.id,...m,...h===0&&s?.fadeIn?{fadeIn:s.fadeIn}:{},...h===f-1&&s?.fadeOut?{fadeOut:s.fadeOut}:{},...f>1?{segment:{groupId:t.id,index:h,count:f}}:{}};e.push(y),l&&t.kind==="video"&&e.push(N5(y,t,l));});}function N5(e,t,n){let r={...e,id:`${e.id}~audio`,kind:"audio",src:n,originalSrc:t.src,derivedFrom:t.id};return delete r.crop,delete r.audioMuted,delete r.placement,delete r.pipSize,delete r.pipShape,delete r.pipPosition,e.segment&&(r.segment={...e.segment,groupId:`${t.id}~audio`}),r}function Fy(e){let t=gd(e.blocks).reduce((n,r)=>{let i=r.startTime+r.duration;return Number.isFinite(i)?Math.max(n,i):n},0);return Math.max(e.duration??0,t)}function Qi(e,t){let n=[],r=Fy(e);for(let i of gd(e.blocks)){let a=i.startTime+i.duration;for(let o of i.media??[]){let s=i.startTime+o.startAt,l=Ny(o),c;o.spillover?c=l!=null?s+l:a:c=l!=null?Math.min(s+l,a):a;let d=Dy(o,t);d!=null&&(c=Math.min(c,s+d)),Oy(n,o,s,c,"block",i.id,t);}}for(let i of e.documentMedia??[]){let a=i.startAt,o=Ny(i),s=o!=null?a+o:r,l=Dy(i,t);l!=null&&(s=Math.min(s,a+l)),Oy(n,i,a,s,"document",void 0,t);}return n}function rl(e,t){let n=Fy(e),r=Qi(e,t).reduce((i,a)=>Math.max(i,a.absoluteEnd),0);return Math.max(n,r)}var D5={standard:"clean",minimalist:"clean",documentary:"documentary",magazine:"editorial",bold:"brutalist","tech-dark":"terminal",cinematic:"cinematic","warm-earth":"organic","morning-light":"soft",gezellig:"soft"},O5={clean:{sectionSpacing:"comfortable",divider:"hairline",backgroundRhythm:"alternate",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"none"},quoteMark:"accent-bar",numeralStyle:"plain",accentStrategy:"cycle"},editorial:{sectionSpacing:"comfortable",divider:"double-rule",backgroundRhythm:"flat",heroStyle:"split",headingTreatment:{eyebrow:"kicker",scale:"display",underline:"none"},quoteMark:"oversized-glyph",numeralStyle:"oversized",accentStrategy:"alternate-two"},brutalist:{sectionSpacing:"compact",divider:"thick-rule",backgroundRhythm:"accent-bands",heroStyle:"oversized-type",headingTreatment:{eyebrow:"kicker",scale:"oversized",case:"uppercase"},quoteMark:"none",numeralStyle:"oversized",accentStrategy:"cycle"},terminal:{sectionSpacing:"compact",divider:"hairline",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"mono-tag",scale:"regular",underline:"none"},quoteMark:"none",numeralStyle:"mono",accentStrategy:"primary-only"},cinematic:{sectionSpacing:"generous",divider:"gap-only",backgroundRhythm:"flat",heroStyle:"full-bleed",headingTreatment:{eyebrow:"kicker",scale:"display",case:"uppercase"},quoteMark:"none",numeralStyle:"oversized",accentStrategy:"primary-only"},documentary:{sectionSpacing:"generous",divider:"thick-rule",backgroundRhythm:"flat",heroStyle:"letterbox",headingTreatment:{eyebrow:"numbered",scale:"display",underline:"none"},quoteMark:"accent-bar",numeralStyle:"boxed",accentStrategy:"primary-only"},organic:{sectionSpacing:"comfortable",divider:"thick-rule",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"accent-bar"},quoteMark:"oversized-glyph",numeralStyle:"boxed",accentStrategy:"alternate-two"},soft:{sectionSpacing:"comfortable",divider:"dotted",backgroundRhythm:"tinted-panels",heroStyle:"split",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"none"},quoteMark:"oversized-glyph",numeralStyle:"plain",accentStrategy:"alternate-two"}};function F5(e){let t=[...e.persistentLayers?.bottomLayers??[],...e.persistentLayers?.topLayers??[]];for(let n of t)if(typeof n=="object"&&n!==null&&"template"in n&&n.template==="patternBackground"){let i=n.config?.pattern;if(i==="dots"||i==="grid"||i==="diagonal"||i==="noise")return i}}function il(e){let t=D5[e.renderStyle?.name??""]??"clean",n=O5[t],r=e.style?.borderRadius??6,i=e.style?.imageTreatment?.type,a=i==="mono"||i==="duotone"?"letterboxed":r>0?"rounded":"flush",o={contentMaxWidth:760,wideMaxWidth:1100,sectionSpacing:n.sectionSpacing,cornerRadius:r,divider:n.divider,backgroundRhythm:n.backgroundRhythm,heroStyle:n.heroStyle,headingTreatment:{...n.headingTreatment},imageFraming:a,shadow:e.style?.textShadow?"soft":"none",quoteMark:n.quoteMark,numeralStyle:n.numeralStyle},s=F5(e);return s&&(o.pattern=s),{family:t,tokens:o,accentRotation:{strategy:n.accentStrategy}}}var By=.7,al=["cut","fade","dissolve","push","wipe","split","reveal","randomBars","shape","uncover","cover","zoom","pan","flash","fallOver","drape","curtains","wind","prestige","fracture","crush","peelOff","pageCurl","airplane","origami","checkerboard","blinds","clock","ripple","honeycomb","glitter","vortex","shred","switch","flip","gallery","cube","doors","box","ferrisWheel","conveyor","rotate","window","orbit","flyThrough","morph","checker","circle","comb","diamond","newsflash","plus","pull","random","randomBar","strips","wedge","wheel","prism","warp","ferris","flythrough","wheelReverse","pageCurlDouble","pageCurlSingle","slideLeft","slideRight","slideUp","slideDown"];var B5=new Set(al),$5={none:"cut",randombars:"randomBars",randombar:"randomBar",checkerboards:"checkerboard",shapes:"shape",ferris:"ferrisWheel",ferriswheel:"ferrisWheel",flythrough:"flyThrough",flythru:"flyThrough",pagecurl:"pageCurl",pagecurldouble:"pageCurlDouble",pagecurlsingle:"pageCurlSingle",wheelreverse:"wheelReverse",slideleft:"slideLeft",slideright:"slideRight",slideup:"slideUp",slidedown:"slideDown"},H5=new Map(al.map(e=>[kd(e),e]));function ol(e){return B5.has(e)}function bd(e){let t=e.trim();if(!t)return null;if(ol(t))return t;let n=kd(t);return $5[n]??H5.get(n)??null}function wd(e){switch(kd(e)){case "left":case "l":return "left";case "right":case "r":return "right";case "up":case "u":return "up";case "down":case "d":return "down";case "in":return "in";case "out":return "out";case "horizontal":case "horz":case "h":return "horizontal";case "vertical":case "vert":case "v":return "vertical";default:return null}}function Zi(e,t=By){let n=e?.duration;return n!=null&&Number.isFinite(n)&&n>0?n:t}function Ka(e,t,n){if(e.transition)return e.transition;if(n!==0)return t.renderStyle.defaultTransition}function kd(e){return e.toLowerCase().replace(/[\s_-]+/g,"")}var z5=["calm","documentary","vibrant"],Wy="squisq-motion",U5="cubic-bezier(0.34, 1.4, 0.64, 1)",j5="cubic-bezier(0.22, 1, 0.36, 1)",ni=Object.freeze({calm:Object.freeze({name:"calm",textEntrance:Object.freeze({type:"fadeIn",duration:1,delayScale:1}),chartGrowth:false,chartGrowthDuration:1,countUp:false,countUpDuration:1.5,diagramBuild:false,photoGridStagger:0,coverWordReveal:false}),documentary:Object.freeze({name:"documentary",textEntrance:Object.freeze({type:"fadeInUp",duration:.8,easing:j5,delayScale:1}),chartGrowth:true,chartGrowthDuration:1.1,countUp:true,countUpDuration:1.6,diagramBuild:true,photoGridStagger:.22,coverWordReveal:false}),vibrant:Object.freeze({name:"vibrant",textEntrance:Object.freeze({type:"fadeInUp",duration:.55,easing:U5,delayScale:.8}),chartGrowth:true,chartGrowthDuration:.9,countUp:true,countUpDuration:1.2,diagramBuild:true,photoGridStagger:.16,coverWordReveal:false})});function ri(e){return typeof e=="string"&&z5.includes(e)}function Vy(e,t="calm"){if(e==null)return ni[t];if(typeof e=="string")return ni[ri(e)?e:t];if(typeof e!="object")return ni[t];let n=e,r=ri(n.profile)?n.profile:ri(n.name)?n.name:t,i=ni[r],{profile:a,name:o,...s}=e,l={...i};for(let[c,d]of Object.entries(s))d!==void 0&&(c==="textEntrance"&&typeof d=="object"&&d!==null?l.textEntrance={...i.textEntrance,...d}:c in i&&typeof d==typeof i[c]&&(l[c]=d));return l}function ul(e){if(!e)return;let t=e[Wy]??e.motion;if(typeof t=="string"){let n=t.trim();return ri(n)?n:void 0}if(t&&typeof t=="object"&&!Array.isArray(t))return t}function Ji(e,t,n){let r=t?.renderStyle.motionProfile,i=ri(r)?r:"calm",a=n??e?.motion??ul(e?.frontmatter);return Vy(a,i)}var Ze={landscape:{width:1920,height:1080,name:"16:9 Landscape"},portrait:{width:1080,height:1920,name:"9:16 Portrait"},square:{width:1080,height:1080,name:"1:1 Square"}};var W5=Math.sqrt(1920*1920+1080*1080);function Qa(e){return Math.sqrt(e.width*e.width+e.height*e.height)/W5}function Bn(e){let t=e.width/e.height;return Math.abs(t-1)<.05?"square":t>1?"landscape":"portrait"}var V5={landscape:{primaryY:"35%",secondaryY:"55%",tertiaryY:"75%",titleScale:1,bodyScale:1,columnLeftX:"25%",columnRightX:"75%",columnTopY:"35%",columnBottomY:"65%",stackColumns:false,maxTextWidth:"80%",horizontalPadding:"10%",captionY:"85%",captionScale:1},portrait:{primaryY:"25%",secondaryY:"42%",tertiaryY:"58%",titleScale:.7,bodyScale:1.5,columnLeftX:"50%",columnRightX:"50%",columnTopY:"30%",columnBottomY:"55%",stackColumns:true,maxTextWidth:"90%",horizontalPadding:"5%",captionY:"75%",captionScale:.85},square:{primaryY:"30%",secondaryY:"50%",tertiaryY:"70%",titleScale:.85,bodyScale:.9,columnLeftX:"25%",columnRightX:"75%",columnTopY:"35%",columnBottomY:"65%",stackColumns:false,maxTextWidth:"85%",horizontalPadding:"7.5%",captionY:"82%",captionScale:.9}};function Za(e){return V5[e]}function Gy(e,t,n,r=false){let i=Qa(t),a=Za(n),o=r?a.titleScale:a.bodyScale;return Math.round(e*i*o)}function dl(e){let t=Za(e);return t.stackColumns?{left:{x:"50%",y:t.columnTopY},right:{x:"50%",y:t.columnBottomY}}:{left:{x:t.columnLeftX,y:"50%"},right:{x:t.columnRightX,y:"50%"}}}var Ja='system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';function tn(e){return "template"in e&&typeof e.template=="string"}function _n(e,t,n,r=Ze.landscape,i={}){let a=Bn(r),o=e.renderStyle.layoutOverrides,s=Za(a);return {theme:e,blockIndex:t,totalBlocks:n,viewport:r,fontScale:Qa(r),orientation:a,layout:o?{...s,...o}:s,motion:Ji(null,e,i.motion)}}function ml(e,t,n=false){return Gy(e,t.viewport,t.orientation,n)}function Ed(e){return "template"in e&&typeof e.template=="string"}var G5=new Set(["image","text","shape","path","map","video","table","tree","mermaid"]),Y5=new Set(["none","fadeIn","fadeOut","slowZoom","zoomIn","zoomOut","panLeft","panRight","typewriter","fadeInUp","slideIn","wordReveal","countUp","drawOn","grow","reveal","drift","tween"]),X5=["center","left","right","top","bottom"],K5=class{constructor(){this.errors=[];}error(e,t){this.errors.push({path:e,message:t});}object(e,t){return !e||typeof e!="object"||Array.isArray(e)?(this.error(t,"expected object"),false):true}string(e,t,n=false){return typeof e!="string"||n&&e.trim().length===0?(this.error(t,n?"expected non-empty string":"expected string"),false):true}number(e,t){return typeof e!="number"||!Number.isFinite(e)?(this.error(t,"expected finite number"),false):true}boolean(e,t){return typeof e!="boolean"?(this.error(t,"expected boolean"),false):true}enum(e,t,n){return typeof e!="string"||!n.has(e)?(this.error(t,`expected one of: ${Array.from(n).join(", ")}`),false):true}};function ze(e,t,n,r){t[n]!==void 0&&e.string(t[n],`${r}.${n}`);}function Ve(e,t,n,r){t[n]!==void 0&&e.number(t[n],`${r}.${n}`);}function fl(e,t,n,r){t[n]!==void 0&&e.boolean(t[n],`${r}.${n}`);}function vt(e,t,n,r,i){t[n]!==void 0&&e.enum(t[n],`${r}.${n}`,new Set(i));}function Q5(e,t,n){if(e.object(t,n)){for(let r of ["x","y"])$y(e,t[r],`${n}.${r}`);for(let r of ["width","height"])t[r]!==void 0&&$y(e,t[r],`${n}.${r}`);vt(e,t,"anchor",n,["center","top-left","top-right","bottom-left","bottom-right"]);}}function $y(e,t,n){typeof t=="number"&&Number.isFinite(t)||typeof t=="string"&&Number.isFinite(Number.parseFloat(t))||e.error(n,"expected finite number or numeric string");}function Z5(e,t,n){if(!e.object(t,n))return;e.enum(t.type,`${n}.type`,Y5),Ve(e,t,"duration",n),Ve(e,t,"delay",n),ze(e,t,"easing",n),vt(e,t,"direction",n,["in","out"]),vt(e,t,"panDirection",n,["left","right","up","down"]),vt(e,t,"origin",n,X5),vt(e,t,"shape",n,["wipe","iris"]),Ve(e,t,"stagger",n),t.wordTimes!==void 0&&(!Array.isArray(t.wordTimes)||t.wordTimes.some(i=>typeof i!="number"))&&e.error(`${n}.wordTimes`,"expected array of numbers");let r=t.count;r!==void 0&&e.object(r,`${n}.count`)&&(typeof r.to!="number"&&e.error(`${n}.count.to`,"expected number"),Ve(e,r,"from",`${n}.count`),Ve(e,r,"decimals",`${n}.count`),ze(e,r,"prefix",`${n}.count`),ze(e,r,"suffix",`${n}.count`));for(let i of ["fromState","toState"]){let a=t[i];if(a!==void 0&&e.object(a,`${n}.${i}`))for(let o of ["scale","x","y","opacity","rotate"])Ve(e,a,o,`${n}.${i}`);}}function J5(e,t,n){e.object(t,n)&&(e.enum(t.source,`${n}.source`,new Set(["images","children","listItems"])),vt(e,t,"direction",n,["row","column"]),Ve(e,t,"gap",n),t.max!==void 0&&e.number(t.max,`${n}.max`)&&(!Number.isInteger(t.max)||t.max<0)&&e.error(`${n}.max`,"expected non-negative integer"));}function Sd(e,t,n){e.object(t,n)&&(e.string(t.from,`${n}.from`),e.string(t.to,`${n}.to`),Ve(e,t,"angle",n));}function e_(e,t,n){e.object(t,n)&&(e.number(t.fontSize,`${n}.fontSize`),e.string(t.color,`${n}.color`),ze(e,t,"fontFamily",n),vt(e,t,"fontWeight",n,["normal","bold"]),vt(e,t,"fontStyle",n,["normal","italic"]),vt(e,t,"textAlign",n,["left","center","right"]),vt(e,t,"verticalAlign",n,["top","middle","bottom"]),Ve(e,t,"lineHeight",n),fl(e,t,"shadow",n),ze(e,t,"background",n),Ve(e,t,"backgroundOpacity",n),t.backgroundGradient!==void 0&&Sd(e,t.backgroundGradient,`${n}.backgroundGradient`),ze(e,t,"borderColor",n),Ve(e,t,"borderWidth",n),vt(e,t,"borderStyle",n,["solid","dashed","dotted"]),Ve(e,t,"padding",n),Ve(e,t,"maxLines",n));}function t_(e,t,n){if(e.object(t,n)&&(e.string(t.src,`${n}.src`),e.string(t.alt,`${n}.alt`),vt(e,t,"fit",n,["cover","contain","fill"]),ze(e,t,"credit",n),ze(e,t,"license",n),Ve(e,t,"blur",n),t.treatment!==void 0)){let r=`${n}.treatment`;e.object(t.treatment,r)&&(e.enum(t.treatment.type,`${r}.type`,new Set(["none","mono","duotone","warm","cool"])),Ve(e,t.treatment,"strength",r),ze(e,t.treatment,"color",r));}}function n_(e,t,n){if(e.object(t,n)){if(e.enum(t.shape,`${n}.shape`,new Set(["rect","circle","line"])),ze(e,t,"fill",n),Ve(e,t,"fillOpacity",n),t.gradient!==void 0&&Sd(e,t.gradient,`${n}.gradient`),ze(e,t,"stroke",n),Ve(e,t,"strokeWidth",n),vt(e,t,"borderStyle",n,["solid","dashed","dotted"]),Ve(e,t,"borderRadius",n),t.pattern!==void 0){let r=`${n}.pattern`;e.object(t.pattern,r)&&(e.enum(t.pattern.kind,`${r}.kind`,new Set(["dots","grid","diagonal"])),e.string(t.pattern.color,`${r}.color`),Ve(e,t.pattern,"size",r),Ve(e,t.pattern,"opacity",r));}if(t.filter!==void 0){let r=`${n}.filter`;e.object(t.filter,r)&&(e.enum(t.filter.type,`${r}.type`,new Set(["noise"])),Ve(e,t.filter,"baseFrequency",r),Ve(e,t.filter,"opacity",r));}}}function r_(e,t,n){if(!e.object(t,n))return;e.string(t.d,`${n}.d`),ze(e,t,"shapeKind",n),ze(e,t,"stroke",n),Ve(e,t,"strokeWidth",n),ze(e,t,"fill",n),Ve(e,t,"fillOpacity",n),t.gradient!==void 0&&Sd(e,t.gradient,`${n}.gradient`),vt(e,t,"borderStyle",n,["solid","dashed","dotted"]),ze(e,t,"dasharray",n);let r=["none","arrow","open","diamond","circle","square"];vt(e,t,"startMarker",n,r),vt(e,t,"endMarker",n,r);}function i_(e,t,n){e.object(t,n)&&(e.object(t.center,`${n}.center`)&&(e.number(t.center.lat,`${n}.center.lat`),e.number(t.center.lng,`${n}.center.lng`)),e.number(t.zoom,`${n}.zoom`),e.enum(t.style,`${n}.style`,new Set(["terrain","satellite","road","toner","watercolor"])),ze(e,t,"staticSrc",n),fl(e,t,"showAttribution",n),t.markers!==void 0&&(Array.isArray(t.markers)?t.markers.forEach((r,i)=>{let a=`${n}.markers[${i}]`;e.object(r,a)&&(e.number(r.lat,`${a}.lat`),e.number(r.lng,`${a}.lng`),ze(e,r,"label",a),ze(e,r,"color",a),vt(e,r,"icon",a,["pin","circle","star"]));}):e.error(`${n}.markers`,"expected array")));}function a_(e,t,n){e.object(t,n)&&(e.string(t.src,`${n}.src`),e.string(t.alt,`${n}.alt`),e.number(t.clipStart,`${n}.clipStart`),e.number(t.clipEnd,`${n}.clipEnd`),ze(e,t,"posterSrc",n),vt(e,t,"fit",n,["cover","contain","fill"]),Ve(e,t,"sourceDuration",n),Ve(e,t,"startAt",n),fl(e,t,"spillover",n),ze(e,t,"credit",n),ze(e,t,"license",n));}function o_(e,t,n){if(e.object(t,n)){if(Hy(e,t.headers,`${n}.headers`),Array.isArray(t.rows)?t.rows.forEach((r,i)=>Hy(e,r,`${n}.rows[${i}]`)):e.error(`${n}.rows`,"expected array"),Ve(e,t,"maxVisibleRows",n),t.align!==void 0)if(!Array.isArray(t.align))e.error(`${n}.align`,"expected array");else {let r=new Set(["left","right","center"]);t.align.forEach((i,a)=>{i!==null&&e.enum(i,`${n}.align[${a}]`,r);});}if(e.object(t.style,`${n}.style`)){for(let r of ["headerBackground","headerColor","cellBackground","cellColor","borderColor"])e.string(t.style[r],`${n}.style.${r}`);e.number(t.style.fontSize,`${n}.style.fontSize`),ze(e,t.style,"fontFamily",`${n}.style`),ze(e,t.style,"headerFontFamily",`${n}.style`),Ve(e,t.style,"borderRadius",`${n}.style`);}}}function Hy(e,t,n){if(!Array.isArray(t)){e.error(n,"expected string array");return}t.forEach((r,i)=>e.string(r,`${n}[${i}]`));}function s_(e,t,n){if(e.object(t,n)&&(Array.isArray(t.items)?t.items.forEach((r,i)=>Yy(e,r,`${n}.items[${i}]`,0)):e.error(`${n}.items`,"expected array"),e.object(t.style,`${n}.style`))){for(let r of ["rowColor","dirColor","connectorColor","iconColor","commentColor"])e.string(t.style[r],`${n}.style.${r}`);e.number(t.style.fontSize,`${n}.style.fontSize`),e.number(t.style.indentPx,`${n}.style.indentPx`),ze(e,t.style,"fontFamily",`${n}.style`),ze(e,t.style,"monoFontFamily",`${n}.style`),ze(e,t.style,"folderIcon",`${n}.style`),ze(e,t.style,"fileIcon",`${n}.style`);}}function Yy(e,t,n,r){if(r>100){e.error(n,"tree nesting exceeds 100 levels");return}e.object(t,n)&&(e.string(t.id,`${n}.id`),e.string(t.label,`${n}.label`),fl(e,t,"isDir",n),ze(e,t,"comment",n),Array.isArray(t.children)?t.children.forEach((i,a)=>Yy(e,i,`${n}.children[${a}]`,r+1)):e.error(`${n}.children`,"expected array"));}function l_(e,t,n){e.object(t,n)&&(e.string(t.source,`${n}.source`),ze(e,t,"background",n),ze(e,t,"foreground",n),Ve(e,t,"padding",n));}function c_(e,t,n){if(!e.object(t,n)||(e.string(t.id,`${n}.id`,true),Q5(e,t.position,`${n}.position`),t.animation!==void 0&&Z5(e,t.animation,`${n}.animation`),t.repeat!==void 0&&J5(e,t.repeat,`${n}.repeat`),!e.enum(t.type,`${n}.type`,G5)))return;let r=`${n}.content`;switch(t.type){case "image":t_(e,t.content,r);break;case "text":e.object(t.content,r)&&(e.string(t.content.text,`${r}.text`),ze(e,t.content,"html",r),e_(e,t.content.style,`${r}.style`));break;case "shape":n_(e,t.content,r);break;case "path":r_(e,t.content,r);break;case "map":i_(e,t.content,r);break;case "video":a_(e,t.content,r);break;case "table":o_(e,t.content,r);break;case "tree":s_(e,t.content,r);break;case "mermaid":l_(e,t.content,r);break}}function _d(e){let t=new K5;if(!t.object(e,"$"))return {valid:false,errors:t.errors};if(t.string(e.name,"$.name",true),t.string(e.label,"$.label",true),e.description!==void 0&&t.string(e.description,"$.description"),t.object(e.viewport,"$.viewport")&&(t.number(e.viewport.width,"$.viewport.width")&&e.viewport.width<=0&&t.error("$.viewport.width","expected number greater than zero"),t.number(e.viewport.height,"$.viewport.height")&&e.viewport.height<=0&&t.error("$.viewport.height","expected number greater than zero")),!Array.isArray(e.layers))t.error("$.layers","expected array");else {let n=new Set;e.layers.forEach((r,i)=>{if(c_(t,r,`$.layers[${i}]`),r&&typeof r=="object"&&!Array.isArray(r)){let a=r.id;typeof a=="string"&&(n.has(a)&&t.error(`$.layers[${i}].id`,`duplicate layer id "${a}"`),n.add(a));}});}return t.errors.length>0?{valid:false,errors:t.errors}:{valid:true,errors:[],template:e}}var eo="squisq-custom-templates",ll="1",Xy=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Ad(e){return Xy.test(e)}function pl(e){if(!Xy.test(e))return null;let t=e.slice(1);return t.length===3&&(t=t.split("").map(n=>n+n).join("")),[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255]}function u_(e){let t=n=>Math.max(0,Math.min(255,Math.round(n*255))).toString(16).padStart(2,"0");return "#"+t(e[0])+t(e[1])+t(e[2])}function sl(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function xd(e){return e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055}function d_(e){let[t,n,r]=e,i=sl(t),a=sl(n),o=sl(r),s=.4122214708*i+.5363325363*a+.0514459929*o,l=.2119034982*i+.6806995451*a+.1073969566*o,c=.0883024619*i+.2817188376*a+.6299787005*o,d=Math.cbrt(s),u=Math.cbrt(l),f=Math.cbrt(c),m=.2104542553*d+.793617785*u-.0040720468*f,h=1.9779984951*d-2.428592205*u+.4505937099*f,y=.0259040371*d+.7827717662*u-.808675766*f,g=Math.sqrt(h*h+y*y),w=Math.atan2(y,h)*180/Math.PI;return w<0&&(w+=360),{L:m,C:g,h:w}}function m_({L:e,C:t,h:n}){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=e+.3963377774*i+.2158037573*a,s=e-.1055613458*i-.0638541728*a,l=e-.0894841775*i-1.291485548*a,c=o*o*o,d=s*s*s,u=l*l*l,f=4.0767416621*c-3.3077115913*d+.2309699292*u,m=-1.2684380046*c+2.6097574011*d-.3413193965*u,h=-0.0041960863*c-.7034186147*d+1.707614701*u;return [Math.max(0,Math.min(1,xd(f))),Math.max(0,Math.min(1,xd(m))),Math.max(0,Math.min(1,xd(h)))]}function to(e,t){let n=pl(e);if(!n)return e;let r=d_(n);return r.L=Math.max(0,Math.min(1,r.L+t)),u_(m_(r))}function or(e,t){return to(e,-t)}function Fn(e){let t=pl(e);if(!t)return 0;let[n,r,i]=t.map(sl);return .2126*n+.7152*r+.0722*i}function Cd(e){let t=pl(e);if(!t)return 0;let[n,r,i]=t,a=Math.max(n,r,i),o=Math.min(n,r,i);if(a===o)return 0;let s=a-o,l;return a===n?l=(r-i)/s%6:a===r?l=(i-n)/s+2:l=(n-r)/s+4,Math.round((l*60+360)%360)}function le(e,t){let n=pl(e);if(!n)return e;let r=Math.max(0,Math.min(1,t)),i=a=>Math.round(a*255);return `rgba(${i(n[0])}, ${i(n[1])}, ${i(n[2])}, ${r})`}function vd(e,t){let n=Fn(e),r=Fn(t),i=Math.max(n,r),a=Math.min(n,r);return (i+.05)/(a+.05)}function ii(e,t="#f7fafc",n="#1a202c"){return vd(e,n)>=vd(e,t)?n:t}var Id=["hero","banner","stat-band","quote-band","feature-split","media-figure","gallery","callout","card-grid","item-list","timeline-rail","table-section","canvas-embed","prose","footer"];var Md=["clean","editorial","brutalist","terminal","cinematic","documentary","organic","soft"],Ky=["compact","comfortable","generous"],Qy=["none","gap-only","hairline","thick-rule","double-rule","dotted"],Zy=["flat","alternate","accent-bands","tinted-panels"],Jy=["stacked","split","full-bleed","letterbox","oversized-type"],e0=["none","kicker","numbered","mono-tag"],t0=["regular","display","oversized"],n0=["none","uppercase"],r0=["none","accent-bar","full-rule"],i0=["flush","rounded","bordered","polaroid","letterboxed","circle-accent"],a0=["none","soft","crisp","heavy"],o0=["none","oversized-glyph","accent-bar"],s0=["plain","oversized","boxed","mono"],Td=["none","dots","grid","diagonal","noise"],qd=["lead","strong","standard","quiet"],Ld=["base","alternate","accent","media"],Pd=["primary-only","cycle","alternate-two","none"],f_=new Set(["serif","sans-serif","monospace","system-ui"]),zy=new Set(Id),p_=new Set(Md),h_=new Set(qd),g_=new Set(Ld),y_=new Set(Pd),b_={sectionSpacing:new Set(Ky),divider:new Set(Qy),backgroundRhythm:new Set(Zy),heroStyle:new Set(Jy),imageFraming:new Set(i0),shadow:new Set(a0),quoteMark:new Set(o0),numeralStyle:new Set(s0)},w_={eyebrow:{values:new Set(e0),required:true},scale:{values:new Set(t0),required:true},case:{values:new Set(n0),required:false},underline:{values:new Set(r0),required:false}},k_=new Set(["normal","bold"]),Uy=new Set(["dark-vignette","radial-dark","warm-sunset","cool-blue","earth-tones"]),x_=class{constructor(){this.errors=[];}err(e,t){this.errors.push({path:e,message:t});}isObject(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}isString(e){return typeof e=="string"}isNumber(e){return typeof e=="number"&&Number.isFinite(e)}isBoolean(e){return typeof e=="boolean"}hex(e,t){this.isString(t)?Ad(t)||this.err(e,`expected #rgb or #rrggbb hex color, got "${t}"`):this.err(e,`expected hex color string, got ${typeof t}`);}palette(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}let n=["primary","secondary","background","backgroundLight","text","textMuted","highlight","warning"];for(let r of n)this.hex(`${e}.${r}`,t[r]);}colorScheme(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}this.hex(`${e}.bg`,t.bg),this.hex(`${e}.text`,t.text),this.hex(`${e}.accent`,t.accent);}colorSchemes(e,t){if(!this.isObject(t)){this.err(e,"expected object map");return}for(let n of Object.keys(t))this.colorScheme(`${e}.${n}`,t[n]);}fontFamily(e,t){if(!this.isObject(t)){this.err(e,"expected FontFamily object ({ stackId } or { custom })");return}if("stackId"in t){(!this.isString(t.stackId)||t.stackId.length===0)&&this.err(`${e}.stackId`,"expected non-empty string");return}if("custom"in t){let n=t.custom;if(!this.isObject(n)){this.err(`${e}.custom`,"expected { name, fallback } object");return}!this.isString(n.name)||n.name.length===0?this.err(`${e}.custom.name`,"expected non-empty string"):(/[<>{};]/.test(n.name)||[...n.name].some(r=>{let i=r.codePointAt(0);return i<32||i===127}))&&this.err(`${e}.custom.name`,"font name contains control characters or CSS/HTML delimiters"),(!this.isString(n.fallback)||!f_.has(n.fallback))&&this.err(`${e}.custom.fallback`,"expected one of: serif, sans-serif, monospace, system-ui");return}this.err(e,"expected { stackId } or { custom: { name, fallback } }");}typography(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}this.fontFamily(`${e}.bodyFont`,t.bodyFont),this.fontFamily(`${e}.titleFont`,t.titleFont),t.monoFont!==void 0&&this.fontFamily(`${e}.monoFont`,t.monoFont);for(let n of ["titleScale","bodyScale","lineHeight","titleLineHeight"])t[n]!==void 0&&!this.isNumber(t[n])&&this.err(`${e}.${n}`,`expected number, got ${typeof t[n]}`);t.titleWeight!==void 0&&(!this.isString(t.titleWeight)||!k_.has(t.titleWeight))&&this.err(`${e}.titleWeight`,'expected "normal" or "bold"');}style(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.borderRadius!==void 0&&!this.isNumber(t.borderRadius)&&this.err(`${e}.borderRadius`,"expected number"),t.textShadow!==void 0&&!this.isBoolean(t.textShadow)&&this.err(`${e}.textShadow`,"expected boolean");for(let n of ["overlayOpacity","animationSpeed"])t[n]!==void 0&&!this.isNumber(t[n])&&this.err(`${e}.${n}`,"expected number");t.blockPadding!==void 0&&!this.isString(t.blockPadding)&&this.err(`${e}.blockPadding`,'expected string (percentage e.g. "5%")'),t.imageTreatment!==void 0&&this.imageTreatment(`${e}.imageTreatment`,t.imageTreatment),t.pip!==void 0&&this.pip(`${e}.pip`,t.pip);}pip(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.cornerRadius!==void 0&&!this.isNumber(t.cornerRadius)&&!this.isString(t.cornerRadius)&&this.err(`${e}.cornerRadius`,"expected number or string"),t.border!==void 0&&t.border!=="none"&&!this.isObject(t.border)&&this.err(`${e}.border`,"expected 'none' or { width?, color? }"),t.shadow!==void 0&&!this.isBoolean(t.shadow)&&!this.isString(t.shadow)&&this.err(`${e}.shadow`,"expected boolean or string");}imageTreatment(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}let n=["none","mono","duotone","warm","cool"];(!this.isString(t.type)||!n.includes(t.type))&&this.err(`${e}.type`,`expected one of ${n.join("|")}`),t.strength!==void 0&&!this.isNumber(t.strength)&&this.err(`${e}.strength`,"expected number (0..1)"),t.color!==void 0&&this.hex(`${e}.color`,t.color);}renderStyle(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}(!this.isString(t.name)||t.name.length===0)&&this.err(`${e}.name`,"expected non-empty string"),t.ambientMotion!==void 0&&!this.isBoolean(t.ambientMotion)&&this.err(`${e}.ambientMotion`,"expected boolean"),t.motionProfile!==void 0&&!ri(t.motionProfile)&&this.err(`${e}.motionProfile`,"expected calm | documentary | vibrant");for(let n of ["defaultTextAnimation","defaultImageAnimation"])t[n]!==void 0&&!this.isString(t[n])&&this.err(`${e}.${n}`,"expected animation type string");if(t.defaultTransition!==void 0){let n=t.defaultTransition;this.isObject(n)?((!this.isString(n.type)||!ol(n.type))&&this.err(`${e}.defaultTransition.type`,"expected valid transition type"),n.duration!==void 0&&!this.isNumber(n.duration)&&this.err(`${e}.defaultTransition.duration`,"expected number")):this.err(`${e}.defaultTransition`,"expected object");}if(t.layoutOverrides!==void 0&&!this.isObject(t.layoutOverrides)&&this.err(`${e}.layoutOverrides`,"expected object"),t.templateHints!==void 0)if(!this.isObject(t.templateHints))this.err(`${e}.templateHints`,"expected object map");else for(let n of Object.keys(t.templateHints)){let r=t.templateHints[n];if(!this.isObject(r)){this.err(`${e}.templateHints.${n}`,"expected object");continue}for(let i of Object.keys(r)){let o=typeof r[i];o!=="string"&&o!=="number"&&o!=="boolean"&&this.err(`${e}.templateHints.${n}.${i}`,`expected string|number|boolean, got ${o}`);}}}seedColors(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.primary===void 0?this.err(`${e}.primary`,"required when seedColors is present"):this.hex(`${e}.primary`,t.primary);for(let n of ["secondary","accent","background","text"])t[n]!==void 0&&this.hex(`${e}.${n}`,t[n]);}persistentLayer(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}if("template"in t){if(!this.isString(t.template)){this.err(`${e}.template`,"expected string");return}let n=t.config;if(!this.isObject(n)){this.err(`${e}.config`,"expected object");return}if(n.type!==t.template&&this.err(`${e}.config.type`,`expected "${t.template}", got "${String(n.type)}"`),t.template==="gradientBackground"&&n.preset!==void 0&&(!this.isString(n.preset)||!Uy.has(n.preset))&&this.err(`${e}.config.preset`,`expected one of: ${Array.from(Uy).join(", ")}`),t.template==="gradientBackground"&&"gradient"in n&&this.err(`${e}.config.gradient`,"raw CSS gradient strings are not allowed in Theme JSON; use a `preset`"),t.template==="patternBackground"){let r=["dots","grid","diagonal","noise"];(!this.isString(n.pattern)||!r.includes(n.pattern))&&this.err(`${e}.config.pattern`,`expected one of ${r.join("|")}`);for(let i of ["opacity","scale"])n[i]!==void 0&&!this.isNumber(n[i])&&this.err(`${e}.config.${i}`,"expected number");n.color!==void 0&&this.hex(`${e}.config.color`,n.color);}if(t.template==="vignette"&&(n.strength!==void 0&&!this.isNumber(n.strength)&&this.err(`${e}.config.strength`,"expected number (0..1)"),n.color!==void 0&&this.hex(`${e}.config.color`,n.color)),t.template==="ambientGradient"){n.duration!==void 0&&!this.isNumber(n.duration)&&this.err(`${e}.config.duration`,"expected number (seconds)");for(let r of ["from","to"])n[r]!==void 0&&this.hex(`${e}.config.${r}`,n[r]);}}}persistentLayers(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}for(let n of ["bottomLayers","topLayers"]){let r=t[n];if(r!==void 0){if(!Array.isArray(r)){this.err(`${e}.${n}`,"expected array");continue}r.forEach((i,a)=>this.persistentLayer(`${e}.${n}[${a}]`,i));}}}scalarHints(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}for(let n of Object.keys(t)){let r=typeof t[n];r!=="string"&&r!=="number"&&r!=="boolean"&&this.err(`${e}.${n}`,`expected string|number|boolean, got ${r}`);}}pageSectionOverride(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}t.kind!==void 0&&(!this.isString(t.kind)||!zy.has(t.kind))&&this.err(`${e}.kind`,`expected one of: ${Id.join(", ")}`),t.variant!==void 0&&!this.isString(t.variant)&&this.err(`${e}.variant`,"expected string"),t.emphasis!==void 0&&(!this.isString(t.emphasis)||!h_.has(t.emphasis))&&this.err(`${e}.emphasis`,`expected one of: ${qd.join(", ")}`),t.background!==void 0&&(!this.isString(t.background)||!g_.has(t.background))&&this.err(`${e}.background`,`expected one of: ${Ld.join(", ")}`),t.hints!==void 0&&this.scalarHints(`${e}.hints`,t.hints);}pageTokens(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}for(let r of ["contentMaxWidth","wideMaxWidth","cornerRadius"])this.isNumber(t[r])||this.err(`${e}.${r}`,"expected number");for(let[r,i]of Object.entries(b_))(!this.isString(t[r])||!i.has(t[r]))&&this.err(`${e}.${r}`,`expected one of: ${Array.from(i).join(", ")}`);t.pattern!==void 0&&(!this.isString(t.pattern)||!Td.includes(t.pattern))&&this.err(`${e}.pattern`,`expected one of: ${Td.join(", ")}`);let n=t.headingTreatment;if(!this.isObject(n)){this.err(`${e}.headingTreatment`,"expected object");return}for(let[r,i]of Object.entries(w_)){let a=n[r];if(a===void 0){i.required&&this.err(`${e}.headingTreatment.${r}`,"required");continue}(!this.isString(a)||!i.values.has(a))&&this.err(`${e}.headingTreatment.${r}`,`expected one of: ${Array.from(i.values).join(", ")}`);}}pageStyle(e,t){if(!this.isObject(t)){this.err(e,"expected object");return}if((!this.isString(t.family)||!p_.has(t.family))&&this.err(`${e}.family`,`expected one of: ${Md.join(", ")}`),t.tokens===void 0?this.err(`${e}.tokens`,"required"):this.pageTokens(`${e}.tokens`,t.tokens),t.sections!==void 0)if(!this.isObject(t.sections))this.err(`${e}.sections`,"expected object map");else for(let n of Object.keys(t.sections)){if(!zy.has(n)){this.err(`${e}.sections.${n}`,"unknown section kind");continue}this.pageSectionOverride(`${e}.sections.${n}`,t.sections[n]);}if(t.templates!==void 0)if(!this.isObject(t.templates))this.err(`${e}.templates`,"expected object map");else for(let n of Object.keys(t.templates))this.pageSectionOverride(`${e}.templates.${n}`,t.templates[n]);if(t.accentRotation===void 0)this.err(`${e}.accentRotation`,"required");else if(!this.isObject(t.accentRotation))this.err(`${e}.accentRotation`,"expected object");else {let n=t.accentRotation;(!this.isString(n.strategy)||!y_.has(n.strategy))&&this.err(`${e}.accentRotation.strategy`,`expected one of: ${Pd.join(", ")}`),n.schemes!==void 0&&(!Array.isArray(n.schemes)||n.schemes.some(r=>typeof r!="string"))&&this.err(`${e}.accentRotation.schemes`,"expected array of strings");}}};function hl(e){let t=new x_;return t.isObject(e)?(e.schemaVersion!==ll&&t.err("schemaVersion",`expected "${ll}", got "${String(e.schemaVersion)}"`),(!t.isString(e.id)||e.id.length===0)&&t.err("id","expected non-empty string"),(!t.isString(e.name)||e.name.length===0)&&t.err("name","expected non-empty string"),e.description!==void 0&&!t.isString(e.description)&&t.err("description","expected string"),e.basedOn!==void 0&&!t.isString(e.basedOn)&&t.err("basedOn","expected string"),e.seedColors!==void 0&&t.seedColors("seedColors",e.seedColors),e.colors===void 0?t.err("colors","required"):t.palette("colors",e.colors),e.typography===void 0?t.err("typography","required"):t.typography("typography",e.typography),e.style===void 0?t.err("style","required"):t.style("style",e.style),e.renderStyle===void 0?t.err("renderStyle","required"):t.renderStyle("renderStyle",e.renderStyle),e.colorSchemes===void 0?t.err("colorSchemes","required"):t.colorSchemes("colorSchemes",e.colorSchemes),e.persistentLayers!==void 0&&t.persistentLayers("persistentLayers",e.persistentLayers),e.pageStyle!==void 0&&t.pageStyle("pageStyle",e.pageStyle),t.errors.length===0?{valid:true,errors:[],theme:e}:{valid:false,errors:t.errors}):{valid:false,errors:[{path:"",message:"expected object"}]}}function dn(e,t="theme"){let n=hl(e);if(!n.valid||!n.theme){let r=n.errors.slice(0,5).map(a=>` ${a.path||"<root>"}: ${a.message}`).join(`
|
|
2
2
|
`),i=n.errors.length>5?`
|
|
3
3
|
... and ${n.errors.length-5} more`:"";throw new Error(`Invalid ${t}:
|
|
4
4
|
${r}${i}`)}return n.theme}function Rt(e,t=new WeakMap){if(e===null||typeof e!="object")return e;let n=t.get(e);if(n!==void 0)return n;let r=Object.prototype.toString.call(e);if(r==="[object ArrayBuffer]"){let o=new Uint8Array(e),s=new Uint8Array(o.byteLength);return s.set(o),s.buffer}if(r==="[object Date]")return new Date(Date.prototype.getTime.call(e));if(Array.isArray(e)){let o=[];t.set(e,o);for(let s of e)o.push(Rt(s,t));return o}let i=e,a={};t.set(e,a);for(let o of Object.keys(i))Object.defineProperty(a,o,{value:Rt(i[o],t),enumerable:true,configurable:true,writable:true});return a}function l0(e,t=new WeakSet){if(e===null||typeof e!="object"||t.has(e))return e;t.add(e);for(let n of Object.keys(e))l0(e[n],t);return Object.freeze(e)}function v_(e){return l0(Rt(e))}var no="squisq-custom-themes";var gl={id:"light",background:"#ffffff",backgroundLight:"#f5f5f5",text:"#1a1a1a",textMuted:"#666666"},Rd={id:"dark",background:"#1a202c",backgroundLight:"#2d3748",text:"#f0f0f0",textMuted:"#a0aec0"};function ro(e,t){return {...e,colors:{...e.colors,background:t.background,backgroundLight:t.backgroundLight,text:t.text,textMuted:t.textMuted}}}var T_={schemaVersion:"1",id:"standard",name:"Standard Light",description:"Clean and safe \u2014 black-on-white, system fonts only, no external font dependencies. Default theme.",colors:{primary:"#2563eb",secondary:"#475569",background:"#ffffff",backgroundLight:"#f1f5f9",text:"#0f172a",textMuted:"#475569",highlight:"#1d4ed8",warning:"#dc2626"},typography:{bodyFont:{stackId:"system-sans"},titleFont:{stackId:"system-serif"},monoFont:{stackId:"system-mono"},titleWeight:"bold"},style:{textShadow:false,overlayOpacity:.35,animationSpeed:1},renderStyle:{name:"standard",defaultTextAnimation:"fadeIn",ambientMotion:false,defaultTransition:{type:"fade",duration:.7}},colorSchemes:{blue:{bg:"#dbeafe",text:"#1d4ed8",accent:"#2563eb"},green:{bg:"#dcfce7",text:"#166534",accent:"#16a34a"},purple:{bg:"#ede9fe",text:"#5b21b6",accent:"#7c3aed"},red:{bg:"#fee2e2",text:"#991b1b",accent:"#dc2626"},orange:{bg:"#ffedd5",text:"#9a3412",accent:"#ea580c"},teal:{bg:"#ccfbf1",text:"#115e59",accent:"#0d9488"}},pageStyle:{family:"clean",tokens:{contentMaxWidth:760,wideMaxWidth:1100,sectionSpacing:"comfortable",cornerRadius:8,divider:"hairline",backgroundRhythm:"alternate",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"none"},imageFraming:"rounded",shadow:"soft",quoteMark:"accent-bar",numeralStyle:"plain"},accentRotation:{strategy:"cycle"}}},E_={schemaVersion:"1",id:"standard-dark",name:"Standard Dark",description:"Standard, dark variant. System fonts, dark navy background, light text.",colors:{primary:"#3182ce",secondary:"#4a5568",background:"#1a202c",backgroundLight:"#2d3748",text:"#f7fafc",textMuted:"#a0aec0",highlight:"#4299e1",warning:"#fc8181"},typography:{bodyFont:{stackId:"system-sans"},titleFont:{stackId:"system-serif"},monoFont:{stackId:"system-mono"},titleWeight:"bold"},style:{textShadow:true,overlayOpacity:.45,animationSpeed:1},renderStyle:{name:"standard",defaultTextAnimation:"fadeIn",ambientMotion:false,defaultTransition:{type:"fade",duration:.7}},colorSchemes:{blue:{bg:"#1a365d",text:"#63b3ed",accent:"#90cdf4"},green:{bg:"#22543d",text:"#9ae6b4",accent:"#68d391"},purple:{bg:"#44337a",text:"#d6bcfa",accent:"#b794f4"},red:{bg:"#742a2a",text:"#fc8181",accent:"#feb2b2"},orange:{bg:"#744210",text:"#fbd38d",accent:"#f6ad55"},teal:{bg:"#234e52",text:"#81e6d9",accent:"#4fd1c5"}},persistentLayers:{bottomLayers:[{template:"gradientBackground",config:{type:"gradientBackground",preset:"dark-vignette"}}]},pageStyle:{family:"clean",tokens:{contentMaxWidth:760,wideMaxWidth:1100,sectionSpacing:"comfortable",cornerRadius:8,divider:"hairline",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"none"},imageFraming:"rounded",shadow:"none",quoteMark:"accent-bar",numeralStyle:"oversized"},accentRotation:{strategy:"cycle"}}},S_={schemaVersion:"1",id:"documentary",name:"Documentary",description:"Classic dark cinematic look with elegant serif typography.",colors:{primary:"#3d5a80",secondary:"#63b3ed",background:"#1a202c",backgroundLight:"#2d3748",text:"#ffffff",textMuted:"#a0aec0",highlight:"#63b3ed",warning:"#fc8181"},typography:{bodyFont:{stackId:"source-serif"},titleFont:{stackId:"playfair"},titleWeight:"bold"},style:{textShadow:true,overlayOpacity:.5,animationSpeed:1,imageTreatment:{type:"mono",strength:.35}},renderStyle:{name:"documentary",defaultTextAnimation:"fadeIn",defaultImageAnimation:"slowZoom",ambientMotion:true,motionProfile:"documentary",defaultTransition:{type:"fade",duration:.8}},colorSchemes:{blue:{bg:"#22354d",text:"#a8c3e0",accent:"#7fa3c9"},green:{bg:"#26382e",text:"#a9c6ae",accent:"#82a88a"},purple:{bg:"#35304a",text:"#beb3d6",accent:"#9d8fc2"},red:{bg:"#45262a",text:"#d9a2a2",accent:"#c37f7c"},orange:{bg:"#453522",text:"#d9bb90",accent:"#c29a64"},teal:{bg:"#1f3a3d",text:"#9cc4c4",accent:"#6fa5a5"}},persistentLayers:{bottomLayers:[{template:"gradientBackground",config:{type:"gradientBackground",preset:"dark-vignette"}}],topLayers:[{template:"vignette",config:{type:"vignette",strength:.25}}]},pageStyle:{family:"documentary",tokens:{contentMaxWidth:680,wideMaxWidth:1e3,sectionSpacing:"generous",cornerRadius:2,divider:"thick-rule",backgroundRhythm:"flat",heroStyle:"letterbox",headingTreatment:{eyebrow:"numbered",scale:"display",underline:"none"},imageFraming:"letterboxed",shadow:"none",quoteMark:"accent-bar",numeralStyle:"boxed"},sections:{"quote-band":{variant:"editorial"}},accentRotation:{strategy:"primary-only"}}},__={schemaVersion:"1",id:"minimalist",name:"Minimalist",description:"Clean near-white background with sans-serif type and minimal animation.",colors:{primary:"#2d3748",secondary:"#4a5568",background:"#f7fafc",backgroundLight:"#edf2f7",text:"#1a202c",textMuted:"#718096",highlight:"#3182ce",warning:"#e53e3e"},typography:{bodyFont:{stackId:"inter"},titleFont:{stackId:"inter"},titleWeight:"bold",lineHeight:1.6},style:{textShadow:false,overlayOpacity:.3,animationSpeed:1.2,borderRadius:8},renderStyle:{name:"minimalist",defaultTextAnimation:"fadeIn",ambientMotion:false,defaultTransition:{type:"fade",duration:.6},templateHints:{title:{showAccentLine:false}}},colorSchemes:{blue:{bg:"#ebf8ff",text:"#2b6cb0",accent:"#3182ce"},green:{bg:"#f0fff4",text:"#276749",accent:"#38a169"},purple:{bg:"#faf5ff",text:"#553c9a",accent:"#805ad5"},red:{bg:"#fff5f5",text:"#c53030",accent:"#e53e3e"},orange:{bg:"#fffaf0",text:"#c05621",accent:"#dd6b20"},teal:{bg:"#e6fffa",text:"#285e61",accent:"#319795"}},pageStyle:{family:"clean",tokens:{contentMaxWidth:720,wideMaxWidth:1e3,sectionSpacing:"generous",cornerRadius:8,divider:"gap-only",backgroundRhythm:"flat",heroStyle:"stacked",headingTreatment:{eyebrow:"none",scale:"display",underline:"none"},imageFraming:"flush",shadow:"none",quoteMark:"none",numeralStyle:"plain"},sections:{"quote-band":{emphasis:"quiet"}},accentRotation:{strategy:"primary-only"}}},A_={schemaVersion:"1",id:"bold",name:"Bold",description:"High-contrast black with vivid accents and dramatic animations.",colors:{primary:"#e53e3e",secondary:"#ed8936",background:"#000000",backgroundLight:"#1a1a1a",text:"#ffffff",textMuted:"#cbd5e0",highlight:"#f6e05e",warning:"#fc8181"},typography:{bodyFont:{stackId:"roboto"},titleFont:{stackId:"oswald"},titleWeight:"bold",titleScale:1.15,bodyScale:1,titleLineHeight:1.1},style:{textShadow:true,overlayOpacity:.6,animationSpeed:.8},renderStyle:{name:"bold",defaultTextAnimation:"zoomIn",defaultImageAnimation:"slowZoom",ambientMotion:true,motionProfile:"vibrant",defaultTransition:{type:"dissolve",duration:.5},templateHints:{statHighlight:{entrance:"dramatic"},fullBleedQuote:{entrance:"dramatic"}}},colorSchemes:{blue:{bg:"#1a202c",text:"#63b3ed",accent:"#90cdf4"},green:{bg:"#1a202c",text:"#48bb78",accent:"#68d391"},purple:{bg:"#1a202c",text:"#b794f4",accent:"#d6bcfa"},red:{bg:"#1a202c",text:"#fc8181",accent:"#feb2b2"},orange:{bg:"#1a202c",text:"#f6ad55",accent:"#fbd38d"},teal:{bg:"#1a202c",text:"#4fd1c5",accent:"#81e6d9"}},pageStyle:{family:"brutalist",tokens:{contentMaxWidth:760,wideMaxWidth:1200,sectionSpacing:"compact",cornerRadius:0,divider:"thick-rule",backgroundRhythm:"accent-bands",heroStyle:"oversized-type",headingTreatment:{eyebrow:"kicker",scale:"oversized",case:"uppercase"},imageFraming:"bordered",shadow:"heavy",quoteMark:"none",numeralStyle:"oversized"},sections:{"quote-band":{background:"accent"}},accentRotation:{strategy:"cycle"}}},C_={schemaVersion:"1",id:"morning-light",name:"Morning Light",description:"Warm light background with dark text and gentle serif typography.",colors:{primary:"#744210",secondary:"#975a16",background:"#faf8f5",backgroundLight:"#f5f0eb",text:"#2d3748",textMuted:"#718096",highlight:"#dd6b20",warning:"#c53030"},typography:{bodyFont:{stackId:"lora"},titleFont:{stackId:"merriweather"},titleWeight:"bold",lineHeight:1.7},style:{textShadow:false,overlayOpacity:.35,animationSpeed:1.1,borderRadius:4},renderStyle:{name:"morning-light",defaultTextAnimation:"fadeIn",ambientMotion:false,defaultTransition:{type:"fade",duration:1}},colorSchemes:{blue:{bg:"#ebf8ff",text:"#2c5282",accent:"#4299e1"},green:{bg:"#f0fff4",text:"#22543d",accent:"#48bb78"},purple:{bg:"#faf5ff",text:"#44337a",accent:"#9f7aea"},red:{bg:"#fff5f5",text:"#9b2c2c",accent:"#fc8181"},orange:{bg:"#fffaf0",text:"#744210",accent:"#ed8936"},teal:{bg:"#e6fffa",text:"#234e52",accent:"#38b2ac"}},persistentLayers:{topLayers:[{template:"patternBackground",config:{type:"patternBackground",pattern:"noise",opacity:.03}}]},pageStyle:{family:"soft",tokens:{contentMaxWidth:760,wideMaxWidth:1100,sectionSpacing:"comfortable",cornerRadius:14,divider:"dotted",backgroundRhythm:"tinted-panels",heroStyle:"split",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"none"},imageFraming:"rounded",shadow:"soft",quoteMark:"oversized-glyph",numeralStyle:"plain",pattern:"noise"},sections:{callout:{hints:{framing:"circle-accent"}}},accentRotation:{strategy:"alternate-two"}}},I_={schemaVersion:"1",id:"tech-dark",name:"Tech Dark",description:"True black with neon cyan/green accents and monospace titles.",colors:{primary:"#00e5ff",secondary:"#00e676",background:"#0a0a0a",backgroundLight:"#1a1a2e",text:"#e0e0e0",textMuted:"#9e9e9e",highlight:"#00e5ff",warning:"#ff5252"},typography:{bodyFont:{stackId:"ibm-plex-sans"},titleFont:{stackId:"jetbrains-mono"},monoFont:{stackId:"jetbrains-mono"},titleWeight:"bold",titleScale:.9,lineHeight:1.5},style:{textShadow:true,overlayOpacity:.55,animationSpeed:.9,borderRadius:2,imageTreatment:{type:"cool",strength:.45}},renderStyle:{name:"tech-dark",defaultTextAnimation:"typewriter",defaultImageAnimation:"slowZoom",ambientMotion:true,motionProfile:"vibrant",defaultTransition:{type:"dissolve",duration:.4},templateHints:{statHighlight:{entrance:"dramatic"}}},colorSchemes:{blue:{bg:"#0d1b2a",text:"#00b0ff",accent:"#40c4ff"},green:{bg:"#0d1b0d",text:"#00e676",accent:"#69f0ae"},purple:{bg:"#1a0d2e",text:"#d500f9",accent:"#ea80fc"},red:{bg:"#2e0d0d",text:"#ff5252",accent:"#ff8a80"},orange:{bg:"#2e1a0d",text:"#ff9100",accent:"#ffab40"},teal:{bg:"#0d2e2e",text:"#1de9b6",accent:"#64ffda"}},persistentLayers:{topLayers:[{template:"patternBackground",config:{type:"patternBackground",pattern:"grid",color:"#00e5ff",opacity:.04,scale:1.5}}]},pageStyle:{family:"terminal",tokens:{contentMaxWidth:820,wideMaxWidth:1200,sectionSpacing:"compact",cornerRadius:2,divider:"hairline",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"mono-tag",scale:"regular",underline:"none"},imageFraming:"bordered",shadow:"none",quoteMark:"none",numeralStyle:"mono",pattern:"grid"},templates:{diagram:{hints:{frame:"terminal"}},tree:{hints:{frame:"terminal"}},timeline:{hints:{frame:"terminal"}}},accentRotation:{strategy:"primary-only"}}},M_={schemaVersion:"1",id:"magazine",name:"Magazine",description:"Rich editorial palette with mixed serif/sans typography and slide transitions.",colors:{primary:"#c53030",secondary:"#2b6cb0",background:"#1a202c",backgroundLight:"#2d3748",text:"#f7fafc",textMuted:"#cbd5e0",highlight:"#ed8936",warning:"#fc8181"},typography:{bodyFont:{stackId:"dm-sans"},titleFont:{stackId:"dm-serif"},titleWeight:"bold",titleScale:1.05,lineHeight:1.5},style:{textShadow:true,overlayOpacity:.45,animationSpeed:1,borderRadius:6},renderStyle:{name:"magazine",defaultTextAnimation:"fadeIn",defaultImageAnimation:"slowZoom",ambientMotion:true,defaultTransition:{type:"slideLeft",duration:.7}},colorSchemes:{blue:{bg:"#1d3a6e",text:"#a3c9f5",accent:"#4d9de0"},green:{bg:"#14532d",text:"#86efac",accent:"#22c55e"},purple:{bg:"#3b2a70",text:"#c4b5fd",accent:"#a78bfa"},red:{bg:"#7f1d1d",text:"#fca5a5",accent:"#f87171"},orange:{bg:"#7c2d12",text:"#fdba74",accent:"#f97316"},teal:{bg:"#134e4a",text:"#5eead4",accent:"#14b8a6"}},persistentLayers:{topLayers:[{template:"patternBackground",config:{type:"patternBackground",pattern:"diagonal",color:"#f7fafc",opacity:.03,scale:1.2}}]},pageStyle:{family:"editorial",tokens:{contentMaxWidth:720,wideMaxWidth:1240,sectionSpacing:"comfortable",cornerRadius:6,divider:"double-rule",backgroundRhythm:"flat",heroStyle:"split",headingTreatment:{eyebrow:"kicker",scale:"display",underline:"none"},imageFraming:"flush",shadow:"none",quoteMark:"oversized-glyph",numeralStyle:"oversized",pattern:"diagonal"},sections:{prose:{hints:{dropCap:true}},"feature-split":{hints:{alternate:true}}},accentRotation:{strategy:"alternate-two"}}},q_={schemaVersion:"1",id:"cinematic",name:"Cinematic",description:"Ultra-dark with moody gradients, gold accents, and slow dissolve transitions.",colors:{primary:"#d69e2e",secondary:"#b7791f",background:"#0a0f1a",backgroundLight:"#1a202c",text:"#f7fafc",textMuted:"#a0aec0",highlight:"#ecc94b",warning:"#fc8181"},typography:{bodyFont:{stackId:"crimson"},titleFont:{stackId:"cormorant"},titleWeight:"bold",lineHeight:1.5,titleLineHeight:1.2},style:{textShadow:true,overlayOpacity:.55,animationSpeed:1.2,imageTreatment:{type:"warm",strength:.5}},renderStyle:{name:"cinematic",defaultTextAnimation:"fadeIn",defaultImageAnimation:"slowZoom",ambientMotion:true,motionProfile:"documentary",defaultTransition:{type:"dissolve",duration:1.2},templateHints:{title:{showAccentLine:true}}},colorSchemes:{blue:{bg:"#0f1d33",text:"#9db8dc",accent:"#5d84b8"},green:{bg:"#10251c",text:"#9ecfae",accent:"#55a878"},purple:{bg:"#1f1433",text:"#c3aede",accent:"#8f74c0"},red:{bg:"#2e1114",text:"#e0959a",accent:"#c05f66"},orange:{bg:"#2e1d0b",text:"#e3b978",accent:"#d69e2e"},teal:{bg:"#0d2626",text:"#93cfc7",accent:"#4d9e94"}},persistentLayers:{bottomLayers:[{template:"gradientBackground",config:{type:"gradientBackground",preset:"radial-dark"}}],topLayers:[{template:"vignette",config:{type:"vignette",strength:.35}},{template:"patternBackground",config:{type:"patternBackground",pattern:"noise",opacity:.05}}]},pageStyle:{family:"cinematic",tokens:{contentMaxWidth:760,wideMaxWidth:1100,sectionSpacing:"generous",cornerRadius:0,divider:"gap-only",backgroundRhythm:"flat",heroStyle:"full-bleed",headingTreatment:{eyebrow:"kicker",scale:"display",case:"uppercase"},imageFraming:"letterboxed",shadow:"none",quoteMark:"none",numeralStyle:"oversized",pattern:"noise"},sections:{"quote-band":{hints:{vignette:true}}},accentRotation:{strategy:"primary-only"}}},L_={schemaVersion:"1",id:"warm-earth",name:"Warm Earth",description:"Natural warm tones with earthy browns and terracotta accents.",colors:{primary:"#9c4221",secondary:"#c05621",background:"#1c1410",backgroundLight:"#2d241e",text:"#faf5f0",textMuted:"#c4a882",highlight:"#dd6b20",warning:"#e53e3e"},typography:{bodyFont:{stackId:"pt-serif"},titleFont:{stackId:"pt-serif"},titleWeight:"bold",lineHeight:1.6},style:{textShadow:true,overlayOpacity:.5,animationSpeed:1.1},renderStyle:{name:"warm-earth",defaultTextAnimation:"fadeIn",defaultImageAnimation:"panLeft",ambientMotion:true,motionProfile:"documentary",defaultTransition:{type:"fade",duration:.9}},colorSchemes:{blue:{bg:"#2a1f14",text:"#90cdf4",accent:"#63b3ed"},green:{bg:"#1e2a14",text:"#9ae6b4",accent:"#68d391"},purple:{bg:"#2a142a",text:"#d6bcfa",accent:"#b794f4"},red:{bg:"#2a1414",text:"#fc8181",accent:"#feb2b2"},orange:{bg:"#2a1e0a",text:"#fbd38d",accent:"#f6ad55"},teal:{bg:"#142a28",text:"#81e6d9",accent:"#4fd1c5"}},persistentLayers:{bottomLayers:[{template:"gradientBackground",config:{type:"gradientBackground",preset:"earth-tones"}}]},pageStyle:{family:"organic",tokens:{contentMaxWidth:740,wideMaxWidth:1080,sectionSpacing:"comfortable",cornerRadius:12,divider:"thick-rule",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",underline:"accent-bar"},imageFraming:"polaroid",shadow:"soft",quoteMark:"oversized-glyph",numeralStyle:"boxed"},accentRotation:{strategy:"alternate-two"}}},P_={schemaVersion:"1",id:"gezellig",name:"Gezellig",description:"Cozy, warm-hued palette with a subtle orange-tinted dark background, cream text, and sage and terracotta accents.",colors:{primary:"#b0724c",secondary:"#667f62",background:"#1f1a17",backgroundLight:"#2b2420",text:"#f3ede0",textMuted:"#a89b85",highlight:"#c0875d",warning:"#e07a6b"},typography:{bodyFont:{stackId:"system-sans-emoji"},titleFont:{stackId:"system-serif-emoji"},monoFont:{stackId:"system-mono"},titleWeight:"bold",lineHeight:1.55},style:{textShadow:false,overlayOpacity:.4,animationSpeed:1,borderRadius:6,imageTreatment:{type:"warm",strength:.3}},renderStyle:{name:"gezellig",defaultTextAnimation:"fadeIn",defaultImageAnimation:"slowZoom",ambientMotion:false,defaultTransition:{type:"fade",duration:.6}},colorSchemes:{terracotta:{bg:"#3d2620",text:"#f3ede0",accent:"#c0875d"},sage:{bg:"#28332a",text:"#e3ead9",accent:"#8aa589"},amber:{bg:"#3d2e17",text:"#fbe3a8",accent:"#d4a149"},plum:{bg:"#2e1f2a",text:"#e8d4e0",accent:"#b088a5"},ink:{bg:"#1a1f26",text:"#d5dde8",accent:"#7b8fa8"},cream:{bg:"#f3ede0",text:"#2b2420",accent:"#b0724c"}},persistentLayers:{topLayers:[{template:"patternBackground",config:{type:"patternBackground",pattern:"noise",opacity:.04}}]},pageStyle:{family:"soft",tokens:{contentMaxWidth:740,wideMaxWidth:1060,sectionSpacing:"comfortable",cornerRadius:16,divider:"dotted",backgroundRhythm:"tinted-panels",heroStyle:"stacked",headingTreatment:{eyebrow:"kicker",scale:"regular",case:"none"},imageFraming:"circle-accent",shadow:"soft",quoteMark:"oversized-glyph",numeralStyle:"plain",pattern:"noise"},sections:{"quote-band":{background:"alternate"}},accentRotation:{strategy:"alternate-two"}}},R_=dn(T_,"standard.json"),N_=dn(E_,"standard-dark.json"),D_=dn(S_,"documentary.json"),O_=dn(__,"minimalist.json"),F_=dn(A_,"bold.json"),B_=dn(C_,"morning-light.json"),$_=dn(I_,"tech-dark.json"),H_=dn(M_,"magazine.json"),z_=dn(q_,"cinematic.json"),U_=dn(L_,"warm-earth.json"),j_=dn(P_,"gezellig.json"),W_={standard:R_,"standard-dark":N_,documentary:D_,minimalist:O_,bold:F_,"morning-light":B_,"tech-dark":$_,magazine:H_,cinematic:z_,"warm-earth":U_,gezellig:j_},cl=Object.freeze(Object.fromEntries(Object.entries(W_).map(([e,t])=>[e,v_(t)]))),c0="standard",tt=cl[c0];function yl(e,t){let n=e?t?.get(e):void 0;return n||(e&&e in cl?cl[e]:tt)}var Nd=[{id:"system-sans",label:"System Sans",family:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',kind:"sans"},{id:"system-serif",label:"System Serif",family:'Georgia, "Times New Roman", serif',kind:"serif"},{id:"system-mono",label:"System Mono",family:'Consolas, "Courier New", monospace',kind:"mono"},{id:"inter",label:"Inter",family:'"Inter", "Segoe UI", Roboto, sans-serif',kind:"sans",googleFontFamily:"Inter"},{id:"ibm-plex-sans",label:"IBM Plex Sans",family:'"IBM Plex Sans", "Segoe UI", Roboto, sans-serif',kind:"sans",googleFontFamily:"IBM Plex Sans"},{id:"roboto",label:"Roboto",family:'"Roboto", "Segoe UI", Arial, sans-serif',kind:"sans",googleFontFamily:"Roboto"},{id:"dm-sans",label:"DM Sans",family:'"DM Sans", "Segoe UI", Roboto, sans-serif',kind:"sans",googleFontFamily:"DM Sans"},{id:"oswald",label:"Oswald",family:'"Oswald", "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed", sans-serif',kind:"display",googleFontFamily:"Oswald"},{id:"playfair",label:"Playfair Display",family:'"Playfair Display", Georgia, serif',kind:"serif",googleFontFamily:"Playfair Display"},{id:"source-serif",label:"Source Serif",family:'"Source Serif 4", "PT Serif", Georgia, serif',kind:"serif",googleFontFamily:"Source Serif 4"},{id:"merriweather",label:"Merriweather",family:'"Merriweather", Georgia, serif',kind:"serif",googleFontFamily:"Merriweather"},{id:"lora",label:"Lora",family:'"Lora", "Merriweather", Georgia, serif',kind:"serif",googleFontFamily:"Lora"},{id:"pt-serif",label:"PT Serif",family:'"PT Serif", Georgia, serif',kind:"serif",googleFontFamily:"PT Serif"},{id:"crimson",label:"Crimson Text",family:'"Crimson Text", Georgia, serif',kind:"serif",googleFontFamily:"Crimson Text"},{id:"cormorant",label:"Cormorant Garamond",family:'"Cormorant Garamond", Garamond, Georgia, serif',kind:"serif",googleFontFamily:"Cormorant Garamond"},{id:"dm-serif",label:"DM Serif Display",family:'"DM Serif Display", Georgia, serif',kind:"display",googleFontFamily:"DM Serif Display"},{id:"jetbrains-mono",label:"JetBrains Mono",family:'"JetBrains Mono", "Fira Code", Consolas, monospace',kind:"mono",googleFontFamily:"JetBrains Mono"},{id:"system-sans-emoji",label:"System Sans + Emoji",family:'system-ui, -apple-system, "Segoe UI", Roboto, "OpenMoji Color", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif',kind:"sans"},{id:"system-serif-emoji",label:"System Serif + Emoji",family:'Georgia, "Times New Roman", "OpenMoji Color", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", serif',kind:"serif"}],V_=Object.fromEntries(Nd.map(e=>[e.id,e]));var G_={sans:"system-ui, sans-serif"};function wt(e,t){if(!e)return t;if(typeof e=="string")return e;if("stackId"in e){let n=V_[e.stackId];return n?n.family:t}if("custom"in e){let{name:n,fallback:r}=e.custom,i=r==="system-ui"?"system-ui, sans-serif":r==="serif"?"Georgia, serif":r==="monospace"?"Consolas, monospace":"system-ui, sans-serif";return `${`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[\n\r\f]/g,o=>`\\${o.codePointAt(0).toString(16)} `).replace(/</g,"\\3c ")}"`}, ${i}`}return t}var Dd=G_;function jy(e){return e.trim().replace(/^["']+|["']+$/g,"").replace(/\s+/g," ").toLowerCase()}(()=>{let e={};for(let t of Nd)e[jy(t.label)]=t.id,t.googleFontFamily&&(e[jy(t.googleFontFamily)]=t.id);return Object.assign(e,{playfair:"playfair","source serif":"source-serif","source serif pro":"source-serif","crimson pro":"crimson",cormorant:"cormorant",georgia:"system-serif","times new roman":"system-serif",times:"system-serif",consolas:"system-mono","courier new":"system-mono",courier:"system-mono","segoe ui":"system-sans","system-ui":"system-sans"}),e})();var Q_=.001;function Od(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(t+Q_>=r.startTime&&t<r.startTime+r.duration)return r}return e[0]||null}function io(e,t){if(!e||!e.phrases.length)return null;for(let n of e.phrases)if(t>=n.startTime&&t<n.endTime)return n;return null}var Z_="0 0.75em 2em rgba(0, 0, 0, 0.34)",u0="max(1px, 0.12vw)";function J_(e){return typeof e=="number"?`${e}px`:e}function eA(e){let t=e.style.pip?.cornerRadius;if(t!=null)return typeof t=="number"?t<=0?"0":`${t}px`:t;let n=e.style.borderRadius??0;return n<=0?"0":`${Math.min(28,Math.max(6,Math.round(n)))}%`}function tA(e){let t=e.style.pip?.border;if(t==="none")return "none";if(t&&typeof t=="object"){let n=t.width==null?u0:J_(t.width),r=t.color??le(e.colors.text,.35);return `${n} solid ${r}`}return `${u0} solid ${le(e.colors.text,.35)}`}function nA(e){let t=e.style.pip?.shadow;return t===false||t==="none"?"none":typeof t=="string"?t:Z_}function Fd(e){return {"--squisq-pip-radius":eA(e),"--squisq-pip-border":tA(e),"--squisq-pip-shadow":nA(e)}}var rA=12;function iA(e){return e.filter((t,n)=>t&&e.indexOf(t)===n)}function aA(e){let t=Object.values(e.colorSchemes),n=iA([e.colors.primary,e.colors.secondary,e.colors.highlight,...t.map(i=>i.accent),e.colors.warning,...t.map(i=>i.bg),e.colors.textMuted,e.colors.backgroundLight]),r=e.colors.primary;return Array.from({length:rA},(i,a)=>n[a%Math.max(1,n.length)]??r)}function bl(e,t){return ii(t,e.colors.text,e.colors.background)}function Bd(e){let{colors:t}=e,n=bl(e,t.primary),r=bl(e,t.secondary),i=bl(e,t.highlight),a=aA(e),o={darkMode:Fn(t.background)<.5,background:t.background,fontFamily:wt(e.typography.bodyFont,Dd.sans),primaryColor:t.primary,primaryTextColor:n,primaryBorderColor:t.highlight,secondaryColor:t.secondary,secondaryTextColor:r,secondaryBorderColor:t.primary,tertiaryColor:t.backgroundLight,tertiaryTextColor:t.text,tertiaryBorderColor:t.textMuted,textColor:t.text,titleColor:t.text,lineColor:t.textMuted,arrowheadColor:t.textMuted,defaultLinkColor:t.textMuted,mainBkg:t.primary,nodeBkg:t.primary,nodeTextColor:n,nodeBorder:t.highlight,clusterBkg:t.backgroundLight,clusterBorder:t.secondary,edgeLabelBackground:t.background,actorBkg:t.backgroundLight,actorBorder:t.primary,actorTextColor:t.text,actorLineColor:t.textMuted,signalColor:t.textMuted,signalTextColor:t.text,labelBoxBkgColor:t.backgroundLight,labelBoxBorderColor:t.secondary,labelTextColor:t.text,loopTextColor:t.text,activationBkgColor:t.secondary,activationBorderColor:t.primary,sequenceNumberColor:n,noteBkgColor:t.highlight,noteBorderColor:t.primary,noteTextColor:i,sectionBkgColor:t.backgroundLight,altSectionBkgColor:t.background,sectionBkgColor2:t.primary,taskBkgColor:t.primary,taskBorderColor:t.highlight,taskTextColor:n,taskTextLightColor:t.text,taskTextDarkColor:t.text,taskTextOutsideColor:t.text,taskTextClickableColor:t.highlight,activeTaskBkgColor:t.secondary,activeTaskBorderColor:t.highlight,doneTaskBkgColor:t.backgroundLight,doneTaskBorderColor:t.textMuted,critBkgColor:t.warning,critBorderColor:t.highlight,todayLineColor:t.warning,gridColor:t.textMuted,pieTitleTextColor:t.text,pieSectionTextColor:t.text,pieLegendTextColor:t.text,pieStrokeColor:t.background,pieOuterStrokeColor:t.textMuted,quadrantPointFill:t.highlight,quadrantPointTextFill:i,quadrantXAxisTextFill:t.text,quadrantYAxisTextFill:t.text,quadrantTitleFill:t.text,requirementBackground:t.backgroundLight,requirementBorderColor:t.primary,requirementTextColor:t.text,relationColor:t.textMuted,relationLabelBackground:t.background,relationLabelColor:t.text,commitLabelColor:t.text,commitLabelBackground:t.backgroundLight,tagLabelColor:n,tagLabelBackground:t.primary,tagLabelBorder:t.highlight};return a.forEach((s,l)=>{let c=bl(e,s);o[`cScale${l}`]=s,o[`cScaleInv${l}`]=c,o[`cScaleLabel${l}`]=c,o[`cScalePeer${l}`]=c,o[`pie${l+1}`]=s,l<8&&(o[`git${l}`]=s,o[`gitInv${l}`]=c,o[`gitBranchLabel${l}`]=c);}),o}function ai(e){return e.dataset.captureSequential==="true"||e.dataset.captureDecoded==="true"}function ea(e){return Number.isFinite(e)?`${e.toFixed(3)}s`:String(e)}function ao(e,t){let n=e.duration;return Number.isFinite(n)?Math.max(0,Math.min(t,n)):t}function $d(e,t){return Math.abs(e.currentTime-ao(e,t))<=.01}function d0(e){if(!e.isConnected)return false;let t=e.ownerDocument.defaultView;if(!t)return false;for(let n=e;n;n=n.parentElement){let r=t.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse"||Number.parseFloat(r.opacity||"1")<=0)return false}return true}function m0(e,t,n){let r=null,i=()=>{r!==null&&(clearTimeout(r),r=null);};return {arm:()=>{i(),e.visibilityState==="visible"&&(r=setTimeout(n,t));},clear:i}}function f0(e,t,n=2e3){return e.pause(),new Promise((r,i)=>{let a=false,o=null,s=e.ownerDocument,l=()=>s.visibilityState!=="visible",c=()=>{h.clear(),clearInterval(w),e.removeEventListener("seeked",m),e.removeEventListener("loadeddata",m),e.removeEventListener("canplay",m),s.removeEventListener("visibilitychange",g),o!==null&&typeof e.cancelVideoFrameCallback=="function"&&e.cancelVideoFrameCallback(o);},d=()=>{a||(a=true,c(),r());},u=()=>{a||(a=true,c(),i(new Error(`Video frame did not become ready at ${ea(t)} within ${n}ms (currentTime=${ea(e.currentTime)}, reachableTime=${ea(ao(e,t))}, duration=${ea(e.duration)}, readyState=${e.readyState}, seeking=${String(e.seeking)}, visible=${String(d0(e))}).`)));},f=()=>{if(!(a||e.seeking||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||!$d(e,t))){if(typeof e.requestVideoFrameCallback!="function"||!d0(e)){d();return}o===null&&(o=e.requestVideoFrameCallback(()=>{o=null,d();}));}};function m(){f();}let h=m0(s,n,u),y=()=>{try{return e.currentTime=ao(e,t),queueMicrotask(f),!0}catch(x){return a=true,c(),i(x),false}};function g(){if(!a){if(l()){h.clear();return}f(),!a&&(!e.seeking&&!$d(e,t)&&!y()||h.arm());}}let w=setInterval(f,16);e.addEventListener("seeked",m),e.addEventListener("loadeddata",m),e.addEventListener("canplay",m),s.addEventListener("visibilitychange",g),h.arm(),y();})}function dA(e,t,n){return new Promise((r,i)=>{let a=false,o=e.ownerDocument,s=()=>o.visibilityState!=="visible",l=()=>{y.clear(),clearInterval(v),e.removeEventListener("timeupdate",f),e.removeEventListener("loadeddata",f),e.removeEventListener("canplay",f),e.removeEventListener("error",u),o.removeEventListener("visibilitychange",x);},c=()=>{a||(a=true,l(),r());},d=()=>{a||(a=true,e.pause(),l(),f0(e,t,n).then(r,i));},u=()=>{a||(a=true,e.pause(),l(),i(new Error(`Video frame did not advance to ${ea(t)} within ${n}ms (currentTime=${ea(e.currentTime)}, readyState=${e.readyState}).`)));};function f(){e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&e.currentTime>=ao(e,t)&&(e.pause(),c());}let m=()=>{a||s()||d();},h=()=>{if(!(a||s()))try{e.playbackRate=1,e.paused&&e.play().catch(m);}catch{m();}},y=m0(o,n,u),g=()=>{e.pause(),y.clear();},w=()=>{a||s()||(f(),!a&&(h(),y.arm()));};function x(){if(o.visibilityState!=="visible"){g();return}w();}let v=setInterval(f,16);e.addEventListener("timeupdate",f),e.addEventListener("loadeddata",f),e.addEventListener("canplay",f),e.addEventListener("error",u,{once:true}),o.addEventListener("visibilitychange",x),w();})}function p0(e,t,n=2e3){if(e.readyState>=HTMLMediaElement.HAVE_METADATA&&e.videoWidth<=0&&e.videoHeight<=0)return e.pause(),Promise.resolve();let i=ao(e,t)-e.currentTime;if(e.dataset.captureSequential==="true"){if(e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&i<=.01)return i<-0.01&&e.pause(),Promise.resolve();if(i>0&&i<=.5&&e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA)return dA(e,t,n)}return e.pause(),!e.seeking&&e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&$d(e,t)?Promise.resolve():f0(e,t,n)}var g0=Object.freeze({titleBlock:"title",quoteBlock:"quote",mapBlock:"map",listBlock:"list",diagramBlock:"diagram",diagramNode:"diagram"});function rt(e){return g0[e]??e}var wl=new Set(["dataTable","barChart","columnChart","pieChart","donutChart","lineChart","areaChart","scatterChart"]),y0=new Set(["diagram","drawing","layout"]);function Ar(e){return !!e&&y0.has(rt(e))}var mA=new Set(["title","sectionHeader","bigText","transcript","content","statHighlight","quote","factCard","twoColumn","dateEvent","imageWithCaption","leftFeature","rightFeature","map","fullBleedQuote","list","photoGrid","definitionCard","comparisonBar","pullQuote","videoWithCaption","videoPullQuote","dataTable","barChart","columnChart","pieChart","donutChart","lineChart","areaChart","scatterChart","diagram","tree","timeline","layout","drawing"]);function b0(e){return mA.has(rt(e))}var oo={x:"number",y:"number",startTime:"time",duration:"time",connectsTo:"connectionList",transition:"transition",transitionDuration:"time",transitionDirection:"transitionDirection"};function $n(e){let t={},n={},r=[],i=null,a,o;for(let[s,l]of Object.entries(e)){let c=oo[s];if(!c){n[s]=l;continue}if(c==="number"){let d=so(l);d==null?r.push(`Invalid number for "${s}": ${JSON.stringify(l)}`):t[s]=d;}else if(c==="time"){let d=oi(l);d==null?r.push(`Invalid time for "${s}": ${JSON.stringify(l)}`):s==="transitionDuration"?a=d:t[s]=d;}else if(c==="connectionList"){let{list:d,warning:u}=gA(l);u&&r.push(`"${s}": ${u}`),t.connectsTo=d;}else if(c==="transition"){let d=bd(l);d==null?r.push(`Invalid transition for "${s}": ${JSON.stringify(l)}`):i=d;}else if(c==="transitionDirection"){let d=wd(l);d==null?r.push(`Invalid transition direction for "${s}": ${JSON.stringify(l)}`):o=d;}}return i&&(t.transition={type:i,...a!==void 0?{duration:a}:{},...o!==void 0?{direction:o}:{}}),{blockMeta:t,metadata:n,warnings:r}}function so(e){if(e.trim()==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}var fA=/^\d+(?:\.\d+)?$/,pA=/^(\d+(?:\.\d+)?)ms$/,hA=/^(\d+):(\d{1,2})(?:\.(\d+))?$/;function oi(e){let t=e.trim();if(!t)return null;if(fA.test(t)){let i=Number(t);return Number.isFinite(i)?i:null}let n=t.match(pA);if(n){let i=Number(n[1]);return Number.isFinite(i)?i/1e3:null}let r=t.match(hA);if(r){let i=Number(r[1]),a=Number(r[2]),o=r[3]?+`0.${r[3]}`:0;return !Number.isFinite(i)||!Number.isFinite(a)||!Number.isFinite(o)||a>=60?null:i*60+a+o}return null}function gA(e){let t=e.trim();if(!t)return {list:[],warning:null};let n=[],r=false;for(let i of t.split(",")){let a=i.trim();if(!a){r=true;continue}let o=a.indexOf(":");if(o<0)n.push({target:a});else {let s=a.slice(0,o).trim(),l=a.slice(o+1).trim();if(!s){r=true;continue}n.push(l?{target:s,type:l}:{target:s});}}return {list:n,warning:r?"dropped empty connection entries":null}}var yA=new Set(["http","https","mailto","tel"]),bA=new Set(["http","https","blob"]),wA=new Set(["javascript","vbscript","data"]),kA=/^data:(?:image\/(?!svg\+xml)[a-z0-9.+-]+|audio\/[a-z0-9.+-]+|video\/[a-z0-9.+-]+);/i,xA=new Set(["a","abbr","b","blockquote","br","caption","cite","code","col","colgroup","data","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","kbd","li","mark","ol","p","pre","q","s","samp","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","track","u","ul","var","video","audio"]),vA=new Set(["base","button","embed","form","iframe","input","link","meta","object","option","script","select","style","svg","template","textarea"]),TA=new Set(["class","id","title","role"]),EA={a:new Set(["href","target","rel"]),audio:new Set(["src","controls","preload","muted","loop"]),col:new Set(["span","width"]),colgroup:new Set(["span"]),data:new Set(["value"]),img:new Set(["src","alt","width","height","loading","decoding"]),li:new Set(["value"]),ol:new Set(["start","type"]),q:new Set(["cite"]),source:new Set(["src","type","media"]),td:new Set(["colspan","rowspan","align"]),th:new Set(["colspan","rowspan","align","scope"]),time:new Set(["datetime"]),track:new Set(["src","kind","label","srclang","default"]),video:new Set(["src","poster","width","height","controls","preload","muted","loop","playsinline"])},SA=/^[a-z][a-z0-9:_.-]*$/,_A=new Set(["1","a","A","i","I"]),AA=new Set(["none","metadata","auto"]),CA=new Set(["subtitles","captions","descriptions","chapters","metadata"]);function qt(e,t="link",n){if(typeof e!="string")return null;let r=e.trim();if(!r)return null;let i=BA(r),a=i.indexOf(":"),o=FA(i,["/","?","#"]);if(!(a>=0&&(o<0||a<o)))return r;let l=i.slice(0,a).toLowerCase();return t==="media"?l==="data"?kA.test(i)?r:null:bA.has(l)?r:null:yA.has(l)||n?.extraLinkSchemes?.includes(l)&&!wA.has(l)?r:null}function ta(e){let t=[];for(let n of e)t.push(...IA(n));return t}function IA(e){switch(e.type){case "htmlText":return [e];case "htmlComment":return [];case "htmlElement":return MA(e)}}function MA(e){let t=e.tagName.toLowerCase();if(vA.has(t))return [];let n=ta(e.children);return xA.has(t)?[{type:"htmlElement",tagName:t,attributes:qA(t,e.attributes),children:n,selfClosing:e.selfClosing}]:n}function qA(e,t){let n={};for(let[r,i]of Object.entries(t)){let a=r.toLowerCase();if(!LA(e,a))continue;let o=String(i),s=PA(e,a,o);s!==null&&(n[a]=s);}return e==="a"&&n.target==="_blank"&&(n.rel=NA(n.rel,["noopener","noreferrer"])),n}function LA(e,t){return !SA.test(t)||t.startsWith("on")?false:t.startsWith("aria-")||t.startsWith("data-")||TA.has(t)?true:EA[e]?.has(t)??false}function PA(e,t,n){return t==="href"?qt(n,"link"):t==="src"||t==="poster"?qt(n,"media"):(t==="width"||t==="height"||t==="span"||t==="colspan"||t==="rowspan"||t==="value")&&!OA(n)||t==="start"&&!DA(n)||t==="type"&&e==="ol"&&!_A.has(n)||t==="preload"&&!AA.has(n)||t==="kind"&&e==="track"&&!CA.has(n)||t==="align"&&n!=="left"&&n!=="right"&&n!=="center"?null:t==="target"?n==="_blank"||n==="_self"||n==="_parent"||n==="_top"?n:null:t==="rel"?RA(n):n}function RA(e){return w0(e).join(" ")}function NA(e,t){let n=new Set(e?w0(e):[]);for(let r of t)n.add(r);return Array.from(n).join(" ")}function w0(e){let t=e.split(/\s+/).map(n=>n.trim().toLowerCase()).filter(Boolean).filter(n=>/^[a-z0-9_-]+$/.test(n));return Array.from(new Set(t))}function DA(e){return /^-?\d+$/.test(e.trim())}function OA(e){return /^\d+$/.test(e.trim())}function FA(e,t){let n=-1;for(let r of t){let i=e.indexOf(r);i>=0&&(n<0||i<n)&&(n=i);}return n}function BA(e){let t="";for(let n of e){let r=n.charCodeAt(0);r<=32||r===127||n.trim()===""||(t+=n);}return t}var k0='"(?:[^"\\\\]|\\\\.)*"',x0="'(?:[^'\\\\]|\\\\.)*'",$A=new RegExp(`\\s*\\{\\[((?:[^\\]"']|${k0}|${x0})*)\\]\\}[\\s\\]}]*$`),HA=/\s*\{\[([^\]]*)\]\}[\s\]}]*$/,zA=new RegExp(`\\s*\\{(?!\\[)((?:[^}"']|${k0}|${x0})*)\\}\\s*$`),UA=/\s*\{(?!\[)([^}]*)\}\s*$/;function v0(e,t,n){let r=t.exec(e)??n.exec(e);return r?{inner:r[1],index:r.index}:null}function si(e){return v0(e,$A,HA)}function Hd(e){return v0(e,zA,UA)}var h0=/\s/;function na(e){let t=[],n=0,r=e.length;for(;n<r;){for(;n<r&&h0.test(e[n]);)n++;if(n>=r)break;let i="";for(;n<r&&!h0.test(e[n]);){let a=e[n],o=i===""||i.endsWith("=");if((a==='"'||a==="'")&&o){for(i+=a,n++;n<r&&e[n]!==a;)e[n]==="\\"&&n+1<r&&(e[n+1]===a||e[n+1]==="\\")?(i+=e[n]+e[n+1],n+=2):(i+=e[n],n++);n<r&&e[n]===a&&(i+=a,n++);}else i+=a,n++;}i&&t.push(i);}return t}var jA=/\\([\\"])/g,WA=/\\([\\'])/g;function T0(e){if(e.length>=2){let t=e[0];if((t==='"'||t==="'")&&e.endsWith(t))return e.slice(1,-1).replace(t==='"'?jA:WA,"$1")}return e}function ra(e){let t=e.indexOf("=");return t<=0?null:{key:e.slice(0,t),value:T0(e.slice(t+1))}}var sr=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r);}};sr.prototype.normal={};sr.prototype.property={};sr.prototype.space=void 0;function zd(e,t){let n={},r={};for(let i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new sr(n,r,t)}function lr(e){return e.toLowerCase()}var Tt=class{constructor(t,n){this.attribute=n,this.property=t;}};Tt.prototype.attribute="";Tt.prototype.booleanish=false;Tt.prototype.boolean=false;Tt.prototype.commaOrSpaceSeparated=false;Tt.prototype.commaSeparated=false;Tt.prototype.defined=false;Tt.prototype.mustUseProperty=false;Tt.prototype.number=false;Tt.prototype.overloadedBoolean=false;Tt.prototype.property="";Tt.prototype.spaceSeparated=false;Tt.prototype.space=void 0;var lo={};Qu(lo,{boolean:()=>qe,booleanish:()=>lt,commaOrSpaceSeparated:()=>nn,commaSeparated:()=>Cr,number:()=>ne,overloadedBoolean:()=>xl,spaceSeparated:()=>Ge});var XA=0,qe=li(),lt=li(),xl=li(),ne=li(),Ge=li(),Cr=li(),nn=li();function li(){return 2**++XA}var Ud=Object.keys(lo),ci=class extends Tt{constructor(t,n,r,i){let a=-1;if(super(t,n),S0(this,"space",i),typeof r=="number")for(;++a<Ud.length;){let o=Ud[a];S0(this,Ud[a],(r&lo[o])===lo[o]);}}};ci.prototype.defined=true;function S0(e,t,n){n&&(e[t]=n);}function wn(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ci(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=true),t[r]=a,n[lr(r)]=r,n[lr(a.attribute)]=r;}return new sr(t,n,e.space)}var jd=wn({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Ge,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:ne,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Ge,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:lt,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function vl(e,t){return t in e?e[t]:t}function Tl(e,t){return vl(e,t.toLowerCase())}var _0=wn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Cr,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:Ge,autoFocus:qe,autoPlay:qe,blocking:Ge,capture:null,charSet:null,checked:qe,cite:null,className:Ge,cols:ne,colSpan:null,content:null,contentEditable:lt,controls:qe,controlsList:Ge,coords:ne|Cr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:xl,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:Ge,height:ne,hidden:xl,high:ne,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:qe,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qe,optimum:ne,pattern:null,ping:Ge,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:Ge,required:qe,reversed:qe,rows:ne,rowSpan:ne,sandbox:Ge,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:lt,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:lt,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:ne,security:null,unselectable:null},space:"html",transform:Tl});var A0=wn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:nn,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,className:Ge,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cr,g2:Cr,glyphName:Cr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ne,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nn,rev:nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nn,requiredFeatures:nn,requiredFonts:nn,requiredFormats:nn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nn,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vl});var Wd=wn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return "xlink:"+t.slice(5).toLowerCase()}});var Vd=wn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tl});var Gd=wn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return "xml:"+t.slice(3).toLowerCase()}});var KA=/[A-Z]/g,C0=/-[a-z]/g,QA=/^data[-\w.:]+$/i;function co(e,t){let n=lr(t),r=t,i=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&QA.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(C0,JA);r="data"+a.charAt(0).toUpperCase()+a.slice(1);}else {let a=t.slice(4);if(!C0.test(a)){let o=a.replace(KA,ZA);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o;}}i=ci;}return new i(r,t)}function ZA(e){return "-"+e.toLowerCase()}function JA(e){return e.charAt(1).toUpperCase()}var uo=zd([jd,_0,Wd,Vd,Gd],"html"),mo=zd([jd,A0,Wd,Vd,Gd],"svg");function Yd(e){let t=[],n=String(e||""),r=n.indexOf(","),i=0,a=false;for(;!a;){r===-1&&(r=n.length,a=true);let o=n.slice(i,r).trim();(o||!a)&&t.push(o),i=r+1,r=n.indexOf(",",i);}return t}var I0=/[#.]/g;function Xd(e,t){let n=e||"",r={},i=0,a,o;for(;i<n.length;){I0.lastIndex=i;let s=I0.exec(n),l=n.slice(i,s?s.index:n.length);l&&(a?a==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:o=l,i+=l.length),s&&(a=s[0],i++);}return {type:"element",tagName:o||t||"div",properties:r,children:[]}}function Kd(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Zd(e,t,n){let r=n?rC(n):void 0;function i(a,o,...s){let l;if(a==null){l={type:"root",children:[]};let c=o;s.unshift(c);}else {l=Xd(a,t);let c=l.tagName.toLowerCase(),d=r?r.get(c):void 0;if(l.tagName=d||c,eC(o))s.unshift(o);else for(let[u,f]of Object.entries(o))tC(e,l.properties,u,f);}for(let c of s)Qd(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function eC(e){if(e===null||typeof e!="object"||Array.isArray(e))return true;if(typeof e.type!="string")return false;let t=e,n=Object.keys(e);for(let r of n){let i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return true;let a=i;for(let o of a)if(typeof o!="number"&&typeof o!="string")return true}}return !!("children"in e&&Array.isArray(e.children))}function tC(e,t,n,r){let i=co(e,n),a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r;}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Kd(r):i.commaSeparated?a=Yd(r):i.commaOrSpaceSeparated?a=Kd(Yd(r).join(" ")):a=M0(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?nC(r):String(r);if(Array.isArray(a)){let o=[];for(let s of a)o.push(M0(i,i.property,s));a=o;}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a;}}function Qd(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(let n of t)Qd(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Qd(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function M0(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||lr(n)===lr(t)))return true}return n}function nC(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function rC(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var q0=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];var Jd=Zd(uo,"div"),em=Zd(mo,"g",q0);function tm(e){let t=String(e),n=[];return {toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let o=0;for(;;){let s=n[o];if(s===void 0){let l=L0(t,n[o-1]);s=l===-1?t.length+1:l+1,n[o]=s;}if(s>a)return {line:o+1,column:a-(o>0?n[o-1]:0)+1,offset:a};o++;}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){let s=n[n.length-1],l=L0(t,s),c=l===-1?t.length+1:l+1;if(s===c)break;n.push(c);}let o=(a.line>1?n[a.line-2]:0)+a.column-1;if(o<n[a.line-1])return o}}}function L0(e,t){let n=e.indexOf("\r",t),r=e.indexOf(`
|
|
@@ -65,12 +65,12 @@ ${r}${i}`)}return n.theme}function Rt(e,t=new WeakMap){if(e===null||typeof e!="o
|
|
|
65
65
|
`).trim()}function Yc(e){return Math.round(e*100)/100}function B2(e,t){let{theme:n,viewport:r,children:i=[]}=t,{layers:a}=F2(i,r,{ink:n.colors.text});return a.length>0?a:[fF(e,t)]}function fF(e,t){return {type:"text",id:"layout-empty",content:{text:e.title??"Empty layout",style:{fontSize:ml(36,t,true),fontFamily:ie(t,"title"),color:t.theme.colors.textMuted,textAlign:"center"}},position:{x:"50%",y:"50%",anchor:"center"}}}var $2=/\{(\w+)(?::([^}|]+))?(?:\|([^}]*))?\}/g,pF=/\{\{([^{}]*)\}\}/g,H2=" ESC_OPEN ",z2=" ESC_CLOSE ";function hF(e){if(!e.contents)return [];let t=[],n=r=>{if(r.type==="image"){let i=r;t.push({url:i.url??"",alt:i.alt??""});}};for(let r of e.contents)ur(r,i=>{n(i);});return t}function gF(e){if(!e.contents)return [];let t=[];for(let n of e.contents)ur(n,r=>{if(r.type==="listItem"){let i=Me(r).replace(/\s+/g," ").trim();return i&&t.push(i),true}});return t}function yF(e){return e.contents?e.contents.map(t=>Me(t).trim()).filter(t=>t.length>0).join(" "):""}function bF(e){return !e.children||e.children.length===0?"":e.children.map(t=>t.title?.trim()).filter(t=>!!t).join(", ")}function U2(e){return e.replace(pF,(t,n)=>H2+n+z2)}function j2(e){return e.replace(new RegExp(H2,"g"),"{").replace(new RegExp(z2,"g"),"}")}function wF(e,t){let r=U2(e).replace($2,(i,a,o,s)=>{let l=t(a,o);return l==null?i:l===""&&s!==void 0?s:l});return j2(r)}function W2(e,t,n,r,i){switch(e){case "title":return n.title??"";case "content":return yF(n);case "children":return bF(n);case "attr":{if(!t)return "";let a=n.templateOverrides?.[t]??n.templateData?.[t]??n.metadata?.[t];return a==null?"":String(a)}case "image":{let a=t?parseInt(t,10):0;return !Number.isFinite(a)||a<0||a>=r.length?"":r[a].alt}case "item":return i?t?t==="src"?i.src??"":t==="label"?i.label??"":"":i.text:null;case "index":return i?String(i.index):null;default:return null}}function dv(e,t,n,r){return wF(e,(i,a)=>W2(i,a,t,n,r))}function kF(e,t,n,r){if(!e.includes("{"))return e;let i=false,o=U2(e).replace($2,(s,l,c,d)=>{if(l==="image"){let f=c?parseInt(c,10):0;return Number.isFinite(f)&&f>=0&&f<n.length?n[f].url:d!==void 0?d:(i=true,"")}let u=W2(l,c,t,n,r);return u==null?s:u===""&&d!==void 0?d:u});return i?null:j2(o)}function xF(e){if(typeof e=="number")return e;if(typeof e=="string"){let t=e.match(/-?\d*\.?\d+/);if(t)return parseFloat(t[0])}return 0}function mv(e,t){if(e==null)return t;if(typeof e=="number")return e+t;let n=e.match(/^(\s*)(-?\d*\.?\d+)(.*)$/);if(n){let r=parseFloat(n[2])+t;return `${n[1]}${r}${n[3]}`}return e}function vF(e,t,n){switch(e){case "images":return n.map((r,i)=>({text:r.alt,src:r.url,label:r.alt,index:i+1}));case "children":return (t.children??[]).map((r,i)=>({text:r.title??"",label:r.title??"",index:i+1}));case "listItems":return gF(t).map((r,i)=>({text:r,label:r,index:i+1}));default:return []}}function TF(e,t,n){let r=e.repeat;if(!r){let d=Xp(e,t,n,void 0);return d?[d]:[]}let i=vF(r.source,t,n),a=r.direction??"column",o=r.gap??24,s=r.max!=null&&r.max>=0?Math.min(r.max,i.length):i.length,l=[],c=0;for(let d=0;d<s;d++){let u={...e.position};a==="row"?u.x=mv(u.x,c):u.y=mv(u.y,c);let f={...e,position:u,id:`${e.id}-${d}`};delete f.repeat;let m=Xp(f,t,n,i[d]);m&&l.push(m);let h=a==="row"?e.position.width:e.position.height;c+=xF(h)+o;}return l}function EF(e,t){let n=hF(t),r=[];for(let i of e)if(i.repeat)r.push(...TF(i,t,n));else {let a=Xp(i,t,n,void 0);a&&r.push(a);}return r}function Xp(e,t,n,r){switch(e.type){case "text":return {...e,content:{...e.content,text:dv(e.content.text,t,n,r)}};case "image":{let i=kF(e.content.src,t,n,r);if(i==null)return null;let a={...e,content:{...e.content,src:i}};return e.content.alt&&e.content.alt.includes("{")&&(a.content.alt=dv(e.content.alt,t,n,r)),a}default:return e}}function SF(e){return (t,n)=>{let r=n.block??t;return r?EF(e.layers,r):e.layers.slice()}}var _F=.6;function Kp(e){if(typeof e!="string")return null;let t=e.trim();if(!t)return null;let n=false,r=/^\((.*)\)$/.exec(t);if(r&&(n=true,t=r[1].trim()),t=t.replace(/^([+-]?)\s*[$€£¥]\s*/,"$1"),t=t.replace(/%$/,"").trim(),t=t.replace(/,/g,""),/^[+-]?\d{1,3}(?: \d{3})+(?:\.\d+)?$/.test(t)&&(t=t.replace(/ /g,"")),!/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i.test(t))return null;let i=Number(t);return Number.isFinite(i)?n?-i:i:null}function AF(e,t){let n=0,r=0;for(let i of e){let a=(i[t]??"").trim();a&&(n+=1,Kp(a)!==null&&(r+=1));}return r>0&&r/Math.max(1,n)>=_F}function fv(e,t){let n=String(e).trim();if(!n)return null;let r=n.toLowerCase(),i=t.findIndex(a=>a.trim().toLowerCase()===r);if(i>=0)return i;if(/^\d+$/.test(n)){let a=Number(n);if(a<t.length)return a}return null}function hh(e,t={}){let n=Array.isArray(e.headers)?e.headers:[],r=Array.isArray(e.rows)?e.rows:[];if(n.length===0||r.length===0)return null;let i=[],a=0;if(t.labelColumn!==void 0&&String(t.labelColumn).trim()!==""){let l=fv(String(t.labelColumn),n);l===null?i.push(`labelColumn "${t.labelColumn}" matches no column; using the first column`):a=l;}let o=[],s=(t.valueColumns??[]).map(l=>String(l)).filter(l=>l.trim()!=="");if(s.length>0)for(let l of s){let c=fv(l,n);c===null?i.push(`valueColumns entry "${l}" matches no column; skipped`):o.includes(c)||o.push(c);}else o=n.map((l,c)=>c).filter(l=>l!==a&&AF(r,l));return o.length===0?null:{labels:r.map(l=>(l[a]??"").trim()),labelHeader:n[a]??"",labelNumbers:r.map(l=>Kp(l[a]??"")),series:o.map(l=>({name:(n[l]??`Column ${l+1}`).trim()||`Column ${l+1}`,values:r.map(c=>Kp(c[l]??""))})),warnings:i}}function Hp(e,t){let n=Math.floor(Math.log10(e)),r=e/10**n,i;return t?r<1.5?i=1:r<3?i=2:r<7?i=5:i=10:r<=1?i=1:r<=2?i=2:r<=5?i=5:i=10,i*10**n}function V2(e,t,n=5){let r=Number.isFinite(e)?e:0,i=Number.isFinite(t)?t:0;if(r>i&&([r,i]=[i,r]),r===i){let u=r===0?1:Hp(Math.abs(r),true);r-=u,i+=u,e>=0&&r<0&&(r=0);}let a=Math.max(2,n),o=Hp(i-r,false),s=Hp(o/(a-1),true),l=Math.floor(r/s)*s,c=Math.ceil(i/s)*s,d=[];for(let u=l;u<=c+s*1e-6;u+=s)d.push(Math.abs(u)<s*1e-6?0:Number(u.toPrecision(12)));return {ticks:d,niceMin:l,niceMax:c,step:s}}function Ca(e,t){if(!Number.isFinite(e))return "\u2014";let n=e<0?"-":"",r=Math.abs(e),i;return r>=1e6?i=`${n}${pv((r/1e6).toFixed(1))}M`:r>=1e3?i=`${n}${pv((r/1e3).toFixed(r>=1e4?0:1))}K`:i=`${n}${r.toLocaleString("en-US",{maximumFractionDigits:2})}`,t?`${i} ${t}`:i}function pv(e){return e.replace(/\.0$/,"")}function $t(e){return Math.round(e*100)/100}function Xc(e,t,n,r){let i=(r-90)*Math.PI/180;return {x:$t(e+n*Math.cos(i)),y:$t(t+n*Math.sin(i))}}function CF(e,t,n,r,i,a){let o=a-i;if(o<=0)return "";o>=359.9&&(o=359.9);let s=i+o,l=o>180?1:0,c=Xc(e,t,n,i),d=Xc(e,t,n,s);if(r<=0)return [`M ${$t(e)} ${$t(t)}`,`L ${c.x} ${c.y}`,`A ${$t(n)} ${$t(n)} 0 ${l} 1 ${d.x} ${d.y}`,"Z"].join(" ");let u=Xc(e,t,r,i),f=Xc(e,t,r,s);return [`M ${c.x} ${c.y}`,`A ${$t(n)} ${$t(n)} 0 ${l} 1 ${d.x} ${d.y}`,`L ${f.x} ${f.y}`,`A ${$t(r)} ${$t(r)} 0 ${l} 0 ${u.x} ${u.y}`,"Z"].join(" ")}function G2(e){return e.length===0?"":e.map((t,n)=>`${n===0?"M":"L"} ${$t(t.x)} ${$t(t.y)}`).join(" ")}function IF(e,t){if(e.length===0)return "";let n=G2(e),r=e[0],i=e[e.length-1];return `${n} L ${$t(i.x)} ${$t(t)} L ${$t(r.x)} ${$t(t)} Z`}function MF(e){let t=e.viewportWidth,n=e.viewportHeight,r=t*.06,i=n*.06,a=t-r*2,o=i,s;e.hasTitle&&(s={x:r,y:o,width:a,height:e.titleFontSize*2.2},o=s.y+s.height);let l,c=0;e.tableRowCount>0&&(c=Math.min(n*.4,(e.tableRowCount+1)*e.tableFontSize*2.4));let d=e.legendRows>0?e.legendRows*e.legendRowHeight:0,u={x:r,y:o,width:a,height:Math.max(40,n-i-o-d-c)};o=u.y+u.height;let f;d>0&&(f={x:r,y:o,width:a,height:d},o+=d),c>0&&(l={x:r,y:o,width:a,height:c});let m={x:u.x+e.leftGutter,y:u.y,width:Math.max(20,u.width-e.leftGutter),height:Math.max(20,u.height-e.bottomGutter)};return {titleBand:s,chartArea:u,plot:m,legendBand:f,tableBand:l}}function gh(e){let t=e.reduce((i,a)=>Math.max(i,a.values.length),0),n=new Array(t).fill(0),r=new Array(t).fill(0);return e.map(i=>Array.from({length:t},(a,o)=>{let s=i.values[o];if(s==null||!Number.isFinite(s))return {y0:n[o],y1:n[o]};if(s>=0){let c=n[o];return n[o]+=s,{y0:c,y1:n[o]}}let l=r[o];return r[o]+=s,{y0:r[o],y1:l}}))}var Y2=.62;function qF(e,t,n){let r=t*.9,i=t*2.2,a=t*2,o=e.map(u=>r+t*.5+u.length*t*Y2),s=[],l=[],c=0;o.forEach((u,f)=>{let m=l.length>0?i:0;l.length>0&&c+m+u>n&&(s.push(l),l=[],c=0),l.push(f),c+=(l.length>1?i:0)+u;}),l.length>0&&s.push(l);let d=[];return s.forEach((u,f)=>{let m=u.reduce((y,g,w)=>y+o[g]+(w>0?i:0),0),h=Math.max(0,(n-m)/2);u.forEach(y=>{d.push({label:e[y],index:y,x:h,y:f*a,swatchSize:r}),h+=o[y]+i;});}),{items:d,rows:s.length,rowHeight:a}}function LF(e,t,n){if(e<=1)return 1;let r=n*6,i=t/e;return Math.max(1,Math.ceil(r/Math.max(1,i)))}var PF={bar:"barChart",column:"columnChart",pie:"pieChart",donut:"donutChart",line:"lineChart",area:"areaChart",scatter:"scatterChart"};function Oi(e,t,n){let r=RF(t,n),i=r?hh(r,t):null;if(!r||!i)return hv(t,n);let{theme:a,viewport:o}=n,s=PF[e],l=(t.title??"").trim(),c=ae(52,n,true),d=ae(24,n,false),u=ae(26,n,false),f=ae(26,n,false),m=ae(20,n,false),h=ie(n,"body"),y=e==="pie"||e==="donut",g=NF(e,t,i),w=DF(n,t.colorScheme,y?i.labels.length:i.series.length);if(y&&!i.series[0].values.some($=>$!==null&&$>0))return hv(t,n);let x=o.width*.88,v=g.length>0?qF(g,f,x):null,T=OF(e,i,t,n,d,u),S=MF({viewportWidth:o.width,viewportHeight:o.height,hasTitle:l.length>0,titleFontSize:c,leftGutter:T.left,bottomGutter:T.bottom,legendRows:v?.rows??0,legendRowHeight:f*2,tableRowCount:t.showTable===true?r.rows.length:0,tableFontSize:m}),k=as(n,s,"entrance","staggered"),E=$=>k==="subtle"?.1:Math.min(1.2,.2+$*.08),I=$=>({type:"fadeIn",duration:.6,delay:E($)}),_=Qn(n),A=_.chartGrowthDuration,D=_.textEntrance.easing,B=$=>D?{...$,easing:D}:$,q=($,R,z=0)=>{if(!_.chartGrowth)return I($);let C=Aa(n,E($));switch(R){case "bar":return B({type:"grow",origin:"left",duration:A,delay:C});case "bar-negative":return B({type:"grow",origin:"right",duration:A,delay:C});case "column":return B({type:"grow",origin:"bottom",duration:A,delay:C});case "column-negative":return B({type:"grow",origin:"top",duration:A,delay:C});case "line":return {type:"drawOn",duration:A*1.4,delay:C};case "area":return {type:"reveal",origin:"left",duration:A*1.4,delay:C};case "point":return {type:"grow",origin:"center",duration:.35,delay:Number((C+A*1.4*z).toFixed(3))};case "wedge":return B({type:"grow",origin:"center",duration:Math.max(.4,A*.6),delay:C});case "dot":return B({type:"grow",origin:"center",duration:.4,delay:C})}},F=($,R,z=0)=>{if(!_.chartGrowth)return R;let C=Aa(n,E($))+A*(z>0?1.4*z:1);return {type:"fadeIn",duration:.4,delay:Number(C.toFixed(3))}},P={kind:e,input:t,context:n,data:i,frame:S,colors:w,axisFontSize:d,labelFontSize:u,bodyFont:h,gridColor:le(a.colors.text,.12),axisTextColor:a.colors.textMuted,entrance:I,mark:q,labelAnimation:F},H=[gn("bg",Qt(n,170))];switch(l&&S.titleBand&&H.push({type:"text",id:"title",content:{text:l,style:{fontSize:c,fontFamily:ie(n,"title"),fontWeight:"bold",color:a.colors.text,textAlign:"center",shadow:De(n)}},position:{x:S.titleBand.x+S.titleBand.width/2,y:S.titleBand.y+S.titleBand.height/2,width:S.titleBand.width,anchor:"center"},animation:Be(n,{type:"fadeIn",duration:.8})}),e){case "bar":H.push(...BF(P));break;case "column":H.push(...FF(P));break;case "pie":case "donut":H.push(...$F(P));break;case "line":case "area":H.push(...HF(P));break;case "scatter":H.push(...zF(P));break}return v&&S.legendBand&&H.push(...UF(P,v,S.legendBand,f)),t.showTable===true&&S.tableBand&&H.push(jF(r,S.tableBand,m,t,n)),H}function RF(e,t){if(Array.isArray(e.headers)&&e.headers.length>0&&Array.isArray(e.rows)&&e.rows.length>0)return {headers:e.headers,rows:e.rows};let n=e.contents??t.block?.contents;return tu(n)}function hv(e,t){let n={...e,title:e.title??t.block?.title??""};return lh(n,t)}function NF(e,t,n){return t.showLegend===false?[]:e==="pie"||e==="donut"?n.labels:n.series.length>1||t.showLegend===true?n.series.map(r=>r.name):[]}function DF(e,t,n){let r=e.theme.colorSchemes,i=Object.keys(r),o=[Lt(e,t).accent],s=t&&i.includes(t)?i.indexOf(t):0;for(let c=1;c<i.length&&o.length<n;c++){let d=r[i[(s+c)%i.length]].accent;o.some(u=>u.toLowerCase()===d.toLowerCase())||o.push(d);}let l=o.length;for(let c=0;o.length<n;c++)o.push(le(o[c%l],.55));return o.slice(0,Math.max(1,n))}function OF(e,t,n,r,i,a){if(e==="pie"||e==="donut")return {left:0,bottom:0};if(e==="bar"){let l=t.labels.reduce((d,u)=>Math.max(d,u.length),0);return {left:Math.min(r.viewport.width*.24,Math.max(a*3,l*a*.58+16)),bottom:i*2.4}}let s=ss(e,t,n).ticks.reduce((l,c)=>Math.max(l,Ca(c,n.unit).length),0);return {left:Math.max(i*2.5,s*i*.6+16),bottom:a*2.6}}function ss(e,t,n){let r;(e==="bar"||e==="column")&&n.stacked===true?r=gh(t.series).flat().flatMap(s=>[s.y0,s.y1]):r=t.series.flatMap(o=>o.values.filter(s=>s!==null)),r.length===0&&(r=[0,1]);let i=Math.min(...r),a=Math.max(...r);return e!=="line"&&e!=="scatter"&&(i=Math.min(0,i),a=Math.max(0,a)),V2(i,a,5)}function yh(e,t,n){let{frame:r,gridColor:i,axisTextColor:a,axisFontSize:o,bodyFont:s,input:l}=e,c=[];return t.ticks.forEach((d,u)=>{let f=n(d);c.push({type:"shape",id:`grid-${u}`,content:{shape:"rect",fill:d===0?le(e.context.theme.colors.text,.35):i},position:{x:r.plot.x,y:f-(d===0?1:.5),width:r.plot.width,height:d===0?2:1}}),c.push({type:"text",id:`tick-${u}`,content:{text:Ca(d,l.unit),style:{fontSize:o,fontFamily:s,color:a,textAlign:"center"}},position:{x:r.chartArea.x+(r.plot.x-r.chartArea.x)/2,y:f,anchor:"center"}});}),c}function bh(e,t){let{frame:n,data:r,labelFontSize:i,axisTextColor:a,bodyFont:o}=e,s=LF(r.labels.length,n.plot.width,i),l=[];return r.labels.forEach((c,d)=>{d%s!==0||!c||l.push({type:"text",id:`cat-${d}`,content:{text:c,style:{fontSize:i,fontFamily:o,color:a,textAlign:"center"}},position:{x:t(d),y:n.plot.y+n.plot.height+i*1.2,anchor:"center"}});}),l}function FF(e){let{frame:t,data:n,colors:r,input:i,mark:a,labelAnimation:o}=e,s=ss("column",n,i),l=w=>t.plot.y+t.plot.height*(1-(w-s.niceMin)/(s.niceMax-s.niceMin)),c=yh(e,s,l),d=n.labels.length,u=t.plot.width/Math.max(1,d),f=u*.15;c.push(...bh(e,w=>t.plot.x+(w+.5)*u));let m=i.stacked===true&&n.series.length>1,h=m?gh(n.series):null,y=u-f*2,g=m?y:Math.max(2,(y-4*(n.series.length-1))/n.series.length);return n.series.forEach((w,x)=>{w.values.forEach((v,T)=>{if(T>=d)return;let S=h?h[x][T]:v===null?null:{y0:Math.min(0,v),y1:Math.max(0,v)};if(!S||S.y0===S.y1)return;let k=l(S.y1),E=Math.max(1,l(S.y0)-k),I=m?t.plot.x+T*u+f:t.plot.x+T*u+f+x*(g+4);c.push({type:"shape",id:`mark-${x}-${T}`,content:{shape:"rect",fill:r[x],borderRadius:m?0:3},position:{x:I,y:k,width:g,height:E},animation:a(T+x,S.y1<=0?"column-negative":"column")}),i.showValues===true&&v!==null&&!m&&c.push(wh(e,`val-${x}-${T}`,v,I+g/2,v>=0?k-e.axisFontSize*.9:k+E+e.axisFontSize*.9,o(T+x)));});}),c}function BF(e){let{frame:t,data:n,colors:r,input:i,mark:a,labelAnimation:o,labelFontSize:s,axisFontSize:l,bodyFont:c,axisTextColor:d,gridColor:u}=e,f=ss("bar",n,i),m=l*.6,h=D=>Ca(D,i.unit).length*l*Y2,y=i.showValues===true&&i.stacked!==true,g=y?n.series.flatMap(D=>D.values).filter(D=>D!==null).reduce((D,B)=>Math.max(D,h(B)),0)+m:0,w=Math.max(20,t.plot.width-g),x=D=>t.plot.x+w*((D-f.niceMin)/(f.niceMax-f.niceMin)),v=[];f.ticks.forEach((D,B)=>{let q=x(D);v.push({type:"shape",id:`grid-${B}`,content:{shape:"rect",fill:D===0?le(e.context.theme.colors.text,.35):u},position:{x:q-(D===0?1:.5),y:t.plot.y,width:D===0?2:1,height:t.plot.height}}),v.push({type:"text",id:`tick-${B}`,content:{text:Ca(D,i.unit),style:{fontSize:l,fontFamily:c,color:d,textAlign:"center"}},position:{x:q,y:t.plot.y+t.plot.height+l*1.2,anchor:"center"}});});let T=n.labels.length,S=t.plot.height/Math.max(1,T),k=S*.15,E=i.stacked===true&&n.series.length>1,I=E?gh(n.series):null,_=S-k*2,A=E?_:Math.max(2,(_-4*(n.series.length-1))/n.series.length);return n.labels.forEach((D,B)=>{D&&v.push({type:"text",id:`cat-${B}`,content:{text:D,style:{fontSize:s,fontFamily:c,color:d,textAlign:"center"}},position:{x:t.chartArea.x+(t.plot.x-t.chartArea.x)/2,y:t.plot.y+(B+.5)*S,anchor:"center"}});}),n.series.forEach((D,B)=>{D.values.forEach((q,F)=>{if(F>=T)return;let P=I?I[B][F]:q===null?null:{y0:Math.min(0,q),y1:Math.max(0,q)};if(!P||P.y0===P.y1)return;let H=x(P.y0),$=Math.max(1,x(P.y1)-H),R=E?t.plot.y+F*S+k:t.plot.y+F*S+k+B*(A+4);if(v.push({type:"shape",id:`mark-${B}-${F}`,content:{shape:"rect",fill:r[B],borderRadius:E?0:3},position:{x:H,y:R,width:$,height:A},animation:a(F+B,P.y1<=0?"bar-negative":"bar")}),y&&q!==null){let z=h(q)/2,C=q>=0?H+$+m+z:H-m-z;v.push(wh(e,`val-${B}-${F}`,q,C,R+A/2,o(F+B)));}});}),v}function $F(e){let{kind:t,frame:n,data:r,colors:i,input:a,entrance:o,mark:s,labelAnimation:l,context:c}=e,d=r.labels.map((x,v)=>({label:x,value:r.series[0].values[v],index:v})).filter(x=>x.value!==null&&Number.isFinite(x.value)&&x.value>0),u=d.reduce((x,v)=>x+v.value,0),f=n.chartArea.x+n.chartArea.width/2,m=n.chartArea.y+n.chartArea.height/2,h=Math.min(n.chartArea.width,n.chartArea.height)*.42,y=t==="donut"?h*.55:0,g=[],w=0;return d.forEach((x,v)=>{let T=x.value/u*360;if(g.push({type:"path",id:`mark-${x.index}`,content:{d:CF(f,m,h,y,w,w+T),fill:i[x.index%i.length],stroke:c.theme.colors.background,strokeWidth:2},position:{x:f-h,y:m-h,width:h*2,height:h*2},animation:s(v,"wedge")}),a.showValues===true&&T>=14){let k=(w+T/2-90)*Math.PI/180,E=y>0?(y+h)/2:h*.68,I=`${Math.round(x.value/u*100)}%`;g.push({type:"text",id:`val-${x.index}`,content:{text:I,style:{fontSize:e.axisFontSize,fontFamily:e.bodyFont,fontWeight:"bold",color:ii(i[x.index%i.length]),textAlign:"center"}},position:{x:f+E*Math.cos(k),y:m+E*Math.sin(k),anchor:"center"},animation:l(v,o(v))});}w+=T;}),g}function HF(e){let{kind:t,frame:n,data:r,colors:i,input:a,mark:o,labelAnimation:s}=e,l=ss(t,r,a),c=g=>n.plot.y+n.plot.height*(1-(g-l.niceMin)/(l.niceMax-l.niceMin)),d=r.labels.length,u=n.plot.width/Math.max(1,d),f=g=>n.plot.x+(g+.5)*u,m=yh(e,l,c);m.push(...bh(e,f));let h=c(Math.max(l.niceMin,Math.min(l.niceMax,0))),y=d<=30;return r.series.forEach((g,w)=>{let x=[],v=[];g.values.forEach((T,S)=>{if(!(S>=d)){if(T===null){v.length>0&&x.push(v),v=[];return}v.push({x:f(S),y:c(T)});}}),v.length>0&&x.push(v),x.forEach((T,S)=>{t==="area"&&T.length>1&&m.push({type:"path",id:`area-${w}-${S}`,content:{d:IF(T,h),fill:i[w],fillOpacity:.25,stroke:"none",strokeWidth:0},position:{x:n.plot.x,y:n.plot.y,width:n.plot.width,height:n.plot.height},animation:o(w,"area")}),T.length>1&&m.push({type:"path",id:`line-${w}-${S}`,content:{d:G2(T),stroke:i[w],strokeWidth:4,fill:"none"},position:{x:n.plot.x,y:n.plot.y,width:n.plot.width,height:n.plot.height},animation:o(w,"line")});}),y&&g.values.forEach((T,S)=>{if(S>=d||T===null)return;let k=5;m.push({type:"shape",id:`pt-${w}-${S}`,content:{shape:"circle",fill:i[w]},position:{x:f(S)-k,y:c(T)-k,width:k*2,height:k*2},animation:o(w,"point",S/Math.max(1,d-1))}),a.showValues===true&&m.push(wh(e,`val-${w}-${S}`,T,f(S),c(T)-e.axisFontSize,s(w,void 0,S/Math.max(1,d-1))));});}),m}function zF(e){let{frame:t,data:n,colors:r,input:i,mark:a}=e,o=ss("scatter",n,i),s=m=>t.plot.y+t.plot.height*(1-(m-o.niceMin)/(o.niceMax-o.niceMin)),l=yh(e,o,s),c=n.labelNumbers.filter(m=>m!==null).length,d=n.labels.length>0&&c/n.labels.length>=.6,u;if(d){let m=n.labelNumbers.filter(g=>g!==null),h=V2(Math.min(...m),Math.max(...m),5),y=h.niceMax-h.niceMin;u=g=>{let w=n.labelNumbers[g];return w===null?null:t.plot.x+t.plot.width*((w-h.niceMin)/y)},h.ticks.forEach((g,w)=>{let x=t.plot.x+t.plot.width*((g-h.niceMin)/y);l.push({type:"shape",id:`xgrid-${w}`,content:{shape:"rect",fill:e.gridColor},position:{x:x-.5,y:t.plot.y,width:1,height:t.plot.height}}),l.push({type:"text",id:`xtick-${w}`,content:{text:Ca(g),style:{fontSize:e.axisFontSize,fontFamily:e.bodyFont,color:e.axisTextColor,textAlign:"center"}},position:{x,y:t.plot.y+t.plot.height+e.axisFontSize*1.2,anchor:"center"}});});}else {let m=t.plot.width/Math.max(1,n.labels.length);u=h=>t.plot.x+(h+.5)*m,l.push(...bh(e,h=>t.plot.x+(h+.5)*m));}let f=7;return n.series.forEach((m,h)=>{m.values.forEach((y,g)=>{if(y===null)return;let w=u(g);w!==null&&l.push({type:"shape",id:`mark-${h}-${g}`,content:{shape:"circle",fill:r[h],fillOpacity:.85},position:{x:w-f,y:s(y)-f,width:f*2,height:f*2},animation:a(Math.floor(g/3)+h,"dot")});});}),l}function UF(e,t,n,r){let i=[];return t.items.forEach((a,o)=>{let s=e.colors[a.index%e.colors.length],l=n.y+a.y+t.rowHeight/2;i.push({type:"shape",id:`legend-swatch-${o}`,content:{shape:"rect",fill:s,borderRadius:3},position:{x:n.x+a.x,y:l-a.swatchSize/2,width:a.swatchSize,height:a.swatchSize}}),i.push({type:"text",id:`legend-label-${o}`,content:{text:a.label,style:{fontSize:r,fontFamily:e.bodyFont,color:e.context.theme.colors.text}},position:{x:n.x+a.x+a.swatchSize+r*.5,y:l-r*.62}});}),i}function wh(e,t,n,r,i,a){return {type:"text",id:t,content:{text:Ca(n,e.input.unit),style:{fontSize:e.axisFontSize,fontFamily:e.bodyFont,fontWeight:"bold",color:e.context.theme.colors.text,textAlign:"center"}},position:{x:r,y:i,anchor:"center"},...a?{animation:a}:{}}}function jF(e,t,n,r,i){let{theme:a}=i,o=Lt(i,r.colorScheme);return {type:"table",id:"table",content:{headers:e.headers,rows:e.rows,align:e.align,style:{headerBackground:o.accent,headerColor:ii(o.accent),cellBackground:le(a.colors.text,.04),cellColor:a.colors.text,borderColor:le(a.colors.text,.15),fontSize:n,fontFamily:ie(i,"body"),headerFontFamily:ie(i,"title"),borderRadius:8}},position:{x:t.x,y:t.y,width:t.width,height:t.height},animation:{type:"fadeIn",duration:1,delay:.4}}}function WF(e,t){return Oi("bar",e,t)}function VF(e,t){return Oi("column",e,t)}function GF(e,t){return Oi("pie",e,t)}function YF(e,t){return Oi("donut",e,t)}function XF(e,t){return Oi("line",e,t)}function KF(e,t){return Oi("area",e,t)}function QF(e,t){return Oi("scatter",e,t)}function ZF(e,t){let n={...e,speaker:e.speaker??e.title??"Speaker",text:e.text??""},{theme:r}=t,i=Lt(t,n.colorScheme),a=n.variant??"speech",o=n.side??"left",s=typeof n.counterpartName=="string"&&n.counterpartName.length>0,l=ie(t,"body"),c=ie(t,"mono"),d=ae(26,t,false),u=ae(32,t,true),f=ae(22,t,false),m=a==="thought"?le(r.colors.text,.05):a==="tool"?le(i.accent,.12):le(r.colors.text,.08),h=a==="thought"?r.colors.textMuted:r.colors.text,y=[gn("bg",Qt(t,160))];if(s)return [...y,...JF(n,t,i.accent,h,m)];let g=o==="left"?"12%":"88%",w=o==="left"?"20%":"18%",x=62;y.push(...Qp("speaker",n.speaker,n.speakerImage,g,"34%",t)),y.push({type:"text",id:"speaker-name",content:{text:n.speaker+(a==="thought"?" \xB7 thinking":""),style:{fontSize:d,fontFamily:l,fontWeight:"bold",color:r.colors.textMuted,textAlign:o==="left"?"left":"right",shadow:De(t)}},position:{x:w,y:"24%",width:`${x}%`,anchor:"top-left"},animation:{type:"fadeIn",duration:.4}});let v=(x-5)/100*t.viewport.width,T=Math.min(46,Ur(n.text,u,v,1.35)/t.viewport.height*100+8);return y.push({type:"shape",id:"bubble",content:{shape:"rect",fill:m,borderRadius:18,...a==="tool"?{stroke:i.accent,strokeWidth:2}:{}},position:{x:w,y:"29%",width:`${x}%`,height:`${Math.max(16,T)}%`,anchor:"top-left"},animation:{type:"fadeIn",duration:.4,delay:.1}}),a==="tool"&&n.toolName&&y.push({type:"text",id:"tool-name",content:{text:n.toolName,style:{fontSize:ae(28,t,false),fontFamily:c,fontWeight:"bold",color:i.accent}},position:{x:`${parseFloat(w)+2}%`,y:"32%",anchor:"top-left"},animation:{type:"fadeIn",duration:.4,delay:.15}}),y.push({type:"text",id:"message",content:{text:n.text,style:{fontSize:u,fontFamily:a==="tool"?c:l,fontStyle:a==="thought"?"italic":"normal",color:h,lineHeight:1.35,maxLines:7}},position:{x:`${parseFloat(w)+2}%`,y:a==="tool"&&n.toolName?"38%":"32.5%",width:`${x-4}%`,anchor:"top-left"},animation:{type:"typewriter",duration:Math.min(2.5,.4+n.text.length/120)}}),a==="tool"&&n.resultText&&y.push({type:"text",id:"tool-result",content:{text:n.resultText,style:{fontSize:ae(26,t,false),fontFamily:c,color:r.colors.textMuted,lineHeight:1.3,maxLines:3}},position:{x:w,y:"78%",width:`${x}%`,anchor:"top-left"},animation:{type:"fadeIn",duration:.4,delay:.3}}),n.meta&&y.push({type:"text",id:"meta",content:{text:n.meta,style:{fontSize:f,fontFamily:l,color:r.colors.textMuted}},position:{x:"96%",y:"94%",anchor:"bottom-right"}}),y}function JF(e,t,n,r,i){let{theme:a}=t,o=ie(t,"body"),s=ae(28,t,false),l=ae(32,t,true),c=[...Qp("speaker",e.speaker,e.speakerImage,"26%","28%",t),...Qp("counterpart",e.counterpartName??"",e.counterpartImage,"74%","28%",t),gv("speaker-name",e.speaker,"26%",s,o,a.colors.textMuted),gv("counterpart-name",e.counterpartName??"","74%",s,o,a.colors.textMuted),{type:"path",id:"handoff-arrow",content:{d:"M 0 0 L 100 0",stroke:n,strokeWidth:4,endMarker:"arrow"},position:{x:"50%",y:"28%",width:"28%",height:"1%",anchor:"center"},animation:{type:"fadeIn",duration:.4,delay:.2}}];return e.text.length>0&&c.push({type:"shape",id:"bubble",content:{shape:"rect",fill:i,borderRadius:18},position:{x:"50%",y:"66%",width:"66%",height:"32%",anchor:"center"},animation:{type:"fadeIn",duration:.4,delay:.3}},{type:"text",id:"message",content:{text:e.text,style:{fontSize:l,fontFamily:o,color:r,textAlign:"center",lineHeight:1.35,maxLines:5}},position:{x:"50%",y:"66%",width:"60%",height:"26%",anchor:"center"},animation:{type:"typewriter",duration:2,delay:.4}}),e.meta&&c.push({type:"text",id:"meta",content:{text:e.meta,style:{fontSize:ae(22,t,false),fontFamily:o,color:a.colors.textMuted}},position:{x:"96%",y:"94%",anchor:"bottom-right"}}),c}function gv(e,t,n,r,i,a){return {type:"text",id:e,content:{text:t,style:{fontSize:r,fontFamily:i,fontWeight:"bold",color:a,textAlign:"center"}},position:{x:n,y:"42%",anchor:"center"}}}function Qp(e,t,n,r,i,a){let{theme:o}=a;if(n)return [{type:"image",id:`${e}-avatar`,content:{src:n,alt:t,fit:"contain"},position:{x:r,y:i,width:"9%",height:"16%",anchor:"center"}}];let s=t.split(/\s+/).map(l=>l[0]??"").join("").slice(0,2).toUpperCase();return [{type:"shape",id:`${e}-avatar-bg`,content:{shape:"circle",fill:le(o.colors.text,.1),stroke:o.colors.textMuted,strokeWidth:2},position:{x:r,y:i,width:"9%",height:"16%",anchor:"center"}},{type:"text",id:`${e}-avatar-initials`,content:{text:s||"?",style:{fontSize:ae(44,a,true),fontFamily:ie(a,"body"),fontWeight:"bold",color:o.colors.text,textAlign:"center",verticalAlign:"middle"}},position:{x:r,y:i,width:"9%",height:"16%",anchor:"center"}}]}var X2=new Set(["barChart","columnChart","lineChart","areaChart","pieChart","donutChart","scatterChart","comparisonBar","timeline","diagram","drawing","tree","map","dataTable"]);function kh(e){return e!==void 0&&X2.has(e)}var Fi={title:Jc,sectionHeader:ih,bigText:ah,transcript:ZF,content:lh,statHighlight:Yv,quote:Xv,factCard:Kv,twoColumn:Qv,dateEvent:Zv,imageWithCaption:dh,leftFeature:r2,rightFeature:i2,map:a2,fullBleedQuote:o2,list:s2,photoGrid:l2,definitionCard:c2,comparisonBar:u2,pullQuote:f2,videoWithCaption:p2,videoPullQuote:h2,dataTable:g2,barChart:WF,columnChart:VF,pieChart:GF,donutChart:YF,lineChart:XF,areaChart:KF,scatterChart:QF,diagram:mh,tree:fh,timeline:ph,layout:B2,drawing:O2};function ls(e){let t={...Fi};if(e)for(let n of e)t[n.name]||(t[n.name]=SF(n));return t}var e8=[{type:"slowZoom",direction:"in"},{type:"slowZoom",direction:"out"},{type:"slowZoom",panDirection:"left"},{type:"slowZoom",panDirection:"right"}],t8=8;function yv(e){return e===0||e==="0"||e==="0%"}function n8(e){if(e.type!=="image"&&e.type!=="video")return false;let{position:t}=e;if(!yv(t.x)||!yv(t.y)||t.width!=="100%"||t.height!=="100%")return false;let n=e.content.fit;return n===void 0||n==="cover"}function K2(e){return e.renderStyle.ambientMotion===true}function Q2(e,t,n){let r=n.style.animationSpeed??1,i=K2(n);return r===1&&!i?e:e.map(a=>{let o=a.animation;return !o&&i&&n8(a)&&(o={...new Ex(_p(`${t.id}:${a.id}`)).pickRequired(e8),duration:Math.max(t8,t.duration??0)}),!o||o.type==="none"?o===a.animation?a:{...a,animation:o}:(r!==1&&(o={...o,...o.duration!=null?{duration:o.duration*r}:{},...o.delay!=null?{delay:o.delay*r}:{}}),o===a.animation?a:{...a,animation:o})})}var Kc=["zoomIn","zoomOut","panLeft","panRight"],bv=["bottom","top","center"],r8=["terrain","satellite","road","toner","watercolor"],i8=["neutral","somber","celebratory"],Xn="theme color-scheme name \u2014 e.g. 'blue', 'green'";function Mi(e=[]){return [{key:"title",description:"Optional title above the chart"},{key:"labelColumn",description:"Category/label column",valueHint:"header name or 0-based index"},{key:"valueColumns",description:"Value columns to plot",coerce:"stringList",valueHint:"comma-separated header names or 0-based indexes"},{key:"showTable",description:"Render the source table beneath the chart",coerce:"boolean"},{key:"showLegend",description:"Show a series legend",coerce:"boolean"},{key:"showValues",description:"Print numeric value labels on marks",coerce:"boolean"},{key:"unit",description:'Unit suffix for tick/value labels (e.g. "km")'},{key:"colorScheme",description:"Color scheme seeding the series color rotation",valueHint:Xn},{key:"headers",description:"Header cells (normally derived from the table)",coerce:"stringList"},{key:"rows",description:"Table rows (supply via a data fence)"},...Z2(),{key:"sheet",description:"Worksheet inside the src workbook (XLSX src only)"},{key:"anchor",description:"Top-left cell of the region inside the src workbook, e.g. 'B7'"},{key:"headerRow",description:"Whether row 1 of the source region is a header row",coerce:"boolean"},...e]}function Z2(){return [{key:"src",description:"Container path to a sidecar data file (.csv/.tsv/.xlsx/.parquet) supplying the table"},{key:"previewRows",description:"Max data rows resolved from src for the bounded preview",coerce:"number"},{key:"srcStats",description:"Preview stats recorded by data-reference resolution"},{key:"sort",description:"Sort order over src data: 'Col:desc,Other' (quote names containing , or :)"},{key:"filter",description:"Row filter over src data: 'Col=value;Other>=10' (ops = != > < >= <= ~ !~; AND only)"}]}var wv={key:"stacked",description:"Stack series instead of grouping them side by side",coerce:"boolean"},J2=[{key:"imageTreatment",description:"Per-block photographic grade override ('none' opts out)",values:["none","mono","duotone","warm","cool"]},{key:"useBottomLayer",description:"Show the doc's bottom persistent layers",coerce:"boolean"},{key:"useTopLayer",description:"Show the doc's top persistent layers",coerce:"boolean"}],eT={title:[{key:"title",description:"Main title text"},{key:"subtitle",description:"Subtitle or tagline"},{key:"backgroundColor",description:"Background color",valueHint:"CSS color"}],sectionHeader:[{key:"title",description:"Section title"},{key:"colorScheme",description:"Fallback background color scheme",valueHint:Xn},{key:"imageSrc",description:"Optional background image path"},{key:"imageAlt",description:"Alt text for the background image"},{key:"ambientMotion",description:"Slow zoom/pan effect",values:Kc}],bigText:[{key:"title",description:"The display text (rendered uppercase)"},{key:"imageSrc",description:"Optional full-bleed background image path"},{key:"imageAlt",description:"Alt text for the background image"},{key:"ambientMotion",description:"Slow zoom/pan effect",values:Kc}],content:[{key:"title",description:"Heading shown above the complete body"}],transcript:[{key:"speaker",description:"Speaker display name"},{key:"speakerImage",description:"Avatar image path (missing \u2192 initials medallion)"},{key:"side",description:"Speaker column side",values:["left","right"]},{key:"variant",description:"Beat kind",values:["speech","thought","tool"]},{key:"text",description:"The message body"},{key:"toolName",description:"Tool variant: invoked tool name (mono chip)"},{key:"resultText",description:"Tool variant: bounded result line"},{key:"counterpartName",description:"Handoff form: receiving speaker name"},{key:"counterpartImage",description:"Handoff form: receiving speaker avatar path"},{key:"meta",description:"Muted corner line (timestamp, step)"},{key:"colorScheme",description:"Accent scheme (tool chip, handoff arrow)",valueHint:Xn}],statHighlight:[{key:"stat",description:'The statistic (e.g. "89%", "2x")'},{key:"description",description:"What the stat means"},{key:"detail",description:"Additional detail or context"},{key:"colorScheme",description:"Color scheme for the stat",valueHint:Xn}],quote:[{key:"title",description:"Optional heading above the quote"},{key:"quote",description:"The quote text"},{key:"attribution",description:"Attribution (author, source)"}],pullQuote:[{key:"text",description:"Quote text"},{key:"attribution",description:"Attribution"}],twoColumn:[{key:"left",description:'Left column, as "label|sublabel"',coerce:"labeledPair",required:true},{key:"right",description:'Right column, as "label|sublabel"',coerce:"labeledPair",required:true},{key:"header",description:"Optional header above the columns"},{key:"leftColor",description:"Left column color scheme",valueHint:Xn},{key:"rightColor",description:"Right column color scheme",valueHint:Xn}],dateEvent:[{key:"date",description:'The date (e.g. "July 14, 1974")'},{key:"description",description:"What happened"},{key:"footer",description:"Optional footer text"},{key:"mood",description:"Emotional tone",values:i8}],imageWithCaption:[{key:"imageSrc",description:"Path to the image file",required:true},{key:"imageAlt",description:"Alt text for accessibility"},{key:"caption",description:"Caption text"},{key:"captionPosition",description:"Caption placement",values:bv},{key:"ambientMotion",description:"Slow zoom/pan effect",values:Kc},{key:"isTitle",description:"Style the caption as a title",coerce:"boolean"},{key:"subtitle",description:"Subtitle (only when isTitle)"},{key:"imageCredit",description:"Photo credit / artist name"},{key:"imageLicense",description:"License identifier"}],leftFeature:kv(),rightFeature:kv(),map:[{key:"center",description:'Map center as "lat,lng"',coerce:"latLng",required:true},{key:"zoom",description:"Zoom level (4-16)",coerce:"number"},{key:"mapStyle",description:"Map tile style",values:r8},{key:"title",description:"Optional title overlay"},{key:"caption",description:"Optional caption"}],photoGrid:[{key:"images",description:"Comma-separated image paths",coerce:"stringList"},{key:"caption",description:"Optional caption below the grid"},{key:"ambientMotion",description:"Slow zoom/pan on the largest image",values:Kc}],comparisonBar:[{key:"leftLabel",description:"Left bar label",required:true},{key:"leftValue",description:"Left bar numeric value",coerce:"number",required:true},{key:"rightLabel",description:"Right bar label",required:true},{key:"rightValue",description:"Right bar numeric value",coerce:"number",required:true},{key:"unit",description:'Unit label (e.g. "km")'},{key:"colorScheme",description:"Color scheme",valueHint:Xn}],dataTable:[{key:"title",description:"Optional title above the table"},{key:"headers",description:"Comma-separated header cells",coerce:"stringList"},{key:"rows",description:"Table rows (supply via a data fence)"},{key:"align",description:"Per-column alignment (supply via a data fence)"},{key:"colorScheme",description:"Header color scheme",valueHint:Xn},{key:"sheet",description:"Source worksheet name (XLSX round-trip)"},{key:"anchor",description:"Top-left cell of the region, e.g. 'B7'"},{key:"role",description:"What the table holds within its region",values:["values","formulas","loose"]},{key:"headerRow",description:"Whether row 1 of the source region is a header row",coerce:"boolean"},{key:"titleAnchor",description:"Cell this heading text was absorbed from"},...Z2()],barChart:Mi([wv]),columnChart:Mi([wv]),pieChart:Mi(),donutChart:Mi(),lineChart:Mi(),areaChart:Mi(),scatterChart:Mi(),tree:[{key:"title",description:"Optional title above the tree"},{key:"colorScheme",description:"Folder-row color scheme",valueHint:Xn},{key:"items",description:"Tree items (derived from the tree fence)"}],timeline:[{key:"title",description:"Optional title above the timeline"},{key:"colorScheme",description:"Track and marker color scheme",valueHint:Xn},{key:"tracks",description:"Timeline tracks and events (supply via template data)"},{key:"links",description:"Branch links between event ids (supply via template data)"}],videoWithCaption:[{key:"videoSrc",description:"Path to the video file",required:true},{key:"posterSrc",description:"Poster frame path"},{key:"videoAlt",description:"Alt text for accessibility"},{key:"clipStart",description:"Clip start time (seconds)",coerce:"number"},{key:"clipEnd",description:"Clip end time (seconds)",coerce:"number"},{key:"caption",description:"Caption text"},{key:"captionPosition",description:"Caption placement",values:bv},{key:"videoCredit",description:"Video credit / artist name"},{key:"videoLicense",description:"License identifier"}]};function kv(){return [{key:"imageSrc",description:"Path to the feature image",required:true},{key:"imageAlt",description:"Alt text for accessibility"},{key:"imageWidth",description:"Explicit display width in px",coerce:"number"},{key:"imageHeight",description:"Explicit display height in px",coerce:"number"},{key:"title",description:"Heading text next to the image"},{key:"body",description:"Body text below the title"}]}function a8(e){let t=eT[e];if(t)return [...t,...J2]}function o8(e){return new Map(e.map(t=>[t.key,t]))}function cs(e,t){let n={},r=[],i=e?a8(rt(e)):void 0,a=i?o8(i):void 0;for(let[o,s]of Object.entries(t)){let l=a?.get(o)?.coerce??"string",{value:c,warning:d}=s8(l,s);d?(r.push(`"${o}": ${d}`),n[o]=s):n[o]=c;}return {input:n,warnings:r}}function s8(e,t){switch(e){case "number":{let n=so(t);return n==null?{value:t,warning:`not a number (${JSON.stringify(t)})`}:{value:n}}case "boolean":return l8(t);case "latLng":return c8(t);case "labeledPair":return {value:u8(t)};case "stringList":return {value:d8(t)};default:return {value:t}}}function l8(e){let t=e.trim().toLowerCase();return t==="true"||t===""?{value:true}:t==="false"?{value:false}:{value:e,warning:`not a boolean (${JSON.stringify(e)}) \u2014 expected true or false`}}function c8(e){let t=e.split(",");if(t.length===2){let n=so(t[0]),r=so(t[1]);if(n!=null&&r!=null)return {value:{lat:n,lng:r}}}return {value:e,warning:`not a "lat,lng" pair (${JSON.stringify(e)})`}}function u8(e){let t=e.indexOf("|");if(t<0)return {label:e.trim()};let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();return r?{label:n,sublabel:r}:{label:n}}function d8(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}var xv=600;function tT(e,t,n){let r=Lt(t,"blue"),{layout:i}=t,a=e.title??e.id??"",o=m8(e),s=[{type:"shape",id:"fallback-bg",content:{shape:"rect",fill:r.bg},position:{x:0,y:0,width:"100%",height:"100%"}}];return a&&s.push({type:"text",id:"fallback-title",content:{text:a,style:{fontSize:ae(56,t,true),fontFamily:ie(t,"title"),fontWeight:"bold",color:r.text,textAlign:"left"}},position:{x:"50%",y:o?"28%":"50%",anchor:"center",width:i.maxTextWidth}}),o&&s.push({type:"text",id:"fallback-body",content:{text:o,style:{fontSize:ae(28,t),fontFamily:ie(t,"body"),color:r.text,textAlign:"left"}},position:{x:"50%",y:"55%",anchor:"center",width:i.maxTextWidth}}),s.push({type:"text",id:"fallback-notice",content:{text:`\u26A0 ${n}`,style:{fontSize:ae(18,t),fontFamily:ie(t,"body"),color:le(r.text,.6),textAlign:"center"}},position:{x:"50%",y:"92%",anchor:"center",width:i.maxTextWidth}}),s}function m8(e){if(!e.contents||e.contents.length===0)return "";let t=e.contents.map(n=>Me(n)).join(`
|
|
66
66
|
`).trim();return t.length<=xv?t:`${t.slice(0,xv).trimEnd()}\u2026`}function us(e,t={}){let n=t.customTemplates&&t.customTemplates.length>0?ls(t.customTemplates):Fi;return su(e,t,{registry:n})}function su(e,t,n){let r=t.theme??tt,i=t.viewport??Ze.landscape,a=t.blockIndex??0,o=t.totalBlocks??1,s=t.persistentLayers===false?void 0:t.persistentLayers??r.persistentLayers,l=e.layers;if(l&&l.length>0&&!tn(e)){let m=es(Rt(l),e,r,i,t.mediaAspectRatios);return {layers:ts(m,e,r,s,n.expandedPersistentLayers),source:"authored"}}if(!tn(e)){let m=es([],e,r,i,t.mediaAspectRatios);return {layers:ts(m,e,r,s,n.expandedPersistentLayers),source:m.length>0?"rich-content":"empty"}}let c=n.templateContext?Rt(n.templateContext):_n(r,a,o,i,{motion:t.motion});c.block=Rt(e);let d=k8(e,c,n.registry);if(d.status==="ok"){let m=n.applyRenderStyle!==false?Q2(d.layers,e,r):d.layers,h=es(m,e,r,i,t.mediaAspectRatios);return {layers:ts(h,e,r,s,n.expandedPersistentLayers),source:"template"}}let u=x8(e.template,d);if((t.failureMode??"fallback")==="empty"){let m=es([],e,r,i);return {layers:ts(m,e,r,s,n.expandedPersistentLayers),source:m.length>0?"rich-content":"empty",diagnostic:u}}let f=es(tT(e,c,u.message),e,r,i);return {layers:ts(f,e,r,s,n.expandedPersistentLayers),source:"fallback",diagnostic:u}}function f8(e){return (e.contents??[]).filter(t=>t.type==="code"&&t.lang?.trim().toLowerCase()==="mermaid").map(t=>t.value).filter(t=>t.trim().length>0)}function p8(e){let t=e.template?rt(e.template):void 0,n=(e.contents??[]).filter(i=>i.type==="code"),r=[];for(let i of n){if(t!=="diagram"&&ka(i.lang)){let a=xa(i.value,{explicit:Go(i.lang)});if(a.isDiagram&&a.diagram){r.push({kind:"spatial",template:"diagram",data:iu(a.diagram),aspectRatio:16/9});continue}}if(t!=="tree"&&Yo(i.lang)){let a=Ko(i.value,{explicit:Xo(i.lang)});if(a.isTree&&a.tree){r.push({kind:"spatial",template:"tree",data:eu(a.tree),aspectRatio:3/4});continue}}if(t!=="timeline"&&va(i.lang)){let a=Ta(i.value,{explicit:Lc(i.lang)});a.isTimeline&&a.timeline&&r.push({kind:"spatial",template:"timeline",data:oh(a.timeline),aspectRatio:16/9});}}return r}function h8(e,t){let n=new Set(e.filter(u=>u.type==="image").map(u=>u.content.src)),r=new Set(e.filter(u=>u.type==="video").map(u=>u.content.src)),i=new Set(e.filter(u=>u.type==="mermaid").map(u=>u.content.source)),a=Gr(t.contents),o=a.filter(u=>!r.has(u.src)),s=new Set(a.map(u=>u.src)),l=new Set(n),c=Vr(t.contents).filter(u=>s.has(u.src)||l.has(u.src)?false:(l.add(u.src),true)),d=f8(t).filter(u=>!i.has(u));return [...c.map(u=>({kind:"image",src:u.src,alt:u.alt,...u.width&&u.height?{aspectRatio:u.width/u.height}:{}})),...o.map(u=>({kind:"video",src:u.src,...u.posterSrc?{posterSrc:u.posterSrc}:{},alt:u.alt,aspectRatio:16/9,...u.startAt!=null?{startAt:u.startAt}:{},...u.clipStart!=null?{clipStart:u.clipStart}:{},...u.clipEnd!=null?{clipEnd:u.clipEnd}:{}})),...d.map(u=>({kind:"mermaid",source:u,aspectRatio:16/9})),...p8(t)]}function g8(e,t,n,r){let i=Math.min(n.width,n.height),a=r?i*.025:0,o=t>1?i*.018:0,s={x:e.x+a,y:e.y+a,width:Math.max(0,e.width-a*2),height:Math.max(0,e.height-a*2)},l=Math.min(t,Math.max(1,Math.ceil(Math.sqrt(t*(s.width/Math.max(1,s.height)))))),c=Math.ceil(t/l),d=(s.width-o*(l-1))/l,u=(s.height-o*(c-1))/c;return Array.from({length:t},(f,m)=>({x:s.x+m%l*(d+o),y:s.y+Math.floor(m/l)*(u+o),width:d,height:u}))}function y8(e,t){let n=t.imageTreatment;if(n==="none")return;let r=n?{type:n,strength:e.style.imageTreatment?.strength}:e.style.imageTreatment;if(!(!r||r.type==="none"))return r.type==="duotone"&&!r.color?{...r,color:e.colors.primary}:r}function b8(e,t,n,r,i){if(e.kind==="image"){let c=y8(r,n);return [{id:`${n.id}-embedded-image-${i}`,type:"image",position:t,content:{src:e.src,alt:e.alt||n.title||"Embedded image",fit:"contain",...c?{treatment:c}:{}}}]}if(e.kind==="video"){let c=Math.max(0,e.clipStart??0);return [{id:`${n.id}-embedded-video-${i}`,type:"video",position:t,content:{src:e.src,...e.posterSrc?{posterSrc:e.posterSrc}:{},alt:e.alt||n.title||"Embedded video",fit:"contain",clipStart:c,clipEnd:Math.max(c,e.clipEnd??c+Math.max(0,n.duration)),...e.startAt!=null?{startAt:Math.max(0,e.startAt)}:{}}}]}if(e.kind==="mermaid")return [{id:`${n.id}-mermaid-${i}`,type:"mermaid",position:t,content:{source:e.source,background:r.colors.backgroundLight,foreground:r.colors.text,padding:Math.max(12,Math.round(Math.min(t.width,t.height)*.025))}}];let a={width:t.width,height:t.height,name:`Embedded ${e.template}`},o=_n(r,0,1,a);o.block=Rt(n);let s={id:`${n.id}-embedded-${e.template}-${i}`,duration:n.duration,audioSegment:n.audioSegment,...e.data},l=e.template==="timeline"?ph({...s},o):e.template==="tree"?fh({...s},o):mh({...s},o);return T2(l,a,t,`${n.id}-embedded-${e.template}-${i}`)}function w8(e,t){let n=new Map(Gr(t.contents).filter(r=>r.startAt!=null||r.clipStart!=null||r.clipEnd!=null).map(r=>[r.src,r]));return n.size===0?e:e.map(r=>{if(r.type!=="video")return r;let i=n.get(r.content.src);if(!i)return r;let a=Math.max(0,i.clipStart??r.content.clipStart);return {...r,content:{...r.content,clipStart:a,clipEnd:Math.max(a,i.clipEnd??(i.clipStart!=null?a+Math.max(0,t.duration):r.content.clipEnd)),...i.startAt!=null?{startAt:Math.max(0,i.startAt)}:{}}}})}function es(e,t,n,r,i){let a=w8(e,t),o=h8(a,t);if(o.length===0)return a;let s=o.map(m=>{let h=m.kind==="image"||m.kind==="video"?m.src:m.kind==="mermaid"?m.source:void 0,y=h?i?.[h]:void 0;return y&&Number.isFinite(y)&&y>0?y:m.aspectRatio}),l=t.summaryLayout==="feature"?kO(a,r,s):E2(a,t.template?rt(t.template):void 0,r,o.length,s,{summaryFeature:t.summaryMode==="headings-and-features"&&!a.some(m=>m.id==="feature-body"),stackColumns:_n(n,0,1,r).layout.stackColumns}),c=g8(l.mediaRect,o.length,r,l.framed),d={image:0,video:0,mermaid:0,spatial:0},u=o.flatMap((m,h)=>(d[m.kind]+=1,b8(m,c[h],t,n,d[m.kind]))),f=l.framed?{id:`${t.id}-rich-media-frame`,type:"shape",position:l.mediaRect,content:{shape:"rect",fill:n.colors.backgroundLight,stroke:le(n.colors.text,.14),strokeWidth:2,borderRadius:Math.max(12,Math.round(Math.min(r.width,r.height)*.018))}}:void 0;return [...l.layers,...f?[f]:[],...u]}function k8(e,t,n){let r=Rt(e),i=Rt(t),a=r.children;(!i.children||i.children.length===0)&&a?.length&&(i.children=a);let o=n[rt(r.template)];if(!o)return {status:"unknown-template",layers:[]};let{templateData:s,templateOverrides:l}=r,c=r,d=c.sourceHeading?Zn(r.template,c.title??"",c.contents):null,u=cs(r.template,l??{}).input,f=d||s||l?{...d,...r,...s,...u}:r,m=Object.prototype.hasOwnProperty.call(u,"quote")?u.quote:Object.prototype.hasOwnProperty.call(s??{},"quote")?s?.quote:Object.prototype.hasOwnProperty.call(r,"quote")?r.quote:void 0;if(rt(r.template)==="quote"&&d&&!Object.prototype.hasOwnProperty.call(d,"title")&&!(typeof m=="string"&&m.trim())){let h=f;h.quote=d.quote,!Object.prototype.hasOwnProperty.call(s??{},"title")&&!Object.prototype.hasOwnProperty.call(u,"title")&&delete h.title;}try{let h=o(f,i);return Array.isArray(h)?{status:"ok",layers:Rt(h)}:{status:"invalid-result",layers:[],receivedType:typeof h}}catch(h){return {status:"error",layers:[],error:h}}}function x8(e,t){return t.status==="unknown-template"?{code:"unknown-template",template:e,message:`Unknown template "${e}"`}:t.status==="invalid-result"?{code:"invalid-template-result",template:e,receivedType:t.receivedType,message:`Template "${e}" returned ${t.receivedType}, not a layer array`}:{code:"template-error",template:e,cause:t.error,message:`Template "${e}" failed`}}function ts(e,t,n,r,i){if(!r)return e;let a=i?.bottomLayers??jr(r.bottomLayers,n),o=i?.topLayers??jr(r.topLayers,n);return Iv(e,t,a,o)}var vv=120,Tv=26,v8=62;function T8(e){let t=e.trim().length;if(t<=Tv)return vv;let n=vv*Math.sqrt(Tv/t);return Math.max(v8,Math.round(n))}function E8(e){let{theme:t}=e;return t.id==="standard"&&Fn(t.colors.background)>.85}var S8=[{pos:0,alpha:.95},{pos:38,alpha:.86},{pos:58,alpha:.4},{pos:78,alpha:.1},{pos:100,alpha:0}];function _8(e){return `linear-gradient(0deg, ${S8.map(n=>`${le(e,n.alpha)} ${n.pos}%`).join(", ")})`}function nT(e,t){let n=an(t,e.imageTreatment),{heroSrc:r,heroAlt:i,title:a,subtitle:o,ambientMotion:s,heroCredit:l,heroLicense:c}=e,{theme:d,layout:u,viewport:f}=t,m=!r&&E8(t),h=ae(T8(a),t,true),y=ae(40,t,false),g=o?parseFloat(u.primaryY):50,w=parseFloat(u.maxTextWidth)/100*f.width,x=Ur(a,h,w,1.4),v=E=>E/f.height*100,T=g+v(x/2),S=T+v(40);if(o){let E=Ur(o,y,w,1.5),I=parseFloat(u.secondaryY)-v(E/2);S=Math.max(T,Math.min(S,(T+I)/2));}let k=[];if(r){let E=yr(s);k.push({type:"image",id:"cover-hero",content:{src:r,alt:i||a,fit:"cover",credit:l,license:c,...n?{treatment:n}:{}},position:{x:0,y:0,width:"100%",height:"100%"},animation:E},{type:"shape",id:"cover-gradient",content:{shape:"rect",fill:_8(d.colors.background)},position:{x:0,y:0,width:"100%",height:"100%"}});}else m?k.push({type:"shape",id:"cover-bg",content:{shape:"rect",fill:d.colors.background},position:{x:0,y:0,width:"100%",height:"100%"}},{type:"shape",id:"cover-bg-tint",content:{shape:"rect",fill:`radial-gradient(ellipse at 50% 40%, ${le(d.colors.primary,.16)} 0%, ${le(d.colors.primary,.07)} 38%, ${le(d.colors.primary,0)} 78%)`},position:{x:0,y:0,width:"100%",height:"100%"}}):k.push({type:"shape",id:"cover-bg",content:{shape:"rect",fill:`radial-gradient(ellipse at 50% 40%, ${d.colors.primary} 0%, ${d.colors.background} 100%)`},position:{x:0,y:0,width:"100%",height:"100%"}}),k.push({type:"shape",id:"cover-accent",content:{shape:"rect",fill:m?le(d.colors.primary,.24):"rgba(255, 255, 255, 0.2)"},position:{x:"35%",y:`${S}%`,width:"30%",height:"2px"}});return k.push({type:"text",id:"cover-title",content:{text:a,style:{fontSize:h,fontFamily:ie(t,"title"),fontWeight:"bold",color:d.colors.text,textAlign:"center",shadow:!m}},position:{x:"50%",y:r?o?"70%":"75%":`${g}%`,anchor:"center",width:u.maxTextWidth},animation:Qn(t).coverWordReveal?{type:"wordReveal",duration:.5,delay:.1,stagger:.12}:{type:"fadeIn",duration:.8}}),o&&k.push({type:"text",id:"cover-subtitle",content:{text:o,style:{fontSize:y,fontFamily:ie(t,"body"),fontWeight:m?"bold":"normal",color:m?le(d.colors.text,.78):d.colors.textMuted,textAlign:"center",lineHeight:1.5}},position:{x:"50%",y:r?"82%":u.secondaryY,anchor:"center",width:u.maxTextWidth},animation:Be(t,{type:"fadeIn",duration:.8,delay:.2})}),k}function A8(e){return {heroSrc:e.heroSrc,heroAlt:e.heroAlt,title:e.title,subtitle:e.subtitle,ambientMotion:e.ambientMotion,heroCredit:e.heroCredit,heroLicense:e.heroLicense}}function xh(e,t,n="cover"){let r=A8(e),i={id:"cover-block",duration:0,audioSegment:-1};if(n==="title")return Jc({...i,title:r.title,subtitle:r.subtitle},t);if(n==="sectionHeader")return ih({...i,title:r.title,imageSrc:r.heroSrc,imageAlt:r.heroAlt,ambientMotion:r.ambientMotion},t);if(n==="bigText"||n==="bigTextImage"){let a=n==="bigTextImage"&&!!r.heroSrc;return ah({...i,title:r.title,...a?{imageSrc:r.heroSrc,imageAlt:r.heroAlt??r.title,ambientMotion:r.ambientMotion}:{}},t)}return n==="imageWithCaption"?r.heroSrc?dh({...i,imageSrc:r.heroSrc,imageAlt:r.heroAlt??r.title,caption:r.title,subtitle:r.subtitle,ambientMotion:r.ambientMotion,imageCredit:r.heroCredit,imageLicense:r.heroLicense,isTitle:true},t):Jc({...i,title:r.title,subtitle:r.subtitle},t):nT(r,t)}function zp(e,t,n,r,i,a,o,s,l,c,d,u){let f=su(e,{theme:r,viewport:i,persistentLayers:a??false,blockIndex:t,totalBlocks:n,failureMode:l,motion:d,mediaAspectRatios:u},{registry:s,expandedPersistentLayers:o});f.diagnostic&&c?.(f.diagnostic,e,t);let m=tn(e)?{id:e.id,startTime:0,duration:e.duration,audioSegment:e.audioSegment,...f.layers.length>0?{layers:f.layers}:{},transition:e.transition,template:e.template}:{...Rt(e),...f.layers.length>0?{layers:f.layers}:{}},h=Ka(m,r,t);return h!==m.transition&&(m.transition=h),m}function vh(e,t={}){let n=t,r=n.theme??tt,i=n.viewport??Ze.landscape,{persistentLayers:a,audioSegments:o,customTemplates:s,failureMode:l="fallback",onDiagnostic:c,splitLongBlocks:d=true,mergeShortBlocks:u=true,motion:f}=n,m=e.length,h=s&&s.length>0?ls(s):Fi,y=a===false?void 0:a??r.persistentLayers,g=y?{bottomLayers:jr(y.bottomLayers,r),topLayers:jr(y.topLayers,r)}:void 0;if(!o||o.length===0){let T=0;return e.map((S,k)=>{let E=zp(S,k,m,r,i,y,g,h,l,c,f,n.mediaAspectRatios);return E.startTime=T,T+=E.duration,E})}let w=new Map;e.forEach((T,S)=>{let k=T.audioSegment??0;w.has(k)||w.set(k,[]),w.get(k).push({block:T,originalIndex:S});});let x=new Array(e.length),v=new Map;for(let[T,S]of w){let k=o[T];if(!k){let U=0;for(let{block:V,originalIndex:M}of S){let J=zp(V,M,m,r,i,y,g,h,l,c,f,n.mediaAspectRatios);J.startTime=U,U+=J.duration,x[M]=J;}continue}let E=[],I=[];for(let U of S)U.block.template==="sectionHeader"?E.push(U):I.push(U);let _=E.reduce((U,{block:V})=>U+(V.duration??0),0),A=I.reduce((U,{block:V})=>U+(V.duration??0),0),D=k.duration-_,B=A>0&&D>0?D/A:1,q=[];for(let{block:U,originalIndex:V}of S){let M=zp(U,V,m,r,i,y,g,h,l,c,f,n.mediaAspectRatios),J=U;q.push({block:M,originalIndex:V,templateBlock:J,hasSourceTiming:typeof J.sourceStartTime=="number"});}let F=q.some(U=>U.hasSourceTiming);q.sort((U,V)=>{if(F){let M=U.templateBlock.template==="sectionHeader",J=V.templateBlock.template==="sectionHeader";if(M&&!J)return -1;if(!M&&J)return 1;if(U.hasSourceTiming&&V.hasSourceTiming)return U.templateBlock.sourceStartTime-V.templateBlock.sourceStartTime;if(U.hasSourceTiming&&!V.hasSourceTiming)return -1;if(!U.hasSourceTiming&&V.hasSourceTiming)return 1}return U.originalIndex-V.originalIndex});let P=0;for(let U=0;U<q.length;U++){let V=q[U],{block:M,templateBlock:J}=V;if(V.hasSourceTiming){let we=J.sourceStartTime;M.startTime=k.startTime+we,typeof J.sourceDuration=="number"&&(M.duration=Math.max(5,J.sourceDuration)),P=we+M.duration;}else if(J.template==="sectionHeader")M.startTime=k.startTime+P,P+=M.duration;else {M.startTime=k.startTime+P;let we=M.duration*B;M.duration=we,P+=we;}x[V.originalIndex]=M;}let H=q.map(U=>x[U.originalIndex]).sort((U,V)=>U.startTime-V.startTime);for(let U=0;U<H.length-1;U++){let V=H[U],M=H[U+1],J=V.startTime+V.duration;J>M.startTime?V.duration=M.startTime-V.startTime:J<M.startTime-.5&&(V.duration=Math.max(.1,M.startTime-V.startTime));}let $=5,R=k.startTime+k.duration;for(;H.length>1;){let U=H[H.length-1],V=R-U.startTime;if(u&&V<$&&U.template!=="sectionHeader"){let M=H[H.length-2];M.duration=R-M.startTime,U.duration=0,U.startTime=R,H.pop();}else {U.startTime+U.duration<R&&(U.duration=R-U.startTime);break}}if(H.length===1){let U=H[0];U.startTime+U.duration<R&&(U.duration=R-U.startTime);}let z=u;for(;z;){z=false;for(let U=H.length-1;U>=1;U--){let V=H[U];if(V.duration>0&&V.duration<$){let M=H[U-1],J=V.startTime+V.duration;M.duration=J-M.startTime,V.duration=0,V.startTime=R,H.splice(U,1),z=true;break}}}let C=20;if(d)for(let U=0;U<H.length;U++){let V=H[U];if(V.duration>C){let M=Math.ceil(V.duration/C),J=V.duration/M;if(J>=$){V.duration=J;let we=[];for(let me=1;me<M;me++){let Y={id:`${V.id}-split-${me}`,startTime:V.startTime+me*J,duration:J,audioSegment:V.audioSegment,layers:(V.layers??[]).map(se=>({...Rt(se),id:`${se.id}-split-${me}`})),transition:{type:"dissolve",duration:1},template:V.template};we.push(Y);}v.set(V,we);}}}}if(v.size>0){let T=[];for(let S of x){T.push(S);let k=S?v.get(S):void 0;k&&T.push(...k);}x.splice(0,x.length,...T);}return u?x.filter(T=>T&&T.duration>0):x.filter(Boolean)}function lu(e){return rt(e)in Fi}var rT={width:1920,height:1080},C8={label:"lb",description:"ds",viewport:"vp",layers:"ly",name:"nm",type:"ty",position:"po",content:"ct",animation:"am",width:"wd",height:"hg",anchor:"an",text:"tx",style:"sy",fontSize:"fz",fontFamily:"ff",fontWeight:"fw",color:"cl",textAlign:"al",verticalAlign:"vl",lineHeight:"lh",shadow:"sd",background:"bg",backgroundOpacity:"bo",backgroundGradient:"bj",borderColor:"bc",borderWidth:"bw",borderStyle:"bs",padding:"pd",maxLines:"mx",shape:"sp",fill:"fl",fillOpacity:"fo",gradient:"gr",stroke:"sk",strokeWidth:"sw",borderRadius:"br",shapeKind:"kd",dasharray:"da",arrow:"ar",startMarker:"st",endMarker:"em",src:"sc",alt:"at",fit:"ft",credit:"cr",license:"lc",from:"fr",angle:"ag"},I8=Object.fromEntries(Object.entries(C8).map(([e,t])=>[t,e]));function Zp(e,t){if(Array.isArray(e))return e.map(n=>Zp(n,t));if(e&&typeof e=="object"){let n={};for(let[r,i]of Object.entries(e))n[t[r]??r]=Zp(i,t);return n}return e}function iT(e){if(!e)return;let t=M8(e[eo]);if(!t)return;let n=[];for(let r of t){if(!r||typeof r!="object")continue;let i=r,a={name:i.name,label:i.label,viewport:i.viewport??{...rT},layers:i.layers};i.description!==void 0&&(a.description=i.description);let o=_d(a);o.template&&n.push(o.template);}return n.length>0?n:void 0}function aT(e){return Object.entries(e).map(([t,n])=>{let r=n&&typeof n=="object"?n:{},i={name:t,label:r.lb,viewport:r.vp??{...rT},layers:Zp(r.ly??[],I8)};return typeof r.ds=="string"&&(i.description=r.ds),i})}function Ev(e){return Array.isArray(e)?e:e&&typeof e=="object"?aT(e):null}function Sv(e){try{return JSON.parse(e)}catch{return}}function M8(e){if(e==null)return null;if(Array.isArray(e))return e;if(typeof e=="object")return aT(e);if(typeof e!="string")return null;let t=Sv(e.trim());if(t!==void 0)return Ev(t);try{let n=Sv(vx(e));if(n!==void 0)return Ev(n)}catch{}return null}function q8(e){if(e==null)return;let t=e;if(typeof t=="string"){let n=t.trim();if(!n)return;try{t=JSON.parse(n);}catch{return}}if(Array.isArray(t))return t;if(t&&typeof t=="object")return Object.values(t)}function cu(e){if(!e)return;let t=q8(e[no]);if(!t)return;let n=[];for(let r of t){let i=hl(r);i.valid&&i.theme&&n.push(i.theme);}return n.length>0?n:void 0}var L8=new Set(["json","yaml","yml"]);function Th(e){if(!e.lang||!L8.has(e.lang.toLowerCase()))return false;let t=e.meta??"";return /\bdata\b/.test(t)}function Eh(e){if(e.lang?.toLowerCase()==="json")try{let n=JSON.parse(e.value);return n===null||typeof n!="object"||Array.isArray(n)?{error:'JSON data fence must contain a top-level object ({"key": \u2026})'}:{data:n}}catch(n){return {error:`invalid JSON: ${n instanceof Error?n.message:String(n)}`}}try{return {data:oT(e.value)}}catch(n){return {error:`invalid YAML: ${n instanceof Error?n.message:String(n)}`}}}function _v(e){let t=e.trim();if(t.length>=2){let n=t[0];if((n==='"'||n==="'")&&t.endsWith(n))return t.slice(1,-1)}return t==="true"?true:t==="false"?false:t==="null"||t==="~"?null:t!==""&&!isNaN(Number(t))?Number(t):t}function P8(e){let t=[],n="",r=null;for(let i of e)r?(n+=i,i===r&&(r=null)):i==='"'||i==="'"?(r=i,n+=i):i===","?(t.push(n),n=""):n+=i;return t.push(n),t.map(i=>i.trim()).filter(i=>i!=="")}function Up(e){let t=e.trim();return t.startsWith("[")&&t.endsWith("]")?P8(t.slice(1,-1)).map(_v):_v(t)}function oT(e){let t={},n=e.split(`
|
|
67
67
|
`),r=null,i=null,a=-1;for(let o=0;o<n.length;o++){let s=n[o],l=s.trim();if(!l||l.startsWith("#"))continue;let c=s.length-s.trimStart().length;if(c>0){if(!r)throw new Error(`line ${o+1}: unexpected indented line without a preceding "key:" line`);if(a<0&&(a=c),c>a)throw new Error(`line ${o+1}: nesting deeper than one level is not supported \u2014 use a \`\`\`json data fence for nested input`);if(l.startsWith("- ")){if(i==="map")throw new Error(`line ${o+1}: cannot mix list items and mapping keys under "${r}"`);i="list",t[r].push(Up(l.slice(2)));continue}if(i==="list")throw new Error(`line ${o+1}: cannot mix mapping keys and list items under "${r}"`);let m=l.indexOf(":");if(m<1)throw new Error(`line ${o+1}: expected "key: value"`);let h=l.slice(m+1).trim();if(h==="")throw new Error(`line ${o+1}: nesting deeper than one level is not supported \u2014 use a \`\`\`json data fence for nested input`);i!=="map"&&(i="map",t[r]={}),t[r][l.slice(0,m).trim()]=Up(h);continue}r=null,i=null,a=-1;let d=l.indexOf(":");if(d<1)throw new Error(`line ${o+1}: expected "key: value"`);let u=l.slice(0,d).trim(),f=l.slice(d+1).trim();f===""?(t[u]=[],r=u):t[u]=Up(f);}return t}function sT(e){return e?.find(t=>t.type==="table")}function lT(e){let t=i=>i.children.map(a=>Me(a).trim()),[n,...r]=e.children;return {headers:n?t(n):[],rows:r.map(t),...e.align&&e.align.some(i=>i!=null)?{align:e.align}:{}}}function Sh(e){let t=na(e.trim()),n=t.length>0&&t[0].indexOf("=")>0,r=n||t.length===0?void 0:t[0],i=n?0:1,a={};for(let o=i;o<t.length;o++){let s=ra(t[o]);s&&(a[s.key]=s.value);}return {template:r,params:a}}function ds(e){if(e.type!=="paragraph")return null;let t=e.children??[];if(t.length!==1||t[0].type!=="text")return null;let n=t[0].value.trim(),r=si(n);return !r||r.index!==0?null:Sh(r.inner)}var cT=new Set(["audio","video","media"]);function uT(e){return e!=null&&cT.has(e)}function Sa(e){return e==null?null:oi(e)}function dT(e){let t=e.placement??e.presentation;if(t==="content")return "content";if(t==="pip"||t==="picture-in-picture")return "picture-in-picture";if(t==="overlay"||t==="full-frame")return "overlay";if(e.pip===""||e.pip==="true")return "picture-in-picture";if(e.overlay===""||e.overlay==="true")return "overlay"}function mT(e){return e!=="false"&&e!=="0"}function fT(e){return e==="small"||e==="large"?e:void 0}function pT(e){return e==="square"||e==="wide"?e:void 0}function hT(e){return e==="top-left"||e==="top-right"||e==="bottom-left"||e==="bottom-right"?e:void 0}function R8(e,t){let{template:n,params:r}=e;if(!n||!cT.has(n))return null;let i=r.src;if(!i)return null;let a=n==="video"?"video":"audio",o=r.anchor==="document"||r.span==="document"?"document":"block",s={id:t,src:i,kind:a,startAt:Sa(r.startAt??r.startTime)??0,anchor:o},l=a==="video"?dT(r):void 0;l&&l!=="content"&&(s.placement=l);let c=fT(r.pipSize),d=pT(r.pipShape),u=hT(r.pipPosition);if(c&&(s.pipSize=c),d&&(s.pipShape=d),u&&(s.pipPosition=u),a==="video"&&l&&l!=="content"&&r.lockToBlock!=null){let y=mT(r.lockToBlock);s.lockToBlock=y,s.anchor=y?"block":"document",y&&(s.startAt=0);}let f=Sa(r.clipStart),m=Sa(r.clipEnd);f!=null&&(s.clipStart=f),m!=null&&(s.clipEnd=m),s.lockToBlock===true&&delete s.clipEnd,(r.spillover==="true"||r.spillover==="")&&(s.spillover=true);let h=tl(pd(r));return h&&(s.edits=h),s}function Av(e){let t=n=>{for(let r of n){if(r.type!=="htmlElement")continue;if(r.tagName==="video")return r;let i=t(r.children);if(i)return i}return null};return t(e)}function gT(e){if(e.type==="htmlBlock"){if(!/^\s*<video\b/i.test(e.rawHtml))return null;let n=Av(e.htmlChildren);return n?{element:n,raw:e.rawHtml.trim()}:null}if(e.type!=="paragraph"||!e.children.every(n=>n.type==="htmlInline"))return null;let t=e.children.map(n=>n.type==="htmlInline"?n.rawHtml:"").join("");if(!/^\s*<video\b[\s\S]*<\/video>\s*$/i.test(t))return null;for(let n of e.children){if(n.type!=="htmlInline")continue;let r=Av(n.htmlChildren);if(r)return {element:r,raw:t.trim()}}return null}function N8(e,t){let n=gT(e);if(!n)return null;let{element:r}=n,i=dT({placement:r.attributes["data-squisq-video-placement"]??""});if(!i||i==="content")return null;let a=r.attributes.src;if(!a)return null;let o=mT(r.attributes["data-squisq-video-lock-to-block"]),s={id:t,src:a,kind:"video",placement:i,lockToBlock:o,startAt:o?0:Sa(r.attributes["data-squisq-video-start-at"])??0,anchor:o?"block":"document"},l=fT(r.attributes["data-squisq-video-pip-size"]),c=pT(r.attributes["data-squisq-video-pip-shape"]),d=hT(r.attributes["data-squisq-video-pip-position"]);l&&(s.pipSize=l),c&&(s.pipShape=c),d&&(s.pipPosition=d);let u=Sa(r.attributes["data-squisq-video-clip-start"]),f=Sa(r.attributes["data-squisq-video-clip-end"]);u!=null&&(s.clipStart=u),!o&&f!=null&&(s.clipEnd=f);let m=tl(hd("video",r.attributes));return m&&(s.edits=m),s}function D8(e,t,n){let r=[],i=[],a=[],o=0,s=0;for(let l of e??[]){let c=ds(l),d=c?R8(c,""):N8(l,"");if(d){d.id=t(d.src,o++);let u=l.position?.start.line;if(u!=null&&(d.sourceLine=u),n!==void 0){let f=gT(l),m=l.type==="paragraph"&&l.children?.[0]?.type==="text"?l.children[0].value.trim():f?.raw;d.origin={blockId:n,index:s,...m!==void 0?{raw:m}:{},...f?{format:"html"}:{}};}(d.anchor==="document"?i:r).push(d);}else a.push(l);s++;}return {media:r,documentMedia:i,remaining:a}}function O8(e,t){t.x!=null&&(e.x=t.x),t.y!=null&&(e.y=t.y),t.startTime!=null&&(e.startTime=t.startTime),t.duration!=null&&(e.duration=t.duration),t.connectsTo&&(e.connectsTo=t.connectsTo),t.transition&&(e.transition=t.transition);}function F8(e,t){let n=e.template,r=e.params,i=Object.keys(r).length>0,a={id:t.makeId(e),startTime:0,duration:t.defaultDuration,audioSegment:0,template:rt(n),standaloneAnnotation:true,sourceAnnotation:{template:n,...i?{params:r}:{}},...r.title?{title:r.title}:{}};return i&&(a.templateOverrides=r,O8(a,$n(r).blockMeta)),a}function B8(e,t){let n=[],r=[],i=null;for(let a of e??[]){let o=ds(a);if(o!=null&&o.template!=null&&!uT(o.template)){let l=F8(o,t);r.push(l),i=l;}else i?(i.contents??(i.contents=[])).push(a):n.push(a);}return {leading:n,blocks:r}}function yT(e){if(e.type!=="paragraph")return null;let t=e.children;if(t.length===0)return null;let n=t[t.length-1];return n.type==="text"?n.value:null}function $8(e){if(ds(e)?.template)return true;let t=yT(e);if(t==null)return false;let n=si(t);return !!n&&n.index>0&&!!Sh(n.inner).template}function H8(e,t,n){let r=[...e],i=r[t];if(i.type!=="paragraph")return r;let a=[...i.children],o=a[a.length-1];if(o.type!=="text")return r;let s=o.value.slice(0,n);return s.length===0&&a.length===1?r.splice(t,1):(a[a.length-1]={...o,value:s},r[t]={...i,children:a}),r}function z8(e){if(!e||e.length===0)return null;let t=e.length-1,n=e[t],r=null,i=null,a=ds(n);if(a?.template&&n.type==="paragraph"){let o=n.children[0];r={template:a.template,params:a.params,origin:{kind:"paragraph",index:t,raw:o&&o.type==="text"?o.value.trim():""}},i=e.slice(0,t);}else {let o=yT(n),s=o!=null?si(o):null;if(o!=null&&s&&s.index>0){let l=Sh(s.inner);l.template&&(r={template:l.template,params:l.params,origin:{kind:"trailing",index:t,suffix:o.slice(s.index)}},i=H8(e,t,s.index));}}if(!r||!i)return null;for(let o=0;o<t;o++)if($8(e[o]))return null;return {data:r,strippedContents:i}}var U8=/[^\w\s-]/g,j8=/[\s_]+/g,W8=/-+/g,V8=/^-|-$/g;function Jp(e){return e.toLowerCase().replace(U8,"").replace(j8,"-").replace(W8,"-").replace(V8,"")||"block"}function G8(){let e=new Map,t=(n,r)=>{let i=Me(n),a=Jp(i),o=e.get(a)??0;return e.set(a,o+1),o===0?a:`${a}-${o+1}`};return t.reserve=n=>{e.set(n,Math.max(e.get(n)??0,1));},t.fromText=n=>{let r=Jp(n),i=e.get(r)??0;return e.set(r,i+1),i===0?r:`${r}-${i+1}`},t}function eh(e,t){t.x!=null&&(e.x=t.x),t.y!=null&&(e.y=t.y),t.startTime!=null&&(e.startTime=t.startTime),t.duration!=null&&(e.duration=t.duration),t.connectsTo&&(e.connectsTo=t.connectsTo),t.transition&&(e.transition=t.transition);}function Y8(e){if(!e)return {};let t=e.templateAnnotation?.params?$n(e.templateAnnotation.params).blockMeta:{},n=e.attributes?.blockMeta??{};return {...t,...n}}function Cv(e){return e.promotedBodyAnnotation?.params?$n(e.promotedBodyAnnotation.params).blockMeta:e.sourceHeading?Y8(e.sourceHeading):e.sourceAnnotation?.params?$n(e.sourceAnnotation.params).blockMeta:{}}function X8(e){for(let t of e){if(!t.sourceHeading||t.sourceHeading.templateAnnotation?.template)continue;let n=z8(t.contents);if(!n)continue;let{template:r,params:i}=n.data;uT(r)||!lu(r)||(t.template=rt(r),Object.keys(i).length>0&&(t.templateOverrides=i,eh(t,$n(i).blockMeta)),t.contents=n.strippedContents,t.promotedBodyAnnotation=n.data);}}function bT(e,t,n){let r=[];for(let i of e){i.children&&i.children.length>0&&(i.children=bT(i.children,t,n));let{leading:a,blocks:o}=B8(i.contents,{makeId:t,defaultDuration:n});if(o.length===0){r.push(i);continue}i.contents=a,(i.children?.length??0)>0&&!Ar(i.template)?(i.children=[...o,...i.children],r.push(i)):r.push(i,...o);}return r}function qa(e,t){let n=t?.articleId??"markdown-doc",r="sectionHeader",i=5,a=G8(),o=a,s=[],l=[],c=0,d=[],u=[],f=null;function m(){f&&u.length>0&&(f.contents=(f.contents??[]).concat(u),u=[]);}function h(q){let F=q?.attributes?.id,P=F||(q?o(q,c++):"preamble");F&&a&&a.reserve(F);let H=q?.templateAnnotation,$=H?.template??(q?r:void 0),R=$!=null?rt($):void 0,z=q?Me(q):void 0,C={id:P,startTime:0,duration:i,audioSegment:0,template:R,...q?{sourceHeading:q}:{},...z?{title:z}:{}};H?.params&&(C.templateOverrides=H.params,eh(C,$n(H.params).blockMeta));let U=q?.attributes;return U&&(U.blockMeta&&eh(C,U.blockMeta),U.classes&&U.classes.length>0&&(C.classes=U.classes),U.metadata&&Object.keys(U.metadata).length>0&&(C.metadata=U.metadata)),C}for(let q of e.children)if(q.type==="heading"){let F=q,P=F.depth;m();let H=h(F);if(d.length===0)f&&!f.sourceHeading&&s.push(f),s.push(H),d.push({block:H,depth:P});else {for(;d.length>0&&d[d.length-1].depth>=P;)d.pop();if(d.length===0)s.push(H),d.push({block:H,depth:P});else {let $=d[d.length-1].block;$.children||($.children=[]),$.children.push(H),d.push({block:H,depth:P});}}f=H;}else f||(f=h(null)),u.push(q);m(),f&&!f.sourceHeading&&!s.includes(f)&&s.push(f);let y=[];for(let q of _a(s)){let{media:F,documentMedia:P,remaining:H}=D8(q.contents,($,R)=>`${q.id}-media-${R}-${$.replace(/[^a-zA-Z0-9]+/g,"-")}`,q.id);F.length>0&&(q.media=F),P.length>0&&y.push(...P),q.contents&&(q.contents=H);}s.length>0&&!s[0].sourceHeading&&(s[0].contents?.length??0)===0&&(s[0].children?.length??0)===0&&!s[0].media&&s.shift(),X8(_a(s)),s=bT(s,q=>{let F=q.params.title??q.template??"block";return a?a.fromText(F):Jp(F)},i),s.length>0&&!s[0].sourceHeading&&!s[0].standaloneAnnotation&&(s[0].contents?.length??0)===0&&(s[0].children?.length??0)===0&&!s[0].media&&s.shift();let w=_a(s);for(let q of w)K8(q,l);for(let q of w)Q8(q,l),J8(q,l),Z8(q,l);!tB(e)&&wT(s,rt(r),{featureIndex:0});for(let q of w)eB(q,l);let x=new Map;for(let q of w)x.has(q.id)?l.push({severity:"error",code:"duplicate-id",message:`Duplicate block id "${q.id}" \u2014 later connections and links are ambiguous`,blockId:q.id,...th(q)}):x.set(q.id,q);for(let q of w)for(let F of q.connectsTo??[])x.has(F.target)||l.push({severity:"warning",code:"unresolved-connection",message:`Block "${q.id}" connects to unknown target "${F.target}"`,blockId:q.id,...th(q)});let v=3,T=[];for(let q of w){if(Cv(q).duration!=null)continue;let F=Ia(q);if(F.length>0){let P=Tx(F);q.duration=Math.max(v,P.seconds);}else q.duration=i;}let S=0;for(let q of w){Cv(q).startTime==null&&(q.startTime=S);let P=Ia(q);if(P.length>0){let H=rB(P);if(H.length>0){let $=q.duration/H.length;for(let R=0;R<H.length;R++)T.push({text:H[R],startTime:S+R*$,endTime:S+(R+1)*$,audioSegment:0});}}S+=q.duration;}let k=new Map(w.map(q=>[q.id,q]));for(let q of y)q.lockToBlock===false&&q.origin?.format==="html"&&!/\bdata-squisq-video-start-at\s*=/i.test(q.origin.raw??"")&&(q.startAt=k.get(q.origin.blockId)?.startTime??0);let E=T.length>0?{phrases:T,...{},version:1}:void 0,I=iT(e.frontmatter),_=cu(e.frontmatter),A=Co(e.frontmatter),D=ul(e.frontmatter),B={articleId:n,duration:S,blocks:s,audio:{segments:[]},...E?{captions:E}:{},...e.frontmatter?{frontmatter:e.frontmatter}:{},...A?{themeId:A}:{},...D?{motion:D}:{},...I?{customTemplates:I}:{},..._?{customThemes:_}:{},...l.length>0?{diagnostics:l}:{},...y.length>0?{documentMedia:y}:{}};{let q=oB(e,s);q&&(B.startBlock=q);}return B}function _a(e){let t=[];for(let n of e)t.push(n),n.children&&t.push(..._a(n.children));return t}function br(e){let t=[];for(let n of e)t.push(n),n.children&&!Ar(n.template)&&t.push(...br(n.children));return t}function th(e){let t=e.sourceHeading?.position?.start.line;return t!=null?{line:t}:{}}function K8(e,t){let n;for(let r of e.contents??[]){if(r.type!=="code"||!Th(r))continue;let i=Eh(r);if(i.error){t.push({severity:"error",code:"data-fence-parse",message:`Data fence in block "${e.id}": ${i.error}`,blockId:e.id,...r.position?{line:r.position.start.line}:th(e)});continue}n={...n,...i.data};}if(wl.has(rt(e.template??""))){let r=i=>n&&i in n||e.templateOverrides&&i in e.templateOverrides;if(!r("headers")&&!r("rows")){let i=sT(e.contents);i&&(n={...lT(i),...n});}}n&&Object.keys(n).length>0&&(e.templateData=n);}function Q8(e,t){if(rt(e.template??"")!=="diagram"||e.children&&e.children.length>0||e.templateData&&"nodes"in e.templateData)return;let n=(e.contents??[]).filter(o=>o.type==="code");if(n.length!==1||!ka(n[0].lang))return;let r=xp(n[0].value);if(r.nodes.length===0){t.push({severity:"warning",code:"ascii-diagram-parse",message:`Diagram block "${e.id}": code fence did not parse as an ASCII diagram`,blockId:e.id});return}let{nodes:i,edges:a}=iu(r);e.templateData={nodes:i,edges:a,...e.templateData};}function Z8(e,t){if(rt(e.template??"")!=="tree"||e.templateData&&"items"in e.templateData)return;let n=Zn("tree",e.title??"",e.contents);if(!n||!Array.isArray(n.items)||n.items.length===0){t.push({severity:"warning",code:"tree-parse",message:`Tree block "${e.id}": body did not parse as a tree`,blockId:e.id});return}e.templateData={...n,...e.templateData};}function J8(e,t){if(rt(e.template??"")!=="timeline"||e.templateData&&"tracks"in e.templateData)return;let n=Zn("timeline",e.title??"",e.contents);if(!n||!Array.isArray(n.tracks)||n.tracks.length===0){t.push({severity:"warning",code:"timeline-parse",message:`Timeline block "${e.id}": body did not parse as an ASCII timeline`,blockId:e.id});return}e.templateData={...n,...e.templateData};}function eB(e,t){if(rt(e.template??"")!=="timeline"||!e.templateData||!("tracks"in e.templateData))return;let n=(e.contents??[]).filter(r=>r.type==="code"&&va(r.lang));if(n.length===1)for(let r of Tp(n[0].value).warnings){let i=/^unresolved-link\((.+)\)$/.exec(r);t.push({severity:"warning",code:i?"timeline-unresolved-link":"timeline-parse-warning",message:i?`Timeline block "${e.id}": unresolved branch ${i[1]}`:`Timeline block "${e.id}": ${r}`,blockId:e.id});}}function tB(e){let t=e.frontmatter?.["squisq-auto-templates"];return t===false||t==="false"||t==="off"||t==="no"||t===0}function wT(e,t,n){for(let r of e){let i=!!r.sourceHeading?.templateAnnotation?.template||!!r.promotedBodyAnnotation;if(r.sourceHeading&&!i&&r.template===t){let a=yx(r.contents??[]),o=bx(a,n.featureIndex);if(o&&Wv(o,r.contents)){let s=Zn(o,r.title??"",r.contents,{preserveSourceHeading:true});s&&((o==="leftFeature"||o==="rightFeature")&&(n.featureIndex+=1),r.template=o,r.autoTemplate=true,r.templateData={...s,...r.templateData});}}r.children&&r.children.length>0&&!Ar(r.template)&&wT(r.children,t,n);}}function Ia(e){if(!e.contents||e.contents.length===0)return "";let t=rt(e.template??""),n=t==="diagram"&&e.templateData!==void 0&&"nodes"in e.templateData||t==="timeline"&&e.templateData!==void 0&&"tracks"in e.templateData||t==="tree"&&e.templateData!==void 0&&"items"in e.templateData;return e.contents.filter(r=>!(n&&r.type==="code")).map(r=>Me(r)).join(`
|
|
68
|
-
`).trim()}var nB=12;function rB(e){let t=e.split(/\n+/).map(o=>o.trim()).filter(o=>o.length>0),n=/(?<=[.!?])\s+/,r=[];for(let o of t){let s=o.split(n).map(l=>l.trim()).filter(l=>l.length>0);r.push(...s);}if(r.length===0)return [];let i=[];for(let o of r)if(o.split(/\s+/).length>nB){let l=Math.floor(o.length/2),c=/[,;]\s+|\s+—\s+|\s+-\s+/g,d=-1,u=1/0,f;for(;(f=c.exec(o))!==null;){let m=Math.abs(f.index-l);m<u&&(u=m,d=f.index+f[0].length);}d>0&&d<o.length-5?(i.push(o.slice(0,d).trim()),i.push(o.slice(d).trim())):i.push(o);}else i.push(o);let a=[i[0]];for(let o=1;o<i.length;o++)i[o].length<15&&a.length>0?a[a.length-1]+=" "+i[o]:a.push(i[o]);return a}function kT(e){for(let t of e){if(t.type!=="htmlElement")continue;if(t.tagName==="img"&&t.attributes.src)return {url:t.attributes.src,alt:t.attributes.alt};let n=kT(t.children);if(n)return n}}function xT(e){if(e.type==="image"){let t=e;return {url:t.url,alt:t.alt}}if(e.type==="htmlBlock"||e.type==="htmlInline"){let t=e;if(t.htmlChildren){let n=kT(t.htmlChildren);if(n)return n}}if("children"in e&&Array.isArray(e.children))for(let t of e.children){let n=xT(t);if(n)return n}}function iB(e){let t;for(let n of e){let r=n.sourceHeading?.depth;if(!(r===void 0||!(n.title??Me(n.sourceHeading)))&&(!t||r<t.sourceHeading.depth)&&(t=n,r===1))break}return t}function aB(e){return;}function oB(e,t,n){let r=typeof e.frontmatter?.title=="string"?e.frontmatter.title.trim():void 0,i=iB(t),a=i?i.title??Me(i.sourceHeading):void 0,o=r||a||aB();if(!o)return;let s=typeof e.frontmatter?.subtitle=="string"?e.frontmatter.subtitle.trim():void 0,l=i??t[0],c=l?.contents?.[0]?.type==="paragraph"?Me(l.contents[0]):void 0,d=s||c,u=xT(e);return {title:o,...d?{subtitle:d}:{},...u?{heroSrc:u.url,heroAlt:u.alt??o}:{},ambientMotion:"zoomIn"}}var ms="\uE000",_h=new RegExp(`${ms}([a-z]+):([a-zA-Z0-9-]+)${ms}`,"g");function Ah(e,t){return `${ms}${e}:${t}${ms}`}function Ch(e){return e.includes(ms)}function Ih(e){return e.replace(_h,"")}function Mh(e){let t=[],n=0;_h.lastIndex=0;let r;for(;(r=_h.exec(e))!==null;)r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"icon",family:r[1],name:r[2]}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function qh(e,t){return `fa-${e} fa-${t}`}function ft(e,t=0){if(!e||e.type==="none")return {className:"",style:{}};let n=
|
|
69
|
-
`:"";return t.map(RT).join(n)}function
|
|
70
|
-
`).trim()}function TT(e){if(e===void 0)return;let t=parseFloat(e);return Number.isFinite(t)&&t>0?t:void 0}function Hh(e){if(!e||e.length===0)return [];let t=[];function n(i){if(!i||typeof i!="object")return;let a=i;if(a.type==="htmlElement"&&a.tagName.toLowerCase()==="img"){let o=a.attributes,s=o?.src;typeof s=="string"&&s&&t.push({src:s,alt:typeof o?.alt=="string"?o.alt:"",width:TT(o?.width),height:TT(o?.height)});}if(Array.isArray(a.children))for(let o of a.children)n(o);}function r(i){if("type"in i&&i.type==="image"&&"url"in i){let a=i;a.url&&t.push({src:a.url,alt:a.alt??""});}if("type"in i&&(i.type==="htmlBlock"||i.type==="htmlInline")){let a=i;for(let o of a.htmlChildren??[])n(o);}for(let a of mn(i))r(a);}for(let i of e)r(i);return t}function
|
|
71
|
-
`).trim();return n?{text:n,markdown:t}:void 0}function Na(e){if(e?.src)return {type:"image",src:e.src,alt:e.alt??"",credit:e.credit,license:e.license}}function zi(e,t,n){return {kind:"canvas-embed",variant:e,slots:{media:{type:"canvas",spatial:e,block:n??t.block,aspect:{width:t.viewport.width,height:t.viewport.height}}}}}var
|
|
72
|
-
`).trim(),markdown:i}}function mu(e,t,n){let r=
|
|
73
|
-
`).trim(),markdown:E},S.draft={...S.draft,slots:k}):s.splice(1,1);}}for(let T of s)T.override=
|
|
68
|
+
`).trim()}var nB=12;function rB(e){let t=e.split(/\n+/).map(o=>o.trim()).filter(o=>o.length>0),n=/(?<=[.!?])\s+/,r=[];for(let o of t){let s=o.split(n).map(l=>l.trim()).filter(l=>l.length>0);r.push(...s);}if(r.length===0)return [];let i=[];for(let o of r)if(o.split(/\s+/).length>nB){let l=Math.floor(o.length/2),c=/[,;]\s+|\s+—\s+|\s+-\s+/g,d=-1,u=1/0,f;for(;(f=c.exec(o))!==null;){let m=Math.abs(f.index-l);m<u&&(u=m,d=f.index+f[0].length);}d>0&&d<o.length-5?(i.push(o.slice(0,d).trim()),i.push(o.slice(d).trim())):i.push(o);}else i.push(o);let a=[i[0]];for(let o=1;o<i.length;o++)i[o].length<15&&a.length>0?a[a.length-1]+=" "+i[o]:a.push(i[o]);return a}function kT(e){for(let t of e){if(t.type!=="htmlElement")continue;if(t.tagName==="img"&&t.attributes.src)return {url:t.attributes.src,alt:t.attributes.alt};let n=kT(t.children);if(n)return n}}function xT(e){if(e.type==="image"){let t=e;return {url:t.url,alt:t.alt}}if(e.type==="htmlBlock"||e.type==="htmlInline"){let t=e;if(t.htmlChildren){let n=kT(t.htmlChildren);if(n)return n}}if("children"in e&&Array.isArray(e.children))for(let t of e.children){let n=xT(t);if(n)return n}}function iB(e){let t;for(let n of e){let r=n.sourceHeading?.depth;if(!(r===void 0||!(n.title??Me(n.sourceHeading)))&&(!t||r<t.sourceHeading.depth)&&(t=n,r===1))break}return t}function aB(e){return;}function oB(e,t,n){let r=typeof e.frontmatter?.title=="string"?e.frontmatter.title.trim():void 0,i=iB(t),a=i?i.title??Me(i.sourceHeading):void 0,o=r||a||aB();if(!o)return;let s=typeof e.frontmatter?.subtitle=="string"?e.frontmatter.subtitle.trim():void 0,l=i??t[0],c=l?.contents?.[0]?.type==="paragraph"?Me(l.contents[0]):void 0,d=s||c,u=xT(e);return {title:o,...d?{subtitle:d}:{},...u?{heroSrc:u.url,heroAlt:u.alt??o}:{},ambientMotion:"zoomIn"}}var ms="\uE000",_h=new RegExp(`${ms}([a-z]+):([a-zA-Z0-9-]+)${ms}`,"g");function Ah(e,t){return `${ms}${e}:${t}${ms}`}function Ch(e){return e.includes(ms)}function Ih(e){return e.replace(_h,"")}function Mh(e){let t=[],n=0;_h.lastIndex=0;let r;for(;(r=_h.exec(e))!==null;)r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"icon",family:r[1],name:r[2]}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function qh(e,t){return `fa-${e} fa-${t}`}function ft(e,t=0){if(!e||e.type==="none")return {className:"",style:{}};let n=pB(e),r=gB(e);return {className:n,style:r}}function pB(e){let{type:t,direction:n,panDirection:r}=e;switch(t){case "fadeIn":return "anim-fadeIn";case "fadeOut":return "anim-fadeOut";case "slowZoom":return r==="left"?"anim-slowZoom-panLeft":r==="right"?"anim-slowZoom-panRight":n==="out"?"anim-slowZoom-out":"anim-slowZoom-in";case "zoomIn":return "anim-zoomIn";case "zoomOut":return "anim-zoomOut";case "panLeft":return "anim-panLeft";case "panRight":return "anim-panRight";case "typewriter":return "anim-typewriter";case "fadeInUp":return "anim-fadeInUp";case "slideIn":return `anim-slideIn-${e.origin&&e.origin!=="center"?e.origin:"left"}`;case "wordReveal":return "anim-wordReveal";case "countUp":return "anim-countUp";case "drawOn":return "anim-drawOn";case "grow":return hB(e.origin);case "reveal":return e.shape==="iris"?"anim-reveal-iris":`anim-reveal-${e.origin&&e.origin!=="center"?e.origin:"left"}`;case "drift":return "anim-drift";case "tween":return "anim-tween";default:return ""}}function hB(e){switch(e){case "left":case "right":return "anim-grow-x";case "top":case "bottom":return "anim-grow-y";default:return "anim-grow"}}function LT(e){switch(e){case "left":return "left center";case "right":return "right center";case "top":return "center top";case "bottom":return "center bottom";default:return "center center"}}function Rh(e){if(!e)return "none";let t=[];return (e.x||e.y)&&t.push(`translate(${e.x??0}px, ${e.y??0}px)`),e.rotate&&t.push(`rotate(${e.rotate}deg)`),e.scale!=null&&e.scale!==1&&t.push(`scale(${e.scale})`),t.length>0?t.join(" "):"none"}function gB(e){let t={};return e.duration!==void 0&&(t["--anim-duration"]=`${e.duration}s`),e.delay!==void 0&&(t["--anim-delay"]=`${e.delay}s`),e.easing&&(t["--anim-easing"]=e.easing),(e.type==="grow"||e.type==="reveal")&&(t["--anim-origin"]=LT(e.origin)),e.type==="wordReveal"&&(t["--anim-stagger"]=`${e.stagger??yu}s`),e.type==="tween"&&(t["--tween-from-transform"]=Rh(e.fromState),t["--tween-to-transform"]=Rh(e.toState),t["--tween-from-opacity"]=`${e.fromState?.opacity??1}`,t["--tween-to-opacity"]=`${e.toState?.opacity??1}`),t}var yu=.08;function Fh(e,t){let n=e.delay??0,r=e.wordTimes;if(r&&r.length>0){if(t<r.length)return r[t];let i=r[r.length-1],a=r.length>1?Math.max(.02,i-r[r.length-2]):e.stagger??yu;return i+a*(t-r.length+1)}return n+(e.stagger??yu)*t}function bs(e,t,n){if(e==="cut")return "";let r=t?"enter":"exit";return `transition-${bB(e,n)}-${r}`}var yB={airplane:"airplane",blinds:"blindsHorizontal",box:"box",checker:"checkerboard",checkerboard:"checkerboard",circle:"shapeCircle",clock:"clock",comb:"combHorizontal",conveyor:"conveyor",cover:"coverLeft",crush:"crush",cube:"cube",curtains:"curtains",cut:"cut",diamond:"shapeDiamond",dissolve:"dissolve",doors:"doors",drape:"drape",fade:"fade",fallOver:"fallOver",ferris:"ferrisWheel",ferrisWheel:"ferrisWheel",flash:"flash",flip:"flip",flyThrough:"flyThrough",flythrough:"flyThrough",fracture:"fracture",gallery:"gallery",glitter:"glitter",honeycomb:"honeycomb",morph:"morph",newsflash:"newsflash",orbit:"orbit",origami:"origami",pageCurl:"pageCurl",pageCurlDouble:"pageCurlDouble",pageCurlSingle:"pageCurlSingle",pan:"panLeft",peelOff:"peelOff",plus:"shapePlus",prestige:"prestige",prism:"prism",pull:"pullLeft",push:"pushLeft",random:"random",randomBar:"randomBarsHorizontal",randomBars:"randomBarsVertical",reveal:"revealLeft",ripple:"ripple",rotate:"rotate",shape:"shapeCircle",shred:"shred",slideDown:"slideDown",slideLeft:"slideLeft",slideRight:"slideRight",slideUp:"slideUp",split:"splitHorizontal",strips:"stripsLeft",switch:"switch",uncover:"uncoverLeft",vortex:"vortex",warp:"warp",wedge:"wedge",wheel:"wheel",wheelReverse:"wheelReverse",wind:"wind",window:"window",wipe:"wipeLeft",zoom:"zoom"};function bB(e,t){switch(e){case "randomBars":case "randomBar":return uu("randomBars",t,e==="randomBar"?"Horizontal":"Vertical");case "comb":return uu("comb",t,"Horizontal");case "blinds":return uu("blinds",t,"Horizontal");case "split":return uu("split",t,"Horizontal");case "push":return Yr("push",t,"Left");case "wipe":return Yr("wipe",t,"Left");case "cover":return Yr("cover",t,"Left");case "uncover":return Yr("uncover",t,"Left");case "pull":return Yr("pull",t,"Left");case "reveal":return Yr("reveal",t,"Left");case "strips":return Yr("strips",t,"Left");case "pan":return Yr("pan",t,"Left");default:return yB[e]}}function Yr(e,t,n){let r=wB(t,n);return `${e}${r}`}function uu(e,t,n){let r=kB(t,n);return `${e}${r}`}function wB(e,t){switch(e){case "right":return "Right";case "up":return "Up";case "down":return "Down";default:return t}}function kB(e,t){switch(e){case "vertical":case "up":case "down":return "Vertical";case "horizontal":case "left":case "right":return "Horizontal";default:return t}}var xB=40,vB=e=>Math.max(0,Math.min(1,e)),Xr=e=>Math.round(e*100)/100;function Bh(e,t){let n=[];if(t!=null&&t>0&&n.push(`blur(${Math.round(t)}px)`),e&&e.type!=="none"){let r=vB(e.strength??.6);switch(e.type){case "mono":n.push(`grayscale(${Xr(r)})`,`contrast(${Xr(1+.05*r)})`);break;case "duotone":{let i=Cd(e.color??"#3d5a80");n.push("grayscale(1)",`sepia(${Xr(Math.max(.35,r))})`,`hue-rotate(${Math.round(i-xB)}deg)`,`saturate(${Xr(1+r)})`);break}case "warm":n.push(`sepia(${Xr(.4*r)})`,`saturate(${Xr(1+.15*r)})`);break;case "cool":n.push(`saturate(${Xr(1-.25*r)})`,`hue-rotate(${Math.round(-12*r)}deg)`,`contrast(${Xr(1+.06*r)})`);break}}return n.length>0?n.join(" "):void 0}var fs=Object.freeze({enabled:{canonical:"squisq-cover-slide",legacy:"cover-slide"},template:{canonical:"squisq-cover-template",legacy:"cover-template"},duration:{canonical:"squisq-cover-duration",legacy:"cover-duration"},playback:{canonical:"squisq-cover-playback",legacy:"cover-playback"}}),ps=Object.freeze({enabled:true,template:"cover",duration:2,playback:"preroll"}),PT=60;function du(e,t){if(e)return Object.prototype.hasOwnProperty.call(e,t.canonical)?e[t.canonical]:e[t.legacy]}function EB(e){if(typeof e=="boolean")return e;if(typeof e!="string")return;let t=e.trim().toLowerCase();if(["true","yes","on","show","visible"].includes(t))return true;if(["false","no","off","hide","hidden"].includes(t))return false}function SB(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replace(/[_\s-]+/g,"");if(t==="cover"||t==="hero"||t==="managedcover")return "cover";if(t==="title"||t==="titleblock")return "title";if(t==="sectionheader"||t==="section")return "sectionHeader";if(t==="imagewithcaption"||t==="imagetitle"||t==="fullbleedimage")return "imageWithCaption";if(t==="bigtextimage"||t==="largetextimage"||t==="bigtextonimage")return "bigTextImage";if(t==="bigtext"||t==="largetext")return "bigText"}function vT(e){let t=typeof e=="number"?e:typeof e=="string"&&e.trim().length>0?Number(e):Number.NaN;if(!(!Number.isFinite(t)||t<0||t>PT))return t}function _B(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replace(/[_\s]+/g,"-");if(["overlay","over","concurrent","play-over"].includes(t))return "overlay";if(["preroll","pre-roll","delay","push","shift"].includes(t))return "preroll"}function $h(e,t={}){let n={enabled:EB(du(e,fs.enabled))??ps.enabled,template:SB(du(e,fs.template))??ps.template,duration:vT(du(e,fs.duration))??ps.duration,playback:_B(du(e,fs.playback))??ps.playback};return {enabled:t.enabled??n.enabled,template:t.template??n.template,duration:vT(t.duration)??n.duration,playback:t.playback??n.playback}}function RT(e){if(e.type==="inlineIcon"){let r=e;return Ah(r.family,r.name)}if("value"in e&&typeof e.value=="string")return e.value;let t=mn(e),n=e.type==="list"||e.type==="listItem"?`
|
|
69
|
+
`:"";return t.map(RT).join(n)}function AB(e){if(!e||e.length===0)return "";let t=[];for(let n of e)n.type==="code"&&n.lang?.trim().toLowerCase()==="mermaid"||t.push(RT(n));return t.join(`
|
|
70
|
+
`).trim()}function TT(e){if(e===void 0)return;let t=parseFloat(e);return Number.isFinite(t)&&t>0?t:void 0}function Hh(e){if(!e||e.length===0)return [];let t=[];function n(i){if(!i||typeof i!="object")return;let a=i;if(a.type==="htmlElement"&&a.tagName.toLowerCase()==="img"){let o=a.attributes,s=o?.src;typeof s=="string"&&s&&t.push({src:s,alt:typeof o?.alt=="string"?o.alt:"",width:TT(o?.width),height:TT(o?.height)});}if(Array.isArray(a.children))for(let o of a.children)n(o);}function r(i){if("type"in i&&i.type==="image"&&"url"in i){let a=i;a.url&&t.push({src:a.url,alt:a.alt??""});}if("type"in i&&(i.type==="htmlBlock"||i.type==="htmlInline")){let a=i;for(let o of a.htmlChildren??[])n(o);}for(let a of mn(i))r(a);}for(let i of e)r(i);return t}function CB(e){let t=new Set,n=[];function r(i){for(let a of i){for(let o of Hh(a.contents))t.has(o.src)||(t.add(o.src),n.push(o));a.children&&r(a.children);}}return r(e),n}function IB(e,t,n){let r=AB(n.contents);switch(e){case "statHighlight":return Zn(e,t,n.contents)??{stat:t,description:r||t};case "quote":return {quote:r||t};case "fullBleedQuote":case "pullQuote":return Zn(e,t,n.contents)??{text:r||t};case "factCard":return {fact:t,explanation:r||t};case "comparisonBar":return {leftLabel:"A",leftValue:60,rightLabel:"B",rightValue:40};case "list":return Zn(e,t,n.contents)??{items:["Item 1","Item 2","Item 3"]};case "definitionCard":return {term:t,definition:r||t};case "dateEvent":return {date:t,description:r||t};case "leftFeature":case "rightFeature":{let a=Hh(n.contents)[0];return {imageSrc:a?.src??"",imageAlt:a?.alt||t,imageWidth:a?.width,imageHeight:a?.height,title:t,body:r||t}}default:return {}}}function MB(e,t,n,r){let i=e.sourceHeading?Me(e.sourceHeading):e.title||r||"",o=e.template==="sectionHeader"&&e.autoTemplate!==true&&!!e.sourceHeading&&!e.sourceHeading.templateAnnotation?.template?"content":e.template??"content",s=n?.has(o)??false,c=lu(o)||s?o:"sectionHeader",d=IB(c,i,e),u=LB(e.templateOverrides),f=u?cs(c,u).input:void 0,{id:m,startTime:h,duration:y,audioSegment:g,layers:w,transition:x,template:v,title:T,children:S,contents:k,sourceHeading:E,templateOverrides:I,templateData:_,...A}=e;return {id:e.id,template:c,duration:e.duration,audioSegment:0,transition:e.transition??(t>0?{type:"fade",duration:.5}:void 0),title:i,...e.contents?{contents:e.contents}:{},...e.children&&(s||Ar(c))?{children:e.children}:{},...e.summaryMode&&e.layers?{layers:e.layers}:{},...d,...A,...qB(e.templateData),...f}}var NT=new Set(Object.keys(oo));function qB(e){if(!e)return e;let t=false,n={};for(let r of Object.keys(e)){if(NT.has(r)){t=true;continue}n[r]=e[r];}return t?n:e}function LB(e){if(!e)return e;let t=false,n={};for(let r of Object.keys(e)){if(NT.has(r)){t=true;continue}n[r]=e[r];}return t?n:e}var La=["zoomIn","zoomOut","panLeft","panRight"];function PB(e,t){let n=e.frontmatter?.title;return typeof n=="string"&&n.trim()?n.trim():t?.trim()??""}function DT(e,t){let n=br(e.blocks);CB(e.blocks);let i=new Set,a=e.customTemplates?new Set(e.customTemplates.map(f=>f.name)):void 0,o=PB(e,t?.documentTitle),s=[],l=0;for(let f=0;f<n.length;f++){let m=n[f],h=Hh(m.contents),y=MB(m,f,a,o);if(m.summaryMode)for(let g of h)i.add(g.src);else if(h.length>0&&y.template==="sectionHeader"){let g=h[0];i.add(g.src),y.template="imageWithCaption",y.imageSrc=g.src,y.imageAlt=g.alt,y.caption=y.title,y.captionPosition="bottom",y.ambientMotion=La[l++%La.length];}else if(h.length>0){let g=h[0];i.add(g.src),y.accentImage||(y.accentImage={src:g.src,alt:g.alt,position:"left-strip",ambientMotion:La[l++%La.length]});}s.push(y);}let c=[];if(c.length>0&&s.length>0){let f=Math.max(2,Math.floor(s.length/(c.length+1))),m=0;for(let h=0;h<c.length;h++){let y=Math.min((h+1)*f+m,s.length),g=c[h];s.splice(y,0,{id:`img-interleave-${h}`,template:"imageWithCaption",duration:5,audioSegment:0,imageSrc:g.src,imageAlt:g.alt,ambientMotion:La[l++%La.length],transition:{type:"fade",duration:.5}}),m++;}}let d=0;for(let f of s)f.startTime=d,d+=f.duration;let u=e.audio?.segments?.length>0?e.audio:{segments:d>0?[{src:"",name:"preview",duration:d,startTime:0}]:[]};return {...e,duration:d,blocks:s,audio:u}}function Hi(e,t,n){let r=e?.themeId??Co(e?.frontmatter),i=e?.customThemes??cu(e?.frontmatter),a=r?i?.find(o=>o.id===r):void 0;return a||yl(r,n)}function zh(e){return e.sourceHeading?.templateAnnotation?.template||e.autoTemplate&&e.template?true:!e.sourceHeading&&tn(e)}function RB(e){return e.sourceHeading?.templateAnnotation?.template??e.template}function wu(e){if(!zh(e))return {templated:false};let t=e.sourceHeading?.templateAnnotation,n=RB(e)??"sectionHeader",r=rt(n),i={...t?.params??{},...e.templateOverrides??{}},a=cs(n,i).input,o,s=null;if(t){let d=Me(e.sourceHeading);s=Zn(n,d,e.contents,{placeholders:true}),o={id:e.id,template:n,startTime:0,duration:1,audioSegment:0,title:d,contents:e.contents,children:e.children,...s??{}};}else o={...e,startTime:e.startTime??0,duration:e.duration??1,audioSegment:e.audioSegment??0,template:n};let l={...o,...e.templateData??{},...a},c=Object.prototype.hasOwnProperty.call(a,"quote")?a.quote:e.templateData?.quote;if(r==="quote"&&s&&!Object.prototype.hasOwnProperty.call(s,"title")&&!(typeof c=="string"&&c.trim())){let d=l;d.quote=s.quote,!Object.prototype.hasOwnProperty.call(e.templateData??{},"title")&&!Object.prototype.hasOwnProperty.call(a,"title")&&delete d.title;}return {templated:true,templateName:r,templateBlock:l}}function OT(e){let t=e.contents;if(!t||t.length===0)return;let n=t.map(r=>Me(r)).join(`
|
|
71
|
+
`).trim();return n?{text:n,markdown:t}:void 0}function Na(e){if(e?.src)return {type:"image",src:e.src,alt:e.alt??"",credit:e.credit,license:e.license}}function zi(e,t,n){return {kind:"canvas-embed",variant:e,slots:{media:{type:"canvas",spatial:e,block:n??t.block,aspect:{width:t.viewport.width,height:t.viewport.height}}}}}var NB=e=>{let t=e,r=e.contents?.find(a=>a.type==="paragraph"),i=t.subtitle??(r?Me(r):void 0);return {kind:"hero",variant:"title",slots:{title:t.title,subtitle:i},emphasis:"lead",hints:t.backgroundColor?{backgroundColor:t.backgroundColor}:void 0}},DB=e=>{let t=e,n=t.imageSrc?{type:"image",src:t.imageSrc,alt:t.imageAlt??""}:void 0;return {kind:"banner",slots:{title:t.title,media:n},colorScheme:t.colorScheme,mediaBackground:!!t.imageSrc}},OB=e=>{let t=e,n=t.imageSrc?{type:"image",src:t.imageSrc,alt:t.imageAlt??""}:void 0;return {kind:"hero",variant:n?"media":"title",slots:{title:t.title,media:n},emphasis:"lead",mediaBackground:!!n}},FT=e=>({kind:"prose",slots:{title:e.title,body:OT(e)}}),FB=e=>{let t=e,n=t.counterpartName?`${t.speaker} \u2192 ${t.counterpartName}`:t.speaker;return {kind:"quote-band",variant:"plain",slots:{title:t.variant==="tool"?t.toolName:void 0,body:{text:t.text??""},attribution:n}}},BB=e=>{let t=e;return {kind:"stat-band",variant:"single",slots:{items:[{value:t.stat,title:t.description,body:t.detail}],media:Na(t.accentImage)},emphasis:"strong",colorScheme:t.colorScheme}},$B=e=>{let t=e;return {kind:"quote-band",variant:"plain",slots:{title:t.title,body:{text:t.quote??""},attribution:t.attribution,media:Na(t.accentImage)}}},HB=e=>{let t=e;return {kind:"callout",variant:"fact",slots:{title:t.fact,body:{text:t.explanation??""},meta:t.source,media:Na(t.accentImage)}}},zB=e=>{let t=e;return {kind:"card-grid",variant:"two-column",slots:{title:t.header,items:[{title:t.left?.label,body:t.left?.sublabel,accentScheme:t.leftColor},{title:t.right?.label,body:t.right?.sublabel,accentScheme:t.rightColor}]}}},UB=e=>{let t=e;return {kind:"timeline-rail",slots:{milestone:{date:t.date??"",description:t.description??"",footer:t.footer,mood:t.mood},media:Na(t.accentImage)}}},jB=e=>{let t=e,n={type:"image",src:t.imageSrc,alt:t.imageAlt??"",credit:t.imageCredit,license:t.imageLicense};return t.isTitle?{kind:"hero",variant:"media",slots:{title:t.caption,subtitle:t.subtitle,media:n},emphasis:"lead",mediaBackground:true}:{kind:"media-figure",variant:"image",slots:{media:n,caption:t.caption}}};function BT(e,t){return {kind:"feature-split",variant:t==="left"?"media-left":"media-right",slots:{title:e.title,body:e.body?{text:e.body}:void 0,media:{type:"image",src:e.imageSrc,alt:e.imageAlt??"",width:e.imageWidth,height:e.imageHeight}}}}var WB=e=>BT(e,"left"),VB=e=>BT(e,"right"),GB=e=>{let t=e;return {kind:"quote-band",variant:"display",slots:{body:{text:t.text??""}},emphasis:"strong",colorScheme:t.colorScheme}},YB=e=>{let t=e,n=e.contents,r=os(n);return {kind:"item-list",slots:{title:t.title,items:(t.items??[]).map((i,a)=>({body:i,...r[a]?.text===i?{markdown:r[a].markdown}:{}})),media:Na(t.accentImage)},colorScheme:t.colorScheme}},XB=e=>{let t=e,n=t.images??[];return {kind:"gallery",slots:{...n.length===0?{title:e.title,body:OT(e)}:void 0,caption:t.caption,items:n.map(i=>({media:{type:"image",src:i.src,alt:i.alt??"",credit:i.credit,license:i.license}}))}}},KB=e=>{let t=e;return {kind:"callout",variant:"definition",slots:{title:t.term,body:{text:t.definition??""},meta:t.origin,media:Na(t.accentImage)},colorScheme:t.colorScheme}},QB=e=>{let t=e;return {kind:"stat-band",variant:"comparison",slots:{items:[{title:t.leftLabel,value:t.leftValue},{title:t.rightLabel,value:t.rightValue}],meta:t.unit},emphasis:"strong",colorScheme:t.colorScheme}},ZB=e=>{let t=e,n=t.backgroundImage;return {kind:"quote-band",variant:"full-bleed",slots:{body:{text:t.text??""},attribution:t.attribution,media:n?.src?{type:"image",src:n.src,alt:n.alt??"",credit:n.credit,license:n.license}:void 0},emphasis:"strong",mediaBackground:!!n?.src}},JB=e=>{let t=e;return {kind:"media-figure",variant:"video",slots:{media:{type:"video",src:t.videoSrc,posterSrc:t.posterSrc,alt:t.videoAlt??"",clipStart:t.clipStart,clipEnd:t.clipEnd,credit:t.videoCredit,license:t.videoLicense},caption:t.caption}}},e9=e=>{let t=e,n=t.backgroundVideo;return {kind:"quote-band",variant:"full-bleed",slots:{body:{text:t.text??""},attribution:t.attribution,media:n?.src?{type:"video",src:n.src,posterSrc:n.posterSrc,alt:n.alt??"",clipStart:n.clipStart,clipEnd:n.clipEnd,credit:n.credit,license:n.license}:void 0},emphasis:"strong",mediaBackground:!!n?.src}},t9=e=>{let t=e;return {kind:"table-section",slots:{title:t.title,table:{headers:t.headers??[],rows:t.rows??[],align:t.align}},colorScheme:t.colorScheme}},Bi=(e,t)=>{let n=e;return Array.isArray(n.headers)&&Array.isArray(n.rows)&&hh({headers:n.headers,rows:n.rows},n)!==null?zi("chart",t,e):FT(e)},n9=(e,t)=>zi("diagram",t,e),r9=(e,t)=>zi("tree",t,e),i9=(e,t)=>zi("timeline",t,e),a9=(e,t)=>zi("map",t,e),o9=(e,t)=>zi("drawing",t,e),s9=(e,t)=>zi("layout",t,e),$T={title:NB,sectionHeader:DB,bigText:OB,transcript:FB,content:FT,statHighlight:BB,quote:$B,factCard:HB,twoColumn:zB,dateEvent:UB,imageWithCaption:jB,leftFeature:WB,rightFeature:VB,map:a9,fullBleedQuote:GB,list:YB,photoGrid:XB,definitionCard:KB,comparisonBar:QB,pullQuote:ZB,videoWithCaption:JB,videoPullQuote:e9,dataTable:t9,barChart:Bi,columnChart:Bi,pieChart:Bi,donutChart:Bi,lineChart:Bi,areaChart:Bi,scatterChart:Bi,diagram:n9,tree:r9,timeline:i9,layout:s9,drawing:o9};function Ui(e,t,n="page"){let r=e?.pageStyle??il(e??tt),i=!t?.spacing||t.spacing===r.tokens.sectionSpacing?r:{...r,tokens:{...r.tokens,sectionSpacing:t.spacing}};return n==="document"?l9(i):i}function ET(e){let t={};for(let[n,r]of Object.entries(e)){if(!r)continue;let{background:i,...a}=r;t[n]=a;}return t}function l9(e){return {family:e.family,tokens:{...e.tokens,cornerRadius:Math.min(e.tokens.cornerRadius,6),sectionSpacing:"compact",divider:"none",backgroundRhythm:"flat",headingTreatment:{eyebrow:"kicker",scale:"regular",case:"none",underline:"none"},shadow:"none",quoteMark:"accent-bar",numeralStyle:"plain",pattern:"none"},...e.sections?{sections:ET(e.sections)}:{},...e.templates?{templates:ET(e.templates)}:{},accentRotation:{strategy:"primary-only"}}}function c9(e){return e.autoTemplate===true&&!e.sourceHeading?.templateAnnotation?.template&&!e.promotedBodyAnnotation}var u9=new Set(["banner","stat-band","quote-band","callout","card-grid","item-list","timeline-rail","footer"]),d9=new Set(["banner","quote-band","stat-band","footer"]),m9=new Set(["callout","card-grid","stat-band","item-list","timeline-rail","table-section"]);function f9(e){return e.type==="code"&&e.lang?.trim().toLowerCase()==="mermaid"}function p9(e,t){if(f9(e))return true;if(!t||t.length===0||e.type!=="code")return false;let n=e.lang?.trim().toLowerCase();return !!n&&t.includes(n)}function HT(e){for(let t of e){if(!t||typeof t!="object")continue;let n=t;if(n.type==="htmlElement"&&typeof n.tagName=="string"&&["img","video","audio"].includes(n.tagName.toLowerCase())||Array.isArray(n.children)&&HT(n.children))return true}return false}function zT(e){if(!e||typeof e!="object")return false;let t=e;return t.type==="image"||(t.type==="htmlBlock"||t.type==="htmlInline")&&Array.isArray(t.htmlChildren)&&HT(t.htmlChildren)?true:Array.isArray(t.children)&&t.children.some(zT)}function h9(e,t,n){if(!e.contents||e.contents.length===0)return;let r=!!t.slots.media||!!t.slots.items?.some(a=>a.media!==void 0),i=e.contents.filter(a=>p9(a,n)||!r&&zT(a));if(i.length!==0)return {text:i.map(a=>Me(a)).join(`
|
|
72
|
+
`).trim(),markdown:i}}function mu(e,t,n){let r=h9(e,t,n);return r?{...t,slots:{...t.slots,richContent:r}}:t}function g9(e,t,n,r,i="page"){let a=i==="document"&&c9(e);if(zh(e)&&!a){let s=wu(e),l=s.templateName,c=$T[l];if(c)return {draft:mu(e,c(s.templateBlock,{block:e,viewport:t}),r),source:"template",templateName:l};let d=n?.find(h=>h.name===l);if(d){let h={kind:"canvas-embed",variant:"custom",slots:{media:{type:"canvas",spatial:"custom",block:s.templateBlock,aspect:{width:d.viewport?.width??t.width,height:d.viewport?.height??t.height}}}};return {draft:mu(e,h,r),source:"custom-template",templateName:l}}let u={code:"unknown-template",template:l,message:`Unknown template "${l}"`},m={kind:"callout",variant:"diagnostic",slots:{title:(e.sourceHeading?Me(e.sourceHeading):void 0)??u.message,body:{text:Pi(e.contents)},meta:u.message},emphasis:"quiet"};return {draft:mu(e,m,r),source:"fallback",templateName:l,diagnostic:u}}if(e.layers&&e.layers.length>0){let s={kind:"canvas-embed",variant:"authored",slots:{media:{type:"canvas",spatial:"authored",block:e,aspect:{width:t.width,height:t.height}}}};return {draft:mu(e,s,r),source:"authored"}}let o=e.sourceHeading;return {draft:{kind:"prose",slots:{title:o?Me(o):void 0,headingLevel:o?.depth,body:e.contents&&e.contents.length>0?{text:Pi(e.contents),markdown:e.contents}:void 0}},source:"prose"}}function y9(e,t,n){let r=n?e.templates?.[n]:void 0,i=e.sections?.[t];return r?i?{...i,...r,hints:{...i.hints,...r.hints}}:r:i}function b9(e,t,n,r,i,a){let{draft:o,override:s}=e,l={...o.hints,...s?.hints},c={kind:s?.kind??o.kind,variant:s?.variant??o.variant,blockId:e.block?.id??"cover",template:e.source==="template"||e.source==="custom-template"||e.source==="fallback"?e.templateName:void 0,slots:o.slots,emphasis:i,accent:a,background:r,index:t,totalSections:n,depth:e.depth,source:e.source};return e.diagnostic&&(c.diagnostic=e.diagnostic),Object.keys(l).length>0&&(c.hints=l),c}function ST(e,t){return t?e.colorSchemes?.[t]:void 0}function w9(e,t){let n=Object.keys(t.colorSchemes??{}),r=e.accentRotation.schemes;return !r||r.length===0?n:r.filter(i=>n.includes(i))}function k9(e){let t=e[0],n=e[1],r={...n.draft.slots};if((r.headingLevel??1)>1){e.splice(0,1);return}let i=r.body?.markdown,a=i?.[0],o=t.draft.slots.subtitle;if(o&&a?.type==="paragraph"&&Me(a)===o){let{subtitle:s,...l}=t.draft.slots;t.draft={...t.draft,slots:l};}delete r.title,delete r.headingLevel,i&&i.length>0?n.draft={...n.draft,slots:r}:e.splice(1,1);}function Uh(e,t={}){let n=t.theme??tt,r=t.viewport??Ze.landscape,i=t.variant??"page",a=Ui(n,t.transformPage,i),o=t.customTemplates??e.customTemplates,s=[];if(t.cover){let T=t.cover,S=i==="document"?void 0:T.heroSrc;s.push({draft:{kind:"hero",variant:"cover",slots:{title:T.title,subtitle:T.subtitle,media:S?{type:"image",src:S,alt:T.heroAlt??"",credit:T.heroCredit,license:T.heroLicense}:void 0},emphasis:"lead",mediaBackground:!!S},source:"cover",depth:0});}let l=(T,S)=>{for(let k of T){let E=g9(k,r,o,t.widgetFenceLangs,i);s.push({...E,block:k,depth:S}),!(E.draft.kind==="canvas-embed"&&Ar(E.templateName))&&k.children&&k.children.length>0&&l(k.children,S+1);}};if(l(e.blocks??[],0),t.cover&&s.length>1){let T=t.cover,S=s[1];if(S.draft.kind==="hero"&&S.draft.slots.title===T.title){let E=s[0].draft.slots.media;E&&!S.draft.slots.media&&(S.draft={...S.draft,slots:{...S.draft.slots,media:E},mediaBackground:true}),s.splice(0,1);}else if(i==="document"&&S.draft.kind==="prose"&&S.draft.slots.title===T.title)k9(s);else if(S.draft.kind==="prose"&&S.draft.slots.title===T.title){let k={...S.draft.slots};delete k.title,delete k.headingLevel;let E=k.body?.markdown;T.subtitle&&E&&E.length>0&&E[0].type==="paragraph"&&Me(E[0])===T.subtitle&&(E=E.slice(1)),E&&E.length>0?(k.body={text:E.map(I=>Me(I)).join(`
|
|
73
|
+
`).trim(),markdown:E},S.draft={...S.draft,slots:k}):s.splice(1,1);}}for(let T of s)T.override=y9(a,T.draft.kind,T.templateName);let c=s.length,d=a.tokens.backgroundRhythm,u=a.accentRotation.strategy,f=w9(a,n),m=u==="alternate-two"?Math.min(2,f.length):f.length,h=0,y=0,g=0,w=0,x=a.tokens.headingTreatment.eyebrow,v=[];for(let T=0;T<s.length;T++){let S=s[T],k=S.override?.kind??S.draft.kind,E;S.override?.background?E=S.override.background:S.draft.mediaBackground?E="media":k==="prose"||d==="flat"?E="base":d==="accent-bands"&&d9.has(k)?E="accent":d==="tinted-panels"?E=m9.has(k)?"alternate":"base":d==="alternate"||d==="accent-bands"?(E=h%2===1?"alternate":"base",h++):E="base";let I;if(S.draft.colorScheme)I={schemeName:S.draft.colorScheme,scheme:ST(n,S.draft.colorScheme),role:"block"};else if(u9.has(k)&&(u==="cycle"||u==="alternate-two")&&m>0){let D=f[y%m];y++,I={schemeName:D,scheme:ST(n,D),role:"rotation"};}else u==="none"?I={role:"none"}:I={role:"primary"};let _=S.override?.emphasis??S.draft.emphasis??"standard";t.transformPage?.emphasisCurve==="front-loaded"&&k!=="hero"&&k!=="prose"&&g<2&&(_==="standard"&&(_="strong"),g++),(x==="numbered"||x==="mono-tag")&&(k==="hero"||k==="banner")&&(w++,S.draft.slots.eyebrow||(S.draft.slots={...S.draft.slots,eyebrow:String(w).padStart(2,"0")}));let A=b9(S,T,c,E,_,I);v.push({section:A,block:S.block,source:S.source,diagnostic:S.diagnostic});}return v}var x9=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E")`;function jh(e,t){let n=e??tt,r=t??Ui(n),i=n.colors,a=n.typography;return {"--squisq-page-bg":i.background,"--squisq-page-bg-alt":i.backgroundLight,"--squisq-page-text":i.text,"--squisq-page-text-muted":i.textMuted,"--squisq-page-primary":i.primary,"--squisq-page-secondary":i.secondary,"--squisq-page-highlight":i.highlight,"--squisq-page-title-font":wt(a.titleFont,"Georgia, serif"),"--squisq-page-body-font":wt(a.bodyFont,"system-ui, sans-serif"),"--squisq-page-mono-font":wt(a.monoFont,"ui-monospace, SFMono-Regular, Menlo, monospace"),"--squisq-page-line-height":String(a.lineHeight??1.65),"--squisq-page-title-weight":a.titleWeight==="normal"?"400":"700","--squisq-page-content-max":`${r.tokens.contentMaxWidth}px`,"--squisq-page-wide-max":`${r.tokens.wideMaxWidth}px`,"--squisq-page-radius":`${r.tokens.cornerRadius}px`,"--squisq-page-accent":i.primary,"--squisq-page-accent-bg":i.backgroundLight,"--squisq-page-accent-text":i.text}}function Wh(e){let t=e.tokens,n={"data-family":e.family,"data-spacing":t.sectionSpacing,"data-divider":t.divider,"data-rhythm":t.backgroundRhythm,"data-hero-style":t.heroStyle,"data-eyebrow":t.headingTreatment.eyebrow,"data-heading-scale":t.headingTreatment.scale,"data-framing":t.imageFraming,"data-shadow":t.shadow,"data-quote-mark":t.quoteMark,"data-numerals":t.numeralStyle};return t.headingTreatment.case&&t.headingTreatment.case!=="none"&&(n["data-heading-case"]=t.headingTreatment.case),t.headingTreatment.underline&&t.headingTreatment.underline!=="none"&&(n["data-underline"]=t.headingTreatment.underline),t.pattern&&t.pattern!=="none"&&(n["data-pattern"]=t.pattern),n}var _T=`
|
|
74
74
|
.squisq-page-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
|
|
75
75
|
.squisq-page-feature { grid-template-columns: 1fr; }
|
|
76
76
|
.squisq-page-feature--media-right .squisq-page-feature-media { order: 0; }
|
|
@@ -117,7 +117,7 @@ ${r}${i}`)}return n.theme}function Rt(e,t=new WeakMap){if(e===null||typeof e!="o
|
|
|
117
117
|
transparent 1px 14px
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
.squisq-page[data-pattern='noise'] { background-image: ${
|
|
120
|
+
.squisq-page[data-pattern='noise'] { background-image: ${x9}; }
|
|
121
121
|
|
|
122
122
|
/* Spacing scale */
|
|
123
123
|
.squisq-page[data-spacing='compact'] { --squisq-page-section-pad: 2.25rem; }
|
|
@@ -733,15 +733,15 @@ ${_T}
|
|
|
733
733
|
${_T}
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
`;var UT=[1,1.5,2];function Gh(e){let t=typeof e=="number"?e:typeof e=="string"?Number(e.trim().replace(/%$/,"")):Number.NaN;if(!Number.isFinite(t))return;let n=t>3?t/100:t;return UT.find(r=>Math.abs(r-n)<.001)}var x9=new Set(["content","list","quote","definitionCard","factCard","dateEvent"]),v9=160,T9=360;function jT(e){return !e.template||!x9.has(e.template)?1:e.textLength<v9?2:e.textLength<T9?1.5:1}function WT(e,t){let n=e.map(o=>o.explicit!==void 0?o.explicit:t==="auto"?jT(o):1),r=new Map;if(e.forEach((o,s)=>{let l=n[s];if(l===1)return;let c=o.explicit!==void 0?2:1;r.set(l,(r.get(l)??0)+c);}),r.size<=1)return n;let i=2,a=-1;for(let[o,s]of r)(s>a||s===a&&o>i)&&(i=o,a=s);return e.map((o,s)=>o.explicit!==void 0?o.explicit:n[s]===1?1:i)}var AT=32,CT=64,E9=/^[a-z0-9][a-z0-9-]*$/;function wr(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(typeof e!="string")return;let t=e.trim().replace(/%$/,"");if(t.length===0)return;let n=Number(t);return Number.isFinite(n)?n:void 0}function hs(e){return `${Math.round(e*1e3)/1e3}%`}function S9(e,t,n){if(!e||typeof e!="object"){n.push({path:t,message:"cell must be an object"});return}let r=e,i=wr(r.x),a=wr(r.y),o=wr(r.width),s=wr(r.height);if(i===void 0||i<0||i>100){n.push({path:`${t}.x`,message:"x must be a percent between 0 and 100"});return}if(a===void 0||a<0||a>100){n.push({path:`${t}.y`,message:"y must be a percent between 0 and 100"});return}if(o===void 0||o<=0||o>100){n.push({path:`${t}.width`,message:"width must be a percent greater than 0"});return}if(s===void 0||s<=0||s>100){n.push({path:`${t}.height`,message:"height must be a percent greater than 0"});return}let l={x:hs(i),y:hs(a),width:hs(o),height:hs(s)};if(r.block!==void 0){let c=typeof r.block=="string"?Number(r.block):r.block;if(typeof c!="number"||!Number.isInteger(c)||c<1||c>CT){n.push({path:`${t}.block`,message:`block must be an integer between 1 and ${CT}`});return}l.block=c;}if(r.zoom!==void 0){let c=Gh(r.zoom);if(c===void 0){n.push({path:`${t}.zoom`,message:"zoom must be 1, 1.5, or 2 (or 100/150/200 percent)"});return}l.zoom=c;}return l}function Lh(e,t,n){if(!Array.isArray(e)){n.push({path:t,message:"must be an array of cells"});return}if(e.length<1||e.length>AT){n.push({path:t,message:`must contain between 1 and ${AT} cells`});return}let r=[];for(let i=0;i<e.length;i++){let a=S9(e[i],`${t}[${i}]`,n);if(!a)return;r.push(a);}return r}function _9(e,t){if(!e||typeof e!="object"){t.push({path:"titleSlot",message:"titleSlot must be an object"});return}let n=e,r=n.placement==="bottom"?"bottom":n.placement==="top"?"top":void 0;if(r===void 0&&n.placement!==void 0){t.push({path:"titleSlot.placement",message:"placement must be 'top' or 'bottom'"});return}let i=wr(n.height);if(i===void 0||i<=0||i>40){t.push({path:"titleSlot.height",message:"height must be a percent between 0 and 40"});return}return {placement:r??"top",height:hs(i)}}function Yh(e){let t=[];if(!e||typeof e!="object")return {valid:false,errors:[{path:"",message:"definition must be an object"}]};let n=e,r=typeof n.name=="string"?n.name.trim().toLowerCase():"";E9.test(r)||t.push({path:"name",message:"name must be a slug (lowercase letters, digits, hyphens)"});let i=typeof n.label=="string"?n.label.trim():"";i.length===0&&t.push({path:"label",message:"label must be a non-empty string"});let a=n.cells,o,s,l;!a||typeof a!="object"?t.push({path:"cells",message:"cells must be an object with a landscape array"}):(o=Lh(a.landscape,"cells.landscape",t),a.portrait!==void 0&&(s=Lh(a.portrait,"cells.portrait",t)),a.square!==void 0&&(l=Lh(a.square,"cells.square",t)),o&&(s&&s.length!==o.length&&t.push({path:"cells.portrait",message:"portrait must define the same number of cells as landscape"}),l&&l.length!==o.length&&t.push({path:"cells.square",message:"square must define the same number of cells as landscape"})));let c;if(n.titleSlot!==void 0&&(c=_9(n.titleSlot,t)),t.length>0||!o)return {valid:false,errors:t};let d={name:r,label:i,cells:{landscape:o,...s?{portrait:s}:{},...l?{square:l}:{}}};return typeof n.description=="string"&&n.description.trim()&&(d.description=n.description.trim()),c&&(d.titleSlot=c),n.auto===false&&(d.auto=false),{valid:true,errors:t,layout:d}}function Pa(e){return e.cells.landscape.length}function VT(e){return e.map(t=>({x:t.y,y:t.x,width:t.height,height:t.width,...t.block!==void 0?{block:t.block}:{},...t.zoom!==void 0?{zoom:t.zoom}:{}}))}function GT(e,t,n){return (t==="portrait"?e.cells.portrait??VT(e.cells.landscape):t==="square"?e.cells.square??e.cells.landscape:e.cells.landscape).map(i=>{let a=wr(i.x)??0,o=wr(i.y)??0,s=wr(i.width)??0,l=wr(i.height)??0,c={rect:{x:n.x+a/100*n.width,y:n.y+o/100*n.height,width:Math.max(1,s/100*n.width),height:Math.max(1,l/100*n.height)}};i.block!==void 0&&(c.block=i.block);let d=Gh(i.zoom);return d!==void 0&&(c.zoom=d),c})}var YT="squisq-dashboard-layouts",A9={label:"lb",description:"ds",cells:"ce",landscape:"ls",portrait:"pt",square:"sq",width:"wd",height:"hg",block:"bk",zoom:"zo",titleSlot:"ts",placement:"pl",auto:"au"},C9=Object.fromEntries(Object.entries(A9).map(([e,t])=>[t,e]));function Nh(e,t){if(Array.isArray(e))return e.map(n=>Nh(n,t));if(e&&typeof e=="object"){let n={};for(let[r,i]of Object.entries(e))n[t[r]??r]=Nh(i,t);return n}return e}function XT(e){if(!e)return;let t=q9(e[YT]);if(!t)return;let n=[];for(let r of t){let i=Yh(r);i.layout&&n.push(i.layout);}return n.length>0?n:void 0}function KT(e){return Object.entries(e).map(([t,n])=>{let r=Nh(n&&typeof n=="object"?n:{},C9);return {name:t,...r}})}function I9(e){return Array.isArray(e)?e:e&&typeof e=="object"?KT(e):null}function M9(e){try{return JSON.parse(e)}catch{return}}function q9(e){if(e==null)return null;if(Array.isArray(e))return e;if(typeof e=="object")return KT(e);if(typeof e!="string")return null;let t=M9(e.trim());return t!==void 0?I9(t):null}var ku=2;function Ce(e){return `${Math.round(e*1e3)/1e3}%`}function $i(e,t,n=ku){let r=(100-(e-1)*n)/e,i=(100-(t-1)*n)/t,a=[];for(let o=0;o<t;o++)for(let s=0;s<e;s++)a.push({x:Ce(s*(r+n)),y:Ce(o*(i+n)),width:Ce(r),height:Ce(i)});return a}function L9(e,t,n=ku){let r=e+n,i=100-r,a=(100-(t-1)*n)/t,o=[{x:"0%",y:"0%",width:Ce(e),height:"100%"}];for(let s=0;s<t;s++)o.push({x:Ce(r),y:Ce(s*(a+n)),width:Ce(i),height:Ce(a)});return o}function P9(e,t,n=ku){let r=e+n,i=100-r,a=(100-(t-1)*n)/t,o=[{x:"0%",y:"0%",width:"100%",height:Ce(e)}];for(let s=0;s<t;s++)o.push({x:Ce(s*(a+n)),y:Ce(r),width:Ce(a),height:Ce(i)});return o}function R9(e,t=ku){let n=e+t,i=(100-n-t)/2,a=(100-t)/2,o=[{x:"0%",y:"0%",width:Ce(e),height:"100%"}];for(let s=0;s<2;s++)for(let l=0;l<2;l++)o.push({x:Ce(n+l*(i+t)),y:Ce(s*(a+t)),width:Ce(i),height:Ce(a)});return o}var bu=Object.freeze([{name:"focus-1",label:"Focus",description:"One block fills the dashboard.",cells:{landscape:[{x:"0%",y:"0%",width:"100%",height:"100%"}]}},{name:"split-2",label:"Split",description:"Two blocks side by side.",cells:{landscape:$i(2,1)}},{name:"hero-left",label:"Hero + 2",description:"A large lead block with two companions.",cells:{landscape:L9(58,2),portrait:[{x:"0%",y:"0%",width:"100%",height:Ce(46)},{x:"0%",y:Ce(48),width:"100%",height:Ce(25)},{x:"0%",y:Ce(75),width:"100%",height:Ce(25)}]}},{name:"grid-2x2",label:"Grid 2\xD72",description:"Four blocks in a balanced grid.",cells:{landscape:$i(2,2)}},{name:"hero-top",label:"Hero band",description:"A wide lead band with three blocks below.",cells:{landscape:P9(46,3),portrait:[{x:"0%",y:"0%",width:"100%",height:Ce(40)},{x:"0%",y:Ce(42),width:"100%",height:Ce(18)},{x:"0%",y:Ce(62),width:"100%",height:Ce(18)},{x:"0%",y:Ce(82),width:"100%",height:Ce(18)}]},auto:false},{name:"mosaic-5",label:"Mosaic",description:"A hero block beside a 2\xD72 grid.",cells:{landscape:R9(58),portrait:[{x:"0%",y:"0%",width:"100%",height:Ce(40)},{x:"0%",y:Ce(42),width:Ce(49),height:Ce(27)},{x:Ce(51),y:Ce(42),width:Ce(49),height:Ce(27)},{x:"0%",y:Ce(71),width:Ce(49),height:Ce(29)},{x:Ce(51),y:Ce(71),width:Ce(49),height:Ce(29)}]}},{name:"grid-3x2",label:"Grid 3\xD72",description:"Six blocks in three columns.",cells:{landscape:$i(3,2)}},{name:"grid-3x3",label:"Grid 3\xD73",description:"Nine blocks in a square grid.",cells:{landscape:$i(3,3),square:$i(3,3)}},{name:"grid-4x3",label:"Grid 4\xD73",description:"Twelve blocks in four columns.",cells:{landscape:$i(4,3)}},{name:"grid-4x4",label:"Grid 4\xD74",description:"Sixteen blocks \u2014 the densest wall.",cells:{landscape:$i(4,4)}}]);var xu="auto";function QT(e,t){let n=e.trim().toLowerCase();if(n)return t?.find(r=>r.name===n)??bu.find(r=>r.name===n)}function ZT(e,t,n){let i=[...[...(n??[]).filter(l=>l.auto!==false),...bu.filter(l=>l.auto!==false)]].sort((l,c)=>Pa(l)-Pa(c)),a=Math.max(1,e),o=i.find(l=>Pa(l)>=a);if(o)return o;let s=i.reduce((l,c)=>Math.max(l,Pa(c)),0);return i.find(l=>Pa(l)===s)??bu[0]}var JT=["basic","card","panel","accent"],eE="basic";function Dh(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t)return t==="none"||t==="default"||t==="flat"?"basic":t==="cards"?"card":t==="panels"||t==="outline"?"panel":t==="accents"||t==="accent-cards"?"accent":JT.includes(t)?t:void 0}function fu(e,t,n){return Math.min(n,Math.max(t,e))}function D9(e){return Fn(e)>.45}function tE(e,t){let n=t.colors.background;return e==="basic"||e==="panel"?n:D9(n)?or(n,.05):to(n,.04)}function nE(e,t){let n=Object.values(e.colorSchemes??{});if(n.length===0)return e.colors.primary;let r=n[(t%n.length+n.length)%n.length];return r.accent||r.text||e.colors.primary}function O9(e,t,n){let r=Math.max(1,Math.min(n.width,n.height)),i=t.style?.borderRadius??14;return e==="panel"?{edge:fu(r*.014,3,12),radius:fu(i*.45,0,r*.05)}:{edge:fu(r*.03,6,26),radius:fu(i,6,r*.1)}}function F9(e,t){if(e<=0)return;let n=Math.round(e/Math.max(1,t.width)*1e5)/1e3,r=Math.round(e/Math.max(1,t.height)*1e5)/1e3;return `${n}% / ${r}%`}function rE(e,t){let{theme:n,rect:r,index:i}=t;if(e==="basic")return null;let{edge:a,radius:o}=O9(e,n,r),s={x:r.x+a,y:r.y+a,width:Math.max(1,r.width-a*2),height:Math.max(1,r.height-a*2)},l={x:a,y:a,width:s.width,height:s.height},c=Math.max(1,Math.min(r.width,r.height)),d=Math.max(1,Math.round(c*.004)),u=nE(n,i),f=[];e!=="panel"&&[{spread:.45,dy:.5,alpha:.05},{spread:.25,dy:.42,alpha:.05},{spread:.08,dy:.3,alpha:.06}].forEach((x,v)=>{let T=a*x.spread,S=a*x.dy;f.push({type:"shape",id:`cell-shadow-${v}`,content:{shape:"rect",fill:le(n.colors.text,x.alpha),borderRadius:o+T},position:{x:l.x-T,y:l.y-T+S,width:l.width+T*2,height:l.height+T*2}});}),f.push({type:"shape",id:"cell-surface",content:{shape:"rect",fill:n.colors.background,borderRadius:o},position:{x:l.x,y:l.y,width:l.width,height:l.height}});let m=[];if(e==="accent"&&m.push({type:"shape",id:"cell-accent-wash",content:{shape:"rect",fill:le(u,.1),borderRadius:o},position:{x:0,y:0,width:"100%",height:"100%"}}),e==="accent"||e==="panel"){let w=Math.max(2,Math.round(c*.014));m.push({type:"shape",id:"cell-accent-bar",content:{shape:"rect",fill:u},position:{x:0,y:0,width:"100%",height:w}});}let h=e==="panel"?d:Math.max(1,d*.6);m.push({type:"shape",id:"cell-border",content:{shape:"rect",fill:"none",stroke:e==="panel"?le(u,.45):le(n.colors.text,.14),strokeWidth:h,borderRadius:o},position:{x:h/2,y:h/2,width:Math.max(1,l.width-h),height:Math.max(1,l.height-h)}});let y={cardRect:s,contentRect:s,layers:f,overlayLayers:m,radius:o},g=F9(o,s);return g&&(y.contentRadiusPct=g),y}function iE(e){return e!=="basic"}function aE(e,t){let n=e[0];if(!n||n.type!=="shape")return [...e];let{content:r,position:i}=n,a=typeof r.fill=="string"?r.fill.trim().toLowerCase():"";return !(r.shape==="rect"&&(i.x===0||i.x==="0%")&&(i.y===0||i.y==="0%")&&i.width==="100%"&&i.height==="100%")||r.gradient||r.pattern?[...e]:a!==t.colors.background.trim().toLowerCase()?[...e]:e.slice(1)}var gs=Object.freeze({layout:{canonical:"squisq-dashboard-layout",legacy:"dashboard-layout"},showTitle:{canonical:"squisq-dashboard-title",legacy:"dashboard-title"},zoom:{canonical:"squisq-dashboard-zoom",legacy:"dashboard-zoom"},style:{canonical:"squisq-dashboard-style",legacy:"dashboard-style"}}),ys=Object.freeze({layout:xu,showTitle:true,zoom:"auto",style:eE});function pu(e,t){if(e)return Object.prototype.hasOwnProperty.call(e,t.canonical)?e[t.canonical]:e[t.legacy]}function B9(e){if(typeof e=="boolean")return e;if(typeof e!="string")return;let t=e.trim().toLowerCase();if(["true","yes","on","show","visible"].includes(t))return true;if(["false","no","off","hide","hidden"].includes(t))return false}function IT(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t)return t==="auto"||t==="default"?xu:t}function $9(e){if(typeof e=="boolean")return e?"auto":"off";if(typeof e!="string")return;let t=e.trim().toLowerCase();if(["auto","on","true","yes"].includes(t))return "auto";if(["off","false","no","none","100","100%","1"].includes(t))return "off"}function oE(e,t={}){let n={layout:IT(pu(e,gs.layout))??ys.layout,showTitle:B9(pu(e,gs.showTitle))??ys.showTitle,zoom:$9(pu(e,gs.zoom))??ys.zoom,style:Dh(pu(e,gs.style))??ys.style};return {layout:IT(t.layout)??n.layout,showTitle:t.showTitle??n.showTitle,zoom:t.zoom??n.zoom,style:Dh(t.style)??n.style}}var H9={placement:"top",height:"9%"},z9=.015,U9=.02;function j9(e){let t=Number(e.trim().replace(/%$/,""));return Number.isFinite(t)?t:0}function hu(e,t){return `${Math.round(e/Math.max(1,t)*1e5)/1e3}%`}function Ph(e,t){return {left:hu(e.x,t.width),top:hu(e.y,t.height),width:hu(e.width,t.width),height:hu(e.height,t.height)}}function W9(e,t){let n=e.frontmatter?.title;return typeof n=="string"&&n.trim()?n.trim():t?.trim()??""}function V9(e,t){if(e.length===0||!t)return e;let n=e[0],r=typeof n.title=="string"?n.title.trim().toLowerCase():"";if(!r||r!==t.trim().toLowerCase())return e;let i=n.template,a=i==="title"||i==="sectionHeader"||i==="cover",o=Array.isArray(n.contents)&&n.contents.length>0;return a||!o?e.slice(1):e}function G9(e,t,n,r,i,a){let o=_n(r,0,1,i),s=Qa(i),l=Math.min(44*s,t.height*.52),c=Math.max(4,Math.round(6*s)),d=a+c+Math.max(10,Math.round(c*2.5));return [{type:"shape",id:"dashboard-title-accent",content:{shape:"rect",fill:r.colors.primary},position:{x:a,y:"26%",width:c,height:"48%"}},{type:"text",id:"dashboard-title-text",content:{text:e,style:{fontSize:l,fontFamily:ie(o,"title"),fontWeight:"bold",color:r.colors.text,textAlign:"left",verticalAlign:"middle",maxLines:1}},position:{x:d,y:0,width:Math.max(1,t.width-d-a),height:"100%"}},{type:"shape",id:"dashboard-title-rule",content:{shape:"rect",fill:le(r.colors.text,.14)},position:{x:0,y:n.placement==="bottom"?0:t.height-2,width:"100%",height:2}}]}function Xh(e,t={}){let n=t.theme??tt,r=t.viewport??Ze.landscape,i=Bn(r),a=t.customLayouts??XT(e.frontmatter),o=t.customTemplates??e.customTemplates,s=[],l=oE(e.frontmatter,{layout:typeof t.layout=="string"?t.layout:void 0,showTitle:t.showTitle,zoom:t.zoom,...t.style!==void 0?{style:t.style}:{}}),c=l.style,d,u="auto";if(t.layout&&typeof t.layout=="object"){let H=Yh(t.layout);H.layout?(d=H.layout,u="option"):s.push({type:"unknown-layout",message:"Inline dashboard layout definition is invalid; falling back to auto.",requestedLayout:t.layout.name});}else if(l.layout!==xu){let H=QT(l.layout,a);H?(d=H,u=typeof t.layout=="string"&&t.layout.trim()?"option":"frontmatter"):s.push({type:"unknown-layout",message:`Unknown dashboard layout "${l.layout}"; falling back to auto.`,requestedLayout:l.layout});}let m=DT(e,{documentTitle:t.documentTitle}).blocks??[];m.length===0&&s.push({type:"empty-doc",message:"The document has no renderable blocks; the dashboard has no cells."});let h=l.showTitle?W9(e,t.documentTitle):"",y=h.length>0;y&&(m=V9(m,h)),d||(d=ZT(m.length,i,a),u="auto");let g=U9*Math.min(r.width,r.height),w={x:g,y:g,width:Math.max(1,r.width-g*2),height:Math.max(1,r.height-g*2)},x=null;if(y){let H=d.titleSlot??H9,R=Math.min(40,Math.max(2,j9(H.height)))/100*r.height,z=z9*r.height,C=H.placement==="bottom"?{x:0,y:r.height-R,width:r.width,height:R}:{x:0,y:0,width:r.width,height:R};w=H.placement==="bottom"?{x:g,y:g,width:Math.max(1,r.width-g*2),height:Math.max(1,r.height-R-z-g)}:{x:g,y:R+z,width:Math.max(1,r.width-g*2),height:Math.max(1,r.height-R-z-g)};let U={width:Math.max(1,Math.round(C.width)),height:Math.max(1,Math.round(C.height)),name:"Dashboard title"};x={text:h,rect:C,rectPct:Ph(C,r),viewport:U,layers:G9(h,U,H,n,r,g)};}let v=GT(d,i,w),T=[],S=new Set;v.forEach((H,$)=>{if(H.block===void 0)return;let R=H.block-1;if(R<0||R>=m.length){s.push({type:"invalid-cell-assignment",message:`Cell ${$+1} of layout "${d.name}" requests block ${H.block}, but the document has ${m.length} block(s); the cell is left empty.`});return}S.add(R),T.push({cellIndex:$,rect:H.rect,candidateIndex:R,explicitZoom:H.zoom});});let k=new Set,E=0;v.forEach((H,$)=>{if(H.block===void 0){for(;E<m.length&&S.has(E);)E++;E>=m.length||(k.add(E),T.push({cellIndex:$,rect:H.rect,candidateIndex:E,explicitZoom:H.zoom}),E++);}});let I=[];for(let H=0;H<m.length;H++)!S.has(H)&&!k.has(H)&&I.push(H);I.length>0&&s.push({type:"overflow",message:`${I.length} block(s) exceed the "${d.name}" layout's ${v.length} cell(s) and are not rendered.`,hiddenBlockIds:I.map(H=>String(m[H].id??H))});let _=T.sort((H,$)=>H.cellIndex-$.cellIndex),A=WT(_.map(({candidateIndex:H,explicitZoom:$})=>{let R=m[H],z=typeof R.title=="string"?R.title:"";return {template:rt(R.template??""),textLength:z.length+Ia(R).length,...$!==void 0?{explicit:$}:{}}}),l.zoom),D=o&&o.length>0?ls(o):Fi,B=_.map(({cellIndex:H,rect:$,candidateIndex:R},z)=>{let C=m[R],U=A[z],V=rE(c,{theme:n,rect:$,index:H}),M=V?V.contentRect:$,J={width:Math.max(1,Math.round(M.width)),height:Math.max(1,Math.round(M.height)),name:`Dashboard cell ${H+1}`},we=_n(n,R,m.length,J);U!==1&&(we.fontScale*=U);let me=su(C,{theme:n,viewport:J,persistentLayers:false,blockIndex:R,totalBlocks:m.length,failureMode:t.failureMode},{registry:D,templateContext:we}),Y=iE(c)?aE(me.layers,n):me.layers,se;if(V){let ye={width:Math.max(1,Math.round($.width)),height:Math.max(1,Math.round($.height)),name:`Dashboard cell ${H+1} frame`};se={rect:$,rectPct:Ph($,r),viewport:ye,layers:V.layers,overlayLayers:V.overlayLayers,overlayViewport:{width:J.width,height:J.height,name:`Dashboard cell ${H+1} overlay`},...V.contentRadiusPct?{contentRadiusPct:V.contentRadiusPct}:{}};}return {index:H,block:C,blockIndex:R,layers:Y,rect:M,rectPct:Ph(M,r),...se?{frame:se}:{},viewport:J,zoom:U,source:me.source,...me.diagnostic?{diagnostic:me.diagnostic}:{}}}),q=is(e,n),F=tE(c,n),P={fill:F,bottomLayers:[{type:"shape",id:"dashboard-backdrop",content:{shape:"rect",fill:F},position:{x:0,y:0,width:"100%",height:"100%"}},...jr(q?.bottomLayers,n)],topLayers:jr(q?.topLayers,n)};return {layout:d,layoutSource:u,style:c,viewport:r,cells:B,title:x,backdrop:P,diagnostics:s}}var Y9=new Set(["answer","back","solution","explanation","correct answer","correct","distractor","option"]);function sE(e){return typeof e=="string"?e.trim().toLowerCase().replace(/[\s_-]+/g,""):""}function gu(e){let t=sE(e);if(t==="flashcard"||t==="card"||t==="basicflashcard")return "basic";if(t==="multiplechoiceflashcard"||t==="multiplechoice"||t==="quiz")return "multiple-choice";if(t==="group"||t==="flashcardgroup"||t==="deck")return "group"}function vu(e){let t=gu(e.metadata?.study)??gu(e.metadata?.["study-mode"]);if(t)return t;for(let n of e.classes??[]){let r=gu(n);if(r)return r}return gu(e.template)}function Ra(e){return typeof e.title=="string"&&e.title.trim().length>0}function ws(e){return (e.contents?.length??0)>0||(e.media?.length??0)>0||(e.layers?.length??0)>0}function Jn(e){return Ra(e)||ws(e)}function lE(e){return Ra(e)&&Y9.has(e.title.trim().toLowerCase())}function X9(e){let{children:t,...n}=e;return n}function K9(e){let{children:t,contents:n,media:r,layers:i,...a}=e;return a}function cE(e){let{children:t,title:n,...r}=e;return r}function Zt(...e){return {blocks:e}}function MT(e){return e===true?true:typeof e!="string"?false:["true","yes","on","1","correct"].includes(e.trim().toLowerCase())}function Q9(e){return MT(e.metadata?.correct)||MT(e.metadata?.answer)||(e.classes??[]).some(t=>sE(t)==="correct")}function Oh(e){let t=vu(e);if(t==="group")return false;if(t==="basic"||t==="multiple-choice")return true;if(lE(e))return false;let n=e.children??[];return n.length===0?Ra(e)&&ws(e):n.length===1?Jn(e)&&Jn(n[0]):n.every(Jn)}function uE(e){for(let t of e.children??[]){let n=vu(t);if(n==="basic"||n==="multiple-choice"||uE(t))return true}return false}function Z9(e){let t=e.children??[];return t.length===0?false:uE(e)?true:ws(e)?false:t.length===1?Oh(t[0])&&!lE(t[0]):t.filter(Oh).length>=2}function dE(e){return ws(e)?Zt(cE(e)):void 0}function qT(e,t){let n=e.children??[],r,i,a,o;if(n.length===0?(r=Ra(e)?Zt(K9(e)):Zt(),i=ws(e)?Zt(cE(e)):Zt()):n.length===1?(r=Jn(e)?Zt(X9(e)):Zt(),i=Jn(n[0])?Zt(n[0]):Zt()):(r=Jn(n[0])?Zt(n[0]):Zt(),i=Zt(...n.slice(1).filter(Jn)),a=Ra(e)?e.title.trim():void 0,o=dE(e)),r.blocks.length===0&&t.push({severity:"error",code:"empty-front",message:`Flashcard "${e.id}" has no content for its front`,blockId:e.id}),i.blocks.length===0&&t.push({severity:"error",code:"empty-back",message:`Flashcard "${e.id}" has no content for its answer`,blockId:e.id}),!(r.blocks.length===0||i.blocks.length===0))return {id:e.id,sourceBlockId:e.id,kind:"basic",...a?{label:a}:{},front:r,back:i,...o?{explanation:o}:{}}}function J9(e,t){let n=e.children??[],r=n[0],i=n.slice(1).filter(Jn);if((!r||!Jn(r))&&t.push({severity:"error",code:"empty-front",message:`Multiple-choice flashcard "${e.id}" has no question block`,blockId:e.id}),i.length===0&&t.push({severity:"error",code:"empty-back",message:`Multiple-choice flashcard "${e.id}" has no answer choices`,blockId:e.id}),!r||!Jn(r)||i.length===0)return;let a=i.filter(Q9);a.length>1&&t.push({severity:"warning",code:"multiple-correct-answers",message:`Multiple-choice flashcard "${e.id}" marks more than one answer correct; the first marker wins`,blockId:e.id});let o=a[0]??i[0];i.length<2&&t.push({severity:"warning",code:"multiple-choice-needs-distractor",message:`Multiple-choice flashcard "${e.id}" needs at least one distractor`,blockId:e.id});let s=i.map((c,d)=>({id:`${e.id}-choice-${d+1}`,sourceBlockId:c.id,content:Zt(c),correct:c===o})),l=dE(e);return {id:e.id,sourceBlockId:e.id,kind:"multiple-choice",...Ra(e)?{label:e.title.trim()}:{},front:Zt(r),back:Zt(o),choices:s,...l?{explanation:l}:{}}}function e$(e){let t=e.frontmatter?.title;return typeof t=="string"&&t.trim()?t.trim():e.startBlock?.title?.trim()||void 0}function Kh(e,t={}){let n=t.source??"auto",r=[],i=[],a=d=>{let u=vu(d);if(u==="group"){for(let f of d.children??[])a(f);return}if(u==="basic"){let f=qT(d,i);f&&r.push(f);return}if(u==="multiple-choice"){let f=J9(d,i);f&&r.push(f);return}if(n==="explicit"){for(let f of d.children??[])a(f);return}if(Z9(d)){for(let f of d.children??[])a(f);return}if(Oh(d)){let f=qT(d,i);f&&r.push(f);return}for(let f of d.children??[])a(f);};for(let d of e.blocks)a(d);let o=e$(e),s=typeof e.frontmatter?.title=="string"?e.frontmatter.title.trim():"",l=r[0]?.front.blocks[0]?.title?.trim(),c=o&&(s||o!==l)?o:void 0;return {...c?{title:c}:{},cards:r,diagnostics:i}}function xe(e,t){return typeof e=="number"?e:e.endsWith("%")?parseFloat(e)/100*t:parseFloat(e)}function on(e,t,n){switch(e){case "center":return {x:-t/2,y:-n/2};case "top-right":return {x:-t,y:0};case "bottom-left":return {x:0,y:-n};case "bottom-right":return {x:-t,y:-n};default:return {x:0,y:0}}}function mE({layer:e,basePath:t,viewport:n,blockTime:r,animationsEnabled:i=true}){let{content:a,position:o,animation:s}=e,l=xe(o.x,n.width),c=xe(o.y,n.height),d=o.width?xe(o.width,n.width):n.width,u=o.height?xe(o.height,n.height):n.height,f=on(o.anchor,d,u),m=l+f.x,h=c+f.y,y=gt(a.src,t),g=ft(s,r),w=Bh(a.treatment,a.blur),x=r$(a.fit),v=a.fit==="cover",T=s&&i$.has(s.type);if(v&&o$(n,d,u,i,s)){let k=s$(s),E=l$(T?s:void 0),I=T?{className:"",style:{}}:g;return b("g",{className:`block-layer block-layer--image ${I.className}`,style:I.style,"data-layer-id":e.id,"data-image-framing":"portrait-pan",children:b("foreignObject",{x:m,y:h,width:d,height:u,children:b("div",{style:{width:`${d}px`,height:`${u}px`,overflow:"hidden"},children:b("img",{src:y,alt:a.alt||"",className:k,style:{width:`${d}px`,height:`${u}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",...w?{filter:w}:{},...a.blur&&a.blur>0?{transform:"scale(1.06)"}:{},...E}})})})})}if(v&&T&&s){let k=c$(s),E=ft(k,r);return b("g",{className:"block-layer block-layer--image","data-layer-id":e.id,children:b("foreignObject",{x:m,y:h,width:d,height:u,children:b("div",{style:{width:`${d}px`,height:`${u}px`,overflow:"hidden"},children:b("img",{src:y,alt:a.alt||"",className:E.className,style:{width:`${d}px`,height:`${u}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",transformOrigin:"center center",...w?{filter:w}:{},...E.style}})})})})}return v?b("g",{className:`block-layer block-layer--image ${g.className}`,style:g.style,"data-layer-id":e.id,children:b("foreignObject",{x:m,y:h,width:d,height:u,children:b("img",{src:y,alt:a.alt||"",style:{width:`${d}px`,height:`${u}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",...w?{filter:w}:{},...a.blur&&a.blur>0?{transform:"scale(1.06)"}:{}}})})}):b("g",{className:`block-layer block-layer--image ${g.className}`,style:g.style,"data-layer-id":e.id,children:b("image",{href:y,x:m,y:h,width:d,height:u,preserveAspectRatio:x,style:{pointerEvents:"none",...w?{filter:w}:{}}})})}function r$(e){switch(e){case "cover":return "xMidYMid slice";case "fill":return "none";default:return "xMidYMid meet"}}var i$=new Set(["panLeft","panRight","slowZoom","zoomIn","zoomOut"]),a$=.83;function o$(e,t,n,r,i){return !r||i?.type==="none"||e.width/e.height>=a$?false:t>=e.width*.7&&n>=e.height*.7}function s$(e){return e?.type==="panRight"||e?.type==="slowZoom"&&e.panDirection==="right"?"squisq-image--portrait-pan-left":"squisq-image--portrait-pan-right"}function l$(e){return {"--portrait-pan-duration":`${e?.duration??12}s`,"--portrait-pan-delay":`${e?.delay??0}s`,"--portrait-pan-easing":e?.easing??"ease-in-out"}}function c$(e){switch(e.type){case "panLeft":return {...e,type:"slowZoom",panDirection:"left"};case "panRight":return {...e,type:"slowZoom",panDirection:"right"};case "zoomIn":return {...e,type:"slowZoom",direction:"in"};case "zoomOut":return {...e,type:"slowZoom",direction:"out"};default:return e}}function Da(e,t){let n=`${e}-${t}`,r=n.replace(/[^A-Za-z0-9_-]/g,"_");if(r===n.replace(/:/g,"_"))return r.replace(/^_+/,"d");let i=0;for(let a=0;a<n.length;a++)i=i*31+n.charCodeAt(a)>>>0;return `${r.replace(/^_+/,"d")}-${i.toString(36)}`}function Oa(e,t){if(!e||e==="solid")return;let n=Math.max(1,t??1);return e==="dotted"?`${n} ${n*2}`:`${n*3} ${n*2}`}function u$(e=0){let t=e*Math.PI/180,n=Math.sin(t),r=Math.cos(t);return {x1:.5-n/2,y1:.5-r/2,x2:.5+n/2,y2:.5+r/2}}function d$(e){return `squisq-grad-${e}`}function Fa(e,t,n,r){if(r){let i=`squisq-pattern-${e}`;return {fill:`url(#${i})`,def:m$(i,r)}}if(n){let i=d$(e),a=u$(n.angle);return {fill:`url(#${i})`,def:b("linearGradient",{id:i,x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,children:[b("stop",{offset:"0%",stopColor:n.from}),b("stop",{offset:"100%",stopColor:n.to})]})}}return {fill:t,def:null}}function m$(e,t){let n=t.size??24,r=t.opacity??1,i=t.color;return b("pattern",{id:e,width:n,height:n,patternUnits:"userSpaceOnUse",patternTransform:t.kind==="diagonal"?"rotate(45)":void 0,children:[t.kind==="dots"&&b("circle",{cx:n/2,cy:n/2,r:Math.max(1,n/12),fill:i,opacity:r}),t.kind==="grid"&&b("path",{d:`M ${n} 0 L 0 0 0 ${n}`,fill:"none",stroke:i,strokeWidth:1,opacity:r}),t.kind==="diagonal"&&b("line",{x1:0,y1:0,x2:0,y2:n,stroke:i,strokeWidth:1,opacity:r})]})}function fE(e,t){if(!t||t.type!=="noise")return {filterAttr:void 0,def:null};let n=`squisq-noise-${e}`,r=t.opacity??.05;return {filterAttr:`url(#${n})`,def:b("filter",{id:n,x:"0%",y:"0%",width:"100%",height:"100%",children:[b("feTurbulence",{type:"fractalNoise",baseFrequency:t.baseFrequency??.8,numOctaves:2,stitchTiles:"stitch",result:"noise"}),b("feColorMatrix",{in:"noise",type:"saturate",values:"0",result:"mono"}),b("feComponentTransfer",{in:"mono",result:"faded",children:b("feFuncA",{type:"linear",slope:r,intercept:0})}),b("feComposite",{in:"faded",in2:"SourceGraphic",operator:"in"})]})}}function pE(e){return e.layer.content.html?.trim()?b(y$,{...e}):Ch(e.layer.content.text??"")?b(h$,{...e}):b(g$,{...e})}function f$(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function p$(e){return Mh(e).map(t=>t.type==="icon"?`<i class="${qh(t.family,t.name)}" aria-hidden="true"></i>`:f$(t.text).replace(/\n/g,"<br>")).join("")}function h$({layer:e,viewport:t,blockTime:n,textScale:r=1}){let{content:i,position:a,animation:o}=e,{text:s,style:l}=i,c=xe(a.x,t.width),d=xe(a.y,t.height),u=a.width!=null?xe(a.width,t.width):t.width,f=a.anchor??"top-left",m=l.lineHeight||1.4,h=l.fontSize*m,y=l.padding??0,g=Ih(s??""),w=g.split(`
|
|
737
|
-
`).flatMap(_=>hE(_,l.fontSize,u)),x=a.height!=null?xe(a.height,t.height):Math.max(h,w.length*h)+y*2,v=c-Kr(f,u,"x"),T=d-Kr(f,x,"y"),S=ft(o,n),k=de(()=>
|
|
736
|
+
`;var UT=[1,1.5,2];function Gh(e){let t=typeof e=="number"?e:typeof e=="string"?Number(e.trim().replace(/%$/,"")):Number.NaN;if(!Number.isFinite(t))return;let n=t>3?t/100:t;return UT.find(r=>Math.abs(r-n)<.001)}var v9=new Set(["content","list","quote","definitionCard","factCard","dateEvent"]),T9=160,E9=360;function jT(e){return !e.template||!v9.has(e.template)?1:e.textLength<T9?2:e.textLength<E9?1.5:1}function WT(e,t){let n=e.map(o=>o.explicit!==void 0?o.explicit:t==="auto"?jT(o):1),r=new Map;if(e.forEach((o,s)=>{let l=n[s];if(l===1)return;let c=o.explicit!==void 0?2:1;r.set(l,(r.get(l)??0)+c);}),r.size<=1)return n;let i=2,a=-1;for(let[o,s]of r)(s>a||s===a&&o>i)&&(i=o,a=s);return e.map((o,s)=>o.explicit!==void 0?o.explicit:n[s]===1?1:i)}var AT=32,CT=64,S9=/^[a-z0-9][a-z0-9-]*$/;function wr(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(typeof e!="string")return;let t=e.trim().replace(/%$/,"");if(t.length===0)return;let n=Number(t);return Number.isFinite(n)?n:void 0}function hs(e){return `${Math.round(e*1e3)/1e3}%`}function _9(e,t,n){if(!e||typeof e!="object"){n.push({path:t,message:"cell must be an object"});return}let r=e,i=wr(r.x),a=wr(r.y),o=wr(r.width),s=wr(r.height);if(i===void 0||i<0||i>100){n.push({path:`${t}.x`,message:"x must be a percent between 0 and 100"});return}if(a===void 0||a<0||a>100){n.push({path:`${t}.y`,message:"y must be a percent between 0 and 100"});return}if(o===void 0||o<=0||o>100){n.push({path:`${t}.width`,message:"width must be a percent greater than 0"});return}if(s===void 0||s<=0||s>100){n.push({path:`${t}.height`,message:"height must be a percent greater than 0"});return}let l={x:hs(i),y:hs(a),width:hs(o),height:hs(s)};if(r.block!==void 0){let c=typeof r.block=="string"?Number(r.block):r.block;if(typeof c!="number"||!Number.isInteger(c)||c<1||c>CT){n.push({path:`${t}.block`,message:`block must be an integer between 1 and ${CT}`});return}l.block=c;}if(r.zoom!==void 0){let c=Gh(r.zoom);if(c===void 0){n.push({path:`${t}.zoom`,message:"zoom must be 1, 1.5, or 2 (or 100/150/200 percent)"});return}l.zoom=c;}return l}function Lh(e,t,n){if(!Array.isArray(e)){n.push({path:t,message:"must be an array of cells"});return}if(e.length<1||e.length>AT){n.push({path:t,message:`must contain between 1 and ${AT} cells`});return}let r=[];for(let i=0;i<e.length;i++){let a=_9(e[i],`${t}[${i}]`,n);if(!a)return;r.push(a);}return r}function A9(e,t){if(!e||typeof e!="object"){t.push({path:"titleSlot",message:"titleSlot must be an object"});return}let n=e,r=n.placement==="bottom"?"bottom":n.placement==="top"?"top":void 0;if(r===void 0&&n.placement!==void 0){t.push({path:"titleSlot.placement",message:"placement must be 'top' or 'bottom'"});return}let i=wr(n.height);if(i===void 0||i<=0||i>40){t.push({path:"titleSlot.height",message:"height must be a percent between 0 and 40"});return}return {placement:r??"top",height:hs(i)}}function Yh(e){let t=[];if(!e||typeof e!="object")return {valid:false,errors:[{path:"",message:"definition must be an object"}]};let n=e,r=typeof n.name=="string"?n.name.trim().toLowerCase():"";S9.test(r)||t.push({path:"name",message:"name must be a slug (lowercase letters, digits, hyphens)"});let i=typeof n.label=="string"?n.label.trim():"";i.length===0&&t.push({path:"label",message:"label must be a non-empty string"});let a=n.cells,o,s,l;!a||typeof a!="object"?t.push({path:"cells",message:"cells must be an object with a landscape array"}):(o=Lh(a.landscape,"cells.landscape",t),a.portrait!==void 0&&(s=Lh(a.portrait,"cells.portrait",t)),a.square!==void 0&&(l=Lh(a.square,"cells.square",t)),o&&(s&&s.length!==o.length&&t.push({path:"cells.portrait",message:"portrait must define the same number of cells as landscape"}),l&&l.length!==o.length&&t.push({path:"cells.square",message:"square must define the same number of cells as landscape"})));let c;if(n.titleSlot!==void 0&&(c=A9(n.titleSlot,t)),t.length>0||!o)return {valid:false,errors:t};let d={name:r,label:i,cells:{landscape:o,...s?{portrait:s}:{},...l?{square:l}:{}}};return typeof n.description=="string"&&n.description.trim()&&(d.description=n.description.trim()),c&&(d.titleSlot=c),n.auto===false&&(d.auto=false),{valid:true,errors:t,layout:d}}function Pa(e){return e.cells.landscape.length}function VT(e){return e.map(t=>({x:t.y,y:t.x,width:t.height,height:t.width,...t.block!==void 0?{block:t.block}:{},...t.zoom!==void 0?{zoom:t.zoom}:{}}))}function GT(e,t,n){return (t==="portrait"?e.cells.portrait??VT(e.cells.landscape):t==="square"?e.cells.square??e.cells.landscape:e.cells.landscape).map(i=>{let a=wr(i.x)??0,o=wr(i.y)??0,s=wr(i.width)??0,l=wr(i.height)??0,c={rect:{x:n.x+a/100*n.width,y:n.y+o/100*n.height,width:Math.max(1,s/100*n.width),height:Math.max(1,l/100*n.height)}};i.block!==void 0&&(c.block=i.block);let d=Gh(i.zoom);return d!==void 0&&(c.zoom=d),c})}var YT="squisq-dashboard-layouts",C9={label:"lb",description:"ds",cells:"ce",landscape:"ls",portrait:"pt",square:"sq",width:"wd",height:"hg",block:"bk",zoom:"zo",titleSlot:"ts",placement:"pl",auto:"au"},I9=Object.fromEntries(Object.entries(C9).map(([e,t])=>[t,e]));function Nh(e,t){if(Array.isArray(e))return e.map(n=>Nh(n,t));if(e&&typeof e=="object"){let n={};for(let[r,i]of Object.entries(e))n[t[r]??r]=Nh(i,t);return n}return e}function XT(e){if(!e)return;let t=L9(e[YT]);if(!t)return;let n=[];for(let r of t){let i=Yh(r);i.layout&&n.push(i.layout);}return n.length>0?n:void 0}function KT(e){return Object.entries(e).map(([t,n])=>{let r=Nh(n&&typeof n=="object"?n:{},I9);return {name:t,...r}})}function M9(e){return Array.isArray(e)?e:e&&typeof e=="object"?KT(e):null}function q9(e){try{return JSON.parse(e)}catch{return}}function L9(e){if(e==null)return null;if(Array.isArray(e))return e;if(typeof e=="object")return KT(e);if(typeof e!="string")return null;let t=q9(e.trim());return t!==void 0?M9(t):null}var ku=2;function Ce(e){return `${Math.round(e*1e3)/1e3}%`}function $i(e,t,n=ku){let r=(100-(e-1)*n)/e,i=(100-(t-1)*n)/t,a=[];for(let o=0;o<t;o++)for(let s=0;s<e;s++)a.push({x:Ce(s*(r+n)),y:Ce(o*(i+n)),width:Ce(r),height:Ce(i)});return a}function P9(e,t,n=ku){let r=e+n,i=100-r,a=(100-(t-1)*n)/t,o=[{x:"0%",y:"0%",width:Ce(e),height:"100%"}];for(let s=0;s<t;s++)o.push({x:Ce(r),y:Ce(s*(a+n)),width:Ce(i),height:Ce(a)});return o}function R9(e,t,n=ku){let r=e+n,i=100-r,a=(100-(t-1)*n)/t,o=[{x:"0%",y:"0%",width:"100%",height:Ce(e)}];for(let s=0;s<t;s++)o.push({x:Ce(s*(a+n)),y:Ce(r),width:Ce(a),height:Ce(i)});return o}function N9(e,t=ku){let n=e+t,i=(100-n-t)/2,a=(100-t)/2,o=[{x:"0%",y:"0%",width:Ce(e),height:"100%"}];for(let s=0;s<2;s++)for(let l=0;l<2;l++)o.push({x:Ce(n+l*(i+t)),y:Ce(s*(a+t)),width:Ce(i),height:Ce(a)});return o}var bu=Object.freeze([{name:"focus-1",label:"Focus",description:"One block fills the dashboard.",cells:{landscape:[{x:"0%",y:"0%",width:"100%",height:"100%"}]}},{name:"split-2",label:"Split",description:"Two blocks side by side.",cells:{landscape:$i(2,1)}},{name:"hero-left",label:"Hero + 2",description:"A large lead block with two companions.",cells:{landscape:P9(58,2),portrait:[{x:"0%",y:"0%",width:"100%",height:Ce(46)},{x:"0%",y:Ce(48),width:"100%",height:Ce(25)},{x:"0%",y:Ce(75),width:"100%",height:Ce(25)}]}},{name:"grid-2x2",label:"Grid 2\xD72",description:"Four blocks in a balanced grid.",cells:{landscape:$i(2,2)}},{name:"hero-top",label:"Hero band",description:"A wide lead band with three blocks below.",cells:{landscape:R9(46,3),portrait:[{x:"0%",y:"0%",width:"100%",height:Ce(40)},{x:"0%",y:Ce(42),width:"100%",height:Ce(18)},{x:"0%",y:Ce(62),width:"100%",height:Ce(18)},{x:"0%",y:Ce(82),width:"100%",height:Ce(18)}]},auto:false},{name:"mosaic-5",label:"Mosaic",description:"A hero block beside a 2\xD72 grid.",cells:{landscape:N9(58),portrait:[{x:"0%",y:"0%",width:"100%",height:Ce(40)},{x:"0%",y:Ce(42),width:Ce(49),height:Ce(27)},{x:Ce(51),y:Ce(42),width:Ce(49),height:Ce(27)},{x:"0%",y:Ce(71),width:Ce(49),height:Ce(29)},{x:Ce(51),y:Ce(71),width:Ce(49),height:Ce(29)}]}},{name:"grid-3x2",label:"Grid 3\xD72",description:"Six blocks in three columns.",cells:{landscape:$i(3,2)}},{name:"grid-3x3",label:"Grid 3\xD73",description:"Nine blocks in a square grid.",cells:{landscape:$i(3,3),square:$i(3,3)}},{name:"grid-4x3",label:"Grid 4\xD73",description:"Twelve blocks in four columns.",cells:{landscape:$i(4,3)}},{name:"grid-4x4",label:"Grid 4\xD74",description:"Sixteen blocks \u2014 the densest wall.",cells:{landscape:$i(4,4)}}]);var xu="auto";function QT(e,t){let n=e.trim().toLowerCase();if(n)return t?.find(r=>r.name===n)??bu.find(r=>r.name===n)}function ZT(e,t,n){let i=[...[...(n??[]).filter(l=>l.auto!==false),...bu.filter(l=>l.auto!==false)]].sort((l,c)=>Pa(l)-Pa(c)),a=Math.max(1,e),o=i.find(l=>Pa(l)>=a);if(o)return o;let s=i.reduce((l,c)=>Math.max(l,Pa(c)),0);return i.find(l=>Pa(l)===s)??bu[0]}var JT=["basic","card","panel","accent"],eE="basic";function Dh(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t)return t==="none"||t==="default"||t==="flat"?"basic":t==="cards"?"card":t==="panels"||t==="outline"?"panel":t==="accents"||t==="accent-cards"?"accent":JT.includes(t)?t:void 0}function fu(e,t,n){return Math.min(n,Math.max(t,e))}function O9(e){return Fn(e)>.45}function tE(e,t){let n=t.colors.background;return e==="basic"||e==="panel"?n:O9(n)?or(n,.05):to(n,.04)}function nE(e,t){let n=Object.values(e.colorSchemes??{});if(n.length===0)return e.colors.primary;let r=n[(t%n.length+n.length)%n.length];return r.accent||r.text||e.colors.primary}function F9(e,t,n){let r=Math.max(1,Math.min(n.width,n.height)),i=t.style?.borderRadius??14;return e==="panel"?{edge:fu(r*.014,3,12),radius:fu(i*.45,0,r*.05)}:{edge:fu(r*.03,6,26),radius:fu(i,6,r*.1)}}function B9(e,t){if(e<=0)return;let n=Math.round(e/Math.max(1,t.width)*1e5)/1e3,r=Math.round(e/Math.max(1,t.height)*1e5)/1e3;return `${n}% / ${r}%`}function rE(e,t){let{theme:n,rect:r,index:i}=t;if(e==="basic")return null;let{edge:a,radius:o}=F9(e,n,r),s={x:r.x+a,y:r.y+a,width:Math.max(1,r.width-a*2),height:Math.max(1,r.height-a*2)},l={x:a,y:a,width:s.width,height:s.height},c=Math.max(1,Math.min(r.width,r.height)),d=Math.max(1,Math.round(c*.004)),u=nE(n,i),f=[];e!=="panel"&&[{spread:.45,dy:.5,alpha:.05},{spread:.25,dy:.42,alpha:.05},{spread:.08,dy:.3,alpha:.06}].forEach((x,v)=>{let T=a*x.spread,S=a*x.dy;f.push({type:"shape",id:`cell-shadow-${v}`,content:{shape:"rect",fill:le(n.colors.text,x.alpha),borderRadius:o+T},position:{x:l.x-T,y:l.y-T+S,width:l.width+T*2,height:l.height+T*2}});}),f.push({type:"shape",id:"cell-surface",content:{shape:"rect",fill:n.colors.background,borderRadius:o},position:{x:l.x,y:l.y,width:l.width,height:l.height}});let m=[];if(e==="accent"&&m.push({type:"shape",id:"cell-accent-wash",content:{shape:"rect",fill:le(u,.1),borderRadius:o},position:{x:0,y:0,width:"100%",height:"100%"}}),e==="accent"||e==="panel"){let w=Math.max(2,Math.round(c*.014));m.push({type:"shape",id:"cell-accent-bar",content:{shape:"rect",fill:u},position:{x:0,y:0,width:"100%",height:w}});}let h=e==="panel"?d:Math.max(1,d*.6);m.push({type:"shape",id:"cell-border",content:{shape:"rect",fill:"none",stroke:e==="panel"?le(u,.45):le(n.colors.text,.14),strokeWidth:h,borderRadius:o},position:{x:h/2,y:h/2,width:Math.max(1,l.width-h),height:Math.max(1,l.height-h)}});let y={cardRect:s,contentRect:s,layers:f,overlayLayers:m,radius:o},g=B9(o,s);return g&&(y.contentRadiusPct=g),y}function iE(e){return e!=="basic"}function aE(e,t){let n=e[0];if(!n||n.type!=="shape")return [...e];let{content:r,position:i}=n,a=typeof r.fill=="string"?r.fill.trim().toLowerCase():"";return !(r.shape==="rect"&&(i.x===0||i.x==="0%")&&(i.y===0||i.y==="0%")&&i.width==="100%"&&i.height==="100%")||r.gradient||r.pattern?[...e]:a!==t.colors.background.trim().toLowerCase()?[...e]:e.slice(1)}var gs=Object.freeze({layout:{canonical:"squisq-dashboard-layout",legacy:"dashboard-layout"},showTitle:{canonical:"squisq-dashboard-title",legacy:"dashboard-title"},zoom:{canonical:"squisq-dashboard-zoom",legacy:"dashboard-zoom"},style:{canonical:"squisq-dashboard-style",legacy:"dashboard-style"}}),ys=Object.freeze({layout:xu,showTitle:true,zoom:"auto",style:eE});function pu(e,t){if(e)return Object.prototype.hasOwnProperty.call(e,t.canonical)?e[t.canonical]:e[t.legacy]}function $9(e){if(typeof e=="boolean")return e;if(typeof e!="string")return;let t=e.trim().toLowerCase();if(["true","yes","on","show","visible"].includes(t))return true;if(["false","no","off","hide","hidden"].includes(t))return false}function IT(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t)return t==="auto"||t==="default"?xu:t}function H9(e){if(typeof e=="boolean")return e?"auto":"off";if(typeof e!="string")return;let t=e.trim().toLowerCase();if(["auto","on","true","yes"].includes(t))return "auto";if(["off","false","no","none","100","100%","1"].includes(t))return "off"}function oE(e,t={}){let n={layout:IT(pu(e,gs.layout))??ys.layout,showTitle:$9(pu(e,gs.showTitle))??ys.showTitle,zoom:H9(pu(e,gs.zoom))??ys.zoom,style:Dh(pu(e,gs.style))??ys.style};return {layout:IT(t.layout)??n.layout,showTitle:t.showTitle??n.showTitle,zoom:t.zoom??n.zoom,style:Dh(t.style)??n.style}}var z9={placement:"top",height:"9%"},U9=.015,j9=.02;function W9(e){let t=Number(e.trim().replace(/%$/,""));return Number.isFinite(t)?t:0}function hu(e,t){return `${Math.round(e/Math.max(1,t)*1e5)/1e3}%`}function Ph(e,t){return {left:hu(e.x,t.width),top:hu(e.y,t.height),width:hu(e.width,t.width),height:hu(e.height,t.height)}}function V9(e,t){let n=e.frontmatter?.title;return typeof n=="string"&&n.trim()?n.trim():t?.trim()??""}function G9(e,t){if(e.length===0||!t)return e;let n=e[0],r=typeof n.title=="string"?n.title.trim().toLowerCase():"";if(!r||r!==t.trim().toLowerCase())return e;let i=n.template,a=i==="title"||i==="sectionHeader"||i==="cover",o=Array.isArray(n.contents)&&n.contents.length>0;return a||!o?e.slice(1):e}function Y9(e,t,n,r,i,a){let o=_n(r,0,1,i),s=Qa(i),l=Math.min(44*s,t.height*.52),c=Math.max(4,Math.round(6*s)),d=a+c+Math.max(10,Math.round(c*2.5));return [{type:"shape",id:"dashboard-title-accent",content:{shape:"rect",fill:r.colors.primary},position:{x:a,y:"26%",width:c,height:"48%"}},{type:"text",id:"dashboard-title-text",content:{text:e,style:{fontSize:l,fontFamily:ie(o,"title"),fontWeight:"bold",color:r.colors.text,textAlign:"left",verticalAlign:"middle",maxLines:1}},position:{x:d,y:0,width:Math.max(1,t.width-d-a),height:"100%"}},{type:"shape",id:"dashboard-title-rule",content:{shape:"rect",fill:le(r.colors.text,.14)},position:{x:0,y:n.placement==="bottom"?0:t.height-2,width:"100%",height:2}}]}function Xh(e,t={}){let n=t.theme??tt,r=t.viewport??Ze.landscape,i=Bn(r),a=t.customLayouts??XT(e.frontmatter),o=t.customTemplates??e.customTemplates,s=[],l=oE(e.frontmatter,{layout:typeof t.layout=="string"?t.layout:void 0,showTitle:t.showTitle,zoom:t.zoom,...t.style!==void 0?{style:t.style}:{}}),c=l.style,d,u="auto";if(t.layout&&typeof t.layout=="object"){let H=Yh(t.layout);H.layout?(d=H.layout,u="option"):s.push({type:"unknown-layout",message:"Inline dashboard layout definition is invalid; falling back to auto.",requestedLayout:t.layout.name});}else if(l.layout!==xu){let H=QT(l.layout,a);H?(d=H,u=typeof t.layout=="string"&&t.layout.trim()?"option":"frontmatter"):s.push({type:"unknown-layout",message:`Unknown dashboard layout "${l.layout}"; falling back to auto.`,requestedLayout:l.layout});}let m=DT(e,{documentTitle:t.documentTitle}).blocks??[];m.length===0&&s.push({type:"empty-doc",message:"The document has no renderable blocks; the dashboard has no cells."});let h=l.showTitle?V9(e,t.documentTitle):"",y=h.length>0;y&&(m=G9(m,h)),d||(d=ZT(m.length,i,a),u="auto");let g=j9*Math.min(r.width,r.height),w={x:g,y:g,width:Math.max(1,r.width-g*2),height:Math.max(1,r.height-g*2)},x=null;if(y){let H=d.titleSlot??z9,R=Math.min(40,Math.max(2,W9(H.height)))/100*r.height,z=U9*r.height,C=H.placement==="bottom"?{x:0,y:r.height-R,width:r.width,height:R}:{x:0,y:0,width:r.width,height:R};w=H.placement==="bottom"?{x:g,y:g,width:Math.max(1,r.width-g*2),height:Math.max(1,r.height-R-z-g)}:{x:g,y:R+z,width:Math.max(1,r.width-g*2),height:Math.max(1,r.height-R-z-g)};let U={width:Math.max(1,Math.round(C.width)),height:Math.max(1,Math.round(C.height)),name:"Dashboard title"};x={text:h,rect:C,rectPct:Ph(C,r),viewport:U,layers:Y9(h,U,H,n,r,g)};}let v=GT(d,i,w),T=[],S=new Set;v.forEach((H,$)=>{if(H.block===void 0)return;let R=H.block-1;if(R<0||R>=m.length){s.push({type:"invalid-cell-assignment",message:`Cell ${$+1} of layout "${d.name}" requests block ${H.block}, but the document has ${m.length} block(s); the cell is left empty.`});return}S.add(R),T.push({cellIndex:$,rect:H.rect,candidateIndex:R,explicitZoom:H.zoom});});let k=new Set,E=0;v.forEach((H,$)=>{if(H.block===void 0){for(;E<m.length&&S.has(E);)E++;E>=m.length||(k.add(E),T.push({cellIndex:$,rect:H.rect,candidateIndex:E,explicitZoom:H.zoom}),E++);}});let I=[];for(let H=0;H<m.length;H++)!S.has(H)&&!k.has(H)&&I.push(H);I.length>0&&s.push({type:"overflow",message:`${I.length} block(s) exceed the "${d.name}" layout's ${v.length} cell(s) and are not rendered.`,hiddenBlockIds:I.map(H=>String(m[H].id??H))});let _=T.sort((H,$)=>H.cellIndex-$.cellIndex),A=WT(_.map(({candidateIndex:H,explicitZoom:$})=>{let R=m[H],z=typeof R.title=="string"?R.title:"";return {template:rt(R.template??""),textLength:z.length+Ia(R).length,...$!==void 0?{explicit:$}:{}}}),l.zoom),D=o&&o.length>0?ls(o):Fi,B=_.map(({cellIndex:H,rect:$,candidateIndex:R},z)=>{let C=m[R],U=A[z],V=rE(c,{theme:n,rect:$,index:H}),M=V?V.contentRect:$,J={width:Math.max(1,Math.round(M.width)),height:Math.max(1,Math.round(M.height)),name:`Dashboard cell ${H+1}`},we=_n(n,R,m.length,J);U!==1&&(we.fontScale*=U);let me=su(C,{theme:n,viewport:J,persistentLayers:false,blockIndex:R,totalBlocks:m.length,failureMode:t.failureMode},{registry:D,templateContext:we}),Y=iE(c)?aE(me.layers,n):me.layers,se;if(V){let ye={width:Math.max(1,Math.round($.width)),height:Math.max(1,Math.round($.height)),name:`Dashboard cell ${H+1} frame`};se={rect:$,rectPct:Ph($,r),viewport:ye,layers:V.layers,overlayLayers:V.overlayLayers,overlayViewport:{width:J.width,height:J.height,name:`Dashboard cell ${H+1} overlay`},...V.contentRadiusPct?{contentRadiusPct:V.contentRadiusPct}:{}};}return {index:H,block:C,blockIndex:R,layers:Y,rect:M,rectPct:Ph(M,r),...se?{frame:se}:{},viewport:J,zoom:U,source:me.source,...me.diagnostic?{diagnostic:me.diagnostic}:{}}}),q=is(e,n),F=tE(c,n),P={fill:F,bottomLayers:[{type:"shape",id:"dashboard-backdrop",content:{shape:"rect",fill:F},position:{x:0,y:0,width:"100%",height:"100%"}},...jr(q?.bottomLayers,n)],topLayers:jr(q?.topLayers,n)};return {layout:d,layoutSource:u,style:c,viewport:r,cells:B,title:x,backdrop:P,diagnostics:s}}var X9=new Set(["answer","back","solution","explanation","correct answer","correct","distractor","option"]);function sE(e){return typeof e=="string"?e.trim().toLowerCase().replace(/[\s_-]+/g,""):""}function gu(e){let t=sE(e);if(t==="flashcard"||t==="card"||t==="basicflashcard")return "basic";if(t==="multiplechoiceflashcard"||t==="multiplechoice"||t==="quiz")return "multiple-choice";if(t==="group"||t==="flashcardgroup"||t==="deck")return "group"}function vu(e){let t=gu(e.metadata?.study)??gu(e.metadata?.["study-mode"]);if(t)return t;for(let n of e.classes??[]){let r=gu(n);if(r)return r}return gu(e.template)}function Ra(e){return typeof e.title=="string"&&e.title.trim().length>0}function ws(e){return (e.contents?.length??0)>0||(e.media?.length??0)>0||(e.layers?.length??0)>0}function Jn(e){return Ra(e)||ws(e)}function lE(e){return Ra(e)&&X9.has(e.title.trim().toLowerCase())}function K9(e){let{children:t,...n}=e;return n}function Q9(e){let{children:t,contents:n,media:r,layers:i,...a}=e;return a}function cE(e){let{children:t,title:n,...r}=e;return r}function Zt(...e){return {blocks:e}}function MT(e){return e===true?true:typeof e!="string"?false:["true","yes","on","1","correct"].includes(e.trim().toLowerCase())}function Z9(e){return MT(e.metadata?.correct)||MT(e.metadata?.answer)||(e.classes??[]).some(t=>sE(t)==="correct")}function Oh(e){let t=vu(e);if(t==="group")return false;if(t==="basic"||t==="multiple-choice")return true;if(lE(e))return false;let n=e.children??[];return n.length===0?Ra(e)&&ws(e):n.length===1?Jn(e)&&Jn(n[0]):n.every(Jn)}function uE(e){for(let t of e.children??[]){let n=vu(t);if(n==="basic"||n==="multiple-choice"||uE(t))return true}return false}function J9(e){let t=e.children??[];return t.length===0?false:uE(e)?true:ws(e)?false:t.length===1?Oh(t[0])&&!lE(t[0]):t.filter(Oh).length>=2}function dE(e){return ws(e)?Zt(cE(e)):void 0}function qT(e,t){let n=e.children??[],r,i,a,o;if(n.length===0?(r=Ra(e)?Zt(Q9(e)):Zt(),i=ws(e)?Zt(cE(e)):Zt()):n.length===1?(r=Jn(e)?Zt(K9(e)):Zt(),i=Jn(n[0])?Zt(n[0]):Zt()):(r=Jn(n[0])?Zt(n[0]):Zt(),i=Zt(...n.slice(1).filter(Jn)),a=Ra(e)?e.title.trim():void 0,o=dE(e)),r.blocks.length===0&&t.push({severity:"error",code:"empty-front",message:`Flashcard "${e.id}" has no content for its front`,blockId:e.id}),i.blocks.length===0&&t.push({severity:"error",code:"empty-back",message:`Flashcard "${e.id}" has no content for its answer`,blockId:e.id}),!(r.blocks.length===0||i.blocks.length===0))return {id:e.id,sourceBlockId:e.id,kind:"basic",...a?{label:a}:{},front:r,back:i,...o?{explanation:o}:{}}}function e$(e,t){let n=e.children??[],r=n[0],i=n.slice(1).filter(Jn);if((!r||!Jn(r))&&t.push({severity:"error",code:"empty-front",message:`Multiple-choice flashcard "${e.id}" has no question block`,blockId:e.id}),i.length===0&&t.push({severity:"error",code:"empty-back",message:`Multiple-choice flashcard "${e.id}" has no answer choices`,blockId:e.id}),!r||!Jn(r)||i.length===0)return;let a=i.filter(Z9);a.length>1&&t.push({severity:"warning",code:"multiple-correct-answers",message:`Multiple-choice flashcard "${e.id}" marks more than one answer correct; the first marker wins`,blockId:e.id});let o=a[0]??i[0];i.length<2&&t.push({severity:"warning",code:"multiple-choice-needs-distractor",message:`Multiple-choice flashcard "${e.id}" needs at least one distractor`,blockId:e.id});let s=i.map((c,d)=>({id:`${e.id}-choice-${d+1}`,sourceBlockId:c.id,content:Zt(c),correct:c===o})),l=dE(e);return {id:e.id,sourceBlockId:e.id,kind:"multiple-choice",...Ra(e)?{label:e.title.trim()}:{},front:Zt(r),back:Zt(o),choices:s,...l?{explanation:l}:{}}}function t$(e){let t=e.frontmatter?.title;return typeof t=="string"&&t.trim()?t.trim():e.startBlock?.title?.trim()||void 0}function Kh(e,t={}){let n=t.source??"auto",r=[],i=[],a=d=>{let u=vu(d);if(u==="group"){for(let f of d.children??[])a(f);return}if(u==="basic"){let f=qT(d,i);f&&r.push(f);return}if(u==="multiple-choice"){let f=e$(d,i);f&&r.push(f);return}if(n==="explicit"){for(let f of d.children??[])a(f);return}if(J9(d)){for(let f of d.children??[])a(f);return}if(Oh(d)){let f=qT(d,i);f&&r.push(f);return}for(let f of d.children??[])a(f);};for(let d of e.blocks)a(d);let o=t$(e),s=typeof e.frontmatter?.title=="string"?e.frontmatter.title.trim():"",l=r[0]?.front.blocks[0]?.title?.trim(),c=o&&(s||o!==l)?o:void 0;return {...c?{title:c}:{},cards:r,diagnostics:i}}function xe(e,t){return typeof e=="number"?e:e.endsWith("%")?parseFloat(e)/100*t:parseFloat(e)}function on(e,t,n){switch(e){case "center":return {x:-t/2,y:-n/2};case "top-right":return {x:-t,y:0};case "bottom-left":return {x:0,y:-n};case "bottom-right":return {x:-t,y:-n};default:return {x:0,y:0}}}function mE({layer:e,basePath:t,viewport:n,blockTime:r,animationsEnabled:i=true}){let{content:a,position:o,animation:s}=e,l=xe(o.x,n.width),c=xe(o.y,n.height),d=o.width?xe(o.width,n.width):n.width,u=o.height?xe(o.height,n.height):n.height,f=on(o.anchor,d,u),m=l+f.x,h=c+f.y,y=gt(a.src,t),g=ft(s,r),w=Bh(a.treatment,a.blur),x=a$(a.fit),v=a.fit==="cover",T=s&&o$.has(s.type);if(v&&l$(n,d,u,i,s)){let k=c$(s),E=u$(T?s:void 0),I=T?{className:"",style:{}}:g;return b("g",{className:`block-layer block-layer--image ${I.className}`,style:I.style,"data-layer-id":e.id,"data-image-framing":"portrait-pan",children:b("foreignObject",{x:m,y:h,width:d,height:u,children:b("div",{style:{width:`${d}px`,height:`${u}px`,overflow:"hidden"},children:b("img",{src:y,alt:a.alt||"",className:k,style:{width:`${d}px`,height:`${u}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",...w?{filter:w}:{},...a.blur&&a.blur>0?{transform:"scale(1.06)"}:{},...E}})})})})}if(v&&T&&s){let k=d$(s),E=ft(k,r);return b("g",{className:"block-layer block-layer--image","data-layer-id":e.id,children:b("foreignObject",{x:m,y:h,width:d,height:u,children:b("div",{style:{width:`${d}px`,height:`${u}px`,overflow:"hidden"},children:b("img",{src:y,alt:a.alt||"",className:E.className,style:{width:`${d}px`,height:`${u}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",transformOrigin:"center center",...w?{filter:w}:{},...E.style}})})})})}return v?b("g",{className:`block-layer block-layer--image ${g.className}`,style:g.style,"data-layer-id":e.id,children:b("foreignObject",{x:m,y:h,width:d,height:u,children:b("img",{src:y,alt:a.alt||"",style:{width:`${d}px`,height:`${u}px`,objectFit:"cover",objectPosition:"center",display:"block",pointerEvents:"none",...w?{filter:w}:{},...a.blur&&a.blur>0?{transform:"scale(1.06)"}:{}}})})}):b("g",{className:`block-layer block-layer--image ${g.className}`,style:g.style,"data-layer-id":e.id,children:b("image",{href:y,x:m,y:h,width:d,height:u,preserveAspectRatio:x,style:{pointerEvents:"none",...w?{filter:w}:{}}})})}function a$(e){switch(e){case "cover":return "xMidYMid slice";case "fill":return "none";default:return "xMidYMid meet"}}var o$=new Set(["panLeft","panRight","slowZoom","zoomIn","zoomOut"]),s$=.83;function l$(e,t,n,r,i){return !r||i?.type==="none"||e.width/e.height>=s$?false:t>=e.width*.7&&n>=e.height*.7}function c$(e){return e?.type==="panRight"||e?.type==="slowZoom"&&e.panDirection==="right"?"squisq-image--portrait-pan-left":"squisq-image--portrait-pan-right"}function u$(e){return {"--portrait-pan-duration":`${e?.duration??12}s`,"--portrait-pan-delay":`${e?.delay??0}s`,"--portrait-pan-easing":e?.easing??"ease-in-out"}}function d$(e){switch(e.type){case "panLeft":return {...e,type:"slowZoom",panDirection:"left"};case "panRight":return {...e,type:"slowZoom",panDirection:"right"};case "zoomIn":return {...e,type:"slowZoom",direction:"in"};case "zoomOut":return {...e,type:"slowZoom",direction:"out"};default:return e}}function Da(e,t){let n=`${e}-${t}`,r=n.replace(/[^A-Za-z0-9_-]/g,"_");if(r===n.replace(/:/g,"_"))return r.replace(/^_+/,"d");let i=0;for(let a=0;a<n.length;a++)i=i*31+n.charCodeAt(a)>>>0;return `${r.replace(/^_+/,"d")}-${i.toString(36)}`}function Oa(e,t){if(!e||e==="solid")return;let n=Math.max(1,t??1);return e==="dotted"?`${n} ${n*2}`:`${n*3} ${n*2}`}function m$(e=0){let t=e*Math.PI/180,n=Math.sin(t),r=Math.cos(t);return {x1:.5-n/2,y1:.5-r/2,x2:.5+n/2,y2:.5+r/2}}function f$(e){return `squisq-grad-${e}`}function Fa(e,t,n,r){if(r){let i=`squisq-pattern-${e}`;return {fill:`url(#${i})`,def:p$(i,r)}}if(n){let i=f$(e),a=m$(n.angle);return {fill:`url(#${i})`,def:b("linearGradient",{id:i,x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,children:[b("stop",{offset:"0%",stopColor:n.from}),b("stop",{offset:"100%",stopColor:n.to})]})}}return {fill:t,def:null}}function p$(e,t){let n=t.size??24,r=t.opacity??1,i=t.color;return b("pattern",{id:e,width:n,height:n,patternUnits:"userSpaceOnUse",patternTransform:t.kind==="diagonal"?"rotate(45)":void 0,children:[t.kind==="dots"&&b("circle",{cx:n/2,cy:n/2,r:Math.max(1,n/12),fill:i,opacity:r}),t.kind==="grid"&&b("path",{d:`M ${n} 0 L 0 0 0 ${n}`,fill:"none",stroke:i,strokeWidth:1,opacity:r}),t.kind==="diagonal"&&b("line",{x1:0,y1:0,x2:0,y2:n,stroke:i,strokeWidth:1,opacity:r})]})}function fE(e,t){if(!t||t.type!=="noise")return {filterAttr:void 0,def:null};let n=`squisq-noise-${e}`,r=t.opacity??.05;return {filterAttr:`url(#${n})`,def:b("filter",{id:n,x:"0%",y:"0%",width:"100%",height:"100%",children:[b("feTurbulence",{type:"fractalNoise",baseFrequency:t.baseFrequency??.8,numOctaves:2,stitchTiles:"stitch",result:"noise"}),b("feColorMatrix",{in:"noise",type:"saturate",values:"0",result:"mono"}),b("feComponentTransfer",{in:"mono",result:"faded",children:b("feFuncA",{type:"linear",slope:r,intercept:0})}),b("feComposite",{in:"faded",in2:"SourceGraphic",operator:"in"})]})}}function pE(e){return e.layer.content.html?.trim()?b(w$,{...e}):Ch(e.layer.content.text??"")?b(y$,{...e}):b(b$,{...e})}function h$(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function g$(e){return Mh(e).map(t=>t.type==="icon"?`<i class="${qh(t.family,t.name)}" aria-hidden="true"></i>`:h$(t.text).replace(/\n/g,"<br>")).join("")}function y$({layer:e,viewport:t,blockTime:n,textScale:r=1}){let{content:i,position:a,animation:o}=e,{text:s,style:l}=i,c=xe(a.x,t.width),d=xe(a.y,t.height),u=a.width!=null?xe(a.width,t.width):t.width,f=a.anchor??"top-left",m=l.lineHeight||1.4,h=l.fontSize*m,y=l.padding??0,g=Ih(s??""),w=g.split(`
|
|
737
|
+
`).flatMap(_=>hE(_,l.fontSize,u)),x=a.height!=null?xe(a.height,t.height):Math.max(h,w.length*h)+y*2,v=c-Kr(f,u,"x"),T=d-Kr(f,x,"y"),S=ft(o,n),k=de(()=>g$(s??""),[s]),I={boxSizing:"border-box",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:l.verticalAlign==="top"?"flex-start":l.verticalAlign==="bottom"?"flex-end":"center",padding:y,color:l.color,fontSize:`${l.fontSize*r}px`,fontFamily:l.fontFamily||Ja,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",lineHeight:m,textAlign:l.textAlign??"left",...l.shadow?{textShadow:"0 2px 3px rgba(0,0,0,0.7)"}:{},...S.style};return b("g",{className:`block-layer block-layer--text ${S.className}`,style:S.style,"data-layer-id":e.id,children:b("foreignObject",{x:v,y:T,width:u,height:x,style:{overflow:"visible"},children:b("div",{xmlns:"http://www.w3.org/1999/xhtml","data-squisq-text-fit":"html","data-squisq-base-font-size":l.fontSize,style:I,children:b("div",{"data-squisq-text-content":"true",style:{width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word"},"aria-label":g,dangerouslySetInnerHTML:{__html:k}})})})})}function b$({layer:e,viewport:t,blockTime:n,textScale:r=1}){let i=Da(Wt(),e.id),{content:a,position:o,animation:s}=e,{text:l,style:c}=a,d=xe(o.x,t.width),u=xe(o.y,t.height),f=o.width!=null?xe(o.width,t.width):void 0,m=o.height!=null?xe(o.height,t.height):void 0,h=f,y=v$(c.textAlign,o.anchor),g=T$(c.verticalAlign,o.anchor),w=o.anchor??"top-left",x=E$(d,f,w,y),v=S$(u,m,w,g),T=f??(y==="middle"?Math.max(0,Math.min(x,t.width-x)*2):y==="end"?Math.max(0,x):Math.max(0,t.width-x)),S=m??(g==="middle"?Math.max(0,Math.min(v,t.height-v)*2):g==="text-after-edge"?Math.max(0,v):Math.max(0,t.height-v)),k=ft(s,n),E=s?.type==="countUp",I=s?.type==="wordReveal",A=((E&&s?uh(l??"",s,n):l)??"").split(`
|
|
738
738
|
`),D=h?A.reduce((me,Y)=>me.concat(hE(Y,c.fontSize,h)),[]):A;if(c.maxLines&&D.length>c.maxLines){D=D.slice(0,c.maxLines);let me=D[D.length-1];D[D.length-1]=me.replace(/\s*$/,"")+"...";}let B=c.lineHeight||1.4,q=c.fontSize*B,F=c.shrinkToFit===true,H=F&&g==="middle"?-((D.length-1)/2)*q:0,$=ue(null),[R,z]=ge(null),C=D.join(`
|
|
739
|
-
`);bn(()=>{if(!F){z(null);return}let me=$.current;if(!me||typeof me.getBBox!="function")return;let Y=()=>{try{let ye=me.getBBox();if(ye.width<=0||ye.height<=0)return;let pe=f??t.width,ce=m??t.height,X=Math.min(1,pe/ye.width,ce/ye.height);z(X<.995?{scale:X,cx:ye.x+ye.width/2,cy:ye.y+ye.height/2}:null);}catch{}};Y();let se=me.ownerDocument?.fonts;if(se&&se.status!=="loaded"){let ye=false;return se.ready.then(()=>{ye||Y();}),()=>{ye=true;}}},[F,C,f,m,t.width,t.height,c.fontSize,c.fontFamily,c.fontWeight]);let U=R?`translate(${R.cx} ${R.cy}) scale(${R.scale}) translate(${-R.cx} ${-R.cy})`:void 0,V={fontSize:`${c.fontSize}px`,fontFamily:c.fontFamily||Ja,fontWeight:c.fontWeight||"normal",fontStyle:c.fontStyle||"normal",fill:c.color,...k.style},M=c.shadow?`shadow-${i}`:void 0,J=0,we=me=>!I||!s||!me?me||"\xA0":me.split(" ").map((se,ye)=>{let pe=Fh(s,J++);return b(Pe,{children:[ye>0?" ":null,b("tspan",{className:"anim-word",style:{"--anim-delay":`${pe}s`},children:se})]},ye)});return b("g",{className:`block-layer block-layer--text ${k.className}`,style:k.style,"data-layer-id":e.id,children:[c.shadow&&b("defs",{children:b("filter",{id:M,x:"-20%",y:"-20%",width:"140%",height:"140%",children:b("feDropShadow",{dx:"0",dy:"2",stdDeviation:"3",floodColor:"rgba(0,0,0,0.7)"})})}),b(w$,{layerId:i,style:c,box:f!=null&&m!=null?{x:d-Kr(w,f,"x"),y:u-Kr(w,m,"y"),width:f,height:m}:{x:x-(c.padding||16),y:v-c.fontSize-(c.padding||16),width:E$(D,c)+(c.padding||16)*2,height:D.length*q+(c.padding||16)*2}}),b("g",{"data-squisq-text-fit":"svg","data-squisq-fit-width":T,"data-squisq-fit-height":S,style:{transform:`scale(${r})`,transformOrigin:`${x}px ${v}px`,transformBox:"view-box"},children:b("text",{ref:$,"data-squisq-text-content":"true",x,y:v,textAnchor:y,dominantBaseline:g,style:V,filter:M?`url(#${M})`:void 0,transform:U,children:D.map((me,Y)=>b("tspan",{x,dy:Y===0?H:q,children:[we(me)," "]},Y))})})]})}function y$({layer:e,viewport:t,blockTime:n,textScale:r=1}){let{content:i,position:a,animation:o}=e,{html:s,style:l}=i,c=xe(a.x,t.width),d=xe(a.y,t.height),u=a.width!=null?xe(a.width,t.width):t.width,f=a.height!=null?xe(a.height,t.height):l.fontSize*(l.lineHeight||1.4)*2,m=a.anchor??"top-left",h=c-Kr(m,u,"x"),y=d-Kr(m,f,"y"),g=de(()=>jl(ta(mi(s??""))),[s]),w=ft(o,n),x=l.verticalAlign==="middle"?"center":l.verticalAlign==="bottom"?"flex-end":"flex-start",v=!!(l.borderColor&&(l.borderWidth??0)>0),T={boxSizing:"border-box",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:x,padding:l.padding??0,color:l.color,fontSize:`${l.fontSize*r}px`,fontFamily:l.fontFamily||Ja,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",lineHeight:l.lineHeight||1.4,textAlign:l.textAlign??"left",overflow:"hidden",...l.background?{background:l.background}:{},...v?{border:`${l.borderWidth}px ${l.borderStyle??"solid"} ${l.borderColor}`,borderRadius:4}:{},...l.shadow?{textShadow:"0 2px 3px rgba(0,0,0,0.7)"}:{},...w.style},S=`squisq-rich-text-${b$(e.id)}`,k=l.textAlign==="center"||l.textAlign==="right"?"inside":"outside",E=_=>{_.target?.closest?.("[data-squisq-table-scroll]")&&_.stopPropagation();},I=`.${S}{margin:0}.${S} p{margin:0 0 .4em}.${S} h1,.${S} h2,.${S} h3,.${S} h4,.${S} h5,.${S} h6{margin:0 0 .3em;line-height:1.2}.${S} ul,.${S} ol{margin:0 0 .7em;padding-left:1.2em;list-style-position:${k}}.${S} li{margin:0}.${S} li>p{display:inline;margin:0}.${S} [data-squisq-table-scroll]{width:100%;max-height:20em;margin:.35em 0;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}.${S} table{width:100%;min-width:48em;margin:0;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:.76em;line-height:1.2}.${S} th,.${S} td{box-sizing:border-box;padding:.28em .45em;border:1px solid rgba(127,127,127,.55);border-color:color-mix(in srgb,currentColor 32%,transparent);vertical-align:top;white-space:normal;overflow-wrap:anywhere}.${S} th{position:sticky;top:0;z-index:1;background:rgba(127,127,127,.16);background:color-mix(in srgb,currentColor 12%,transparent);font-weight:600}.${S} tbody tr:nth-child(even){background:rgba(127,127,127,.07);background:color-mix(in srgb,currentColor 5%,transparent)}.${S} *:first-child{margin-top:0}.${S} *:last-child{margin-bottom:0}.${S} a{color:inherit;text-decoration:underline}`;return b("g",{className:`block-layer block-layer--text ${w.className}`,style:w.style,"data-layer-id":e.id,children:b("foreignObject",{x:h,y,width:u,height:f,color:l.color,style:{color:l.color},children:b("div",{xmlns:"http://www.w3.org/1999/xhtml","data-squisq-text-fit":"html","data-squisq-base-font-size":l.fontSize,style:T,onPointerDown:E,onClick:E,onWheel:E,onKeyDown:E,children:[b("style",{children:I}),b("div",{"data-squisq-text-content":"true",className:S,"aria-label":i.text,style:{width:"100%",color:l.color,whiteSpace:"pre-wrap",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:g}})]})})})}function b$(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function w$({layerId:e,style:t,box:n}){let r=!!(t.background||t.backgroundGradient),i=!!(t.borderColor&&(t.borderWidth??0)>0);if(!r&&!i)return null;let{fill:a,def:o}=Fa(e,t.background,t.backgroundGradient),s=Oa(t.borderStyle,t.borderWidth);return b(Pe,{children:[o&&b("defs",{children:o}),b("rect",{x:n.x,y:n.y,width:n.width,height:n.height,fill:r?a:"none",fillOpacity:r?t.backgroundOpacity:void 0,stroke:i?t.borderColor:void 0,strokeWidth:i?t.borderWidth:void 0,strokeDasharray:i?s:void 0,rx:4,ry:4})]})}function k$(e,t){return e==="center"?"middle":e==="right"?"end":e==="left"?"start":t?.includes("right")?"end":t==="center"?"middle":"start"}function x$(e,t){return e==="top"?"text-before-edge":e==="middle"?"middle":e==="bottom"||t?.includes("bottom")?"text-after-edge":t==="center"?"middle":"text-before-edge"}function v$(e,t,n,r){if(t==null)return e;let i=e-Kr(n,t,"x");return r==="middle"?i+t/2:r==="end"?i+t:i}function T$(e,t,n,r){if(t==null)return e;let i=e-Kr(n,t,"y");return r==="middle"?i+t/2:r==="text-after-edge"?i+t:i}function Kr(e,t,n){return e==="center"?t/2:n==="x"?e.includes("right")?t:0:e.includes("bottom")?t:0}function E$(e,t){return Math.max(...e.map(r=>r.length))*t.fontSize*.55}function hE(e,t,n){if(!e.trim())return [""];let r=t*.5,i=Math.floor(n/r);if(i<=0)return [e];let a=e.split(/\s+/),o=[],s="";for(let l of a){let c=s?`${s} ${l}`:l;if(c.length<=i)s=c;else if(s&&o.push(s),l.length>i){let d=l;for(;d.length>i;)o.push(d.slice(0,i)),d=d.slice(i);s=d;}else s=l;}return s&&o.push(s),o.length>0?o:[""]}var S$=1;function gE({layer:e,viewport:t,blockTime:n}){let{content:r,position:i,animation:a}=e,o=Da(Wt(),e.id),s=xe(i.x,t.width),l=xe(i.y,t.height),c=i.width?xe(i.width,t.width):100,d=i.height?xe(i.height,t.height):100,u=on(i.anchor,c,d),f=s+u.x,m=l+u.y,y=r.shape==="rect"&&f===0&&m===0&&c===t.width&&d===t.height&&!r.stroke&&!r.borderRadius?S$:0,g=f-y,w=m-y,x=c+y*2,v=d+y*2,T=ft(a,n),S=r.fill||"none",k=typeof S=="string"&&S.includes("gradient(");if(r.shape==="rect"&&k&&!r.gradient)return b("g",{className:`block-layer block-layer--shape ${T.className}`,style:T.style,"data-layer-id":e.id,pointerEvents:"none",children:b("foreignObject",{x:g,y:w,width:x,height:v,children:b("div",{style:{width:`${x}px`,height:`${v}px`,background:S,borderRadius:r.borderRadius?`${r.borderRadius}px`:void 0,pointerEvents:"none"}})})});let{fill:E,def:I}=Fa(o,S,r.gradient,r.pattern),{filterAttr:_,def:A}=fE(o,r.filter),D=Oa(r.borderStyle,r.strokeWidth),B={fill:E,fillOpacity:r.fillOpacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeDasharray:D,..._?{filter:_}:{}};return b("g",{className:`block-layer block-layer--shape ${T.className}`,style:T.style,"data-layer-id":e.id,pointerEvents:"none",children:[(I||A)&&b("defs",{children:[I,A]}),r.shape==="rect"&&b("rect",{x:g,y:w,width:x,height:v,rx:r.borderRadius,ry:r.borderRadius,...B}),r.shape==="circle"&&b("circle",{cx:f+c/2,cy:m+d/2,r:Math.min(c,d)/2,...B}),r.shape==="line"&&b("line",{x1:f,y1:m,x2:f+c,y2:m+d,stroke:r.stroke||"#ffffff",strokeWidth:r.strokeWidth||2,strokeDasharray:D})]})}function _$(e,t){let{content:n,position:r}=e;if(!n.shapeKind)return n.d;let i=r.width?xe(r.width,t.width):0,a=r.height?xe(r.height,t.height):0,o=xe(r.x,t.width),s=xe(r.y,t.height),l=on(r.anchor,i,a);return Ii(n.shapeKind,o+l.x,s+l.y,i,a)??n.d}function A$(e){return e.arrow}function yE(e,t,n){return e||(t==="both"||t===n?"arrow":"none")}function wE({layer:e,viewport:t,blockTime:n}){let{content:r,animation:i,id:a}=e,o=Da(Wt(),a),s=_$(e,t),l=r.stroke??"#1e293b",c=r.strokeWidth??2,{fill:d,def:u}=Fa(o,r.fill??"none",r.gradient),f=r.borderStyle?Oa(r.borderStyle,c):r.dasharray,m=ft(i,n),h=`marker-start-${o}`,y=`marker-end-${o}`,g=A$(r),w=Zo(yE(r.startMarker,g,"start"),"start"),x=Zo(yE(r.endMarker,g,"end"),"end"),v=w?`url(#${h})`:void 0,T=x?`url(#${y})`:void 0,S=i?.type==="drawOn";return b("g",{className:`block-layer block-layer--path ${m.className}`,style:m.style,"data-layer-id":a,children:[b("defs",{children:[u,x&&b(bE,{id:y,dir:"end",d:x.d,filled:x.filled,stroke:l}),w&&b(bE,{id:h,dir:"start",d:w.d,filled:w.filled,stroke:l})]}),b("path",{d:s,stroke:l,strokeWidth:c,fill:d,fillOpacity:r.fillOpacity,strokeDasharray:S?void 0:f,pathLength:S?1:void 0,"data-squisq-draw":S?"stroke":void 0,markerStart:S?void 0:v,markerEnd:S?void 0:T}),S&&(v||T)&&b("path",{d:s,stroke:l,strokeWidth:c,strokeOpacity:0,fill:"none","data-squisq-draw":"markers",markerStart:v,markerEnd:T})]})}function bE({id:e,dir:t,d:n,filled:r,stroke:i}){return b("marker",{id:e,viewBox:"0 0 10 10",refX:t==="end"?9:1,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",markerUnits:"strokeWidth",children:b("path",{d:n,fill:r?i:"none",stroke:r?"none":i,strokeWidth:r?void 0:1.5})})}var C$={terrain:{url:"https://tile.opentopomap.org/{z}/{x}/{y}.png",attribution:"Map: OpenTopoMap (CC-BY-SA)",maxZoom:17},road:{url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xA9 OpenStreetMap contributors",maxZoom:19},satellite:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attribution:"Imagery: Esri, Maxar, Earthstar",maxZoom:18},toner:{url:"https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:20},watercolor:{url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:16}};function Qh(e,t,n){let r=Math.pow(2,n),i=Math.floor((t+180)/360*r),a=e*Math.PI/180,o=Math.floor((1-Math.log(Math.tan(a)+1/Math.cos(a))/Math.PI)/2*r);return {x:i,y:o}}function Zh(e,t,n,r=256){let i=Math.pow(2,n),a=(t+180)/360*i,o=e*Math.PI/180,s=(1-Math.log(Math.tan(o)+1/Math.cos(o))/Math.PI)/2*i;return {x:(a-Math.floor(a))*r,y:(s-Math.floor(s))*r}}function I$(e,t,n,r,i,a=256){let o=Qh(e,t,n),s=Zh(e,t,n,a),l=Math.ceil(r/a)+1,c=Math.ceil(i/a)+1,d=o.x-Math.floor(l/2),u=o.y-Math.floor(c/2),f=r/2-s.x,m=i/2-s.y,h=[];for(let y=0;y<c;y++)for(let g=0;g<l;g++){let w=d+g,x=u+y,v=f+(w-o.x)*a,T=m+(x-o.y)*a;h.push({x:w,y:x,screenX:v,screenY:T});}return h}function kE(e,t,n,r){return e.url.replace("{z}",String(r)).replace("{x}",String(t)).replace("{y}",String(n))}async function M$(e){return new Promise((t,n)=>{let r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>n(new Error(`Failed to load tile: ${e}`)),r.src=e;})}async function xE(e){let{center:t,zoom:n,style:r,width:i,height:a,markers:o=[],showAttribution:s=true}=e,l=C$[r],c=l.tileSize||256,d=Math.min(n,l.maxZoom),u=kE(l,0,0,d);if(!rn(u,e.policy))throw new Vn("RESOURCE_BLOCKED",`Map tiles for style "${r}" are blocked by the resource policy (${l.url}). Composing a map contacts the tile host; supply the map as \`staticSrc\` to render it without any remote request.`);let f=document.createElement("canvas");f.width=i,f.height=a;let m=f.getContext("2d");if(!m)throw new Error("Failed to get canvas context");m.fillStyle=r==="toner"?"#ffffff":"#e5e7eb",m.fillRect(0,0,i,a);let y=I$(t.lat,t.lng,d,i,a,c).map(async g=>{let w=kE(l,g.x,g.y,d);try{let x=await M$(w);m.drawImage(x,g.screenX,g.screenY,c,c);}catch(x){console.warn(`Tile load failed: ${w}`,x);}});await Promise.all(y);for(let g of o)q$(m,g,t,d,i,a,c);return s&&P$(m,l.attribution,i,a),f.toDataURL("image/png")}function q$(e,t,n,r,i,a,o){let s=Qh(n.lat,n.lng,r),l=Qh(t.lat,t.lng,r),c=Zh(n.lat,n.lng,r,o),d=Zh(t.lat,t.lng,r,o),u=(l.x-s.x)*o+(d.x-c.x),f=(l.y-s.y)*o+(d.y-c.y),m=i/2+u,h=a/2+f,y=t.color||"#ef4444",g=t.icon||"pin";e.save(),g==="pin"?(e.fillStyle=y,e.beginPath(),e.arc(m,h-12,8,Math.PI,0,false),e.lineTo(m,h),e.closePath(),e.fill(),e.fillStyle="#ffffff",e.beginPath(),e.arc(m,h-12,3,0,Math.PI*2),e.fill()):g==="circle"?(e.fillStyle=y,e.beginPath(),e.arc(m,h,8,0,Math.PI*2),e.fill(),e.strokeStyle="#ffffff",e.lineWidth=2,e.stroke()):g==="star"&&(e.fillStyle=y,L$(e,m,h,5,10,5),e.fill()),t.label&&(e.fillStyle="#1f2937",e.font="bold 12px system-ui, sans-serif",e.textAlign="center",e.fillText(t.label,m,h+20)),e.restore();}function L$(e,t,n,r,i,a){let o=Math.PI/2*3,s=Math.PI/r;e.beginPath(),e.moveTo(t,n-i);for(let l=0;l<r;l++)e.lineTo(t+Math.cos(o)*i,n+Math.sin(o)*i),o+=s,e.lineTo(t+Math.cos(o)*a,n+Math.sin(o)*a),o+=s;e.lineTo(t,n-i),e.closePath();}function P$(e,t,n,r){e.save(),e.fillStyle="rgba(255, 255, 255, 0.8)";let i=4;e.font="10px system-ui, sans-serif";let a=e.measureText(t).width;e.fillRect(n-a-i*2-4,r-16,a+i*2,14),e.fillStyle="#374151",e.textAlign="right",e.fillText(t,n-i-4,r-5),e.restore();}function vE({layer:e,basePath:t,viewport:n,blockTime:r}){let{content:i,position:a,animation:o}=e,s=`map-clip-${Wt().replace(/:/g,"")}-${e.id}`,l=gt(i.staticSrc??"",t),[c,d]=ge(()=>i.staticSrc&&l||null),[u,f]=ge(!i.staticSrc),[m,h]=ge(null),[y,g]=ge(false),w=xe(a.x,n.width),x=xe(a.y,n.height),v=a.width?xe(a.width,n.width):n.width,T=a.height?xe(a.height,n.height):n.height,S=on(a.anchor,v,T),k=w+S.x,E=x+S.y,I=pr();he(()=>{let A=false;if(i.staticSrc){d(l||null),f(false);return}return f(true),h(null),g(false),xE({center:i.center,zoom:i.zoom,style:i.style,width:v,height:T,markers:i.markers,showAttribution:i.showAttribution!==false,policy:I}).then(D=>{A||(d(D),f(false));}).catch(D=>{if(!A){let B=D instanceof Vn;B||console.error("Failed to compose map:",D),h(D instanceof Error?D.message:String(D)),g(B),f(false);}}),()=>{A=true;}},[i.center,i.zoom,i.style,i.staticSrc,l,i.markers,i.showAttribution,v,T,t,I]);let _=ft(o,r);return u?b("g",{className:`block-layer block-layer--map ${_.className}`,style:_.style,"data-layer-id":e.id,children:[b("rect",{x:k,y:E,width:v,height:T,fill:"#e5e7eb"}),b("text",{x:k+v/2,y:E+T/2,textAnchor:"middle",dominantBaseline:"middle",fill:"#9ca3af",fontSize:"24",fontFamily:"system-ui, sans-serif",children:"Loading map..."})]}):m||!c?b("g",{className:`block-layer block-layer--map ${_.className}`,style:_.style,"data-layer-id":e.id,children:[b("rect",{x:k,y:E,width:v,height:T,fill:y?"#f3f4f6":"#fef2f2"}),b("text",{x:k+v/2,y:E+T/2,textAnchor:"middle",dominantBaseline:"middle",fill:y?"#6b7280":"#dc2626",fontSize:"18",fontFamily:"system-ui, sans-serif",children:y?"Map unavailable offline":"Map failed to load"})]}):b("g",{className:`block-layer block-layer--map ${_.className}`,style:_.style,"data-layer-id":e.id,children:[b("defs",{children:b("clipPath",{id:s,children:b("rect",{x:k,y:E,width:v,height:T})})}),b("g",{clipPath:`url(#${s})`,children:b("image",{href:c,x:k,y:E,width:v,height:T,preserveAspectRatio:"xMidYMid slice",style:{pointerEvents:"none"}})})]})}var R$=.2;function TE({layer:e,basePath:t,viewport:n,blockTime:r,isPlaying:i,muted:a=false}){let{content:o,position:s}=e,l=ue(null),c=ue(false),d=o.startAt??0,u=r<d,f=xe(s.x,n.width),m=xe(s.y,n.height),h=s.width?xe(s.width,n.width):n.width,y=s.height?xe(s.height,n.height):n.height,g=on(s.anchor,h,y),w=f+g.x,x=m+g.y,v=gt(o.src,t),T=gt(o.posterSrc||"",t),S=o.posterSrc?T:void 0;return he(()=>{let k=l.current;if(!k)return;if(k.currentTime=o.clipStart,c.current=true,i){let I=k.play();I&&I.catch(()=>{});}let E=()=>{k.currentTime>=o.clipEnd&&(k.pause(),k.currentTime=o.clipEnd);};return k.addEventListener("timeupdate",E),()=>{k.removeEventListener("timeupdate",E),k.pause();}},[v,o.clipStart,o.clipEnd]),he(()=>{let k=l.current;if(!k||!c.current)return;let E=u?o.clipStart:Math.min(o.clipEnd,o.clipStart+Math.max(0,r-d));if(!ai(k)&&Math.abs(k.currentTime-E)>R$&&(k.currentTime=E),u){k.pause();return}if(E>=o.clipEnd){k.pause();return}if(i){let I=k.play();I&&I.catch(()=>{});}else ai(k)||k.pause();},[i,u,r,d,v,o.clipStart,o.clipEnd]),b("g",{className:"block-layer block-layer--video","data-layer-id":e.id,children:b("foreignObject",{x:w,y:x,width:h,height:y,children:b("video",{ref:l,src:v,poster:S,muted:a,playsInline:true,preload:"auto","data-clip-start":o.clipStart,"data-clip-end":o.clipEnd,"data-start-at":d,style:{width:`${h}px`,height:`${y}px`,objectFit:o.fit||"cover",objectPosition:"center",display:"block",pointerEvents:"none"}})})})}function EE({block:e,layer:t,viewport:n,blockTime:r,contentRenderer:i}){let{content:a,position:o,animation:s}=t,{align:l,style:c}=a,d=Array.isArray(a.headers)?a.headers:[],u=Array.isArray(a.rows)?a.rows:[],f=xe(o.x,n.width),m=xe(o.y,n.height),h=o.width?xe(o.width,n.width):n.width,y=o.height?xe(o.height,n.height):n.height,g=on(o.anchor,h,y),w=f+g.x,x=m+g.y,v=ft(s,r),T=A=>{let D=l?.[A];return D?{textAlign:D}:void 0},S=c.borderRadius??8,k=c.fontSize*.6,E=c.fontSize*.75,I=b("table",{style:{width:"max-content",minWidth:"100%",borderCollapse:"separate",borderSpacing:0,fontSize:`${c.fontSize}px`,fontFamily:c.fontFamily??"system-ui, sans-serif",lineHeight:1.2},children:[d.length>0&&b("thead",{children:b("tr",{children:d.map((A,D)=>b("th",{style:{background:c.headerBackground,color:c.headerColor,fontFamily:c.headerFontFamily??c.fontFamily??"system-ui, sans-serif",fontWeight:600,padding:`${k}px ${E}px`,position:"sticky",top:0,zIndex:1,whiteSpace:"nowrap",borderBottom:`2px solid ${c.borderColor}`,borderRight:D<d.length-1?`1px solid ${c.borderColor}`:void 0,...T(D)},children:A},D))})}),u.length>0&&b("tbody",{children:u.map((A,D)=>b("tr",{children:A.map((B,q)=>b("td",{style:{background:c.cellBackground,color:c.cellColor,padding:`${k}px ${E}px`,whiteSpace:"nowrap",borderBottom:D<u.length-1?`1px solid ${c.borderColor}`:void 0,borderRight:q<A.length-1?`1px solid ${c.borderColor}`:void 0,...T(q)},children:B},q))},D))})]}),_=e?i:void 0;return b("g",{className:`block-layer block-layer--table ${v.className}`,style:v.style,"data-layer-id":t.id,children:b("foreignObject",{x:w,y:x,width:h,height:y,children:b("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-table-scroll",role:"region","aria-label":"Scrollable data table",tabIndex:0,onPointerDown:A=>A.stopPropagation(),onClick:A=>A.stopPropagation(),onWheel:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),style:{width:`${h}px`,height:`${y}px`,boxSizing:"border-box",overflow:_?"hidden":"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",border:_?void 0:`1px solid ${c.borderColor}`,borderRadius:`${S}px`,background:_?"transparent":c.cellBackground},children:_?b(_,{block:e,layer:t,width:h,height:y,fallback:I}):I})})})}function SE(e,t){let n=e&&e.trim()?e.trim():t,r=n.indexOf(":");return r>0?`fa-${n.slice(0,r).replace(/^fa-/,"")} fa-${n.slice(r+1)}`:`fa-solid fa-${n}`}function _E({layer:e,viewport:t,blockTime:n}){let{content:r,position:i,animation:a}=e,{items:o,style:s}=r,l=xe(i.x,t.width),c=xe(i.y,t.height),d=i.width?xe(i.width,t.width):t.width,u=i.height?xe(i.height,t.height):t.height,f=on(i.anchor,d,u),m=ft(a,n);return b("g",{className:`block-layer block-layer--tree ${m.className}`,style:m.style,"data-layer-id":e.id,children:b("foreignObject",{x:l+f.x,y:c+f.y,width:d,height:u,children:b("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-treelayer",style:{width:`${d}px`,height:`${u}px`,display:"flex",flexDirection:"column",justifyContent:"center",padding:"24px 32px",boxSizing:"border-box",fontFamily:s.fontFamily??"system-ui, sans-serif",fontSize:`${s.fontSize}px`,lineHeight:1.7,overflow:"hidden"},children:b(AE,{items:o,depth:0,style:s})})})})}function AE({items:e,depth:t,style:n}){return b("ul",{style:{listStyle:"none",margin:0,padding:0,paddingLeft:t===0?0:`${n.indentPx}px`,borderLeft:t===0?"none":`1px solid ${n.connectorColor}`},children:e.map(r=>b(N$,{item:r,style:n},r.id))})}function N$({item:e,style:t}){let n=e.children.length>0,[r,i]=ge(false),a=e.isDir||n,o=a?SE(t.folderIcon,r?"folder":"folder-open"):SE(t.fileIcon,"file");return b("li",{style:{position:"relative"},children:[b("div",{style:{display:"flex",alignItems:"baseline",gap:"8px",padding:"1px 0"},children:[n?b("button",{type:"button","aria-label":r?"Expand":"Collapse",onClick:()=>i(s=>!s),style:{flex:"0 0 auto",width:"1em",border:"none",background:"transparent",cursor:"pointer",color:t.connectorColor,padding:0,fontSize:"0.8em"},children:b("i",{className:`fa-solid ${r?"fa-chevron-right":"fa-chevron-down"}`,"aria-hidden":"true"})}):b("span",{style:{flex:"0 0 auto",width:"1em"}}),b("i",{className:o,"aria-hidden":"true",style:{flex:"0 0 auto",color:t.iconColor,width:"1.2em",textAlign:"center"}}),b("span",{style:{color:a?t.dirColor:t.rowColor,fontWeight:a?600:400},children:e.label}),e.comment?b("span",{style:{color:t.commentColor,fontSize:"0.85em",fontStyle:"italic"},children:e.comment}):null]}),n&&!r?b(AE,{items:e.children,depth:1,style:t}):null]})}var Tu=null,F$={startOnLoad:false,securityLevel:"strict",suppressErrorRendering:true,deterministicIds:false,logLevel:"error"};async function B$(){return Tu||(Tu=Promise.resolve().then(()=>(IE(),CE)).then(({default:e})=>e).catch(e=>{throw Tu=null,e})),Tu}function $$(e){let t=globalThis,r=(t.__squisqMermaidWorkQueue??Promise.resolve()).then(e,e);return t.__squisqMermaidWorkQueue=r.then(()=>{},()=>{}),r}function Eu(e,t,n,r=tt){return $$(async()=>{let i=await B$();i.initialize({...F$,theme:"base",themeVariables:Bd(r)});let{svg:a,diagramType:o}=await i.render(e,t,n);return {svg:a,diagramType:o}})}function ME(e){return (e instanceof Error?e.message:String(e)).split(/\r?\n/).map(n=>n.trimEnd()).filter(Boolean).slice(0,6).join(`
|
|
740
|
-
`)||"Unknown Mermaid rendering error."}var H$=0;function Su({source:e,className:t,ariaLabel:n="Mermaid diagram",theme:r=tt}){let[i,a]=ge(""),[o,s]=ge(""),[l,c]=ge(true);he(()=>{let u=true,f=`squisq-rich-mermaid-${++H$}`;return c(true),s(""),Eu(f,e,void 0,r).then(m=>{u&&a(m.svg);}).catch(m=>{u&&(a(""),s(ME(m)));}).finally(()=>{u&&c(false);}),()=>{u=false;}},[e,r]);let d=["squisq-mermaid-rendered",t].filter(Boolean).join(" ");return b("div",{className:d,role:"img","aria-label":n,style:{background:r.colors.backgroundLight,color:r.colors.text},children:[l&&b("div",{className:"squisq-mermaid-render-status",children:"Rendering diagram\u2026"}),!l&&o&&b("div",{className:"squisq-mermaid-render-error",role:"alert",children:[b("strong",{children:"Mermaid could not render this diagram."}),b("pre",{children:o})]}),!l&&!o&&i&&b("div",{className:"squisq-mermaid-render-svg",dangerouslySetInnerHTML:{__html:i}})]})}function qE({layer:e,viewport:t,blockTime:n,theme:r}){let{position:i,content:a,animation:o}=e,s=xe(i.width??t.width,t.width),l=xe(i.height??t.height,t.height),c=xe(i.x,t.width),d=xe(i.y,t.height),u=i.anchor??"top-left";u==="center"?(c-=s/2,d-=l/2):(u.endsWith("right")&&(c-=s),u.startsWith("bottom")&&(d-=l));let f=ft(o,n),m={boxSizing:"border-box",width:"100%",height:"100%",padding:a.padding??16,borderRadius:16,background:a.background,color:a.foreground,overflow:"hidden"};return b("g",{className:`block-layer block-layer--mermaid ${f.className}`,"data-layer-id":e.id,style:f.style,children:b("foreignObject",{x:c,y:d,width:s,height:l,children:b("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-mermaid-layer-frame",style:m,children:b(Su,{source:a.source,ariaLabel:"Mermaid diagram on slide",theme:r})})})})}function LE(e,t=2){if(t<=1||!e(1))return 1;if(e(t))return t;let n=1,r=t;for(let i=0;i<10;i+=1){let a=(n+r)/2;e(a)?n=a:r=a;}return Math.max(1,Math.floor(n*100)/100)}var z$={width:1920,height:1080},er=1;function _u(e,t){for(let n of e)if(n.dataset.squisqTextFit==="html"){let r=Number(n.dataset.squisqBaseFontSize);Number.isFinite(r)&&(n.style.fontSize=`${r*t}px`);}else n.style.transform=`scale(${t})`;}function Qr(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function U$(e){let t=e.querySelector('[data-squisq-text-content="true"]');if(!t||t.scrollWidth<=0||t.scrollHeight<=0)return false;let r=e.ownerDocument.defaultView?.getComputedStyle(e),i=r?Qr(r.paddingLeft)+Qr(r.paddingRight)+Qr(r.borderLeftWidth)+Qr(r.borderRightWidth):0,a=r?Qr(r.paddingTop)+Qr(r.paddingBottom)+Qr(r.borderTopWidth)+Qr(r.borderBottomWidth):0,o=Math.max(0,e.clientWidth-i),s=Math.max(0,e.clientHeight-a);if(t.scrollWidth>o+er||t.scrollHeight>s+er)return false;for(let l of t.querySelectorAll("[data-squisq-table-scroll]"))if(l.clientWidth>0&&l.scrollWidth>l.clientWidth+er||l.clientHeight>0&&l.scrollHeight>l.clientHeight+er)return false;return true}function j$(e,t){let n=e.querySelector('[data-squisq-text-content="true"]');if(!n||typeof n.getBBox!="function")return false;try{let r=n.getBBox(),i=Number(e.dataset.squisqFitWidth),a=Number(e.dataset.squisqFitHeight);return r.width>0&&r.height>0&&r.width*t<=i+er&&r.height*t<=a+er}catch{return false}}function PE(e){return e.map(t=>t.querySelector('[data-squisq-text-content="true"]')?.getBoundingClientRect()).filter(t=>!!t&&t.width>0&&t.height>0)}function RE(e){let t=new Set;for(let n=0;n<e.length;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r];i.left<a.right-er&&i.right>a.left+er&&i.top<a.bottom-er&&i.bottom>a.top+er&&t.add(`${n}:${r}`);}return t}function Jt({block:e,blockTime:t,basePath:n,isEntering:r=false,isExiting:i=false,transition:a,viewport:o=z$,isPlaying:s,muted:l=false,animationsEnabled:c=true,theme:d,tableContentRenderer:u,growTextToFit:f=false}){let m="",h={},y=c?a??e.transition:void 0;y&&r?(m=bs(y.type,true,y.direction),h["--transition-duration"]=`${Zi(y)}s`):y&&i&&(m=bs(y.type,false,y.direction),h["--transition-duration"]=`${Zi(y)}s`);let w=`vb-clip-${Wt().replace(/:/g,"")}-${e.id}`,x=ue(null),[v,T]=ge(1),S=f&&!kh(e.template);return bn(()=>{let k=x.current,E=false;if(!k)return;let I=()=>{if(E)return;let A=Array.from(k.querySelectorAll("[data-squisq-text-fit]"));if(!S||A.length===0){_u(A,1),T(1);return}_u(A,1);let D=RE(PE(A)),q=LE(F=>{if(_u(A,F),A.some(H=>H.dataset.squisqTextFit==="html"?!U$(H):!j$(H,F)))return false;let P=RE(PE(A));for(let H of P)if(!D.has(H))return false;return true});_u(A,q),T(F=>F===q?F:q);};I();let _=k.ownerDocument?.fonts;return _&&_.status!=="loaded"&&_.ready.then(I),()=>{E=true;}},[e.layers,S,o.height,o.width]),b("svg",{ref:x,className:`block-svg ${m}`,style:h,viewBox:`0 0 ${o.width} ${o.height}`,preserveAspectRatio:"xMidYMid meet",overflow:"hidden","data-block-id":e.id,"data-squisq-text-scale":S?v:void 0,children:[b("defs",{children:b("clipPath",{id:w,children:b("rect",{x:"0",y:"0",width:o.width,height:o.height})})}),b("g",{clipPath:`url(#${w})`,children:(e.layers??[]).map(k=>b(W$,{block:e,layer:k,basePath:n,viewport:o,blockTime:t,isPlaying:s,muted:l,animationsEnabled:c,theme:d,tableContentRenderer:u,textScale:v},k.id))})]})}function W$({block:e,layer:t,basePath:n,viewport:r,blockTime:i,isPlaying:a,muted:o,animationsEnabled:s,theme:l,tableContentRenderer:c,textScale:d}){let u=s||!t.animation?t:{...t,animation:void 0};switch(u.type){case "image":return b(mE,{layer:u,basePath:n,viewport:r,blockTime:i,animationsEnabled:s});case "text":return b(pE,{layer:u,viewport:r,blockTime:i,textScale:d});case "shape":return b(gE,{layer:u,viewport:r,blockTime:i});case "path":return b(wE,{layer:u,viewport:r,blockTime:i});case "map":return b(vE,{layer:u,basePath:n,viewport:r,blockTime:i});case "video":return b(TE,{layer:u,basePath:n,viewport:r,blockTime:i,isPlaying:a,muted:o});case "table":return b(EE,{block:e,layer:u,viewport:r,blockTime:i,contentRenderer:c});case "tree":return b(_E,{layer:u,viewport:r,blockTime:i});case "mermaid":return b(qE,{layer:u,viewport:r,blockTime:i,theme:l});default:return console.warn(`Unknown layer type: ${u.type}`),null}}function NE(e,t){switch(e){case "top":return {top:t?"12%":"8%"};case "center":return {top:"50%",transform:"translateY(-50%)"};default:return {bottom:t?"24%":"16%"}}}function V$(e){let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return "#ffffff";let n=parseInt(t[1],16),r=n>>16&255,i=n>>8&255,a=n&255;return .2126*r+.7152*i+.0722*a>150?"#111111":"#ffffff"}var G$=4,DE=2,Y$=6;function X$(e){if(e.words&&e.words.length>0)return e.words.map(i=>({text:i.text,startTime:i.startTime,endTime:i.endTime}));let t=e.text.split(/\s+/).filter(i=>i.length>0);if(t.length===0)return [];let r=(e.endTime-e.startTime)/t.length;return t.map((i,a)=>({text:i,startTime:e.startTime+a*r,endTime:e.startTime+(a+1)*r}))}function K$(e){let t=[];for(let i of e.phrases)t.push(...X$(i));if(t.length===0)return {words:[],chunks:[]};let n=G$;if(t.length>n){let i=Math.ceil(t.length/n);n=Math.ceil(t.length/i),n=Math.min(Y$,Math.max(DE,n));}else n=Math.max(DE,t.length);let r=[];for(let i=0;i<t.length;i+=n){let a=t.slice(i,i+n);r.push({words:a,startTime:a[0].startTime,endTime:a[a.length-1].endTime});}return {words:t,chunks:r}}function OE({captions:e,currentTime:t,enabled:n=true,theme:r,viewport:i,position:a="bottom"}){let{chunks:o}=de(()=>e?K$(e):{words:[],chunks:[]},[e]);if(!n||o.length===0)return b("div",{className:"social-caption-overlay",style:{position:"absolute",...NE(a,(i?.height??0)>(i?.width??1)),left:0,right:0,zIndex:50,pointerEvents:"none",opacity:0,transition:"opacity 0.15s ease-in-out"}});let s=null,l=-1;for(let g of o)if(t>=g.startTime&&t<g.endTime){s=g;break}if(!s){for(let g=0;g<o.length-1;g++)if(t>=o[g].endTime&&t<o[g+1].startTime){s=o[g],l=s.words.length-1;break}!s&&o.length>0&&t>=o[o.length-1].startTime&&(s=o[o.length-1],l=s.words.length-1);}if(!s)return null;if(l===-1){for(let g=0;g<s.words.length;g++){let w=s.words[g];if(t>=w.startTime&&t<w.endTime){l=g;break}}if(l===-1){for(let g=s.words.length-1;g>=0;g--)if(t>=s.words[g].startTime){l=g;break}}l===-1&&(l=0);}let c=r?.colors?.primary??"#5b9bd5",d=r?.typography?.titleFont?wt(r.typography.titleFont,'"PT Serif", Georgia, serif'):'"PT Serif", Georgia, serif',u=i?.width??1280,f=i?.height??720,m=f>u,h=Math.min(f*.055,u*.082),y=Math.max(22,Math.min(96,Math.round(h)));return b("div",{className:"social-caption-overlay",style:{position:"absolute",...NE(a,m),left:0,right:0,zIndex:50,pointerEvents:"none",display:"flex",justifyContent:"center",padding:m?"0 7%":"0 10%",boxSizing:"border-box",opacity:1,transition:"opacity 0.15s ease-in-out"},children:b("div",{className:"social-caption-overlay__chunk",style:{display:"inline-flex",flexWrap:"wrap",justifyContent:"center",alignItems:"baseline",maxWidth:"100%",rowGap:"0.12em",columnGap:"0.28em",padding:"0.22em 0.55em",borderRadius:"0.4em",background:"rgba(10, 10, 12, 0.42)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",fontFamily:d,fontSize:`${y}px`,lineHeight:1.18,textTransform:"uppercase",letterSpacing:"0.01em",whiteSpace:"normal"},children:s.words.map((g,w)=>{let x=w===l;return b("span",{className:x?"social-caption-overlay__word is-active":"social-caption-overlay__word",style:{display:"inline-block",whiteSpace:"nowrap",padding:"0 0.16em",borderRadius:"0.18em",fontWeight:800,color:x?V$(c):"rgba(255, 255, 255, 0.95)",background:x?c:"transparent",textShadow:x?"none":"0 2px 6px rgba(0,0,0,0.75), 0 0 18px rgba(0,0,0,0.45)",transform:x?"scale(1.05)":"none",transition:"color 0.1s ease, background-color 0.1s ease, transform 0.1s ease"},children:g.text},`${g.startTime}-${w}`)})})})}function Q$(e){switch(e){case "bottom":return {bottom:"6px",left:"50%",transform:"translateX(-50%)"};case "center":return {top:"50%",left:"50%",transform:"translate(-50%, -50%)"};default:return {top:"6px",left:"50%",transform:"translateX(-50%)"}}}function FE({captions:e,currentTime:t,enabled:n=true,fontSize:r=16,captionStyle:i="standard",captionPosition:a,theme:o,viewport:s}){if(i==="social")return b(OE,{captions:e,currentTime:t,enabled:n,theme:o,viewport:s,position:a??"bottom"});let c=(n&&e?io(e,t):null)?.text??null;return b("div",{className:"caption-overlay",style:{position:"absolute",...Q$(a??"top"),zIndex:50,pointerEvents:"none",maxWidth:"100%",width:"100%",textAlign:"center",opacity:c?1:0,transition:"opacity 0.15s ease-in-out",padding:"0 4px",boxSizing:"border-box"},children:c&&b("div",{style:{display:"inline-block",padding:"3px 10px",background:"rgba(0, 0, 0, 0.65)",borderRadius:"4px",backdropFilter:"blur(4px)"},children:b("span",{style:{color:"#ffffff",fontSize:`${r}px`,fontFamily:"'Hanken Grotesk', system-ui, sans-serif",fontWeight:500,lineHeight:1.25,textShadow:"0 1px 3px rgba(0,0,0,0.5)",whiteSpace:"pre-wrap",wordWrap:"break-word"},children:c})})})}var Z$="(prefers-color-scheme: dark)";function Au(e){let t=de(()=>e&&typeof window<"u"?window.matchMedia(Z$):null,[e]),n=ke(i=>t?(t.addEventListener("change",i),()=>t.removeEventListener("change",i)):()=>{},[t]),r=ke(()=>t?.matches?Rd:gl,[t]);return yy(n,r)}function Jh(e){if(!e?.length)return {segmentStarts:[],totalDuration:0};let t=0;return {segmentStarts:e.map(r=>{let i=t;return t+=r.duration,i}),totalDuration:t}}function BE(e,t,n){if(!t?.length)return {segmentIndex:0,segmentStart:0};let r=0,i=0;for(let a=0;a<t.length;a++){let o=n[a]+t[a].duration;if(e<o){r=a,i=n[a];break}a===t.length-1&&(r=a,i=n[a]);}return {segmentIndex:r,segmentStart:i}}var eH=15e3,$E="Audio could not be loaded. Check that the media file is available.";function tH(e,t){return !e||/^(?:[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(e)||!t?e:`${t.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}function HE(e,t,n="",r=true,i="media",a=0){let o=de(()=>i!=="synthetic"||t?.segments?.length||a<=0?t:{...t,segments:[{src:"",name:"synthetic",duration:a,startTime:0}]},[t,i,a]),s=pr(),[l,c]=ge(0),[d,u]=ge(false),[f,m]=ge(0),[h,y]=ge(false),[g,w]=ge(false),[x,v]=ge(0),[T,S]=ge(true),[k,E]=ge(),I=ue([]),_=ue(null),A=ue(null),D=ue(false),B=ue(new Map),q=ue(new Map),F=ue(new Set),P=ue(0),H=ue(void 0);H.current=o?.segments[f]?.src;let $=ue(null),R=ue(0);R.current=f;let z=ue(false);he(()=>{if(P.current+=1,_.current=null,A.current?.(),A.current=null,D.current=false,z.current=false,$.current=null,c(0),m(0),u(false),y(false),w(false),S(true),E(void 0),!r||!o?.segments){I.current=[],v(0);return}let Y=Jh(o.segments);I.current=Y.segmentStarts,v(Y.totalDuration),i==="synthetic"&&w(true);},[o,r,i]);let C=ke(async Y=>{let se=tH(Y,n);if(!rn(se,s))return "";if(B.current.has(Y)){let X=B.current.get(Y);return B.current.delete(Y),B.current.set(Y,X),X}if(q.current.has(Y))return q.current.get(Y);let ye=new AbortController;F.current.add(ye);let pe=P.current,ce=(async()=>{try{let X=await fp(se,{policy:s,signal:ye.signal,contentTypePrefixes:["audio/","video/","application/octet-stream"]}),oe=new Blob([X.bytes.slice().buffer],{type:X.contentType||"application/octet-stream"}),ve=URL.createObjectURL(oe);if(ye.signal.aborted||pe!==P.current)return URL.revokeObjectURL(ve),se;for(B.current.set(Y,ve);B.current.size>2;){let Le=[...B.current.entries()].find(([Ne])=>Ne!==H.current)??B.current.entries().next().value;if(!Le)break;B.current.delete(Le[0]),URL.revokeObjectURL(Le[1]);}return ve}catch{return ""}})();return q.current.set(Y,ce),ce.then(()=>{F.current.delete(ye),q.current.get(Y)===ce&&q.current.delete(Y);}),ce},[n,s]);he(()=>{if(!r||!o?.segments)return;let Y=B.current,se=F.current,ye=q.current;return ()=>{P.current+=1,se.forEach(pe=>pe.abort()),se.clear(),ye.clear(),Y.forEach(pe=>{URL.revokeObjectURL(pe);}),Y.clear();}},[o,C,r]),he(()=>{if(!r||i==="synthetic")return;let Y=o?.segments[f];Y&&C(Y.src);},[o,f,r,i,C]),he(()=>{if(!r||i==="synthetic")return;let Y=e.current;if(!Y)return;let se=()=>{if(z.current)return;let ve=(I.current[f]||0)+Y.currentTime;c(ve);},ye=()=>{u(true);},pe=()=>u(false),ce=()=>{w(true),u(false),S(false),E($E),D.current=false,_.current!==null&&(c(_.current),_.current=null),A.current?.(),A.current=null;},X=()=>{o&&f<o.segments.length-1?(D.current=true,m(oe=>oe+1)):(y(true),u(false));};return Y.addEventListener("timeupdate",se),Y.addEventListener("play",ye),Y.addEventListener("pause",pe),Y.addEventListener("ended",X),Y.addEventListener("error",ce),()=>{Y.removeEventListener("timeupdate",se),Y.removeEventListener("play",ye),Y.removeEventListener("pause",pe),Y.removeEventListener("ended",X),Y.removeEventListener("error",ce);}},[e,f,o,r,i]),he(()=>{if(!r||i==="synthetic")return;let Y=e.current;if(!Y||!o?.segments)return;let se=o.segments[f];if(!se)return;let ye=()=>{if(_.current!==null){let Le=I.current[f]||0,Ne=_.current-Le;Y.currentTime=Math.max(0,Ne),c(_.current),_.current=null,A.current?.(),A.current=null;}D.current&&(Y.play().catch(Le=>{u(false),Le instanceof Error&&Le.name==="NotAllowedError"||(S(false),E("Audio playback failed. Check that the media file is supported and available."));}),D.current=false);},pe=Y.src,ce=$.current,X=!!pe&&ce?.key===se.src&&ce.url===pe,oe=false,ve=null;return X?ye():(async()=>{let Ne=await C(se.src);if(!oe){if(!Ne){Y.removeAttribute("src"),Y.load(),$.current=null,D.current=false,w(true),u(false),S(false),E($E),_.current!==null&&(c(_.current),_.current=null),A.current?.(),A.current=null;return}ve=()=>{oe||(w(true),ye(),ve&&Y.removeEventListener("canplay",ve));},Y.addEventListener("canplay",ve),Y.src=Ne,$.current={key:se.src,url:Y.src},Y.load(),await Promise.resolve(),Y.readyState>=3&&(ve&&Y.removeEventListener("canplay",ve),w(true),ye());}})(),()=>{oe=true,ve&&Y.removeEventListener("canplay",ve);}},[e,f,o,C,r,i]);let U=ke(async Y=>{let se=e.current;if(!o?.segments)return;let ye=x>0?Math.max(0,Math.min(Y,x)):Math.max(0,Y),pe=I.current.length===o.segments.length?I.current:Jh(o.segments).segmentStarts,{segmentIndex:ce,segmentStart:X}=BE(ye,o.segments,pe),oe=i==="synthetic"?d:!se?.paused;if(y(false),!se&&i==="media"){m(ce),c(ye);return}if(ce!==R.current){_.current=ye,D.current=oe;let ve=new Promise(Le=>{A.current?.();let Ne=false,et=()=>{Ne||(Ne=true,clearTimeout(pt),A.current===et&&(A.current=null),Le());},pt=setTimeout(et,eH);A.current=et;});m(ce),i==="synthetic"&&(c(ye),_.current=null,A.current?.(),A.current=null),await ve;}else {let ve=ye-X;se&&i==="media"&&(se.currentTime=Math.max(0,ve)),c(ye);}},[e,o,d,i,x]),V=ke(async()=>{if(i==="synthetic"){z.current=true,u(true);return}let Y=e.current;if(Y){h&&await U(0);try{await Y.play(),z.current=!1,S(!0),E(void 0);}catch(se){z.current=false,u(false),(se instanceof Error?se.name:"")!=="NotAllowedError"&&(S(false),E("Audio playback failed. Check that the media file is supported and available."));}}},[e,h,i,U]),M=ke(()=>{let Y=e.current;Y&&Y.pause(),u(false);},[e]),J=ke(()=>{!e.current&&i==="media"||(d?M():V());},[e,d,i,V,M]),we=ke(Y=>{!o?.segments||Y<0||Y>=o.segments.length||(m(Y),y(false));},[o]),me=ke(async()=>{await U(0),await V();},[U,V]);return he(()=>{if(!d||!z.current||!x)return;let Y=performance.now(),se,ye=pe=>{if(!z.current)return;let ce=(pe-Y)/1e3;Y=pe,c(X=>{let oe=X+ce;return oe>=x?(z.current=false,y(true),u(false),x):oe}),se=requestAnimationFrame(ye);};return se=requestAnimationFrame(ye),()=>cancelAnimationFrame(se)},[d,x]),{currentTime:l,isPlaying:d,currentSegment:f,totalDuration:x,isEnded:h,isReady:g,isAvailable:T,unavailableMessage:k,play:V,pause:async()=>M(),toggle:async()=>J(),seekTo:U,skipToSegment:async Y=>we(Y),restart:me}}var nH={},zE=new Map,rH=0;function iH(e,t,n){let r,i;if(e==="image"){let d=new Image;r=d,i=()=>[d.naturalWidth,d.naturalHeight];}else {let d=document.createElement("video");d.preload="metadata",d.muted=true,r=d,i=()=>[d.videoWidth,d.videoHeight];}let a=e==="image"?"load":"loadedmetadata",o=false,s=()=>{o||(o=true,clearTimeout(c),r.removeEventListener(a,l),r.removeEventListener("error",s),r.removeAttribute("src"),r instanceof HTMLVideoElement&&r.load());},l=()=>{let[d,u]=i();d>0&&u>0&&n(d/u),s();},c=setTimeout(s,8e3);return r.addEventListener(a,l),r.addEventListener("error",s),r.src=t,s}function UE(e,t,n){let r=_i(),i=pr(),a=de(()=>{let c=new Map;for(let d of br(e??[]))if(d.summaryLayout==="feature"){for(let u of Vr(d.contents))c.set(u.src,{kind:"image",source:u.src});for(let u of Gr(d.contents))c.set(u.src,{kind:"video",source:u.src});for(let u of d.contents??[])u.type==="code"&&u.lang?.trim().toLowerCase()==="mermaid"&&c.set(u.value,{kind:"mermaid",source:u.value});}return JSON.stringify([...c.values()])},[e]),o=de(()=>({sourceKey:a,provider:r,policy:i,basePath:t,theme:n}),[a,r,i,t,n]),[s,l]=ge();return he(()=>{if(typeof document>"u")return;let c=true,d=[],u={},f=(h,y)=>{!c||!Number.isFinite(y)||y<=0||(u[h]=y,l({scope:o,ratios:{...u}}));},m=JSON.parse(a);for(let{kind:h,source:y}of m){if(h==="mermaid"){Eu(`squisq-feature-measure-${++rH}`,y,void 0,n).then(({svg:w})=>{if(!c)return;let x=new DOMParser().parseFromString(w,"image/svg+xml").documentElement.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);x?.length===4&&x[2]>0&&x[3]>0&&f(y,x[2]/x[3]);}).catch(()=>{});continue}(async()=>{let w=/^(?:[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(y),v=w?y:`${t.replace(/\/$/,"")}/${y}`;if(!w&&r)try{v=await r.resolveUrl(y);}catch{}if(!c||!rn(v,i))return;let T=`${h}:${v}`,S=zE.get(T);if(S!==void 0){f(y,S);return}d.push(iH(h,v,k=>{c&&(zE.set(T,k),f(y,k));}));})();}return ()=>{c=false,d.forEach(h=>h());}},[a,r,i,t,n,o]),s?.scope===o?s.ratios:nH}function jE(e,t,n={}){let{viewport:r=Ze.landscape,theme:i,onSeek:a,useAudioSegmentTiming:o=true,deterministicTransitions:s=false,motion:l,basePath:c="."}=n,d=UE(e?.blocks,c,i??tt),u=de(()=>{if(!e?.blocks)return [];let P=e.blocks.some(z=>z.children&&z.children.length>0)?br(e.blocks):e.blocks,H=P.some(tn),$=i??tt,R=is({persistentLayers:e.persistentLayers},$);if(H){let z=o?e.audio?.segments?.map(U=>({startTime:U.startTime,duration:U.duration})):void 0;return vh(P,{audioSegments:z,viewport:r,mediaAspectRatios:d,persistentLayers:R,theme:i,motion:Ji({motion:e.motion,frontmatter:e.frontmatter},$,l),customTemplates:e.customTemplates})}return P.map((z,C)=>{let U=Ka(z,$,C);return U!==z.transition?{...z,transition:U}:z})},[e?.blocks,e?.audio?.segments,e?.persistentLayers,e?.customTemplates,e?.motion,e?.frontmatter,l,d,r,i,o]),f=de(()=>Od(u,t),[u,t]),m=de(()=>f?u.indexOf(f):-1,[u,f]),h=de(()=>f?Math.max(0,t-f.startTime):0,[f,t]),y=de(()=>!f||f.duration===0?0:Math.min(1,h/f.duration),[f,h]),g=de(()=>!e||e.duration===0?0:Math.min(1,t/e.duration),[e,t]),w=ue(null),x=ue(null),v=ue(null),T=ue(null),S=ke(F=>{if(x.current===F){w.current=null,T.current=null;return}T.current=F;},[]);if(f&&f.id!==x.current){let F=T.current===f.id;w.current=F?null:v.current,T.current=null,x.current=f.id;}v.current=f;let k=f?.transition?Zi(f.transition):0,E=!!f&&k>0&&h<k,I=s?m>0?u[m-1]??null:null:w.current,_=E&&I!=null&&I.id!==f?.id,A=_?I:null,D=ke(F=>{if(!e||F<0||F>=u.length)return;let P=u[F];P&&a?.(P.startTime);},[e,u,a]),B=ke(()=>{if(m<u.length-1)return D(m+1)},[m,u.length,D]),q=ke(()=>{if(m>0)return D(m-1)},[m,D]);return {currentBlock:f,currentBlockIndex:m,previousBlock:A,isEntering:E,isExiting:_,blockTime:h,blockProgress:y,docProgress:g,nextBlock:B,prevBlock:q,goToBlock:D,suppressOutgoingForNextBlock:S,blocks:u}}function aH(e,t){let n=e/t;return n>1.2?"landscape":n<.83?"portrait":"square"}function oH(e){switch(e){case "portrait":return Ze.portrait;case "square":return Ze.square;default:return Ze.landscape}}function WE(){let[e,t]=ge(()=>({width:typeof window<"u"?window.innerWidth:1920,height:typeof window<"u"?window.innerHeight:1080}));he(()=>{if(typeof window>"u")return;let i=()=>{t({width:window.innerWidth,height:window.innerHeight});},a,o=()=>{clearTimeout(a),a=setTimeout(i,100);};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),clearTimeout(a);}},[]);let n=de(()=>aH(e.width,e.height),[e.width,e.height]);return {viewport:de(()=>oH(n),[n]),orientation:n,windowSize:e}}var sH=.3,lH=.5,cH=12,uH=.35,dH=260;function mH({dx:e,width:t,elapsedMs:n,canNext:r,canPrev:i}){let a=t>0?t*sH:1/0,o=n>0?Math.abs(e)/n:0,s=Math.abs(e)>=a,l=o>=lH&&Math.abs(e)>=cH;return !s&&!l?"snap":e<0?r?"next":"snap":e>0&&i?"prev":"snap"}function VE(e){let t=e.settleMs??dH,[n,r]=ge(0),[i,a]=ge("idle"),o=ue(e);o.current=e;let s=ue(null),l=ue("idle");l.current=i;let c=ue(null),d=ue(null),u=ke(()=>{c.current!=null&&(clearTimeout(c.current),c.current=null),d.current!=null&&(cancelAnimationFrame(d.current),d.current=null);},[]),f=ke(m=>{if(!o.current.enabled||l.current==="settling"||m.pointerType==="mouse"&&m.button!==0)return;let y=m.target;if(!y.closest?.("button, a, input, textarea, select, [data-no-swipe]")){s.current={pointerId:m.pointerId,startX:m.clientX,startTime:performance.now(),target:y};try{y.setPointerCapture?.(m.pointerId);}catch{}a("dragging"),r(0);}},[]);return he(()=>{function m(){return o.current.containerRef.current?.getBoundingClientRect().width??0}function h(v){s.current=null;try{v.target.releasePointerCapture?.(v.pointerId);}catch{}}function y(v,T){a("settling"),d.current=requestAnimationFrame(()=>{d.current=null,r(v),c.current=setTimeout(()=>{c.current=null,T?.(),r(0),a("idle");},t);});}function g(v){let T=s.current;if(!T||v.pointerId!==T.pointerId)return;let S=o.current,k=v.clientX-T.startX,E=k>0&&!S.canGoPrev||k<0&&!S.canGoNext;r(E?k*uH:k);}function w(v){let T=s.current;if(!T||v.pointerId!==T.pointerId)return;h(T);let S=o.current,k=v.clientX-T.startX,E=m(),I=performance.now()-T.startTime,_=mH({dx:k,width:E,elapsedMs:I,canNext:S.canGoNext,canPrev:S.canGoPrev});if(_==="snap"){y(0);return}let A=Math.max(E,Math.abs(k)),D=_==="next"?-A:A;y(D,_==="next"?S.onNext:S.onPrev);}function x(v){let T=s.current;!T||v.pointerId!==T.pointerId||(h(T),y(0));}return window.addEventListener("pointermove",g),window.addEventListener("pointerup",w),window.addEventListener("pointercancel",x),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",x);}},[t]),he(()=>{e.enabled||(s.current=null,u(),a("idle"),r(0));},[e.enabled,u]),he(()=>u,[u]),{offsetPx:n,phase:i,onPointerDown:f}}function ji(e){let t=Math.floor(e/60),n=Math.floor(e%60);return `${t}:${n.toString().padStart(2,"0")}`}function Cu({state:e,actions:t,blockMarkers:n,expandedBlocks:r,getBlockTitle:i}){let a=ue(null),[o,s]=ge(null),l=e.totalDuration>0?Math.max(0,Math.min(1,e.currentTime/e.totalDuration)):0,c=ke(h=>{let y=a.current;if(!y)return;let g=y.getBoundingClientRect(),w=h.clientX-g.left,x=Math.max(0,Math.min(1,w/g.width));s(x);},[]),d=ke(()=>{s(null);},[]),u=ke(h=>{let y=null;switch(h.key){case "ArrowLeft":case "ArrowDown":y=e.currentTime-5;break;case "ArrowRight":case "ArrowUp":y=e.currentTime+5;break;case "Home":y=0;break;case "End":y=e.totalDuration;break}y!=null&&(h.preventDefault(),t.seekTo(Math.max(0,Math.min(e.totalDuration,y))));},[t,e.currentTime,e.totalDuration]),f=ke(h=>{for(let y=r.length-1;y>=0;y--){let g=r[y];if(h>=g.startTime)return {block:g,index:y}}return r.length>0?{block:r[0],index:0}:null},[r]),m=-1;for(let h of n)h.isSectionStart&&h.block.startTime<=e.currentTime&&(m=h.index);return b("div",{ref:a,role:"group","aria-label":"Playback timeline",style:{flex:1,height:"24px",cursor:"pointer",position:"relative",display:"flex",alignItems:"center"},onClick:h=>{let y=h.currentTarget.getBoundingClientRect(),w=(h.clientX-y.left)/y.width;t.seekTo(w*e.totalDuration);},onMouseMove:c,onMouseLeave:d,children:[b("div",{role:"slider",tabIndex:0,"aria-label":"Playback position","aria-valuemin":0,"aria-valuemax":e.totalDuration,"aria-valuenow":Math.max(0,Math.min(e.totalDuration,e.currentTime)),"aria-valuetext":`${ji(e.currentTime)} of ${ji(e.totalDuration)}`,onKeyDown:u,style:{position:"absolute",left:0,right:0,height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px"}}),b("div",{"data-testid":"doc-progress-fill",style:{position:"absolute",left:0,width:`${l*100}%`,height:"6px",background:"#5b9bd5",borderRadius:"3px"}}),n.map((h,y)=>{let g=h.isSectionStart,w=g?h.index===m:h.index===e.currentBlockIndex;return b("button",{type:"button","data-marker":g?"chapter":"slide",tabIndex:g?0:-1,style:{position:"absolute",left:`${h.position}%`,transform:"translateX(-50%)",boxSizing:"border-box",borderRadius:"50%",cursor:"pointer",transition:"transform 0.15s, background-color 0.15s",...g?{width:"14px",height:"14px",padding:0,backgroundColor:w?"#ffffff":"rgba(255,255,255,0.75)",border:"2px solid #5b9bd5",boxShadow:"0 1px 3px rgba(0,0,0,0.5)",zIndex:3}:{width:"12px",height:"12px",padding:"3px",backgroundClip:"content-box",backgroundColor:w?"#ffffff":"rgba(255,255,255,0.55)",border:"none",zIndex:2}},title:h.title,"aria-label":`Seek to ${h.title}`,onClick:x=>{x.stopPropagation(),t.seekTo(h.block.startTime);},onMouseEnter:x=>{x.currentTarget.style.transform="translateX(-50%) scale(1.3)";},onMouseLeave:x=>{x.currentTarget.style.transform="translateX(-50%)";}},`${h.block.id}-${y}`)}),o!==null&&b("div",{style:{position:"absolute",left:`${o*100}%`,bottom:"100%",transform:"translateX(-50%)",marginBottom:"8px",padding:"6px 10px",background:"rgba(0,0,0,0.9)",borderRadius:"4px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:10},children:[b("div",{style:{color:"white",fontSize:"12px",fontFamily:"monospace"},children:ji(o*e.totalDuration)}),(()=>{let h=o*e.totalDuration,y=f(h);return y&&i?b("div",{style:{color:"rgba(255,255,255,0.7)",fontSize:"11px",marginTop:"2px"},children:i(y.block)}):null})()]}),o!==null&&b("div",{style:{position:"absolute",left:`${o*100}%`,top:"50%",transform:"translate(-50%, -50%)",width:"2px",height:"16px",background:"rgba(255,255,255,0.6)",pointerEvents:"none",zIndex:1}})]})}function GE({state:e,actions:t,blockMarkers:n,expandedBlocks:r,getBlockTitle:i}){return b("div",{className:"doc-player__controls",style:{position:"absolute",bottom:0,left:0,right:0,padding:"12px 16px",background:"linear-gradient(transparent, rgba(0,0,0,0.8))",display:"flex",alignItems:"center",gap:"8px",zIndex:100},children:[b("button",{onClick:t.restart,style:{background:"none",border:"none",color:"rgba(255,255,255,0.7)",cursor:"pointer",padding:"8px",fontSize:"14px",display:"flex",alignItems:"center"},title:"Restart","aria-label":"Restart from beginning",children:b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"})})}),b("button",{onClick:t.toggle,style:{background:"rgba(255,255,255,0.2)",border:"none",borderRadius:"50%",color:"white",cursor:"pointer",padding:"10px",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px"},"aria-label":e.isPlaying?"Pause":"Play",children:e.isPlaying?b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"20",height:"20",children:b("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"})}):b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"20",height:"20",children:b("path",{d:"M8 5v14l11-7z"})})}),b("span",{style:{color:"white",fontSize:"12px",minWidth:"80px",fontFamily:"monospace"},children:[ji(e.currentTime)," / ",ji(e.totalDuration)]}),b(Cu,{state:e,actions:t,blockMarkers:n,expandedBlocks:r,getBlockTitle:i}),b("span",{style:{color:"rgba(255,255,255,0.5)",fontSize:"11px",whiteSpace:"nowrap"},children:[e.currentBlockIndex+1,"/",e.totalBlocks]}),e.hasCaptions&&b("button",{onClick:()=>t.cycleCaptionMode(),style:{background:e.captionMode!=="off"?"rgba(255,255,255,0.2)":"none",border:"none",color:e.captionMode!=="off"?"white":"rgba(255,255,255,0.5)",cursor:"pointer",padding:"8px",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px",borderRadius:"4px"},title:e.captionMode==="off"?"Captions: Off (click for Standard)":e.captionMode==="standard"?"Captions: Standard (click for Social)":"Captions: Social (click to turn off)","aria-label":"Cycle caption style",children:[b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M19 4H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1a1 1 0 01-1 1H7a1 1 0 01-1-1v-4a1 1 0 011-1h3a1 1 0 011 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1a1 1 0 01-1 1h-3a1 1 0 01-1-1v-4a1 1 0 011-1h3a1 1 0 011 1v1z"})}),e.captionMode!=="off"&&b("span",{style:{fontSize:"10px",textTransform:"uppercase",letterSpacing:"0.5px"},children:e.captionMode==="standard"?"CC":"SM"})]}),t.toggleFullscreen&&b("button",{onClick:t.toggleFullscreen,style:{background:e.isFullscreen?"rgba(255,255,255,0.2)":"none",border:"none",color:e.isFullscreen?"white":"rgba(255,255,255,0.5)",cursor:"pointer",padding:"8px",display:"flex",alignItems:"center",borderRadius:"4px"},title:e.isFullscreen?"Exit fullscreen (F)":"Fullscreen (F)","aria-label":e.isFullscreen?"Exit fullscreen":"Enter fullscreen",children:e.isFullscreen?b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"})}):b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})}function YE({state:e,slideNav:t,slides:n=[],pickerOpen:r,onPickerOpenChange:i}){let[a,o]=ge(false),s=r??a,l=ke(I=>{r===void 0&&o(I),i?.(I);},[r,i]),[c,d]=ge(280),u=ue(null),f=ue(null),m=ue(null),h=Wt(),{currentBlockIndex:y,currentSlideLabel:g,currentSlideNumber:w,totalBlocks:x,totalSlideNumber:v}=e,T=y<=0,S=y>=x-1,k=x>0?g??`${w??y+1} / ${v??x}`:"\u2014";he(()=>{if(!s)return;let I=A=>{u.current?.contains(A.target)||l(false);},_=A=>{A.key==="Escape"&&(A.preventDefault(),l(false),f.current?.focus());};return document.addEventListener("pointerdown",I),document.addEventListener("keydown",_),()=>{document.removeEventListener("pointerdown",I),document.removeEventListener("keydown",_);}},[s,l]),bn(()=>{if(!s)return;let I=u.current,_=I?.closest(".doc-player")??I?.parentElement;if(!I||!_)return;let A=()=>{let B=I.getBoundingClientRect(),q=_.getBoundingClientRect(),F=Math.floor(B.top-q.top-8-16);d(Math.max(72,F));};A();let D=typeof ResizeObserver>"u"?null:new ResizeObserver(A);return D?.observe(_),D?.observe(I),window.addEventListener("resize",A),()=>{D?.disconnect(),window.removeEventListener("resize",A);}},[s]),he(()=>{s&&m.current?.querySelector('[aria-current="true"]')?.focus();},[s]);let E=I=>{if(!["ArrowDown","ArrowUp","Home","End"].includes(I.key))return;let _=Array.from(m.current?.querySelectorAll('[role="menuitem"]')??[]);if(_.length===0)return;I.preventDefault();let A=_.indexOf(document.activeElement),D=A;I.key==="Home"?D=0:I.key==="End"?D=_.length-1:I.key==="ArrowDown"?D=(A+1)%_.length:D=(A-1+_.length)%_.length,_[D]?.focus();};return b("div",{ref:u,className:"doc-controls-slideshow","data-testid":"slideshow-controls",style:{position:"absolute",bottom:"16px",right:"16px",display:"flex",alignItems:"center",gap:"2px",background:"rgba(0, 0, 0, 0.65)",borderRadius:"8px",padding:"4px 6px",zIndex:100,userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[b("button",{onClick:I=>{I.stopPropagation(),t.prevSlide();},disabled:T,"data-testid":"slide-prev","aria-label":"Previous slide",title:"Previous slide",style:{background:"none",border:"none",color:T?"rgba(255,255,255,0.3)":"rgba(255,255,255,0.9)",cursor:T?"default":"pointer",padding:"6px 8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"background 0.15s"},onMouseEnter:I=>{T||(I.currentTarget.style.background="rgba(255,255,255,0.1)");},onMouseLeave:I=>{I.currentTarget.style.background="none";},children:b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),b("button",{ref:f,type:"button","data-testid":"slide-counter","aria-label":`Choose slide, current ${k}`,"aria-haspopup":"menu","aria-expanded":s,"aria-controls":s?h:void 0,title:"Choose slide",disabled:n.length===0,onClick:I=>{I.stopPropagation(),l(!s);},style:{background:s?"rgba(255,255,255,0.12)":"none",border:"none",color:"rgba(255,255,255,0.9)",cursor:n.length>0?"pointer":"default",fontSize:"13px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontVariantNumeric:"tabular-nums",minWidth:"48px",textAlign:"center",padding:"6px 4px",letterSpacing:"0.02em",borderRadius:"4px",transition:"background 0.15s"},children:k}),s&&b("div",{ref:m,id:h,role:"menu","aria-label":"Choose a slide","data-testid":"slide-picker",onClick:I=>I.stopPropagation(),onKeyDown:E,style:{position:"absolute",right:0,bottom:"calc(100% + 8px)",width:"min(280px, calc(100vw - 32px))",maxHeight:`${c}px`,overflowY:"auto",padding:"6px",background:"rgba(20, 20, 20, 0.94)",border:"1px solid rgba(255,255,255,0.14)",borderRadius:"8px",boxShadow:"0 10px 30px rgba(0,0,0,0.38)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},children:n.map((I,_)=>{let A=_===y;return b("button",{type:"button",role:"menuitem","aria-current":A?"true":void 0,"data-testid":`slide-picker-item-${_}`,onClick:()=>{t.goToSlide(_),l(false);},style:{display:"grid",gridTemplateColumns:"42px minmax(0, 1fr)",alignItems:"center",gap:"8px",width:"100%",padding:"8px 10px",background:A?"rgba(255,255,255,0.14)":"transparent",border:"none",borderRadius:"5px",color:"rgba(255,255,255,0.94)",cursor:"pointer",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',textAlign:"left"},onMouseEnter:D=>{D.currentTarget.style.background="rgba(255,255,255,0.1)";},onMouseLeave:D=>{D.currentTarget.style.background=A?"rgba(255,255,255,0.14)":"transparent";},children:[b("span",{style:{color:A?"#fff":"rgba(255,255,255,0.58)",fontSize:"12px",fontVariantNumeric:"tabular-nums",textAlign:"right"},children:I.label}),b("span",{style:{minWidth:0,overflow:"hidden",color:A?"#fff":"rgba(255,255,255,0.82)",fontSize:"13px",lineHeight:1.3,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:I.summary})]},`${I.id}-${_}`)})}),b("button",{onClick:I=>{I.stopPropagation(),t.nextSlide();},disabled:S,"data-testid":"slide-next","aria-label":"Next slide",title:"Next slide",style:{background:"none",border:"none",color:S?"rgba(255,255,255,0.3)":"rgba(255,255,255,0.9)",cursor:S?"default":"pointer",padding:"6px 8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"background 0.15s"},onMouseEnter:I=>{S||(I.currentTarget.style.background="rgba(255,255,255,0.1)");},onMouseLeave:I=>{I.currentTarget.style.background="none";},children:b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})})})]})}function eg(e){return e?Object.keys(e).map(t=>t.trim().toLowerCase()):[]}var fH={theme:tt,pageStyle:Ui(tt),basePath:"/",viewport:Ze.landscape,renderContext:{theme:tt},animationsEnabled:true,imageDisplayMode:"inline",showCodeCopyButton:false},tg=ar(fH);function Tn(){return _r(tg)}function XE({section:e}){let{renderContext:t,basePath:n,animationsEnabled:r,theme:i}=Tn(),a=e.slots.media,o=a?.type==="canvas"?a:void 0,s=de(()=>{if(!o)return null;let{layers:u}=us(o.block,{...t,blockIndex:e.index});return {...o.block,layers:u}},[o,t,e.index]);if(!o||!s)return null;let l=o.aspect,d=e.hints?.frame==="terminal"?" squisq-page-canvas--terminal squisq-page-canvas--framed":" squisq-page-canvas--framed";return b("div",{className:`squisq-page-canvas${d}`,style:{aspectRatio:`${l.width} / ${l.height}`,maxHeight:"min(70vh, 720px)",maxWidth:`calc(min(70vh, 720px) * ${(l.width/Math.max(1,l.height)).toFixed(4)})`},children:b(Jt,{block:s,blockTime:0,basePath:n,viewport:{width:l.width,height:l.height},animationsEnabled:r,theme:i})})}new TextDecoder;new TextEncoder;new TextDecoder;new TextEncoder;new TextDecoder;new TextEncoder;var pH=10,hH=100;function rg(e){let t=e instanceof Uint8Array?e:new Uint8Array(e);return yH(t)??bH(t)??wH(t)}var gH=new Set(["gif","webp","apng"]),KE=/^image\/(?:gif|webp|apng)(?=$|[;,\s])/i;function xs(e){let t=e.trim();if(!t)return false;if(/^data:/i.test(t))return KE.test(t.slice(5));if(KE.test(t))return true;let n=t.split(/[?#]/,1)[0]??"",r=n.lastIndexOf(".");return r<0||r<n.lastIndexOf("/")?false:gH.has(n.slice(r+1).toLowerCase())}function yH(e){if(e.length<13||e[0]!==71||e[1]!==73||e[2]!==70||e[3]!==56||e[4]!==55&&e[4]!==57||e[5]!==97)return null;let t=13+QE(e[10]),n=0,r=0,i=0,a=1;for(;t<e.length;){let o=e[t++];if(o===59)break;if(o===33){if(t>=e.length)break;let s=e[t++];if(s===249&&t+3<e.length&&e[t]>=4)i=(e[t+2]|e[t+3]<<8)*10;else if(s===255&&e[t]===11&&t+12<=e.length){let l=ks(e,t+1,11),c=t+12;if((l==="NETSCAPE2.0"||l==="ANIMEXTS1.0")&&c+3<e.length&&e[c]>=3&&e[c+1]===1){let d=e[c+2]|e[c+3]<<8;a=d===0?0:d+1;}}if(t=ZE(e,t),t<0)break;continue}if(o===44){if(t+9>e.length)break;let s=e[t+8];if(t+=9+QE(s),t+=1,n++,r+=ag(i),i=0,t=ZE(e,t),t<0)break;continue}break}return ig("gif",n,r,a)}function QE(e){return e&128?3*(1<<(e&7)+1):0}function ZE(e,t){let n=t;for(;n<e.length;){let r=e[n];if(n+=1,r===0)return n;n+=r;}return -1}var Iu=[137,80,78,71,13,10,26,10];function bH(e){if(e.length<Iu.length)return null;for(let o=0;o<Iu.length;o++)if(e[o]!==Iu[o])return null;let t=Iu.length,n=false,r=1,i=1,a=0;for(;t+8<=e.length;){let o=ng(e,t),s=ks(e,t+4,4),l=t+8;if(s==="acTL"&&o>=8&&l+8<=e.length)n=true,r=ng(e,l),i=ng(e,l+4);else if(s==="fcTL"&&o>=26&&l+26<=e.length){let c=JE(e,l+20),d=JE(e,l+22)||100;a+=ag(c*1e3/d);}else {if(s==="IDAT"&&!n)break;if(s==="IEND")break}t=l+o+4;}return ig("png",n?r:1,a,i)}function wH(e){if(e.length<12||ks(e,0,4)!=="RIFF"||ks(e,8,4)!=="WEBP")return null;let t=12,n=false,r=0,i=0,a=null;for(;t+8<=e.length;){let s=ks(e,t,4),l=kH(e,t+4),c=t+8;if(s==="VP8X"&&l>=10&&c<e.length){if(n=(e[c]&2)!==0,!n)break}else if(s==="ANIM"&&l>=6&&c+6<=e.length)a=e[c+4]|e[c+5]<<8;else if(s==="ANMF"&&l>=16&&c+15<=e.length)r++,i+=ag(e[c+12]|e[c+13]<<8|e[c+14]<<16);else if((s==="VP8 "||s==="VP8L")&&!n)break;t=c+l+(l&1);}return ig("webp",n?r:1,i,a??0)}function ig(e,t,n,r){let i=t>1;return {format:e,animated:i,frameCount:Math.max(t,1),durationMs:i?Math.round(n):0,playCount:i?r:1}}function ag(e){return e<=pH?hH:e}function ks(e,t,n){let r="";for(let i=t;i<t+n&&i<e.length;i++)r+=String.fromCharCode(e[i]);return r}function JE(e,t){return e[t]<<8|e[t+1]}function ng(e,t){return (e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function kH(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}var xH=ar(null);function tS(){return _r(xH)}function Mu({src:e,basePath:t="",width:n,height:r,poster:i,controls:a=true,preload:o="metadata",className:s}){let l=gt(e,t),c=gt(i??"",t),d=i?c:void 0;return l?b("span",{className:`squisq-inline-video-player ${s??""}`.trim(),children:b("video",{src:l,poster:d,controls:a,preload:o,width:n,height:r,playsInline:true})}):null}function nS({src:e,basePath:t="",controls:n=true,preload:r="metadata",className:i}){let a=gt(e,t);return a?b("span",{className:`squisq-inline-audio-player ${i??""}`.trim(),children:b("audio",{src:a,controls:n,preload:r})}):null}var vH={gif:"GIF",webp:"WEBP",png:"APNG"};function rS({playback:e,imageRef:t}){let n=ue(null),{info:r,status:i,displaySrc:a}=e,o=i==="paused",s=r?.animated??false;if(bn(()=>{if(!o||!s)return;let c=t.current,d=n.current;if(!c||!d)return;let u=()=>{!c.naturalWidth||!c.naturalHeight||(d.width=c.naturalWidth,d.height=c.naturalHeight,d.getContext("2d")?.drawImage(c,0,0));};if(c.complete&&c.naturalWidth){u();return}return c.addEventListener("load",u,{once:true}),()=>c.removeEventListener("load",u)},[o,s,a,t]),!r||!s)return null;let l=i==="playing"?"Pause animation":i==="ended"?"Replay animation":"Play animation";return b(Pe,{children:[o&&b("canvas",{ref:n,className:"squisq-animated-image-still","aria-hidden":"true",style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"}}),b("button",{type:"button",className:"squisq-animated-image-toggle","data-status":i,"aria-label":l,title:l,style:{position:"absolute",top:8,left:8},onMouseDown:c=>c.preventDefault(),onClick:c=>{c.preventDefault(),c.stopPropagation(),i==="playing"?e.pause():e.play();},children:[b(TH,{status:i}),b("span",{className:"squisq-animated-image-format",children:vH[r.format]})]})]})}function TH({status:e}){return b("svg",{viewBox:"0 0 12 12","aria-hidden":"true",focusable:"false",children:b("path",{d:e==="playing"?"M2.5 1.5h2.75v9H2.5zM6.75 1.5H9.5v9H6.75z":e==="ended"?"M6 1.5V0L3.5 2.25 6 4.5V3a3 3 0 1 1-3 3H1.5A4.5 4.5 0 1 0 6 1.5z":"M3 1.5v9l7.5-4.5z"})})}var EH=64,vs=new Map;function SH(e){let t=vs.get(e);if(t)return t;let n=fetch(e).then(r=>r.ok?r.arrayBuffer():null).then(r=>r?rg(r):null).catch(()=>null);if(!/^data:/i.test(e)&&(vs.set(e,n),vs.size>EH)){let r=vs.keys().next().value;r!==void 0&&vs.delete(r);}return n}function _H(e){if(/^(?:blob|data):/i.test(e))return e;if(typeof document>"u")return null;try{let t=new URL(e,document.baseURI);return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.origin===window.location.origin?t.href:null}catch{return null}}function AH(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function iS(){return AH()?"paused":"playing"}function aS(e,t){let[n,r]=ge(null),[i,a]=ge(iS),[o,s]=ge(null),[l,c]=ge(0),d=ue(0),u=ue(null),f=ke(y=>{u.current&&URL.revokeObjectURL(u.current),u.current=y,s(y);},[]);he(()=>{r(null);let y=t&&xs(e)?_H(t):null;if(!y)return;let g=false;return SH(y).then(w=>{g||r(w);}),()=>{g=true;}},[e,t]),he(()=>{d.current++,f(null),a(iS());},[t,f]),he(()=>()=>{u.current&&URL.revokeObjectURL(u.current);},[]),he(()=>{if(i!=="playing"||!n?.animated||n.playCount===0)return;let y=setTimeout(()=>a("ended"),n.durationMs*n.playCount);return ()=>clearTimeout(y)},[i,n,l]);let m=ke(()=>{let y=++d.current,g=w=>{if(y!==d.current){w&&URL.revokeObjectURL(w);return}w&&f(w),a("playing"),c(x=>x+1);};fetch(o??t).then(w=>w.blob()).then(w=>g(URL.createObjectURL(w)),()=>g(null));},[o,t,f]),h=ke(()=>{d.current++,a("paused");},[]);return {info:n,animated:n?.animated??false,displaySrc:o??t,status:i,play:m,pause:h}}var $a={htmlPolicy:"sanitize"},CH={idle:"Copy",copying:"Copying\u2026",copied:"Copied",failed:"Copy failed"};async function IH(e,t,n){if(n){await n(e,t===void 0?{}:{language:t});return}if(typeof navigator>"u"||!navigator.clipboard?.writeText)throw new Error("Clipboard access is unavailable in this host");await navigator.clipboard.writeText(e);}function oS({value:e,language:t,ctx:n}){let[r,i]=ge("idle"),a=ue();he(()=>()=>{a.current!==void 0&&clearTimeout(a.current);},[]);let o=b("pre",{className:"squisq-md-code-block",children:b("code",{className:t?`language-${t}`:void 0,children:e})});if(!n.showCodeCopyButton)return o;let s=async()=>{if(r!=="copying"){i("copying");try{await IH(e,t??void 0,n.onCopyCode),i("copied");}catch{i("failed");}a.current!==void 0&&clearTimeout(a.current),a.current=setTimeout(()=>i("idle"),1600);}};return b("div",{className:"squisq-md-code-frame",children:[o,b("button",{type:"button",className:"squisq-md-code-copy","data-copy-state":r,disabled:r==="copying",onClick:()=>{s();},"aria-label":"Copy code to clipboard",children:CH[r]})]})}var og=class extends un{constructor(){super(...arguments);this.state={failed:false};}static getDerivedStateFromError(){return {failed:true}}render(){return this.state.failed?this.props.fallback:this.props.children}};function MH({node:e,lang:t,ctx:n}){let r=n.fenceRenderers?.[t];return r?b("div",{className:`squisq-md-fence-widget squisq-md-fence-widget-${t}`,"data-fence-lang":t,children:r({lang:t,...e.meta!=null?{meta:e.meta}:{},value:e.value,...n.theme?{theme:n.theme}:{},mode:"read"})}):null}function zt(e,t="",n=$a){return e.map((r,i)=>{let a=`${t}i${i}`;switch(r.type){case "text":{if(!r.value.includes(`
|
|
739
|
+
`);bn(()=>{if(!F){z(null);return}let me=$.current;if(!me||typeof me.getBBox!="function")return;let Y=()=>{try{let ye=me.getBBox();if(ye.width<=0||ye.height<=0)return;let pe=f??t.width,ce=m??t.height,X=Math.min(1,pe/ye.width,ce/ye.height);z(X<.995?{scale:X,cx:ye.x+ye.width/2,cy:ye.y+ye.height/2}:null);}catch{}};Y();let se=me.ownerDocument?.fonts;if(se&&se.status!=="loaded"){let ye=false;return se.ready.then(()=>{ye||Y();}),()=>{ye=true;}}},[F,C,f,m,t.width,t.height,c.fontSize,c.fontFamily,c.fontWeight]);let U=R?`translate(${R.cx} ${R.cy}) scale(${R.scale}) translate(${-R.cx} ${-R.cy})`:void 0,V={fontSize:`${c.fontSize}px`,fontFamily:c.fontFamily||Ja,fontWeight:c.fontWeight||"normal",fontStyle:c.fontStyle||"normal",fill:c.color,...k.style},M=c.shadow?`shadow-${i}`:void 0,J=0,we=me=>!I||!s||!me?me||"\xA0":me.split(" ").map((se,ye)=>{let pe=Fh(s,J++);return b(Pe,{children:[ye>0?" ":null,b("tspan",{className:"anim-word",style:{"--anim-delay":`${pe}s`},children:se})]},ye)});return b("g",{className:`block-layer block-layer--text ${k.className}`,style:k.style,"data-layer-id":e.id,children:[c.shadow&&b("defs",{children:b("filter",{id:M,x:"-20%",y:"-20%",width:"140%",height:"140%",children:b("feDropShadow",{dx:"0",dy:"2",stdDeviation:"3",floodColor:"rgba(0,0,0,0.7)"})})}),b(x$,{layerId:i,style:c,box:f!=null&&m!=null?{x:d-Kr(w,f,"x"),y:u-Kr(w,m,"y"),width:f,height:m}:{x:x-(c.padding||16),y:v-c.fontSize-(c.padding||16),width:_$(D,c)+(c.padding||16)*2,height:D.length*q+(c.padding||16)*2}}),b("g",{"data-squisq-text-fit":"svg","data-squisq-fit-width":T,"data-squisq-fit-height":S,style:{transform:`scale(${r})`,transformOrigin:`${x}px ${v}px`,transformBox:"view-box"},children:b("text",{ref:$,"data-squisq-text-content":"true",x,y:v,textAnchor:y,dominantBaseline:g,style:V,filter:M?`url(#${M})`:void 0,transform:U,children:D.map((me,Y)=>b("tspan",{x,dy:Y===0?H:q,children:[we(me)," "]},Y))})})]})}function w$({layer:e,viewport:t,blockTime:n,textScale:r=1}){let{content:i,position:a,animation:o}=e,{html:s,style:l}=i,c=xe(a.x,t.width),d=xe(a.y,t.height),u=a.width!=null?xe(a.width,t.width):t.width,f=a.height!=null?xe(a.height,t.height):l.fontSize*(l.lineHeight||1.4)*2,m=a.anchor??"top-left",h=c-Kr(m,u,"x"),y=d-Kr(m,f,"y"),g=de(()=>jl(ta(mi(s??""))),[s]),w=ft(o,n),x=l.verticalAlign==="middle"?"center":l.verticalAlign==="bottom"?"flex-end":"flex-start",v=!!(l.borderColor&&(l.borderWidth??0)>0),T={boxSizing:"border-box",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:x,padding:l.padding??0,color:l.color,fontSize:`${l.fontSize*r}px`,fontFamily:l.fontFamily||Ja,fontWeight:l.fontWeight||"normal",fontStyle:l.fontStyle||"normal",lineHeight:l.lineHeight||1.4,textAlign:l.textAlign??"left",overflow:"hidden",...l.background?{background:l.background}:{},...v?{border:`${l.borderWidth}px ${l.borderStyle??"solid"} ${l.borderColor}`,borderRadius:4}:{},...l.shadow?{textShadow:"0 2px 3px rgba(0,0,0,0.7)"}:{},...w.style},S=`squisq-rich-text-${k$(e.id)}`,k=l.textAlign==="center"||l.textAlign==="right"?"inside":"outside",E=_=>{_.target?.closest?.("[data-squisq-table-scroll]")&&_.stopPropagation();},I=`.${S}{margin:0}.${S} p{margin:0 0 .4em}.${S} h1,.${S} h2,.${S} h3,.${S} h4,.${S} h5,.${S} h6{margin:0 0 .3em;line-height:1.2}.${S} ul,.${S} ol{margin:0 0 .7em;padding-left:1.2em;list-style-position:${k}}.${S} li{margin:0}.${S} li>p{display:inline;margin:0}.${S} [data-squisq-table-scroll]{width:100%;max-height:20em;margin:.35em 0;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}.${S} table{width:100%;min-width:48em;margin:0;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:.76em;line-height:1.2}.${S} th,.${S} td{box-sizing:border-box;padding:.28em .45em;border:1px solid rgba(127,127,127,.55);border-color:color-mix(in srgb,currentColor 32%,transparent);vertical-align:top;white-space:normal;overflow-wrap:anywhere}.${S} th{position:sticky;top:0;z-index:1;background:rgba(127,127,127,.16);background:color-mix(in srgb,currentColor 12%,transparent);font-weight:600}.${S} tbody tr:nth-child(even){background:rgba(127,127,127,.07);background:color-mix(in srgb,currentColor 5%,transparent)}.${S} *:first-child{margin-top:0}.${S} *:last-child{margin-bottom:0}.${S} a{color:inherit;text-decoration:underline}`;return b("g",{className:`block-layer block-layer--text ${w.className}`,style:w.style,"data-layer-id":e.id,children:b("foreignObject",{x:h,y,width:u,height:f,color:l.color,style:{color:l.color},children:b("div",{xmlns:"http://www.w3.org/1999/xhtml","data-squisq-text-fit":"html","data-squisq-base-font-size":l.fontSize,style:T,onPointerDown:E,onClick:E,onWheel:E,onKeyDown:E,children:[b("style",{children:I}),b("div",{"data-squisq-text-content":"true",className:S,"aria-label":i.text,style:{width:"100%",color:l.color,whiteSpace:"pre-wrap",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:g}})]})})})}function k$(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function x$({layerId:e,style:t,box:n}){let r=!!(t.background||t.backgroundGradient),i=!!(t.borderColor&&(t.borderWidth??0)>0);if(!r&&!i)return null;let{fill:a,def:o}=Fa(e,t.background,t.backgroundGradient),s=Oa(t.borderStyle,t.borderWidth);return b(Pe,{children:[o&&b("defs",{children:o}),b("rect",{x:n.x,y:n.y,width:n.width,height:n.height,fill:r?a:"none",fillOpacity:r?t.backgroundOpacity:void 0,stroke:i?t.borderColor:void 0,strokeWidth:i?t.borderWidth:void 0,strokeDasharray:i?s:void 0,rx:4,ry:4})]})}function v$(e,t){return e==="center"?"middle":e==="right"?"end":e==="left"?"start":t?.includes("right")?"end":t==="center"?"middle":"start"}function T$(e,t){return e==="top"?"text-before-edge":e==="middle"?"middle":e==="bottom"||t?.includes("bottom")?"text-after-edge":t==="center"?"middle":"text-before-edge"}function E$(e,t,n,r){if(t==null)return e;let i=e-Kr(n,t,"x");return r==="middle"?i+t/2:r==="end"?i+t:i}function S$(e,t,n,r){if(t==null)return e;let i=e-Kr(n,t,"y");return r==="middle"?i+t/2:r==="text-after-edge"?i+t:i}function Kr(e,t,n){return e==="center"?t/2:n==="x"?e.includes("right")?t:0:e.includes("bottom")?t:0}function _$(e,t){return Math.max(...e.map(r=>r.length))*t.fontSize*.55}function hE(e,t,n){if(!e.trim())return [""];let r=t*.5,i=Math.floor(n/r);if(i<=0)return [e];let a=e.split(/\s+/),o=[],s="";for(let l of a){let c=s?`${s} ${l}`:l;if(c.length<=i)s=c;else if(s&&o.push(s),l.length>i){let d=l;for(;d.length>i;)o.push(d.slice(0,i)),d=d.slice(i);s=d;}else s=l;}return s&&o.push(s),o.length>0?o:[""]}var A$=1;function gE({layer:e,viewport:t,blockTime:n}){let{content:r,position:i,animation:a}=e,o=Da(Wt(),e.id),s=xe(i.x,t.width),l=xe(i.y,t.height),c=i.width?xe(i.width,t.width):100,d=i.height?xe(i.height,t.height):100,u=on(i.anchor,c,d),f=s+u.x,m=l+u.y,y=r.shape==="rect"&&f===0&&m===0&&c===t.width&&d===t.height&&!r.stroke&&!r.borderRadius?A$:0,g=f-y,w=m-y,x=c+y*2,v=d+y*2,T=ft(a,n),S=r.fill||"none",k=typeof S=="string"&&S.includes("gradient(");if(r.shape==="rect"&&k&&!r.gradient)return b("g",{className:`block-layer block-layer--shape ${T.className}`,style:T.style,"data-layer-id":e.id,pointerEvents:"none",children:b("foreignObject",{x:g,y:w,width:x,height:v,children:b("div",{style:{width:`${x}px`,height:`${v}px`,background:S,borderRadius:r.borderRadius?`${r.borderRadius}px`:void 0,pointerEvents:"none"}})})});let{fill:E,def:I}=Fa(o,S,r.gradient,r.pattern),{filterAttr:_,def:A}=fE(o,r.filter),D=Oa(r.borderStyle,r.strokeWidth),B={fill:E,fillOpacity:r.fillOpacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeDasharray:D,..._?{filter:_}:{}};return b("g",{className:`block-layer block-layer--shape ${T.className}`,style:T.style,"data-layer-id":e.id,pointerEvents:"none",children:[(I||A)&&b("defs",{children:[I,A]}),r.shape==="rect"&&b("rect",{x:g,y:w,width:x,height:v,rx:r.borderRadius,ry:r.borderRadius,...B}),r.shape==="circle"&&b("circle",{cx:f+c/2,cy:m+d/2,r:Math.min(c,d)/2,...B}),r.shape==="line"&&b("line",{x1:f,y1:m,x2:f+c,y2:m+d,stroke:r.stroke||"#ffffff",strokeWidth:r.strokeWidth||2,strokeDasharray:D})]})}function C$(e,t){let{content:n,position:r}=e;if(!n.shapeKind)return n.d;let i=r.width?xe(r.width,t.width):0,a=r.height?xe(r.height,t.height):0,o=xe(r.x,t.width),s=xe(r.y,t.height),l=on(r.anchor,i,a);return Ii(n.shapeKind,o+l.x,s+l.y,i,a)??n.d}function I$(e){return e.arrow}function yE(e,t,n){return e||(t==="both"||t===n?"arrow":"none")}function wE({layer:e,viewport:t,blockTime:n}){let{content:r,animation:i,id:a}=e,o=Da(Wt(),a),s=C$(e,t),l=r.stroke??"#1e293b",c=r.strokeWidth??2,{fill:d,def:u}=Fa(o,r.fill??"none",r.gradient),f=r.borderStyle?Oa(r.borderStyle,c):r.dasharray,m=ft(i,n),h=`marker-start-${o}`,y=`marker-end-${o}`,g=I$(r),w=Zo(yE(r.startMarker,g,"start"),"start"),x=Zo(yE(r.endMarker,g,"end"),"end"),v=w?`url(#${h})`:void 0,T=x?`url(#${y})`:void 0,S=i?.type==="drawOn";return b("g",{className:`block-layer block-layer--path ${m.className}`,style:m.style,"data-layer-id":a,children:[b("defs",{children:[u,x&&b(bE,{id:y,dir:"end",d:x.d,filled:x.filled,stroke:l}),w&&b(bE,{id:h,dir:"start",d:w.d,filled:w.filled,stroke:l})]}),b("path",{d:s,stroke:l,strokeWidth:c,fill:d,fillOpacity:r.fillOpacity,strokeDasharray:S?void 0:f,pathLength:S?1:void 0,"data-squisq-draw":S?"stroke":void 0,markerStart:S?void 0:v,markerEnd:S?void 0:T}),S&&(v||T)&&b("path",{d:s,stroke:l,strokeWidth:c,strokeOpacity:0,fill:"none","data-squisq-draw":"markers",markerStart:v,markerEnd:T})]})}function bE({id:e,dir:t,d:n,filled:r,stroke:i}){return b("marker",{id:e,viewBox:"0 0 10 10",refX:t==="end"?9:1,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",markerUnits:"strokeWidth",children:b("path",{d:n,fill:r?i:"none",stroke:r?"none":i,strokeWidth:r?void 0:1.5})})}var M$={terrain:{url:"https://tile.opentopomap.org/{z}/{x}/{y}.png",attribution:"Map: OpenTopoMap (CC-BY-SA)",maxZoom:17},road:{url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:"\xA9 OpenStreetMap contributors",maxZoom:19},satellite:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attribution:"Imagery: Esri, Maxar, Earthstar",maxZoom:18},toner:{url:"https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:20},watercolor:{url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg",attribution:"Map: Stadia Maps, Stamen Design",maxZoom:16}};function Qh(e,t,n){let r=Math.pow(2,n),i=Math.floor((t+180)/360*r),a=e*Math.PI/180,o=Math.floor((1-Math.log(Math.tan(a)+1/Math.cos(a))/Math.PI)/2*r);return {x:i,y:o}}function Zh(e,t,n,r=256){let i=Math.pow(2,n),a=(t+180)/360*i,o=e*Math.PI/180,s=(1-Math.log(Math.tan(o)+1/Math.cos(o))/Math.PI)/2*i;return {x:(a-Math.floor(a))*r,y:(s-Math.floor(s))*r}}function q$(e,t,n,r,i,a=256){let o=Qh(e,t,n),s=Zh(e,t,n,a),l=Math.ceil(r/a)+1,c=Math.ceil(i/a)+1,d=o.x-Math.floor(l/2),u=o.y-Math.floor(c/2),f=r/2-s.x,m=i/2-s.y,h=[];for(let y=0;y<c;y++)for(let g=0;g<l;g++){let w=d+g,x=u+y,v=f+(w-o.x)*a,T=m+(x-o.y)*a;h.push({x:w,y:x,screenX:v,screenY:T});}return h}function kE(e,t,n,r){return e.url.replace("{z}",String(r)).replace("{x}",String(t)).replace("{y}",String(n))}async function L$(e){return new Promise((t,n)=>{let r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>n(new Error(`Failed to load tile: ${e}`)),r.src=e;})}async function xE(e){let{center:t,zoom:n,style:r,width:i,height:a,markers:o=[],showAttribution:s=true}=e,l=M$[r],c=l.tileSize||256,d=Math.min(n,l.maxZoom),u=kE(l,0,0,d);if(!rn(u,e.policy))throw new Vn("RESOURCE_BLOCKED",`Map tiles for style "${r}" are blocked by the resource policy (${l.url}). Composing a map contacts the tile host; supply the map as \`staticSrc\` to render it without any remote request.`);let f=document.createElement("canvas");f.width=i,f.height=a;let m=f.getContext("2d");if(!m)throw new Error("Failed to get canvas context");m.fillStyle=r==="toner"?"#ffffff":"#e5e7eb",m.fillRect(0,0,i,a);let y=q$(t.lat,t.lng,d,i,a,c).map(async g=>{let w=kE(l,g.x,g.y,d);try{let x=await L$(w);m.drawImage(x,g.screenX,g.screenY,c,c);}catch(x){console.warn(`Tile load failed: ${w}`,x);}});await Promise.all(y);for(let g of o)P$(m,g,t,d,i,a,c);return s&&N$(m,l.attribution,i,a),f.toDataURL("image/png")}function P$(e,t,n,r,i,a,o){let s=Qh(n.lat,n.lng,r),l=Qh(t.lat,t.lng,r),c=Zh(n.lat,n.lng,r,o),d=Zh(t.lat,t.lng,r,o),u=(l.x-s.x)*o+(d.x-c.x),f=(l.y-s.y)*o+(d.y-c.y),m=i/2+u,h=a/2+f,y=t.color||"#ef4444",g=t.icon||"pin";e.save(),g==="pin"?(e.fillStyle=y,e.beginPath(),e.arc(m,h-12,8,Math.PI,0,false),e.lineTo(m,h),e.closePath(),e.fill(),e.fillStyle="#ffffff",e.beginPath(),e.arc(m,h-12,3,0,Math.PI*2),e.fill()):g==="circle"?(e.fillStyle=y,e.beginPath(),e.arc(m,h,8,0,Math.PI*2),e.fill(),e.strokeStyle="#ffffff",e.lineWidth=2,e.stroke()):g==="star"&&(e.fillStyle=y,R$(e,m,h,5,10,5),e.fill()),t.label&&(e.fillStyle="#1f2937",e.font="bold 12px system-ui, sans-serif",e.textAlign="center",e.fillText(t.label,m,h+20)),e.restore();}function R$(e,t,n,r,i,a){let o=Math.PI/2*3,s=Math.PI/r;e.beginPath(),e.moveTo(t,n-i);for(let l=0;l<r;l++)e.lineTo(t+Math.cos(o)*i,n+Math.sin(o)*i),o+=s,e.lineTo(t+Math.cos(o)*a,n+Math.sin(o)*a),o+=s;e.lineTo(t,n-i),e.closePath();}function N$(e,t,n,r){e.save(),e.fillStyle="rgba(255, 255, 255, 0.8)";let i=4;e.font="10px system-ui, sans-serif";let a=e.measureText(t).width;e.fillRect(n-a-i*2-4,r-16,a+i*2,14),e.fillStyle="#374151",e.textAlign="right",e.fillText(t,n-i-4,r-5),e.restore();}function vE({layer:e,basePath:t,viewport:n,blockTime:r}){let{content:i,position:a,animation:o}=e,s=`map-clip-${Wt().replace(/:/g,"")}-${e.id}`,l=gt(i.staticSrc??"",t),[c,d]=ge(()=>i.staticSrc&&l||null),[u,f]=ge(!i.staticSrc),[m,h]=ge(null),[y,g]=ge(false),w=xe(a.x,n.width),x=xe(a.y,n.height),v=a.width?xe(a.width,n.width):n.width,T=a.height?xe(a.height,n.height):n.height,S=on(a.anchor,v,T),k=w+S.x,E=x+S.y,I=pr();he(()=>{let A=false;if(i.staticSrc){d(l||null),f(false);return}return f(true),h(null),g(false),xE({center:i.center,zoom:i.zoom,style:i.style,width:v,height:T,markers:i.markers,showAttribution:i.showAttribution!==false,policy:I}).then(D=>{A||(d(D),f(false));}).catch(D=>{if(!A){let B=D instanceof Vn;B||console.error("Failed to compose map:",D),h(D instanceof Error?D.message:String(D)),g(B),f(false);}}),()=>{A=true;}},[i.center,i.zoom,i.style,i.staticSrc,l,i.markers,i.showAttribution,v,T,t,I]);let _=ft(o,r);return u?b("g",{className:`block-layer block-layer--map ${_.className}`,style:_.style,"data-layer-id":e.id,children:[b("rect",{x:k,y:E,width:v,height:T,fill:"#e5e7eb"}),b("text",{x:k+v/2,y:E+T/2,textAnchor:"middle",dominantBaseline:"middle",fill:"#9ca3af",fontSize:"24",fontFamily:"system-ui, sans-serif",children:"Loading map..."})]}):m||!c?b("g",{className:`block-layer block-layer--map ${_.className}`,style:_.style,"data-layer-id":e.id,children:[b("rect",{x:k,y:E,width:v,height:T,fill:y?"#f3f4f6":"#fef2f2"}),b("text",{x:k+v/2,y:E+T/2,textAnchor:"middle",dominantBaseline:"middle",fill:y?"#6b7280":"#dc2626",fontSize:"18",fontFamily:"system-ui, sans-serif",children:y?"Map unavailable offline":"Map failed to load"})]}):b("g",{className:`block-layer block-layer--map ${_.className}`,style:_.style,"data-layer-id":e.id,children:[b("defs",{children:b("clipPath",{id:s,children:b("rect",{x:k,y:E,width:v,height:T})})}),b("g",{clipPath:`url(#${s})`,children:b("image",{href:c,x:k,y:E,width:v,height:T,preserveAspectRatio:"xMidYMid slice",style:{pointerEvents:"none"}})})]})}var D$=.2;function TE({layer:e,basePath:t,viewport:n,blockTime:r,isPlaying:i,muted:a=false}){let{content:o,position:s}=e,l=ue(null),c=ue(false),d=o.startAt??0,u=r<d,f=xe(s.x,n.width),m=xe(s.y,n.height),h=s.width?xe(s.width,n.width):n.width,y=s.height?xe(s.height,n.height):n.height,g=on(s.anchor,h,y),w=f+g.x,x=m+g.y,v=gt(o.src,t),T=gt(o.posterSrc||"",t),S=o.posterSrc?T:void 0;return he(()=>{let k=l.current;if(!k)return;if(k.currentTime=o.clipStart,c.current=true,i){let I=k.play();I&&I.catch(()=>{});}let E=()=>{k.currentTime>=o.clipEnd&&(k.pause(),k.currentTime=o.clipEnd);};return k.addEventListener("timeupdate",E),()=>{k.removeEventListener("timeupdate",E),k.pause();}},[v,o.clipStart,o.clipEnd]),he(()=>{let k=l.current;if(!k||!c.current)return;let E=u?o.clipStart:Math.min(o.clipEnd,o.clipStart+Math.max(0,r-d));if(!ai(k)&&Math.abs(k.currentTime-E)>D$&&(k.currentTime=E),u){k.pause();return}if(E>=o.clipEnd){k.pause();return}if(i){let I=k.play();I&&I.catch(()=>{});}else ai(k)||k.pause();},[i,u,r,d,v,o.clipStart,o.clipEnd]),b("g",{className:"block-layer block-layer--video","data-layer-id":e.id,children:b("foreignObject",{x:w,y:x,width:h,height:y,children:b("video",{ref:l,src:v,poster:S,muted:a,playsInline:true,preload:"auto","data-clip-start":o.clipStart,"data-clip-end":o.clipEnd,"data-start-at":d,style:{width:`${h}px`,height:`${y}px`,objectFit:o.fit||"cover",objectPosition:"center",display:"block",pointerEvents:"none"}})})})}function EE({block:e,layer:t,viewport:n,blockTime:r,contentRenderer:i}){let{content:a,position:o,animation:s}=t,{align:l,style:c}=a,d=Array.isArray(a.headers)?a.headers:[],u=Array.isArray(a.rows)?a.rows:[],f=xe(o.x,n.width),m=xe(o.y,n.height),h=o.width?xe(o.width,n.width):n.width,y=o.height?xe(o.height,n.height):n.height,g=on(o.anchor,h,y),w=f+g.x,x=m+g.y,v=ft(s,r),T=A=>{let D=l?.[A];return D?{textAlign:D}:void 0},S=c.borderRadius??8,k=c.fontSize*.6,E=c.fontSize*.75,I=b("table",{style:{width:"max-content",minWidth:"100%",borderCollapse:"separate",borderSpacing:0,fontSize:`${c.fontSize}px`,fontFamily:c.fontFamily??"system-ui, sans-serif",lineHeight:1.2},children:[d.length>0&&b("thead",{children:b("tr",{children:d.map((A,D)=>b("th",{style:{background:c.headerBackground,color:c.headerColor,fontFamily:c.headerFontFamily??c.fontFamily??"system-ui, sans-serif",fontWeight:600,padding:`${k}px ${E}px`,position:"sticky",top:0,zIndex:1,whiteSpace:"nowrap",borderBottom:`2px solid ${c.borderColor}`,borderRight:D<d.length-1?`1px solid ${c.borderColor}`:void 0,...T(D)},children:A},D))})}),u.length>0&&b("tbody",{children:u.map((A,D)=>b("tr",{children:A.map((B,q)=>b("td",{style:{background:c.cellBackground,color:c.cellColor,padding:`${k}px ${E}px`,whiteSpace:"nowrap",borderBottom:D<u.length-1?`1px solid ${c.borderColor}`:void 0,borderRight:q<A.length-1?`1px solid ${c.borderColor}`:void 0,...T(q)},children:B},q))},D))})]}),_=e?i:void 0;return b("g",{className:`block-layer block-layer--table ${v.className}`,style:v.style,"data-layer-id":t.id,children:b("foreignObject",{x:w,y:x,width:h,height:y,children:b("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-table-scroll",role:"region","aria-label":"Scrollable data table",tabIndex:0,onPointerDown:A=>A.stopPropagation(),onClick:A=>A.stopPropagation(),onWheel:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),style:{width:`${h}px`,height:`${y}px`,boxSizing:"border-box",overflow:_?"hidden":"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",border:_?void 0:`1px solid ${c.borderColor}`,borderRadius:`${S}px`,background:_?"transparent":c.cellBackground},children:_?b(_,{block:e,layer:t,width:h,height:y,fallback:I}):I})})})}function SE(e,t){let n=e&&e.trim()?e.trim():t,r=n.indexOf(":");return r>0?`fa-${n.slice(0,r).replace(/^fa-/,"")} fa-${n.slice(r+1)}`:`fa-solid fa-${n}`}function _E({layer:e,viewport:t,blockTime:n}){let{content:r,position:i,animation:a}=e,{items:o,style:s}=r,l=xe(i.x,t.width),c=xe(i.y,t.height),d=i.width?xe(i.width,t.width):t.width,u=i.height?xe(i.height,t.height):t.height,f=on(i.anchor,d,u),m=ft(a,n);return b("g",{className:`block-layer block-layer--tree ${m.className}`,style:m.style,"data-layer-id":e.id,children:b("foreignObject",{x:l+f.x,y:c+f.y,width:d,height:u,children:b("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-treelayer",style:{width:`${d}px`,height:`${u}px`,display:"flex",flexDirection:"column",justifyContent:"center",padding:"24px 32px",boxSizing:"border-box",fontFamily:s.fontFamily??"system-ui, sans-serif",fontSize:`${s.fontSize}px`,lineHeight:1.7,overflow:"hidden"},children:b(AE,{items:o,depth:0,style:s})})})})}function AE({items:e,depth:t,style:n}){return b("ul",{style:{listStyle:"none",margin:0,padding:0,paddingLeft:t===0?0:`${n.indentPx}px`,borderLeft:t===0?"none":`1px solid ${n.connectorColor}`},children:e.map(r=>b(O$,{item:r,style:n},r.id))})}function O$({item:e,style:t}){let n=e.children.length>0,[r,i]=ge(false),a=e.isDir||n,o=a?SE(t.folderIcon,r?"folder":"folder-open"):SE(t.fileIcon,"file");return b("li",{style:{position:"relative"},children:[b("div",{style:{display:"flex",alignItems:"baseline",gap:"8px",padding:"1px 0"},children:[n?b("button",{type:"button","aria-label":r?"Expand":"Collapse",onClick:()=>i(s=>!s),style:{flex:"0 0 auto",width:"1em",border:"none",background:"transparent",cursor:"pointer",color:t.connectorColor,padding:0,fontSize:"0.8em"},children:b("i",{className:`fa-solid ${r?"fa-chevron-right":"fa-chevron-down"}`,"aria-hidden":"true"})}):b("span",{style:{flex:"0 0 auto",width:"1em"}}),b("i",{className:o,"aria-hidden":"true",style:{flex:"0 0 auto",color:t.iconColor,width:"1.2em",textAlign:"center"}}),b("span",{style:{color:a?t.dirColor:t.rowColor,fontWeight:a?600:400},children:e.label}),e.comment?b("span",{style:{color:t.commentColor,fontSize:"0.85em",fontStyle:"italic"},children:e.comment}):null]}),n&&!r?b(AE,{items:e.children,depth:1,style:t}):null]})}var Tu=null,$$={startOnLoad:false,securityLevel:"strict",suppressErrorRendering:true,deterministicIds:false,logLevel:"error"};async function H$(){return Tu||(Tu=Promise.resolve().then(()=>(IE(),CE)).then(({default:e})=>e).catch(e=>{throw Tu=null,e})),Tu}function z$(e){let t=globalThis,r=(t.__squisqMermaidWorkQueue??Promise.resolve()).then(e,e);return t.__squisqMermaidWorkQueue=r.then(()=>{},()=>{}),r}function Eu(e,t,n,r=tt){return z$(async()=>{let i=await H$();i.initialize({...$$,theme:"base",themeVariables:Bd(r)});let{svg:a,diagramType:o}=await i.render(e,t,n);return {svg:a,diagramType:o}})}function ME(e){return (e instanceof Error?e.message:String(e)).split(/\r?\n/).map(n=>n.trimEnd()).filter(Boolean).slice(0,6).join(`
|
|
740
|
+
`)||"Unknown Mermaid rendering error."}var U$=0;function Su({source:e,className:t,ariaLabel:n="Mermaid diagram",theme:r=tt}){let[i,a]=ge(""),[o,s]=ge(""),[l,c]=ge(true);he(()=>{let u=true,f=`squisq-rich-mermaid-${++U$}`;return c(true),s(""),Eu(f,e,void 0,r).then(m=>{u&&a(m.svg);}).catch(m=>{u&&(a(""),s(ME(m)));}).finally(()=>{u&&c(false);}),()=>{u=false;}},[e,r]);let d=["squisq-mermaid-rendered",t].filter(Boolean).join(" ");return b("div",{className:d,role:"img","aria-label":n,style:{background:r.colors.backgroundLight,color:r.colors.text},children:[l&&b("div",{className:"squisq-mermaid-render-status",children:"Rendering diagram\u2026"}),!l&&o&&b("div",{className:"squisq-mermaid-render-error",role:"alert",children:[b("strong",{children:"Mermaid could not render this diagram."}),b("pre",{children:o})]}),!l&&!o&&i&&b("div",{className:"squisq-mermaid-render-svg",dangerouslySetInnerHTML:{__html:i}})]})}function qE({layer:e,viewport:t,blockTime:n,theme:r}){let{position:i,content:a,animation:o}=e,s=xe(i.width??t.width,t.width),l=xe(i.height??t.height,t.height),c=xe(i.x,t.width),d=xe(i.y,t.height),u=i.anchor??"top-left";u==="center"?(c-=s/2,d-=l/2):(u.endsWith("right")&&(c-=s),u.startsWith("bottom")&&(d-=l));let f=ft(o,n),m={boxSizing:"border-box",width:"100%",height:"100%",padding:a.padding??16,borderRadius:16,background:a.background,color:a.foreground,overflow:"hidden"};return b("g",{className:`block-layer block-layer--mermaid ${f.className}`,"data-layer-id":e.id,style:f.style,children:b("foreignObject",{x:c,y:d,width:s,height:l,children:b("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"squisq-mermaid-layer-frame",style:m,children:b(Su,{source:a.source,ariaLabel:"Mermaid diagram on slide",theme:r})})})})}function LE(e,t=2){if(t<=1||!e(1))return 1;if(e(t))return t;let n=1,r=t;for(let i=0;i<10;i+=1){let a=(n+r)/2;e(a)?n=a:r=a;}return Math.max(1,Math.floor(n*100)/100)}var j$={width:1920,height:1080},er=1;function _u(e,t){for(let n of e)if(n.dataset.squisqTextFit==="html"){let r=Number(n.dataset.squisqBaseFontSize);Number.isFinite(r)&&(n.style.fontSize=`${r*t}px`);}else n.style.transform=`scale(${t})`;}function Qr(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function W$(e){let t=e.querySelector('[data-squisq-text-content="true"]');if(!t||t.scrollWidth<=0||t.scrollHeight<=0)return false;let r=e.ownerDocument.defaultView?.getComputedStyle(e),i=r?Qr(r.paddingLeft)+Qr(r.paddingRight)+Qr(r.borderLeftWidth)+Qr(r.borderRightWidth):0,a=r?Qr(r.paddingTop)+Qr(r.paddingBottom)+Qr(r.borderTopWidth)+Qr(r.borderBottomWidth):0,o=Math.max(0,e.clientWidth-i),s=Math.max(0,e.clientHeight-a);if(t.scrollWidth>o+er||t.scrollHeight>s+er)return false;for(let l of t.querySelectorAll("[data-squisq-table-scroll]"))if(l.clientWidth>0&&l.scrollWidth>l.clientWidth+er||l.clientHeight>0&&l.scrollHeight>l.clientHeight+er)return false;return true}function V$(e,t){let n=e.querySelector('[data-squisq-text-content="true"]');if(!n||typeof n.getBBox!="function")return false;try{let r=n.getBBox(),i=Number(e.dataset.squisqFitWidth),a=Number(e.dataset.squisqFitHeight);return r.width>0&&r.height>0&&r.width*t<=i+er&&r.height*t<=a+er}catch{return false}}function PE(e){return e.map(t=>t.querySelector('[data-squisq-text-content="true"]')?.getBoundingClientRect()).filter(t=>!!t&&t.width>0&&t.height>0)}function RE(e){let t=new Set;for(let n=0;n<e.length;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r];i.left<a.right-er&&i.right>a.left+er&&i.top<a.bottom-er&&i.bottom>a.top+er&&t.add(`${n}:${r}`);}return t}function Jt({block:e,blockTime:t,basePath:n,isEntering:r=false,isExiting:i=false,transition:a,viewport:o=j$,isPlaying:s,muted:l=false,animationsEnabled:c=true,theme:d,tableContentRenderer:u,growTextToFit:f=false}){let m="",h={},y=c?a??e.transition:void 0;y&&r?(m=bs(y.type,true,y.direction),h["--transition-duration"]=`${Zi(y)}s`):y&&i&&(m=bs(y.type,false,y.direction),h["--transition-duration"]=`${Zi(y)}s`);let w=`vb-clip-${Wt().replace(/:/g,"")}-${e.id}`,x=ue(null),[v,T]=ge(1),S=f&&!kh(e.template);return bn(()=>{let k=x.current,E=false;if(!k)return;let I=()=>{if(E)return;let A=Array.from(k.querySelectorAll("[data-squisq-text-fit]"));if(!S||A.length===0){_u(A,1),T(1);return}_u(A,1);let D=RE(PE(A)),q=LE(F=>{if(_u(A,F),A.some(H=>H.dataset.squisqTextFit==="html"?!W$(H):!V$(H,F)))return false;let P=RE(PE(A));for(let H of P)if(!D.has(H))return false;return true});_u(A,q),T(F=>F===q?F:q);};I();let _=k.ownerDocument?.fonts;return _&&_.status!=="loaded"&&_.ready.then(I),()=>{E=true;}},[e.layers,S,o.height,o.width]),b("svg",{ref:x,className:`block-svg ${m}`,style:h,viewBox:`0 0 ${o.width} ${o.height}`,preserveAspectRatio:"xMidYMid meet",overflow:"hidden","data-block-id":e.id,"data-squisq-text-scale":S?v:void 0,children:[b("defs",{children:b("clipPath",{id:w,children:b("rect",{x:"0",y:"0",width:o.width,height:o.height})})}),b("g",{clipPath:`url(#${w})`,children:(e.layers??[]).map(k=>b(G$,{block:e,layer:k,basePath:n,viewport:o,blockTime:t,isPlaying:s,muted:l,animationsEnabled:c,theme:d,tableContentRenderer:u,textScale:v},k.id))})]})}function G$({block:e,layer:t,basePath:n,viewport:r,blockTime:i,isPlaying:a,muted:o,animationsEnabled:s,theme:l,tableContentRenderer:c,textScale:d}){let u=s||!t.animation?t:{...t,animation:void 0};switch(u.type){case "image":return b(mE,{layer:u,basePath:n,viewport:r,blockTime:i,animationsEnabled:s});case "text":return b(pE,{layer:u,viewport:r,blockTime:i,textScale:d});case "shape":return b(gE,{layer:u,viewport:r,blockTime:i});case "path":return b(wE,{layer:u,viewport:r,blockTime:i});case "map":return b(vE,{layer:u,basePath:n,viewport:r,blockTime:i});case "video":return b(TE,{layer:u,basePath:n,viewport:r,blockTime:i,isPlaying:a,muted:o});case "table":return b(EE,{block:e,layer:u,viewport:r,blockTime:i,contentRenderer:c});case "tree":return b(_E,{layer:u,viewport:r,blockTime:i});case "mermaid":return b(qE,{layer:u,viewport:r,blockTime:i,theme:l});default:return console.warn(`Unknown layer type: ${u.type}`),null}}function NE(e,t){switch(e){case "top":return {top:t?"12%":"8%"};case "center":return {top:"50%",transform:"translateY(-50%)"};default:return {bottom:t?"24%":"16%"}}}function Y$(e){let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return "#ffffff";let n=parseInt(t[1],16),r=n>>16&255,i=n>>8&255,a=n&255;return .2126*r+.7152*i+.0722*a>150?"#111111":"#ffffff"}var X$=4,DE=2,K$=6;function Q$(e){if(e.words&&e.words.length>0)return e.words.map(i=>({text:i.text,startTime:i.startTime,endTime:i.endTime}));let t=e.text.split(/\s+/).filter(i=>i.length>0);if(t.length===0)return [];let r=(e.endTime-e.startTime)/t.length;return t.map((i,a)=>({text:i,startTime:e.startTime+a*r,endTime:e.startTime+(a+1)*r}))}function Z$(e){let t=[];for(let i of e.phrases)t.push(...Q$(i));if(t.length===0)return {words:[],chunks:[]};let n=X$;if(t.length>n){let i=Math.ceil(t.length/n);n=Math.ceil(t.length/i),n=Math.min(K$,Math.max(DE,n));}else n=Math.max(DE,t.length);let r=[];for(let i=0;i<t.length;i+=n){let a=t.slice(i,i+n);r.push({words:a,startTime:a[0].startTime,endTime:a[a.length-1].endTime});}return {words:t,chunks:r}}function OE({captions:e,currentTime:t,enabled:n=true,theme:r,viewport:i,position:a="bottom"}){let{chunks:o}=de(()=>e?Z$(e):{words:[],chunks:[]},[e]);if(!n||o.length===0)return b("div",{className:"social-caption-overlay",style:{position:"absolute",...NE(a,(i?.height??0)>(i?.width??1)),left:0,right:0,zIndex:50,pointerEvents:"none",opacity:0,transition:"opacity 0.15s ease-in-out"}});let s=null,l=-1;for(let g of o)if(t>=g.startTime&&t<g.endTime){s=g;break}if(!s){for(let g=0;g<o.length-1;g++)if(t>=o[g].endTime&&t<o[g+1].startTime){s=o[g],l=s.words.length-1;break}!s&&o.length>0&&t>=o[o.length-1].startTime&&(s=o[o.length-1],l=s.words.length-1);}if(!s)return null;if(l===-1){for(let g=0;g<s.words.length;g++){let w=s.words[g];if(t>=w.startTime&&t<w.endTime){l=g;break}}if(l===-1){for(let g=s.words.length-1;g>=0;g--)if(t>=s.words[g].startTime){l=g;break}}l===-1&&(l=0);}let c=r?.colors?.primary??"#5b9bd5",d=r?.typography?.titleFont?wt(r.typography.titleFont,'"PT Serif", Georgia, serif'):'"PT Serif", Georgia, serif',u=i?.width??1280,f=i?.height??720,m=f>u,h=Math.min(f*.055,u*.082),y=Math.max(22,Math.min(96,Math.round(h)));return b("div",{className:"social-caption-overlay",style:{position:"absolute",...NE(a,m),left:0,right:0,zIndex:50,pointerEvents:"none",display:"flex",justifyContent:"center",padding:m?"0 7%":"0 10%",boxSizing:"border-box",opacity:1,transition:"opacity 0.15s ease-in-out"},children:b("div",{className:"social-caption-overlay__chunk",style:{display:"inline-flex",flexWrap:"wrap",justifyContent:"center",alignItems:"baseline",maxWidth:"100%",rowGap:"0.12em",columnGap:"0.28em",padding:"0.22em 0.55em",borderRadius:"0.4em",background:"rgba(10, 10, 12, 0.42)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",fontFamily:d,fontSize:`${y}px`,lineHeight:1.18,textTransform:"uppercase",letterSpacing:"0.01em",whiteSpace:"normal"},children:s.words.map((g,w)=>{let x=w===l;return b("span",{className:x?"social-caption-overlay__word is-active":"social-caption-overlay__word",style:{display:"inline-block",whiteSpace:"nowrap",padding:"0 0.16em",borderRadius:"0.18em",fontWeight:800,color:x?Y$(c):"rgba(255, 255, 255, 0.95)",background:x?c:"transparent",textShadow:x?"none":"0 2px 6px rgba(0,0,0,0.75), 0 0 18px rgba(0,0,0,0.45)",transform:x?"scale(1.05)":"none",transition:"color 0.1s ease, background-color 0.1s ease, transform 0.1s ease"},children:g.text},`${g.startTime}-${w}`)})})})}function J$(e){switch(e){case "bottom":return {bottom:"6px",left:"50%",transform:"translateX(-50%)"};case "center":return {top:"50%",left:"50%",transform:"translate(-50%, -50%)"};default:return {top:"6px",left:"50%",transform:"translateX(-50%)"}}}function FE({captions:e,currentTime:t,enabled:n=true,fontSize:r=16,captionStyle:i="standard",captionPosition:a,theme:o,viewport:s}){if(i==="social")return b(OE,{captions:e,currentTime:t,enabled:n,theme:o,viewport:s,position:a??"bottom"});let c=(n&&e?io(e,t):null)?.text??null;return b("div",{className:"caption-overlay",style:{position:"absolute",...J$(a??"top"),zIndex:50,pointerEvents:"none",maxWidth:"100%",width:"100%",textAlign:"center",opacity:c?1:0,transition:"opacity 0.15s ease-in-out",padding:"0 4px",boxSizing:"border-box"},children:c&&b("div",{style:{display:"inline-block",padding:"3px 10px",background:"rgba(0, 0, 0, 0.65)",borderRadius:"4px",backdropFilter:"blur(4px)"},children:b("span",{style:{color:"#ffffff",fontSize:`${r}px`,fontFamily:"'Hanken Grotesk', system-ui, sans-serif",fontWeight:500,lineHeight:1.25,textShadow:"0 1px 3px rgba(0,0,0,0.5)",whiteSpace:"pre-wrap",wordWrap:"break-word"},children:c})})})}var eH="(prefers-color-scheme: dark)";function Au(e){let t=de(()=>e&&typeof window<"u"?window.matchMedia(eH):null,[e]),n=ke(i=>t?(t.addEventListener("change",i),()=>t.removeEventListener("change",i)):()=>{},[t]),r=ke(()=>t?.matches?Rd:gl,[t]);return yy(n,r)}function Jh(e){if(!e?.length)return {segmentStarts:[],totalDuration:0};let t=0;return {segmentStarts:e.map(r=>{let i=t;return t+=r.duration,i}),totalDuration:t}}function BE(e,t,n){if(!t?.length)return {segmentIndex:0,segmentStart:0};let r=0,i=0;for(let a=0;a<t.length;a++){let o=n[a]+t[a].duration;if(e<o){r=a,i=n[a];break}a===t.length-1&&(r=a,i=n[a]);}return {segmentIndex:r,segmentStart:i}}var nH=15e3,$E="Audio could not be loaded. Check that the media file is available.";function rH(e,t){return !e||/^(?:[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(e)||!t?e:`${t.replace(/\/$/,"")}/${e.replace(/^\//,"")}`}function HE(e,t,n="",r=true,i="media",a=0){let o=de(()=>i!=="synthetic"||t?.segments?.length||a<=0?t:{...t,segments:[{src:"",name:"synthetic",duration:a,startTime:0}]},[t,i,a]),s=pr(),[l,c]=ge(0),[d,u]=ge(false),[f,m]=ge(0),[h,y]=ge(false),[g,w]=ge(false),[x,v]=ge(0),[T,S]=ge(true),[k,E]=ge(),I=ue([]),_=ue(null),A=ue(null),D=ue(false),B=ue(new Map),q=ue(new Map),F=ue(new Set),P=ue(0),H=ue(void 0);H.current=o?.segments[f]?.src;let $=ue(null),R=ue(0);R.current=f;let z=ue(false);he(()=>{if(P.current+=1,_.current=null,A.current?.(),A.current=null,D.current=false,z.current=false,$.current=null,c(0),m(0),u(false),y(false),w(false),S(true),E(void 0),!r||!o?.segments){I.current=[],v(0);return}let Y=Jh(o.segments);I.current=Y.segmentStarts,v(Y.totalDuration),i==="synthetic"&&w(true);},[o,r,i]);let C=ke(async Y=>{let se=rH(Y,n);if(!rn(se,s))return "";if(B.current.has(Y)){let X=B.current.get(Y);return B.current.delete(Y),B.current.set(Y,X),X}if(q.current.has(Y))return q.current.get(Y);let ye=new AbortController;F.current.add(ye);let pe=P.current,ce=(async()=>{try{let X=await fp(se,{policy:s,signal:ye.signal,contentTypePrefixes:["audio/","video/","application/octet-stream"]}),oe=new Blob([X.bytes.slice().buffer],{type:X.contentType||"application/octet-stream"}),ve=URL.createObjectURL(oe);if(ye.signal.aborted||pe!==P.current)return URL.revokeObjectURL(ve),se;for(B.current.set(Y,ve);B.current.size>2;){let Le=[...B.current.entries()].find(([Ne])=>Ne!==H.current)??B.current.entries().next().value;if(!Le)break;B.current.delete(Le[0]),URL.revokeObjectURL(Le[1]);}return ve}catch{return ""}})();return q.current.set(Y,ce),ce.then(()=>{F.current.delete(ye),q.current.get(Y)===ce&&q.current.delete(Y);}),ce},[n,s]);he(()=>{if(!r||!o?.segments)return;let Y=B.current,se=F.current,ye=q.current;return ()=>{P.current+=1,se.forEach(pe=>pe.abort()),se.clear(),ye.clear(),Y.forEach(pe=>{URL.revokeObjectURL(pe);}),Y.clear();}},[o,C,r]),he(()=>{if(!r||i==="synthetic")return;let Y=o?.segments[f];Y&&C(Y.src);},[o,f,r,i,C]),he(()=>{if(!r||i==="synthetic")return;let Y=e.current;if(!Y)return;let se=()=>{if(z.current)return;let ve=(I.current[f]||0)+Y.currentTime;c(ve);},ye=()=>{u(true);},pe=()=>u(false),ce=()=>{w(true),u(false),S(false),E($E),D.current=false,_.current!==null&&(c(_.current),_.current=null),A.current?.(),A.current=null;},X=()=>{o&&f<o.segments.length-1?(D.current=true,m(oe=>oe+1)):(y(true),u(false));};return Y.addEventListener("timeupdate",se),Y.addEventListener("play",ye),Y.addEventListener("pause",pe),Y.addEventListener("ended",X),Y.addEventListener("error",ce),()=>{Y.removeEventListener("timeupdate",se),Y.removeEventListener("play",ye),Y.removeEventListener("pause",pe),Y.removeEventListener("ended",X),Y.removeEventListener("error",ce);}},[e,f,o,r,i]),he(()=>{if(!r||i==="synthetic")return;let Y=e.current;if(!Y||!o?.segments)return;let se=o.segments[f];if(!se)return;let ye=()=>{if(_.current!==null){let Le=I.current[f]||0,Ne=_.current-Le;Y.currentTime=Math.max(0,Ne),c(_.current),_.current=null,A.current?.(),A.current=null;}D.current&&(Y.play().catch(Le=>{u(false),Le instanceof Error&&Le.name==="NotAllowedError"||(S(false),E("Audio playback failed. Check that the media file is supported and available."));}),D.current=false);},pe=Y.src,ce=$.current,X=!!pe&&ce?.key===se.src&&ce.url===pe,oe=false,ve=null;return X?ye():(async()=>{let Ne=await C(se.src);if(!oe){if(!Ne){Y.removeAttribute("src"),Y.load(),$.current=null,D.current=false,w(true),u(false),S(false),E($E),_.current!==null&&(c(_.current),_.current=null),A.current?.(),A.current=null;return}ve=()=>{oe||(w(true),ye(),ve&&Y.removeEventListener("canplay",ve));},Y.addEventListener("canplay",ve),Y.src=Ne,$.current={key:se.src,url:Y.src},Y.load(),await Promise.resolve(),Y.readyState>=3&&(ve&&Y.removeEventListener("canplay",ve),w(true),ye());}})(),()=>{oe=true,ve&&Y.removeEventListener("canplay",ve);}},[e,f,o,C,r,i]);let U=ke(async Y=>{let se=e.current;if(!o?.segments)return;let ye=x>0?Math.max(0,Math.min(Y,x)):Math.max(0,Y),pe=I.current.length===o.segments.length?I.current:Jh(o.segments).segmentStarts,{segmentIndex:ce,segmentStart:X}=BE(ye,o.segments,pe),oe=i==="synthetic"?d:!se?.paused;if(y(false),!se&&i==="media"){m(ce),c(ye);return}if(ce!==R.current){_.current=ye,D.current=oe;let ve=new Promise(Le=>{A.current?.();let Ne=false,et=()=>{Ne||(Ne=true,clearTimeout(pt),A.current===et&&(A.current=null),Le());},pt=setTimeout(et,nH);A.current=et;});m(ce),i==="synthetic"&&(c(ye),_.current=null,A.current?.(),A.current=null),await ve;}else {let ve=ye-X;se&&i==="media"&&(se.currentTime=Math.max(0,ve)),c(ye);}},[e,o,d,i,x]),V=ke(async()=>{if(i==="synthetic"){z.current=true,u(true);return}let Y=e.current;if(Y){h&&await U(0);try{await Y.play(),z.current=!1,S(!0),E(void 0);}catch(se){z.current=false,u(false),(se instanceof Error?se.name:"")!=="NotAllowedError"&&(S(false),E("Audio playback failed. Check that the media file is supported and available."));}}},[e,h,i,U]),M=ke(()=>{let Y=e.current;Y&&Y.pause(),u(false);},[e]),J=ke(()=>{!e.current&&i==="media"||(d?M():V());},[e,d,i,V,M]),we=ke(Y=>{!o?.segments||Y<0||Y>=o.segments.length||(m(Y),y(false));},[o]),me=ke(async()=>{await U(0),await V();},[U,V]);return he(()=>{if(!d||!z.current||!x)return;let Y=performance.now(),se,ye=pe=>{if(!z.current)return;let ce=(pe-Y)/1e3;Y=pe,c(X=>{let oe=X+ce;return oe>=x?(z.current=false,y(true),u(false),x):oe}),se=requestAnimationFrame(ye);};return se=requestAnimationFrame(ye),()=>cancelAnimationFrame(se)},[d,x]),{currentTime:l,isPlaying:d,currentSegment:f,totalDuration:x,isEnded:h,isReady:g,isAvailable:T,unavailableMessage:k,play:V,pause:async()=>M(),toggle:async()=>J(),seekTo:U,skipToSegment:async Y=>we(Y),restart:me}}var iH={},zE=new Map,aH=0;function oH(e,t,n){let r,i;if(e==="image"){let d=new Image;r=d,i=()=>[d.naturalWidth,d.naturalHeight];}else {let d=document.createElement("video");d.preload="metadata",d.muted=true,r=d,i=()=>[d.videoWidth,d.videoHeight];}let a=e==="image"?"load":"loadedmetadata",o=false,s=()=>{o||(o=true,clearTimeout(c),r.removeEventListener(a,l),r.removeEventListener("error",s),r.removeAttribute("src"),r instanceof HTMLVideoElement&&r.load());},l=()=>{let[d,u]=i();d>0&&u>0&&n(d/u),s();},c=setTimeout(s,8e3);return r.addEventListener(a,l),r.addEventListener("error",s),r.src=t,s}function UE(e,t,n){let r=_i(),i=pr(),a=de(()=>{let c=new Map;for(let d of br(e??[]))if(d.summaryLayout==="feature"){for(let u of Vr(d.contents))c.set(u.src,{kind:"image",source:u.src});for(let u of Gr(d.contents))c.set(u.src,{kind:"video",source:u.src});for(let u of d.contents??[])u.type==="code"&&u.lang?.trim().toLowerCase()==="mermaid"&&c.set(u.value,{kind:"mermaid",source:u.value});}return JSON.stringify([...c.values()])},[e]),o=de(()=>({sourceKey:a,provider:r,policy:i,basePath:t,theme:n}),[a,r,i,t,n]),[s,l]=ge();return he(()=>{if(typeof document>"u")return;let c=true,d=[],u={},f=(h,y)=>{!c||!Number.isFinite(y)||y<=0||(u[h]=y,l({scope:o,ratios:{...u}}));},m=JSON.parse(a);for(let{kind:h,source:y}of m){if(h==="mermaid"){Eu(`squisq-feature-measure-${++aH}`,y,void 0,n).then(({svg:w})=>{if(!c)return;let x=new DOMParser().parseFromString(w,"image/svg+xml").documentElement.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);x?.length===4&&x[2]>0&&x[3]>0&&f(y,x[2]/x[3]);}).catch(()=>{});continue}(async()=>{let w=/^(?:[a-z][a-z0-9+.-]*:|\/\/|\/)/i.test(y),v=w?y:`${t.replace(/\/$/,"")}/${y}`;if(!w&&r)try{v=await r.resolveUrl(y);}catch{}if(!c||!rn(v,i))return;let T=`${h}:${v}`,S=zE.get(T);if(S!==void 0){f(y,S);return}d.push(oH(h,v,k=>{c&&(zE.set(T,k),f(y,k));}));})();}return ()=>{c=false,d.forEach(h=>h());}},[a,r,i,t,n,o]),s?.scope===o?s.ratios:iH}function jE(e,t,n={}){let{viewport:r=Ze.landscape,theme:i,onSeek:a,useAudioSegmentTiming:o=true,deterministicTransitions:s=false,motion:l,basePath:c="."}=n,d=UE(e?.blocks,c,i??tt),u=de(()=>{if(!e?.blocks)return [];let P=e.blocks.some(z=>z.children&&z.children.length>0)?br(e.blocks):e.blocks,H=P.some(tn),$=i??tt,R=is({persistentLayers:e.persistentLayers},$);if(H){let z=o?e.audio?.segments?.map(U=>({startTime:U.startTime,duration:U.duration})):void 0;return vh(P,{audioSegments:z,viewport:r,mediaAspectRatios:d,persistentLayers:R,theme:i,motion:Ji({motion:e.motion,frontmatter:e.frontmatter},$,l),customTemplates:e.customTemplates})}return P.map((z,C)=>{let U=Ka(z,$,C);return U!==z.transition?{...z,transition:U}:z})},[e?.blocks,e?.audio?.segments,e?.persistentLayers,e?.customTemplates,e?.motion,e?.frontmatter,l,d,r,i,o]),f=de(()=>Od(u,t),[u,t]),m=de(()=>f?u.indexOf(f):-1,[u,f]),h=de(()=>f?Math.max(0,t-f.startTime):0,[f,t]),y=de(()=>!f||f.duration===0?0:Math.min(1,h/f.duration),[f,h]),g=de(()=>!e||e.duration===0?0:Math.min(1,t/e.duration),[e,t]),w=ue(null),x=ue(null),v=ue(null),T=ue(null),S=ke(F=>{if(x.current===F){w.current=null,T.current=null;return}T.current=F;},[]);if(f&&f.id!==x.current){let F=T.current===f.id;w.current=F?null:v.current,T.current=null,x.current=f.id;}v.current=f;let k=f?.transition?Zi(f.transition):0,E=!!f&&k>0&&h<k,I=s?m>0?u[m-1]??null:null:w.current,_=E&&I!=null&&I.id!==f?.id,A=_?I:null,D=ke(F=>{if(!e||F<0||F>=u.length)return;let P=u[F];P&&a?.(P.startTime);},[e,u,a]),B=ke(()=>{if(m<u.length-1)return D(m+1)},[m,u.length,D]),q=ke(()=>{if(m>0)return D(m-1)},[m,D]);return {currentBlock:f,currentBlockIndex:m,previousBlock:A,isEntering:E,isExiting:_,blockTime:h,blockProgress:y,docProgress:g,nextBlock:B,prevBlock:q,goToBlock:D,suppressOutgoingForNextBlock:S,blocks:u}}function sH(e,t){let n=e/t;return n>1.2?"landscape":n<.83?"portrait":"square"}function lH(e){switch(e){case "portrait":return Ze.portrait;case "square":return Ze.square;default:return Ze.landscape}}function WE(){let[e,t]=ge(()=>({width:typeof window<"u"?window.innerWidth:1920,height:typeof window<"u"?window.innerHeight:1080}));he(()=>{if(typeof window>"u")return;let i=()=>{t({width:window.innerWidth,height:window.innerHeight});},a,o=()=>{clearTimeout(a),a=setTimeout(i,100);};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),clearTimeout(a);}},[]);let n=de(()=>sH(e.width,e.height),[e.width,e.height]);return {viewport:de(()=>lH(n),[n]),orientation:n,windowSize:e}}var cH=.3,uH=.5,dH=12,mH=.35,fH=260;function pH({dx:e,width:t,elapsedMs:n,canNext:r,canPrev:i}){let a=t>0?t*cH:1/0,o=n>0?Math.abs(e)/n:0,s=Math.abs(e)>=a,l=o>=uH&&Math.abs(e)>=dH;return !s&&!l?"snap":e<0?r?"next":"snap":e>0&&i?"prev":"snap"}function VE(e){let t=e.settleMs??fH,[n,r]=ge(0),[i,a]=ge("idle"),o=ue(e);o.current=e;let s=ue(null),l=ue("idle");l.current=i;let c=ue(null),d=ue(null),u=ke(()=>{c.current!=null&&(clearTimeout(c.current),c.current=null),d.current!=null&&(cancelAnimationFrame(d.current),d.current=null);},[]),f=ke(m=>{if(!o.current.enabled||l.current==="settling"||m.pointerType==="mouse"&&m.button!==0)return;let y=m.target;if(!y.closest?.("button, a, input, textarea, select, [data-no-swipe]")){s.current={pointerId:m.pointerId,startX:m.clientX,startTime:performance.now(),target:y};try{y.setPointerCapture?.(m.pointerId);}catch{}a("dragging"),r(0);}},[]);return he(()=>{function m(){return o.current.containerRef.current?.getBoundingClientRect().width??0}function h(v){s.current=null;try{v.target.releasePointerCapture?.(v.pointerId);}catch{}}function y(v,T){a("settling"),d.current=requestAnimationFrame(()=>{d.current=null,r(v),c.current=setTimeout(()=>{c.current=null,T?.(),r(0),a("idle");},t);});}function g(v){let T=s.current;if(!T||v.pointerId!==T.pointerId)return;let S=o.current,k=v.clientX-T.startX,E=k>0&&!S.canGoPrev||k<0&&!S.canGoNext;r(E?k*mH:k);}function w(v){let T=s.current;if(!T||v.pointerId!==T.pointerId)return;h(T);let S=o.current,k=v.clientX-T.startX,E=m(),I=performance.now()-T.startTime,_=pH({dx:k,width:E,elapsedMs:I,canNext:S.canGoNext,canPrev:S.canGoPrev});if(_==="snap"){y(0);return}let A=Math.max(E,Math.abs(k)),D=_==="next"?-A:A;y(D,_==="next"?S.onNext:S.onPrev);}function x(v){let T=s.current;!T||v.pointerId!==T.pointerId||(h(T),y(0));}return window.addEventListener("pointermove",g),window.addEventListener("pointerup",w),window.addEventListener("pointercancel",x),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",x);}},[t]),he(()=>{e.enabled||(s.current=null,u(),a("idle"),r(0));},[e.enabled,u]),he(()=>u,[u]),{offsetPx:n,phase:i,onPointerDown:f}}function ji(e){let t=Math.floor(e/60),n=Math.floor(e%60);return `${t}:${n.toString().padStart(2,"0")}`}function Cu({state:e,actions:t,blockMarkers:n,expandedBlocks:r,getBlockTitle:i}){let a=ue(null),[o,s]=ge(null),l=e.totalDuration>0?Math.max(0,Math.min(1,e.currentTime/e.totalDuration)):0,c=ke(h=>{let y=a.current;if(!y)return;let g=y.getBoundingClientRect(),w=h.clientX-g.left,x=Math.max(0,Math.min(1,w/g.width));s(x);},[]),d=ke(()=>{s(null);},[]),u=ke(h=>{let y=null;switch(h.key){case "ArrowLeft":case "ArrowDown":y=e.currentTime-5;break;case "ArrowRight":case "ArrowUp":y=e.currentTime+5;break;case "Home":y=0;break;case "End":y=e.totalDuration;break}y!=null&&(h.preventDefault(),t.seekTo(Math.max(0,Math.min(e.totalDuration,y))));},[t,e.currentTime,e.totalDuration]),f=ke(h=>{for(let y=r.length-1;y>=0;y--){let g=r[y];if(h>=g.startTime)return {block:g,index:y}}return r.length>0?{block:r[0],index:0}:null},[r]),m=-1;for(let h of n)h.isSectionStart&&h.block.startTime<=e.currentTime&&(m=h.index);return b("div",{ref:a,role:"group","aria-label":"Playback timeline",style:{flex:1,height:"24px",cursor:"pointer",position:"relative",display:"flex",alignItems:"center"},onClick:h=>{let y=h.currentTarget.getBoundingClientRect(),w=(h.clientX-y.left)/y.width;t.seekTo(w*e.totalDuration);},onMouseMove:c,onMouseLeave:d,children:[b("div",{role:"slider",tabIndex:0,"aria-label":"Playback position","aria-valuemin":0,"aria-valuemax":e.totalDuration,"aria-valuenow":Math.max(0,Math.min(e.totalDuration,e.currentTime)),"aria-valuetext":`${ji(e.currentTime)} of ${ji(e.totalDuration)}`,onKeyDown:u,style:{position:"absolute",left:0,right:0,height:"6px",background:"rgba(255,255,255,0.2)",borderRadius:"3px"}}),b("div",{"data-testid":"doc-progress-fill",style:{position:"absolute",left:0,width:`${l*100}%`,height:"6px",background:"#5b9bd5",borderRadius:"3px"}}),n.map((h,y)=>{let g=h.isSectionStart,w=g?h.index===m:h.index===e.currentBlockIndex;return b("button",{type:"button","data-marker":g?"chapter":"slide",tabIndex:g?0:-1,style:{position:"absolute",left:`${h.position}%`,transform:"translateX(-50%)",boxSizing:"border-box",borderRadius:"50%",cursor:"pointer",transition:"transform 0.15s, background-color 0.15s",...g?{width:"14px",height:"14px",padding:0,backgroundColor:w?"#ffffff":"rgba(255,255,255,0.75)",border:"2px solid #5b9bd5",boxShadow:"0 1px 3px rgba(0,0,0,0.5)",zIndex:3}:{width:"12px",height:"12px",padding:"3px",backgroundClip:"content-box",backgroundColor:w?"#ffffff":"rgba(255,255,255,0.55)",border:"none",zIndex:2}},title:h.title,"aria-label":`Seek to ${h.title}`,onClick:x=>{x.stopPropagation(),t.seekTo(h.block.startTime);},onMouseEnter:x=>{x.currentTarget.style.transform="translateX(-50%) scale(1.3)";},onMouseLeave:x=>{x.currentTarget.style.transform="translateX(-50%)";}},`${h.block.id}-${y}`)}),o!==null&&b("div",{style:{position:"absolute",left:`${o*100}%`,bottom:"100%",transform:"translateX(-50%)",marginBottom:"8px",padding:"6px 10px",background:"rgba(0,0,0,0.9)",borderRadius:"4px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:10},children:[b("div",{style:{color:"white",fontSize:"12px",fontFamily:"monospace"},children:ji(o*e.totalDuration)}),(()=>{let h=o*e.totalDuration,y=f(h);return y&&i?b("div",{style:{color:"rgba(255,255,255,0.7)",fontSize:"11px",marginTop:"2px"},children:i(y.block)}):null})()]}),o!==null&&b("div",{style:{position:"absolute",left:`${o*100}%`,top:"50%",transform:"translate(-50%, -50%)",width:"2px",height:"16px",background:"rgba(255,255,255,0.6)",pointerEvents:"none",zIndex:1}})]})}function GE({state:e,actions:t,blockMarkers:n,expandedBlocks:r,getBlockTitle:i}){return b("div",{className:"doc-player__controls",style:{position:"absolute",bottom:0,left:0,right:0,padding:"12px 16px",background:"linear-gradient(transparent, rgba(0,0,0,0.8))",display:"flex",alignItems:"center",gap:"8px",zIndex:100},children:[b("button",{onClick:t.restart,style:{background:"none",border:"none",color:"rgba(255,255,255,0.7)",cursor:"pointer",padding:"8px",fontSize:"14px",display:"flex",alignItems:"center"},title:"Restart","aria-label":"Restart from beginning",children:b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"})})}),b("button",{onClick:t.toggle,style:{background:"rgba(255,255,255,0.2)",border:"none",borderRadius:"50%",color:"white",cursor:"pointer",padding:"10px",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px"},"aria-label":e.isPlaying?"Pause":"Play",children:e.isPlaying?b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"20",height:"20",children:b("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"})}):b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"20",height:"20",children:b("path",{d:"M8 5v14l11-7z"})})}),b("span",{style:{color:"white",fontSize:"12px",minWidth:"80px",fontFamily:"monospace"},children:[ji(e.currentTime)," / ",ji(e.totalDuration)]}),b(Cu,{state:e,actions:t,blockMarkers:n,expandedBlocks:r,getBlockTitle:i}),b("span",{style:{color:"rgba(255,255,255,0.5)",fontSize:"11px",whiteSpace:"nowrap"},children:[e.currentBlockIndex+1,"/",e.totalBlocks]}),e.hasCaptions&&b("button",{onClick:()=>t.cycleCaptionMode(),style:{background:e.captionMode!=="off"?"rgba(255,255,255,0.2)":"none",border:"none",color:e.captionMode!=="off"?"white":"rgba(255,255,255,0.5)",cursor:"pointer",padding:"8px",fontSize:"12px",display:"flex",alignItems:"center",gap:"4px",borderRadius:"4px"},title:e.captionMode==="off"?"Captions: Off (click for Standard)":e.captionMode==="standard"?"Captions: Standard (click for Social)":"Captions: Social (click to turn off)","aria-label":"Cycle caption style",children:[b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M19 4H5a2 2 0 00-2 2v12a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1a1 1 0 01-1 1H7a1 1 0 01-1-1v-4a1 1 0 011-1h3a1 1 0 011 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1a1 1 0 01-1 1h-3a1 1 0 01-1-1v-4a1 1 0 011-1h3a1 1 0 011 1v1z"})}),e.captionMode!=="off"&&b("span",{style:{fontSize:"10px",textTransform:"uppercase",letterSpacing:"0.5px"},children:e.captionMode==="standard"?"CC":"SM"})]}),t.toggleFullscreen&&b("button",{onClick:t.toggleFullscreen,style:{background:e.isFullscreen?"rgba(255,255,255,0.2)":"none",border:"none",color:e.isFullscreen?"white":"rgba(255,255,255,0.5)",cursor:"pointer",padding:"8px",display:"flex",alignItems:"center",borderRadius:"4px"},title:e.isFullscreen?"Exit fullscreen (F)":"Fullscreen (F)","aria-label":e.isFullscreen?"Exit fullscreen":"Enter fullscreen",children:e.isFullscreen?b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"})}):b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})}function YE({state:e,slideNav:t,slides:n=[],pickerOpen:r,onPickerOpenChange:i}){let[a,o]=ge(false),s=r??a,l=ke(I=>{r===void 0&&o(I),i?.(I);},[r,i]),[c,d]=ge(280),u=ue(null),f=ue(null),m=ue(null),h=Wt(),{currentBlockIndex:y,currentSlideLabel:g,currentSlideNumber:w,totalBlocks:x,totalSlideNumber:v}=e,T=y<=0,S=y>=x-1,k=x>0?g??`${w??y+1} / ${v??x}`:"\u2014";he(()=>{if(!s)return;let I=A=>{u.current?.contains(A.target)||l(false);},_=A=>{A.key==="Escape"&&(A.preventDefault(),l(false),f.current?.focus());};return document.addEventListener("pointerdown",I),document.addEventListener("keydown",_),()=>{document.removeEventListener("pointerdown",I),document.removeEventListener("keydown",_);}},[s,l]),bn(()=>{if(!s)return;let I=u.current,_=I?.closest(".doc-player")??I?.parentElement;if(!I||!_)return;let A=()=>{let B=I.getBoundingClientRect(),q=_.getBoundingClientRect(),F=Math.floor(B.top-q.top-8-16);d(Math.max(72,F));};A();let D=typeof ResizeObserver>"u"?null:new ResizeObserver(A);return D?.observe(_),D?.observe(I),window.addEventListener("resize",A),()=>{D?.disconnect(),window.removeEventListener("resize",A);}},[s]),he(()=>{s&&m.current?.querySelector('[aria-current="true"]')?.focus();},[s]);let E=I=>{if(!["ArrowDown","ArrowUp","Home","End"].includes(I.key))return;let _=Array.from(m.current?.querySelectorAll('[role="menuitem"]')??[]);if(_.length===0)return;I.preventDefault();let A=_.indexOf(document.activeElement),D=A;I.key==="Home"?D=0:I.key==="End"?D=_.length-1:I.key==="ArrowDown"?D=(A+1)%_.length:D=(A-1+_.length)%_.length,_[D]?.focus();};return b("div",{ref:u,className:"doc-controls-slideshow","data-testid":"slideshow-controls",style:{position:"absolute",bottom:"16px",right:"16px",display:"flex",alignItems:"center",gap:"2px",background:"rgba(0, 0, 0, 0.65)",borderRadius:"8px",padding:"4px 6px",zIndex:100,userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[b("button",{onClick:I=>{I.stopPropagation(),t.prevSlide();},disabled:T,"data-testid":"slide-prev","aria-label":"Previous slide",title:"Previous slide",style:{background:"none",border:"none",color:T?"rgba(255,255,255,0.3)":"rgba(255,255,255,0.9)",cursor:T?"default":"pointer",padding:"6px 8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"background 0.15s"},onMouseEnter:I=>{T||(I.currentTarget.style.background="rgba(255,255,255,0.1)");},onMouseLeave:I=>{I.currentTarget.style.background="none";},children:b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),b("button",{ref:f,type:"button","data-testid":"slide-counter","aria-label":`Choose slide, current ${k}`,"aria-haspopup":"menu","aria-expanded":s,"aria-controls":s?h:void 0,title:"Choose slide",disabled:n.length===0,onClick:I=>{I.stopPropagation(),l(!s);},style:{background:s?"rgba(255,255,255,0.12)":"none",border:"none",color:"rgba(255,255,255,0.9)",cursor:n.length>0?"pointer":"default",fontSize:"13px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontVariantNumeric:"tabular-nums",minWidth:"48px",textAlign:"center",padding:"6px 4px",letterSpacing:"0.02em",borderRadius:"4px",transition:"background 0.15s"},children:k}),s&&b("div",{ref:m,id:h,role:"menu","aria-label":"Choose a slide","data-testid":"slide-picker",onClick:I=>I.stopPropagation(),onKeyDown:E,style:{position:"absolute",right:0,bottom:"calc(100% + 8px)",width:"min(280px, calc(100vw - 32px))",maxHeight:`${c}px`,overflowY:"auto",padding:"6px",background:"rgba(20, 20, 20, 0.94)",border:"1px solid rgba(255,255,255,0.14)",borderRadius:"8px",boxShadow:"0 10px 30px rgba(0,0,0,0.38)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)"},children:n.map((I,_)=>{let A=_===y;return b("button",{type:"button",role:"menuitem","aria-current":A?"true":void 0,"data-testid":`slide-picker-item-${_}`,onClick:()=>{t.goToSlide(_),l(false);},style:{display:"grid",gridTemplateColumns:"42px minmax(0, 1fr)",alignItems:"center",gap:"8px",width:"100%",padding:"8px 10px",background:A?"rgba(255,255,255,0.14)":"transparent",border:"none",borderRadius:"5px",color:"rgba(255,255,255,0.94)",cursor:"pointer",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',textAlign:"left"},onMouseEnter:D=>{D.currentTarget.style.background="rgba(255,255,255,0.1)";},onMouseLeave:D=>{D.currentTarget.style.background=A?"rgba(255,255,255,0.14)":"transparent";},children:[b("span",{style:{color:A?"#fff":"rgba(255,255,255,0.58)",fontSize:"12px",fontVariantNumeric:"tabular-nums",textAlign:"right"},children:I.label}),b("span",{style:{minWidth:0,overflow:"hidden",color:A?"#fff":"rgba(255,255,255,0.82)",fontSize:"13px",lineHeight:1.3,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:I.summary})]},`${I.id}-${_}`)})}),b("button",{onClick:I=>{I.stopPropagation(),t.nextSlide();},disabled:S,"data-testid":"slide-next","aria-label":"Next slide",title:"Next slide",style:{background:"none",border:"none",color:S?"rgba(255,255,255,0.3)":"rgba(255,255,255,0.9)",cursor:S?"default":"pointer",padding:"6px 8px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",transition:"background 0.15s"},onMouseEnter:I=>{S||(I.currentTarget.style.background="rgba(255,255,255,0.1)");},onMouseLeave:I=>{I.currentTarget.style.background="none";},children:b("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18",children:b("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})})})]})}function eg(e){return e?Object.keys(e).map(t=>t.trim().toLowerCase()):[]}var hH={theme:tt,pageStyle:Ui(tt),basePath:"/",viewport:Ze.landscape,renderContext:{theme:tt},animationsEnabled:true,imageDisplayMode:"inline",showCodeCopyButton:false},tg=ar(hH);function Tn(){return _r(tg)}function XE({section:e}){let{renderContext:t,basePath:n,animationsEnabled:r,theme:i}=Tn(),a=e.slots.media,o=a?.type==="canvas"?a:void 0,s=de(()=>{if(!o)return null;let{layers:u}=us(o.block,{...t,blockIndex:e.index});return {...o.block,layers:u}},[o,t,e.index]);if(!o||!s)return null;let l=o.aspect,d=e.hints?.frame==="terminal"?" squisq-page-canvas--terminal squisq-page-canvas--framed":" squisq-page-canvas--framed";return b("div",{className:`squisq-page-canvas${d}`,style:{aspectRatio:`${l.width} / ${l.height}`,maxHeight:"min(70vh, 720px)",maxWidth:`calc(min(70vh, 720px) * ${(l.width/Math.max(1,l.height)).toFixed(4)})`},children:b(Jt,{block:s,blockTime:0,basePath:n,viewport:{width:l.width,height:l.height},animationsEnabled:r,theme:i})})}new TextDecoder;new TextEncoder;new TextDecoder;new TextEncoder;new TextDecoder;new TextEncoder;var gH=10,yH=100;function rg(e){let t=e instanceof Uint8Array?e:new Uint8Array(e);return wH(t)??kH(t)??xH(t)}var bH=new Set(["gif","webp","apng"]),KE=/^image\/(?:gif|webp|apng)(?=$|[;,\s])/i;function xs(e){let t=e.trim();if(!t)return false;if(/^data:/i.test(t))return KE.test(t.slice(5));if(KE.test(t))return true;let n=t.split(/[?#]/,1)[0]??"",r=n.lastIndexOf(".");return r<0||r<n.lastIndexOf("/")?false:bH.has(n.slice(r+1).toLowerCase())}function wH(e){if(e.length<13||e[0]!==71||e[1]!==73||e[2]!==70||e[3]!==56||e[4]!==55&&e[4]!==57||e[5]!==97)return null;let t=13+QE(e[10]),n=0,r=0,i=0,a=1;for(;t<e.length;){let o=e[t++];if(o===59)break;if(o===33){if(t>=e.length)break;let s=e[t++];if(s===249&&t+3<e.length&&e[t]>=4)i=(e[t+2]|e[t+3]<<8)*10;else if(s===255&&e[t]===11&&t+12<=e.length){let l=ks(e,t+1,11),c=t+12;if((l==="NETSCAPE2.0"||l==="ANIMEXTS1.0")&&c+3<e.length&&e[c]>=3&&e[c+1]===1){let d=e[c+2]|e[c+3]<<8;a=d===0?0:d+1;}}if(t=ZE(e,t),t<0)break;continue}if(o===44){if(t+9>e.length)break;let s=e[t+8];if(t+=9+QE(s),t+=1,n++,r+=ag(i),i=0,t=ZE(e,t),t<0)break;continue}break}return ig("gif",n,r,a)}function QE(e){return e&128?3*(1<<(e&7)+1):0}function ZE(e,t){let n=t;for(;n<e.length;){let r=e[n];if(n+=1,r===0)return n;n+=r;}return -1}var Iu=[137,80,78,71,13,10,26,10];function kH(e){if(e.length<Iu.length)return null;for(let o=0;o<Iu.length;o++)if(e[o]!==Iu[o])return null;let t=Iu.length,n=false,r=1,i=1,a=0;for(;t+8<=e.length;){let o=ng(e,t),s=ks(e,t+4,4),l=t+8;if(s==="acTL"&&o>=8&&l+8<=e.length)n=true,r=ng(e,l),i=ng(e,l+4);else if(s==="fcTL"&&o>=26&&l+26<=e.length){let c=JE(e,l+20),d=JE(e,l+22)||100;a+=ag(c*1e3/d);}else {if(s==="IDAT"&&!n)break;if(s==="IEND")break}t=l+o+4;}return ig("png",n?r:1,a,i)}function xH(e){if(e.length<12||ks(e,0,4)!=="RIFF"||ks(e,8,4)!=="WEBP")return null;let t=12,n=false,r=0,i=0,a=null;for(;t+8<=e.length;){let s=ks(e,t,4),l=vH(e,t+4),c=t+8;if(s==="VP8X"&&l>=10&&c<e.length){if(n=(e[c]&2)!==0,!n)break}else if(s==="ANIM"&&l>=6&&c+6<=e.length)a=e[c+4]|e[c+5]<<8;else if(s==="ANMF"&&l>=16&&c+15<=e.length)r++,i+=ag(e[c+12]|e[c+13]<<8|e[c+14]<<16);else if((s==="VP8 "||s==="VP8L")&&!n)break;t=c+l+(l&1);}return ig("webp",n?r:1,i,a??0)}function ig(e,t,n,r){let i=t>1;return {format:e,animated:i,frameCount:Math.max(t,1),durationMs:i?Math.round(n):0,playCount:i?r:1}}function ag(e){return e<=gH?yH:e}function ks(e,t,n){let r="";for(let i=t;i<t+n&&i<e.length;i++)r+=String.fromCharCode(e[i]);return r}function JE(e,t){return e[t]<<8|e[t+1]}function ng(e,t){return (e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function vH(e,t){return (e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}var TH=ar(null);function tS(){return _r(TH)}function Mu({src:e,basePath:t="",width:n,height:r,poster:i,controls:a=true,preload:o="metadata",className:s}){let l=gt(e,t),c=gt(i??"",t),d=i?c:void 0;return l?b("span",{className:`squisq-inline-video-player ${s??""}`.trim(),children:b("video",{src:l,poster:d,controls:a,preload:o,width:n,height:r,playsInline:true})}):null}function nS({src:e,basePath:t="",controls:n=true,preload:r="metadata",className:i}){let a=gt(e,t);return a?b("span",{className:`squisq-inline-audio-player ${i??""}`.trim(),children:b("audio",{src:a,controls:n,preload:r})}):null}var EH={gif:"GIF",webp:"WEBP",png:"APNG"};function rS({playback:e,imageRef:t}){let n=ue(null),{info:r,status:i,displaySrc:a}=e,o=i==="paused",s=r?.animated??false;if(bn(()=>{if(!o||!s)return;let c=t.current,d=n.current;if(!c||!d)return;let u=()=>{!c.naturalWidth||!c.naturalHeight||(d.width=c.naturalWidth,d.height=c.naturalHeight,d.getContext("2d")?.drawImage(c,0,0));};if(c.complete&&c.naturalWidth){u();return}return c.addEventListener("load",u,{once:true}),()=>c.removeEventListener("load",u)},[o,s,a,t]),!r||!s)return null;let l=i==="playing"?"Pause animation":i==="ended"?"Replay animation":"Play animation";return b(Pe,{children:[o&&b("canvas",{ref:n,className:"squisq-animated-image-still","aria-hidden":"true",style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"}}),b("button",{type:"button",className:"squisq-animated-image-toggle","data-status":i,"aria-label":l,title:l,style:{position:"absolute",top:8,left:8},onMouseDown:c=>c.preventDefault(),onClick:c=>{c.preventDefault(),c.stopPropagation(),i==="playing"?e.pause():e.play();},children:[b(SH,{status:i}),b("span",{className:"squisq-animated-image-format",children:EH[r.format]})]})]})}function SH({status:e}){return b("svg",{viewBox:"0 0 12 12","aria-hidden":"true",focusable:"false",children:b("path",{d:e==="playing"?"M2.5 1.5h2.75v9H2.5zM6.75 1.5H9.5v9H6.75z":e==="ended"?"M6 1.5V0L3.5 2.25 6 4.5V3a3 3 0 1 1-3 3H1.5A4.5 4.5 0 1 0 6 1.5z":"M3 1.5v9l7.5-4.5z"})})}var _H=64,vs=new Map;function AH(e){let t=vs.get(e);if(t)return t;let n=fetch(e).then(r=>r.ok?r.arrayBuffer():null).then(r=>r?rg(r):null).catch(()=>null);if(!/^data:/i.test(e)&&(vs.set(e,n),vs.size>_H)){let r=vs.keys().next().value;r!==void 0&&vs.delete(r);}return n}function CH(e){if(/^(?:blob|data):/i.test(e))return e;if(typeof document>"u")return null;try{let t=new URL(e,document.baseURI);return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.origin===window.location.origin?t.href:null}catch{return null}}function IH(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function iS(){return IH()?"paused":"playing"}function aS(e,t){let[n,r]=ge(null),[i,a]=ge(iS),[o,s]=ge(null),[l,c]=ge(0),d=ue(0),u=ue(null),f=ke(y=>{u.current&&URL.revokeObjectURL(u.current),u.current=y,s(y);},[]);he(()=>{r(null);let y=t&&xs(e)?CH(t):null;if(!y)return;let g=false;return AH(y).then(w=>{g||r(w);}),()=>{g=true;}},[e,t]),he(()=>{d.current++,f(null),a(iS());},[t,f]),he(()=>()=>{u.current&&URL.revokeObjectURL(u.current);},[]),he(()=>{if(i!=="playing"||!n?.animated||n.playCount===0)return;let y=setTimeout(()=>a("ended"),n.durationMs*n.playCount);return ()=>clearTimeout(y)},[i,n,l]);let m=ke(()=>{let y=++d.current,g=w=>{if(y!==d.current){w&&URL.revokeObjectURL(w);return}w&&f(w),a("playing"),c(x=>x+1);};fetch(o??t).then(w=>w.blob()).then(w=>g(URL.createObjectURL(w)),()=>g(null));},[o,t,f]),h=ke(()=>{d.current++,a("paused");},[]);return {info:n,animated:n?.animated??false,displaySrc:o??t,status:i,play:m,pause:h}}var $a={htmlPolicy:"sanitize"},MH={idle:"Copy",copying:"Copying\u2026",copied:"Copied",failed:"Copy failed"};async function qH(e,t,n){if(n){await n(e,t===void 0?{}:{language:t});return}if(typeof navigator>"u"||!navigator.clipboard?.writeText)throw new Error("Clipboard access is unavailable in this host");await navigator.clipboard.writeText(e);}function oS({value:e,language:t,ctx:n}){let[r,i]=ge("idle"),a=ue();he(()=>()=>{a.current!==void 0&&clearTimeout(a.current);},[]);let o=b("pre",{className:"squisq-md-code-block",children:b("code",{className:t?`language-${t}`:void 0,children:e})});if(!n.showCodeCopyButton)return o;let s=async()=>{if(r!=="copying"){i("copying");try{await qH(e,t??void 0,n.onCopyCode),i("copied");}catch{i("failed");}a.current!==void 0&&clearTimeout(a.current),a.current=setTimeout(()=>i("idle"),1600);}};return b("div",{className:"squisq-md-code-frame",children:[o,b("button",{type:"button",className:"squisq-md-code-copy","data-copy-state":r,disabled:r==="copying",onClick:()=>{s();},"aria-label":"Copy code to clipboard",children:MH[r]})]})}var og=class extends un{constructor(){super(...arguments);this.state={failed:false};}static getDerivedStateFromError(){return {failed:true}}render(){return this.state.failed?this.props.fallback:this.props.children}};function LH({node:e,lang:t,ctx:n}){let r=n.fenceRenderers?.[t];return r?b("div",{className:`squisq-md-fence-widget squisq-md-fence-widget-${t}`,"data-fence-lang":t,children:r({lang:t,...e.meta!=null?{meta:e.meta}:{},value:e.value,...n.theme?{theme:n.theme}:{},mode:"read"})}):null}function zt(e,t="",n=$a){return e.map((r,i)=>{let a=`${t}i${i}`;switch(r.type){case "text":{if(!r.value.includes(`
|
|
741
741
|
`))return b(Pe,{children:r.value},a);let o=r.value.split(`
|
|
742
|
-
`);return b(Pe,{children:o.map((s,l)=>b(Pe,{children:[l>0&&b("br",{}),s]},l))},a)}case "emphasis":return b("em",{className:"squisq-md-em",children:zt(r.children,a,n)},a);case "strong":return b("strong",{className:"squisq-md-strong",children:zt(r.children,a,n)},a);case "delete":return b("del",{className:"squisq-md-del",children:zt(r.children,a,n)},a);case "superscript":return b("sup",{className:"squisq-md-sup",children:zt(r.children,a,n)},a);case "subscript":return b("sub",{className:"squisq-md-sub",children:zt(r.children,a,n)},a);case "inlineCode":return b("code",{className:"squisq-md-inline-code",children:r.value},a);case "link":{if(n.accessoryPaths?.has(r.url))return b("span",{className:"squisq-md-attachment","data-attachment-path":r.url,title:r.title??`Attachment: ${r.url}`,children:[b("i",{className:"fa-solid fa-paperclip","aria-hidden":"true"}),b("span",{className:"squisq-md-attachment-label",children:zt(r.children,a,n)})]},a);let o=qt(r.url,"link",{extraLinkSchemes:n.linkSchemes});return o?b("a",{className:"squisq-md-link",href:o,title:r.title??void 0,target:"_blank",rel:"noopener noreferrer",children:zt(r.children,a,n)},a):b("span",{className:"squisq-md-link squisq-md-link--blocked",children:zt(r.children,a,n)},a)}case "image":return b(PH,{src:r.url,alt:r.alt??"",title:r.title??void 0},a);case "break":return b("br",{},a);case "inlineMath":return b("code",{className:"squisq-md-inline-math",children:r.value},a);case "inlineIcon":return b("i",{className:`fa-${r.family} fa-${r.name}`,"data-icon":r.token,"aria-hidden":"true"},a);case "htmlInline":return n.htmlPolicy==="strip"?null:b("span",{className:"squisq-md-html-inline",children:sg(cS(r.htmlChildren,n.htmlPolicy),`${a}h`,n)},a);case "footnoteReference":return b("sup",{className:"squisq-md-footnote-ref",children:b("a",{href:`#fn-${r.identifier}`,children:["[",r.label??r.identifier,"]"]})},a);case "linkReference":return b("span",{className:"squisq-md-link-ref",children:zt(r.children,a,n)},a);case "imageReference":return b("span",{className:"squisq-md-image-ref",children:["[",r.alt??r.identifier,"]"]},a);case "textDirective":return b("span",{className:"squisq-md-text-directive","data-directive":r.name,children:zt(r.children,a,n)},a);case "mention":return b("span",{className:"squisq-md-mention mention","data-mention":"true","data-kind":r.targetKind,"data-id":r.targetId,"data-label":r.displayName,children:["@",r.displayName]},a);default:return null}})}function qH(e,t,n=$a){switch(e.type){case "paragraph":return b("p",{className:"squisq-md-p",children:zt(e.children,t,n)},t);case "heading":{let r=`h${e.depth}`;return b(r,{className:`squisq-md-heading squisq-md-h${e.depth}`,children:zt(e.children,t,n)},t)}case "blockquote":return b("blockquote",{className:"squisq-md-blockquote",children:Ba(e.children,t,n)},t);case "list":return e.ordered?b("ol",{className:"squisq-md-list squisq-md-ol",start:e.start??void 0,children:e.children.map((r,i)=>sS(r,`${t}li${i}`,n))},t):b("ul",{className:"squisq-md-list squisq-md-ul",children:e.children.map((r,i)=>sS(r,`${t}li${i}`,n))},t);case "code":{let r=e.lang?.trim().toLowerCase();return r&&n.fenceRenderers?.[r]?b(og,{fallback:b(oS,{value:e.value,language:e.lang,ctx:n}),children:b(MH,{node:e,lang:r,ctx:n})},t):r==="mermaid"?b(Su,{source:e.value,className:"squisq-md-mermaid",ariaLabel:"Mermaid diagram",theme:n.theme},t):b(oS,{value:e.value,language:e.lang,ctx:n},t)}case "thematicBreak":return b("hr",{className:"squisq-md-hr"},t);case "table":return LH(e.children,e.align,t,n);case "htmlBlock":return n.htmlPolicy==="strip"?null:b("div",{className:"squisq-md-html-block",children:sg(cS(e.htmlChildren,n.htmlPolicy),`${t}h`,n)},t);case "math":return b("pre",{className:"squisq-md-math-block",children:b("code",{children:e.value})},t);case "definition":return null;case "footnoteDefinition":return b("div",{className:"squisq-md-footnote-def",id:`fn-${e.identifier}`,children:[b("sup",{children:e.label??e.identifier}),Ba(e.children,t,n)]},t);case "containerDirective":return b("div",{className:`squisq-md-directive squisq-md-directive-${e.name}`,"data-directive":e.name,children:[e.label&&b("div",{className:"squisq-md-directive-label",children:e.label}),Ba(e.children,t,n)]},t);case "leafDirective":return b("div",{className:`squisq-md-directive squisq-md-directive-${e.name}`,"data-directive":e.name,children:zt(e.children,t,n)},t);case "definitionList":return b("dl",{className:"squisq-md-dl",children:e.children.map((r,i)=>r.type==="definitionTerm"?b("dt",{className:"squisq-md-dt",children:zt(r.children,`${t}dt${i}`,n)},`${t}dt${i}`):b("dd",{className:"squisq-md-dd",children:Ba(r.children,`${t}dd${i}`,n)},`${t}dd${i}`))},t);default:return null}}function sS(e,t,n=$a){let r=e.checked!==null&&e.checked!==void 0;return b("li",{className:`squisq-md-li${r?" squisq-md-task":""}`,children:[r&&b("input",{type:"checkbox",checked:!!e.checked,readOnly:true,className:"squisq-md-checkbox"}),Ba(e.children,t,n)]},t)}function LH(e,t,n,r=$a){let[i,...a]=e;return b("table",{className:"squisq-md-table",children:[i&&b("thead",{children:b("tr",{children:i.children.map((o,s)=>b("th",{className:"squisq-md-th",style:t?.[s]?{textAlign:t[s]}:void 0,children:zt(o.children,`${n}th${s}`,r)},`${n}th${s}`))})}),a.length>0&&b("tbody",{children:a.map((o,s)=>b("tr",{children:o.children.map((l,c)=>b("td",{className:"squisq-md-td",style:t?.[c]?{textAlign:t[c]}:void 0,children:zt(l.children,`${n}td${s}-${c}`,r)},`${n}td${s}-${c}`))},`${n}tr${s}`))})]},n)}function Ba(e,t="",n=$a){return e.map((r,i)=>qH(r,`${t}b${i}`,n))}function PH({src:e,alt:t,title:n}){let r=qt(e,"media"),i=gt(r??"","."),a=ue(null),o=aS(r??"",i);return r?xs(r)?b("span",{className:"squisq-animated-image","data-animated":o.animated?"true":void 0,style:{position:"relative",display:"inline-block",maxWidth:"100%"},children:[b("img",{ref:a,className:"squisq-md-image",src:o.displaySrc,alt:t,title:n,style:{display:"block",maxWidth:"100%"}}),b(rS,{playback:o,imageRef:a})]}):b("img",{className:"squisq-md-image",src:i,alt:t,title:n}):null}function cS(e,t){return t==="strip"?[]:t==="trusted"?e:ta(e)}var RH=new Set(["base","embed","iframe","link","meta","object","script","style","title"]),NH={class:"className",id:"id",title:"title",style:"style",width:"width",height:"height",src:"src",alt:"alt",loading:"loading",decoding:"decoding",href:"href",target:"target",rel:"rel"},DH=new Set(["","_self","_parent","_top"]);function OH(e,t){let n={};for(let[r,i]of Object.entries(e)){let a=NH[r];if(a){if(a==="style"){n["data-style"]=i;continue}if(a==="href"){let o=qt(i,"link",{extraLinkSchemes:t.linkSchemes});o&&(n.href=o);continue}if(a==="src"){let o=qt(i,"media");o&&(n.src=o);continue}n[a]=i;}}if(typeof n.target=="string"&&!DH.has(n.target.toLowerCase())){let i=(typeof n.rel=="string"?n.rel:"").split(/\s+/).filter(a=>a&&a.toLowerCase()!=="opener");i.some(a=>a.toLowerCase()==="noopener")||i.push("noopener"),n.rel=i.join(" ");}return n}function FH(e,t,n){let r=e.tagName.toLowerCase();if(RH.has(r))return null;if(r==="video"){let o=qt(e.attributes.src??"","media")??"",s=qt(e.attributes.poster??"","media")??void 0;return b(Mu,{src:o,width:e.attributes.width,height:e.attributes.height,poster:s,controls:"controls"in e.attributes,preload:e.attributes.preload==="none"||e.attributes.preload==="metadata"||e.attributes.preload==="auto"?e.attributes.preload:void 0},t)}if(r==="audio"){let o=qt(e.attributes.src??"","media")??"";return b(nS,{src:o,controls:"controls"in e.attributes,preload:e.attributes.preload==="none"||e.attributes.preload==="metadata"||e.attributes.preload==="auto"?e.attributes.preload:void 0},t)}let i=r,a=OH(e.attributes,n);return e.selfClosing?b(i,{...a},t):b(i,{...a,children:sg(e.children,`${t}c`,n)},t)}function sg(e,t,n=$a){return e.map((r,i)=>{let a=`${t}${i}`;switch(r.type){case "htmlElement":return FH(r,a,n);case "htmlText":return b(Pe,{children:r.value},a);case "htmlComment":return null;default:return null}})}var uS=new Set,lS=e=>e.size===0?e:uS;function Zr({nodes:e,className:t,htmlPolicy:n="sanitize",linkSchemes:r,theme:i,showCodeCopyButton:a=false,onCopyCode:o,fenceRenderers:s}){let l=tS(),c=_i(),[d,u]=ge(uS);return he(()=>{if(!c){u(lS);return}let f=false;return c.listMedia().then(m=>{f||u(new Set(m.map(h=>h.name)));},()=>{f||u(lS);}),()=>{f=true;}},[c]),!e||e.length===0?null:b("div",{className:`squisq-md ${t||""}`,children:Ba(e,"",{htmlPolicy:n,linkSchemes:r,theme:i,showCodeCopyButton:a,onCopyCode:o,accessoryPaths:d,fenceRenderers:s??l??void 0})})}function Jr({media:e,eager:t,className:n}){let{basePath:r}=Tn(),i=qt(e.src,"media"),a=gt(i??"",r);return i?b("img",{className:n,src:a,alt:e.alt,loading:t?"eager":"lazy",decoding:"async",width:e.width,height:e.height}):null}function BH({media:e}){let{basePath:t}=Tn(),n=qt(e.src,"media"),r=gt(n??"",t),i=e.posterSrc?qt(e.posterSrc,"media"):void 0,a=gt(i??"",t);return n?b("video",{src:r,poster:i?a:void 0,muted:true,loop:true,autoPlay:true,playsInline:true,preload:"metadata"}):null}function Ts({section:e}){return e.slots.eyebrow?b("span",{className:"squisq-page-eyebrow",children:e.slots.eyebrow}):null}function lg({media:e}){return !e||e.type==="canvas"||!e.credit?null:b("span",{className:"squisq-page-media-credit",children:[e.credit,e.license?` \xB7 ${e.license}`:""]})}function dS({section:e}){let{pageStyle:t}=Tn(),n=e.slots.media,r=n?.type==="image"?n:void 0,i=t.tokens.heroStyle,a=b("div",{className:"squisq-page-hero-body",children:[b(Ts,{section:e}),b("h1",{className:"squisq-page-hero-title",children:e.slots.title}),e.slots.subtitle&&b("p",{className:"squisq-page-hero-subtitle",children:e.slots.subtitle})]});return r&&i==="split"?b("div",{className:"squisq-page-hero-grid",children:[a,b("div",{className:"squisq-page-hero-media squisq-page-media-frame",children:[b(Jr,{media:r,eager:true}),b(lg,{media:r})]})]}):b(Pe,{children:[r&&e.background==="media"&&b("div",{className:"squisq-page-hero-backdrop",children:b(Jr,{media:r,eager:true})}),a]})}function mS({section:e}){let t=e.slots.media,n=t?.type==="image"?t:void 0;return b(Pe,{children:[n&&e.background==="media"&&b("div",{className:"squisq-page-hero-backdrop",children:b(Jr,{media:n})}),b("div",{className:"squisq-page-banner-body",children:[b(Ts,{section:e}),b("h2",{className:"squisq-page-section-title squisq-page-banner-title",children:e.slots.title})]})]})}function fS({section:e}){let t=e.slots.items??[],n=e.variant==="comparison",r=t.map(a=>typeof a.value=="number"?a.value:Number.parseFloat(String(a.value??""))),i=Math.max(1,...r.filter(a=>Number.isFinite(a)));return b(Pe,{children:[b("div",{className:"squisq-page-stats",children:t.map((a,o)=>b("div",{className:`squisq-page-stat${n?" squisq-page-stat--bars":""}`,children:[b("span",{className:"squisq-page-stat-value",children:a.value}),n&&Number.isFinite(r[o])&&b("div",{className:"squisq-page-stat-bar",style:{width:`${Math.max(4,r[o]/i*100)}%`}}),a.title&&b("span",{className:"squisq-page-stat-title",children:a.title}),a.body&&b("span",{className:"squisq-page-stat-body",children:a.body})]},o))}),e.slots.meta&&b("div",{className:"squisq-page-stat-meta",children:e.slots.meta})]})}function pS({section:e}){let t=e.slots.media,n=e.background==="media"&&t&&t.type!=="canvas";return b(Pe,{children:[n&&b("div",{className:"squisq-page-quote-backdrop",children:t.type==="image"?b(Jr,{media:t}):b(BH,{media:t})}),e.slots.title&&b("h2",{className:"squisq-page-section-title",children:e.slots.title}),b("figure",{className:"squisq-page-quote-figure",style:{margin:0},children:[b("blockquote",{className:"squisq-page-quote",children:e.slots.body?.text}),e.slots.attribution&&b("figcaption",{className:"squisq-page-quote-attribution",children:e.slots.attribution})]})]})}function hS({section:e,flip:t}){let n=e.slots.media,r=n?.type==="image"?n:void 0,i=t?e.variant!=="media-right":e.variant==="media-right";return b("div",{className:`squisq-page-feature${i?" squisq-page-feature--media-right":""}`,children:[b("div",{className:"squisq-page-feature-media squisq-page-media-frame",children:[r&&b(Jr,{media:r}),b(lg,{media:r})]}),b("div",{className:"squisq-page-feature-text",children:[b(Ts,{section:e}),e.slots.title&&b("h3",{className:"squisq-page-section-title squisq-page-feature-title",children:e.slots.title}),e.slots.body?.text&&b("p",{className:"squisq-page-feature-body",children:e.slots.body.text})]})]})}function gS({section:e}){let{basePath:t}=Tn(),n=e.slots.media;return !n||n.type==="canvas"?null:b("figure",{className:"squisq-page-figure",children:[b("div",{className:"squisq-page-media-frame",children:n.type==="image"?b(Jr,{media:n}):b(Mu,{src:n.src,poster:n.posterSrc,basePath:t})}),(e.slots.caption||n.credit)&&b("figcaption",{children:[e.slots.caption,n.credit&&b(Pe,{children:[e.slots.caption?" ":"",b(lg,{media:n})]})]})]})}function yS({section:e}){let t=e.slots.items??[];return t.length===0?b("div",{className:"squisq-page-gallery-empty",children:[e.slots.title&&b("h2",{className:"squisq-page-section-title",children:e.slots.title}),e.slots.body?.text&&b("p",{children:e.slots.body.text}),e.slots.caption&&b("div",{className:"squisq-page-gallery-caption",children:e.slots.caption})]}):b(Pe,{children:[b("div",{className:"squisq-page-gallery",children:t.map((n,r)=>n.media?.type==="image"?b("div",{className:"squisq-page-media-frame",children:b(Jr,{media:n.media})},r):null)}),e.slots.caption&&b("div",{className:"squisq-page-gallery-caption",children:e.slots.caption})]})}function bS({section:e}){let t=e.slots.media,n=t?.type==="image"?t:void 0,r=e.hints?.framing;return b("div",{className:"squisq-page-callout","data-hint-framing":typeof r=="string"?r:void 0,children:[n&&b("div",{className:"squisq-page-media-frame",children:b(Jr,{media:n})}),b("div",{children:[b(Ts,{section:e}),e.slots.title&&b("h3",{className:"squisq-page-callout-title",children:e.slots.title}),e.slots.body?.text&&b("p",{className:"squisq-page-callout-body",children:e.slots.body.text}),e.slots.meta&&b("div",{className:"squisq-page-callout-meta",children:e.slots.meta})]})]})}function wS({section:e}){let{theme:t}=Tn(),n=e.slots.items??[];return b(Pe,{children:[e.slots.title&&b("h2",{className:"squisq-page-section-title squisq-page-cards-title",children:e.slots.title}),b("div",{className:"squisq-page-cards",children:n.map((r,i)=>{let a=r.accentScheme?t.colorSchemes?.[r.accentScheme]:void 0;return b("div",{className:"squisq-page-card",style:a?{"--squisq-page-card-accent":a.accent}:void 0,children:[r.title&&b("h3",{className:"squisq-page-card-title",children:r.title}),r.body&&b("p",{className:"squisq-page-card-body",children:r.body})]},i)})})]})}function kS({section:e}){let{theme:t,showCodeCopyButton:n,onCopyCode:r,fenceRenderers:i,htmlPolicy:a,linkSchemes:o}=Tn(),s=e.slots.items??[];return b(Pe,{children:[e.slots.title&&b("h2",{className:"squisq-page-section-title squisq-page-items-title",children:e.slots.title}),b("ol",{className:"squisq-page-items",children:s.map((l,c)=>b("li",{children:b("div",{className:"squisq-page-item-body",children:l.markdown?b(Zr,{nodes:l.markdown,theme:t,showCodeCopyButton:n,onCopyCode:r,fenceRenderers:i,htmlPolicy:a,linkSchemes:o}):l.body})},c))})]})}function xS({section:e}){let t=e.slots.milestone;return t?b("div",{className:"squisq-page-milestone","data-mood":t.mood,children:[b("div",{className:"squisq-page-milestone-date",children:t.date}),b("div",{className:"squisq-page-milestone-rail","aria-hidden":"true"}),b("div",{className:"squisq-page-milestone-body",children:[t.description,t.footer&&b("div",{className:"squisq-page-milestone-footer",children:t.footer})]})]}):null}function vS({section:e}){let t=e.slots.table;if(!t)return null;let n=r=>t.align?.[r]??void 0;return b(Pe,{children:[e.slots.title&&b("h2",{className:"squisq-page-section-title squisq-page-table-title",children:e.slots.title}),b("div",{className:"squisq-page-table-scroll",children:b("table",{className:"squisq-page-table",children:[b("thead",{children:b("tr",{children:t.headers.map((r,i)=>b("th",{style:{textAlign:n(i)},children:r},i))})}),b("tbody",{children:t.rows.map((r,i)=>b("tr",{children:r.map((a,o)=>b("td",{style:{textAlign:n(o)},children:a},o))},i))})]})})]})}function TS({section:e,block:t}){let{theme:n,showCodeCopyButton:r,onCopyCode:i,fenceRenderers:a,htmlPolicy:o,linkSchemes:s}=Tn(),l=e.slots.title!==void 0&&t?.sourceHeading?b(Zr,{nodes:[t.sourceHeading],theme:n,showCodeCopyButton:r,onCopyCode:i,htmlPolicy:o,linkSchemes:s}):null,c=e.slots.body?.markdown??t?.contents;return b("div",{className:"squisq-page-prose",children:[l,c&&c.length>0&&b(Zr,{nodes:c,theme:n,showCodeCopyButton:r,onCopyCode:i,fenceRenderers:a,htmlPolicy:o,linkSchemes:s})]})}function ES({section:e}){return b("div",{children:[b(Ts,{section:e}),e.slots.title&&b("h2",{className:"squisq-page-section-title",children:e.slots.title}),e.slots.body?.text&&b("p",{children:e.slots.body.text})]})}function $H(e,t){return e.kind==="hero"&&e.background==="media"&&e.slots.media?.type==="image"&&t!=="split"}function HH(e){let t=e.accent.scheme;if(t)return {"--squisq-page-accent":t.accent,"--squisq-page-accent-bg":t.bg,"--squisq-page-accent-text":t.text}}function zH(e,t){let{section:n,block:r}=e;switch(n.kind){case "hero":return b(dS,{section:n,block:r});case "banner":return b(mS,{section:n,block:r});case "stat-band":return b(fS,{section:n,block:r});case "quote-band":return b(pS,{section:n,block:r});case "feature-split":return b(hS,{section:n,block:r,flip:t});case "media-figure":return b(gS,{section:n,block:r});case "gallery":return b(yS,{section:n,block:r});case "callout":return b(bS,{section:n,block:r});case "card-grid":return b(wS,{section:n,block:r});case "item-list":return b(kS,{section:n,block:r});case "timeline-rail":return b(xS,{section:n,block:r});case "table-section":return b(vS,{section:n,block:r});case "canvas-embed":return b(XE,{section:n});case "footer":return b(ES,{section:n,block:r});default:return b(TS,{section:n,block:r})}}function SS({entry:e,featureFlip:t,isLeadProse:n}){let{pageStyle:r,theme:i,showCodeCopyButton:a,onCopyCode:o,fenceRenderers:s,htmlPolicy:l,linkSchemes:c}=Tn(),{section:d}=e,u=d.slots.richContent?.markdown,f=["squisq-linear-section","squisq-page-section",`squisq-page-section--${d.kind}`,`squisq-page-section--bg-${d.background}`,`squisq-page-section--em-${d.emphasis}`];d.variant&&f.push(`squisq-page-section--v-${d.variant}`),$H(d,r.tokens.heroStyle)&&f.push("squisq-page-section--hero-media");let m={};d.hints?.vignette&&(m["data-hint-vignette"]=""),d.hints?.dropCap&&n&&(m["data-hint-drop-cap"]="");let h=d.kind!=="hero"&&d.slots.title!==void 0?d.slots.headingLevel??e.block?.sourceHeading?.depth:void 0;return h!==void 0&&(m["data-heading-level"]=String(h)),b("section",{className:f.join(" "),"data-section-kind":d.kind,"data-block-id":d.blockId,"data-block-index":d.index,"data-template":d.template,style:HH(d),...m,children:b("div",{className:"squisq-page-section-inner",children:[zH(e,t),u&&u.length>0&&b("div",{className:"squisq-page-rich-content",children:b(Zr,{nodes:u,theme:i,showCodeCopyButton:a,onCopyCode:o,fenceRenderers:s,htmlPolicy:l,linkSchemes:c})})]})})}function qu({doc:e,markdown:t,basePath:n="/",viewport:r,className:i,theme:a,surface:o,animationsEnabled:s=true,thinMargins:l=false,imageDisplayMode:c="inline",globalKeyboardShortcuts:d=false,showCover:u=true,variant:f="page",transformPage:m,showCodeCopyButton:h=false,onCopyCode:y,fenceRenderers:g,htmlPolicy:w,linkSchemes:x}){let v=ue(null),T=r??Ze.landscape,S=de(()=>!e&&t!==void 0?qa(pn(t)):void 0,[e,t]),k=e??S,E=Au(o==="auto"),I=o==="auto"?E:o,_=de(()=>{let we=a??tt;return I?ro(we,I):we},[a,I]),A=de(()=>Ui(_,m,f),[_,m,f]),D=de(()=>eg(g),[g]),B=de(()=>k?Uh(k,{theme:_,viewport:T,customTemplates:k.customTemplates,cover:u!==false?k.startBlock:false,transformPage:m,variant:f,...D.length>0?{widgetFenceLangs:D}:{}}):[],[k,_,T,u,m,f,D]),q=de(()=>({theme:_,viewport:T,totalBlocks:B.length,persistentLayers:_.persistentLayers,customTemplates:k?.customTemplates}),[_,T,B.length,k?.customTemplates]),F=de(()=>({theme:_,pageStyle:A,basePath:n,viewport:T,renderContext:q,animationsEnabled:s,imageDisplayMode:c,showCodeCopyButton:h,onCopyCode:y,fenceRenderers:g,htmlPolicy:w,linkSchemes:x}),[_,A,n,T,q,s,c,h,y,g,w,x]),{featureOrdinals:P,leadProseIndex:H}=de(()=>{let we=new Map,me=0,Y=-1;for(let se of B)se.section.kind==="feature-split"&&we.set(se.section.index,me++),f!=="document"&&Y<0&&se.section.kind==="prose"&&(Y=se.section.index);return {featureOrdinals:we,leadProseIndex:Y}},[B,f]);if(he(()=>{if(!d)return;let we=me=>{if(me.defaultPrevented||me.altKey||me.ctrlKey||me.metaKey||me.shiftKey||me.key!=="ArrowDown"&&me.key!=="ArrowUp"||(me.target instanceof Element?me.target:null)?.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="combobox"], [role="listbox"], [role="menu"], [role="dialog"], [aria-modal="true"], .monaco-editor'))return;let se=v.current;if(!se)return;me.preventDefault();let ye=Math.max(64,Math.round(se.clientHeight*.12));se.scrollBy({top:me.key==="ArrowDown"?ye:-ye,behavior:"smooth"});};return document.addEventListener("keydown",we),()=>document.removeEventListener("keydown",we)},[d]),!k)return b("div",{ref:v,className:`squisq-linear squisq-linear--empty ${i||""}`});let $=_.colors.background,R=_.colors.text,z=_.colors.textMuted,C=_.colors.primary,U=wt(_.typography.bodyFont,"system-ui, sans-serif"),V=wt(_.typography.titleFont,"Georgia, serif"),M=_.typography.lineHeight??1.65,J=["squisq-linear-content","squisq-md","squisq-page",l?"squisq-linear-content--thin squisq-page--thin":"",f==="document"?"squisq-linear-content--document squisq-page--document":"",c==="thumbnail"?"squisq-linear-content--thumbnail-images squisq-page--thumbnail-images":""].filter(Boolean).join(" ");return b("div",{ref:v,className:`squisq-linear ${i||""}`,role:"region","aria-label":"Document page",tabIndex:l?void 0:0,style:{width:"100%",height:l?"auto":"100%",overflowY:l?"visible":"auto",overflowX:"hidden",background:$,containerType:"inline-size",containerName:"squisq-page"},children:b("div",{className:J,...Wh(A),style:{lineHeight:M,fontSize:f==="document"?"15px":"16px",fontFamily:U,color:R,...jh(_,A),"--squisq-linear-title-font":V,"--squisq-linear-body-font":U,"--squisq-linear-text":R,"--squisq-linear-muted":z,"--squisq-linear-primary":C,"--squisq-linear-bg":$},children:[b("style",{"data-squisq-page":"",children:Vh}),b(tg.Provider,{value:F,children:B.map(we=>{let me=P.get(we.section.index)??0,Y=!!we.section.hints?.alternate&&me%2===1;return b(SS,{entry:we,featureFlip:Y,isLeadProse:we.section.index===H},`${we.section.blockId}-${we.section.index}`)})})]})})}async function UH(e){if(typeof document<"u"&&document.fonts?.ready)try{await document.fonts.ready;}catch{}let t=Array.from(e.querySelectorAll("img"));await Promise.allSettled(t.map(n=>n.complete?Promise.resolve():typeof n.decode=="function"?n.decode().catch(()=>{}):new Promise(r=>{n.addEventListener("load",()=>r(),{once:true}),n.addEventListener("error",()=>r(),{once:true});}))),await new Promise(n=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(()=>n())):setTimeout(n,0);});}function Es(e,t){return {id:e,startTime:0,duration:0,audioSegment:0,layers:t}}function _S({doc:e,theme:t,viewport:n,layout:r,showTitle:i,style:a,documentTitle:o,basePath:s=".",animationsEnabled:l=true,muted:c=true,renderMode:d=false,onRenderAPIReady:u,className:f}){let m=ue(null),h=de(()=>t??Hi(e),[t,e]),y=n??Ze.landscape,g=de(()=>Xh(e,{theme:h,viewport:y,layout:r,showTitle:i,style:a,documentTitle:o}),[e,h,y,r,i,a,o]),w=de(()=>Es("dashboard-backdrop-bottom",g.backdrop.bottomLayers),[g]),x=de(()=>g.backdrop.topLayers.length>0?Es("dashboard-backdrop-top",g.backdrop.topLayers):null,[g]),v=de(()=>g.title?Es("dashboard-title-band",g.title.layers):null,[g]);he(()=>!d||!u?void 0:(u({seekTo:async()=>{let I=m.current;I&&await UH(I);},getRenderedTime:()=>0,getDuration:()=>0,getViewport:()=>({width:y.width,height:y.height}),getBlocks:()=>g.cells.map(I=>({id:String(I.block.id),template:I.block.template??"content",startTime:0,duration:0})),getAudioSegments:()=>[],getCaptions:()=>[],getChapters:()=>[],showCover:async()=>{},hideCover:async()=>{},hasCoverBlock:()=>false}),()=>u(null)),[y,d,u,g]);let T={width:y.width,height:y.height},S={position:"absolute",inset:0},k={position:"relative",width:"var(--squisq-dashboard-fit-width, 100%)",aspectRatio:`${y.width} / ${y.height}`,overflow:"hidden",background:g.backdrop.fill,margin:"0 auto","--squisq-dashboard-aspect":(y.width/y.height).toFixed(6)};return b("div",{ref:m,className:f?`squisq-dashboard ${f}`:"squisq-dashboard","data-dashboard-layout":g.layout.name,"data-dashboard-style":g.style,style:k,children:[b("div",{style:S,"aria-hidden":"true",children:b(Jt,{block:w,blockTime:0,basePath:s,viewport:T,isPlaying:false,muted:true,animationsEnabled:l,theme:h})}),g.cells.map(E=>b(Pe,{children:[E.frame&&b("div",{className:"squisq-dashboard__frame","data-cell-index":E.index,"aria-hidden":"true",style:{position:"absolute",left:E.frame.rectPct.left,top:E.frame.rectPct.top,width:E.frame.rectPct.width,height:E.frame.rectPct.height,pointerEvents:"none"},children:b(Jt,{block:Es(`dashboard-frame-${E.index}`,E.frame.layers),blockTime:0,basePath:s,viewport:{width:E.frame.viewport.width,height:E.frame.viewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:h})}),b("div",{className:"squisq-dashboard__cell","data-cell-index":E.index,style:{position:"absolute",left:E.rectPct.left,top:E.rectPct.top,width:E.rectPct.width,height:E.rectPct.height,...E.frame?.contentRadiusPct?{borderRadius:E.frame.contentRadiusPct,overflow:"hidden"}:{}},children:[b(Jt,{block:{...E.block,layers:E.layers},blockTime:0,basePath:s,viewport:{width:E.viewport.width,height:E.viewport.height},isPlaying:false,muted:c,animationsEnabled:l,theme:h}),E.frame&&E.frame.overlayLayers.length>0&&b("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:b(Jt,{block:Es(`dashboard-frame-overlay-${E.index}`,E.frame.overlayLayers),blockTime:0,basePath:s,viewport:{width:E.frame.overlayViewport.width,height:E.frame.overlayViewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:h})})]})]},`${E.index}-${E.block.id}`)),g.title&&v&&b("div",{className:"squisq-dashboard__title",style:{position:"absolute",left:g.title.rectPct.left,top:g.title.rectPct.top,width:g.title.rectPct.width,height:g.title.rectPct.height},children:b(Jt,{block:v,blockTime:0,basePath:s,viewport:{width:g.title.viewport.width,height:g.title.viewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:h})}),x&&b("div",{style:{...S,pointerEvents:"none"},"aria-hidden":"true",children:b(Jt,{block:x,blockTime:0,basePath:s,viewport:T,isPlaying:false,muted:true,animationsEnabled:l,theme:h})})]})}var jH=new Set(["diagram","tree","timeline","map","drawing","layout","barChart","columnChart","pieChart","donutChart","lineChart","areaChart","scatterChart"]);function WH(e,t,n,r){let i=wu(e);if(!(!!i.templateName&&(jH.has(i.templateName)||!!r?.some(c=>c.name===i.templateName))))return null;let o=i.templateBlock??e,{layers:s,source:l}=us(o,{theme:t,viewport:n,customTemplates:r,persistentLayers:false});return s.length===0||l==="fallback"?null:{...o,layers:s}}function CS({block:e,depth:t,theme:n,basePath:r,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o,viewport:s,customTemplates:l}){let c=t===0?"h2":t===1?"h3":"h4",d=de(()=>WH(e,n,s,l),[e,l,n,s]);return b("section",{className:"squisq-flashcards__content-block","data-source-block-id":e.id,children:[!d&&e.title&&b(c,{className:"squisq-flashcards__content-title",children:e.title}),!d&&e.contents&&e.contents.length>0&&b(Zr,{nodes:e.contents,theme:n,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o}),(d||e.layers&&e.layers.length>0)&&b("div",{className:"squisq-flashcards__canvas",style:{aspectRatio:`${s.width} / ${s.height}`},children:b(Jt,{block:d??e,blockTime:Math.max(0,e.duration??0),basePath:r,viewport:s,animationsEnabled:false,theme:n,muted:true})}),!d&&e.children?.map(u=>b(CS,{block:u,depth:t+1,theme:n,basePath:r,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o,viewport:s,customTemplates:l},u.id))]})}function Ss(e){return b("div",{className:"squisq-flashcards__face-content",children:e.face.blocks.map(t=>b(CS,{block:t,depth:0,...e},t.id))})}function VH(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function AS(e,t){let n=[...e],r=VH(t)||1,i=()=>{r+=1831565813;let a=r;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296};for(let a=n.length-1;a>0;a--){let o=Math.floor(i()*(a+1));[n[a],n[o]]=[n[o],n[a]];}return n}function GH(e){return b(Ss,{...e,face:e.choice.content})}function YH(e){return e instanceof Element&&!!e.closest('button, a, input, select, textarea, [contenteditable="true"]')}function IS({doc:e,theme:t,basePath:n=".",source:r="auto",shuffle:i=false,globalKeyboardShortcuts:a=false,showCodeCopyButton:o=false,onCopyCode:s,fenceRenderers:l,viewport:c=Ze.landscape,className:d}){let u=de(()=>t??Hi(e),[e,t]),f=de(()=>Kh(e,{source:r}),[e,r]),[m,h]=ge(i),[y,g]=ge(1),[w,x]=ge(0),[v,T]=ge(false),[S,k]=ge(null),[E,I]=ge({}),[_,A]=ge(null),D=ue(null),B=de(()=>m?AS(f.cards,`${e.articleId}:${y}`):[...f.cards],[f.cards,e.articleId,y,m]),q=de(()=>_?_.map(X=>B.find(oe=>oe.id===X)).filter(X=>!!X):B,[B,_]),F=q[w],P=q.length>0&&w>=q.length,H=ke(()=>{x(0),T(false),k(null);},[]),$=ke(()=>{I({}),A(null),H(),g(X=>X+1);},[H]);he(()=>{I({}),A(null),H();},[f,H]),he(()=>{D.current&&(D.current.scrollTop=0);},[w,_]);let R=ke(()=>{F&&(T(true),F.kind==="multiple-choice"&&S===null&&I(X=>({...X,[F.id]:"again"})));},[F,S]),z=ke(()=>{if(F){if(!v){R();return}x(X=>X+1),T(false),k(null);}},[F,R,v]),C=ke(()=>{if(P){x(Math.max(0,q.length-1)),T(true);return}if(v){T(false),k(null);return}w>0&&(x(X=>X-1),T(true),k(null));},[w,P,v,q.length]),U=ke(X=>{!F||v||(k(X.id),T(true),I(oe=>({...oe,[F.id]:X.correct?"got-it":"again"})));},[F,v]),V=ke(X=>{F&&(I(oe=>({...oe,[F.id]:X})),x(oe=>oe+1),T(false),k(null));},[F]),M=ke(X=>{if(!(X.defaultPrevented||YH(X.target))){if(/^[1-9]$/.test(X.key)&&F?.kind==="multiple-choice"&&!v){let oe=F.choices?.[Number(X.key)-1];oe&&(X.preventDefault(),U(oe));return}X.key==="ArrowLeft"?(X.preventDefault(),C()):(X.key==="ArrowRight"||X.key===" "||X.key==="Enter")&&(X.preventDefault(),z());}},[U,F,z,C,v]);he(()=>{if(!a)return;let X=oe=>M(oe);return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[a,M]);let J={theme:u,basePath:n,showCodeCopyButton:o,onCopyCode:s,fenceRenderers:l,viewport:c,customTemplates:e.customTemplates},we=wt(u.typography.titleFont,"Georgia, serif"),me=wt(u.typography.bodyFont,"system-ui, sans-serif"),Y={"--squisq-flashcards-bg":u.colors.background,"--squisq-flashcards-surface":u.colors.backgroundLight,"--squisq-flashcards-text":u.colors.text,"--squisq-flashcards-muted":u.colors.textMuted,"--squisq-flashcards-primary":u.colors.primary,"--squisq-flashcards-secondary":u.colors.secondary,"--squisq-flashcards-highlight":u.colors.highlight,"--squisq-flashcards-warning":u.colors.warning,"--squisq-flashcards-radius":`${u.style.borderRadius??18}px`,"--squisq-flashcards-title-font":we,"--squisq-flashcards-body-font":me},se=f.cards.filter(X=>E[X.id]==="again").map(X=>X.id),ye=f.cards.filter(X=>E[X.id]==="got-it").length;if(f.cards.length===0)return b("div",{className:`squisq-flashcards squisq-flashcards--empty${d?` ${d}`:""}`,style:Y,role:"region","aria-label":"Flashcards",children:b("div",{className:"squisq-flashcards__empty-card",children:[b("h2",{children:"No complete flashcards yet"}),b("p",{children:"Add an answer beneath a heading, or nest an answer block under a question."}),f.diagnostics.length>0&&b("ul",{children:f.diagnostics.map((X,oe)=>b("li",{children:X.message},`${X.blockId}-${X.code}-${oe}`))})]})});if(P)return b("div",{className:`squisq-flashcards${d?` ${d}`:""}`,style:Y,role:"region","aria-label":"Flashcard session summary",tabIndex:0,onKeyDown:a?void 0:M,children:b("div",{className:"squisq-flashcards__summary",children:[b("span",{className:"squisq-flashcards__eyebrow",children:"Session complete"}),b("h2",{children:[ye," remembered"]}),b("p",{children:se.length===0?`You completed all ${f.cards.length} cards.`:`${se.length} ${se.length===1?"card needs":"cards need"} another look.`}),b("div",{className:"squisq-flashcards__summary-actions",children:[se.length>0&&b("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:()=>{A(se),H();},children:"Retry missed"}),b("button",{type:"button",className:"squisq-flashcards__button",onClick:$,children:"Study again"}),b("button",{type:"button",className:"squisq-flashcards__button",onClick:C,children:"Previous card"})]})]})});let pe=F?.choices?AS(F.choices,`${F.id}:${y}`):[],ce=pe.find(X=>X.id===S);return b("div",{className:`squisq-flashcards${d?` ${d}`:""}`,style:Y,role:"region","aria-label":"Flashcards",tabIndex:0,onKeyDown:a?void 0:M,children:[b("header",{className:"squisq-flashcards__header",children:[b("div",{className:"squisq-flashcards__deck-copy",children:[b("span",{className:"squisq-flashcards__eyebrow",children:"Flashcards"}),f.title&&b("h1",{children:f.title})]}),b("div",{className:"squisq-flashcards__tools",children:[b("button",{type:"button",className:"squisq-flashcards__tool","aria-pressed":m,onClick:()=>{h(X=>!X),$();},children:"Shuffle"}),b("button",{type:"button",className:"squisq-flashcards__tool",onClick:$,children:"Restart"})]})]}),b("div",{className:"squisq-flashcards__progress-row",children:[b("span",{children:["Card ",w+1," of ",q.length]}),b("span",{children:v?"Answer revealed":"Question"})]}),b("div",{className:"squisq-flashcards__progress","aria-hidden":"true",children:b("span",{style:{width:`${(w+(v?1:0))/q.length*100}%`}})}),b("main",{ref:D,className:"squisq-flashcards__card","data-card-kind":F.kind,"aria-label":"Scrollable flashcard content",tabIndex:0,children:[F.label&&b("div",{className:"squisq-flashcards__label",children:F.label}),b("section",{className:"squisq-flashcards__front","aria-label":"Question",children:b(Ss,{...J,face:F.front})}),F.kind==="multiple-choice"&&b("div",{className:"squisq-flashcards__choices",role:"group","aria-label":"Answer choices",children:pe.map((X,oe)=>{let ve=S===X.id,Le=v?X.correct?"correct":ve?"incorrect":"idle":"idle";return b("button",{type:"button",className:"squisq-flashcards__choice","data-choice-status":Le,"aria-pressed":ve,disabled:v,onClick:()=>U(X),children:[b("span",{className:"squisq-flashcards__choice-key","aria-hidden":"true",children:oe+1}),b(GH,{...J,choice:X})]},X.id)})}),v&&F.kind==="basic"&&b("section",{className:"squisq-flashcards__answer","aria-label":"Answer",children:[b("span",{className:"squisq-flashcards__answer-label",children:"Answer"}),b(Ss,{...J,face:F.back})]}),v&&F.kind==="multiple-choice"&&b("div",{className:"squisq-flashcards__feedback","data-correct":ce?.correct===true,"aria-live":"polite",children:[b("strong",{children:ce===void 0?"Answer revealed":ce.correct?"Correct":"Not quite"}),!ce?.correct&&b("div",{className:"squisq-flashcards__correct-answer",children:[b("span",{children:"The correct answer is"}),b(Ss,{...J,face:F.back})]})]}),v&&F.explanation&&b("section",{className:"squisq-flashcards__explanation","aria-label":"Explanation",children:[b("span",{className:"squisq-flashcards__answer-label",children:"Explanation"}),b(Ss,{...J,face:F.explanation})]})]}),b("footer",{className:"squisq-flashcards__footer",children:[b("button",{type:"button",className:"squisq-flashcards__button",disabled:w===0&&!v,onClick:C,children:"Previous"}),b("div",{className:"squisq-flashcards__primary-actions",children:v&&F.kind==="basic"?b(Pe,{children:[b("button",{type:"button",className:"squisq-flashcards__button",onClick:()=>V("again"),children:"Again"}),b("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:()=>V("got-it"),children:"Got it"})]}):b("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:z,children:v?w===q.length-1?"Finish":"Next card":"Reveal answer"})})]}),b("p",{className:"squisq-flashcards__shortcut-hint",children:["Use \u2190 and \u2192 to navigate, Space to reveal",F.kind==="multiple-choice"?", or 1\u20139 to answer":"","."]})]})}var XH=new Set(["a","an","the","and","but","or","for","nor","on","at","to","in","of","by","is"]);function cg(e){let t=new Map;for(let n of e.blocks)if(tn(n)&&n.template==="sectionHeader"&&"title"in n){let r=n.audioSegment;t.has(r)||t.set(r,n.title);}for(let n=0;n<e.audio.segments.length;n++){if(t.has(n))continue;let r=e.audio.segments[n].name;if(r.includes("intro"))t.set(n,"Introduction");else if(r.includes("flight-context"))t.set(n,"Flight Context");else {let i=r.split("-").map((a,o)=>o===0||!XH.has(a)?a.charAt(0).toUpperCase()+a.slice(1):a).join(" ");t.set(n,i);}}return t}function Lu(e,t,n){if(e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:e[n]}function KH(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t==="background"||t==="behind")return "background";if(t==="full-frame"||t==="fullscreen"||t==="full")return "full-frame";if(t==="picture-in-picture"||t==="pip"||t==="overlay")return "picture-in-picture"}function QH(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t==="small"||t==="sm"||t==="pip-small")return "small";if(t==="large"||t==="lg"||t==="big"||t==="pip-large")return "large"}function ZH(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t==="square"||t==="1:1")return "square";if(t==="wide"||t==="16:9"||t==="widescreen")return "wide"}function JH(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replace(/[_\s]+/g,"-");return {"top-left":"top-left","upper-left":"top-left","top-right":"top-right","upper-right":"top-right","bottom-left":"bottom-left","lower-left":"bottom-left","bottom-right":"bottom-right","lower-right":"bottom-right"}[t]}function MS(e,t={}){let n=e.frontmatter,r=$h(n,{...t.showCoverSlide!==void 0?{enabled:t.showCoverSlide}:{},...t.coverSlideTemplate!==void 0?{template:t.coverSlideTemplate}:{},...t.coverSlideDuration!==void 0?{duration:t.coverSlideDuration}:{},...t.coverSlidePlayback!==void 0?{playback:t.coverSlidePlayback}:{}});return {theme:t.theme??Hi(e),videoPresentation:t.videoPresentation??KH(Lu(n,"squisq-video-presentation","video-presentation"))??"background",pipSize:t.pipSize??QH(Lu(n,"squisq-pip-size","pip-size"))??"small",pipShape:t.pipShape??ZH(Lu(n,"squisq-pip-shape","pip-shape"))??"square",pipPosition:t.pipPosition??JH(Lu(n,"squisq-pip-position","pip-position"))??"bottom-right",showCoverSlide:r.enabled,coverSlideTemplate:r.template,coverSlideDuration:r.duration,coverSlidePlayback:r.playback}}function ez(){try{return typeof process<"u"&&!1}catch{return false}}var qS=false,tz=100,LS=1e-6;function ug(){return new Promise(e=>{let t=false,n=null,r=()=>{t||(t=true,window.clearTimeout(i),n!==null&&window.cancelAnimationFrame(n),e());},i=window.setTimeout(r,document.visibilityState==="visible"?tz:0);document.visibilityState==="visible"&&(n=window.requestAnimationFrame(r));})}function PS(e){let{doc:t,markdown:n}=e,r=de(()=>!t&&n!==void 0?qa(pn(n)):void 0,[t,n]),i=t??r;return i?e.displayMode==="flashcards"?b("div",{className:"doc-player doc-player--flashcards",children:b(IS,{doc:i,basePath:e.basePath,theme:e.theme,globalKeyboardShortcuts:e.globalKeyboardShortcuts,showCodeCopyButton:e.showCodeCopyButton,onCopyCode:e.onCopyCode,fenceRenderers:e.fenceRenderers,viewport:e.forceViewport})}):b(nz,{...e,doc:i}):b("div",{className:"doc-player doc-player--empty"})}function nz({doc:e,basePath:t=".",renderMode:n=false,animationsEnabled:r=true,autoPlay:i=false,loop:a=false,onEnded:o,onTimeUpdate:s,audioController:l,audioMode:c="media",showControls:d=true,showScrubber:u=false,muted:f=false,captionsEnabled:m,onCaptionsToggle:h,onPlaybackStateChange:y,onControlsReady:g,onRenderAPIReady:w,renderVideoFrameSelector:x,processedAudio:v,isFullscreen:T=false,onFullscreenToggle:S,onBlockMarkers:k,forceViewport:E,displayMode:I="video",dashboardLayout:_,dashboardShowTitle:A,dashboardStyle:D,dashboardDocumentTitle:B,showCoverSlide:q,coverSlideTemplate:F,coverSlideDuration:P,coverSlidePlayback:H,coverVisible:$,theme:R,motion:z,surface:C,captionStyle:U="standard",captionPosition:V,videoPresentation:M,pipSize:J,pipShape:we,pipPosition:me,enableSwipe:Y=true,globalKeyboardShortcuts:se=false,showCodeCopyButton:ye=false,onCopyCode:pe,fenceRenderers:ce,tableContentRenderer:X}){let oe=I==="slideshow",ve=I==="linear",Le=I==="dashboard",Ne=ue(null),et=ue(null),pt=`squisq-player-${Wt().replace(/:/g,"")}`,[Ut,en]=ge(null),xt=ue(),{viewport:sn}=WE(),$e=E||(n?Ze.landscape:sn),ln=$e.height>$e.width?"portrait":"landscape",ct=de(()=>typeof window>"u"?false:new URLSearchParams(window.location.search).get("debug")==="true",[]),G=de(()=>c==="synthetic"?rl(e):0,[c,e]),re=HE(Ne,e.audio,t,!l,c,G),Se=l||re;he(()=>{if(qS||!ez())return;let K=et.current;if(!K||typeof getComputedStyle!="function")return;getComputedStyle(K).getPropertyValue("--squisq-styles-loaded").trim()||(qS=true,console.warn('[squisq] @bendyline/squisq-react/styles is not loaded \u2014 import "@bendyline/squisq-react/styles"'));},[]);let{currentTime:Ie,isPlaying:Ee,currentSegment:ot,totalDuration:Ye,isEnded:jt,isReady:Nn,isAvailable:En,unavailableMessage:yt,play:Pt,pause:st,toggle:dg,seekTo:At,skipToSegment:cz,restart:_s}=Se,[mg,DS]=ge(null),OS=mg?.doc===e?mg.time:null,ut=n?OS??Ie:Ie,FS=de(()=>Qi(e),[e]),fg=R1(FS,t),BS=de(()=>Qi(e,{intrinsicDuration:K=>fg.get(K.src),...v?{processedAudio:v}:{}}),[e,fg,v]),As=ke(()=>{if(n)return;let K=et.current;if(!K)return;K.querySelectorAll('.doc-player__block--active video[data-clip-start], [data-clip-id][data-active="true"]').forEach(Oe=>{let It=Oe.play();It&&It.catch(()=>{});});},[n]),Cs=ke(()=>(As(),Pt()),[Pt,As]),Wi=ke(()=>(Ee||As(),dg()),[Ee,As,dg]),Ru=ue(ut);Ru.current=ut;let Nu=ue(ut),Is=ue([]),pg=ue(x);pg.current=x;let hg=ue(null),gg=ue(Ye);gg.current=Ye;let yg=ue(0);bn(()=>{Nu.current=ut;let K=Is.current;Is.current=K.filter(Te=>Math.abs(Te.time-ut)>LS?true:(Te.resolve(),false));},[ut]),he(()=>()=>{let K=new Error("DocPlayer unmounted before the requested frame committed.");Is.current.splice(0).forEach(Te=>Te.reject(K));},[]);let bg=ke(K=>Math.abs(Nu.current-K)<=LS?Promise.resolve():new Promise((Te,Oe)=>{Is.current.push({time:K,resolve:Te,reject:Oe});}),[]),$S=ke(K=>{if(n||ve)return;let Te=K.target;if(oe){Te.closest('button, a, input, textarea, select, [contenteditable="true"]')||et.current?.focus({preventScroll:true});return}if(Te.closest('button, a, input, textarea, select, [contenteditable="true"], .doc-player__controls, .doc-player__scrubber, .doc-controls-sidebar, .doc-controls-slideshow'))return;et.current?.focus({preventScroll:true}),Wi(),en(Ee?"pause":"play"),clearTimeout(xt.current),xt.current=setTimeout(()=>en(null),600);},[n,Wi,Ee,oe,ve]),HS=Au(C==="auto"),Du=C==="auto"?HS:C,yn=de(()=>MS(e,{theme:R,videoPresentation:M,pipSize:J,pipShape:we,pipPosition:me,showCoverSlide:q,coverSlideTemplate:F,coverSlideDuration:P,coverSlidePlayback:H}),[e,R,M,J,we,me,q,F,P,H]),Dn=de(()=>{let K=yn.theme;return Du?ro(K,Du):K},[yn.theme,Du]),za=de(()=>Fd(Dn),[Dn]),zS=za,US=de(()=>({border:za["--squisq-pip-border"],borderRadius:za["--squisq-pip-radius"],boxShadow:za["--squisq-pip-shadow"]}),[za]),jS=de(()=>e.blocks.some(K=>typeof K.sourceStartTime=="number"),[e.blocks]),{currentBlock:tr,currentBlockIndex:Sn,previousBlock:Ms,isEntering:WS,isExiting:VS,blockTime:wg,docProgress:Ou,blocks:We,suppressOutgoingForNextBlock:kg}=jE(e,ut,{basePath:t,viewport:$e,theme:Dn,motion:z,onSeek:At,deterministicTransitions:n,useAudioSegmentTiming:c!=="synthetic"||n&&jS}),Ct=de(()=>{let K=e.startBlock;if(!yn.showCoverSlide||!K)return null;let Te=_n(Dn,0,1,$e,{motion:Ji(e,Dn,z)});return {id:"cover-block",startTime:-1,duration:0,audioSegment:-1,layers:xh(K,Te,yn.coverSlideTemplate)}},[e,z,$e,Dn,yn.showCoverSlide,yn.coverSlideTemplate]),Fu=!!Ct,[qs,kr]=ge(false),[GS,xg]=ge(false),vg=ue("");he(()=>{let K=`${e.articleId}:${oe}:${Fu}:${n}`;vg.current!==K&&(vg.current=K,oe&&Fu&&!n?(kr(true),st()):kr(false));},[e.articleId,oe,Fu,n,st]);let[YS,Bu]=ge(false),[XS,$u]=ge(false),Hu=ue(),Ls=ue(false),Ps=ue(false);he(()=>{Ps.current=false,Ls.current=false,clearTimeout(Hu.current),$u(false),Bu(false);},[e]),Ct&&!oe&&!Ee&&ut===0&&!Ps.current&&!n&&!i&&(Ls.current=true),he(()=>{Ee&&Ls.current&&Ct&&!n&&!oe&&(Ls.current=false,Ps.current=true,$u(true),Hu.current=setTimeout(()=>$u(false),yn.coverSlideDuration*1e3));},[Ee,Ct,n,oe,yn.coverSlideDuration]),he(()=>()=>clearTimeout(Hu.current),[]),he(()=>()=>clearTimeout(xt.current),[]);let KS=!ve&&!!Ct&&(YS||!oe&&(XS||!Ee&&ut===0&&!Ps.current&&!n&&!i)),Tg=$??qs,Ua=!!(oe&&!ve&&!n&&Ct&&Tg),xr=$===void 0?KS||Ua:!!Ct&&$,cn=!!(oe&&!n&&Ct),vr=cn?Tg?0:Sn+1:Sn,Rs=cn?We.length+1:We.length,zu=ue(false);he(()=>{zu.current=false;},[e]),he(()=>{Nn&&i&&!zu.current&&(zu.current=true,Cs());},[Nn,i,Cs]),he(()=>{s?.(ut);},[ut,s]),he(()=>{jt&&(o?.(),a&&!oe&&!ve&&!Le&&_s());},[jt,Le,ve,oe,a,o,_s]);let Vi=ue(null),Uu=ue(null);if(!Uu.current){let K=()=>{let Te=Vi.current;if(!Te)throw new Error("Squisq render API is not currently available.");return Te};Uu.current={seekTo:Te=>K().seekTo(Te),getRenderedTime:()=>K().getRenderedTime(),getDuration:()=>K().getDuration(),getViewport:()=>K().getViewport(),getBlocks:()=>K().getBlocks(),getAudioSegments:()=>K().getAudioSegments(),getCaptions:()=>K().getCaptions(),getChapters:()=>K().getChapters(),showCover:()=>K().showCover(),hideCover:()=>K().hideCover(),hasCoverBlock:()=>K().hasCoverBlock()};}let Eg=Uu.current;he(()=>{if(Le||!n&&!ct){Vi.current=null;return}let K=et.current;if(!K){Vi.current=null;return}let Mg={seekTo:async He=>{if(n){let Ke=bg(He);Ey(()=>DS({doc:e,time:He})),l&&At(He).catch(()=>{}),await Ke;}else await At(He);let nr=-1;for(let Ke=We.length-1;Ke>=0;Ke--)if(He>=We[Ke].startTime){nr=Ke;break}let Va=nr>=0?We[nr].startTime:0,n5=nr>0?We[nr-1].startTime:Va,qg=(He-Va)*1e3,r5=(He-n5)*1e3,Lg=async(Ke,bt)=>{let Mt=n?pg.current:void 0;Mt&&await Mt(Ke,bt)||await p0(Ke,bt);},Pg=0;(K.getAnimations?.({subtree:true})??[]).forEach(Ke=>{let bt=Ke.effect?.target;if(!bt)return;let Mt;bt.closest(".doc-player__block--previous")?Mt=bt.classList.contains("block-svg")?qg:r5:bt.closest(".doc-player__block--active")?Mt=qg:bt.closest(".doc-player__block--cover")?Mt=0:Mt=He*1e3,n&&typeof Ke.pause=="function"&&Ke.playState!=="paused"&&Ke.pause(),Ke.currentTime=Math.max(0,Mt);let Gi=Ke.effect?.getComputedTiming?.().endTime;(typeof Gi!="number"||Mt<Gi)&&(Pg+=1);});let i5=He-Va,Vu=[],Rg=K.querySelector(".doc-player__block--active");Rg&&Rg.querySelectorAll("video[data-clip-start]").forEach(bt=>{let Mt=bt,Gi=parseFloat(Mt.dataset.clipStart||"0"),Yu=parseFloat(Mt.dataset.clipEnd||"0"),Xu=parseFloat(Mt.dataset.startAt||"0"),o5=Math.min(Gi+Math.max(0,i5-Xu),Yu);Vu.push(Lg(Mt,o5));}),K.querySelectorAll("video[data-clip-id]").forEach(Ke=>{let bt=Ke,Mt=parseFloat(bt.dataset.absStart||"0"),Gi=parseFloat(bt.dataset.absEnd||"0"),Yu=parseFloat(bt.dataset.sourceIn||"0");if(bt.pause(),He<Mt||He>=Gi)return;let Xu=Yu+(He-Mt);Vu.push(Lg(bt,Xu));}),await Promise.all(Vu);let Gu=Array.from(K.querySelectorAll(".doc-player__block"),Ke=>({element:Ke,className:Ke.className})),Hs=hg.current;hg.current=Gu;let a5=Hs!==null&&Hs.length===Gu.length&&Gu.every((Ke,bt)=>Ke.element===Hs[bt].element&&Ke.className===Hs[bt].className);(!n||!a5||Pg>0)&&await ug();},getRenderedTime:()=>Nu.current,getDuration:()=>{let He=rl(e);return Ye>0?Math.max(Ye,He):He},getViewport:()=>({width:$e.width,height:$e.height}),getBlocks:()=>We.map(He=>({id:He.id,template:He.template??"raw",startTime:He.startTime,duration:He.duration})),getAudioSegments:()=>e.audio.segments.map(He=>({src:He.src,name:He.name,duration:He.duration,startTime:He.startTime})),getCaptions:()=>e.captions?.phrases?.map(He=>({text:He.text,startTime:He.startTime,endTime:He.endTime}))||[],getChapters:()=>{let He=cg(e);return e.audio.segments.map((nr,Va)=>({title:He.get(Va)||nr.name,startTime:nr.startTime,duration:nr.duration}))},showCover:()=>(Bu(true),ug()),hideCover:()=>(Bu(false),ug()),hasCoverBlock:()=>!!Ct};return Vi.current=Mg,()=>{Vi.current===Mg&&(Vi.current=null);}},[n,ct,At,Ye,We,Ct,e,l,bg,Le,$e]),he(()=>{if(!Le){if(!n&&!ct||!et.current){w?.(null);return}return w?.(Eg),()=>w?.(null)}},[n,ct,Le,w,Eg]);let ju=m===false?"off":U||"standard",[Ns,Wu]=ge(ju);he(()=>{Wu(ju);},[ju]);let ei=Ns!=="off",QS=Ns==="social"?"social":"standard",Sg=ke(K=>{Wu(K?U||"standard":"off"),h?.(K);},[h,U]),_g=ke(()=>{Wu(K=>{let Te=K==="off"?"standard":K==="standard"?"social":"off";return h?.(Te!=="off"),Te});},[h]),Ds=e.captions&&e.captions.phrases.length>0,Ag=de(()=>cg(e),[e]),ja=de(()=>({isPlaying:Ee,currentTime:ut,totalDuration:Ye,isCoverVisible:xr,currentBlockIndex:vr,totalBlocks:Rs,docProgress:Ou,hasCaptions:!!Ds,captionsEnabled:ei,captionMode:Ns,isFullscreen:T,currentSegmentIndex:ot,currentSegmentName:Ag.get(ot)??e.audio.segments[ot]?.name??null,currentBlock:Ua?Ct:tr??null,currentSlideLabel:Ua?"Cover":void 0,currentSlideNumber:cn&&!Ua?Sn+1:void 0,totalSlideNumber:cn?We.length:void 0}),[Ee,ut,Ye,xr,vr,Rs,Ou,Ds,ei,Ns,T,ot,Ag,tr,Sn,Ua,Ct,cn,We.length]),Os=de(()=>({toggle:Wi,restart:_s,seekTo:At,setCaptionsEnabled:Sg,cycleCaptionMode:_g,toggleFullscreen:S}),[Wi,_s,At,Sg,_g,S]),On=de(()=>({nextSlide:()=>{if(cn&&qs){let K=We[0];K&&(kr(false),At(K.startTime),st());return}if(Sn<We.length-1){let K=We[Sn+1];K&&(kr(false),At(K.startTime),st());}},prevSlide:()=>{if(cn&&!qs&&Sn<=0){kr(true),At(0),st();return}if(Sn>0){let K=We[Sn-1];K&&(kr(false),At(K.startTime),st());}},goToSlide:K=>{if(cn){if(K===0){kr(true),At(0),st();return}let Te=We[K-1];Te&&(kr(false),At(Te.startTime),st());return}if(K>=0&&K<We.length){let Te=We[K];Te&&(At(Te.startTime),st());}}}),[Sn,We,At,st,cn,qs]),Fs=oe&&!ve&&!n&&Y,Bs=ke(K=>{let Te=K-(cn?1:0),Oe=We[Te];Oe&&kg(Oe.id);},[We,cn,kg]),ZS=ke(()=>{Bs(vr+1),On.nextSlide();},[Bs,vr,On]),JS=ke(()=>{Bs(vr-1),On.prevSlide();},[Bs,vr,On]),Tr=VE({enabled:Fs,containerRef:et,canGoNext:vr<Rs-1,canGoPrev:vr>0,onNext:ZS,onPrev:JS});he(()=>{y?.(ja);},[ja,y]),he(()=>{g?.({play:Cs,pause:st,...Os});},[Cs,st,Os,g]);let ti=ke(K=>{let Te=K;if(tn(Te)){let Oe=Te;if(typeof Oe.title=="string")return Oe.title;if(typeof Oe.stat=="string")return Oe.stat;if(typeof Oe.quote=="string"){let It=Oe.quote.split(`
|
|
742
|
+
`);return b(Pe,{children:o.map((s,l)=>b(Pe,{children:[l>0&&b("br",{}),s]},l))},a)}case "emphasis":return b("em",{className:"squisq-md-em",children:zt(r.children,a,n)},a);case "strong":return b("strong",{className:"squisq-md-strong",children:zt(r.children,a,n)},a);case "delete":return b("del",{className:"squisq-md-del",children:zt(r.children,a,n)},a);case "superscript":return b("sup",{className:"squisq-md-sup",children:zt(r.children,a,n)},a);case "subscript":return b("sub",{className:"squisq-md-sub",children:zt(r.children,a,n)},a);case "inlineCode":return b("code",{className:"squisq-md-inline-code",children:r.value},a);case "link":{if(n.accessoryPaths?.has(r.url))return b("span",{className:"squisq-md-attachment","data-attachment-path":r.url,title:r.title??`Attachment: ${r.url}`,children:[b("i",{className:"fa-solid fa-paperclip","aria-hidden":"true"}),b("span",{className:"squisq-md-attachment-label",children:zt(r.children,a,n)})]},a);let o=qt(r.url,"link",{extraLinkSchemes:n.linkSchemes});return o?b("a",{className:"squisq-md-link",href:o,title:r.title??void 0,target:"_blank",rel:"noopener noreferrer",children:zt(r.children,a,n)},a):b("span",{className:"squisq-md-link squisq-md-link--blocked",children:zt(r.children,a,n)},a)}case "image":return b(NH,{src:r.url,alt:r.alt??"",title:r.title??void 0},a);case "break":return b("br",{},a);case "inlineMath":return b("code",{className:"squisq-md-inline-math",children:r.value},a);case "inlineIcon":return b("i",{className:`fa-${r.family} fa-${r.name}`,"data-icon":r.token,"aria-hidden":"true"},a);case "htmlInline":return n.htmlPolicy==="strip"?null:b("span",{className:"squisq-md-html-inline",children:sg(cS(r.htmlChildren,n.htmlPolicy),`${a}h`,n)},a);case "footnoteReference":return b("sup",{className:"squisq-md-footnote-ref",children:b("a",{href:`#fn-${r.identifier}`,children:["[",r.label??r.identifier,"]"]})},a);case "linkReference":return b("span",{className:"squisq-md-link-ref",children:zt(r.children,a,n)},a);case "imageReference":return b("span",{className:"squisq-md-image-ref",children:["[",r.alt??r.identifier,"]"]},a);case "textDirective":return b("span",{className:"squisq-md-text-directive","data-directive":r.name,children:zt(r.children,a,n)},a);case "mention":return b("span",{className:"squisq-md-mention mention","data-mention":"true","data-kind":r.targetKind,"data-id":r.targetId,"data-label":r.displayName,children:["@",r.displayName]},a);default:return null}})}function PH(e,t,n=$a){switch(e.type){case "paragraph":return b("p",{className:"squisq-md-p",children:zt(e.children,t,n)},t);case "heading":{let r=`h${e.depth}`;return b(r,{className:`squisq-md-heading squisq-md-h${e.depth}`,children:zt(e.children,t,n)},t)}case "blockquote":return b("blockquote",{className:"squisq-md-blockquote",children:Ba(e.children,t,n)},t);case "list":return e.ordered?b("ol",{className:"squisq-md-list squisq-md-ol",start:e.start??void 0,children:e.children.map((r,i)=>sS(r,`${t}li${i}`,n))},t):b("ul",{className:"squisq-md-list squisq-md-ul",children:e.children.map((r,i)=>sS(r,`${t}li${i}`,n))},t);case "code":{let r=e.lang?.trim().toLowerCase();return r&&n.fenceRenderers?.[r]?b(og,{fallback:b(oS,{value:e.value,language:e.lang,ctx:n}),children:b(LH,{node:e,lang:r,ctx:n})},t):r==="mermaid"?b(Su,{source:e.value,className:"squisq-md-mermaid",ariaLabel:"Mermaid diagram",theme:n.theme},t):b(oS,{value:e.value,language:e.lang,ctx:n},t)}case "thematicBreak":return b("hr",{className:"squisq-md-hr"},t);case "table":return RH(e.children,e.align,t,n);case "htmlBlock":return n.htmlPolicy==="strip"?null:b("div",{className:"squisq-md-html-block",children:sg(cS(e.htmlChildren,n.htmlPolicy),`${t}h`,n)},t);case "math":return b("pre",{className:"squisq-md-math-block",children:b("code",{children:e.value})},t);case "definition":return null;case "footnoteDefinition":return b("div",{className:"squisq-md-footnote-def",id:`fn-${e.identifier}`,children:[b("sup",{children:e.label??e.identifier}),Ba(e.children,t,n)]},t);case "containerDirective":return b("div",{className:`squisq-md-directive squisq-md-directive-${e.name}`,"data-directive":e.name,children:[e.label&&b("div",{className:"squisq-md-directive-label",children:e.label}),Ba(e.children,t,n)]},t);case "leafDirective":return b("div",{className:`squisq-md-directive squisq-md-directive-${e.name}`,"data-directive":e.name,children:zt(e.children,t,n)},t);case "definitionList":return b("dl",{className:"squisq-md-dl",children:e.children.map((r,i)=>r.type==="definitionTerm"?b("dt",{className:"squisq-md-dt",children:zt(r.children,`${t}dt${i}`,n)},`${t}dt${i}`):b("dd",{className:"squisq-md-dd",children:Ba(r.children,`${t}dd${i}`,n)},`${t}dd${i}`))},t);default:return null}}function sS(e,t,n=$a){let r=e.checked!==null&&e.checked!==void 0;return b("li",{className:`squisq-md-li${r?" squisq-md-task":""}`,children:[r&&b("input",{type:"checkbox",checked:!!e.checked,readOnly:true,className:"squisq-md-checkbox"}),Ba(e.children,t,n)]},t)}function RH(e,t,n,r=$a){let[i,...a]=e;return b("table",{className:"squisq-md-table",children:[i&&b("thead",{children:b("tr",{children:i.children.map((o,s)=>b("th",{className:"squisq-md-th",style:t?.[s]?{textAlign:t[s]}:void 0,children:zt(o.children,`${n}th${s}`,r)},`${n}th${s}`))})}),a.length>0&&b("tbody",{children:a.map((o,s)=>b("tr",{children:o.children.map((l,c)=>b("td",{className:"squisq-md-td",style:t?.[c]?{textAlign:t[c]}:void 0,children:zt(l.children,`${n}td${s}-${c}`,r)},`${n}td${s}-${c}`))},`${n}tr${s}`))})]},n)}function Ba(e,t="",n=$a){return e.map((r,i)=>PH(r,`${t}b${i}`,n))}function NH({src:e,alt:t,title:n}){let r=qt(e,"media"),i=gt(r??"","."),a=ue(null),o=aS(r??"",i);return r?xs(r)?b("span",{className:"squisq-animated-image","data-animated":o.animated?"true":void 0,style:{position:"relative",display:"inline-block",maxWidth:"100%"},children:[b("img",{ref:a,className:"squisq-md-image",src:o.displaySrc,alt:t,title:n,style:{display:"block",maxWidth:"100%"}}),b(rS,{playback:o,imageRef:a})]}):b("img",{className:"squisq-md-image",src:i,alt:t,title:n}):null}function cS(e,t){return t==="strip"?[]:t==="trusted"?e:ta(e)}var DH=new Set(["base","embed","iframe","link","meta","object","script","style","title"]),OH={class:"className",id:"id",title:"title",style:"style",width:"width",height:"height",src:"src",alt:"alt",loading:"loading",decoding:"decoding",href:"href",target:"target",rel:"rel"},FH=new Set(["","_self","_parent","_top"]);function BH(e,t){let n={};for(let[r,i]of Object.entries(e)){let a=OH[r];if(a){if(a==="style"){n["data-style"]=i;continue}if(a==="href"){let o=qt(i,"link",{extraLinkSchemes:t.linkSchemes});o&&(n.href=o);continue}if(a==="src"){let o=qt(i,"media");o&&(n.src=o);continue}n[a]=i;}}if(typeof n.target=="string"&&!FH.has(n.target.toLowerCase())){let i=(typeof n.rel=="string"?n.rel:"").split(/\s+/).filter(a=>a&&a.toLowerCase()!=="opener");i.some(a=>a.toLowerCase()==="noopener")||i.push("noopener"),n.rel=i.join(" ");}return n}function $H(e,t,n){let r=e.tagName.toLowerCase();if(DH.has(r))return null;if(r==="video"){let o=qt(e.attributes.src??"","media")??"",s=qt(e.attributes.poster??"","media")??void 0;return b(Mu,{src:o,width:e.attributes.width,height:e.attributes.height,poster:s,controls:"controls"in e.attributes,preload:e.attributes.preload==="none"||e.attributes.preload==="metadata"||e.attributes.preload==="auto"?e.attributes.preload:void 0},t)}if(r==="audio"){let o=qt(e.attributes.src??"","media")??"";return b(nS,{src:o,controls:"controls"in e.attributes,preload:e.attributes.preload==="none"||e.attributes.preload==="metadata"||e.attributes.preload==="auto"?e.attributes.preload:void 0},t)}let i=r,a=BH(e.attributes,n);return e.selfClosing?b(i,{...a},t):b(i,{...a,children:sg(e.children,`${t}c`,n)},t)}function sg(e,t,n=$a){return e.map((r,i)=>{let a=`${t}${i}`;switch(r.type){case "htmlElement":return $H(r,a,n);case "htmlText":return b(Pe,{children:r.value},a);case "htmlComment":return null;default:return null}})}var uS=new Set,lS=e=>e.size===0?e:uS;function Zr({nodes:e,className:t,htmlPolicy:n="sanitize",linkSchemes:r,theme:i,showCodeCopyButton:a=false,onCopyCode:o,fenceRenderers:s}){let l=tS(),c=_i(),[d,u]=ge(uS);return he(()=>{if(!c){u(lS);return}let f=false;return c.listMedia().then(m=>{f||u(new Set(m.map(h=>h.name)));},()=>{f||u(lS);}),()=>{f=true;}},[c]),!e||e.length===0?null:b("div",{className:`squisq-md ${t||""}`,children:Ba(e,"",{htmlPolicy:n,linkSchemes:r,theme:i,showCodeCopyButton:a,onCopyCode:o,accessoryPaths:d,fenceRenderers:s??l??void 0})})}function Jr({media:e,eager:t,className:n}){let{basePath:r}=Tn(),i=qt(e.src,"media"),a=gt(i??"",r);return i?b("img",{className:n,src:a,alt:e.alt,loading:t?"eager":"lazy",decoding:"async",width:e.width,height:e.height}):null}function HH({media:e}){let{basePath:t}=Tn(),n=qt(e.src,"media"),r=gt(n??"",t),i=e.posterSrc?qt(e.posterSrc,"media"):void 0,a=gt(i??"",t);return n?b("video",{src:r,poster:i?a:void 0,muted:true,loop:true,autoPlay:true,playsInline:true,preload:"metadata"}):null}function Ts({section:e}){return e.slots.eyebrow?b("span",{className:"squisq-page-eyebrow",children:e.slots.eyebrow}):null}function lg({media:e}){return !e||e.type==="canvas"||!e.credit?null:b("span",{className:"squisq-page-media-credit",children:[e.credit,e.license?` \xB7 ${e.license}`:""]})}function dS({section:e}){let{pageStyle:t}=Tn(),n=e.slots.media,r=n?.type==="image"?n:void 0,i=t.tokens.heroStyle,a=b("div",{className:"squisq-page-hero-body",children:[b(Ts,{section:e}),b("h1",{className:"squisq-page-hero-title",children:e.slots.title}),e.slots.subtitle&&b("p",{className:"squisq-page-hero-subtitle",children:e.slots.subtitle})]});return r&&i==="split"?b("div",{className:"squisq-page-hero-grid",children:[a,b("div",{className:"squisq-page-hero-media squisq-page-media-frame",children:[b(Jr,{media:r,eager:true}),b(lg,{media:r})]})]}):b(Pe,{children:[r&&e.background==="media"&&b("div",{className:"squisq-page-hero-backdrop",children:b(Jr,{media:r,eager:true})}),a]})}function mS({section:e}){let t=e.slots.media,n=t?.type==="image"?t:void 0;return b(Pe,{children:[n&&e.background==="media"&&b("div",{className:"squisq-page-hero-backdrop",children:b(Jr,{media:n})}),b("div",{className:"squisq-page-banner-body",children:[b(Ts,{section:e}),b("h2",{className:"squisq-page-section-title squisq-page-banner-title",children:e.slots.title})]})]})}function fS({section:e}){let t=e.slots.items??[],n=e.variant==="comparison",r=t.map(a=>typeof a.value=="number"?a.value:Number.parseFloat(String(a.value??""))),i=Math.max(1,...r.filter(a=>Number.isFinite(a)));return b(Pe,{children:[b("div",{className:"squisq-page-stats",children:t.map((a,o)=>b("div",{className:`squisq-page-stat${n?" squisq-page-stat--bars":""}`,children:[b("span",{className:"squisq-page-stat-value",children:a.value}),n&&Number.isFinite(r[o])&&b("div",{className:"squisq-page-stat-bar",style:{width:`${Math.max(4,r[o]/i*100)}%`}}),a.title&&b("span",{className:"squisq-page-stat-title",children:a.title}),a.body&&b("span",{className:"squisq-page-stat-body",children:a.body})]},o))}),e.slots.meta&&b("div",{className:"squisq-page-stat-meta",children:e.slots.meta})]})}function pS({section:e}){let t=e.slots.media,n=e.background==="media"&&t&&t.type!=="canvas";return b(Pe,{children:[n&&b("div",{className:"squisq-page-quote-backdrop",children:t.type==="image"?b(Jr,{media:t}):b(HH,{media:t})}),e.slots.title&&b("h2",{className:"squisq-page-section-title",children:e.slots.title}),b("figure",{className:"squisq-page-quote-figure",style:{margin:0},children:[b("blockquote",{className:"squisq-page-quote",children:e.slots.body?.text}),e.slots.attribution&&b("figcaption",{className:"squisq-page-quote-attribution",children:e.slots.attribution})]})]})}function hS({section:e,flip:t}){let n=e.slots.media,r=n?.type==="image"?n:void 0,i=t?e.variant!=="media-right":e.variant==="media-right";return b("div",{className:`squisq-page-feature${i?" squisq-page-feature--media-right":""}`,children:[b("div",{className:"squisq-page-feature-media squisq-page-media-frame",children:[r&&b(Jr,{media:r}),b(lg,{media:r})]}),b("div",{className:"squisq-page-feature-text",children:[b(Ts,{section:e}),e.slots.title&&b("h3",{className:"squisq-page-section-title squisq-page-feature-title",children:e.slots.title}),e.slots.body?.text&&b("p",{className:"squisq-page-feature-body",children:e.slots.body.text})]})]})}function gS({section:e}){let{basePath:t}=Tn(),n=e.slots.media;return !n||n.type==="canvas"?null:b("figure",{className:"squisq-page-figure",children:[b("div",{className:"squisq-page-media-frame",children:n.type==="image"?b(Jr,{media:n}):b(Mu,{src:n.src,poster:n.posterSrc,basePath:t})}),(e.slots.caption||n.credit)&&b("figcaption",{children:[e.slots.caption,n.credit&&b(Pe,{children:[e.slots.caption?" ":"",b(lg,{media:n})]})]})]})}function yS({section:e}){let t=e.slots.items??[];return t.length===0?b("div",{className:"squisq-page-gallery-empty",children:[e.slots.title&&b("h2",{className:"squisq-page-section-title",children:e.slots.title}),e.slots.body?.text&&b("p",{children:e.slots.body.text}),e.slots.caption&&b("div",{className:"squisq-page-gallery-caption",children:e.slots.caption})]}):b(Pe,{children:[b("div",{className:"squisq-page-gallery",children:t.map((n,r)=>n.media?.type==="image"?b("div",{className:"squisq-page-media-frame",children:b(Jr,{media:n.media})},r):null)}),e.slots.caption&&b("div",{className:"squisq-page-gallery-caption",children:e.slots.caption})]})}function bS({section:e}){let t=e.slots.media,n=t?.type==="image"?t:void 0,r=e.hints?.framing;return b("div",{className:"squisq-page-callout","data-hint-framing":typeof r=="string"?r:void 0,children:[n&&b("div",{className:"squisq-page-media-frame",children:b(Jr,{media:n})}),b("div",{children:[b(Ts,{section:e}),e.slots.title&&b("h3",{className:"squisq-page-callout-title",children:e.slots.title}),e.slots.body?.text&&b("p",{className:"squisq-page-callout-body",children:e.slots.body.text}),e.slots.meta&&b("div",{className:"squisq-page-callout-meta",children:e.slots.meta})]})]})}function wS({section:e}){let{theme:t}=Tn(),n=e.slots.items??[];return b(Pe,{children:[e.slots.title&&b("h2",{className:"squisq-page-section-title squisq-page-cards-title",children:e.slots.title}),b("div",{className:"squisq-page-cards",children:n.map((r,i)=>{let a=r.accentScheme?t.colorSchemes?.[r.accentScheme]:void 0;return b("div",{className:"squisq-page-card",style:a?{"--squisq-page-card-accent":a.accent}:void 0,children:[r.title&&b("h3",{className:"squisq-page-card-title",children:r.title}),r.body&&b("p",{className:"squisq-page-card-body",children:r.body})]},i)})})]})}function kS({section:e}){let{theme:t,showCodeCopyButton:n,onCopyCode:r,fenceRenderers:i,htmlPolicy:a,linkSchemes:o}=Tn(),s=e.slots.items??[];return b(Pe,{children:[e.slots.title&&b("h2",{className:"squisq-page-section-title squisq-page-items-title",children:e.slots.title}),b("ol",{className:"squisq-page-items",children:s.map((l,c)=>b("li",{children:b("div",{className:"squisq-page-item-body",children:l.markdown?b(Zr,{nodes:l.markdown,theme:t,showCodeCopyButton:n,onCopyCode:r,fenceRenderers:i,htmlPolicy:a,linkSchemes:o}):l.body})},c))})]})}function xS({section:e}){let t=e.slots.milestone;return t?b("div",{className:"squisq-page-milestone","data-mood":t.mood,children:[b("div",{className:"squisq-page-milestone-date",children:t.date}),b("div",{className:"squisq-page-milestone-rail","aria-hidden":"true"}),b("div",{className:"squisq-page-milestone-body",children:[t.description,t.footer&&b("div",{className:"squisq-page-milestone-footer",children:t.footer})]})]}):null}function vS({section:e}){let t=e.slots.table;if(!t)return null;let n=r=>t.align?.[r]??void 0;return b(Pe,{children:[e.slots.title&&b("h2",{className:"squisq-page-section-title squisq-page-table-title",children:e.slots.title}),b("div",{className:"squisq-page-table-scroll",children:b("table",{className:"squisq-page-table",children:[b("thead",{children:b("tr",{children:t.headers.map((r,i)=>b("th",{style:{textAlign:n(i)},children:r},i))})}),b("tbody",{children:t.rows.map((r,i)=>b("tr",{children:r.map((a,o)=>b("td",{style:{textAlign:n(o)},children:a},o))},i))})]})})]})}function TS({section:e,block:t}){let{theme:n,showCodeCopyButton:r,onCopyCode:i,fenceRenderers:a,htmlPolicy:o,linkSchemes:s}=Tn(),l=e.slots.title!==void 0&&t?.sourceHeading?b(Zr,{nodes:[t.sourceHeading],theme:n,showCodeCopyButton:r,onCopyCode:i,htmlPolicy:o,linkSchemes:s}):null,c=e.slots.body?.markdown??t?.contents;return b("div",{className:"squisq-page-prose",children:[l,c&&c.length>0&&b(Zr,{nodes:c,theme:n,showCodeCopyButton:r,onCopyCode:i,fenceRenderers:a,htmlPolicy:o,linkSchemes:s})]})}function ES({section:e}){return b("div",{children:[b(Ts,{section:e}),e.slots.title&&b("h2",{className:"squisq-page-section-title",children:e.slots.title}),e.slots.body?.text&&b("p",{children:e.slots.body.text})]})}function zH(e,t){return e.kind==="hero"&&e.background==="media"&&e.slots.media?.type==="image"&&t!=="split"}function UH(e){let t=e.accent.scheme;if(t)return {"--squisq-page-accent":t.accent,"--squisq-page-accent-bg":t.bg,"--squisq-page-accent-text":t.text}}function jH(e,t){let{section:n,block:r}=e;switch(n.kind){case "hero":return b(dS,{section:n,block:r});case "banner":return b(mS,{section:n,block:r});case "stat-band":return b(fS,{section:n,block:r});case "quote-band":return b(pS,{section:n,block:r});case "feature-split":return b(hS,{section:n,block:r,flip:t});case "media-figure":return b(gS,{section:n,block:r});case "gallery":return b(yS,{section:n,block:r});case "callout":return b(bS,{section:n,block:r});case "card-grid":return b(wS,{section:n,block:r});case "item-list":return b(kS,{section:n,block:r});case "timeline-rail":return b(xS,{section:n,block:r});case "table-section":return b(vS,{section:n,block:r});case "canvas-embed":return b(XE,{section:n});case "footer":return b(ES,{section:n,block:r});default:return b(TS,{section:n,block:r})}}function SS({entry:e,featureFlip:t,isLeadProse:n}){let{pageStyle:r,theme:i,showCodeCopyButton:a,onCopyCode:o,fenceRenderers:s,htmlPolicy:l,linkSchemes:c}=Tn(),{section:d}=e,u=d.slots.richContent?.markdown,f=["squisq-linear-section","squisq-page-section",`squisq-page-section--${d.kind}`,`squisq-page-section--bg-${d.background}`,`squisq-page-section--em-${d.emphasis}`];d.variant&&f.push(`squisq-page-section--v-${d.variant}`),zH(d,r.tokens.heroStyle)&&f.push("squisq-page-section--hero-media");let m={};d.hints?.vignette&&(m["data-hint-vignette"]=""),d.hints?.dropCap&&n&&(m["data-hint-drop-cap"]="");let h=d.kind!=="hero"&&d.slots.title!==void 0?d.slots.headingLevel??e.block?.sourceHeading?.depth:void 0;return h!==void 0&&(m["data-heading-level"]=String(h)),b("section",{className:f.join(" "),"data-section-kind":d.kind,"data-block-id":d.blockId,"data-block-index":d.index,"data-template":d.template,style:UH(d),...m,children:b("div",{className:"squisq-page-section-inner",children:[jH(e,t),u&&u.length>0&&b("div",{className:"squisq-page-rich-content",children:b(Zr,{nodes:u,theme:i,showCodeCopyButton:a,onCopyCode:o,fenceRenderers:s,htmlPolicy:l,linkSchemes:c})})]})})}function qu({doc:e,markdown:t,basePath:n="/",viewport:r,className:i,theme:a,surface:o,animationsEnabled:s=true,thinMargins:l=false,imageDisplayMode:c="inline",globalKeyboardShortcuts:d=false,showCover:u=true,variant:f="page",transformPage:m,showCodeCopyButton:h=false,onCopyCode:y,fenceRenderers:g,htmlPolicy:w,linkSchemes:x}){let v=ue(null),T=r??Ze.landscape,S=de(()=>!e&&t!==void 0?qa(pn(t)):void 0,[e,t]),k=e??S,E=Au(o==="auto"),I=o==="auto"?E:o,_=de(()=>{let we=a??tt;return I?ro(we,I):we},[a,I]),A=de(()=>Ui(_,m,f),[_,m,f]),D=de(()=>eg(g),[g]),B=de(()=>k?Uh(k,{theme:_,viewport:T,customTemplates:k.customTemplates,cover:u!==false?k.startBlock:false,transformPage:m,variant:f,...D.length>0?{widgetFenceLangs:D}:{}}):[],[k,_,T,u,m,f,D]),q=de(()=>({theme:_,viewport:T,totalBlocks:B.length,persistentLayers:_.persistentLayers,customTemplates:k?.customTemplates}),[_,T,B.length,k?.customTemplates]),F=de(()=>({theme:_,pageStyle:A,basePath:n,viewport:T,renderContext:q,animationsEnabled:s,imageDisplayMode:c,showCodeCopyButton:h,onCopyCode:y,fenceRenderers:g,htmlPolicy:w,linkSchemes:x}),[_,A,n,T,q,s,c,h,y,g,w,x]),{featureOrdinals:P,leadProseIndex:H}=de(()=>{let we=new Map,me=0,Y=-1;for(let se of B)se.section.kind==="feature-split"&&we.set(se.section.index,me++),f!=="document"&&Y<0&&se.section.kind==="prose"&&(Y=se.section.index);return {featureOrdinals:we,leadProseIndex:Y}},[B,f]);if(he(()=>{if(!d)return;let we=me=>{if(me.defaultPrevented||me.altKey||me.ctrlKey||me.metaKey||me.shiftKey||me.key!=="ArrowDown"&&me.key!=="ArrowUp"||(me.target instanceof Element?me.target:null)?.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="combobox"], [role="listbox"], [role="menu"], [role="dialog"], [aria-modal="true"], .monaco-editor'))return;let se=v.current;if(!se)return;me.preventDefault();let ye=Math.max(64,Math.round(se.clientHeight*.12));se.scrollBy({top:me.key==="ArrowDown"?ye:-ye,behavior:"smooth"});};return document.addEventListener("keydown",we),()=>document.removeEventListener("keydown",we)},[d]),!k)return b("div",{ref:v,className:`squisq-linear squisq-linear--empty ${i||""}`});let $=_.colors.background,R=_.colors.text,z=_.colors.textMuted,C=_.colors.primary,U=wt(_.typography.bodyFont,"system-ui, sans-serif"),V=wt(_.typography.titleFont,"Georgia, serif"),M=_.typography.lineHeight??1.65,J=["squisq-linear-content","squisq-md","squisq-page",l?"squisq-linear-content--thin squisq-page--thin":"",f==="document"?"squisq-linear-content--document squisq-page--document":"",c==="thumbnail"?"squisq-linear-content--thumbnail-images squisq-page--thumbnail-images":""].filter(Boolean).join(" ");return b("div",{ref:v,className:`squisq-linear ${i||""}`,role:"region","aria-label":"Document page",tabIndex:l?void 0:0,style:{width:"100%",height:l?"auto":"100%",overflowY:l?"visible":"auto",overflowX:"hidden",background:$,containerType:"inline-size",containerName:"squisq-page"},children:b("div",{className:J,...Wh(A),style:{lineHeight:M,fontSize:f==="document"?"15px":"16px",fontFamily:U,color:R,...jh(_,A),"--squisq-linear-title-font":V,"--squisq-linear-body-font":U,"--squisq-linear-text":R,"--squisq-linear-muted":z,"--squisq-linear-primary":C,"--squisq-linear-bg":$},children:[b("style",{"data-squisq-page":"",children:Vh}),b(tg.Provider,{value:F,children:B.map(we=>{let me=P.get(we.section.index)??0,Y=!!we.section.hints?.alternate&&me%2===1;return b(SS,{entry:we,featureFlip:Y,isLeadProse:we.section.index===H},`${we.section.blockId}-${we.section.index}`)})})]})})}async function WH(e){if(typeof document<"u"&&document.fonts?.ready)try{await document.fonts.ready;}catch{}let t=Array.from(e.querySelectorAll("img"));await Promise.allSettled(t.map(n=>n.complete?Promise.resolve():typeof n.decode=="function"?n.decode().catch(()=>{}):new Promise(r=>{n.addEventListener("load",()=>r(),{once:true}),n.addEventListener("error",()=>r(),{once:true});}))),await new Promise(n=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(()=>n())):setTimeout(n,0);});}function Es(e,t){return {id:e,startTime:0,duration:0,audioSegment:0,layers:t}}function _S({doc:e,theme:t,viewport:n,layout:r,showTitle:i,style:a,documentTitle:o,basePath:s=".",animationsEnabled:l=true,muted:c=true,renderMode:d=false,onRenderAPIReady:u,className:f}){let m=ue(null),h=de(()=>t??Hi(e),[t,e]),y=n??Ze.landscape,g=de(()=>Xh(e,{theme:h,viewport:y,layout:r,showTitle:i,style:a,documentTitle:o}),[e,h,y,r,i,a,o]),w=de(()=>Es("dashboard-backdrop-bottom",g.backdrop.bottomLayers),[g]),x=de(()=>g.backdrop.topLayers.length>0?Es("dashboard-backdrop-top",g.backdrop.topLayers):null,[g]),v=de(()=>g.title?Es("dashboard-title-band",g.title.layers):null,[g]);he(()=>!d||!u?void 0:(u({seekTo:async()=>{let I=m.current;I&&await WH(I);},getRenderedTime:()=>0,getDuration:()=>0,getViewport:()=>({width:y.width,height:y.height}),getBlocks:()=>g.cells.map(I=>({id:String(I.block.id),template:I.block.template??"content",startTime:0,duration:0})),getAudioSegments:()=>[],getCaptions:()=>[],getChapters:()=>[],showCover:async()=>{},hideCover:async()=>{},hasCoverBlock:()=>false}),()=>u(null)),[y,d,u,g]);let T={width:y.width,height:y.height},S={position:"absolute",inset:0},k={position:"relative",width:"var(--squisq-dashboard-fit-width, 100%)",aspectRatio:`${y.width} / ${y.height}`,overflow:"hidden",background:g.backdrop.fill,margin:"0 auto","--squisq-dashboard-aspect":(y.width/y.height).toFixed(6)};return b("div",{ref:m,className:f?`squisq-dashboard ${f}`:"squisq-dashboard","data-dashboard-layout":g.layout.name,"data-dashboard-style":g.style,style:k,children:[b("div",{style:S,"aria-hidden":"true",children:b(Jt,{block:w,blockTime:0,basePath:s,viewport:T,isPlaying:false,muted:true,animationsEnabled:l,theme:h})}),g.cells.map(E=>b(Pe,{children:[E.frame&&b("div",{className:"squisq-dashboard__frame","data-cell-index":E.index,"aria-hidden":"true",style:{position:"absolute",left:E.frame.rectPct.left,top:E.frame.rectPct.top,width:E.frame.rectPct.width,height:E.frame.rectPct.height,pointerEvents:"none"},children:b(Jt,{block:Es(`dashboard-frame-${E.index}`,E.frame.layers),blockTime:0,basePath:s,viewport:{width:E.frame.viewport.width,height:E.frame.viewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:h})}),b("div",{className:"squisq-dashboard__cell","data-cell-index":E.index,style:{position:"absolute",left:E.rectPct.left,top:E.rectPct.top,width:E.rectPct.width,height:E.rectPct.height,...E.frame?.contentRadiusPct?{borderRadius:E.frame.contentRadiusPct,overflow:"hidden"}:{}},children:[b(Jt,{block:{...E.block,layers:E.layers},blockTime:0,basePath:s,viewport:{width:E.viewport.width,height:E.viewport.height},isPlaying:false,muted:c,animationsEnabled:l,theme:h}),E.frame&&E.frame.overlayLayers.length>0&&b("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:b(Jt,{block:Es(`dashboard-frame-overlay-${E.index}`,E.frame.overlayLayers),blockTime:0,basePath:s,viewport:{width:E.frame.overlayViewport.width,height:E.frame.overlayViewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:h})})]})]},`${E.index}-${E.block.id}`)),g.title&&v&&b("div",{className:"squisq-dashboard__title",style:{position:"absolute",left:g.title.rectPct.left,top:g.title.rectPct.top,width:g.title.rectPct.width,height:g.title.rectPct.height},children:b(Jt,{block:v,blockTime:0,basePath:s,viewport:{width:g.title.viewport.width,height:g.title.viewport.height},isPlaying:false,muted:true,animationsEnabled:l,theme:h})}),x&&b("div",{style:{...S,pointerEvents:"none"},"aria-hidden":"true",children:b(Jt,{block:x,blockTime:0,basePath:s,viewport:T,isPlaying:false,muted:true,animationsEnabled:l,theme:h})})]})}var VH=new Set(["diagram","tree","timeline","map","drawing","layout","barChart","columnChart","pieChart","donutChart","lineChart","areaChart","scatterChart"]);function GH(e,t,n,r){let i=wu(e);if(!(!!i.templateName&&(VH.has(i.templateName)||!!r?.some(c=>c.name===i.templateName))))return null;let o=i.templateBlock??e,{layers:s,source:l}=us(o,{theme:t,viewport:n,customTemplates:r,persistentLayers:false});return s.length===0||l==="fallback"?null:{...o,layers:s}}function CS({block:e,depth:t,theme:n,basePath:r,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o,viewport:s,customTemplates:l}){let c=t===0?"h2":t===1?"h3":"h4",d=de(()=>GH(e,n,s,l),[e,l,n,s]);return b("section",{className:"squisq-flashcards__content-block","data-source-block-id":e.id,children:[!d&&e.title&&b(c,{className:"squisq-flashcards__content-title",children:e.title}),!d&&e.contents&&e.contents.length>0&&b(Zr,{nodes:e.contents,theme:n,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o}),(d||e.layers&&e.layers.length>0)&&b("div",{className:"squisq-flashcards__canvas",style:{aspectRatio:`${s.width} / ${s.height}`},children:b(Jt,{block:d??e,blockTime:Math.max(0,e.duration??0),basePath:r,viewport:s,animationsEnabled:false,theme:n,muted:true})}),!d&&e.children?.map(u=>b(CS,{block:u,depth:t+1,theme:n,basePath:r,showCodeCopyButton:i,onCopyCode:a,fenceRenderers:o,viewport:s,customTemplates:l},u.id))]})}function Ss(e){return b("div",{className:"squisq-flashcards__face-content",children:e.face.blocks.map(t=>b(CS,{block:t,depth:0,...e},t.id))})}function YH(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function AS(e,t){let n=[...e],r=YH(t)||1,i=()=>{r+=1831565813;let a=r;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296};for(let a=n.length-1;a>0;a--){let o=Math.floor(i()*(a+1));[n[a],n[o]]=[n[o],n[a]];}return n}function XH(e){return b(Ss,{...e,face:e.choice.content})}function KH(e){return e instanceof Element&&!!e.closest('button, a, input, select, textarea, [contenteditable="true"]')}function IS({doc:e,theme:t,basePath:n=".",source:r="auto",shuffle:i=false,globalKeyboardShortcuts:a=false,showCodeCopyButton:o=false,onCopyCode:s,fenceRenderers:l,viewport:c=Ze.landscape,className:d}){let u=de(()=>t??Hi(e),[e,t]),f=de(()=>Kh(e,{source:r}),[e,r]),[m,h]=ge(i),[y,g]=ge(1),[w,x]=ge(0),[v,T]=ge(false),[S,k]=ge(null),[E,I]=ge({}),[_,A]=ge(null),D=ue(null),B=de(()=>m?AS(f.cards,`${e.articleId}:${y}`):[...f.cards],[f.cards,e.articleId,y,m]),q=de(()=>_?_.map(X=>B.find(oe=>oe.id===X)).filter(X=>!!X):B,[B,_]),F=q[w],P=q.length>0&&w>=q.length,H=ke(()=>{x(0),T(false),k(null);},[]),$=ke(()=>{I({}),A(null),H(),g(X=>X+1);},[H]);he(()=>{I({}),A(null),H();},[f,H]),he(()=>{D.current&&(D.current.scrollTop=0);},[w,_]);let R=ke(()=>{F&&(T(true),F.kind==="multiple-choice"&&S===null&&I(X=>({...X,[F.id]:"again"})));},[F,S]),z=ke(()=>{if(F){if(!v){R();return}x(X=>X+1),T(false),k(null);}},[F,R,v]),C=ke(()=>{if(P){x(Math.max(0,q.length-1)),T(true);return}if(v){T(false),k(null);return}w>0&&(x(X=>X-1),T(true),k(null));},[w,P,v,q.length]),U=ke(X=>{!F||v||(k(X.id),T(true),I(oe=>({...oe,[F.id]:X.correct?"got-it":"again"})));},[F,v]),V=ke(X=>{F&&(I(oe=>({...oe,[F.id]:X})),x(oe=>oe+1),T(false),k(null));},[F]),M=ke(X=>{if(!(X.defaultPrevented||KH(X.target))){if(/^[1-9]$/.test(X.key)&&F?.kind==="multiple-choice"&&!v){let oe=F.choices?.[Number(X.key)-1];oe&&(X.preventDefault(),U(oe));return}X.key==="ArrowLeft"?(X.preventDefault(),C()):(X.key==="ArrowRight"||X.key===" "||X.key==="Enter")&&(X.preventDefault(),z());}},[U,F,z,C,v]);he(()=>{if(!a)return;let X=oe=>M(oe);return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[a,M]);let J={theme:u,basePath:n,showCodeCopyButton:o,onCopyCode:s,fenceRenderers:l,viewport:c,customTemplates:e.customTemplates},we=wt(u.typography.titleFont,"Georgia, serif"),me=wt(u.typography.bodyFont,"system-ui, sans-serif"),Y={"--squisq-flashcards-bg":u.colors.background,"--squisq-flashcards-surface":u.colors.backgroundLight,"--squisq-flashcards-text":u.colors.text,"--squisq-flashcards-muted":u.colors.textMuted,"--squisq-flashcards-primary":u.colors.primary,"--squisq-flashcards-secondary":u.colors.secondary,"--squisq-flashcards-highlight":u.colors.highlight,"--squisq-flashcards-warning":u.colors.warning,"--squisq-flashcards-radius":`${u.style.borderRadius??18}px`,"--squisq-flashcards-title-font":we,"--squisq-flashcards-body-font":me},se=f.cards.filter(X=>E[X.id]==="again").map(X=>X.id),ye=f.cards.filter(X=>E[X.id]==="got-it").length;if(f.cards.length===0)return b("div",{className:`squisq-flashcards squisq-flashcards--empty${d?` ${d}`:""}`,style:Y,role:"region","aria-label":"Flashcards",children:b("div",{className:"squisq-flashcards__empty-card",children:[b("h2",{children:"No complete flashcards yet"}),b("p",{children:"Add an answer beneath a heading, or nest an answer block under a question."}),f.diagnostics.length>0&&b("ul",{children:f.diagnostics.map((X,oe)=>b("li",{children:X.message},`${X.blockId}-${X.code}-${oe}`))})]})});if(P)return b("div",{className:`squisq-flashcards${d?` ${d}`:""}`,style:Y,role:"region","aria-label":"Flashcard session summary",tabIndex:0,onKeyDown:a?void 0:M,children:b("div",{className:"squisq-flashcards__summary",children:[b("span",{className:"squisq-flashcards__eyebrow",children:"Session complete"}),b("h2",{children:[ye," remembered"]}),b("p",{children:se.length===0?`You completed all ${f.cards.length} cards.`:`${se.length} ${se.length===1?"card needs":"cards need"} another look.`}),b("div",{className:"squisq-flashcards__summary-actions",children:[se.length>0&&b("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:()=>{A(se),H();},children:"Retry missed"}),b("button",{type:"button",className:"squisq-flashcards__button",onClick:$,children:"Study again"}),b("button",{type:"button",className:"squisq-flashcards__button",onClick:C,children:"Previous card"})]})]})});let pe=F?.choices?AS(F.choices,`${F.id}:${y}`):[],ce=pe.find(X=>X.id===S);return b("div",{className:`squisq-flashcards${d?` ${d}`:""}`,style:Y,role:"region","aria-label":"Flashcards",tabIndex:0,onKeyDown:a?void 0:M,children:[b("header",{className:"squisq-flashcards__header",children:[b("div",{className:"squisq-flashcards__deck-copy",children:[b("span",{className:"squisq-flashcards__eyebrow",children:"Flashcards"}),f.title&&b("h1",{children:f.title})]}),b("div",{className:"squisq-flashcards__tools",children:[b("button",{type:"button",className:"squisq-flashcards__tool","aria-pressed":m,onClick:()=>{h(X=>!X),$();},children:"Shuffle"}),b("button",{type:"button",className:"squisq-flashcards__tool",onClick:$,children:"Restart"})]})]}),b("div",{className:"squisq-flashcards__progress-row",children:[b("span",{children:["Card ",w+1," of ",q.length]}),b("span",{children:v?"Answer revealed":"Question"})]}),b("div",{className:"squisq-flashcards__progress","aria-hidden":"true",children:b("span",{style:{width:`${(w+(v?1:0))/q.length*100}%`}})}),b("main",{ref:D,className:"squisq-flashcards__card","data-card-kind":F.kind,"aria-label":"Scrollable flashcard content",tabIndex:0,children:[F.label&&b("div",{className:"squisq-flashcards__label",children:F.label}),b("section",{className:"squisq-flashcards__front","aria-label":"Question",children:b(Ss,{...J,face:F.front})}),F.kind==="multiple-choice"&&b("div",{className:"squisq-flashcards__choices",role:"group","aria-label":"Answer choices",children:pe.map((X,oe)=>{let ve=S===X.id,Le=v?X.correct?"correct":ve?"incorrect":"idle":"idle";return b("button",{type:"button",className:"squisq-flashcards__choice","data-choice-status":Le,"aria-pressed":ve,disabled:v,onClick:()=>U(X),children:[b("span",{className:"squisq-flashcards__choice-key","aria-hidden":"true",children:oe+1}),b(XH,{...J,choice:X})]},X.id)})}),v&&F.kind==="basic"&&b("section",{className:"squisq-flashcards__answer","aria-label":"Answer",children:[b("span",{className:"squisq-flashcards__answer-label",children:"Answer"}),b(Ss,{...J,face:F.back})]}),v&&F.kind==="multiple-choice"&&b("div",{className:"squisq-flashcards__feedback","data-correct":ce?.correct===true,"aria-live":"polite",children:[b("strong",{children:ce===void 0?"Answer revealed":ce.correct?"Correct":"Not quite"}),!ce?.correct&&b("div",{className:"squisq-flashcards__correct-answer",children:[b("span",{children:"The correct answer is"}),b(Ss,{...J,face:F.back})]})]}),v&&F.explanation&&b("section",{className:"squisq-flashcards__explanation","aria-label":"Explanation",children:[b("span",{className:"squisq-flashcards__answer-label",children:"Explanation"}),b(Ss,{...J,face:F.explanation})]})]}),b("footer",{className:"squisq-flashcards__footer",children:[b("button",{type:"button",className:"squisq-flashcards__button",disabled:w===0&&!v,onClick:C,children:"Previous"}),b("div",{className:"squisq-flashcards__primary-actions",children:v&&F.kind==="basic"?b(Pe,{children:[b("button",{type:"button",className:"squisq-flashcards__button",onClick:()=>V("again"),children:"Again"}),b("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:()=>V("got-it"),children:"Got it"})]}):b("button",{type:"button",className:"squisq-flashcards__button squisq-flashcards__button--primary",onClick:z,children:v?w===q.length-1?"Finish":"Next card":"Reveal answer"})})]}),b("p",{className:"squisq-flashcards__shortcut-hint",children:["Use \u2190 and \u2192 to navigate, Space to reveal",F.kind==="multiple-choice"?", or 1\u20139 to answer":"","."]})]})}var QH=new Set(["a","an","the","and","but","or","for","nor","on","at","to","in","of","by","is"]);function cg(e){let t=new Map;for(let n of e.blocks)if(tn(n)&&n.template==="sectionHeader"&&"title"in n){let r=n.audioSegment;t.has(r)||t.set(r,n.title);}for(let n=0;n<e.audio.segments.length;n++){if(t.has(n))continue;let r=e.audio.segments[n].name;if(r.includes("intro"))t.set(n,"Introduction");else if(r.includes("flight-context"))t.set(n,"Flight Context");else {let i=r.split("-").map((a,o)=>o===0||!QH.has(a)?a.charAt(0).toUpperCase()+a.slice(1):a).join(" ");t.set(n,i);}}return t}function Lu(e,t,n){if(e)return Object.prototype.hasOwnProperty.call(e,t)?e[t]:e[n]}function ZH(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t==="background"||t==="behind")return "background";if(t==="full-frame"||t==="fullscreen"||t==="full")return "full-frame";if(t==="picture-in-picture"||t==="pip"||t==="overlay")return "picture-in-picture"}function JH(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t==="small"||t==="sm"||t==="pip-small")return "small";if(t==="large"||t==="lg"||t==="big"||t==="pip-large")return "large"}function ez(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();if(t==="square"||t==="1:1")return "square";if(t==="wide"||t==="16:9"||t==="widescreen")return "wide"}function tz(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replace(/[_\s]+/g,"-");return {"top-left":"top-left","upper-left":"top-left","top-right":"top-right","upper-right":"top-right","bottom-left":"bottom-left","lower-left":"bottom-left","bottom-right":"bottom-right","lower-right":"bottom-right"}[t]}function MS(e,t={}){let n=e.frontmatter,r=$h(n,{...t.showCoverSlide!==void 0?{enabled:t.showCoverSlide}:{},...t.coverSlideTemplate!==void 0?{template:t.coverSlideTemplate}:{},...t.coverSlideDuration!==void 0?{duration:t.coverSlideDuration}:{},...t.coverSlidePlayback!==void 0?{playback:t.coverSlidePlayback}:{}});return {theme:t.theme??Hi(e),videoPresentation:t.videoPresentation??ZH(Lu(n,"squisq-video-presentation","video-presentation"))??"background",pipSize:t.pipSize??JH(Lu(n,"squisq-pip-size","pip-size"))??"small",pipShape:t.pipShape??ez(Lu(n,"squisq-pip-shape","pip-shape"))??"square",pipPosition:t.pipPosition??tz(Lu(n,"squisq-pip-position","pip-position"))??"bottom-right",showCoverSlide:r.enabled,coverSlideTemplate:r.template,coverSlideDuration:r.duration,coverSlidePlayback:r.playback}}function nz(){try{return typeof process<"u"&&!1}catch{return false}}var qS=false,rz=100,LS=1e-6;function ug(){return new Promise(e=>{let t=false,n=null,r=()=>{t||(t=true,window.clearTimeout(i),n!==null&&window.cancelAnimationFrame(n),e());},i=window.setTimeout(r,document.visibilityState==="visible"?rz:0);document.visibilityState==="visible"&&(n=window.requestAnimationFrame(r));})}function PS(e){let{doc:t,markdown:n}=e,r=de(()=>!t&&n!==void 0?qa(pn(n)):void 0,[t,n]),i=t??r;return i?e.displayMode==="flashcards"?b("div",{className:"doc-player doc-player--flashcards",children:b(IS,{doc:i,basePath:e.basePath,theme:e.theme,globalKeyboardShortcuts:e.globalKeyboardShortcuts,showCodeCopyButton:e.showCodeCopyButton,onCopyCode:e.onCopyCode,fenceRenderers:e.fenceRenderers,viewport:e.forceViewport})}):b(iz,{...e,doc:i}):b("div",{className:"doc-player doc-player--empty"})}function iz({doc:e,basePath:t=".",renderMode:n=false,animationsEnabled:r=true,autoPlay:i=false,loop:a=false,onEnded:o,onTimeUpdate:s,audioController:l,audioMode:c="media",showControls:d=true,showScrubber:u=false,muted:f=false,captionsEnabled:m,onCaptionsToggle:h,onPlaybackStateChange:y,onControlsReady:g,onRenderAPIReady:w,renderVideoFrameSelector:x,processedAudio:v,isFullscreen:T=false,onFullscreenToggle:S,onBlockMarkers:k,forceViewport:E,displayMode:I="video",dashboardLayout:_,dashboardShowTitle:A,dashboardStyle:D,dashboardDocumentTitle:B,showCoverSlide:q,coverSlideTemplate:F,coverSlideDuration:P,coverSlidePlayback:H,coverVisible:$,theme:R,motion:z,surface:C,captionStyle:U="standard",captionPosition:V,videoPresentation:M,pipSize:J,pipShape:we,pipPosition:me,enableSwipe:Y=true,globalKeyboardShortcuts:se=false,showCodeCopyButton:ye=false,onCopyCode:pe,fenceRenderers:ce,tableContentRenderer:X}){let oe=I==="slideshow",ve=I==="linear",Le=I==="dashboard",Ne=ue(null),et=ue(null),pt=`squisq-player-${Wt().replace(/:/g,"")}`,[Ut,en]=ge(null),xt=ue(),{viewport:sn}=WE(),$e=E||(n?Ze.landscape:sn),ln=$e.height>$e.width?"portrait":"landscape",ct=de(()=>typeof window>"u"?false:new URLSearchParams(window.location.search).get("debug")==="true",[]),G=de(()=>c==="synthetic"?rl(e):0,[c,e]),re=HE(Ne,e.audio,t,!l,c,G),Se=l||re;he(()=>{if(qS||!nz())return;let K=et.current;if(!K||typeof getComputedStyle!="function")return;getComputedStyle(K).getPropertyValue("--squisq-styles-loaded").trim()||(qS=true,console.warn('[squisq] @bendyline/squisq-react/styles is not loaded \u2014 import "@bendyline/squisq-react/styles"'));},[]);let{currentTime:Ie,isPlaying:Ee,currentSegment:ot,totalDuration:Ye,isEnded:jt,isReady:Nn,isAvailable:En,unavailableMessage:yt,play:Pt,pause:st,toggle:dg,seekTo:At,skipToSegment:dz,restart:_s}=Se,[mg,DS]=ge(null),OS=mg?.doc===e?mg.time:null,ut=n?OS??Ie:Ie,FS=de(()=>Qi(e),[e]),fg=R1(FS,t),BS=de(()=>Qi(e,{intrinsicDuration:K=>fg.get(K.src),...v?{processedAudio:v}:{}}),[e,fg,v]),As=ke(()=>{if(n)return;let K=et.current;if(!K)return;K.querySelectorAll('.doc-player__block--active video[data-clip-start], [data-clip-id][data-active="true"]').forEach(Oe=>{let It=Oe.play();It&&It.catch(()=>{});});},[n]),Cs=ke(()=>(As(),Pt()),[Pt,As]),Wi=ke(()=>(Ee||As(),dg()),[Ee,As,dg]),Ru=ue(ut);Ru.current=ut;let Nu=ue(ut),Is=ue([]),pg=ue(x);pg.current=x;let hg=ue(null),gg=ue(Ye);gg.current=Ye;let yg=ue(0);bn(()=>{Nu.current=ut;let K=Is.current;Is.current=K.filter(Te=>Math.abs(Te.time-ut)>LS?true:(Te.resolve(),false));},[ut]),he(()=>()=>{let K=new Error("DocPlayer unmounted before the requested frame committed.");Is.current.splice(0).forEach(Te=>Te.reject(K));},[]);let bg=ke(K=>Math.abs(Nu.current-K)<=LS?Promise.resolve():new Promise((Te,Oe)=>{Is.current.push({time:K,resolve:Te,reject:Oe});}),[]),$S=ke(K=>{if(n||ve)return;let Te=K.target;if(oe){Te.closest('button, a, input, textarea, select, [contenteditable="true"]')||et.current?.focus({preventScroll:true});return}if(Te.closest('button, a, input, textarea, select, [contenteditable="true"], .doc-player__controls, .doc-player__scrubber, .doc-controls-sidebar, .doc-controls-slideshow'))return;et.current?.focus({preventScroll:true}),Wi(),en(Ee?"pause":"play"),clearTimeout(xt.current),xt.current=setTimeout(()=>en(null),600);},[n,Wi,Ee,oe,ve]),HS=Au(C==="auto"),Du=C==="auto"?HS:C,yn=de(()=>MS(e,{theme:R,videoPresentation:M,pipSize:J,pipShape:we,pipPosition:me,showCoverSlide:q,coverSlideTemplate:F,coverSlideDuration:P,coverSlidePlayback:H}),[e,R,M,J,we,me,q,F,P,H]),Dn=de(()=>{let K=yn.theme;return Du?ro(K,Du):K},[yn.theme,Du]),za=de(()=>Fd(Dn),[Dn]),zS=za,US=de(()=>({border:za["--squisq-pip-border"],borderRadius:za["--squisq-pip-radius"],boxShadow:za["--squisq-pip-shadow"]}),[za]),jS=de(()=>e.blocks.some(K=>typeof K.sourceStartTime=="number"),[e.blocks]),{currentBlock:tr,currentBlockIndex:Sn,previousBlock:Ms,isEntering:WS,isExiting:VS,blockTime:wg,docProgress:Ou,blocks:We,suppressOutgoingForNextBlock:kg}=jE(e,ut,{basePath:t,viewport:$e,theme:Dn,motion:z,onSeek:At,deterministicTransitions:n,useAudioSegmentTiming:c!=="synthetic"||n&&jS}),Ct=de(()=>{let K=e.startBlock;if(!yn.showCoverSlide||!K)return null;let Te=_n(Dn,0,1,$e,{motion:Ji(e,Dn,z)});return {id:"cover-block",startTime:-1,duration:0,audioSegment:-1,layers:xh(K,Te,yn.coverSlideTemplate)}},[e,z,$e,Dn,yn.showCoverSlide,yn.coverSlideTemplate]),Fu=!!Ct,[qs,kr]=ge(false),[GS,xg]=ge(false),vg=ue("");he(()=>{let K=`${e.articleId}:${oe}:${Fu}:${n}`;vg.current!==K&&(vg.current=K,oe&&Fu&&!n?(kr(true),st()):kr(false));},[e.articleId,oe,Fu,n,st]);let[YS,Bu]=ge(false),[XS,$u]=ge(false),Hu=ue(),Ls=ue(false),Ps=ue(false);he(()=>{Ps.current=false,Ls.current=false,clearTimeout(Hu.current),$u(false),Bu(false);},[e]),Ct&&!oe&&!Ee&&ut===0&&!Ps.current&&!n&&!i&&(Ls.current=true),he(()=>{Ee&&Ls.current&&Ct&&!n&&!oe&&(Ls.current=false,Ps.current=true,$u(true),Hu.current=setTimeout(()=>$u(false),yn.coverSlideDuration*1e3));},[Ee,Ct,n,oe,yn.coverSlideDuration]),he(()=>()=>clearTimeout(Hu.current),[]),he(()=>()=>clearTimeout(xt.current),[]);let KS=!ve&&!!Ct&&(YS||!oe&&(XS||!Ee&&ut===0&&!Ps.current&&!n&&!i)),Tg=$??qs,Ua=!!(oe&&!ve&&!n&&Ct&&Tg),xr=$===void 0?KS||Ua:!!Ct&&$,cn=!!(oe&&!n&&Ct),vr=cn?Tg?0:Sn+1:Sn,Rs=cn?We.length+1:We.length,zu=ue(false);he(()=>{zu.current=false;},[e]),he(()=>{Nn&&i&&!zu.current&&(zu.current=true,Cs());},[Nn,i,Cs]),he(()=>{s?.(ut);},[ut,s]),he(()=>{jt&&(o?.(),a&&!oe&&!ve&&!Le&&_s());},[jt,Le,ve,oe,a,o,_s]);let Vi=ue(null),Uu=ue(null);if(!Uu.current){let K=()=>{let Te=Vi.current;if(!Te)throw new Error("Squisq render API is not currently available.");return Te};Uu.current={seekTo:Te=>K().seekTo(Te),getRenderedTime:()=>K().getRenderedTime(),getDuration:()=>K().getDuration(),getViewport:()=>K().getViewport(),getBlocks:()=>K().getBlocks(),getAudioSegments:()=>K().getAudioSegments(),getCaptions:()=>K().getCaptions(),getChapters:()=>K().getChapters(),showCover:()=>K().showCover(),hideCover:()=>K().hideCover(),hasCoverBlock:()=>K().hasCoverBlock()};}let Eg=Uu.current;he(()=>{if(Le||!n&&!ct){Vi.current=null;return}let K=et.current;if(!K){Vi.current=null;return}let Mg={seekTo:async He=>{if(n){let Ke=bg(He);Ey(()=>DS({doc:e,time:He})),l&&At(He).catch(()=>{}),await Ke;}else await At(He);let nr=-1;for(let Ke=We.length-1;Ke>=0;Ke--)if(He>=We[Ke].startTime){nr=Ke;break}let Va=nr>=0?We[nr].startTime:0,n5=nr>0?We[nr-1].startTime:Va,qg=(He-Va)*1e3,r5=(He-n5)*1e3,Lg=async(Ke,bt)=>{let Mt=n?pg.current:void 0;Mt&&await Mt(Ke,bt)||await p0(Ke,bt);},Pg=0;(K.getAnimations?.({subtree:true})??[]).forEach(Ke=>{let bt=Ke.effect?.target;if(!bt)return;let Mt;bt.closest(".doc-player__block--previous")?Mt=bt.classList.contains("block-svg")?qg:r5:bt.closest(".doc-player__block--active")?Mt=qg:bt.closest(".doc-player__block--cover")?Mt=0:Mt=He*1e3,n&&typeof Ke.pause=="function"&&Ke.playState!=="paused"&&Ke.pause(),Ke.currentTime=Math.max(0,Mt);let Gi=Ke.effect?.getComputedTiming?.().endTime;(typeof Gi!="number"||Mt<Gi)&&(Pg+=1);});let i5=He-Va,Vu=[],Rg=K.querySelector(".doc-player__block--active");Rg&&Rg.querySelectorAll("video[data-clip-start]").forEach(bt=>{let Mt=bt,Gi=parseFloat(Mt.dataset.clipStart||"0"),Yu=parseFloat(Mt.dataset.clipEnd||"0"),Xu=parseFloat(Mt.dataset.startAt||"0"),o5=Math.min(Gi+Math.max(0,i5-Xu),Yu);Vu.push(Lg(Mt,o5));}),K.querySelectorAll("video[data-clip-id]").forEach(Ke=>{let bt=Ke,Mt=parseFloat(bt.dataset.absStart||"0"),Gi=parseFloat(bt.dataset.absEnd||"0"),Yu=parseFloat(bt.dataset.sourceIn||"0");if(bt.pause(),He<Mt||He>=Gi)return;let Xu=Yu+(He-Mt);Vu.push(Lg(bt,Xu));}),await Promise.all(Vu);let Gu=Array.from(K.querySelectorAll(".doc-player__block"),Ke=>({element:Ke,className:Ke.className})),Hs=hg.current;hg.current=Gu;let a5=Hs!==null&&Hs.length===Gu.length&&Gu.every((Ke,bt)=>Ke.element===Hs[bt].element&&Ke.className===Hs[bt].className);(!n||!a5||Pg>0)&&await ug();},getRenderedTime:()=>Nu.current,getDuration:()=>{let He=rl(e);return Ye>0?Math.max(Ye,He):He},getViewport:()=>({width:$e.width,height:$e.height}),getBlocks:()=>We.map(He=>({id:He.id,template:He.template??"raw",startTime:He.startTime,duration:He.duration})),getAudioSegments:()=>e.audio.segments.map(He=>({src:He.src,name:He.name,duration:He.duration,startTime:He.startTime})),getCaptions:()=>e.captions?.phrases?.map(He=>({text:He.text,startTime:He.startTime,endTime:He.endTime}))||[],getChapters:()=>{let He=cg(e);return e.audio.segments.map((nr,Va)=>({title:He.get(Va)||nr.name,startTime:nr.startTime,duration:nr.duration}))},showCover:()=>(Bu(true),ug()),hideCover:()=>(Bu(false),ug()),hasCoverBlock:()=>!!Ct};return Vi.current=Mg,()=>{Vi.current===Mg&&(Vi.current=null);}},[n,ct,At,Ye,We,Ct,e,l,bg,Le,$e]),he(()=>{if(!Le){if(!n&&!ct||!et.current){w?.(null);return}return w?.(Eg),()=>w?.(null)}},[n,ct,Le,w,Eg]);let ju=m===false?"off":U||"standard",[Ns,Wu]=ge(ju);he(()=>{Wu(ju);},[ju]);let ei=Ns!=="off",QS=Ns==="social"?"social":"standard",Sg=ke(K=>{Wu(K?U||"standard":"off"),h?.(K);},[h,U]),_g=ke(()=>{Wu(K=>{let Te=K==="off"?"standard":K==="standard"?"social":"off";return h?.(Te!=="off"),Te});},[h]),Ds=e.captions&&e.captions.phrases.length>0,Ag=de(()=>cg(e),[e]),ja=de(()=>({isPlaying:Ee,currentTime:ut,totalDuration:Ye,isCoverVisible:xr,currentBlockIndex:vr,totalBlocks:Rs,docProgress:Ou,hasCaptions:!!Ds,captionsEnabled:ei,captionMode:Ns,isFullscreen:T,currentSegmentIndex:ot,currentSegmentName:Ag.get(ot)??e.audio.segments[ot]?.name??null,currentBlock:Ua?Ct:tr??null,currentSlideLabel:Ua?"Cover":void 0,currentSlideNumber:cn&&!Ua?Sn+1:void 0,totalSlideNumber:cn?We.length:void 0}),[Ee,ut,Ye,xr,vr,Rs,Ou,Ds,ei,Ns,T,ot,Ag,tr,Sn,Ua,Ct,cn,We.length]),Os=de(()=>({toggle:Wi,restart:_s,seekTo:At,setCaptionsEnabled:Sg,cycleCaptionMode:_g,toggleFullscreen:S}),[Wi,_s,At,Sg,_g,S]),On=de(()=>({nextSlide:()=>{if(cn&&qs){let K=We[0];K&&(kr(false),At(K.startTime),st());return}if(Sn<We.length-1){let K=We[Sn+1];K&&(kr(false),At(K.startTime),st());}},prevSlide:()=>{if(cn&&!qs&&Sn<=0){kr(true),At(0),st();return}if(Sn>0){let K=We[Sn-1];K&&(kr(false),At(K.startTime),st());}},goToSlide:K=>{if(cn){if(K===0){kr(true),At(0),st();return}let Te=We[K-1];Te&&(kr(false),At(Te.startTime),st());return}if(K>=0&&K<We.length){let Te=We[K];Te&&(At(Te.startTime),st());}}}),[Sn,We,At,st,cn,qs]),Fs=oe&&!ve&&!n&&Y,Bs=ke(K=>{let Te=K-(cn?1:0),Oe=We[Te];Oe&&kg(Oe.id);},[We,cn,kg]),ZS=ke(()=>{Bs(vr+1),On.nextSlide();},[Bs,vr,On]),JS=ke(()=>{Bs(vr-1),On.prevSlide();},[Bs,vr,On]),Tr=VE({enabled:Fs,containerRef:et,canGoNext:vr<Rs-1,canGoPrev:vr>0,onNext:ZS,onPrev:JS});he(()=>{y?.(ja);},[ja,y]),he(()=>{g?.({play:Cs,pause:st,...Os});},[Cs,st,Os,g]);let ti=ke(K=>{let Te=K;if(tn(Te)){let Oe=Te;if(typeof Oe.title=="string")return Oe.title;if(typeof Oe.stat=="string")return Oe.stat;if(typeof Oe.quote=="string"){let It=Oe.quote.split(`
|
|
743
743
|
`)[0];return It.length<=30?It:It.slice(0,27)+"..."}if(typeof Oe.date=="string")return Oe.date;if(typeof Oe.fact=="string")return Oe.fact}if(K.layers&&Array.isArray(K.layers)){let Oe=K.layers.find(It=>It.type==="text");if(Oe?.content?.text){let It=Oe.content.text.split(`
|
|
744
744
|
`)[0];return It.length<=30?It:It.slice(0,27)+"..."}}return K.id.replace(/-/g," ").replace(/\b\w/g,Oe=>Oe.toUpperCase())},[]),e5=de(()=>{let K=We.map((Te,Oe)=>({id:Te.id,label:String(Oe+1),summary:ti(Te)}));return !cn||!Ct?K:[{id:"__cover__",label:"Cover",summary:ti(Ct)},...K]},[Ct,We,ti,cn]),Wa=de(()=>{if(!Ye||!We.length)return [];let K=-1;return We.map((Te,Oe)=>{let It=Te.audioSegment!==K;return K=Te.audioSegment,{block:Te,index:Oe,position:Te.startTime/Ye*100,title:ti(Te),isSectionStart:It}})},[We,Ye,ti]);he(()=>{Wa.length>0&&k?.(Wa);},[Wa,k]),yg.current=oe?Rs:We.length;let $s=ke((K,Te)=>{if(K.defaultPrevented||K.altKey||K.ctrlKey||K.metaKey||K.shiftKey)return;let Oe=K.target instanceof Element?K.target:null,It=!!Oe?.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="combobox"], [role="listbox"], [role="slider"], [role="spinbutton"], .monaco-editor'),Cg=!!Oe?.closest('[role="menu"], [role="dialog"], [aria-modal="true"]'),Ig=oe&&!!Oe?.closest(".doc-controls-slideshow")&&!Oe.closest('[role="menu"]');if(!(It||Te&&Cg||!Te&&Oe?.closest('input, textarea, select, button, a, [contenteditable]:not([contenteditable="false"]), [role="textbox"]')&&!Ig)&&!(ve||Le)){if(K.key==="f"||K.key==="F"){if(!S)return;K.preventDefault(),S();return}if(oe)switch(K.key){case "ArrowRight":case "ArrowDown":case " ":K.preventDefault(),On.nextSlide();break;case "ArrowLeft":K.preventDefault(),On.prevSlide();break;case "ArrowUp":K.preventDefault(),xg(true);break;case "Home":K.preventDefault(),On.goToSlide(0);break;case "End":K.preventDefault(),On.goToSlide(yg.current-1);break}else switch(K.key){case " ":K.preventDefault(),Wi();break;case "ArrowRight":K.preventDefault(),At(Math.min(Ru.current+10,gg.current));break;case "ArrowLeft":K.preventDefault(),At(Math.max(Ru.current-10,0));break}}},[oe,ve,Le,Wi,At,On,S]),t5=ke(K=>$s(K,false),[$s]);return he(()=>{if(!se||n||ve||Le)return;let K=Te=>{$s(Te,true);};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[se,$s,Le,ve,n]),ve?b("div",{ref:et,"data-player-id":pt,className:"doc-player doc-player--linear",style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:b(qu,{doc:e,basePath:t,viewport:$e,theme:R,surface:C,animationsEnabled:r,showCodeCopyButton:ye,onCopyCode:pe,fenceRenderers:ce})}):Le?b("div",{ref:et,"data-player-id":pt,className:"doc-player doc-player--dashboard",style:{position:"relative",width:"100%",aspectRatio:`${$e.width} / ${$e.height}`,margin:"0 auto",overflow:"hidden"},children:b(_S,{doc:e,theme:R,viewport:$e,layout:_,showTitle:A,style:D,documentTitle:B,basePath:t,animationsEnabled:r,muted:n||f,renderMode:n||ct,onRenderAPIReady:w})}):b("div",{ref:et,"data-player-id":pt,"data-orientation":ln,"data-playback-state":Ee?"playing":"paused","data-swipe-phase":Tr.phase,tabIndex:n?-1:0,role:"region","aria-label":"Document player",onKeyDown:n?void 0:t5,className:`doc-player${n?" doc-player--render-mode":""}${Fs?" doc-player--swipe":""}${Tr.phase==="dragging"?" doc-player--grabbing":""}`,onClick:$S,onPointerDown:Tr.onPointerDown,style:{...zS,position:"relative",width:"100%",aspectRatio:`${$e.width} / ${$e.height}`,margin:"0 auto",overflow:"hidden",cursor:n||Fs?void 0:"pointer",touchAction:Fs?"pan-y":void 0},children:[b("audio",{ref:Ne,preload:"auto",muted:f}),b(L1,{schedule:BS,currentTime:ut,isPlaying:Ee,basePath:t,renderMode:n,muted:f,presentation:yn.videoPresentation,pipSize:yn.pipSize,pipShape:yn.pipShape,pipPosition:yn.pipPosition,pipOrientation:ln,pipFrameStyle:US}),b("div",{className:"doc-player__viewport",children:[xr&&Ct&&b("div",{className:"doc-player__block doc-player__block--cover",children:b(Jt,{block:Ct,blockTime:0,basePath:t,isEntering:false,viewport:$e,muted:n||f,animationsEnabled:r,theme:Dn,tableContentRenderer:X,growTextToFit:oe})}),r&&!xr&&Ms&&VS&&b("div",{className:"doc-player__block doc-player__block--previous",children:b(Jt,{block:Ms,blockTime:Math.max(0,ut-Ms.startTime),basePath:t,isExiting:true,transition:tr?.transition,viewport:$e,muted:n||f,animationsEnabled:r,theme:Dn,tableContentRenderer:X,growTextToFit:oe})},Ms.id),tr&&b("div",{className:`doc-player__block doc-player__block--active${Tr.phase!=="idle"?` doc-player__block--${Tr.phase}`:""}`,"aria-hidden":xr||void 0,style:xr||Tr.phase!=="idle"?{...Tr.phase!=="idle"?{transform:`translateX(${Tr.offsetPx}px)`}:{},...xr?{opacity:0,pointerEvents:"none"}:{}}:void 0,children:b(Jt,{block:tr,blockTime:wg,basePath:t,isEntering:r&&WS,viewport:$e,isPlaying:Ee,muted:n||f,animationsEnabled:r,theme:Dn,tableContentRenderer:X,growTextToFit:oe})},tr.id),Ds&&(n?ei:true)&&b(FE,{captions:e.captions,currentTime:ut,enabled:ei&&(n||Ee||ut>0),fontSize:Math.min(34,Math.max(16,Math.round($e.height*.026))),captionStyle:QS,captionPosition:V,theme:Dn,viewport:$e}),ct&&b("div",{className:"doc-player__debug",style:{position:"absolute",top:"8px",right:"8px",padding:"8px 12px",background:"rgba(0, 0, 0, 0.85)",borderRadius:"6px",color:"#00ff00",fontFamily:"monospace",fontSize:"11px",lineHeight:"1.5",zIndex:200,maxWidth:"280px",pointerEvents:"none",textAlign:"left"},children:[b("div",{style:{color:"#ffcc00",fontWeight:"bold",marginBottom:"4px"},children:"DEBUG MODE"}),b("div",{children:[b("span",{style:{color:"#888"},children:"template:"})," ",b("span",{style:{color:"#ff6b6b"},children:tr?.template??"raw"})]}),b("div",{children:[b("span",{style:{color:"#888"},children:"block:"})," ",Sn+1,"/",We.length," ",b("span",{style:{color:"#666"},children:["(",tr?.id||"none",")"]})]}),b("div",{children:[b("span",{style:{color:"#888"},children:"time:"})," ",ut.toFixed(2),"s /"," ",Ye.toFixed(1),"s"," ",b("span",{style:{color:"#666"},children:["(progress: ",(Ou*100).toFixed(1),"%, scriptDur: ",e.duration.toFixed(1),")"]})]}),b("div",{children:[b("span",{style:{color:"#888"},children:"blockTime:"})," ",wg.toFixed(2),"s /"," ",(tr?.duration||0).toFixed(1),"s"]}),b("div",{children:[b("span",{style:{color:"#888"},children:"segment:"})," ",ot,"/",e.audio.segments.length-1," ",b("span",{style:{color:"#666"},children:["(",e.audio.segments[ot]?.name||"none",")"]})]}),b("div",{children:[b("span",{style:{color:"#888"},children:"viewport:"})," ",$e.name||`${$e.width}x${$e.height}`," ",b("span",{style:{color:"#666"},children:["(",ln,")"]})]}),b("div",{children:[b("span",{style:{color:"#888"},children:"playing:"})," ",b("span",{style:{color:Ee?"#4ade80":"#f87171"},children:Ee?"yes":"no"}),xr&&b("span",{style:{color:"#60a5fa"},children:" (cover)"})]}),Ds&&(()=>{let K=io(e.captions,ut),Te=ei&&(Ee||ut>0);return b(Pe,{children:[b("div",{children:[b("span",{style:{color:"#888"},children:"captions:"})," ",e.captions?.phrases.length||0," phrases"," ",b("span",{style:{color:ei?"#4ade80":"#666"},children:["(",ei?"on":"off",")"]})]}),b("div",{children:[b("span",{style:{color:"#888"},children:"cc.enabled:"})," ",b("span",{style:{color:Te?"#4ade80":"#f87171"},children:String(Te)})," ",b("span",{style:{color:"#666"},children:["(playing=",String(Ee)," t>0=",String(ut>0),")"]})]}),b("div",{children:[b("span",{style:{color:"#888"},children:"cc.phrase:"})," ",b("span",{style:{color:K?"#4ade80":"#f87171"},children:K?`"${K.text.slice(0,30)}..."`:"null"})]}),K&&b("div",{children:[b("span",{style:{color:"#888"},children:"cc.range:"})," ",b("span",{style:{color:"#60a5fa"},children:[K.startTime.toFixed(2),"-",K.endTime.toFixed(2)]})]})]})})()]})]}),!n&&!En&&yt&&b("div",{className:"doc-player__unavailable",style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:"16px",background:"rgba(0, 0, 0, 0.7)",color:"rgba(255, 255, 255, 0.9)",fontSize:"14px",zIndex:50},children:[b("span",{style:{fontSize:"32px"},children:"\u{1F50A}"}),b("span",{children:yt})]}),!n&&!oe&&d&&b(GE,{state:ja,actions:Os,blockMarkers:Wa,expandedBlocks:We,getBlockTitle:ti}),!n&&!oe&&!d&&u&&b("div",{className:"doc-player__scrubber",style:{position:"absolute",bottom:0,left:0,right:0,padding:"12px 16px 8px",background:"linear-gradient(transparent, rgba(0,0,0,0.6))",display:"flex",alignItems:"center",zIndex:100},children:b(Cu,{state:ja,actions:Os,blockMarkers:Wa,expandedBlocks:We,getBlockTitle:ti})}),!n&&oe&&d&&b(YE,{state:ja,slideNav:On,slides:e5,pickerOpen:GS,onPickerOpenChange:xg}),!oe&&Ut&&b("div",{className:"doc-player__tap-feedback",children:b("svg",{viewBox:"0 0 24 24",fill:"white",width:"48",height:"48",children:Ut==="pause"?b("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}):b("path",{d:"M8 5v14l11-7z"})})},Ut)]})}var RS=`.squisq-md-attachment{display:inline-flex;align-items:center;gap:.35em;max-width:100%;border:1px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:999px;padding:.1em .5em;background:color-mix(in srgb,currentColor 8%,transparent);font-size:.86em;line-height:1.35;vertical-align:middle}.squisq-md-attachment>.fa-paperclip{flex:0 0 auto;opacity:.72}.squisq-md-attachment-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes slowZoomIn{0%{transform:scale(1)}to{transform:scale(1.15)}}.squisq-flashcards{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;min-height:420px;overflow:hidden;padding:clamp(18px,4vw,48px);color:var(--squisq-flashcards-text);background:radial-gradient(circle at 12% 5%,color-mix(in srgb,var(--squisq-flashcards-primary) 22%,transparent),transparent 34%),var(--squisq-flashcards-bg);font-family:var(--squisq-flashcards-body-font);outline:none}.squisq-flashcards *,.squisq-flashcards *:before,.squisq-flashcards *:after{box-sizing:border-box}.squisq-flashcards__header,.squisq-flashcards__progress-row,.squisq-flashcards__progress,.squisq-flashcards__card,.squisq-flashcards__footer,.squisq-flashcards__shortcut-hint,.squisq-flashcards__summary,.squisq-flashcards__empty-card{width:min(920px,100%);margin-inline:auto}.squisq-flashcards__header,.squisq-flashcards__footer,.squisq-flashcards__progress-row,.squisq-flashcards__tools,.squisq-flashcards__primary-actions,.squisq-flashcards__summary-actions{display:flex;align-items:center;gap:10px}.squisq-flashcards__header,.squisq-flashcards__footer,.squisq-flashcards__progress-row{justify-content:space-between}.squisq-flashcards__header{flex:0 0 auto;margin-bottom:22px}.squisq-flashcards__deck-copy h1,.squisq-flashcards__summary h2,.squisq-flashcards__empty-card h2{margin:2px 0 0;font:700 clamp(22px,3vw,34px) / 1.1 var(--squisq-flashcards-title-font)}.squisq-flashcards__eyebrow,.squisq-flashcards__answer-label,.squisq-flashcards__label{color:var(--squisq-flashcards-primary);font-size:12px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.squisq-flashcards__tool,.squisq-flashcards__button{min-height:40px;border:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 22%,transparent);border-radius:999px;padding:8px 16px;color:var(--squisq-flashcards-text);background:color-mix(in srgb,var(--squisq-flashcards-surface) 88%,transparent);font:700 14px/1 var(--squisq-flashcards-body-font);cursor:pointer}.squisq-flashcards__tool:hover,.squisq-flashcards__button:hover:not(:disabled){border-color:var(--squisq-flashcards-primary)}.squisq-flashcards__tool:focus-visible,.squisq-flashcards__button:focus-visible,.squisq-flashcards__choice:focus-visible{outline:3px solid color-mix(in srgb,var(--squisq-flashcards-primary) 45%,transparent);outline-offset:2px}.squisq-flashcards__tool[aria-pressed=true],.squisq-flashcards__button--primary{border-color:var(--squisq-flashcards-primary);color:var(--squisq-flashcards-bg);background:var(--squisq-flashcards-primary)}.squisq-flashcards__button:disabled{opacity:.38;cursor:default}.squisq-flashcards__progress-row{flex:0 0 auto;color:var(--squisq-flashcards-muted);font-size:13px}.squisq-flashcards__progress{flex:0 0 auto;height:5px;margin-top:8px;margin-bottom:18px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--squisq-flashcards-text) 12%,transparent)}.squisq-flashcards__progress>span{display:block;height:100%;border-radius:inherit;background:var(--squisq-flashcards-primary);transition:width .22s ease}.squisq-flashcards__card,.squisq-flashcards__summary,.squisq-flashcards__empty-card{border:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 16%,transparent);border-radius:var(--squisq-flashcards-radius);padding:clamp(24px,5vw,58px);background:color-mix(in srgb,var(--squisq-flashcards-surface) 94%,var(--squisq-flashcards-bg));box-shadow:0 28px 80px color-mix(in srgb,#000 26%,transparent)}.squisq-flashcards__card{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.squisq-flashcards__label{margin-bottom:18px}.squisq-flashcards__content-block+.squisq-flashcards__content-block{margin-top:24px}.squisq-flashcards__content-title{margin:0 0 .45em;color:inherit;font-family:var(--squisq-flashcards-title-font);font-size:clamp(24px,4vw,46px);line-height:1.12}.squisq-flashcards__content-block .squisq-flashcards__content-block .squisq-flashcards__content-title{font-size:clamp(19px,2.7vw,30px)}.squisq-flashcards .squisq-md{font-size:clamp(16px,2vw,21px);line-height:1.55}.squisq-flashcards .squisq-md>:first-child{margin-top:0}.squisq-flashcards .squisq-md>:last-child{margin-bottom:0}.squisq-flashcards .squisq-md img,.squisq-flashcards .squisq-md video{max-width:100%;max-height:42vh;border-radius:calc(var(--squisq-flashcards-radius) * .65);object-fit:contain}.squisq-flashcards__canvas{width:min(720px,100%);aspect-ratio:16 / 9;margin-top:18px;overflow:hidden;border-radius:calc(var(--squisq-flashcards-radius) * .65)}.squisq-flashcards__answer,.squisq-flashcards__explanation,.squisq-flashcards__feedback{margin-top:28px;border-top:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 18%,transparent);padding-top:24px;animation:squisq-flashcard-reveal .18s ease-out both}.squisq-flashcards__answer-label{display:block;margin-bottom:12px}.squisq-flashcards__choices{display:grid;gap:12px;margin-top:28px}.squisq-flashcards__choice{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:14px;width:100%;border:1px solid color-mix(in srgb,var(--squisq-flashcards-text) 18%,transparent);border-radius:calc(var(--squisq-flashcards-radius) * .72);padding:14px 18px;color:var(--squisq-flashcards-text);background:color-mix(in srgb,var(--squisq-flashcards-bg) 32%,transparent);text-align:left;cursor:pointer}.squisq-flashcards__choice:not(:disabled):hover{border-color:var(--squisq-flashcards-primary);transform:translateY(-1px)}.squisq-flashcards__choice[data-choice-status=correct]{border-color:var(--squisq-flashcards-highlight);background:color-mix(in srgb,var(--squisq-flashcards-highlight) 14%,transparent)}.squisq-flashcards__choice[data-choice-status=incorrect]{border-color:var(--squisq-flashcards-warning);background:color-mix(in srgb,var(--squisq-flashcards-warning) 14%,transparent)}.squisq-flashcards__choice-key{display:grid;width:30px;height:30px;place-items:center;border-radius:50%;color:var(--squisq-flashcards-muted);background:color-mix(in srgb,var(--squisq-flashcards-text) 10%,transparent);font-weight:800}.squisq-flashcards__choice .squisq-flashcards__content-title{margin:0;font:700 clamp(16px,2vw,20px) / 1.3 var(--squisq-flashcards-body-font)}.squisq-flashcards__choice .squisq-md{font-size:16px}.squisq-flashcards__feedback>strong{color:var(--squisq-flashcards-warning);font:700 20px/1.2 var(--squisq-flashcards-title-font)}.squisq-flashcards__feedback[data-correct=true]>strong{color:var(--squisq-flashcards-highlight)}.squisq-flashcards__correct-answer>span{display:block;margin:12px 0 8px;color:var(--squisq-flashcards-muted);font-size:13px}.squisq-flashcards__footer{flex:0 0 auto;margin-top:18px}.squisq-flashcards__shortcut-hint{flex:0 0 auto;margin-top:12px;color:var(--squisq-flashcards-muted);font-size:12px;text-align:center}.squisq-flashcards__summary,.squisq-flashcards__empty-card{margin-top:min(12vh,120px);text-align:center}.squisq-flashcards__summary p,.squisq-flashcards__empty-card p,.squisq-flashcards__empty-card ul{color:var(--squisq-flashcards-muted)}.squisq-flashcards__summary-actions{justify-content:center;flex-wrap:wrap;margin-top:24px}@keyframes squisq-flashcard-reveal{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:640px){.squisq-flashcards__header,.squisq-flashcards__footer{align-items:stretch;flex-direction:column}.squisq-flashcards__tools,.squisq-flashcards__primary-actions,.squisq-flashcards__footer>.squisq-flashcards__button{width:100%}.squisq-flashcards__tools>*,.squisq-flashcards__primary-actions>*{flex:1}}@media(prefers-reduced-motion:reduce){.squisq-flashcards__progress>span,.squisq-flashcards__answer,.squisq-flashcards__explanation,.squisq-flashcards__feedback{animation:none;transition:none}}@keyframes slowZoomOut{0%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes slowZoomPanLeft{0%{transform:translate(0) scale(1.1)}to{transform:translate(-8%) scale(1.1)}}@keyframes slowZoomPanRight{0%{transform:translate(-8%) scale(1.1)}to{transform:translate(0) scale(1.1)}}@keyframes slowZoomPanUp{0%{transform:translateY(0) scale(1.1)}to{transform:translateY(-8%) scale(1.1)}}@keyframes slowZoomPanDown{0%{transform:translateY(-8%) scale(1.1)}to{transform:translateY(0) scale(1.1)}}@keyframes slowZoomCombinedPanLeft{0%{transform:translate(0) scale(1)}to{transform:translate(-5%) scale(1.12)}}@keyframes slowZoomCombinedPanRight{0%{transform:translate(-5%) scale(1.12)}to{transform:translate(0) scale(1)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes layerSlideInLeft{0%{opacity:0;transform:translate(-40px)}to{opacity:1;transform:translate(0)}}@keyframes layerSlideInRight{0%{opacity:0;transform:translate(40px)}to{opacity:1;transform:translate(0)}}@keyframes layerSlideInTop{0%{opacity:0;transform:translateY(-40px)}to{opacity:1;transform:translateY(0)}}@keyframes layerSlideInBottom{0%{opacity:0;transform:translateY(40px)}to{opacity:1;transform:translateY(0)}}@keyframes growIn{0%{opacity:0;transform:scale(.6)}to{opacity:1;transform:scale(1)}}@keyframes growX{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes growY{0%{transform:scaleY(0)}to{transform:scaleY(1)}}@keyframes drawOn{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes drawOnMarkers{0%,82%{opacity:0}to{opacity:1}}@keyframes revealFromLeft{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}@keyframes revealFromRight{0%{clip-path:inset(0 0 0 100%)}to{clip-path:inset(0 0 0 0)}}@keyframes revealFromTop{0%{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0 0 0 0)}}@keyframes revealFromBottom{0%{clip-path:inset(100% 0 0 0)}to{clip-path:inset(0 0 0 0)}}@keyframes revealIris{0%{clip-path:circle(0% at 50% 50%)}to{clip-path:circle(75% at 50% 50%)}}@keyframes wordIn{0%{opacity:0}to{opacity:1}}@keyframes drift{0%{transform:translate(0)}50%{transform:translate(var(--drift-x, 12px),var(--drift-y, -10px))}to{transform:translate(0)}}@keyframes tween{0%{opacity:var(--tween-from-opacity, 1);transform:var(--tween-from-transform, none)}to{opacity:var(--tween-to-opacity, 1);transform:var(--tween-to-transform, none)}}@keyframes zoomIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes zoomOut{0%{transform:scale(1);opacity:1}to{transform:scale(.9);opacity:0}}@keyframes panLeft{0%{transform:translate(0)}to{transform:translate(-10%)}}@keyframes panRight{0%{transform:translate(-10%)}to{transform:translate(0)}}@keyframes portraitCoverPanRight{0%{object-position:left center}to{object-position:right center}}@keyframes portraitCoverPanLeft{0%{object-position:right center}to{object-position:left center}}@keyframes slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideOutLeft{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes slideOutRight{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes slideInTop{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slideInBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutTop{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes slideOutBottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes transitionZoomIn{0%{opacity:0;transform:scale(.82)}to{opacity:1;transform:scale(1)}}@keyframes transitionZoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.08)}}@keyframes transitionFlipIn{0%{opacity:0;transform:perspective(1400px) rotateY(-72deg) scale(.96)}to{opacity:1;transform:perspective(1400px) rotateY(0) scale(1)}}@keyframes transitionFlipOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) scale(1)}to{opacity:0;transform:perspective(1400px) rotateY(56deg) scale(.96)}}@keyframes transitionRotateIn{0%{opacity:0;transform:rotate(-8deg) scale(.88)}to{opacity:1;transform:rotate(0) scale(1)}}@keyframes transitionRotateOut{0%{opacity:1;transform:rotate(0) scale(1)}to{opacity:0;transform:rotate(8deg) scale(1.04)}}@keyframes transitionDissolveIn{0%{opacity:0;filter:blur(10px)}60%{opacity:.72}to{opacity:1;filter:blur(0)}}@keyframes transitionDissolveOut{0%{opacity:1;filter:blur(0)}to{opacity:0;filter:blur(12px)}}@keyframes transitionMorphIn{0%{opacity:0;filter:blur(16px) saturate(.8);transform:scale(1.025)}to{opacity:1;filter:blur(0) saturate(1);transform:scale(1)}}@keyframes transitionMorphOut{0%{opacity:1;filter:blur(0) saturate(1);transform:scale(1)}to{opacity:0;filter:blur(16px) saturate(.85);transform:scale(.985)}}@keyframes transitionHold{0%,to{opacity:1;transform:none}}@keyframes transitionWipeLeftIn{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}@keyframes transitionWipeLeftOut{0%{clip-path:inset(0)}to{clip-path:inset(0 0 0 100%)}}@keyframes transitionWipeRightIn{0%{clip-path:inset(0 0 0 100%)}to{clip-path:inset(0)}}@keyframes transitionWipeRightOut{0%{clip-path:inset(0)}to{clip-path:inset(0 100% 0 0)}}@keyframes transitionWipeUpIn{0%{clip-path:inset(100% 0 0 0)}to{clip-path:inset(0)}}@keyframes transitionWipeUpOut{0%{clip-path:inset(0)}to{clip-path:inset(0 0 100% 0)}}@keyframes transitionWipeDownIn{0%{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0)}}@keyframes transitionWipeDownOut{0%{clip-path:inset(0)}to{clip-path:inset(100% 0 0 0)}}@keyframes transitionSplitHorizontalIn{0%{clip-path:inset(0 50% 0 50%)}to{clip-path:inset(0)}}@keyframes transitionSplitHorizontalOut{0%{clip-path:inset(0)}to{clip-path:inset(0 50% 0 50%)}}@keyframes transitionSplitVerticalIn{0%{clip-path:inset(50% 0 50% 0)}to{clip-path:inset(0)}}@keyframes transitionSplitVerticalOut{0%{clip-path:inset(0)}to{clip-path:inset(50% 0 50% 0)}}@keyframes transitionCircleIn{0%{clip-path:circle(0% at 50% 50%);opacity:.4}to{clip-path:circle(75% at 50% 50%);opacity:1}}@keyframes transitionCircleOut{0%{clip-path:circle(75% at 50% 50%);opacity:1}to{clip-path:circle(0% at 50% 50%);opacity:0}}@keyframes transitionDiamondIn{0%{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%);opacity:.35}to{clip-path:polygon(50% -30%,130% 50%,50% 130%,-30% 50%);opacity:1}}@keyframes transitionDiamondOut{0%{clip-path:polygon(50% -30%,130% 50%,50% 130%,-30% 50%);opacity:1}to{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%);opacity:0}}@keyframes transitionPlusIn{0%{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%);opacity:.45}70%{clip-path:polygon(43% 0,57% 0,57% 43%,100% 43%,100% 57%,57% 57%,57% 100%,43% 100%,43% 57%,0 57%,0 43%,43% 43%);opacity:1}to{clip-path:inset(0);opacity:1}}@keyframes transitionPlusOut{0%{clip-path:inset(0);opacity:1}to{clip-path:polygon(50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%,50% 50%);opacity:0}}@keyframes transitionFlashIn{0%{opacity:0;filter:brightness(2.8) contrast(1.5);transform:scale(1.04)}42%{opacity:1;filter:brightness(3.5) contrast(1.8)}to{opacity:1;filter:brightness(1) contrast(1);transform:scale(1)}}@keyframes transitionFlashOut{0%{opacity:1;filter:brightness(1) contrast(1)}55%{opacity:.9;filter:brightness(3) contrast(1.6)}to{opacity:0;filter:brightness(.4) contrast(1)}}@keyframes transitionNewsflashIn{0%{opacity:0;filter:brightness(3) contrast(1.8);transform:scale(.72) rotate(-2deg)}45%{opacity:1;filter:brightness(2.8) contrast(1.6);transform:scale(1.08) rotate(1deg)}to{opacity:1;filter:brightness(1) contrast(1);transform:scale(1) rotate(0)}}@keyframes transitionNewsflashOut{0%{opacity:1;filter:brightness(1) contrast(1);transform:scale(1)}to{opacity:0;filter:brightness(2.4) contrast(1.6);transform:scale(1.18) rotate(2deg)}}@keyframes transitionFallOverIn{0%{opacity:0;transform:perspective(1200px) rotateX(-72deg) translateY(-8%);transform-origin:50% 100%}to{opacity:1;transform:perspective(1200px) rotateX(0) translateY(0);transform-origin:50% 100%}}@keyframes transitionFallOverOut{0%{opacity:1;transform:perspective(1200px) rotateX(0) translateY(0);transform-origin:50% 100%}to{opacity:0;transform:perspective(1200px) rotateX(76deg) translateY(8%);transform-origin:50% 100%}}@keyframes transitionDrapeIn{0%{opacity:0;transform:perspective(1200px) rotateX(-42deg) skew(-8deg) scaleY(.82);transform-origin:50% 0}to{opacity:1;transform:perspective(1200px) rotateX(0) skew(0) scaleY(1);transform-origin:50% 0}}@keyframes transitionDrapeOut{0%{opacity:1;transform:perspective(1200px) rotateX(0) skew(0) scaleY(1);transform-origin:50% 0}to{opacity:0;transform:perspective(1200px) rotateX(48deg) skew(7deg) scaleY(.74);transform-origin:50% 0}}@keyframes transitionCurtainsIn{0%{opacity:.4;transform:scaleX(.04);filter:brightness(.75)}to{opacity:1;transform:scaleX(1);filter:brightness(1)}}@keyframes transitionCurtainsOut{0%{opacity:1;transform:scaleX(1);filter:brightness(1)}to{opacity:.35;transform:scaleX(.04);filter:brightness(.55)}}@keyframes transitionWindIn{0%{opacity:0;filter:blur(14px);transform:translate(24%) skew(-14deg)}to{opacity:1;filter:blur(0);transform:translate(0) skew(0)}}@keyframes transitionWindOut{0%{opacity:1;filter:blur(0);transform:translate(0) skew(0)}to{opacity:0;filter:blur(14px);transform:translate(-24%) skew(14deg)}}@keyframes transitionPrestigeIn{0%{opacity:0;filter:brightness(1.8) saturate(.7);transform:perspective(1200px) translateZ(-180px) scale(.82)}to{opacity:1;filter:brightness(1) saturate(1);transform:perspective(1200px) translateZ(0) scale(1)}}@keyframes transitionPrestigeOut{0%{opacity:1;filter:brightness(1) saturate(1);transform:perspective(1200px) translateZ(0) scale(1)}to{opacity:0;filter:brightness(1.6) saturate(.75);transform:perspective(1200px) translateZ(140px) scale(1.06)}}@keyframes transitionFractureIn{0%{opacity:0;filter:contrast(1.8) brightness(1.4);clip-path:polygon(0 0,48% 0,52% 24%,100% 0,100% 100%,55% 78%,45% 100%,0 100%);transform:skew(-6deg) scale(1.03)}to{opacity:1;filter:contrast(1) brightness(1);clip-path:inset(0);transform:skew(0) scale(1)}}@keyframes transitionFractureOut{0%{opacity:1;filter:contrast(1) brightness(1);clip-path:inset(0);transform:skew(0) scale(1)}to{opacity:0;filter:contrast(1.8) brightness(1.2);clip-path:polygon(0 0,42% 8%,56% 28%,100% 0,100% 100%,58% 72%,40% 94%,0 100%);transform:skew(8deg) scale(1.05)}}@keyframes transitionCrushIn{0%{opacity:0;transform:scaleX(1.22) scaleY(.08);filter:contrast(1.4)}to{opacity:1;transform:scaleX(1) scaleY(1);filter:contrast(1)}}@keyframes transitionCrushOut{0%{opacity:1;transform:scaleX(1) scaleY(1);filter:contrast(1)}to{opacity:0;transform:scaleX(1.28) scaleY(.04);filter:contrast(1.5)}}@keyframes transitionPeelIn{0%{opacity:0;transform:perspective(1400px) rotateY(-78deg) skewY(8deg);transform-origin:0 50%}to{opacity:1;transform:perspective(1400px) rotateY(0) skewY(0);transform-origin:0 50%}}@keyframes transitionPeelOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) skewY(0);transform-origin:100% 50%}to{opacity:0;transform:perspective(1400px) rotateY(82deg) skewY(-8deg);transform-origin:100% 50%}}@keyframes transitionPageCurlIn{0%{opacity:0;transform:perspective(1400px) rotateY(-64deg) rotate(-2deg);transform-origin:0 50%;filter:brightness(.85)}to{opacity:1;transform:perspective(1400px) rotateY(0) rotate(0);transform-origin:0 50%;filter:brightness(1)}}@keyframes transitionPageCurlOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) rotate(0);transform-origin:100% 50%;filter:brightness(1)}to{opacity:0;transform:perspective(1400px) rotateY(68deg) rotate(2deg);transform-origin:100% 50%;filter:brightness(.8)}}@keyframes transitionAirplaneIn{0%{opacity:0;transform:translate(-40%,30%) rotate(-18deg) scale(.72);filter:blur(2px)}to{opacity:1;transform:translate(0) rotate(0) scale(1);filter:blur(0)}}@keyframes transitionAirplaneOut{0%{opacity:1;transform:translate(0) rotate(0) scale(1);filter:blur(0)}to{opacity:0;transform:translate(42%,-28%) rotate(18deg) scale(.72);filter:blur(2px)}}@keyframes transitionOrigamiIn{0%{opacity:0;transform:perspective(1400px) rotateX(58deg) rotateY(-42deg) scale(.86);filter:brightness(.85)}to{opacity:1;transform:perspective(1400px) rotateX(0) rotateY(0) scale(1);filter:brightness(1)}}@keyframes transitionOrigamiOut{0%{opacity:1;transform:perspective(1400px) rotateX(0) rotateY(0) scale(1);filter:brightness(1)}to{opacity:0;transform:perspective(1400px) rotateX(-58deg) rotateY(42deg) scale(.82);filter:brightness(.82)}}@keyframes transitionRippleIn{0%{opacity:0;filter:blur(10px);transform:scale(.86);clip-path:circle(0% at 50% 50%)}60%{opacity:.88;filter:blur(3px);transform:scale(1.035);clip-path:circle(65% at 50% 50%)}to{opacity:1;filter:blur(0);transform:scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionRippleOut{0%{opacity:1;filter:blur(0);transform:scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;filter:blur(10px);transform:scale(1.08);clip-path:circle(0% at 50% 50%)}}@keyframes transitionTexturedIn{0%{opacity:.12;filter:contrast(1.6)}88%{opacity:1;filter:contrast(1.05)}to{opacity:1;filter:contrast(1);-webkit-mask-image:none;mask-image:none}}@keyframes transitionTexturedOut{0%{opacity:1;filter:contrast(1)}to{opacity:0;filter:contrast(1.7)}}@keyframes transitionVortexIn{0%{opacity:0;transform:rotate(-110deg) scale(.28);filter:blur(8px)}to{opacity:1;transform:rotate(0) scale(1);filter:blur(0)}}@keyframes transitionVortexOut{0%{opacity:1;transform:rotate(0) scale(1);filter:blur(0)}to{opacity:0;transform:rotate(120deg) scale(.2);filter:blur(10px)}}@keyframes transitionShredIn{0%{opacity:0;clip-path:inset(0 42% 0 42%);transform:translateY(-9%) skew(-8deg);filter:contrast(1.7)}to{opacity:1;clip-path:inset(0);transform:translateY(0) skew(0);filter:contrast(1)}}@keyframes transitionShredOut{0%{opacity:1;clip-path:inset(0);transform:translateY(0) skew(0);filter:contrast(1)}to{opacity:0;clip-path:inset(0 44% 0 44%);transform:translateY(11%) skew(8deg);filter:contrast(1.8)}}@keyframes transitionSwitchIn{0%{opacity:0;transform:perspective(1400px) rotateY(-48deg) translate(18%)}to{opacity:1;transform:perspective(1400px) rotateY(0) translate(0)}}@keyframes transitionSwitchOut{0%{opacity:1;transform:perspective(1400px) rotateY(0) translate(0)}to{opacity:0;transform:perspective(1400px) rotateY(48deg) translate(-18%)}}@keyframes transitionCubeIn{0%{opacity:0;transform:perspective(1200px) rotateY(-86deg) translate(44%);transform-origin:0 50%}to{opacity:1;transform:perspective(1200px) rotateY(0) translate(0);transform-origin:0 50%}}@keyframes transitionCubeOut{0%{opacity:1;transform:perspective(1200px) rotateY(0) translate(0);transform-origin:100% 50%}to{opacity:0;transform:perspective(1200px) rotateY(86deg) translate(-44%);transform-origin:100% 50%}}@keyframes transitionDoorsIn{0%{opacity:.2;transform:perspective(1200px) scaleX(.04);filter:brightness(.7)}to{opacity:1;transform:perspective(1200px) scaleX(1);filter:brightness(1)}}@keyframes transitionDoorsOut{0%{opacity:1;transform:perspective(1200px) scaleX(1);filter:brightness(1)}to{opacity:.2;transform:perspective(1200px) scaleX(.04);filter:brightness(.65)}}@keyframes transitionBoxIn{0%{opacity:.2;transform:scale(.18);clip-path:inset(38%)}to{opacity:1;transform:scale(1);clip-path:inset(0)}}@keyframes transitionBoxOut{0%{opacity:1;transform:scale(1);clip-path:inset(0)}to{opacity:0;transform:scale(.18);clip-path:inset(38%)}}@keyframes transitionGalleryIn{0%{opacity:0;transform:translate(28%) scale(.84);filter:brightness(.82)}to{opacity:1;transform:translate(0) scale(1);filter:brightness(1)}}@keyframes transitionGalleryOut{0%{opacity:1;transform:translate(0) scale(1);filter:brightness(1)}to{opacity:0;transform:translate(-28%) scale(.84);filter:brightness(.82)}}@keyframes transitionFerrisIn{0%{opacity:0;transform:translateY(42%) rotate(-34deg) scale(.78);transform-origin:50% 140%}to{opacity:1;transform:translateY(0) rotate(0) scale(1);transform-origin:50% 140%}}@keyframes transitionFerrisOut{0%{opacity:1;transform:translateY(0) rotate(0) scale(1);transform-origin:50% 140%}to{opacity:0;transform:translateY(-42%) rotate(34deg) scale(.78);transform-origin:50% 140%}}@keyframes transitionWindowIn{0%{opacity:.35;clip-path:inset(50% 50% 50% 50%);transform:scale(1.08)}to{opacity:1;clip-path:inset(0);transform:scale(1)}}@keyframes transitionWindowOut{0%{opacity:1;clip-path:inset(0);transform:scale(1)}to{opacity:0;clip-path:inset(50% 50% 50% 50%);transform:scale(1.08)}}@keyframes transitionOrbitIn{0%{opacity:0;transform:rotate(-42deg) translate(18%) scale(.76);transform-origin:50% 50%}to{opacity:1;transform:rotate(0) translate(0) scale(1);transform-origin:50% 50%}}@keyframes transitionOrbitOut{0%{opacity:1;transform:rotate(0) translate(0) scale(1);transform-origin:50% 50%}to{opacity:0;transform:rotate(42deg) translate(-18%) scale(.76);transform-origin:50% 50%}}@keyframes transitionFlyThroughIn{0%{opacity:0;transform:perspective(1200px) translateZ(-520px) scale(.56);filter:blur(4px)}to{opacity:1;transform:perspective(1200px) translateZ(0) scale(1);filter:blur(0)}}@keyframes transitionFlyThroughOut{0%{opacity:1;transform:perspective(1200px) translateZ(0) scale(1);filter:blur(0)}to{opacity:0;transform:perspective(1200px) translateZ(420px) scale(1.28);filter:blur(5px)}}@keyframes transitionWheelIn{0%{opacity:0;transform:rotate(-58deg) scale(.7);clip-path:circle(0% at 50% 50%)}to{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionWheelOut{0%{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;transform:rotate(58deg) scale(.7);clip-path:circle(0% at 50% 50%)}}@keyframes transitionWheelReverseIn{0%{opacity:0;transform:rotate(58deg) scale(.7);clip-path:circle(0% at 50% 50%)}to{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionWheelReverseOut{0%{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;transform:rotate(-58deg) scale(.7);clip-path:circle(0% at 50% 50%)}}@keyframes transitionWedgeIn{0%{opacity:.4;clip-path:polygon(50% 50%,50% 0,50% 0)}to{opacity:1;clip-path:polygon(50% 50%,-30% -30%,130% -30%,130% 130%,-30% 130%)}}@keyframes transitionWedgeOut{0%{opacity:1;clip-path:polygon(50% 50%,-30% -30%,130% -30%,130% 130%,-30% 130%)}to{opacity:0;clip-path:polygon(50% 50%,50% 0,50% 0)}}@keyframes transitionPrismIn{0%{opacity:0;transform:perspective(1200px) rotateY(-28deg) skew(-12deg) scale(.9);filter:hue-rotate(24deg) saturate(1.6)}to{opacity:1;transform:perspective(1200px) rotateY(0) skew(0) scale(1);filter:hue-rotate(0deg) saturate(1)}}@keyframes transitionPrismOut{0%{opacity:1;transform:perspective(1200px) rotateY(0) skew(0) scale(1);filter:hue-rotate(0deg) saturate(1)}to{opacity:0;transform:perspective(1200px) rotateY(28deg) skew(12deg) scale(.9);filter:hue-rotate(-24deg) saturate(1.6)}}@keyframes transitionWarpIn{0%{opacity:0;transform:scaleX(.72) scaleY(1.18) skew(-14deg);filter:blur(8px)}to{opacity:1;transform:scaleX(1) scaleY(1) skew(0);filter:blur(0)}}@keyframes transitionWarpOut{0%{opacity:1;transform:scaleX(1) scaleY(1) skew(0);filter:blur(0)}to{opacity:0;transform:scaleX(1.2) scaleY(.72) skew(14deg);filter:blur(8px)}}@keyframes transitionClockIn{0%{opacity:.35;transform:rotate(-90deg) scale(.84);clip-path:circle(0% at 50% 50%)}to{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}}@keyframes transitionClockOut{0%{opacity:1;transform:rotate(0) scale(1);clip-path:circle(75% at 50% 50%)}to{opacity:0;transform:rotate(90deg) scale(.84);clip-path:circle(0% at 50% 50%)}}@keyframes typewriter{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}@keyframes typewriterFallback{0%{width:0;overflow:hidden}to{width:100%;overflow:hidden}}.transition-fade-enter{animation:fadeIn var(--transition-duration, 1.5s) ease-out forwards}.transition-fade-exit{animation:fadeOut var(--transition-duration, 1.5s) ease-out forwards}.transition-dissolve-enter{animation:transitionDissolveIn var(--transition-duration, .8s) ease-in-out forwards}.transition-dissolve-exit{animation:transitionDissolveOut var(--transition-duration, .8s) ease-in-out forwards}.transition-morph-enter{animation:transitionMorphIn var(--transition-duration, .9s) ease-in-out forwards}.transition-morph-exit{animation:transitionMorphOut var(--transition-duration, .9s) ease-in-out forwards}.transition-pushLeft-enter,.transition-slideLeft-enter{animation:slideInRight var(--transition-duration, .8s) ease-out forwards}.transition-pushLeft-exit,.transition-slideLeft-exit{animation:slideOutLeft var(--transition-duration, .8s) ease-out forwards}.transition-pushRight-enter,.transition-slideRight-enter{animation:slideInLeft var(--transition-duration, .8s) ease-out forwards}.transition-pushRight-exit,.transition-slideRight-exit{animation:slideOutRight var(--transition-duration, .8s) ease-out forwards}.transition-pushUp-enter,.transition-slideUp-enter{animation:slideInBottom var(--transition-duration, .8s) ease-out forwards}.transition-pushUp-exit,.transition-slideUp-exit{animation:slideOutTop var(--transition-duration, .8s) ease-out forwards}.transition-pushDown-enter,.transition-slideDown-enter{animation:slideInTop var(--transition-duration, .8s) ease-out forwards}.transition-pushDown-exit,.transition-slideDown-exit{animation:slideOutBottom var(--transition-duration, .8s) ease-out forwards}.transition-zoom-enter{animation:transitionZoomIn var(--transition-duration, .7s) ease-out forwards}.transition-zoom-exit{animation:transitionZoomOut var(--transition-duration, .7s) ease-in forwards}.transition-flip-enter{animation:transitionFlipIn var(--transition-duration, .8s) ease-out forwards}.transition-flip-exit{animation:transitionFlipOut var(--transition-duration, .8s) ease-in forwards}.transition-rotate-enter{animation:transitionRotateIn var(--transition-duration, .8s) ease-out forwards}.transition-rotate-exit{animation:transitionRotateOut var(--transition-duration, .8s) ease-in forwards}.transition-wipeLeft-enter,.transition-revealLeft-enter{animation:transitionWipeLeftIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeLeft-exit{animation:transitionWipeLeftOut var(--transition-duration, .75s) ease-in forwards}.transition-wipeRight-enter,.transition-revealRight-enter{animation:transitionWipeRightIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeRight-exit{animation:transitionWipeRightOut var(--transition-duration, .75s) ease-in forwards}.transition-wipeUp-enter,.transition-revealUp-enter{animation:transitionWipeUpIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeUp-exit{animation:transitionWipeUpOut var(--transition-duration, .75s) ease-in forwards}.transition-wipeDown-enter,.transition-revealDown-enter{animation:transitionWipeDownIn var(--transition-duration, .75s) ease-out forwards}.transition-wipeDown-exit{animation:transitionWipeDownOut var(--transition-duration, .75s) ease-in forwards}.transition-revealLeft-exit,.transition-revealRight-exit,.transition-revealUp-exit,.transition-revealDown-exit{animation:fadeOut var(--transition-duration, .75s) ease-in forwards}.transition-splitHorizontal-enter{animation:transitionSplitHorizontalIn var(--transition-duration, .8s) ease-out forwards}.transition-splitHorizontal-exit{animation:transitionSplitHorizontalOut var(--transition-duration, .8s) ease-in forwards}.transition-splitVertical-enter{animation:transitionSplitVerticalIn var(--transition-duration, .8s) ease-out forwards}.transition-splitVertical-exit{animation:transitionSplitVerticalOut var(--transition-duration, .8s) ease-in forwards}.transition-coverLeft-enter,.transition-pullLeft-enter{animation:slideInRight var(--transition-duration, .75s) ease-out forwards}.transition-coverRight-enter,.transition-pullRight-enter{animation:slideInLeft var(--transition-duration, .75s) ease-out forwards}.transition-coverUp-enter,.transition-pullUp-enter{animation:slideInBottom var(--transition-duration, .75s) ease-out forwards}.transition-coverDown-enter,.transition-pullDown-enter{animation:slideInTop var(--transition-duration, .75s) ease-out forwards}.transition-coverLeft-exit,.transition-coverRight-exit,.transition-coverUp-exit,.transition-coverDown-exit,.transition-pullLeft-exit,.transition-pullRight-exit,.transition-pullUp-exit,.transition-pullDown-exit{animation:transitionHold var(--transition-duration, .75s) linear forwards}.transition-uncoverLeft-enter,.transition-uncoverRight-enter,.transition-uncoverUp-enter,.transition-uncoverDown-enter{animation:fadeIn var(--transition-duration, .75s) ease-out forwards}.transition-uncoverLeft-exit{animation:slideOutLeft var(--transition-duration, .75s) ease-in forwards}.transition-uncoverRight-exit{animation:slideOutRight var(--transition-duration, .75s) ease-in forwards}.transition-uncoverUp-exit{animation:slideOutTop var(--transition-duration, .75s) ease-in forwards}.transition-uncoverDown-exit{animation:slideOutBottom var(--transition-duration, .75s) ease-in forwards}.transition-shapeCircle-enter{animation:transitionCircleIn var(--transition-duration, .75s) ease-out forwards}.transition-shapeCircle-exit{animation:transitionCircleOut var(--transition-duration, .75s) ease-in forwards}.transition-shapeDiamond-enter{animation:transitionDiamondIn var(--transition-duration, .75s) ease-out forwards}.transition-shapeDiamond-exit{animation:transitionDiamondOut var(--transition-duration, .75s) ease-in forwards}.transition-shapePlus-enter{animation:transitionPlusIn var(--transition-duration, .8s) ease-out forwards}.transition-shapePlus-exit{animation:transitionPlusOut var(--transition-duration, .8s) ease-in forwards}.transition-flash-enter{animation:transitionFlashIn var(--transition-duration, .7s) ease-out forwards}.transition-flash-exit{animation:transitionFlashOut var(--transition-duration, .7s) ease-in forwards}.transition-newsflash-enter{animation:transitionNewsflashIn var(--transition-duration, .75s) ease-out forwards}.transition-newsflash-exit{animation:transitionNewsflashOut var(--transition-duration, .75s) ease-in forwards}.transition-fallOver-enter{animation:transitionFallOverIn var(--transition-duration, .85s) ease-out forwards}.transition-fallOver-exit{animation:transitionFallOverOut var(--transition-duration, .85s) ease-in forwards}.transition-drape-enter{animation:transitionDrapeIn var(--transition-duration, .85s) ease-out forwards}.transition-drape-exit{animation:transitionDrapeOut var(--transition-duration, .85s) ease-in forwards}.transition-curtains-enter{animation:transitionCurtainsIn var(--transition-duration, .85s) ease-out forwards}.transition-curtains-exit{animation:transitionCurtainsOut var(--transition-duration, .85s) ease-in forwards}.transition-wind-enter{animation:transitionWindIn var(--transition-duration, .8s) ease-out forwards}.transition-wind-exit{animation:transitionWindOut var(--transition-duration, .8s) ease-in forwards}.transition-prestige-enter{animation:transitionPrestigeIn var(--transition-duration, .85s) ease-out forwards}.transition-prestige-exit{animation:transitionPrestigeOut var(--transition-duration, .85s) ease-in forwards}.transition-fracture-enter{animation:transitionFractureIn var(--transition-duration, .8s) ease-out forwards}.transition-fracture-exit{animation:transitionFractureOut var(--transition-duration, .8s) ease-in forwards}.transition-crush-enter{animation:transitionCrushIn var(--transition-duration, .75s) ease-out forwards}.transition-crush-exit{animation:transitionCrushOut var(--transition-duration, .75s) ease-in forwards}.transition-peelOff-enter{animation:transitionPeelIn var(--transition-duration, .85s) ease-out forwards}.transition-peelOff-exit{animation:transitionPeelOut var(--transition-duration, .85s) ease-in forwards}.transition-pageCurl-enter,.transition-pageCurlDouble-enter,.transition-pageCurlSingle-enter{animation:transitionPageCurlIn var(--transition-duration, .9s) ease-out forwards}.transition-pageCurl-exit,.transition-pageCurlDouble-exit,.transition-pageCurlSingle-exit{animation:transitionPageCurlOut var(--transition-duration, .9s) ease-in forwards}.transition-airplane-enter{animation:transitionAirplaneIn var(--transition-duration, .85s) ease-out forwards}.transition-airplane-exit{animation:transitionAirplaneOut var(--transition-duration, .85s) ease-in forwards}.transition-origami-enter{animation:transitionOrigamiIn var(--transition-duration, .85s) ease-out forwards}.transition-origami-exit{animation:transitionOrigamiOut var(--transition-duration, .85s) ease-in forwards}.transition-ripple-enter{animation:transitionRippleIn var(--transition-duration, .85s) ease-out forwards}.transition-ripple-exit{animation:transitionRippleOut var(--transition-duration, .85s) ease-in forwards}.transition-checkerboard-enter,.transition-random-enter{-webkit-mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);-webkit-mask-size:12% 12%;-webkit-mask-position:0 0,6% 6%;mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);mask-size:12% 12%;mask-position:0 0,6% 6%;animation:transitionTexturedIn var(--transition-duration, .85s) steps(8,end) forwards}.transition-checkerboard-exit,.transition-random-exit{-webkit-mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);-webkit-mask-size:12% 12%;-webkit-mask-position:0 0,6% 6%;mask-image:linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%),linear-gradient(45deg,#000 25%,transparent 25%,transparent 75%,#000 75%);mask-size:12% 12%;mask-position:0 0,6% 6%;animation:transitionTexturedOut var(--transition-duration, .85s) steps(8,end) forwards}.transition-randomBarsHorizontal-enter,.transition-blindsHorizontal-enter,.transition-combHorizontal-enter,.transition-stripsLeft-enter,.transition-stripsRight-enter{-webkit-mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedIn var(--transition-duration, .8s) steps(9,end) forwards}.transition-randomBarsHorizontal-exit,.transition-blindsHorizontal-exit,.transition-combHorizontal-exit,.transition-stripsLeft-exit,.transition-stripsRight-exit{-webkit-mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(0deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedOut var(--transition-duration, .8s) steps(9,end) forwards}.transition-randomBarsVertical-enter,.transition-blindsVertical-enter,.transition-combVertical-enter,.transition-stripsUp-enter,.transition-stripsDown-enter{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedIn var(--transition-duration, .8s) steps(9,end) forwards}.transition-randomBarsVertical-exit,.transition-blindsVertical-exit,.transition-combVertical-exit,.transition-stripsUp-exit,.transition-stripsDown-exit{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);mask-image:repeating-linear-gradient(90deg,#000 0 6%,transparent 6% 12%);animation:transitionTexturedOut var(--transition-duration, .8s) steps(9,end) forwards}.transition-honeycomb-enter{-webkit-mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);-webkit-mask-size:10% 17%;mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);mask-size:10% 17%;animation:transitionTexturedIn var(--transition-duration, .85s) steps(8,end) forwards}.transition-honeycomb-exit{-webkit-mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);-webkit-mask-size:10% 17%;mask-image:radial-gradient(circle,#000 0 34%,transparent 35% 48%,#000 49%);mask-size:10% 17%;animation:transitionTexturedOut var(--transition-duration, .85s) steps(8,end) forwards}.transition-glitter-enter{-webkit-mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);-webkit-mask-size:7% 7%;mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);mask-size:7% 7%;animation:transitionFlashIn var(--transition-duration, .85s) steps(10,end) forwards}.transition-glitter-exit{-webkit-mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);-webkit-mask-size:7% 7%;mask-image:radial-gradient(circle,#000 0 18%,transparent 20% 36%,#000 38%);mask-size:7% 7%;animation:transitionFlashOut var(--transition-duration, .85s) steps(10,end) forwards}.transition-vortex-enter{animation:transitionVortexIn var(--transition-duration, .85s) ease-out forwards}.transition-vortex-exit{animation:transitionVortexOut var(--transition-duration, .85s) ease-in forwards}.transition-shred-enter{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);animation:transitionShredIn var(--transition-duration, .85s) ease-out forwards}.transition-shred-exit{-webkit-mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);mask-image:repeating-linear-gradient(90deg,#000 0 5%,transparent 5% 8%);animation:transitionShredOut var(--transition-duration, .85s) ease-in forwards}.transition-switch-enter{animation:transitionSwitchIn var(--transition-duration, .8s) ease-out forwards}.transition-switch-exit{animation:transitionSwitchOut var(--transition-duration, .8s) ease-in forwards}.transition-cube-enter{animation:transitionCubeIn var(--transition-duration, .85s) ease-out forwards}.transition-cube-exit{animation:transitionCubeOut var(--transition-duration, .85s) ease-in forwards}.transition-doors-enter{animation:transitionDoorsIn var(--transition-duration, .85s) ease-out forwards}.transition-doors-exit{animation:transitionDoorsOut var(--transition-duration, .85s) ease-in forwards}.transition-box-enter{animation:transitionBoxIn var(--transition-duration, .75s) ease-out forwards}.transition-box-exit{animation:transitionBoxOut var(--transition-duration, .75s) ease-in forwards}.transition-gallery-enter{animation:transitionGalleryIn var(--transition-duration, .8s) ease-out forwards}.transition-gallery-exit{animation:transitionGalleryOut var(--transition-duration, .8s) ease-in forwards}.transition-conveyor-enter,.transition-panLeft-enter{animation:slideInRight var(--transition-duration, .8s) ease-out forwards}.transition-conveyor-exit,.transition-panLeft-exit{animation:slideOutLeft var(--transition-duration, .8s) ease-in forwards}.transition-panRight-enter{animation:slideInLeft var(--transition-duration, .8s) ease-out forwards}.transition-panRight-exit{animation:slideOutRight var(--transition-duration, .8s) ease-in forwards}.transition-panUp-enter{animation:slideInBottom var(--transition-duration, .8s) ease-out forwards}.transition-panUp-exit{animation:slideOutTop var(--transition-duration, .8s) ease-in forwards}.transition-panDown-enter{animation:slideInTop var(--transition-duration, .8s) ease-out forwards}.transition-panDown-exit{animation:slideOutBottom var(--transition-duration, .8s) ease-in forwards}.transition-ferrisWheel-enter{animation:transitionFerrisIn var(--transition-duration, .85s) ease-out forwards}.transition-ferrisWheel-exit{animation:transitionFerrisOut var(--transition-duration, .85s) ease-in forwards}.transition-window-enter{animation:transitionWindowIn var(--transition-duration, .8s) ease-out forwards}.transition-window-exit{animation:transitionWindowOut var(--transition-duration, .8s) ease-in forwards}.transition-orbit-enter{animation:transitionOrbitIn var(--transition-duration, .85s) ease-out forwards}.transition-orbit-exit{animation:transitionOrbitOut var(--transition-duration, .85s) ease-in forwards}.transition-flyThrough-enter{animation:transitionFlyThroughIn var(--transition-duration, .85s) ease-out forwards}.transition-flyThrough-exit{animation:transitionFlyThroughOut var(--transition-duration, .85s) ease-in forwards}.transition-wheel-enter{animation:transitionWheelIn var(--transition-duration, .85s) ease-out forwards}.transition-wheel-exit{animation:transitionWheelOut var(--transition-duration, .85s) ease-in forwards}.transition-wheelReverse-enter{animation:transitionWheelReverseIn var(--transition-duration, .85s) ease-out forwards}.transition-wheelReverse-exit{animation:transitionWheelReverseOut var(--transition-duration, .85s) ease-in forwards}.transition-wedge-enter{animation:transitionWedgeIn var(--transition-duration, .8s) ease-out forwards}.transition-wedge-exit{animation:transitionWedgeOut var(--transition-duration, .8s) ease-in forwards}.transition-prism-enter{animation:transitionPrismIn var(--transition-duration, .85s) ease-out forwards}.transition-prism-exit{animation:transitionPrismOut var(--transition-duration, .85s) ease-in forwards}.transition-warp-enter{animation:transitionWarpIn var(--transition-duration, .85s) ease-out forwards}.transition-warp-exit{animation:transitionWarpOut var(--transition-duration, .85s) ease-in forwards}.transition-clock-enter{animation:transitionClockIn var(--transition-duration, .8s) ease-out forwards}.transition-clock-exit{animation:transitionClockOut var(--transition-duration, .8s) ease-in forwards}.anim-none{animation:none}.anim-fadeIn{animation:fadeIn var(--anim-duration, 1s) var(--anim-easing, ease-out) var(--anim-delay, 0s) both}.anim-fadeOut{animation:fadeOut var(--anim-duration, 1s) var(--anim-easing, ease-out) var(--anim-delay, 0s) both}.anim-fadeInUp{animation:fadeInUp var(--anim-duration, .6s) var(--anim-easing, ease-out) var(--anim-delay, 0s) both}.anim-slowZoom-in{animation:slowZoomIn var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) both}.anim-slowZoom-out{animation:slowZoomOut var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) both}.anim-slowZoom-panLeft{animation:slowZoomCombinedPanLeft var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) both}.anim-slowZoom-panRight{animation:slowZoomCombinedPanRight var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) both}.anim-zoomIn{animation:zoomIn var(--anim-duration, .5s) var(--anim-easing, ease-out) var(--anim-delay, 0s) both}.anim-zoomOut{animation:zoomOut var(--anim-duration, .5s) var(--anim-easing, ease-out) var(--anim-delay, 0s) both}.anim-panLeft{animation:panLeft var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) both}.anim-panRight{animation:panRight var(--anim-duration, 8s) var(--anim-easing, linear) var(--anim-delay, 0s) both}.squisq-image--portrait-pan-right{animation:portraitCoverPanRight var(--portrait-pan-duration, 12s) var(--portrait-pan-easing, ease-in-out) var(--portrait-pan-delay, 0s) both;will-change:object-position}.squisq-image--portrait-pan-left{animation:portraitCoverPanLeft var(--portrait-pan-duration, 12s) var(--portrait-pan-easing, ease-in-out) var(--portrait-pan-delay, 0s) both;will-change:object-position}.anim-typewriter{animation:typewriter var(--anim-duration, 2s) var(--anim-easing, steps(40, end)) var(--anim-delay, 0s) both}.block-layer.anim-zoomIn,.block-layer.anim-zoomOut,.block-layer.anim-grow,.block-layer.anim-grow-x,.block-layer.anim-grow-y,.block-layer.anim-tween,.block-layer.anim-drift{transform-box:fill-box;transform-origin:var(--anim-origin, center center)}.anim-slideIn-left{animation:layerSlideInLeft var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-slideIn-right{animation:layerSlideInRight var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-slideIn-top{animation:layerSlideInTop var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-slideIn-bottom{animation:layerSlideInBottom var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-grow{animation:growIn var(--anim-duration, 1s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-grow-x{animation:growX var(--anim-duration, 1s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-grow-y{animation:growY var(--anim-duration, 1s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-drawOn [data-squisq-draw=stroke]{stroke-dasharray:1;animation:drawOn var(--anim-duration, 1s) var(--anim-easing, ease-in-out) var(--anim-delay, 0s) both}.anim-drawOn [data-squisq-draw=markers]{animation:drawOnMarkers var(--anim-duration, 1s) linear var(--anim-delay, 0s) both}.anim-reveal-left{animation:revealFromLeft var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-reveal-right{animation:revealFromRight var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-reveal-top{animation:revealFromTop var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-reveal-bottom{animation:revealFromBottom var(--anim-duration, .7s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-reveal-iris{animation:revealIris var(--anim-duration, .9s) var(--anim-easing, cubic-bezier(.22, 1, .36, 1)) var(--anim-delay, 0s) both}.anim-wordReveal .anim-word{animation:wordIn var(--anim-duration, .4s) var(--anim-easing, ease-out) var(--anim-delay, 0s) both}.anim-countUp{animation:fadeIn .3s ease-out var(--anim-delay, 0s) both}.anim-drift{animation:drift var(--anim-duration, 12s) ease-in-out var(--anim-delay, 0s) infinite}.anim-tween{animation:tween var(--anim-duration, 1s) var(--anim-easing, ease-in-out) var(--anim-delay, 0s) both}.doc-player--render-mode,.doc-player--render-mode *,.doc-player--render-mode *:before,.doc-player--render-mode *:after{transition:none!important}.doc-player{position:relative;overflow:hidden;clip-path:inset(0);background:#000;max-width:100%;max-height:100%}.doc-player__media-clips{position:absolute;inset:0;z-index:0;pointer-events:none}.doc-player__media-clips--full-frame,.doc-player__media-clips--picture-in-picture{z-index:10}.doc-player__media-video{position:absolute;display:block;object-fit:cover;opacity:0;visibility:hidden}.doc-player__media-video--active{opacity:1;visibility:visible}.doc-player__media-clips--background .doc-player__media-video,.doc-player__media-clips--full-frame .doc-player__media-video{inset:0;width:100%;height:100%}.doc-player__media-clips--picture-in-picture .doc-player__media-video{width:22%;aspect-ratio:1;border:var(--squisq-pip-border, max(1px, .12vw) solid rgba(255, 255, 255, .72));border-radius:var(--squisq-pip-radius, 14%);box-shadow:var(--squisq-pip-shadow, 0 .75em 2em rgba(0, 0, 0, .34))}.doc-player__media-clips--picture-in-picture[data-pip-shape=wide] .doc-player__media-video{aspect-ratio:16 / 9}.doc-player__media-clips--picture-in-picture[data-pip-size=small] .doc-player__media-video{width:9%}.doc-player__media-clips--picture-in-picture[data-pip-size=large] .doc-player__media-video{width:15%}.doc-player[data-orientation=portrait] .doc-player__media-clips--picture-in-picture .doc-player__media-video{width:34%}.doc-player[data-orientation=portrait] .doc-player__media-clips--picture-in-picture[data-pip-size=small] .doc-player__media-video{width:15%}.doc-player[data-orientation=portrait] .doc-player__media-clips--picture-in-picture[data-pip-size=large] .doc-player__media-video{width:23%}.doc-player__media-clips--picture-in-picture[data-pip-position=top-left] .doc-player__media-video{top:4%;left:3%}.doc-player__media-clips--picture-in-picture[data-pip-position=top-right] .doc-player__media-video{top:4%;right:3%}.doc-player__media-clips--picture-in-picture[data-pip-position=bottom-left] .doc-player__media-video{bottom:6%;left:3%}.doc-player__media-clips--picture-in-picture[data-pip-position=bottom-right] .doc-player__media-video{right:3%;bottom:6%}.doc-player__viewport,.doc-player__block{position:absolute;top:0;left:0;width:100%;height:100%}.doc-player__block--active{z-index:2}.doc-player__block--previous{z-index:1}.doc-player__block--active.doc-player__block--dragging{transition:none}.doc-player__block--active.doc-player__block--settling{transition:transform .26s cubic-bezier(.22,1,.36,1)}.doc-player--swipe{cursor:grab;-webkit-user-select:none;user-select:none}.doc-player--swipe.doc-player--grabbing{cursor:grabbing}.doc-player__tap-feedback{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:150;pointer-events:none;display:flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:50%;background:#00000073;animation:tap-feedback-fade .6s ease-out forwards}@keyframes tap-feedback-fade{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(1.3)}}.block-svg{width:100%;height:100%;display:block;transform-origin:center;transform-box:fill-box}.block-svg[class*=transition-]{backface-visibility:hidden;will-change:transform,opacity,filter,clip-path}.block-layer{overflow:hidden}.block-layer--image{overflow:visible}.squisq-mermaid-rendered{position:relative;display:flex;box-sizing:border-box;width:100%;min-height:260px;align-items:center;justify-content:center;color:inherit;overflow:hidden}.squisq-mermaid-render-svg{display:flex;width:100%;height:100%;min-height:0;align-items:center;justify-content:center}.squisq-mermaid-render-svg>svg{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%}.squisq-mermaid-render-status,.squisq-mermaid-render-error{padding:1rem;color:inherit;font:500 .9rem/1.4 system-ui,sans-serif;text-align:center}.squisq-mermaid-render-error pre{max-height:8em;margin:.5rem 0 0;overflow:auto;font:400 .75rem/1.35 ui-monospace,monospace;text-align:left;white-space:pre-wrap}.squisq-md-mermaid{min-height:min(460px,60vh);margin:1.25rem 0;padding:1rem;border:1px solid color-mix(in srgb,currentcolor 18%,transparent);border-radius:10px;background:color-mix(in srgb,currentcolor 4%,transparent)}.squisq-md-code-frame{position:relative;margin:1em 0}.squisq-md-code-frame>.squisq-md-code-block{margin:0;padding-right:5rem}.squisq-md-code-copy{position:absolute;z-index:1;top:.55rem;right:.55rem;min-width:3.7rem;padding:.28rem .5rem;border:1px solid color-mix(in srgb,currentcolor 20%,transparent);border-radius:5px;background:color-mix(in srgb,Canvas 90%,transparent);color:inherit;font:500 .72rem/1.2 system-ui,sans-serif;cursor:pointer;opacity:.58;transition:opacity .12s ease,background-color .12s ease}.squisq-md-code-frame:hover>.squisq-md-code-copy,.squisq-md-code-copy:focus-visible,.squisq-md-code-copy[data-copy-state=copied],.squisq-md-code-copy[data-copy-state=failed]{opacity:1}.squisq-md-code-copy:hover{background:Canvas}.squisq-md-code-copy:disabled{cursor:wait}.squisq-md-fence-widget{margin:.75rem 0}.squisq-json-fence-error{margin-top:.3rem;font-size:.78rem;opacity:.7}.squisq-json-fence-actions{display:flex;gap:.45rem;margin-top:.55rem}.squisq-json-fence-action{padding:.32rem .75rem;border:1px solid color-mix(in srgb,currentcolor 25%,transparent);border-radius:6px;background:color-mix(in srgb,Canvas 92%,transparent);color:inherit;font:500 .8rem/1.2 system-ui,sans-serif;cursor:pointer;transition:background-color .12s ease}.squisq-json-fence-action:hover{background:Canvas}.squisq-json-fence-action--primary{border-color:color-mix(in srgb,currentcolor 45%,transparent);font-weight:600}.squisq-mermaid-layer-frame{width:100%;height:100%}.squisq-mermaid-layer-frame .squisq-mermaid-rendered{height:100%;min-height:0}.squisq-mermaid-rendered :is(path.flowchart-link,.edgePath .path,.relationshipLine,.messageLine0,.messageLine1):not([style*="stroke:"]){stroke:currentcolor!important}.squisq-mermaid-rendered marker :is(path,polygon):not([fill=none]){fill:currentcolor!important;stroke:currentcolor!important}.text-shadow{text-shadow:0 2px 4px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.4)}.text-shadow-light{text-shadow:0 1px 2px rgba(0,0,0,.6)}.text-box{background:#0009;padding:16px 24px;border-radius:4px}.text-box--light{background:#ffffffe6;color:#1a1a1a}.squisq-inline-video-player{display:inline-block;max-width:480px;width:100%;margin:.5em 0}.squisq-inline-video-player video{display:block;width:100%;max-width:100%;height:auto;border-radius:4px;background:#000}.squisq-inline-audio-player{display:inline-block;max-width:360px;width:100%;margin:.25em 0;vertical-align:middle}.squisq-inline-audio-player audio{display:block;width:100%}.squisq-animated-image-toggle{display:inline-flex;align-items:center;gap:5px;padding:4px 8px 4px 7px;font:600 10px/1 var(--squisq-ux-font, system-ui, -apple-system, sans-serif);letter-spacing:.06em;color:var(--squisq-animated-image-control-text, #fff);background:var(--squisq-animated-image-control-bg, rgba(0, 0, 0, .62));border:0;border-radius:999px;cursor:pointer;z-index:3;opacity:.85;transition:opacity .12s ease;user-select:none}.squisq-animated-image-toggle:hover,.squisq-animated-image-toggle:focus-visible{opacity:1}.squisq-animated-image-toggle:focus-visible{outline:2px solid var(--squisq-animated-image-control-text, #fff);outline-offset:2px}.squisq-animated-image-toggle svg{width:10px;height:10px;fill:currentColor}@media(prefers-reduced-motion:reduce){.anim-slowZoom-in,.anim-slowZoom-out,.anim-slowZoom-panLeft,.anim-slowZoom-panRight,.anim-panLeft,.anim-panRight,.squisq-image--portrait-pan-left,.squisq-image--portrait-pan-right,.anim-drift{animation:none}}.doc-player--empty{min-height:120px;width:100%;background:#f0f0f0}.doc-player{--squisq-styles-loaded: 1}
|
|
745
|
-
`;var NS=false;function
|
|
746
|
-
${t}`),document.head.appendChild(e),NS=true;}function
|
|
747
|
-
exports.getHandle=
|
|
745
|
+
`;var NS=false;function az(){if(NS||typeof document>"u")return;let e=document.createElement("style");e.setAttribute("data-squisq-player","animations");let t=globalThis.__SQUISQ_PLAYER_ICON_STYLES__;e.textContent=RS,t&&(e.textContent+=`
|
|
746
|
+
${t}`),document.head.appendChild(e),NS=true;}function oz(e,t){let n={};for(let r of Object.keys(e)){let i=r.split("/").pop();n[i]=e[r];}return {async resolveUrl(r){if(r in e)return e[r];let i=r.replace(/^\.\//,"");if(i!==r&&i in e)return e[i];let a=r.split("/").pop();return a in n?n[a]:r.startsWith("http")||r.startsWith("data:")||r.startsWith("blob:")?r:`${t}/${r}`},async listMedia(){return Object.keys(e).map(r=>({name:r,mimeType:sz(r),size:0}))},async addMedia(){throw new Error("Standalone player is read-only")},async removeMedia(){throw new Error("Standalone player is read-only")},dispose(){}}}function sz(e){let t=e.split(".").pop()?.toLowerCase()??"";return {jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mpeg",mp4:"video/mp4",webm:"video/webm"}[t]??"application/octet-stream"}function lz(e,t){if(!e.audio?.segments?.length)return e;let n=e.audio.segments.map(r=>{let i=t[r.name]??t[r.src]??r.src;return {...r,src:i}});return {...e,audio:{...e.audio,segments:n}}}var Pu=new WeakMap,Ha=new WeakMap;function cz(e,t){let n=null,r=true,i=false,a,o=new Promise(c=>{a=c;}),s=c=>{i||(i=true,a(c));};t||s(null);let l={element:e,renderAPI:o,getRenderAPI:()=>n,unmount:()=>{Ha.get(e)===l&&uz(e);},setRenderAPI(c){r&&(n=c,c&&s(c));},cancel(){r=false,n=null,s(null);}};return l}function wue(e,t,n={}){az();let{mode:r="slideshow",dashboard:i,basePath:a=".",images:o,audio:s,autoPlay:l=false,loop:c=false,theme:d,videoPresentation:u,pipSize:f,pipShape:m,pipPosition:h,renderMode:y=false,viewport:g,motion:w,animationsEnabled:x=true,captionStyle:v,captionPosition:T,globalKeyboardShortcuts:S=true,showCodeCopyButton:k=false,onCopyCode:E}=n,I=s?lz(t,s):t,_=o?oz(o,a):null;Ha.get(e)?.cancel();let A=cz(e,(r==="slideshow"||r==="video"||r==="dashboard")&&y);Ha.set(e,A);let D;if(r==="static")D=ir(qu,{doc:I,basePath:a,theme:d,animationsEnabled:x,globalKeyboardShortcuts:S,showCodeCopyButton:k,onCopyCode:E});else {let q=r==="dashboard"||y?e.getBoundingClientRect():void 0,F=q&&q.width>0&&q.height>0?{width:Math.round(q.width),height:Math.round(q.height),name:"Host viewport"}:void 0,P=g&&g.width>0&&g.height>0?{width:Math.round(g.width),height:Math.round(g.height),name:g.name??"Render viewport"}:void 0,H=r==="dashboard"?F??P:P??F;D=ir(PS,{doc:I,basePath:a,audioMode:!y&&I.audio?.segments?.length?"media":"synthetic",displayMode:r==="dashboard"?"dashboard":r==="flashcards"?"flashcards":r==="video"?"video":"slideshow",loop:r==="video"?c:void 0,dashboardLayout:i?.layout,dashboardShowTitle:i?.title,dashboardStyle:i?.style,dashboardDocumentTitle:i?.documentTitle,forceViewport:H,autoPlay:y?false:l,showControls:!y,renderMode:y,animationsEnabled:x,theme:d,motion:w,videoPresentation:u,pipSize:f,pipShape:m,pipPosition:h,captionsEnabled:!!v,captionStyle:v??"standard",captionPosition:T,globalKeyboardShortcuts:S,onRenderAPIReady:$=>A.setRenderAPI($)});}_&&(D=ir(pp.Provider,{value:_},D));let B=Pu.get(e);return B||(B=Sy(e),Pu.set(e,B)),B.render(D),A}function kue(e){return Ha.get(e)}function uz(e){Ha.get(e)?.cancel(),Ha.delete(e);let n=Pu.get(e);n&&(n.unmount(),Pu.delete(e));}var xue="2.11.16";
|
|
747
|
+
exports.getHandle=kue;exports.mount=wue;exports.unmount=uz;exports.version=xue;return exports;})({});
|