blob: 11ea1c0a83ed4ed8726490390b0e605419f99d13 [file] [log] [blame]
(function(window){function createElement(t,e,a){if(!e){var i=Object.create(t.prototype,a),n={};return i&&"[object Function]"===n.toString.call(i.init)&&i.init(),i}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.parent=t.prototype}function defineDescriptor(t,e,a,i){var n={writable:!1,configurable:!1,enumerable:!1,value:a};if(i)for(var r in i)n[r]=i[r];var s={};t&&"[object Function]"===s.toString.call(t)&&(t=t.prototype),Object.defineProperty(t,e,n)}function defineAccessor(t,e,a){var i,n={enumerable:!1,configurable:!1,get:function(){return i},set:function(t){i=t}};if(a)for(var r in a)n[r]=a[r];var s={};t&&"[object Function]"===s.toString.call(t)&&(t=t.prototype),Object.defineProperty(t,e,n)}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.verticalAlign="top",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="hidden",styleUnselectableDiv(t)}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var a,i="";for(a=t;a>0;--a)i+=e[Math.round(Math.random()*(e.length-1))];return i}function componentToHex(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function rgbToHex(t,e,a){return"#"+componentToHex(t)+componentToHex(e)+componentToHex(a)}function EffectsManager(){}function StrokeEffectManager(){}function MaskElement(){}function ICompElement(t,e,a){this.parent.constructor.call(this,t,e,a),this.layers=t.layers}function IImageElement(t,e,a){this.animationItem=a,this.assets=this.animationItem.getAssets(),this.path=this.animationItem.getPath(),this.parent.constructor.call(this,t,e,a)}function IShapeElement(t,e,a){this.shapes=[],this.parent.constructor.call(this,t,e,a)}function ShapeItemElement(t){this.data=t,this.shapeG=document.createElementNS(svgNS,"g"),this.pathLength=0,this.cachedData=[],"pathShape"===this.data.type?this.shape=document.createElementNS(svgNS,"path"):"rectShape"===this.data.type?this.shape=document.createElementNS(svgNS,"rect"):"ellipseShape"===this.data.type?(this.shape=document.createElementNS(svgNS,"ellipse"),this.data.trim&&this.adjustTrim()):this.shape=document.createElementNS(svgNS,"path"),this.data.trim?this.shape.setAttribute("stroke-linecap","butt"):(this.shape.setAttribute("stroke-linejoin","round"),this.shape.setAttribute("stroke-linecap","round")),this.data.renderedData||(this.data.renderedData={}),this.shape.setAttribute("name",this.data.name),styleUnselectableDiv(this.shapeG),styleUnselectableDiv(this.shape),this.shapeG.appendChild(this.shape)}function ISolidElement(t,e,a){this.parent.constructor.call(this,t,e,a)}function ITextElement(t,e,a){this.parent.constructor.call(this,t,e,a)}function PlayerManager(){}function BasicPlayer(){}var svgNS="http://www.w3.org/2000/svg";eval(function(t,e,a,i,n,r){if(n=function(t){return(e>t?"":n(parseInt(t/e)))+((t%=e)>35?String.fromCharCode(t+29):t.toString(36))},!"".replace(/^/,String)){for(;a--;)r[n(a)]=i[a]||n(a);i=[function(t){return r[t]}],n=function(){return"\\w+"},a=1}for(;a--;)i[a]&&(t=t.replace(new RegExp("\\b"+n(a)+"\\b","g"),i[a]));return t}("9 17={3i:'0.1.3',16:1e-6};l v(){}v.23={e:l(i){8(i<1||i>7.4.q)?w:7.4[i-1]},2R:l(){8 7.4.q},1u:l(){8 F.1x(7.2u(7))},24:l(a){9 n=7.4.q;9 V=a.4||a;o(n!=V.q){8 1L}J{o(F.13(7.4[n-1]-V[n-1])>17.16){8 1L}}H(--n);8 2x},1q:l(){8 v.u(7.4)},1b:l(a){9 b=[];7.28(l(x,i){b.19(a(x,i))});8 v.u(b)},28:l(a){9 n=7.4.q,k=n,i;J{i=k-n;a(7.4[i],i+1)}H(--n)},2q:l(){9 r=7.1u();o(r===0){8 7.1q()}8 7.1b(l(x){8 x/r})},1C:l(a){9 V=a.4||a;9 n=7.4.q,k=n,i;o(n!=V.q){8 w}9 b=0,1D=0,1F=0;7.28(l(x,i){b+=x*V[i-1];1D+=x*x;1F+=V[i-1]*V[i-1]});1D=F.1x(1D);1F=F.1x(1F);o(1D*1F===0){8 w}9 c=b/(1D*1F);o(c<-1){c=-1}o(c>1){c=1}8 F.37(c)},1m:l(a){9 b=7.1C(a);8(b===w)?w:(b<=17.16)},34:l(a){9 b=7.1C(a);8(b===w)?w:(F.13(b-F.1A)<=17.16)},2k:l(a){9 b=7.2u(a);8(b===w)?w:(F.13(b)<=17.16)},2j:l(a){9 V=a.4||a;o(7.4.q!=V.q){8 w}8 7.1b(l(x,i){8 x+V[i-1]})},2C:l(a){9 V=a.4||a;o(7.4.q!=V.q){8 w}8 7.1b(l(x,i){8 x-V[i-1]})},22:l(k){8 7.1b(l(x){8 x*k})},x:l(k){8 7.22(k)},2u:l(a){9 V=a.4||a;9 i,2g=0,n=7.4.q;o(n!=V.q){8 w}J{2g+=7.4[n-1]*V[n-1]}H(--n);8 2g},2f:l(a){9 B=a.4||a;o(7.4.q!=3||B.q!=3){8 w}9 A=7.4;8 v.u([(A[1]*B[2])-(A[2]*B[1]),(A[2]*B[0])-(A[0]*B[2]),(A[0]*B[1])-(A[1]*B[0])])},2A:l(){9 m=0,n=7.4.q,k=n,i;J{i=k-n;o(F.13(7.4[i])>F.13(m)){m=7.4[i]}}H(--n);8 m},2Z:l(x){9 a=w,n=7.4.q,k=n,i;J{i=k-n;o(a===w&&7.4[i]==x){a=i+1}}H(--n);8 a},3g:l(){8 S.2X(7.4)},2d:l(){8 7.1b(l(x){8 F.2d(x)})},2V:l(x){8 7.1b(l(y){8(F.13(y-x)<=17.16)?x:y})},1o:l(a){o(a.K){8 a.1o(7)}9 V=a.4||a;o(V.q!=7.4.q){8 w}9 b=0,2b;7.28(l(x,i){2b=x-V[i-1];b+=2b*2b});8 F.1x(b)},3a:l(a){8 a.1h(7)},2T:l(a){8 a.1h(7)},1V:l(t,a){9 V,R,x,y,z;2S(7.4.q){27 2:V=a.4||a;o(V.q!=2){8 w}R=S.1R(t).4;x=7.4[0]-V[0];y=7.4[1]-V[1];8 v.u([V[0]+R[0][0]*x+R[0][1]*y,V[1]+R[1][0]*x+R[1][1]*y]);1I;27 3:o(!a.U){8 w}9 C=a.1r(7).4;R=S.1R(t,a.U).4;x=7.4[0]-C[0];y=7.4[1]-C[1];z=7.4[2]-C[2];8 v.u([C[0]+R[0][0]*x+R[0][1]*y+R[0][2]*z,C[1]+R[1][0]*x+R[1][1]*y+R[1][2]*z,C[2]+R[2][0]*x+R[2][1]*y+R[2][2]*z]);1I;2P:8 w}},1t:l(a){o(a.K){9 P=7.4.2O();9 C=a.1r(P).4;8 v.u([C[0]+(C[0]-P[0]),C[1]+(C[1]-P[1]),C[2]+(C[2]-(P[2]||0))])}1d{9 Q=a.4||a;o(7.4.q!=Q.q){8 w}8 7.1b(l(x,i){8 Q[i-1]+(Q[i-1]-x)})}},1N:l(){9 V=7.1q();2S(V.4.q){27 3:1I;27 2:V.4.19(0);1I;2P:8 w}8 V},2n:l(){8'['+7.4.2K(', ')+']'},26:l(a){7.4=(a.4||a).2O();8 7}};v.u=l(a){9 V=25 v();8 V.26(a)};v.i=v.u([1,0,0]);v.j=v.u([0,1,0]);v.k=v.u([0,0,1]);v.2J=l(n){9 a=[];J{a.19(F.2F())}H(--n);8 v.u(a)};v.1j=l(n){9 a=[];J{a.19(0)}H(--n);8 v.u(a)};l S(){}S.23={e:l(i,j){o(i<1||i>7.4.q||j<1||j>7.4[0].q){8 w}8 7.4[i-1][j-1]},33:l(i){o(i>7.4.q){8 w}8 v.u(7.4[i-1])},2E:l(j){o(j>7.4[0].q){8 w}9 a=[],n=7.4.q,k=n,i;J{i=k-n;a.19(7.4[i][j-1])}H(--n);8 v.u(a)},2R:l(){8{2D:7.4.q,1p:7.4[0].q}},2D:l(){8 7.4.q},1p:l(){8 7.4[0].q},24:l(a){9 M=a.4||a;o(1g(M[0][0])=='1f'){M=S.u(M).4}o(7.4.q!=M.q||7.4[0].q!=M[0].q){8 1L}9 b=7.4.q,15=b,i,G,10=7.4[0].q,j;J{i=15-b;G=10;J{j=10-G;o(F.13(7.4[i][j]-M[i][j])>17.16){8 1L}}H(--G)}H(--b);8 2x},1q:l(){8 S.u(7.4)},1b:l(a){9 b=[],12=7.4.q,15=12,i,G,10=7.4[0].q,j;J{i=15-12;G=10;b[i]=[];J{j=10-G;b[i][j]=a(7.4[i][j],i+1,j+1)}H(--G)}H(--12);8 S.u(b)},2i:l(a){9 M=a.4||a;o(1g(M[0][0])=='1f'){M=S.u(M).4}8(7.4.q==M.q&&7.4[0].q==M[0].q)},2j:l(a){9 M=a.4||a;o(1g(M[0][0])=='1f'){M=S.u(M).4}o(!7.2i(M)){8 w}8 7.1b(l(x,i,j){8 x+M[i-1][j-1]})},2C:l(a){9 M=a.4||a;o(1g(M[0][0])=='1f'){M=S.u(M).4}o(!7.2i(M)){8 w}8 7.1b(l(x,i,j){8 x-M[i-1][j-1]})},2B:l(a){9 M=a.4||a;o(1g(M[0][0])=='1f'){M=S.u(M).4}8(7.4[0].q==M.q)},22:l(a){o(!a.4){8 7.1b(l(x){8 x*a})}9 b=a.1u?2x:1L;9 M=a.4||a;o(1g(M[0][0])=='1f'){M=S.u(M).4}o(!7.2B(M)){8 w}9 d=7.4.q,15=d,i,G,10=M[0].q,j;9 e=7.4[0].q,4=[],21,20,c;J{i=15-d;4[i]=[];G=10;J{j=10-G;21=0;20=e;J{c=e-20;21+=7.4[i][c]*M[c][j]}H(--20);4[i][j]=21}H(--G)}H(--d);9 M=S.u(4);8 b?M.2E(1):M},x:l(a){8 7.22(a)},32:l(a,b,c,d){9 e=[],12=c,i,G,j;9 f=7.4.q,1p=7.4[0].q;J{i=c-12;e[i]=[];G=d;J{j=d-G;e[i][j]=7.4[(a+i-1)%f][(b+j-1)%1p]}H(--G)}H(--12);8 S.u(e)},31:l(){9 a=7.4.q,1p=7.4[0].q;9 b=[],12=1p,i,G,j;J{i=1p-12;b[i]=[];G=a;J{j=a-G;b[i][j]=7.4[j][i]}H(--G)}H(--12);8 S.u(b)},1y:l(){8(7.4.q==7.4[0].q)},2A:l(){9 m=0,12=7.4.q,15=12,i,G,10=7.4[0].q,j;J{i=15-12;G=10;J{j=10-G;o(F.13(7.4[i][j])>F.13(m)){m=7.4[i][j]}}H(--G)}H(--12);8 m},2Z:l(x){9 a=w,12=7.4.q,15=12,i,G,10=7.4[0].q,j;J{i=15-12;G=10;J{j=10-G;o(7.4[i][j]==x){8{i:i+1,j:j+1}}}H(--G)}H(--12);8 w},30:l(){o(!7.1y){8 w}9 a=[],n=7.4.q,k=n,i;J{i=k-n;a.19(7.4[i][i])}H(--n);8 v.u(a)},1K:l(){9 M=7.1q(),1c;9 n=7.4.q,k=n,i,1s,1n=7.4[0].q,p;J{i=k-n;o(M.4[i][i]==0){2e(j=i+1;j<k;j++){o(M.4[j][i]!=0){1c=[];1s=1n;J{p=1n-1s;1c.19(M.4[i][p]+M.4[j][p])}H(--1s);M.4[i]=1c;1I}}}o(M.4[i][i]!=0){2e(j=i+1;j<k;j++){9 a=M.4[j][i]/M.4[i][i];1c=[];1s=1n;J{p=1n-1s;1c.19(p<=i?0:M.4[j][p]-M.4[i][p]*a)}H(--1s);M.4[j]=1c}}}H(--n);8 M},3h:l(){8 7.1K()},2z:l(){o(!7.1y()){8 w}9 M=7.1K();9 a=M.4[0][0],n=M.4.q-1,k=n,i;J{i=k-n+1;a=a*M.4[i][i]}H(--n);8 a},3f:l(){8 7.2z()},2y:l(){8(7.1y()&&7.2z()===0)},2Y:l(){o(!7.1y()){8 w}9 a=7.4[0][0],n=7.4.q-1,k=n,i;J{i=k-n+1;a+=7.4[i][i]}H(--n);8 a},3e:l(){8 7.2Y()},1Y:l(){9 M=7.1K(),1Y=0;9 a=7.4.q,15=a,i,G,10=7.4[0].q,j;J{i=15-a;G=10;J{j=10-G;o(F.13(M.4[i][j])>17.16){1Y++;1I}}H(--G)}H(--a);8 1Y},3d:l(){8 7.1Y()},2W:l(a){9 M=a.4||a;o(1g(M[0][0])=='1f'){M=S.u(M).4}9 T=7.1q(),1p=T.4[0].q;9 b=T.4.q,15=b,i,G,10=M[0].q,j;o(b!=M.q){8 w}J{i=15-b;G=10;J{j=10-G;T.4[i][1p+j]=M[i][j]}H(--G)}H(--b);8 T},2w:l(){o(!7.1y()||7.2y()){8 w}9 a=7.4.q,15=a,i,j;9 M=7.2W(S.I(a)).1K();9 b,1n=M.4[0].q,p,1c,2v;9 c=[],2c;J{i=a-1;1c=[];b=1n;c[i]=[];2v=M.4[i][i];J{p=1n-b;2c=M.4[i][p]/2v;1c.19(2c);o(p>=15){c[i].19(2c)}}H(--b);M.4[i]=1c;2e(j=0;j<i;j++){1c=[];b=1n;J{p=1n-b;1c.19(M.4[j][p]-M.4[i][p]*M.4[j][i])}H(--b);M.4[j]=1c}}H(--a);8 S.u(c)},3c:l(){8 7.2w()},2d:l(){8 7.1b(l(x){8 F.2d(x)})},2V:l(x){8 7.1b(l(p){8(F.13(p-x)<=17.16)?x:p})},2n:l(){9 a=[];9 n=7.4.q,k=n,i;J{i=k-n;a.19(v.u(7.4[i]).2n())}H(--n);8 a.2K('\\n')},26:l(a){9 i,4=a.4||a;o(1g(4[0][0])!='1f'){9 b=4.q,15=b,G,10,j;7.4=[];J{i=15-b;G=4[i].q;10=G;7.4[i]=[];J{j=10-G;7.4[i][j]=4[i][j]}H(--G)}H(--b);8 7}9 n=4.q,k=n;7.4=[];J{i=k-n;7.4.19([4[i]])}H(--n);8 7}};S.u=l(a){9 M=25 S();8 M.26(a)};S.I=l(n){9 a=[],k=n,i,G,j;J{i=k-n;a[i]=[];G=k;J{j=k-G;a[i][j]=(i==j)?1:0}H(--G)}H(--n);8 S.u(a)};S.2X=l(a){9 n=a.q,k=n,i;9 M=S.I(n);J{i=k-n;M.4[i][i]=a[i]}H(--n);8 M};S.1R=l(b,a){o(!a){8 S.u([[F.1H(b),-F.1G(b)],[F.1G(b),F.1H(b)]])}9 d=a.1q();o(d.4.q!=3){8 w}9 e=d.1u();9 x=d.4[0]/e,y=d.4[1]/e,z=d.4[2]/e;9 s=F.1G(b),c=F.1H(b),t=1-c;8 S.u([[t*x*x+c,t*x*y-s*z,t*x*z+s*y],[t*x*y+s*z,t*y*y+c,t*y*z-s*x],[t*x*z-s*y,t*y*z+s*x,t*z*z+c]])};S.3b=l(t){9 c=F.1H(t),s=F.1G(t);8 S.u([[1,0,0],[0,c,-s],[0,s,c]])};S.39=l(t){9 c=F.1H(t),s=F.1G(t);8 S.u([[c,0,s],[0,1,0],[-s,0,c]])};S.38=l(t){9 c=F.1H(t),s=F.1G(t);8 S.u([[c,-s,0],[s,c,0],[0,0,1]])};S.2J=l(n,m){8 S.1j(n,m).1b(l(){8 F.2F()})};S.1j=l(n,m){9 a=[],12=n,i,G,j;J{i=n-12;a[i]=[];G=m;J{j=m-G;a[i][j]=0}H(--G)}H(--12);8 S.u(a)};l 14(){}14.23={24:l(a){8(7.1m(a)&&7.1h(a.K))},1q:l(){8 14.u(7.K,7.U)},2U:l(a){9 V=a.4||a;8 14.u([7.K.4[0]+V[0],7.K.4[1]+V[1],7.K.4[2]+(V[2]||0)],7.U)},1m:l(a){o(a.W){8 a.1m(7)}9 b=7.U.1C(a.U);8(F.13(b)<=17.16||F.13(b-F.1A)<=17.16)},1o:l(a){o(a.W){8 a.1o(7)}o(a.U){o(7.1m(a)){8 7.1o(a.K)}9 N=7.U.2f(a.U).2q().4;9 A=7.K.4,B=a.K.4;8 F.13((A[0]-B[0])*N[0]+(A[1]-B[1])*N[1]+(A[2]-B[2])*N[2])}1d{9 P=a.4||a;9 A=7.K.4,D=7.U.4;9 b=P[0]-A[0],2a=P[1]-A[1],29=(P[2]||0)-A[2];9 c=F.1x(b*b+2a*2a+29*29);o(c===0)8 0;9 d=(b*D[0]+2a*D[1]+29*D[2])/c;9 e=1-d*d;8 F.13(c*F.1x(e<0?0:e))}},1h:l(a){9 b=7.1o(a);8(b!==w&&b<=17.16)},2T:l(a){8 a.1h(7)},1v:l(a){o(a.W){8 a.1v(7)}8(!7.1m(a)&&7.1o(a)<=17.16)},1U:l(a){o(a.W){8 a.1U(7)}o(!7.1v(a)){8 w}9 P=7.K.4,X=7.U.4,Q=a.K.4,Y=a.U.4;9 b=X[0],1z=X[1],1B=X[2],1T=Y[0],1S=Y[1],1M=Y[2];9 c=P[0]-Q[0],2s=P[1]-Q[1],2r=P[2]-Q[2];9 d=-b*c-1z*2s-1B*2r;9 e=1T*c+1S*2s+1M*2r;9 f=b*b+1z*1z+1B*1B;9 g=1T*1T+1S*1S+1M*1M;9 h=b*1T+1z*1S+1B*1M;9 k=(d*g/f+h*e)/(g-h*h);8 v.u([P[0]+k*b,P[1]+k*1z,P[2]+k*1B])},1r:l(a){o(a.U){o(7.1v(a)){8 7.1U(a)}o(7.1m(a)){8 w}9 D=7.U.4,E=a.U.4;9 b=D[0],1l=D[1],1k=D[2],1P=E[0],1O=E[1],1Q=E[2];9 x=(1k*1P-b*1Q),y=(b*1O-1l*1P),z=(1l*1Q-1k*1O);9 N=v.u([x*1Q-y*1O,y*1P-z*1Q,z*1O-x*1P]);9 P=11.u(a.K,N);8 P.1U(7)}1d{9 P=a.4||a;o(7.1h(P)){8 v.u(P)}9 A=7.K.4,D=7.U.4;9 b=D[0],1l=D[1],1k=D[2],1w=A[0],18=A[1],1a=A[2];9 x=b*(P[1]-18)-1l*(P[0]-1w),y=1l*((P[2]||0)-1a)-1k*(P[1]-18),z=1k*(P[0]-1w)-b*((P[2]||0)-1a);9 V=v.u([1l*x-1k*z,1k*y-b*x,b*z-1l*y]);9 k=7.1o(P)/V.1u();8 v.u([P[0]+V.4[0]*k,P[1]+V.4[1]*k,(P[2]||0)+V.4[2]*k])}},1V:l(t,a){o(1g(a.U)=='1f'){a=14.u(a.1N(),v.k)}9 R=S.1R(t,a.U).4;9 C=a.1r(7.K).4;9 A=7.K.4,D=7.U.4;9 b=C[0],1E=C[1],1J=C[2],1w=A[0],18=A[1],1a=A[2];9 x=1w-b,y=18-1E,z=1a-1J;8 14.u([b+R[0][0]*x+R[0][1]*y+R[0][2]*z,1E+R[1][0]*x+R[1][1]*y+R[1][2]*z,1J+R[2][0]*x+R[2][1]*y+R[2][2]*z],[R[0][0]*D[0]+R[0][1]*D[1]+R[0][2]*D[2],R[1][0]*D[0]+R[1][1]*D[1]+R[1][2]*D[2],R[2][0]*D[0]+R[2][1]*D[1]+R[2][2]*D[2]])},1t:l(a){o(a.W){9 A=7.K.4,D=7.U.4;9 b=A[0],18=A[1],1a=A[2],2N=D[0],1l=D[1],1k=D[2];9 c=7.K.1t(a).4;9 d=b+2N,2h=18+1l,2o=1a+1k;9 Q=a.1r([d,2h,2o]).4;9 e=[Q[0]+(Q[0]-d)-c[0],Q[1]+(Q[1]-2h)-c[1],Q[2]+(Q[2]-2o)-c[2]];8 14.u(c,e)}1d o(a.U){8 7.1V(F.1A,a)}1d{9 P=a.4||a;8 14.u(7.K.1t([P[0],P[1],(P[2]||0)]),7.U)}},1Z:l(a,b){a=v.u(a);b=v.u(b);o(a.4.q==2){a.4.19(0)}o(b.4.q==2){b.4.19(0)}o(a.4.q>3||b.4.q>3){8 w}9 c=b.1u();o(c===0){8 w}7.K=a;7.U=v.u([b.4[0]/c,b.4[1]/c,b.4[2]/c]);8 7}};14.u=l(a,b){9 L=25 14();8 L.1Z(a,b)};14.X=14.u(v.1j(3),v.i);14.Y=14.u(v.1j(3),v.j);14.Z=14.u(v.1j(3),v.k);l 11(){}11.23={24:l(a){8(7.1h(a.K)&&7.1m(a))},1q:l(){8 11.u(7.K,7.W)},2U:l(a){9 V=a.4||a;8 11.u([7.K.4[0]+V[0],7.K.4[1]+V[1],7.K.4[2]+(V[2]||0)],7.W)},1m:l(a){9 b;o(a.W){b=7.W.1C(a.W);8(F.13(b)<=17.16||F.13(F.1A-b)<=17.16)}1d o(a.U){8 7.W.2k(a.U)}8 w},2k:l(a){9 b=7.W.1C(a.W);8(F.13(F.1A/2-b)<=17.16)},1o:l(a){o(7.1v(a)||7.1h(a)){8 0}o(a.K){9 A=7.K.4,B=a.K.4,N=7.W.4;8 F.13((A[0]-B[0])*N[0]+(A[1]-B[1])*N[1]+(A[2]-B[2])*N[2])}1d{9 P=a.4||a;9 A=7.K.4,N=7.W.4;8 F.13((A[0]-P[0])*N[0]+(A[1]-P[1])*N[1]+(A[2]-(P[2]||0))*N[2])}},1h:l(a){o(a.W){8 w}o(a.U){8(7.1h(a.K)&&7.1h(a.K.2j(a.U)))}1d{9 P=a.4||a;9 A=7.K.4,N=7.W.4;9 b=F.13(N[0]*(A[0]-P[0])+N[1]*(A[1]-P[1])+N[2]*(A[2]-(P[2]||0)));8(b<=17.16)}},1v:l(a){o(1g(a.U)=='1f'&&1g(a.W)=='1f'){8 w}8!7.1m(a)},1U:l(a){o(!7.1v(a)){8 w}o(a.U){9 A=a.K.4,D=a.U.4,P=7.K.4,N=7.W.4;9 b=(N[0]*(P[0]-A[0])+N[1]*(P[1]-A[1])+N[2]*(P[2]-A[2]))/(N[0]*D[0]+N[1]*D[1]+N[2]*D[2]);8 v.u([A[0]+D[0]*b,A[1]+D[1]*b,A[2]+D[2]*b])}1d o(a.W){9 c=7.W.2f(a.W).2q();9 N=7.W.4,A=7.K.4,O=a.W.4,B=a.K.4;9 d=S.1j(2,2),i=0;H(d.2y()){i++;d=S.u([[N[i%3],N[(i+1)%3]],[O[i%3],O[(i+1)%3]]])}9 e=d.2w().4;9 x=N[0]*A[0]+N[1]*A[1]+N[2]*A[2];9 y=O[0]*B[0]+O[1]*B[1]+O[2]*B[2];9 f=[e[0][0]*x+e[0][1]*y,e[1][0]*x+e[1][1]*y];9 g=[];2e(9 j=1;j<=3;j++){g.19((i==j)?0:f[(j+(5-i)%3)%3])}8 14.u(g,c)}},1r:l(a){9 P=a.4||a;9 A=7.K.4,N=7.W.4;9 b=(A[0]-P[0])*N[0]+(A[1]-P[1])*N[1]+(A[2]-(P[2]||0))*N[2];8 v.u([P[0]+N[0]*b,P[1]+N[1]*b,(P[2]||0)+N[2]*b])},1V:l(t,a){9 R=S.1R(t,a.U).4;9 C=a.1r(7.K).4;9 A=7.K.4,N=7.W.4;9 b=C[0],1E=C[1],1J=C[2],1w=A[0],18=A[1],1a=A[2];9 x=1w-b,y=18-1E,z=1a-1J;8 11.u([b+R[0][0]*x+R[0][1]*y+R[0][2]*z,1E+R[1][0]*x+R[1][1]*y+R[1][2]*z,1J+R[2][0]*x+R[2][1]*y+R[2][2]*z],[R[0][0]*N[0]+R[0][1]*N[1]+R[0][2]*N[2],R[1][0]*N[0]+R[1][1]*N[1]+R[1][2]*N[2],R[2][0]*N[0]+R[2][1]*N[1]+R[2][2]*N[2]])},1t:l(a){o(a.W){9 A=7.K.4,N=7.W.4;9 b=A[0],18=A[1],1a=A[2],2M=N[0],2L=N[1],2Q=N[2];9 c=7.K.1t(a).4;9 d=b+2M,2p=18+2L,2m=1a+2Q;9 Q=a.1r([d,2p,2m]).4;9 e=[Q[0]+(Q[0]-d)-c[0],Q[1]+(Q[1]-2p)-c[1],Q[2]+(Q[2]-2m)-c[2]];8 11.u(c,e)}1d o(a.U){8 7.1V(F.1A,a)}1d{9 P=a.4||a;8 11.u(7.K.1t([P[0],P[1],(P[2]||0)]),7.W)}},1Z:l(a,b,c){a=v.u(a);a=a.1N();o(a===w){8 w}b=v.u(b);b=b.1N();o(b===w){8 w}o(1g(c)=='1f'){c=w}1d{c=v.u(c);c=c.1N();o(c===w){8 w}}9 d=a.4[0],18=a.4[1],1a=a.4[2];9 e=b.4[0],1W=b.4[1],1X=b.4[2];9 f,1i;o(c!==w){9 g=c.4[0],2l=c.4[1],2t=c.4[2];f=v.u([(1W-18)*(2t-1a)-(1X-1a)*(2l-18),(1X-1a)*(g-d)-(e-d)*(2t-1a),(e-d)*(2l-18)-(1W-18)*(g-d)]);1i=f.1u();o(1i===0){8 w}f=v.u([f.4[0]/1i,f.4[1]/1i,f.4[2]/1i])}1d{1i=F.1x(e*e+1W*1W+1X*1X);o(1i===0){8 w}f=v.u([b.4[0]/1i,b.4[1]/1i,b.4[2]/1i])}7.K=a;7.W=f;8 7}};11.u=l(a,b,c){9 P=25 11();8 P.1Z(a,b,c)};11.2I=11.u(v.1j(3),v.k);11.2H=11.u(v.1j(3),v.i);11.2G=11.u(v.1j(3),v.j);11.36=11.2I;11.35=11.2H;11.3j=11.2G;9 $V=v.u;9 $M=S.u;9 $L=14.u;9 $P=11.u;",62,206,"||||elements|||this|return|var||||||||||||function|||if||length||||create|Vector|null|||||||||Math|nj|while||do|anchor||||||||Matrix||direction||normal||||kj|Plane|ni|abs|Line|ki|precision|Sylvester|A2|push|A3|map|els|else||undefined|typeof|contains|mod|Zero|D3|D2|isParallelTo|kp|distanceFrom|cols|dup|pointClosestTo|np|reflectionIn|modulus|intersects|A1|sqrt|isSquare|X2|PI|X3|angleFrom|mod1|C2|mod2|sin|cos|break|C3|toRightTriangular|false|Y3|to3D|E2|E1|E3|Rotation|Y2|Y1|intersectionWith|rotate|v12|v13|rank|setVectors|nc|sum|multiply|prototype|eql|new|setElements|case|each|PA3|PA2|part|new_element|round|for|cross|product|AD2|isSameSizeAs|add|isPerpendicularTo|v22|AN3|inspect|AD3|AN2|toUnitVector|PsubQ3|PsubQ2|v23|dot|divisor|inverse|true|isSingular|determinant|max|canMultiplyFromLeft|subtract|rows|col|random|ZX|YZ|XY|Random|join|N2|N1|D1|slice|default|N3|dimensions|switch|liesIn|translate|snapTo|augment|Diagonal|trace|indexOf|diagonal|transpose|minor|row|isAntiparallelTo|ZY|YX|acos|RotationZ|RotationY|liesOn|RotationX|inv|rk|tr|det|toDiagonalMatrix|toUpperTriangular|version|XZ".split("|"),0,{}));var MatrixManager=function(){var t=function(t,e,a,i,n,r,s,o,l){var h,m,p,c,u,d,f;return h=$M([[1,0,0,0],[0,Math.cos(t),Math.sin(-t),0],[0,Math.sin(t),Math.cos(t),0],[0,0,0,1]]),m=$M([[Math.cos(e),0,Math.sin(e),0],[0,1,0,0],[Math.sin(-e),0,Math.cos(e),0],[0,0,0,1]]),p=$M([[Math.cos(a),Math.sin(-a),0,0],[Math.sin(a),Math.cos(a),0,0],[0,0,1,0],[0,0,0,1]]),u=$M([[i,0,0,0],[0,n,0,0],[0,0,r,0],[0,0,0,1]]),d=h.x(m).x(p).x(u),d=d.transpose(),f=$M([[1,0,0,0],[0,1,0,0],[0,0,1,0],[s,o,l,1]]),d=d.x(f),c="matrix3d(",c+=d.e(1,1).toFixed(5)+","+d.e(1,2).toFixed(5)+","+d.e(1,3).toFixed(5)+","+d.e(1,4).toFixed(5)+",",c+=d.e(2,1).toFixed(5)+","+d.e(2,2).toFixed(5)+","+d.e(2,3).toFixed(5)+","+d.e(2,4).toFixed(5)+",",c+=d.e(3,1).toFixed(5)+","+d.e(3,2).toFixed(5)+","+d.e(3,3).toFixed(5)+","+d.e(3,4).toFixed(5)+",",c+=d.e(4,1).toFixed(5)+","+d.e(4,2).toFixed(5)+","+d.e(4,3).toFixed(5)+","+d.e(4,4).toFixed(5),c+=")"},e=function(t,e,a,i,n){var r,s,o,l,h;return r=$M([[Math.cos(-t),Math.sin(-t),0],[Math.sin(t),Math.cos(-t),0],[0,0,1]]),o=$M([[e,0,0],[0,a,0],[0,0,1]]),l=r.x(o),l=l.transpose(),h=$M([[1,0,0],[0,1,0],[i,n,1]]),l=l.x(h),s="matrix(",s+=l.e(1,1).toFixed(5)+","+l.e(1,2).toFixed(5)+",",s+=l.e(2,1).toFixed(5)+","+l.e(2,2).toFixed(5)+",",s+=l.e(3,1).toFixed(5)+","+l.e(3,2).toFixed(5),s+=")"},a=function(t){return e(t.r,t.s[0],t.s[1],t.p[0],t.p[1])},i=function(a,i){return i?t(-a.tr.r[0],a.tr.r[1],a.tr.r[2],a.tr.s[0],a.tr.s[1],a.tr.s[2],a.tr.p[0],a.tr.p[1],a.tr.p[2]):e(a.tr.r[2],a.tr.s[0],a.tr.s[1],a.tr.p[0],a.tr.p[1])},n=function(a,i){return i?t(-a.r[0],a.r[1],a.r[2],a.s[0],a.s[1],a.s[2],a.p[0],a.p[1],a.p[2]):e(a.r[2],a.s[0],a.s[1],a.p[0],a.p[1])};return{get2DMatrix:a,getMatrix:i,getMatrix2:n}};!function(){for(var t=0,e=["ms","moz","webkit","o"],a=0;a<e.length&&!window.requestAnimationFrame;++a)window.requestAnimationFrame=window[e[a]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[a]+"CancelAnimationFrame"]||window[e[a]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e){var a=(new Date).getTime(),i=Math.max(0,16-(a-t)),n=window.setTimeout(function(){e(a+i)},i);return t=a+i,n}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var dataManager=function(){function t(t,e,a){var i,n=r(t,e,a),s=[];for(i=0;e>i;i+=1)s.push(Math.floor(n[i]*c));return s}function e(a){var n,r;a.forEach(function(a){n=a.outPoint-a.startTime,r=a.startTime,a.layerName=i(a.layerName),a.parent&&(a.parent=i(a.parent)),a.renderedFrame=-1,animArray=[],lastFrame=-1,a.tm&&(a.tm=t(a.tm,n,r)),"PreCompLayer"==a.type&&e(a.layers)})}function a(t,a){c=a,e(t)}function i(t){return t=t.replace(/ /g,"_"),t=t.replace(/-/g,"_"),t=t.replace(/\./g,"_"),t=t.replace(/\//g,"_")}function n(t,e){if(e=t,t="bez_"+e.join("_").replace(/\./g,"p"),u[t])return t;var a=function(t,e){var a=[null,null],i=[null,null],n=[null,null],r=function(r,s){return n[s]=3*t[s],i[s]=3*(e[s]-t[s])-n[s],a[s]=1-n[s]-i[s],r*(n[s]+r*(i[s]+r*a[s]))},s=function(t){return n[0]+t*(2*i[0]+3*a[0]*t)},o=function(t){for(var e,a=t,i=0;++i<14&&(e=r(a,0)-t,!(Math.abs(e)<.001));)a-=e/s(a);return a};return function(t){return r(o(t),1)}};return u[t]=function(t,i,n,r,s){return r*a([e[0],e[1]],[e[2],e[3]])(i/s)+n},t}function r(t,e,a){var i,r,s=[];if(!(t instanceof Array)||null==t[0].t)return s.push(t),s;var o,l;s=[];var h,m,p,c,d=[];r=t.length;var f,y=1e3,g=[],b=[];t.forEach(function(t){if(t.t-=a,t.to){var e,i,n,r,s,o,l,h,m,p,c=0,u=null,d={points:[],length:0};for(e=0;y>e;e+=1)p=[],h=e/(y-1),m=0,g=[],b=[],t.to.forEach(function(e,a){null==g[a]&&(g[a]=t.s[a]+t.to[a],b[a]=t.e[a]+t.ti[a]),i=t.s[a]+(g[a]-t.s[a])*h,n=g[a]+(b[a]-g[a])*h,r=b[a]+(t.e[a]-b[a])*h,s=i+(n-i)*h,o=n+(r-n)*h,l=s+(o-s)*h,p.push(l),null!==u&&(m+=Math.pow(p[a]-u[a],2))}),m=Math.sqrt(m),c+=m,d.points.push({partialLength:c,point:p}),u=p,t.bezierData=d;d.length=c}});var v=0,E=0;for(i=0;e>i;i+=1){h=v;for(var w=!1;r-1>h;){if(o=t[h],l=t[h+1],i<o.t&&0==h){for(p=o.s.length,d=[],m=0;p>m;m+=1)d.push(o.s[m]);s.push(d),w=!0,v!=h&&(v=h,E=0);break}if(i>=o.t&&i<l.t){if(d=[],o.to){c=n([o.o.x,o.o.y,o.i.x,o.i.y]),f=u[c]("",i-o.t,0,1,l.t-o.t);var A,M,S,x=o.bezierData,F=x.length*f;for(m=E;m<x.points.length;){if(0==i||0==F||0==f){d=x.points[m].point,E=m;break}if(m==x.points.length-1)d=x.points[m].point;else if(F>x.points[m].partialLength&&F<x.points[m+1].partialLength){for(M=x.points[m].point.length,S=(F-x.points[m].partialLength)/(x.points[m+1].partialLength-x.points[m].partialLength),A=0;M>A;A+=1)d.push(x.points[m].point[A]+(x.points[m+1].point[A]-x.points[m].point[A])*S);E=m;break}m+=1}}else{var k,D,P,I;o.s.forEach(function(t,e){if(1!==o.h&&(o.o.x instanceof Array?(k=o.o.x[e],D=o.o.y[e],P=o.i.x[e],I=o.i.y[e]):(k=o.o.x,D=o.o.y,P=o.i.x,I=o.i.y),c=n([k,D,P,I]),f=u[c]("",i-o.t,0,1,l.t-o.t)),t.i){var a={i:[],o:[],v:[]};t.i.forEach(function(i,n){var r=[],s=[],l=[];i.forEach(function(a,i){1===o.h?(r.push(a),s.push(t.o[n][i]),l.push(t.v[n][i])):(r.push(a+(o.e[e].i[n][i]-a)*f),s.push(t.o[n][i]+(o.e[e].o[n][i]-t.o[n][i])*f),l.push(t.v[n][i]+(o.e[e].v[n][i]-t.v[n][i])*f))}),a.i.push(r),a.o.push(s),a.v.push(l)}),d.push(a)}else d.push(1===o.h?t:t+(o.e[e]-t)*f)})}s.push(d),w=!0,v!=h&&(v=h,E=0);break}h+=1}0==w&&(o=t[t.length-2],d=[],o.e.forEach(function(t){d.push(t)}),s.push(d))}for(h=s.length;e>h;)s.push(d),h+=1;return s}function s(t,e,a,i,n,r){return 1e-7>(a-t)*(r-e)-(n-t)*(i-e)}function o(t){var e,a,i,n,r,o,l,h,m,p,c,u,d=1e3,f=0,y=null,g={points:[],length:0};for(s(t.s[0],t.s[1],t.e[0],t.e[1],t.s[0]+t.to[0],t.s[1]+t.to[1])&&s(t.s[0],t.s[1],t.e[0],t.e[1],t.e[0]+t.ti[0],t.e[1]+t.ti[1])&&(d=2),i=0;d>i;i+=1)u=[],p=i/(d-1),c=0,e=[],a=[],t.to.forEach(function(i,s){null==e[s]&&(e[s]=t.s[s]+i,a[s]=t.e[s]+t.ti[s]),n=t.s[s]+(e[s]-t.s[s])*p,r=e[s]+(a[s]-e[s])*p,o=a[s]+(t.e[s]-a[s])*p,l=n+(r-n)*p,h=r+(o-r)*p,m=l+(h-l)*p,u.push(m),null!==y&&(c+=Math.pow(u[s]-y[s],2))}),c=Math.sqrt(c),f+=c,g.points.push({partialLength:f,point:u}),y=u;t.bezierData=g,g.length=f}function l(t,e,a){if(!(t instanceof Array)||null==t[0].t)return t;for(var i,r,s=0,l=t.length-1;l>s&&(i=t[s],r=t[s+1],!(r.t-a>e));)s+=1;i.to&&!i.bezierData&&o(i);var h,m,p=0,c=[];if(i.to){var d=i.bezierData;if(e>=r.t-a)return d.points[d.points.length-1].point;if(e<i.t-a)return d.points[0].point;h=n([i.o.x,i.o.y,i.i.x,i.i.y]),m=u[h]("",e-(i.t-a),0,1,r.t-a-(i.t-a));for(var f,y,g,b=d.length*m;p<d.points.length;){if(0==e||0==b||0==m){c=d.points[p].point;break}if(p==d.points.length-1)c=d.points[p].point;else if(b>d.points[p].partialLength&&b<d.points[p+1].partialLength){for(y=d.points[p].point.length,g=(b-d.points[p].partialLength)/(d.points[p+1].partialLength-d.points[p].partialLength),f=0;y>f;f+=1)c.push(d.points[p].point[f]+(d.points[p+1].point[f]-d.points[p].point[f])*g);break}p+=1}}else{var v,E,w,A;i.s.forEach(function(t,s){if(1!==i.h&&(i.o.x instanceof Array?(v=i.o.x[s],E=i.o.y[s],w=i.i.x[s],A=i.i.y[s]):(v=i.o.x,E=i.o.y,w=i.i.x,A=i.i.y),h=n([v,E,w,A]),m=u[h]("",e-(i.t-a),0,1,r.t-a-(i.t-a)),e>=r.t-a?m=1:e<i.t-a&&(m=0)),t.i){var o={i:[],o:[],v:[]};t.i.forEach(function(e,a){var n=[],r=[],l=[];e.forEach(function(e,o){1===i.h?(n.push(e),r.push(t.o[a][o]),l.push(t.v[a][o])):(n.push(e+(i.e[s].i[a][o]-e)*m),r.push(t.o[a][o]+(i.e[s].o[a][o]-t.o[a][o])*m),l.push(t.v[a][o]+(i.e[s].v[a][o]-t.v[a][o])*m))}),o.i.push(n),o.o.push(r),o.v.push(l)}),c.push(o)}else c.push(1===i.h?t:t+(i.e[s]-t)*m)})}return c}function h(t,e){t instanceof Array||(t=[t]);var a,i,n,r,s=t.length,o="";for(a=0;s>a;a+=1){for(r=t[a],n=r.v.length,i=0;n>i;i++)0==i?o+="M"+Math.round(10*r.v[i][0])/10+","+Math.round(10*r.v[i][1])/10:(o+=" C"+Math.round(10*(r.o[i-1][0]+r.v[i-1][0]))/10+","+Math.round(10*(r.o[i-1][1]+r.v[i-1][1]))/10,o+=" "+Math.round(10*(r.i[i][0]+r.v[i][0]))/10+","+Math.round(10*(r.i[i][1]+r.v[i][1]))/10,o+=" "+Math.round(10*r.v[i][0])/10+","+Math.round(10*r.v[i][1])/10);e!==!1&&(o+=" C"+Math.round(10*(r.o[i-1][0]+r.v[i-1][0]))/10+","+Math.round(10*(r.o[i-1][1]+r.v[i-1][1]))/10,o+=" "+Math.round(10*(r.i[0][0]+r.v[0][0]))/10+","+Math.round(10*(r.i[0][1]+r.v[0][1]))/10,o+=" "+Math.round(10*r.v[0][0])/10+","+Math.round(10*r.v[0][1])/10)}return o}function m(t,e){var a,i,n;t.forEach(function(t){if(a=e-t.startTime,!(e<t.inPoint||e>t.outPoint||t.an[a])){var r={};r.a=l(t.ks.a,a,t.startTime);var s=l(t.ks.o,a,t.startTime);r.o=s instanceof Array?s[0]/100:s/100;var o=l(t.ks.p,a,t.startTime),p=l(t.ks.r,a,t.startTime),c=l(t.ks.s,a,t.startTime);if(r.s=c instanceof Array?c.length>1?[c[0]/100,c[1]/100,c[2]/100]:[c[0]/100,c[0]/100,c[0]/100]:[c/100,c/100,c/100],r.r=p instanceof Array?p.length>1?[p[0]*Math.PI/180,p[1]*Math.PI/180,p[2]*Math.PI/180]:[p[0]*Math.PI/180,p[0]*Math.PI/180,p[0]*Math.PI/180]:[0,0,p*Math.PI/180],r.p=o,t.an[a]={forwardFrame:a,tr:r,matrixValue:d.getMatrix2(r)},t.hasMask){var u=t.masksProperties;n=u.length;var f;for(i=0;n>i;i+=1)u[i].pathStrings||(u[i].pathStrings=[],u[i].pathVertices=[],u[i].opacity=[]),f=l(u[i].pt,a,t.startTime),u[i].pathVertices[a]=f instanceof Array?f:[f],u[i].pathStrings[a]=h(f,u[i].cl),u[i].opacity[a]=l(u[i].o,a,t.startTime),u[i].opacity[a]=u[i].opacity[a]instanceof Array?u[i].opacity[a][0]/100:u[i].opacity[a]/100}if("PreCompLayer"==t.type){var y=t.tm?t.tm[a]<0?0:t.tm[a]:a;m(t.layers,y)}else if("ShapeLayer"==t.type){n=t.shapes.length;var g,b,v,E,w,A,M,S,x,F;for(i=0;n>i;i+=1){g=t.shapes[i],g._created||(g.an.tr=[],g.an.renderedFrame=-1,g.ks?g.an.path=[]:g.el?g.an.ell=[]:g.rc&&(g.an.rect=[]),g.fl&&(g.an.fill=[]),g.st&&(g.an.stroke=[])),g.trim&&!g._created&&(g.trim.an=[]),g.fl&&(v=l(g.fl.c,a,t.startTime),b=l(g.fl.o,a,t.startTime),g.an.fill[a]={color:rgbToHex(Math.round(v[0]),Math.round(v[1]),Math.round(v[2])),opacity:b instanceof Array?b[0]/100:b/100,forwardFrame:a}),g.ks?(E=l(g.ks,a,t.startTime),g.an.path[a]={pathString:h(E,g.closed),forwardFrame:a}):g.el?(S=l(g.el.p,a,t.startTime),x=l(g.el.s,a,t.startTime),g.an.ell[a]={p:S,size:x,forwardFrame:a}):g.rc&&(S=l(g.rc.p,a,t.startTime),x=l(g.rc.s,a,t.startTime),F=l(g.rc.r,a,t.startTime),g.an.rect[a]={position:S,size:x,roundness:F,forwardFrame:a}),g.st&&(w=l(g.st.c,a,t.startTime),A=l(g.st.o,a,t.startTime),M=l(g.st.w,a,t.startTime),g.an.stroke[a]={color:rgbToHex(Math.round(w[0]),Math.round(w[1]),Math.round(w[2])),opacity:A instanceof Array?A[0]/100:A/100,width:M instanceof Array?M[0]:M,forwardFrame:a});var k={};if(k.a=l(g.tr.a,a,t.startTime),k.o=l(g.tr.o,a,t.startTime),k.o=k.o instanceof Array?k.o[0]/100:k.o/100,k.s=l(g.tr.s,a,t.startTime),k.s=k.s instanceof Array?k.s.length>1?[k.s[0]/100,k.s[1]/100,k.s[2]/100]:[k.s[0]/100,k.s[0]/100,k.s[0]/100]:[k.s/100,k.s/100,k.s/100],k.r=l(g.tr.r,a,t.startTime),k.r=k.r instanceof Array?k.r.length>1?[k.r[0]*Math.PI/180,k.r[1]*Math.PI/180,k.r[2]*Math.PI/180]:[k.r[0]*Math.PI/180,k.r[0]*Math.PI/180,k.r[0]*Math.PI/180]:[0,0,k.r*Math.PI/180],k.p=l(g.tr.p,a,t.startTime),k.mt=d.getMatrix2(k),k.forwardFrame=a,g.an.tr[a]=k,g.trim){var D=l(g.trim.s,a,t.startTime),P=l(g.trim.e,a,t.startTime),I=l(g.trim.o,a,t.startTime);g.trim.an[a]={s:D,e:P,o:I,forwardFrame:a}}g._created||(g._created=!0)}}}})}function p(t,e){m(t,e)}var c=0,u={},d=new MatrixManager,f={};return f.completeData=a,f.renderFrame=p,f}();EffectsManager.prototype.init=function(){this.effectElements=[];var t,e=this.effects.length;for(t=0;e>t;t++)switch(this.effects[t].type){case"Stroke":this.addStrokeEffect(this.effects[t])}},EffectsManager.prototype.addStrokeEffect=function(t){var e={data:{value:t},element:{value:this.element}};this.effectElements.push(createElement(StrokeEffectManager,null,e))},EffectsManager.prototype.renderFrame=function(){},defineDescriptor(EffectsManager,"data",null),defineDescriptor(EffectsManager,"element",null),defineDescriptor(EffectsManager,"maskManager",null),StrokeEffectManager.prototype.init=function(){this.element.maskManager.registerEffect(this),this.layerSize=this.element.getLayerSize(),this.svgElement=document.createElementNS(svgNS,"svg"),this.svgElement.setAttribute("width",this.layerSize.w),this.svgElement.setAttribute("height",this.layerSize.h),this.pathGroup=document.createElementNS(svgNS,"g"),this.path=document.createElementNS(svgNS,"path"),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("fill","none"),this.svgElement.appendChild(this.path),this.setStaticAttributes();var t=this.element.maskManager.getMaskelement();t.appendChild(this.pathGroup),this.pathGroup.appendChild(this.path)},StrokeEffectManager.prototype.renderMask=function(t,e){var a=e[this.data.path-1].pathString;this.path.setAttribute("d",a);var i=this.path.getTotalLength(),n=void 0===this.data.animated.Start[t].forwardFrame?this.data.animated.Start[t]:this.data.animated.Start[this.data.animated.Start[t].forwardFrame],r=void 0===this.data.animated.End[t].forwardFrame?this.data.animated.End[t]:this.data.animated.End[this.data.animated.End[t].forwardFrame],s="0 ";s+=n*i/100+" ",s+=(r-n)*i/100+" ",s+=(100-r)*i/100+" ",this.path.style["stroke-dasharray"]=s},StrokeEffectManager.prototype.setStaticAttributes=function(){var t=this.data["static"];t["Brush Size"]&&this.path.setAttribute("stroke-width",2*t["Brush Size"]),t.Color&&this.path.setAttribute("stroke",t.Color)},StrokeEffectManager.prototype.renderFrame=function(){},MaskElement.prototype.init=function(){this.registeredEffects=[],this.masksProperties=this.data.masksProperties,this.totalMasks=this.masksProperties.length;var t=this.element.maskingGroup,e=this.element.maskedElement,a=document.createElementNS(svgNS,"defs");t.appendChild(a);var i,n=this.masksProperties.length;if(this.layerSize=this.element.getLayerSize(),this.usePaths){this.maskElement=document.createElementNS(svgNS,"clipPath");var r,s=this.data.masksProperties;for(i=0;n>i;i++)r=document.createElementNS(svgNS,"path"),s[i].cl?r.setAttribute("fill","#ffffff"):(r.setAttribute("fill","none"),r.setAttribute("stroke","#ffffff"),r.setAttribute("stroke-width","1"),r.setAttribute("stroke-miterlimit","10")),r.setAttribute("clip-rule","nonezero"),this.maskElement.appendChild(r),s[i].elem=r,s[i].lastPath="";var o=randomString(10);this.maskElement.setAttribute("id",o),e.setAttribute("clip-path","url(#"+o+")")}else{this.maskElement=document.createElementNS(svgNS,"mask"),this.canvas=document.createElement("canvas"),this.imageElement=document.createElementNS(svgNS,"image"),this.imageElement.setAttribute("width",this.layerSize.w),this.imageElement.setAttribute("height",this.layerSize.h),this.imageElement.setAttribute("x","0"),this.imageElement.setAttribute("y","0"),this.canvasContext=this.canvas.getContext("2d"),this.canvas.width=this.layerSize.w,this.canvas.height=this.layerSize.h,this.maskElement.appendChild(this.imageElement);var o=randomString(10);this.maskElement.setAttribute("id",o),e.setAttribute("mask","url(#"+o+")")}a.appendChild(this.maskElement)},MaskElement.prototype.createInvertedMask=function(t,e){this.helperCanvas.width=this.layerSize.w,this.helperCanvas.height=this.layerSize.h;var a=this.invertedContext;a.globalCompositeOperation="source-over";var i=t.o[e];if("a"==t.mode)a.fillStyle="rgba(255, 255, 255, "+t.o[e]+")",this.canvasContext.globalCompositeOperation="source-over";else if("s"==t.mode)a.fillStyle="rgba(0, 0, 0, "+i+")",this.canvasContext.globalCompositeOperation="source-over";else if("f"==t.mode)a.fillStyle="rgba(255, 255, 255, "+i+")",this.canvasContext.globalCompositeOperation="xor";else{if("i"!=t.mode)return;a.fillStyle="rgba(255, 255, 255, "+i+")",this.canvasContext.globalCompositeOperation="destination-in"}a.fillRect(0,0,this.helperCanvas.width,this.helperCanvas.height),a.fillStyle="rgba(255, 255, 255, 1)",a.globalCompositeOperation="destination-out",a.beginPath(),this.drawShape(a,t.pathVertices[e][0]),this.canvasContext.drawImage(this.helperCanvas,0,0)
},MaskElement.prototype.renderFrame=function(t){var e,a=this.data.masksProperties.length;if(this.usePaths===!0){if("fullSvg"!==this.element.animationItem.animType)for(e=0;a>e;e++)this.drawPath(this.data.masksProperties[e],this.data.masksProperties[e].pathStrings[t])}else{this.canvas.width=this.canvas.width;var i=this.canvasContext;for(e=0;a>e;e++){var n=this.data.masksProperties[e].opacity[t];if(this.masksProperties[e].inv)this.createInvertedMask(this.masksProperties[e],t);else{if("a"==this.masksProperties[e].mode)i.globalCompositeOperation="source-over",i.fillStyle="rgba(255, 255, 255, "+n+")";else if("s"==this.masksProperties[e].mode)i.globalCompositeOperation="source-over",i.fillStyle="rgba(0, 0, 0, "+n+")";else if("f"==this.masksProperties[e].mode)i.globalCompositeOperation="xor",i.fillStyle="rgba(255, 255, 255, "+n+")";else{if("i"!=this.masksProperties[e].mode)continue;i.globalCompositeOperation="destination-in",i.fillStyle="rgba(255, 255, 255, "+n+")"}this.drawShape(i,this.data.masksProperties[e].pathVertices[t][0])}}var r=this.canvas.toDataURL("image/png");this.imageElement.setAttributeNS("http://www.w3.org/1999/xlink","href",r)}},MaskElement.prototype.processMaskFromEffects=function(t,e){var a,i=this.registeredEffects.length;for(a=0;i>a;a++)this.registeredEffects[a].renderMask(t,e)},MaskElement.prototype.registerEffect=function(t){this.registeredEffects.push(t)},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+="h"+this.layerSize.w,t+="v"+this.layerSize.h,t+="h"+-this.layerSize.w,t+="v"+-this.layerSize.h},MaskElement.prototype.drawPath=function(t,e){t.lastPath!==e&&(t.inv?t.elem.setAttribute("d",this.createLayerSolidPath()+e):t.elem.setAttribute("d",e),t.lastPath=e)},MaskElement.prototype.drawShape=function(t,e){t.beginPath();var a,i=e.v.length;for(a=0;i>a;a++)0==a?t.moveTo(e.v[a][0],e.v[a][1]):t.bezierCurveTo(e.o[a-1][0]+e.v[a-1][0],e.o[a-1][1]+e.v[a-1][1],e.i[a][0]+e.v[a][0],e.i[a][1]+e.v[a][1],e.v[a][0],e.v[a][1]);t.bezierCurveTo(e.o[a-1][0]+e.v[a-1][0],e.o[a-1][1]+e.v[a-1][1],e.i[0][0]+e.v[0][0],e.i[0][1]+e.v[0][1],e.v[0][0],e.v[0][1]),t.closePath(),t.fill()},defineDescriptor(MaskElement,"helperCanvas",document.createElement("canvas")),defineDescriptor(MaskElement,"helperContext",MaskElement.prototype.helperCanvas.getContext("2d")),defineDescriptor(MaskElement,"data",null,{writable:!0}),defineDescriptor(MaskElement,"element",null),defineDescriptor(MaskElement,"usePaths",!0,{writable:!0}),defineDescriptor(MaskElement,"paths",[],{writable:!0});var BaseElement=function(t,e,a){this.animationItem=a,this.type=e,this.parentType=e,this.data=t,this.init()};BaseElement.prototype.init=function(){this.createElements(),this.data.hasMask&&this.addMasks(this.data),this.data.eff&&this.createEffectsManager(this.data)},BaseElement.prototype.createElements=function(){"svg"==this.type?(this.layerElement="svg"==this.parentType?document.createElementNS(svgNS,"g"):document.createElementNS(svgNS,"svg"),this.anchorElement=document.createElementNS(svgNS,"g")):(this.layerElement=document.createElement("div"),styleDiv(this.layerElement),this.anchorElement=document.createElement("div"),styleDiv(this.anchorElement)),this.anchorElement.setAttribute("id",this.data.layerName),this.layerElement.appendChild(this.anchorElement),this.maskingGroup="svg"==this.type?this.anchorElement:this.svgElem,this.maskedElement=this.svgElem},BaseElement.prototype.renderFrame=function(t){if(!(this.data.inPoint-this.data.startTime<=t&&this.data.outPoint-this.data.startTime>t))return this.isVisible!==!1&&(this.isVisible=!1,this.mainElement.setAttribute("opacity",0)),!1;this.isVisible!==!0&&(this.isVisible=!0,this.mainElement.setAttribute("opacity",1));var e=this.data.an[this.data.an[t].forwardFrame];if(this.data.eff&&this.effectsManager.renderFrame(t,e.mk),this.data.an[t].forwardFrame==this.data.renderedFrame)return!0;if(this.data.hasMask&&this.maskManager.renderFrame(t),this.data.renderedFrame=e.forwardFrame,this.anchorElement.setAttribute("opacity",e.tr.o),this.anchorElement.setAttribute("transform","translate("+-e.tr.a[0]+" "+-e.tr.a[1]+")"),this.layerElement.setAttribute("transform",e.matrixValue),this.data.relateds){var a,i,n,r,s=this.data.relateds,o=s.length;for(a=0;o>a;a++)i=s[a].item,n=s[a].itemCont,r=s[a].type,i.setAttribute("transform","translate("+-e.tr.a[0]+" "+-e.tr.a[1]+")"),n.setAttribute("transform",e.matrixValue)}return!0},BaseElement.prototype.getDomElement=function(){return this.layerElement},BaseElement.prototype.setMainElement=function(t){this.mainElement=t},BaseElement.prototype.getMaskManager=function(){return this.maskManager},BaseElement.prototype.addMasks=function(t){var e={data:{value:t},element:{value:this}};this.maskManager=createElement(MaskElement,null,e)},BaseElement.prototype.createEffectsManager=function(t){var e={effects:{value:t.eff},element:{value:this}};this.effectsManager=createElement(EffectsManager,null,e)},BaseElement.prototype.getType=function(){return this.type},BaseElement.prototype.getLayerSize=function(){return"TextLayer"==this.data.type?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}},defineDescriptor(BaseElement,"svgElem",null,{writable:!0}),defineDescriptor(BaseElement,"layerElement",null,{writable:!0}),defineDescriptor(BaseElement,"mainElement",null,{writable:!0}),defineDescriptor(BaseElement,"anchorElement",null,{writable:!0}),defineDescriptor(BaseElement,"maskingGroup",null,{writable:!0}),defineDescriptor(BaseElement,"maskedElement",null,{writable:!0}),defineDescriptor(BaseElement,"maskManager",null,{writable:!0}),defineDescriptor(BaseElement,"effectsManager",null,{writable:!0}),defineDescriptor(BaseElement,"isVisible",null,{writable:!0}),defineDescriptor(BaseElement,"animationItem",null,{writable:!0}),defineDescriptor(BaseElement,"localFrameNum",null,{writable:!0}),createElement(BaseElement,ICompElement),ICompElement.prototype.createElements=function(){this.svgElem=document.createElementNS(svgNS,"g"),this.parent.createElements.call(this)},ICompElement.prototype.getComposingElement=function(){return this.anchorElement},ICompElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);if(e!==!1){var a,i=this.layers.length,n=this.data.tm?this.data.tm[t]<0?0:this.data.tm[t]:t;for(a=0;i>a;a+=1)this.layers[a].element.renderFrame(n-this.layers[a].startTime)}},createElement(BaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.image.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assets[t.data.assetId].path),t.maskedElement=t.image,t.animationItem.elementLoaded()},a=new Image;a.addEventListener("load",e,!1),a.src=this.path+this.assets[this.data.assetId].path,this.svgElem=document.createElementNS(svgNS,"g"),this.parent.createElements.call(this),this.image=document.createElementNS(svgNS,"image"),this.image.setAttribute("width",this.data.width+"px"),this.image.setAttribute("height",this.data.height+"px"),this.svgElem.appendChild(this.image),this.anchorElement.appendChild(this.svgElem),this.maskingGroup=this.svgElem,styleUnselectableDiv(this.image)},createElement(BaseElement,IShapeElement),IShapeElement.prototype.createElements=function(){this.svgElem=document.createElementNS(svgNS,"g"),styleUnselectableDiv(this.svgElem),this.parent.createElements.call(this),this.anchorElement.appendChild(this.svgElem);var t,e,a=this.data.shapes.length;for(t=a-1;t>=0;t--)this.data.trim&&(this.data.shapes[t].trim=this.data.trim),e=new ShapeItemElement(this.data.shapes[t]),this.svgElem.appendChild(e.getElement()),this.shapes.push(e)},IShapeElement.prototype.renderFrame=function(t){var e=this.parent.renderFrame.call(this,t);e!==!1&&this.renderShapes(t)},IShapeElement.prototype.renderShapes=function(t){var e,a,i,n=this.data.shapes.length;for(e=n-1;e>=0;e--)a=this.data.shapes[e],i=this.shapes[n-1-e],i.renderShape(t)},ShapeItemElement.prototype.adjustTrim=function(){var t,e=this.data.trim,a=e.length;for(t=0;a>t;t+=1)e[t].o&&(e[t].o-=90)},ShapeItemElement.prototype.getElement=function(){return this.shapeG},ShapeItemElement.prototype.renderShape=function(t){"pathShape"==this.data.type?this.pathLength=this.renderPath(t):"rectShape"==this.data.type?this.renderRect(t):"ellipseShape"==this.data.type&&(this.pathLength=this.renderEllipse(t)),this.data.trim&&this.renderTrim(t),this.renderFill(t),this.renderStroke(t),this.renderTransform(t)},ShapeItemElement.prototype.renderPath=function(t){var e=this.data.an;e.path[t]||(console.log("num: ",t),console.log("animData.path: ",e.path));{if(e.path[t].forwardFrame!=e.renderedFrame.path){var a=e.path[e.path[t].forwardFrame];return e.renderedFrame.path=a.forwardFrame,this.shape.setAttribute("d",a.pathString),this.data.trim?(null==this.cachedData.pathLengths&&(this.cachedData.pathLengths={}),null==this.cachedData.pathLengths[a.pathString]&&(this.cachedData.pathLengths[a.pathString]=this.shape.getTotalLength()),this.cachedData.pathLengths[a.pathString]):void 0}if(this.data.trim)return this.cachedData.pathLengths[e.path[e.path[t].forwardFrame].pathString]}},ShapeItemElement.prototype.renderEllipse=function(t){var e=this.data.an;if(e.ell[t].forwardFrame==e.renderedFrame.ell)return this.data.trim?this.cachedData.pathLengths["ellipse_"+e.ell[t].forwardFrame]:0;var a=e.ell[e.ell[t].forwardFrame];if(e.renderedFrame.ell=a.forwardFrame,this.shape.setAttribute("rx",a.size[0]/2),this.shape.setAttribute("ry",a.size[1]/2),this.shape.setAttribute("cx",a.p[0]),this.shape.setAttribute("cy",a.p[1]),this.data.trim){if(null==this.cachedData.pathLengths&&(this.cachedData.pathLengths={}),null==this.cachedData.pathLengths["ellipse_"+t])if(a.size[0]==a.size[1])this.cachedData.pathLengths["ellipse_"+t]=Math.PI*a.size[0];else{var i=Math.max(a.size[0],a.size[1])/2,n=Math.max(a.size[0],a.size[1])/2,r=(i-n)/(i+n),s=(i+n)*Math.PI*(1+.25*r+1/64*Math.pow(r,2)+1/256*Math.pow(r,3));this.cachedData.pathLengths["ellipse_"+t]=s}return this.cachedData.pathLengths["ellipse_"+t]}},ShapeItemElement.prototype.renderRect=function(t){var e=this.data.an;if(e.rect[t].forwardFrame!=e.renderedFrame.rect){var a=e.rect[e.rect[t].forwardFrame];e.renderedFrame.rect=a.forwardFrame,this.shape.setAttribute("width",a.size[0]),this.shape.setAttribute("height",a.size[1]),this.shape.setAttribute("rx",a.roundness),this.shape.setAttribute("ry",a.roundness),this.shape.setAttribute("x",a.position[0]-a.size[0]/2),this.shape.setAttribute("y",a.position[1]-a.size[1]/2)}},ShapeItemElement.prototype.renderFill=function(t){var e=this.data.an;if(e.fill){if(e.fill[t].forwardFrame==e.renderedFrame.fill)return;var a=e.fill[e.fill[t].forwardFrame];e.renderedFrame.fill=a.forwardFrame,this.shape.setAttribute("fill",a.color),this.data.fillEnabled!==!1?this.shape.setAttribute("fill-opacity",a.opacity):this.shape.setAttribute("fill-opacity",0)}else this.shape.setAttribute("fill-opacity",0)},ShapeItemElement.prototype.renderStroke=function(t){var e=this.data.an;if(e.stroke){if(e.stroke[t].forwardFrame==e.renderedFrame.stroke)return;var a=e.stroke[e.stroke[t].forwardFrame];e.renderedFrame.stroke=a.forwardFrame,this.shape.setAttribute("stroke",a.color),this.shape.setAttribute("stroke-width",a.width),this.data.strokeEnabled!==!1?this.shape.setAttribute("stroke-opacity",a.opacity):this.shape.setAttribute("stroke-opacity",0)}},ShapeItemElement.prototype.renderTransform=function(t){var e=this.data.an;if(e.tr){if(e.tr[t].forwardFrame==e.renderedFrame.tr)return;var a=e.tr[e.tr[t].forwardFrame];e.renderedFrame.tr=a.forwardFrame;var i=a.mt;this.shapeG.setAttribute("transform",i),this.shape.setAttribute("transform","translate("+-a.a[0]+", "+-a.a[1]+")")}},ShapeItemElement.prototype.renderTrim=function(t){if(this.data.trim.an[t].forwardFrame!=this.data.renderedData.trim){var e=this.data.trim.an[this.data.trim.an[t].forwardFrame];if(this.data.renderedData.trim=e.forwardFrame,0==this.pathLength)this.shape.setAttribute("stroke-opacity",0);else{var a=this.pathLength*(e.e-e.s)/100,i=this.pathLength-a,n=this.pathLength*e.s/100+this.pathLength*e.o/360,r=a+" , "+i;if(this.shape.setAttribute("stroke-dasharray",r),this.shape.setAttribute("stroke-dashoffset",-n),e.e==e.s)this.shape.setAttribute("stroke-opacity",0);else if(this.data.an.stroke){var s=this.data.an.stroke[this.data.an.stroke[t].forwardFrame];this.data.strokeEnabled!==!1?this.shape.setAttribute("stroke-opacity",s.opacity/100):this.shape.setAttribute("stroke-opacity",0)}}}},createElement(BaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this.svgElem=document.createElementNS(svgNS,"g"),this.parent.createElements.call(this),this.anchorElement.appendChild(this.svgElem);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.width),t.setAttribute("height",this.data.height),t.setAttribute("fill",this.data.color),this.svgElem.appendChild(t),styleUnselectableDiv(this.svgElem),styleUnselectableDiv(t),this.maskingGroup=this.svgElem,this.maskedElement=t},createElement(BaseElement,ITextElement),ITextElement.prototype.createElements=function(){this.svgElem=document.createElementNS(svgNS,"g");var t=document.createElementNS(svgNS,"text");t.textContent=this.data.textData.text,t.setAttribute("fill",this.data.textData.fillColor),t.setAttribute("x","0"),t.setAttribute("y",this.data.textData.height-(this.data.textData.fontSize-this.data.textData.height)/2),this.svgElem.setAttribute("width",this.data.textData.width),this.svgElem.setAttribute("height",this.data.textData.height),this.svgElem.style.transform="translate("+this.data.textData.xOffset+"px,"+this.data.textData.yOffset+"px)",this.svgElem.style["-webkit-transform"]="translate("+this.data.textData.xOffset+"px,"+this.data.textData.yOffset+"px)",t.setAttribute("font-size",this.data.textData.fontSize),t.setAttribute("font-family","Arial, sans-serif"),this.svgElem.appendChild(t),this.parent.createElements.call(this),this.anchorElement.appendChild(this.svgElem),this.maskingGroup=this.svgElem,this.maskedElement=t};var animationManager=function(){function t(t){var e=createElement(AnimationItem);return e.setData(t),c.push(e),e}function e(t,e){void 0===e&&c.forEach(function(e){e.setSpeed(t)})}function a(t,e){c.forEach(function(a){void 0===e&&a.setDirection(t)})}function i(t){u=Date.now(),c.forEach(function(e){e.play(t)}),r()}function n(t,e){y=!1,u=Date.now(),c.forEach(function(a){a.moveFrame(t,e)})}function r(){p||(p=!0,d=Date.now(),f=d-u,c.forEach(function(t){t.advanceTime(f)}),u=d,requestAnimationFrame(function(){p=!1,r()}))}function s(t){c.forEach(function(e){e.pause(t)})}function o(t){c.forEach(function(e){e.stop(t)})}function l(t){c.forEach(function(e){e.togglePause(t)})}function h(){var e=document.getElementsByClassName("bodymovin");Array.prototype.forEach.call(e,function(e){t(e)})}var m={},p=!1,c=[],u=0,d=0,f=0,y=!0;return m.registerAnimation=t,m.setSpeed=e,m.setDirection=a,m.play=i,m.moveFrame=n,m.resume=r,m.pause=s,m.stop=o,m.togglePause=l,m.searchAnimations=h,m}(),AnimationItem=function(){this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.repeat="indefinite",this.animationData={},this.layers=[],this.assets=[],this.renderedFrames={},this.effectsManager=null,this.isPaused=!0,this.isScrolling=!1,this.loop=!0};AnimationItem.prototype.setData=function(t){this.wrapper=t,this.wrapper.style.position="relative";var e=this;this.path=this.wrapper.attributes.getNamedItem("data-animation-path").value,this.playerType=this.wrapper.attributes.getNamedItem("data-bm-player").value,this.animType=this.wrapper.attributes.getNamedItem("data-anim-type")?this.wrapper.attributes.getNamedItem("data-anim-type").value:"div",this.containerType="svg",this.repeat=this.wrapper.attributes.getNamedItem("data-anim-repeat")?this.wrapper.attributes.getNamedItem("data-anim-repeat").value:this.repeat,this.loop=this.wrapper.attributes.getNamedItem("data-anim-loop")?"false"!==this.wrapper.attributes.getNamedItem("data-anim-loop").value:this.loop,this.name=this.wrapper.attributes.getNamedItem("id")?this.wrapper.attributes.getNamedItem("id").value:"","/"!=this.path.substr(-1,1)&&(this.path+="/");var a=new XMLHttpRequest;a.open("GET",this.path+"data.json",!0),a.send(),a.onreadystatechange=function(){4==a.readyState&&e.configAnimation(JSON.parse(a.responseText))}},AnimationItem.prototype.configAnimation=function(t){this.container=document.createElementNS(svgNS,"svg"),this.container.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.container.setAttribute("width",t.animation.compWidth),this.container.setAttribute("height",t.animation.compHeight),this.container.setAttribute("viewBox","0 0 "+t.animation.compWidth+" "+t.animation.compHeight),this.container.setAttribute("preserveAspectRatio","xMidYMid meet"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.opactiy=".5",this.container.style.transformOrigin=this.container.style.mozTransformOrigin=this.container.style.webkitTransformOrigin=this.container.style["-webkit-transform"]="0px 0px 0px",this.container.style.overflow="hidden",styleDiv(this.container),this.wrapper.appendChild(this.container),this.effectsManager=new EffectsManager,this.animationData=t,this.layers=this.animationData.animation.layers,this.assets=this.animationData.assets,this.totalFrames=this.animationData.animation.totalFrames,this.frameRate=this.animationData.animation.frameRate,this.frameMult=this.animationData.animation.frameRate/1e3,dataManager.completeData(this.layers,this.frameRate),this.buildItems(this.animationData.animation.layers,this.containerType),this.updaFrameModifier(),this.checkLoaded()},AnimationItem.prototype.buildItems=function(t,e){var a,i=0,n=t.length;for(a=0;n>a;a++)"StillLayer"==t[a].type?(i++,this.createImage(t[a],e)):"PreCompLayer"==t[a].type?this.createComp(t[a],e):"SolidLayer"==t[a].type?this.createSolid(t[a],e):"ShapeLayer"==t[a].type?this.createShape(t[a],e):"TextLayer"==t[a].type?this.createText(t[a],e):console.log("NO TYPE: ",t[a]);this.pendingElements+=i},AnimationItem.prototype.createShape=function(t,e){t.element=new IShapeElement(t,e,this)},AnimationItem.prototype.createText=function(t,e){t.element=new ITextElement(t,e,this)},AnimationItem.prototype.createImage=function(t,e){t.element=new IImageElement(t,e,this)},AnimationItem.prototype.createComp=function(t,e){t.element=new ICompElement(t,e,this),this.buildItems(t.layers,t.element.getType())},AnimationItem.prototype.createSolid=function(t,e){t.element=new ISolidElement(t,e,this)},AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0==this.pendingElements&&(this.isLoaded=!0,this.buildStage(this.container,this.layers,this.containerType),this.buildControls(),this.gotoFrame(),this.dispatchEvent("bmLoaded"))},AnimationItem.prototype.buildStage=function(t,e,a){var i,n,r=e.length;for(i=r-1;i>=0;i--){if(n=e[i],n.parent){var s=this.buildItemHierarchy(n.element.getDomElement(),n.layerName,n.parent,e,t,a);s.setAttribute("data-layer-name",n.layerName),t.appendChild(s),n.element.setMainElement(s)}else null==n.element&&console.log("layerData: ",n),n.element.getDomElement().setAttribute("data-layer-name",n.layerName),t.appendChild(n.element.getDomElement()),n.element.setMainElement(n.element.getDomElement());"PreCompLayer"==n.type&&this.buildStage(n.element.getComposingElement(),n.layers,n.element.getType())}},AnimationItem.prototype.buildItemHierarchy=function(t,e,a,i,n,r){for(var s=0,o=i.length;o>s;){if(i[s].layerName==a){i[s].relateds||(i[s].relateds=[]);var l,h;return"svg"==r?(l=document.createElementNS(svgNS,"g"),h=document.createElementNS(svgNS,"g")):(l=document.createElement("div"),styleDiv(l),h=document.createElement("div"),styleDiv(h)),i[s].relateds.push({item:l,itemCont:h,type:r}),l.appendChild(t),h.appendChild(l),void 0!=i[s].parent?this.buildItemHierarchy(h,e,i[s].parent,i,n,r):h}s+=1}return null},AnimationItem.prototype.buildControls=function(){"0"!==this.playerType&&(this.player=playerManager.createPlayer(this.playerType),this.player.buildControls(this,this.wrapper))},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=Math.floor(this.currentRawFrame),this.renderFrame(this.layers),this.player&&this.player.setProgress(this.currentFrame/this.totalFrames)},AnimationItem.prototype.renderFrame=function(t){if(this.isLoaded!==!1){this.renderedFrames[this.currentFrame]||(this.renderedFrames[this.currentFrame]=!0,dataManager.renderFrame(this.layers,this.currentFrame));var e,a=t.length;for(e=0;a>e;e++)t[e].element.renderFrame(this.currentFrame-t[e].startTime)}},AnimationItem.prototype.dispatchEvent=function(t){var e;document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(t,!1,!1,{})):e=new CustomEvent("bmPlay"),this.wrapper.dispatchEvent(e)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1,this.dispatchEvent("bmPlay"))},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0,"svg"===this.containerType&&this.container.pauseAnimations(),this.dispatchEvent("bmPause"))},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!1?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.dispatchEvent("bmStop"))},AnimationItem.prototype.goToAndStop=function(t){this.isPaused=!0,this.currentFrame=this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.advanceTime=function(t){this.isPaused!==!0&&this.isScrolling!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier)},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.currentRawFrame>=this.totalFrames?(this.currentRawFrame=this.currentRawFrame%this.totalFrames,this.loop===!1&&this.goToAndStop(this.totalFrames-1)):this.currentRawFrame<0&&(this.currentRawFrame=this.totalFrames+this.currentRawFrame),this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssets=function(){return this.assets},defineDescriptor(AnimationItem,"name","",{writable:!0}),defineDescriptor(AnimationItem,"path","",{writable:!0}),defineDescriptor(AnimationItem,"isLoaded",!1,{writable:!0}),defineDescriptor(AnimationItem,"currentFrame",0,{writable:!0}),defineDescriptor(AnimationItem,"currentRawFrame",0,{writable:!0}),defineDescriptor(AnimationItem,"totalFrames",0,{writable:!0}),defineDescriptor(AnimationItem,"frameRate",0,{writable:!0}),defineDescriptor(AnimationItem,"frameMult",0,{writable:!0}),defineDescriptor(AnimationItem,"playSpeed",1,{writable:!0}),defineDescriptor(AnimationItem,"playDirection",1,{writable:!0}),defineDescriptor(AnimationItem,"frameModifier",0,{writable:!0}),defineDescriptor(AnimationItem,"pendingElements",0,{writable:!0}),defineDescriptor(AnimationItem,"repeat","indefinite",{writable:!0}),defineDescriptor(AnimationItem,"animationData",{},{writable:!0}),defineDescriptor(AnimationItem,"layers",null,{writable:!0}),defineDescriptor(AnimationItem,"assets",null,{writable:!0}),defineDescriptor(AnimationItem,"effectsManager",null,{writable:!0}),defineDescriptor(AnimationItem,"isPaused",!0,{writable:!0}),defineDescriptor(AnimationItem,"isScrolling",!1,{writable:!0}),defineDescriptor(AnimationItem,"loop",!0,{writable:!0}),defineDescriptor(AnimationItem,"renderedFrames",{},{writable:!0}),PlayerManager.prototype.createPlayer=function(t){switch(t){case"1":return createElement(BasicPlayer)}};var playerManager=createElement(PlayerManager);BasicPlayer.prototype.setAnimationItem=function(){},BasicPlayer.prototype.playStarted=function(){this.playButton.style.display="none",this.pauseButton.style.display="block",this.pauseAnimation.goToAndStop(0),this.pauseAnimation.play()},BasicPlayer.prototype.pauseStarted=function(){this.playButton.style.display="block",this.pauseButton.style.display="none",this.playAnimation.goToAndStop(0),this.playAnimation.play()},BasicPlayer.prototype.buildControls=function(t,e){var a=this;this.animationItem=t,e.addEventListener("bmPlay",function(){a.playStarted()}),e.addEventListener("bmPause",function(){a.pauseStarted()}),this.controls=document.createElement("div"),this.controls.style.width="100%",this.controls.style.height="70px",this.controls.style.position="absolute",this.controls.style.left=0,this.controls.style.bottom=0,this.controls.style.backgroundColor="rgba(0,0,0,.3)",e.appendChild(this.controls),styleUnselectableDiv(this.controls),this.scrollBar=document.createElement("div"),this.scrollBar.style.width="100%",this.scrollBar.style.height="14px",this.scrollBar.style.backgroundColor="rgba(25,25,25,1)",styleUnselectableDiv(this.scrollBar),this.controls.appendChild(this.scrollBar),this.scrollBarThumb=document.createElement("div"),this.scrollBarThumb.style.width="18px",this.scrollBarThumb.style.height="18px",this.scrollBarThumb.style.position="absolute",this.scrollBarThumb.style.transform=this.scrollBarThumb.style.webkitTransform="translate(-7px,0px)",this.scrollBarThumb.style.top="-3px",this.scrollBarThumb.style.left="0px",this.scrollBarThumb.style.borderRadius="11px",this.scrollBarThumb.style.border="solid 2px #000000",this.scrollBarThumb.style.backgroundColor="rgba(255,255,255,1)",this.scrollBarThumb.style.cursor="pointer",this.controls.appendChild(this.scrollBarThumb),styleUnselectableDiv(this.scrollBarThumb),this.scrollBar.addEventListener("mousedown",function(t){var e=t.layerX,i=a.scrollBar.clientWidth;a.scrollAnimation(e/i)}),this.scrollBarThumb.addEventListener("mousedown",function(){a.scrollAnimation()}),this.playButton=document.createElement("div"),this.playButton.style.width="40px",this.playButton.style.height="30px",this.playButton.style.marginTop="12px",this.playButton.style.marginLeft="10px",this.playButton.style.backgroundColor="rgba(25,25,25,1)",this.playButton.style.cursor="pointer",this.playButton.setAttribute("data-animation-path","exports/pause"),this.playButton.setAttribute("data-bm-player","0"),this.playButton.setAttribute("data-anim-type","svg"),this.playButton.setAttribute("data-anim-name","play"),this.playButton.setAttribute("data-anim-repeat","0"),this.playButton.style.display="none",this.playAnimation=animationManager.registerAnimation(this.playButton),this.playAnimation.loop=!1,this.controls.appendChild(this.playButton),styleUnselectableDiv(this.playButton),this.playButton.addEventListener("click",function(){a.animationItem.play()}),this.pauseButton=document.createElement("div"),this.pauseButton.style.width="40px",this.pauseButton.style.height="30px",this.pauseButton.style.marginTop="12px",this.pauseButton.style.marginLeft="10px",this.pauseButton.style.backgroundColor="rgba(25,25,25,1)",this.pauseButton.style.cursor="pointer",this.pauseButton.setAttribute("data-animation-path","exports/play"),this.pauseButton.setAttribute("data-bm-player","0"),this.pauseButton.setAttribute("data-anim-type","svg"),this.pauseButton.setAttribute("data-anim-name","pause"),this.pauseButton.setAttribute("data-anim-repeat","0"),this.pauseAnimation=animationManager.registerAnimation(this.pauseButton),this.pauseAnimation.wrapper.addEventListener("bmLoaded",function(){a.pauseAnimation.goToAndStop(a.pauseAnimation.totalFrames-1)}),this.pauseAnimation.loop=!1,this.controls.appendChild(this.pauseButton),styleUnselectableDiv(this.pauseButton),this.pauseButton.addEventListener("click",function(){a.animationItem.pause()})},BasicPlayer.prototype.setProgress=function(t){this.progress=t,this.scrollBarThumb.style.left=100*this.progress+"%"},BasicPlayer.prototype.scrollAnimation=function(t){this.animationItem.isScrolling=!0,this.boundingRect=this.scrollBar.getBoundingClientRect(),this.scrollBarWidth=this.scrollBar.clientWidth;var e=this,a=function(t){var a=t.pageX-e.boundingRect.left;0>a?a=0:a>=e.scrollBarWidth&&(a=e.scrollBarWidth-1),e.animationItem.updateAnimation(a/e.scrollBarWidth)},i=function(){window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",i),e.animationItem.isScrolling=!1};window.addEventListener("mousemove",a),window.addEventListener("mouseup",i),void 0!==t&&e.animationItem.updateAnimation(t)},function(t){function e(t){animationManager.play(t)}function a(t){animationManager.pause(t)}function i(t){animationManager.togglePause(t)}function n(t,e){animationManager.setSpeed(t/10,e)}function r(t,e){animationManager.setDirection(t,e)}function s(t){animationManager.stop(t)}function o(t){animationManager.moveFrame(t)}function l(){animationManager.searchAnimations()}function h(t){var e=t.keyCode?t.keyCode:t.which;88==e||90==e?88==e?m.moveFrame(1):90==e&&m.moveFrame(-1):32==e?m.togglePause():e>48&&58>e?m.setSpeed(e-48):39==e?m.setDirection(1):37==e&&m.setDirection(-1)}var m={};m.play=e,m.pause=a,m.togglePause=i,m.setSpeed=n,m.setDirection=r,m.stop=s,m.moveFrame=o,m.searchAnimations=l,t.bodymovinjs=m,t.onkeydown=h;var p=setInterval(function(){"complete"===document.readyState&&(clearInterval(p),l(),e())},100);!function(){function e(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),a}e.prototype=t.Event.prototype,t.CustomEvent=e}()}(window);}(window));