File: //home/arjun/projects/buyercall/node_modules/svg.pathmorphing.js/dist/svg.pathmorphing.min.js
/*! svg.pathmorphing.js v0.1.3 MIT*/;!function(){"use strict";function t(t,r,n,i,o,h,c){for(var l=t.slice(r,n||c),p=i.slice(o,h||c),y=0,x={pos:[0,0],start:[0,0]},f={pos:[0,0],start:[0,0]};;){if(l[y]=s.call(x,l[y]),p[y]=s.call(f,p[y]),l[y][0]!=p[y][0]||"M"==l[y][0]||"A"==l[y][0]&&(l[y][4]!=p[y][4]||l[y][5]!=p[y][5])?(Array.prototype.splice.apply(l,[y,1].concat(a.call(x,l[y]))),Array.prototype.splice.apply(p,[y,1].concat(a.call(f,p[y])))):(l[y]=e.call(x,l[y]),p[y]=e.call(f,p[y])),++y==l.length&&y==p.length)break;y==l.length&&l.push(["C",x.pos[0],x.pos[1],x.pos[0],x.pos[1],x.pos[0],x.pos[1]]),y==p.length&&p.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]])}return{start:l,dest:p}}function s(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function e(t){var s=t.length;return this.pos=[t[s-2],t[s-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[s-4],2*this.pos[1]-t[s-3]]),t}function a(t){var s=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],s;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":s=n(this.pos,t),t=s[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],s}function r(t,s){if(!1===s)return!1;for(var e=s,a=t.length;e<a;++e)if("M"==t[e][0])return e;return!1}function n(t,s){var e,a,r,n,i,o,h,c,l,p,y,x,f,u,M,w,S,V,G,g,P,b,d,v,k,A,m=Math.abs(s[1]),C=Math.abs(s[2]),q=s[3]%360,L=s[4],I=s[5],Q=s[6],T=s[7],z=new SVG.Point(t),H=new SVG.Point(Q,T),O=[];if(0===m||0===C||z.x===H.x&&z.y===H.y)return[["C",z.x,z.y,H.x,H.y,H.x,H.y]];for(e=new SVG.Point((z.x-H.x)/2,(z.y-H.y)/2).transform((new SVG.Matrix).rotate(q)),a=e.x*e.x/(m*m)+e.y*e.y/(C*C),a>1&&(a=Math.sqrt(a),m*=a,C*=a),r=(new SVG.Matrix).rotate(q).scale(1/m,1/C).rotate(-q),z=z.transform(r),H=H.transform(r),n=[H.x-z.x,H.y-z.y],o=n[0]*n[0]+n[1]*n[1],i=Math.sqrt(o),n[0]/=i,n[1]/=i,h=o<4?Math.sqrt(1-o/4):0,L===I&&(h*=-1),c=new SVG.Point((H.x+z.x)/2+h*-n[1],(H.y+z.y)/2+h*n[0]),l=new SVG.Point(z.x-c.x,z.y-c.y),p=new SVG.Point(H.x-c.x,H.y-c.y),y=Math.acos(l.x/Math.sqrt(l.x*l.x+l.y*l.y)),l.y<0&&(y*=-1),x=Math.acos(p.x/Math.sqrt(p.x*p.x+p.y*p.y)),p.y<0&&(x*=-1),I&&y>x&&(x+=2*Math.PI),!I&&y<x&&(x-=2*Math.PI),u=Math.ceil(2*Math.abs(y-x)/Math.PI),w=[],S=y,f=(x-y)/u,M=4*Math.tan(f/4)/3,P=0;P<=u;P++)G=Math.cos(S),V=Math.sin(S),g=new SVG.Point(c.x+G,c.y+V),w[P]=[new SVG.Point(g.x+M*V,g.y-M*G),g,new SVG.Point(g.x-M*V,g.y+M*G)],S+=f;for(w[0][0]=w[0][1].clone(),w[w.length-1][2]=w[w.length-1][1].clone(),r=(new SVG.Matrix).rotate(q).scale(m,C).rotate(-q),P=0,b=w.length;P<b;P++)w[P][0]=w[P][0].transform(r),w[P][1]=w[P][1].transform(r),w[P][2]=w[P][2].transform(r);for(P=1,b=w.length;P<b;P++)g=w[P-1][2],d=g.x,v=g.y,g=w[P][0],k=g.x,A=g.y,g=w[P][1],Q=g.x,T=g.y,O.push(["C",d,v,k,A,Q,T]);return O}SVG.extend(SVG.PathArray,{morph:function(s){for(var e=this.value,a=this.parse(s),n=0,i=0,o=!1,h=!1;;){if(!1===n&&!1===i)break;if(o=r(e,!1!==n&&n+1),h=r(a,!1!==i&&i+1),!1===n){var c=new SVG.PathArray(l.start).bbox();n=0==c.height||0==c.width?e.push(e[0])-1:e.push(["M",c.x+c.width/2,c.y+c.height/2])-1}if(!1===i){var c=new SVG.PathArray(l.dest).bbox();i=0==c.height||0==c.width?a.push(a[0])-1:a.push(["M",c.x+c.width/2,c.y+c.height/2])-1}var l=t(e,n,o,a,i,h);e=e.slice(0,n).concat(l.start,!1===o?[]:e.slice(o)),a=a.slice(0,i).concat(l.dest,!1===h?[]:a.slice(h)),n=!1!==o&&n+l.start.length,i=!1!==h&&i+l.dest.length}return this.value=e,this.destination=new SVG.PathArray,this.destination.value=a,this}})}();