presenter 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.PresenterCode=n():t.PresenterCode=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{CodeBlock:()=>m});var e,o=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},r.apply(this,arguments)},i=function(){function t(t){this.props=r({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=r({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){return{}},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return r({},void 0!==t?{opacity:t.toString()}:{})},t.prototype.children=function(){return[]},t.prototype.requiresChildrenUpdate=function(t){return!1},t.prototype.positionAttributes=function(t){if(null===this._presentation)throw new Error("Cannot compute object position attributes without presentation");var n=this.positionInPresentation(t.origin),e=n.x,r=n.y,i=this.anchorBoundingBox(new o({x:e,y:r},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=r({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,o=Object.entries(this.attributes());e<o.length;e++){var i=o[e],a=i[0],s=i[1];n.setAttribute(a,s)}for(var c=0,l=Object.entries(this.styles());c<l.length;c++){var p=l[c],u=p[0];s=p[1],n.style.setProperty(u,s)}this._children=this.children();for(var h=0,f=this._children;h<f.length;h++){var d=f[h];n.appendChild(d)}this._element=n;for(var g=0,y=Object.entries(this.additionalAttributes());g<y.length;g++){var v=y[g];a=v[0],s=v[1],n.setAttribute(a,s)}return n},t.prototype.createElement=function(){return document.createElementNS("http://www.w3.org/2000/svg",this.tagName())},t.prototype.element=function(){if(null===this._element)throw new Error("Element not yet generated");return this._element},t.prototype.animate=function(t,n,e,o){var i=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===o&&(o=!0),function(a){if(null===i._presentation)throw new Error("Cannot animate object without presentation");var s=i.requiresChildrenUpdate(t);i.props=r(r({},i.props),t),s&&(i._children=i.children());var c=i.attributes(),l=i.styles(),p=i.additionalAttributes(),u=Object.fromEntries(Object.entries(c).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e}))),h=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return i._element.style.getPropertyValue(n)!==e}))),f=Object.fromEntries(Object.entries(p).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e})));a(r(r(r({animate:o,element:i.element(),attributes:r(r({},u),f),styles:h},null!==e?{delay:e}:{}),s?{children:i._children}:{}),{animationParams:r(r({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})}))}},t.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.fadeIn=function(t){return void 0===t&&(t={}),this.animate({opacity:1},t)},t.prototype.fadeOut=function(t){return void 0===t&&(t={}),this.animate({opacity:0},t)},t.prototype.show=function(){return this.set({opacity:1})},t.prototype.hide=function(){return this.set({opacity:0})},t.prototype.positionInPresentation=function(t){var n=this._presentation,e=t.x,o=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),o<=1&&o>=-1&&(o*=n.boundingBox.height),{x:e,y:o}},t.prototype.anchorBoundingBox=function(t){var n=this,e=function(){switch(n.props.anchor){case"topleft":case"top":case"topright":return t.origin.y;case"left":case"center":case"right":return t.origin.y-t.height/2;case"bottomleft":case"bottom":case"bottomright":return t.origin.y-t.height}}(),r=function(){switch(n.props.anchor){case"topleft":case"left":case"bottomleft":return t.origin.x;case"top":case"center":case"bottom":return t.origin.x-t.width/2;case"topright":case"right":case"bottomright":return t.origin.x-t.width}}();return new o({x:r,y:e},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var e=this._presentation.computeRenderedBoundingBox(t,n);return new o({x:this.props.position.x,y:this.props.position.y},e.width,e.height)},t}(),a=(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},e(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}),s=function(){return s=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},s.apply(this,arguments)},c=function(t){function n(n,e,o){return void 0===e&&(e={}),void 0===o&&(o=null),t.call(this,s({objects:n,position:{x:0,y:0},positioned:null===o?"position"in e:o,rotation:0,rotationOrigin:{x:0,y:0},scale:1},e))||this}return a(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return s({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){var t=this.props.scale,n="rotate(".concat(this.props.rotation,", ").concat(this.props.rotationOrigin.x,", ").concat(this.props.rotationOrigin.y,")"),e="scale(".concat(t,")");if(!this.props.positioned){var r=this.positionInPresentation(this.props.position),i=r.x,a=r.y;return{transform:"translate(".concat(i,", ").concat(a,") ").concat(n," ").concat(e)}}var s=this._presentation.computeRenderedBoundingBox(this._element);s.width*=t,s.height*=t;var c=this.positionInPresentation(this.props.position),l=c.x,p=c.y,u=this.anchorBoundingBox(new o({x:l,y:p},s.width,s.height)),h=u.origin.x-s.origin.x,f=u.origin.y-s.origin.y;return{transform:"translate(".concat(h,", ").concat(f,") ").concat(n," ").concat(e)}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(i),l=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),p=function(){return p=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},p.apply(this,arguments)},u=function(t){function n(n){return void 0===n&&(n={}),t.call(this,p({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000"},n))||this}return l(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,i=n.height,a=n.fill,s=n.rounding,c=n.borderWidth,l=n.borderColor,u=this.positionAttributes(new o(e,r,i)),h=u.x,f=u.y;return p(p(p({},t.prototype.attributes.call(this)),{fill:a,width:r.toString(),height:i.toString(),rx:s.toString(),x:h.toString(),y:f.toString()}),c>0?{"stroke-width":c.toString(),stroke:l}:{})},n}(i);function h(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var o=[],r=0,i=0,a=t;i<a.length;i++){var s=a[i];r++;var c=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(c.setAttribute("x","0"),c.setAttribute("text-anchor",e),r>1&&c.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])c.appendChild(document.createTextNode(" ")),o.push(c);else if("string"!=typeof s){for(var l=0,p=s;l<p.length;l++){var u=p[l];if("string"==typeof u)c.appendChild(document.createTextNode(u));else{var h=u[0],f=u[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var g={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},y=0,v=Object.entries(g);y<v.length;y++){var b=v[y],m=b[0];void 0!==(_=b[1])&&d.setAttribute(m,_.toString())}for(var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle},x=0,O=Object.entries(w);x<O.length;x++){var _,j=O[x];m=j[0],void 0!==(_=j[1])&&d.style.setProperty(m,_.toString())}c.appendChild(d)}}o.push(c)}else c.appendChild(document.createTextNode(s)),o.push(c)}return o}var f=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),d=function(){return d=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},d.apply(this,arguments)},g=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,d({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",baselineHeight:.22,dominantBaseline:"ideographic",textDecoration:"none",length:null,align:"left",lineSpacing:"1em",ligatures:null},e))||this}return f(n,t),n.prototype.isRichText=function(){return"string"!=typeof this.props.content},n.prototype.tagName=function(){return"text"},n.prototype.attributes=function(){var n=this.props,e=n.color,o=n.textDecoration;return d(d(d({},t.prototype.attributes.call(this)),"none"!==o?{"text-decoration":o}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),o=e.x,r=e.y;return this.isRichText()&&("center"===this.props.align?o+=n.width/2:"right"===this.props.align&&(o+=n.width)),r-=this.props.fontSize*this.props.baselineHeight,d(d({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(o.toString()," ").concat(r.toString(),")"),y:"1em"}:{x:o.toString(),y:(r+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,o=n.fontFamily,r=n.fontStyle,i=n.fontWeight,a=n.ligatures;return d(d(d(d(d({},t.prototype.styles.call(this)),"normal"!==r?{"font-style":r}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),null!==a?{"font-variant-ligatures":a}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(o,'"'),"white-space":"pre"})},n.prototype.children=function(){var t,n=null!==(t=this.props.length)&&void 0!==t?t:this.contentLength();return this.childrenWithContentLength(n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content||"length"in t&&t.length!==this.props.length},n.prototype.contentLength=function(){return"string"==typeof this.props.content?this.props.content.length:this.props.content.reduce((function(t,n){return"string"==typeof n?t+n.length:t+n.reduce((function(t,n){return t+("string"==typeof n?n:n[0]).length}),0)}),0)},n.prototype.childrenWithContentLength=function(t){var n=this.props.content;if("string"==typeof n){var e=null===t?n:n.slice(0,t);return[document.createTextNode(e)]}var o="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return h(n,this.props.lineSpacing,o);for(var r=t,i=[],a=0,s=n;a<s.length;a++){var c=s[a];if("string"==typeof c)c.length<=r?(i.push(c),r-=c.length):(i.push(c.slice(0,r)),r=0);else{for(var l=[],p=0,u=c;p<u.length;p++){var f=u[p];if("string"==typeof f?f.length<=r?(l.push(f),r-=f.length):(l.push(f.slice(0,r)),r=0):f[0].length<=r?(l.push(f),r-=f[0].length):(l.push([f[0].slice(0,r),f[1]]),r=0),0===r)break}i.push(l)}if(0===r)break}return h(i,this.props.lineSpacing,o)},n.prototype.regenerateChildren=function(){this._children=this.children(),this._element.innerHTML="";for(var t=0,n=this._children;t<n.length;t++){var e=n[t];this._element.appendChild(e)}},n.prototype.animate=function(n,e,o,r){var i=this;void 0===e&&(e={}),void 0===o&&(o=null),void 0===r&&(r=!0);var a=n.length,s=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,o,r):function(n){var c;i.writeOn(a,null!==(c=e.duration)&&void 0!==c?c:1e3,r)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,o,r)(n)}},n.prototype.writeOn=function(t,n,e){var o=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var r=null,i=null,a=null,s=function(e){var c;null===a&&(a=e),null===r&&(r=null!==(c=o.props.length)&&void 0!==c?c:o.contentLength()),null===i&&(i=null!=t?t:o.contentLength());var l=e-a,p=Math.min(l/n,1);o.props.length=Math.floor(r+(i-r)*p),o.regenerateChildren(),p<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,r=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,r=null,i=null,o.props.length=t,o.regenerateChildren()}})}},n}(i),y=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),v=function(){return v=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},v.apply(this,arguments)},b=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e},m=function(t){function n(e){void 0===e&&(e={});var o,r=this,i=v({code:"",highlights:null,length:null,fontFamily:"Courier New",fontSize:130,textColor:"#ffffff",backgroundColor:"#000000",backgroundRounding:10,padding:50,lineHeight:null!==(o=e.fontSize)&&void 0!==o?o:130,characterWidth:80,focusColor:"#4166a5",focusOpacity:0,focusRounding:10,focusLineStart:1,focusLineEnd:1,focusColStart:1,focusColEnd:1,focusPaddingX:0,focusPaddingY:0,focusOffsetX:0,focusOffsetY:0,position:{x:0,y:0},anchor:"topleft"},e),a=n.getComponentProps(i),s=a.group,c=a.background,l=a.focus,p=a.text,h=p.content,f=b(p,["content"]),d=new u(c),y=new u(l),m=new g(h,f);return(r=t.call(this,[d,y,m],s)||this).codeBlockProps=i,r.background=d,r.focus=y,r.text=m,r}return y(n,t),n.prototype.animate=function(e,o,r,i){var a=this;return void 0===o&&(o={}),void 0===r&&(r=null),void 0===i&&(i=!0),function(s){a.codeBlockProps=v(v({},a.codeBlockProps),e);var c=n.getComponentProps(a.codeBlockProps),l=c.group,p=c.background,u=c.focus,h=c.text,f=h.content,d=b(h,["content"]);t.prototype.animate.call(a,l,o,r,i)(s),a.background.animate(p,o,r,i)(s),a.focus.animate(u,o,r,i)(s),a.text.animate(v({content:f},d),o,r,i)(s)}},n.getComponentProps=function(t){var e=t.padding,o=t.characterWidth,r=t.lineHeight,i=t.focusLineStart,a=t.focusLineEnd,s=t.focusColStart,c=t.focusColEnd,l=t.focusOffsetX,p=t.focusOffsetY,u=t.focusPaddingX,h=t.focusPaddingY,f=t.code.trimEnd(),d=f.split("\n").reduce((function(t,n){return Math.max(t,n.length)}),0),g=n.buildTextContent(f,t.highlights);return{group:{position:t.position,anchor:t.anchor},background:{width:o*d+2*e,height:r*g.length+2*e,rounding:t.backgroundRounding,fill:null===t.backgroundColor?"transparent":t.backgroundColor,position:{x:0,y:0},anchor:"topleft"},focus:{width:o*(c-s+1)+2*u,height:r*(a-i+1)+2*h,rounding:t.focusRounding,fill:t.focusColor,opacity:t.focusOpacity,position:{x:e+(s-1)*o-u+l,y:e+(i-1)*r-h+p},anchor:"topleft"},text:{content:g,length:t.length,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.textColor,position:{x:e,y:e},anchor:"topleft"}}},n.buildTextContent=function(t,n){if(null===n)return t.split("\n").map((function(t){return t}));for(var e=t.split("\n"),o=[],r=0,i=n;r<i.length;r++){for(var a=[],s=0,c=i[r];s<c.length;s++){var l=c[s];a.push([e[o.length].substring(l.start-1,l.end),{color:l.color,fontWeight:l.bold?"bold":"normal"}])}o.push(a)}return o},n.computePropsForText=function(t,n){var e=new g(Array(10).fill("H".repeat(10)),n);e.generate(t);var o=new g(Array(50).fill("H".repeat(50)),n);o.generate(t);var r=e.computeRenderedBoundingBox(e.element()),i=o.computeRenderedBoundingBox(o.element());return{lineHeight:(i.height-r.height)/40,characterWidth:(i.width-r.width)/40}},n}(c);return n})()));
1
+ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.PresenterCode=n():t.PresenterCode=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{CodeBlock:()=>m});var e,o=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},r.apply(this,arguments)},i=function(){function t(t){this.props=r({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=r({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){return{}},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return r({},void 0!==t?{opacity:t.toString()}:{})},t.prototype.children=function(){return[]},t.prototype.requiresChildrenUpdate=function(t){return!1},t.prototype.positionAttributes=function(t){if(null===this._presentation)throw new Error("Cannot compute object position attributes without presentation");var n=this.positionInPresentation(t.origin),e=n.x,r=n.y,i=this.anchorBoundingBox(new o({x:e,y:r},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=r({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,o=Object.entries(this.attributes());e<o.length;e++){var i=o[e],a=i[0],s=i[1];n.setAttribute(a,s)}for(var c=0,l=Object.entries(this.styles());c<l.length;c++){var p=l[c],u=p[0];s=p[1],n.style.setProperty(u,s)}this._children=this.children();for(var h=0,f=this._children;h<f.length;h++){var d=f[h];n.appendChild(d)}this._element=n;for(var g=0,y=Object.entries(this.additionalAttributes());g<y.length;g++){var v=y[g];a=v[0],s=v[1],n.setAttribute(a,s)}return n},t.prototype.createElement=function(){return document.createElementNS("http://www.w3.org/2000/svg",this.tagName())},t.prototype.element=function(){if(null===this._element)throw new Error("Element not yet generated");return this._element},t.prototype.animate=function(t,n,e,o){var i=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===o&&(o=!0),function(a){if(null===i._presentation)throw new Error("Cannot animate object without presentation");var s=i.requiresChildrenUpdate(t);i.props=r(r({},i.props),t),s&&(i._children=i.children());var c=i.attributes(),l=i.styles(),p=i.additionalAttributes(),u=Object.fromEntries(Object.entries(c).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e}))),h=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return i._element.style.getPropertyValue(n)!==e}))),f=Object.fromEntries(Object.entries(p).filter((function(t){var n=t[0],e=t[1];return i._element.getAttribute(n)!==e})));a(r(r(r({animate:o,element:i.element(),attributes:r(r({},u),f),styles:h},null!==e?{delay:e}:{}),s?{children:i._children}:{}),{animationParams:r(r({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})}))}},t.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.fadeIn=function(t){return void 0===t&&(t={}),this.animate({opacity:1},t)},t.prototype.fadeOut=function(t){return void 0===t&&(t={}),this.animate({opacity:0},t)},t.prototype.show=function(){return this.set({opacity:1})},t.prototype.hide=function(){return this.set({opacity:0})},t.prototype.positionInPresentation=function(t){var n=this._presentation,e=t.x,o=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),o<=1&&o>=-1&&(o*=n.boundingBox.height),{x:e,y:o}},t.prototype.anchorBoundingBox=function(t){var n=this,e=function(){switch(n.props.anchor){case"topleft":case"top":case"topright":return t.origin.y;case"left":case"center":case"right":return t.origin.y-t.height/2;case"bottomleft":case"bottom":case"bottomright":return t.origin.y-t.height}}(),r=function(){switch(n.props.anchor){case"topleft":case"left":case"bottomleft":return t.origin.x;case"top":case"center":case"bottom":return t.origin.x-t.width/2;case"topright":case"right":case"bottomright":return t.origin.x-t.width}}();return new o({x:r,y:e},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var e=this._presentation.computeRenderedBoundingBox(t,n);return new o({x:this.props.position.x,y:this.props.position.y},e.width,e.height)},t}(),a=(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},e(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}),s=function(){return s=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},s.apply(this,arguments)},c=function(t){function n(n,e,o){return void 0===e&&(e={}),void 0===o&&(o=null),t.call(this,s({objects:n,position:{x:0,y:0},positioned:null===o?"position"in e:o,rotation:0,rotationOrigin:{x:0,y:0},scale:1},e))||this}return a(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return s({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){var t=this.props.scale,n="rotate(".concat(this.props.rotation,", ").concat(this.props.rotationOrigin.x,", ").concat(this.props.rotationOrigin.y,")"),e="scale(".concat(t,")");if(!this.props.positioned){var r=this.positionInPresentation(this.props.position),i=r.x,a=r.y;return{transform:"translate(".concat(i,", ").concat(a,") ").concat(n," ").concat(e)}}var s=this._presentation.computeRenderedBoundingBox(this._element);s.width*=t,s.height*=t;var c=this.positionInPresentation(this.props.position),l=c.x,p=c.y,u=this.anchorBoundingBox(new o({x:l,y:p},s.width,s.height)),h=u.origin.x-s.origin.x,f=u.origin.y-s.origin.y;return{transform:"translate(".concat(h,", ").concat(f,") ").concat(n," ").concat(e)}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(i),l=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),p=function(){return p=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},p.apply(this,arguments)},u=function(t){function n(n){return void 0===n&&(n={}),t.call(this,p({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000"},n))||this}return l(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,i=n.height,a=n.fill,s=n.rounding,c=n.borderWidth,l=n.borderColor,u=this.positionAttributes(new o(e,r,i)),h=u.x,f=u.y;return p(p(p({},t.prototype.attributes.call(this)),{fill:a,width:r.toString(),height:i.toString(),rx:s.toString(),x:h.toString(),y:f.toString()}),c>0?{"stroke-width":c.toString(),stroke:l}:{})},n}(i);function h(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var o=[],r=0,i=0,a=t;i<a.length;i++){var s=a[i];r++;var c=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(c.setAttribute("x","0"),c.setAttribute("text-anchor",e),r>1&&c.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])c.appendChild(document.createTextNode(" ")),o.push(c);else if("string"!=typeof s){for(var l=0,p=s;l<p.length;l++){var u=p[l];if("string"==typeof u)c.appendChild(document.createTextNode(u));else{var h=u[0],f=u[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var g={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},y=0,v=Object.entries(g);y<v.length;y++){var b=v[y],m=b[0];void 0!==(_=b[1])&&d.setAttribute(m,_.toString())}for(var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle},x=0,O=Object.entries(w);x<O.length;x++){var _,j=O[x];m=j[0],void 0!==(_=j[1])&&d.style.setProperty(m,_.toString())}c.appendChild(d)}}o.push(c)}else c.appendChild(document.createTextNode(s)),o.push(c)}return o}var f=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),d=function(){return d=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},d.apply(this,arguments)},g=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,d({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",baselineHeight:.22,dominantBaseline:"ideographic",textDecoration:"none",length:null,align:"left",lineSpacing:"1em",ligatures:null},e))||this}return f(n,t),n.prototype.isRichText=function(){return"string"!=typeof this.props.content},n.prototype.tagName=function(){return"text"},n.prototype.attributes=function(){var n=this.props,e=n.color,o=n.textDecoration;return d(d(d({},t.prototype.attributes.call(this)),"none"!==o?{"text-decoration":o}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),o=e.x,r=e.y;return this.isRichText()&&("center"===this.props.align?o+=n.width/2:"right"===this.props.align&&(o+=n.width)),r-=this.props.fontSize*this.props.baselineHeight,d(d({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(o.toString()," ").concat(r.toString(),")"),y:"1em"}:{x:o.toString(),y:(r+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,o=n.fontFamily,r=n.fontStyle,i=n.fontWeight,a=n.ligatures;return d(d(d(d(d({},t.prototype.styles.call(this)),"normal"!==r?{"font-style":r}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),null!==a?{"font-variant-ligatures":a}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(o,'"'),"white-space":"pre"})},n.prototype.children=function(){var t,n=null!==(t=this.props.length)&&void 0!==t?t:this.contentLength();return this.childrenWithContentLength(n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content||"length"in t&&t.length!==this.props.length},n.prototype.contentLength=function(){return"string"==typeof this.props.content?this.props.content.length:this.props.content.reduce((function(t,n){return"string"==typeof n?t+n.length:t+n.reduce((function(t,n){return t+("string"==typeof n?n:n[0]).length}),0)}),0)},n.prototype.childrenWithContentLength=function(t){var n=this.props.content;if("string"==typeof n){var e=null===t?n:n.slice(0,t);return[document.createTextNode(e)]}var o="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return h(n,this.props.lineSpacing,o);for(var r=t,i=[],a=0,s=n;a<s.length;a++){var c=s[a];if("string"==typeof c)c.length<=r?(i.push(c),r-=c.length):(i.push(c.slice(0,r)),r=0);else{for(var l=[],p=0,u=c;p<u.length;p++){var f=u[p];if("string"==typeof f?f.length<=r?(l.push(f),r-=f.length):(l.push(f.slice(0,r)),r=0):f[0].length<=r?(l.push(f),r-=f[0].length):(l.push([f[0].slice(0,r),f[1]]),r=0),0===r)break}i.push(l)}if(0===r)break}return h(i,this.props.lineSpacing,o)},n.prototype.regenerateChildren=function(){this._children=this.children(),this._element.innerHTML="";for(var t=0,n=this._children;t<n.length;t++){var e=n[t];this._element.appendChild(e)}},n.prototype.animate=function(n,e,o,r){var i=this;void 0===e&&(e={}),void 0===o&&(o=null),void 0===r&&(r=!0);var a=n.length,s=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,o,r):function(n){var c;i.writeOn(a,null!==(c=e.duration)&&void 0!==c?c:1e3,r)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,o,r)(n)}},n.prototype.writeOn=function(t,n,e){var o=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var r=null,i=null,a=null,s=function(e){var c;null===a&&(a=e),null===r&&(r=null!==(c=o.props.length)&&void 0!==c?c:o.contentLength()),null===i&&(i=null!=t?t:o.contentLength());var l=e-a,p=Math.min(l/n,1);o.props.length=Math.floor(r+(i-r)*p),o.regenerateChildren(),p<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,r=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,r=null,i=null,o.props.length=t,o.regenerateChildren()}})}},n.prototype.generateChildrenAndReposition=function(){for(var t=this.element(),n=0,e=Object.entries(this.attributes());n<e.length;n++){var o=e[n],r=o[0],i=o[1];t.setAttribute(r,i)}this.regenerateChildren();for(var a=0,s=Object.entries(this.additionalAttributes());a<s.length;a++){var c=s[a];r=c[0],i=c[1],t.setAttribute(r,i)}},n.prototype.animateContent=function(t,n){var e=this;void 0===n&&(n=1e3);var o=null,r=function(i){null===o&&(o=i);var a=i-o,s=Math.min(a/n,1);e.props.content=t(s),e.generateChildrenAndReposition(),s<1&&requestAnimationFrame(r)};return function(n){return n({animate:!0,animateCallback:function(){o=null,requestAnimationFrame(r)},updateCallback:function(){o=null,e.props.content=t(1),e.generateChildrenAndReposition()}})}},n}(i),y=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}}(),v=function(){return v=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},v.apply(this,arguments)},b=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e},m=function(t){function n(e){void 0===e&&(e={});var o,r=this,i=v({code:"",highlights:null,length:null,fontFamily:"Courier New",fontSize:130,textColor:"#ffffff",backgroundColor:"#000000",backgroundRounding:10,padding:50,lineHeight:null!==(o=e.fontSize)&&void 0!==o?o:130,characterWidth:80,focusColor:"#4166a5",focusOpacity:0,focusRounding:10,focusLineStart:1,focusLineEnd:1,focusColStart:1,focusColEnd:1,focusPaddingX:0,focusPaddingY:0,focusOffsetX:0,focusOffsetY:0,position:{x:0,y:0},anchor:"topleft"},e),a=n.getComponentProps(i),s=a.group,c=a.background,l=a.focus,p=a.text,h=p.content,f=b(p,["content"]),d=new u(c),y=new u(l),m=new g(h,f);return(r=t.call(this,[d,y,m],s)||this).codeBlockProps=i,r.background=d,r.focus=y,r.text=m,r}return y(n,t),n.prototype.animate=function(e,o,r,i){var a=this;return void 0===o&&(o={}),void 0===r&&(r=null),void 0===i&&(i=!0),function(s){a.codeBlockProps=v(v({},a.codeBlockProps),e);var c=n.getComponentProps(a.codeBlockProps),l=c.group,p=c.background,u=c.focus,h=c.text,f=h.content,d=b(h,["content"]);t.prototype.animate.call(a,l,o,r,i)(s),a.background.animate(p,o,r,i)(s),a.focus.animate(u,o,r,i)(s),a.text.animate(v({content:f},d),o,r,i)(s)}},n.getComponentProps=function(t){var e=t.padding,o=t.characterWidth,r=t.lineHeight,i=t.focusLineStart,a=t.focusLineEnd,s=t.focusColStart,c=t.focusColEnd,l=t.focusOffsetX,p=t.focusOffsetY,u=t.focusPaddingX,h=t.focusPaddingY,f=t.code.trimEnd(),d=f.split("\n").reduce((function(t,n){return Math.max(t,n.length)}),0),g=n.buildTextContent(f,t.highlights);return{group:{position:t.position,anchor:t.anchor},background:{width:o*d+2*e,height:r*g.length+2*e,rounding:t.backgroundRounding,fill:null===t.backgroundColor?"transparent":t.backgroundColor,position:{x:0,y:0},anchor:"topleft"},focus:{width:o*(c-s+1)+2*u,height:r*(a-i+1)+2*h,rounding:t.focusRounding,fill:t.focusColor,opacity:t.focusOpacity,position:{x:e+(s-1)*o-u+l,y:e+(i-1)*r-h+p},anchor:"topleft"},text:{content:g,length:t.length,fontFamily:t.fontFamily,fontSize:t.fontSize,color:t.textColor,position:{x:e,y:e},anchor:"topleft"}}},n.buildTextContent=function(t,n){if(null===n)return t.split("\n").map((function(t){return t}));for(var e=t.split("\n"),o=[],r=0,i=n;r<i.length;r++){for(var a=[],s=0,c=i[r];s<c.length;s++){var l=c[s];a.push([e[o.length].substring(l.start-1,l.end),{color:l.color,fontWeight:l.bold?"bold":"normal"}])}o.push(a)}return o},n.computePropsForText=function(t,n){var e=new g(Array(10).fill("H".repeat(10)),n);e.generate(t);var o=new g(Array(50).fill("H".repeat(50)),n);o.generate(t);var r=e.computeRenderedBoundingBox(e.element()),i=o.computeRenderedBoundingBox(o.element());return{lineHeight:(i.height-r.height)/40,characterWidth:(i.width-r.width)/40}},n}(c);return n})()));
package/dist/presenter.js CHANGED
@@ -1 +1 @@
1
- !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Presenter=n():t.Presenter=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{Arrow:()=>_t,BoundingBox:()=>e,Circle:()=>Et,Grid:()=>Bt,Group:()=>It,Image:()=>Dt,Line:()=>wt,Paragraph:()=>zt,Polygon:()=>St,Presentation:()=>o,Rectangle:()=>Ut,Slide:()=>yt,SlideObject:()=>vt,Text:()=>Kt,VectorGraphic:()=>Qt,animateStateChange:()=>pt,anime:()=>it,clamp:()=>Jt,easeCubic:()=>nn,easeLinear:()=>tn,generateTextNodes:()=>Rt,performAnimation:()=>lt,preserveLeadingSpaces:()=>Ht,skipAnimation:()=>ct});var e=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},r.apply(this,arguments)},o=function(){function t(t,n,o,i){void 0===i&&(i={});var a=this;if(null===this.element)throw new Error("Presentation cannot be mounted to null element.");if(0===n.length)throw new Error("Presentation requires at least one slide");this.title=t,this.element=o,this.slides=n,this.options=r({width:3840,height:2160,backgroundColor:"#ffffff",fonts:[]},i),this.presentationState={currentSlide:0},this.boundingBox=new e({x:0,y:0},this.options.width,this.options.height),this.container=null,this.svg=null,this.shadow=null,this.background=null,this.additionalElementContainer=null,this.textCommand={active:!1,command:""},this.shortcuts={s:{slideIndex:0,animationIndex:0},e:{slideIndex:n.length-1,animationIndex:n[n.length-1].animations.length}};for(var s=0;s<n.length;s++)this.shortcuts[(s+1).toString()]={slideIndex:s,animationIndex:0};n.forEach((function(t,n){t.props.shortcuts.forEach((function(t){var e="string"==typeof t?t:t[0],r="string"==typeof t?0:t[1];a.shortcuts[e]={slideIndex:n,animationIndex:r}}))}))}return t.prototype.present=function(){var t=this;this.container=document.createElement("div"),this.container.style.width="100%",this.container.style.aspectRatio="".concat(this.options.width," / ").concat(this.options.height),this.container.style.position="relative",this.container.style.top="50%",this.container.style.transform="translateY(-50%)",this.container.style.marginLeft="auto",this.container.style.marginRight="auto",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.backgroundColor="transparent",this.svg.style.cursor="none",this.setupKeyboardCommands(),this.shadow=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.shadow.style.visibility="hidden",this.background=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.background.style.backgroundColor=this.options.backgroundColor,this.additionalElementContainer=document.createElement("div"),this.additionalElementContainer.style.width="100%",this.additionalElementContainer.style.height="100%",this.additionalElementContainer.style.position="absolute",[this.svg,this.shadow,this.background].forEach((function(n){n.setAttribute("width","100%"),n.setAttribute("viewBox","0 0 ".concat(t.options.width," ").concat(t.options.height)),n.style.position="absolute"})),this.isFullBodyPresentation()&&(document.title=this.title,document.documentElement.style.height="100%",document.body.style.height="100%",document.body.style.width="100%",document.body.style.margin="0",document.body.style.backgroundColor="#000000",window.matchMedia("(min-aspect-ratio: ".concat(this.options.width," / ").concat(this.options.height,")")).addEventListener("change",this.updateSVGContainerSize.bind(this)),this.updateSVGContainerSize()),this.navigatorContainer=document.createElement("div"),this.navigatorContainer.style.position="absolute",this.navigatorContainer.style.height="100%",this.navigatorContainer.style.width="200px",this.navigatorContainer.style.backgroundColor="#e6e6e6",this.navigatorContainer.style.overflow="scroll",this.navigatorContainer.style.display="none",this.slides.forEach((function(n,e){var r=document.createElement("button");r.style.display="block",r.style.margin="10px",r.style.padding="10px",r.style.width="calc(100% - 20px)",r.style.textAlign="left",r.style.backgroundColor="transparent",r.style.border="none",r.style.cursor="pointer",r.innerHTML="".concat(e+1),null!==n.props.title&&(r.innerHTML+=": ".concat(n.props.title)),r.addEventListener("click",(function(){t.navigatorContainer.style.display="none",t.presentationState.currentSlide=e,n.render(t)})),t.navigatorContainer.appendChild(r)})),this.container.appendChild(this.shadow),this.container.appendChild(this.background),this.container.appendChild(this.additionalElementContainer),this.container.appendChild(this.svg),this.container.appendChild(this.navigatorContainer),this.element.appendChild(this.container),this.presentationState.currentSlide=0;var n=this.slides[this.presentationState.currentSlide];void 0!==n&&n.render(this)},t.prototype.setupKeyboardCommands=function(){var t=this,n=this.isFullBodyPresentation()?document.body:this.container;n.addEventListener("keyup",this.handleKeyboardEvent.bind(this)),n.addEventListener("mousemove",(function(){t.svg.style.cursor="auto"}))},t.prototype.handleKeyboardEvent=function(t){if("Escape"!==t.key){if("ArrowRight"===t.key||" "===t.key)return this.resetTextCommand(),void this.next(!t.shiftKey);if("ArrowLeft"===t.key)return this.resetTextCommand(),void this.previous(!t.shiftKey);if(this.textCommand.active){if("Enter"===t.key){var n=this.textCommand.command;this.resetTextCommand();var e=this.shortcuts[n];if(void 0===e)return;var r=this.slides[this.presentationState.currentSlide];this.shortcuts.b={slideIndex:this.presentationState.currentSlide,animationIndex:r.animationIndex},this.presentationState.currentSlide=e.slideIndex;var o=this.slides[this.presentationState.currentSlide];if(void 0===o)return;return void o.render(this,e.animationIndex)}"Backspace"===t.key?this.textCommand.command=this.textCommand.command.slice(0,-1):this.textCommand.command+=t.key}else if("g"===t.key)this.textCommand.active=!0,this.textCommand.command="";else if("`"===t.key){var i="block"===this.navigatorContainer.style.display;this.navigatorContainer.style.display=i?"none":"block"}}else this.resetTextCommand()},t.prototype.resetTextCommand=function(){this.textCommand.active=!1,this.textCommand.command=""},t.prototype.updateSVGContainerSize=function(){window.innerHeight/window.innerWidth>this.options.height/this.options.width?(this.container.style.width="100%",this.container.style.height="auto"):(this.container.style.width="auto",this.container.style.height="100%")},t.prototype.next=function(t){return n=this,e=void 0,o=function(){var n,e,r;return function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}(this,(function(o){switch(o.label){case 0:return this.svg.style.cursor="none",void 0===(n=this.slides[this.presentationState.currentSlide])?[2]:(e=!t)?[3,2]:[4,n.nextAnimation()];case 1:e=!o.sent(),o.label=2;case 2:if(e){if(this.presentationState.currentSlide++,void 0===(r=this.slides[this.presentationState.currentSlide]))return[2];r.render(this)}return[2]}}))},new((r=void 0)||(r=Promise))((function(t,i){function a(t){try{u(o.next(t))}catch(t){i(t)}}function s(t){try{u(o.throw(t))}catch(t){i(t)}}function u(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((o=o.apply(n,e||[])).next())}));var n,e,r,o},t.prototype.previous=function(t){this.svg.style.cursor="none";var n=this.slides[this.presentationState.currentSlide];if(void 0!==n){if(t&&n.animationIndex>0)n.render(this,n.animationIndex-1);else if(!t||0!==this.presentationState.currentSlide){this.presentationState.currentSlide>0&&this.presentationState.currentSlide--;var e=this.slides[this.presentationState.currentSlide];void 0!==e&&e.render(this,t?e.animations.length:0)}}else{this.presentationState.currentSlide=this.slides.length-1;var r=this.slides[this.presentationState.currentSlide];if(void 0===r)return;r.render(this,t?r.animations.length:0)}},t.prototype.isFullBodyPresentation=function(){return this.element===document.body},t.prototype.computeRenderedBoundingBox=function(t,n){if(void 0===n&&(n=null),null===n&&this.svg.contains(t))return e.fromElement(t);var r=t.cloneNode(!0);if(null!==n){r.innerHTML="";for(var o=0,i=n;o<i.length;o++){var a=i[o];r.appendChild(a.cloneNode(!0))}}this.shadow.appendChild(r);var s=e.fromElement(r);return this.shadow.removeChild(r),s},t}(),i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},a={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},s=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],u={CSS:{},springs:{}};function l(t,n,e){return Math.min(Math.max(t,n),e)}function c(t,n){return t.indexOf(n)>-1}function p(t,n){return t.apply(null,n)}var h={arr:function(t){return Array.isArray(t)},obj:function(t){return c(Object.prototype.toString.call(t),"Object")},pth:function(t){return h.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||h.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return h.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return h.hex(t)||h.rgb(t)||h.hsl(t)},key:function(t){return!i.hasOwnProperty(t)&&!a.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function f(t){var n=/\(([^)]+)\)/.exec(t);return n?n[1].split(",").map((function(t){return parseFloat(t)})):[]}function d(t,n){var e=f(t),r=l(h.und(e[0])?1:e[0],.1,100),o=l(h.und(e[1])?100:e[1],.1,100),i=l(h.und(e[2])?10:e[2],.1,100),a=l(h.und(e[3])?0:e[3],.1,100),s=Math.sqrt(o/r),c=i/(2*Math.sqrt(o*r)),p=c<1?s*Math.sqrt(1-c*c):0,d=c<1?(c*s-a)/p:-a+s;function y(t){var e=n?n*t/1e3:t;return e=c<1?Math.exp(-e*c*s)*(1*Math.cos(p*e)+d*Math.sin(p*e)):(1+d*e)*Math.exp(-e*s),0===t||1===t?t:1-e}return n?y:function(){var n=u.springs[t];if(n)return n;for(var e=1/6,r=0,o=0;;)if(1===y(r+=e)){if(++o>=16)break}else o=0;var i=r*e*1e3;return u.springs[t]=i,i}}function y(t){return void 0===t&&(t=10),function(n){return Math.ceil(l(n,1e-6,1)*t)*(1/t)}}var g,v,m=function(){var t=.1;function n(t,n){return 1-3*n+3*t}function e(t,n){return 3*n-6*t}function r(t){return 3*t}function o(t,o,i){return((n(o,i)*t+e(o,i))*t+r(o))*t}function i(t,o,i){return 3*n(o,i)*t*t+2*e(o,i)*t+r(o)}return function(n,e,r,a){if(0<=n&&n<=1&&0<=r&&r<=1){var s=new Float32Array(11);if(n!==e||r!==a)for(var u=0;u<11;++u)s[u]=o(u*t,n,r);return function(u){return n===e&&r===a||0===u||1===u?u:o(function(e){for(var a=0,u=1;10!==u&&s[u]<=e;++u)a+=t;--u;var l=a+(e-s[u])/(s[u+1]-s[u])*t,c=i(l,n,r);return c>=.001?function(t,n,e,r){for(var a=0;a<4;++a){var s=i(n,e,r);if(0===s)return n;n-=(o(n,e,r)-t)/s}return n}(e,l,n,r):0===c?l:function(t,n,e,r,i){var a,s,u=0;do{(a=o(s=n+(e-n)/2,r,i)-t)>0?e=s:n=s}while(Math.abs(a)>1e-7&&++u<10);return s}(e,a,a+t,n,r)}(u),e,a)}}}}(),b=(g={linear:function(){return function(t){return t}}},v={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Expo:function(){return function(t){return t?Math.pow(2,10*t-10):0}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var n,e=4;t<((n=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*n-2)/22-t,2)}},Elastic:function(t,n){void 0===t&&(t=1),void 0===n&&(n=.5);var e=l(t,1,10),r=l(n,.1,2);return function(t){return 0===t||1===t?t:-e*Math.pow(2,10*(t-1))*Math.sin((t-1-r/(2*Math.PI)*Math.asin(1/e))*(2*Math.PI)/r)}}},["Quad","Cubic","Quart","Quint"].forEach((function(t,n){v[t]=function(){return function(t){return Math.pow(t,n+2)}}})),Object.keys(v).forEach((function(t){var n=v[t];g["easeIn"+t]=n,g["easeOut"+t]=function(t,e){return function(r){return 1-n(t,e)(1-r)}},g["easeInOut"+t]=function(t,e){return function(r){return r<.5?n(t,e)(2*r)/2:1-n(t,e)(-2*r+2)/2}},g["easeOutIn"+t]=function(t,e){return function(r){return r<.5?(1-n(t,e)(1-2*r))/2:(n(t,e)(2*r-1)+1)/2}}})),g);function w(t,n){if(h.fnc(t))return t;var e=t.split("(")[0],r=b[e],o=f(t);switch(e){case"spring":return d(t,n);case"cubicBezier":return p(m,o);case"steps":return p(y,o);default:return p(r,o)}}function x(t){try{return document.querySelectorAll(t)}catch(t){return}}function O(t,n){for(var e=t.length,r=arguments.length>=2?arguments[1]:void 0,o=[],i=0;i<e;i++)if(i in t){var a=t[i];n.call(r,a,i,t)&&o.push(a)}return o}function S(t){return t.reduce((function(t,n){return t.concat(h.arr(n)?S(n):n)}),[])}function C(t){return h.arr(t)?t:(h.str(t)&&(t=x(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function j(t,n){return t.some((function(t){return t===n}))}function _(t){var n={};for(var e in t)n[e]=t[e];return n}function P(t,n){var e=_(t);for(var r in t)e[r]=n.hasOwnProperty(r)?n[r]:t[r];return e}function k(t,n){var e=_(t);for(var r in n)e[r]=h.und(t[r])?n[r]:t[r];return e}function E(t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(n)return n[1]}function A(t,n){return h.fnc(t)?t(n.target,n.id,n.total):t}function M(t,n){return t.getAttribute(n)}function I(t,n,e){if(j([e,"deg","rad","turn"],E(n)))return n;var r=u.CSS[n+e];if(!h.und(r))return r;var o=document.createElement(t.tagName),i=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;i.appendChild(o),o.style.position="absolute",o.style.width=100+e;var a=100/o.offsetWidth;i.removeChild(o);var s=a*parseFloat(n);return u.CSS[n+e]=s,s}function T(t,n,e){if(n in t.style){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=t.style[n]||getComputedStyle(t).getPropertyValue(r)||"0";return e?I(t,o,e):o}}function B(t,n){return h.dom(t)&&!h.inp(t)&&(!h.nil(M(t,n))||h.svg(t)&&t[n])?"attribute":h.dom(t)&&j(s,n)?"transform":h.dom(t)&&"transform"!==n&&T(t,n)?"css":null!=t[n]?"object":void 0}function N(t){if(h.dom(t)){for(var n,e=t.style.transform||"",r=/(\w+)\(([^)]*)\)/g,o=new Map;n=r.exec(e);)o.set(n[1],n[2]);return o}}function L(t,n,e,r){switch(B(t,n)){case"transform":return function(t,n,e,r){var o=c(n,"scale")?1:0+function(t){return c(t,"translate")||"perspective"===t?"px":c(t,"rotate")||c(t,"skew")?"deg":void 0}(n),i=N(t).get(n)||o;return e&&(e.transforms.list.set(n,i),e.transforms.last=n),r?I(t,i,r):i}(t,n,r,e);case"css":return T(t,n,e);case"attribute":return M(t,n);default:return t[n]||0}}function D(t,n){var e=/^(\*=|\+=|-=)/.exec(t);if(!e)return t;var r=E(t)||0,o=parseFloat(n),i=parseFloat(t.replace(e[0],""));switch(e[0][0]){case"+":return o+i+r;case"-":return o-i+r;case"*":return o*i+r}}function F(t,n){if(h.col(t))return function(t){return h.rgb(t)?(e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n=t))?"rgba("+e[1]+",1)":n:h.hex(t)?function(t){var n=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,n,e,r){return n+n+e+e+r+r})),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return"rgba("+parseInt(e[1],16)+","+parseInt(e[2],16)+","+parseInt(e[3],16)+",1)"}(t):h.hsl(t)?function(t){var n,e,r,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),i=parseInt(o[1],10)/360,a=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,u=o[4]||1;function l(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(0==a)n=e=r=s;else{var c=s<.5?s*(1+a):s+a-s*a,p=2*s-c;n=l(p,c,i+1/3),e=l(p,c,i),r=l(p,c,i-1/3)}return"rgba("+255*n+","+255*e+","+255*r+","+u+")"}(t):void 0;var n,e}(t);if(/\s/g.test(t))return t;var e=E(t),r=e?t.substr(0,t.length-e.length):t;return n?r+n:r}function W(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function z(t){for(var n,e=t.points,r=0,o=0;o<e.numberOfItems;o++){var i=e.getItem(o);o>0&&(r+=W(n,i)),n=i}return r}function q(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*M(t,"r")}(t);case"rect":return function(t){return 2*M(t,"width")+2*M(t,"height")}(t);case"line":return function(t){return W({x:M(t,"x1"),y:M(t,"y1")},{x:M(t,"x2"),y:M(t,"y2")})}(t);case"polyline":return z(t);case"polygon":return function(t){var n=t.points;return z(t)+W(n.getItem(n.numberOfItems-1),n.getItem(0))}(t)}}function H(t,n){var e=n||{},r=e.el||function(t){for(var n=t.parentNode;h.svg(n)&&h.svg(n.parentNode);)n=n.parentNode;return n}(t),o=r.getBoundingClientRect(),i=M(r,"viewBox"),a=o.width,s=o.height,u=e.viewBox||(i?i.split(" "):[0,0,a,s]);return{el:r,viewBox:u,x:u[0]/1,y:u[1]/1,w:a,h:s,vW:u[2],vH:u[3]}}function R(t,n,e){function r(e){void 0===e&&(e=0);var r=n+e>=1?n+e:0;return t.el.getPointAtLength(r)}var o=H(t.el,t.svg),i=r(),a=r(-1),s=r(1),u=e?1:o.w/o.vW,l=e?1:o.h/o.vH;switch(t.property){case"x":return(i.x-o.x)*u;case"y":return(i.y-o.y)*l;case"angle":return 180*Math.atan2(s.y-a.y,s.x-a.x)/Math.PI}}function G(t,n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=F(h.pth(t)?t.totalLength:t,n)+"";return{original:r,numbers:r.match(e)?r.match(e).map(Number):[0],strings:h.str(t)||n?r.split(e):[]}}function V(t){return O(t?S(h.arr(t)?t.map(C):C(t)):[],(function(t,n,e){return e.indexOf(t)===n}))}function K(t){var n=V(t);return n.map((function(t,e){return{target:t,id:e,total:n.length,transforms:{list:N(t)}}}))}function $(t,n){var e=_(n);if(/^spring/.test(e.easing)&&(e.duration=d(e.easing)),h.arr(t)){var r=t.length;2!==r||h.obj(t[0])?h.fnc(n.duration)||(e.duration=n.duration/r):t={value:t}}var o=h.arr(t)?t:[t];return o.map((function(t,e){var r=h.obj(t)&&!h.pth(t)?t:{value:t};return h.und(r.delay)&&(r.delay=e?0:n.delay),h.und(r.endDelay)&&(r.endDelay=e===o.length-1?n.endDelay:0),r})).map((function(t){return k(t,e)}))}var Y={css:function(t,n,e){return t.style[n]=e},attribute:function(t,n,e){return t.setAttribute(n,e)},object:function(t,n,e){return t[n]=e},transform:function(t,n,e,r,o){if(r.list.set(n,e),n===r.last||o){var i="";r.list.forEach((function(t,n){i+=n+"("+t+") "})),t.style.transform=i}}};function U(t,n){K(t).forEach((function(t){for(var e in n){var r=A(n[e],t),o=t.target,i=E(r),a=L(o,e,i,t),s=D(F(r,i||E(a)),a),u=B(o,e);Y[u](o,e,s,t.transforms,!0)}}))}function X(t,n){return O(S(t.map((function(t){return n.map((function(n){return function(t,n){var e=B(t.target,n.name);if(e){var r=function(t,n){var e;return t.tweens.map((function(r){var o=function(t,n){var e={};for(var r in t){var o=A(t[r],n);h.arr(o)&&1===(o=o.map((function(t){return A(t,n)}))).length&&(o=o[0]),e[r]=o}return e.duration=parseFloat(e.duration),e.delay=parseFloat(e.delay),e}(r,n),i=o.value,a=h.arr(i)?i[1]:i,s=E(a),u=L(n.target,t.name,s,n),l=e?e.to.original:u,c=h.arr(i)?i[0]:l,p=E(c)||E(u),f=s||p;return h.und(a)&&(a=l),o.from=G(c,f),o.to=G(D(a,c),f),o.start=e?e.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=w(o.easing,o.duration),o.isPath=h.pth(i),o.isPathTargetInsideSVG=o.isPath&&h.svg(n.target),o.isColor=h.col(o.from.original),o.isColor&&(o.round=1),e=o,o}))}(n,t),o=r[r.length-1];return{type:e,property:n.name,animatable:t,tweens:r,duration:o.end,delay:r[0].delay,endDelay:o.endDelay}}}(t,n)}))}))),(function(t){return!h.und(t)}))}function Z(t,n){var e=t.length,r=function(t){return t.timelineOffset?t.timelineOffset:0},o={};return o.duration=e?Math.max.apply(Math,t.map((function(t){return r(t)+t.duration}))):n.duration,o.delay=e?Math.min.apply(Math,t.map((function(t){return r(t)+t.delay}))):n.delay,o.endDelay=e?o.duration-Math.max.apply(Math,t.map((function(t){return r(t)+t.duration-t.endDelay}))):n.endDelay,o}var Q=0,J=[],tt=function(){var t;function n(e){for(var r=J.length,o=0;o<r;){var i=J[o];i.paused?(J.splice(o,1),r--):(i.tick(e),o++)}t=o>0?requestAnimationFrame(n):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){et.suspendWhenDocumentHidden&&(nt()?t=cancelAnimationFrame(t):(J.forEach((function(t){return t._onDocumentVisibility()})),tt()))})),function(){t||nt()&&et.suspendWhenDocumentHidden||!(J.length>0)||(t=requestAnimationFrame(n))}}();function nt(){return!!document&&document.hidden}function et(t){void 0===t&&(t={});var n,e=0,r=0,o=0,s=0,u=null;function c(t){var n=window.Promise&&new Promise((function(t){return u=t}));return t.finished=n,n}var p=function(t){var n=P(i,t),e=P(a,t),r=function(t,n){var e=[],r=n.keyframes;for(var o in r&&(n=k(function(t){for(var n=O(S(t.map((function(t){return Object.keys(t)}))),(function(t){return h.key(t)})).reduce((function(t,n){return t.indexOf(n)<0&&t.push(n),t}),[]),e={},r=function(r){var o=n[r];e[o]=t.map((function(t){var n={};for(var e in t)h.key(e)?e==o&&(n.value=t[e]):n[e]=t[e];return n}))},o=0;o<n.length;o++)r(o);return e}(r),n)),n)h.key(o)&&e.push({name:o,tweens:$(n[o],t)});return e}(e,t),o=K(t.targets),s=X(o,r),u=Z(s,e),l=Q;return Q++,k(n,{id:l,children:[],animatables:o,animations:s,duration:u.duration,delay:u.delay,endDelay:u.endDelay})}(t);function f(){var t=p.direction;"alternate"!==t&&(p.direction="normal"!==t?"normal":"reverse"),p.reversed=!p.reversed,n.forEach((function(t){return t.reversed=p.reversed}))}function d(t){return p.reversed?p.duration-t:t}function y(){e=0,r=d(p.currentTime)*(1/et.speed)}function g(t,n){n&&n.seek(t-n.timelineOffset)}function v(t){for(var n=0,e=p.animations,r=e.length;n<r;){var o=e[n],i=o.animatable,a=o.tweens,s=a.length-1,u=a[s];s&&(u=O(a,(function(n){return t<n.end}))[0]||u);for(var c=l(t-u.start-u.delay,0,u.duration)/u.duration,h=isNaN(c)?1:u.easing(c),f=u.to.strings,d=u.round,y=[],g=u.to.numbers.length,v=void 0,m=0;m<g;m++){var b=void 0,w=u.to.numbers[m],x=u.from.numbers[m]||0;b=u.isPath?R(u.value,h*w,u.isPathTargetInsideSVG):x+h*(w-x),d&&(u.isColor&&m>2||(b=Math.round(b*d)/d)),y.push(b)}var S=f.length;if(S){v=f[0];for(var C=0;C<S;C++){f[C];var j=f[C+1],_=y[C];isNaN(_)||(v+=j?_+j:_+" ")}}else v=y[0];Y[o.type](i.target,o.property,v,i.transforms),o.currentValue=v,n++}}function m(t){p[t]&&!p.passThrough&&p[t](p)}function b(t){var i=p.duration,a=p.delay,h=i-p.endDelay,y=d(t);p.progress=l(y/i*100,0,100),p.reversePlayback=y<p.currentTime,n&&function(t){if(p.reversePlayback)for(var e=s;e--;)g(t,n[e]);else for(var r=0;r<s;r++)g(t,n[r])}(y),!p.began&&p.currentTime>0&&(p.began=!0,m("begin")),!p.loopBegan&&p.currentTime>0&&(p.loopBegan=!0,m("loopBegin")),y<=a&&0!==p.currentTime&&v(0),(y>=h&&p.currentTime!==i||!i)&&v(i),y>a&&y<h?(p.changeBegan||(p.changeBegan=!0,p.changeCompleted=!1,m("changeBegin")),m("change"),v(y)):p.changeBegan&&(p.changeCompleted=!0,p.changeBegan=!1,m("changeComplete")),p.currentTime=l(y,0,i),p.began&&m("update"),t>=i&&(r=0,p.remaining&&!0!==p.remaining&&p.remaining--,p.remaining?(e=o,m("loopComplete"),p.loopBegan=!1,"alternate"===p.direction&&f()):(p.paused=!0,p.completed||(p.completed=!0,m("loopComplete"),m("complete"),!p.passThrough&&"Promise"in window&&(u(),c(p)))))}return c(p),p.reset=function(){var t=p.direction;p.passThrough=!1,p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.loopBegan=!1,p.changeBegan=!1,p.completed=!1,p.changeCompleted=!1,p.reversePlayback=!1,p.reversed="reverse"===t,p.remaining=p.loop,n=p.children;for(var e=s=n.length;e--;)p.children[e].reset();(p.reversed&&!0!==p.loop||"alternate"===t&&1===p.loop)&&p.remaining++,v(p.reversed?p.duration:0)},p._onDocumentVisibility=y,p.set=function(t,n){return U(t,n),p},p.tick=function(t){o=t,e||(e=o),b((o+(r-e))*et.speed)},p.seek=function(t){b(d(t))},p.pause=function(){p.paused=!0,y()},p.play=function(){p.paused&&(p.completed&&p.reset(),p.paused=!1,J.push(p),y(),tt())},p.reverse=function(){f(),p.completed=!p.reversed,y()},p.restart=function(){p.reset(),p.play()},p.remove=function(t){ot(V(t),p)},p.reset(),p.autoplay&&p.play(),p}function rt(t,n){for(var e=n.length;e--;)j(t,n[e].animatable.target)&&n.splice(e,1)}function ot(t,n){var e=n.animations,r=n.children;rt(t,e);for(var o=r.length;o--;){var i=r[o],a=i.animations;rt(t,a),a.length||i.children.length||r.splice(o,1)}e.length||r.length||n.pause()}et.version="3.2.1",et.speed=1,et.suspendWhenDocumentHidden=!0,et.running=J,et.remove=function(t){for(var n=V(t),e=J.length;e--;)ot(n,J[e])},et.get=L,et.set=U,et.convertPx=I,et.path=function(t,n){var e=h.str(t)?x(t)[0]:t,r=n||100;return function(t){return{property:t,el:e,svg:H(e),totalLength:q(e)*(r/100)}}},et.setDashoffset=function(t){var n=q(t);return t.setAttribute("stroke-dasharray",n),n},et.stagger=function(t,n){void 0===n&&(n={});var e=n.direction||"normal",r=n.easing?w(n.easing):null,o=n.grid,i=n.axis,a=n.from||0,s="first"===a,u="center"===a,l="last"===a,c=h.arr(t),p=c?parseFloat(t[0]):parseFloat(t),f=c?parseFloat(t[1]):0,d=E(c?t[1]:t)||0,y=n.start||0+(c?p:0),g=[],v=0;return function(t,n,h){if(s&&(a=0),u&&(a=(h-1)/2),l&&(a=h-1),!g.length){for(var m=0;m<h;m++){if(o){var b=u?(o[0]-1)/2:a%o[0],w=u?(o[1]-1)/2:Math.floor(a/o[0]),x=b-m%o[0],O=w-Math.floor(m/o[0]),S=Math.sqrt(x*x+O*O);"x"===i&&(S=-x),"y"===i&&(S=-O),g.push(S)}else g.push(Math.abs(a-m));v=Math.max.apply(Math,g)}r&&(g=g.map((function(t){return r(t/v)*v}))),"reverse"===e&&(g=g.map((function(t){return i?t<0?-1*t:-t:Math.abs(v-t)})))}return y+(c?(f-p)/v:p)*(Math.round(100*g[n])/100)+d}},et.timeline=function(t){void 0===t&&(t={});var n=et(t);return n.duration=0,n.add=function(e,r){var o=J.indexOf(n),i=n.children;function s(t){t.passThrough=!0}o>-1&&J.splice(o,1);for(var u=0;u<i.length;u++)s(i[u]);var l=k(e,P(a,t));l.targets=l.targets||t.targets;var c=n.duration;l.autoplay=!1,l.direction=n.direction,l.timelineOffset=h.und(r)?c:D(r,c),s(n),n.seek(l.timelineOffset);var p=et(l);s(p),i.push(p);var f=Z(i,t);return n.delay=f.delay,n.endDelay=f.endDelay,n.duration=f.duration,n.seek(0),n.reset(),n.autoplay&&n.play(),n},n},et.easing=w,et.penner=b,et.random=function(t,n){return Math.floor(Math.random()*(n-t+1))+t};const it=et;var at=function(){return at=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},at.apply(this,arguments)},st=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}))},ut=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},lt=function(t){return st(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s;return ut(this,(function(u){switch(u.label){case 0:Array.isArray(t)||(t=[t]),n=function(t){var n,e,r;return ut(this,(function(o){switch(o.label){case 0:return void 0===t.delay?[3,2]:[4,new Promise((function(n){return setTimeout(n,t.delay)}))];case 1:o.sent(),o.label=2;case 2:if(!1===t.animate)return ct(t),[2,"continue"];if(void 0!==t.animateCallback&&t.animateCallback(),void 0!==t.element&&(it(at(at(at({targets:t.element},null!==(i=t.attributes)&&void 0!==i?i:{}),null!==(a=t.styles)&&void 0!==a?a:{}),null!==(s=t.animationParams)&&void 0!==s?s:{})),t.children))for(t.element.innerHTML="",n=0,e=t.children;n<e.length;n++)r=e[n],t.element.appendChild(r);return[2]}}))},e=0,r=t,u.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:u.sent(),u.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},ct=function(t){return st(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s,u,l,c,p,h,f,d,y;return ut(this,(function(g){for(Array.isArray(t)||(t=[t]),n=0,e=t;n<e.length;n++)if((r=e[n]).updateCallback&&r.updateCallback(),o=r.element){if(r.attributes)for(i=0,a=Object.entries(r.attributes);i<a.length;i++)s=a[i],p=s[0],h=s[1],o.setAttribute(p,h);if(r.styles)for(u=0,l=Object.entries(r.styles);u<l.length;u++)c=l[u],p=c[0],h=c[1],o.style[p]=h;if(r.children)for(o.innerHTML="",f=0,d=r.children;f<d.length;f++)y=d[f],o.appendChild(y)}return[2]}))}))};function pt(t,n,e){void 0===e&&(e=500);var r=Object.keys(n),o=null,i=null;function a(s){null===o&&(o=s),null===i&&(i=at({},t.state));for(var u=s-o,l=Math.min(u/e,1),c=0,p=r;c<p.length;c++){var h=p[c];if("number"==typeof n[h]){var f=i[h],d=n[h];t.state[h]=f+l*(d-f)}else 1==l&&(t.state[h]=n[h])}l<1&&requestAnimationFrame(a)}return function(e){return e({animate:!0,animateCallback:function(){o=null,i=null,requestAnimationFrame(a)},updateCallback:function(){for(var e=0,o=r;e<o.length;e++){var i=o[e];t.state[i]=n[i]}}})}}var ht,ft=function(){return ft=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},ft.apply(this,arguments)},dt=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},yt=function(){function t(t,n,e){void 0===n&&(n=[]),void 0===e&&(e={}),this.objects=t.filter((function(t){return null!==t})),this.animations=n,this.animationIndex=0,this.debugAnimation=null,this.keyBuilds="last",this.props=ft({additionalElement:null,shortcuts:[],title:null},e)}return t.prototype.render=function(t,n){if(void 0===n&&(n=0),this.animationIndex=n,this.objects.forEach((function(n){n.generate(t)})),t.additionalElementContainer.innerHTML="",null!==this.props.additionalElement){var e="function"==typeof this.props.additionalElement?this.props.additionalElement():this.props.additionalElement;e.style.width="100%",e.style.height="auto",t.additionalElementContainer.appendChild(e)}if(null===this.debugAnimation||t.svg.innerHTML){for(a=0;a<this.animationIndex;a++)if(s=this.animations[a])if(Array.isArray(s))for(var r=0,o=s;r<o.length;r++)"number"!=typeof(c=o[r])&&c(ct);else s(ct)}else{var i=this.debugAnimation;i<0&&(i=this.animations.length+1+i);for(var a=0;a<i;a++){var s;if(s=this.animations[a])if(Array.isArray(s))for(var u=0,l=s;u<l.length;u++){var c;"number"!=typeof(c=l[u])&&c(ct)}else s(ct)}this.animationIndex=i}t.svg.innerHTML="",this.objects.forEach((function(n){t.svg.appendChild(n.element())}))},t.prototype.nextAnimation=function(){return t=this,n=void 0,r=function(){var t,n,e,r,o;return dt(this,(function(i){switch(i.label){case 0:if(!(t=this.animations[this.animationIndex]))return[3,7];if(!Array.isArray(t))return[3,5];n=function(t){return dt(this,(function(n){switch(n.label){case 0:return"number"!=typeof t?[3,2]:[4,new Promise((function(n){return setTimeout(n,t)}))];case 1:return n.sent(),[2,"continue"];case 2:return t(lt),[2]}}))},e=0,r=t,i.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return e++,[3,1];case 4:return[3,6];case 5:t(lt),i.label=6;case 6:return this.animationIndex++,[2,!0];case 7:return[2,!1]}}))},new((e=void 0)||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}));var t,n,e,r},t.prototype.getKeyBuilds=function(){var t=this;return"first"===this.keyBuilds?[0]:"last"===this.keyBuilds?[this.animations.length]:"all"===this.keyBuilds?Array.from({length:this.animations.length+1},(function(t,n){return n})):"none"===this.keyBuilds?[]:Array.isArray(this.keyBuilds)?this.keyBuilds.filter((function(n){return n>=0&&n<=t.animations.length})):[0]},t}(),gt=function(){return gt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},gt.apply(this,arguments)},vt=function(){function t(t){this.props=gt({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=gt({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){return{}},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return gt({},void 0!==t?{opacity:t.toString()}:{})},t.prototype.children=function(){return[]},t.prototype.requiresChildrenUpdate=function(t){return!1},t.prototype.positionAttributes=function(t){if(null===this._presentation)throw new Error("Cannot compute object position attributes without presentation");var n=this.positionInPresentation(t.origin),r=n.x,o=n.y,i=this.anchorBoundingBox(new e({x:r,y:o},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=gt({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,r=Object.entries(this.attributes());e<r.length;e++){var o=r[e],i=o[0],a=o[1];n.setAttribute(i,a)}for(var s=0,u=Object.entries(this.styles());s<u.length;s++){var l=u[s],c=l[0];a=l[1],n.style.setProperty(c,a)}this._children=this.children();for(var p=0,h=this._children;p<h.length;p++){var f=h[p];n.appendChild(f)}this._element=n;for(var d=0,y=Object.entries(this.additionalAttributes());d<y.length;d++){var g=y[d];i=g[0],a=g[1],n.setAttribute(i,a)}return n},t.prototype.createElement=function(){return document.createElementNS("http://www.w3.org/2000/svg",this.tagName())},t.prototype.element=function(){if(null===this._element)throw new Error("Element not yet generated");return this._element},t.prototype.animate=function(t,n,e,r){var o=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0),function(i){if(null===o._presentation)throw new Error("Cannot animate object without presentation");var a=o.requiresChildrenUpdate(t);o.props=gt(gt({},o.props),t),a&&(o._children=o.children());var s=o.attributes(),u=o.styles(),l=o.additionalAttributes(),c=Object.fromEntries(Object.entries(s).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e}))),p=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return o._element.style.getPropertyValue(n)!==e}))),h=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e})));i(gt(gt(gt({animate:r,element:o.element(),attributes:gt(gt({},c),h),styles:p},null!==e?{delay:e}:{}),a?{children:o._children}:{}),{animationParams:gt(gt({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})}))}},t.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.fadeIn=function(t){return void 0===t&&(t={}),this.animate({opacity:1},t)},t.prototype.fadeOut=function(t){return void 0===t&&(t={}),this.animate({opacity:0},t)},t.prototype.show=function(){return this.set({opacity:1})},t.prototype.hide=function(){return this.set({opacity:0})},t.prototype.positionInPresentation=function(t){var n=this._presentation,e=t.x,r=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),r<=1&&r>=-1&&(r*=n.boundingBox.height),{x:e,y:r}},t.prototype.anchorBoundingBox=function(t){var n=this,r=function(){switch(n.props.anchor){case"topleft":case"top":case"topright":return t.origin.y;case"left":case"center":case"right":return t.origin.y-t.height/2;case"bottomleft":case"bottom":case"bottomright":return t.origin.y-t.height}}(),o=function(){switch(n.props.anchor){case"topleft":case"left":case"bottomleft":return t.origin.x;case"top":case"center":case"bottom":return t.origin.x-t.width/2;case"topright":case"right":case"bottomright":return t.origin.x-t.width}}();return new e({x:o,y:r},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var r=this._presentation.computeRenderedBoundingBox(t,n);return new e({x:this.props.position.x,y:this.props.position.y},r.width,r.height)},t}(),mt=(ht=function(t,n){return ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},ht(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}ht(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),bt=function(){return bt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},bt.apply(this,arguments)},wt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,bt({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:10,linecap:null,drawn:!0},n))||this}return mt(n,t),n.prototype.tagName=function(){return"line"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.drawn,o=n.width,i=n.linecap,a=this.positionInPresentation(this.props.start),s=this.positionInPresentation(this.props.end),u=a.x.toString(),l=a.y.toString(),c=s.x.toString(),p=s.y.toString();return r||(c=u,p=l),bt(bt(bt({},t.prototype.attributes.call(this)),{x1:u,y1:l,x2:c,y2:p,stroke:e,"stroke-width":o.toString()}),null!==i?{"stroke-linecap":i}:{})},n}(vt),xt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ot=function(){return Ot=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Ot.apply(this,arguments)},St=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Ot({points:n,fill:"#000000",borderWidth:0,borderColor:"#000000"},e))||this}return xt(n,t),n.prototype.tagName=function(){return"polygon"},n.prototype.attributes=function(){var n=this.props,e=n.points,r=n.fill,o=n.borderWidth,i=n.borderColor,a=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ");return Ot(Ot(Ot({},t.prototype.attributes.call(this)),{points:a,fill:r}),o>0?{"stroke-width":o.toString(),stroke:i}:{})},n}(vt),Ct=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),jt=function(){return jt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},jt.apply(this,arguments)},_t=function(t){function n(n){void 0===n&&(n={});var e,r,o,i=this,a=null!==(e=n.width)&&void 0!==e?e:10,s=null!==(r=n.arrowSize)&&void 0!==r?r:4*a,u=null!==(o=n.opacity)&&void 0!==o?o:!1===n.drawn?0:1;return(i=t.call(this,jt({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:a,arrowSize:s,opacity:u,drawn:!0,padStart:{x:0,y:0},padEnd:{x:0,y:0}},n))||this).line=null,i.arrowhead=null,i}return Ct(n,t),n.prototype.tagName=function(){return"g"},n.prototype.calculateShapes=function(t){var n,e,r,o,i=t.arrowSize,a=t.drawn,s=this.positionInPresentation(t.start),u=this.positionInPresentation(t.end);s.x+=null!==(n=t.padStart.x)&&void 0!==n?n:0,s.y+=null!==(e=t.padStart.y)&&void 0!==e?e:0,u.x+=null!==(r=t.padEnd.x)&&void 0!==r?r:0,u.y+=null!==(o=t.padEnd.y)&&void 0!==o?o:0;var l=Math.atan2(u.y-s.y,u.x-s.x),c=a?u:s,p={x:c.x-i*Math.cos(l-Math.PI/6),y:c.y-i*Math.sin(l-Math.PI/6)},h={x:c.x-i*Math.cos(l+Math.PI/6),y:c.y-i*Math.sin(l+Math.PI/6)};return{line:{start:s,end:a?{x:u.x-2*i/3*Math.cos(l),y:u.y-2*i/3*Math.sin(l)}:s},arrowhead:[p,c,h]}},n.prototype.children=function(){var t=this.props,n=t.color,e=t.width,r=this.calculateShapes(this.props);return this.line=new wt({start:r.line.start,end:r.line.end,color:n,width:e}),this.line.generate(this._presentation),this.arrowhead=new St(r.arrowhead,{fill:n,borderWidth:0,borderColor:n}),this.arrowhead.generate(this._presentation),[this.line.element(),this.arrowhead.element()]},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.start,s=n.end,u=n.drawn,l=n.color,c=n.width,p=n.arrowSize,h=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["start","end","drawn","color","width","arrowSize"]),f=Object.fromEntries(Object.entries({start:a,end:s,drawn:u,color:l,width:c,arrowSize:p}).filter((function(t){return t[0],void 0!==t[1]})));return function(n){u&&!("opacity"in h)&&0===i.props.opacity&&i.set({opacity:1})(n),0!==Object.keys(h).length&&t.prototype.animate.call(i,h,e,r,o)(n),0!==Object.keys(f).length&&i.animateArrow(f,e,r,o)(n)}},n.prototype.draw=function(t){return void 0===t&&(t={}),this.animate({drawn:!0},t)},n.prototype.animateArrow=function(t,n,e,r){var o=this;void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0);var i=jt(jt({},this.props),t),a=this.calculateShapes(i);return function(e){var r=o.line.animate(jt(jt({start:a.line.start,end:a.line.end},t.color?{color:t.color}:{}),t.width?{width:t.width}:{}),n),i=o.arrowhead.animate(jt({points:a.arrowhead},t.color?{fill:t.color}:{}),n);r(e),i(e)}},n}(vt),Pt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),kt=function(){return kt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},kt.apply(this,arguments)},Et=function(t){function n(n){return void 0===n&&(n={}),t.call(this,kt({fill:"#000000",radius:100,borderWidth:0,borderColor:"#000000"},n))||this}return Pt(n,t),n.prototype.tagName=function(){return"circle"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.radius,i=n.fill,a=n.borderWidth,s=n.borderColor,u=this.positionAttributes(new e(r,2*o,2*o)),l=u.x,c=u.y;return kt(kt(kt({},t.prototype.attributes.call(this)),{fill:i,r:o.toString(),cx:(l+o).toString(),cy:(c+o).toString()}),a>0?{"stroke-width":a.toString(),stroke:s}:{})},n}(vt),At=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mt=function(){return Mt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Mt.apply(this,arguments)},It=function(t){function n(n,e,r){return void 0===e&&(e={}),void 0===r&&(r=null),t.call(this,Mt({objects:n,position:{x:0,y:0},positioned:null===r?"position"in e:r,rotation:0,rotationOrigin:{x:0,y:0},scale:1},e))||this}return At(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return Mt({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){var t=this.props.scale,n="rotate(".concat(this.props.rotation,", ").concat(this.props.rotationOrigin.x,", ").concat(this.props.rotationOrigin.y,")"),r="scale(".concat(t,")");if(!this.props.positioned){var o=this.positionInPresentation(this.props.position),i=o.x,a=o.y;return{transform:"translate(".concat(i,", ").concat(a,") ").concat(n," ").concat(r)}}var s=this._presentation.computeRenderedBoundingBox(this._element);s.width*=t,s.height*=t;var u=this.positionInPresentation(this.props.position),l=u.x,c=u.y,p=this.anchorBoundingBox(new e({x:l,y:c},s.width,s.height)),h=p.origin.x-s.origin.x,f=p.origin.y-s.origin.y;return{transform:"translate(".concat(h,", ").concat(f,") ").concat(n," ").concat(r)}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(vt),Tt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bt=function(t){function n(n){var e=this,r=n.rows,o=void 0===r?1:r,i=n.cols,a=void 0===i?1:i,s=n.spacing,u=void 0===s?{x:0,y:0}:s,l=n.origin,c=void 0===l?{x:0,y:0}:l,p=n.objects,h=void 0===p?function(){return null}:p,f=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["rows","cols","spacing","origin","objects"]);void 0===u.x&&(u.x=0),void 0===u.y&&(u.y=0);for(var d=[],y=0;y<o;y++){for(var g=[],v=0;v<a;v++){var m=h(y,v);null!==m&&(m.props.position.x=c.x+u.x*v,m.props.position.y=c.y+u.y*y),g.push(m)}d.push(g)}return e=t.call(this,function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([],d.flat().filter((function(t){return null!==t})),!0),f)||this,e.objects=d,e}return Tt(n,t),n}(It),Nt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lt=function(){return Lt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Lt.apply(this,arguments)},Dt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Lt({href:n,width:100,height:100,rounding:0},e))||this}return Nt(n,t),n.prototype.tagName=function(){return"image"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.href,i=n.width,a=n.height,s=this.positionAttributes(new e(r,i,a)),u=s.x,l=s.y;return Lt(Lt({},t.prototype.attributes.call(this)),{href:o,width:i.toString(),height:a.toString(),x:u.toString(),y:l.toString()})},n.prototype.styles=function(){var n=this.props.rounding;return Lt(Lt({},t.prototype.styles.call(this)),0!==n?{"clip-path":"inset(0px round ".concat(n,"px)")}:{})},n}(vt),Ft=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Wt=function(){return Wt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Wt.apply(this,arguments)},zt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Wt({content:n,width:1e3,height:1e3,fontSize:100,fontFamily:"Arial",color:"#000000"},e))||this}return Ft(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,o=n.height;return Wt(Wt({},t.prototype.attributes.call(this)),{x:e.x.toString(),y:e.y.toString(),width:r.toString(),height:o.toString()})},n.prototype.children=function(){for(var t=this.props.content,n=document.createElement("div"),e={"font-family":'"'.concat(this.props.fontFamily,'"'),"font-size":"".concat(this.props.fontSize,"px"),color:this.props.color},r=0,o=Object.entries(e);r<o.length;r++){var i=o[r],a=i[0],s=i[1];void 0!==s&&n.style.setProperty(a,s.toString())}if("string"==typeof t)n.textContent=t;else for(var u=0,l=t;u<l.length;u++){var c=l[u],p=document.createElement("p");p.textContent=c,n.appendChild(p)}return[n]},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Wt(Wt({},t.prototype.additionalAttributes.call(this)),{x:r.toString(),y:o.toString()})},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content},n}(vt);function qt(t){return t.replace(/^\s+/g,(function(t){return t.replace(/ /g," ")}))}function Ht(t){if("string"==typeof t)return qt(t);for(var n=[],e=0,r=t;e<r.length;e++){var o=r[e];if("string"!=typeof o)if(0!==o.length){var i=Array.from(o),a=i[0];i[0]="string"==typeof a?qt(a):[qt(a[0]),i[0][1]],n.push(i)}else n.push(o);else n.push(qt(o))}return n}function Rt(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var r=[],o=0,i=0,a=t;i<a.length;i++){var s=a[i];o++;var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(u.setAttribute("x","0"),u.setAttribute("text-anchor",e),o>1&&u.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])u.appendChild(document.createTextNode(" ")),r.push(u);else if("string"!=typeof s){for(var l=0,c=s;l<c.length;l++){var p=c[l];if("string"==typeof p)u.appendChild(document.createTextNode(p));else{var h=p[0],f=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var y={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},g=0,v=Object.entries(y);g<v.length;g++){var m=v[g],b=m[0];void 0!==(S=m[1])&&d.setAttribute(b,S.toString())}for(var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle},x=0,O=Object.entries(w);x<O.length;x++){var S,C=O[x];b=C[0],void 0!==(S=C[1])&&d.style.setProperty(b,S.toString())}u.appendChild(d)}}r.push(u)}else u.appendChild(document.createTextNode(s)),r.push(u)}return r}var Gt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vt=function(){return Vt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Vt.apply(this,arguments)},Kt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Vt({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",baselineHeight:.22,dominantBaseline:"ideographic",textDecoration:"none",length:null,align:"left",lineSpacing:"1em",ligatures:null},e))||this}return Gt(n,t),n.prototype.isRichText=function(){return"string"!=typeof this.props.content},n.prototype.tagName=function(){return"text"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.textDecoration;return Vt(Vt(Vt({},t.prototype.attributes.call(this)),"none"!==r?{"text-decoration":r}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),r=e.x,o=e.y;return this.isRichText()&&("center"===this.props.align?r+=n.width/2:"right"===this.props.align&&(r+=n.width)),o-=this.props.fontSize*this.props.baselineHeight,Vt(Vt({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(r.toString()," ").concat(o.toString(),")"),y:"1em"}:{x:r.toString(),y:(o+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,r=n.fontFamily,o=n.fontStyle,i=n.fontWeight,a=n.ligatures;return Vt(Vt(Vt(Vt(Vt({},t.prototype.styles.call(this)),"normal"!==o?{"font-style":o}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),null!==a?{"font-variant-ligatures":a}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(r,'"'),"white-space":"pre"})},n.prototype.children=function(){var t,n=null!==(t=this.props.length)&&void 0!==t?t:this.contentLength();return this.childrenWithContentLength(n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content||"length"in t&&t.length!==this.props.length},n.prototype.contentLength=function(){return"string"==typeof this.props.content?this.props.content.length:this.props.content.reduce((function(t,n){return"string"==typeof n?t+n.length:t+n.reduce((function(t,n){return t+("string"==typeof n?n:n[0]).length}),0)}),0)},n.prototype.childrenWithContentLength=function(t){var n=this.props.content;if("string"==typeof n){var e=null===t?n:n.slice(0,t);return[document.createTextNode(e)]}var r="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return Rt(n,this.props.lineSpacing,r);for(var o=t,i=[],a=0,s=n;a<s.length;a++){var u=s[a];if("string"==typeof u)u.length<=o?(i.push(u),o-=u.length):(i.push(u.slice(0,o)),o=0);else{for(var l=[],c=0,p=u;c<p.length;c++){var h=p[c];if("string"==typeof h?h.length<=o?(l.push(h),o-=h.length):(l.push(h.slice(0,o)),o=0):h[0].length<=o?(l.push(h),o-=h[0].length):(l.push([h[0].slice(0,o),h[1]]),o=0),0===o)break}i.push(l)}if(0===o)break}return Rt(i,this.props.lineSpacing,r)},n.prototype.regenerateChildren=function(){this._children=this.children(),this._element.innerHTML="";for(var t=0,n=this._children;t<n.length;t++){var e=n[t];this._element.appendChild(e)}},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.length,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var u;i.writeOn(a,null!==(u=e.duration)&&void 0!==u?u:1e3,o)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.writeOn=function(t,n,e){var r=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var o=null,i=null,a=null,s=function(e){var u;null===a&&(a=e),null===o&&(o=null!==(u=r.props.length)&&void 0!==u?u:r.contentLength()),null===i&&(i=null!=t?t:r.contentLength());var l=e-a,c=Math.min(l/n,1);r.props.length=Math.floor(o+(i-o)*c),r.regenerateChildren(),c<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,o=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,o=null,i=null,r.props.length=t,r.regenerateChildren()}})}},n}(vt),$t=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Yt=function(){return Yt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Yt.apply(this,arguments)},Ut=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Yt({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000"},n))||this}return $t(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=n.fill,s=n.rounding,u=n.borderWidth,l=n.borderColor,c=this.positionAttributes(new e(r,o,i)),p=c.x,h=c.y;return Yt(Yt(Yt({},t.prototype.attributes.call(this)),{fill:a,width:o.toString(),height:i.toString(),rx:s.toString(),x:p.toString(),y:h.toString()}),u>0?{"stroke-width":u.toString(),stroke:l}:{})},n}(vt),Xt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zt=function(){return Zt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Zt.apply(this,arguments)},Qt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Zt({svg:n,width:100,height:100},e))||this}return Xt(n,t),n.svgNode=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement},n.prototype.tagName=function(){return"svg"},n.prototype.createElement=function(){var t=this.constructor.svgNode(this.props.svg);return this.parsedChildren=Array.from(t.childNodes),t.innerHTML="",t},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=this.positionAttributes(new e(r,o,i)),s=a.x,u=a.y;return Zt(Zt({},t.prototype.attributes.call(this)),{width:o.toString(),height:i.toString(),x:s.toString(),y:u.toString()})},n.prototype.children=function(){return this.parsedChildren},n.prototype.animatePath=function(t,n,e,r){var o=this;return void 0===e&&(e=500),void 0===r&&(r=!0),function(i){var a,s=o.element().querySelector(t);i(Zt(Zt({animate:r,element:s},n),{animationParams:Zt({duration:e},null!==(a=n.animationParams)&&void 0!==a?a:{})}))}},n.prototype.setPath=function(t,n){return this.animatePath(t,n,0,!1)},n.prototype.drawOn=function(t,n){var e=this,r=Zt({color:"#000000",strokeWidth:5,fill:!0,fillColor:null,drawDuration:1e3,fillDuration:1e3,easing:"linear"},n),o=r.color,i=r.strokeWidth,a=r.fill,s=r.fillColor,u=r.drawDuration,l=r.fillDuration,c=r.easing;return function(n){var r=e.element().querySelector(t);if(!r)throw new Error("Path element with selector ".concat(t," not found"));var p=r.getTotalLength();r.setAttribute("stroke-dashoffset","".concat(p)),r.setAttribute("stroke-dasharray","".concat(p)),r.setAttribute("stroke-width","".concat(i)),r.setAttribute("stroke",o),n({animate:!0,element:r,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:u,easing:c}}),a&&n({animate:!0,delay:u,element:r,attributes:{fill:null!=s?s:o,"stroke-dasharray":"none"},animationParams:{duration:l}})}},n}(vt);function Jt(t,n,e){return Math.min(Math.max(t,n),e)}function tn(t){return Jt(t,0,1)}function nn(t){var n=Jt(t,0,1);return Math.pow(n,2)*(3-2*n)}return n})()));
1
+ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Presenter=n():t.Presenter=n()}(this,(()=>(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{Arrow:()=>At,BoundingBox:()=>e,Circle:()=>It,Grid:()=>Ft,Group:()=>Nt,IFrame:()=>Wt,Image:()=>Rt,Line:()=>wt,Paragraph:()=>Kt,Path:()=>St,Polygon:()=>_t,Presentation:()=>o,Rectangle:()=>nn,Slide:()=>yt,SlideObject:()=>vt,Text:()=>Qt,VectorGraphic:()=>on,animateStateChange:()=>pt,anime:()=>it,clamp:()=>an,easeCubic:()=>un,easeLinear:()=>sn,generateTextNodes:()=>Ut,performAnimation:()=>lt,preserveLeadingSpaces:()=>Yt,skipAnimation:()=>ct});var e=function(){function t(t,n,e){this.origin=t,this.width=n,this.height=e}return t.fromElement=function(n){var e=n.getBBox();return new t({x:e.x,y:e.y},e.width,e.height)},t}(),r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},r.apply(this,arguments)},o=function(){function t(t,n,o,i){void 0===i&&(i={});var a=this;if(null===this.element)throw new Error("Presentation cannot be mounted to null element.");if(0===n.length)throw new Error("Presentation requires at least one slide");this.title=t,this.element=o,this.slides=n,this.options=r({width:3840,height:2160,backgroundColor:"#ffffff",fonts:[]},i),this.presentationState={currentSlide:0},this.boundingBox=new e({x:0,y:0},this.options.width,this.options.height),this.container=null,this.svg=null,this.shadow=null,this.background=null,this.additionalElementContainer=null,this.textCommand={active:!1,command:""},this.shortcuts={s:{slideIndex:0,animationIndex:0},e:{slideIndex:n.length-1,animationIndex:n[n.length-1].animations.length}};for(var s=0;s<n.length;s++)this.shortcuts[(s+1).toString()]={slideIndex:s,animationIndex:0};n.forEach((function(t,n){t.props.shortcuts.forEach((function(t){var e="string"==typeof t?t:t[0],r="string"==typeof t?0:t[1];a.shortcuts[e]={slideIndex:n,animationIndex:r}}))}))}return t.prototype.present=function(){var t=this;this.container=document.createElement("div"),this.container.style.width="100%",this.container.style.aspectRatio="".concat(this.options.width," / ").concat(this.options.height),this.container.style.position="relative",this.container.style.top="50%",this.container.style.transform="translateY(-50%)",this.container.style.marginLeft="auto",this.container.style.marginRight="auto",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.backgroundColor="transparent",this.svg.style.cursor="none",this.setupKeyboardCommands(),this.shadow=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.shadow.style.visibility="hidden",this.background=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.background.style.backgroundColor=this.options.backgroundColor,this.additionalElementContainer=document.createElement("div"),this.additionalElementContainer.style.width="100%",this.additionalElementContainer.style.height="100%",this.additionalElementContainer.style.position="absolute",[this.svg,this.shadow,this.background].forEach((function(n){n.setAttribute("width","100%"),n.setAttribute("viewBox","0 0 ".concat(t.options.width," ").concat(t.options.height)),n.style.position="absolute"})),this.isFullBodyPresentation()&&(document.title=this.title,document.documentElement.style.height="100%",document.body.style.height="100%",document.body.style.width="100%",document.body.style.margin="0",document.body.style.backgroundColor="#000000",window.matchMedia("(min-aspect-ratio: ".concat(this.options.width," / ").concat(this.options.height,")")).addEventListener("change",this.updateSVGContainerSize.bind(this)),this.updateSVGContainerSize()),this.navigatorContainer=document.createElement("div"),this.navigatorContainer.style.position="absolute",this.navigatorContainer.style.height="100%",this.navigatorContainer.style.width="200px",this.navigatorContainer.style.backgroundColor="#e6e6e6",this.navigatorContainer.style.overflow="scroll",this.navigatorContainer.style.display="none",this.slides.forEach((function(n,e){var r=document.createElement("button");r.style.display="block",r.style.margin="10px",r.style.padding="10px",r.style.width="calc(100% - 20px)",r.style.textAlign="left",r.style.backgroundColor="transparent",r.style.border="none",r.style.cursor="pointer",r.innerHTML="".concat(e+1),null!==n.props.title&&(r.innerHTML+=": ".concat(n.props.title)),r.addEventListener("click",(function(){t.navigatorContainer.style.display="none",t.presentationState.currentSlide=e,n.render(t)})),t.navigatorContainer.appendChild(r)})),this.container.appendChild(this.shadow),this.container.appendChild(this.background),this.container.appendChild(this.additionalElementContainer),this.container.appendChild(this.svg),this.container.appendChild(this.navigatorContainer),this.element.appendChild(this.container),this.presentationState.currentSlide=0;var n=this.slides[this.presentationState.currentSlide];void 0!==n&&n.render(this)},t.prototype.setupKeyboardCommands=function(){var t=this,n=this.isFullBodyPresentation()?document.body:this.container;n.addEventListener("keyup",this.handleKeyboardEvent.bind(this)),n.addEventListener("mousemove",(function(){t.svg.style.cursor="auto"}))},t.prototype.handleKeyboardEvent=function(t){if("Escape"!==t.key){if("ArrowRight"===t.key||" "===t.key)return this.resetTextCommand(),void this.next(!t.shiftKey);if("ArrowLeft"===t.key)return this.resetTextCommand(),void this.previous(!t.shiftKey);if(this.textCommand.active){if("Enter"===t.key){var n=this.textCommand.command;this.resetTextCommand();var e=this.shortcuts[n];if(void 0===e)return;var r=this.slides[this.presentationState.currentSlide];this.shortcuts.b={slideIndex:this.presentationState.currentSlide,animationIndex:r.animationIndex},this.presentationState.currentSlide=e.slideIndex;var o=this.slides[this.presentationState.currentSlide];if(void 0===o)return;return void o.render(this,e.animationIndex)}"Backspace"===t.key?this.textCommand.command=this.textCommand.command.slice(0,-1):this.textCommand.command+=t.key}else if("g"===t.key)this.textCommand.active=!0,this.textCommand.command="";else if("`"===t.key){var i="block"===this.navigatorContainer.style.display;this.navigatorContainer.style.display=i?"none":"block"}}else this.resetTextCommand()},t.prototype.resetTextCommand=function(){this.textCommand.active=!1,this.textCommand.command=""},t.prototype.updateSVGContainerSize=function(){window.innerHeight/window.innerWidth>this.options.height/this.options.width?(this.container.style.width="100%",this.container.style.height="auto"):(this.container.style.width="auto",this.container.style.height="100%")},t.prototype.next=function(t){return n=this,e=void 0,o=function(){var n,e,r;return function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}(this,(function(o){switch(o.label){case 0:return this.svg.style.cursor="none",void 0===(n=this.slides[this.presentationState.currentSlide])?[2]:(e=!t)?[3,2]:[4,n.nextAnimation()];case 1:e=!o.sent(),o.label=2;case 2:if(e){if(this.presentationState.currentSlide++,void 0===(r=this.slides[this.presentationState.currentSlide]))return[2];r.render(this)}return[2]}}))},new((r=void 0)||(r=Promise))((function(t,i){function a(t){try{u(o.next(t))}catch(t){i(t)}}function s(t){try{u(o.throw(t))}catch(t){i(t)}}function u(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((o=o.apply(n,e||[])).next())}));var n,e,r,o},t.prototype.previous=function(t){this.svg.style.cursor="none";var n=this.slides[this.presentationState.currentSlide];if(void 0!==n){if(t&&n.animationIndex>0)n.render(this,n.animationIndex-1);else if(!t||0!==this.presentationState.currentSlide){this.presentationState.currentSlide>0&&this.presentationState.currentSlide--;var e=this.slides[this.presentationState.currentSlide];void 0!==e&&e.render(this,t?e.animations.length:0)}}else{this.presentationState.currentSlide=this.slides.length-1;var r=this.slides[this.presentationState.currentSlide];if(void 0===r)return;r.render(this,t?r.animations.length:0)}},t.prototype.isFullBodyPresentation=function(){return this.element===document.body},t.prototype.computeRenderedBoundingBox=function(t,n){if(void 0===n&&(n=null),null===n&&this.svg.contains(t))return e.fromElement(t);var r=t.cloneNode(!0);if(null!==n){r.innerHTML="";for(var o=0,i=n;o<i.length;o++){var a=i[o];r.appendChild(a.cloneNode(!0))}}this.shadow.appendChild(r);var s=e.fromElement(r);return this.shadow.removeChild(r),s},t}(),i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},a={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},s=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],u={CSS:{},springs:{}};function l(t,n,e){return Math.min(Math.max(t,n),e)}function c(t,n){return t.indexOf(n)>-1}function p(t,n){return t.apply(null,n)}var h={arr:function(t){return Array.isArray(t)},obj:function(t){return c(Object.prototype.toString.call(t),"Object")},pth:function(t){return h.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||h.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return h.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return h.hex(t)||h.rgb(t)||h.hsl(t)},key:function(t){return!i.hasOwnProperty(t)&&!a.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function f(t){var n=/\(([^)]+)\)/.exec(t);return n?n[1].split(",").map((function(t){return parseFloat(t)})):[]}function d(t,n){var e=f(t),r=l(h.und(e[0])?1:e[0],.1,100),o=l(h.und(e[1])?100:e[1],.1,100),i=l(h.und(e[2])?10:e[2],.1,100),a=l(h.und(e[3])?0:e[3],.1,100),s=Math.sqrt(o/r),c=i/(2*Math.sqrt(o*r)),p=c<1?s*Math.sqrt(1-c*c):0,d=c<1?(c*s-a)/p:-a+s;function y(t){var e=n?n*t/1e3:t;return e=c<1?Math.exp(-e*c*s)*(1*Math.cos(p*e)+d*Math.sin(p*e)):(1+d*e)*Math.exp(-e*s),0===t||1===t?t:1-e}return n?y:function(){var n=u.springs[t];if(n)return n;for(var e=1/6,r=0,o=0;;)if(1===y(r+=e)){if(++o>=16)break}else o=0;var i=r*e*1e3;return u.springs[t]=i,i}}function y(t){return void 0===t&&(t=10),function(n){return Math.ceil(l(n,1e-6,1)*t)*(1/t)}}var g,v,m=function(){var t=.1;function n(t,n){return 1-3*n+3*t}function e(t,n){return 3*n-6*t}function r(t){return 3*t}function o(t,o,i){return((n(o,i)*t+e(o,i))*t+r(o))*t}function i(t,o,i){return 3*n(o,i)*t*t+2*e(o,i)*t+r(o)}return function(n,e,r,a){if(0<=n&&n<=1&&0<=r&&r<=1){var s=new Float32Array(11);if(n!==e||r!==a)for(var u=0;u<11;++u)s[u]=o(u*t,n,r);return function(u){return n===e&&r===a||0===u||1===u?u:o(function(e){for(var a=0,u=1;10!==u&&s[u]<=e;++u)a+=t;--u;var l=a+(e-s[u])/(s[u+1]-s[u])*t,c=i(l,n,r);return c>=.001?function(t,n,e,r){for(var a=0;a<4;++a){var s=i(n,e,r);if(0===s)return n;n-=(o(n,e,r)-t)/s}return n}(e,l,n,r):0===c?l:function(t,n,e,r,i){var a,s,u=0;do{(a=o(s=n+(e-n)/2,r,i)-t)>0?e=s:n=s}while(Math.abs(a)>1e-7&&++u<10);return s}(e,a,a+t,n,r)}(u),e,a)}}}}(),b=(g={linear:function(){return function(t){return t}}},v={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Expo:function(){return function(t){return t?Math.pow(2,10*t-10):0}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var n,e=4;t<((n=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*n-2)/22-t,2)}},Elastic:function(t,n){void 0===t&&(t=1),void 0===n&&(n=.5);var e=l(t,1,10),r=l(n,.1,2);return function(t){return 0===t||1===t?t:-e*Math.pow(2,10*(t-1))*Math.sin((t-1-r/(2*Math.PI)*Math.asin(1/e))*(2*Math.PI)/r)}}},["Quad","Cubic","Quart","Quint"].forEach((function(t,n){v[t]=function(){return function(t){return Math.pow(t,n+2)}}})),Object.keys(v).forEach((function(t){var n=v[t];g["easeIn"+t]=n,g["easeOut"+t]=function(t,e){return function(r){return 1-n(t,e)(1-r)}},g["easeInOut"+t]=function(t,e){return function(r){return r<.5?n(t,e)(2*r)/2:1-n(t,e)(-2*r+2)/2}},g["easeOutIn"+t]=function(t,e){return function(r){return r<.5?(1-n(t,e)(1-2*r))/2:(n(t,e)(2*r-1)+1)/2}}})),g);function w(t,n){if(h.fnc(t))return t;var e=t.split("(")[0],r=b[e],o=f(t);switch(e){case"spring":return d(t,n);case"cubicBezier":return p(m,o);case"steps":return p(y,o);default:return p(r,o)}}function x(t){try{return document.querySelectorAll(t)}catch(t){return}}function O(t,n){for(var e=t.length,r=arguments.length>=2?arguments[1]:void 0,o=[],i=0;i<e;i++)if(i in t){var a=t[i];n.call(r,a,i,t)&&o.push(a)}return o}function S(t){return t.reduce((function(t,n){return t.concat(h.arr(n)?S(n):n)}),[])}function C(t){return h.arr(t)?t:(h.str(t)&&(t=x(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function j(t,n){return t.some((function(t){return t===n}))}function _(t){var n={};for(var e in t)n[e]=t[e];return n}function P(t,n){var e=_(t);for(var r in t)e[r]=n.hasOwnProperty(r)?n[r]:t[r];return e}function k(t,n){var e=_(t);for(var r in n)e[r]=h.und(t[r])?n[r]:t[r];return e}function A(t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(n)return n[1]}function E(t,n){return h.fnc(t)?t(n.target,n.id,n.total):t}function M(t,n){return t.getAttribute(n)}function I(t,n,e){if(j([e,"deg","rad","turn"],A(n)))return n;var r=u.CSS[n+e];if(!h.und(r))return r;var o=document.createElement(t.tagName),i=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;i.appendChild(o),o.style.position="absolute",o.style.width=100+e;var a=100/o.offsetWidth;i.removeChild(o);var s=a*parseFloat(n);return u.CSS[n+e]=s,s}function T(t,n,e){if(n in t.style){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=t.style[n]||getComputedStyle(t).getPropertyValue(r)||"0";return e?I(t,o,e):o}}function B(t,n){return h.dom(t)&&!h.inp(t)&&(!h.nil(M(t,n))||h.svg(t)&&t[n])?"attribute":h.dom(t)&&j(s,n)?"transform":h.dom(t)&&"transform"!==n&&T(t,n)?"css":null!=t[n]?"object":void 0}function N(t){if(h.dom(t)){for(var n,e=t.style.transform||"",r=/(\w+)\(([^)]*)\)/g,o=new Map;n=r.exec(e);)o.set(n[1],n[2]);return o}}function L(t,n,e,r){switch(B(t,n)){case"transform":return function(t,n,e,r){var o=c(n,"scale")?1:0+function(t){return c(t,"translate")||"perspective"===t?"px":c(t,"rotate")||c(t,"skew")?"deg":void 0}(n),i=N(t).get(n)||o;return e&&(e.transforms.list.set(n,i),e.transforms.last=n),r?I(t,i,r):i}(t,n,r,e);case"css":return T(t,n,e);case"attribute":return M(t,n);default:return t[n]||0}}function F(t,n){var e=/^(\*=|\+=|-=)/.exec(t);if(!e)return t;var r=A(t)||0,o=parseFloat(n),i=parseFloat(t.replace(e[0],""));switch(e[0][0]){case"+":return o+i+r;case"-":return o-i+r;case"*":return o*i+r}}function D(t,n){if(h.col(t))return function(t){return h.rgb(t)?(e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n=t))?"rgba("+e[1]+",1)":n:h.hex(t)?function(t){var n=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,n,e,r){return n+n+e+e+r+r})),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return"rgba("+parseInt(e[1],16)+","+parseInt(e[2],16)+","+parseInt(e[3],16)+",1)"}(t):h.hsl(t)?function(t){var n,e,r,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),i=parseInt(o[1],10)/360,a=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,u=o[4]||1;function l(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(0==a)n=e=r=s;else{var c=s<.5?s*(1+a):s+a-s*a,p=2*s-c;n=l(p,c,i+1/3),e=l(p,c,i),r=l(p,c,i-1/3)}return"rgba("+255*n+","+255*e+","+255*r+","+u+")"}(t):void 0;var n,e}(t);if(/\s/g.test(t))return t;var e=A(t),r=e?t.substr(0,t.length-e.length):t;return n?r+n:r}function H(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function W(t){for(var n,e=t.points,r=0,o=0;o<e.numberOfItems;o++){var i=e.getItem(o);o>0&&(r+=H(n,i)),n=i}return r}function q(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*M(t,"r")}(t);case"rect":return function(t){return 2*M(t,"width")+2*M(t,"height")}(t);case"line":return function(t){return H({x:M(t,"x1"),y:M(t,"y1")},{x:M(t,"x2"),y:M(t,"y2")})}(t);case"polyline":return W(t);case"polygon":return function(t){var n=t.points;return W(t)+H(n.getItem(n.numberOfItems-1),n.getItem(0))}(t)}}function z(t,n){var e=n||{},r=e.el||function(t){for(var n=t.parentNode;h.svg(n)&&h.svg(n.parentNode);)n=n.parentNode;return n}(t),o=r.getBoundingClientRect(),i=M(r,"viewBox"),a=o.width,s=o.height,u=e.viewBox||(i?i.split(" "):[0,0,a,s]);return{el:r,viewBox:u,x:u[0]/1,y:u[1]/1,w:a,h:s,vW:u[2],vH:u[3]}}function R(t,n,e){function r(e){void 0===e&&(e=0);var r=n+e>=1?n+e:0;return t.el.getPointAtLength(r)}var o=z(t.el,t.svg),i=r(),a=r(-1),s=r(1),u=e?1:o.w/o.vW,l=e?1:o.h/o.vH;switch(t.property){case"x":return(i.x-o.x)*u;case"y":return(i.y-o.y)*l;case"angle":return 180*Math.atan2(s.y-a.y,s.x-a.x)/Math.PI}}function G(t,n){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=D(h.pth(t)?t.totalLength:t,n)+"";return{original:r,numbers:r.match(e)?r.match(e).map(Number):[0],strings:h.str(t)||n?r.split(e):[]}}function V(t){return O(t?S(h.arr(t)?t.map(C):C(t)):[],(function(t,n,e){return e.indexOf(t)===n}))}function K(t){var n=V(t);return n.map((function(t,e){return{target:t,id:e,total:n.length,transforms:{list:N(t)}}}))}function $(t,n){var e=_(n);if(/^spring/.test(e.easing)&&(e.duration=d(e.easing)),h.arr(t)){var r=t.length;2!==r||h.obj(t[0])?h.fnc(n.duration)||(e.duration=n.duration/r):t={value:t}}var o=h.arr(t)?t:[t];return o.map((function(t,e){var r=h.obj(t)&&!h.pth(t)?t:{value:t};return h.und(r.delay)&&(r.delay=e?0:n.delay),h.und(r.endDelay)&&(r.endDelay=e===o.length-1?n.endDelay:0),r})).map((function(t){return k(t,e)}))}var Y={css:function(t,n,e){return t.style[n]=e},attribute:function(t,n,e){return t.setAttribute(n,e)},object:function(t,n,e){return t[n]=e},transform:function(t,n,e,r,o){if(r.list.set(n,e),n===r.last||o){var i="";r.list.forEach((function(t,n){i+=n+"("+t+") "})),t.style.transform=i}}};function U(t,n){K(t).forEach((function(t){for(var e in n){var r=E(n[e],t),o=t.target,i=A(r),a=L(o,e,i,t),s=F(D(r,i||A(a)),a),u=B(o,e);Y[u](o,e,s,t.transforms,!0)}}))}function X(t,n){return O(S(t.map((function(t){return n.map((function(n){return function(t,n){var e=B(t.target,n.name);if(e){var r=function(t,n){var e;return t.tweens.map((function(r){var o=function(t,n){var e={};for(var r in t){var o=E(t[r],n);h.arr(o)&&1===(o=o.map((function(t){return E(t,n)}))).length&&(o=o[0]),e[r]=o}return e.duration=parseFloat(e.duration),e.delay=parseFloat(e.delay),e}(r,n),i=o.value,a=h.arr(i)?i[1]:i,s=A(a),u=L(n.target,t.name,s,n),l=e?e.to.original:u,c=h.arr(i)?i[0]:l,p=A(c)||A(u),f=s||p;return h.und(a)&&(a=l),o.from=G(c,f),o.to=G(F(a,c),f),o.start=e?e.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=w(o.easing,o.duration),o.isPath=h.pth(i),o.isPathTargetInsideSVG=o.isPath&&h.svg(n.target),o.isColor=h.col(o.from.original),o.isColor&&(o.round=1),e=o,o}))}(n,t),o=r[r.length-1];return{type:e,property:n.name,animatable:t,tweens:r,duration:o.end,delay:r[0].delay,endDelay:o.endDelay}}}(t,n)}))}))),(function(t){return!h.und(t)}))}function Z(t,n){var e=t.length,r=function(t){return t.timelineOffset?t.timelineOffset:0},o={};return o.duration=e?Math.max.apply(Math,t.map((function(t){return r(t)+t.duration}))):n.duration,o.delay=e?Math.min.apply(Math,t.map((function(t){return r(t)+t.delay}))):n.delay,o.endDelay=e?o.duration-Math.max.apply(Math,t.map((function(t){return r(t)+t.duration-t.endDelay}))):n.endDelay,o}var Q=0,J=[],tt=function(){var t;function n(e){for(var r=J.length,o=0;o<r;){var i=J[o];i.paused?(J.splice(o,1),r--):(i.tick(e),o++)}t=o>0?requestAnimationFrame(n):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){et.suspendWhenDocumentHidden&&(nt()?t=cancelAnimationFrame(t):(J.forEach((function(t){return t._onDocumentVisibility()})),tt()))})),function(){t||nt()&&et.suspendWhenDocumentHidden||!(J.length>0)||(t=requestAnimationFrame(n))}}();function nt(){return!!document&&document.hidden}function et(t){void 0===t&&(t={});var n,e=0,r=0,o=0,s=0,u=null;function c(t){var n=window.Promise&&new Promise((function(t){return u=t}));return t.finished=n,n}var p=function(t){var n=P(i,t),e=P(a,t),r=function(t,n){var e=[],r=n.keyframes;for(var o in r&&(n=k(function(t){for(var n=O(S(t.map((function(t){return Object.keys(t)}))),(function(t){return h.key(t)})).reduce((function(t,n){return t.indexOf(n)<0&&t.push(n),t}),[]),e={},r=function(r){var o=n[r];e[o]=t.map((function(t){var n={};for(var e in t)h.key(e)?e==o&&(n.value=t[e]):n[e]=t[e];return n}))},o=0;o<n.length;o++)r(o);return e}(r),n)),n)h.key(o)&&e.push({name:o,tweens:$(n[o],t)});return e}(e,t),o=K(t.targets),s=X(o,r),u=Z(s,e),l=Q;return Q++,k(n,{id:l,children:[],animatables:o,animations:s,duration:u.duration,delay:u.delay,endDelay:u.endDelay})}(t);function f(){var t=p.direction;"alternate"!==t&&(p.direction="normal"!==t?"normal":"reverse"),p.reversed=!p.reversed,n.forEach((function(t){return t.reversed=p.reversed}))}function d(t){return p.reversed?p.duration-t:t}function y(){e=0,r=d(p.currentTime)*(1/et.speed)}function g(t,n){n&&n.seek(t-n.timelineOffset)}function v(t){for(var n=0,e=p.animations,r=e.length;n<r;){var o=e[n],i=o.animatable,a=o.tweens,s=a.length-1,u=a[s];s&&(u=O(a,(function(n){return t<n.end}))[0]||u);for(var c=l(t-u.start-u.delay,0,u.duration)/u.duration,h=isNaN(c)?1:u.easing(c),f=u.to.strings,d=u.round,y=[],g=u.to.numbers.length,v=void 0,m=0;m<g;m++){var b=void 0,w=u.to.numbers[m],x=u.from.numbers[m]||0;b=u.isPath?R(u.value,h*w,u.isPathTargetInsideSVG):x+h*(w-x),d&&(u.isColor&&m>2||(b=Math.round(b*d)/d)),y.push(b)}var S=f.length;if(S){v=f[0];for(var C=0;C<S;C++){f[C];var j=f[C+1],_=y[C];isNaN(_)||(v+=j?_+j:_+" ")}}else v=y[0];Y[o.type](i.target,o.property,v,i.transforms),o.currentValue=v,n++}}function m(t){p[t]&&!p.passThrough&&p[t](p)}function b(t){var i=p.duration,a=p.delay,h=i-p.endDelay,y=d(t);p.progress=l(y/i*100,0,100),p.reversePlayback=y<p.currentTime,n&&function(t){if(p.reversePlayback)for(var e=s;e--;)g(t,n[e]);else for(var r=0;r<s;r++)g(t,n[r])}(y),!p.began&&p.currentTime>0&&(p.began=!0,m("begin")),!p.loopBegan&&p.currentTime>0&&(p.loopBegan=!0,m("loopBegin")),y<=a&&0!==p.currentTime&&v(0),(y>=h&&p.currentTime!==i||!i)&&v(i),y>a&&y<h?(p.changeBegan||(p.changeBegan=!0,p.changeCompleted=!1,m("changeBegin")),m("change"),v(y)):p.changeBegan&&(p.changeCompleted=!0,p.changeBegan=!1,m("changeComplete")),p.currentTime=l(y,0,i),p.began&&m("update"),t>=i&&(r=0,p.remaining&&!0!==p.remaining&&p.remaining--,p.remaining?(e=o,m("loopComplete"),p.loopBegan=!1,"alternate"===p.direction&&f()):(p.paused=!0,p.completed||(p.completed=!0,m("loopComplete"),m("complete"),!p.passThrough&&"Promise"in window&&(u(),c(p)))))}return c(p),p.reset=function(){var t=p.direction;p.passThrough=!1,p.currentTime=0,p.progress=0,p.paused=!0,p.began=!1,p.loopBegan=!1,p.changeBegan=!1,p.completed=!1,p.changeCompleted=!1,p.reversePlayback=!1,p.reversed="reverse"===t,p.remaining=p.loop,n=p.children;for(var e=s=n.length;e--;)p.children[e].reset();(p.reversed&&!0!==p.loop||"alternate"===t&&1===p.loop)&&p.remaining++,v(p.reversed?p.duration:0)},p._onDocumentVisibility=y,p.set=function(t,n){return U(t,n),p},p.tick=function(t){o=t,e||(e=o),b((o+(r-e))*et.speed)},p.seek=function(t){b(d(t))},p.pause=function(){p.paused=!0,y()},p.play=function(){p.paused&&(p.completed&&p.reset(),p.paused=!1,J.push(p),y(),tt())},p.reverse=function(){f(),p.completed=!p.reversed,y()},p.restart=function(){p.reset(),p.play()},p.remove=function(t){ot(V(t),p)},p.reset(),p.autoplay&&p.play(),p}function rt(t,n){for(var e=n.length;e--;)j(t,n[e].animatable.target)&&n.splice(e,1)}function ot(t,n){var e=n.animations,r=n.children;rt(t,e);for(var o=r.length;o--;){var i=r[o],a=i.animations;rt(t,a),a.length||i.children.length||r.splice(o,1)}e.length||r.length||n.pause()}et.version="3.2.1",et.speed=1,et.suspendWhenDocumentHidden=!0,et.running=J,et.remove=function(t){for(var n=V(t),e=J.length;e--;)ot(n,J[e])},et.get=L,et.set=U,et.convertPx=I,et.path=function(t,n){var e=h.str(t)?x(t)[0]:t,r=n||100;return function(t){return{property:t,el:e,svg:z(e),totalLength:q(e)*(r/100)}}},et.setDashoffset=function(t){var n=q(t);return t.setAttribute("stroke-dasharray",n),n},et.stagger=function(t,n){void 0===n&&(n={});var e=n.direction||"normal",r=n.easing?w(n.easing):null,o=n.grid,i=n.axis,a=n.from||0,s="first"===a,u="center"===a,l="last"===a,c=h.arr(t),p=c?parseFloat(t[0]):parseFloat(t),f=c?parseFloat(t[1]):0,d=A(c?t[1]:t)||0,y=n.start||0+(c?p:0),g=[],v=0;return function(t,n,h){if(s&&(a=0),u&&(a=(h-1)/2),l&&(a=h-1),!g.length){for(var m=0;m<h;m++){if(o){var b=u?(o[0]-1)/2:a%o[0],w=u?(o[1]-1)/2:Math.floor(a/o[0]),x=b-m%o[0],O=w-Math.floor(m/o[0]),S=Math.sqrt(x*x+O*O);"x"===i&&(S=-x),"y"===i&&(S=-O),g.push(S)}else g.push(Math.abs(a-m));v=Math.max.apply(Math,g)}r&&(g=g.map((function(t){return r(t/v)*v}))),"reverse"===e&&(g=g.map((function(t){return i?t<0?-1*t:-t:Math.abs(v-t)})))}return y+(c?(f-p)/v:p)*(Math.round(100*g[n])/100)+d}},et.timeline=function(t){void 0===t&&(t={});var n=et(t);return n.duration=0,n.add=function(e,r){var o=J.indexOf(n),i=n.children;function s(t){t.passThrough=!0}o>-1&&J.splice(o,1);for(var u=0;u<i.length;u++)s(i[u]);var l=k(e,P(a,t));l.targets=l.targets||t.targets;var c=n.duration;l.autoplay=!1,l.direction=n.direction,l.timelineOffset=h.und(r)?c:F(r,c),s(n),n.seek(l.timelineOffset);var p=et(l);s(p),i.push(p);var f=Z(i,t);return n.delay=f.delay,n.endDelay=f.endDelay,n.duration=f.duration,n.seek(0),n.reset(),n.autoplay&&n.play(),n},n},et.easing=w,et.penner=b,et.random=function(t,n){return Math.floor(Math.random()*(n-t+1))+t};const it=et;var at=function(){return at=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},at.apply(this,arguments)},st=function(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}))},ut=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},lt=function(t){return st(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s;return ut(this,(function(u){switch(u.label){case 0:Array.isArray(t)||(t=[t]),n=function(t){var n,e,r;return ut(this,(function(o){switch(o.label){case 0:return void 0===t.delay?[3,2]:[4,new Promise((function(n){return setTimeout(n,t.delay)}))];case 1:o.sent(),o.label=2;case 2:if(!1===t.animate)return ct(t),[2,"continue"];if(void 0!==t.animateCallback&&t.animateCallback(),void 0!==t.element&&(it(at(at(at({targets:t.element},null!==(i=t.attributes)&&void 0!==i?i:{}),null!==(a=t.styles)&&void 0!==a?a:{}),null!==(s=t.animationParams)&&void 0!==s?s:{})),t.children))for(t.element.innerHTML="",n=0,e=t.children;n<e.length;n++)r=e[n],t.element.appendChild(r);return[2]}}))},e=0,r=t,u.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:u.sent(),u.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},ct=function(t){return st(void 0,void 0,void 0,(function(){var n,e,r,o,i,a,s,u,l,c,p,h,f,d,y;return ut(this,(function(g){for(Array.isArray(t)||(t=[t]),n=0,e=t;n<e.length;n++)if((r=e[n]).updateCallback&&r.updateCallback(),o=r.element){if(r.attributes)for(i=0,a=Object.entries(r.attributes);i<a.length;i++)s=a[i],p=s[0],h=s[1],o.setAttribute(p,h);if(r.styles)for(u=0,l=Object.entries(r.styles);u<l.length;u++)c=l[u],p=c[0],h=c[1],o.style[p]=h;if(r.children)for(o.innerHTML="",f=0,d=r.children;f<d.length;f++)y=d[f],o.appendChild(y)}return[2]}))}))};function pt(t,n,e){void 0===e&&(e=500);var r=Object.keys(n),o=null,i=null;function a(s){null===o&&(o=s),null===i&&(i=at({},t.state));for(var u=s-o,l=Math.min(u/e,1),c=0,p=r;c<p.length;c++){var h=p[c];if("number"==typeof n[h]){var f=i[h],d=n[h];t.state[h]=f+l*(d-f)}else 1==l&&(t.state[h]=n[h])}l<1&&requestAnimationFrame(a)}return function(e){return e({animate:!0,animateCallback:function(){o=null,i=null,requestAnimationFrame(a)},updateCallback:function(){for(var e=0,o=r;e<o.length;e++){var i=o[e];t.state[i]=n[i]}}})}}var ht,ft=function(){return ft=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},ft.apply(this,arguments)},dt=function(t,n){var e,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(t,i)}catch(t){s=[6,t],r=0}finally{e=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},yt=function(){function t(t,n,e){void 0===n&&(n=[]),void 0===e&&(e={}),this.objects=t.filter((function(t){return null!==t})),this.animations=n,this.animationIndex=0,this.debugAnimation=null,this.keyBuilds="last",this.props=ft({additionalElement:null,shortcuts:[],title:null},e)}return t.prototype.render=function(t,n){if(void 0===n&&(n=0),this.animationIndex=n,this.objects.forEach((function(n){n.generate(t)})),t.additionalElementContainer.innerHTML="",null!==this.props.additionalElement){var e="function"==typeof this.props.additionalElement?this.props.additionalElement():this.props.additionalElement;e.style.width="100%",e.style.height="auto",t.additionalElementContainer.appendChild(e)}if(null===this.debugAnimation||t.svg.innerHTML){for(a=0;a<this.animationIndex;a++)if(s=this.animations[a])if(Array.isArray(s))for(var r=0,o=s;r<o.length;r++)"number"!=typeof(c=o[r])&&c(ct);else s(ct)}else{var i=this.debugAnimation;i<0&&(i=this.animations.length+1+i);for(var a=0;a<i;a++){var s;if(s=this.animations[a])if(Array.isArray(s))for(var u=0,l=s;u<l.length;u++){var c;"number"!=typeof(c=l[u])&&c(ct)}else s(ct)}this.animationIndex=i}t.svg.innerHTML="",this.objects.forEach((function(n){t.svg.appendChild(n.element())}))},t.prototype.nextAnimation=function(){return t=this,n=void 0,r=function(){var t,n,e,r,o;return dt(this,(function(i){switch(i.label){case 0:if(!(t=this.animations[this.animationIndex]))return[3,7];if(!Array.isArray(t))return[3,5];n=function(t){return dt(this,(function(n){switch(n.label){case 0:return"number"!=typeof t?[3,2]:[4,new Promise((function(n){return setTimeout(n,t)}))];case 1:return n.sent(),[2,"continue"];case 2:return t(lt),[2]}}))},e=0,r=t,i.label=1;case 1:return e<r.length?(o=r[e],[5,n(o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return e++,[3,1];case 4:return[3,6];case 5:t(lt),i.label=6;case 6:return this.animationIndex++,[2,!0];case 7:return[2,!1]}}))},new((e=void 0)||(e=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,s)}u((r=r.apply(t,n||[])).next())}));var t,n,e,r},t.prototype.getKeyBuilds=function(){var t=this;return"first"===this.keyBuilds?[0]:"last"===this.keyBuilds?[this.animations.length]:"all"===this.keyBuilds?Array.from({length:this.animations.length+1},(function(t,n){return n})):"none"===this.keyBuilds?[]:Array.isArray(this.keyBuilds)?this.keyBuilds.filter((function(n){return n>=0&&n<=t.animations.length})):[0]},t}(),gt=function(){return gt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},gt.apply(this,arguments)},vt=function(){function t(t){this.props=gt({position:{x:0,y:0},anchor:"topleft"},t),this.initialProps=gt({},this.props),this._element=null,this._presentation=null,this._children=[]}return t.prototype.tagName=function(){return"g"},t.prototype.attributes=function(){return{}},t.prototype.additionalAttributes=function(){return{}},t.prototype.styles=function(){var t=this.props.opacity;return gt({},void 0!==t?{opacity:t.toString()}:{})},t.prototype.children=function(){return[]},t.prototype.requiresChildrenUpdate=function(t){return!1},t.prototype.positionAttributes=function(t){if(null===this._presentation)throw new Error("Cannot compute object position attributes without presentation");var n=this.positionInPresentation(t.origin),r=n.x,o=n.y,i=this.anchorBoundingBox(new e({x:r,y:o},t.width,t.height));return{x:i.origin.x,y:i.origin.y}},t.prototype.generate=function(t){this.props=gt({},this.initialProps),this._presentation=t;for(var n=this.createElement(),e=0,r=Object.entries(this.attributes());e<r.length;e++){var o=r[e],i=o[0],a=o[1];n.setAttribute(i,a)}for(var s=0,u=Object.entries(this.styles());s<u.length;s++){var l=u[s],c=l[0];a=l[1],n.style.setProperty(c,a)}this._children=this.children();for(var p=0,h=this._children;p<h.length;p++){var f=h[p];n.appendChild(f)}this._element=n;for(var d=0,y=Object.entries(this.additionalAttributes());d<y.length;d++){var g=y[d];i=g[0],a=g[1],n.setAttribute(i,a)}return n},t.prototype.createElement=function(){return document.createElementNS("http://www.w3.org/2000/svg",this.tagName())},t.prototype.element=function(){if(null===this._element)throw new Error("Element not yet generated");return this._element},t.prototype.animate=function(t,n,e,r){var o=this;return void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0),function(i){if(null===o._presentation)throw new Error("Cannot animate object without presentation");var a=o.requiresChildrenUpdate(t);o.props=gt(gt({},o.props),t),a&&(o._children=o.children());var s=o.attributes(),u=o.styles(),l=o.additionalAttributes(),c=Object.fromEntries(Object.entries(s).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e}))),p=Object.fromEntries(Object.entries(u).filter((function(t){var n=t[0],e=t[1];return o._element.style.getPropertyValue(n)!==e}))),h=Object.fromEntries(Object.entries(l).filter((function(t){var n=t[0],e=t[1];return o._element.getAttribute(n)!==e})));i(gt(gt(gt({animate:r,element:o.element(),attributes:gt(gt({},c),h),styles:p},null!==e?{delay:e}:{}),a?{children:o._children}:{}),{animationParams:gt(gt({duration:500,easing:"linear"},n),"cubic"===n.easing?{easing:"cubicBezier(0.42, 0, 0.58, 1)"}:{})}))}},t.prototype.set=function(t,n){return void 0===n&&(n=null),this.animate(t,{},n,!1)},t.prototype.move=function(t,n){return void 0===n&&(n={}),this.animate({position:t},n)},t.prototype.fadeIn=function(t){return void 0===t&&(t={}),this.animate({opacity:1},t)},t.prototype.fadeOut=function(t){return void 0===t&&(t={}),this.animate({opacity:0},t)},t.prototype.show=function(){return this.set({opacity:1})},t.prototype.hide=function(){return this.set({opacity:0})},t.prototype.positionInPresentation=function(t){var n=this._presentation,e=t.x,r=t.y;return e<=1&&e>=-1&&(e*=n.boundingBox.width),r<=1&&r>=-1&&(r*=n.boundingBox.height),{x:e,y:r}},t.prototype.anchorBoundingBox=function(t){var n=this,r=function(){switch(n.props.anchor){case"topleft":case"top":case"topright":return t.origin.y;case"left":case"center":case"right":return t.origin.y-t.height/2;case"bottomleft":case"bottom":case"bottomright":return t.origin.y-t.height}}(),o=function(){switch(n.props.anchor){case"topleft":case"left":case"bottomleft":return t.origin.x;case"top":case"center":case"bottom":return t.origin.x-t.width/2;case"topright":case"right":case"bottomright":return t.origin.x-t.width}}();return new e({x:o,y:r},t.width,t.height)},t.prototype.computeRenderedBoundingBox=function(t,n){void 0===n&&(n=null);var r=this._presentation.computeRenderedBoundingBox(t,n);return new e({x:this.props.position.x,y:this.props.position.y},r.width,r.height)},t}(),mt=(ht=function(t,n){return ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},ht(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}ht(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),bt=function(){return bt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},bt.apply(this,arguments)},wt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,bt({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:10,linecap:null,drawn:!0},n))||this}return mt(n,t),n.prototype.tagName=function(){return"line"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.drawn,o=n.width,i=n.linecap,a=this.positionInPresentation(this.props.start),s=this.positionInPresentation(this.props.end),u=a.x.toString(),l=a.y.toString(),c=s.x.toString(),p=s.y.toString();return r||(c=u,p=l),bt(bt(bt({},t.prototype.attributes.call(this)),{x1:u,y1:l,x2:c,y2:p,stroke:e,"stroke-width":o.toString()}),null!==i?{"stroke-linecap":i}:{})},n}(vt),xt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ot=function(){return Ot=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Ot.apply(this,arguments)},St=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Ot({points:[],color:"#000000",fill:"none",width:10,linecap:null,drawn:!0},n))||this}return xt(n,t),n.prototype.tagName=function(){return"path"},n.prototype.attributes=function(){var n=this,e=this.props,r=e.color,o=e.drawn,i=e.fill,a=e.width,s=e.linecap,u=this.props.points.map((function(t){return n.positionInPresentation(t)})).map((function(t,n){var e=0===n?"M":"L",r=t.x,o=t.y;return"".concat(e," ").concat(r," ").concat(o)})).join(" ");return Ot(Ot(Ot({},t.prototype.attributes.call(this)),{d:u,fill:o?i:"none",stroke:r,"stroke-width":o?a.toString():"0"}),null!==s?{"stroke-linecap":s}:{})},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.drawn,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["drawn"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var a,u,l;i.drawOn({drawDuration:null!==(a=e.duration)&&void 0!==a?a:1e3,fillDuration:null!==(u=e.duration)&&void 0!==u?u:1e3,easing:null!==(l=e.easing)&&void 0!==l?l:"linear"})(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.drawOn=function(t){var n=this;return void 0===t&&(t={}),function(e){var r,o,i,a;n.props.drawn=!0;var s=n.element(),u=s.getTotalLength(),l=null!==(r=t.drawDuration)&&void 0!==r?r:1e3;s.setAttribute("stroke-dashoffset","".concat(u)),s.setAttribute("stroke-dasharray","".concat(u)),s.setAttribute("stroke-width","".concat(n.props.width)),e({animate:!0,element:s,attributes:{"stroke-dashoffset":"0"},animationParams:{drawing:l,easing:null!==(o=t.easing)&&void 0!==o?o:"linear"}}),"none"!==n.props.fill&&e({animate:!0,delay:l,element:s,attributes:{fill:n.props.fill,"stroke-dasharray":"none"},animationParams:{duration:null!==(i=t.fillDuration)&&void 0!==i?i:1e3,easing:null!==(a=t.easing)&&void 0!==a?a:"linear"}})}},n}(vt),Ct=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),jt=function(){return jt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},jt.apply(this,arguments)},_t=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,jt({points:n,fill:"#000000",borderWidth:0,borderColor:"#000000"},e))||this}return Ct(n,t),n.prototype.tagName=function(){return"polygon"},n.prototype.attributes=function(){var n=this.props,e=n.points,r=n.fill,o=n.borderWidth,i=n.borderColor,a=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ");return jt(jt(jt({},t.prototype.attributes.call(this)),{points:a,fill:r}),o>0?{"stroke-width":o.toString(),stroke:i}:{})},n}(vt),Pt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),kt=function(){return kt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},kt.apply(this,arguments)},At=function(t){function n(n){void 0===n&&(n={});var e,r,o,i=this,a=null!==(e=n.width)&&void 0!==e?e:10,s=null!==(r=n.arrowSize)&&void 0!==r?r:4*a,u=null!==(o=n.opacity)&&void 0!==o?o:!1===n.drawn?0:1;return(i=t.call(this,kt({start:{x:0,y:0},end:{x:100,y:100},color:"#000000",width:a,arrowSize:s,opacity:u,filledHead:!0,doubledHead:!1,drawn:!0,padStart:{x:0,y:0},padEnd:{x:0,y:0}},n))||this).line=null,i.arrowhead=null,i}return Pt(n,t),n.prototype.tagName=function(){return"g"},n.prototype.calculateShapes=function(t){var n,e,r,o,i=t.arrowSize,a=t.drawn,s=t.doubledHead,u=t.filledHead,l=t.growFromCenter,c=this.positionInPresentation(t.start),p=this.positionInPresentation(t.end);c.x+=null!==(n=t.padStart.x)&&void 0!==n?n:0,c.y+=null!==(e=t.padStart.y)&&void 0!==e?e:0,p.x+=null!==(r=t.padEnd.x)&&void 0!==r?r:0,p.y+=null!==(o=t.padEnd.y)&&void 0!==o?o:0;var h=Math.atan2(p.y-c.y,p.x-c.x),f={x:(c.x+p.x)/2,y:(c.y+p.y)/2},d=l?f:c,y=a?p:{x:d.x+i*Math.cos(h),y:d.y+i*Math.sin(h)},g=u?Math.PI/6:Math.PI/4.5,v={x:y.x-i*Math.cos(h-g),y:y.y-i*Math.sin(h-g)},m={x:y.x-i*Math.cos(h+g),y:y.y-i*Math.sin(h+g)},b=t.filledHead?2*i/3:0,w=a?{x:p.x-b*Math.cos(h),y:p.y-b*Math.sin(h)}:{x:d.x+.8*i*Math.cos(h),y:d.y+.8*i*Math.sin(h)},x=[];if(s){var O=a?c:d,S={x:O.x+i*Math.cos(h-g),y:O.y+i*Math.sin(h-g)},C={x:O.x+i*Math.cos(h+g),y:O.y+i*Math.sin(h+g)};x.push(S,O,C),u&&(c={x:c.x+b*Math.cos(h),y:c.y+b*Math.sin(h)})}return{line:{start:!a&&l?{x:d.x+b*Math.cos(h),y:d.y+b*Math.sin(h)}:c,end:w},arrowhead:[v,y,m],doubledArrowhead:x}},n.prototype.children=function(){var t=this.props,n=t.color,e=t.width,r=t.filledHead,o=t.doubledHead,i=this.calculateShapes(this.props);return this.line=new wt({start:i.line.start,end:i.line.end,color:n,width:e}),this.line.generate(this._presentation),this.arrowhead=r?new _t(i.arrowhead,{fill:n,borderWidth:0,borderColor:n}):new St({points:i.arrowhead,color:n,width:e}),this.arrowhead.generate(this._presentation),o&&(this.doubledArrowhead=r?new _t(i.doubledArrowhead,{fill:n,borderWidth:0,borderColor:n}):new St({points:i.doubledArrowhead,color:n,width:e}),this.doubledArrowhead.generate(this._presentation)),function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([this.line.element(),this.arrowhead.element()],this.doubledArrowhead?[this.doubledArrowhead.element()]:[],!0)},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.start,s=n.end,u=n.drawn,l=n.color,c=n.width,p=n.arrowSize,h=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["start","end","drawn","color","width","arrowSize"]),f=Object.fromEntries(Object.entries({start:a,end:s,drawn:u,color:l,width:c,arrowSize:p}).filter((function(t){return t[0],void 0!==t[1]})));return function(n){u&&!("opacity"in h)&&0===i.props.opacity&&i.set({opacity:1})(n),0!==Object.keys(h).length&&t.prototype.animate.call(i,h,e,r,o)(n),0!==Object.keys(f).length&&i.animateArrow(f,e,r,o)(n)}},n.prototype.draw=function(t){return void 0===t&&(t={}),this.animate({drawn:!0},t)},n.prototype.animateArrow=function(t,n,e,r){var o=this;void 0===n&&(n={}),void 0===e&&(e=null),void 0===r&&(r=!0);var i=kt(kt({},this.props),t),a=this.calculateShapes(i);return function(e){var r=o.line.animate(kt(kt({start:a.line.start,end:a.line.end},t.color?{color:t.color}:{}),t.width?{width:t.width}:{}),n),i=o.arrowhead.animate(kt({points:a.arrowhead},t.color?{fill:t.color}:{}),n),s=o.doubledArrowhead?o.doubledArrowhead.animate(kt({points:a.doubledArrowhead},t.color?{fill:t.color}:{}),n):function(){};r(e),i(e),s(e)}},n}(vt),Et=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Mt=function(){return Mt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Mt.apply(this,arguments)},It=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Mt({fill:"#000000",radius:100,borderWidth:0,borderColor:"#000000"},n))||this}return Et(n,t),n.prototype.tagName=function(){return"circle"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.radius,i=n.fill,a=n.borderWidth,s=n.borderColor,u=this.positionAttributes(new e(r,2*o,2*o)),l=u.x,c=u.y;return Mt(Mt(Mt({},t.prototype.attributes.call(this)),{fill:i,r:o.toString(),cx:(l+o).toString(),cy:(c+o).toString()}),a>0?{"stroke-width":a.toString(),stroke:s}:{})},n}(vt),Tt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bt=function(){return Bt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Bt.apply(this,arguments)},Nt=function(t){function n(n,e,r){return void 0===e&&(e={}),void 0===r&&(r=null),t.call(this,Bt({objects:n,position:{x:0,y:0},positioned:null===r?"position"in e:r,rotation:0,rotationOrigin:{x:0,y:0},scale:1},e))||this}return Tt(n,t),n.prototype.tagName=function(){return"g"},n.prototype.attributes=function(){return Bt({},t.prototype.attributes.call(this))},n.prototype.additionalAttributes=function(){var t=this.props.scale,n="rotate(".concat(this.props.rotation,", ").concat(this.props.rotationOrigin.x,", ").concat(this.props.rotationOrigin.y,")"),r="scale(".concat(t,")");if(!this.props.positioned){var o=this.positionInPresentation(this.props.position),i=o.x,a=o.y;return{transform:"translate(".concat(i,", ").concat(a,") ").concat(n," ").concat(r)}}var s=this._presentation.computeRenderedBoundingBox(this._element);s.width*=t,s.height*=t;var u=this.positionInPresentation(this.props.position),l=u.x,c=u.y,p=this.anchorBoundingBox(new e({x:l,y:c},s.width,s.height)),h=p.origin.x-s.origin.x,f=p.origin.y-s.origin.y;return{transform:"translate(".concat(h,", ").concat(f,") ").concat(n," ").concat(r)}},n.prototype.children=function(){var t=this;return this.props.objects.map((function(n){return n.generate(t._presentation),n._element}))},n}(vt),Lt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ft=function(t){function n(n){var e=this,r=n.rows,o=void 0===r?1:r,i=n.cols,a=void 0===i?1:i,s=n.spacing,u=void 0===s?{x:0,y:0}:s,l=n.origin,c=void 0===l?{x:0,y:0}:l,p=n.objects,h=void 0===p?function(){return null}:p,f=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["rows","cols","spacing","origin","objects"]);void 0===u.x&&(u.x=0),void 0===u.y&&(u.y=0);for(var d=[],y=0;y<o;y++){for(var g=[],v=0;v<a;v++){var m=h(y,v);null!==m&&(m.props.position.x=c.x+u.x*v,m.props.position.y=c.y+u.y*y),g.push(m)}d.push(g)}return e=t.call(this,function(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}([],d.flat().filter((function(t){return null!==t})),!0),f)||this,e.objects=d,e}return Lt(n,t),n}(Nt),Dt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ht=function(){return Ht=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Ht.apply(this,arguments)},Wt=function(t){function n(n){return void 0===n&&(n={}),t.call(this,Ht({url:"https://wikipedia.org/",width:2500,height:1500,scale:3,backgroundColor:"#ffffff"},n))||this}return Dt(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=this.positionAttributes(new e(r,o,i)),s=a.x,u=a.y;return Ht(Ht({},t.prototype.attributes.call(this)),{x:s.toString(),y:u.toString(),width:o.toString(),height:i.toString()})},n.prototype.styles=function(){return Ht(Ht(Ht({},t.prototype.styles.call(this)),{"background-color":this.props.backgroundColor}),0===this.props.opacity?{"pointer-events":"none"}:{})},n.prototype.children=function(){var t=document.createElement("iframe");t.src=this.props.url;var n=(100/this.props.scale).toFixed(2)+"%";return t.style.width=n,t.style.height=n,t.style.transform="scale(".concat(this.props.scale,")"),t.style.transformOrigin="top left",[t]},n}(vt),qt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),zt=function(){return zt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},zt.apply(this,arguments)},Rt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,zt({href:n,width:100,height:100,rounding:0},e))||this}return qt(n,t),n.prototype.tagName=function(){return"image"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.href,i=n.width,a=n.height,s=this.positionAttributes(new e(r,i,a)),u=s.x,l=s.y;return zt(zt({},t.prototype.attributes.call(this)),{href:o,width:i.toString(),height:a.toString(),x:u.toString(),y:l.toString()})},n.prototype.styles=function(){var n=this.props.rounding;return zt(zt({},t.prototype.styles.call(this)),0!==n?{"clip-path":"inset(0px round ".concat(n,"px)")}:{})},n}(vt),Gt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vt=function(){return Vt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Vt.apply(this,arguments)},Kt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Vt({content:n,width:1e3,height:1e3,fontSize:100,fontFamily:"Arial",color:"#000000"},e))||this}return Gt(n,t),n.prototype.tagName=function(){return"foreignObject"},n.prototype.attributes=function(){var n=this.props,e=n.position,r=n.width,o=n.height;return Vt(Vt({},t.prototype.attributes.call(this)),{x:e.x.toString(),y:e.y.toString(),width:r.toString(),height:o.toString()})},n.prototype.children=function(){for(var t=this.props.content,n=document.createElement("div"),e={"font-family":'"'.concat(this.props.fontFamily,'"'),"font-size":"".concat(this.props.fontSize,"px"),color:this.props.color},r=0,o=Object.entries(e);r<o.length;r++){var i=o[r],a=i[0],s=i[1];void 0!==s&&n.style.setProperty(a,s.toString())}if("string"==typeof t)n.textContent=t;else for(var u=0,l=t;u<l.length;u++){var c=l[u],p=document.createElement("p");p.textContent=c,n.appendChild(p)}return[n]},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this._children),e=this.positionAttributes(n),r=e.x,o=e.y;return Vt(Vt({},t.prototype.additionalAttributes.call(this)),{x:r.toString(),y:o.toString()})},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content},n}(vt);function $t(t){return t.replace(/^\s+/g,(function(t){return t.replace(/ /g," ")}))}function Yt(t){if("string"==typeof t)return $t(t);for(var n=[],e=0,r=t;e<r.length;e++){var o=r[e];if("string"!=typeof o)if(0!==o.length){var i=Array.from(o),a=i[0];i[0]="string"==typeof a?$t(a):[$t(a[0]),i[0][1]],n.push(i)}else n.push(o);else n.push($t(o))}return n}function Ut(t,n,e){void 0===n&&(n="1em"),void 0===e&&(e="start");for(var r=[],o=0,i=0,a=t;i<a.length;i++){var s=a[i];o++;var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");if(u.setAttribute("x","0"),u.setAttribute("text-anchor",e),o>1&&u.setAttribute("dy",n),0===s.length||1===s.length&&""===s[0])u.appendChild(document.createTextNode(" ")),r.push(u);else if("string"!=typeof s){for(var l=0,c=s;l<c.length;l++){var p=c[l];if("string"==typeof p)u.appendChild(document.createTextNode(p));else{var h=p[0],f=p[1],d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.textContent=h;for(var y={fill:f.color,dy:f.dy,"text-decoration":f.textDecoration},g=0,v=Object.entries(y);g<v.length;g++){var m=v[g],b=m[0];void 0!==(S=m[1])&&d.setAttribute(b,S.toString())}for(var w={"font-family":f.fontFamily?'"'.concat(f.fontFamily,'"'):void 0,"font-size":f.fontSize,"font-weight":f.fontWeight,"font-style":f.fontStyle},x=0,O=Object.entries(w);x<O.length;x++){var S,C=O[x];b=C[0],void 0!==(S=C[1])&&d.style.setProperty(b,S.toString())}u.appendChild(d)}}r.push(u)}else u.appendChild(document.createTextNode(s)),r.push(u)}return r}var Xt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zt=function(){return Zt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},Zt.apply(this,arguments)},Qt=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,Zt({content:n,color:"#000000",fontSize:150,fontStyle:"normal",fontWeight:"normal",fontFamily:"Arial",baselineHeight:.22,dominantBaseline:"ideographic",textDecoration:"none",length:null,align:"left",lineSpacing:"1em",ligatures:null},e))||this}return Xt(n,t),n.prototype.isRichText=function(){return"string"!=typeof this.props.content},n.prototype.tagName=function(){return"text"},n.prototype.attributes=function(){var n=this.props,e=n.color,r=n.textDecoration;return Zt(Zt(Zt({},t.prototype.attributes.call(this)),"none"!==r?{"text-decoration":r}:{}),{fill:e})},n.prototype.additionalAttributes=function(){var n=this.computeRenderedBoundingBox(this.element(),this.childrenWithContentLength(this.contentLength())),e=this.positionAttributes(n),r=e.x,o=e.y;return this.isRichText()&&("center"===this.props.align?r+=n.width/2:"right"===this.props.align&&(r+=n.width)),o-=this.props.fontSize*this.props.baselineHeight,Zt(Zt({},t.prototype.additionalAttributes.call(this)),this.isRichText()?{transform:"translate(".concat(r.toString()," ").concat(o.toString(),")"),y:"1em"}:{x:r.toString(),y:(o+n.height).toString()})},n.prototype.styles=function(){var n=this.props,e=n.fontSize,r=n.fontFamily,o=n.fontStyle,i=n.fontWeight,a=n.ligatures;return Zt(Zt(Zt(Zt(Zt({},t.prototype.styles.call(this)),"normal"!==o?{"font-style":o}:{}),"normal"!==i?{"font-weight":i.toString()}:{}),null!==a?{"font-variant-ligatures":a}:{}),{"font-size":"".concat(e,"px"),"font-family":'"'.concat(r,'"'),"white-space":"pre"})},n.prototype.children=function(){var t,n=null!==(t=this.props.length)&&void 0!==t?t:this.contentLength();return this.childrenWithContentLength(n)},n.prototype.requiresChildrenUpdate=function(t){return"content"in t&&t.content!==this.props.content||"length"in t&&t.length!==this.props.length},n.prototype.contentLength=function(){return"string"==typeof this.props.content?this.props.content.length:this.props.content.reduce((function(t,n){return"string"==typeof n?t+n.length:t+n.reduce((function(t,n){return t+("string"==typeof n?n:n[0]).length}),0)}),0)},n.prototype.childrenWithContentLength=function(t){var n=this.props.content;if("string"==typeof n){var e=null===t?n:n.slice(0,t);return[document.createTextNode(e)]}var r="left"===this.props.align?"start":"center"===this.props.align?"middle":"end";if(null===t)return Ut(n,this.props.lineSpacing,r);for(var o=t,i=[],a=0,s=n;a<s.length;a++){var u=s[a];if("string"==typeof u)u.length<=o?(i.push(u),o-=u.length):(i.push(u.slice(0,o)),o=0);else{for(var l=[],c=0,p=u;c<p.length;c++){var h=p[c];if("string"==typeof h?h.length<=o?(l.push(h),o-=h.length):(l.push(h.slice(0,o)),o=0):h[0].length<=o?(l.push(h),o-=h[0].length):(l.push([h[0].slice(0,o),h[1]]),o=0),0===o)break}i.push(l)}if(0===o)break}return Ut(i,this.props.lineSpacing,r)},n.prototype.regenerateChildren=function(){this._children=this.children(),this._element.innerHTML="";for(var t=0,n=this._children;t<n.length;t++){var e=n[t];this._element.appendChild(e)}},n.prototype.animate=function(n,e,r,o){var i=this;void 0===e&&(e={}),void 0===r&&(r=null),void 0===o&&(o=!0);var a=n.length,s=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}(n,["length"]);return void 0===a?t.prototype.animate.call(this,s,e,r,o):function(n){var u;i.writeOn(a,null!==(u=e.duration)&&void 0!==u?u:1e3,o)(n),Object.keys(s).length>0&&t.prototype.animate.call(i,s,e,r,o)(n)}},n.prototype.writeOn=function(t,n,e){var r=this;void 0===t&&(t=null),void 0===n&&(n=1e3),void 0===e&&(e=!0);var o=null,i=null,a=null,s=function(e){var u;null===a&&(a=e),null===o&&(o=null!==(u=r.props.length)&&void 0!==u?u:r.contentLength()),null===i&&(i=null!=t?t:r.contentLength());var l=e-a,c=Math.min(l/n,1);r.props.length=Math.floor(o+(i-o)*c),r.regenerateChildren(),c<1&&requestAnimationFrame(s)};return function(n){return n({animate:e,animateCallback:function(){a=null,o=null,i=null,requestAnimationFrame(s)},updateCallback:function(){a=null,o=null,i=null,r.props.length=t,r.regenerateChildren()}})}},n.prototype.generateChildrenAndReposition=function(){for(var t=this.element(),n=0,e=Object.entries(this.attributes());n<e.length;n++){var r=e[n],o=r[0],i=r[1];t.setAttribute(o,i)}this.regenerateChildren();for(var a=0,s=Object.entries(this.additionalAttributes());a<s.length;a++){var u=s[a];o=u[0],i=u[1],t.setAttribute(o,i)}},n.prototype.animateContent=function(t,n){var e=this;void 0===n&&(n=1e3);var r=null,o=function(i){null===r&&(r=i);var a=i-r,s=Math.min(a/n,1);e.props.content=t(s),e.generateChildrenAndReposition(),s<1&&requestAnimationFrame(o)};return function(n){return n({animate:!0,animateCallback:function(){r=null,requestAnimationFrame(o)},updateCallback:function(){r=null,e.props.content=t(1),e.generateChildrenAndReposition()}})}},n}(vt),Jt=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tn=function(){return tn=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},tn.apply(this,arguments)},nn=function(t){function n(n){return void 0===n&&(n={}),t.call(this,tn({fill:"#000000",width:100,height:100,rounding:0,borderWidth:0,borderColor:"#000000"},n))||this}return Jt(n,t),n.prototype.tagName=function(){return"rect"},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=n.fill,s=n.rounding,u=n.borderWidth,l=n.borderColor,c=this.positionAttributes(new e(r,o,i)),p=c.x,h=c.y;return tn(tn(tn({},t.prototype.attributes.call(this)),{fill:a,width:o.toString(),height:i.toString(),rx:s.toString(),x:p.toString(),y:h.toString()}),u>0?{"stroke-width":u.toString(),stroke:l}:{})},n}(vt),en=function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},t(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),rn=function(){return rn=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t},rn.apply(this,arguments)},on=function(t){function n(n,e){return void 0===e&&(e={}),t.call(this,rn({svg:n,width:100,height:100},e))||this}return en(n,t),n.svgNode=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement},n.prototype.tagName=function(){return"svg"},n.prototype.createElement=function(){var t=this.constructor.svgNode(this.props.svg);return this.parsedChildren=Array.from(t.childNodes),t.innerHTML="",t},n.prototype.attributes=function(){var n=this.props,r=n.position,o=n.width,i=n.height,a=this.positionAttributes(new e(r,o,i)),s=a.x,u=a.y;return rn(rn({},t.prototype.attributes.call(this)),{width:o.toString(),height:i.toString(),x:s.toString(),y:u.toString()})},n.prototype.children=function(){return this.parsedChildren},n.prototype.animatePath=function(t,n,e,r){var o=this;return void 0===e&&(e=500),void 0===r&&(r=!0),function(i){var a,s=o.element().querySelector(t);i(rn(rn({animate:r,element:s},n),{animationParams:rn({duration:e,easing:"linear"},null!==(a=n.animationParams)&&void 0!==a?a:{})}))}},n.prototype.setPath=function(t,n){return this.animatePath(t,n,0,!1)},n.prototype.drawOn=function(t,n){var e=this;void 0===n&&(n={});var r=rn({color:"#000000",strokeWidth:5,fill:!0,fillColor:null,drawDuration:1e3,fillDuration:1e3,easing:"linear",endWithoutStroke:!0},n),o=r.color,i=r.strokeWidth,a=r.fill,s=r.fillColor,u=r.drawDuration,l=r.fillDuration,c=r.easing,p=r.endWithoutStroke;return function(r){var h,f=e.element().querySelector(t);if(!f)throw new Error("Path element with selector ".concat(t," not found"));var d=null!==(h=n.pathLength)&&void 0!==h?h:f.getTotalLength();f.setAttribute("stroke-dashoffset","".concat(d)),f.setAttribute("stroke-dasharray","".concat(d)),f.setAttribute("stroke-width","".concat(i)),f.setAttribute("stroke",o),r({animate:!0,element:f,attributes:{"stroke-dashoffset":"0"},animationParams:{duration:u,easing:c}}),a&&r({animate:!0,delay:u,element:f,attributes:rn({fill:null!=s?s:o,"stroke-dasharray":"none"},p?{"stroke-width":"0"}:{}),animationParams:{duration:l,easing:c}})}},n}(vt);function an(t,n,e){return Math.min(Math.max(t,n),e)}function sn(t){return an(t,0,1)}function un(t){var n=an(t,0,1);return Math.pow(n,2)*(3-2*n)}return n})()));
@@ -5,10 +5,12 @@ export * from "./objects/arrow";
5
5
  export * from "./objects/circle";
6
6
  export * from "./objects/grid";
7
7
  export * from "./objects/group";
8
+ export * from "./objects/iframe";
8
9
  export * from "./objects/image";
9
10
  export * from "./objects/line";
10
11
  export * from "./objects/paragraph";
11
12
  export * from "./objects/polygon";
13
+ export * from "./objects/path";
12
14
  export * from "./objects/text";
13
15
  export * from "./objects/rectangle";
14
16
  export * from "./objects/vectorGraphic";
@@ -2,6 +2,7 @@ import { ObjectProps, SlideObject } from "../presentation/object";
2
2
  import { BuildFunction } from "../util/animation";
3
3
  import { Position } from "../util/position";
4
4
  import { Line } from "./line";
5
+ import { Path } from "./path";
5
6
  import { Polygon } from "./polygon";
6
7
  export interface ArrowProps extends ObjectProps {
7
8
  start: Position;
@@ -9,6 +10,9 @@ export interface ArrowProps extends ObjectProps {
9
10
  color: string;
10
11
  width: number;
11
12
  arrowSize: number;
13
+ filledHead: boolean;
14
+ doubledHead: boolean;
15
+ growFromCenter: boolean;
12
16
  /**
13
17
  * Property describing whether the arrow has been fully drawn.
14
18
  * If an arrow hasn't been drawn, it can be animated to draw in.
@@ -30,7 +34,8 @@ export interface ArrowProps extends ObjectProps {
30
34
  }
31
35
  export declare class Arrow extends SlideObject<ArrowProps> {
32
36
  line: Line | null;
33
- arrowhead: Polygon | null;
37
+ arrowhead: Polygon | Path | null;
38
+ doubledArrowhead: Polygon | Path | null;
34
39
  constructor(props?: Partial<ArrowProps>);
35
40
  tagName(): string;
36
41
  /**
@@ -39,9 +44,13 @@ export declare class Arrow extends SlideObject<ArrowProps> {
39
44
  calculateShapes(props: ArrowProps): {
40
45
  line: {
41
46
  start: Position;
42
- end: Position;
47
+ end: {
48
+ x: number;
49
+ y: number;
50
+ };
43
51
  };
44
52
  arrowhead: Position[];
53
+ doubledArrowhead: Position[];
45
54
  };
46
55
  children(): Node[];
47
56
  animate(props: Partial<ArrowProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
@@ -0,0 +1,15 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ export interface IFrameProps extends ObjectProps {
3
+ url: string;
4
+ width: number;
5
+ height: number;
6
+ backgroundColor: string;
7
+ scale: number;
8
+ }
9
+ export declare class IFrame extends SlideObject<IFrameProps> {
10
+ constructor(props?: Partial<IFrameProps>);
11
+ tagName(): string;
12
+ attributes(): Partial<Record<string, string>>;
13
+ styles(): Partial<Record<string, string>>;
14
+ children(): Node[];
15
+ }
@@ -0,0 +1,27 @@
1
+ import { ObjectProps, SlideObject } from "../presentation/object";
2
+ import { BuildFunction } from "../util/animation";
3
+ import { Position } from "../util/position";
4
+ export interface PathProps extends ObjectProps {
5
+ points: Position[];
6
+ color: string;
7
+ fill: string;
8
+ width: number;
9
+ linecap: "butt" | "round" | "square" | null;
10
+ drawn: boolean;
11
+ }
12
+ interface PathDrawOnProps {
13
+ drawDuration: number;
14
+ fillDuration: number;
15
+ easing: string;
16
+ }
17
+ export declare class Path extends SlideObject<PathProps> {
18
+ constructor(props?: Partial<PathProps>);
19
+ tagName(): string;
20
+ attributes(): Partial<Record<string, string>>;
21
+ animate(props: Partial<PathProps>, animationParams?: anime.AnimeParams, delay?: number | null, animate?: boolean): BuildFunction;
22
+ /**
23
+ * Animates drawing of SVG path.
24
+ */
25
+ drawOn(props?: Partial<PathDrawOnProps>): BuildFunction;
26
+ }
27
+ export {};
@@ -47,4 +47,17 @@ export declare class Text extends SlideObject<TextProps> {
47
47
  * since the children of the element need to be replaced.
48
48
  */
49
49
  writeOn(length?: number | null, duration?: number, animate?: boolean): BuildFunction;
50
+ /**
51
+ * Sets position attributes of text and re-generates any children.
52
+ *
53
+ * This is because re-generating children alone won't change the position
54
+ * attributes, which menas the text might be mis-aligned.
55
+ */
56
+ generateChildrenAndReposition(): void;
57
+ /**
58
+ * Animates the content of a text element via an
59
+ * interpolation function that returns the text content
60
+ * for a given progress amount.
61
+ */
62
+ animateContent(computeContent: (proportion: number) => TextContent, duration?: number): BuildFunction;
50
63
  }
@@ -13,6 +13,12 @@ interface DrawOnProps {
13
13
  drawDuration: number;
14
14
  fillDuration: number;
15
15
  easing: string;
16
+ pathLength: number | null;
17
+ /**
18
+ * Controls whether there should still be a stroke present at end of animation.
19
+ * If `endWithoutStroke` is true, the stroke width fades out to 0 at the end.
20
+ */
21
+ endWithoutStroke: boolean;
16
22
  }
17
23
  export declare class VectorGraphic extends SlideObject<VectorGraphicProps> {
18
24
  parsedChildren: Node[];
@@ -37,6 +43,6 @@ export declare class VectorGraphic extends SlideObject<VectorGraphicProps> {
37
43
  /**
38
44
  * Animates the drawing on of a particular path.
39
45
  */
40
- drawOn(selector: string, props: Partial<DrawOnProps>): BuildFunction;
46
+ drawOn(selector: string, props?: Partial<DrawOnProps>): BuildFunction;
41
47
  }
42
48
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presenter",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "A JavaScript presentation library",
5
5
  "main": "dist/presenter.js",
6
6
  "types": "dist/src/index.d.ts",