/** * apng-canvas v2.1.2 * * @copyright 2011-2019 David Mzareulyan * @link https://github.com/davidmz/apng-canvas * @license MIT */ !function i(o,a,s){function u(n,t){if(!a[n]){if(!o[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(c)return c(n,!0);throw new Error("Cannot find module '"+n+"'")}var r=a[n]={exports:{}};o[n][0].call(r.exports,function(t){var e=o[n][1][t];return u(e||t)},r,r.exports,i,o,a,s)}return a[n].exports}for(var c="function"==typeof require&&require,t=0;ti+r.playTime;)i+=r.playTime;i+=n.delay}else u=!(s=!1)}}},{}],4:[function(t,e,n){"use strict";for(var a=new Uint32Array(256),r=0;r<256;r++){for(var i=r,o=0;o<8;o++)i=1&i?3988292384^i>>>1:i>>>1;a[r]=i}e.exports=function(t,e,n){for(var r=-1,i=e=e||0,o=e+(n=n||t.length-e);i>>8^a[255&(r^t[i])];return-1^r}},{}],5:[function(a,t,e){(function(t){"use strict";var e=a("./support-test"),n=a("./parser"),r=a("./loader"),i=t.APNG={};i.checkNativeFeatures=e.checkNativeFeatures,i.ifNeeded=e.ifNeeded,i.parseBuffer=function(t){return n(t)};var o={};i.parseURL=function(t){return t in o||(o[t]=r(t).then(n)),o[t]},i.animateContext=function(t,e){return i.parseURL(t).then(function(t){return t.addContext(e),t.play(),t})},i.animateImage=function(s){return s.setAttribute("data-is-apng","progress"),i.parseURL(s.src).then(function(t){s.setAttribute("data-is-apng","yes");var e=document.createElement("canvas");e.width=t.width,e.height=t.height,Array.prototype.slice.call(s.attributes).forEach(function(t){-1==["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(t.nodeName)&&e.setAttributeNode(t.cloneNode(!1))}),e.setAttribute("data-apng-src",s.src),""!=s.alt&&e.appendChild(document.createTextNode(s.alt));var n="",r="",i=0,o="";""!=s.style.width&&"auto"!=s.style.width?n=s.style.width:s.hasAttribute("width")&&(n=s.getAttribute("width")+"px"),""!=s.style.height&&"auto"!=s.style.height?r=s.style.height:s.hasAttribute("height")&&(r=s.getAttribute("height")+"px"),""!=n&&""==r&&(i=parseFloat(n),o=n.match(/\D+$/)[0],r=Math.round(e.height*i/e.width)+o),""!=r&&""==n&&(i=parseFloat(r),o=r.match(/\D+$/)[0],n=Math.round(e.width*i/e.height)+o),e.style.width=n,e.style.height=r;var a=s.parentNode;a.insertBefore(e,s),a.removeChild(s),t.addContext(e.getContext("2d")),t.play()},function(){s.setAttribute("data-is-apng","no")})},i.releaseCanvas=function(t){var e=t.getContext("2d");"_apng_animation"in e&&e._apng_animation.removeContext(e)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(t,e,n){"use strict";var i=i||t("es6-promise").Promise;e.exports=function(r){return new i(function(t,e){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="arraybuffer",n.onload=function(){200==this.status?t(this.response):e(this)},n.send()})}},{"es6-promise":1}],7:[function(t,e,n){"use strict";var r=r||t("es6-promise").Promise,m=t("./animation"),o=t("./crc32"),g=new Uint8Array([137,80,78,71,13,10,26,10]);e.exports=function(t){var A=new Uint8Array(t);return new r(function(t,e){for(var n=0;n>>0;for(var r=1;r<4;r++)n+=t[r+e]<<8*(3-r);return n},_=function(t,e){for(var n=0,r=0;r<2;r++)n+=t[r+e]<<8*(1-r);return n},b=function(t,e){return t[e]},E=function(t,e,n){var r=new Uint8Array(n);return r.set(t.subarray(e,e+n)),r},a=function(t,e,n){var r=Array.prototype.slice.call(t.subarray(e,e+n));return String.fromCharCode.apply(String,r)},P=function(t){return[t>>>24&255,t>>>16&255,t>>>8&255,255&t]},x=function(t,e){var n=t.length+e.length,r=new Uint8Array(new ArrayBuffer(n+8));r.set(P(e.length),0),r.set(function(t){for(var e=[],n=0;n