"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var defaultCurveSegments=200;function rafFactory(){var r=Date.now(),a=1e3/60;return function(t){var e=Date.now(),i=Math.min(1e3/24,Math.max(a,e-r+a)),s=setTimeout(function(){t(e+i)},i);return r=e+i,s}}var raf=rafFactory();function createSizedArray(t){return Array.apply(null,{length:t})}function createTypedArray(t,e){return"float32"===t?new Float32Array(e):"int16"===t?new Int16Array(e):"uint8c"===t?new Uint8ClampedArray(e):null}function createTag(t){var e={};switch(t){case"canvas":return e.getContext=function(){},e;default:return e}}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var i=void 0,s="";for(i=t;0>4,l[r++]=(15&n)<<4|o>>2,l[r++]=(3&o)<<6|63&h;return p}}api.ap&&Object.keys(wxToAliApi).forEach(function(t){api[t]=wxToAliApi[t]});var _cos=Math.cos,_sin=Math.sin,_tan=Math.tan,_rnd=Math.round,Matrix=function(){function t(){classCallCheck(this,t),this._identity=!0,this._identityCalculated=!1,this.props=new Float32Array(16),this.reset()}return createClass(t,[{key:"reset",value:function(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}},{key:"rotate",value:function(t){if(0===t)return this;var e=_cos(t),i=_sin(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}},{key:"rotateX",value:function(t){if(0===t)return this;var e=_cos(t),i=_sin(t);return this._t(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1)}},{key:"rotateY",value:function(t){if(0===t)return this;var e=_cos(t),i=_sin(t);return this._t(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1)}},{key:"rotateZ",value:function(t){if(0===t)return this;var e=_cos(t),i=_sin(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}},{key:"shear",value:function(t,e){return this._t(1,e,t,1,0,0)}},{key:"skew",value:function(t,e){return this.shear(_tan(t),_tan(e))}},{key:"skewFromAxis",value:function(t,e){var i=_cos(e),s=_sin(e);return this._t(i,s,0,0,-s,i,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,_tan(t),1,0,0,0,0,1,0,0,0,0,1)._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}},{key:"scale",value:function(t,e,i){return i=isNaN(i)?1:i,1===t&&1===e&&1===i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}},{key:"setTransform",value:function(t,e,i,s,r,a,n,o,h,p,l,c,u,f,d,m){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=s,this.props[4]=r,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=p,this.props[10]=l,this.props[11]=c,this.props[12]=u,this.props[13]=f,this.props[14]=d,this.props[15]=m,this}},{key:"translate",value:function(t,e,i){return i=i||0,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}},{key:"transform",value:function(t,e,i,s,r,a,n,o,h,p,l,c,u,f,d,m){var y=this.props;if(1===t&&0===e&&0===i&&0===s&&0===r&&1===a&&0===n&&0===o&&0===h&&0===p&&1===l&&0===c)return y[12]=y[12]*t+y[15]*u,y[13]=y[13]*a+y[15]*f,y[14]=y[14]*l+y[15]*d,y[15]*=m,this._identityCalculated=!1,this;var v=y[0],g=y[1],k=y[2],x=y[3],b=y[4],P=y[5],_=y[6],C=y[7],S=y[8],T=y[9],E=y[10],A=y[11],w=y[12],I=y[13],D=y[14],F=y[15];return y[0]=v*t+g*r+k*h+x*u,y[1]=v*e+g*a+k*p+x*f,y[2]=v*i+g*n+k*l+x*d,y[3]=v*s+g*o+k*c+x*m,y[4]=b*t+P*r+_*h+C*u,y[5]=b*e+P*a+_*p+C*f,y[6]=b*i+P*n+_*l+C*d,y[7]=b*s+P*o+_*c+C*m,y[8]=S*t+T*r+E*h+A*u,y[9]=S*e+T*a+E*p+A*f,y[10]=S*i+T*n+E*l+A*d,y[11]=S*s+T*o+E*c+A*m,y[12]=w*t+I*r+D*h+F*u,y[13]=w*e+I*a+D*p+F*f,y[14]=w*i+I*n+D*l+F*d,y[15]=w*s+I*o+D*c+F*m,this._identityCalculated=!1,this}},{key:"isIdentity",value:function(){var t=this.props;return this._identityCalculated||(this._identity=!(1!==t[0]||0!==t[1]||0!==t[2]||0!==t[3]||0!==t[4]||1!==t[5]||0!==t[6]||0!==t[7]||0!==t[8]||0!==t[9]||1!==t[10]||0!==t[11]||0!==t[12]||0!==t[13]||0!==t[14]||1!==t[15]),this._identityCalculated=!0),this._identity}},{key:"equals",value:function(t){for(var e=0,i=this.props;e<16;){if(t.props[e]!==i[e])return!1;e+=1}return!0}},{key:"clone",value:function(t){var e=void 0,i=this.props;for(e=0;e<16;e+=1)t.props[e]=i[e]}},{key:"cloneFromProps",value:function(t){var e=void 0;for(e=0;e<16;e+=1)this.props[e]=t[e]}},{key:"applyToPoint",value:function(t,e,i){var s=this.props;return{x:t*s[0]+e*s[4]+i*s[8]+s[12],y:t*s[1]+e*s[5]+i*s[9]+s[13],z:t*s[2]+e*s[6]+i*s[10]+s[14]}}},{key:"applyToX",value:function(t,e,i){var s=this.props;return t*s[0]+e*s[4]+i*s[8]+s[12]}},{key:"applyToY",value:function(t,e,i){var s=this.props;return t*s[1]+e*s[5]+i*s[9]+s[13]}},{key:"applyToZ",value:function(t,e,i){var s=this.props;return t*s[2]+e*s[6]+i*s[10]+s[14]}},{key:"inversePoint",value:function(t){var e=this.props,i=e[0]*e[5]-e[1]*e[4],s=e[5]/i,r=-e[1]/i,a=-e[4]/i,n=e[0]/i,o=(e[4]*e[13]-e[5]*e[12])/i,h=-(e[0]*e[13]-e[1]*e[12])/i;return[t[0]*s+t[1]*a+o,t[0]*r+t[1]*n+h,0]}},{key:"inversePoints",value:function(t){var e=void 0,i=t.length,s=[];for(e=0;eSUBDIVISION_PRECISION&&++o",beforeExpr),template:new TokenType("template"),invalidTemplate:new TokenType("invalidTemplate"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:!0,startsExpr:!0}),eq:new TokenType("=",{beforeExpr:!0,isAssign:!0}),assign:new TokenType("_=",{beforeExpr:!0,isAssign:!0}),incDec:new TokenType("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new TokenType("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("/<=/>=",7),bitShift:binop("<>/>>>",8),plusMin:new TokenType("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new TokenType("**",{beforeExpr:!0}),_break:kw("break"),_case:kw("case",beforeExpr),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",beforeExpr),_do:kw("do",{isLoop:!0,beforeExpr:!0}),_else:kw("else",beforeExpr),_finally:kw("finally"),_for:kw("for",{isLoop:!0}),_function:kw("function",startsExpr),_if:kw("if"),_return:kw("return",beforeExpr),_switch:kw("switch"),_throw:kw("throw",beforeExpr),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:!0}),_with:kw("with"),_new:kw("new",{beforeExpr:!0,startsExpr:!0}),_this:kw("this",startsExpr),_super:kw("super",startsExpr),_class:kw("class",startsExpr),_extends:kw("extends",beforeExpr),_export:kw("export"),_import:kw("import"),_null:kw("null",startsExpr),_true:kw("true",startsExpr),_false:kw("false",startsExpr),_in:kw("in",{beforeExpr:!0,binop:7}),_instanceof:kw("instanceof",{beforeExpr:!0,binop:7}),_typeof:kw("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:kw("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:kw("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lineBreak=/\r\n?|\n|\u2028|\u2029/,lineBreakG=new RegExp(lineBreak.source,"g");function isNewLine(t){return 10===t||13===t||8232===t||8233===t}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,skipWhiteSpace=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ref=Object.prototype,hasOwnProperty=ref.hasOwnProperty,toString=ref.toString;function has(t,e){return hasOwnProperty.call(t,e)}var isArray=Array.isArray||function(t){return"[object Array]"===toString.call(t)},Position=function(t,e){this.line=t,this.column=e};Position.prototype.offset=function(t){return new Position(this.line,this.column+t)};var SourceLocation=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function getLineInfo(t,e){for(var i=1,s=0;;){lineBreakG.lastIndex=s;var r=lineBreakG.exec(t);if(!(r&&r.index=a.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=a.start&&(t.parenthesizedBind=-1)),a},pp$3.parseSubscripts=function(t,e,i,s){for(var r=this,a=8<=this.options.ecmaVersion&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd==t.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(t.start,t.end),n=void 0;;)if((n=r.eat(types.bracketL))||r.eat(types.dot)){var o=r.startNodeAt(e,i);o.object=t,o.property=n?r.parseExpression():r.parseIdent(!0),o.computed=!!n,n&&r.expect(types.bracketR),t=r.finishNode(o,"MemberExpression")}else if(!s&&r.eat(types.parenL)){var h=new DestructuringErrors,p=r.yieldPos,l=r.awaitPos;r.yieldPos=0,r.awaitPos=0;var c=r.parseExprList(types.parenR,8<=r.options.ecmaVersion,!1,h);if(a&&!r.canInsertSemicolon()&&r.eat(types.arrow))return r.checkPatternErrors(h,!1),r.checkYieldAwaitInDefaultParams(),r.yieldPos=p,r.awaitPos=l,r.parseArrowExpression(r.startNodeAt(e,i),c,!0);r.checkExpressionErrors(h,!0),r.yieldPos=p||r.yieldPos,r.awaitPos=l||r.awaitPos;var u=r.startNodeAt(e,i);u.callee=t,u.arguments=c,t=r.finishNode(u,"CallExpression")}else{if(r.type!==types.backQuote)return t;var f=r.startNodeAt(e,i);f.tag=t,f.quasi=r.parseTemplate({isTagged:!0}),t=r.finishNode(f,"TaggedTemplateExpression")}},pp$3.parseExprAtom=function(t){var e,i=this.potentialArrowAt==this.start;switch(this.type){case types._super:return this.inFunction||this.raise(this.start,"'super' outside of function or class"),e=this.startNode(),this.next(),this.type!==types.dot&&this.type!==types.bracketL&&this.type!==types.parenL&&this.unexpected(),this.finishNode(e,"Super");case types._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case types.name:var s=this.start,r=this.startLoc,a=this.containsEsc,n=this.parseIdent(this.type!==types.name);if(8<=this.options.ecmaVersion&&!a&&"async"===n.name&&!this.canInsertSemicolon()&&this.eat(types._function))return this.parseFunction(this.startNodeAt(s,r),!1,!1,!0);if(i&&!this.canInsertSemicolon()){if(this.eat(types.arrow))return this.parseArrowExpression(this.startNodeAt(s,r),[n],!1);if(8<=this.options.ecmaVersion&&"async"===n.name&&this.type===types.name&&!a)return n=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(types.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,r),[n],!0)}return n;case types.regexp:var o=this.value;return(e=this.parseLiteral(o.value)).regex={pattern:o.pattern,flags:o.flags},e;case types.num:case types.string:return this.parseLiteral(this.value);case types._null:case types._true:case types._false:return(e=this.startNode()).value=this.type===types._null?null:this.type===types._true,e.raw=this.type.keyword,this.next(),this.finishNode(e,"Literal");case types.parenL:var h=this.start,p=this.parseParenAndDistinguishExpression(i);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(t.parenthesizedAssign=h),t.parenthesizedBind<0&&(t.parenthesizedBind=h)),p;case types.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(types.bracketR,!0,!0,t),this.finishNode(e,"ArrayExpression");case types.braceL:return this.parseObj(!1,t);case types._function:return e=this.startNode(),this.next(),this.parseFunction(e,!1);case types._class:return this.parseClass(this.startNode(),!1);case types._new:return this.parseNew();case types.backQuote:return this.parseTemplate();default:this.unexpected()}},pp$3.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(e,"Literal")},pp$3.parseParenExpression=function(){this.expect(types.parenL);var t=this.parseExpression();return this.expect(types.parenR),t},pp$3.parseParenAndDistinguishExpression=function(t){var e,i=this,s=this.start,r=this.startLoc,a=8<=this.options.ecmaVersion;if(6<=this.options.ecmaVersion){this.next();var n,o=this.start,h=this.startLoc,p=[],l=!0,c=!1,u=new DestructuringErrors,f=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==types.parenR;){if(l?l=!1:i.expect(types.comma),a&&i.afterTrailingComma(types.parenR,!0)){c=!0;break}if(i.type===types.ellipsis){n=i.start,p.push(i.parseParenItem(i.parseRestBinding())),i.type===types.comma&&i.raise(i.start,"Comma is not permitted after the rest element");break}p.push(i.parseMaybeAssign(!1,u,i.parseParenItem))}var m=this.start,y=this.startLoc;if(this.expect(types.parenR),t&&!this.canInsertSemicolon()&&this.eat(types.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=d,this.parseParenArrowList(s,r,p);p.length&&!c||this.unexpected(this.lastTokStart),n&&this.unexpected(n),this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=d||this.awaitPos,1=this.input.length?this.finishToken(types.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},pp$8.readToken=function(t){return isIdentifierStart(t,6<=this.options.ecmaVersion)||92===t?this.readWord():this.getTokenFromCode(t)},pp$8.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);return t<=55295||57344<=t?t:(t<<10)+this.input.charCodeAt(this.pos+1)-56613888},pp$8.skipBlockComment=function(){var t,e=this.options.onComment&&this.curPosition(),i=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(lineBreakG.lastIndex=i;(t=lineBreakG.exec(this.input))&&t.index>10),56320+(1023&t)))}pp$8.readRegexp=function(){for(var t,e,s=this,r=this.pos;;){s.pos>=s.input.length&&s.raise(r,"Unterminated regular expression");var i=s.input.charAt(s.pos);if(lineBreak.test(i)&&s.raise(r,"Unterminated regular expression"),t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++s.pos}var a=this.input.slice(r,this.pos);++this.pos;var n=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(n);var h=a,p="";if(o){var l="gim";6<=this.options.ecmaVersion&&(l+="uy"),9<=this.options.ecmaVersion&&(l+="s");for(var c=0;c=e.input.length&&e.raise(e.start,"Unterminated string constant");var r=e.input.charCodeAt(e.pos);if(r===t)break;92===r?(i+=e.input.slice(s,e.pos),i+=e.readEscapedChar(!1),s=e.pos):(isNewLine(r)&&e.raise(e.start,"Unterminated string constant"),++e.pos)}return i+=this.input.slice(s,this.pos++),this.finishToken(types.string,i)};var INVALID_TEMPLATE_ESCAPE_ERROR={};function parse(t,e){return new Parser(e,t).parse()}pp$8.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==INVALID_TEMPLATE_ESCAPE_ERROR)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},pp$8.invalidStringToken=function(t,e){if(this.inTemplateElement&&9<=this.options.ecmaVersion)throw INVALID_TEMPLATE_ESCAPE_ERROR;this.raise(t,e)},pp$8.readTmplToken=function(){for(var t=this,e="",i=this.pos;;){t.pos>=t.input.length&&t.raise(t.start,"Unterminated template");var s=t.input.charCodeAt(t.pos);if(96===s||36===s&&123===t.input.charCodeAt(t.pos+1))return t.pos!==t.start||t.type!==types.template&&t.type!==types.invalidTemplate?(e+=t.input.slice(i,t.pos),t.finishToken(types.template,e)):36===s?(t.pos+=2,t.finishToken(types.dollarBraceL)):(++t.pos,t.finishToken(types.backQuote));if(92===s)e+=t.input.slice(i,t.pos),e+=t.readEscapedChar(!0),i=t.pos;else if(isNewLine(s)){switch(e+=t.input.slice(i,t.pos),++t.pos,s){case 13:10===t.input.charCodeAt(t.pos)&&++t.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(s)}t.options.locations&&(++t.curLine,t.lineStart=t.pos),i=t.pos}else++t.pos}},pp$8.readInvalidTemplateToken=function(){for(var t=this;this.pos":function(t,e){return e=":function(t,e){return e<=t},"<<":function(t,e){return t<>":function(t,e){return t>>e},">>>":function(t,e){return t>>>e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"|":function(t,e){return t|e},"^":function(t,e){return t^e},"&":function(t,e){return t&e},in:function(t,e){return t in e},instanceof:function(t,e){return t instanceof e}}[t.operator](evaluate(t.left,e),evaluate(t.right,e))},AssignmentExpression:function(t,e){var i;if("Identifier"===t.left.type){var s=t.left.name,r=e.$find(s);if(!r)throw s+" 未定义";i=r}else{if("MemberExpression"!==t.left.type)throw"如果出现在这里,那就说明有问题了";var a=t.left,n=evaluate(a.object,e),o=a.computed?evaluate(a.property,e):a.property.name;i={$set:function(t){return n[o]=t,!0},$get:function(){return n[o]}}}return{"=":function(t){return i.$set(t),t},"+=":function(t){return i.$set(i.$get()+t),i.$get()},"-=":function(t){return i.$set(i.$get()-t),i.$get()},"*=":function(t){return i.$set(i.$get()*t),i.$get()},"/=":function(t){return i.$set(i.$get()/t),i.$get()},"%=":function(t){return i.$set(i.$get()%t),i.$get()},"<<=":function(t){return i.$set(i.$get()<>=":function(t){return i.$set(i.$get()>>t),i.$get()},">>>=":function(t){return i.$set(i.$get()>>>t),i.$get()},"|=":function(t){return i.$set(i.$get()|t),i.$get()},"^=":function(t){return i.$set(i.$get()^t),i.$get()},"&=":function(t){return i.$set(i.$get()&t),i.$get()}}[t.operator](evaluate(t.right,e))},LogicalExpression:function(t,e){return{"||":function(){return evaluate(t.left,e)||evaluate(t.right,e)},"&&":function(){return evaluate(t.left,e)&&evaluate(t.right,e)}}[t.operator]()},MemberExpression:function(t,e){var i=t.object,s=t.property;return t.computed?evaluate(i,e)[evaluate(s,e)]:evaluate(i,e)[s.name]},ConditionalExpression:function(t,e){return evaluate(t.test,e)?evaluate(t.consequent,e):evaluate(t.alternate,e)},CallExpression:function(t,e){var i=evaluate(t.callee,e),s=t.arguments.map(function(t){return evaluate(t,e)});if("MemberExpression"===t.callee.type){var r=evaluate(t.callee.object,e);return i.apply(r,s)}var a=e.$find("this");return i.apply(a?a.$get():null,s)},NewExpression:function(t,e){var i=evaluate(t.callee,e),s=t.arguments.map(function(t){return evaluate(t,e)});return new(i.bind.apply(i,[null].concat(s)))},SequenceExpression:function(t,e){for(var i,s=0,r=t.expressions;s=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o}a[s]&&(!a[s]||r)||(a[s]=point_pool.newElement()),a[s][0]=t,a[s][1]=e}},{key:"setTripleAt",value:function(t,e,i,s,r,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,s,"o",n,o),this.setXYAt(r,a,"i",n,o)}},{key:"reverse",value:function(){var t=new h;t.setPathData(this.c,this._length);var e=this.v,i=this.o,s=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],i[0][0],i[0][1],0,!1),r=1);var a=this._length-1,n=this._length,o=void 0;for(o=r;oo.k[e].t&&to.k[e+1].t-t?(i=e+2,o.k[e+1].t):(i=e+1,o.k[e].t);break}}-1===i&&(i=e+1,s=o.k[e].t)}else s=i=0;var a={};return a.index=i,a.time=s/n.comp.globalData.frameRate,a},scoped_bm_rt:M}),o.xf){var D=void 0,F=o.xf.length;for(D=0;Dr.length-1)&&(e=r.length-1),n=a-(o=r[r.length-1-e].t));var h=void 0,p=void 0,l=void 0;if("pingpong"===t){if(Math.floor((s-o)/n)%2!=0)return this.getValueAtTime((n-(s-o)%n+o)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(o/this.comp.globalData.frameRate,0),u=this.getValueAtTime(a/this.comp.globalData.frameRate,0),f=this.getValueAtTime(((s-o)%n+o)/this.comp.globalData.frameRate,0),d=Math.floor((s-o)/n);if(this.pv.length){for(p=(l=new Array(c.length)).length,h=0;hr.length-1)&&(e=r.length-1),n=(o=r[e].t)-a);var h=void 0,p=void 0,l=void 0;if("pingpong"===t){if(Math.floor((a-s)/n)%2==0)return this.getValueAtTime(((a-s)%n+a)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var c=this.getValueAtTime(a/this.comp.globalData.frameRate,0),u=this.getValueAtTime(o/this.comp.globalData.frameRate,0),f=this.getValueAtTime((n-(a-s)%n+a)/this.comp.globalData.frameRate,0),d=Math.floor((a-s)/n)+1;if(this.pv.length){for(p=(l=new Array(c.length)).length,h=0;hn?-1:1,p=!0;p;)if(s[a]<=n&&s[a+1]>n?(o=(n-s[a])/(s[a+1]-s[a]),p=!1):a+=h,a<0||r-1<=a){if(a===r-1)return i[a];p=!1}return i[a]+(i[a+1]-i[a])*o}var I=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e=segments_length_pool.newElement(),i=t.c,s=t.v,r=t.o,a=t.i,n=void 0,o=t._length,h=e.lengths,p=0;for(n=0;n=p.t-i){h.h&&(h=p),r=0;break}if(p.t-i>t){r=a;break}a=i&&i<=t||this._caching.lastFrame=this.p.keyframes[this.p.keyframes.length-1].t?(e=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/s,0),this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.01)/s,0)):(e=this.p.pv,this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/s,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){e=[],i=[];var r=this.px,a=this.py;r._caching.lastFrame+r.offsetTime<=r.keyframes[0].t?(e[0]=r.getValueAtTime((r.keyframes[0].t+.01)/s,0),e[1]=a.getValueAtTime((a.keyframes[0].t+.01)/s,0),i[0]=r.getValueAtTime(r.keyframes[0].t/s,0),i[1]=a.getValueAtTime(a.keyframes[0].t/s,0)):r._caching.lastFrame+r.offsetTime>=r.keyframes[r.keyframes.length-1].t?(e[0]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/s,0),e[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/s,0),i[0]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/s,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/s,0)):(e=[r.pv,a.pv],i[0]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/s,r.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/s,a.offsetTime))}this.v.rotate(-Math.atan2(e[1]-i[1],e[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}},{key:"precalculateMatrix",value:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}}},{key:"autoOrient",value:function(){}},{key:"addDynamicProperty",value:function(t){get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"addDynamicProperty",this).call(this,t),this.elem.addDynamicProperty(t),this._isDirty=!0}}]),n}();TransformProperty.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;var TransformPropertyFactory={getTransformProperty:function(t,e,i){return new TransformProperty(t,e,i)}},TransformElement=function(){function t(){classCallCheck(this,t),this.mHelper=new Matrix}return createClass(t,[{key:"initTransform",value:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty}},{key:"renderTransform",value:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t=void 0,e=this.finalTransform.mat,i=0,s=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;it?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())}},{key:"renderRenderable",value:function(){var t=void 0,e=this.renderableComponents.length;for(t=0;t=f[f.length-1].t-this.offsetTime)n=f[f.length-1].s?f[f.length-1].s[0]:f[f.length-2].e[0],h=!0;else{for(var d=a,m=f.length-1,y=!0,v=void 0,g=void 0;y&&(v=f[d],!((g=f[d+1]).t-this.offsetTime>t));)d=g.t-this.offsetTime)c=1;else if(ta){var l=n,c=i.c&&n===o-1?0:n+1,u=(a-h)/r[n].addedLength;p=bez.getPointInSegment(i.v[l],i.v[c],i.o[l],i.i[c],u,r[n]);break}h+=r[n].addedLength,n+=1}return p=p||(i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]])}},{key:"vectorOnPath",value:function(t,e,i){t=1===t?this.v.c?0:.999:t;var s=this.pointOnPath(t,e),r=this.pointOnPath(t+.001,e),a=r[0]-s[0],n=r[1]-s[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===i?[a/o,n/o]:[-n/o,a/o]}},{key:"tangentOnPath",value:function(t,e){return this.vectorOnPath(t,e,"tangent")}},{key:"normalOnPath",value:function(t,e){return this.vectorOnPath(t,e,"normal")}}]),t}(),KeyframedShapeProperty=function(){function a(t,e,i){classCallCheck(this,a);var s=possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));s.getShapeValueAtTime=getShapeValueAtTime,s.initiateExpression=ob$1.initiateExpression,s.propType="shape",s.comp=t.comp,s.elem=t,s.container=t,s.offsetTime=t.data.st,s.keyframes=3===i?e.pt.k:e.ks.k,s.k=!0,s.kf=!0;var r=s.keyframes[0].s[0].i.length;return s.v=factory.newElement(),s.v.setPathData(s.keyframes[0].s[0].c,r),s.pv=factory.clone(s.v),s.localShapeCollection=ob$4.newShapeCollection(),s.paths=s.localShapeCollection,s.paths.addShape(s.v),s.lastFrame=initFrame$1,s.reset=resetShape,s._caching={lastFrame:initFrame$1,lastIndex:0},s.effectsSequence=[interpolateShapeCurrentTime.bind(s)],s}return inherits(a,ShapeExpressions),a}();KeyframedShapeProperty.prototype.getValue=processEffectsSequence$1,KeyframedShapeProperty.prototype.interpolateShape=interpolateShape,KeyframedShapeProperty.prototype.setVValue=setVValue$1,KeyframedShapeProperty.prototype.addEffect=addEffect$1;var ShapeProperty=function(){function a(t,e,i){classCallCheck(this,a);var s=possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));s.propType="shape",s.comp=t.comp,s.container=t,s.elem=t,s.data=e,s.k=!1,s.kf=!1,s._mdf=!1;var r=3===i?e.pt.k:e.ks.k;return s.v=factory.clone(r),s.pv=factory.clone(s.v),s.localShapeCollection=ob$4.newShapeCollection(),s.paths=s.localShapeCollection,s.paths.addShape(s.v),s.reset=resetShape,s.effectsSequence=[],s}return inherits(a,ShapeExpressions),a}();ShapeProperty.prototype.interpolateShape=interpolateShape,ShapeProperty.prototype.getValue=processEffectsSequence$1,ShapeProperty.prototype.setVValue=setVValue$1,ShapeProperty.prototype.addEffect=addEffect$1;var _class$1,RectShapeProperty=function(){function s(t,e){classCallCheck(this,s);var i=possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return i.reset=resetShape,i.v=factory.newElement(),i.v.c=!0,i.localShapeCollection=ob$4.newShapeCollection(),i.localShapeCollection.addShape(i.v),i.paths=i.localShapeCollection,i.elem=t,i.comp=t.comp,i.frameId=-1,i.d=e.d,i.initDynamicPropertyContainer(t),i.p=PropertyFactory$1.getProp(t,e.p,1,0,i),i.s=PropertyFactory$1.getProp(t,e.s,1,0,i),i.r=PropertyFactory$1.getProp(t,e.r,0,0,i),i.dynamicProperties.length?i.k=!0:(i.k=!1,i.convertRectToPath()),i}return inherits(s,DynamicPropertyContainer),createClass(s,[{key:"convertRectToPath",value:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,s=this.s.v[1]/2,r=bm_min(i,s,this.r.v),a=r*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-s+r,t+i,e-s+r,t+i,e-s+a,0,!0),this.v.setTripleAt(t+i,e+s-r,t+i,e+s-a,t+i,e+s-r,1,!0),0!==r?(this.v.setTripleAt(t+i-r,e+s,t+i-r,e+s,t+i-a,e+s,2,!0),this.v.setTripleAt(t-i+r,e+s,t-i+a,e+s,t-i+r,e+s,3,!0),this.v.setTripleAt(t-i,e+s-r,t-i,e+s-r,t-i,e+s-a,4,!0),this.v.setTripleAt(t-i,e-s+r,t-i,e-s+a,t-i,e-s+r,5,!0),this.v.setTripleAt(t-i+r,e-s,t-i+r,e-s,t-i+a,e-s,6,!0),this.v.setTripleAt(t+i-r,e-s,t+i-a,e-s,t+i-r,e-s,7,!0)):(this.v.setTripleAt(t-i,e+s,t-i+a,e+s,t-i,e+s,2),this.v.setTripleAt(t-i,e-s,t-i,e-s+a,t-i,e-s,3))):(this.v.setTripleAt(t+i,e-s+r,t+i,e-s+a,t+i,e-s+r,0,!0),0!==r?(this.v.setTripleAt(t+i-r,e-s,t+i-r,e-s,t+i-a,e-s,1,!0),this.v.setTripleAt(t-i+r,e-s,t-i+a,e-s,t-i+r,e-s,2,!0),this.v.setTripleAt(t-i,e-s+r,t-i,e-s+r,t-i,e-s+a,3,!0),this.v.setTripleAt(t-i,e+s-r,t-i,e+s-a,t-i,e+s-r,4,!0),this.v.setTripleAt(t-i+r,e+s,t-i+r,e+s,t-i+a,e+s,5,!0),this.v.setTripleAt(t+i-r,e+s,t+i-a,e+s,t+i-r,e+s,6,!0),this.v.setTripleAt(t+i,e+s-r,t+i,e+s-r,t+i,e+s-a,7,!0)):(this.v.setTripleAt(t-i,e-s,t-i+a,e-s,t-i,e-s,1,!0),this.v.setTripleAt(t-i,e+s,t-i,e+s-a,t-i,e+s,2,!0),this.v.setTripleAt(t+i,e+s,t+i-a,e+s,t+i,e+s,3,!0)))}},{key:"getValue",value:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())}}]),s}(),cPoint=.5519,EllShapeProperty=function(){function s(t,e){classCallCheck(this,s);var i=possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return i.reset=resetShape,i.v=factory.newElement(),i.v.setPathData(!0,4),i.localShapeCollection=ob$4.newShapeCollection(),i.paths=i.localShapeCollection,i.localShapeCollection.addShape(i.v),i.d=e.d,i.elem=t,i.comp=t.comp,i.frameId=-1,i.initDynamicPropertyContainer(t),i.p=PropertyFactory$1.getProp(t,e.p,1,0,i),i.s=PropertyFactory$1.getProp(t,e.s,1,0,i),i.dynamicProperties.length?i.k=!0:(i.k=!1,i.convertEllToPath()),i}return inherits(s,DynamicPropertyContainer),createClass(s,[{key:"getValue",value:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())}},{key:"convertEllToPath",value:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,s=this.s.v[1]/2,r=3!==this.d,a=this.v;a.v[0][0]=t,a.v[0][1]=e-s,a.v[1][0]=r?t+i:t-i,a.v[1][1]=e,a.v[2][0]=t,a.v[2][1]=e+s,a.v[3][0]=r?t-i:t+i,a.v[3][1]=e,a.i[0][0]=r?t-i*cPoint:t+i*cPoint,a.i[0][1]=e-s,a.i[1][0]=r?t+i:t-i,a.i[1][1]=e-s*cPoint,a.i[2][0]=r?t+i*cPoint:t-i*cPoint,a.i[2][1]=e+s,a.i[3][0]=r?t-i:t+i,a.i[3][1]=e+s*cPoint,a.o[0][0]=r?t+i*cPoint:t-i*cPoint,a.o[0][1]=e-s,a.o[1][0]=r?t+i:t-i,a.o[1][1]=e+s*cPoint,a.o[2][0]=r?t-i*cPoint:t+i*cPoint,a.o[2][1]=e+s,a.o[3][0]=r?t-i:t+i,a.o[3][1]=e-s*cPoint}}]),s}(),degToRads$3=Math.PI/180,StarShapeProperty=function(){function s(t,e){classCallCheck(this,s);var i=possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return i.reset=resetShape,i.v=factory.newElement(),i.v.setPathData(!0,0),i.elem=t,i.comp=t.comp,i.data=e,i.frameId=-1,i.d=e.d,i.initDynamicPropertyContainer(t),1===e.sy?(i.ir=PropertyFactory$1.getProp(t,e.ir,0,0,i),i.is=PropertyFactory$1.getProp(t,e.is,0,.01,i),i.convertToPath=i.convertStarToPath):i.convertToPath=i.convertPolygonToPath,i.pt=PropertyFactory$1.getProp(t,e.pt,0,0,i),i.p=PropertyFactory$1.getProp(t,e.p,1,0,i),i.r=PropertyFactory$1.getProp(t,e.r,0,degToRads$3,i),i.or=PropertyFactory$1.getProp(t,e.or,0,0,i),i.os=PropertyFactory$1.getProp(t,e.os,0,.01,i),i.localShapeCollection=ob$4.newShapeCollection(),i.localShapeCollection.addShape(i.v),i.paths=i.localShapeCollection,i.dynamicProperties.length?i.k=!0:(i.k=!1,i.convertToPath()),i}return inherits(s,DynamicPropertyContainer),createClass(s,[{key:"getValue",value:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())}},{key:"convertStarToPath",value:function(){var t=2*Math.floor(this.pt.v),e=2*Math.PI/t,i=!0,s=this.or.v,r=this.ir.v,a=this.os.v,n=this.is.v,o=2*Math.PI*s/(2*t),h=2*Math.PI*r/(2*t),p=void 0,l=void 0,c=void 0,u=void 0,f=-Math.PI/2;f+=this.r.v;var d=3===this.data.d?-1:1;for(p=this.v._length=0;ps+i);else{var l=void 0,c=void 0;l=p.s*r<=s?0:(p.s*r-s)/i,c=p.e*r>=s+i?1:(p.e*r-s)/i,n.push([l,c])}return n.length||n.push([0,0]),n}},{key:"releasePathsData",value:function(t){var e=void 0,i=t.length;for(e=0;ee.e){i.c=!1;break}e.s<=p&&e.e>=p+l.addedLength?(this.addSegment(r[a].v[o-1],r[a].o[o-1],r[a].i[o],r[a].v[o],i,c,y),y=!1):(f=bez.getNewSegment(r[a].v[o-1],r[a].v[o],r[a].o[o-1],r[a].i[o],(e.s-p)/l.addedLength,(e.e-p)/l.addedLength,u[o-1]),this.addSegmentFromArray(f,i,c,y),y=!1,i.c=!1),p+=l.addedLength,c+=1}if(r[a].c&&u.length){if(l=u[o-1],p<=e.e){var v=u[o-1].addedLength;e.s<=p&&e.e>=p+v?(this.addSegment(r[a].v[o-1],r[a].o[o-1],r[a].i[0],r[a].v[0],i,c,y),y=!1):(f=bez.getNewSegment(r[a].v[o-1],r[a].v[0],r[a].o[o-1],r[a].i[0],(e.s-p)/v,(e.e-p)/v,u[o-1]),this.addSegmentFromArray(f,i,c,y),y=!1,i.c=!1)}else i.c=!1;p+=l.addedLength,c+=1}if(i._length&&(i.setXYAt(i.v[m][0],i.v[m][1],"i",m),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),p>e.e)break;ae);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s}},{key:"buildFinalText",value:function(t){for(var e=Font.getCombinedCharacterCodes(),i=[],s=0,r=t.length,a=void 0;sthis.minimumFontSize&&A=floor(s)&&(i=t-s<0?1-(s-t):max(0,min(r-t,1))),e(i));return i*this.a.v}},{key:"getValue",value:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,s=this.s.v/e+i,r=this.e.v/e+i;if(r=b.length&&(g=0,b=P[k+=1]?P[k].points:E.v.c?P[k=g=0].points:(y-=m.partialLength,null)),b&&(x=m,_=(m=b[g]).partialLength));O=u[l].an/2-u[l].add,a.translate(-O,0,0)}else O=u[l].an/2-u[l].add,a.translate(-O,0,0),a.translate(-i[0]*u[l].an/200,-i[1]*D/100,0);for(L=0;Lt-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()}},{key:"createItem",value:function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 13:return this.createCamera(t)}return this.createNull(t)}},{key:"createCamera",value:function(){throw new Error("You're using a 3d camera. Try the html renderer.")}},{key:"buildAllItems",value:function(){var t=void 0,e=this.layers.length;for(t=0;ti[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&void 0))}var s,i=(s=[4,4,14],function(t){if(o(s,t.v)&&(r(t.layers),t.assets)){var e=void 0,i=t.assets.length;for(e=0;ethis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,i=void 0,s=e.length,r=t.layers,a=void 0,n=r.length;for(a=0;athis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()}},{key:"renderFrame",value:function(){!1!==this.isLoaded&&this.renderer&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)}},{key:"play",value:function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this._idle&&(this._idle=!1,this.hasTriggerplay=!0,this.trigger("_active")))}},{key:"pause",value:function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"))}},{key:"togglePause",value:function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())}},{key:"stop",value:function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this.setCurrentRawFrameValue(0))}},{key:"goToAndStop",value:function(t,e,i){i&&this.name!==i||(e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier),this.pause())}},{key:"goToAndPlay",value:function(t,e,i){this.goToAndStop(t,e,i),this.play()}},{key:"advanceTime",value:function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,i=!1;e>=this.totalFrames-1&&0=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e%this.totalFrames)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}}},{key:"adjustSegment",value:function(t,e){this.playCount=0,t[1]t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.timeCompleted=this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")}},{key:"setSegment",value:function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(i=e-t)),this.firstFrame=t,this.timeCompleted=this.totalFrames=e-t,-1!==i&&this.goToAndStop(i,!0)}},{key:"playSegments",value:function(t,e){if("object"===_typeof(t[0])){var i=void 0,s=t.length;for(i=0;i