presenter 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/presenter.js CHANGED
@@ -1,8 +1,10 @@
1
- (function(E,X){typeof exports=="object"&&typeof module<"u"?X(exports):typeof define=="function"&&define.amd?define(["exports"],X):(E=typeof globalThis<"u"?globalThis:E||self,X(E.Presenter={}))})(this,(function(E){"use strict";var Ui=Object.defineProperty;var Yi=(E,X,At)=>X in E?Ui(E,X,{enumerable:!0,configurable:!0,writable:!0,value:At}):E[X]=At;var k=(E,X,At)=>Yi(E,typeof X!="symbol"?X+"":X,At);var Tt,Lt,Mt,Ct,St;const X={ANIMATE:"Animate",PAUSE:"Pause",UPDATE:"Update"};function At(n){return n*n*n}function _0(n){return--n*n*n+1}function N0(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var Yt=1.70158;(function n(e){e=+e;function t(o){return(o=+o)*o*(e*(o-1)+o)}return t.overshoot=n,t})(Yt),(function n(e){e=+e;function t(o){return--o*o*((o+1)*e+o)+1}return t.overshoot=n,t})(Yt);var F0=(function n(e){e=+e;function t(o){return((o*=2)<1?o*o*((e+1)*o-e):(o-=2)*o*((e+1)*o+e)+2)/2}return t.overshoot=n,t})(Yt);const Rt={LINEAR:n=>n,CUBIC:N0,CUBIC_IN:At,CUBIC_OUT:_0,BACK_IN_OUT:F0.overshoot(.8)},R0=Rt.LINEAR;function Bt(n,e,t={}){return{type:X.ANIMATE,object:n,props:e,delay:0,duration:1e3,easing:R0,block:!1,interpolators:null,isKey:!1,notes:null,shortcut:null,...typeof t=="number"?{duration:t}:t}}function B0(n,e={}){return Bt(n,{opacity:1},{duration:500,easing:Rt.CUBIC,...typeof e=="number"?{duration:e}:e})}function D0(n,e={}){return Bt(n,{opacity:0},{duration:500,easing:Rt.CUBIC,...typeof e=="number"?{duration:e}:e})}function $t(n,e,t={}){return{type:X.UPDATE,isKey:!1,notes:null,object:n,props:e,shortcut:null,...t}}function q0(n,e={}){return $t(n,{opacity:0},e)}function z0(n,e={}){return $t(n,{opacity:1},e)}const nt={TOP_LEFT:"TopLeft",TOP:"Top",TOP_RIGHT:"TopRight",LEFT:"Left",CENTER:"Center",RIGHT:"Right",BOTTOM_LEFT:"BottomLeft",BOTTOM:"Bottom",BOTTOM_RIGHT:"BottomRight"},it=nt.TOP_LEFT;function K(n,e=0,t=0,o=1){if(typeof n=="string"){const i=n.replace("#",""),a=parseInt(i,16);return isNaN(a)?(console.warn("Invalid hex color format:",n),tt):i.length===6?{red:a>>16&255,green:a>>8&255,blue:a&255,alpha:1}:i.length===8?{red:a>>24&255,green:a>>16&255,blue:a>>8&255,alpha:(a&255)/255}:(console.warn("Invalid hex color format:",n),tt)}else if(typeof n=="number")return{red:n,green:e??0,blue:t??0,alpha:o??1};return{red:0,green:0,blue:0,alpha:1,...n}}K.BLACK=K(0,0,0),K.BLUE=K(0,0,255),K.GREEN=K(0,255,0),K.RED=K(255,0,0),K.TRANSPARENT=K(0,0,0,0),K.WHITE=K(255,255,255);const tt={red:0,green:0,blue:0,alpha:1};function Wt(n=null){return{content:null,setup:null,anchor:nt.TOP_LEFT,height:0,width:0,x:0,y:0,...n}}function Ae(n,e=null){return n.alpha*(e??1)}function Pt(n,e=null){const{red:t,green:o,blue:i}=n,a=t<<16|o<<8|i,s=Math.round(Ae(n,e)*255);return`#${a.toString(16).padStart(6,"0")}${s!==255?s.toString(16).padStart(2,"0"):""}`}function V0(n=null){const{url:e="https://wikipedia.org/",backgroundColor:t=K.TRANSPARENT,strokeColor:o=tt,strokeWidth:i=0,pointerEvents:a="auto",scale:s=1,anchor:r=it,height:l=1e3,width:c=1e3,x:u=0,y:g=0}=n||{},h=document.createElement("iframe");h.src=e,h.style.backgroundColor=Pt(t),h.style.border=i>0?`${i}px solid ${Pt(o)}`:"none",h.style.pointerEvents=a;const f=(100/s).toFixed(3)+"%";return h.style.height=i===0?f:`calc(${f} - ${i*2}px)`,h.style.width=i===0?f:`calc(${f} - ${i*2}px)`,h.style.transform=`scale(${s})`,h.style.transformOrigin="top left",Wt({content:h,anchor:r,height:l,width:c,x:u,y:g})}const gt={LEFT:"left",CENTER:"center",RIGHT:"right"},j0=gt.LEFT;function st(n,e){throw new Error("Unexpected value: "+n)}function H0(n=null){const{alignment:e=gt.LEFT,scale:t=1,anchor:o=it,height:i=1e3,width:a=1e3,x:s=0,y:r=0}=n||{};function l(c){const u=document.createElement("video");switch(u.autoplay=!0,u.style.transform=`scale(${t})`,e){case gt.LEFT:u.style.transformOrigin="top left";break;case gt.CENTER:u.style.transformOrigin="top center";break;case gt.RIGHT:u.style.transformOrigin="top right";break;default:st(e)}c.appendChild(u);const g={video:{displaySurface:"window"},audio:!1};return navigator.mediaDevices.getDisplayMedia(g).then(h=>{const f=h.getVideoTracks()[0];f!==void 0&&(f.onended=function(){u.style.display="none"}),u.srcObject=h,u.play()}).catch(h=>{console.error("Could not start screen capture -",h)}),()=>{u.srcObject.getTracks().forEach(f=>f.stop()),u.style.display="none",u.srcObject=null}}return Wt({content:null,setup:l,anchor:o,height:i,width:a,x:s,y:r})}const j={ARROW:"Arrow",CIRCLE:"Circle",GROUP:"Group",IMAGE:"Image",LINE:"Line",MASK:"Mask",PATH:"Path",POLYGON:"Polygon",RECTANGLE:"Rectangle",SLIDE_OBJECT:"SlideObject",SPOTLIGHT:"Spotlight",SVG:"SVG",TEXT:"Text"};function et(n){return{objectType:j.SLIDE_OBJECT,opacity:1,...n}}function U0(n=null){const{arrowheadSize:e,width:t=10,...o}=n||{},i=e??t*4;return et({objectType:j.ARROW,arrowheadSize:i,color:tt,drawn:1,endX:100,endY:100,isArrowheadDoubled:!1,isArrowheadFilled:!1,isDrawnFromCenter:!1,startX:0,startY:0,width:t,...o})}const Y0=50;function $0(n=null){return et({objectType:j.CIRCLE,anchor:it,strokeColor:tt,strokeWidth:0,drawn:1,fillColor:tt,radius:Y0,x:0,y:0,...n})}function Gt(n,e=null){return et({objectType:j.GROUP,anchor:it,height:0,objects:n,previewColor:null,rotateOriginPreviewSize:0,rotateOriginX:0,rotateOriginY:0,rotation:0,skewOriginPreviewSize:0,skewOriginX:0,skewOriginY:0,skewX:0,skewY:0,scale:1,scaleX:1,scaleY:1,width:0,x:0,y:0,...e})}function W0(n){const{anchor:e=it,cols:t=1,rows:o=1,gapX:i=0,gapY:a=0,groupProps:s={},width:r=0,height:l=0,x:c=0,y:u=0,objects:g=()=>null}=n,h=[],f=[];let v=0,x=0;for(let C=0;C<o;C++){const M=[];v=0;let L=0;for(let I=0;I<t;I++){const S=g(C,I),O=typeof r=="function"?r(C,I):r,B=typeof l=="function"?l(C,I):l;M.push(S),S!=null&&f.push(Gt([S],{x:v,y:x})),v+=O+i,L=Math.max(L,B)}h.push(M),x+=L+a}return{grid:Gt(f,{x:c,y:u,height:x-a,width:v-i,anchor:e,...s}),objects:h}}function G0(n=null){return et({objectType:j.IMAGE,anchor:it,cornerRadius:0,height:100,imageId:"",smooth:!0,width:100,x:0,y:0,...n})}function X0(n=null){return et({objectType:j.LINE,color:tt,drawn:1,endX:100,endY:100,isDrawnFromCenter:!1,isRounded:!1,startX:0,startY:0,width:10,...n})}function K0(n,e=null){return et({objectType:j.MASK,anchor:it,height:100,objects:n,preview:!1,width:100,x:0,y:0,...e})}var Z0=Object.defineProperty,_=(n,e)=>Z0(n,"name",{value:e,configurable:!0}),Et={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},J0=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Q0=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,tn=_(n=>{const e=(n&&n.length>0?n:"M0,0").match(J0);if(!e)throw new Error(`No path elements found in string ${n}`);return e.reduce((t,o)=>{let i=o.charAt(0),a=i.toLowerCase(),s=en(o.substring(1));if(a==="m"&&s.length>2&&(t.push([i,...s.splice(0,2)]),a="l",i=i==="m"?"l":"L"),a.toLowerCase()==="a"&&(s.length===5||s.length===6)){const r=o.substring(1).trim().split(" ");s=[Number(r[0]),Number(r[1]),Number(r[2]),Number(r[3].charAt(0)),Number(r[3].charAt(1)),Number(r[3].substring(2)),Number(r[4])]}for(;s.length>=0;){if(s.length===Et[a]){t.push([i,...s.splice(0,Et[a])]);break}if(s.length<Et[a])throw new Error(`Malformed path data: "${i}" must have ${Et[a]} elements and has ${s.length}: ${o}`);t.push([i,...s.splice(0,Et[a])])}return t},[])},"default"),en=_(n=>{const e=n.match(Q0);return e?e.map(Number):[]},"parseValues"),rt=(Tt=class{constructor(e,t,o,i){k(this,"x0");k(this,"x1");k(this,"y0");k(this,"y1");k(this,"getTotalLength",_(()=>Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),"getTotalLength"));k(this,"getPointAtLength",_(e=>{let t=e/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2));t=Number.isNaN(t)?1:t;const o=(this.x1-this.x0)*t,i=(this.y1-this.y0)*t;return{x:this.x0+o,y:this.y0+i}},"getPointAtLength"));k(this,"getTangentAtLength",_(e=>{const t=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/t,y:(this.y1-this.y0)/t}},"getTangentAtLength"));k(this,"getPropertiesAtLength",_(e=>{const t=this.getPointAtLength(e),o=this.getTangentAtLength(e);return{x:t.x,y:t.y,tangentX:o.x,tangentY:o.y}},"getPropertiesAtLength"));this.x0=e,this.x1=t,this.y0=o,this.y1=i}},_(Tt,"LinearPosition"),Tt),Te=(Lt=class{constructor(e,t,o,i,a,s,r,l,c){k(this,"x0");k(this,"y0");k(this,"rx");k(this,"ry");k(this,"xAxisRotate");k(this,"LargeArcFlag");k(this,"SweepFlag");k(this,"x1");k(this,"y1");k(this,"length");k(this,"getTotalLength",_(()=>this.length,"getTotalLength"));k(this,"getPointAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=Le({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},e/this.length);return{x:t.x,y:t.y}},"getPointAtLength"));k(this,"getTangentAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=.05,o=this.getPointAtLength(e);let i;e<0?e=0:e>this.length&&(e=this.length),i=e<this.length-t?this.getPointAtLength(e+t):this.getPointAtLength(e-t);const a=i.x-o.x,s=i.y-o.y,r=Math.sqrt(a*a+s*s);return e<this.length-t?{x:-a/r,y:-s/r}:{x:a/r,y:s/r}},"getTangentAtLength"));k(this,"getPropertiesAtLength",_(e=>{const t=this.getTangentAtLength(e),o=this.getPointAtLength(e);return{x:o.x,y:o.y,tangentX:t.x,tangentY:t.y}},"getPropertiesAtLength"));this.x0=e,this.y0=t,this.rx=o,this.ry=i,this.xAxisRotate=a,this.LargeArcFlag=s,this.SweepFlag=r,this.x1=l,this.y1=c;const u=nn(300,function(g){return Le({x:e,y:t},o,i,a,s,r,{x:l,y:c},g)});this.length=u.arcLength}},_(Lt,"Arc"),Lt),Le=_((n,e,t,o,i,a,s,r)=>{e=Math.abs(e),t=Math.abs(t),o=rn(o,360);const l=on(o);if(n.x===s.x&&n.y===s.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};const c=(n.x-s.x)/2,u=(n.y-s.y)/2,g={x:Math.cos(l)*c+Math.sin(l)*u,y:-Math.sin(l)*c+Math.cos(l)*u},h=Math.pow(g.x,2)/Math.pow(e,2)+Math.pow(g.y,2)/Math.pow(t,2);h>1&&(e=Math.sqrt(h)*e,t=Math.sqrt(h)*t);let f=(Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(g.y,2)-Math.pow(t,2)*Math.pow(g.x,2))/(Math.pow(e,2)*Math.pow(g.y,2)+Math.pow(t,2)*Math.pow(g.x,2));f=f<0?0:f;const v=(i!==a?1:-1)*Math.sqrt(f),x=v*(e*g.y/t),T=v*(-t*g.x/e),C={x:Math.cos(l)*x-Math.sin(l)*T+(n.x+s.x)/2,y:Math.sin(l)*x+Math.cos(l)*T+(n.y+s.y)/2},M={x:(g.x-x)/e,y:(g.y-T)/t},L=Ce({x:1,y:0},M);let I=Ce(M,{x:(-g.x-x)/e,y:(-g.y-T)/t});!a&&I>0?I-=2*Math.PI:a&&I<0&&(I+=2*Math.PI),I%=2*Math.PI;const S=L+I*r,O=e*Math.cos(S),B=t*Math.sin(S);return{x:Math.cos(l)*O-Math.sin(l)*B+C.x,y:Math.sin(l)*O+Math.cos(l)*B+C.y,ellipticalArcStartAngle:L,ellipticalArcEndAngle:L+I,ellipticalArcAngle:S,ellipticalArcCenter:C,resultantRx:e,resultantRy:t}},"pointOnEllipticalArc"),nn=_((n,e)=>{n=n??500;let t=0;const o=[],i=[];let a,s=e(0);for(let r=0;r<n;r++){const l=sn(r*(1/n),0,1);a=e(l),t+=Me(s,a),i.push([s,a]),o.push({t:l,arcLength:t}),s=a}return a=e(1),i.push([s,a]),t+=Me(s,a),o.push({t:1,arcLength:t}),{arcLength:t,arcLengthMap:o,approximationLines:i}},"approximateArcLengthOfCurve"),rn=_((n,e)=>(n%e+e)%e,"mod"),on=_(n=>n*(Math.PI/180),"toRadians"),Me=_((n,e)=>Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),"distance"),sn=_((n,e,t)=>Math.min(Math.max(n,e),t),"clamp"),Ce=_((n,e)=>{const t=n.x*e.x+n.y*e.y,o=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(n.x*e.y-n.y*e.x<0?-1:1)*Math.acos(t/o)},"angleBetween"),an=[[],[],[-.5773502691896257,.5773502691896258],[0,-.7745966692414833,.7745966692414833],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],ln=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],hn=[[1],[1,1],[1,2,1],[1,3,3,1]],cn=_((n,e,t)=>({x:(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],y:(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3]}),"cubicPoint"),un=_((n,e,t)=>Se([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t),"cubicDerivative"),fn=_((n,e,t)=>{let o,i;const a=t/2;o=0;for(let s=0;s<20;s++)i=a*an[20][s]+a,o+=ln[20][s]*Pe(n,e,i);return a*o},"getCubicArcLength"),Se=_((n,e,t)=>({x:(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],y:(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2]}),"quadraticPoint"),dn=_((n,e,t)=>{t===void 0&&(t=1);const o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),l=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));const u=l/(2*r),g=t+u,h=c/r-u*u,f=g*g+h>0?Math.sqrt(g*g+h):0,v=u*u+h>0?Math.sqrt(u*u+h):0,x=u+Math.sqrt(u*u+h)!==0&&(g+f)/(u+v)!==0?h*Math.log(Math.abs((g+f)/(u+v))):0;return Math.sqrt(r)/2*(g*f-u*v+x)},"getQuadraticArcLength"),gn=_((n,e,t)=>({x:2*(1-t)*(n[1]-n[0])+2*t*(n[2]-n[1]),y:2*(1-t)*(e[1]-e[0])+2*t*(e[2]-e[1])}),"quadraticDerivative");function Pe(n,e,t){const o=Xt(1,t,n),i=Xt(1,t,e),a=o*o+i*i;return Math.sqrt(a)}_(Pe,"BFunc");var Xt=_((n,e,t)=>{const o=t.length-1;let i,a;if(o===0)return 0;if(n===0){a=0;for(let s=0;s<=o;s++)a+=hn[o][s]*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}i=new Array(o);for(let s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return Xt(n-1,e,i)},"getDerivative"),Kt=_((n,e,t)=>{let o=1,i=n/e,a=(n-t(i))/e,s=0;for(;o>.001;){const r=t(i+a),l=Math.abs(n-r)/e;if(l<o)o=l,i+=a;else{const c=t(i-a),u=Math.abs(n-c)/e;u<o?(o=u,i-=a):a/=2}if(s++,s>500)break}return i},"t2length"),ct=(Mt=class{constructor(e,t,o,i,a,s,r,l){k(this,"a");k(this,"b");k(this,"c");k(this,"d");k(this,"length");k(this,"getArcLength");k(this,"getPoint");k(this,"getDerivative");k(this,"getTotalLength",_(()=>this.length,"getTotalLength"));k(this,"getPointAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Kt(e,this.length,a=>this.getArcLength(t,o,a));return this.getPoint(t,o,i)},"getPointAtLength"));k(this,"getTangentAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Kt(e,this.length,l=>this.getArcLength(t,o,l)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;return r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0},r},"getTangentAtLength"));k(this,"getPropertiesAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Kt(e,this.length,c=>this.getArcLength(t,o,c)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0};const l=this.getPoint(t,o,i);return{x:l.x,y:l.y,tangentX:r.x,tangentY:r.y}},"getPropertiesAtLength"));k(this,"getC",_(()=>this.c,"getC"));k(this,"getD",_(()=>this.d,"getD"));this.a={x:e,y:t},this.b={x:o,y:i},this.c={x:a,y:s},r!==void 0&&l!==void 0?(this.getArcLength=fn,this.getPoint=cn,this.getDerivative=un,this.d={x:r,y:l}):(this.getArcLength=dn,this.getPoint=Se,this.getDerivative=gn,this.d={x:0,y:0}),this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],1)}},_(Mt,"Bezier"),Mt),pn=(Ct=class{constructor(e){k(this,"length",0);k(this,"partial_lengths",[]);k(this,"functions",[]);k(this,"initial_point",null);k(this,"getPartAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);let t=this.partial_lengths.length-1;for(;this.partial_lengths[t]>=e&&t>0;)t--;return t++,{fraction:e-this.partial_lengths[t-1],i:t}},"getPartAtLength"));k(this,"getTotalLength",_(()=>this.length,"getTotalLength"));k(this,"getPointAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPointAtLength(t.fraction);if(this.initial_point)return this.initial_point;throw new Error("Wrong function at this part.")},"getPointAtLength"));k(this,"getTangentAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getTangentAtLength(t.fraction);if(this.initial_point)return{x:0,y:0};throw new Error("Wrong function at this part.")},"getTangentAtLength"));k(this,"getPropertiesAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPropertiesAtLength(t.fraction);if(this.initial_point)return{x:this.initial_point.x,y:this.initial_point.y,tangentX:0,tangentY:0};throw new Error("Wrong function at this part.")},"getPropertiesAtLength"));k(this,"getParts",_(()=>{const e=[];for(let t=0;t<this.functions.length;t++)if(this.functions[t]!==null){this.functions[t]=this.functions[t];const o={start:this.functions[t].getPointAtLength(0),end:this.functions[t].getPointAtLength(this.partial_lengths[t]-this.partial_lengths[t-1]),length:this.partial_lengths[t]-this.partial_lengths[t-1],getPointAtLength:this.functions[t].getPointAtLength,getTangentAtLength:this.functions[t].getTangentAtLength,getPropertiesAtLength:this.functions[t].getPropertiesAtLength};e.push(o)}return e},"getParts"));const t=Array.isArray(e)?e:tn(e);let o,i=[0,0],a=[0,0],s=[0,0];for(let r=0;r<t.length;r++){if(t[r][0]==="M")i=[t[r][1],t[r][2]],s=[i[0],i[1]],this.functions.push(null),r===0&&(this.initial_point={x:t[r][1],y:t[r][2]});else if(t[r][0]==="m")i=[t[r][1]+i[0],t[r][2]+i[1]],s=[i[0],i[1]],this.functions.push(null);else if(t[r][0]==="L")this.length+=Math.sqrt(Math.pow(i[0]-t[r][1],2)+Math.pow(i[1]-t[r][2],2)),this.functions.push(new rt(i[0],t[r][1],i[1],t[r][2])),i=[t[r][1],t[r][2]];else if(t[r][0]==="l")this.length+=Math.sqrt(Math.pow(t[r][1],2)+Math.pow(t[r][2],2)),this.functions.push(new rt(i[0],t[r][1]+i[0],i[1],t[r][2]+i[1])),i=[t[r][1]+i[0],t[r][2]+i[1]];else if(t[r][0]==="H")this.length+=Math.abs(i[0]-t[r][1]),this.functions.push(new rt(i[0],t[r][1],i[1],i[1])),i[0]=t[r][1];else if(t[r][0]==="h")this.length+=Math.abs(t[r][1]),this.functions.push(new rt(i[0],i[0]+t[r][1],i[1],i[1])),i[0]=t[r][1]+i[0];else if(t[r][0]==="V")this.length+=Math.abs(i[1]-t[r][1]),this.functions.push(new rt(i[0],i[0],i[1],t[r][1])),i[1]=t[r][1];else if(t[r][0]==="v")this.length+=Math.abs(t[r][1]),this.functions.push(new rt(i[0],i[0],i[1],i[1]+t[r][1])),i[1]=t[r][1]+i[1];else if(t[r][0]==="z"||t[r][0]==="Z")this.length+=Math.sqrt(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)),this.functions.push(new rt(i[0],s[0],i[1],s[1])),i=[s[0],s[1]];else if(t[r][0]==="C")o=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],t[r][5],t[r][6]),this.length+=o.getTotalLength(),i=[t[r][5],t[r][6]],this.functions.push(o);else if(t[r][0]==="c")o=new ct(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],i[0]+t[r][5],i[1]+t[r][6]),o.getTotalLength()>0?(this.length+=o.getTotalLength(),this.functions.push(o),i=[t[r][5]+i[0],t[r][6]+i[1]]):this.functions.push(new rt(i[0],i[0],i[1],i[1]));else if(t[r][0]==="S"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const l=o.getC();o=new ct(i[0],i[1],2*i[0]-l.x,2*i[1]-l.y,t[r][1],t[r][2],t[r][3],t[r][4])}}else o=new ct(i[0],i[1],i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3],t[r][4]],this.functions.push(o))}else if(t[r][0]==="s"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const l=o.getC(),c=o.getD();o=new ct(i[0],i[1],i[0]+c.x-l.x,i[1]+c.y-l.y,i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4])}}else o=new ct(i[0],i[1],i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3]+i[0],t[r][4]+i[1]],this.functions.push(o))}else if(t[r][0]==="Q"){if(i[0]===t[r][1]&&i[1]===t[r][2]){const l=new rt(t[r][1],t[r][3],t[r][2],t[r][4]);this.length+=l.getTotalLength(),this.functions.push(l)}else o=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);i=[t[r][3],t[r][4]],a=[t[r][1],t[r][2]]}else if(t[r][0]==="q"){if(t[r][1]!==0||t[r][2]!==0)o=new ct(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const l=new rt(i[0]+t[r][1],i[0]+t[r][3],i[1]+t[r][2],i[1]+t[r][4]);this.length+=l.getTotalLength(),this.functions.push(l)}a=[i[0]+t[r][1],i[1]+t[r][2]],i=[t[r][3]+i[0],t[r][4]+i[1]]}else if(t[r][0]==="T"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new ct(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],t[r][1],t[r][2],void 0,void 0),this.functions.push(o),this.length+=o.getTotalLength();else{const l=new rt(i[0],t[r][1],i[1],t[r][2]);this.functions.push(l),this.length+=l.getTotalLength()}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1],t[r][2]]}else if(t[r][0]==="t"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new ct(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],i[0]+t[r][1],i[1]+t[r][2],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const l=new rt(i[0],i[0]+t[r][1],i[1],i[1]+t[r][2]);this.length+=l.getTotalLength(),this.functions.push(l)}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1]+i[0],t[r][2]+i[1]]}else if(t[r][0]==="A"){const l=new Te(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,t[r][6],t[r][7]);this.length+=l.getTotalLength(),i=[t[r][6],t[r][7]],this.functions.push(l)}else if(t[r][0]==="a"){const l=new Te(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,i[0]+t[r][6],i[1]+t[r][7]);this.length+=l.getTotalLength(),i=[i[0]+t[r][6],i[1]+t[r][7]],this.functions.push(l)}this.partial_lengths.push(this.length)}}},_(Ct,"SVGPathProperties"),Ct),Zt=(St=class{constructor(e){k(this,"inst");k(this,"getTotalLength",_(()=>this.inst.getTotalLength(),"getTotalLength"));k(this,"getPointAtLength",_(e=>this.inst.getPointAtLength(e),"getPointAtLength"));k(this,"getTangentAtLength",_(e=>this.inst.getTangentAtLength(e),"getTangentAtLength"));k(this,"getPropertiesAtLength",_(e=>this.inst.getPropertiesAtLength(e),"getPropertiesAtLength"));k(this,"getParts",_(()=>this.inst.getParts(),"getParts"));if(this.inst=new pn(e),!(this instanceof Zt))return new Zt(e)}},_(St,"_svgPathProperties"),St);function Ee(n=K.BLACK){return{...n,alpha:0}}function yn(n=null){const{path:e,height:t=100,width:o=100,viewboxHeight:i,viewboxWidth:a,...s}=n??{},r=e??"M 0 0 L 100 100",c=new Zt(r).getTotalLength();return et({objectType:j.PATH,anchor:it,strokeColor:tt,drawn:1,fillColor:Ee(),isRounded:!1,height:t,path:r,pathLength:c,strokeWidth:4,viewboxHeight:i??t,viewboxWidth:a??o,width:o,x:0,y:0,...s})}function xn(n=null){return et({objectType:j.POLYGON,strokeColor:tt,strokeWidth:0,drawn:1,points:[{x:0,y:0},{x:100,y:0},{x:100,y:100}],fillColor:tt,...n})}function vn(n=null){return et({objectType:j.RECTANGLE,anchor:it,strokeColor:tt,strokeWidth:0,drawn:1,fillColor:tt,height:100,cornerRadius:0,width:100,x:0,y:0,...n})}function wn(n=null){return et({objectType:j.SPOTLIGHT,anchor:it,color:K(0,0,0,.8),height:200,cornerRadius:50,width:200,x:0,y:0,...n})}function mn(n=null){return et({objectType:j.SVG,anchor:it,height:100,svg:"",width:100,x:0,y:0,...n})}const Ie={NORMAL:"normal",ITALIC:"italic",OBLIQUE:"oblique"},bn=Ie.NORMAL,ke={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900},An=ke.NORMAL,Tn={color:tt,fontFamily:"sans-serif",fontSize:100,fontStyle:bn,fontWeight:An,ligatures:!1,subscript:!1,superscript:!1};function Oe(n){return typeof n=="string"?[[{text:n}]]:n.map(e=>e.map(t=>typeof t=="string"?{text:t}:t))}function _e(n){return Oe(n).reduce((t,o)=>t+o.reduce((i,a)=>i+a.text.length,0),0)}function Ne(n="",e=null){return et({objectType:j.TEXT,alignment:j0,anchor:it,length:null,lineSpacing:1,text:n,x:0,y:0,...Tn,...e})}Ne.writeOn=(n,e={})=>Bt(n,{length:_e(n.text)},e);const Jt="presenter.navigator.state",vt={open:!1,visibility:{slides:!0,current:!0,next:!0,notes:!1}};function Qt(){return typeof document>"u"?!1:Array.from(document.scripts).some(n=>n.src.includes("/@vite/client"))}function Ln(){return Qt()?te().open:!1}function Mn(){Re({...te(),open:!0})}function Fe(){var n;(n=ee())==null||n.removeItem(Jt)}function te(){var n,e,t,o,i;if(!Qt())return vt;try{const a=(n=ee())==null?void 0:n.getItem(Jt);if(a==null)return vt;const s=JSON.parse(a);return{open:typeof s.open=="boolean"?s.open:vt.open,visibility:{slides:typeof((e=s.visibility)==null?void 0:e.slides)=="boolean"?s.visibility.slides:vt.visibility.slides,current:typeof((t=s.visibility)==null?void 0:t.current)=="boolean"?s.visibility.current:vt.visibility.current,next:typeof((o=s.visibility)==null?void 0:o.next)=="boolean"?s.visibility.next:vt.visibility.next,notes:typeof((i=s.visibility)==null?void 0:i.notes)=="boolean"?s.visibility.notes:vt.visibility.notes}}}catch{return vt}}function Re(n){var e;Qt()&&((e=ee())==null||e.setItem(Jt,JSON.stringify(n)))}function ee(){try{return window.sessionStorage}catch{return null}}function Be(n=null){return{objects:[],animations:[],extras:[],isAllKey:!1,isEndKey:!0,isStartKey:!1,notes:null,shortcut:null,title:"",...n}}function De(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}function qe(n){var o,i;if(n===null)return!1;const e=n,t=(o=e.tagName)==null?void 0:o.toLowerCase();return t==="input"||t==="textarea"||t==="select"||t==="button"||e.isContentEditable?!0:(((i=e.closest)==null?void 0:i.call(e,"[contenteditable=''], [contenteditable='true']"))??null)!==null}function Cn(n){var o;const{slides:e}=n,t={s:{slideIndex:0,buildIndex:0},c:{slideIndex:null,buildIndex:0},e:{slideIndex:e.length-1,buildIndex:((o=e[e.length-1])==null?void 0:o.animations.length)??0}};for(let i=0;i<e.length;i++){const a=e[i];if(a===void 0)continue;const s=a.shortcut;ne(t,s,i,0);for(let r=0;r<a.animations.length;r++){const l=a.animations[r];if(l!==void 0)if(Array.isArray(l))for(const c of l)ne(t,c.shortcut,i,r+1);else ne(t,l.shortcut,i,r+1)}}return t}function ne(n,e,t,o){if(e!==null)if(Array.isArray(e))for(const i of e)n[i]={slideIndex:t,buildIndex:o};else n[e]={slideIndex:t,buildIndex:o}}function ze(n,e){const t=n[e];return t!==void 0?t:isNaN(Number(e))?null:{slideIndex:Number(e)-1,buildIndex:0}}function Ve(n,e,t,{onNext:o,onPrevious:i,onRenderSlide:a,onShowNavigator:s},{focusOnPointerDown:r=!1,keyEventTarget:l=e,signal:c}={}){t.shortcuts=Cn(n);const u=c===void 0?void 0:{signal:c};r&&(e.hasAttribute("tabindex")||(e.tabIndex=-1),e.addEventListener("pointerdown",g=>{qe(g.target)||e.focus({preventScroll:!0})},u)),e.addEventListener("mousemove",()=>{e.style.cursor="auto"},u),l.addEventListener("keyup",g=>{const h=g;if(qe(h.target))return;if(h.code==="Escape"){t.textCommand=null;return}if(h.code==="ArrowRight"||h.code==="Space"){o(h.shiftKey);return}if(h.code==="ArrowLeft"){i(h.shiftKey);return}const f=Sn(h);if(f!==null){const v=ze(t.shortcuts,f);t.textCommand=null,v!==null&&(h.preventDefault(),a(v.slideIndex,v.buildIndex));return}if(t.textCommand!==null){if(h.code==="Enter"){const v=t.textCommand;t.textCommand=null;const x=ze(t.shortcuts,v);x!==null&&a(x.slideIndex,x.buildIndex);return}else h.code==="Backspace"?t.textCommand=t.textCommand.slice(0,-1):t.textCommand+=h.key;return}if(h.key==="g"){t.textCommand="";return}if(h.key==="`"&&!De(h)){s();return}},u)}function Sn(n){return!n.altKey||n.ctrlKey||n.metaKey||n.shiftKey?null:n.code.startsWith("Key")&&n.code.length===4?n.code.slice(3).toLowerCase():n.code.startsWith("Digit")&&n.code.length===6?n.code.slice(5):n.code.startsWith("Numpad")&&n.code.length===7?n.code.slice(6):null}function Pn(n,e){for(let t=Math.min(e,n.animations.length);t>=0;t--){const o=En(n,t);if(o!==null)return o}return null}function En(n,e){if(e===0)return n.notes;const t=n.animations[e-1];return t===void 0?null:In(t)}function In(n){if(!Array.isArray(n))return n.notes;const e=n.map(({notes:t})=>t).filter(t=>t!==null);return e.length>0?e.join(`
1
+ (function(E,X){typeof exports=="object"&&typeof module<"u"?X(exports):typeof define=="function"&&define.amd?define(["exports"],X):(E=typeof globalThis<"u"?globalThis:E||self,X(E.Presenter={}))})(this,(function(E){"use strict";var Zi=Object.defineProperty;var Ji=(E,X,At)=>X in E?Zi(E,X,{enumerable:!0,configurable:!0,writable:!0,value:At}):E[X]=At;var O=(E,X,At)=>Ji(E,typeof X!="symbol"?X+"":X,At);var Tt,Lt,Mt,Ct,St;const X={ANIMATE:"Animate",PAUSE:"Pause",UPDATE:"Update"};function At(n){return n*n*n}function N0(n){return--n*n*n+1}function F0(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var $t=1.70158;(function n(e){e=+e;function t(o){return(o=+o)*o*(e*(o-1)+o)}return t.overshoot=n,t})($t),(function n(e){e=+e;function t(o){return--o*o*((o+1)*e+o)+1}return t.overshoot=n,t})($t);var R0=(function n(e){e=+e;function t(o){return((o*=2)<1?o*o*((e+1)*o-e):(o-=2)*o*((e+1)*o+e)+2)/2}return t.overshoot=n,t})($t);const Rt={LINEAR:n=>n,CUBIC:F0,CUBIC_IN:At,CUBIC_OUT:N0,BACK_IN_OUT:R0.overshoot(.8)},B0=Rt.LINEAR;function Bt(n,e,t={}){return{type:X.ANIMATE,object:n,props:e,delay:0,duration:1e3,easing:B0,block:!1,interpolators:null,isKey:!1,notes:null,shortcut:null,...typeof t=="number"?{duration:t}:t}}function D0(n,e={}){return Bt(n,{opacity:1},{duration:500,easing:Rt.CUBIC,...typeof e=="number"?{duration:e}:e})}function q0(n,e={}){return Bt(n,{opacity:0},{duration:500,easing:Rt.CUBIC,...typeof e=="number"?{duration:e}:e})}function Wt(n,e,t={}){return{type:X.UPDATE,isKey:!1,notes:null,object:n,props:e,shortcut:null,...t}}function z0(n,e={}){return Wt(n,{opacity:0},e)}function j0(n,e={}){return Wt(n,{opacity:1},e)}const nt={TOP_LEFT:"TopLeft",TOP:"Top",TOP_RIGHT:"TopRight",LEFT:"Left",CENTER:"Center",RIGHT:"Right",BOTTOM_LEFT:"BottomLeft",BOTTOM:"Bottom",BOTTOM_RIGHT:"BottomRight"},it=nt.TOP_LEFT;function K(n,e=0,t=0,o=1){if(typeof n=="string"){const i=n.replace("#",""),a=parseInt(i,16);return isNaN(a)?(console.warn("Invalid hex color format:",n),tt):i.length===6?{red:a>>16&255,green:a>>8&255,blue:a&255,alpha:1}:i.length===8?{red:a>>24&255,green:a>>16&255,blue:a>>8&255,alpha:(a&255)/255}:(console.warn("Invalid hex color format:",n),tt)}else if(typeof n=="number")return{red:n,green:e??0,blue:t??0,alpha:o??1};return{red:0,green:0,blue:0,alpha:1,...n}}K.BLACK=K(0,0,0),K.BLUE=K(0,0,255),K.GREEN=K(0,255,0),K.RED=K(255,0,0),K.TRANSPARENT=K(0,0,0,0),K.WHITE=K(255,255,255);const tt={red:0,green:0,blue:0,alpha:1};function Yt(n=null){return{content:null,setup:null,anchor:nt.TOP_LEFT,height:0,width:0,x:0,y:0,...n}}function Le(n,e=null){return n.alpha*(e??1)}function Pt(n,e=null){const{red:t,green:o,blue:i}=n,a=t<<16|o<<8|i,s=Math.round(Le(n,e)*255);return`#${a.toString(16).padStart(6,"0")}${s!==255?s.toString(16).padStart(2,"0"):""}`}function V0(n=null){const{url:e="https://wikipedia.org/",backgroundColor:t=K.TRANSPARENT,strokeColor:o=tt,strokeWidth:i=0,pointerEvents:a="auto",scale:s=1,anchor:r=it,height:l=1e3,width:c=1e3,x:u=0,y:g=0}=n||{},h=document.createElement("iframe");h.src=e,h.style.backgroundColor=Pt(t),h.style.border=i>0?`${i}px solid ${Pt(o)}`:"none",h.style.pointerEvents=a;const f=(100/s).toFixed(3)+"%";return h.style.height=i===0?f:`calc(${f} - ${i*2}px)`,h.style.width=i===0?f:`calc(${f} - ${i*2}px)`,h.style.transform=`scale(${s})`,h.style.transformOrigin="top left",Yt({content:h,anchor:r,height:l,width:c,x:u,y:g})}const gt={LEFT:"left",CENTER:"center",RIGHT:"right"},H0=gt.LEFT;function st(n,e){throw new Error("Unexpected value: "+n)}function U0(n=null){const{alignment:e=gt.LEFT,scale:t=1,anchor:o=it,height:i=1e3,width:a=1e3,x:s=0,y:r=0}=n||{};function l(c){const u=document.createElement("video");switch(u.autoplay=!0,u.style.transform=`scale(${t})`,e){case gt.LEFT:u.style.transformOrigin="top left";break;case gt.CENTER:u.style.transformOrigin="top center";break;case gt.RIGHT:u.style.transformOrigin="top right";break;default:st(e)}c.appendChild(u);const g={video:{displaySurface:"window"},audio:!1};return navigator.mediaDevices.getDisplayMedia(g).then(h=>{const f=h.getVideoTracks()[0];f!==void 0&&(f.onended=function(){u.style.display="none"}),u.srcObject=h,u.play()}).catch(h=>{console.error("Could not start screen capture -",h)}),()=>{u.srcObject.getTracks().forEach(f=>f.stop()),u.style.display="none",u.srcObject=null}}return Yt({content:null,setup:l,anchor:o,height:i,width:a,x:s,y:r})}const V={ARROW:"Arrow",CIRCLE:"Circle",GROUP:"Group",IMAGE:"Image",LINE:"Line",MASK:"Mask",PATH:"Path",POLYGON:"Polygon",RECTANGLE:"Rectangle",SLIDE_OBJECT:"SlideObject",SPOTLIGHT:"Spotlight",SVG:"SVG",TEXT:"Text"};function et(n){return{description:null,objectType:V.SLIDE_OBJECT,opacity:1,...n}}function $0(n=null){const{arrowheadSize:e,width:t=10,...o}=n||{},i=e??t*4;return et({objectType:V.ARROW,arrowheadSize:i,color:tt,drawn:1,endX:100,endY:100,isArrowheadDoubled:!1,isArrowheadFilled:!1,isDrawnFromCenter:!1,startX:0,startY:0,width:t,...o})}const W0=50;function Y0(n=null){return et({objectType:V.CIRCLE,anchor:it,strokeColor:tt,strokeWidth:0,drawn:1,fillColor:tt,radius:W0,x:0,y:0,...n})}function Gt(n,e=null){return et({objectType:V.GROUP,anchor:it,height:0,objects:n,previewColor:null,rotateOriginPreviewSize:0,rotateOriginX:0,rotateOriginY:0,rotation:0,skewOriginPreviewSize:0,skewOriginX:0,skewOriginY:0,skewX:0,skewY:0,scale:1,scaleX:1,scaleY:1,width:0,x:0,y:0,...e})}function G0(n){const{anchor:e=it,cols:t=1,rows:o=1,gapX:i=0,gapY:a=0,groupProps:s={},width:r=0,height:l=0,x:c=0,y:u=0,objects:g=()=>null}=n,h=[],f=[];let v=0,x=0;for(let C=0;C<o;C++){const M=[];v=0;let L=0;for(let I=0;I<t;I++){const S=g(C,I),k=typeof r=="function"?r(C,I):r,B=typeof l=="function"?l(C,I):l;M.push(S),S!=null&&f.push(Gt([S],{x:v,y:x})),v+=k+i,L=Math.max(L,B)}h.push(M),x+=L+a}return{grid:Gt(f,{x:c,y:u,height:x-a,width:v-i,anchor:e,...s}),objects:h}}function X0(n=null){return et({objectType:V.IMAGE,anchor:it,cornerRadius:0,height:100,imageId:"",smooth:!0,width:100,x:0,y:0,...n})}function K0(n=null){return et({objectType:V.LINE,color:tt,drawn:1,endX:100,endY:100,isDrawnFromCenter:!1,isRounded:!1,startX:0,startY:0,width:10,...n})}function Z0(n,e=null){return et({objectType:V.MASK,anchor:it,height:100,objects:n,preview:!1,width:100,x:0,y:0,...e})}var J0=Object.defineProperty,_=(n,e)=>J0(n,"name",{value:e,configurable:!0}),Et={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Q0=/([astvzqmhlc])([^astvzqmhlc]*)/gi,tn=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,en=_(n=>{const e=(n&&n.length>0?n:"M0,0").match(Q0);if(!e)throw new Error(`No path elements found in string ${n}`);return e.reduce((t,o)=>{let i=o.charAt(0),a=i.toLowerCase(),s=nn(o.substring(1));if(a==="m"&&s.length>2&&(t.push([i,...s.splice(0,2)]),a="l",i=i==="m"?"l":"L"),a.toLowerCase()==="a"&&(s.length===5||s.length===6)){const r=o.substring(1).trim().split(" ");s=[Number(r[0]),Number(r[1]),Number(r[2]),Number(r[3].charAt(0)),Number(r[3].charAt(1)),Number(r[3].substring(2)),Number(r[4])]}for(;s.length>=0;){if(s.length===Et[a]){t.push([i,...s.splice(0,Et[a])]);break}if(s.length<Et[a])throw new Error(`Malformed path data: "${i}" must have ${Et[a]} elements and has ${s.length}: ${o}`);t.push([i,...s.splice(0,Et[a])])}return t},[])},"default"),nn=_(n=>{const e=n.match(tn);return e?e.map(Number):[]},"parseValues"),rt=(Tt=class{constructor(e,t,o,i){O(this,"x0");O(this,"x1");O(this,"y0");O(this,"y1");O(this,"getTotalLength",_(()=>Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),"getTotalLength"));O(this,"getPointAtLength",_(e=>{let t=e/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2));t=Number.isNaN(t)?1:t;const o=(this.x1-this.x0)*t,i=(this.y1-this.y0)*t;return{x:this.x0+o,y:this.y0+i}},"getPointAtLength"));O(this,"getTangentAtLength",_(e=>{const t=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/t,y:(this.y1-this.y0)/t}},"getTangentAtLength"));O(this,"getPropertiesAtLength",_(e=>{const t=this.getPointAtLength(e),o=this.getTangentAtLength(e);return{x:t.x,y:t.y,tangentX:o.x,tangentY:o.y}},"getPropertiesAtLength"));this.x0=e,this.x1=t,this.y0=o,this.y1=i}},_(Tt,"LinearPosition"),Tt),Me=(Lt=class{constructor(e,t,o,i,a,s,r,l,c){O(this,"x0");O(this,"y0");O(this,"rx");O(this,"ry");O(this,"xAxisRotate");O(this,"LargeArcFlag");O(this,"SweepFlag");O(this,"x1");O(this,"y1");O(this,"length");O(this,"getTotalLength",_(()=>this.length,"getTotalLength"));O(this,"getPointAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=Ce({x:this.x0,y:this.y0},this.rx,this.ry,this.xAxisRotate,this.LargeArcFlag,this.SweepFlag,{x:this.x1,y:this.y1},e/this.length);return{x:t.x,y:t.y}},"getPointAtLength"));O(this,"getTangentAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);const t=.05,o=this.getPointAtLength(e);let i;e<0?e=0:e>this.length&&(e=this.length),i=e<this.length-t?this.getPointAtLength(e+t):this.getPointAtLength(e-t);const a=i.x-o.x,s=i.y-o.y,r=Math.sqrt(a*a+s*s);return e<this.length-t?{x:-a/r,y:-s/r}:{x:a/r,y:s/r}},"getTangentAtLength"));O(this,"getPropertiesAtLength",_(e=>{const t=this.getTangentAtLength(e),o=this.getPointAtLength(e);return{x:o.x,y:o.y,tangentX:t.x,tangentY:t.y}},"getPropertiesAtLength"));this.x0=e,this.y0=t,this.rx=o,this.ry=i,this.xAxisRotate=a,this.LargeArcFlag=s,this.SweepFlag=r,this.x1=l,this.y1=c;const u=rn(300,function(g){return Ce({x:e,y:t},o,i,a,s,r,{x:l,y:c},g)});this.length=u.arcLength}},_(Lt,"Arc"),Lt),Ce=_((n,e,t,o,i,a,s,r)=>{e=Math.abs(e),t=Math.abs(t),o=on(o,360);const l=sn(o);if(n.x===s.x&&n.y===s.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};const c=(n.x-s.x)/2,u=(n.y-s.y)/2,g={x:Math.cos(l)*c+Math.sin(l)*u,y:-Math.sin(l)*c+Math.cos(l)*u},h=Math.pow(g.x,2)/Math.pow(e,2)+Math.pow(g.y,2)/Math.pow(t,2);h>1&&(e=Math.sqrt(h)*e,t=Math.sqrt(h)*t);let f=(Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(g.y,2)-Math.pow(t,2)*Math.pow(g.x,2))/(Math.pow(e,2)*Math.pow(g.y,2)+Math.pow(t,2)*Math.pow(g.x,2));f=f<0?0:f;const v=(i!==a?1:-1)*Math.sqrt(f),x=v*(e*g.y/t),T=v*(-t*g.x/e),C={x:Math.cos(l)*x-Math.sin(l)*T+(n.x+s.x)/2,y:Math.sin(l)*x+Math.cos(l)*T+(n.y+s.y)/2},M={x:(g.x-x)/e,y:(g.y-T)/t},L=Pe({x:1,y:0},M);let I=Pe(M,{x:(-g.x-x)/e,y:(-g.y-T)/t});!a&&I>0?I-=2*Math.PI:a&&I<0&&(I+=2*Math.PI),I%=2*Math.PI;const S=L+I*r,k=e*Math.cos(S),B=t*Math.sin(S);return{x:Math.cos(l)*k-Math.sin(l)*B+C.x,y:Math.sin(l)*k+Math.cos(l)*B+C.y,ellipticalArcStartAngle:L,ellipticalArcEndAngle:L+I,ellipticalArcAngle:S,ellipticalArcCenter:C,resultantRx:e,resultantRy:t}},"pointOnEllipticalArc"),rn=_((n,e)=>{n=n??500;let t=0;const o=[],i=[];let a,s=e(0);for(let r=0;r<n;r++){const l=an(r*(1/n),0,1);a=e(l),t+=Se(s,a),i.push([s,a]),o.push({t:l,arcLength:t}),s=a}return a=e(1),i.push([s,a]),t+=Se(s,a),o.push({t:1,arcLength:t}),{arcLength:t,arcLengthMap:o,approximationLines:i}},"approximateArcLengthOfCurve"),on=_((n,e)=>(n%e+e)%e,"mod"),sn=_(n=>n*(Math.PI/180),"toRadians"),Se=_((n,e)=>Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),"distance"),an=_((n,e,t)=>Math.min(Math.max(n,e),t),"clamp"),Pe=_((n,e)=>{const t=n.x*e.x+n.y*e.y,o=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(n.x*e.y-n.y*e.x<0?-1:1)*Math.acos(t/o)},"angleBetween"),ln=[[],[],[-.5773502691896257,.5773502691896258],[0,-.7745966692414833,.7745966692414833],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],hn=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],cn=[[1],[1,1],[1,2,1],[1,3,3,1]],un=_((n,e,t)=>({x:(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],y:(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3]}),"cubicPoint"),fn=_((n,e,t)=>Ee([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t),"cubicDerivative"),dn=_((n,e,t)=>{let o,i;const a=t/2;o=0;for(let s=0;s<20;s++)i=a*ln[20][s]+a,o+=hn[20][s]*Ie(n,e,i);return a*o},"getCubicArcLength"),Ee=_((n,e,t)=>({x:(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],y:(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2]}),"quadraticPoint"),gn=_((n,e,t)=>{t===void 0&&(t=1);const o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),l=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));const u=l/(2*r),g=t+u,h=c/r-u*u,f=g*g+h>0?Math.sqrt(g*g+h):0,v=u*u+h>0?Math.sqrt(u*u+h):0,x=u+Math.sqrt(u*u+h)!==0&&(g+f)/(u+v)!==0?h*Math.log(Math.abs((g+f)/(u+v))):0;return Math.sqrt(r)/2*(g*f-u*v+x)},"getQuadraticArcLength"),pn=_((n,e,t)=>({x:2*(1-t)*(n[1]-n[0])+2*t*(n[2]-n[1]),y:2*(1-t)*(e[1]-e[0])+2*t*(e[2]-e[1])}),"quadraticDerivative");function Ie(n,e,t){const o=Xt(1,t,n),i=Xt(1,t,e),a=o*o+i*i;return Math.sqrt(a)}_(Ie,"BFunc");var Xt=_((n,e,t)=>{const o=t.length-1;let i,a;if(o===0)return 0;if(n===0){a=0;for(let s=0;s<=o;s++)a+=cn[o][s]*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}i=new Array(o);for(let s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return Xt(n-1,e,i)},"getDerivative"),Kt=_((n,e,t)=>{let o=1,i=n/e,a=(n-t(i))/e,s=0;for(;o>.001;){const r=t(i+a),l=Math.abs(n-r)/e;if(l<o)o=l,i+=a;else{const c=t(i-a),u=Math.abs(n-c)/e;u<o?(o=u,i-=a):a/=2}if(s++,s>500)break}return i},"t2length"),ct=(Mt=class{constructor(e,t,o,i,a,s,r,l){O(this,"a");O(this,"b");O(this,"c");O(this,"d");O(this,"length");O(this,"getArcLength");O(this,"getPoint");O(this,"getDerivative");O(this,"getTotalLength",_(()=>this.length,"getTotalLength"));O(this,"getPointAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Kt(e,this.length,a=>this.getArcLength(t,o,a));return this.getPoint(t,o,i)},"getPointAtLength"));O(this,"getTangentAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Kt(e,this.length,l=>this.getArcLength(t,o,l)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;return r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0},r},"getTangentAtLength"));O(this,"getPropertiesAtLength",_(e=>{const t=[this.a.x,this.b.x,this.c.x,this.d.x],o=[this.a.y,this.b.y,this.c.y,this.d.y],i=Kt(e,this.length,c=>this.getArcLength(t,o,c)),a=this.getDerivative(t,o,i),s=Math.sqrt(a.x*a.x+a.y*a.y);let r;r=s>0?{x:a.x/s,y:a.y/s}:{x:0,y:0};const l=this.getPoint(t,o,i);return{x:l.x,y:l.y,tangentX:r.x,tangentY:r.y}},"getPropertiesAtLength"));O(this,"getC",_(()=>this.c,"getC"));O(this,"getD",_(()=>this.d,"getD"));this.a={x:e,y:t},this.b={x:o,y:i},this.c={x:a,y:s},r!==void 0&&l!==void 0?(this.getArcLength=dn,this.getPoint=un,this.getDerivative=fn,this.d={x:r,y:l}):(this.getArcLength=gn,this.getPoint=Ee,this.getDerivative=pn,this.d={x:0,y:0}),this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],1)}},_(Mt,"Bezier"),Mt),yn=(Ct=class{constructor(e){O(this,"length",0);O(this,"partial_lengths",[]);O(this,"functions",[]);O(this,"initial_point",null);O(this,"getPartAtLength",_(e=>{e<0?e=0:e>this.length&&(e=this.length);let t=this.partial_lengths.length-1;for(;this.partial_lengths[t]>=e&&t>0;)t--;return t++,{fraction:e-this.partial_lengths[t-1],i:t}},"getPartAtLength"));O(this,"getTotalLength",_(()=>this.length,"getTotalLength"));O(this,"getPointAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPointAtLength(t.fraction);if(this.initial_point)return this.initial_point;throw new Error("Wrong function at this part.")},"getPointAtLength"));O(this,"getTangentAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getTangentAtLength(t.fraction);if(this.initial_point)return{x:0,y:0};throw new Error("Wrong function at this part.")},"getTangentAtLength"));O(this,"getPropertiesAtLength",_(e=>{const t=this.getPartAtLength(e),o=this.functions[t.i];if(o)return o.getPropertiesAtLength(t.fraction);if(this.initial_point)return{x:this.initial_point.x,y:this.initial_point.y,tangentX:0,tangentY:0};throw new Error("Wrong function at this part.")},"getPropertiesAtLength"));O(this,"getParts",_(()=>{const e=[];for(let t=0;t<this.functions.length;t++)if(this.functions[t]!==null){this.functions[t]=this.functions[t];const o={start:this.functions[t].getPointAtLength(0),end:this.functions[t].getPointAtLength(this.partial_lengths[t]-this.partial_lengths[t-1]),length:this.partial_lengths[t]-this.partial_lengths[t-1],getPointAtLength:this.functions[t].getPointAtLength,getTangentAtLength:this.functions[t].getTangentAtLength,getPropertiesAtLength:this.functions[t].getPropertiesAtLength};e.push(o)}return e},"getParts"));const t=Array.isArray(e)?e:en(e);let o,i=[0,0],a=[0,0],s=[0,0];for(let r=0;r<t.length;r++){if(t[r][0]==="M")i=[t[r][1],t[r][2]],s=[i[0],i[1]],this.functions.push(null),r===0&&(this.initial_point={x:t[r][1],y:t[r][2]});else if(t[r][0]==="m")i=[t[r][1]+i[0],t[r][2]+i[1]],s=[i[0],i[1]],this.functions.push(null);else if(t[r][0]==="L")this.length+=Math.sqrt(Math.pow(i[0]-t[r][1],2)+Math.pow(i[1]-t[r][2],2)),this.functions.push(new rt(i[0],t[r][1],i[1],t[r][2])),i=[t[r][1],t[r][2]];else if(t[r][0]==="l")this.length+=Math.sqrt(Math.pow(t[r][1],2)+Math.pow(t[r][2],2)),this.functions.push(new rt(i[0],t[r][1]+i[0],i[1],t[r][2]+i[1])),i=[t[r][1]+i[0],t[r][2]+i[1]];else if(t[r][0]==="H")this.length+=Math.abs(i[0]-t[r][1]),this.functions.push(new rt(i[0],t[r][1],i[1],i[1])),i[0]=t[r][1];else if(t[r][0]==="h")this.length+=Math.abs(t[r][1]),this.functions.push(new rt(i[0],i[0]+t[r][1],i[1],i[1])),i[0]=t[r][1]+i[0];else if(t[r][0]==="V")this.length+=Math.abs(i[1]-t[r][1]),this.functions.push(new rt(i[0],i[0],i[1],t[r][1])),i[1]=t[r][1];else if(t[r][0]==="v")this.length+=Math.abs(t[r][1]),this.functions.push(new rt(i[0],i[0],i[1],i[1]+t[r][1])),i[1]=t[r][1]+i[1];else if(t[r][0]==="z"||t[r][0]==="Z")this.length+=Math.sqrt(Math.pow(s[0]-i[0],2)+Math.pow(s[1]-i[1],2)),this.functions.push(new rt(i[0],s[0],i[1],s[1])),i=[s[0],s[1]];else if(t[r][0]==="C")o=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],t[r][5],t[r][6]),this.length+=o.getTotalLength(),i=[t[r][5],t[r][6]],this.functions.push(o);else if(t[r][0]==="c")o=new ct(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],i[0]+t[r][5],i[1]+t[r][6]),o.getTotalLength()>0?(this.length+=o.getTotalLength(),this.functions.push(o),i=[t[r][5]+i[0],t[r][6]+i[1]]):this.functions.push(new rt(i[0],i[0],i[1],i[1]));else if(t[r][0]==="S"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const l=o.getC();o=new ct(i[0],i[1],2*i[0]-l.x,2*i[1]-l.y,t[r][1],t[r][2],t[r][3],t[r][4])}}else o=new ct(i[0],i[1],i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3],t[r][4]],this.functions.push(o))}else if(t[r][0]==="s"){if(r>0&&["C","c","S","s"].indexOf(t[r-1][0])>-1){if(o){const l=o.getC(),c=o.getD();o=new ct(i[0],i[1],i[0]+c.x-l.x,i[1]+c.y-l.y,i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4])}}else o=new ct(i[0],i[1],i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4]);o&&(this.length+=o.getTotalLength(),i=[t[r][3]+i[0],t[r][4]+i[1]],this.functions.push(o))}else if(t[r][0]==="Q"){if(i[0]===t[r][1]&&i[1]===t[r][2]){const l=new rt(t[r][1],t[r][3],t[r][2],t[r][4]);this.length+=l.getTotalLength(),this.functions.push(l)}else o=new ct(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);i=[t[r][3],t[r][4]],a=[t[r][1],t[r][2]]}else if(t[r][0]==="q"){if(t[r][1]!==0||t[r][2]!==0)o=new ct(i[0],i[1],i[0]+t[r][1],i[1]+t[r][2],i[0]+t[r][3],i[1]+t[r][4],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const l=new rt(i[0]+t[r][1],i[0]+t[r][3],i[1]+t[r][2],i[1]+t[r][4]);this.length+=l.getTotalLength(),this.functions.push(l)}a=[i[0]+t[r][1],i[1]+t[r][2]],i=[t[r][3]+i[0],t[r][4]+i[1]]}else if(t[r][0]==="T"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new ct(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],t[r][1],t[r][2],void 0,void 0),this.functions.push(o),this.length+=o.getTotalLength();else{const l=new rt(i[0],t[r][1],i[1],t[r][2]);this.functions.push(l),this.length+=l.getTotalLength()}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1],t[r][2]]}else if(t[r][0]==="t"){if(r>0&&["Q","q","T","t"].indexOf(t[r-1][0])>-1)o=new ct(i[0],i[1],2*i[0]-a[0],2*i[1]-a[1],i[0]+t[r][1],i[1]+t[r][2],void 0,void 0),this.length+=o.getTotalLength(),this.functions.push(o);else{const l=new rt(i[0],i[0]+t[r][1],i[1],i[1]+t[r][2]);this.length+=l.getTotalLength(),this.functions.push(l)}a=[2*i[0]-a[0],2*i[1]-a[1]],i=[t[r][1]+i[0],t[r][2]+i[1]]}else if(t[r][0]==="A"){const l=new Me(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,t[r][6],t[r][7]);this.length+=l.getTotalLength(),i=[t[r][6],t[r][7]],this.functions.push(l)}else if(t[r][0]==="a"){const l=new Me(i[0],i[1],t[r][1],t[r][2],t[r][3],t[r][4]===1,t[r][5]===1,i[0]+t[r][6],i[1]+t[r][7]);this.length+=l.getTotalLength(),i=[i[0]+t[r][6],i[1]+t[r][7]],this.functions.push(l)}this.partial_lengths.push(this.length)}}},_(Ct,"SVGPathProperties"),Ct),Zt=(St=class{constructor(e){O(this,"inst");O(this,"getTotalLength",_(()=>this.inst.getTotalLength(),"getTotalLength"));O(this,"getPointAtLength",_(e=>this.inst.getPointAtLength(e),"getPointAtLength"));O(this,"getTangentAtLength",_(e=>this.inst.getTangentAtLength(e),"getTangentAtLength"));O(this,"getPropertiesAtLength",_(e=>this.inst.getPropertiesAtLength(e),"getPropertiesAtLength"));O(this,"getParts",_(()=>this.inst.getParts(),"getParts"));if(this.inst=new yn(e),!(this instanceof Zt))return new Zt(e)}},_(St,"_svgPathProperties"),St);function Oe(n=K.BLACK){return{...n,alpha:0}}function xn(n=null){const{path:e,height:t=100,width:o=100,viewboxHeight:i,viewboxWidth:a,...s}=n??{},r=e??"M 0 0 L 100 100",c=new Zt(r).getTotalLength();return et({objectType:V.PATH,anchor:it,strokeColor:tt,drawn:1,fillColor:Oe(),isRounded:!1,height:t,path:r,pathLength:c,strokeWidth:4,viewboxHeight:i??t,viewboxWidth:a??o,width:o,x:0,y:0,...s})}function vn(n=null){return et({objectType:V.POLYGON,strokeColor:tt,strokeWidth:0,drawn:1,points:[{x:0,y:0},{x:100,y:0},{x:100,y:100}],fillColor:tt,...n})}function wn(n=null){return et({objectType:V.RECTANGLE,anchor:it,strokeColor:tt,strokeWidth:0,drawn:1,fillColor:tt,height:100,cornerRadius:0,width:100,x:0,y:0,...n})}function mn(n=null){return et({objectType:V.SPOTLIGHT,anchor:it,color:K(0,0,0,.8),height:200,cornerRadius:50,width:200,x:0,y:0,...n})}function bn(n=null){return et({objectType:V.SVG,anchor:it,height:100,svg:"",width:100,x:0,y:0,...n})}const ke={NORMAL:"normal",ITALIC:"italic",OBLIQUE:"oblique"},An=ke.NORMAL,_e={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900},Tn=_e.NORMAL,Ln={color:tt,fontFamily:"sans-serif",fontSize:100,fontStyle:An,fontWeight:Tn,ligatures:!1,subscript:!1,superscript:!1};function Jt(n){return typeof n=="string"?[[{text:n}]]:n.map(e=>e.map(t=>typeof t=="string"?{text:t}:t))}function Ne(n){return Jt(n).reduce((t,o)=>t+o.reduce((i,a)=>i+a.text.length,0),0)}function Fe(n="",e=null){return et({objectType:V.TEXT,alignment:H0,anchor:it,length:null,lineSpacing:1,text:n,x:0,y:0,...Ln,...e})}Fe.writeOn=(n,e={})=>Bt(n,{length:Ne(n.text)},e);const Qt="presenter.navigator.state",vt={open:!1,visibility:{slides:!0,current:!0,next:!0,notes:!1}};function te(){return typeof document>"u"?!1:Array.from(document.scripts).some(n=>n.src.includes("/@vite/client"))}function Mn(){return te()?ee().open:!1}function Cn(){Be({...ee(),open:!0})}function Re(){var n;(n=ne())==null||n.removeItem(Qt)}function ee(){var n,e,t,o,i;if(!te())return vt;try{const a=(n=ne())==null?void 0:n.getItem(Qt);if(a==null)return vt;const s=JSON.parse(a);return{open:typeof s.open=="boolean"?s.open:vt.open,visibility:{slides:typeof((e=s.visibility)==null?void 0:e.slides)=="boolean"?s.visibility.slides:vt.visibility.slides,current:typeof((t=s.visibility)==null?void 0:t.current)=="boolean"?s.visibility.current:vt.visibility.current,next:typeof((o=s.visibility)==null?void 0:o.next)=="boolean"?s.visibility.next:vt.visibility.next,notes:typeof((i=s.visibility)==null?void 0:i.notes)=="boolean"?s.visibility.notes:vt.visibility.notes}}}catch{return vt}}function Be(n){var e;te()&&((e=ne())==null||e.setItem(Qt,JSON.stringify(n)))}function ne(){try{return window.sessionStorage}catch{return null}}function De(n=null){return{objects:[],animations:[],extras:[],description:null,isAllKey:!1,isEndKey:!0,isStartKey:!1,notes:null,shortcut:null,title:"",...n}}function qe(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}function ze(n){var o,i;if(n===null)return!1;const e=n,t=(o=e.tagName)==null?void 0:o.toLowerCase();return t==="input"||t==="textarea"||t==="select"||t==="button"||e.isContentEditable?!0:(((i=e.closest)==null?void 0:i.call(e,"[contenteditable=''], [contenteditable='true']"))??null)!==null}function Sn(n){var o;const{slides:e}=n,t={s:{slideIndex:0,buildIndex:0},c:{slideIndex:null,buildIndex:0},e:{slideIndex:e.length-1,buildIndex:((o=e[e.length-1])==null?void 0:o.animations.length)??0}};for(let i=0;i<e.length;i++){const a=e[i];if(a===void 0)continue;const s=a.shortcut;ie(t,s,i,0);for(let r=0;r<a.animations.length;r++){const l=a.animations[r];if(l!==void 0)if(Array.isArray(l))for(const c of l)ie(t,c.shortcut,i,r+1);else ie(t,l.shortcut,i,r+1)}}return t}function ie(n,e,t,o){if(e!==null)if(Array.isArray(e))for(const i of e)n[i]={slideIndex:t,buildIndex:o};else n[e]={slideIndex:t,buildIndex:o}}function je(n,e){const t=n[e];return t!==void 0?t:isNaN(Number(e))?null:{slideIndex:Number(e)-1,buildIndex:0}}function Ve(n,e,t,{onNext:o,onPrevious:i,onRenderSlide:a,onShowNavigator:s},{focusOnPointerDown:r=!1,keyEventTarget:l=e,signal:c}={}){t.shortcuts=Sn(n);const u=c===void 0?void 0:{signal:c};r&&(e.hasAttribute("tabindex")||(e.tabIndex=-1),e.addEventListener("pointerdown",g=>{ze(g.target)||e.focus({preventScroll:!0})},u)),e.addEventListener("mousemove",()=>{e.style.cursor="auto"},u),l.addEventListener("keyup",g=>{const h=g;if(ze(h.target))return;if(h.code==="Escape"){t.textCommand=null;return}if(h.code==="ArrowRight"||h.code==="Space"){o(h.shiftKey);return}if(h.code==="ArrowLeft"){i(h.shiftKey);return}const f=Pn(h);if(f!==null){const v=je(t.shortcuts,f);t.textCommand=null,v!==null&&(h.preventDefault(),a(v.slideIndex,v.buildIndex));return}if(t.textCommand!==null){if(h.code==="Enter"){const v=t.textCommand;t.textCommand=null;const x=je(t.shortcuts,v);x!==null&&a(x.slideIndex,x.buildIndex);return}else h.code==="Backspace"?t.textCommand=t.textCommand.slice(0,-1):t.textCommand+=h.key;return}if(h.key==="g"){t.textCommand="";return}if(h.key==="`"&&!qe(h)){s();return}},u)}function Pn(n){return!n.altKey||n.ctrlKey||n.metaKey||n.shiftKey?null:n.code.startsWith("Key")&&n.code.length===4?n.code.slice(3).toLowerCase():n.code.startsWith("Digit")&&n.code.length===6?n.code.slice(5):n.code.startsWith("Numpad")&&n.code.length===7?n.code.slice(6):null}function En(n,e){for(let t=Math.min(e,n.animations.length);t>=0;t--){const o=In(n,t);if(o!==null)return o}return null}function In(n,e){if(e===0)return n.notes;const t=n.animations[e-1];return t===void 0?null:On(t)}function On(n){if(!Array.isArray(n))return n.notes;const e=n.map(({notes:t})=>t).filter(t=>t!==null);return e.length>0?e.join(`
2
2
 
3
- `):null}let F=null,Dt=null,wt=null;const je="__presenterNavigatorInstanceId";let He={width:700,height:680,left:20,top:50};function kn({presentation:n,shortcutState:e,onNavigateToSlide:t,onRenderSlide:o,onNext:i,onPrevious:a,forceRefresh:s=!1}){if(F!==null&&!F.closed&&(zt(F),!s))return F.focus(),Dt;if((F===null||F.closed)&&(F=window.open("","Navigator",Rn())),F===null)return console.error("Failed to open navigator window."),null;wt==null||wt();const r=Bn(F),l=new AbortController;wt=()=>l.abort();const c=On(n,t,i,r.isActive);return Dt=c,Mn(),F.document.title=n.title,F.document.body.replaceChildren(c.element),Ve(n,c.element,e,{onNext:u=>{r.isActive()&&i(u)},onPrevious:u=>{r.isActive()&&a(u)},onRenderSlide:(u,g)=>{r.isActive()&&o(u,g)},onShowNavigator:()=>{r.isActive()&&ie()}},{keyEventTarget:F,signal:l.signal}),F.addEventListener("resize",()=>zt(F),{signal:l.signal}),F.addEventListener("beforeunload",()=>{zt(F),Fe()},{signal:l.signal}),F.addEventListener("keyup",u=>{r.isActive()&&(u.key==="Escape"||u.key==="`"&&!De(u))&&ie()},{signal:l.signal}),Dt}function On(n,e,t,o=()=>!0){const i=(F==null?void 0:F.document)??document,a=i.createElement("div");a.style.boxSizing="border-box",a.style.display="grid",a.style.gridTemplateColumns="260px 1fr",a.style.gap="18px",a.style.height="100vh",a.style.overflow="hidden",a.style.padding="18px",a.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',a.style.backgroundColor="#f5f6f8",a.style.color="#1f2937",i.body.style.margin="0",i.body.style.overflow="hidden";const s=i.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="8px",s.style.minHeight="0",s.style.overflowY="auto",s.style.paddingRight="4px";const r=i.createElement("div");r.style.display="flex",r.style.flexDirection="column",r.style.gap="14px",r.style.minHeight="0",r.style.minWidth="0",r.style.overflow="hidden";const l=i.createElement("div");l.style.display="flex",l.style.gap="14px",l.style.alignItems="center",l.style.flexWrap="wrap",l.style.fontSize="13px",l.style.color="#4b5563";const c=i.createElement("div");c.style.display="flex",c.style.gap="14px",c.style.flex="1 1 auto",c.style.minHeight="0",c.style.minWidth="0",c.style.overflow="hidden";const u=Ue("Current",n),g=Ue("Next",n),h=_n(),f=te();g.container.style.cursor="pointer",g.container.addEventListener("click",()=>{o()&&t()});const v=n.slides.map((O,B)=>{const $=Nn(O,B);return $.style.cursor="pointer",$.addEventListener("click",D=>{o()&&(D.shiftKey&&ie(),e(B))}),s.appendChild($),$}),x=qt("Slides",s,f.visibility.slides),T=qt("Current",u.container,f.visibility.current),C=qt("Next",g.container,f.visibility.next),M=qt("Notes",h.container,f.visibility.notes),L=()=>{const O=T.input.checked&&C.input.checked&&S();a.style.gridTemplateColumns=x.input.checked?"260px 1fr":"1fr",c.style.flexDirection=O?"column":"row",u.container.style.flex="1 1 0",g.container.style.flex="1 1 0",requestAnimationFrame(()=>{u.resize(),g.resize()}),Re({...f,open:!0,visibility:{slides:x.input.checked,current:T.input.checked,next:C.input.checked,notes:M.input.checked}})};x.input.addEventListener("change",L),T.input.addEventListener("change",L),C.input.addEventListener("change",L),M.input.addEventListener("change",L),F==null||F.addEventListener("resize",L),l.appendChild(x.element),l.appendChild(T.element),l.appendChild(C.element),l.appendChild(M.element),c.appendChild(u.container),c.appendChild(g.container),r.appendChild(l),r.appendChild(c),r.appendChild(h.container),a.appendChild(s),a.appendChild(r);function I(O,B,$,D){o()&&(v.forEach((W,dt)=>{const ot=dt===O;W.style.backgroundColor=ot?"#dbeafe":"#ffffff",W.style.borderColor=ot?"#60a5fa":"#e5e7eb",W.style.color=ot?"#1e3a8a":"#1f2937"}),u.label.textContent=Ye(n,O,B),g.label.textContent=Ye(n,$,D),h.content.textContent=Pn(n.slides[O]??Be(),B)??"",Fn(v[O],s),L())}function S(){const O=F;if(O===null)return!1;const B=x.input.checked?278:0,$=O.innerWidth-36-B,D=O.innerHeight-36-l.offsetHeight-14;return $<=0||D<=0?!1:$/D<1.1}return{element:a,currentCanvas:u.canvas,nextCanvas:g.canvas,currentLabel:u.label,nextLabel:g.label,isOpen:()=>F!==null&&!F.closed,update:I}}function _n(){const n=(F==null?void 0:F.document)??document,e=n.createElement("div");e.style.display="flex",e.style.flex="0 1 180px",e.style.flexDirection="column",e.style.minHeight="100px",e.style.maxHeight="30vh",e.style.overflow="hidden",e.style.backgroundColor="#ffffff",e.style.border="1px solid #e5e7eb",e.style.borderRadius="6px",e.style.boxShadow="0 1px 2px rgba(15, 23, 42, 0.06)";const t=n.createElement("div");t.textContent="Notes",t.style.padding="10px 12px 6px",t.style.fontSize="12px",t.style.fontWeight="700",t.style.textTransform="uppercase",t.style.color="#6b7280";const o=n.createElement("div");return o.style.flex="1 1 auto",o.style.minHeight="0",o.style.overflowY="auto",o.style.padding="4px 12px 12px",o.style.fontSize="16px",o.style.lineHeight="1.5",o.style.whiteSpace="pre-wrap",e.appendChild(t),e.appendChild(o),{container:e,content:o}}function Nn(n,e){const t=(F==null?void 0:F.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.gap="10px",o.style.padding="8px 10px",o.style.backgroundColor="#ffffff",o.style.border="1px solid #e5e7eb",o.style.borderRadius="6px",o.style.boxShadow="0 1px 2px rgba(15, 23, 42, 0.06)",o.style.fontSize="14px",o.style.lineHeight="1",o.style.userSelect="none";const i=t.createElement("div");i.textContent=`${e+1}`,i.style.minWidth="24px",i.style.fontWeight="700",i.style.color="#6b7280";const a=t.createElement("div");return a.textContent=n.title.length>0?n.title:`Slide ${e+1}`,a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.style.whiteSpace="nowrap",o.appendChild(i),o.appendChild(a),o}function Ue(n,e){var u;const t=(F==null?void 0:F.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.flexDirection="column",o.style.minHeight="0",o.style.minWidth="0";const i=t.createElement("div");i.textContent=n,i.style.marginBottom="4px",i.style.fontSize="12px",i.style.fontWeight="700",i.style.textAlign="center",i.style.textTransform="uppercase",i.style.color="#6b7280";const a=t.createElement("div");a.style.marginBottom="6px",a.style.fontSize="14px",a.style.fontWeight="600",a.style.textAlign="center";const s=t.createElement("div");s.style.flex="1 1 auto",s.style.display="flex",s.style.alignItems="flex-start",s.style.justifyContent="center",s.style.minHeight="0",s.style.width="100%",s.style.overflow="hidden";const r=t.createElement("canvas");r.style.display="block",r.style.width="0",r.style.height="0";function l(){const g=s.clientWidth,h=s.clientHeight;if(g<=0||h<=0)return;const f=e.size.width/e.size.height,v=Math.min(g,h*f),x=v/f;r.style.width=`${v}px`,r.style.height=`${x}px`}const c=(u=t.defaultView)==null?void 0:u.ResizeObserver;return c!==void 0&&new c(l).observe(s),F==null||F.addEventListener("resize",l),s.appendChild(r),o.appendChild(i),o.appendChild(a),o.appendChild(s),{container:o,label:a,canvas:r,resize:l}}function qt(n,e,t){const o=(F==null?void 0:F.document)??document,i=e.style.display||"block",a=o.createElement("label");a.style.display="inline-flex",a.style.alignItems="center",a.style.gap="6px",a.style.userSelect="none";const s=o.createElement("input");return s.type="checkbox",s.checked=t,e.style.display=t?i:"none",s.addEventListener("change",()=>{e.style.display=s.checked?i:"none"}),a.appendChild(s),a.appendChild(o.createTextNode(n)),{element:a,input:s}}function Ye(n,e,t){if(e===null)return"End of presentation";const o=n.slides[e];return o===void 0?"No slide":`Slide ${e+1} of ${n.slides.length}, Build ${t+1} of ${o.animations.length+1}`}function Fn(n,e){if(n===void 0)return;const t=n.offsetTop,o=t+n.offsetHeight,i=e.scrollTop,a=i+e.clientHeight;(t<i||o>a)&&n.scrollIntoView({block:"nearest"})}function ie(){zt(F),Fe(),wt==null||wt(),F==null||F.close(),F=null,Dt=null,wt=null}function Rn(){const{width:n,height:e,left:t,top:o}=He;return`width=${n},height=${e},left=${t},top=${o}`}function zt(n){n===null||n.closed||(He={width:n.outerWidth,height:n.outerHeight,left:n.screenX,top:n.screenY})}function Bn(n){var o;const e=typeof((o=globalThis.crypto)==null?void 0:o.randomUUID)=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random()}`,t=n;return t[je]=e,{isActive:()=>!n.closed&&t[je]===e}}function Z(n=null){return{height:0,width:0,...n}}const Dn=Z({width:0,height:0});function $e(n=null){return{backgroundColor:K.WHITE,slides:[],title:"Presentation",size:Z({width:3840,height:2160}),resources:{images:{}},...n}}function qn(n){const e=Array.isArray(n)?n:[n];let t=0,o=0;for(const i of e)switch(i.type){case X.PAUSE:t+=i.duration;break;case X.ANIMATE:o=Math.max(o,t+i.delay+i.duration),i.block&&(t+=i.delay+i.duration);break;case X.UPDATE:break;default:st(i)}return o}function re(n,e=null){const{red:t,green:o,blue:i}=n,a=Ae(n,e);return`rgba(${t}, ${o}, ${i}, ${a})`}function We(n){return n===document.body}function zn(n,e){const t=document.createElement("div");if(t.style.width="100%",t.style.aspectRatio=`${n.size.width} / ${n.size.height}`,t.style.position="relative",We(e)){t.style.top="50%",t.style.transform="translateY(-50%)",t.style.marginLeft="auto",t.style.marginRight="auto",t.style.overflowY="clip",document.title=n.title,document.documentElement.style.height="100%",document.body.style.margin="0",document.body.style.height="100%",document.body.style.width="100%",document.body.style.backgroundColor="#000000";const o=n.size.height/n.size.width;Ge(t,o),window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change",()=>Ge(t,o))}return t}function Ge(n,e){window.innerHeight/window.innerWidth>e?(n.style.width="100%",n.style.height="auto"):(n.style.width="auto",n.style.height="100%")}const Xe={check:n=>typeof n=="object"&&n!==null&&typeof n.red=="number"&&typeof n.green=="number"&&typeof n.blue=="number"&&typeof n.alpha=="number",interpolate:(n,e,t)=>({red:Math.round(n.red+(e.red-n.red)*t),green:Math.round(n.green+(e.green-n.green)*t),blue:Math.round(n.blue+(e.blue-n.blue)*t),alpha:n.alpha+(e.alpha-n.alpha)*t})},Vn={check:n=>!0,interpolate:(n,e)=>e},Ke={check:n=>typeof n=="number",interpolate:(n,e,t)=>n+(e-n)*t},Ze=[Ke,Xe,Vn];function jn(n,e,t,o=null){if(t===0)return n;if(t===1)return{...n,...e};const i=o!=null?[...o,...Ze]:Ze,a={};for(const s in e){const r=n[s],l=e[s];for(const c of i)if(c.check(r,s)&&c.check(l,s)){a[s]=c.interpolate(r,l,t);break}}return{...n,...a}}function Je(n,e,t=null){if(e===null)return;const o=Array.isArray(e)?e:[e];let i=0;for(const a of o){if(t!==null&&i>t)break;switch(a.type){case X.ANIMATE:{const s=n.get(a.object);if(s===void 0)break;const r=t!==null?t-i:null,l=Math.max(Math.min(r!==null?(r-a.delay)/a.duration:1,1),0);n.set(a.object,{...s,...jn(s,a.props,a.easing(l),a.interpolators)}),a.block&&(i+=a.delay+a.duration);break}case X.UPDATE:{const s=n.get(a.object);if(s===void 0)break;n.set(a.object,{...s,...a.props});break}case X.PAUSE:i+=a.duration;break;default:st(a)}}}function Qe(n){return"objects"in n?n.objects.filter(e=>"objectType"in e):[]}function Hn({slide:n,buildIndex:e,buildTime:t}){const o=new Map;function i(s){o.set(s,s);for(const r of Qe(s))i(r)}for(const s of n.objects)i(s);const a=t===null?e:e-1;for(let s=0;s<a;s++){const r=n.animations[s]??null;Je(o,r)}if(t!==null&&e>0){const s=n.animations[e-1]??null;Je(o,s,t)}return o}function Un(n){const e={};function t(o){if(o.objectType===j.SVG){const a=o.svg;a!==void 0&&a.length>0&&(e[a]=a)}const i=Qe(o);for(const a of i)t(a)}for(const o of n.slides)for(const i of o.objects)t(i);return e}const mt="presenterState";function Yn(n,e){const t=localStorage.getItem(mt);if(t===null)return null;if(e===null)return localStorage.removeItem(mt),null;let o;try{o=JSON.parse(t)}catch(c){return console.error("Failed to parse presentation state from localStorage:",c),localStorage.removeItem(mt),null}const{title:i,timestamp:a}=o;let{slideIndex:s,buildIndex:r}=o;if(typeof i!="string"||typeof s!="number"||typeof r!="number"||typeof a!="number"||i!==n.title||Date.now()-a>1e3*60*e)return localStorage.removeItem(mt),null;s>n.slides.length-1&&(s=n.slides.length-1,r=0);const l=n.slides[s];return l===void 0?(localStorage.removeItem(mt),null):(r>l.animations.length&&(r=l.animations.length),{title:i,slideIndex:s,buildIndex:r})}function t0({title:n,slideIndex:e,buildIndex:t}){localStorage.setItem(mt,JSON.stringify({title:n,slideIndex:e,buildIndex:t,timestamp:Date.now()}))}const e0=Object.freeze({canvas:null,extrasContainer:null,mountedExtrasCleanups:[],slideIndex:0,buildIndex:0,currentAnimationId:null,imageById:{},shortcutState:{textCommand:null,shortcuts:{}}}),Q={Browser:"browser",Node:"node"};function $n(n,e){e.context.clearRect(0,0,n.width,n.height)}function Wn(n){const e=document.createElement("canvas");return e.setAttribute("width",n.width.toString()),e.setAttribute("height",n.height.toString()),e.style.position="absolute",e.style.width="100%",e}const pt={Browser:"browser",Node:"node"};function Gn(n){const e=new Path2D(n);return{type:pt.Browser,path:e}}function Xn(n){const{drawn:e,startX:t,startY:o,endX:i,endY:a,arrowheadSize:s,isArrowheadFilled:r,isDrawnFromCenter:l}=n,c={x:t,y:o},u={x:i,y:a},g=Math.atan2(u.y-c.y,u.x-c.x),h={x:c.x+(u.x-c.x)/2,y:c.y+(u.y-c.y)/2},f=u.x-c.x,v=u.y-c.y,T=Math.hypot(f,v)*e,C=Math.cos(g),M=Math.sin(g),L=l?{x:h.x-C*T/2,y:h.y-M*T/2}:c,I=l?{x:h.x+C*T/2,y:h.y+M*T/2}:{x:c.x+C*T,y:c.y+M*T},S=r?Math.PI/6:Math.PI/4.5,O=T<s*2?T/2:s,B={x:I.x-O*Math.cos(g-S),y:I.y-O*Math.sin(g-S)},$={x:I.x-O*Math.cos(g+S),y:I.y-O*Math.sin(g+S)},D={x:L.x+O*Math.cos(g-S),y:L.y+O*Math.sin(g-S)},W={x:L.x+O*Math.cos(g+S),y:L.y+O*Math.sin(g+S)};return{arrowPoints:[L,I],arrowheadPoints:[B,I,$],doubledArrowheadPoints:[D,L,W]}}function bt({ctx:n,color:e,drawn:t=null,isDrawnFromCenter:o=!1,isRounded:i=!1,opacity:a=null,path:s,pathLength:r=null,width:l}){if(!(l===0||t===0)){if(t!==null&&r!==null&&t!==1){const c=r+(i?l:0),u=r*t;if(!o)n.context.setLineDash([u,c-u]),n.context.lineDashOffset=0;else{const g=c-u;n.context.setLineDash([u,g]),n.context.lineDashOffset=-g/2}}else n.context.setLineDash([]),n.context.lineDashOffset=0;if(n.context.lineWidth=l,n.context.strokeStyle=Pt(e,a),n.context.lineCap=i?"round":"butt",s===void 0){n.context.stroke();return}switch(n.type){case Q.Browser:s.type===pt.Browser?n.context.stroke(s.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:s.type===pt.Node?n.context.stroke(s.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}}function yt({ctx:n,path:e,color:t,opacity:o=null}){if(n.context.fillStyle=re(t,o),e===void 0){n.context.fill();return}switch(n.type){case Q.Browser:e.type===pt.Browser?n.context.fill(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===pt.Node?n.context.fill(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}function oe(n,e){const t=e(),o=n[0];if(o===void 0)return{path:t,length:0};t.path.moveTo(o.x,o.y);let i=0;for(let a=1;a<n.length;a++){const s=n[a],r=n[a-1];if(s===void 0||r===void 0)continue;const l=s.x-r.x,c=s.y-r.y;i+=Math.hypot(l,c),t.path.lineTo(s.x,s.y)}return{path:t,length:i}}const Kn=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{arrowPoints:a,arrowheadPoints:s,doubledArrowheadPoints:r}=Xn(e),{path:l}=oe(a,o),{path:c}=oe(s,o);if(bt({color:e.color,ctx:n,path:l,opacity:i,width:e.width}),e.isArrowheadFilled&&(c.path.closePath(),yt({ctx:n,path:c,color:e.color,opacity:i})),bt({color:e.color,ctx:n,path:c,opacity:i,width:e.width}),e.isArrowheadDoubled){const{path:u}=oe(r,o);e.isArrowheadFilled&&(u.path.closePath(),yt({ctx:n,path:u,color:e.color,opacity:i})),bt({color:e.color,ctx:n,path:u,opacity:i,width:e.width})}};function Zn(n,e){const t=n.radius-n.strokeWidth/2;if(t<=0)return;const o=e(),i=-Math.PI/2;return o.path.arc(n.x,n.y,t,i,i+2*Math.PI),o}function Jn(n,e){const t=e(),o=-Math.PI/2;t.path.arc(n.x,n.y,n.radius,o,o+2*Math.PI);const i=2*Math.PI*n.radius;return{path:t,length:i}}function n0(n,e){switch(n.type){case Q.Browser:e.type===pt.Browser?n.context.clip(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===pt.Node?n.context.clip(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}const Qn=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=Jn(e,o);if(i<1&&e.strokeWidth>0){const r=Zn(e,o);r!==void 0&&(n.context.save(),n0(n,r),yt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else yt({ctx:n,path:a,color:e.fillColor,opacity:i});bt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function Y(n=null){return{x:0,y:0,...n}}const t1=Y();function ut(n=null){return{origin:t1,size:Dn,...n}}ut();function ft(n,e,t){const{x:o,y:i}=n,{width:a,height:s}=t;switch(e){case nt.TOP_LEFT:return ut({origin:Y({x:o,y:i}),size:t});case nt.TOP:return ut({origin:Y({x:o-a/2,y:i}),size:t});case nt.TOP_RIGHT:return ut({origin:Y({x:o-a,y:i}),size:t});case nt.LEFT:return ut({origin:Y({x:o,y:i-s/2}),size:t});case nt.CENTER:return ut({origin:Y({x:o-a/2,y:i-s/2}),size:t});case nt.RIGHT:return ut({origin:Y({x:o-a,y:i-s/2}),size:t});case nt.BOTTOM_LEFT:return ut({origin:Y({x:o,y:i-s}),size:t});case nt.BOTTOM:return ut({origin:Y({x:o-a/2,y:i-s}),size:t});case nt.BOTTOM_RIGHT:return ut({origin:Y({x:o-a,y:i-s}),size:t});default:st(e)}}const e1=({ctx:n,object:e,renderObject:t,opacity:o})=>{const i=e.scale*e.scaleX,a=e.scale*e.scaleY,s=ft(Y({x:e.x,y:e.y}),e.anchor,Z({width:e.width*Math.abs(i),height:e.height*Math.abs(a)})),{rotation:r,rotateOriginX:l,rotateOriginY:c,skewOriginX:u,skewOriginY:g,skewX:h,skewY:f}=e;if(!(i===0||a===0)){n.context.save(),n.context.translate(s.origin.x,s.origin.y),n.context.scale(i,a),n.context.translate(l,c),n.context.rotate(r*Math.PI/180),n.context.translate(-l,-c),n.context.translate(u,g),n.context.transform(1,Math.tan(f*Math.PI/180),Math.tan(h*Math.PI/180),1,0,0),n.context.translate(-u,-g);for(const v of e.objects)t(v,o*e.opacity);e.previewColor!==null&&(n.context.fillStyle=Pt(e.previewColor),n.context.fillRect(0,0,e.width,e.height)),e.rotateOriginPreviewSize>0&&(n.context.fillStyle="red",n.context.beginPath(),n.context.arc(l,c,e.rotateOriginPreviewSize,0,2*Math.PI),n.context.fill()),e.skewOriginPreviewSize>0&&(n.context.fillStyle="blue",n.context.beginPath(),n.context.arc(u,g,e.skewOriginPreviewSize,0,2*Math.PI),n.context.fill()),n.context.restore()}};function se(n,e,t,o,i=0){const a=o();a.path.moveTo(n.x+t,n.y),a.path.lineTo(n.x+e.width-t,n.y),a.path.arcTo(n.x+e.width,n.y,n.x+e.width,n.y+t,t),a.path.lineTo(n.x+e.width,n.y+e.height-t),a.path.arcTo(n.x+e.width,n.y+e.height,n.x+e.width-t,n.y+e.height,t),a.path.lineTo(n.x+t,n.y+e.height),a.path.arcTo(n.x,n.y+e.height,n.x,n.y+e.height-t,t),a.path.lineTo(n.x,n.y+t),a.path.arcTo(n.x,n.y,n.x+t,n.y,t),i>0&&a.path.lineTo(n.x+t+i,n.y);const s=2*(e.width+e.height-4*t)+2*Math.PI*t+i;return{path:a,length:s}}const It={Browser:"browser",Node:"node"},n1=({ctx:n,imageById:e,object:t,opacity:o,createPath2D:i})=>{const a=ft(Y({x:t.x,y:t.y}),t.anchor,Z({width:t.width,height:t.height})),s=e[t.imageId];if(s!==void 0){if(n.context.save(),t.cornerRadius>0){const r=se(a.origin,a.size,t.cornerRadius,i);switch(n.type){case Q.Browser:r.path.type===pt.Browser?n.context.clip(r.path.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:r.path.type===pt.Node?n.context.clip(r.path.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}switch(n.context.globalAlpha=o*t.opacity,n.context.imageSmoothingEnabled=t.smooth,n.type){case Q.Browser:s.type===It.Browser?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Node Image in Browser Canvas context");break;case Q.Node:s.type===It.Node?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Browser Image in Node Canvas context");break;default:st(n)}n.context.restore()}};function i1(n,e){const t=e();t.path.moveTo(n.startX,n.startY),t.path.lineTo(n.endX,n.endY);const o=Math.hypot(n.endX-n.startX,n.endY-n.startY);return{path:t,length:o}}const r1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{path:a,length:s}=i1(e,o);bt({color:e.color,ctx:n,drawn:e.drawn,isDrawnFromCenter:e.isDrawnFromCenter,isRounded:e.isRounded,path:a,pathLength:s,opacity:i,width:e.width})},o1=({ctx:n,object:e,opacity:t,renderObject:o})=>{n.context.save();const i=ft(Y({x:e.x,y:e.y}),e.anchor,Z({width:e.width,height:e.height}));e.preview&&(n.context.lineWidth=4,n.context.strokeStyle=Pt(K.RED),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.stroke()),n.context.beginPath(),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.closePath(),n.context.clip();for(const a of e.objects)o(a,t*e.opacity);n.context.restore()},s1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{origin:a}=ft(Y({x:e.x,y:e.y}),e.anchor,Z({width:e.width,height:e.height})),s=o(e.path);n.context.save(),n.context.translate(a.x,a.y),n.context.scale(e.width/e.viewboxWidth,e.height/e.viewboxHeight),yt({ctx:n,path:s,color:e.fillColor,opacity:i}),bt({color:e.strokeColor,ctx:n,drawn:e.drawn,isRounded:e.isRounded,path:s,pathLength:e.pathLength,opacity:i,width:e.strokeWidth}),n.context.restore()};function a1(n,e){const t=e(),o=n.points,i=o[0];if(i===void 0)return{path:t,length:0};t.path.moveTo(i.x,i.y);let a=0,s=i;for(let l=1;l<o.length;l++){const c=o[l];if(c===void 0)continue;t.path.lineTo(c.x,c.y);const u=Math.hypot(c.x-s.x,c.y-s.y);a+=u,s=c}t.path.closePath();const r=Math.hypot(i.x-s.x,i.y-s.y);return a+=r,{path:t,length:a}}const l1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=a1(e,o);yt({ctx:n,path:a,color:e.fillColor,opacity:i}),bt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function h1(n,e){const t=n.strokeWidth/2,{origin:o,size:i}=ft(Y({x:n.x,y:n.y}),n.anchor,Z({width:n.width,height:n.height})),a=i.width-n.strokeWidth,s=i.height-n.strokeWidth;if(a<=0||s<=0)return;const r=Y({x:o.x+t,y:o.y+t}),l=Z({width:a,height:s}),c=Math.max(0,Math.min(n.cornerRadius-t,Math.min(a,s)/2));if(c>0)return se(r,l,c,e).path;const u=e();return u.path.moveTo(r.x,r.y),u.path.lineTo(r.x+a,r.y),u.path.lineTo(r.x+a,r.y+s),u.path.lineTo(r.x,r.y+s),u.path.closePath(),u}function c1(n,e){const{origin:t,size:o}=ft(Y({x:n.x,y:n.y}),n.anchor,Z({width:n.width,height:n.height})),i=Math.max(0,Math.min(n.cornerRadius,Math.min(o.width,o.height)/2)),a=Math.min(n.strokeWidth*2,o.width-i);if(i>0)return se(t,o,i,e,a);{const s=e();s.path.moveTo(t.x,t.y),s.path.lineTo(t.x+o.width,t.y),s.path.lineTo(t.x+o.width,t.y+o.height),s.path.lineTo(t.x,t.y+o.height),s.path.lineTo(t.x,t.y),s.path.lineTo(t.x+a,t.y);const r=2*(o.width+o.height)+a;return{path:s,length:r}}}const u1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=c1(e,o);if(i<1&&e.strokeWidth>0){const r=h1(e,o);r!==void 0&&(n.context.save(),n0(n,r),yt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else yt({ctx:n,path:a,color:e.fillColor,opacity:i});bt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function f1(n){const{origin:e,size:t}=ft(Y({x:n.x,y:n.y}),n.anchor,Z({width:n.width,height:n.height}));return{origin:e,size:t,cornerRadius:Math.max(0,Math.min(n.cornerRadius,Math.min(t.width,t.height)/2))}}function d1(n,e,t,o={origin:Y({x:0,y:0}),size:e}){const i=t(),{origin:a,size:s,cornerRadius:r}=f1(n),{origin:l,size:c}=o;return i.path.moveTo(l.x,l.y),i.path.lineTo(l.x+c.width,l.y),i.path.lineTo(l.x+c.width,l.y+c.height),i.path.lineTo(l.x,l.y+c.height),i.path.lineTo(l.x,l.y),r===0?(i.path.moveTo(a.x,a.y),i.path.lineTo(a.x,a.y+s.height),i.path.lineTo(a.x+s.width,a.y+s.height),i.path.lineTo(a.x+s.width,a.y),i.path.lineTo(a.x,a.y),i):(i.path.moveTo(a.x+r,a.y),i.path.arcTo(a.x,a.y,a.x,a.y+r,r),i.path.lineTo(a.x,a.y+s.height-r),i.path.arcTo(a.x,a.y+s.height,a.x+r,a.y+s.height,r),i.path.lineTo(a.x+s.width-r,a.y+s.height),i.path.arcTo(a.x+s.width,a.y+s.height,a.x+s.width,a.y+s.height-r,r),i.path.lineTo(a.x+s.width,a.y+r),i.path.arcTo(a.x+s.width,a.y,a.x+s.width-r,a.y,r),i.path.lineTo(a.x+r,a.y),i)}const g1=({createPath2D:n,ctx:e,object:t,opacity:o,renderScale:i,slideSize:a})=>{const s=t.opacity*o;if(s===0||t.color.alpha===0)return;const r=Z({width:a.width/i,height:a.height/i}),l=Y({x:(a.width-r.width)/2,y:(a.height-r.height)/2}),c=d1(t,a,n,{origin:l,size:r});yt({ctx:e,path:c,color:t.color,opacity:s})},p1=({ctx:n,imageById:e,object:t,opacity:o})=>{const i=t.opacity*o;if(i===0||!t.svg)return;const a=e[t.svg];if(a===void 0)return;const s=ft(Y({x:t.x,y:t.y}),t.anchor,Z({width:t.width,height:t.height}));switch(n.context.save(),n.context.globalAlpha=i,n.type){case Q.Browser:a.type===It.Browser&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;case Q.Node:a.type===It.Node&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;default:st(n)}n.context.restore()};function y1(n){return{color:n.color,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight,ligatures:n.ligatures,subscript:n.subscript,superscript:n.superscript}}function x1(n){return{bottom:Math.max(...n.map(e=>e.bottom),0),height:Math.max(...n.map(e=>e.height),0),lineAdvance:Math.max(...n.map(e=>e.lineAdvance),0),top:Math.max(...n.map(e=>e.top),0),width:n.reduce((e,t)=>e+t.width,0)}}function v1(n,e=1){var c;const t=n.map(x1);if(t.length===0)return{lines:[],size:Z()};let o=((c=t[0])==null?void 0:c.top)??0,i=0;const a=[];for(let u=0;u<t.length;u++){const g=t[u];g!==void 0&&(u>0&&(o+=i*e),a.push({...g,baselineY:o}),i=g.lineAdvance)}const s=Math.min(...a.map(u=>u.baselineY-u.top),0),r=Math.max(...a.map(u=>u.baselineY+u.bottom),0),l=-s;return{lines:a.map(u=>({...u,baselineY:u.baselineY+l})),size:Z({height:r-s,width:Math.max(...a.map(u=>u.width),0)})}}const w1=.7,m1=.3;function i0(n){const e=n.superscript,t=n.subscript&&!e;return!e&&!t?{baselineShift:0,fontSize:n.fontSize,isSubscript:!1,isSuperscript:!1}:{baselineShift:n.fontSize*m1*(e?-1:1),fontSize:n.fontSize*w1,isSubscript:t,isSuperscript:e}}function r0(n,e=0){return n??e}function b1(n){const e=r0(n.fontBoundingBoxAscent,n.actualBoundingBoxAscent),t=r0(n.fontBoundingBoxDescent,n.actualBoundingBoxDescent);return{bottom:t,height:e+t,top:e,width:n.width}}function o0(n,e,t=1){const o=i0(e);n.context.fillStyle=re(e.color,t),n.context.font=`${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`,n.type===Q.Browser?n.context.textRendering=e.ligatures?"optimizeLegibility":"optimizeSpeed":n.context.fontVariant=e.ligatures?"common-ligatures":"no-common-ligatures"}function A1(n,e,t){const o=[];for(const i of n){const a=[],s=i.length===0?[{text:""}]:i;for(const r of s){const{text:l,...c}=r,u={...e,...c};o0(t,u);const g=t.context.measureText(l),h=b1(g),{baselineShift:f}=i0(u),v=Math.max(0,h.top-f),x=Math.max(0,h.bottom+f);a.push({...h,baselineShift:f,bottom:x,height:v+x,lineAdvance:u.fontSize,top:v})}o.push(a)}return o}const T1=({ctx:n,object:e,opacity:t})=>{const o=e.opacity*t;if(o===0)return;const{length:i}=e,a=Oe(e.text),s=y1(e),r=A1(a,s,n),l=v1(r,e.lineSpacing),c=ft(Y({x:e.x,y:e.y}),e.anchor,l.size);let u=c.origin.x,g=0;for(let h=0;h<a.length;h++){const f=a[h],v=r[h],x=l.lines[h];if(f==null||v==null||x==null){console.error("Could not determine text units or sizes for line");continue}const T=v.reduce((M,L)=>M+L.width,0);switch(e.alignment){case gt.LEFT:u=c.origin.x;break;case gt.CENTER:u=c.origin.x+(c.size.width-T)/2;break;case gt.RIGHT:u=c.origin.x+(c.size.width-T);break;default:st(e.alignment);break}const C=c.origin.y+x.baselineY;for(let M=0;M<f.length&&!(i!==null&&g>=i);M++){const L=f[M],I=v[M];if(L==null||I==null){console.error("Could not determine text unit or size for unit");continue}const{text:S,...O}=L;let B;if(i!==null&&g+S.length>i){const W=i-g;B=S.slice(0,W)}const $=B??S;g+=$.length;const D={...s,...O};o0(n,D,o),n.context.fillText($,u,C+I.baselineShift),u+=I.width}}},L1={[j.ARROW]:Kn,[j.CIRCLE]:Qn,[j.GROUP]:e1,[j.IMAGE]:n1,[j.LINE]:r1,[j.MASK]:o1,[j.PATH]:s1,[j.POLYGON]:l1,[j.RECTANGLE]:u1,[j.SLIDE_OBJECT]:()=>{},[j.SPOTLIGHT]:g1,[j.SVG]:p1,[j.TEXT]:T1};function M1(n){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox",`0 0 ${n.width} ${n.height}`),e.style.backgroundColor="transparent",e.style.position="absolute",e.style.width="100%",e}function C1(n,e){if(n===null)return null;const t=ft(Y({x:e.x,y:e.y}),e.anchor,Z({width:e.width,height:e.height})),o=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");o.setAttribute("x",t.origin.x.toString()),o.setAttribute("y",t.origin.y.toString()),o.setAttribute("width",e.width.toString()),o.setAttribute("height",e.height.toString());const i=e.content;i!==null&&o.appendChild(i),n.appendChild(o);let a=null;if(e.setup!==null){const s=e.setup(o);s!==void 0&&(a=s)}return()=>{a!==null&&a(),n.removeChild(o)}}async function S1(n){if(Object.keys(n).length===0)return{};const e={},t=i=>new Promise((a,s)=>{const r=new Image;if(r.onload=()=>a(r),r.onerror=c=>s(c),i.includes("</svg>")){const c=i.replace(/<\?xml[^?]*\?>\s*/g,""),u=new Blob([c],{type:"image/svg+xml;charset=utf-8"}),g=URL.createObjectURL(u);r.src=g}else r.src=i}),o=Object.entries(n).map(async([i,a])=>{const s=await t(a);e[i]={type:It.Browser,image:s}});try{await Promise.all(o)}catch(i){console.error("Error loading images:",i)}return e}const s0="presenterPendingVariables:";function P1(){const n=a0();if(n===null)return{};try{const e=ae(),t=n.getItem(e);if(n.removeItem(e),t===null)return{};const o=JSON.parse(t);if(o.values===void 0||typeof o.values!="object")return{};const i={};for(const[a,s]of Object.entries(o.values))typeof s=="number"&&Number.isFinite(s)&&(i[a]=s);return i}catch(e){return console.error("Failed to parse pending presenter variable state from sessionStorage:",e),n.removeItem(ae()),{}}}function E1(n){const e=a0();e!==null&&e.setItem(ae(),JSON.stringify({values:n}))}function ae(){return typeof window>"u"?s0:`${s0}${window.location.origin}${window.location.pathname}`}function a0(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}const I1=0,k1=1,l0=0,O1=.01,Vt=new Map;let kt=new Map,h0=!1,c0=1;function _1(n=null){B1();const e=n??{},t=R1(),o=F1(t,e),i=kt.get(o.id);if(i!==void 0){const a=d0(i,o);return kt.set(o.id,a),a}return o.default}function u0(){return Array.from(Vt.values())}function f0(n){const e=Vt.get(n);return e===void 0?l0:kt.get(e.id)??e.default}function N1(n,e){const t=Vt.get(n);if(t===void 0)return e;const o=d0(e,t);return kt.set(t.id,o),o}function F1(n,e){const t=e.min??I1,o=e.max??k1,i=Math.min(t,o),a=Math.max(t,o),s=e.increment!==void 0&&e.increment>0?e.increment:O1,r={id:n,name:e.name??n,min:i,max:a,default:g0(e.default??l0,i,a),increment:s};return Vt.set(n,r),r}function R1(){const n=`var${c0}`;return c0+=1,n}function B1(){h0||(kt=new Map(Object.entries(P1())),h0=!0)}function d0(n,e){return g0(n,e.min,e.max)}function g0(n,e,t){return Math.max(e,Math.min(t,n))}function D1({onCommit:n,onPreview:e}){const t=u0();if(t.length===0)return null;const o=document.createElement("div");Object.assign(o.style,{position:"absolute",right:"16px",bottom:"16px",zIndex:"20",display:"flex",flexDirection:"column",gap:"8px",width:"min(360px, calc(100% - 32px))",padding:"10px",boxSizing:"border-box",border:"1px solid rgba(255, 255, 255, 0.18)",borderRadius:"8px",background:"rgba(16, 18, 22, 0.82)",color:"#ffffff",fontFamily:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontSize:"12px",lineHeight:"1.25",pointerEvents:"auto",boxShadow:"0 12px 36px rgba(0, 0, 0, 0.28)",backdropFilter:"blur(10px)"});for(const i of t)o.appendChild(q1(i,e,n));return o}function q1(n,e,t){const o=document.createElement("div");o.dataset.presenterVariableId=n.id,o.dataset.presenterVariableName=n.name,Object.assign(o.style,{display:"grid",gridTemplateColumns:"72px minmax(0, 1fr) 74px",alignItems:"center",gap:"8px"});const i=document.createElement("div");i.textContent=n.name,i.title=n.name,Object.assign(i.style,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"rgba(255, 255, 255, 0.86)",fontWeight:"600"});const a=document.createElement("input");a.type="range",a.min=n.min.toString(),a.max=n.max.toString(),a.step=n.increment.toString(),Object.assign(a.style,{width:"100%",minWidth:"0",accentColor:"#8bc7ff"});const s=document.createElement("input");s.type="number",s.min=n.min.toString(),s.max=n.max.toString(),s.step=n.increment.toString(),Object.assign(s.style,{width:"100%",boxSizing:"border-box",border:"1px solid rgba(255, 255, 255, 0.24)",borderRadius:"6px",padding:"4px 6px",background:"rgba(255, 255, 255, 0.1)",color:"#ffffff",font:"inherit"});let r=f0(n.id);const l=g=>{const h=z1(g);a.value=h,s.value=h},c=g=>{Number.isFinite(g)&&(r=e(n.id,g),l(r))},u=g=>{Number.isFinite(g)&&(g!==r&&c(g),t())};return a.addEventListener("input",()=>c(a.valueAsNumber)),a.addEventListener("change",()=>u(a.valueAsNumber)),s.addEventListener("change",()=>u(s.valueAsNumber)),l(r),o.appendChild(i),o.appendChild(a),o.appendChild(s),o}function z1(n){return Number.isInteger(n)?n.toString():parseFloat(n.toFixed(6)).toString()}function V1({container:n,onCommit:e}){const t=D1({onPreview:(o,i)=>{const a=N1(o,i);return E1(j1()),a},onCommit:e});t!==null&&n.appendChild(t)}function j1(){const n={};for(const e of u0())n[e.id]=f0(e.id);return n}class H1{constructor(e){this.navigator=null;const{objectRenderers:t,scale:o=1,...i}=e;this.props={presentation:$e(),element:document.body,objectRenderers:{...L1,...t},cacheDurationMinutes:15,scale:U1(o),...i},this.state={...e0}}async present(){const{presentation:e,element:t,scale:o}=this.props;this.hideCursor();const i=Wn(e.size),a=M1(e.size);a.style.transformOrigin="center center",a.style.transform=`scale(${o})`,this.state={...e0,imageById:await S1({...e.resources.images,...Un(e)}),canvas:i,extrasContainer:a};const s=zn(e,t),r=We(t),l=(g,h)=>{this.state.shortcutState.shortcuts.b={slideIndex:this.state.slideIndex,buildIndex:this.state.buildIndex},this.renderSlide(g??this.state.slideIndex,h)},c=(g=!1)=>{r&&(this.navigator=kn({presentation:e,shortcutState:this.state.shortcutState,onNavigateToSlide:h=>this.renderSlide(h),onRenderSlide:l,onNext:h=>this.next(h),onPrevious:h=>this.previous(h),forceRefresh:g}),this.updateNavigator())};Ve(e,s,this.state.shortcutState,{onNext:g=>this.next(g),onPrevious:g=>this.previous(g),onRenderSlide:l,onShowNavigator:()=>c()},{focusOnPointerDown:!r,keyEventTarget:r?window:s}),t.replaceChildren(),s.appendChild(i),s.appendChild(a),V1({container:s,onCommit:()=>this.reloadAfterVariableChange()}),t.appendChild(s);const u=Yn(e,this.props.cacheDurationMinutes);u!==null?this.renderSlide(u.slideIndex,u.buildIndex):this.renderSlide(0),Ln()&&c(!0)}reloadAfterVariableChange(){const{presentation:e}=this.props;this.state.currentAnimationId!==null&&(cancelAnimationFrame(this.state.currentAnimationId),this.state.currentAnimationId=null),t0({title:e.title,slideIndex:this.state.slideIndex,buildIndex:this.state.buildIndex}),window.location.reload()}renderSlide(e,t=0,o=null){const{presentation:i}=this.props,{canvas:a}=this.state,s=this.state.slideIndex!==e;this.state.slideIndex=e,this.state.buildIndex=t,o===null&&t0({title:i.title,slideIndex:e,buildIndex:t});const r=i.slides[e];if(!(r===void 0||a===null)){if(s||this.state.mountedExtrasCleanups.length===0&&r.extras.length>0){for(const l of this.state.mountedExtrasCleanups)l();this.state.mountedExtrasCleanups=[];for(const l of r.extras){const c=C1(this.state.extrasContainer,l);c!==null&&this.state.mountedExtrasCleanups.push(c)}}this.renderCanvas(a,e,t,o,this.props.scale),o===null&&this.updateNavigator()}}renderCanvas(e,t,o=0,i=null,a=1){const{objectRenderers:s,presentation:r}=this.props,{imageById:l}=this.state;e.width=r.size.width,e.height=r.size.height;const c=e.getContext("2d");if(c===null)return;const u={type:Q.Browser,context:c};$n(e,u);const g=r.slides[t];if(g===void 0)return;const h=Hn({slide:g,buildIndex:o,buildTime:i});u.context.fillStyle=re(r.backgroundColor),u.context.fillRect(0,0,e.width,e.height);function f(x,T){const C=s[x.objectType],M=h.get(x);C===void 0||M===void 0||C({ctx:u,imageById:l,object:M,opacity:T,renderScale:a,renderObject:f,createPath2D:Gn,slideSize:r.size})}const v=a!==1;v&&(u.context.save(),u.context.translate(e.width*(1-a)/2,e.height*(1-a)/2),u.context.scale(a,a));for(const x of g.objects)f(x,1);v&&u.context.restore()}updateNavigator(){const{navigator:e}=this;if(e===null)return;if(!e.isOpen()){this.navigator=null;return}const{slideIndex:t,buildIndex:o}=this.state,i=this.getNextSlideBuild(t,o);e.update(t,o,i.slideIndex,i.buildIndex),this.renderCanvas(e.currentCanvas,t,o),i.slideIndex===null?this.renderEndCanvas(e.nextCanvas):this.renderCanvas(e.nextCanvas,i.slideIndex,i.buildIndex)}getNextSlideBuild(e,t){const{presentation:o}=this.props,i=o.slides[e];return i===void 0?{slideIndex:e,buildIndex:t}:t<i.animations.length?{slideIndex:e,buildIndex:t+1}:e+1<o.slides.length?{slideIndex:e+1,buildIndex:0}:{slideIndex:null,buildIndex:0}}renderEndCanvas(e){const{presentation:t}=this.props;e.width=t.size.width,e.height=t.size.height;const o=e.getContext("2d");o!==null&&(o.fillStyle="#000000",o.fillRect(0,0,e.width,e.height))}next(e=!1){const{presentation:t}=this.props,{currentAnimationId:o,slideIndex:i,buildIndex:a}=this.state;this.hideCursor(),o!==null&&cancelAnimationFrame(o);const s=t.slides[i];if(s===void 0)return;const r=s.animations[a];if(r!==void 0&&!e){const l=performance.now(),c=qn(r),u=g=>{const h=g-l;h<c?(this.renderSlide(i,a+1,h),this.state.currentAnimationId=requestAnimationFrame(u)):this.renderSlide(i,a+1,null)};this.state.currentAnimationId=requestAnimationFrame(u)}else i+1<t.slides.length&&this.renderSlide(i+1)}previous(e=!1){const{currentAnimationId:t,slideIndex:o,buildIndex:i}=this.state;if(this.hideCursor(),t!==null&&cancelAnimationFrame(t),i>0)e?this.renderSlide(o,0):this.renderSlide(o,i-1);else if(o>0){const a=this.props.presentation.slides[o-1],s=e?0:(a==null?void 0:a.animations.length)??0;this.renderSlide(o-1,s)}else this.renderSlide(0,0)}hasNext(){const{presentation:e}=this.props,{slideIndex:t,buildIndex:o}=this.state,i=e.slides[t];return i===void 0?!1:i.animations[o]!==void 0?!0:t+1<e.slides.length}hasPrevious(){const{slideIndex:e,buildIndex:t}=this.state;return t>0||e>0}hideCursor(){var e,t;this.props.element.style.cursor="none",(t=(e=this.state.canvas)==null?void 0:e.parentElement)==null||t.style.setProperty("cursor","none")}}function U1(n){return n<=0||n>1?(console.warn(`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`),1):n}function Y1(n=1e3,e={}){return{type:X.PAUSE,isKey:!1,duration:n,notes:null,shortcut:null,...e}}function $1(n,e={}){return{...e,text:n}}function W1(n=K.BLACK){return{...n,alpha:1}}function G1(n){for(var e=-1,t=n.length,o,i=n[t-1],a=0;++e<t;)o=i,i=n[e],a+=o[1]*i[0]-o[0]*i[1];return a/2}function X1(n){for(var e=-1,t=n.length,o=n[t-1],i,a,s=o[0],r=o[1],l=0;++e<t;)i=s,a=r,o=n[e],s=o[0],r=o[1],i-=s,a-=r,l+=Math.sqrt(i*i+a*a);return l}function K1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var le,p0;function Z1(){if(p0)return le;p0=1;var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function t(f){return f===10||f===13||f===8232||f===8233||f===32||f===9||f===11||f===12||f===160||f>=5760&&e.indexOf(f)>=0}function o(f){switch(f|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function i(f){return(f|32)===97}function a(f){return f>=48&&f<=57}function s(f){return f>=48&&f<=57||f===43||f===45||f===46}function r(f){this.index=0,this.path=f,this.max=f.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function l(f){for(;f.index<f.max&&t(f.path.charCodeAt(f.index));)f.index++}function c(f){var v=f.path.charCodeAt(f.index);if(v===48){f.param=0,f.index++;return}if(v===49){f.param=1,f.index++;return}f.err="SvgPath: arc flag can be 0 or 1 only (at pos "+f.index+")"}function u(f){var v=f.index,x=v,T=f.max,C=!1,M=!1,L=!1,I=!1,S;if(x>=T){f.err="SvgPath: missed param (at pos "+x+")";return}if(S=f.path.charCodeAt(x),(S===43||S===45)&&(x++,S=x<T?f.path.charCodeAt(x):0),!a(S)&&S!==46){f.err="SvgPath: param should start with 0..9 or `.` (at pos "+x+")";return}if(S!==46){if(C=S===48,x++,S=x<T?f.path.charCodeAt(x):0,C&&x<T&&S&&a(S)){f.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+v+")";return}for(;x<T&&a(f.path.charCodeAt(x));)x++,M=!0;S=x<T?f.path.charCodeAt(x):0}if(S===46){for(I=!0,x++;a(f.path.charCodeAt(x));)x++,L=!0;S=x<T?f.path.charCodeAt(x):0}if(S===101||S===69){if(I&&!M&&!L){f.err="SvgPath: invalid float exponent (at pos "+x+")";return}if(x++,S=x<T?f.path.charCodeAt(x):0,(S===43||S===45)&&x++,x<T&&a(f.path.charCodeAt(x)))for(;x<T&&a(f.path.charCodeAt(x));)x++;else{f.err="SvgPath: invalid float exponent (at pos "+x+")";return}}f.index=x,f.param=parseFloat(f.path.slice(v,x))+0}function g(f){var v,x;v=f.path[f.segmentStart],x=v.toLowerCase();var T=f.data;if(x==="m"&&T.length>2&&(f.result.push([v,T[0],T[1]]),T=T.slice(2),x="l",v=v==="m"?"l":"L"),x==="r")f.result.push([v].concat(T));else for(;T.length>=n[x]&&(f.result.push([v].concat(T.splice(0,n[x]))),!!n[x]););}function h(f){var v=f.max,x,T,C,M,L;if(f.segmentStart=f.index,x=f.path.charCodeAt(f.index),T=i(x),!o(x)){f.err="SvgPath: bad command "+f.path[f.index]+" (at pos "+f.index+")";return}if(M=n[f.path[f.index].toLowerCase()],f.index++,l(f),f.data=[],!M){g(f);return}for(C=!1;;){for(L=M;L>0;L--){if(T&&(L===3||L===4)?c(f):u(f),f.err.length){g(f);return}f.data.push(f.param),l(f),C=!1,f.index<v&&f.path.charCodeAt(f.index)===44&&(f.index++,l(f),C=!0)}if(!C&&(f.index>=f.max||!s(f.path.charCodeAt(f.index))))break}g(f)}return le=function(v){var x=new r(v),T=x.max;for(l(x);x.index<T&&!x.err.length;)h(x);return x.result.length&&("mM".indexOf(x.result[0][0])<0?(x.err="SvgPath: string should start with `M` or `m`",x.result=[]):x.result[0][0]="M"),{err:x.err,segments:x.result}},le}var he,y0;function x0(){if(y0)return he;y0=1;function n(t,o){return[t[0]*o[0]+t[2]*o[1],t[1]*o[0]+t[3]*o[1],t[0]*o[2]+t[2]*o[3],t[1]*o[2]+t[3]*o[3],t[0]*o[4]+t[2]*o[5]+t[4],t[1]*o[4]+t[3]*o[5]+t[5]]}function e(){if(!(this instanceof e))return new e;this.queue=[],this.cache=null}return e.prototype.matrix=function(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[3]===1&&t[4]===0&&t[5]===0?this:(this.cache=null,this.queue.push(t),this)},e.prototype.translate=function(t,o){return(t!==0||o!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,o])),this},e.prototype.scale=function(t,o){return(t!==1||o!==1)&&(this.cache=null,this.queue.push([t,0,0,o,0,0])),this},e.prototype.rotate=function(t,o,i){var a,s,r;return t!==0&&(this.translate(o,i),a=t*Math.PI/180,s=Math.cos(a),r=Math.sin(a),this.queue.push([s,r,-r,s,0,0]),this.cache=null,this.translate(-o,-i)),this},e.prototype.skewX=function(t){return t!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},e.prototype.skewY=function(t){return t!==0&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},e.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=n(this.cache,this.queue[t]);return this.cache},e.prototype.calc=function(t,o,i){var a;return this.queue.length?(this.cache||(this.cache=this.toArray()),a=this.cache,[t*a[0]+o*a[2]+(i?0:a[4]),t*a[1]+o*a[3]+(i?0:a[5])]):[t,o]},he=e,he}var ce,v0;function J1(){if(v0)return ce;v0=1;var n=x0(),e={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},t=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,o=/[\s,]+/;return ce=function(a){var s=new n,r,l;return a.split(t).forEach(function(c){if(c.length){if(typeof e[c]<"u"){r=c;return}switch(l=c.split(o).map(function(u){return+u||0}),r){case"matrix":l.length===6&&s.matrix(l);return;case"scale":l.length===1?s.scale(l[0],l[0]):l.length===2&&s.scale(l[0],l[1]);return;case"rotate":l.length===1?s.rotate(l[0],0,0):l.length===3&&s.rotate(l[0],l[1],l[2]);return;case"translate":l.length===1?s.translate(l[0],0):l.length===2&&s.translate(l[0],l[1]);return;case"skewX":l.length===1&&s.skewX(l[0]);return;case"skewY":l.length===1&&s.skewY(l[0]);return}}}),s},ce}var ue,w0;function Q1(){if(w0)return ue;w0=1;var n=Math.PI*2;function e(i,a,s,r){var l=i*r-a*s<0?-1:1,c=i*s+a*r;return c>1&&(c=1),c<-1&&(c=-1),l*Math.acos(c)}function t(i,a,s,r,l,c,u,g,h,f){var v=f*(i-s)/2+h*(a-r)/2,x=-h*(i-s)/2+f*(a-r)/2,T=u*u,C=g*g,M=v*v,L=x*x,I=T*C-T*L-C*M;I<0&&(I=0),I/=T*L+C*M,I=Math.sqrt(I)*(l===c?-1:1);var S=I*u/g*x,O=I*-g/u*v,B=f*S-h*O+(i+s)/2,$=h*S+f*O+(a+r)/2,D=(v-S)/u,W=(x-O)/g,dt=(-v-S)/u,ot=(-x-O)/g,xt=e(1,0,D,W),ht=e(D,W,dt,ot);return c===0&&ht>0&&(ht-=n),c===1&&ht<0&&(ht+=n),[B,$,xt,ht]}function o(i,a){var s=1.3333333333333333*Math.tan(a/4),r=Math.cos(i),l=Math.sin(i),c=Math.cos(i+a),u=Math.sin(i+a);return[r,l,r-l*s,l+r*s,c+u*s,u-c*s,c,u]}return ue=function(a,s,r,l,c,u,g,h,f){var v=Math.sin(f*n/360),x=Math.cos(f*n/360),T=x*(a-r)/2+v*(s-l)/2,C=-v*(a-r)/2+x*(s-l)/2;if(T===0&&C===0)return[];if(g===0||h===0)return[];g=Math.abs(g),h=Math.abs(h);var M=T*T/(g*g)+C*C/(h*h);M>1&&(g*=Math.sqrt(M),h*=Math.sqrt(M));var L=t(a,s,r,l,c,u,g,h,v,x),I=[],S=L[2],O=L[3],B=Math.max(Math.ceil(Math.abs(O)/(n/4)),1);O/=B;for(var $=0;$<B;$++)I.push(o(S,O)),S+=O;return I.map(function(D){for(var W=0;W<D.length;W+=2){var dt=D[W+0],ot=D[W+1];dt*=g,ot*=h;var xt=x*dt-v*ot,ht=v*dt+x*ot;D[W+0]=xt+L[0],D[W+1]=ht+L[1]}return D})},ue}var fe,m0;function ti(){if(m0)return fe;m0=1;var n=1e-10,e=Math.PI/180;function t(o,i,a){if(!(this instanceof t))return new t(o,i,a);this.rx=o,this.ry=i,this.ax=a}return t.prototype.transform=function(o){var i=Math.cos(this.ax*e),a=Math.sin(this.ax*e),s=[this.rx*(o[0]*i+o[2]*a),this.rx*(o[1]*i+o[3]*a),this.ry*(-o[0]*a+o[2]*i),this.ry*(-o[1]*a+o[3]*i)],r=s[0]*s[0]+s[2]*s[2],l=s[1]*s[1]+s[3]*s[3],c=((s[0]-s[3])*(s[0]-s[3])+(s[2]+s[1])*(s[2]+s[1]))*((s[0]+s[3])*(s[0]+s[3])+(s[2]-s[1])*(s[2]-s[1])),u=(r+l)/2;if(c<n*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var g=s[0]*s[1]+s[2]*s[3];c=Math.sqrt(c);var h=u+c/2,f=u-c/2;return this.ax=Math.abs(g)<n&&Math.abs(h-l)<n?90:Math.atan(Math.abs(g)>Math.abs(h-l)?(h-r)/g:g/(h-l))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(f)):(this.ax+=90,this.rx=Math.sqrt(f),this.ry=Math.sqrt(h)),this},t.prototype.isDegenerate=function(){return this.rx<n*this.ry||this.ry<n*this.rx},fe=t,fe}var de,b0;function ei(){if(b0)return de;b0=1;var n=Z1(),e=J1(),t=x0(),o=Q1(),i=ti();function a(s){if(!(this instanceof a))return new a(s);var r=n(s);this.segments=r.segments,this.err=r.err,this.__stack=[]}return a.from=function(s){if(typeof s=="string")return new a(s);if(s instanceof a){var r=new a("");return r.err=s.err,r.segments=s.segments.map(function(l){return l.slice()}),r.__stack=s.__stack.map(function(l){return t().matrix(l.toArray())}),r}throw new Error("SvgPath.from: invalid param type "+s)},a.prototype.__matrix=function(s){var r=this,l;s.queue.length&&this.iterate(function(c,u,g,h){var f,v,x,T;switch(c[0]){case"v":f=s.calc(0,c[1],!0),v=f[0]===0?["v",f[1]]:["l",f[0],f[1]];break;case"V":f=s.calc(g,c[1],!1),v=f[0]===s.calc(g,h,!1)[0]?["V",f[1]]:["L",f[0],f[1]];break;case"h":f=s.calc(c[1],0,!0),v=f[1]===0?["h",f[0]]:["l",f[0],f[1]];break;case"H":f=s.calc(c[1],h,!1),v=f[1]===s.calc(g,h,!1)[1]?["H",f[0]]:["L",f[0],f[1]];break;case"a":case"A":var C=s.toArray(),M=i(c[1],c[2],c[3]).transform(C);if(C[0]*C[3]-C[1]*C[2]<0&&(c[5]=c[5]?"0":"1"),f=s.calc(c[6],c[7],c[0]==="a"),c[0]==="A"&&c[6]===g&&c[7]===h||c[0]==="a"&&c[6]===0&&c[7]===0){v=[c[0]==="a"?"l":"L",f[0],f[1]];break}M.isDegenerate()?v=[c[0]==="a"?"l":"L",f[0],f[1]]:v=[c[0],M.rx,M.ry,M.ax,c[4],c[5],f[0],f[1]];break;case"m":T=u>0,f=s.calc(c[1],c[2],T),v=["m",f[0],f[1]];break;default:for(x=c[0],v=[x],T=x.toLowerCase()===x,l=1;l<c.length;l+=2)f=s.calc(c[l],c[l+1],T),v.push(f[0],f[1])}r.segments[u]=v},!0)},a.prototype.__evaluateStack=function(){var s,r;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(s=t(),r=this.__stack.length;--r>=0;)s.matrix(this.__stack[r].toArray());this.__matrix(s),this.__stack=[]}},a.prototype.toString=function(){var s="",r="",l=!1;this.__evaluateStack();for(var c=0,u=this.segments.length;c<u;c++){var g=this.segments[c],h=g[0];h!==r||h==="m"||h==="M"?(h==="m"&&r==="z"&&(s+=" "),s+=h,l=!1):l=!0;for(var f=1;f<g.length;f++){var v=g[f];f===1?l&&v>=0&&(s+=" "):v>=0&&(s+=" "),s+=v}r=h}return s},a.prototype.translate=function(s,r){return this.__stack.push(t().translate(s,r||0)),this},a.prototype.scale=function(s,r){return this.__stack.push(t().scale(s,!r&&r!==0?s:r)),this},a.prototype.rotate=function(s,r,l){return this.__stack.push(t().rotate(s,r||0,l||0)),this},a.prototype.skewX=function(s){return this.__stack.push(t().skewX(s)),this},a.prototype.skewY=function(s){return this.__stack.push(t().skewY(s)),this},a.prototype.matrix=function(s){return this.__stack.push(t().matrix(s)),this},a.prototype.transform=function(s){return s.trim()?(this.__stack.push(e(s)),this):this},a.prototype.round=function(s){var r=0,l=0,c=0,u=0,g;return s=s||0,this.__evaluateStack(),this.segments.forEach(function(h){var f=h[0].toLowerCase()===h[0];switch(h[0]){case"H":case"h":f&&(h[1]+=c),c=h[1]-h[1].toFixed(s),h[1]=+h[1].toFixed(s);return;case"V":case"v":f&&(h[1]+=u),u=h[1]-h[1].toFixed(s),h[1]=+h[1].toFixed(s);return;case"Z":case"z":c=r,u=l;return;case"M":case"m":f&&(h[1]+=c,h[2]+=u),c=h[1]-h[1].toFixed(s),u=h[2]-h[2].toFixed(s),r=c,l=u,h[1]=+h[1].toFixed(s),h[2]=+h[2].toFixed(s);return;case"A":case"a":f&&(h[6]+=c,h[7]+=u),c=h[6]-h[6].toFixed(s),u=h[7]-h[7].toFixed(s),h[1]=+h[1].toFixed(s),h[2]=+h[2].toFixed(s),h[3]=+h[3].toFixed(s+2),h[6]=+h[6].toFixed(s),h[7]=+h[7].toFixed(s);return;default:g=h.length,f&&(h[g-2]+=c,h[g-1]+=u),c=h[g-2]-h[g-2].toFixed(s),u=h[g-1]-h[g-1].toFixed(s),h.forEach(function(v,x){x&&(h[x]=+h[x].toFixed(s))});return}}),this},a.prototype.iterate=function(s,r){var l=this.segments,c={},u=!1,g=0,h=0,f=0,v=0,x,T,C;if(r||this.__evaluateStack(),l.forEach(function(M,L){var I=s(M,L,g,h);Array.isArray(I)&&(c[L]=I,u=!0);var S=M[0]===M[0].toLowerCase();switch(M[0]){case"m":case"M":g=M[1]+(S?g:0),h=M[2]+(S?h:0),f=g,v=h;return;case"h":case"H":g=M[1]+(S?g:0);return;case"v":case"V":h=M[1]+(S?h:0);return;case"z":case"Z":g=f,h=v;return;default:g=M[M.length-2]+(S?g:0),h=M[M.length-1]+(S?h:0)}}),!u)return this;for(C=[],x=0;x<l.length;x++)if(typeof c[x]<"u")for(T=0;T<c[x].length;T++)C.push(c[x][T]);else C.push(l[x]);return this.segments=C,this},a.prototype.abs=function(){return this.iterate(function(s,r,l,c){var u=s[0],g=u.toUpperCase(),h;if(u!==g)switch(s[0]=g,u){case"v":s[1]+=c;return;case"a":s[6]+=l,s[7]+=c;return;default:for(h=1;h<s.length;h++)s[h]+=h%2?l:c}},!0),this},a.prototype.rel=function(){return this.iterate(function(s,r,l,c){var u=s[0],g=u.toLowerCase(),h;if(u!==g&&!(r===0&&u==="M"))switch(s[0]=g,u){case"V":s[1]-=c;return;case"A":s[6]-=l,s[7]-=c;return;default:for(h=1;h<s.length;h++)s[h]-=h%2?l:c}},!0),this},a.prototype.unarc=function(){return this.iterate(function(s,r,l,c){var u,g,h,f=[],v=s[0];return v!=="A"&&v!=="a"?null:(v==="a"?(g=l+s[6],h=c+s[7]):(g=s[6],h=s[7]),u=o(l,c,g,h,s[4],s[5],s[1],s[2],s[3]),u.length===0?[[s[0]==="a"?"l":"L",s[6],s[7]]]:(u.forEach(function(x){f.push(["C",x[2],x[3],x[4],x[5],x[6],x[7]])}),f))}),this},a.prototype.unshort=function(){var s=this.segments,r,l,c,u,g;return this.iterate(function(h,f,v,x){var T=h[0],C=T.toUpperCase(),M;f&&(C==="T"?(M=T==="t",c=s[f-1],c[0]==="Q"?(r=c[1]-v,l=c[2]-x):c[0]==="q"?(r=c[1]-c[3],l=c[2]-c[4]):(r=0,l=0),u=-r,g=-l,M||(u+=v,g+=x),s[f]=[M?"q":"Q",u,g,h[1],h[2]]):C==="S"&&(M=T==="s",c=s[f-1],c[0]==="C"?(r=c[3]-v,l=c[4]-x):c[0]==="c"?(r=c[3]-c[5],l=c[4]-c[6]):(r=0,l=0),u=-r,g=-l,M||(u+=v,g+=x),s[f]=[M?"c":"C",u,g,h[1],h[2],h[3],h[4]]))}),this},de=a,de}var ge,A0;function ni(){return A0||(A0=1,ge=ei()),ge}var ii=ni();const ri=K1(ii);var pe={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},oi=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function si(n){var e=[];return n.replace(oi,function(t,o,i){var a=o.toLowerCase();for(i=li(i),a==="m"&&i.length>2&&(e.push([o].concat(i.splice(0,2))),a="l",o=o==="m"?"l":"L");i.length>=0;){if(i.length===pe[a])return i.unshift(o),e.push(i);if(i.length<pe[a])throw new Error("malformed path data");e.push([o].concat(i.splice(0,pe[a])))}}),e}var ai=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function li(n){var e=n.match(ai);return e?e.map(Number):[]}function at(n,e,t,o,i,a,s,r){return new ye(n,e,t,o,i,a,s,r)}function ye(n,e,t,o,i,a,s,r){this.a={x:n,y:e},this.b={x:t,y:o},this.c={x:i,y:a},this.d={x:s,y:r},s!=null&&r!==null&&r!==void 0?(this.getArcLength=vi,this.getPoint=ui,this.getDerivative=ci):(this.getArcLength=fi,this.getPoint=T0,this.getDerivative=hi),this.init()}ye.prototype={constructor:ye,init:function(){this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y])},getTotalLength:function(){return this.length},getPointAtLength:function(n){var e=xe(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);return this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e)},getTangentAtLength:function(n){var e=xe(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;return o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0},i},getPropertiesAtLength:function(n){var e=xe(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0};var a=this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e);return{x:a.x,y:a.y,tangentX:i.x,tangentY:i.y}}};function hi(n,e,t){return{x:(1-t)*2*(n[1]-n[0])+t*2*(n[2]-n[1]),y:(1-t)*2*(e[1]-e[0])+t*2*(e[2]-e[1])}}function ci(n,e,t){var o=T0([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t);return o}function xe(n,e,t,o,i){for(var a=1,s=n/e,r=(n-t(o,i,s))/e;a>.001;){var l=t(o,i,s+r),c=t(o,i,s-r),u=Math.abs(n-l)/e,g=Math.abs(n-c)/e;u<a?(a=u,s+=r):g<a?(a=g,s-=r):r/=2}return s}function T0(n,e,t){var o=(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],i=(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2];return{x:o,y:i}}function ui(n,e,t){var o=(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],i=(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3];return{x:o,y:i}}function fi(n,e,t){t===void 0&&(t=1);var o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),l=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));var u=l/(2*r),g=c/r,h=t+u,f=g-u*u;return Math.sqrt(r)/2*(h*Math.sqrt(h*h+f)-u*Math.sqrt(u*u+f)+f*Math.log(Math.abs((h+Math.sqrt(h*h+f))/(u+Math.sqrt(u*u+f)))))}var di=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],gi=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],pi=[[1],[1,1],[1,2,1],[1,3,3,1]];function yi(n,e){return pi[n][e]}function ve(n,e,t){var o=t.length-1,i,a,s;if(o===0)return 0;if(n===0){for(a=0,s=0;s<=o;s++)a+=yi(o,s)*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}else{for(i=new Array(o),s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return ve(n-1,e,i)}}function xi(n,e,t){var o=ve(1,t,n),i=ve(1,t,e),a=o*o+i*i;return Math.sqrt(a)}function vi(n,e,t){var o,i,a,s;t===void 0&&(t=1);var r=20;for(o=t/2,i=0,a=0;a<r;a++)s=o*di[r][a]+o,i+=gi[r][a]*xi(n,e,s);return o*i}var Ot=Math.PI*2;function L0(n,e,t,o){var i=n*o-e*t<0?-1:1,a=n*t+e*o;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function wi(n,e,t,o,i,a,s,r,l,c){var u=c*(n-t)/2+l*(e-o)/2,g=-l*(n-t)/2+c*(e-o)/2,h=s*s,f=r*r,v=u*u,x=g*g,T=h*f-h*x-f*v;T<0&&(T=0),T/=h*x+f*v,T=Math.sqrt(T)*(i===a?-1:1);var C=T*s/r*g,M=T*-r/s*u,L=c*C-l*M+(n+t)/2,I=l*C+c*M+(e+o)/2,S=(u-C)/s,O=(g-M)/r,B=(-u-C)/s,$=(-g-M)/r,D=L0(1,0,S,O),W=L0(S,O,B,$);return a===0&&W>0&&(W-=Ot),a===1&&W<0&&(W+=Ot),[L,I,D,W]}function mi(n,e){var t=1.3333333333333333*Math.tan(e/4),o=Math.cos(n),i=Math.sin(n),a=Math.cos(n+e),s=Math.sin(n+e);return[o,i,o-i*t,i+o*t,a+s*t,s-a*t,a,s]}function bi(n,e,t,o,i,a,s,r,l){var c=Math.sin(i*Ot/360),u=Math.cos(i*Ot/360),g=u*(n-r)/2+c*(e-l)/2,h=-c*(n-r)/2+u*(e-l)/2;if(g===0&&h===0)return[];if(t===0||o===0)return[];t=Math.abs(t),o=Math.abs(o);var f=g*g/(t*t)+h*h/(o*o);f>1&&(t*=Math.sqrt(f),o*=Math.sqrt(f));var v=wi(n,e,r,l,a,s,t,o,c,u),x=[],T=v[2],C=v[3],M=Math.max(Math.ceil(Math.abs(C)/(Ot/4)),1);C/=M;for(var L=0;L<M;L++)x.push(mi(T,C)),T+=C;return x.map(function(I){for(var S=0;S<I.length;S+=2){var O=I[S+0],B=I[S+1];O*=t,B*=o;var $=u*O-c*B,D=c*O+u*B;I[S+0]=$+v[0],I[S+1]=D+v[1]}return I})}function M0(n,e,t,o,i,a,s,r,l){return new we(n,e,t,o,i,a,s,r,l)}function we(n,e,t,o,i,a,s,r,l){var c=0,u=[],g=[],h=bi(n,e,t,o,i,a,s,r,l);h.forEach(function(f){var v=new at(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]),x=v.getTotalLength();c+=x,u.push(x),g.push(v)}),this.length=c,this.partialLengths=u,this.curves=g}we.prototype={constructor:we,init:function(){},getTotalLength:function(){return this.length},getPointAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getPointAtLength(n-t)},getTangentAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getTangentAtLength(n-t)},getPropertiesAtLength:function(n){var e=this.getTangentAtLength(n),t=this.getPointAtLength(n);return{x:t.x,y:t.y,tangentX:e.x,tangentY:e.y}}};function lt(n,e,t,o){return new _t(n,e,t,o)}function _t(n,e,t,o){this.x0=n,this.x1=e,this.y0=t,this.y1=o}_t.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},_t.prototype.getPointAtLength=function(n){var e=n/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),t=(this.x1-this.x0)*e,o=(this.y1-this.y0)*e;return{x:this.x0+t,y:this.y0+o}},_t.prototype.getTangentAtLength=function(){var n=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/n,y:(this.y1-this.y0)/n}},_t.prototype.getPropertiesAtLength=function(n){var e=this.getPointAtLength(n),t=this.getTangentAtLength();return{x:e.x,y:e.y,tangentX:t.x,tangentY:t.y}};function Ai(n){var e=0,t=[],o=[];function i(s){if(!s)return null;for(var r=si(s),l=[0,0],c=[0,0],u,g,h=0;h<r.length;h++)r[h][0]==="M"?(l=[r[h][1],r[h][2]],g=[l[0],l[1]],o.push(null)):r[h][0]==="m"?(l=[r[h][1]+l[0],r[h][2]+l[1]],g=[l[0],l[1]],o.push(null)):r[h][0]==="L"?(e=e+Math.sqrt(Math.pow(l[0]-r[h][1],2)+Math.pow(l[1]-r[h][2],2)),o.push(new lt(l[0],r[h][1],l[1],r[h][2])),l=[r[h][1],r[h][2]]):r[h][0]==="l"?(e=e+Math.sqrt(Math.pow(r[h][1],2)+Math.pow(r[h][2],2)),o.push(new lt(l[0],r[h][1]+l[0],l[1],r[h][2]+l[1])),l=[r[h][1]+l[0],r[h][2]+l[1]]):r[h][0]==="H"?(e=e+Math.abs(l[0]-r[h][1]),o.push(new lt(l[0],r[h][1],l[1],l[1])),l[0]=r[h][1]):r[h][0]==="h"?(e=e+Math.abs(r[h][1]),o.push(new lt(l[0],l[0]+r[h][1],l[1],l[1])),l[0]=r[h][1]+l[0]):r[h][0]==="V"?(e=e+Math.abs(l[1]-r[h][1]),o.push(new lt(l[0],l[0],l[1],r[h][1])),l[1]=r[h][1]):r[h][0]==="v"?(e=e+Math.abs(r[h][1]),o.push(new lt(l[0],l[0],l[1],l[1]+r[h][1])),l[1]=r[h][1]+l[1]):r[h][0]==="z"||r[h][0]==="Z"?(e=e+Math.sqrt(Math.pow(g[0]-l[0],2)+Math.pow(g[1]-l[1],2)),o.push(new lt(l[0],g[0],l[1],g[1])),l=[g[0],g[1]]):r[h][0]==="C"?(u=new at(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4],r[h][5],r[h][6]),e=e+u.getTotalLength(),l=[r[h][5],r[h][6]],o.push(u)):r[h][0]==="c"?(u=new at(l[0],l[1],l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4],l[0]+r[h][5],l[1]+r[h][6]),e=e+u.getTotalLength(),l=[r[h][5]+l[0],r[h][6]+l[1]],o.push(u)):r[h][0]==="S"?(h>0&&["C","c","S","s"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],2*l[0]-r[h-1][r[h-1].length-4],2*l[1]-r[h-1][r[h-1].length-3],r[h][1],r[h][2],r[h][3],r[h][4]):u=new at(l[0],l[1],l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4]),e=e+u.getTotalLength(),l=[r[h][3],r[h][4]],o.push(u)):r[h][0]==="s"?(h>0&&["C","c","S","s"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],l[0]+u.d.x-u.c.x,l[1]+u.d.y-u.c.y,l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4]):u=new at(l[0],l[1],l[0],l[1],l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4]),e=e+u.getTotalLength(),l=[r[h][3]+l[0],r[h][4]+l[1]],o.push(u)):r[h][0]==="Q"?(l[0]!=r[h][1]&&l[1]!=r[h][2]?u=new at(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4]):u=new lt(r[h][1],r[h][3],r[h][2],r[h][4]),e=e+u.getTotalLength(),o.push(u),l=[r[h][3],r[h][4]],c=[r[h][1],r[h][2]]):r[h][0]==="q"?(r[h][1]==0&&r[h][2]==0?u=new lt(l[0]+r[h][1],l[0]+r[h][3],l[1]+r[h][2],l[1]+r[h][4]):u=new at(l[0],l[1],l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4]),e=e+u.getTotalLength(),c=[l[0]+r[h][1],l[1]+r[h][2]],l=[r[h][3]+l[0],r[h][4]+l[1]],o.push(u)):r[h][0]==="T"?(h>0&&["Q","q","T","t"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],2*l[0]-c[0],2*l[1]-c[1],r[h][1],r[h][2]):u=new lt(l[0],r[h][1],l[1],r[h][2]),o.push(u),e=e+u.getTotalLength(),c=[2*l[0]-c[0],2*l[1]-c[1]],l=[r[h][1],r[h][2]]):r[h][0]==="t"?(h>0&&["Q","q","T","t"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],2*l[0]-c[0],2*l[1]-c[1],l[0]+r[h][1],l[1]+r[h][2]):u=new lt(l[0],l[0]+r[h][1],l[1],l[1]+r[h][2]),e=e+u.getTotalLength(),c=[2*l[0]-c[0],2*l[1]-c[1]],l=[r[h][1]+l[0],r[h][2]+l[0]],o.push(u)):r[h][0]==="A"?(u=new M0(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4],r[h][5],r[h][6],r[h][7]),e=e+u.getTotalLength(),l=[r[h][6],r[h][7]],o.push(u)):r[h][0]==="a"&&(u=new M0(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4],r[h][5],l[0]+r[h][6],l[1]+r[h][7]),e=e+u.getTotalLength(),l=[l[0]+r[h][6],l[1]+r[h][7]],o.push(u)),t.push(e);return i}i.getTotalLength=function(){return e},i.getPointAtLength=function(s){var r=a(s);return o[r.i].getPointAtLength(r.fraction)},i.getTangentAtLength=function(s){var r=a(s);return o[r.i].getTangentAtLength(r.fraction)},i.getPropertiesAtLength=function(s){var r=a(s);return o[r.i].getPropertiesAtLength(r.fraction)};var a=function(s){s<0?s=0:s>e&&(s=e);for(var r=t.length-1;t[r]>=s&&t[r]>0;)r--;return r++,{fraction:s-t[r-1],i:r}};return i(n)}function jt(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}function C0(n,e,t){return[n[0]+(e[0]-n[0])*t,n[1]+(e[1]-n[1])*t]}function Ti(n,e){return jt(n,e)<1e-9}function Li(n,e,t){let o=n.map((i,a)=>Mi(i,e[a]));return function(i){let a=o.map(s=>s(i));return t?Pi(a):a}}function Mi(n,e){return function(t){return n.map((o,i)=>o+t*(e[i]-o))}}function Ht(n){return typeof n=="number"&&isFinite(n)}const me=`All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
3
+ `):null}let F=null,Dt=null,wt=null;const He="__presenterNavigatorInstanceId";let Ue={width:700,height:680,left:20,top:50};function kn({presentation:n,shortcutState:e,onNavigateToSlide:t,onRenderSlide:o,onNext:i,onPrevious:a,forceRefresh:s=!1}){if(F!==null&&!F.closed&&(zt(F),!s))return F.focus(),Dt;if((F===null||F.closed)&&(F=window.open("","Navigator",Bn())),F===null)return console.error("Failed to open navigator window."),null;wt==null||wt();const r=Dn(F),l=new AbortController;wt=()=>l.abort();const c=_n(n,t,i,r.isActive);return Dt=c,Cn(),F.document.title=n.title,F.document.body.replaceChildren(c.element),Ve(n,c.element,e,{onNext:u=>{r.isActive()&&i(u)},onPrevious:u=>{r.isActive()&&a(u)},onRenderSlide:(u,g)=>{r.isActive()&&o(u,g)},onShowNavigator:()=>{r.isActive()&&re()}},{keyEventTarget:F,signal:l.signal}),F.addEventListener("resize",()=>zt(F),{signal:l.signal}),F.addEventListener("beforeunload",()=>{zt(F),Re()},{signal:l.signal}),F.addEventListener("keyup",u=>{r.isActive()&&(u.key==="Escape"||u.key==="`"&&!qe(u))&&re()},{signal:l.signal}),Dt}function _n(n,e,t,o=()=>!0){const i=(F==null?void 0:F.document)??document,a=i.createElement("div");a.style.boxSizing="border-box",a.style.display="grid",a.style.gridTemplateColumns="260px 1fr",a.style.gap="18px",a.style.height="100vh",a.style.overflow="hidden",a.style.padding="18px",a.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',a.style.backgroundColor="#f5f6f8",a.style.color="#1f2937",i.body.style.margin="0",i.body.style.overflow="hidden";const s=i.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.gap="8px",s.style.minHeight="0",s.style.overflowY="auto",s.style.paddingRight="4px";const r=i.createElement("div");r.style.display="flex",r.style.flexDirection="column",r.style.gap="14px",r.style.minHeight="0",r.style.minWidth="0",r.style.overflow="hidden";const l=i.createElement("div");l.style.display="flex",l.style.gap="14px",l.style.alignItems="center",l.style.flexWrap="wrap",l.style.fontSize="13px",l.style.color="#4b5563";const c=i.createElement("div");c.style.display="flex",c.style.gap="14px",c.style.flex="1 1 auto",c.style.minHeight="0",c.style.minWidth="0",c.style.overflow="hidden";const u=$e("Current",n),g=$e("Next",n),h=Nn(),f=ee();g.container.style.cursor="pointer",g.container.addEventListener("click",()=>{o()&&t()});const v=n.slides.map((k,B)=>{const W=Fn(k,B);return W.style.cursor="pointer",W.addEventListener("click",D=>{o()&&(D.shiftKey&&re(),e(B))}),s.appendChild(W),W}),x=qt("Slides",s,f.visibility.slides),T=qt("Current",u.container,f.visibility.current),C=qt("Next",g.container,f.visibility.next),M=qt("Notes",h.container,f.visibility.notes),L=()=>{const k=T.input.checked&&C.input.checked&&S();a.style.gridTemplateColumns=x.input.checked?"260px 1fr":"1fr",c.style.flexDirection=k?"column":"row",u.container.style.flex="1 1 0",g.container.style.flex="1 1 0",requestAnimationFrame(()=>{u.resize(),g.resize()}),Be({...f,open:!0,visibility:{slides:x.input.checked,current:T.input.checked,next:C.input.checked,notes:M.input.checked}})};x.input.addEventListener("change",L),T.input.addEventListener("change",L),C.input.addEventListener("change",L),M.input.addEventListener("change",L),F==null||F.addEventListener("resize",L),l.appendChild(x.element),l.appendChild(T.element),l.appendChild(C.element),l.appendChild(M.element),c.appendChild(u.container),c.appendChild(g.container),r.appendChild(l),r.appendChild(c),r.appendChild(h.container),a.appendChild(s),a.appendChild(r);function I(k,B,W,D){o()&&(v.forEach((Y,dt)=>{const ot=dt===k;Y.style.backgroundColor=ot?"#dbeafe":"#ffffff",Y.style.borderColor=ot?"#60a5fa":"#e5e7eb",Y.style.color=ot?"#1e3a8a":"#1f2937"}),u.label.textContent=We(n,k,B),g.label.textContent=We(n,W,D),h.content.textContent=En(n.slides[k]??De(),B)??"",Rn(v[k],s),L())}function S(){const k=F;if(k===null)return!1;const B=x.input.checked?278:0,W=k.innerWidth-36-B,D=k.innerHeight-36-l.offsetHeight-14;return W<=0||D<=0?!1:W/D<1.1}return{element:a,currentCanvas:u.canvas,nextCanvas:g.canvas,currentLabel:u.label,nextLabel:g.label,isOpen:()=>F!==null&&!F.closed,update:I}}function Nn(){const n=(F==null?void 0:F.document)??document,e=n.createElement("div");e.style.display="flex",e.style.flex="0 1 180px",e.style.flexDirection="column",e.style.minHeight="100px",e.style.maxHeight="30vh",e.style.overflow="hidden",e.style.backgroundColor="#ffffff",e.style.border="1px solid #e5e7eb",e.style.borderRadius="6px",e.style.boxShadow="0 1px 2px rgba(15, 23, 42, 0.06)";const t=n.createElement("div");t.textContent="Notes",t.style.padding="10px 12px 6px",t.style.fontSize="12px",t.style.fontWeight="700",t.style.textTransform="uppercase",t.style.color="#6b7280";const o=n.createElement("div");return o.style.flex="1 1 auto",o.style.minHeight="0",o.style.overflowY="auto",o.style.padding="4px 12px 12px",o.style.fontSize="16px",o.style.lineHeight="1.5",o.style.whiteSpace="pre-wrap",e.appendChild(t),e.appendChild(o),{container:e,content:o}}function Fn(n,e){const t=(F==null?void 0:F.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.gap="10px",o.style.padding="8px 10px",o.style.backgroundColor="#ffffff",o.style.border="1px solid #e5e7eb",o.style.borderRadius="6px",o.style.boxShadow="0 1px 2px rgba(15, 23, 42, 0.06)",o.style.fontSize="14px",o.style.lineHeight="1",o.style.userSelect="none";const i=t.createElement("div");i.textContent=`${e+1}`,i.style.minWidth="24px",i.style.fontWeight="700",i.style.color="#6b7280";const a=t.createElement("div");return a.textContent=n.title.length>0?n.title:`Slide ${e+1}`,a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.style.whiteSpace="nowrap",o.appendChild(i),o.appendChild(a),o}function $e(n,e){var u;const t=(F==null?void 0:F.document)??document,o=t.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.flexDirection="column",o.style.minHeight="0",o.style.minWidth="0";const i=t.createElement("div");i.textContent=n,i.style.marginBottom="4px",i.style.fontSize="12px",i.style.fontWeight="700",i.style.textAlign="center",i.style.textTransform="uppercase",i.style.color="#6b7280";const a=t.createElement("div");a.style.marginBottom="6px",a.style.fontSize="14px",a.style.fontWeight="600",a.style.textAlign="center";const s=t.createElement("div");s.style.flex="1 1 auto",s.style.display="flex",s.style.alignItems="flex-start",s.style.justifyContent="center",s.style.minHeight="0",s.style.width="100%",s.style.overflow="hidden";const r=t.createElement("canvas");r.style.display="block",r.style.width="0",r.style.height="0";function l(){const g=s.clientWidth,h=s.clientHeight;if(g<=0||h<=0)return;const f=e.size.width/e.size.height,v=Math.min(g,h*f),x=v/f;r.style.width=`${v}px`,r.style.height=`${x}px`}const c=(u=t.defaultView)==null?void 0:u.ResizeObserver;return c!==void 0&&new c(l).observe(s),F==null||F.addEventListener("resize",l),s.appendChild(r),o.appendChild(i),o.appendChild(a),o.appendChild(s),{container:o,label:a,canvas:r,resize:l}}function qt(n,e,t){const o=(F==null?void 0:F.document)??document,i=e.style.display||"block",a=o.createElement("label");a.style.display="inline-flex",a.style.alignItems="center",a.style.gap="6px",a.style.userSelect="none";const s=o.createElement("input");return s.type="checkbox",s.checked=t,e.style.display=t?i:"none",s.addEventListener("change",()=>{e.style.display=s.checked?i:"none"}),a.appendChild(s),a.appendChild(o.createTextNode(n)),{element:a,input:s}}function We(n,e,t){if(e===null)return"End of presentation";const o=n.slides[e];return o===void 0?"No slide":`Slide ${e+1} of ${n.slides.length}, Build ${t+1} of ${o.animations.length+1}`}function Rn(n,e){if(n===void 0)return;const t=n.offsetTop,o=t+n.offsetHeight,i=e.scrollTop,a=i+e.clientHeight;(t<i||o>a)&&n.scrollIntoView({block:"nearest"})}function re(){zt(F),Re(),wt==null||wt(),F==null||F.close(),F=null,Dt=null,wt=null}function Bn(){const{width:n,height:e,left:t,top:o}=Ue;return`width=${n},height=${e},left=${t},top=${o}`}function zt(n){n===null||n.closed||(Ue={width:n.outerWidth,height:n.outerHeight,left:n.screenX,top:n.screenY})}function Dn(n){var o;const e=typeof((o=globalThis.crypto)==null?void 0:o.randomUUID)=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random()}`,t=n;return t[He]=e,{isActive:()=>!n.closed&&t[He]===e}}function Z(n=null){return{height:0,width:0,...n}}const qn=Z({width:0,height:0});function Ye(n=null){return{backgroundColor:K.WHITE,slides:[],title:"Presentation",size:Z({width:3840,height:2160}),resources:{images:{}},...n}}function zn(n){const e=Array.isArray(n)?n:[n];let t=0,o=0;for(const i of e)switch(i.type){case X.PAUSE:t+=i.duration;break;case X.ANIMATE:o=Math.max(o,t+i.delay+i.duration),i.block&&(t+=i.delay+i.duration);break;case X.UPDATE:break;default:st(i)}return o}function oe(n,e=null){const{red:t,green:o,blue:i}=n,a=Le(n,e);return`rgba(${t}, ${o}, ${i}, ${a})`}function Ge(n){return n===document.body}function jn(n,e){const t=document.createElement("div");if(t.style.width="100%",t.style.aspectRatio=`${n.size.width} / ${n.size.height}`,t.style.position="relative",Ge(e)){t.style.top="50%",t.style.transform="translateY(-50%)",t.style.marginLeft="auto",t.style.marginRight="auto",t.style.overflowY="clip",document.title=n.title,document.documentElement.style.height="100%",document.body.style.margin="0",document.body.style.height="100%",document.body.style.width="100%",document.body.style.backgroundColor="#000000";const o=n.size.height/n.size.width;Xe(t,o),window.matchMedia(`(min-aspect-ratio: ${n.size.width} / ${n.size.height})`).addEventListener("change",()=>Xe(t,o))}return t}function Xe(n,e){window.innerHeight/window.innerWidth>e?(n.style.width="100%",n.style.height="auto"):(n.style.width="auto",n.style.height="100%")}const Ke={check:n=>typeof n=="object"&&n!==null&&typeof n.red=="number"&&typeof n.green=="number"&&typeof n.blue=="number"&&typeof n.alpha=="number",interpolate:(n,e,t)=>({red:Math.round(n.red+(e.red-n.red)*t),green:Math.round(n.green+(e.green-n.green)*t),blue:Math.round(n.blue+(e.blue-n.blue)*t),alpha:n.alpha+(e.alpha-n.alpha)*t})},Vn={check:n=>!0,interpolate:(n,e)=>e},Ze={check:n=>typeof n=="number",interpolate:(n,e,t)=>n+(e-n)*t},Je=[Ze,Ke,Vn];function Hn(n,e,t,o=null){if(t===0)return n;if(t===1)return{...n,...e};const i=o!=null?[...o,...Je]:Je,a={};for(const s in e){const r=n[s],l=e[s];for(const c of i)if(c.check(r,s)&&c.check(l,s)){a[s]=c.interpolate(r,l,t);break}}return{...n,...a}}function Qe(n,e,t=null){if(e===null)return;const o=Array.isArray(e)?e:[e];let i=0;for(const a of o){if(t!==null&&i>t)break;switch(a.type){case X.ANIMATE:{const s=n.get(a.object);if(s===void 0)break;const r=t!==null?t-i:null,l=Math.max(Math.min(r!==null?(r-a.delay)/a.duration:1,1),0);n.set(a.object,{...s,...Hn(s,a.props,a.easing(l),a.interpolators)}),a.block&&(i+=a.delay+a.duration);break}case X.UPDATE:{const s=n.get(a.object);if(s===void 0)break;n.set(a.object,{...s,...a.props});break}case X.PAUSE:i+=a.duration;break;default:st(a)}}}function se(n){return"objects"in n?n.objects.filter(e=>"objectType"in e):[]}function t0({slide:n,buildIndex:e,buildTime:t}){const o=new Map;function i(s){o.set(s,s);for(const r of se(s))i(r)}for(const s of n.objects)i(s);const a=t===null?e:e-1;for(let s=0;s<a;s++){const r=n.animations[s]??null;Qe(o,r)}if(t!==null&&e>0){const s=n.animations[e-1]??null;Qe(o,s,t)}return o}function Un(n){const e={};function t(o){if(o.objectType===V.SVG){const a=o.svg;a!==void 0&&a.length>0&&(e[a]=a)}const i=se(o);for(const a of i)t(a)}for(const o of n.slides)for(const i of o.objects)t(i);return e}const mt="presenterState";function $n(n,e){const t=localStorage.getItem(mt);if(t===null)return null;if(e===null)return localStorage.removeItem(mt),null;let o;try{o=JSON.parse(t)}catch(c){return console.error("Failed to parse presentation state from localStorage:",c),localStorage.removeItem(mt),null}const{title:i,timestamp:a}=o;let{slideIndex:s,buildIndex:r}=o;if(typeof i!="string"||typeof s!="number"||typeof r!="number"||typeof a!="number"||i!==n.title||Date.now()-a>1e3*60*e)return localStorage.removeItem(mt),null;s>n.slides.length-1&&(s=n.slides.length-1,r=0);const l=n.slides[s];return l===void 0?(localStorage.removeItem(mt),null):(r>l.animations.length&&(r=l.animations.length),{title:i,slideIndex:s,buildIndex:r})}function e0({title:n,slideIndex:e,buildIndex:t}){localStorage.setItem(mt,JSON.stringify({title:n,slideIndex:e,buildIndex:t,timestamp:Date.now()}))}const n0=Object.freeze({accessibleDescriptionElement:null,canvas:null,extrasContainer:null,mountedExtrasCleanups:[],slideIndex:0,buildIndex:0,currentAnimationId:null,imageById:{},shortcutState:{textCommand:null,shortcuts:{}}}),Q={Browser:"browser",Node:"node"};function Wn(n){const e=document.createElement("div");return e.setAttribute("role","status"),e.setAttribute("aria-label",n),e.setAttribute("aria-atomic","true"),Object.assign(e.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"}),e}function Yn(n,e){const t=n.description?[n.description]:[];function o(i,a){const s=e.get(i);if(s===void 0)return;const r=a*s.opacity;if(!Gn(s,r))return;const l=Xn(s);l&&t.push(l);for(const c of se(i))o(c,r)}for(const i of n.objects)o(i,1);return t.join(`
4
+ `)}function Gn(n,e){return e!==0&&(!("drawn"in n)||n.drawn!==0)}function Xn(n){return n.description!==null?n.description:Kn(n)?Zn(n):null}function Kn(n){return n.objectType===V.TEXT}function Zn(n){let e=n.length;return Jt(n.text).map(t=>t.map(o=>{if(e===null)return o.text;if(e<=0)return"";const i=o.text.slice(0,e);return e-=i.length,i}).join("")).join(`
5
+ `)}function Jn(n,e){n.textContent!==e&&(n.textContent=e)}function Qn(n,e){e.context.clearRect(0,0,n.width,n.height)}function t1(n){const e=document.createElement("canvas");return e.setAttribute("width",n.width.toString()),e.setAttribute("height",n.height.toString()),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width="100%",e}const pt={Browser:"browser",Node:"node"};function e1(n){const e=new Path2D(n);return{type:pt.Browser,path:e}}function n1(n){const{drawn:e,startX:t,startY:o,endX:i,endY:a,arrowheadSize:s,isArrowheadFilled:r,isDrawnFromCenter:l}=n,c={x:t,y:o},u={x:i,y:a},g=Math.atan2(u.y-c.y,u.x-c.x),h={x:c.x+(u.x-c.x)/2,y:c.y+(u.y-c.y)/2},f=u.x-c.x,v=u.y-c.y,T=Math.hypot(f,v)*e,C=Math.cos(g),M=Math.sin(g),L=l?{x:h.x-C*T/2,y:h.y-M*T/2}:c,I=l?{x:h.x+C*T/2,y:h.y+M*T/2}:{x:c.x+C*T,y:c.y+M*T},S=r?Math.PI/6:Math.PI/4.5,k=T<s*2?T/2:s,B={x:I.x-k*Math.cos(g-S),y:I.y-k*Math.sin(g-S)},W={x:I.x-k*Math.cos(g+S),y:I.y-k*Math.sin(g+S)},D={x:L.x+k*Math.cos(g-S),y:L.y+k*Math.sin(g-S)},Y={x:L.x+k*Math.cos(g+S),y:L.y+k*Math.sin(g+S)};return{arrowPoints:[L,I],arrowheadPoints:[B,I,W],doubledArrowheadPoints:[D,L,Y]}}function bt({ctx:n,color:e,drawn:t=null,isDrawnFromCenter:o=!1,isRounded:i=!1,opacity:a=null,path:s,pathLength:r=null,width:l}){if(!(l===0||t===0)){if(t!==null&&r!==null&&t!==1){const c=r+(i?l:0),u=r*t;if(!o)n.context.setLineDash([u,c-u]),n.context.lineDashOffset=0;else{const g=c-u;n.context.setLineDash([u,g]),n.context.lineDashOffset=-g/2}}else n.context.setLineDash([]),n.context.lineDashOffset=0;if(n.context.lineWidth=l,n.context.strokeStyle=Pt(e,a),n.context.lineCap=i?"round":"butt",s===void 0){n.context.stroke();return}switch(n.type){case Q.Browser:s.type===pt.Browser?n.context.stroke(s.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:s.type===pt.Node?n.context.stroke(s.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}}function yt({ctx:n,path:e,color:t,opacity:o=null}){if(n.context.fillStyle=oe(t,o),e===void 0){n.context.fill();return}switch(n.type){case Q.Browser:e.type===pt.Browser?n.context.fill(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===pt.Node?n.context.fill(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}function ae(n,e){const t=e(),o=n[0];if(o===void 0)return{path:t,length:0};t.path.moveTo(o.x,o.y);let i=0;for(let a=1;a<n.length;a++){const s=n[a],r=n[a-1];if(s===void 0||r===void 0)continue;const l=s.x-r.x,c=s.y-r.y;i+=Math.hypot(l,c),t.path.lineTo(s.x,s.y)}return{path:t,length:i}}const i1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{arrowPoints:a,arrowheadPoints:s,doubledArrowheadPoints:r}=n1(e),{path:l}=ae(a,o),{path:c}=ae(s,o);if(bt({color:e.color,ctx:n,path:l,opacity:i,width:e.width}),e.isArrowheadFilled&&(c.path.closePath(),yt({ctx:n,path:c,color:e.color,opacity:i})),bt({color:e.color,ctx:n,path:c,opacity:i,width:e.width}),e.isArrowheadDoubled){const{path:u}=ae(r,o);e.isArrowheadFilled&&(u.path.closePath(),yt({ctx:n,path:u,color:e.color,opacity:i})),bt({color:e.color,ctx:n,path:u,opacity:i,width:e.width})}};function r1(n,e){const t=n.radius-n.strokeWidth/2;if(t<=0)return;const o=e(),i=-Math.PI/2;return o.path.arc(n.x,n.y,t,i,i+2*Math.PI),o}function o1(n,e){const t=e(),o=-Math.PI/2;t.path.arc(n.x,n.y,n.radius,o,o+2*Math.PI);const i=2*Math.PI*n.radius;return{path:t,length:i}}function i0(n,e){switch(n.type){case Q.Browser:e.type===pt.Browser?n.context.clip(e.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:e.type===pt.Node?n.context.clip(e.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}const s1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=o1(e,o);if(i<1&&e.strokeWidth>0){const r=r1(e,o);r!==void 0&&(n.context.save(),i0(n,r),yt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else yt({ctx:n,path:a,color:e.fillColor,opacity:i});bt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function $(n=null){return{x:0,y:0,...n}}const a1=$();function ut(n=null){return{origin:a1,size:qn,...n}}ut();function ft(n,e,t){const{x:o,y:i}=n,{width:a,height:s}=t;switch(e){case nt.TOP_LEFT:return ut({origin:$({x:o,y:i}),size:t});case nt.TOP:return ut({origin:$({x:o-a/2,y:i}),size:t});case nt.TOP_RIGHT:return ut({origin:$({x:o-a,y:i}),size:t});case nt.LEFT:return ut({origin:$({x:o,y:i-s/2}),size:t});case nt.CENTER:return ut({origin:$({x:o-a/2,y:i-s/2}),size:t});case nt.RIGHT:return ut({origin:$({x:o-a,y:i-s/2}),size:t});case nt.BOTTOM_LEFT:return ut({origin:$({x:o,y:i-s}),size:t});case nt.BOTTOM:return ut({origin:$({x:o-a/2,y:i-s}),size:t});case nt.BOTTOM_RIGHT:return ut({origin:$({x:o-a,y:i-s}),size:t});default:st(e)}}const l1=({ctx:n,object:e,renderObject:t,opacity:o})=>{const i=e.scale*e.scaleX,a=e.scale*e.scaleY,s=ft($({x:e.x,y:e.y}),e.anchor,Z({width:e.width*Math.abs(i),height:e.height*Math.abs(a)})),{rotation:r,rotateOriginX:l,rotateOriginY:c,skewOriginX:u,skewOriginY:g,skewX:h,skewY:f}=e;if(!(i===0||a===0)){n.context.save(),n.context.translate(s.origin.x,s.origin.y),n.context.scale(i,a),n.context.translate(l,c),n.context.rotate(r*Math.PI/180),n.context.translate(-l,-c),n.context.translate(u,g),n.context.transform(1,Math.tan(f*Math.PI/180),Math.tan(h*Math.PI/180),1,0,0),n.context.translate(-u,-g);for(const v of e.objects)t(v,o*e.opacity);e.previewColor!==null&&(n.context.fillStyle=Pt(e.previewColor),n.context.fillRect(0,0,e.width,e.height)),e.rotateOriginPreviewSize>0&&(n.context.fillStyle="red",n.context.beginPath(),n.context.arc(l,c,e.rotateOriginPreviewSize,0,2*Math.PI),n.context.fill()),e.skewOriginPreviewSize>0&&(n.context.fillStyle="blue",n.context.beginPath(),n.context.arc(u,g,e.skewOriginPreviewSize,0,2*Math.PI),n.context.fill()),n.context.restore()}};function le(n,e,t,o,i=0){const a=o();a.path.moveTo(n.x+t,n.y),a.path.lineTo(n.x+e.width-t,n.y),a.path.arcTo(n.x+e.width,n.y,n.x+e.width,n.y+t,t),a.path.lineTo(n.x+e.width,n.y+e.height-t),a.path.arcTo(n.x+e.width,n.y+e.height,n.x+e.width-t,n.y+e.height,t),a.path.lineTo(n.x+t,n.y+e.height),a.path.arcTo(n.x,n.y+e.height,n.x,n.y+e.height-t,t),a.path.lineTo(n.x,n.y+t),a.path.arcTo(n.x,n.y,n.x+t,n.y,t),i>0&&a.path.lineTo(n.x+t+i,n.y);const s=2*(e.width+e.height-4*t)+2*Math.PI*t+i;return{path:a,length:s}}const It={Browser:"browser",Node:"node"},h1=({ctx:n,imageById:e,object:t,opacity:o,createPath2D:i})=>{const a=ft($({x:t.x,y:t.y}),t.anchor,Z({width:t.width,height:t.height})),s=e[t.imageId];if(s!==void 0){if(n.context.save(),t.cornerRadius>0){const r=le(a.origin,a.size,t.cornerRadius,i);switch(n.type){case Q.Browser:r.path.type===pt.Browser?n.context.clip(r.path.path):console.warn("Attempted to use Node Path2D in Browser Canvas context");break;case Q.Node:r.path.type===pt.Node?n.context.clip(r.path.path):console.warn("Attempted to use Browser Path2D in Node Canvas context");break;default:st(n)}}switch(n.context.globalAlpha=o*t.opacity,n.context.imageSmoothingEnabled=t.smooth,n.type){case Q.Browser:s.type===It.Browser?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Node Image in Browser Canvas context");break;case Q.Node:s.type===It.Node?n.context.drawImage(s.image,a.origin.x,a.origin.y,a.size.width,a.size.height):console.warn("Attempted to use Browser Image in Node Canvas context");break;default:st(n)}n.context.restore()}};function c1(n,e){const t=e();t.path.moveTo(n.startX,n.startY),t.path.lineTo(n.endX,n.endY);const o=Math.hypot(n.endX-n.startX,n.endY-n.startY);return{path:t,length:o}}const u1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0)return;const{path:a,length:s}=c1(e,o);bt({color:e.color,ctx:n,drawn:e.drawn,isDrawnFromCenter:e.isDrawnFromCenter,isRounded:e.isRounded,path:a,pathLength:s,opacity:i,width:e.width})},f1=({ctx:n,object:e,opacity:t,renderObject:o})=>{n.context.save();const i=ft($({x:e.x,y:e.y}),e.anchor,Z({width:e.width,height:e.height}));e.preview&&(n.context.lineWidth=4,n.context.strokeStyle=Pt(K.RED),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.stroke()),n.context.beginPath(),n.context.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),n.context.closePath(),n.context.clip();for(const a of e.objects)o(a,t*e.opacity);n.context.restore()},d1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{origin:a}=ft($({x:e.x,y:e.y}),e.anchor,Z({width:e.width,height:e.height})),s=o(e.path);n.context.save(),n.context.translate(a.x,a.y),n.context.scale(e.width/e.viewboxWidth,e.height/e.viewboxHeight),yt({ctx:n,path:s,color:e.fillColor,opacity:i}),bt({color:e.strokeColor,ctx:n,drawn:e.drawn,isRounded:e.isRounded,path:s,pathLength:e.pathLength,opacity:i,width:e.strokeWidth}),n.context.restore()};function g1(n,e){const t=e(),o=n.points,i=o[0];if(i===void 0)return{path:t,length:0};t.path.moveTo(i.x,i.y);let a=0,s=i;for(let l=1;l<o.length;l++){const c=o[l];if(c===void 0)continue;t.path.lineTo(c.x,c.y);const u=Math.hypot(c.x-s.x,c.y-s.y);a+=u,s=c}t.path.closePath();const r=Math.hypot(i.x-s.x,i.y-s.y);return a+=r,{path:t,length:a}}const p1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=g1(e,o);yt({ctx:n,path:a,color:e.fillColor,opacity:i}),bt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function y1(n,e){const t=n.strokeWidth/2,{origin:o,size:i}=ft($({x:n.x,y:n.y}),n.anchor,Z({width:n.width,height:n.height})),a=i.width-n.strokeWidth,s=i.height-n.strokeWidth;if(a<=0||s<=0)return;const r=$({x:o.x+t,y:o.y+t}),l=Z({width:a,height:s}),c=Math.max(0,Math.min(n.cornerRadius-t,Math.min(a,s)/2));if(c>0)return le(r,l,c,e).path;const u=e();return u.path.moveTo(r.x,r.y),u.path.lineTo(r.x+a,r.y),u.path.lineTo(r.x+a,r.y+s),u.path.lineTo(r.x,r.y+s),u.path.closePath(),u}function x1(n,e){const{origin:t,size:o}=ft($({x:n.x,y:n.y}),n.anchor,Z({width:n.width,height:n.height})),i=Math.max(0,Math.min(n.cornerRadius,Math.min(o.width,o.height)/2)),a=Math.min(n.strokeWidth*2,o.width-i);if(i>0)return le(t,o,i,e,a);{const s=e();s.path.moveTo(t.x,t.y),s.path.lineTo(t.x+o.width,t.y),s.path.lineTo(t.x+o.width,t.y+o.height),s.path.lineTo(t.x,t.y+o.height),s.path.lineTo(t.x,t.y),s.path.lineTo(t.x+a,t.y);const r=2*(o.width+o.height)+a;return{path:s,length:r}}}const v1=({ctx:n,object:e,opacity:t,createPath2D:o})=>{const i=e.opacity*t;if(i===0||e.drawn===0&&e.fillColor.alpha===0)return;const{path:a,length:s}=x1(e,o);if(i<1&&e.strokeWidth>0){const r=y1(e,o);r!==void 0&&(n.context.save(),i0(n,r),yt({ctx:n,path:a,color:e.fillColor,opacity:i}),n.context.restore())}else yt({ctx:n,path:a,color:e.fillColor,opacity:i});bt({color:e.strokeColor,ctx:n,drawn:e.drawn,path:a,pathLength:s,opacity:i,width:e.strokeWidth})};function w1(n){const{origin:e,size:t}=ft($({x:n.x,y:n.y}),n.anchor,Z({width:n.width,height:n.height}));return{origin:e,size:t,cornerRadius:Math.max(0,Math.min(n.cornerRadius,Math.min(t.width,t.height)/2))}}function m1(n,e,t,o={origin:$({x:0,y:0}),size:e}){const i=t(),{origin:a,size:s,cornerRadius:r}=w1(n),{origin:l,size:c}=o;return i.path.moveTo(l.x,l.y),i.path.lineTo(l.x+c.width,l.y),i.path.lineTo(l.x+c.width,l.y+c.height),i.path.lineTo(l.x,l.y+c.height),i.path.lineTo(l.x,l.y),r===0?(i.path.moveTo(a.x,a.y),i.path.lineTo(a.x,a.y+s.height),i.path.lineTo(a.x+s.width,a.y+s.height),i.path.lineTo(a.x+s.width,a.y),i.path.lineTo(a.x,a.y),i):(i.path.moveTo(a.x+r,a.y),i.path.arcTo(a.x,a.y,a.x,a.y+r,r),i.path.lineTo(a.x,a.y+s.height-r),i.path.arcTo(a.x,a.y+s.height,a.x+r,a.y+s.height,r),i.path.lineTo(a.x+s.width-r,a.y+s.height),i.path.arcTo(a.x+s.width,a.y+s.height,a.x+s.width,a.y+s.height-r,r),i.path.lineTo(a.x+s.width,a.y+r),i.path.arcTo(a.x+s.width,a.y,a.x+s.width-r,a.y,r),i.path.lineTo(a.x+r,a.y),i)}const b1=({createPath2D:n,ctx:e,object:t,opacity:o,renderScale:i,slideSize:a})=>{const s=t.opacity*o;if(s===0||t.color.alpha===0)return;const r=Z({width:a.width/i,height:a.height/i}),l=$({x:(a.width-r.width)/2,y:(a.height-r.height)/2}),c=m1(t,a,n,{origin:l,size:r});yt({ctx:e,path:c,color:t.color,opacity:s})},A1=({ctx:n,imageById:e,object:t,opacity:o})=>{const i=t.opacity*o;if(i===0||!t.svg)return;const a=e[t.svg];if(a===void 0)return;const s=ft($({x:t.x,y:t.y}),t.anchor,Z({width:t.width,height:t.height}));switch(n.context.save(),n.context.globalAlpha=i,n.type){case Q.Browser:a.type===It.Browser&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;case Q.Node:a.type===It.Node&&n.context.drawImage(a.image,s.origin.x,s.origin.y,s.size.width,s.size.height);break;default:st(n)}n.context.restore()};function T1(n){return{color:n.color,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight,ligatures:n.ligatures,subscript:n.subscript,superscript:n.superscript}}function L1(n){const e=Math.max(...n.map(o=>o.bottom),0),t=Math.max(...n.map(o=>o.top),0);return{bottom:e,height:t+e,lineAdvance:Math.max(...n.map(o=>o.lineAdvance),0),top:t,width:n.reduce((o,i)=>o+i.width,0)}}function M1(n,e=1){const t=n.map(L1);if(t.length===0)return{baselines:[],size:Z()};let o=0,i,a=0,s=0;const r=[];for(const c of t){const g=(c.lineAdvance*e-c.height)/2,h=c.top+g;i===void 0?o=h:o+=i+h,r.push(o),a=Math.min(a,o-c.top),s=Math.max(s,o+c.bottom),i=c.bottom+g}const l=-a;return{baselines:r.map(c=>c+l),size:Z({height:s-a,width:Math.max(...t.map(c=>c.width),0)})}}const C1=.7,S1=.3;function r0(n){const e=n.superscript,t=n.subscript&&!e;return!e&&!t?{baselineShift:0,fontSize:n.fontSize,isSubscript:!1,isSuperscript:!1}:{baselineShift:n.fontSize*S1*(e?-1:1),fontSize:n.fontSize*C1,isSubscript:t,isSuperscript:e}}function o0(n,e=0){return n??e}function P1(n){const e=o0(n.fontBoundingBoxAscent,n.actualBoundingBoxAscent),t=o0(n.fontBoundingBoxDescent,n.actualBoundingBoxDescent);return{bottom:t,height:e+t,top:e,width:n.width}}function s0(n,e,t=1){const o=r0(e);n.context.fillStyle=oe(e.color,t),n.context.font=`${e.fontStyle} ${e.fontWeight} ${o.fontSize}px ${e.fontFamily}`,n.type===Q.Browser?n.context.textRendering=e.ligatures?"optimizeLegibility":"optimizeSpeed":n.context.fontVariant=e.ligatures?"common-ligatures":"no-common-ligatures"}function E1(n,e,t){const o=[];for(const i of n){const a=[],s=i.length===0?[{text:""}]:i;for(const r of s){const{text:l,...c}=r,u={...e,...c};s0(t,u);const g=t.context.measureText(l),h=P1(g),{baselineShift:f}=r0(u),v=Math.max(0,h.top-f),x=Math.max(0,h.bottom+f);a.push({...h,baselineShift:f,bottom:x,height:v+x,lineAdvance:u.fontSize,top:v})}o.push(a)}return o}const I1=({ctx:n,object:e,opacity:t})=>{const o=e.opacity*t;if(o===0)return;const{length:i}=e,a=Jt(e.text),s=T1(e),r=E1(a,s,n),l=M1(r,e.lineSpacing),c=ft($({x:e.x,y:e.y}),e.anchor,l.size);let u=c.origin.x,g=0;for(let h=0;h<a.length;h++){const f=a[h],v=r[h],x=l.baselines[h];if(f==null||v==null||x==null){console.error("Could not determine text units or sizes for line");continue}const T=v.reduce((M,L)=>M+L.width,0);switch(e.alignment){case gt.LEFT:u=c.origin.x;break;case gt.CENTER:u=c.origin.x+(c.size.width-T)/2;break;case gt.RIGHT:u=c.origin.x+(c.size.width-T);break;default:st(e.alignment);break}const C=c.origin.y+x;for(let M=0;M<f.length&&!(i!==null&&g>=i);M++){const L=f[M],I=v[M];if(L==null||I==null){console.error("Could not determine text unit or size for unit");continue}const{text:S,...k}=L;let B;if(i!==null&&g+S.length>i){const Y=i-g;B=S.slice(0,Y)}const W=B??S;g+=W.length;const D={...s,...k};s0(n,D,o),n.context.fillText(W,u,C+I.baselineShift),u+=I.width}}},O1={[V.ARROW]:i1,[V.CIRCLE]:s1,[V.GROUP]:l1,[V.IMAGE]:h1,[V.LINE]:u1,[V.MASK]:f1,[V.PATH]:d1,[V.POLYGON]:p1,[V.RECTANGLE]:v1,[V.SLIDE_OBJECT]:()=>{},[V.SPOTLIGHT]:b1,[V.SVG]:A1,[V.TEXT]:I1};function k1(n){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox",`0 0 ${n.width} ${n.height}`),e.style.backgroundColor="transparent",e.style.position="absolute",e.style.width="100%",e}function _1(n,e){if(n===null)return null;const t=ft($({x:e.x,y:e.y}),e.anchor,Z({width:e.width,height:e.height})),o=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");o.setAttribute("x",t.origin.x.toString()),o.setAttribute("y",t.origin.y.toString()),o.setAttribute("width",e.width.toString()),o.setAttribute("height",e.height.toString());const i=e.content;i!==null&&o.appendChild(i),n.appendChild(o);let a=null;if(e.setup!==null){const s=e.setup(o);s!==void 0&&(a=s)}return()=>{a!==null&&a(),n.removeChild(o)}}async function N1(n){if(Object.keys(n).length===0)return{};const e={},t=i=>new Promise((a,s)=>{const r=new Image;if(r.onload=()=>a(r),r.onerror=c=>s(c),i.includes("</svg>")){const c=i.replace(/<\?xml[^?]*\?>\s*/g,""),u=new Blob([c],{type:"image/svg+xml;charset=utf-8"}),g=URL.createObjectURL(u);r.src=g}else r.src=i}),o=Object.entries(n).map(async([i,a])=>{const s=await t(a);e[i]={type:It.Browser,image:s}});try{await Promise.all(o)}catch(i){console.error("Error loading images:",i)}return e}const a0="presenterPendingVariables:";function F1(){const n=l0();if(n===null)return{};try{const e=he(),t=n.getItem(e);if(n.removeItem(e),t===null)return{};const o=JSON.parse(t);if(o.values===void 0||typeof o.values!="object")return{};const i={};for(const[a,s]of Object.entries(o.values))typeof s=="number"&&Number.isFinite(s)&&(i[a]=s);return i}catch(e){return console.error("Failed to parse pending presenter variable state from sessionStorage:",e),n.removeItem(he()),{}}}function R1(n){const e=l0();e!==null&&e.setItem(he(),JSON.stringify({values:n}))}function he(){return typeof window>"u"?a0:`${a0}${window.location.origin}${window.location.pathname}`}function l0(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}const B1=0,D1=1,h0=0,q1=.01,jt=new Map;let Ot=new Map,c0=!1,u0=1;function z1(n=null){U1();const e=n??{},t=H1(),o=V1(t,e),i=Ot.get(o.id);if(i!==void 0){const a=g0(i,o);return Ot.set(o.id,a),a}return o.default}function f0(){return Array.from(jt.values())}function d0(n){const e=jt.get(n);return e===void 0?h0:Ot.get(e.id)??e.default}function j1(n,e){const t=jt.get(n);if(t===void 0)return e;const o=g0(e,t);return Ot.set(t.id,o),o}function V1(n,e){const t=e.min??B1,o=e.max??D1,i=Math.min(t,o),a=Math.max(t,o),s=e.increment!==void 0&&e.increment>0?e.increment:q1,r={id:n,name:e.name??n,min:i,max:a,default:p0(e.default??h0,i,a),increment:s};return jt.set(n,r),r}function H1(){const n=`var${u0}`;return u0+=1,n}function U1(){c0||(Ot=new Map(Object.entries(F1())),c0=!0)}function g0(n,e){return p0(n,e.min,e.max)}function p0(n,e,t){return Math.max(e,Math.min(t,n))}function $1({onCommit:n,onPreview:e}){const t=f0();if(t.length===0)return null;const o=document.createElement("div");Object.assign(o.style,{position:"absolute",right:"16px",bottom:"16px",zIndex:"20",display:"flex",flexDirection:"column",gap:"8px",width:"min(360px, calc(100% - 32px))",padding:"10px",boxSizing:"border-box",border:"1px solid rgba(255, 255, 255, 0.18)",borderRadius:"8px",background:"rgba(16, 18, 22, 0.82)",color:"#ffffff",fontFamily:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontSize:"12px",lineHeight:"1.25",pointerEvents:"auto",boxShadow:"0 12px 36px rgba(0, 0, 0, 0.28)",backdropFilter:"blur(10px)"});for(const i of t)o.appendChild(W1(i,e,n));return o}function W1(n,e,t){const o=document.createElement("div");o.dataset.presenterVariableId=n.id,o.dataset.presenterVariableName=n.name,Object.assign(o.style,{display:"grid",gridTemplateColumns:"72px minmax(0, 1fr) 74px",alignItems:"center",gap:"8px"});const i=document.createElement("div");i.textContent=n.name,i.title=n.name,Object.assign(i.style,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"rgba(255, 255, 255, 0.86)",fontWeight:"600"});const a=document.createElement("input");a.type="range",a.min=n.min.toString(),a.max=n.max.toString(),a.step=n.increment.toString(),Object.assign(a.style,{width:"100%",minWidth:"0",accentColor:"#8bc7ff"});const s=document.createElement("input");s.type="number",s.min=n.min.toString(),s.max=n.max.toString(),s.step=n.increment.toString(),Object.assign(s.style,{width:"100%",boxSizing:"border-box",border:"1px solid rgba(255, 255, 255, 0.24)",borderRadius:"6px",padding:"4px 6px",background:"rgba(255, 255, 255, 0.1)",color:"#ffffff",font:"inherit"});let r=d0(n.id);const l=g=>{const h=Y1(g);a.value=h,s.value=h},c=g=>{Number.isFinite(g)&&(r=e(n.id,g),l(r))},u=g=>{Number.isFinite(g)&&(g!==r&&c(g),t())};return a.addEventListener("input",()=>c(a.valueAsNumber)),a.addEventListener("change",()=>u(a.valueAsNumber)),s.addEventListener("change",()=>u(s.valueAsNumber)),l(r),o.appendChild(i),o.appendChild(a),o.appendChild(s),o}function Y1(n){return Number.isInteger(n)?n.toString():parseFloat(n.toFixed(6)).toString()}function G1({container:n,onCommit:e}){const t=$1({onPreview:(o,i)=>{const a=j1(o,i);return R1(X1()),a},onCommit:e});t!==null&&n.appendChild(t)}function X1(){const n={};for(const e of f0())n[e.id]=d0(e.id);return n}class K1{constructor(e){this.navigator=null;const{objectRenderers:t,scale:o=1,...i}=e;this.props={presentation:Ye(),element:document.body,objectRenderers:{...O1,...t},cacheDurationMinutes:15,scale:Z1(o),...i},this.state={...n0}}async present(){const{presentation:e,element:t,scale:o}=this.props;this.hideCursor();const i=Wn(e.title),a=t1(e.size),s=k1(e.size);s.style.transformOrigin="center center",s.style.transform=`scale(${o})`,this.state={...n0,accessibleDescriptionElement:i,imageById:await N1({...e.resources.images,...Un(e)}),canvas:a,extrasContainer:s};const r=jn(e,t),l=Ge(t),c=(h,f)=>{this.state.shortcutState.shortcuts.b={slideIndex:this.state.slideIndex,buildIndex:this.state.buildIndex},this.renderSlide(h??this.state.slideIndex,f)},u=(h=!1)=>{l&&(this.navigator=kn({presentation:e,shortcutState:this.state.shortcutState,onNavigateToSlide:f=>this.renderSlide(f),onRenderSlide:c,onNext:f=>this.next(f),onPrevious:f=>this.previous(f),forceRefresh:h}),this.updateNavigator())};Ve(e,r,this.state.shortcutState,{onNext:h=>this.next(h),onPrevious:h=>this.previous(h),onRenderSlide:c,onShowNavigator:()=>u()},{focusOnPointerDown:!l,keyEventTarget:l?window:r}),t.replaceChildren(),r.appendChild(i),r.appendChild(a),r.appendChild(s),G1({container:r,onCommit:()=>this.reloadAfterVariableChange()}),t.appendChild(r);const g=$n(e,this.props.cacheDurationMinutes);g!==null?this.renderSlide(g.slideIndex,g.buildIndex):this.renderSlide(0),Mn()&&u(!0)}reloadAfterVariableChange(){const{presentation:e}=this.props;this.state.currentAnimationId!==null&&(cancelAnimationFrame(this.state.currentAnimationId),this.state.currentAnimationId=null),e0({title:e.title,slideIndex:this.state.slideIndex,buildIndex:this.state.buildIndex}),window.location.reload()}renderSlide(e,t=0,o=null){const{presentation:i}=this.props,{canvas:a}=this.state,s=this.state.slideIndex!==e;this.state.slideIndex=e,this.state.buildIndex=t,o===null&&e0({title:i.title,slideIndex:e,buildIndex:t});const r=i.slides[e];if(!(r===void 0||a===null)){if(s||this.state.mountedExtrasCleanups.length===0&&r.extras.length>0){for(const l of this.state.mountedExtrasCleanups)l();this.state.mountedExtrasCleanups=[];for(const l of r.extras){const c=_1(this.state.extrasContainer,l);c!==null&&this.state.mountedExtrasCleanups.push(c)}}if(this.renderCanvas(a,e,t,o,this.props.scale),o===null){if(this.state.accessibleDescriptionElement!==null){const l=t0({slide:r,buildIndex:t,buildTime:o});Jn(this.state.accessibleDescriptionElement,Yn(r,l))}this.updateNavigator()}}}renderCanvas(e,t,o=0,i=null,a=1){const{objectRenderers:s,presentation:r}=this.props,{imageById:l}=this.state;e.width=r.size.width,e.height=r.size.height;const c=e.getContext("2d");if(c===null)return;const u={type:Q.Browser,context:c};Qn(e,u);const g=r.slides[t];if(g===void 0)return;const h=t0({slide:g,buildIndex:o,buildTime:i});u.context.fillStyle=oe(r.backgroundColor),u.context.fillRect(0,0,e.width,e.height);function f(x,T){const C=s[x.objectType],M=h.get(x);C===void 0||M===void 0||C({ctx:u,imageById:l,object:M,opacity:T,renderScale:a,renderObject:f,createPath2D:e1,slideSize:r.size})}const v=a!==1;v&&(u.context.save(),u.context.translate(e.width*(1-a)/2,e.height*(1-a)/2),u.context.scale(a,a));for(const x of g.objects)f(x,1);v&&u.context.restore()}updateNavigator(){const{navigator:e}=this;if(e===null)return;if(!e.isOpen()){this.navigator=null;return}const{slideIndex:t,buildIndex:o}=this.state,i=this.getNextSlideBuild(t,o);e.update(t,o,i.slideIndex,i.buildIndex),this.renderCanvas(e.currentCanvas,t,o),i.slideIndex===null?this.renderEndCanvas(e.nextCanvas):this.renderCanvas(e.nextCanvas,i.slideIndex,i.buildIndex)}getNextSlideBuild(e,t){const{presentation:o}=this.props,i=o.slides[e];return i===void 0?{slideIndex:e,buildIndex:t}:t<i.animations.length?{slideIndex:e,buildIndex:t+1}:e+1<o.slides.length?{slideIndex:e+1,buildIndex:0}:{slideIndex:null,buildIndex:0}}renderEndCanvas(e){const{presentation:t}=this.props;e.width=t.size.width,e.height=t.size.height;const o=e.getContext("2d");o!==null&&(o.fillStyle="#000000",o.fillRect(0,0,e.width,e.height))}next(e=!1){const{presentation:t}=this.props,{currentAnimationId:o,slideIndex:i,buildIndex:a}=this.state;this.hideCursor(),o!==null&&cancelAnimationFrame(o);const s=t.slides[i];if(s===void 0)return;const r=s.animations[a];if(r!==void 0&&!e){const l=performance.now(),c=zn(r),u=g=>{const h=g-l;h<c?(this.renderSlide(i,a+1,h),this.state.currentAnimationId=requestAnimationFrame(u)):this.renderSlide(i,a+1,null)};this.state.currentAnimationId=requestAnimationFrame(u)}else i+1<t.slides.length&&this.renderSlide(i+1)}previous(e=!1){const{currentAnimationId:t,slideIndex:o,buildIndex:i}=this.state;if(this.hideCursor(),t!==null&&cancelAnimationFrame(t),i>0)e?this.renderSlide(o,0):this.renderSlide(o,i-1);else if(o>0){const a=this.props.presentation.slides[o-1],s=e?0:(a==null?void 0:a.animations.length)??0;this.renderSlide(o-1,s)}else this.renderSlide(0,0)}hasNext(){const{presentation:e}=this.props,{slideIndex:t,buildIndex:o}=this.state,i=e.slides[t];return i===void 0?!1:i.animations[o]!==void 0?!0:t+1<e.slides.length}hasPrevious(){const{slideIndex:e,buildIndex:t}=this.state;return t>0||e>0}hideCursor(){var e,t;this.props.element.style.cursor="none",(t=(e=this.state.canvas)==null?void 0:e.parentElement)==null||t.style.setProperty("cursor","none")}}function Z1(n){return n<=0||n>1?(console.warn(`BrowserCanvasRenderer scale must be positive and no greater than 1. Received ${n}; using 1 instead.`),1):n}function J1(n=1e3,e={}){return{type:X.PAUSE,isKey:!1,duration:n,notes:null,shortcut:null,...e}}function Q1(n,e={}){return{...e,text:n}}function ti(n=K.BLACK){return{...n,alpha:1}}function ei(n){for(var e=-1,t=n.length,o,i=n[t-1],a=0;++e<t;)o=i,i=n[e],a+=o[1]*i[0]-o[0]*i[1];return a/2}function ni(n){for(var e=-1,t=n.length,o=n[t-1],i,a,s=o[0],r=o[1],l=0;++e<t;)i=s,a=r,o=n[e],s=o[0],r=o[1],i-=s,a-=r,l+=Math.sqrt(i*i+a*a);return l}function ii(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ce,y0;function ri(){if(y0)return ce;y0=1;var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function t(f){return f===10||f===13||f===8232||f===8233||f===32||f===9||f===11||f===12||f===160||f>=5760&&e.indexOf(f)>=0}function o(f){switch(f|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function i(f){return(f|32)===97}function a(f){return f>=48&&f<=57}function s(f){return f>=48&&f<=57||f===43||f===45||f===46}function r(f){this.index=0,this.path=f,this.max=f.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function l(f){for(;f.index<f.max&&t(f.path.charCodeAt(f.index));)f.index++}function c(f){var v=f.path.charCodeAt(f.index);if(v===48){f.param=0,f.index++;return}if(v===49){f.param=1,f.index++;return}f.err="SvgPath: arc flag can be 0 or 1 only (at pos "+f.index+")"}function u(f){var v=f.index,x=v,T=f.max,C=!1,M=!1,L=!1,I=!1,S;if(x>=T){f.err="SvgPath: missed param (at pos "+x+")";return}if(S=f.path.charCodeAt(x),(S===43||S===45)&&(x++,S=x<T?f.path.charCodeAt(x):0),!a(S)&&S!==46){f.err="SvgPath: param should start with 0..9 or `.` (at pos "+x+")";return}if(S!==46){if(C=S===48,x++,S=x<T?f.path.charCodeAt(x):0,C&&x<T&&S&&a(S)){f.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+v+")";return}for(;x<T&&a(f.path.charCodeAt(x));)x++,M=!0;S=x<T?f.path.charCodeAt(x):0}if(S===46){for(I=!0,x++;a(f.path.charCodeAt(x));)x++,L=!0;S=x<T?f.path.charCodeAt(x):0}if(S===101||S===69){if(I&&!M&&!L){f.err="SvgPath: invalid float exponent (at pos "+x+")";return}if(x++,S=x<T?f.path.charCodeAt(x):0,(S===43||S===45)&&x++,x<T&&a(f.path.charCodeAt(x)))for(;x<T&&a(f.path.charCodeAt(x));)x++;else{f.err="SvgPath: invalid float exponent (at pos "+x+")";return}}f.index=x,f.param=parseFloat(f.path.slice(v,x))+0}function g(f){var v,x;v=f.path[f.segmentStart],x=v.toLowerCase();var T=f.data;if(x==="m"&&T.length>2&&(f.result.push([v,T[0],T[1]]),T=T.slice(2),x="l",v=v==="m"?"l":"L"),x==="r")f.result.push([v].concat(T));else for(;T.length>=n[x]&&(f.result.push([v].concat(T.splice(0,n[x]))),!!n[x]););}function h(f){var v=f.max,x,T,C,M,L;if(f.segmentStart=f.index,x=f.path.charCodeAt(f.index),T=i(x),!o(x)){f.err="SvgPath: bad command "+f.path[f.index]+" (at pos "+f.index+")";return}if(M=n[f.path[f.index].toLowerCase()],f.index++,l(f),f.data=[],!M){g(f);return}for(C=!1;;){for(L=M;L>0;L--){if(T&&(L===3||L===4)?c(f):u(f),f.err.length){g(f);return}f.data.push(f.param),l(f),C=!1,f.index<v&&f.path.charCodeAt(f.index)===44&&(f.index++,l(f),C=!0)}if(!C&&(f.index>=f.max||!s(f.path.charCodeAt(f.index))))break}g(f)}return ce=function(v){var x=new r(v),T=x.max;for(l(x);x.index<T&&!x.err.length;)h(x);return x.result.length&&("mM".indexOf(x.result[0][0])<0?(x.err="SvgPath: string should start with `M` or `m`",x.result=[]):x.result[0][0]="M"),{err:x.err,segments:x.result}},ce}var ue,x0;function v0(){if(x0)return ue;x0=1;function n(t,o){return[t[0]*o[0]+t[2]*o[1],t[1]*o[0]+t[3]*o[1],t[0]*o[2]+t[2]*o[3],t[1]*o[2]+t[3]*o[3],t[0]*o[4]+t[2]*o[5]+t[4],t[1]*o[4]+t[3]*o[5]+t[5]]}function e(){if(!(this instanceof e))return new e;this.queue=[],this.cache=null}return e.prototype.matrix=function(t){return t[0]===1&&t[1]===0&&t[2]===0&&t[3]===1&&t[4]===0&&t[5]===0?this:(this.cache=null,this.queue.push(t),this)},e.prototype.translate=function(t,o){return(t!==0||o!==0)&&(this.cache=null,this.queue.push([1,0,0,1,t,o])),this},e.prototype.scale=function(t,o){return(t!==1||o!==1)&&(this.cache=null,this.queue.push([t,0,0,o,0,0])),this},e.prototype.rotate=function(t,o,i){var a,s,r;return t!==0&&(this.translate(o,i),a=t*Math.PI/180,s=Math.cos(a),r=Math.sin(a),this.queue.push([s,r,-r,s,0,0]),this.cache=null,this.translate(-o,-i)),this},e.prototype.skewX=function(t){return t!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},e.prototype.skewY=function(t){return t!==0&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},e.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=n(this.cache,this.queue[t]);return this.cache},e.prototype.calc=function(t,o,i){var a;return this.queue.length?(this.cache||(this.cache=this.toArray()),a=this.cache,[t*a[0]+o*a[2]+(i?0:a[4]),t*a[1]+o*a[3]+(i?0:a[5])]):[t,o]},ue=e,ue}var fe,w0;function oi(){if(w0)return fe;w0=1;var n=v0(),e={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},t=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,o=/[\s,]+/;return fe=function(a){var s=new n,r,l;return a.split(t).forEach(function(c){if(c.length){if(typeof e[c]<"u"){r=c;return}switch(l=c.split(o).map(function(u){return+u||0}),r){case"matrix":l.length===6&&s.matrix(l);return;case"scale":l.length===1?s.scale(l[0],l[0]):l.length===2&&s.scale(l[0],l[1]);return;case"rotate":l.length===1?s.rotate(l[0],0,0):l.length===3&&s.rotate(l[0],l[1],l[2]);return;case"translate":l.length===1?s.translate(l[0],0):l.length===2&&s.translate(l[0],l[1]);return;case"skewX":l.length===1&&s.skewX(l[0]);return;case"skewY":l.length===1&&s.skewY(l[0]);return}}}),s},fe}var de,m0;function si(){if(m0)return de;m0=1;var n=Math.PI*2;function e(i,a,s,r){var l=i*r-a*s<0?-1:1,c=i*s+a*r;return c>1&&(c=1),c<-1&&(c=-1),l*Math.acos(c)}function t(i,a,s,r,l,c,u,g,h,f){var v=f*(i-s)/2+h*(a-r)/2,x=-h*(i-s)/2+f*(a-r)/2,T=u*u,C=g*g,M=v*v,L=x*x,I=T*C-T*L-C*M;I<0&&(I=0),I/=T*L+C*M,I=Math.sqrt(I)*(l===c?-1:1);var S=I*u/g*x,k=I*-g/u*v,B=f*S-h*k+(i+s)/2,W=h*S+f*k+(a+r)/2,D=(v-S)/u,Y=(x-k)/g,dt=(-v-S)/u,ot=(-x-k)/g,xt=e(1,0,D,Y),ht=e(D,Y,dt,ot);return c===0&&ht>0&&(ht-=n),c===1&&ht<0&&(ht+=n),[B,W,xt,ht]}function o(i,a){var s=1.3333333333333333*Math.tan(a/4),r=Math.cos(i),l=Math.sin(i),c=Math.cos(i+a),u=Math.sin(i+a);return[r,l,r-l*s,l+r*s,c+u*s,u-c*s,c,u]}return de=function(a,s,r,l,c,u,g,h,f){var v=Math.sin(f*n/360),x=Math.cos(f*n/360),T=x*(a-r)/2+v*(s-l)/2,C=-v*(a-r)/2+x*(s-l)/2;if(T===0&&C===0)return[];if(g===0||h===0)return[];g=Math.abs(g),h=Math.abs(h);var M=T*T/(g*g)+C*C/(h*h);M>1&&(g*=Math.sqrt(M),h*=Math.sqrt(M));var L=t(a,s,r,l,c,u,g,h,v,x),I=[],S=L[2],k=L[3],B=Math.max(Math.ceil(Math.abs(k)/(n/4)),1);k/=B;for(var W=0;W<B;W++)I.push(o(S,k)),S+=k;return I.map(function(D){for(var Y=0;Y<D.length;Y+=2){var dt=D[Y+0],ot=D[Y+1];dt*=g,ot*=h;var xt=x*dt-v*ot,ht=v*dt+x*ot;D[Y+0]=xt+L[0],D[Y+1]=ht+L[1]}return D})},de}var ge,b0;function ai(){if(b0)return ge;b0=1;var n=1e-10,e=Math.PI/180;function t(o,i,a){if(!(this instanceof t))return new t(o,i,a);this.rx=o,this.ry=i,this.ax=a}return t.prototype.transform=function(o){var i=Math.cos(this.ax*e),a=Math.sin(this.ax*e),s=[this.rx*(o[0]*i+o[2]*a),this.rx*(o[1]*i+o[3]*a),this.ry*(-o[0]*a+o[2]*i),this.ry*(-o[1]*a+o[3]*i)],r=s[0]*s[0]+s[2]*s[2],l=s[1]*s[1]+s[3]*s[3],c=((s[0]-s[3])*(s[0]-s[3])+(s[2]+s[1])*(s[2]+s[1]))*((s[0]+s[3])*(s[0]+s[3])+(s[2]-s[1])*(s[2]-s[1])),u=(r+l)/2;if(c<n*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var g=s[0]*s[1]+s[2]*s[3];c=Math.sqrt(c);var h=u+c/2,f=u-c/2;return this.ax=Math.abs(g)<n&&Math.abs(h-l)<n?90:Math.atan(Math.abs(g)>Math.abs(h-l)?(h-r)/g:g/(h-l))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(f)):(this.ax+=90,this.rx=Math.sqrt(f),this.ry=Math.sqrt(h)),this},t.prototype.isDegenerate=function(){return this.rx<n*this.ry||this.ry<n*this.rx},ge=t,ge}var pe,A0;function li(){if(A0)return pe;A0=1;var n=ri(),e=oi(),t=v0(),o=si(),i=ai();function a(s){if(!(this instanceof a))return new a(s);var r=n(s);this.segments=r.segments,this.err=r.err,this.__stack=[]}return a.from=function(s){if(typeof s=="string")return new a(s);if(s instanceof a){var r=new a("");return r.err=s.err,r.segments=s.segments.map(function(l){return l.slice()}),r.__stack=s.__stack.map(function(l){return t().matrix(l.toArray())}),r}throw new Error("SvgPath.from: invalid param type "+s)},a.prototype.__matrix=function(s){var r=this,l;s.queue.length&&this.iterate(function(c,u,g,h){var f,v,x,T;switch(c[0]){case"v":f=s.calc(0,c[1],!0),v=f[0]===0?["v",f[1]]:["l",f[0],f[1]];break;case"V":f=s.calc(g,c[1],!1),v=f[0]===s.calc(g,h,!1)[0]?["V",f[1]]:["L",f[0],f[1]];break;case"h":f=s.calc(c[1],0,!0),v=f[1]===0?["h",f[0]]:["l",f[0],f[1]];break;case"H":f=s.calc(c[1],h,!1),v=f[1]===s.calc(g,h,!1)[1]?["H",f[0]]:["L",f[0],f[1]];break;case"a":case"A":var C=s.toArray(),M=i(c[1],c[2],c[3]).transform(C);if(C[0]*C[3]-C[1]*C[2]<0&&(c[5]=c[5]?"0":"1"),f=s.calc(c[6],c[7],c[0]==="a"),c[0]==="A"&&c[6]===g&&c[7]===h||c[0]==="a"&&c[6]===0&&c[7]===0){v=[c[0]==="a"?"l":"L",f[0],f[1]];break}M.isDegenerate()?v=[c[0]==="a"?"l":"L",f[0],f[1]]:v=[c[0],M.rx,M.ry,M.ax,c[4],c[5],f[0],f[1]];break;case"m":T=u>0,f=s.calc(c[1],c[2],T),v=["m",f[0],f[1]];break;default:for(x=c[0],v=[x],T=x.toLowerCase()===x,l=1;l<c.length;l+=2)f=s.calc(c[l],c[l+1],T),v.push(f[0],f[1])}r.segments[u]=v},!0)},a.prototype.__evaluateStack=function(){var s,r;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(s=t(),r=this.__stack.length;--r>=0;)s.matrix(this.__stack[r].toArray());this.__matrix(s),this.__stack=[]}},a.prototype.toString=function(){var s="",r="",l=!1;this.__evaluateStack();for(var c=0,u=this.segments.length;c<u;c++){var g=this.segments[c],h=g[0];h!==r||h==="m"||h==="M"?(h==="m"&&r==="z"&&(s+=" "),s+=h,l=!1):l=!0;for(var f=1;f<g.length;f++){var v=g[f];f===1?l&&v>=0&&(s+=" "):v>=0&&(s+=" "),s+=v}r=h}return s},a.prototype.translate=function(s,r){return this.__stack.push(t().translate(s,r||0)),this},a.prototype.scale=function(s,r){return this.__stack.push(t().scale(s,!r&&r!==0?s:r)),this},a.prototype.rotate=function(s,r,l){return this.__stack.push(t().rotate(s,r||0,l||0)),this},a.prototype.skewX=function(s){return this.__stack.push(t().skewX(s)),this},a.prototype.skewY=function(s){return this.__stack.push(t().skewY(s)),this},a.prototype.matrix=function(s){return this.__stack.push(t().matrix(s)),this},a.prototype.transform=function(s){return s.trim()?(this.__stack.push(e(s)),this):this},a.prototype.round=function(s){var r=0,l=0,c=0,u=0,g;return s=s||0,this.__evaluateStack(),this.segments.forEach(function(h){var f=h[0].toLowerCase()===h[0];switch(h[0]){case"H":case"h":f&&(h[1]+=c),c=h[1]-h[1].toFixed(s),h[1]=+h[1].toFixed(s);return;case"V":case"v":f&&(h[1]+=u),u=h[1]-h[1].toFixed(s),h[1]=+h[1].toFixed(s);return;case"Z":case"z":c=r,u=l;return;case"M":case"m":f&&(h[1]+=c,h[2]+=u),c=h[1]-h[1].toFixed(s),u=h[2]-h[2].toFixed(s),r=c,l=u,h[1]=+h[1].toFixed(s),h[2]=+h[2].toFixed(s);return;case"A":case"a":f&&(h[6]+=c,h[7]+=u),c=h[6]-h[6].toFixed(s),u=h[7]-h[7].toFixed(s),h[1]=+h[1].toFixed(s),h[2]=+h[2].toFixed(s),h[3]=+h[3].toFixed(s+2),h[6]=+h[6].toFixed(s),h[7]=+h[7].toFixed(s);return;default:g=h.length,f&&(h[g-2]+=c,h[g-1]+=u),c=h[g-2]-h[g-2].toFixed(s),u=h[g-1]-h[g-1].toFixed(s),h.forEach(function(v,x){x&&(h[x]=+h[x].toFixed(s))});return}}),this},a.prototype.iterate=function(s,r){var l=this.segments,c={},u=!1,g=0,h=0,f=0,v=0,x,T,C;if(r||this.__evaluateStack(),l.forEach(function(M,L){var I=s(M,L,g,h);Array.isArray(I)&&(c[L]=I,u=!0);var S=M[0]===M[0].toLowerCase();switch(M[0]){case"m":case"M":g=M[1]+(S?g:0),h=M[2]+(S?h:0),f=g,v=h;return;case"h":case"H":g=M[1]+(S?g:0);return;case"v":case"V":h=M[1]+(S?h:0);return;case"z":case"Z":g=f,h=v;return;default:g=M[M.length-2]+(S?g:0),h=M[M.length-1]+(S?h:0)}}),!u)return this;for(C=[],x=0;x<l.length;x++)if(typeof c[x]<"u")for(T=0;T<c[x].length;T++)C.push(c[x][T]);else C.push(l[x]);return this.segments=C,this},a.prototype.abs=function(){return this.iterate(function(s,r,l,c){var u=s[0],g=u.toUpperCase(),h;if(u!==g)switch(s[0]=g,u){case"v":s[1]+=c;return;case"a":s[6]+=l,s[7]+=c;return;default:for(h=1;h<s.length;h++)s[h]+=h%2?l:c}},!0),this},a.prototype.rel=function(){return this.iterate(function(s,r,l,c){var u=s[0],g=u.toLowerCase(),h;if(u!==g&&!(r===0&&u==="M"))switch(s[0]=g,u){case"V":s[1]-=c;return;case"A":s[6]-=l,s[7]-=c;return;default:for(h=1;h<s.length;h++)s[h]-=h%2?l:c}},!0),this},a.prototype.unarc=function(){return this.iterate(function(s,r,l,c){var u,g,h,f=[],v=s[0];return v!=="A"&&v!=="a"?null:(v==="a"?(g=l+s[6],h=c+s[7]):(g=s[6],h=s[7]),u=o(l,c,g,h,s[4],s[5],s[1],s[2],s[3]),u.length===0?[[s[0]==="a"?"l":"L",s[6],s[7]]]:(u.forEach(function(x){f.push(["C",x[2],x[3],x[4],x[5],x[6],x[7]])}),f))}),this},a.prototype.unshort=function(){var s=this.segments,r,l,c,u,g;return this.iterate(function(h,f,v,x){var T=h[0],C=T.toUpperCase(),M;f&&(C==="T"?(M=T==="t",c=s[f-1],c[0]==="Q"?(r=c[1]-v,l=c[2]-x):c[0]==="q"?(r=c[1]-c[3],l=c[2]-c[4]):(r=0,l=0),u=-r,g=-l,M||(u+=v,g+=x),s[f]=[M?"q":"Q",u,g,h[1],h[2]]):C==="S"&&(M=T==="s",c=s[f-1],c[0]==="C"?(r=c[3]-v,l=c[4]-x):c[0]==="c"?(r=c[3]-c[5],l=c[4]-c[6]):(r=0,l=0),u=-r,g=-l,M||(u+=v,g+=x),s[f]=[M?"c":"C",u,g,h[1],h[2],h[3],h[4]]))}),this},pe=a,pe}var ye,T0;function hi(){return T0||(T0=1,ye=li()),ye}var ci=hi();const ui=ii(ci);var xe={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},fi=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function di(n){var e=[];return n.replace(fi,function(t,o,i){var a=o.toLowerCase();for(i=pi(i),a==="m"&&i.length>2&&(e.push([o].concat(i.splice(0,2))),a="l",o=o==="m"?"l":"L");i.length>=0;){if(i.length===xe[a])return i.unshift(o),e.push(i);if(i.length<xe[a])throw new Error("malformed path data");e.push([o].concat(i.splice(0,xe[a])))}}),e}var gi=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function pi(n){var e=n.match(gi);return e?e.map(Number):[]}function at(n,e,t,o,i,a,s,r){return new ve(n,e,t,o,i,a,s,r)}function ve(n,e,t,o,i,a,s,r){this.a={x:n,y:e},this.b={x:t,y:o},this.c={x:i,y:a},this.d={x:s,y:r},s!=null&&r!==null&&r!==void 0?(this.getArcLength=Mi,this.getPoint=vi,this.getDerivative=xi):(this.getArcLength=wi,this.getPoint=L0,this.getDerivative=yi),this.init()}ve.prototype={constructor:ve,init:function(){this.length=this.getArcLength([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y])},getTotalLength:function(){return this.length},getPointAtLength:function(n){var e=we(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]);return this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e)},getTangentAtLength:function(n){var e=we(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;return o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0},i},getPropertiesAtLength:function(n){var e=we(n,this.length,this.getArcLength,[this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y]),t=this.getDerivative([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e),o=Math.sqrt(t.x*t.x+t.y*t.y),i;o>0?i={x:t.x/o,y:t.y/o}:i={x:0,y:0};var a=this.getPoint([this.a.x,this.b.x,this.c.x,this.d.x],[this.a.y,this.b.y,this.c.y,this.d.y],e);return{x:a.x,y:a.y,tangentX:i.x,tangentY:i.y}}};function yi(n,e,t){return{x:(1-t)*2*(n[1]-n[0])+t*2*(n[2]-n[1]),y:(1-t)*2*(e[1]-e[0])+t*2*(e[2]-e[1])}}function xi(n,e,t){var o=L0([3*(n[1]-n[0]),3*(n[2]-n[1]),3*(n[3]-n[2])],[3*(e[1]-e[0]),3*(e[2]-e[1]),3*(e[3]-e[2])],t);return o}function we(n,e,t,o,i){for(var a=1,s=n/e,r=(n-t(o,i,s))/e;a>.001;){var l=t(o,i,s+r),c=t(o,i,s-r),u=Math.abs(n-l)/e,g=Math.abs(n-c)/e;u<a?(a=u,s+=r):g<a?(a=g,s-=r):r/=2}return s}function L0(n,e,t){var o=(1-t)*(1-t)*n[0]+2*(1-t)*t*n[1]+t*t*n[2],i=(1-t)*(1-t)*e[0]+2*(1-t)*t*e[1]+t*t*e[2];return{x:o,y:i}}function vi(n,e,t){var o=(1-t)*(1-t)*(1-t)*n[0]+3*(1-t)*(1-t)*t*n[1]+3*(1-t)*t*t*n[2]+t*t*t*n[3],i=(1-t)*(1-t)*(1-t)*e[0]+3*(1-t)*(1-t)*t*e[1]+3*(1-t)*t*t*e[2]+t*t*t*e[3];return{x:o,y:i}}function wi(n,e,t){t===void 0&&(t=1);var o=n[0]-2*n[1]+n[2],i=e[0]-2*e[1]+e[2],a=2*n[1]-2*n[0],s=2*e[1]-2*e[0],r=4*(o*o+i*i),l=4*(o*a+i*s),c=a*a+s*s;if(r===0)return t*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(e[2]-e[0],2));var u=l/(2*r),g=c/r,h=t+u,f=g-u*u;return Math.sqrt(r)/2*(h*Math.sqrt(h*h+f)-u*Math.sqrt(u*u+f)+f*Math.log(Math.abs((h+Math.sqrt(h*h+f))/(u+Math.sqrt(u*u+f)))))}var mi=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],bi=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],Ai=[[1],[1,1],[1,2,1],[1,3,3,1]];function Ti(n,e){return Ai[n][e]}function me(n,e,t){var o=t.length-1,i,a,s;if(o===0)return 0;if(n===0){for(a=0,s=0;s<=o;s++)a+=Ti(o,s)*Math.pow(1-e,o-s)*Math.pow(e,s)*t[s];return a}else{for(i=new Array(o),s=0;s<o;s++)i[s]=o*(t[s+1]-t[s]);return me(n-1,e,i)}}function Li(n,e,t){var o=me(1,t,n),i=me(1,t,e),a=o*o+i*i;return Math.sqrt(a)}function Mi(n,e,t){var o,i,a,s;t===void 0&&(t=1);var r=20;for(o=t/2,i=0,a=0;a<r;a++)s=o*mi[r][a]+o,i+=bi[r][a]*Li(n,e,s);return o*i}var kt=Math.PI*2;function M0(n,e,t,o){var i=n*o-e*t<0?-1:1,a=n*t+e*o;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)}function Ci(n,e,t,o,i,a,s,r,l,c){var u=c*(n-t)/2+l*(e-o)/2,g=-l*(n-t)/2+c*(e-o)/2,h=s*s,f=r*r,v=u*u,x=g*g,T=h*f-h*x-f*v;T<0&&(T=0),T/=h*x+f*v,T=Math.sqrt(T)*(i===a?-1:1);var C=T*s/r*g,M=T*-r/s*u,L=c*C-l*M+(n+t)/2,I=l*C+c*M+(e+o)/2,S=(u-C)/s,k=(g-M)/r,B=(-u-C)/s,W=(-g-M)/r,D=M0(1,0,S,k),Y=M0(S,k,B,W);return a===0&&Y>0&&(Y-=kt),a===1&&Y<0&&(Y+=kt),[L,I,D,Y]}function Si(n,e){var t=1.3333333333333333*Math.tan(e/4),o=Math.cos(n),i=Math.sin(n),a=Math.cos(n+e),s=Math.sin(n+e);return[o,i,o-i*t,i+o*t,a+s*t,s-a*t,a,s]}function Pi(n,e,t,o,i,a,s,r,l){var c=Math.sin(i*kt/360),u=Math.cos(i*kt/360),g=u*(n-r)/2+c*(e-l)/2,h=-c*(n-r)/2+u*(e-l)/2;if(g===0&&h===0)return[];if(t===0||o===0)return[];t=Math.abs(t),o=Math.abs(o);var f=g*g/(t*t)+h*h/(o*o);f>1&&(t*=Math.sqrt(f),o*=Math.sqrt(f));var v=Ci(n,e,r,l,a,s,t,o,c,u),x=[],T=v[2],C=v[3],M=Math.max(Math.ceil(Math.abs(C)/(kt/4)),1);C/=M;for(var L=0;L<M;L++)x.push(Si(T,C)),T+=C;return x.map(function(I){for(var S=0;S<I.length;S+=2){var k=I[S+0],B=I[S+1];k*=t,B*=o;var W=u*k-c*B,D=c*k+u*B;I[S+0]=W+v[0],I[S+1]=D+v[1]}return I})}function C0(n,e,t,o,i,a,s,r,l){return new be(n,e,t,o,i,a,s,r,l)}function be(n,e,t,o,i,a,s,r,l){var c=0,u=[],g=[],h=Pi(n,e,t,o,i,a,s,r,l);h.forEach(function(f){var v=new at(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]),x=v.getTotalLength();c+=x,u.push(x),g.push(v)}),this.length=c,this.partialLengths=u,this.curves=g}be.prototype={constructor:be,init:function(){},getTotalLength:function(){return this.length},getPointAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getPointAtLength(n-t)},getTangentAtLength:function(n){n<0?n=0:n>this.length&&(n=this.length);for(var e=this.partialLengths.length-1;this.partialLengths[e]>=n&&this.partialLengths[e]>0;)e--;e<this.partialLengths.length-1&&e++;for(var t=0,o=0;o<e;o++)t+=this.partialLengths[o];return this.curves[e].getTangentAtLength(n-t)},getPropertiesAtLength:function(n){var e=this.getTangentAtLength(n),t=this.getPointAtLength(n);return{x:t.x,y:t.y,tangentX:e.x,tangentY:e.y}}};function lt(n,e,t,o){return new _t(n,e,t,o)}function _t(n,e,t,o){this.x0=n,this.x1=e,this.y0=t,this.y1=o}_t.prototype.getTotalLength=function(){return Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2))},_t.prototype.getPointAtLength=function(n){var e=n/Math.sqrt(Math.pow(this.x0-this.x1,2)+Math.pow(this.y0-this.y1,2)),t=(this.x1-this.x0)*e,o=(this.y1-this.y0)*e;return{x:this.x0+t,y:this.y0+o}},_t.prototype.getTangentAtLength=function(){var n=Math.sqrt((this.x1-this.x0)*(this.x1-this.x0)+(this.y1-this.y0)*(this.y1-this.y0));return{x:(this.x1-this.x0)/n,y:(this.y1-this.y0)/n}},_t.prototype.getPropertiesAtLength=function(n){var e=this.getPointAtLength(n),t=this.getTangentAtLength();return{x:e.x,y:e.y,tangentX:t.x,tangentY:t.y}};function Ei(n){var e=0,t=[],o=[];function i(s){if(!s)return null;for(var r=di(s),l=[0,0],c=[0,0],u,g,h=0;h<r.length;h++)r[h][0]==="M"?(l=[r[h][1],r[h][2]],g=[l[0],l[1]],o.push(null)):r[h][0]==="m"?(l=[r[h][1]+l[0],r[h][2]+l[1]],g=[l[0],l[1]],o.push(null)):r[h][0]==="L"?(e=e+Math.sqrt(Math.pow(l[0]-r[h][1],2)+Math.pow(l[1]-r[h][2],2)),o.push(new lt(l[0],r[h][1],l[1],r[h][2])),l=[r[h][1],r[h][2]]):r[h][0]==="l"?(e=e+Math.sqrt(Math.pow(r[h][1],2)+Math.pow(r[h][2],2)),o.push(new lt(l[0],r[h][1]+l[0],l[1],r[h][2]+l[1])),l=[r[h][1]+l[0],r[h][2]+l[1]]):r[h][0]==="H"?(e=e+Math.abs(l[0]-r[h][1]),o.push(new lt(l[0],r[h][1],l[1],l[1])),l[0]=r[h][1]):r[h][0]==="h"?(e=e+Math.abs(r[h][1]),o.push(new lt(l[0],l[0]+r[h][1],l[1],l[1])),l[0]=r[h][1]+l[0]):r[h][0]==="V"?(e=e+Math.abs(l[1]-r[h][1]),o.push(new lt(l[0],l[0],l[1],r[h][1])),l[1]=r[h][1]):r[h][0]==="v"?(e=e+Math.abs(r[h][1]),o.push(new lt(l[0],l[0],l[1],l[1]+r[h][1])),l[1]=r[h][1]+l[1]):r[h][0]==="z"||r[h][0]==="Z"?(e=e+Math.sqrt(Math.pow(g[0]-l[0],2)+Math.pow(g[1]-l[1],2)),o.push(new lt(l[0],g[0],l[1],g[1])),l=[g[0],g[1]]):r[h][0]==="C"?(u=new at(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4],r[h][5],r[h][6]),e=e+u.getTotalLength(),l=[r[h][5],r[h][6]],o.push(u)):r[h][0]==="c"?(u=new at(l[0],l[1],l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4],l[0]+r[h][5],l[1]+r[h][6]),e=e+u.getTotalLength(),l=[r[h][5]+l[0],r[h][6]+l[1]],o.push(u)):r[h][0]==="S"?(h>0&&["C","c","S","s"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],2*l[0]-r[h-1][r[h-1].length-4],2*l[1]-r[h-1][r[h-1].length-3],r[h][1],r[h][2],r[h][3],r[h][4]):u=new at(l[0],l[1],l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4]),e=e+u.getTotalLength(),l=[r[h][3],r[h][4]],o.push(u)):r[h][0]==="s"?(h>0&&["C","c","S","s"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],l[0]+u.d.x-u.c.x,l[1]+u.d.y-u.c.y,l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4]):u=new at(l[0],l[1],l[0],l[1],l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4]),e=e+u.getTotalLength(),l=[r[h][3]+l[0],r[h][4]+l[1]],o.push(u)):r[h][0]==="Q"?(l[0]!=r[h][1]&&l[1]!=r[h][2]?u=new at(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4]):u=new lt(r[h][1],r[h][3],r[h][2],r[h][4]),e=e+u.getTotalLength(),o.push(u),l=[r[h][3],r[h][4]],c=[r[h][1],r[h][2]]):r[h][0]==="q"?(r[h][1]==0&&r[h][2]==0?u=new lt(l[0]+r[h][1],l[0]+r[h][3],l[1]+r[h][2],l[1]+r[h][4]):u=new at(l[0],l[1],l[0]+r[h][1],l[1]+r[h][2],l[0]+r[h][3],l[1]+r[h][4]),e=e+u.getTotalLength(),c=[l[0]+r[h][1],l[1]+r[h][2]],l=[r[h][3]+l[0],r[h][4]+l[1]],o.push(u)):r[h][0]==="T"?(h>0&&["Q","q","T","t"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],2*l[0]-c[0],2*l[1]-c[1],r[h][1],r[h][2]):u=new lt(l[0],r[h][1],l[1],r[h][2]),o.push(u),e=e+u.getTotalLength(),c=[2*l[0]-c[0],2*l[1]-c[1]],l=[r[h][1],r[h][2]]):r[h][0]==="t"?(h>0&&["Q","q","T","t"].indexOf(r[h-1][0])>-1?u=new at(l[0],l[1],2*l[0]-c[0],2*l[1]-c[1],l[0]+r[h][1],l[1]+r[h][2]):u=new lt(l[0],l[0]+r[h][1],l[1],l[1]+r[h][2]),e=e+u.getTotalLength(),c=[2*l[0]-c[0],2*l[1]-c[1]],l=[r[h][1]+l[0],r[h][2]+l[0]],o.push(u)):r[h][0]==="A"?(u=new C0(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4],r[h][5],r[h][6],r[h][7]),e=e+u.getTotalLength(),l=[r[h][6],r[h][7]],o.push(u)):r[h][0]==="a"&&(u=new C0(l[0],l[1],r[h][1],r[h][2],r[h][3],r[h][4],r[h][5],l[0]+r[h][6],l[1]+r[h][7]),e=e+u.getTotalLength(),l=[l[0]+r[h][6],l[1]+r[h][7]],o.push(u)),t.push(e);return i}i.getTotalLength=function(){return e},i.getPointAtLength=function(s){var r=a(s);return o[r.i].getPointAtLength(r.fraction)},i.getTangentAtLength=function(s){var r=a(s);return o[r.i].getTangentAtLength(r.fraction)},i.getPropertiesAtLength=function(s){var r=a(s);return o[r.i].getPropertiesAtLength(r.fraction)};var a=function(s){s<0?s=0:s>e&&(s=e);for(var r=t.length-1;t[r]>=s&&t[r]>0;)r--;return r++,{fraction:s-t[r-1],i:r}};return i(n)}function Vt(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}function S0(n,e,t){return[n[0]+(e[0]-n[0])*t,n[1]+(e[1]-n[1])*t]}function Ii(n,e){return Vt(n,e)<1e-9}function Oi(n,e,t){let o=n.map((i,a)=>ki(i,e[a]));return function(i){let a=o.map(s=>s(i));return t?Fi(a):a}}function ki(n,e){return function(t){return n.map((o,i)=>o+t*(e[i]-o))}}function Ht(n){return typeof n=="number"&&isFinite(n)}const Ae=`All shapes must be supplied as arrays of [x, y] points or an SVG path string (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).
4
6
  Example valid ways of supplying a shape would be:
5
7
  [[0, 0], [10, 0], [10, 10]]
6
8
  "M0,0 L10,0 L10,10Z"
7
- `;function Ci(n){return new ri(n).abs()}function Si(n){return n.toString().split("M").map((e,t)=>(e=e.trim(),t&&e?"M"+e:e)).filter(e=>e)}function Pi(n){return"M"+n.join("L")+"Z"}function Ei(n,e){let t=Ci(n);return Ii(t)||ki(t,e)}function Ii(n){let e=n.segments||[],t=[];if(!e.length||e[0][0]!=="M")return!1;for(let o=0;o<e.length;o++){let[i,a,s]=e[o];if(i==="M"&&o||i==="Z")break;if(i==="M"||i==="L")t.push([a,s]);else if(i==="H")t.push([a,t[t.length-1][1]]);else if(i==="V")t.push([t[t.length-1][0],a]);else return!1}return t.length?{ring:t}:!1}function ki(n,e){let t=Si(n)[0],o=[],i,a,s=3;if(!t)throw new TypeError(me);a=Oi(t),i=a.getTotalLength(),e&&Ht(e)&&e>0&&(s=Math.max(s,Math.ceil(i/e)));for(let r=0;r<s;r++){let l=a.getPointAtLength(i*r/s);o.push([l.x,l.y])}return{ring:o,skipBisect:!0}}function Oi(n){if(typeof window<"u"&&window&&window.document)try{let e=window.document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttributeNS(null,"d",n),e}catch{}return Ai(n)}function S0(n,e){const t=n.length+e,o=X1(n)/e;let i=0,a=0,s=o/2;for(;n.length<t;){let r=n[i],l=n[(i+1)%n.length],c=jt(r,l);if(s<=a+c){n.splice(i+1,0,c?C0(r,l,(s-a)/c):r.slice(0)),s+=o;continue}a+=c,i++}}function _i(n,e=1/0){for(let t=0;t<n.length;t++){let o=n[t],i=t===n.length-1?n[0]:n[t+1];for(;jt(o,i)>e;)i=C0(o,i,.5),n.splice(t+1,0,i)}}function P0(n,e){let t,o,i;if(typeof n=="string"){let a=Ei(n,e);n=a.ring,i=a.skipBisect}else if(!Array.isArray(n))throw new TypeError(me);if(t=n.slice(0),!Ni(t))throw new TypeError(me);return t.length>1&&Ti(t[0],t[t.length-1])&&t.pop(),o=G1(t),o>0&&t.reverse(),!i&&e&&Ht(e)&&e>0&&_i(t,e),t}function Ni(n){return n.every(function(e){return Array.isArray(e)&&e.length>=2&&Ht(e[0])&&Ht(e[1])})}function Fi(n,e){let t=n.length,o=1/0,i,a,s;for(let r=0;r<t;r++)a=0,e.forEach(function(l,c){let u=jt(n[(r+c)%t],l);a+=u*u}),a<o&&(o=a,i=r);i&&(s=n.splice(0,i),n.splice(n.length,0,...s))}function Ri(n,e,{maxSegmentLength:t=10,string:o=!0}={}){let i=P0(n,t),a=P0(e,t),s=Bi(i,a,o);return!o||typeof n!="string"&&typeof e!="string"?s:r=>r<1e-4&&typeof n=="string"?n:1-r<1e-4&&typeof e=="string"?e:s(r)}function Bi(n,e,t){let o;return o=n.length-e.length,S0(n,o<0?o*-1:0),S0(e,o>0?o:0),Fi(n,e),Li(n,e,t)}var Ut={exports:{}},E0;function Di(){if(E0)return Ut.exports;E0=1,Ut.exports=n,Ut.exports.default=n;function n(d,y,p){p=p||2;var w=y&&y.length,m=w?y[0]*p:d.length,b=e(d,0,m,p,!0),A=[];if(!b||b.next===b.prev)return A;var P,R,N,G,H,q,J;if(w&&(b=l(d,y,b,p)),d.length>80*p){P=N=d[0],R=G=d[1];for(var U=p;U<m;U+=p)H=d[U],q=d[U+1],H<P&&(P=H),q<R&&(R=q),H>N&&(N=H),q>G&&(G=q);J=Math.max(N-P,G-R),J=J!==0?32767/J:0}return o(b,A,p,P,R,J,0),A}function e(d,y,p,w,m){var b,A;if(m===be(d,y,p,w)>0)for(b=y;b<p;b+=w)A=ot(b,d[b],d[b+1],A);else for(b=p-w;b>=y;b-=w)A=ot(b,d[b],d[b+1],A);return A&&I(A,A.next)&&(xt(A),A=A.next),A}function t(d,y){if(!d)return d;y||(y=d);var p=d,w;do if(w=!1,!p.steiner&&(I(p,p.next)||L(p.prev,p,p.next)===0)){if(xt(p),p=y=p.prev,p===p.next)break;w=!0}else p=p.next;while(w||p!==y);return y}function o(d,y,p,w,m,b,A){if(d){!A&&b&&f(d,w,m,b);for(var P=d,R,N;d.prev!==d.next;){if(R=d.prev,N=d.next,b?a(d,w,m,b):i(d)){y.push(R.i/p|0),y.push(d.i/p|0),y.push(N.i/p|0),xt(d),d=N.next,P=N.next;continue}if(d=N,d===P){A?A===1?(d=s(t(d),y,p),o(d,y,p,w,m,b,2)):A===2&&r(d,y,p,w,m,b):o(t(d),y,p,w,m,b,1);break}}}}function i(d){var y=d.prev,p=d,w=d.next;if(L(y,p,w)>=0)return!1;for(var m=y.x,b=p.x,A=w.x,P=y.y,R=p.y,N=w.y,G=m<b?m<A?m:A:b<A?b:A,H=P<R?P<N?P:N:R<N?R:N,q=m>b?m>A?m:A:b>A?b:A,J=P>R?P>N?P:N:R>N?R:N,U=w.next;U!==y;){if(U.x>=G&&U.x<=q&&U.y>=H&&U.y<=J&&C(m,P,b,R,A,N,U.x,U.y)&&L(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function a(d,y,p,w){var m=d.prev,b=d,A=d.next;if(L(m,b,A)>=0)return!1;for(var P=m.x,R=b.x,N=A.x,G=m.y,H=b.y,q=A.y,J=P<R?P<N?P:N:R<N?R:N,U=G<H?G<q?G:q:H<q?H:q,Nt=P>R?P>N?P:N:R>N?R:N,Ft=G>H?G>q?G:q:H>q?H:q,k0=x(J,U,y,p,w),O0=x(Nt,Ft,y,p,w),z=d.prevZ,V=d.nextZ;z&&z.z>=k0&&V&&V.z<=O0;){if(z.x>=J&&z.x<=Nt&&z.y>=U&&z.y<=Ft&&z!==m&&z!==A&&C(P,G,R,H,N,q,z.x,z.y)&&L(z.prev,z,z.next)>=0||(z=z.prevZ,V.x>=J&&V.x<=Nt&&V.y>=U&&V.y<=Ft&&V!==m&&V!==A&&C(P,G,R,H,N,q,V.x,V.y)&&L(V.prev,V,V.next)>=0))return!1;V=V.nextZ}for(;z&&z.z>=k0;){if(z.x>=J&&z.x<=Nt&&z.y>=U&&z.y<=Ft&&z!==m&&z!==A&&C(P,G,R,H,N,q,z.x,z.y)&&L(z.prev,z,z.next)>=0)return!1;z=z.prevZ}for(;V&&V.z<=O0;){if(V.x>=J&&V.x<=Nt&&V.y>=U&&V.y<=Ft&&V!==m&&V!==A&&C(P,G,R,H,N,q,V.x,V.y)&&L(V.prev,V,V.next)>=0)return!1;V=V.nextZ}return!0}function s(d,y,p){var w=d;do{var m=w.prev,b=w.next.next;!I(m,b)&&S(m,w,w.next,b)&&D(m,b)&&D(b,m)&&(y.push(m.i/p|0),y.push(w.i/p|0),y.push(b.i/p|0),xt(w),xt(w.next),w=d=b),w=w.next}while(w!==d);return t(w)}function r(d,y,p,w,m,b){var A=d;do{for(var P=A.next.next;P!==A.prev;){if(A.i!==P.i&&M(A,P)){var R=dt(A,P);A=t(A,A.next),R=t(R,R.next),o(A,y,p,w,m,b,0),o(R,y,p,w,m,b,0);return}P=P.next}A=A.next}while(A!==d)}function l(d,y,p,w){var m=[],b,A,P,R,N;for(b=0,A=y.length;b<A;b++)P=y[b]*w,R=b<A-1?y[b+1]*w:d.length,N=e(d,P,R,w,!1),N===N.next&&(N.steiner=!0),m.push(T(N));for(m.sort(c),b=0;b<m.length;b++)p=u(m[b],p);return p}function c(d,y){return d.x-y.x}function u(d,y){var p=g(d,y);if(!p)return y;var w=dt(p,d);return t(w,w.next),t(p,p.next)}function g(d,y){var p=y,w=d.x,m=d.y,b=-1/0,A;do{if(m<=p.y&&m>=p.next.y&&p.next.y!==p.y){var P=p.x+(m-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(P<=w&&P>b&&(b=P,A=p.x<p.next.x?p:p.next,P===w))return A}p=p.next}while(p!==y);if(!A)return null;var R=A,N=A.x,G=A.y,H=1/0,q;p=A;do w>=p.x&&p.x>=N&&w!==p.x&&C(m<G?w:b,m,N,G,m<G?b:w,m,p.x,p.y)&&(q=Math.abs(m-p.y)/(w-p.x),D(p,d)&&(q<H||q===H&&(p.x>A.x||p.x===A.x&&h(A,p)))&&(A=p,H=q)),p=p.next;while(p!==R);return A}function h(d,y){return L(d.prev,d,y.prev)<0&&L(y.next,d,d.next)<0}function f(d,y,p,w){var m=d;do m.z===0&&(m.z=x(m.x,m.y,y,p,w)),m.prevZ=m.prev,m.nextZ=m.next,m=m.next;while(m!==d);m.prevZ.nextZ=null,m.prevZ=null,v(m)}function v(d){var y,p,w,m,b,A,P,R,N=1;do{for(p=d,d=null,b=null,A=0;p;){for(A++,w=p,P=0,y=0;y<N&&(P++,w=w.nextZ,!!w);y++);for(R=N;P>0||R>0&&w;)P!==0&&(R===0||!w||p.z<=w.z)?(m=p,p=p.nextZ,P--):(m=w,w=w.nextZ,R--),b?b.nextZ=m:d=m,m.prevZ=b,b=m;p=w}b.nextZ=null,N*=2}while(A>1);return d}function x(d,y,p,w,m){return d=(d-p)*m|0,y=(y-w)*m|0,d=(d|d<<8)&16711935,d=(d|d<<4)&252645135,d=(d|d<<2)&858993459,d=(d|d<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,d|y<<1}function T(d){var y=d,p=d;do(y.x<p.x||y.x===p.x&&y.y<p.y)&&(p=y),y=y.next;while(y!==d);return p}function C(d,y,p,w,m,b,A,P){return(m-A)*(y-P)>=(d-A)*(b-P)&&(d-A)*(w-P)>=(p-A)*(y-P)&&(p-A)*(b-P)>=(m-A)*(w-P)}function M(d,y){return d.next.i!==y.i&&d.prev.i!==y.i&&!$(d,y)&&(D(d,y)&&D(y,d)&&W(d,y)&&(L(d.prev,d,y.prev)||L(d,y.prev,y))||I(d,y)&&L(d.prev,d,d.next)>0&&L(y.prev,y,y.next)>0)}function L(d,y,p){return(y.y-d.y)*(p.x-y.x)-(y.x-d.x)*(p.y-y.y)}function I(d,y){return d.x===y.x&&d.y===y.y}function S(d,y,p,w){var m=B(L(d,y,p)),b=B(L(d,y,w)),A=B(L(p,w,d)),P=B(L(p,w,y));return!!(m!==b&&A!==P||m===0&&O(d,p,y)||b===0&&O(d,w,y)||A===0&&O(p,d,w)||P===0&&O(p,y,w))}function O(d,y,p){return y.x<=Math.max(d.x,p.x)&&y.x>=Math.min(d.x,p.x)&&y.y<=Math.max(d.y,p.y)&&y.y>=Math.min(d.y,p.y)}function B(d){return d>0?1:d<0?-1:0}function $(d,y){var p=d;do{if(p.i!==d.i&&p.next.i!==d.i&&p.i!==y.i&&p.next.i!==y.i&&S(p,p.next,d,y))return!0;p=p.next}while(p!==d);return!1}function D(d,y){return L(d.prev,d,d.next)<0?L(d,y,d.next)>=0&&L(d,d.prev,y)>=0:L(d,y,d.prev)<0||L(d,d.next,y)<0}function W(d,y){var p=d,w=!1,m=(d.x+y.x)/2,b=(d.y+y.y)/2;do p.y>b!=p.next.y>b&&p.next.y!==p.y&&m<(p.next.x-p.x)*(b-p.y)/(p.next.y-p.y)+p.x&&(w=!w),p=p.next;while(p!==d);return w}function dt(d,y){var p=new ht(d.i,d.x,d.y),w=new ht(y.i,y.x,y.y),m=d.next,b=y.prev;return d.next=y,y.prev=d,p.next=m,m.prev=p,w.next=p,p.prev=w,b.next=w,w.prev=b,w}function ot(d,y,p,w){var m=new ht(d,y,p);return w?(m.next=w.next,m.prev=w,w.next.prev=m,w.next=m):(m.prev=m,m.next=m),m}function xt(d){d.next.prev=d.prev,d.prev.next=d.next,d.prevZ&&(d.prevZ.nextZ=d.nextZ),d.nextZ&&(d.nextZ.prevZ=d.prevZ)}function ht(d,y,p){this.i=d,this.x=y,this.y=p,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(d,y,p,w){var m=y&&y.length,b=m?y[0]*p:d.length,A=Math.abs(be(d,0,b,p));if(m)for(var P=0,R=y.length;P<R;P++){var N=y[P]*p,G=P<R-1?y[P+1]*p:d.length;A-=Math.abs(be(d,N,G,p))}var H=0;for(P=0;P<w.length;P+=3){var q=w[P]*p,J=w[P+1]*p,U=w[P+2]*p;H+=Math.abs((d[q]-d[U])*(d[J+1]-d[q+1])-(d[q]-d[J])*(d[U+1]-d[q+1]))}return A===0&&H===0?0:Math.abs((H-A)/A)};function be(d,y,p,w){for(var m=0,b=y,A=p-w;b<p;b+=w)m+=(d[A]-d[b])*(d[b+1]+d[A+1]),A=b;return m}return n.flatten=function(d){for(var y=d[0][0].length,p={vertices:[],holes:[],dimensions:y},w=0,m=0;m<d.length;m++){for(var b=0;b<d[m].length;b++)for(var A=0;A<y;A++)p.vertices.push(d[m][b][A]);m>0&&(w+=d[m-1].length,p.holes.push(w))}return p},Ut.exports}Di();function I0(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function qi(n){return n.length===1&&(n=zi(n)),{left:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)<0?o=a+1:i=a}return o},right:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)>0?i=a:o=a+1}return o}}}function zi(n){return function(e,t){return I0(n(e),t)}}qi(I0);function Vi(n,e,t=3){const o=Ri(n,e,{maxSegmentLength:t});return{check:i=>typeof i=="string",interpolate:(i,a,s)=>o(s)}}function ji(n){const e=o=>n.width*o,t=o=>n.height*o;return{scaleX:e,scaleY:t,position:(o,i)=>Y({x:e(o),y:t(i)})}}function Hi(n){const e=[];if(n.isAllKey){for(let t=0;t<=n.animations.length;t++)e.push(t);return e}return n.isStartKey&&e.push(0),n.animations.forEach((t,o)=>{Array.isArray(t)?t.some(i=>i.isKey)&&e.push(o+1):t.isKey&&e.push(o+1)}),n.isEndKey&&e[e.length-1]!==n.animations.length&&e.push(n.animations.length),e}E.Alignment=gt,E.Anchor=nt,E.Animate=Bt,E.Arrow=U0,E.BrowserCanvasRenderer=H1,E.Circle=$0,E.Color=K,E.Easing=Rt,E.FadeIn=B0,E.FadeOut=D0,E.FontStyle=Ie,E.FontWeight=ke,E.Grid=W0,E.Group=Gt,E.Hide=q0,E.IFrame=V0,E.Image=G0,E.Line=X0,E.Mask=K0,E.ObjectType=j,E.Opaque=W1,E.Path=yn,E.Pause=Y1,E.Polygon=xn,E.Position=Y,E.Presentation=$e,E.Rectangle=vn,E.SVG=mn,E.ScreenCapture=H0,E.Show=z0,E.Size=Z,E.Slide=Be,E.SlideObject=et,E.SlideWebExtra=Wt,E.Spotlight=wn,E.Text=Ne,E.TextUnit=$1,E.Transparent=Ee,E.Update=$t,E.Variable=_1,E.getKeySlideBuildIndices=Hi,E.getSizingFunctions=ji,E.getSmoothPathInterpolator=Vi,E.getTextContentLength=_e,E.interpolateColor=Xe,E.interpolateNumber=Ke,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
9
+ `;function _i(n){return new ui(n).abs()}function Ni(n){return n.toString().split("M").map((e,t)=>(e=e.trim(),t&&e?"M"+e:e)).filter(e=>e)}function Fi(n){return"M"+n.join("L")+"Z"}function Ri(n,e){let t=_i(n);return Bi(t)||Di(t,e)}function Bi(n){let e=n.segments||[],t=[];if(!e.length||e[0][0]!=="M")return!1;for(let o=0;o<e.length;o++){let[i,a,s]=e[o];if(i==="M"&&o||i==="Z")break;if(i==="M"||i==="L")t.push([a,s]);else if(i==="H")t.push([a,t[t.length-1][1]]);else if(i==="V")t.push([t[t.length-1][0],a]);else return!1}return t.length?{ring:t}:!1}function Di(n,e){let t=Ni(n)[0],o=[],i,a,s=3;if(!t)throw new TypeError(Ae);a=qi(t),i=a.getTotalLength(),e&&Ht(e)&&e>0&&(s=Math.max(s,Math.ceil(i/e)));for(let r=0;r<s;r++){let l=a.getPointAtLength(i*r/s);o.push([l.x,l.y])}return{ring:o,skipBisect:!0}}function qi(n){if(typeof window<"u"&&window&&window.document)try{let e=window.document.createElementNS("http://www.w3.org/2000/svg","path");return e.setAttributeNS(null,"d",n),e}catch{}return Ei(n)}function P0(n,e){const t=n.length+e,o=ni(n)/e;let i=0,a=0,s=o/2;for(;n.length<t;){let r=n[i],l=n[(i+1)%n.length],c=Vt(r,l);if(s<=a+c){n.splice(i+1,0,c?S0(r,l,(s-a)/c):r.slice(0)),s+=o;continue}a+=c,i++}}function zi(n,e=1/0){for(let t=0;t<n.length;t++){let o=n[t],i=t===n.length-1?n[0]:n[t+1];for(;Vt(o,i)>e;)i=S0(o,i,.5),n.splice(t+1,0,i)}}function E0(n,e){let t,o,i;if(typeof n=="string"){let a=Ri(n,e);n=a.ring,i=a.skipBisect}else if(!Array.isArray(n))throw new TypeError(Ae);if(t=n.slice(0),!ji(t))throw new TypeError(Ae);return t.length>1&&Ii(t[0],t[t.length-1])&&t.pop(),o=ei(t),o>0&&t.reverse(),!i&&e&&Ht(e)&&e>0&&zi(t,e),t}function ji(n){return n.every(function(e){return Array.isArray(e)&&e.length>=2&&Ht(e[0])&&Ht(e[1])})}function Vi(n,e){let t=n.length,o=1/0,i,a,s;for(let r=0;r<t;r++)a=0,e.forEach(function(l,c){let u=Vt(n[(r+c)%t],l);a+=u*u}),a<o&&(o=a,i=r);i&&(s=n.splice(0,i),n.splice(n.length,0,...s))}function Hi(n,e,{maxSegmentLength:t=10,string:o=!0}={}){let i=E0(n,t),a=E0(e,t),s=Ui(i,a,o);return!o||typeof n!="string"&&typeof e!="string"?s:r=>r<1e-4&&typeof n=="string"?n:1-r<1e-4&&typeof e=="string"?e:s(r)}function Ui(n,e,t){let o;return o=n.length-e.length,P0(n,o<0?o*-1:0),P0(e,o>0?o:0),Vi(n,e),Oi(n,e,t)}var Ut={exports:{}},I0;function $i(){if(I0)return Ut.exports;I0=1,Ut.exports=n,Ut.exports.default=n;function n(d,y,p){p=p||2;var w=y&&y.length,m=w?y[0]*p:d.length,b=e(d,0,m,p,!0),A=[];if(!b||b.next===b.prev)return A;var P,R,N,G,H,q,J;if(w&&(b=l(d,y,b,p)),d.length>80*p){P=N=d[0],R=G=d[1];for(var U=p;U<m;U+=p)H=d[U],q=d[U+1],H<P&&(P=H),q<R&&(R=q),H>N&&(N=H),q>G&&(G=q);J=Math.max(N-P,G-R),J=J!==0?32767/J:0}return o(b,A,p,P,R,J,0),A}function e(d,y,p,w,m){var b,A;if(m===Te(d,y,p,w)>0)for(b=y;b<p;b+=w)A=ot(b,d[b],d[b+1],A);else for(b=p-w;b>=y;b-=w)A=ot(b,d[b],d[b+1],A);return A&&I(A,A.next)&&(xt(A),A=A.next),A}function t(d,y){if(!d)return d;y||(y=d);var p=d,w;do if(w=!1,!p.steiner&&(I(p,p.next)||L(p.prev,p,p.next)===0)){if(xt(p),p=y=p.prev,p===p.next)break;w=!0}else p=p.next;while(w||p!==y);return y}function o(d,y,p,w,m,b,A){if(d){!A&&b&&f(d,w,m,b);for(var P=d,R,N;d.prev!==d.next;){if(R=d.prev,N=d.next,b?a(d,w,m,b):i(d)){y.push(R.i/p|0),y.push(d.i/p|0),y.push(N.i/p|0),xt(d),d=N.next,P=N.next;continue}if(d=N,d===P){A?A===1?(d=s(t(d),y,p),o(d,y,p,w,m,b,2)):A===2&&r(d,y,p,w,m,b):o(t(d),y,p,w,m,b,1);break}}}}function i(d){var y=d.prev,p=d,w=d.next;if(L(y,p,w)>=0)return!1;for(var m=y.x,b=p.x,A=w.x,P=y.y,R=p.y,N=w.y,G=m<b?m<A?m:A:b<A?b:A,H=P<R?P<N?P:N:R<N?R:N,q=m>b?m>A?m:A:b>A?b:A,J=P>R?P>N?P:N:R>N?R:N,U=w.next;U!==y;){if(U.x>=G&&U.x<=q&&U.y>=H&&U.y<=J&&C(m,P,b,R,A,N,U.x,U.y)&&L(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function a(d,y,p,w){var m=d.prev,b=d,A=d.next;if(L(m,b,A)>=0)return!1;for(var P=m.x,R=b.x,N=A.x,G=m.y,H=b.y,q=A.y,J=P<R?P<N?P:N:R<N?R:N,U=G<H?G<q?G:q:H<q?H:q,Nt=P>R?P>N?P:N:R>N?R:N,Ft=G>H?G>q?G:q:H>q?H:q,k0=x(J,U,y,p,w),_0=x(Nt,Ft,y,p,w),z=d.prevZ,j=d.nextZ;z&&z.z>=k0&&j&&j.z<=_0;){if(z.x>=J&&z.x<=Nt&&z.y>=U&&z.y<=Ft&&z!==m&&z!==A&&C(P,G,R,H,N,q,z.x,z.y)&&L(z.prev,z,z.next)>=0||(z=z.prevZ,j.x>=J&&j.x<=Nt&&j.y>=U&&j.y<=Ft&&j!==m&&j!==A&&C(P,G,R,H,N,q,j.x,j.y)&&L(j.prev,j,j.next)>=0))return!1;j=j.nextZ}for(;z&&z.z>=k0;){if(z.x>=J&&z.x<=Nt&&z.y>=U&&z.y<=Ft&&z!==m&&z!==A&&C(P,G,R,H,N,q,z.x,z.y)&&L(z.prev,z,z.next)>=0)return!1;z=z.prevZ}for(;j&&j.z<=_0;){if(j.x>=J&&j.x<=Nt&&j.y>=U&&j.y<=Ft&&j!==m&&j!==A&&C(P,G,R,H,N,q,j.x,j.y)&&L(j.prev,j,j.next)>=0)return!1;j=j.nextZ}return!0}function s(d,y,p){var w=d;do{var m=w.prev,b=w.next.next;!I(m,b)&&S(m,w,w.next,b)&&D(m,b)&&D(b,m)&&(y.push(m.i/p|0),y.push(w.i/p|0),y.push(b.i/p|0),xt(w),xt(w.next),w=d=b),w=w.next}while(w!==d);return t(w)}function r(d,y,p,w,m,b){var A=d;do{for(var P=A.next.next;P!==A.prev;){if(A.i!==P.i&&M(A,P)){var R=dt(A,P);A=t(A,A.next),R=t(R,R.next),o(A,y,p,w,m,b,0),o(R,y,p,w,m,b,0);return}P=P.next}A=A.next}while(A!==d)}function l(d,y,p,w){var m=[],b,A,P,R,N;for(b=0,A=y.length;b<A;b++)P=y[b]*w,R=b<A-1?y[b+1]*w:d.length,N=e(d,P,R,w,!1),N===N.next&&(N.steiner=!0),m.push(T(N));for(m.sort(c),b=0;b<m.length;b++)p=u(m[b],p);return p}function c(d,y){return d.x-y.x}function u(d,y){var p=g(d,y);if(!p)return y;var w=dt(p,d);return t(w,w.next),t(p,p.next)}function g(d,y){var p=y,w=d.x,m=d.y,b=-1/0,A;do{if(m<=p.y&&m>=p.next.y&&p.next.y!==p.y){var P=p.x+(m-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(P<=w&&P>b&&(b=P,A=p.x<p.next.x?p:p.next,P===w))return A}p=p.next}while(p!==y);if(!A)return null;var R=A,N=A.x,G=A.y,H=1/0,q;p=A;do w>=p.x&&p.x>=N&&w!==p.x&&C(m<G?w:b,m,N,G,m<G?b:w,m,p.x,p.y)&&(q=Math.abs(m-p.y)/(w-p.x),D(p,d)&&(q<H||q===H&&(p.x>A.x||p.x===A.x&&h(A,p)))&&(A=p,H=q)),p=p.next;while(p!==R);return A}function h(d,y){return L(d.prev,d,y.prev)<0&&L(y.next,d,d.next)<0}function f(d,y,p,w){var m=d;do m.z===0&&(m.z=x(m.x,m.y,y,p,w)),m.prevZ=m.prev,m.nextZ=m.next,m=m.next;while(m!==d);m.prevZ.nextZ=null,m.prevZ=null,v(m)}function v(d){var y,p,w,m,b,A,P,R,N=1;do{for(p=d,d=null,b=null,A=0;p;){for(A++,w=p,P=0,y=0;y<N&&(P++,w=w.nextZ,!!w);y++);for(R=N;P>0||R>0&&w;)P!==0&&(R===0||!w||p.z<=w.z)?(m=p,p=p.nextZ,P--):(m=w,w=w.nextZ,R--),b?b.nextZ=m:d=m,m.prevZ=b,b=m;p=w}b.nextZ=null,N*=2}while(A>1);return d}function x(d,y,p,w,m){return d=(d-p)*m|0,y=(y-w)*m|0,d=(d|d<<8)&16711935,d=(d|d<<4)&252645135,d=(d|d<<2)&858993459,d=(d|d<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,d|y<<1}function T(d){var y=d,p=d;do(y.x<p.x||y.x===p.x&&y.y<p.y)&&(p=y),y=y.next;while(y!==d);return p}function C(d,y,p,w,m,b,A,P){return(m-A)*(y-P)>=(d-A)*(b-P)&&(d-A)*(w-P)>=(p-A)*(y-P)&&(p-A)*(b-P)>=(m-A)*(w-P)}function M(d,y){return d.next.i!==y.i&&d.prev.i!==y.i&&!W(d,y)&&(D(d,y)&&D(y,d)&&Y(d,y)&&(L(d.prev,d,y.prev)||L(d,y.prev,y))||I(d,y)&&L(d.prev,d,d.next)>0&&L(y.prev,y,y.next)>0)}function L(d,y,p){return(y.y-d.y)*(p.x-y.x)-(y.x-d.x)*(p.y-y.y)}function I(d,y){return d.x===y.x&&d.y===y.y}function S(d,y,p,w){var m=B(L(d,y,p)),b=B(L(d,y,w)),A=B(L(p,w,d)),P=B(L(p,w,y));return!!(m!==b&&A!==P||m===0&&k(d,p,y)||b===0&&k(d,w,y)||A===0&&k(p,d,w)||P===0&&k(p,y,w))}function k(d,y,p){return y.x<=Math.max(d.x,p.x)&&y.x>=Math.min(d.x,p.x)&&y.y<=Math.max(d.y,p.y)&&y.y>=Math.min(d.y,p.y)}function B(d){return d>0?1:d<0?-1:0}function W(d,y){var p=d;do{if(p.i!==d.i&&p.next.i!==d.i&&p.i!==y.i&&p.next.i!==y.i&&S(p,p.next,d,y))return!0;p=p.next}while(p!==d);return!1}function D(d,y){return L(d.prev,d,d.next)<0?L(d,y,d.next)>=0&&L(d,d.prev,y)>=0:L(d,y,d.prev)<0||L(d,d.next,y)<0}function Y(d,y){var p=d,w=!1,m=(d.x+y.x)/2,b=(d.y+y.y)/2;do p.y>b!=p.next.y>b&&p.next.y!==p.y&&m<(p.next.x-p.x)*(b-p.y)/(p.next.y-p.y)+p.x&&(w=!w),p=p.next;while(p!==d);return w}function dt(d,y){var p=new ht(d.i,d.x,d.y),w=new ht(y.i,y.x,y.y),m=d.next,b=y.prev;return d.next=y,y.prev=d,p.next=m,m.prev=p,w.next=p,p.prev=w,b.next=w,w.prev=b,w}function ot(d,y,p,w){var m=new ht(d,y,p);return w?(m.next=w.next,m.prev=w,w.next.prev=m,w.next=m):(m.prev=m,m.next=m),m}function xt(d){d.next.prev=d.prev,d.prev.next=d.next,d.prevZ&&(d.prevZ.nextZ=d.nextZ),d.nextZ&&(d.nextZ.prevZ=d.prevZ)}function ht(d,y,p){this.i=d,this.x=y,this.y=p,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(d,y,p,w){var m=y&&y.length,b=m?y[0]*p:d.length,A=Math.abs(Te(d,0,b,p));if(m)for(var P=0,R=y.length;P<R;P++){var N=y[P]*p,G=P<R-1?y[P+1]*p:d.length;A-=Math.abs(Te(d,N,G,p))}var H=0;for(P=0;P<w.length;P+=3){var q=w[P]*p,J=w[P+1]*p,U=w[P+2]*p;H+=Math.abs((d[q]-d[U])*(d[J+1]-d[q+1])-(d[q]-d[J])*(d[U+1]-d[q+1]))}return A===0&&H===0?0:Math.abs((H-A)/A)};function Te(d,y,p,w){for(var m=0,b=y,A=p-w;b<p;b+=w)m+=(d[A]-d[b])*(d[b+1]+d[A+1]),A=b;return m}return n.flatten=function(d){for(var y=d[0][0].length,p={vertices:[],holes:[],dimensions:y},w=0,m=0;m<d.length;m++){for(var b=0;b<d[m].length;b++)for(var A=0;A<y;A++)p.vertices.push(d[m][b][A]);m>0&&(w+=d[m-1].length,p.holes.push(w))}return p},Ut.exports}$i();function O0(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function Wi(n){return n.length===1&&(n=Yi(n)),{left:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)<0?o=a+1:i=a}return o},right:function(e,t,o,i){for(o==null&&(o=0),i==null&&(i=e.length);o<i;){var a=o+i>>>1;n(e[a],t)>0?i=a:o=a+1}return o}}}function Yi(n){return function(e,t){return O0(n(e),t)}}Wi(O0);function Gi(n,e,t=3){const o=Hi(n,e,{maxSegmentLength:t});return{check:i=>typeof i=="string",interpolate:(i,a,s)=>o(s)}}function Xi(n){const e=o=>n.width*o,t=o=>n.height*o;return{scaleX:e,scaleY:t,position:(o,i)=>$({x:e(o),y:t(i)})}}function Ki(n){const e=[];if(n.isAllKey){for(let t=0;t<=n.animations.length;t++)e.push(t);return e}return n.isStartKey&&e.push(0),n.animations.forEach((t,o)=>{Array.isArray(t)?t.some(i=>i.isKey)&&e.push(o+1):t.isKey&&e.push(o+1)}),n.isEndKey&&e[e.length-1]!==n.animations.length&&e.push(n.animations.length),e}E.Alignment=gt,E.Anchor=nt,E.Animate=Bt,E.Arrow=$0,E.BrowserCanvasRenderer=K1,E.Circle=Y0,E.Color=K,E.Easing=Rt,E.FadeIn=D0,E.FadeOut=q0,E.FontStyle=ke,E.FontWeight=_e,E.Grid=G0,E.Group=Gt,E.Hide=z0,E.IFrame=V0,E.Image=X0,E.Line=K0,E.Mask=Z0,E.ObjectType=V,E.Opaque=ti,E.Path=xn,E.Pause=J1,E.Polygon=vn,E.Position=$,E.Presentation=Ye,E.Rectangle=wn,E.SVG=bn,E.ScreenCapture=U0,E.Show=j0,E.Size=Z,E.Slide=De,E.SlideObject=et,E.SlideWebExtra=Yt,E.Spotlight=mn,E.Text=Fe,E.TextUnit=Q1,E.Transparent=Oe,E.Update=Wt,E.Variable=z1,E.getKeySlideBuildIndices=Ki,E.getSizingFunctions=Xi,E.getSmoothPathInterpolator=Gi,E.getTextContentLength=Ne,E.interpolateColor=Ke,E.interpolateNumber=Ze,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
8
10
  //# sourceMappingURL=presenter.js.map