!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SVGA=t()}}((function(){return function t(e,r,i){function n(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var l=r[s]={exports:{}};e[s][0].call(l.exports,(function(t){return n(e[s][1][t]||t)}),l,l.exports,t,e,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s]/g,n=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,o=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,s=/^ *[*/]+ */,a=/^\s*\*?\/*/,u=/\n/g,h=/\s/,l=/\\(.?)/g,f={0:"\0",r:"\r",n:"\n",t:"\t"};function c(t){return t.replace(l,(function(t,e){switch(e){case"\\":case"":return e;default:return f[e]||""}}))}function d(t,e){t=t.toString();var r=0,l=t.length,f=1,d=null,p=null,y=0,m=!1,v=[],g=null;function b(t){return Error("illegal "+t+" (line "+f+")")}function w(e){return t.charAt(e)}function _(r,i){d=t.charAt(r++),y=f,m=!1;var n,o=r-(e?2:3);do{if(--o<0||"\n"===(n=t.charAt(o))){m=!0;break}}while(" "===n||"\t"===n);for(var h=t.substring(r,i).split(u),l=0;l0)return v.shift();if(g)return function(){var e="'"===g?o:n;e.lastIndex=r-1;var i=e.exec(t);if(!i)throw b("string");return r=e.lastIndex,O(g),g=null,c(i[1])}();var s,a,u,d,p;do{if(r===l)return null;for(s=!1;h.test(u=w(r));)if("\n"===u&&++f,++r===l)return null;if("/"===w(r)){if(++r===l)throw b("comment");if("/"===w(r))if(e){if(d=r,p=!1,x(r)){p=!0;do{if((r=k(r))===l)break;r++}while(x(r))}else r=Math.min(l,k(r)+1);p&&_(d,r),f++,s=!0}else{for(p="/"===w(d=r+1);"\n"!==w(++r);)if(r===l)return null;++r,p&&_(d,r-1),++f,s=!0}else{if("*"!==(u=w(r)))return"/";d=r+1,p=e||"*"===w(d);do{if("\n"===u&&++f,++r===l)throw b("comment");a=u,u=w(r)}while("*"!==a||"/"!==u);++r,p&&_(d,r-2),s=!0}}}while(s);var y=r;if(i.lastIndex=0,!i.test(w(y++)))for(;y "+t.len)}function a(t){this.buf=t,this.pos=0,this.len=t.length}var u,h="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new a(t);if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer)return new a(new Uint8Array(t));throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new a(t);throw Error("illegal buffer")};function l(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw s(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw s(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function f(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw s(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}a.create=o.Buffer?function(t){return(a.create=function(t){return o.Buffer.isBuffer(t)?new(void 0)(t):h(t)})(t)}:h,a.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,a.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return u}),a.prototype.int32=function(){return 0|this.uint32()},a.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},a.prototype.bool=function(){return 0!==this.uint32()},a.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},a.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},a.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw s(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},a.prototype.string=function(){var t=this.bytes();return n.read(t,0,t.length)},a.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw s(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},a.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},a._configure=function(){i=t(12),n=t(30);var e=o.Long?"toLong":"toNumber";o.merge(a.prototype,{int64:function(){return l.call(this)[e](!1)},uint64:function(){return l.call(this)[e](!0)},sint64:function(){return l.call(this).zzDecode()[e](!1)},fixed64:function(){return c.call(this)[e](!0)},sfixed64:function(){return c.call(this)[e](!1)}})}},{12:12,30:30,31:31}],32:[function(t,e,r){"use strict";var i,n;function o(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function s(t,e,r,s){var a=s.types;if(t.resolvedType)if(t.resolvedType instanceof i){if(Object.keys(t.resolvedType.values).indexOf(r)<0)return o(t,"enum value")}else{var u=a[e].verify(r);if(u)return t.name+"."+u}else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(!n.isInteger(r))return o(t,"integer");break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(!(n.isInteger(r)||r&&n.isInteger(r.low)&&n.isInteger(r.high)))return o(t,"integer|Long");break;case"float":case"double":if("number"!=typeof r)return o(t,"number");break;case"bool":if("boolean"!=typeof r)return o(t,"boolean");break;case"string":if(!n.isString(r))return o(t,"string");break;case"bytes":if(!(r&&"number"==typeof r.length||n.isString(r)))return o(t,"buffer")}}function a(t,e){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(!n.key32Re.test(e))return o(t,"integer key");break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(!n.key64Re.test(e))return o(t,"integer|Long key");break;case"bool":if(!n.key2Re.test(e))return o(t,"boolean key")}}function u(t){return function(e){return function(r){var i;if("object"!=typeof r||null===r)return"object expected";var u,h={};t.oneofsArray.length&&(u={});for(var l=0;l");var i=R();if(!_.test(i))throw z(i,"name");B("=");var n=new a(L(i),q(R()),e,r);W(n,(function(t){if("option"!==t)throw z(t);G(n,t),B(";")}),(function(){tt(n)})),t.add(n)}(r);break;case"required":case"optional":case"repeated":X(r,t);break;case"oneof":!function(t,e){if(!_.test(e=R()))throw z(e,"name");var r=new u(L(e));W(r,(function(t){"option"===t?(G(r,t),B(";")):(F(t),X(r,"optional"))})),t.add(r)}(r,t);break;case"extensions":U(r.extensions||(r.extensions=[]));break;case"reserved":U(r.reserved||(r.reserved=[]),!0);break;default:if(!M||!x.test(t))throw z(t);F(t),X(r,"optional")}})),t.add(r)}(t,e),!0;case"enum":return function(t,e){if(!_.test(e=R()))throw z(e,"name");var r=new h(e);W(r,(function(t){switch(t){case"option":G(r,t),B(";");break;case"reserved":U(r.reserved||(r.reserved=[]),!0);break;default:!function(t,e){if(!_.test(e))throw z(e,"name");B("=");var r=q(R(),!0),i={};W(i,(function(t){if("option"!==t)throw z(t);G(i,t),B(";")}),(function(){tt(i)})),t.add(e,r,i.comment)}(r,t)}})),t.add(r)}(t,e),!0;case"service":return function(t,e){if(!_.test(e=R()))throw z(e,"service name");var r=new l(e);W(r,(function(t){if(!H(r,t)){if("rpc"!==t)throw z(t);!function(t,e){var r=e;if(!_.test(e=R()))throw z(e,"name");var i,n,o,s,a=e;if(B("("),B("stream",!0)&&(n=!0),!x.test(e=R()))throw z(e);if(i=e,B(")"),B("returns"),B("("),B("stream",!0)&&(s=!0),!x.test(e=R()))throw z(e);o=e,B(")");var u=new f(a,r,i,o,n,s);W(u,(function(t){if("option"!==t)throw z(t);G(u,t),B(";")})),t.add(u)}(r,t)}})),t.add(r)}(t,e),!0;case"extend":return function(t,e){if(!x.test(e=R()))throw z(e,"reference");var r=e;W(null,(function(e){switch(e){case"required":case"repeated":case"optional":X(t,e,r);break;default:if(!M||!x.test(e))throw z(e);F(e),X(t,"optional",r)}}))}(t,e),!0}return!1}function W(t,e,r){var i=j.line;if(t&&(t.comment=P(),t.filename=A.filename),B("{",!0)){for(var n;"}"!==(n=R());)e(n);B(";",!0)}else r&&r(),B(";"),t&&"string"!=typeof t.comment&&(t.comment=P(i))}function X(t,e,r){var i=R();if("group"!==i){if(!x.test(i))throw z(i,"type");var n=R();if(!_.test(n))throw z(n,"name");n=L(n),B("=");var a=new s(n,q(R()),i,e,r);W(a,(function(t){if("option"!==t)throw z(t);G(a,t),B(";")}),(function(){tt(a)})),t.add(a),M||!a.repeated||void 0===c.packed[i]&&void 0!==c.basic[i]||a.setOption("packed",!1,!0)}else!function(t,e){var r=R();if(!_.test(r))throw z(r,"name");var i=d.lcFirst(r);r===i&&(r=d.ucFirst(r)),B("=");var n=q(R()),a=new o(r);a.group=!0;var u=new s(i,n,r,e);u.filename=A.filename,W(a,(function(t){switch(t){case"option":G(a,t),B(";");break;case"required":case"optional":case"repeated":X(a,t);break;default:throw z(t)}})),t.add(a).add(u)}(t,e)}function G(t,e){var r=B("(",!0);if(!x.test(e=R()))throw z(e,"name");var i=e;r&&(B(")"),i="("+i+")",e=I(),k.test(e)&&(i+=e,R())),B("="),Y(t,i)}function Y(t,e){if(B("{",!0))do{if(!_.test(T=R()))throw z(T,"name");"{"===I()?Y(t,e+"."+T):(B(":"),"{"===I()?Y(t,e+"."+T):Q(t,e+"."+T,Z(!0)))}while(!B("}",!0));else Q(t,e,Z(!0))}function Q(t,e,r){t.setOption&&t.setOption(e,r)}function tt(t){if(B("[",!0)){do{G(t,"option")}while(B(",",!0));B("]")}return t}for(;null!==(T=R());)switch(T){case"package":if(!C)throw z(T);J();break;case"import":if(!C)throw z(T);$();break;case"syntax":if(!C)throw z(T);K();break;case"option":if(!C)throw z(T);G(D,T),B(";");break;default:if(H(D,T)){C=!1;continue}throw z(T)}return A.filename=null,{package:O,imports:S,weakImports:E,syntax:N,root:e}}A._configure=function(){i=t(27),n=t(23),o=t(28),s=t(9),a=t(13),u=t(18),h=t(8),l=t(26),f=t(15),c=t(29),d=t(31)}},{13:13,15:15,18:18,23:23,26:26,27:27,28:28,29:29,31:31,8:8,9:9}],17:[function(t,e,r){"use strict";var i,n;function o(t,e){if(!i.isString(t))throw TypeError("name must be a string");if(e&&!i.isObject(e))throw TypeError("options must be an object");this.options=e,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}e.exports=o,o.className="ReflectionObject",Object.defineProperties(o.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof n&&e._handleAdd(this)},o.prototype.onRemove=function(t){var e=t.root;e instanceof n&&e._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},o.prototype.getOption=function(t){if(this.options)return this.options[t]},o.prototype.setOption=function(t,e,r){return r&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=e),this},o.prototype.setOptions=function(t,e){if(t)for(var r=Object.keys(t),i=0;i=e)return!0;return!1},l.isReservedName=function(t,e){if(t)for(var r=0;r0;){var i=t.shift();if(r.nested&&r.nested[i]){if(!((r=r.nested[i])instanceof l))throw Error("path conflicts with non-namespace objects")}else r.add(r=new l(i))}return e&&r.addJSON(e),r},l.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e-1)return i}else if(i instanceof l&&(i=i.lookup(t.slice(1),e,!0)))return i}else for(var n=0;n-1||(n.names.push(t),t in s&&h(t,s[t]))}h(a.name,a.pbJsonStr)},f.prototype.load=function t(e,r,i){"function"==typeof r&&(i=r,r=void 0);var n=this;if(!i)return l.asPromise(t,n,e,r);var a=i===c;function u(t,e){if(i){var r=i;if(i=null,a)throw t;r(t,e)}}function h(t,e){try{if(l.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),l.isString(e)){o.filename=t;var i,s=o(e,n,r),h=0;if(s.imports)for(;h-1){var o=t.substring(r);o in s&&(t=o)}if(!(n.files.indexOf(t)>-1))if(n.files.push(t),t in s)a?h(t,s[t]):(++d,setTimeout((function(){--d,h(t,s[t])})));else if(a){var f;try{f=l.fs.readFileSync(t).toString("utf8")}catch(c){return void(e||u(c))}h(t,f)}else++d,l.fetch(t,(function(r,o){--d,i&&(r?e?d||u(null,n):u(r):h(t,o))}))}var d=0;l.isString(e)&&(e=[e]);for(var p,y=0;y-1&&this.deferred.splice(e,1)}}else if(t instanceof u)d.test(t.name)&&delete t.parent[t.name];else if(t instanceof i){for(var r=0;r-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}}}(this._oneofsArray[r].oneof);i[n]={get:s.getter,set:s.setter}}r&&Object.defineProperties(t.prototype,i)}}}),m.generateConstructor=function(t){return function(e){for(var r,i=0;i-1&&this.oneof.splice(e,1),t.partOf=null,this},s.prototype.onAdd=function(t){o.prototype.onAdd.call(this,t);for(var e=0;e>>3,y=0,m=!1;y>>0:s[r]=a[r]>>>0;break;case"int32":case"sint32":case"sfixed32":l?s[r][h]=0|a[r][h]:s[r]=0|a[r];break;case"uint64":y=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":n.Long?l?s[r][h]=n.Long.fromValue(a[r][h]).unsigned=y:s[r]=n.Long.fromValue(a[r]).unsigned=y:"string"==typeof(l?a[r][h]:a[r])?l?s[r][h]=parseInt(a[r][h],10):s[r]=parseInt(a[r],10):"number"==typeof(l?a[r][h]:a[r])?l?s[r][h]=a[r][h]:s[r]=a[r]:"object"==typeof(l?a[r][h]:a[r])&&(l?s[r][h]=new n.LongBits(a[r][h].low>>>0,a[r][h].high>>>0).toNumber(y):s[r]=new n.LongBits(a[r].low>>>0,a[r].high>>>0).toNumber(y));break;case"bytes":"string"==typeof(l?a[r][h]:a[r])?l?n.base64.decode(a[r][h],s[r][h]=n.newBuffer(n.base64.length(a[r][h])),0):n.base64.decode(a[r],s[r]=n.newBuffer(n.base64.length(a[r])),0):(l?a[r][h]:a[r]).length&&(l?s[r][h]=a[r][h]:s[r]=a[r]);break;case"string":l?s[r][h]=String(a[r][h]):s[r]=String(a[r]);break;case"bool":l?s[r][h]=Boolean(a[r][h]):s[r]=Boolean(a[r])}}}function a(t,e,r,o){var s=o.m,a=o.d,u=o.types,h=o.ksi,l=o.o,f=void 0!==h;if(t.resolvedType)t.resolvedType instanceof i?f?a[r][h]=l.enums===String?u[e].values[s[r][h]]:s[r][h]:a[r]=l.enums===String?u[e].values[s[r]]:s[r]:f?a[r][h]=u[e].toObject(s[r][h],l):a[r]=u[e].toObject(s[r],l);else{var c=!1;switch(t.type){case"double":case"float":f?a[r][h]=l.json&&!isFinite(s[r][h])?String(s[r][h]):s[r][h]:a[r]=l.json&&!isFinite(s[r])?String(s[r]):s[r];break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":"number"==typeof s[r][h]?f?a[r][h]=l.longs===String?String(s[r][h]):s[r][h]:a[r]=l.longs===String?String(s[r]):s[r]:f?a[r][h]=l.longs===String?n.Long.prototype.toString.call(s[r][h]):l.longs===Number?new n.LongBits(s[r][h].low>>>0,s[r][h].high>>>0).toNumber(c):s[r][h]:a[r]=l.longs===String?n.Long.prototype.toString.call(s[r]):l.longs===Number?new n.LongBits(s[r].low>>>0,s[r].high>>>0).toNumber(c):s[r];break;case"bytes":f?a[r][h]=l.bytes===String?n.base64.encode(s[r][h],0,s[r][h].length):l.bytes===Array?Array.prototype.slice.call(s[r][h]):s[r][h]:a[r]=l.bytes===String?n.base64.encode(s[r],0,s[r].length):l.bytes===Array?Array.prototype.slice.call(s[r]):s[r];break;default:f?a[r][h]=s[r][h]:a[r]=s[r]}}}o._configure=function(){i=t(8),n=t(31)},o.fromObject=function(t){var e=t.fieldsArray;return function(t){return function(r){if(r instanceof this.ctor)return r;if(!e.length)return new this.ctor;for(var o=new this.ctor,a=0;a>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function d(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}h.create=n.Buffer?function(){return(h.create=function(){return new(void 0)})()}:function(){return new h},h.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(h.alloc=n.pool(h.alloc,n.Array.prototype.subarray)),h.prototype._push=function(t,e,r){return this.tail=this.tail.next=new s(t,e,r),this.len+=e,this},f.prototype=Object.create(s.prototype),f.prototype.fn=function(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t},h.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},h.prototype.int32=function(t){return t<0?this._push(c,10,i.fromNumber(t)):this.uint32(t)},h.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},h.prototype.uint64=function(t){var e=i.from(t);return this._push(c,e.length(),e)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(c,e.length(),e)},h.prototype.bool=function(t){return this._push(l,1,t?1:0)},h.prototype.fixed32=function(t){return this._push(d,4,t>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(t){var e=i.from(t);return this._push(d,4,e.lo)._push(d,4,e.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(t){return this._push(n.float.writeFloatLE,4,t)},h.prototype.double=function(t){return this._push(n.float.writeDoubleLE,8,t)};var p=n.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var i=0;i>>0;if(!e)return this._push(l,1,0);if(n.isString(t)){var r=h.alloc(e=o.length(t));o.write(t,r,0),t=r}return this.uint32(e)._push(p,e,t)},h.prototype.string=function(t){var e=o.length(t);return e?this.uint32(e)._push(o.write,e,t):this._push(l,1,0)},h.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new s(a,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(a,0,0),this.len=0),this},h.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},h.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},h._configure=function(){i=t(12),t(4),o=t(30)}},{12:12,30:30,31:31,4:4}],31:[function(t,e,r){"use strict";var i=e.exports,n=t(24);i.LongBits=t(12),i.Long=t(11),i.pool=t(21),i.float=t(10),i.asPromise=t(3),i.EventEmitter=t(2),i.path=t(20),i.base64=t(4),i.utf8=t(30),i.compareFieldsById=function(t,e){return t.id-e.id},i.toArray=function(t){if(t){for(var e=Object.keys(t),r=new Array(e.length),i=0;i-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},i.oneOfSetter=function(t){return function(e){for(var r=0;r=65536&&r<=1114111?(i.push(r>>18&7|240),i.push(r>>12&63|128),i.push(r>>6&63|128),i.push(63&r|128)):r>=2048&&r<=65535?(i.push(r>>12&15|224),i.push(r>>6&63|128),i.push(63&r|128)):r>=128&&r<=2047?(i.push(r>>6&31|192),i.push(63&r|128)):i.push(255&r);return i},i.byteToString=function(t){if("string"==typeof t)return t;for(var e="",r=t,i=0;i1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var n=new Array(64),o=new Array(123),s=0;s<64;)o[n[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(t,e,r){for(var i,o=null,s=[],a=0,u=0;e>2],i=(3&h)<<4,u=1;break;case 1:s[a++]=n[i|h>>4],i=(15&h)<<2,u=2;break;case 2:s[a++]=n[i|h>>6],s[a++]=n[63&h],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=n[i],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))},i.decode=function(t,e,r){for(var i,n=r,s=0,a=0;a1)break;if(void 0===(u=o[u]))throw Error("invalid encoding");switch(s){case 0:i=u,s=1;break;case 1:e[r++]=i<<2|(48&u)>>4,i=u,s=2;break;case 2:e[r++]=(15&i)<<4|(60&u)>>2,i=u,s=3;break;case 3:e[r++]=(3&i)<<6|u,s=0}}if(1===s)throw Error("invalid encoding");return r-n},i.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],10:[function(t,e,r){"use strict";function i(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),i=128===r[3];function n(t,i,n){e[0]=t,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3]}function o(t,i,n){e[0]=t,i[n]=r[3],i[n+1]=r[2],i[n+2]=r[1],i[n+3]=r[0]}function s(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],e[0]}function a(t,i){return r[3]=t[i],r[2]=t[i+1],r[1]=t[i+2],r[0]=t[i+3],e[0]}t.writeFloatLE=i?n:o,t.writeFloatBE=i?o:n,t.readFloatLE=i?s:a,t.readFloatBE=i?a:s}():function(){function e(t,e,r,i){var n=e<0?1:0;if(n&&(e=-e),0===e)t(1/e>0?0:2147483648,r,i);else if(isNaN(e))t(2143289344,r,i);else if(e>34028234663852886e22)t((n<<31|2139095040)>>>0,r,i);else if(e<11754943508222875e-54)t((n<<31|Math.round(e/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(e)/Math.LN2);t((n<<31|o+127<<23|8388607&Math.round(e*Math.pow(2,-o)*8388608))>>>0,r,i)}}function r(t,e,r){var i=t(e,r),n=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:n*(1/0):0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}t.writeFloatLE=e.bind(null,n),t.writeFloatBE=e.bind(null,o),t.readFloatLE=r.bind(null,s),t.readFloatBE=r.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),i=128===r[7];function n(t,i,n){e[0]=t,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(t,i,n){e[0]=t,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function s(t,i){return r[0]=t[i],r[1]=t[i+1],r[2]=t[i+2],r[3]=t[i+3],r[4]=t[i+4],r[5]=t[i+5],r[6]=t[i+6],r[7]=t[i+7],e[0]}function a(t,i){return r[7]=t[i],r[6]=t[i+1],r[5]=t[i+2],r[4]=t[i+3],r[3]=t[i+4],r[2]=t[i+5],r[1]=t[i+6],r[0]=t[i+7],e[0]}t.writeDoubleLE=i?n:o,t.writeDoubleBE=i?o:n,t.readDoubleLE=i?s:a,t.readDoubleBE=i?a:s}():function(){function e(t,e,r,i,n,o){var s=i<0?1:0;if(s&&(i=-i),0===i)t(0,n,o+e),t(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))t(0,n,o+e),t(2146959360,n,o+r);else if(i>17976931348623157e292)t(0,n,o+e),t((s<<31|2146435072)>>>0,n,o+r);else{var a;if(i<22250738585072014e-324)t((a=i/5e-324)>>>0,n,o+e),t((s<<31|a/4294967296)>>>0,n,o+r);else{var u=Math.floor(Math.log(i)/Math.LN2);1024===u&&(u=1023),t(4503599627370496*(a=i*Math.pow(2,-u))>>>0,n,o+e),t((s<<31|u+1023<<20|1048576*a&1048575)>>>0,n,o+r)}}}function r(t,e,r,i,n){var o=t(i,n+e),s=t(i,n+r),a=2*(s>>31)+1,u=s>>>20&2047,h=4294967296*(1048575&s)+o;return 2047===u?h?NaN:a*(1/0):0===u?5e-324*a*h:a*Math.pow(2,u-1075)*(h+4503599627370496)}t.writeDoubleLE=e.bind(null,n,0,4),t.writeDoubleBE=e.bind(null,o,4,0),t.readDoubleLE=r.bind(null,s,0,4),t.readDoubleBE=r.bind(null,a,4,0)}(),t}function n(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function o(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function a(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}e.exports=i(i)},{}],11:[function(t,e,r){"use strict";e.exports=n;var i=null;try{i=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(E){}function n(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function o(t){return!0===(t&&t.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=o;var s={},a={};function u(t,e){var r,i,n;return e?(n=0<=(t>>>=0)&&t<256)&&(i=a[t])?i:(r=l(t,(0|t)<0?-1:0,!0),n&&(a[t]=r),r):(n=-128<=(t|=0)&&t<128)&&(i=s[t])?i:(r=l(t,t<0?-1:0,!1),n&&(s[t]=r),r)}function h(t,e){if(isNaN(t))return e?b:g;if(e){if(t<0)return b;if(t>=y)return A}else{if(t<=-m)return O;if(t+1>=m)return k}return t<0?h(-t,e).neg():l(t%p|0,t/p|0,e)}function l(t,e,r){return new n(t,e,r)}n.fromInt=u,n.fromNumber=h,n.fromBits=l;var f=Math.pow;function c(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return g;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||360)throw Error("interior hyphen");if(0===i)return c(t.substring(1),e,r).neg();for(var n=h(f(r,8)),o=g,s=0;s>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},S.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((o=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(O)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},S.isOdd=function(){return 1==(1&this.low)},S.isEven=function(){return 0==(1&this.low)},S.equals=function(t){return o(t)||(t=d(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(t){if(o(t)||(t=d(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(O)?O:this.not().add(w)},S.neg=S.negate,S.add=function(t){o(t)||(t=d(t));var e=this.high>>>16,r=65535&this.high,i=this.low>>>16,n=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,h=0,f=0,c=0,p=0;return c+=(p+=n+(65535&t.low))>>>16,f+=(c+=i+u)>>>16,h+=(f+=r+a)>>>16,h+=e+s,l((c&=65535)<<16|(p&=65535),(h&=65535)<<16|(f&=65535),this.unsigned)},S.subtract=function(t){return o(t)||(t=d(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return g;if(o(t)||(t=d(t)),i)return l(i.mul(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned);if(t.isZero())return g;if(this.eq(O))return t.isOdd()?O:g;if(t.eq(O))return this.isOdd()?O:g;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))return h(this.toNumber()*t.toNumber(),this.unsigned);var e=this.high>>>16,r=65535&this.high,n=this.low>>>16,s=65535&this.low,a=t.high>>>16,u=65535&t.high,f=t.low>>>16,c=65535&t.low,p=0,y=0,m=0,b=0;return m+=(b+=s*c)>>>16,y+=(m+=n*c)>>>16,m&=65535,y+=(m+=s*f)>>>16,p+=(y+=r*c)>>>16,y&=65535,p+=(y+=n*f)>>>16,y&=65535,p+=(y+=s*u)>>>16,p+=e*c+r*f+n*u+s*a,l((m&=65535)<<16|(b&=65535),(p&=65535)<<16|(y&=65535),this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(o(t)||(t=d(t)),t.isZero())throw Error("division by zero");var e,r,n;if(i)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?l((this.unsigned?i.div_u:i.div_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?b:g;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return b;if(t.gt(this.shru(1)))return _;n=b}else{if(this.eq(O))return t.eq(w)||t.eq(x)?O:t.eq(O)?w:(e=this.shr(1).div(t).shl(1)).eq(g)?t.isNegative()?w:x:(r=this.sub(t.mul(e)),n=e.add(r.div(t)));if(t.eq(O))return this.unsigned?b:g;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();n=g}for(r=this;r.gte(t);){e=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(e)/Math.LN2),a=s<=48?1:f(2,s-48),u=h(e),c=u.mul(t);c.isNegative()||c.gt(r);)c=(u=h(e-=a,this.unsigned)).mul(t);u.isZero()&&(u=w),n=n.add(u),r=r.sub(c)}return n},S.div=S.divide,S.modulo=function(t){return o(t)||(t=d(t)),i?l((this.unsigned?i.rem_u:i.rem_s)(this.low,this.high,t.low,t.high),i.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return l(~this.low,~this.high,this.unsigned)},S.and=function(t){return o(t)||(t=d(t)),l(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return o(t)||(t=d(t)),l(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return o(t)||(t=d(t)),l(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return o(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low<>>32-t,this.unsigned):l(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):l(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){if(o(t)&&(t=t.toInt()),0==(t&=63))return this;var e=this.high;return t<32?l(this.low>>>t|e<<32-t,e>>>t,this.unsigned):l(32===t?e:e>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},S.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},n.fromBytes=function(t,e,r){return r?n.fromBytesLE(t,e):n.fromBytesBE(t,e)},n.fromBytesLE=function(t,e){return new n(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},n.fromBytesBE=function(t,e){return new n(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},{}],12:[function(t,e,r){"use strict";function i(t,e){this.lo=t>>>0,this.hi=e>>>0}e.exports=i;var n=i.zero=new i(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var o=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return n;var e=t<0;e&&(t=-t);var r=t>>>0,o=(t-r)/4294967296>>>0;return e&&(o=~o>>>0,r=~r>>>0,++r>4294967295&&(r=0,++o>4294967295&&(o=0))),new i(r,o)},i.from=function(t){return"number"==typeof t?i.fromNumber(t):"string"==typeof t||t instanceof String?i.fromNumber(parseInt(t,10)):t.low||t.high?new i(t.low>>>0,t.high>>>0):n},i.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(t){return{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var s=String.prototype.charCodeAt;i.fromHash=function(t){return t===o?n:new i((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},i.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},i.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},{}],20:[function(t,e,r){"use strict";var i=e.exports,n=i.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},o=i.normalize=function(t){var e=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(t),i="";r&&(i=e.shift()+"/");for(var o=0;o0&&".."!==e[o-1]?e.splice(--o,2):r?e.splice(o,1):++o:"."===e[o]?e.splice(o,1):++o;return i+e.join("/")};i.resolve=function(t,e,r){return r||(e=o(e)),n(e)?e:(r||(t=o(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?o(t+"/"+e):e)}},{}],21:[function(t,e,r){"use strict";e.exports=function(t,e,r){var i=r||8192,n=i>>>1,o=null,s=i;return function(r){if(r<1||r>n)return t(r);s+r>i&&(o=t(i),s=0);var a=e.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},{}],30:[function(t,e,r){"use strict";var i=e.exports;i.length=function(t){for(var e=0,r=0,i=0;i191&&i<224?o[s++]=(31&i)<<6|63&t[e++]:i>239&&i<365?(i=((7&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,o[s++]=55296+(i>>10),o[s++]=56320+(1023&i)):o[s++]=(15&i)<<12|(63&t[e++])<<6|63&t[e++],s>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),s=0);return n?(s&&n.push(String.fromCharCode.apply(String,o.slice(0,s))),n.join("")):String.fromCharCode.apply(String,o.slice(0,s))},i.write=function(t,e,r){for(var i,n,o=r,s=0;s>6|192,e[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=t.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&n),++s,e[r++]=i>>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128);return r-o}},{}],35:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getMiniBridge=void 0,r.getMiniBridge=function(){return"undefined"==typeof wx&&"undefined"!=typeof my?my:wx}},{}],36:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BezierPath=void 0;var i=function(t,e,r){this.d=t,this.transform=e,this.styles=r,this._d=t,this._transform=e,this._styles=r};r.BezierPath=i},{}],37:[function(t,e,r){"use strict";var i,n=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.EllipsePath=void 0;var o=function(t){function e(e,r,i,n,o,s){var a=t.call(this,"",o,s)||this;return a._x=e,a._y=r,a._radiusX=i,a._radiusY=n,a._transform=o,a._styles=s,a}return n(e,t),e}(t(36).BezierPath);r.EllipsePath=o},{36:36}],38:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FrameEntity=void 0;var i=t(36),n=function t(e){this.alpha=0,this.transform={a:1,b:0,c:0,d:1,tx:0,ty:0},this.layout={x:0,y:0,width:0,height:0},this.nx=0,this.ny=0,this.shapes=[],this.alpha=parseFloat(e.alpha)||0,e.layout&&(this.layout.x=parseFloat(e.layout.x)||0,this.layout.y=parseFloat(e.layout.y)||0,this.layout.width=parseFloat(e.layout.width)||0,this.layout.height=parseFloat(e.layout.height)||0),e.transform&&(this.transform.a=parseFloat(e.transform.a)||1,this.transform.b=parseFloat(e.transform.b)||0,this.transform.c=parseFloat(e.transform.c)||0,this.transform.d=parseFloat(e.transform.d)||1,this.transform.tx=parseFloat(e.transform.tx)||0,this.transform.ty=parseFloat(e.transform.ty)||0),e.clipPath&&e.clipPath.length>0&&(this.maskPath=new i.BezierPath(e.clipPath,void 0,{fill:"#000000"})),e.shapes&&(e.shapes instanceof Array&&e.shapes.forEach((function(t){switch(t.pathArgs=t.args,t.type){case 0:t.type="shape",t.pathArgs=t.shape;break;case 1:t.type="rect",t.pathArgs=t.rect;break;case 2:t.type="ellipse",t.pathArgs=t.ellipse;break;case 3:t.type="keep"}if(t.styles){t.styles.fill&&("number"==typeof t.styles.fill.r&&(t.styles.fill[0]=t.styles.fill.r),"number"==typeof t.styles.fill.g&&(t.styles.fill[1]=t.styles.fill.g),"number"==typeof t.styles.fill.b&&(t.styles.fill[2]=t.styles.fill.b),"number"==typeof t.styles.fill.a&&(t.styles.fill[3]=t.styles.fill.a)),t.styles.stroke&&("number"==typeof t.styles.stroke.r&&(t.styles.stroke[0]=t.styles.stroke.r),"number"==typeof t.styles.stroke.g&&(t.styles.stroke[1]=t.styles.stroke.g),"number"==typeof t.styles.stroke.b&&(t.styles.stroke[2]=t.styles.stroke.b),"number"==typeof t.styles.stroke.a&&(t.styles.stroke[3]=t.styles.stroke.a));var e=t.styles.lineDash||[];switch(t.styles.lineDashI>0&&e.push(t.styles.lineDashI),t.styles.lineDashII>0&&(e.length<1&&e.push(0),e.push(t.styles.lineDashII),e.push(0)),t.styles.lineDashIII>0&&(e.length<2&&(e.push(0),e.push(0)),e[2]=t.styles.lineDashIII),t.styles.lineDash=e,t.styles.lineJoin){case 0:t.styles.lineJoin="miter";break;case 1:t.styles.lineJoin="round";break;case 2:t.styles.lineJoin="bevel"}switch(t.styles.lineCap){case 0:t.styles.lineCap="butt";break;case 1:t.styles.lineCap="round";break;case 2:t.styles.lineCap="square"}}})),e.shapes[0]&&"keep"===e.shapes[0].type?this.shapes=t.lastShapes:(this.shapes=e.shapes,t.lastShapes=e.shapes));var r=this.transform.a*this.layout.x+this.transform.c*this.layout.y+this.transform.tx,n=this.transform.a*(this.layout.x+this.layout.width)+this.transform.c*this.layout.y+this.transform.tx,o=this.transform.a*this.layout.x+this.transform.c*(this.layout.y+this.layout.height)+this.transform.tx,s=this.transform.a*(this.layout.x+this.layout.width)+this.transform.c*(this.layout.y+this.layout.height)+this.transform.tx,a=this.transform.b*this.layout.x+this.transform.d*this.layout.y+this.transform.ty,u=this.transform.b*(this.layout.x+this.layout.width)+this.transform.d*this.layout.y+this.transform.ty,h=this.transform.b*this.layout.x+this.transform.d*(this.layout.y+this.layout.height)+this.transform.ty,l=this.transform.b*(this.layout.x+this.layout.width)+this.transform.d*(this.layout.y+this.layout.height)+this.transform.ty;this.nx=Math.min(Math.min(o,s),Math.min(r,n)),this.ny=Math.min(Math.min(h,l),Math.min(a,u))};r.FrameEntity=n},{36:36}],39:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Player=r.Parser=void 0;var i=t(41),n=t(42);r.Parser=i.Parser,r.Player=n.Player},{41:41,42:42}],42:[function(t,e,r){"use strict";var i=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))((function(n,o){function s(t){try{u(i.next(t))}catch(e){o(e)}}function a(t){try{u(i.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(n=(n=s.trys).length>0&&n[n.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=r.frames||t<0||(this.pauseAnimation(),this._currentFrame=t,this._update(),e&&this._doStart(void 0,!1,this._currentFrame)))},t.prototype.stepToPercentage=function(t,e){void 0===e&&(e=!1);var r=this._videoItem;if(r){var i=t*r.frames;i>=r.frames&&i>0&&(i=r.frames-1),this.stepToFrame(i,e)}},t.prototype.setImage=function(t,e){return i(this,void 0,void 0,(function(){var r;return n(this,(function(i){switch(i.label){case 0:return[4,this.loadWXImage(t)];case 1:return r=i.sent(),this._dynamicImage[e]=r,[2]}}))}))},t.prototype.setText=function(t,e){this._dynamicText[e]=t},t.prototype.clearDynamicObjects=function(){this._dynamicImage={},this._dynamicText={}},t.prototype.onFinished=function(t){this._onFinished=t},t.prototype.onFrame=function(t){this._onFrame=t},t.prototype.onPercentage=function(t){this._onPercentage=t},t.prototype._doStart=function(t,e,r){var i=this;void 0===e&&(e=!1),void 0===r&&(r=0);var n=this._videoItem;n&&(this._animator=new s.ValueAnimator,this._animator.canvas=this.canvas,void 0!==t?(this._animator.startValue=Math.max(0,t.location),this._animator.endValue=Math.min(n.frames-1,t.location+t.length),this._animator.duration=(this._animator.endValue-this._animator.startValue+1)*(1/n.FPS)*1e3):(this._animator.startValue=0,this._animator.endValue=n.frames-1,this._animator.duration=n.frames*(1/n.FPS)*1e3),this._animator.loops=this.loops<=0?1/0:this.loops,this._animator.fillRule="Backward"===this.fillMode?1:0,this._animator.onUpdate=function(t){i._currentFrame!==Math.floor(t)&&(i._forwardAnimating&&(i._currentFrame,Math.floor(t)),i._currentFrame=Math.floor(t),i._update(),"function"==typeof i._onFrame&&i._onFrame(i._currentFrame),"function"==typeof i._onPercentage&&i._onPercentage((i._currentFrame+1)/n.frames))},this._animator.onEnd=function(){i._forwardAnimating=!1,!0===i.clearsAfterStop&&i.clear(),"function"==typeof i._onFinished&&i._onFinished()},!0===e?(this._animator.reverse(r),this._forwardAnimating=!1):(this._animator.start(r),this._forwardAnimating=!0),this._currentFrame=this._animator.startValue,this._update())},t.prototype._resize=function(){var t=this.ctx,e=this._videoItem;if(t&&e){var r=1,i=1,n=0,o=0,s=this.canvas.width,a=this.canvas.height,u=e.videoSize;if("Fill"===this._contentMode)r=s/u.width,i=a/u.height;else if("AspectFit"===this._contentMode||"AspectFill"===this._contentMode){var h=u.width/u.height,l=s/a;h>=l&&"AspectFit"===this._contentMode||h<=l&&"AspectFill"===this._contentMode?(r=i=s/u.width,o=(a-u.height*i)/2):(hl&&"AspectFill"===this._contentMode)&&(r=i=a/u.height,n=(s-u.width*r)/2)}this._renderer&&(this._renderer.globalTransform={a:r,b:0,c:0,d:i,tx:n,ty:o})}},t.prototype._update=function(){this._resize(),this._renderer&&(this._renderer._dynamicImage=this._dynamicImage,this._renderer._dynamicText=this._dynamicText,this._renderer.drawFrame(this._currentFrame),this._renderer.playAudio(this._currentFrame))},t}();r.Player=u},{35:35,45:45,47:47}],41:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Parser=void 0;var i=t(48),n=t(35),o=t(40).inflate,s=t(43).ProtoMovieEntity,a=n.getMiniBridge(),u=function(){function t(){}return t.prototype.load=function(t){return new Promise((function(e,r){0===t.indexOf("http://")||0===t.indexOf("https://")?a.request({url:t,dataType:"arraybuffer",responseType:"arraybuffer",success:function(t){try{var n=o(t.data),a=s.decode(n);e(new i.VideoEntity(a))}catch(u){r(u)}},fail:function(t){r(t)}}):a.getFileSystemManager().readFile({filePath:t,success:function(t){try{var n=o(t.data),a=s.decode(n);e(new i.VideoEntity(a))}catch(u){r(u)}},fail:function(t){r(t)}})}))},t}();r.Parser=u},{35:35,40:40,43:43,48:48}],40:[function(t,e,r){"use strict";var i;i=this,function(t){var e=function(t,e,r,i){for(var n=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(n=n+e[i++]|0)|0}while(--s);n%=65521,o%=65521}return n|o<<16|0},r=new Uint32Array(function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}()),i=function(t,e,i,n){var o=r,s=n+i;t^=-1;for(var a=n;a>>8^o[255&(t^e[a])];return-1^t},n=function(t,e){var r,i,n,o,s,a,u,h,l,f,c,d,p,y,m,v,g,b,w,_,x,k,A,O,S=t.state;r=t.next_in,A=t.input,i=r+(t.avail_in-5),n=t.next_out,O=t.output,o=n-(e-t.avail_out),s=n+(t.avail_out-257),a=S.dmax,u=S.wsize,h=S.whave,l=S.wnext,f=S.window,c=S.hold,d=S.bits,p=S.lencode,y=S.distcode,m=(1<>>=b=g>>>24,d-=b,0==(b=g>>>16&255))O[n++]=65535&g;else{if(!(16&b)){if(0==(64&b)){g=p[(65535&g)+(c&(1<>>=b,d-=b),d<15&&(c+=A[r++]<>>=b=g>>>24,d-=b,!(16&(b=g>>>16&255))){if(0==(64&b)){g=y[(65535&g)+(c&(1<a){t.msg="invalid distance too far back",S.mode=30;break t}if(c>>>=b,d-=b,_>(b=n-o)){if((b=_-b)>h&&S.sane){t.msg="invalid distance too far back",S.mode=30;break t}if(x=0,k=f,0===l){if(x+=u-b,b2;)O[n++]=k[x++],O[n++]=k[x++],O[n++]=k[x++],w-=3;w&&(O[n++]=k[x++],w>1&&(O[n++]=k[x++]))}else{x=n-_;do{O[n++]=O[x++],O[n++]=O[x++],O[n++]=O[x++],w-=3}while(w>2);w&&(O[n++]=O[x++],w>1&&(O[n++]=O[x++]))}break}}break}}while(r>3,c&=(1<<(d-=w<<3))-1,t.next_in=r,t.next_out=n,t.avail_in=r=1&&0===B[O];O--);if(S>O&&(S=O),0===O)return n[h++]=20971520,n[h++]=20971520,f.bits=1,0;for(A=1;A0&&(0===t||1!==O))return-1;for(P[1]=0,x=1;x<15;x++)P[x+1]=P[x]+B[x];for(k=0;k852||2===t&&j>592)return 1;for(;;){g=x-N,l[k]v?(b=C[M+l[k]],w=F[I+l[k]]):(b=96,w=0),c=1<>N)+(d-=c)]=g<<24|b<<16|w|0}while(0!==d);for(c=1<>=1;if(0!==c?(R&=c-1,R+=c):R=0,k++,0==--B[x]){if(x===O)break;x=e[r+l[k]]}if(x>S&&(R&y)!==p){for(0===N&&(N=S),m+=A,T=1<<(E=x-N);E+N852||2===t&&j>592)return 1;n[p=R&y]=S<<24|E<<16|m-h|0}}return 0!==R&&(n[m+R]=x-N<<24|64<<16|0),f.bits=S,0},l={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},f=l.Z_FINISH,c=l.Z_BLOCK,d=l.Z_TREES,p=l.Z_OK,y=l.Z_STREAM_END,m=l.Z_NEED_DICT,v=l.Z_STREAM_ERROR,g=l.Z_DATA_ERROR,b=l.Z_MEM_ERROR,w=l.Z_BUF_ERROR,_=l.Z_DEFLATED,x=12,k=30,A=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function O(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var S,E,N=function(t){if(!t||!t.state)return v;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,p},T=function(t){if(!t||!t.state)return v;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,N(t)},j=function(t,e){var r;if(!t||!t.state)return v;var i=t.state;return e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?v:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,T(t))},R=function(t,e){if(!t)return v;var r=new O;t.state=r,r.window=null;var i=j(t,e);return i!==p&&(t.state=null),i},F=!0,I=function(t){if(F){S=new Int32Array(512),E=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(h(1,t.lens,0,288,S,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;h(2,t.lens,0,32,E,0,t.work,{bits:5}),F=!1}t.lencode=S,t.lenbits=9,t.distcode=E,t.distbits=5},B=function(t,e,r,i){var n,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>i&&(n=i),o.window.set(e.subarray(r-i,r-i+n),o.wnext),(i-=n)?(o.window.set(e.subarray(r-i,r),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,o.check=i(o.check,K,2,0),E=0,N=0,o.mode=2;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&E)<<8)+(E>>8))%31){t.msg="incorrect header check",o.mode=k;break}if((15&E)!==_){t.msg="unknown compression method",o.mode=k;break}if(N-=4,Z=8+(15&(E>>>=4)),0===o.wbits)o.wbits=Z;else if(Z>o.wbits){t.msg="invalid window size",o.mode=k;break}o.dmax=1<>8&1),512&o.flags&&(K[0]=255&E,K[1]=E>>>8&255,o.check=i(o.check,K,2,0)),E=0,N=0,o.mode=3;case 3:for(;N<32;){if(0===O)break t;O--,E+=s[u++]<>>8&255,K[2]=E>>>16&255,K[3]=E>>>24&255,o.check=i(o.check,K,4,0)),E=0,N=0,o.mode=4;case 4:for(;N<16;){if(0===O)break t;O--,E+=s[u++]<>8),512&o.flags&&(K[0]=255&E,K[1]=E>>>8&255,o.check=i(o.check,K,2,0)),E=0,N=0,o.mode=5;case 5:if(1024&o.flags){for(;N<16;){if(0===O)break t;O--,E+=s[u++]<>>8&255,o.check=i(o.check,K,2,0)),E=0,N=0}else o.head&&(o.head.extra=null);o.mode=6;case 6:if(1024&o.flags&&((R=o.length)>O&&(R=O),R&&(o.head&&(Z=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Uint8Array(o.head.extra_len)),o.head.extra.set(s.subarray(u,u+R),Z)),512&o.flags&&(o.check=i(o.check,s,R,u)),O-=R,u+=R,o.length-=R),o.length))break t;o.length=0,o.mode=7;case 7:if(2048&o.flags){if(0===O)break t;R=0;do{Z=s[u+R++],o.head&&Z&&o.length<65536&&(o.head.name+=String.fromCharCode(Z))}while(Z&&R>9&1,o.head.done=!0),t.adler=o.check=0,o.mode=x;break;case 10:for(;N<32;){if(0===O)break t;O--,E+=s[u++]<>>=7&N,N-=7&N,o.mode=27;break}for(;N<3;){if(0===O)break t;O--,E+=s[u++]<>>=1)){case 0:o.mode=14;break;case 1:if(I(o),o.mode=20,r===d){E>>>=2,N-=2;break t}break;case 2:o.mode=17;break;case 3:t.msg="invalid block type",o.mode=k}E>>>=2,N-=2;break;case 14:for(E>>>=7&N,N-=7&N;N<32;){if(0===O)break t;O--,E+=s[u++]<>>16^65535)){t.msg="invalid stored block lengths",o.mode=k;break}if(o.length=65535&E,E=0,N=0,o.mode=15,r===d)break t;case 15:o.mode=16;case 16:if(R=o.length){if(R>O&&(R=O),R>S&&(R=S),0===R)break t;a.set(s.subarray(u,u+R),l),O-=R,u+=R,S-=R,l+=R,o.length-=R;break}o.mode=x;break;case 17:for(;N<14;){if(0===O)break t;O--,E+=s[u++]<>>=5,N-=5,o.ndist=1+(31&E),E>>>=5,N-=5,o.ncode=4+(15&E),E>>>=4,N-=4,o.nlen>286||o.ndist>30){t.msg="too many length or distance symbols",o.mode=k;break}o.have=0,o.mode=18;case 18:for(;o.have>>=3,N-=3}for(;o.have<19;)o.lens[H[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,q={bits:o.lenbits},U=h(0,o.lens,0,19,o.lencode,0,o.work,q),o.lenbits=q.bits,U){t.msg="invalid code lengths set",o.mode=k;break}o.have=0,o.mode=19;case 19:for(;o.have>>16&255,D=65535&$,!((C=$>>>24)<=N);){if(0===O)break t;O--,E+=s[u++]<>>=C,N-=C,o.lens[o.have++]=D;else{if(16===D){for(J=C+2;N>>=C,N-=C,0===o.have){t.msg="invalid bit length repeat",o.mode=k;break}Z=o.lens[o.have-1],R=3+(3&E),E>>>=2,N-=2}else if(17===D){for(J=C+3;N>>=C)),E>>>=3,N-=3}else{for(J=C+7;N>>=C)),E>>>=7,N-=7}if(o.have+R>o.nlen+o.ndist){t.msg="invalid bit length repeat",o.mode=k;break}for(;R--;)o.lens[o.have++]=Z}}if(o.mode===k)break;if(0===o.lens[256]){t.msg="invalid code -- missing end-of-block",o.mode=k;break}if(o.lenbits=9,q={bits:o.lenbits},U=h(1,o.lens,0,o.nlen,o.lencode,0,o.work,q),o.lenbits=q.bits,U){t.msg="invalid literal/lengths set",o.mode=k;break}if(o.distbits=6,o.distcode=o.distdyn,q={bits:o.distbits},U=h(2,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,q),o.distbits=q.bits,U){t.msg="invalid distances set",o.mode=k;break}if(o.mode=20,r===d)break t;case 20:o.mode=21;case 21:if(O>=6&&S>=258){t.next_out=l,t.avail_out=S,t.next_in=u,t.avail_in=O,o.hold=E,o.bits=N,n(t,j),l=t.next_out,a=t.output,S=t.avail_out,u=t.next_in,s=t.input,O=t.avail_in,E=o.hold,N=o.bits,o.mode===x&&(o.back=-1);break}for(o.back=0;M=($=o.lencode[E&(1<>>16&255,D=65535&$,!((C=$>>>24)<=N);){if(0===O)break t;O--,E+=s[u++]<>L)])>>>16&255,D=65535&$,!(L+(C=$>>>24)<=N);){if(0===O)break t;O--,E+=s[u++]<>>=L,N-=L,o.back+=L}if(E>>>=C,N-=C,o.back+=C,o.length=D,0===M){o.mode=26;break}if(32&M){o.back=-1,o.mode=x;break}if(64&M){t.msg="invalid literal/length code",o.mode=k;break}o.extra=15&M,o.mode=22;case 22:if(o.extra){for(J=o.extra;N>>=o.extra,N-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=23;case 23:for(;M=($=o.distcode[E&(1<>>16&255,D=65535&$,!((C=$>>>24)<=N);){if(0===O)break t;O--,E+=s[u++]<>L)])>>>16&255,D=65535&$,!(L+(C=$>>>24)<=N);){if(0===O)break t;O--,E+=s[u++]<>>=L,N-=L,o.back+=L}if(E>>>=C,N-=C,o.back+=C,64&M){t.msg="invalid distance code",o.mode=k;break}o.offset=D,o.extra=15&M,o.mode=24;case 24:if(o.extra){for(J=o.extra;N>>=o.extra,N-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){t.msg="invalid distance too far back",o.mode=k;break}o.mode=25;case 25:if(0===S)break t;if(R=j-S,o.offset>R){if((R=o.offset-R)>o.whave&&o.sane){t.msg="invalid distance too far back",o.mode=k;break}R>o.wnext?(R-=o.wnext,F=o.wsize-R):F=o.wnext-R,R>o.length&&(R=o.length),P=o.window}else P=a,F=l-o.offset,R=o.length;R>S&&(R=S),S-=R,o.length-=R;do{a[l++]=P[F++]}while(--R);0===o.length&&(o.mode=21);break;case 26:if(0===S)break t;a[l++]=o.length,S--,o.mode=21;break;case 27:if(o.wrap){for(;N<32;){if(0===O)break t;O--,E|=s[u++]<=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;U[254]=U[254]=1;var J=function(t,e){var r,i,n=e||t.length,o=new Array(2*n);for(i=0,r=0;r4)o[i++]=65533,r+=a-1;else{for(s&=2===a?31:3===a?15:7;a>1&&r1?o[i++]=65533:s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|1023&s)}}}return function(t,e){if(e<65534&&t.subarray&&Z)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var r="",i=0;it.length&&(e=t.length);for(var r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+U[t[r]]>e?r:e},K={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},H=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},W=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},X=Object.prototype.toString,G=l.Z_NO_FLUSH,Y=l.Z_FINISH,Q=l.Z_OK,tt=l.Z_STREAM_END,et=l.Z_NEED_DICT,rt=l.Z_STREAM_ERROR,it=l.Z_DATA_ERROR,nt=l.Z_MEM_ERROR;function ot(t){this.options=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)V(r,i)&&(t[i]=r[i])}}return t}({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H,this.strm.avail_out=0;var r=C(this.strm,e.windowBits);if(r!==Q)throw new Error(K[r]);if(this.header=new W,L(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=function(t){var e,r,i,n,o,s=t.length,a=0;for(n=0;n>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e}(e.dictionary):"[object ArrayBuffer]"===X.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=z(this.strm,e.dictionary))!==Q))throw new Error(K[r])}function st(t,e){var r=new ot(e);if(r.push(t),r.err)throw r.msg||K[r.err];return r.result}ot.prototype.push=function(t,e){var r,i,n,o=this.strm,s=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(i=e===~~e?e:!0===e?Y:G,"[object ArrayBuffer]"===X.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;;){for(0===o.avail_out&&(o.output=new Uint8Array(s),o.next_out=0,o.avail_out=s),(r=M(o,i))===et&&a&&((r=z(o,a))===Q?r=M(o,i):r===it&&(r=et));o.avail_in>0&&r===tt&&o.state.wrap>0&&0!==t[o.next_in];)P(o),r=M(o,i);switch(r){case rt:case it:case et:case nt:return this.onEnd(r),this.ended=!0,!1}if(n=o.avail_out,o.next_out&&(0===o.avail_out||r===tt))if("string"===this.options.to){var u=$(o.output,o.next_out),h=o.next_out-u,l=J(o.output,u);o.next_out=h,o.avail_out=s-h,h&&o.output.set(o.output.subarray(u,u+h),0),this.onData(l)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(r!==Q||0!==n){if(r===tt)return r=D(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},ot.prototype.onData=function(t){this.chunks.push(t)},ot.prototype.onEnd=function(t){t===Q&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=function(t){for(var e=0,r=0,i=t.length;r=this.duration*this.loops?(this.mCurrentFrication=1===this.fillRule?0:1,this.mRunning=!1,e=!0):(this.mCurrentFrication=t%this.duration/this.duration,this.mReverse&&(this.mCurrentFrication=1-this.mCurrentFrication)),this.onUpdate(this.animatedValue()),!1===this.mRunning&&e&&this.onEnd()},t.currentTimeMillsecond=function(){return"undefined"==typeof performance?(new Date).getTime():performance.now()},t}();r.ValueAnimator=i},{}],45:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Renderer=void 0;var i=t(36),n=t(37),o=t(44),s=function(){function t(t,e,r){this.videoItem=t,this.ctx=e,this.canvas=r,this._dynamicImage={},this._dynamicText={}}return t.prototype.clear=function(){var t=this.ctx,e={x:0,y:0,width:this.canvas.width,height:this.canvas.height};t.clearRect(e.x,e.y,e.width,e.height)},t.prototype.drawFrame=function(t){var e=this,r=this.ctx,i={x:0,y:0,width:this.canvas.width,height:this.canvas.height};r.clearRect(i.x,i.y,i.width,i.height);var n={},o=!1,s=this.videoItem.sprites;s.forEach((function(i,a){var u,h;if(-1!=(null===(u=s[0].imageKey)||void 0===u?void 0:u.indexOf(".matte")))if(-1==(null===(h=i.imageKey)||void 0===h?void 0:h.indexOf(".matte"))){var l=s[a-1];if(o&&(!i.matteKey||0==i.matteKey.length||i.matteKey!=l.matteKey)){o=!1;var f=n[i.matteKey];r.globalCompositeOperation="destination-in",e.drawSprite(f,t),r.globalCompositeOperation="source-over",r.restore()}null==i.matteKey||null!=l.matteKey&&0!=l.matteKey.length&&l.matteKey==i.matteKey||(o=!0,r.save()),e.drawSprite(i,t),o&&a==s.length-1&&(f=n.get(i.matteKey),r.globalCompositeOperation="destination-in",e.drawSprite(f,t),r.globalCompositeOperation="source-over",r.restore())}else f[i.imageKey]=i;else e.drawSprite(i,t)}))},t.prototype.drawSprite=function(t,e){var r,s,a,u=this,h=t.frames[e];if(!(h.alpha<.05)){var l=this.ctx;l.save(),this.globalTransform&&l.transform(this.globalTransform.a,this.globalTransform.b,this.globalTransform.c,this.globalTransform.d,this.globalTransform.tx,this.globalTransform.ty),l.globalAlpha=h.alpha,l.transform(h.transform.a,h.transform.b,h.transform.c,h.transform.d,h.transform.tx,h.transform.ty);var f=null===(r=t.imageKey)||void 0===r?void 0:r.replace(".matte","");if(f){var c=null!==(s=this._dynamicImage[f])&&void 0!==s?s:this.videoItem.decodedImages[f];void 0!==h.maskPath&&null!==h.maskPath&&(h.maskPath._styles=void 0,this.drawBezier(h.maskPath),l.clip()),c&&l.drawImage(c,0,0,c.width,c.height,0,0,h.layout.width,h.layout.height),h.shapes&&h.shapes.forEach((function(t){"shape"===t.type&&t.pathArgs&&t.pathArgs.d&&u.drawBezier(new i.BezierPath(t.pathArgs.d,t.transform,t.styles)),"ellipse"===t.type&&t.pathArgs&&u.drawEllipse(new n.EllipsePath(parseFloat(t.pathArgs.x)||0,parseFloat(t.pathArgs.y)||0,parseFloat(t.pathArgs.radiusX)||0,parseFloat(t.pathArgs.radiusY)||0,t.transform,t.styles)),"rect"===t.type&&t.pathArgs&&u.drawRect(new o.RectPath(parseFloat(t.pathArgs.x)||0,parseFloat(t.pathArgs.y)||0,parseFloat(t.pathArgs.width)||0,parseFloat(t.pathArgs.height)||0,parseFloat(t.pathArgs.cornerRadius)||0,t.transform,t.styles))}));var d=this._dynamicText[f];if(void 0!==d){l.font=d.size+"px "+(null!==(a=d.family)&&void 0!==a?a:"Arial");var p=l.measureText(d.text).width;l.fillStyle=d.color;var y=void 0!==d.offset&&void 0!==d.offset.x?isNaN(d.offset.x)?0:d.offset.x:0,m=void 0!==d.offset&&void 0!==d.offset.y?isNaN(d.offset.y)?0:d.offset.y:0;l.fillText(d.text,(h.layout.width-p)/2+y,h.layout.height/2+m)}l.restore()}}},t.prototype.playAudio=function(t){},t.prototype.resetShapeStyles=function(t){var e=this.ctx,r=t._styles;r&&(r&&r.stroke?e.strokeStyle="rgba("+(255*r.stroke[0]).toFixed(0)+", "+(255*r.stroke[1]).toFixed(0)+", "+(255*r.stroke[2]).toFixed(0)+", "+r.stroke[3]+")":e.strokeStyle="transparent",r&&(e.lineWidth=r.strokeWidth||void 0,e.lineCap=r.lineCap||void 0,e.lineJoin=r.lineJoin||void 0,e.miterLimit=r.miterLimit||void 0),r&&r.fill?e.fillStyle="rgba("+(255*r.fill[0]).toFixed(0)+", "+(255*r.fill[1]).toFixed(0)+", "+(255*r.fill[2]).toFixed(0)+", "+r.fill[3]+")":e.fillStyle="transparent",r&&r.lineDash&&e.setLineDash([r.lineDash[0],r.lineDash[1]],r.lineDash[2]))},t.prototype.drawBezier=function(t){var e=this,r=this.ctx;r.save(),this.resetShapeStyles(t),void 0!==t._transform&&null!==t._transform&&r.transform(t._transform.a,t._transform.b,t._transform.c,t._transform.d,t._transform.tx,t._transform.ty);var i={x:0,y:0,x1:0,y1:0,x2:0,y2:0};r.beginPath(),t._d.replace(/([a-zA-Z])/g,"|||$1 ").replace(/,/g," ").split("|||").forEach((function(t){if(0!=t.length){var r=t.substr(0,1);if("MLHVCSQRZmlhvcsqrz".indexOf(r)>=0){var n=t.substr(1).trim().split(" ");e.drawBezierElement(i,r,n)}}})),t._styles&&t._styles.fill&&r.fill(),t._styles&&t._styles.stroke&&r.stroke(),r.restore()},t.prototype.drawBezierElement=function(t,e,r){var i=this.ctx;switch(e){case"M":t.x=Number(r[0]),t.y=Number(r[1]),i.moveTo(t.x,t.y);break;case"m":t.x+=Number(r[0]),t.y+=Number(r[1]),i.moveTo(t.x,t.y);break;case"L":t.x=Number(r[0]),t.y=Number(r[1]),i.lineTo(t.x,t.y);break;case"l":t.x+=Number(r[0]),t.y+=Number(r[1]),i.lineTo(t.x,t.y);break;case"H":t.x=Number(r[0]),i.lineTo(t.x,t.y);break;case"h":t.x+=Number(r[0]),i.lineTo(t.x,t.y);break;case"V":t.y=Number(r[0]),i.lineTo(t.x,t.y);break;case"v":t.y+=Number(r[0]),i.lineTo(t.x,t.y);break;case"C":t.x1=Number(r[0]),t.y1=Number(r[1]),t.x2=Number(r[2]),t.y2=Number(r[3]),t.x=Number(r[4]),t.y=Number(r[5]),i.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y);break;case"c":t.x1=t.x+Number(r[0]),t.y1=t.y+Number(r[1]),t.x2=t.x+Number(r[2]),t.y2=t.y+Number(r[3]),t.x+=Number(r[4]),t.y+=Number(r[5]),i.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y);break;case"S":t.x1&&t.y1&&t.x2&&t.y2?(t.x1=t.x-t.x2+t.x,t.y1=t.y-t.y2+t.y,t.x2=Number(r[0]),t.y2=Number(r[1]),t.x=Number(r[2]),t.y=Number(r[3]),i.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)):(t.x1=Number(r[0]),t.y1=Number(r[1]),t.x=Number(r[2]),t.y=Number(r[3]),i.quadraticCurveTo(t.x1,t.y1,t.x,t.y));break;case"s":t.x1&&t.y1&&t.x2&&t.y2?(t.x1=t.x-t.x2+t.x,t.y1=t.y-t.y2+t.y,t.x2=t.x+Number(r[0]),t.y2=t.y+Number(r[1]),t.x+=Number(r[2]),t.y+=Number(r[3]),i.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)):(t.x1=t.x+Number(r[0]),t.y1=t.y+Number(r[1]),t.x+=Number(r[2]),t.y+=Number(r[3]),i.quadraticCurveTo(t.x1,t.y1,t.x,t.y));break;case"Q":t.x1=Number(r[0]),t.y1=Number(r[1]),t.x=Number(r[2]),t.y=Number(r[3]),i.quadraticCurveTo(t.x1,t.y1,t.x,t.y);break;case"q":t.x1=t.x+Number(r[0]),t.y1=t.y+Number(r[1]),t.x+=Number(r[2]),t.y+=Number(r[3]),i.quadraticCurveTo(t.x1,t.y1,t.x,t.y);break;case"A":case"a":break;case"Z":case"z":i.closePath()}},t.prototype.drawEllipse=function(t){var e=this.ctx;e.save(),this.resetShapeStyles(t),void 0!==t._transform&&null!==t._transform&&e.transform(t._transform.a,t._transform.b,t._transform.c,t._transform.d,t._transform.tx,t._transform.ty);var r=t._x-t._radiusX,i=t._y-t._radiusY,n=2*t._radiusX,o=2*t._radiusY,s=n/2*.5522848,a=o/2*.5522848,u=r+n,h=i+o,l=r+n/2,f=i+o/2;e.beginPath(),e.moveTo(r,f),e.bezierCurveTo(r,f-a,l-s,i,l,i),e.bezierCurveTo(l+s,i,u,f-a,u,f),e.bezierCurveTo(u,f+a,l+s,h,l,h),e.bezierCurveTo(l-s,h,r,f+a,r,f),t._styles&&t._styles.fill&&e.fill(),t._styles&&t._styles.stroke&&e.stroke(),e.restore()},t.prototype.drawRect=function(t){var e=this.ctx;e.save(),this.resetShapeStyles(t),void 0!==t._transform&&null!==t._transform&&e.transform(t._transform.a,t._transform.b,t._transform.c,t._transform.d,t._transform.tx,t._transform.ty);var r=t._x,i=t._y,n=t._width,o=t._height,s=t._cornerRadius;n<2*s&&(s=n/2),o<2*s&&(s=o/2),e.beginPath(),e.moveTo(r+s,i),e.arcTo(r+n,i,r+n,i+o,s),e.arcTo(r+n,i+o,r,i+o,s),e.arcTo(r,i+o,r,i,s),e.arcTo(r,i,r+n,i,s),e.closePath(),t._styles&&t._styles.fill&&e.fill(),t._styles&&t._styles.stroke&&e.stroke(),e.restore()},t}();r.Renderer=s},{36:36,37:37,44:44}],44:[function(t,e,r){"use strict";var i,n=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0}),r.RectPath=void 0;var o=function(t){function e(e,r,i,n,o,s,a){var u=t.call(this,"",s,a)||this;return u._x=e,u._y=r,u._width=i,u._height=n,u._cornerRadius=o,u._transform=s,u._styles=a,u}return n(e,t),e}(t(36).BezierPath);r.RectPath=o},{36:36}],46:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SpriteEntity=void 0;var i=t(38),n=function(t){var e,r;this.matteKey=t.matteKey,this.imageKey=t.imageKey,this.frames=null!==(r=null===(e=t.frames)||void 0===e?void 0:e.map((function(t){return new i.FrameEntity(t)})))&&void 0!==r?r:[]};r.SpriteEntity=n},{38:38}]},{},[39])(39)}));