"use strict";!function(h,a){function e(t){if(void 0===t)throw new Error('Pathformer [constructor]: "element" parameter is required');if(t.constructor===String&&!(t=a.getElementById(t)))throw new Error('Pathformer [constructor]: "element" parameter is not related to an existing ID');if(!(t.constructor instanceof h.SVGElement||/^svg$/i.test(t.nodeName)))throw new Error('Pathformer [constructor]: "element" parameter must be a string or a SVGelement');this.el=t,this.scan(t)}var r,t,l;function n(t,e,r){this.isReady=!1,this.setElement(t,e),this.setOptions(e),this.setCallback(r),this.isReady&&this.init()}e.prototype.TYPES=["line","ellipse","circle","polygon","polyline","rect"],e.prototype.ATTR_WATCH=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],e.prototype.scan=function(t){for(var e,r,n=t.querySelectorAll(this.TYPES.join(",")),i=0;i=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")},n.prototype.setCallback=function(t){if(t&&t.constructor!==Function)throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||function(){}},n.prototype.mapping=function(){for(var t,e,r,n,i,a=n=i=0,s=this.el.querySelectorAll("path"),o=0;o=this.frameLength))return this.trace(),void(this.handle=r(function(){t.drawer()}));this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy()}this.callback(this),this.instanceCallback&&(this.instanceCallback(this),this.instanceCallback=null)},n.prototype.trace=function(){for(var t,e,r=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength,n=0;n