From 3747e902e5af60bb873fc21e6500e3773db833e7 Mon Sep 17 00:00:00 2001 From: PixelsCommander Date: Mon, 24 Aug 2015 11:39:10 +0200 Subject: [PATCH] Fixed cross-browser compatibility --- demo/js/vendor/html2canvas.js | 20 +++++++++++++++++--- dist/htmlgl.js | 33 ++++++++++++++++++++++++++------- dist/htmlgl.min.js | 8 ++++---- page/js/htmlgl.min.js | 8 ++++---- src/gl-context.js | 2 ++ src/gl-element.js | 11 +++++++---- 6 files changed, 60 insertions(+), 22 deletions(-) diff --git a/demo/js/vendor/html2canvas.js b/demo/js/vendor/html2canvas.js index 0370eea..97034ba 100755 --- a/demo/js/vendor/html2canvas.js +++ b/demo/js/vendor/html2canvas.js @@ -1635,6 +1635,8 @@ function cloneNode(node, javascriptEnabled) { var child = node.firstChild; while(child) { if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== 'SCRIPT') { + console.log(clone); + clone.appendChild(cloneNode(child, javascriptEnabled)); } child = child.nextSibling; @@ -1676,6 +1678,7 @@ module.exports = function(ownerDocument, containerDocument, width, height, optio container.style.left = "-10000px"; container.style.top = "0px"; container.style.border = "0"; + container.style.border = "0"; container.width = width; container.height = height; container.scrolling = "no"; // ios won't scroll without it @@ -2054,6 +2057,7 @@ module.exports = (typeof(document) === "undefined" || typeof(Object.create) !== function renderDocument(document, options, windowWidth, windowHeight, html2canvasIndex) { return createWindowClone(document, document, windowWidth, windowHeight, options, document.defaultView.pageXOffset, document.defaultView.pageYOffset).then(function(container) { log("Document cloned"); + var attributeName = html2canvasNodeAttribute + html2canvasIndex; var selector = "[" + attributeName + "='" + html2canvasIndex + "']"; document.querySelector(selector).removeAttribute(attributeName); @@ -3492,7 +3496,17 @@ function calculateCurvePoints(bounds, borderRadius, borders) { blh = borderRadius[3][0], blv = borderRadius[3][1]; - var topWidth = width - trh, + var halfHeight = Math.floor(height / 2); + tlh = tlh > halfHeight ? halfHeight : tlh; + tlv = tlv > halfHeight ? halfHeight : tlv; + trh = trh > halfHeight ? halfHeight : trh; + trv = trv > halfHeight ? halfHeight : trv; + brh = brh > halfHeight ? halfHeight : brh; + brv = brv > halfHeight ? halfHeight : brv; + blh = blh > halfHeight ? halfHeight : blh; + blv = blv > halfHeight ? halfHeight : blv; + + var topWidth = width - trh, rightHeight = height - brv, bottomWidth = width - brh, leftHeight = height - blv; @@ -4161,8 +4175,8 @@ CanvasRenderer.prototype.drawImage = function(imageContainer, sx, sy, sw, sh, dx CanvasRenderer.prototype.clip = function(shapes, callback, context) { this.ctx.save(); shapes.filter(hasEntries).forEach(function(shape) { - //shape = this.applyRatioToShape(shape); - //this.shape(shape).clip(); + shape = this.applyRatioToShape(shape); + this.shape(shape).clip(); }, this); callback.call(context); this.ctx.restore(); diff --git a/dist/htmlgl.js b/dist/htmlgl.js index ab39171..df64da8 100644 --- a/dist/htmlgl.js +++ b/dist/htmlgl.js @@ -1659,6 +1659,8 @@ function cloneNode(node, javascriptEnabled) { var child = node.firstChild; while(child) { if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== 'SCRIPT') { + console.log(clone); + clone.appendChild(cloneNode(child, javascriptEnabled)); } child = child.nextSibling; @@ -1700,6 +1702,7 @@ module.exports = function(ownerDocument, containerDocument, width, height, optio container.style.left = "-10000px"; container.style.top = "0px"; container.style.border = "0"; + container.style.border = "0"; container.width = width; container.height = height; container.scrolling = "no"; // ios won't scroll without it @@ -2078,6 +2081,7 @@ module.exports = (typeof(document) === "undefined" || typeof(Object.create) !== function renderDocument(document, options, windowWidth, windowHeight, html2canvasIndex) { return createWindowClone(document, document, windowWidth, windowHeight, options, document.defaultView.pageXOffset, document.defaultView.pageYOffset).then(function(container) { log("Document cloned"); + var attributeName = html2canvasNodeAttribute + html2canvasIndex; var selector = "[" + attributeName + "='" + html2canvasIndex + "']"; document.querySelector(selector).removeAttribute(attributeName); @@ -3516,7 +3520,17 @@ function calculateCurvePoints(bounds, borderRadius, borders) { blh = borderRadius[3][0], blv = borderRadius[3][1]; - var topWidth = width - trh, + var halfHeight = Math.floor(height / 2); + tlh = tlh > halfHeight ? halfHeight : tlh; + tlv = tlv > halfHeight ? halfHeight : tlv; + trh = trh > halfHeight ? halfHeight : trh; + trv = trv > halfHeight ? halfHeight : trv; + brh = brh > halfHeight ? halfHeight : brh; + brv = brv > halfHeight ? halfHeight : brv; + blh = blh > halfHeight ? halfHeight : blh; + blv = blv > halfHeight ? halfHeight : blv; + + var topWidth = width - trh, rightHeight = height - brv, bottomWidth = width - brh, leftHeight = height - blv; @@ -4185,8 +4199,8 @@ CanvasRenderer.prototype.drawImage = function(imageContainer, sx, sy, sw, sh, dx CanvasRenderer.prototype.clip = function(shapes, callback, context) { this.ctx.save(); shapes.filter(hasEntries).forEach(function(shape) { - //shape = this.applyRatioToShape(shape); - //this.shape(shape).clip(); + shape = this.applyRatioToShape(shape); + this.shape(shape).clip(); }, this); callback.call(context); this.ctx.restore(); @@ -8755,6 +8769,8 @@ will produce an inaccurate conversion value. The same issue exists with the cx/c //Update pixelRatio since could be resized on different screen with different ratio HTMLGL.pixelRatio = window.devicePixelRatio || 1; + console.log(HTMLGL.pixelRatio); + width = width * HTMLGL.pixelRatio; height = height * HTMLGL.pixelRatio; @@ -8980,7 +8996,8 @@ will produce an inaccurate conversion value. The same issue exists with the cx/c } } - var isInsideHtml2Canvas = !isMounted && (this.baseURI !== undefined && this.baseURI.length === 0); + debugger; + var isInsideHtml2Canvas = !isMounted || (this.baseURI === undefined || this.baseURI === '' || this.baseURI === null); if (!isInsideHtml2Canvas) { HTMLGL.elements.push(this); @@ -9072,16 +9089,18 @@ will produce an inaccurate conversion value. The same issue exists with the cx/c return new Promise(function(resolve, reject){ self.image = html2canvas(self, { - onrendered: self.applyNewTexture, width: self.boundingRect.width * HTMLGL.pixelRatio, height: self.boundingRect.height * HTMLGL.pixelRatio - }).then(resolve); + }).then(function(textureCanvas){ + self.applyNewTexture(textureCanvas); + resolve(); + }); }); } //Recreating texture from canvas given after calling updateTexture p.applyNewTexture = function (textureCanvas) { - //document.body.appendChild(textureCanvas); + document.body.appendChild(textureCanvas); this.image = textureCanvas; this.texture = PIXI.Texture.fromCanvas(this.image); diff --git a/dist/htmlgl.min.js b/dist/htmlgl.min.js index e7c1888..4841198 100644 --- a/dist/htmlgl.min.js +++ b/dist/htmlgl.min.js @@ -7,7 +7,7 @@ e.closePath()}}}},i.updateGraphicsTint=function(t){if(16777215!==t.tint)for(var },n.prototype.renderWebGL=function(t,e,r,n){if(this.valid){if(n=void 0!==n?n:!0,this.textureBuffer.transform=e,this.textureBuffer.activate(),t.worldAlpha=1,n){t.worldTransform.identity(),t.currentBounds=null;var i,o,s=t.children;for(i=0,o=s.length;o>i;++i)s[i].updateTransform()}var a=this.renderer.filterManager;this.renderer.filterManager=this.filterManager,this.renderer.renderDisplayObject(t,this.textureBuffer,r),this.renderer.filterManager=a}},n.prototype.renderCanvas=function(t,e,r,n){if(this.valid){n=!!n;var i=t.worldTransform,o=c;o.identity(),e&&o.append(e),t.worldTransform=o,t.worldAlpha=1;var s,a,h=t.children;for(s=0,a=h.length;a>s;++s)h[s].updateTransform();r&&this.textureBuffer.clear(),t.worldTransform=i;var l=this.textureBuffer.context,u=this.renderer.resolution;this.renderer.resolution=this.resolution,this.renderer.renderDisplayObject(t,l),this.renderer.resolution=u}},n.prototype.destroy=function(){o.prototype.destroy.call(this,!0),this.textureBuffer.destroy(),this.filterManager&&this.filterManager.destroy(),this.renderer=null},n.prototype.getImage=function(){var t=new Image;return t.src=this.getBase64(),t},n.prototype.getBase64=function(){return this.getCanvas().toDataURL()},n.prototype.getCanvas=function(){if(this.renderer.type===u.RENDERER_TYPE.WEBGL){var t=this.renderer.gl,e=this.textureBuffer.size.width,r=this.textureBuffer.size.height,n=new Uint8Array(4*e*r);t.bindFramebuffer(t.FRAMEBUFFER,this.textureBuffer.frameBuffer),t.readPixels(0,0,e,r,t.RGBA,t.UNSIGNED_BYTE,n),t.bindFramebuffer(t.FRAMEBUFFER,null);var i=new h(e,r),o=i.context.getImageData(0,0,e,r);return o.data.set(n),i.context.putImageData(o,0,0),i.canvas}return this.textureBuffer.canvas},n.prototype.getPixels=function(){var t,e;if(this.renderer.type===u.RENDERER_TYPE.WEBGL){var r=this.renderer.gl;t=this.textureBuffer.size.width,e=this.textureBuffer.size.height;var n=new Uint8Array(4*t*e);return r.bindFramebuffer(r.FRAMEBUFFER,this.textureBuffer.frameBuffer),r.readPixels(0,0,t,e,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,null),n}return t=this.textureBuffer.canvas.width,e=this.textureBuffer.canvas.height,this.textureBuffer.canvas.getContext("2d").getImageData(0,0,t,e).data},n.prototype.getPixel=function(t,e){if(this.renderer.type===u.RENDERER_TYPE.WEBGL){var r=this.renderer.gl,n=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this.textureBuffer.frameBuffer),r.readPixels(t,e,1,1,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,null),n}return this.textureBuffer.canvas.getContext("2d").getImageData(t,e,1,1).data}},{"../const":22,"../math":32,"../renderers/canvas/utils/CanvasBuffer":44,"../renderers/webgl/managers/FilterManager":53,"../renderers/webgl/utils/RenderTarget":64,"./BaseTexture":69,"./Texture":71}],71:[function(t,e,r){function n(t,e,r,i,o){a.call(this),this.noFrame=!1,e||(this.noFrame=!0,e=new h.Rectangle(0,0,1,1)),t instanceof n&&(t=t.baseTexture),this.baseTexture=t,this._frame=e,this.trim=i,this.valid=!1,this.requiresUpdate=!1,this._uvs=null,this.width=0,this.height=0,this.crop=r||e,this.rotate=!!o,t.hasLoaded?(this.noFrame&&(e=new h.Rectangle(0,0,t.width,t.height),t.on("update",this.onBaseTextureUpdated,this)),this.frame=e):t.once("loaded",this.onBaseTextureLoaded,this)}var i=t("./BaseTexture"),o=t("./VideoBaseTexture"),s=t("./TextureUvs"),a=t("eventemitter3"),h=t("../math"),l=t("../utils");n.prototype=Object.create(a.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{frame:{get:function(){return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,this.width=t.width,this.height=t.height,!this.trim&&!this.rotate&&(t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height))throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim?(this.width=this.trim.width,this.height=this.trim.height,this._frame.width=this.trim.width,this._frame.height=this.trim.height):this.crop=t,this.valid&&this._updateUvs()}}}),n.prototype.update=function(){this.baseTexture.update()},n.prototype.onBaseTextureLoaded=function(t){this.frame=this.noFrame?new h.Rectangle(0,0,t.width,t.height):this._frame,this.emit("update",this)},n.prototype.onBaseTextureUpdated=function(t){this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},n.prototype.destroy=function(t){this.baseTexture&&(t&&this.baseTexture.destroy(),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.crop=null,this.valid=!1},n.prototype.clone=function(){return new n(this.baseTexture,this.frame,this.crop,this.trim,this.rotate)},n.prototype._updateUvs=function(){this._uvs||(this._uvs=new s),this._uvs.set(this.crop,this.baseTexture,this.rotate)},n.fromImage=function(t,e,r){var o=l.TextureCache[t];return o||(o=new n(i.fromImage(t,e,r)),l.TextureCache[t]=o),o},n.fromFrame=function(t){var e=l.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},n.fromCanvas=function(t,e){return new n(i.fromCanvas(t,e))},n.fromVideo=function(t,e){return"string"==typeof t?n.fromVideoUrl(t,e):new n(o.fromVideo(t,e))},n.fromVideoUrl=function(t,e){return new n(o.fromUrl(t,e))},n.addTextureToCache=function(t,e){l.TextureCache[e]=t},n.removeTextureFromCache=function(t){var e=l.TextureCache[t];return delete l.TextureCache[t],delete l.BaseTextureCache[t],e},n.EMPTY=new n(new i)},{"../math":32,"../utils":76,"./BaseTexture":69,"./TextureUvs":72,"./VideoBaseTexture":73,eventemitter3:11}],72:[function(t,e,r){function n(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1}e.exports=n,n.prototype.set=function(t,e,r){var n=e.width,i=e.height;r?(this.x0=(t.x+t.height)/n,this.y0=t.y/i,this.x1=(t.x+t.height)/n,this.y1=(t.y+t.width)/i,this.x2=t.x/n,this.y2=(t.y+t.width)/i,this.x3=t.x/n,this.y3=t.y/i):(this.x0=t.x/n,this.y0=t.y/i,this.x1=(t.x+t.width)/n,this.y1=t.y/i,this.x2=(t.x+t.width)/n,this.y2=(t.y+t.height)/i,this.x3=t.x/n,this.y3=(t.y+t.height)/i)}},{}],73:[function(t,e,r){function n(t,e){if(!t)throw new Error("No video source element specified.");(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),o.call(this,t,e),this.autoUpdate=!1,this._onUpdate=this._onUpdate.bind(this),this._onCanPlay=this._onCanPlay.bind(this),t.complete||(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this))),this.__loaded=!1}function i(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=t,r.type=e,r}var o=t("./BaseTexture"),s=t("../utils");n.prototype=Object.create(o.prototype),n.prototype.constructor=n,e.exports=n,n.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this._onUpdate),this.update())},n.prototype._onPlayStart=function(){this.autoUpdate||(window.requestAnimationFrame(this._onUpdate),this.autoUpdate=!0)},n.prototype._onPlayStop=function(){this.autoUpdate=!1},n.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.source.play(),this.__loaded||(this.__loaded=!0,this.emit("loaded",this)))},n.prototype.destroy=function(){this.source&&this.source._pixiId&&(delete s.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),o.prototype.destroy.call(this)},n.fromVideo=function(t,e){t._pixiId||(t._pixiId="video_"+s.uid());var r=s.BaseTextureCache[t._pixiId];return r||(r=new n(t,e),s.BaseTextureCache[t._pixiId]=r),r},n.fromUrl=function(t,e){var r=document.createElement("video");if(Array.isArray(t))for(var o=0;othis._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*i.TARGET_FPMS*this.speed,this._emitter.emit(s,this.deltaTime),this.lastTime=t},e.exports=n},{"../const":22,eventemitter3:11}],75:[function(t,e,r){var n=t("./Ticker"),i=new n;i.autoStart=!0,e.exports={shared:i,Ticker:n}},{"./Ticker":74}],76:[function(t,e,r){var n=t("../const"),i=e.exports={_uid:0,_saidHello:!1,pluginTarget:t("./pluginTarget"),async:t("async"),uid:function(){return++i._uid},hex2rgb:function(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},hex2string:function(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t},rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},canUseNewCanvasBlendModes:function(){if("undefined"==typeof document)return!1;var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",e="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",r=new Image;r.src=t+"AP804Oa6"+e;var n=new Image;n.src=t+"/wCKxvRF"+e;var i=document.createElement("canvas");i.width=6,i.height=1;var o=i.getContext("2d");o.globalCompositeOperation="multiply",o.drawImage(r,0,0),o.drawImage(n,2,0);var s=o.getImageData(2,0,1,1).data;return 255===s[0]&&0===s[1]&&0===s[2]},getNextPowerOfTwo:function(t){if(t>0&&0===(t&t-1))return t;for(var e=1;t>e;)e<<=1;return e},isPowerOfTwo:function(t,e){return t>0&&0===(t&t-1)&&e>0&&0===(e&e-1)},getResolutionOfUrl:function(t){var e=n.RETINA_PREFIX.exec(t);return e?parseFloat(e[1]):1},sayHello:function(t){if(!i._saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+n.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+n.VERSION+" - "+t+" - http://www.pixijs.com/");i._saidHello=!0}},isWebGLSupported:function(){var t={stencil:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t);return!(!r||!r.getContextAttributes().stencil)}catch(n){return!1}},TextureCache:{},BaseTextureCache:{}}},{"../const":22,"./pluginTarget":77,async:2}],77:[function(t,e,r){function n(t){t.__plugins={},t.registerPlugin=function(e,r){t.__plugins[e]=r},t.prototype.initPlugins=function(){this.plugins=this.plugins||{};for(var e in t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}e.exports={mixin:function(t){n(t)}}},{}],78:[function(t,e,r){var n=t("./core"),i=t("./mesh"),o=t("./extras"),s=t("./filters");n.SpriteBatch=function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")},n.AssetLoader=function(){throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")},Object.defineProperties(n,{Stage:{get:function(){return console.warn("You do not need to use a PIXI Stage any more, you can simply render any container."),n.Container}},DisplayObjectContainer:{get:function(){return console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on."),n.Container}},Strip:{get:function(){return console.warn("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),i.Mesh}},Rope:{get:function(){return console.warn("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),i.Rope}},MovieClip:{get:function(){return console.warn("The MovieClip class has been moved to extras.MovieClip, please use extras.MovieClip from now on."),o.MovieClip}},TilingSprite:{get:function(){return console.warn("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),o.TilingSprite}},BitmapText:{get:function(){return console.warn("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),o.BitmapText}},blendModes:{get:function(){return console.warn("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),n.BLEND_MODES}},scaleModes:{get:function(){return console.warn("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),n.SCALE_MODES}},BaseTextureCache:{get:function(){return console.warn("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),n.utils.BaseTextureCache}},TextureCache:{get:function(){return console.warn("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),n.utils.TextureCache}},math:{get:function(){return console.warn("The math namespace is deprecated, please access members already accessible on PIXI."),n}}}),n.Sprite.prototype.setTexture=function(t){this.texture=t,console.warn("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},o.BitmapText.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")},n.Text.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},n.Text.prototype.setStyle=function(t){this.style=t,console.warn("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},n.Texture.prototype.setFrame=function(t){this.frame=t,console.warn("setFrame is now deprecated, please use the frame property, e.g : myTexture.frame = frame;")},Object.defineProperties(s,{AbstractFilter:{get:function(){return console.warn("filters.AbstractFilter is an undocumented alias, please use AbstractFilter from now on."),n.AbstractFilter}},FXAAFilter:{get:function(){return console.warn("filters.FXAAFilter is an undocumented alias, please use FXAAFilter from now on."),n.FXAAFilter}},SpriteMaskFilter:{get:function(){return console.warn("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),n.SpriteMaskFilter}}}),n.utils.uuid=function(){return console.warn("utils.uuid() is deprecated, please use utils.uid() from now on."),n.utils.uid()}},{"./core":29,"./extras":85,"./filters":102,"./mesh":126}],79:[function(t,e,r){function n(t,e){i.Container.call(this),e=e||{},this.textWidth=0,this.textHeight=0,this._glyphs=[],this._font={tint:void 0!==e.tint?e.tint:16777215,align:e.align||"left",name:null,size:0},this.font=e.font,this._text=t,this.maxWidth=0,this.dirty=!1,this.updateText()}var i=t("../core");n.prototype=Object.create(i.Container.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{tint:{get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},align:{get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},font:{get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):n.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),n.prototype.updateText=function(){for(var t=n.fonts[this._font.name],e=new i.Point,r=null,o=[],s=0,a=0,h=[],l=0,u=this._font.size/t.size,c=-1,f=0;f0&&e.x*u>this.maxWidth)o.splice(c,f-c),f=c,c=-1,h.push(s),a=Math.max(a,s),l++,e.x=0,e.y+=t.lineHeight,r=null;else{var p=t.chars[d];p&&(r&&p.kerning[r]&&(e.x+=p.kerning[r]),o.push({texture:p.texture,line:l,charCode:d,position:new i.Point(e.x+p.xOffset,e.y+p.yOffset)}),s=e.x+(p.texture.width+p.xOffset),e.x+=p.xAdvance,r=d)}}h.push(s),a=Math.max(a,s);var g=[];for(f=0;l>=f;f++){var A=0;"right"===this._font.align?A=a-h[f]:"center"===this._font.align&&(A=(a-h[f])/2),g.push(A)}var v=o.length,m=this.tint;for(f=0;v>f;f++){var y=this._glyphs[f];y?y.texture=o[f].texture:(y=new i.Sprite(o[f].texture),this._glyphs.push(y)),y.position.x=(o[f].position.x+g[o[f].line])*u,y.position.y=o[f].position.y*u,y.scale.x=y.scale.y=u,y.tint=m,y.parent||this.addChild(y)}for(f=v;fe?this.loop?this._texture=this._textures[this._textures.length-1+e%this._textures.length]:(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this.loop||e=this._textures.length&&(this.gotoAndStop(this.textures.length-1),this.onComplete&&this.onComplete())},n.prototype.destroy=function(){this.stop(),i.Sprite.prototype.destroy.call(this)},n.fromFrames=function(t){for(var e=[],r=0;ry?y:t,t=t>w?w:t,t=t>C?C:t,r=m,r=r>x?x:r,r=r>E?E:r,r=r>b?b:r,e=v,e=y>e?y:e,e=w>e?w:e,e=C>e?C:e,n=m,n=x>n?x:n,n=E>n?E:n,n=b>n?b:n;var B=this._bounds;return B.x=t,B.width=e-t,B.y=r,B.height=n-r,this._currentBounds=B,B},n.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,o);var e,r=this._width,n=this._height,i=-r*this.anchor.x;return o.x>i&&o.xe&&o.y 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n vec2 p = mod( uv / ( pixelSize * 0.5 ), 2.0) - vec2(1.0);\n col = col * character(n, p);\n\n gl_FragColor = vec4(col, 1.0);\n}\n",{dimensions:{type:"4fv",value:new Float32Array([0,0,0,0])},pixelSize:{type:"1f",value:8}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{size:{get:function(){return this.uniforms.pixelSize.value},set:function(t){this.uniforms.pixelSize.value=t}}})},{"../../core":29}],87:[function(t,e,r){function n(){i.AbstractFilter.call(this),this.blurXFilter=new o,this.blurYFilter=new s,this.defaultFilter=new i.AbstractFilter}var i=t("../../core"),o=t("../blur/BlurXFilter"),s=t("../blur/BlurYFilter");n.prototype=Object.create(i.AbstractFilter.prototype), n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r){var n=t.filterManager.getRenderTarget(!0);this.defaultFilter.applyFilter(t,e,r),this.blurXFilter.applyFilter(t,e,n),t.blendModeManager.setBlendMode(i.BLEND_MODES.SCREEN),this.blurYFilter.applyFilter(t,n,r),t.blendModeManager.setBlendMode(i.BLEND_MODES.NORMAL),t.filterManager.returnRenderTarget(n)},Object.defineProperties(n.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t}}})},{"../../core":29,"../blur/BlurXFilter":90,"../blur/BlurYFilter":91}],88:[function(t,e,r){function n(t,e){i.AbstractFilter.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform float strength;\nuniform float dirX;\nuniform float dirY;\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying vec2 vBlurTexCoords[3];\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n\n vBlurTexCoords[0] = aTextureCoord + vec2( (0.004 * strength) * dirX, (0.004 * strength) * dirY );\n vBlurTexCoords[1] = aTextureCoord + vec2( (0.008 * strength) * dirX, (0.008 * strength) * dirY );\n vBlurTexCoords[2] = aTextureCoord + vec2( (0.012 * strength) * dirX, (0.012 * strength) * dirY );\n\n vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n","precision lowp float;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vBlurTexCoords[3];\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = vec4(0.0);\n\n gl_FragColor += texture2D(uSampler, vTextureCoord ) * 0.3989422804014327;\n gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 0]) * 0.2419707245191454;\n gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 1]) * 0.05399096651318985;\n gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 2]) * 0.004431848411938341;\n}\n",{strength:{type:"1f",value:1},dirX:{type:"1f",value:t||0},dirY:{type:"1f",value:e||0}}),this.defaultFilter=new i.AbstractFilter,this.passes=1,this.dirX=t||0,this.dirY=e||0,this.strength=4}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r,n){var i=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.width/e.size.width),1===this.passes)t.filterManager.applyFilter(i,e,r,n);else{var o=t.filterManager.getRenderTarget(!0);t.filterManager.applyFilter(i,e,o,n);for(var s=0;s>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,h=(n>>16&255)/255,l=(n>>8&255)/255,u=(255&n)/255,c=[.3,.59,.11,0,0,o,s,a,t,0,h,l,u,e,0,o-h,s-l,a-u,0,0];this._loadMatrix(c,i)},n.prototype.night=function(t,e){t=t||.1;var r=[-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},n.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},n.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},n.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},Object.defineProperties(n.prototype,{matrix:{get:function(){return this.uniforms.m.value},set:function(t){this.uniforms.m.value=t}}})},{"../../core":29}],94:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float step;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n color = floor(color * step) / step;\n\n gl_FragColor = color;\n}\n",{step:{type:"1f",value:5}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{step:{get:function(){return this.uniforms.step.value},set:function(t){this.uniforms.step.value=t}}})},{"../../core":29}],95:[function(t,e,r){function n(t,e,r){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n",{matrix:{type:"1fv",value:new Float32Array(t)},texelSize:{type:"v2",value:{x:1/e,y:1/r}}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{matrix:{get:function(){return this.uniforms.matrix.value},set:function(t){this.uniforms.matrix.value=new Float32Array(t)}},width:{get:function(){return 1/this.uniforms.texelSize.value.x},set:function(t){this.uniforms.texelSize.value.x=1/t}},height:{get:function(){return 1/this.uniforms.texelSize.value.y},set:function(t){this.uniforms.texelSize.value.y=1/t}}})},{"../../core":29}],96:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n")}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n},{"../../core":29}],97:[function(t,e,r){function n(t){var e=new i.Matrix;t.renderable=!1,i.AbstractFilter.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMapCoord;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n vMapCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n","precision lowp float;\n\nvarying vec2 vMapCoord;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nvoid main(void)\n{\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 map = texture2D(mapSampler, vMapCoord);\n\n map -= 0.5;\n map.xy *= scale;\n\n gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y));\n}\n",{mapSampler:{type:"sampler2D",value:t.texture},otherMatrix:{type:"mat3",value:e.toArray(!0)},scale:{type:"v2",value:{x:1,y:1}}}),this.maskSprite=t,this.maskMatrix=e,this.scale=new i.Point(20,20)}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r){var n=t.filterManager;n.calculateMappedMatrix(e.frame,this.maskSprite,this.maskMatrix),this.uniforms.otherMatrix.value=this.maskMatrix.toArray(!0),this.uniforms.scale.value.x=this.scale.x*(1/e.frame.width),this.uniforms.scale.value.y=this.scale.y*(1/e.frame.height);var i=this.getShader(t);n.applyFilter(i,e,r)},Object.defineProperties(n.prototype,{map:{get:function(){return this.uniforms.mapSampler.value},set:function(t){this.uniforms.mapSampler.value=t}}})},{"../../core":29}],98:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 dimensions;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * dimensions.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n",{scale:{type:"1f",value:1},angle:{type:"1f",value:5},dimensions:{type:"4fv",value:[0,0,0,0]}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{scale:{get:function(){return this.uniforms.scale.value},set:function(t){this.uniforms.scale.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},{"../../core":29}],99:[function(t,e,r){function n(){i.AbstractFilter.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform float strength;\nuniform vec2 offset;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying vec2 vBlurTexCoords[6];\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3((aVertexPosition+offset), 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n\n vBlurTexCoords[ 0] = aTextureCoord + vec2(0.0, -0.012 * strength);\n vBlurTexCoords[ 1] = aTextureCoord + vec2(0.0, -0.008 * strength);\n vBlurTexCoords[ 2] = aTextureCoord + vec2(0.0, -0.004 * strength);\n vBlurTexCoords[ 3] = aTextureCoord + vec2(0.0, 0.004 * strength);\n vBlurTexCoords[ 4] = aTextureCoord + vec2(0.0, 0.008 * strength);\n vBlurTexCoords[ 5] = aTextureCoord + vec2(0.0, 0.012 * strength);\n\n vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n","precision lowp float;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vBlurTexCoords[6];\nvarying vec4 vColor;\n\nuniform vec3 color;\nuniform float alpha;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n vec4 sum = vec4(0.0);\n\n sum += texture2D(uSampler, vBlurTexCoords[ 0])*0.004431848411938341;\n sum += texture2D(uSampler, vBlurTexCoords[ 1])*0.05399096651318985;\n sum += texture2D(uSampler, vBlurTexCoords[ 2])*0.2419707245191454;\n sum += texture2D(uSampler, vTextureCoord )*0.3989422804014327;\n sum += texture2D(uSampler, vBlurTexCoords[ 3])*0.2419707245191454;\n sum += texture2D(uSampler, vBlurTexCoords[ 4])*0.05399096651318985;\n sum += texture2D(uSampler, vBlurTexCoords[ 5])*0.004431848411938341;\n\n gl_FragColor = vec4( color.rgb * sum.a * alpha, sum.a * alpha );\n}\n",{blur:{type:"1f",value:1/512},color:{type:"c",value:[0,0,0]},alpha:{type:"1f",value:.7},offset:{type:"2f",value:[5,5]},strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r,n){var i=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.height/e.size.height),1===this.passes)t.filterManager.applyFilter(i,e,r,n);else{for(var o=t.filterManager.getRenderTarget(!0),s=e,a=o,h=0;h= (time - params.z)) )\n {\n float diff = (dist - time);\n float powDiff = 1.0 - pow(abs(diff*params.x), params.y);\n\n float diffTime = diff * powDiff;\n vec2 diffUV = normalize(uv - center);\n texCoord = uv + (diffUV * diffTime);\n }\n\n gl_FragColor = texture2D(uSampler, texCoord);\n}\n",{center:{type:"v2",value:{x:.5,y:.5}},params:{type:"v3",value:{x:10,y:.8,z:.1}},time:{type:"1f",value:0}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{center:{get:function(){return this.uniforms.center.value},set:function(t){this.uniforms.center.value=t}},params:{get:function(){return this.uniforms.params.value},set:function(t){this.uniforms.params.value=t}},time:{get:function(){return this.uniforms.time.value},set:function(t){this.uniforms.time.value=t}}})},{"../../core":29}],110:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n}\n",{blur:{type:"1f",value:100},gradientBlur:{type:"1f",value:600},start:{type:"v2",value:{x:0,y:window.innerHeight/2}},end:{type:"v2",value:{x:600,y:window.innerHeight/2}},delta:{type:"v2",value:{x:30,y:30}},texSize:{type:"v2",value:{x:window.innerWidth,y:window.innerHeight}}}),this.updateDelta()}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.updateDelta=function(){this.uniforms.delta.value.x=0,this.uniforms.delta.value.y=0},Object.defineProperties(n.prototype,{blur:{get:function(){return this.uniforms.blur.value},set:function(t){this.uniforms.blur.value=t}},gradientBlur:{get:function(){return this.uniforms.gradientBlur.value},set:function(t){this.uniforms.gradientBlur.value=t}},start:{get:function(){return this.uniforms.start.value},set:function(t){this.uniforms.start.value=t,this.updateDelta()}},end:{get:function(){return this.uniforms.end.value},set:function(t){this.uniforms.end.value=t,this.updateDelta()}}})},{"../../core":29}],111:[function(t,e,r){function n(){i.AbstractFilter.call(this),this.tiltShiftXFilter=new o,this.tiltShiftYFilter=new s}var i=t("../../core"),o=t("./TiltShiftXFilter"),s=t("./TiltShiftYFilter");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r){var n=t.filterManager.getRenderTarget(!0);this.tiltShiftXFilter.applyFilter(t,e,n),this.tiltShiftYFilter.applyFilter(t,n,r),t.filterManager.returnRenderTarget(n)},Object.defineProperties(n.prototype,{blur:{get:function(){return this.tiltShiftXFilter.blur},set:function(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}},gradientBlur:{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}},start:{get:function(){return this.tiltShiftXFilter.start},set:function(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}},end:{get:function(){return this.tiltShiftXFilter.end},set:function(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}}})},{"../../core":29,"./TiltShiftXFilter":112,"./TiltShiftYFilter":113}],112:[function(t,e,r){function n(){i.call(this)}var i=t("./TiltShiftAxisFilter");n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=t/r,this.uniforms.delta.value.y=e/r}},{"./TiltShiftAxisFilter":110}],113:[function(t,e,r){function n(){i.call(this)}var i=t("./TiltShiftAxisFilter");n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=-e/r,this.uniforms.delta.value.y=t/r}},{"./TiltShiftAxisFilter":110}],114:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord - offset;\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratio = (radius - dist) / radius;\n float angleMod = ratio * ratio * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n gl_FragColor = texture2D(uSampler, coord+offset);\n}\n",{radius:{type:"1f",value:.5},angle:{type:"1f",value:5},offset:{type:"v2",value:{x:.5,y:.5}}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{offset:{get:function(){return this.uniforms.offset.value},set:function(t){this.uniforms.offset.value=t}},radius:{get:function(){return this.uniforms.radius.value},set:function(t){this.uniforms.radius.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},{"../../core":29}],115:[function(t,e,r){function n(){this.global=new i.Point,this.target=null,this.originalEvent=null}var i=t("../core");n.prototype.constructor=n,e.exports=n,n.prototype.getLocalPosition=function(t,e,r){var n=t.worldTransform,o=r?r:this.global,s=n.a,a=n.c,h=n.tx,l=n.b,u=n.d,c=n.ty,f=1/(s*u+a*-l);return e=e||new i.Point,e.x=u*f*o.x+-a*f*o.x+(c*a-h*u)*f,e.y=s*f*o.y+-l*f*o.y+(-c*s+h*l)*f,e}},{"../core":29}],116:[function(t,e,r){function n(t,e){e=e||{},this.renderer=t,this.autoPreventDefault=void 0!==e.autoPreventDefault?e.autoPreventDefault:!0,this.interactionFrequency=e.interactionFrequency||10,this.mouse=new o,this.eventData={stopped:!1,target:null,type:null,data:this.mouse,stopPropagation:function(){this.stopped=!0}},this.interactiveDataPool=[],this.interactionDOMElement=null,this.eventsAdded=!1,this.onMouseUp=this.onMouseUp.bind(this),this.processMouseUp=this.processMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.processMouseDown=this.processMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.processMouseMove=this.processMouseMove.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.processMouseOverOut=this.processMouseOverOut.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.processTouchStart=this.processTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.processTouchEnd=this.processTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.processTouchMove=this.processTouchMove.bind(this),this.last=0,this.currentCursorStyle="inherit",this._tempPoint=new i.Point,this.resolution=1,this.setTargetElement(this.renderer.view,this.renderer.resolution)}var i=t("../core"),o=t("./InteractionData");Object.assign(i.DisplayObject.prototype,t("./interactiveTarget")),n.prototype.constructor=n,e.exports=n,n.prototype.setTargetElement=function(t,e){this.removeEvents(),this.interactionDOMElement=t,this.resolution=e||1,this.addEvents()},n.prototype.addEvents=function(){this.interactionDOMElement&&(i.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"),window.document.addEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!0)},n.prototype.removeEvents=function(){this.interactionDOMElement&&(i.ticker.shared.remove(this.update),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""),window.document.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!1)},n.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime=0;a--)!s&&n?s=this.processInteractive(t,o[a],r,!0,i):this.processInteractive(t,o[a],r,!1,!1);return i&&(n&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),s=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(s=e.containsPoint(t))),e.interactive&&r(e,s)),s},n.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0)},n.prototype.processMouseDown=function(t,e){var r=this.mouse.originalEvent,n=2===r.button||3===r.which;e&&(t[n?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,n?"rightdown":"mousedown",this.eventData))},n.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0)},n.prototype.processMouseUp=function(t,e){var r=this.mouse.originalEvent,n=2===r.button||3===r.which,i=n?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,n?"rightup":"mouseup",this.eventData),t[i]&&(t[i]=!1,this.dispatchEvent(t,n?"rightclick":"click",this.eventData))):t[i]&&(t[i]=!1,this.dispatchEvent(t,n?"rightupoutside":"mouseupoutside",this.eventData))},n.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor="inherit",this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},n.prototype.processMouseMove=function(t,e){this.dispatchEvent(t,"mousemove",this.eventData),this.processMouseOverOut(t,e)},n.prototype.onMouseOut=function(t){this.mouse.originalEvent=t,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor="inherit",this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1)},n.prototype.processMouseOverOut=function(t,e){e?(t._over||(t._over=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._over&&(t._over=!1,this.dispatchEvent(t,"mouseout",this.eventData))},n.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,n=0;r>n;n++){var i=e[n],o=this.getTouchData(i);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchStart,!0),this.returnTouchData(o)}},n.prototype.processTouchStart=function(t,e){e&&(t._touchDown=!0,this.dispatchEvent(t,"touchstart",this.eventData))},n.prototype.onTouchEnd=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,n=0;r>n;n++){var i=e[n],o=this.getTouchData(i);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchEnd,!0),this.returnTouchData(o)}},n.prototype.processTouchEnd=function(t,e){e?(this.dispatchEvent(t,"touchend",this.eventData),t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"tap",this.eventData))):t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"touchendoutside",this.eventData))},n.prototype.onTouchMove=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,n=0;r>n;n++){var i=e[n],o=this.getTouchData(i);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchMove,!1),this.returnTouchData(o)}},n.prototype.processTouchMove=function(t,e){e=e,this.dispatchEvent(t,"touchmove",this.eventData)},n.prototype.getTouchData=function(t){var e=this.interactiveDataPool.pop();return e||(e=new o),e.identifier=t.identifier,this.mapPositionToPoint(e.global,t.clientX,t.clientY),navigator.isCocoonJS&&(e.global.x=e.global.x/this.resolution,e.global.y=e.global.y/this.resolution),t.globalX=e.global.x,t.globalY=e.global.y,e},n.prototype.returnTouchData=function(t){this.interactiveDataPool.push(t)},n.prototype.destroy=function(){this.removeEvents(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactiveDataPool=null,this.interactionDOMElement=null,this.onMouseUp=null,this.processMouseUp=null,this.onMouseDown=null,this.processMouseDown=null,this.onMouseMove=null,this.processMouseMove=null,this.onMouseOut=null,this.processMouseOverOut=null,this.onTouchStart=null,this.processTouchStart=null,this.onTouchEnd=null,this.processTouchEnd=null,this.onTouchMove=null,this.processTouchMove=null,this._tempPoint=null},i.WebGLRenderer.registerPlugin("interaction",n),i.CanvasRenderer.registerPlugin("interaction",n)},{"../core":29,"./InteractionData":115,"./interactiveTarget":118}],117:[function(t,e,r){e.exports={InteractionData:t("./InteractionData"),InteractionManager:t("./InteractionManager"),interactiveTarget:t("./interactiveTarget")}},{"./InteractionData":115,"./InteractionManager":116,"./interactiveTarget":118}],118:[function(t,e,r){var n={interactive:!1,buttonMode:!1,interactiveChildren:!0,defaultCursor:"pointer",_over:!1,_touchDown:!1};e.exports=n},{}],119:[function(t,e,r){function n(t,e){var r={},n=t.data.getElementsByTagName("info")[0],i=t.data.getElementsByTagName("common")[0];r.font=n.getAttribute("face"),r.size=parseInt(n.getAttribute("size"),10),r.lineHeight=parseInt(i.getAttribute("lineHeight"),10),r.chars={};for(var a=t.data.getElementsByTagName("char"),h=0;hi;i++){var o=2*i;this._renderCanvasDrawTriangle(t,e,r,o,o+2,o+4)}},n.prototype._renderCanvasTriangles=function(t){for(var e=this.vertices,r=this.uvs,n=this.indices,i=n.length,o=0;i>o;o+=3){var s=2*n[o],a=2*n[o+1],h=2*n[o+2];this._renderCanvasDrawTriangle(t,e,r,s,a,h)}},n.prototype._renderCanvasDrawTriangle=function(t,e,r,n,i,o){var s=this._texture.baseTexture.source,a=this._texture.baseTexture.width,h=this._texture.baseTexture.height,l=e[n],u=e[i],c=e[o],f=e[n+1],d=e[i+1],p=e[o+1],g=r[n]*a,A=r[i]*a,v=r[o]*a,m=r[n+1]*h,y=r[i+1]*h,x=r[o+1]*h;if(this.canvasPadding>0){var w=this.canvasPadding/this.worldTransform.a,E=this.canvasPadding/this.worldTransform.d,C=(l+u+c)/3,b=(f+d+p)/3,B=l-C,T=f-b,D=Math.sqrt(B*B+T*T);l=C+B/D*(D+w),f=b+T/D*(D+E),B=u-C,T=d-b,D=Math.sqrt(B*B+T*T),u=C+B/D*(D+w),d=b+T/D*(D+E),B=c-C,T=p-b,D=Math.sqrt(B*B+T*T),c=C+B/D*(D+w),p=b+T/D*(D+E)}t.save(),t.beginPath(),t.moveTo(l,f),t.lineTo(u,d),t.lineTo(c,p),t.closePath(),t.clip();var M=g*y+m*v+A*x-y*v-m*A-g*x,P=l*y+m*c+u*x-y*c-m*u-l*x,R=g*u+l*v+A*c-u*v-l*A-g*c,I=g*y*c+m*u*v+l*A*x-l*y*v-m*A*c-g*u*x,S=f*y+m*p+d*x-y*p-m*d-f*x,O=g*d+f*v+A*p-d*v-f*A-g*p,F=g*y*p+m*d*v+f*A*x-f*y*v-m*A*p-g*d*x;t.transform(P/M,S/M,R/M,O/M,I/M,F/M),t.drawImage(s,0,0),t.restore()},n.prototype.renderMeshFlat=function(t){var e=this.context,r=t.vertices,n=r.length/2;e.beginPath();for(var i=1;n-2>i;i++){var o=2*i,s=r[o],a=r[o+2],h=r[o+4],l=r[o+1],u=r[o+3],c=r[o+5];e.moveTo(s,l),e.lineTo(a,u),e.lineTo(h,c)}e.fillStyle="#FF0000",e.fill(),e.closePath()},n.prototype._onTextureUpdate=function(){this.updateFrame=!0},n.prototype.getBounds=function(t){if(!this._currentBounds){for(var e=t||this.worldTransform,r=e.a,n=e.b,o=e.c,s=e.d,a=e.tx,h=e.ty,l=-(1/0),u=-(1/0),c=1/0,f=1/0,d=this.vertices,p=0,g=d.length;g>p;p+=2){var A=d[p],v=d[p+1],m=r*A+o*v+a,y=s*v+n*A+h;c=c>m?m:c,f=f>y?y:f,l=m>l?m:l,u=y>u?y:u}if(c===-(1/0)||u===1/0)return i.Rectangle.EMPTY;var x=this._bounds;x.x=c,x.width=l-c,x.y=f,x.height=u-f,this._currentBounds=x}return this._currentBounds},n.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,o);var e,r,i=this.vertices,a=s.points;if(this.drawMode===n.DRAW_MODES.TRIANGLES){var h=this.indices;for(r=this.indices.length,e=0;r>e;e+=3){var l=2*h[e],u=2*h[e+1],c=2*h[e+2];if(a[0]=i[l],a[1]=i[l+1],a[2]=i[u],a[3]=i[u+1],a[4]=i[c],a[5]=i[c+1],s.contains(o.x,o.y))return!0}}else for(r=i.length,e=0;r>e;e+=6)if(a[0]=i[e],a[1]=i[e+1],a[2]=i[e+2],a[3]=i[e+3],a[4]=i[e+4],a[5]=i[e+5],s.contains(o.x,o.y))return!0;return!1},n.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},{"../core":29}],125:[function(t,e,r){function n(t,e){i.call(this,t),this.points=e,this.vertices=new Float32Array(4*e.length),this.uvs=new Float32Array(4*e.length),this.colors=new Float32Array(2*e.length), -this.indices=new Uint16Array(2*e.length),this._ready=!0,this.refresh()}var i=t("./Mesh"),o=t("../core");n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){var e=this.uvs,r=this.indices,n=this.colors,i=this._texture._uvs,s=new o.Point(i.x0,i.y0),a=new o.Point(i.x2-i.x0,i.y2-i.y0);e[0]=0+s.x,e[1]=0+s.y,e[2]=0+s.x,e[3]=1*a.y+s.y,n[0]=1,n[1]=1,r[0]=0,r[1]=1;for(var h,l,u,c=t.length,f=1;c>f;f++)h=t[f],l=4*f,u=f/(c-1),e[l]=u*a.x+s.x,e[l+1]=0+s.y,e[l+2]=u*a.x+s.x,e[l+3]=1*a.y+s.y,l=2*f,n[l]=1,n[l+1]=1,l=2*f,r[l]=l,r[l+1]=l+1;this.dirty=!0}},n.prototype._onTextureUpdate=function(){i.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},n.prototype.updateTransform=function(){var t=this.points;if(!(t.length<1)){for(var e,r,n,i,o,s,a=t[0],h=0,l=0,u=this.vertices,c=t.length,f=0;c>f;f++)r=t[f],n=4*f,e=f1&&(i=1),o=Math.sqrt(h*h+l*l),s=this._texture.height/2,h/=o,l/=o,h*=s,l*=s,u[n]=r.x+h,u[n+1]=r.y+l,u[n+2]=r.x-h,u[n+3]=r.y-l,a=r;this.containerUpdateTransform()}}},{"../core":29,"./Mesh":124}],126:[function(t,e,r){e.exports={Mesh:t("./Mesh"),Rope:t("./Rope"),MeshRenderer:t("./webgl/MeshRenderer"),MeshShader:t("./webgl/MeshShader")}},{"./Mesh":124,"./Rope":125,"./webgl/MeshRenderer":127,"./webgl/MeshShader":128}],127:[function(t,e,r){function n(t){i.ObjectRenderer.call(this,t),this.indices=new Uint16Array(15e3);for(var e=0,r=0;15e3>e;e+=6,r+=4)this.indices[e+0]=r+0,this.indices[e+1]=r+1,this.indices[e+2]=r+2,this.indices[e+3]=r+0,this.indices[e+4]=r+2,this.indices[e+5]=r+3}var i=t("../../core"),o=t("../Mesh");n.prototype=Object.create(i.ObjectRenderer.prototype),n.prototype.constructor=n,e.exports=n,i.WebGLRenderer.registerPlugin("mesh",n),n.prototype.onContextChange=function(){},n.prototype.render=function(t){t._vertexBuffer||this._initWebGL(t);var e=this.renderer,r=e.gl,n=t._texture.baseTexture,i=e.shaderManager.plugins.meshShader,s=t.drawMode===o.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;e.blendModeManager.setBlendMode(t.blendMode),r.uniformMatrix3fv(i.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),r.uniformMatrix3fv(i.uniforms.projectionMatrix._location,!1,e.currentRenderTarget.projectionMatrix.toArray(!0)),r.uniform1f(i.uniforms.alpha._location,t.worldAlpha),t.dirty?(t.dirty=!1,r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferData(r.ARRAY_BUFFER,t.vertices,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.bufferData(r.ARRAY_BUFFER,t.uvs,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.indices,r.STATIC_DRAW)):(r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferSubData(r.ARRAY_BUFFER,0,t.vertices),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,t.indices)),r.drawElements(s,t.indices.length,r.UNSIGNED_SHORT,0)},n.prototype._initWebGL=function(t){var e=this.renderer.gl;t._vertexBuffer=e.createBuffer(),t._indexBuffer=e.createBuffer(),t._uvBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,t.vertices,e.DYNAMIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,t._uvBuffer),e.bufferData(e.ARRAY_BUFFER,t.uvs,e.STATIC_DRAW),t.colors&&(t._colorBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._colorBuffer),e.bufferData(e.ARRAY_BUFFER,t.colors,e.STATIC_DRAW)),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,t.indices,e.STATIC_DRAW)},n.prototype.flush=function(){},n.prototype.start=function(){var t=this.renderer.shaderManager.plugins.meshShader;this.renderer.shaderManager.setShader(t)},n.prototype.destroy=function(){}},{"../../core":29,"../Mesh":124}],128:[function(t,e,r){function n(t){i.Shader.call(this,t,["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","uniform float alpha;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * alpha ;","}"].join("\n"),{alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aTextureCoord:0})}var i=t("../../core");n.prototype=Object.create(i.Shader.prototype),n.prototype.constructor=n,e.exports=n,i.ShaderManager.registerPlugin("meshShader",n)},{"../../core":29}],129:[function(t,e,r){Object.assign||(Object.assign=t("object-assign"))},{"object-assign":12}],130:[function(t,e,r){t("./Object.assign"),t("./requestAnimationFrame")},{"./Object.assign":129,"./requestAnimationFrame":131}],131:[function(t,e,r){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),n=["ms","moz","webkit","o"],i=0;in&&(n=0),r=e,setTimeout(function(){r=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.html2canvas=t()}}(function(){var t;return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var h="function"==typeof require&&require;if(!a&&h)return h(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[s]={exports:{}};t[s][0].call(u.exports,function(e){var r=t[s][1][e];return i(r?r:e)},u,u.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;st;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}V=0}function A(){try{var t=e,r=t("vertx");return J=r.runOnLoop||r.runOnContext,c()}catch(n){return p()}}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function x(t){try{return t.then}catch(e){return st.error=e,st}}function w(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function E(t,e,r){Z(function(t){var n=!1,i=w(r,e,function(r){n||(n=!0,e!==r?B(t,r):D(t,r))},function(e){n||(n=!0,M(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,M(t,i))},t)}function C(t,e){e._state===it?D(t,e._result):e._state===ot?M(t,e._result):P(e,void 0,function(e){B(t,e)},function(e){M(t,e)})}function b(t,e){if(e.constructor===t.constructor)C(t,e);else{var r=x(e);r===st?M(t,st.error):void 0===r?D(t,e):s(r)?E(t,e,r):D(t,e)}}function B(t,e){t===e?M(t,m()):o(e)?b(t,e):D(t,e)}function T(t){t._onerror&&t._onerror(t._result),R(t)}function D(t,e){t._state===nt&&(t._result=e,t._state=it,0!==t._subscribers.length&&Z(R,t))}function M(t,e){t._state===nt&&(t._state=ot,t._result=e,Z(T,t))}function P(t,e,r,n){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+it]=r,i[o+ot]=n,0===o&&t._state&&Z(R,t)}function R(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,o=t._result,s=0;ss;s++)P(n.resolve(t[s]),void 0,e,r);return i}function H(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var r=new e(v);return B(r,t),r}function k(t){var e=this,r=new e(v);return M(r,t),r}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Y(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function j(t){this._id=dt++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(s(t)||G(),this instanceof j||Y(),F(this,t))}function z(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(t.Promise=pt)}var U;U=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var J,X,W,K=U,V=0,Z=({}.toString,function(t,e){rt[V]=t,rt[V+1]=e,V+=2,2===V&&(X?X(g):W())}),q="undefined"!=typeof window?window:void 0,_=q||{},$=_.MutationObserver||_.WebKitMutationObserver,tt="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);W=tt?u():$?f():et?d():void 0===q&&"function"==typeof e?A():p();var nt=void 0,it=1,ot=2,st=new I,at=new I;Q.prototype._validateInput=function(t){return K(t)},Q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},Q.prototype._init=function(){this._result=new Array(this.length)};var ht=Q;Q.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===nt&&e>i;i++)t._eachEntry(n[i],i)},Q.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;a(t)?t.constructor===n&&t._state!==nt?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},Q.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===nt&&(n._remaining--,t===ot?M(i,r):n._result[e]=r),0===n._remaining&&D(i,n._result)},Q.prototype._willSettleAt=function(t,e){var r=this;P(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(ot,e,t)})};var lt=L,ut=N,ct=H,ft=k,dt=0,pt=j;j.all=lt,j.race=ut,j.resolve=ct,j.reject=ft,j._setScheduler=h,j._setAsap=l,j._asap=Z,j.prototype={constructor:j,then:function(t,e){var r=this,n=r._state;if(n===it&&!t||n===ot&&!e)return this;var i=new this.constructor(v),o=r._result;if(n){var s=arguments[n-1];Z(function(){O(n,i,s,o)})}else P(r,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var gt=z,At={Promise:pt,polyfill:gt};"function"==typeof t&&t.amd?t(function(){return At}):"undefined"!=typeof r&&r.exports?r.exports=At:"undefined"!=typeof this&&(this.ES6Promise=At),gt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:2}],2:[function(t,e,r){function n(){u=!1,a.length?l=a.concat(l):c=-1,l.length&&i()}function i(){if(!u){var t=setTimeout(n);u=!0;for(var e=l.length;e;){for(a=l,l=[];++c1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(O,".");var i=t.split("."),o=s(i,e).join(".");return n+o}function h(t){for(var e,r,n=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function l(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function u(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:C}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?L(t/D):t>>1,t+=L(t/e);t>Q*B>>1;n+=C)t=L(t/Q);return L(n+(Q+1)*t/(t+T))}function d(t){var e,r,n,i,s,a,h,c,d,p,g=[],A=t.length,v=0,m=P,y=M;for(r=t.lastIndexOf(R),0>r&&(r=0),n=0;r>n;++n)t.charCodeAt(n)>=128&&o("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;A>i;){for(s=v,a=1,h=C;i>=A&&o("invalid-input"),c=u(t.charCodeAt(i++)),(c>=C||c>L((E-v)/a))&&o("overflow"),v+=c*a,d=y>=h?b:h>=y+B?B:h-y,!(d>c);h+=C)p=C-d,a>L(E/p)&&o("overflow"),a*=p;e=g.length+1,y=f(v-s,e,0==s),L(v/e)>E-m&&o("overflow"),m+=L(v/e),v%=e,g.splice(v++,0,m)}return l(g)}function p(t){var e,r,n,i,s,a,l,u,d,p,g,A,v,m,y,x=[];for(t=h(t),A=t.length,e=P,r=0,s=M,a=0;A>a;++a)g=t[a],128>g&&x.push(N(g));for(n=i=x.length,i&&x.push(R);A>n;){for(l=E,a=0;A>a;++a)g=t[a],g>=e&&l>g&&(l=g);for(v=n+1,l-e>L((E-r)/v)&&o("overflow"),r+=(l-e)*v,e=l,a=0;A>a;++a)if(g=t[a],e>g&&++r>E&&o("overflow"),g==e){for(u=r,d=C;p=s>=d?b:d>=s+B?B:d-s,!(p>u);d+=C)y=u-p,m=C-p,x.push(N(c(p+y%m,0))),u=L(y/m);x.push(N(c(u,0))),s=f(r,v,n==i),r=0,++n}++r,++e}return x.join("")}function g(t){return a(t,function(t){return I.test(t)?d(t.slice(4).toLowerCase()):t})}function A(t){return a(t,function(t){return S.test(t)?"xn--"+p(t):t})}var v="object"==typeof n&&n&&!n.nodeType&&n,m="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof e&&e;(y.global===y||y.window===y||y.self===y)&&(i=y);var x,w,E=2147483647,C=36,b=1,B=26,T=38,D=700,M=72,P=128,R="-",I=/^xn--/,S=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Q=C-b,L=Math.floor,N=String.fromCharCode;if(x={version:"1.3.2",ucs2:{decode:h,encode:l},decode:d,encode:p,toASCII:A,toUnicode:g},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&m)if(r.exports==v)m.exports=x;else for(w in x)x.hasOwnProperty(w)&&(v[w]=x[w]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,e,r){function n(t,e,r){!t.defaultView||e===t.defaultView.pageXOffset&&r===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,r)}function i(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(r){a("Unable to copy canvas content from",t,r)}}function o(t,e){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),n=t.firstChild;n;)(e===!0||1!==n.nodeType||"SCRIPT"!==n.nodeName)&&r.appendChild(o(n,e)),n=n.nextSibling;return 1===t.nodeType&&"BODY"!==t.tagName&&(r._scrollTop=t.scrollTop,r._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?i(t,r):("TEXTAREA"===t.nodeName||"SELECT"===t.nodeName)&&(r.value=t.value)),r}function s(t){if(1===t.nodeType){t.scrollTop=t._scrollTop,t.scrollLeft=t._scrollLeft;for(var e=t.firstChild;e;)s(e),e=e.nextSibling}}var a=t("./log"),h=t("./promise");e.exports=function(t,e,r,i,a,l,u){var c=o(t.documentElement,a.javascriptEnabled),f=e.createElement("iframe");return f.className="html2canvas-container",f.style.visibility="hidden",f.style.position="fixed",f.style.left="-10000px",f.style.top="0px",f.style.border="0",f.width=r,f.height=i,f.scrolling="no",e.body.appendChild(f),new h(function(e){var r=f.contentWindow.document;f.contentWindow.onload=f.onload=function(){var t=setInterval(function(){r.body.childNodes.length>0&&(s(r.documentElement),clearInterval(t),"view"===a.type&&(f.contentWindow.scrollTo(l,u),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||f.contentWindow.scrollY===u&&f.contentWindow.scrollX===l||(r.documentElement.style.top=-u+"px",r.documentElement.style.left=-l+"px",r.documentElement.style.position="absolute")),e(f))},50)},r.open(),r.write(""),n(t,l,u),r.replaceChild(r.adoptNode(c),r.documentElement),r.close()})}},{"./log":15,"./promise":18}],5:[function(t,e,r){function n(t){this.r=0,this.g=0,this.b=0,this.a=null;this.fromArray(t)||this.namedColor(t)||this.rgb(t)||this.rgba(t)||this.hex6(t)||this.hex3(t)}n.prototype.darken=function(t){var e=1-t;return new n([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(t){return Array.isArray(t)&&(this.r=Math.min(t[0],255),this.g=Math.min(t[1],255),this.b=Math.min(t[2],255),t.length>3&&(this.a=t[3])),Array.isArray(t)};var i=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(t){var e=null;return null!==(e=t.match(i))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(t){var e=null;return null!==(e=t.match(o))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var s=/^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;n.prototype.rgb=function(t){var e=null;return null!==(e=t.match(s))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var a=/^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;n.prototype.rgba=function(t){var e=null;return null!==(e=t.match(a))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(t){var e=h[t.toLowerCase()];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t.toLowerCase())return this.r=this.g=this.b=this.a=0,!0;return!!e},n.prototype.isColor=!0;var h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};e.exports=n},{}],6:[function(t,e,r){function n(t,e){var r=C++;if(e=e||{},e.logging&&(window.html2canvas.logging=!0,window.html2canvas.start=Date.now()),e.async="undefined"==typeof e.async?!0:e.async,e.allowTaint="undefined"==typeof e.allowTaint?!1:e.allowTaint,e.removeContainer="undefined"==typeof e.removeContainer?!0:e.removeContainer,e.javascriptEnabled="undefined"==typeof e.javascriptEnabled?!1:e.javascriptEnabled,e.imageTimeout="undefined"==typeof e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"==typeof e.renderer?e.renderer:d,e.strict=!!e.strict,"string"==typeof t){if("string"!=typeof e.proxy)return c.reject("Proxy must be used when rendering url");var n=null!=e.width?e.width:window.innerWidth,s=null!=e.height?e.height:window.innerHeight;return x(u(t),e.proxy,document,n,s,e).then(function(t){return o(t.contentWindow.document.documentElement,t,e,n,s)})}var a=(void 0===t?[document.documentElement]:t.length?t:[t])[0];return a.setAttribute(E+r,r),i(a.ownerDocument,e,a.ownerDocument.defaultView.innerWidth,a.ownerDocument.defaultView.innerHeight,r).then(function(t){return"function"==typeof e.onrendered&&(v("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),e.onrendered(t)),t})}function i(t,e,r,n,i){return y(t,t,r,n,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then(function(s){v("Document cloned");var a=E+i,h="["+a+"='"+i+"']";t.querySelector(h).removeAttribute(a);var l=s.contentWindow,u=l.document.querySelector(h);"0"===u.style.opacity&&"webgl"===u.getAttribute("renderer")?u.style.opacity=1:null;var f="function"==typeof e.onclone?c.resolve(e.onclone(l.document)):c.resolve(!0);return f.then(function(){return o(u,s,e,r,n)})})}function o(t,e,r,n,i){var o=e.contentWindow,u=new f(o.document),c=new p(r,u),d=w(t),A="view"===r.type?n:h(o.document),m="view"===r.type?i:l(o.document),y=new r.renderer(A,m,c,r,document),x=new g(t,y,u,c,r);return x.ready.then(function(){v("Finished rendering");var n;return"view"===r.type?n=a(y.canvas,{width:y.canvas.width,height:y.canvas.height,top:0,left:0,x:0,y:0}):t===o.document.body||t===o.document.documentElement||null!=r.canvas?n=y.canvas:(1!==window.devicePixelRatio&&(d.top=d.top*window.devicePixelRatio,d.left=d.left*window.devicePixelRatio,d.right=d.right*window.devicePixelRatio,d.bottom=d.bottom*window.devicePixelRatio),n=a(y.canvas,{width:null!=r.width?r.width:d.width,height:null!=r.height?r.height:d.height,top:d.top,left:d.left,x:o.pageXOffset,y:o.pageYOffset})),s(e,r),n})}function s(t,e){e.removeContainer&&(t.parentNode.removeChild(t),v("Cleaned up container"))}function a(t,e){var r=document.createElement("canvas"),n=Math.min(t.width-1,Math.max(0,e.left)),i=Math.min(t.width,Math.max(1,e.left+e.width)),o=Math.min(t.height-1,Math.max(0,e.top)),s=Math.min(t.height,Math.max(1,e.top+e.height));return r.width=e.width,r.height=e.height,v("Cropping canvas at:","left:",e.left,"top:",e.top,"width:",i-n,"height:",s-o),v("Resulting crop with width",e.width,"and height",e.height," with x",n,"and y",o),r.getContext("2d").drawImage(t,n,o,i-n,s-o,e.x,e.y,i-n,s-o),r}function h(t){return Math.max(Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),Math.max(t.body.offsetWidth,t.documentElement.offsetWidth),Math.max(t.body.clientWidth,t.documentElement.clientWidth))}function l(t){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))}function u(t){var e=document.createElement("a");return e.href=t,e.href=e.href,e}var c=t("./promise"),f=t("./support"),d=t("./renderers/canvas"),p=t("./imageloader"),g=t("./nodeparser"),A=t("./nodecontainer"),v=t("./log"),m=t("./utils"),y=t("./clone"),x=t("./proxy").loadUrlDocument,w=m.getBounds,E="data-html2canvas-node",C=0;n.Promise=c,n.CanvasRenderer=d,n.NodeContainer=A,n.log=v,n.utils=m,e.exports="undefined"==typeof document||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return c.reject("No canvas support")}:n},{"./clone":4,"./imageloader":13,"./log":15,"./nodecontainer":16,"./nodeparser":17,"./promise":18,"./proxy":19,"./renderers/canvas":23,"./support":25,"./utils":29}],7:[function(t,e,r){function n(t){if(this.src=t,o("DummyImageContainer for",t),!this.promise||!this.image){o("Initiating DummyImageContainer"),n.prototype.image=new Image;var e=this.image;n.prototype.promise=new i(function(t,r){e.onload=t,e.onerror=r,e.src=s(),e.complete===!0&&t(e)})}}var i=t("./promise"),o=t("./log"),s=t("./utils").smallImage;e.exports=n},{"./log":15,"./promise":18,"./utils":29}],8:[function(t,e,r){function n(t,e){var r,n,o=document.createElement("div"),s=document.createElement("img"),a=document.createElement("span"),h="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=t,o.style.fontSize=e,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),s.src=i(),s.width=1,s.height=1,s.style.margin=0,s.style.padding=0,s.style.verticalAlign="baseline",a.style.fontFamily=t,a.style.fontSize=e,a.style.margin=0,a.style.padding=0,a.appendChild(document.createTextNode(h)),o.appendChild(a),o.appendChild(s),r=s.offsetTop-a.offsetTop+1,o.removeChild(a),o.appendChild(document.createTextNode(h)),o.style.lineHeight="normal",s.style.verticalAlign="super",n=s.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=r,this.lineWidth=1,this.middle=n}var i=t("./utils").smallImage;e.exports=n},{"./utils":29}],9:[function(t,e,r){function n(){this.data={}}var i=t("./font");n.prototype.getMetrics=function(t,e){return void 0===this.data[t+"-"+e]&&(this.data[t+"-"+e]=new i(t,e)),this.data[t+"-"+e]},e.exports=n},{"./font":8}],10:[function(t,e,r){function n(e,r,n){this.image=null,this.src=e;var i=this,a=s(e);this.promise=(r?new o(function(t){"about:blank"===e.contentWindow.document.URL||null==e.contentWindow.document.documentElement?e.contentWindow.onload=e.onload=function(){t(e)}:t(e)}):this.proxyLoad(n.proxy,a,n)).then(function(e){var r=t("./core");return r(e.contentWindow.document.documentElement,{type:"view",width:e.width,height:e.height,proxy:n.proxy,javascriptEnabled:n.javascriptEnabled,removeContainer:n.removeContainer,allowTaint:n.allowTaint,imageTimeout:n.imageTimeout/2})}).then(function(t){return i.image=t})}var i=t("./utils"),o=t("./promise"),s=i.getBounds,a=t("./proxy").loadUrlDocument;n.prototype.proxyLoad=function(t,e,r){var n=this.src;return a(n.src,t,n.ownerDocument,e.width,e.height,r)},e.exports=n},{"./core":6,"./promise":18,"./proxy":19,"./utils":29}],11:[function(t,e,r){function n(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=i.resolve(!0)}var i=t("./promise");n.prototype.TYPES={LINEAR:1,RADIAL:2},e.exports=n},{"./promise":18}],12:[function(t,e,r){function n(t,e){this.src=t,this.image=new Image;var r=this;this.tainted=null,this.promise=new i(function(n,i){r.image.onload=n,r.image.onerror=i,e&&(r.image.crossOrigin="anonymous"),r.image.src=t,r.image.complete===!0&&n(r.image)})}var i=t("./promise");e.exports=n},{"./promise":18}],13:[function(t,e,r){function n(t,e){this.link=null,this.options=t,this.support=e,this.origin=this.getOrigin(window.location.href)}var i=t("./promise"),o=t("./log"),s=t("./imagecontainer"),a=t("./dummyimagecontainer"),h=t("./proxyimagecontainer"),l=t("./framecontainer"),u=t("./svgcontainer"),c=t("./svgnodecontainer"),f=t("./lineargradientcontainer"),d=t("./webkitgradientcontainer"),p=t("./utils").bind;n.prototype.findImages=function(t){ -var e=[];return t.reduce(function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t},[]).forEach(this.addImage(e,this.loadImage),this),e},n.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},n.prototype.addImage=function(t,e){return function(r){r.args.forEach(function(n){this.imageExists(t,n)||(t.splice(0,0,e.call(this,r)),o("Added image #"+t.length,"string"==typeof n?n.substring(0,100):n))},this)}},n.prototype.hasImageBackground=function(t){return"none"!==t.method},n.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new s(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||this.options.allowTaint===!0||this.isSVG(e)?new s(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new s(e,!0):this.options.proxy?new h(e,this.options.proxy):new a(e):new u(e)}return"linear-gradient"===t.method?new f(t):"gradient"===t.method?new d(t):"svg"===t.method?new c(t.args[0],this.support.svg):"IFRAME"===t.method?new l(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new a(t)},n.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||u.prototype.isInline(t)},n.prototype.imageExists=function(t,e){return t.some(function(t){return t.src===e})},n.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},n.prototype.getOrigin=function(t){var e=this.link||(this.link=document.createElement("a"));return e.href=t,e.href=e.href,e.protocol+e.hostname+e.port},n.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout)["catch"](function(){var e=new a(t.src);return e.promise.then(function(e){t.image=e})})},n.prototype.get=function(t){var e=null;return this.images.some(function(r){return(e=r).src===t})?e:null},n.prototype.fetch=function(t){return this.images=t.reduce(p(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach(function(t,e){t.promise.then(function(){o("Succesfully loaded image #"+(e+1),t)},function(r){o("Failed loading image #"+(e+1),t,r)})}),this.ready=i.all(this.images.map(this.getPromise,this)),o("Finished searching images"),this},n.prototype.timeout=function(t,e){var r,n=i.race([t.promise,new i(function(n,i){r=setTimeout(function(){o("Timed out loading image",t),i(t)},e)})]).then(function(t){return clearTimeout(r),t});return n["catch"](function(){clearTimeout(r)}),n},e.exports=n},{"./dummyimagecontainer":7,"./framecontainer":10,"./imagecontainer":12,"./lineargradientcontainer":14,"./log":15,"./promise":18,"./proxyimagecontainer":20,"./svgcontainer":26,"./svgnodecontainer":27,"./utils":29,"./webkitgradientcontainer":30}],14:[function(t,e,r){function n(t){i.apply(this,arguments),this.type=this.TYPES.LINEAR;var e=null===t.args[0].match(this.stepRegExp);e?t.args[0].split(" ").reverse().forEach(function(t){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var e=this.y0,r=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=r,this.y1=e}},this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map(function(t){var e=t.match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)|\w+)\s*(\d{1,3})?(%|px)?/);return{color:new o(e[1]),stop:"%"===e[3]?e[2]/100:null}},this),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach(function(t,e){null===t.stop&&this.colorStops.slice(e).some(function(r,n){return null!==r.stop?(t.stop=(r.stop-this.colorStops[e-1].stop)/(n+1)+this.colorStops[e-1].stop,!0):!1},this)},this)}var i=t("./gradientcontainer"),o=t("./color");n.prototype=Object.create(i.prototype),n.prototype.stepRegExp=/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/,e.exports=n},{"./color":5,"./gradientcontainer":11}],15:[function(t,e,r){e.exports=function(){window.html2canvas.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-window.html2canvas.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))}},{}],16:[function(t,e,r){function n(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function i(t){var e=t.options[t.selectedIndex||0];return e?e.text||"":""}function o(t){if(t&&"matrix"===t[1])return t[2].split(",").map(function(t){return parseFloat(t.trim())});if(t&&"matrix3d"===t[1]){var e=t[2].split(",").map(function(t){return parseFloat(t.trim())});return[e[0],e[1],e[4],e[5],e[12],e[13]]}}function s(t){return-1!==t.toString().indexOf("%")}function a(t){return t.replace("px","")}function h(t){return parseFloat(t)}var l=t("./color"),u=t("./utils"),c=u.getBounds,f=u.parseBackgrounds,d=u.offsetBounds;n.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},n.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},n.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},n.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},n.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},n.prototype.prefixedCss=function(t){var e=["webkit","moz","ms","o"],r=this.css(t);return void 0===r&&e.some(function(e){return r=this.css(e+t.substr(0,1).toUpperCase()+t.substr(1)),void 0!==r},this),void 0===r?null:r},n.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},n.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},n.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new l(this.css(t)))},n.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},n.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal"}return t},n.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},n.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=f(this.css("backgroundImage")))},n.prototype.cssList=function(t,e){var r=(this.css(t)||"").split(",");return r=r[e||0]||r[0]||"auto",r=r.trim().split(" "),1===r.length&&(r=[r[0],s(r[0])?"auto":r[0]]),r},n.prototype.parseBackgroundSize=function(t,e,r){var n,i,o=this.cssList("backgroundSize",r);if(s(o[0]))n=t.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=t.width/t.height,h=e.width/e.height;return h>a^"contain"===o[0]?{width:t.height*h,height:t.height}:{width:t.width,height:t.width/h}}n=parseInt(o[0],10)}return i="auto"===o[0]&&"auto"===o[1]?e.height:"auto"===o[1]?n/e.width*e.height:s(o[1])?t.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=i/e.height*e.width),{width:n,height:i}},n.prototype.parseBackgroundPosition=function(t,e,r,n){var i,o,a=this.cssList("backgroundPosition",r);return i=s(a[0])?(t.width-(n||e).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?i/e.width*e.height:s(a[1])?(t.height-(n||e).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(i=o/e.height*e.width),{left:i,top:o}},n.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},n.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var r=t.match(this.TEXT_SHADOW_PROPERTY),n=0;r&&n0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())},this))},this))}function i(t){return t.parent&&t.parent.clip.length}function o(t){return t.replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")})}function s(){}function a(t,e,r,n){return t.map(function(i,o){if(i.width>0){var s=e.left,a=e.top,h=e.width,l=e.height-t[2].width;switch(o){case 0:l=t[0].width,i.args=c({c1:[s,a],c2:[s+h,a],c3:[s+h-t[1].width,a+l],c4:[s+t[3].width,a+l]},n[0],n[1],r.topLeftOuter,r.topLeftInner,r.topRightOuter,r.topRightInner);break;case 1:s=e.left+e.width-t[1].width,h=t[1].width,i.args=c({c1:[s+h,a],c2:[s+h,a+l+t[2].width],c3:[s,a+l],c4:[s,a+t[0].width]},n[1],n[2],r.topRightOuter,r.topRightInner,r.bottomRightOuter,r.bottomRightInner);break;case 2:a=a+e.height-t[2].width,l=t[2].width,i.args=c({c1:[s+h,a+l],c2:[s,a+l],c3:[s+t[3].width,a],c4:[s+h-t[3].width,a]},n[2],n[3],r.bottomRightOuter,r.bottomRightInner,r.bottomLeftOuter,r.bottomLeftInner);break;case 3:h=t[3].width,i.args=c({c1:[s,a+l+t[2].width],c2:[s,a],c3:[s+h,a+t[0].width],c4:[s+h,a+l]},n[3],n[0],r.bottomLeftOuter,r.bottomLeftInner,r.topLeftOuter,r.topLeftInner)}}return i})}function h(t,e,r,n){var i=4*((Math.sqrt(2)-1)/3),o=r*i,s=n*i,a=t+r,h=e+n;return{topLeft:u({x:t,y:h},{x:t,y:h-s},{x:a-o,y:e},{x:a,y:e}),topRight:u({x:t,y:e},{x:t+o,y:e},{x:a,y:h-s},{x:a,y:h}),bottomRight:u({x:a,y:e},{x:a,y:e+s},{x:t+o,y:h},{x:t,y:h}),bottomLeft:u({x:a,y:h},{x:a-o,y:h},{x:t,y:e+s},{x:t,y:e})}}function l(t,e,r){var n=t.left,i=t.top,o=t.width,s=t.height,a=e[0][0],l=e[0][1],u=e[1][0],c=e[1][1],f=e[2][0],d=e[2][1],p=e[3][0],g=e[3][1],A=o-u,v=s-d,m=o-f,y=s-g;return{topLeftOuter:h(n,i,a,l).topLeft.subdivide(.5),topLeftInner:h(n+r[3].width,i+r[0].width,Math.max(0,a-r[3].width),Math.max(0,l-r[0].width)).topLeft.subdivide(.5),topRightOuter:h(n+A,i,u,c).topRight.subdivide(.5),topRightInner:h(n+Math.min(A,o+r[3].width),i+r[0].width,A>o+r[3].width?0:u-r[3].width,c-r[0].width).topRight.subdivide(.5),bottomRightOuter:h(n+m,i+v,f,d).bottomRight.subdivide(.5),bottomRightInner:h(n+Math.min(m,o-r[3].width),i+Math.min(v,s+r[0].width),Math.max(0,f-r[1].width),d-r[2].width).bottomRight.subdivide(.5),bottomLeftOuter:h(n,i+y,p,g).bottomLeft.subdivide(.5),bottomLeftInner:h(n+r[3].width,i+y,Math.max(0,p-r[3].width),g-r[2].width).bottomLeft.subdivide(.5)}}function u(t,e,r,n){var i=function(t,e,r){return{x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r}};return{start:t,startControl:e,endControl:r,end:n,subdivide:function(o){var s=i(t,e,o),a=i(e,r,o),h=i(r,n,o),l=i(s,a,o),c=i(a,h,o),f=i(l,c,o);return[u(t,s,l,f),u(f,c,h,n)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,r.x,r.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",r.x,r.y,e.x,e.y,t.x,t.y])}}}function c(t,e,r,n,i,o,s){var a=[];return e[0]>0||e[1]>0?(a.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(a)):a.push(["line",t.c1[0],t.c1[1]]),r[0]>0||r[1]>0?(a.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(a),a.push(["line",s[0].end.x,s[0].end.y]),s[0].curveToReversed(a)):(a.push(["line",t.c2[0],t.c2[1]]),a.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(a.push(["line",i[1].end.x,i[1].end.y]),i[1].curveToReversed(a)):a.push(["line",t.c4[0],t.c4[1]]),a}function f(t,e,r,n,i,o,s){e[0]>0||e[1]>0?(t.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(t),n[1].curveTo(t)):t.push(["line",o,s]),(r[0]>0||r[1]>0)&&t.push(["line",i[0].start.x,i[0].start.y])}function d(t){return t.cssInt("zIndex")<0}function p(t){return t.cssInt("zIndex")>0}function g(t){return 0===t.cssInt("zIndex")}function A(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function v(t){return t instanceof K}function m(t){return t.node.data.trim().length>0}function y(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function x(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(e){var r=t.css("border"+e+"Radius"),n=r.split(" ");return n.length<=1&&(n[1]=n[0]),n.map(S)})}function w(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function E(t){var e=t.css("position"),r=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==r}function C(t){return"static"!==t.css("position")}function b(t){return"none"!==t.css("float")}function B(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function T(t){var e=this;return function(){return!t.apply(e,arguments)}}function D(t){return t.node.nodeType===Node.ELEMENT_NODE}function M(t){return t.isPseudoElement===!0}function P(t){return t.node.nodeType===Node.TEXT_NODE}function R(t){return function(e,r){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(r.cssInt("zIndex")+t.indexOf(r)/t.length)}}function I(t){return t.getOpacity()<1}function S(t){return parseInt(t,10)}function O(t){return t.width}function F(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function Q(t){return[].concat.apply([],t)}function L(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}function N(t){for(var e,r=[],n=0,i=!1;t.length;)H(t[n])===i?(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)),i=!i,n=0):n++,n>=t.length&&(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)));return r}function H(t){return-1!==[32,13,10,9,45].indexOf(t)}function k(t){return/[^\u0000-\u00ff]/.test(t)}var G=t("./log"),Y=t("punycode"),j=t("./nodecontainer"),z=t("./textcontainer"),U=t("./pseudoelementcontainer"),J=t("./fontmetrics"),X=t("./color"),W=t("./promise"),K=t("./stackingcontext"),V=t("./utils"),Z=V.bind,q=V.getBounds,_=V.parseBackgrounds,$=V.offsetBounds;n.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(t){if(D(t)){M(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],r=t.parseClip();r&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+r.left,t.bounds.top+r.top,r.right-r.left,r.bottom-r.top]]),t.clip=i(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,M(t)&&t.cleanDOM()}else P(t)&&(t.clip=i(t)?t.parent.clip:[]);M(t)||(t.bounds=null)},this)},n.prototype.asyncRenderer=function(t,e,r){r=r||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():r+20>Date.now()?this.asyncRenderer(t,e,r):setTimeout(Z(function(){this.asyncRenderer(t,e)},this),0)},n.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},n.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},n.prototype.createStyles=function(t,e){var r=t.createElement("style");r.innerHTML=e,t.body.appendChild(r)},n.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var r=this.getPseudoElement(t,":before"),n=this.getPseudoElement(t,":after");r&&e.push(r),n&&e.push(n)}return Q(e)},n.prototype.getPseudoElement=function(t,e){var r=t.computedStyle(e);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var n=L(r.content),i="url"===n.substr(0,3),s=document.createElement(i?"img":"html2canvaspseudoelement"),a=new U(s,t,e),h=r.length-1;h>=0;h--){var l=o(r.item(h));s.style[l]=r[l]}if(s.className=U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,i)return s.src=_(n)[0].args[0],[a];var u=document.createTextNode(n);return s.appendChild(u),[a,new z(u,a)]},n.prototype.getChildren=function(t){return Q([].filter.call(t.node.childNodes,w).map(function(e){var r=[e.nodeType===Node.TEXT_NODE?new z(e,t):new j(e,t)].filter(F);return e.nodeType===Node.ELEMENT_NODE&&r.length&&"TEXTAREA"!==e.tagName?r[0].isElementVisible()?r.concat(this.getChildren(r[0])):[]:r},this))},n.prototype.newStackingContext=function(t,e){var r=new K(e,t.getOpacity(),t.node,t.parent);t.cloneTo(r);var n=e?r.getParentStack(this):r.parent.stack;n.contexts.push(r),t.stack=r},n.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){D(t)&&(this.isRootElement(t)||I(t)||E(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):D(t)&&(C(t)&&g(t)||B(t)||b(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)},this)},n.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},n.prototype.isRootElement=function(t){return null===t.parent},n.prototype.sortStackingContexts=function(t){t.contexts.sort(R(t.contexts.slice(0))),t.contexts.forEach(this.sortStackingContexts,this)},n.prototype.parseTextBounds=function(t){return function(e,r,n){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var i=n.slice(0,r).join("").length;return this.getRangeBounds(t.node,i,e.length)}if(t.node&&"string"==typeof t.node.data){var o=t.node.splitText(e.length),s=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=o,s}}else(!this.support.rangeBounds||t.parent.hasTransform())&&(t.node=t.node.splitText(e.length));return{}}},n.prototype.getWrapperBounds=function(t,e){var r=t.ownerDocument.createElement("html2canvaswrapper"),n=t.parentNode,i=t.cloneNode(!0);r.appendChild(t.cloneNode(!0)),n.replaceChild(r,t);var o=e?$(r):q(r);return n.replaceChild(i,r),o},n.prototype.getRangeBounds=function(t,e,r){var n=this.range||(this.range=t.ownerDocument.createRange());return n.setStart(t,e),n.setEnd(t,e+r),n.getBoundingClientRect()},n.prototype.parse=function(t){var e=t.contexts.filter(d),r=t.children.filter(D),n=r.filter(T(b)),i=n.filter(T(C)).filter(T(A)),o=r.filter(T(C)).filter(b),a=n.filter(T(C)).filter(A),h=t.contexts.concat(n.filter(C)).filter(g),l=t.children.filter(P).filter(m),u=t.contexts.filter(p);e.concat(i).concat(o).concat(a).concat(h).concat(l).concat(u).forEach(function(t){this.renderQueue.push(t),v(t)&&(this.parse(t),this.renderQueue.push(new s))},this)},n.prototype.paint=function(t){try{t instanceof s?this.renderer.ctx.restore():P(t)?(M(t.parent)&&t.parent.appendToDOM(),this.paintText(t),M(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(G(e),this.options.strict)throw e}},n.prototype.paintNode=function(t){v(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},n.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,function(){this.renderer.renderBackground(t,e,t.borders.borders.map(O))},this),this.renderer.clip(t.clip,function(){this.renderer.renderBorders(t.borders.borders)},this),this.renderer.clip(t.backgroundClip,function(){switch(t.node.nodeName){case"svg":case"IFRAME":var r=this.images.get(t.node);r?this.renderer.renderImage(t,e,t.borders,r):G("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var n=this.images.get(t.node.src);n?this.renderer.renderImage(t,e,t.borders,n):G("Error loading ",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this)},n.prototype.paintCheckbox=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height),n={width:r-1,height:r-1,top:e.top,left:e.left},i=[3,3],o=[i,i,i,i],s=[1,1,1,1].map(function(t){return{color:new X("#A5A5A5"),width:t}}),h=l(n,o,s);this.renderer.clip(t.backgroundClip,function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new X("#DEDEDE")),this.renderer.renderBorders(a(s,n,h,o)),t.node.checked&&(this.renderer.font(new X("#424242"),"normal","normal","bold",r-3+"px","arial"),this.renderer.text("✔",n.left+r/6,n.top+r-1))},this)},n.prototype.paintRadio=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,function(){this.renderer.circleStroke(e.left+1,e.top+1,r,new X("#DEDEDE"),1,new X("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+r/4)+1,Math.ceil(e.top+r/4)+1,Math.floor(r/2),new X("#424242"))},this)},n.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var r=t.node.ownerDocument,n=r.createElement("html2canvaswrapper"),i=["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"];i.forEach(function(e){try{n.style[e]=t.css(e)}catch(r){G("html2canvas: Parse: Exception caught in renderFormValue: "+r.message)}});var o=t.parseBounds();n.style.position="fixed",n.style.left=o.left+"px",n.style.top=o.top+"px",n.textContent=e,r.body.appendChild(n),this.paintText(new z(n.firstChild,t)),r.body.removeChild(n)}},n.prototype.paintText=function(t){t.applyTextTransform();var e=Y.ucs2.decode(t.node.data),r=this.options.letterRendering&&!y(t)||k(t.node.data)?e.map(function(t){return Y.ucs2.encode([t])}):N(e),n=t.parent.fontWeight(),i=t.parent.css("fontSize"),o=t.parent.css("fontFamily"),s=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),n,i,o),s.length?this.renderer.fontShadow(s[0].color,s[0].offsetX,s[0].offsetY,s[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){r.map(this.parseTextBounds(t),this).forEach(function(e,n){e&&(this.renderer.text(r[n],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(o,i)))},this)},this)},n.prototype.renderTextDecoration=function(t,e,r){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+r.baseline+r.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+r.middle+r.lineWidth),e.width,1,t.color("color"))}};var tt={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};n.prototype.parseBorders=function(t){var e=t.parseBounds(),r=x(t),n=["Top","Right","Bottom","Left"].map(function(e,r){var n=t.css("border"+e+"Style"),i=t.color("border"+e+"Color");"inset"===n&&i.isBlack()&&(i=new X([255,255,255,i.a]));var o=tt[n]?tt[n][r]:null;return{width:t.cssInt("border"+e+"Width"),color:o?i[o[0]](o[1]):i,args:null}}),i=l(e,r,n);return{clip:this.parseBackgroundClip(t,i,n,r,e),borders:a(n,e,i,r)}},n.prototype.parseBackgroundClip=function(t,e,r,n,i){var o=t.css("backgroundClip"),s=[];switch(o){case"content-box":case"padding-box":f(s,n[0],n[1],e.topLeftInner,e.topRightInner,i.left+r[3].width,i.top+r[0].width),f(s,n[1],n[2],e.topRightInner,e.bottomRightInner,i.left+i.width-r[1].width,i.top+r[0].width),f(s,n[2],n[3],e.bottomRightInner,e.bottomLeftInner,i.left+i.width-r[1].width,i.top+i.height-r[2].width),f(s,n[3],n[0],e.bottomLeftInner,e.topLeftInner,i.left+r[3].width,i.top+i.height-r[2].width);break;default:f(s,n[0],n[1],e.topLeftOuter,e.topRightOuter,i.left,i.top),f(s,n[1],n[2],e.topRightOuter,e.bottomRightOuter,i.left+i.width,i.top),f(s,n[2],n[3],e.bottomRightOuter,e.bottomLeftOuter,i.left+i.width,i.top+i.height),f(s,n[3],n[0],e.bottomLeftOuter,e.topLeftOuter,i.left,i.top+i.height)}return s},e.exports=n},{"./color":5,"./fontmetrics":9,"./log":15,"./nodecontainer":16,"./promise":18,"./pseudoelementcontainer":21,"./stackingcontext":24,"./textcontainer":28,"./utils":29,punycode:3}],18:[function(t,e,r){e.exports=t("es6-promise").Promise},{"es6-promise":1}],19:[function(t,e,r){function n(t,e,r){var n="withCredentials"in new XMLHttpRequest;if(!e)return u.reject("No proxy configured");var i=s(n),h=a(e,t,i);return n?c(h):o(r,h,i).then(function(t){return g(t.content)})}function i(t,e,r){var n="crossOrigin"in new Image,i=s(n),h=a(e,t,i);return n?u.resolve(h):o(r,h,i).then(function(t){return"data:"+t.type+";base64,"+t.content})}function o(t,e,r){return new u(function(n,i){var o=t.createElement("script"),s=function(){delete window.html2canvas.proxy[r],t.body.removeChild(o)};window.html2canvas.proxy[r]=function(t){s(),n(t)},o.src=e,o.onerror=function(t){s(),i(t)},t.body.appendChild(o)})}function s(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++A+"_"+Math.round(1e5*Math.random())}function a(t,e,r){return t+"?url="+encodeURIComponent(e)+(r.length?"&callback=html2canvas.proxy."+r:"")}function h(t){return function(e){var r,n=new DOMParser;try{r=n.parseFromString(e,"text/html")}catch(i){d("DOMParser not supported, falling back to createHTMLDocument"),r=document.implementation.createHTMLDocument("");try{r.open(),r.write(e),r.close()}catch(o){d("createHTMLDocument write not supported, falling back to document.body.innerHTML"),r.body.innerHTML=e}}var s=r.querySelector("base");if(!s||!s.href.host){var a=r.createElement("base");a.href=t,r.head.insertBefore(a,r.head.firstChild)}return r}}function l(t,e,r,i,o,s){return new n(t,e,window.document).then(h(t)).then(function(t){return p(t,r,i,o,s,0,0)})}var u=t("./promise"),c=t("./xhr"),f=t("./utils"),d=t("./log"),p=t("./clone"),g=f.decode64,A=0;r.Proxy=n,r.ProxyURL=i,r.loadUrlDocument=l},{"./clone":4,"./log":15,"./promise":18,"./utils":29,"./xhr":31}],20:[function(t,e,r){function n(t,e){var r=document.createElement("a");r.href=t,t=r.href,this.src=t,this.image=new Image;var n=this;this.promise=new o(function(r,o){n.image.crossOrigin="Anonymous",n.image.onload=r,n.image.onerror=o,new i(t,e,document).then(function(t){n.image.src=t})["catch"](o)})}var i=t("./proxy").ProxyURL,o=t("./promise");e.exports=n},{"./promise":18,"./proxy":19}],21:[function(t,e,r){function n(t,e,r){i.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===r}var i=t("./nodecontainer");n.prototype.cloneTo=function(t){n.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},n.prototype=Object.create(i.prototype),n.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},n.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},n.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",e.exports=n},{"./nodecontainer":16}],22:[function(t,e,r){function n(t,e,r,n,i){this.width=t,this.height=e,this.images=r,this.options=n,this.document=i}var i=t("./log");n.prototype.renderImage=function(t,e,r,n){var i=t.cssInt("paddingLeft"),o=t.cssInt("paddingTop"),s=t.cssInt("paddingRight"),a=t.cssInt("paddingBottom"),h=r.borders,l=e.width-(h[1].width+h[3].width+i+s),u=e.height-(h[0].width+h[2].width+o+a);this.drawImage(n,0,0,n.image.width||l,n.image.height||u,e.left+i+h[3].width,e.top+o+h[0].width,l,u)},n.prototype.renderBackground=function(t,e,r){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,r))},n.prototype.renderBackgroundColor=function(t,e){var r=t.color("backgroundColor");r.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,r)},n.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},n.prototype.renderBorder=function(t){t.color.isTransparent()||null===t.args||this.drawShape(t.args,t.color)},n.prototype.renderBackgroundImage=function(t,e,r){var n=t.parseBackgroundImages();n.reverse().forEach(function(n,o,s){switch(n.method){case"url":var a=this.images.get(n.args[0]);a?this.renderBackgroundRepeating(t,e,a,s.length-(o+1),r):i("Error loading background-image",n.args[0]); -break;case"linear-gradient":case"gradient":var h=this.images.get(n.value);h?this.renderBackgroundGradient(h,e,r):i("Error loading background-image",n.args[0]);break;case"none":break;default:i("Unknown background-image type",n.args[0])}},this)},n.prototype.renderBackgroundRepeating=function(t,e,r,n,i){var o=t.parseBackgroundSize(e,r.image,n),s=t.parseBackgroundPosition(e,r.image,n,o),a=t.parseBackgroundRepeat(n);switch(a){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+i[3],e.top+s.top+i[0],99999,o.height,i);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+i[0],o.width,99999,i);break;case"no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+s.top+i[0],o.width,o.height,i);break;default:this.renderBackgroundRepeat(r,s,o,{top:e.top,left:e.left},i[3],i[0])}},e.exports=n},{"./log":15}],23:[function(t,e,r){function n(t,e){if(this.ratio=window.devicePixelRatio,t=this.applyRatio(t),e=this.applyRatio(e),o.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),!this.options.canvas&&(this.canvas.width=t,this.canvas.height=e,1!==this.ratio)){var r=1/this.ratio;this.canvas.style.transform="scaleX("+r+") scaleY("+r+")",this.canvas.style.transformOrigin="0 0"}this.ctx=this.canvas.getContext("2d"),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},a("Initialized CanvasRenderer with size",t,"x",e)}function i(t){return t.length>0}var o=t("../renderer"),s=t("../lineargradientcontainer"),a=t("../log");n.prototype=Object.create(o.prototype),n.prototype.applyRatio=function(t){return t*this.ratio},n.prototype.applyRatioToBounds=function(t){t.width=t.width*this.ratio,t.top=t.top*this.ratio;try{t.left=t.left*this.ratio,t.height=t.height*this.ratio}catch(e){}return t},n.prototype.applyRatioToPosition=function(t){return t.left=t.left*this.ratio,t.height=t.height*this.ratio,bounds},n.prototype.applyRatioToShape=function(t){for(var e=0;e";try{r.drawImage(t,0,0),e.toDataURL()}catch(n){return!1}return!0},e.exports=n},{}],26:[function(t,e,r){function n(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then(function(){return e.isInline(t)?i.resolve(e.inlineFormatting(t)):o(t)}).then(function(t){return new i(function(r){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,r))})})}var i=t("./promise"),o=t("./xhr"),s=t("./utils").decode64;n.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?i.resolve():i.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},n.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},n.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},n.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},n.prototype.createCanvas=function(t){var e=this;return function(r,n){var i=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=i.lowerCanvasEl,i.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(r,n)).renderAll(),t(i.lowerCanvasEl)}},n.prototype.decode64=function(t){return"function"==typeof window.atob?window.atob(t):s(t)},e.exports=n},{"./promise":18,"./utils":29,"./xhr":31}],27:[function(t,e,r){function n(t,e){this.src=t,this.image=null;var r=this;this.promise=e?new o(function(e,n){r.image=new Image,r.image.onload=e,r.image.onerror=n,r.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),r.image.complete===!0&&e(r.image)}):this.hasFabric().then(function(){return new o(function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,r.createCanvas.call(r,e))})})}var i=t("./svgcontainer"),o=t("./promise");n.prototype=Object.create(i.prototype),e.exports=n},{"./promise":18,"./svgcontainer":26}],28:[function(t,e,r){function n(t,e){o.call(this,t,e)}function i(t,e,r){return t.length>0?e+r.toUpperCase():void 0}var o=t("./nodecontainer");n.prototype=Object.create(o.prototype),n.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},n.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,i);case"uppercase":return e.toUpperCase();default:return e}},e.exports=n},{"./nodecontainer":16}],29:[function(t,e,r){r.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},r.bind=function(t,e){return function(){return t.apply(e,arguments)}},r.decode64=function(t){var e,r,n,i,o,s,a,h,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=t.length,c="";for(e=0;u>e;e+=4)r=l.indexOf(t[e]),n=l.indexOf(t[e+1]),i=l.indexOf(t[e+2]),o=l.indexOf(t[e+3]),s=r<<2|n>>4,a=(15&n)<<4|i>>2,h=(3&i)<<6|o,c+=64===i?String.fromCharCode(s):64===o||-1===o?String.fromCharCode(s,a):String.fromCharCode(s,a,h);return c},r.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),r=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+r,left:e.left,width:r,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},r.offsetBounds=function(t){var e=t.offsetParent?r.offsetBounds(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+e.top,bottom:t.offsetTop+t.offsetHeight+e.top,right:t.offsetLeft+e.left+t.offsetWidth,left:t.offsetLeft+e.left,width:t.offsetWidth,height:t.offsetHeight}},r.parseBackgrounds=function(t){var e,r,n,i,o,s,a,h=" \r\n ",l=[],u=0,c=0,f=function(){e&&('"'===r.substr(0,1)&&(r=r.substr(1,r.length-2)),r&&a.push(r),"-"===e.substr(0,1)&&(i=e.indexOf("-",1)+1)>0&&(n=e.substr(0,i),e=e.substr(i)),l.push({prefix:n,method:e.toLowerCase(),value:o,args:a,image:null})),a=[],e=n=r=o=""};return a=[],e=n=r=o="",t.split("").forEach(function(t){if(!(0===u&&h.indexOf(t)>-1)){switch(t){case'"':s?s===t&&(s=null):s=t;break;case"(":if(s)break;if(0===u)return u=1,void(o+=t);c++;break;case")":if(s)break;if(1===u){if(0===c)return u=0,o+=t,void f();c--}break;case",":if(s)break;if(0===u)return void f();if(1===u&&0===c&&!e.match(/^url$/i))return a.push(r),r="",void(o+=t)}o+=t,0===u?e+=t:r+=t}}),f(),l}},{}],30:[function(t,e,r){function n(t){i.apply(this,arguments),this.type="linear"===t.args[0]?this.TYPES.LINEAR:this.TYPES.RADIAL}var i=t("./gradientcontainer");n.prototype=Object.create(i.prototype),e.exports=n},{"./gradientcontainer":11}],31:[function(t,e,r){function n(t){return new i(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.onload=function(){200===n.status?e(n.responseText):r(new Error(n.statusText))},n.onerror=function(){r(new Error("Network Error"))},n.send()})}var i=t("./promise");e.exports=n},{"./promise":18}]},{},[6])(6)}),function(t){function e(t){var e=t.length,n=r.type(t);return"function"===n||r.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}if(!t.jQuery){var r=function(t,e){return new r.fn.init(t,e)};r.isWindow=function(t){return null!=t&&t==t.window},r.type=function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?i[s.call(t)]||"object":typeof t},r.isArray=Array.isArray||function(t){return"array"===r.type(t)},r.isPlainObject=function(t){var e;if(!t||"object"!==r.type(t)||t.nodeType||r.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}for(e in t);return void 0===e||o.call(t,e)},r.each=function(t,r,n){var i,o=0,s=t.length,a=e(t);if(n){if(a)for(;s>o&&(i=r.apply(t[o],n),i!==!1);o++);else for(o in t)if(i=r.apply(t[o],n),i===!1)break}else if(a)for(;s>o&&(i=r.call(t[o],o,t[o]),i!==!1);o++);else for(o in t)if(i=r.call(t[o],o,t[o]),i===!1)break;return t},r.data=function(t,e,i){if(void 0===i){var o=t[r.expando],s=o&&n[o];if(void 0===e)return s;if(s&&e in s)return s[e]}else if(void 0!==e){var o=t[r.expando]||(t[r.expando]=++r.uuid);return n[o]=n[o]||{},n[o][e]=i,i}},r.removeData=function(t,e){var i=t[r.expando],o=i&&n[i];o&&r.each(e,function(t,e){delete o[e]})},r.extend=function(){var t,e,n,i,o,s,a=arguments[0]||{},h=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[h]||{},h++),"object"!=typeof a&&"function"!==r.type(a)&&(a={}),h===l&&(a=this,h--);l>h;h++)if(null!=(o=arguments[h]))for(i in o)t=a[i],n=o[i],a!==n&&(u&&n&&(r.isPlainObject(n)||(e=r.isArray(n)))?(e?(e=!1,s=t&&r.isArray(t)?t:[]):s=t&&r.isPlainObject(t)?t:{},a[i]=r.extend(u,s,n)):void 0!==n&&(a[i]=n));return a},r.queue=function(t,n,i){function o(t,r){var n=r||[];return null!=t&&(e(Object(t))?!function(t,e){for(var r=+e.length,n=0,i=t.length;r>n;)t[i++]=e[n++];if(r!==r)for(;void 0!==e[n];)t[i++]=e[n++];return t.length=i,t}(n,"string"==typeof t?[t]:t):[].push.call(n,t)),n}if(t){n=(n||"fx")+"queue";var s=r.data(t,n);return i?(!s||r.isArray(i)?s=r.data(t,n,o(i)):s.push(i),s):s||[]}},r.dequeue=function(t,e){r.each(t.nodeType?[t]:t,function(t,n){e=e||"fx";var i=r.queue(n,e),o=i.shift();"inprogress"===o&&(o=i.shift()),o&&("fx"===e&&i.unshift("inprogress"),o.call(n,function(){r.dequeue(n,e)}))})},r.fn=r.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function t(){for(var t=this.offsetParent||document;t&&"html"===!t.nodeType.toLowerCase&&"static"===t.style.position;)t=t.offsetParent;return t||document}var e=this[0],t=t.apply(e),n=this.offset(),i=/^(?:body|html)$/i.test(t.nodeName)?{top:0,left:0}:r(t).offset();return n.top-=parseFloat(e.style.marginTop)||0,n.left-=parseFloat(e.style.marginLeft)||0,t.style&&(i.top+=parseFloat(t.style.borderTopWidth)||0,i.left+=parseFloat(t.style.borderLeftWidth)||0),{top:n.top-i.top,left:n.left-i.left}}};var n={};r.expando="velocity"+(new Date).getTime(),r.uuid=0;for(var i={},o=i.hasOwnProperty,s=i.toString,a="Boolean Number String Function Array Date RegExp Object Error".split(" "),h=0;hi;++i){var o=l(r,t,n);if(0===o)return r;var s=h(r,t,n)-e;r-=s/o}return r}function c(){for(var e=0;y>e;++e)C[e]=h(e*x,t,n)}function f(e,r,i){var o,s,a=0;do s=r+(i-r)/2,o=h(s,t,n)-e,o>0?i=s:r=s;while(Math.abs(o)>v&&++a=A?u(e,a):0==h?a:f(e,r,r+x)}function p(){b=!0,(t!=r||n!=i)&&c()}var g=4,A=.001,v=1e-7,m=10,y=11,x=1/(y-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var E=0;4>E;++E)if("number"!=typeof arguments[E]||isNaN(arguments[E])||!isFinite(arguments[E]))return!1;t=Math.min(t,1),n=Math.min(n,1),t=Math.max(t,0),n=Math.max(n,0);var C=w?new Float32Array(y):new Array(y),b=!1,B=function(e){return b||p(),t===r&&n===i?e:0===e?0:1===e?1:h(d(e),r,i)};B.getControlPoints=function(){return[{x:t,y:r},{x:n,y:i}]};var T="generateBezier("+[t,r,n,i]+")";return B.toString=function(){return T},B}function l(t,e){var r=t;return g.isString(t)?y.Easings[t]||(r=!1):r=g.isArray(t)&&1===t.length?a.apply(null,t):g.isArray(t)&&2===t.length?x.apply(null,t.concat([e])):g.isArray(t)&&4===t.length?h.apply(null,t):!1,r===!1&&(r=y.Easings[y.defaults.easing]?y.defaults.easing:m),r}function u(t){if(t){var e=(new Date).getTime(),r=y.State.calls.length;r>1e4&&(y.State.calls=i(y.State.calls));for(var o=0;r>o;o++)if(y.State.calls[o]){var a=y.State.calls[o],h=a[0],l=a[2],d=a[3],p=!!d,A=null;d||(d=y.State.calls[o][3]=e-16);for(var v=Math.min((e-d)/l.duration,1),m=0,x=h.length;x>m;m++){var E=h[m],b=E.element;if(s(b)){var B=!1;if(l.display!==n&&null!==l.display&&"none"!==l.display){if("flex"===l.display){var T=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];f.each(T,function(t,e){w.setPropertyValue(b,"display",e)})}w.setPropertyValue(b,"display",l.display)}l.visibility!==n&&"hidden"!==l.visibility&&w.setPropertyValue(b,"visibility",l.visibility);for(var D in E)if("element"!==D){var M,P=E[D],R=g.isString(P.easing)?y.Easings[P.easing]:P.easing;if(1===v)M=P.endValue;else{var I=P.endValue-P.startValue;if(M=P.startValue+I*R(v,l,I),!p&&M===P.currentValue)continue}if(P.currentValue=M,"tween"===D)A=M;else{if(w.Hooks.registered[D]){var S=w.Hooks.getRoot(D),O=s(b).rootPropertyValueCache[S];O&&(P.rootPropertyValue=O)}var F=w.setPropertyValue(b,D,P.currentValue+(0===parseFloat(M)?"":P.unitType),P.rootPropertyValue,P.scrollData);w.Hooks.registered[D]&&(w.Normalizations.registered[S]?s(b).rootPropertyValueCache[S]=w.Normalizations.registered[S]("extract",null,F[1]):s(b).rootPropertyValueCache[S]=F[1]),"transform"===F[0]&&(B=!0)}}l.mobileHA&&s(b).transformCache.translate3d===n&&(s(b).transformCache.translate3d="(0px, 0px, 0px)",B=!0),B&&w.flushTransformCache(b)}}l.display!==n&&"none"!==l.display&&(y.State.calls[o][2].display=!1),l.visibility!==n&&"hidden"!==l.visibility&&(y.State.calls[o][2].visibility=!1),l.progress&&l.progress.call(a[1],a[1],v,Math.max(0,d+l.duration-e),d,A),1===v&&c(o)}}y.State.isTicking&&C(u)}function c(t,e){if(!y.State.calls[t])return!1;for(var r=y.State.calls[t][0],i=y.State.calls[t][1],o=y.State.calls[t][2],a=y.State.calls[t][4],h=!1,l=0,u=r.length;u>l;l++){var c=r[l].element;if(e||o.loop||("none"===o.display&&w.setPropertyValue(c,"display",o.display),"hidden"===o.visibility&&w.setPropertyValue(c,"visibility",o.visibility)),o.loop!==!0&&(f.queue(c)[1]===n||!/\.velocityQueueEntryFlag/i.test(f.queue(c)[1]))&&s(c)){s(c).isAnimating=!1,s(c).rootPropertyValueCache={};var d=!1;f.each(w.Lists.transforms3D,function(t,e){var r=/^scale/.test(e)?1:0,i=s(c).transformCache[e];s(c).transformCache[e]!==n&&new RegExp("^\\("+r+"[^.]").test(i)&&(d=!0,delete s(c).transformCache[e])}),o.mobileHA&&(d=!0,delete s(c).transformCache.translate3d),d&&w.flushTransformCache(c),w.Values.removeClass(c,"velocity-animating")}if(!e&&o.complete&&!o.loop&&l===u-1)try{o.complete.call(i,i)}catch(p){setTimeout(function(){throw p},1)}a&&o.loop!==!0&&a(i),s(c)&&o.loop===!0&&!e&&(f.each(s(c).tweensContainer,function(t,e){/^rotate/.test(t)&&360===parseFloat(e.endValue)&&(e.endValue=0,e.startValue=360),/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),y(c,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&f.dequeue(c,o.queue)}y.State.calls[t]=!1;for(var g=0,A=y.State.calls.length;A>g;g++)if(y.State.calls[g]!==!1){h=!0;break}h===!1&&(y.State.isTicking=!1,delete y.State.calls,y.State.calls=[])}var f,d=function(){if(r.documentMode)return r.documentMode;for(var t=7;t>4;t--){var e=r.createElement("div");if(e.innerHTML="",e.getElementsByTagName("span").length)return e=null,t}return n}(),p=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var r,n=(new Date).getTime();return r=Math.max(0,16-(n-t)),t=n+r,setTimeout(function(){e(n+r)},r)}}(),g={isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isNodeList:function(t){return"object"==typeof t&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&t.length!==n&&(0===t.length||"object"==typeof t[0]&&t[0].nodeType>0)},isWrapped:function(t){return t&&(t.jquery||e.Zepto&&e.Zepto.zepto.isZ(t))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)return!1;return!0}},A=!1;if(t.fn&&t.fn.jquery?(f=t,A=!0):f=e.Velocity.Utilities,8>=d&&!A)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=d)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,m="swing",y={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:r.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:f,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:v,easing:m,begin:n,complete:n,progress:n,display:n,visibility:n,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(t){f.data(t,"velocity",{isSVG:g.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};e.pageYOffset!==n?(y.State.scrollAnchor=e,y.State.scrollPropertyLeft="pageXOffset",y.State.scrollPropertyTop="pageYOffset"):(y.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body,y.State.scrollPropertyLeft="scrollLeft",y.State.scrollPropertyTop="scrollTop");var x=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},o=e(r,.5*n,i),s=e(r,.5*n,o),a=e(r,n,s),h=1/6*(i.dx+2*(o.dx+s.dx)+a.dx),l=1/6*(i.dv+2*(o.dv+s.dv)+a.dv);return r.x=r.x+h*n,r.v=r.v+l*n,r}return function n(t,e,i){var o,s,a,h={x:-1,v:0,tension:null,friction:null},l=[0],u=0,c=1e-4,f=.016;for(t=parseFloat(t)||500,e=parseFloat(e)||20,i=i||null,h.tension=t,h.friction=e,o=null!==i,o?(u=n(t,e),s=u/i*f):s=f;;)if(a=r(a||h,s),l.push(1+a.x),u+=16,!(Math.abs(a.x)>c&&Math.abs(a.v)>c))break;return o?function(t){return l[t*(l.length-1)|0]}:u}}();y.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},f.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){y.Easings[e[0]]=h.apply(null,e[1])});var w=y.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t=d)switch(t){case"name":return"filter";case"extract":var n=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=n?n[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(t){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=d||y.State.isGingerbread||(w.Lists.transformsBase=w.Lists.transformsBase.concat(w.Lists.transforms3D));for(var t=0;ti&&(i=1),o=!/(\d)$/i.test(i);break;case"skew":o=!/(deg|\d)$/i.test(i);break;case"rotate":o=!/(deg|\d)$/i.test(i)}return o||(s(r).transformCache[e]="("+i+")"),s(r).transformCache[e]}}}();for(var t=0;t=d||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return 8>=d?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1"),(8>=d?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(d||y.State.isAndroid&&!y.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(y.State.prefixMatches[t])return[y.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],r=0,n=e.length;n>r;r++){var i;if(i=0===r?t:e[r]+t.replace(/^\w/,function(t){return t.toUpperCase()}),g.isString(y.State.prefixElement.style[i]))return y.State.prefixMatches[t]=i,[i,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e,r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return t=t.replace(r,function(t,e,r,n){return e+e+r+r+n+n}),e=n.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[0,0,0]},isCSSNullValue:function(t){return 0==t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){t.classList?t.classList.add(e):t.className+=(t.className.length?" ":"")+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(t,r,i,o){function a(t,r){function i(){l&&w.setPropertyValue(t,"display","none")}var h=0;if(8>=d)h=f.css(t,r);else{var l=!1;if(/^(width|height)$/.test(r)&&0===w.getPropertyValue(t,"display")&&(l=!0,w.setPropertyValue(t,"display",w.Values.getDisplayType(t))),!o){if("height"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var u=t.offsetHeight-(parseFloat(w.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(w.getPropertyValue(t,"paddingBottom"))||0); -return i(),u}if("width"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var c=t.offsetWidth-(parseFloat(w.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(w.getPropertyValue(t,"paddingRight"))||0);return i(),c}}var p;p=s(t)===n?e.getComputedStyle(t,null):s(t).computedStyle?s(t).computedStyle:s(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===r&&(r="borderTopColor"),h=9===d&&"filter"===r?p.getPropertyValue(r):p[r],(""===h||null===h)&&(h=t.style[r]),i()}if("auto"===h&&/^(top|right|bottom|left)$/i.test(r)){var g=a(t,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(r))&&(h=f(t).position()[r]+"px")}return h}var h;if(w.Hooks.registered[r]){var l=r,u=w.Hooks.getRoot(l);i===n&&(i=w.getPropertyValue(t,w.Names.prefixCheck(u)[0])),w.Normalizations.registered[u]&&(i=w.Normalizations.registered[u]("extract",t,i)),h=w.Hooks.extractValue(l,i)}else if(w.Normalizations.registered[r]){var c,p;c=w.Normalizations.registered[r]("name",t),"transform"!==c&&(p=a(t,w.Names.prefixCheck(c)[0]),w.Values.isCSSNullValue(p)&&w.Hooks.templates[r]&&(p=w.Hooks.templates[r][1])),h=w.Normalizations.registered[r]("extract",t,p)}if(!/^[\d-]/.test(h))if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{h=t.getBBox()[r]}catch(g){h=0}else h=t.getAttribute(r);else h=a(t,w.Names.prefixCheck(r)[0]);return w.Values.isCSSNullValue(h)&&(h=0),y.debug>=2&&console.log("Get "+r+": "+h),h},setPropertyValue:function(t,r,n,i,o){var a=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=n:"Left"===o.direction?e.scrollTo(n,o.alternateValue):e.scrollTo(o.alternateValue,n);else if(w.Normalizations.registered[r]&&"transform"===w.Normalizations.registered[r]("name",t))w.Normalizations.registered[r]("inject",t,n),a="transform",n=s(t).transformCache[r];else{if(w.Hooks.registered[r]){var h=r,l=w.Hooks.getRoot(r);i=i||w.getPropertyValue(t,l),n=w.Hooks.injectValue(h,n,i),r=l}if(w.Normalizations.registered[r]&&(n=w.Normalizations.registered[r]("inject",t,n),r=w.Normalizations.registered[r]("name",t)),a=w.Names.prefixCheck(r)[0],8>=d)try{t.style[a]=n}catch(u){y.debug&&console.log("Browser does not support ["+n+"] for ["+a+"]")}else if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))t.setAttribute(r,n);else{var c="webgl"===t.renderer?t.styleGL:t.style;c[a]=n}y.debug>=2&&console.log("Set "+r+" ("+a+"): "+n)}return[a,n]},flushTransformCache:function(t){function e(e){return parseFloat(w.getPropertyValue(t,e))}var r="";if((d||y.State.isAndroid&&!y.State.isChrome)&&s(t).isSVG){var n={translate:[e("translateX"),e("translateY")],skewX:[e("skewX")],skewY:[e("skewY")],scale:1!==e("scale")?[e("scale"),e("scale")]:[e("scaleX"),e("scaleY")],rotate:[e("rotateZ"),0,0]};f.each(s(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),n[t]&&(r+=t+"("+n[t].join(" ")+") ",delete n[t])})}else{var i,o;f.each(s(t).transformCache,function(e){return i=s(t).transformCache[e],"transformPerspective"===e?(o=i,!0):(9===d&&"rotateZ"===e&&(e="rotate"),void(r+=e+i+" "))}),o&&(r="perspective"+o+" "+r)}w.setPropertyValue(t,"transform",r)}};w.Hooks.register(),w.Normalizations.register(),y.hook=function(t,e,r){var i=n;return t=o(t),f.each(t,function(t,o){if(s(o)===n&&y.init(o),r===n)i===n&&(i=y.CSS.getPropertyValue(o,e));else{var a=y.CSS.setPropertyValue(o,e,r);"transform"===a[0]&&y.CSS.flushTransformCache(o),i=a}}),i};var E=function(){function t(){return a?D.promise||null:h}function i(){function t(t){function c(t,e){var r=n,i=n,s=n;return g.isArray(t)?(r=t[0],!g.isArray(t[1])&&/^[\d-]/.test(t[1])||g.isFunction(t[1])||w.RegEx.isHex.test(t[1])?s=t[1]:(g.isString(t[1])&&!w.RegEx.isHex.test(t[1])||g.isArray(t[1]))&&(i=e?t[1]:l(t[1],a.duration),t[2]!==n&&(s=t[2]))):r=t,e||(i=i||a.easing),g.isFunction(r)&&(r=r.call(o,b,C)),g.isFunction(s)&&(s=s.call(o,b,C)),[r||0,i,s]}function d(t,e){var r,n;return n=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return r=t,""}),r||(r=w.Values.getUnitType(t)),[n,r]}function v(){var t={myParent:o.parentNode||r.body,position:w.getPropertyValue(o,"position"),fontSize:w.getPropertyValue(o,"fontSize")},n=t.position===F.lastPosition&&t.myParent===F.lastParent,i=t.fontSize===F.lastFontSize;F.lastParent=t.myParent,F.lastPosition=t.position,F.lastFontSize=t.fontSize;var a=100,h={};if(i&&n)h.emToPx=F.lastEmToPx,h.percentToPxWidth=F.lastPercentToPxWidth,h.percentToPxHeight=F.lastPercentToPxHeight;else{var l=s(o).isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");y.init(l),t.myParent.appendChild(l),f.each(["overflow","overflowX","overflowY"],function(t,e){y.CSS.setPropertyValue(l,e,"hidden")}),y.CSS.setPropertyValue(l,"position",t.position),y.CSS.setPropertyValue(l,"fontSize",t.fontSize),y.CSS.setPropertyValue(l,"boxSizing","content-box"),f.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){y.CSS.setPropertyValue(l,e,a+"%")}),y.CSS.setPropertyValue(l,"paddingLeft",a+"em"),h.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(w.getPropertyValue(l,"width",null,!0))||1)/a,h.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(w.getPropertyValue(l,"height",null,!0))||1)/a,h.emToPx=F.lastEmToPx=(parseFloat(w.getPropertyValue(l,"paddingLeft"))||1)/a,t.myParent.removeChild(l)}return null===F.remToPx&&(F.remToPx=parseFloat(w.getPropertyValue(r.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),h.remToPx=F.remToPx,h.vwToPx=F.vwToPx,h.vhToPx=F.vhToPx,y.debug>=1&&console.log("Unit ratios: "+JSON.stringify(h),o),h}if(a.begin&&0===b)try{a.begin.call(p,p)}catch(x){setTimeout(function(){throw x},1)}if("scroll"===M){var E,B,T,P=/^x$/i.test(a.axis)?"Left":"Top",R=parseFloat(a.offset)||0;a.container?g.isWrapped(a.container)||g.isNode(a.container)?(a.container=a.container[0]||a.container,E=a.container["scroll"+P],T=E+f(o).position()[P.toLowerCase()]+R):a.container=null:(E=y.State.scrollAnchor[y.State["scrollProperty"+P]],B=y.State.scrollAnchor[y.State["scrollProperty"+("Left"===P?"Top":"Left")]],T=f(o).offset()[P.toLowerCase()]+R),h={scroll:{rootPropertyValue:!1,startValue:E,currentValue:E,endValue:T,unitType:"",easing:a.easing,scrollData:{container:a.container,direction:P,alternateValue:B}},element:o},y.debug&&console.log("tweensContainer (scroll): ",h.scroll,o)}else if("reverse"===M){if(!s(o).tweensContainer)return void f.dequeue(o,a.queue);"none"===s(o).opts.display&&(s(o).opts.display="auto"),"hidden"===s(o).opts.visibility&&(s(o).opts.visibility="visible"),s(o).opts.loop=!1,s(o).opts.begin=null,s(o).opts.complete=null,m.easing||delete a.easing,m.duration||delete a.duration,a=f.extend({},s(o).opts,a);var I=f.extend(!0,{},s(o).tweensContainer);for(var S in I)if("element"!==S){var O=I[S].startValue;I[S].startValue=I[S].currentValue=I[S].endValue,I[S].endValue=O,g.isEmptyObject(m)||(I[S].easing=a.easing),y.debug&&console.log("reverse tweensContainer ("+S+"): "+JSON.stringify(I[S]),o)}h=I}else if("start"===M){var I;s(o).tweensContainer&&s(o).isAnimating===!0&&(I=s(o).tweensContainer),f.each(A,function(t,e){if(RegExp("^"+w.Lists.colors.join("$|^")+"$").test(t)){var r=c(e,!0),i=r[0],o=r[1],s=r[2];if(w.RegEx.isHex.test(i)){for(var a=["Red","Green","Blue"],h=w.Values.hexToRgb(i),l=s?w.Values.hexToRgb(s):n,u=0;uN;N++){var H={delay:R.delay,progress:R.progress};N===L-1&&(H.display=R.display,H.visibility=R.visibility,H.complete=R.complete),E(p,"reverse",H)}return t()}};y=f.extend(E,y),y.animate=E;var C=e.requestAnimationFrame||p;return y.State.isMobile||r.hidden===n||r.addEventListener("visibilitychange",function(){r.hidden?(C=function(t){return setTimeout(function(){t(!0)},16)},u()):C=e.requestAnimationFrame||p}),t.Velocity=y,t!==e&&(t.fn.velocity=E,t.fn.velocity.defaults=y.defaults),f.each(["Down","Up"],function(t,e){y.Redirects["slide"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l=h.begin,u=h.complete,c={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};h.display===n&&(h.display="Down"===e?"inline"===y.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),h.begin=function(){var r="webgl"===t.renderer?t.styleGL:t.style;l&&l.call(s,s);for(var n in c){d[n]=r[n];var i=y.CSS.getPropertyValue(t,n);c[n]="Down"===e?[i,0]:[0,i]}d.overflow=r.overflow,r.overflow="hidden"},h.complete=function(){for(var t in d)style[t]=d[t];u&&u.call(s,s),a&&a.resolver(s)},y(t,c,h)}}),f.each(["In","Out"],function(t,e){y.Redirects["fade"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l={opacity:"In"===e?1:0},u=h.complete;i!==o-1?h.complete=h.begin=null:h.complete=function(){u&&u.call(s,s),a&&a.resolver(s)},h.display===n&&(h.display="In"===e?"auto":"none"),y(this,l,h)}}),y}(window.jQuery||window.Zepto||window,window,document)}),function(t){t.HTMLGL=t.HTMLGL||{},t.HTMLGL.util={getterSetter:function(t,e,r,n){Object.defineProperty?Object.defineProperty(t,e,{get:r,set:n}):document.__defineGetter__&&(t.__defineGetter__(e,r),t.__defineSetter__(e,n)),t["get"+e]=r,t["set"+e]=n},emitEvent:function(t,e){var r=new MouseEvent(e.type,e);r.dispatcher="html-gl",e.stopPropagation(),t.dispatchEvent(r)},debounce:function(t,e,r){var n;return function(){var i=this,o=arguments,s=function(){n=null,r||t.apply(i,o)},a=r&&!n;clearTimeout(n),n=setTimeout(s,e),a&&t.apply(i,o)}}}}(window),function(t){var e=function(t){},r=e.prototype;r.getElementByCoordinates=function(e,r){var n,i,o=this;return t.HTMLGL.elements.forEach(function(t){n=document.elementFromPoint(e-parseInt(t.transformObject.translateX||0),r-parseInt(t.transformObject.translateY||0)),o.isChildOf(n,t)&&(i=n)}),i},r.isChildOf=function(t,e){for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1},t.HTMLGL.GLElementResolver=e}(window),function(t){HTMLGL=t.HTMLGL=t.HTMLGL||{},HTMLGL.JQ_PLUGIN_NAME="htmlgl",HTMLGL.CUSTOM_ELEMENT_TAG_NAME="html-gl",HTMLGL.READY_EVENT="htmlglReady",HTMLGL.context=void 0,HTMLGL.stage=void 0,HTMLGL.renderer=void 0,HTMLGL.elements=[],HTMLGL.pixelRatio=null,HTMLGL.oldPixelRatio=null,HTMLGL.enabled=!0,HTMLGL.scrollX=0,HTMLGL.scrollY=0;var e=function(){t.HTMLGL.context=this,this.createStage(),this.updateScrollPosition(),this.initListeners(),this.elementResolver=new t.HTMLGL.GLElementResolver(this),document.body?this.initViewer():document.addEventListener("DOMContentLoaded",this.initViewer.bind(this))},r=e.prototype;r.initViewer=function(){this.createViewer(),this.resizeViewer(),this.appendViewer()},r.createViewer=function(){t.HTMLGL.renderer=this.renderer=PIXI.autoDetectRenderer(0,0,{transparent:!0}),this.renderer.view.style.position="fixed",this.renderer.view.style.top="0px",this.renderer.view.style.left="0px",this.renderer.view.style["pointer-events"]="none",this.renderer.view.style.pointerEvents="none"},r.appendViewer=function(){document.body.appendChild(this.renderer.view),requestAnimationFrame(this.redrawStage.bind(this))},r.resizeViewer=function(){var e=this,r=t.innerWidth,n=t.innerHeight;HTMLGL.pixelRatio=window.devicePixelRatio||1,r*=HTMLGL.pixelRatio,n*=HTMLGL.pixelRatio,HTMLGL.pixelRatio!==HTMLGL.oldPixelRatio?(this.disable(),this.updateTextures().then(function(){e.updateScrollPosition(),e.updateElementsPositions();var i=1/HTMLGL.pixelRatio;e.renderer.view.style.transformOrigin="0 0",e.renderer.view.style.webkitTransformOrigin="0 0",e.renderer.view.style.transform="scaleX("+i+") scaleY("+i+")",e.renderer.view.style.webkitTransform="scaleX("+i+") scaleY("+i+")",e.renderer.resize(r,n),this.enable(),t.HTMLGL.renderer.render(t.HTMLGL.stage)})):(this.renderer.view.parentNode&&this.updateTextures(),this.updateElementsPositions(),this.markStageAsChanged()),HTMLGL.oldPixelRatio=HTMLGL.pixelRatio},r.initListeners=function(){t.addEventListener("scroll",this.updateScrollPosition.bind(this)),t.addEventListener("resize",t.HTMLGL.util.debounce(this.resizeViewer,500).bind(this)),t.addEventListener("resize",this.updateElementsPositions.bind(this)),document.addEventListener("click",this.onMouseEvent.bind(this),!0),document.addEventListener("mousemove",this.onMouseEvent.bind(this),!0),document.addEventListener("mouseup",this.onMouseEvent.bind(this),!0),document.addEventListener("mousedown",this.onMouseEvent.bind(this),!0),document.addEventListener("touchstart",this.onMouseEvent.bind(this)),document.addEventListener("touchend",this.onMouseEvent.bind(this))},r.updateScrollPosition=function(){var e={};if(void 0!=window.pageYOffset)e={left:pageXOffset,top:pageYOffset};else{var r,n,i=document,o=i.documentElement,s=i.body;r=o.scrollLeft||s.scrollLeft||0,n=o.scrollTop||s.scrollTop||0,e={left:r,top:n}}this.document.x=-e.left*HTMLGL.pixelRatio,this.document.y=-e.top*HTMLGL.pixelRatio,t.HTMLGL.scrollX=e.left,t.HTMLGL.scrollY=e.top,this.markStageAsChanged()},r.createStage=function(){t.HTMLGL.stage=this.stage=new PIXI.Stage(16777215),t.HTMLGL.document=this.document=new PIXI.DisplayObjectContainer,this.stage.addChild(t.HTMLGL.document)},r.redrawStage=function(){t.HTMLGL.stage.changed&&t.HTMLGL.renderer&&t.HTMLGL.enabled&&(t.HTMLGL.renderer.render(t.HTMLGL.stage),t.HTMLGL.stage.changed=!1)},r.updateTextures=function(){var e=[];return t.HTMLGL.elements.forEach(function(t){e.push(t.updateTexture())}),Promise.all(e)},r.initElements=function(){t.HTMLGL.elements.forEach(function(t){t.init()})},r.updateElementsPositions=function(){t.HTMLGL.elements.forEach(function(t){t.updateBoundingRect(),t.updatePivot(),t.updateSpriteTransform()})},r.onMouseEvent=function(e){var r=e.x||e.pageX,n=e.y||e.pageY,i="html-gl"!==e.dispatcher?this.elementResolver.getElementByCoordinates(r,n):null;i?t.HTMLGL.util.emitEvent(i,e):null},r.markStageAsChanged=function(){t.HTMLGL.stage&&!t.HTMLGL.stage.changed&&(requestAnimationFrame(this.redrawStage),t.HTMLGL.stage.changed=!0)},r.disable=function(){t.HTMLGL.enabled=!0},r.enable=function(){t.HTMLGL.enabled=!1},t.HTMLGL.pixelRatio=window.devicePixelRatio||1,t.HTMLGL.GLContext=e,new e}(window),function(t){var e=function(t,e){this.element=t,this.images=this.element.querySelectorAll("img"),this.callback=e,this.imagesLoaded=this.getImagesLoaded(),this.images.length===this.imagesLoaded?this.onImageLoaded():this.addListeners()},r=e.prototype;r.getImagesLoaded=function(){for(var t=0,e=0;ef;f++)h=t[f],l=4*f,u=f/(c-1),e[l]=u*a.x+s.x,e[l+1]=0+s.y,e[l+2]=u*a.x+s.x,e[l+3]=1*a.y+s.y,l=2*f,n[l]=1,n[l+1]=1,l=2*f,r[l]=l,r[l+1]=l+1;this.dirty=!0}},n.prototype._onTextureUpdate=function(){i.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},n.prototype.updateTransform=function(){var t=this.points;if(!(t.length<1)){for(var e,r,n,i,o,s,a=t[0],h=0,l=0,u=this.vertices,c=t.length,f=0;c>f;f++)r=t[f],n=4*f,e=f1&&(i=1),o=Math.sqrt(h*h+l*l),s=this._texture.height/2,h/=o,l/=o,h*=s,l*=s,u[n]=r.x+h,u[n+1]=r.y+l,u[n+2]=r.x-h,u[n+3]=r.y-l,a=r;this.containerUpdateTransform()}}},{"../core":29,"./Mesh":124}],126:[function(t,e,r){e.exports={Mesh:t("./Mesh"),Rope:t("./Rope"),MeshRenderer:t("./webgl/MeshRenderer"),MeshShader:t("./webgl/MeshShader")}},{"./Mesh":124,"./Rope":125,"./webgl/MeshRenderer":127,"./webgl/MeshShader":128}],127:[function(t,e,r){function n(t){i.ObjectRenderer.call(this,t),this.indices=new Uint16Array(15e3);for(var e=0,r=0;15e3>e;e+=6,r+=4)this.indices[e+0]=r+0,this.indices[e+1]=r+1,this.indices[e+2]=r+2,this.indices[e+3]=r+0,this.indices[e+4]=r+2,this.indices[e+5]=r+3}var i=t("../../core"),o=t("../Mesh");n.prototype=Object.create(i.ObjectRenderer.prototype),n.prototype.constructor=n,e.exports=n,i.WebGLRenderer.registerPlugin("mesh",n),n.prototype.onContextChange=function(){},n.prototype.render=function(t){t._vertexBuffer||this._initWebGL(t);var e=this.renderer,r=e.gl,n=t._texture.baseTexture,i=e.shaderManager.plugins.meshShader,s=t.drawMode===o.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;e.blendModeManager.setBlendMode(t.blendMode),r.uniformMatrix3fv(i.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),r.uniformMatrix3fv(i.uniforms.projectionMatrix._location,!1,e.currentRenderTarget.projectionMatrix.toArray(!0)),r.uniform1f(i.uniforms.alpha._location,t.worldAlpha),t.dirty?(t.dirty=!1,r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferData(r.ARRAY_BUFFER,t.vertices,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.bufferData(r.ARRAY_BUFFER,t.uvs,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.indices,r.STATIC_DRAW)):(r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferSubData(r.ARRAY_BUFFER,0,t.vertices),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,t.indices)),r.drawElements(s,t.indices.length,r.UNSIGNED_SHORT,0)},n.prototype._initWebGL=function(t){var e=this.renderer.gl;t._vertexBuffer=e.createBuffer(),t._indexBuffer=e.createBuffer(),t._uvBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,t.vertices,e.DYNAMIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,t._uvBuffer),e.bufferData(e.ARRAY_BUFFER,t.uvs,e.STATIC_DRAW),t.colors&&(t._colorBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._colorBuffer),e.bufferData(e.ARRAY_BUFFER,t.colors,e.STATIC_DRAW)),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,t.indices,e.STATIC_DRAW)},n.prototype.flush=function(){},n.prototype.start=function(){var t=this.renderer.shaderManager.plugins.meshShader;this.renderer.shaderManager.setShader(t)},n.prototype.destroy=function(){}},{"../../core":29,"../Mesh":124}],128:[function(t,e,r){function n(t){i.Shader.call(this,t,["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","uniform float alpha;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * alpha ;","}"].join("\n"),{alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aTextureCoord:0})}var i=t("../../core");n.prototype=Object.create(i.Shader.prototype),n.prototype.constructor=n,e.exports=n,i.ShaderManager.registerPlugin("meshShader",n)},{"../../core":29}],129:[function(t,e,r){Object.assign||(Object.assign=t("object-assign"))},{"object-assign":12}],130:[function(t,e,r){t("./Object.assign"),t("./requestAnimationFrame")},{"./Object.assign":129,"./requestAnimationFrame":131}],131:[function(t,e,r){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),n=["ms","moz","webkit","o"],i=0;in&&(n=0),r=e,setTimeout(function(){r=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.html2canvas=t()}}(function(){var t;return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var h="function"==typeof require&&require;if(!a&&h)return h(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[s]={exports:{}};t[s][0].call(u.exports,function(e){var r=t[s][1][e];return i(r?r:e)},u,u.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;st;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}V=0}function A(){try{var t=e,r=t("vertx");return J=r.runOnLoop||r.runOnContext,c()}catch(n){return p()}}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function x(t){try{return t.then}catch(e){return st.error=e,st}}function w(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function E(t,e,r){Z(function(t){var n=!1,i=w(r,e,function(r){n||(n=!0,e!==r?B(t,r):D(t,r))},function(e){n||(n=!0,M(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,M(t,i))},t)}function C(t,e){e._state===it?D(t,e._result):e._state===ot?M(t,e._result):P(e,void 0,function(e){B(t,e)},function(e){M(t,e)})}function b(t,e){if(e.constructor===t.constructor)C(t,e);else{var r=x(e);r===st?M(t,st.error):void 0===r?D(t,e):s(r)?E(t,e,r):D(t,e)}}function B(t,e){t===e?M(t,m()):o(e)?b(t,e):D(t,e)}function T(t){t._onerror&&t._onerror(t._result),R(t)}function D(t,e){t._state===nt&&(t._result=e,t._state=it,0!==t._subscribers.length&&Z(R,t))}function M(t,e){t._state===nt&&(t._state=ot,t._result=e,Z(T,t))}function P(t,e,r,n){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+it]=r,i[o+ot]=n,0===o&&t._state&&Z(R,t)}function R(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,o=t._result,s=0;ss;s++)P(n.resolve(t[s]),void 0,e,r);return i}function H(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var r=new e(v);return B(r,t),r}function k(t){var e=this,r=new e(v);return M(r,t),r}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Y(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function j(t){this._id=dt++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(s(t)||G(),this instanceof j||Y(),F(this,t))}function z(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(t.Promise=pt)}var U;U=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var J,X,W,K=U,V=0,Z=({}.toString,function(t,e){rt[V]=t,rt[V+1]=e,V+=2,2===V&&(X?X(g):W())}),q="undefined"!=typeof window?window:void 0,_=q||{},$=_.MutationObserver||_.WebKitMutationObserver,tt="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);W=tt?u():$?f():et?d():void 0===q&&"function"==typeof e?A():p();var nt=void 0,it=1,ot=2,st=new I,at=new I;Q.prototype._validateInput=function(t){return K(t)},Q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},Q.prototype._init=function(){this._result=new Array(this.length)};var ht=Q;Q.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===nt&&e>i;i++)t._eachEntry(n[i],i)},Q.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;a(t)?t.constructor===n&&t._state!==nt?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},Q.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===nt&&(n._remaining--,t===ot?M(i,r):n._result[e]=r),0===n._remaining&&D(i,n._result)},Q.prototype._willSettleAt=function(t,e){var r=this;P(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(ot,e,t)})};var lt=L,ut=N,ct=H,ft=k,dt=0,pt=j;j.all=lt,j.race=ut,j.resolve=ct,j.reject=ft,j._setScheduler=h,j._setAsap=l,j._asap=Z,j.prototype={constructor:j,then:function(t,e){var r=this,n=r._state;if(n===it&&!t||n===ot&&!e)return this;var i=new this.constructor(v),o=r._result;if(n){var s=arguments[n-1];Z(function(){O(n,i,s,o)})}else P(r,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var gt=z,At={Promise:pt,polyfill:gt};"function"==typeof t&&t.amd?t(function(){return At}):"undefined"!=typeof r&&r.exports?r.exports=At:"undefined"!=typeof this&&(this.ES6Promise=At),gt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:2}],2:[function(t,e,r){function n(){u=!1,a.length?l=a.concat(l):c=-1,l.length&&i()}function i(){if(!u){var t=setTimeout(n);u=!0;for(var e=l.length;e;){for(a=l,l=[];++c1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(O,".");var i=t.split("."),o=s(i,e).join(".");return n+o}function h(t){for(var e,r,n=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function l(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function u(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:C}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?L(t/D):t>>1,t+=L(t/e);t>Q*B>>1;n+=C)t=L(t/Q);return L(n+(Q+1)*t/(t+T))}function d(t){var e,r,n,i,s,a,h,c,d,p,g=[],A=t.length,v=0,m=P,y=M;for(r=t.lastIndexOf(R),0>r&&(r=0),n=0;r>n;++n)t.charCodeAt(n)>=128&&o("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;A>i;){for(s=v,a=1,h=C;i>=A&&o("invalid-input"),c=u(t.charCodeAt(i++)),(c>=C||c>L((E-v)/a))&&o("overflow"),v+=c*a,d=y>=h?b:h>=y+B?B:h-y,!(d>c);h+=C)p=C-d,a>L(E/p)&&o("overflow"),a*=p;e=g.length+1,y=f(v-s,e,0==s),L(v/e)>E-m&&o("overflow"),m+=L(v/e),v%=e,g.splice(v++,0,m)}return l(g)}function p(t){var e,r,n,i,s,a,l,u,d,p,g,A,v,m,y,x=[];for(t=h(t),A=t.length,e=P,r=0,s=M,a=0;A>a;++a)g=t[a],128>g&&x.push(N(g));for(n=i=x.length,i&&x.push(R);A>n;){for(l=E,a=0;A>a;++a)g=t[a],g>=e&&l>g&&(l=g);for(v=n+1,l-e>L((E-r)/v)&&o("overflow"),r+=(l-e)*v,e=l,a=0;A>a;++a)if(g=t[a],e>g&&++r>E&&o("overflow"),g==e){for(u=r,d=C;p=s>=d?b:d>=s+B?B:d-s,!(p>u);d+=C)y=u-p,m=C-p,x.push(N(c(p+y%m,0))),u=L(y/m);x.push(N(c(u,0))),s=f(r,v,n==i),r=0,++n}++r,++e}return x.join("")}function g(t){return a(t,function(t){return I.test(t)?d(t.slice(4).toLowerCase()):t})}function A(t){return a(t,function(t){return S.test(t)?"xn--"+p(t):t})}var v="object"==typeof n&&n&&!n.nodeType&&n,m="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof e&&e;(y.global===y||y.window===y||y.self===y)&&(i=y);var x,w,E=2147483647,C=36,b=1,B=26,T=38,D=700,M=72,P=128,R="-",I=/^xn--/,S=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Q=C-b,L=Math.floor,N=String.fromCharCode;if(x={version:"1.3.2",ucs2:{decode:h,encode:l},decode:d,encode:p,toASCII:A,toUnicode:g},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&m)if(r.exports==v)m.exports=x;else for(w in x)x.hasOwnProperty(w)&&(v[w]=x[w]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,e,r){function n(t,e,r){!t.defaultView||e===t.defaultView.pageXOffset&&r===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,r)}function i(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(r){a("Unable to copy canvas content from",t,r)}}function o(t,e){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),n=t.firstChild;n;)(e===!0||1!==n.nodeType||"SCRIPT"!==n.nodeName)&&(console.log(r),r.appendChild(o(n,e))),n=n.nextSibling;return 1===t.nodeType&&"BODY"!==t.tagName&&(r._scrollTop=t.scrollTop,r._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?i(t,r):("TEXTAREA"===t.nodeName||"SELECT"===t.nodeName)&&(r.value=t.value)),r}function s(t){if(1===t.nodeType){t.scrollTop=t._scrollTop,t.scrollLeft=t._scrollLeft;for(var e=t.firstChild;e;)s(e),e=e.nextSibling}}var a=t("./log"),h=t("./promise");e.exports=function(t,e,r,i,a,l,u){var c=o(t.documentElement,a.javascriptEnabled),f=e.createElement("iframe");return f.className="html2canvas-container",f.style.visibility="hidden",f.style.position="fixed",f.style.left="-10000px",f.style.top="0px",f.style.border="0",f.style.border="0",f.width=r,f.height=i,f.scrolling="no",e.body.appendChild(f),new h(function(e){var r=f.contentWindow.document;f.contentWindow.onload=f.onload=function(){var t=setInterval(function(){r.body.childNodes.length>0&&(s(r.documentElement),clearInterval(t),"view"===a.type&&(f.contentWindow.scrollTo(l,u),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||f.contentWindow.scrollY===u&&f.contentWindow.scrollX===l||(r.documentElement.style.top=-u+"px",r.documentElement.style.left=-l+"px",r.documentElement.style.position="absolute")),e(f))},50)},r.open(),r.write(""),n(t,l,u),r.replaceChild(r.adoptNode(c),r.documentElement),r.close()})}},{"./log":15,"./promise":18}],5:[function(t,e,r){function n(t){this.r=0,this.g=0,this.b=0,this.a=null;this.fromArray(t)||this.namedColor(t)||this.rgb(t)||this.rgba(t)||this.hex6(t)||this.hex3(t)}n.prototype.darken=function(t){var e=1-t;return new n([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(t){return Array.isArray(t)&&(this.r=Math.min(t[0],255),this.g=Math.min(t[1],255),this.b=Math.min(t[2],255),t.length>3&&(this.a=t[3])),Array.isArray(t)};var i=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(t){var e=null;return null!==(e=t.match(i))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(t){var e=null;return null!==(e=t.match(o))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var s=/^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;n.prototype.rgb=function(t){var e=null;return null!==(e=t.match(s))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var a=/^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;n.prototype.rgba=function(t){var e=null;return null!==(e=t.match(a))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(t){var e=h[t.toLowerCase()];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t.toLowerCase())return this.r=this.g=this.b=this.a=0,!0;return!!e},n.prototype.isColor=!0;var h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};e.exports=n},{}],6:[function(t,e,r){function n(t,e){var r=C++;if(e=e||{},e.logging&&(window.html2canvas.logging=!0,window.html2canvas.start=Date.now()),e.async="undefined"==typeof e.async?!0:e.async,e.allowTaint="undefined"==typeof e.allowTaint?!1:e.allowTaint,e.removeContainer="undefined"==typeof e.removeContainer?!0:e.removeContainer,e.javascriptEnabled="undefined"==typeof e.javascriptEnabled?!1:e.javascriptEnabled,e.imageTimeout="undefined"==typeof e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"==typeof e.renderer?e.renderer:d,e.strict=!!e.strict,"string"==typeof t){if("string"!=typeof e.proxy)return c.reject("Proxy must be used when rendering url");var n=null!=e.width?e.width:window.innerWidth,s=null!=e.height?e.height:window.innerHeight;return x(u(t),e.proxy,document,n,s,e).then(function(t){return o(t.contentWindow.document.documentElement,t,e,n,s)})}var a=(void 0===t?[document.documentElement]:t.length?t:[t])[0];return a.setAttribute(E+r,r),i(a.ownerDocument,e,a.ownerDocument.defaultView.innerWidth,a.ownerDocument.defaultView.innerHeight,r).then(function(t){return"function"==typeof e.onrendered&&(v("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),e.onrendered(t)),t})}function i(t,e,r,n,i){return y(t,t,r,n,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then(function(s){v("Document cloned");var a=E+i,h="["+a+"='"+i+"']";t.querySelector(h).removeAttribute(a);var l=s.contentWindow,u=l.document.querySelector(h);"0"===u.style.opacity&&"webgl"===u.getAttribute("renderer")?u.style.opacity=1:null;var f="function"==typeof e.onclone?c.resolve(e.onclone(l.document)):c.resolve(!0);return f.then(function(){return o(u,s,e,r,n)})})}function o(t,e,r,n,i){var o=e.contentWindow,u=new f(o.document),c=new p(r,u),d=w(t),A="view"===r.type?n:h(o.document),m="view"===r.type?i:l(o.document),y=new r.renderer(A,m,c,r,document),x=new g(t,y,u,c,r);return x.ready.then(function(){v("Finished rendering");var n;return"view"===r.type?n=a(y.canvas,{width:y.canvas.width,height:y.canvas.height,top:0,left:0,x:0,y:0}):t===o.document.body||t===o.document.documentElement||null!=r.canvas?n=y.canvas:(1!==window.devicePixelRatio&&(d.top=d.top*window.devicePixelRatio,d.left=d.left*window.devicePixelRatio,d.right=d.right*window.devicePixelRatio,d.bottom=d.bottom*window.devicePixelRatio),n=a(y.canvas,{width:null!=r.width?r.width:d.width,height:null!=r.height?r.height:d.height,top:d.top,left:d.left,x:o.pageXOffset,y:o.pageYOffset})),s(e,r),n})}function s(t,e){e.removeContainer&&(t.parentNode.removeChild(t),v("Cleaned up container"))}function a(t,e){var r=document.createElement("canvas"),n=Math.min(t.width-1,Math.max(0,e.left)),i=Math.min(t.width,Math.max(1,e.left+e.width)),o=Math.min(t.height-1,Math.max(0,e.top)),s=Math.min(t.height,Math.max(1,e.top+e.height));return r.width=e.width,r.height=e.height,v("Cropping canvas at:","left:",e.left,"top:",e.top,"width:",i-n,"height:",s-o),v("Resulting crop with width",e.width,"and height",e.height," with x",n,"and y",o),r.getContext("2d").drawImage(t,n,o,i-n,s-o,e.x,e.y,i-n,s-o),r}function h(t){return Math.max(Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),Math.max(t.body.offsetWidth,t.documentElement.offsetWidth),Math.max(t.body.clientWidth,t.documentElement.clientWidth))}function l(t){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))}function u(t){var e=document.createElement("a");return e.href=t,e.href=e.href,e}var c=t("./promise"),f=t("./support"),d=t("./renderers/canvas"),p=t("./imageloader"),g=t("./nodeparser"),A=t("./nodecontainer"),v=t("./log"),m=t("./utils"),y=t("./clone"),x=t("./proxy").loadUrlDocument,w=m.getBounds,E="data-html2canvas-node",C=0;n.Promise=c,n.CanvasRenderer=d,n.NodeContainer=A,n.log=v,n.utils=m,e.exports="undefined"==typeof document||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return c.reject("No canvas support")}:n},{"./clone":4,"./imageloader":13,"./log":15,"./nodecontainer":16,"./nodeparser":17,"./promise":18,"./proxy":19,"./renderers/canvas":23,"./support":25,"./utils":29}],7:[function(t,e,r){function n(t){if(this.src=t,o("DummyImageContainer for",t),!this.promise||!this.image){o("Initiating DummyImageContainer"),n.prototype.image=new Image;var e=this.image;n.prototype.promise=new i(function(t,r){e.onload=t,e.onerror=r,e.src=s(),e.complete===!0&&t(e)})}}var i=t("./promise"),o=t("./log"),s=t("./utils").smallImage;e.exports=n},{"./log":15,"./promise":18,"./utils":29}],8:[function(t,e,r){function n(t,e){var r,n,o=document.createElement("div"),s=document.createElement("img"),a=document.createElement("span"),h="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=t,o.style.fontSize=e,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),s.src=i(),s.width=1,s.height=1,s.style.margin=0,s.style.padding=0,s.style.verticalAlign="baseline",a.style.fontFamily=t,a.style.fontSize=e,a.style.margin=0,a.style.padding=0,a.appendChild(document.createTextNode(h)),o.appendChild(a),o.appendChild(s),r=s.offsetTop-a.offsetTop+1,o.removeChild(a),o.appendChild(document.createTextNode(h)),o.style.lineHeight="normal",s.style.verticalAlign="super",n=s.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=r,this.lineWidth=1,this.middle=n}var i=t("./utils").smallImage;e.exports=n},{"./utils":29}],9:[function(t,e,r){function n(){this.data={}}var i=t("./font");n.prototype.getMetrics=function(t,e){return void 0===this.data[t+"-"+e]&&(this.data[t+"-"+e]=new i(t,e)),this.data[t+"-"+e]},e.exports=n},{"./font":8}],10:[function(t,e,r){function n(e,r,n){this.image=null,this.src=e;var i=this,a=s(e);this.promise=(r?new o(function(t){"about:blank"===e.contentWindow.document.URL||null==e.contentWindow.document.documentElement?e.contentWindow.onload=e.onload=function(){t(e)}:t(e)}):this.proxyLoad(n.proxy,a,n)).then(function(e){var r=t("./core");return r(e.contentWindow.document.documentElement,{type:"view",width:e.width,height:e.height,proxy:n.proxy,javascriptEnabled:n.javascriptEnabled,removeContainer:n.removeContainer,allowTaint:n.allowTaint,imageTimeout:n.imageTimeout/2})}).then(function(t){return i.image=t})}var i=t("./utils"),o=t("./promise"),s=i.getBounds,a=t("./proxy").loadUrlDocument;n.prototype.proxyLoad=function(t,e,r){var n=this.src;return a(n.src,t,n.ownerDocument,e.width,e.height,r)},e.exports=n},{"./core":6,"./promise":18,"./proxy":19,"./utils":29}],11:[function(t,e,r){function n(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=i.resolve(!0)}var i=t("./promise");n.prototype.TYPES={LINEAR:1,RADIAL:2},e.exports=n},{"./promise":18}],12:[function(t,e,r){function n(t,e){this.src=t,this.image=new Image;var r=this;this.tainted=null,this.promise=new i(function(n,i){r.image.onload=n,r.image.onerror=i,e&&(r.image.crossOrigin="anonymous"),r.image.src=t,r.image.complete===!0&&n(r.image)})}var i=t("./promise");e.exports=n},{"./promise":18}],13:[function(t,e,r){function n(t,e){this.link=null,this.options=t,this.support=e,this.origin=this.getOrigin(window.location.href)}var i=t("./promise"),o=t("./log"),s=t("./imagecontainer"),a=t("./dummyimagecontainer"),h=t("./proxyimagecontainer"),l=t("./framecontainer"),u=t("./svgcontainer"),c=t("./svgnodecontainer"),f=t("./lineargradientcontainer"),d=t("./webkitgradientcontainer"),p=t("./utils").bind; +n.prototype.findImages=function(t){var e=[];return t.reduce(function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t},[]).forEach(this.addImage(e,this.loadImage),this),e},n.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},n.prototype.addImage=function(t,e){return function(r){r.args.forEach(function(n){this.imageExists(t,n)||(t.splice(0,0,e.call(this,r)),o("Added image #"+t.length,"string"==typeof n?n.substring(0,100):n))},this)}},n.prototype.hasImageBackground=function(t){return"none"!==t.method},n.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new s(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||this.options.allowTaint===!0||this.isSVG(e)?new s(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new s(e,!0):this.options.proxy?new h(e,this.options.proxy):new a(e):new u(e)}return"linear-gradient"===t.method?new f(t):"gradient"===t.method?new d(t):"svg"===t.method?new c(t.args[0],this.support.svg):"IFRAME"===t.method?new l(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new a(t)},n.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||u.prototype.isInline(t)},n.prototype.imageExists=function(t,e){return t.some(function(t){return t.src===e})},n.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},n.prototype.getOrigin=function(t){var e=this.link||(this.link=document.createElement("a"));return e.href=t,e.href=e.href,e.protocol+e.hostname+e.port},n.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout)["catch"](function(){var e=new a(t.src);return e.promise.then(function(e){t.image=e})})},n.prototype.get=function(t){var e=null;return this.images.some(function(r){return(e=r).src===t})?e:null},n.prototype.fetch=function(t){return this.images=t.reduce(p(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach(function(t,e){t.promise.then(function(){o("Succesfully loaded image #"+(e+1),t)},function(r){o("Failed loading image #"+(e+1),t,r)})}),this.ready=i.all(this.images.map(this.getPromise,this)),o("Finished searching images"),this},n.prototype.timeout=function(t,e){var r,n=i.race([t.promise,new i(function(n,i){r=setTimeout(function(){o("Timed out loading image",t),i(t)},e)})]).then(function(t){return clearTimeout(r),t});return n["catch"](function(){clearTimeout(r)}),n},e.exports=n},{"./dummyimagecontainer":7,"./framecontainer":10,"./imagecontainer":12,"./lineargradientcontainer":14,"./log":15,"./promise":18,"./proxyimagecontainer":20,"./svgcontainer":26,"./svgnodecontainer":27,"./utils":29,"./webkitgradientcontainer":30}],14:[function(t,e,r){function n(t){i.apply(this,arguments),this.type=this.TYPES.LINEAR;var e=null===t.args[0].match(this.stepRegExp);e?t.args[0].split(" ").reverse().forEach(function(t){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var e=this.y0,r=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=r,this.y1=e}},this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map(function(t){var e=t.match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)|\w+)\s*(\d{1,3})?(%|px)?/);return{color:new o(e[1]),stop:"%"===e[3]?e[2]/100:null}},this),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach(function(t,e){null===t.stop&&this.colorStops.slice(e).some(function(r,n){return null!==r.stop?(t.stop=(r.stop-this.colorStops[e-1].stop)/(n+1)+this.colorStops[e-1].stop,!0):!1},this)},this)}var i=t("./gradientcontainer"),o=t("./color");n.prototype=Object.create(i.prototype),n.prototype.stepRegExp=/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/,e.exports=n},{"./color":5,"./gradientcontainer":11}],15:[function(t,e,r){e.exports=function(){window.html2canvas.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-window.html2canvas.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))}},{}],16:[function(t,e,r){function n(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function i(t){var e=t.options[t.selectedIndex||0];return e?e.text||"":""}function o(t){if(t&&"matrix"===t[1])return t[2].split(",").map(function(t){return parseFloat(t.trim())});if(t&&"matrix3d"===t[1]){var e=t[2].split(",").map(function(t){return parseFloat(t.trim())});return[e[0],e[1],e[4],e[5],e[12],e[13]]}}function s(t){return-1!==t.toString().indexOf("%")}function a(t){return t.replace("px","")}function h(t){return parseFloat(t)}var l=t("./color"),u=t("./utils"),c=u.getBounds,f=u.parseBackgrounds,d=u.offsetBounds;n.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},n.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},n.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},n.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},n.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},n.prototype.prefixedCss=function(t){var e=["webkit","moz","ms","o"],r=this.css(t);return void 0===r&&e.some(function(e){return r=this.css(e+t.substr(0,1).toUpperCase()+t.substr(1)),void 0!==r},this),void 0===r?null:r},n.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},n.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},n.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new l(this.css(t)))},n.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},n.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal"}return t},n.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},n.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=f(this.css("backgroundImage")))},n.prototype.cssList=function(t,e){var r=(this.css(t)||"").split(",");return r=r[e||0]||r[0]||"auto",r=r.trim().split(" "),1===r.length&&(r=[r[0],s(r[0])?"auto":r[0]]),r},n.prototype.parseBackgroundSize=function(t,e,r){var n,i,o=this.cssList("backgroundSize",r);if(s(o[0]))n=t.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=t.width/t.height,h=e.width/e.height;return h>a^"contain"===o[0]?{width:t.height*h,height:t.height}:{width:t.width,height:t.width/h}}n=parseInt(o[0],10)}return i="auto"===o[0]&&"auto"===o[1]?e.height:"auto"===o[1]?n/e.width*e.height:s(o[1])?t.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=i/e.height*e.width),{width:n,height:i}},n.prototype.parseBackgroundPosition=function(t,e,r,n){var i,o,a=this.cssList("backgroundPosition",r);return i=s(a[0])?(t.width-(n||e).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?i/e.width*e.height:s(a[1])?(t.height-(n||e).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(i=o/e.height*e.width),{left:i,top:o}},n.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},n.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var r=t.match(this.TEXT_SHADOW_PROPERTY),n=0;r&&n0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())},this))},this))}function i(t){return t.parent&&t.parent.clip.length}function o(t){return t.replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")})}function s(){}function a(t,e,r,n){return t.map(function(i,o){if(i.width>0){var s=e.left,a=e.top,h=e.width,l=e.height-t[2].width;switch(o){case 0:l=t[0].width,i.args=c({c1:[s,a],c2:[s+h,a],c3:[s+h-t[1].width,a+l],c4:[s+t[3].width,a+l]},n[0],n[1],r.topLeftOuter,r.topLeftInner,r.topRightOuter,r.topRightInner);break;case 1:s=e.left+e.width-t[1].width,h=t[1].width,i.args=c({c1:[s+h,a],c2:[s+h,a+l+t[2].width],c3:[s,a+l],c4:[s,a+t[0].width]},n[1],n[2],r.topRightOuter,r.topRightInner,r.bottomRightOuter,r.bottomRightInner);break;case 2:a=a+e.height-t[2].width,l=t[2].width,i.args=c({c1:[s+h,a+l],c2:[s,a+l],c3:[s+t[3].width,a],c4:[s+h-t[3].width,a]},n[2],n[3],r.bottomRightOuter,r.bottomRightInner,r.bottomLeftOuter,r.bottomLeftInner);break;case 3:h=t[3].width,i.args=c({c1:[s,a+l+t[2].width],c2:[s,a],c3:[s+h,a+t[0].width],c4:[s+h,a+l]},n[3],n[0],r.bottomLeftOuter,r.bottomLeftInner,r.topLeftOuter,r.topLeftInner)}}return i})}function h(t,e,r,n){var i=4*((Math.sqrt(2)-1)/3),o=r*i,s=n*i,a=t+r,h=e+n;return{topLeft:u({x:t,y:h},{x:t,y:h-s},{x:a-o,y:e},{x:a,y:e}),topRight:u({x:t,y:e},{x:t+o,y:e},{x:a,y:h-s},{x:a,y:h}),bottomRight:u({x:a,y:e},{x:a,y:e+s},{x:t+o,y:h},{x:t,y:h}),bottomLeft:u({x:a,y:h},{x:a-o,y:h},{x:t,y:e+s},{x:t,y:e})}}function l(t,e,r){var n=t.left,i=t.top,o=t.width,s=t.height,a=e[0][0],l=e[0][1],u=e[1][0],c=e[1][1],f=e[2][0],d=e[2][1],p=e[3][0],g=e[3][1],A=Math.floor(s/2);a=a>A?A:a,l=l>A?A:l,u=u>A?A:u,c=c>A?A:c,f=f>A?A:f,d=d>A?A:d,p=p>A?A:p,g=g>A?A:g;var v=o-u,m=s-d,y=o-f,x=s-g;return{topLeftOuter:h(n,i,a,l).topLeft.subdivide(.5),topLeftInner:h(n+r[3].width,i+r[0].width,Math.max(0,a-r[3].width),Math.max(0,l-r[0].width)).topLeft.subdivide(.5),topRightOuter:h(n+v,i,u,c).topRight.subdivide(.5),topRightInner:h(n+Math.min(v,o+r[3].width),i+r[0].width,v>o+r[3].width?0:u-r[3].width,c-r[0].width).topRight.subdivide(.5),bottomRightOuter:h(n+y,i+m,f,d).bottomRight.subdivide(.5),bottomRightInner:h(n+Math.min(y,o-r[3].width),i+Math.min(m,s+r[0].width),Math.max(0,f-r[1].width),d-r[2].width).bottomRight.subdivide(.5),bottomLeftOuter:h(n,i+x,p,g).bottomLeft.subdivide(.5),bottomLeftInner:h(n+r[3].width,i+x,Math.max(0,p-r[3].width),g-r[2].width).bottomLeft.subdivide(.5)}}function u(t,e,r,n){var i=function(t,e,r){return{x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r}};return{start:t,startControl:e,endControl:r,end:n,subdivide:function(o){var s=i(t,e,o),a=i(e,r,o),h=i(r,n,o),l=i(s,a,o),c=i(a,h,o),f=i(l,c,o);return[u(t,s,l,f),u(f,c,h,n)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,r.x,r.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",r.x,r.y,e.x,e.y,t.x,t.y])}}}function c(t,e,r,n,i,o,s){var a=[];return e[0]>0||e[1]>0?(a.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(a)):a.push(["line",t.c1[0],t.c1[1]]),r[0]>0||r[1]>0?(a.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(a),a.push(["line",s[0].end.x,s[0].end.y]),s[0].curveToReversed(a)):(a.push(["line",t.c2[0],t.c2[1]]),a.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(a.push(["line",i[1].end.x,i[1].end.y]),i[1].curveToReversed(a)):a.push(["line",t.c4[0],t.c4[1]]),a}function f(t,e,r,n,i,o,s){e[0]>0||e[1]>0?(t.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(t),n[1].curveTo(t)):t.push(["line",o,s]),(r[0]>0||r[1]>0)&&t.push(["line",i[0].start.x,i[0].start.y])}function d(t){return t.cssInt("zIndex")<0}function p(t){return t.cssInt("zIndex")>0}function g(t){return 0===t.cssInt("zIndex")}function A(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function v(t){return t instanceof K}function m(t){return t.node.data.trim().length>0}function y(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function x(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(e){var r=t.css("border"+e+"Radius"),n=r.split(" ");return n.length<=1&&(n[1]=n[0]),n.map(S)})}function w(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function E(t){var e=t.css("position"),r=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==r}function C(t){return"static"!==t.css("position")}function b(t){return"none"!==t.css("float")}function B(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function T(t){var e=this;return function(){return!t.apply(e,arguments)}}function D(t){return t.node.nodeType===Node.ELEMENT_NODE}function M(t){return t.isPseudoElement===!0}function P(t){return t.node.nodeType===Node.TEXT_NODE}function R(t){return function(e,r){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(r.cssInt("zIndex")+t.indexOf(r)/t.length)}}function I(t){return t.getOpacity()<1}function S(t){return parseInt(t,10)}function O(t){return t.width}function F(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function Q(t){return[].concat.apply([],t)}function L(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}function N(t){for(var e,r=[],n=0,i=!1;t.length;)H(t[n])===i?(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)),i=!i,n=0):n++,n>=t.length&&(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)));return r}function H(t){return-1!==[32,13,10,9,45].indexOf(t)}function k(t){return/[^\u0000-\u00ff]/.test(t)}var G=t("./log"),Y=t("punycode"),j=t("./nodecontainer"),z=t("./textcontainer"),U=t("./pseudoelementcontainer"),J=t("./fontmetrics"),X=t("./color"),W=t("./promise"),K=t("./stackingcontext"),V=t("./utils"),Z=V.bind,q=V.getBounds,_=V.parseBackgrounds,$=V.offsetBounds;n.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(t){if(D(t)){M(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],r=t.parseClip();r&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+r.left,t.bounds.top+r.top,r.right-r.left,r.bottom-r.top]]),t.clip=i(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,M(t)&&t.cleanDOM()}else P(t)&&(t.clip=i(t)?t.parent.clip:[]);M(t)||(t.bounds=null)},this)},n.prototype.asyncRenderer=function(t,e,r){r=r||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():r+20>Date.now()?this.asyncRenderer(t,e,r):setTimeout(Z(function(){this.asyncRenderer(t,e)},this),0)},n.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},n.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},n.prototype.createStyles=function(t,e){var r=t.createElement("style");r.innerHTML=e,t.body.appendChild(r)},n.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var r=this.getPseudoElement(t,":before"),n=this.getPseudoElement(t,":after");r&&e.push(r),n&&e.push(n)}return Q(e)},n.prototype.getPseudoElement=function(t,e){var r=t.computedStyle(e);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var n=L(r.content),i="url"===n.substr(0,3),s=document.createElement(i?"img":"html2canvaspseudoelement"),a=new U(s,t,e),h=r.length-1;h>=0;h--){var l=o(r.item(h));s.style[l]=r[l]}if(s.className=U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,i)return s.src=_(n)[0].args[0],[a];var u=document.createTextNode(n);return s.appendChild(u),[a,new z(u,a)]},n.prototype.getChildren=function(t){return Q([].filter.call(t.node.childNodes,w).map(function(e){var r=[e.nodeType===Node.TEXT_NODE?new z(e,t):new j(e,t)].filter(F);return e.nodeType===Node.ELEMENT_NODE&&r.length&&"TEXTAREA"!==e.tagName?r[0].isElementVisible()?r.concat(this.getChildren(r[0])):[]:r},this))},n.prototype.newStackingContext=function(t,e){var r=new K(e,t.getOpacity(),t.node,t.parent);t.cloneTo(r);var n=e?r.getParentStack(this):r.parent.stack;n.contexts.push(r),t.stack=r},n.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){D(t)&&(this.isRootElement(t)||I(t)||E(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):D(t)&&(C(t)&&g(t)||B(t)||b(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)},this)},n.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},n.prototype.isRootElement=function(t){return null===t.parent},n.prototype.sortStackingContexts=function(t){t.contexts.sort(R(t.contexts.slice(0))),t.contexts.forEach(this.sortStackingContexts,this)},n.prototype.parseTextBounds=function(t){return function(e,r,n){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var i=n.slice(0,r).join("").length;return this.getRangeBounds(t.node,i,e.length)}if(t.node&&"string"==typeof t.node.data){var o=t.node.splitText(e.length),s=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=o,s}}else(!this.support.rangeBounds||t.parent.hasTransform())&&(t.node=t.node.splitText(e.length));return{}}},n.prototype.getWrapperBounds=function(t,e){var r=t.ownerDocument.createElement("html2canvaswrapper"),n=t.parentNode,i=t.cloneNode(!0);r.appendChild(t.cloneNode(!0)),n.replaceChild(r,t);var o=e?$(r):q(r);return n.replaceChild(i,r),o},n.prototype.getRangeBounds=function(t,e,r){var n=this.range||(this.range=t.ownerDocument.createRange());return n.setStart(t,e),n.setEnd(t,e+r),n.getBoundingClientRect()},n.prototype.parse=function(t){var e=t.contexts.filter(d),r=t.children.filter(D),n=r.filter(T(b)),i=n.filter(T(C)).filter(T(A)),o=r.filter(T(C)).filter(b),a=n.filter(T(C)).filter(A),h=t.contexts.concat(n.filter(C)).filter(g),l=t.children.filter(P).filter(m),u=t.contexts.filter(p);e.concat(i).concat(o).concat(a).concat(h).concat(l).concat(u).forEach(function(t){this.renderQueue.push(t),v(t)&&(this.parse(t),this.renderQueue.push(new s))},this)},n.prototype.paint=function(t){try{t instanceof s?this.renderer.ctx.restore():P(t)?(M(t.parent)&&t.parent.appendToDOM(),this.paintText(t),M(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(G(e),this.options.strict)throw e}},n.prototype.paintNode=function(t){v(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},n.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,function(){this.renderer.renderBackground(t,e,t.borders.borders.map(O))},this),this.renderer.clip(t.clip,function(){this.renderer.renderBorders(t.borders.borders)},this),this.renderer.clip(t.backgroundClip,function(){switch(t.node.nodeName){case"svg":case"IFRAME":var r=this.images.get(t.node);r?this.renderer.renderImage(t,e,t.borders,r):G("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var n=this.images.get(t.node.src);n?this.renderer.renderImage(t,e,t.borders,n):G("Error loading ",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this)},n.prototype.paintCheckbox=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height),n={width:r-1,height:r-1,top:e.top,left:e.left},i=[3,3],o=[i,i,i,i],s=[1,1,1,1].map(function(t){return{color:new X("#A5A5A5"),width:t}}),h=l(n,o,s);this.renderer.clip(t.backgroundClip,function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new X("#DEDEDE")),this.renderer.renderBorders(a(s,n,h,o)),t.node.checked&&(this.renderer.font(new X("#424242"),"normal","normal","bold",r-3+"px","arial"),this.renderer.text("✔",n.left+r/6,n.top+r-1))},this)},n.prototype.paintRadio=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,function(){this.renderer.circleStroke(e.left+1,e.top+1,r,new X("#DEDEDE"),1,new X("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+r/4)+1,Math.ceil(e.top+r/4)+1,Math.floor(r/2),new X("#424242"))},this)},n.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var r=t.node.ownerDocument,n=r.createElement("html2canvaswrapper"),i=["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"];i.forEach(function(e){try{n.style[e]=t.css(e)}catch(r){G("html2canvas: Parse: Exception caught in renderFormValue: "+r.message)}});var o=t.parseBounds();n.style.position="fixed",n.style.left=o.left+"px",n.style.top=o.top+"px",n.textContent=e,r.body.appendChild(n),this.paintText(new z(n.firstChild,t)),r.body.removeChild(n)}},n.prototype.paintText=function(t){t.applyTextTransform();var e=Y.ucs2.decode(t.node.data),r=this.options.letterRendering&&!y(t)||k(t.node.data)?e.map(function(t){return Y.ucs2.encode([t])}):N(e),n=t.parent.fontWeight(),i=t.parent.css("fontSize"),o=t.parent.css("fontFamily"),s=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),n,i,o),s.length?this.renderer.fontShadow(s[0].color,s[0].offsetX,s[0].offsetY,s[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){r.map(this.parseTextBounds(t),this).forEach(function(e,n){e&&(this.renderer.text(r[n],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(o,i)))},this)},this)},n.prototype.renderTextDecoration=function(t,e,r){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+r.baseline+r.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+r.middle+r.lineWidth),e.width,1,t.color("color"))}};var tt={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};n.prototype.parseBorders=function(t){var e=t.parseBounds(),r=x(t),n=["Top","Right","Bottom","Left"].map(function(e,r){var n=t.css("border"+e+"Style"),i=t.color("border"+e+"Color");"inset"===n&&i.isBlack()&&(i=new X([255,255,255,i.a]));var o=tt[n]?tt[n][r]:null;return{width:t.cssInt("border"+e+"Width"),color:o?i[o[0]](o[1]):i,args:null}}),i=l(e,r,n);return{clip:this.parseBackgroundClip(t,i,n,r,e),borders:a(n,e,i,r)}},n.prototype.parseBackgroundClip=function(t,e,r,n,i){var o=t.css("backgroundClip"),s=[];switch(o){case"content-box":case"padding-box":f(s,n[0],n[1],e.topLeftInner,e.topRightInner,i.left+r[3].width,i.top+r[0].width),f(s,n[1],n[2],e.topRightInner,e.bottomRightInner,i.left+i.width-r[1].width,i.top+r[0].width),f(s,n[2],n[3],e.bottomRightInner,e.bottomLeftInner,i.left+i.width-r[1].width,i.top+i.height-r[2].width),f(s,n[3],n[0],e.bottomLeftInner,e.topLeftInner,i.left+r[3].width,i.top+i.height-r[2].width);break;default:f(s,n[0],n[1],e.topLeftOuter,e.topRightOuter,i.left,i.top),f(s,n[1],n[2],e.topRightOuter,e.bottomRightOuter,i.left+i.width,i.top),f(s,n[2],n[3],e.bottomRightOuter,e.bottomLeftOuter,i.left+i.width,i.top+i.height),f(s,n[3],n[0],e.bottomLeftOuter,e.topLeftOuter,i.left,i.top+i.height)}return s},e.exports=n},{"./color":5,"./fontmetrics":9,"./log":15,"./nodecontainer":16,"./promise":18,"./pseudoelementcontainer":21,"./stackingcontext":24,"./textcontainer":28,"./utils":29,punycode:3}],18:[function(t,e,r){e.exports=t("es6-promise").Promise},{"es6-promise":1}],19:[function(t,e,r){function n(t,e,r){var n="withCredentials"in new XMLHttpRequest;if(!e)return u.reject("No proxy configured");var i=s(n),h=a(e,t,i);return n?c(h):o(r,h,i).then(function(t){return g(t.content)})}function i(t,e,r){var n="crossOrigin"in new Image,i=s(n),h=a(e,t,i);return n?u.resolve(h):o(r,h,i).then(function(t){return"data:"+t.type+";base64,"+t.content})}function o(t,e,r){return new u(function(n,i){var o=t.createElement("script"),s=function(){delete window.html2canvas.proxy[r],t.body.removeChild(o)};window.html2canvas.proxy[r]=function(t){s(),n(t)},o.src=e,o.onerror=function(t){s(),i(t)},t.body.appendChild(o)})}function s(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++A+"_"+Math.round(1e5*Math.random())}function a(t,e,r){return t+"?url="+encodeURIComponent(e)+(r.length?"&callback=html2canvas.proxy."+r:"")}function h(t){return function(e){var r,n=new DOMParser;try{r=n.parseFromString(e,"text/html")}catch(i){d("DOMParser not supported, falling back to createHTMLDocument"),r=document.implementation.createHTMLDocument("");try{r.open(),r.write(e),r.close()}catch(o){d("createHTMLDocument write not supported, falling back to document.body.innerHTML"),r.body.innerHTML=e}}var s=r.querySelector("base");if(!s||!s.href.host){var a=r.createElement("base");a.href=t,r.head.insertBefore(a,r.head.firstChild)}return r}}function l(t,e,r,i,o,s){return new n(t,e,window.document).then(h(t)).then(function(t){return p(t,r,i,o,s,0,0)})}var u=t("./promise"),c=t("./xhr"),f=t("./utils"),d=t("./log"),p=t("./clone"),g=f.decode64,A=0;r.Proxy=n,r.ProxyURL=i,r.loadUrlDocument=l},{"./clone":4,"./log":15,"./promise":18,"./utils":29,"./xhr":31}],20:[function(t,e,r){function n(t,e){var r=document.createElement("a");r.href=t,t=r.href,this.src=t,this.image=new Image;var n=this;this.promise=new o(function(r,o){n.image.crossOrigin="Anonymous",n.image.onload=r,n.image.onerror=o,new i(t,e,document).then(function(t){n.image.src=t})["catch"](o)})}var i=t("./proxy").ProxyURL,o=t("./promise");e.exports=n},{"./promise":18,"./proxy":19}],21:[function(t,e,r){function n(t,e,r){i.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===r}var i=t("./nodecontainer");n.prototype.cloneTo=function(t){n.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},n.prototype=Object.create(i.prototype),n.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},n.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},n.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",e.exports=n},{"./nodecontainer":16}],22:[function(t,e,r){function n(t,e,r,n,i){this.width=t,this.height=e,this.images=r,this.options=n,this.document=i}var i=t("./log");n.prototype.renderImage=function(t,e,r,n){var i=t.cssInt("paddingLeft"),o=t.cssInt("paddingTop"),s=t.cssInt("paddingRight"),a=t.cssInt("paddingBottom"),h=r.borders,l=e.width-(h[1].width+h[3].width+i+s),u=e.height-(h[0].width+h[2].width+o+a);this.drawImage(n,0,0,n.image.width||l,n.image.height||u,e.left+i+h[3].width,e.top+o+h[0].width,l,u)},n.prototype.renderBackground=function(t,e,r){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,r))},n.prototype.renderBackgroundColor=function(t,e){var r=t.color("backgroundColor");r.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,r)},n.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},n.prototype.renderBorder=function(t){t.color.isTransparent()||null===t.args||this.drawShape(t.args,t.color)},n.prototype.renderBackgroundImage=function(t,e,r){ +var n=t.parseBackgroundImages();n.reverse().forEach(function(n,o,s){switch(n.method){case"url":var a=this.images.get(n.args[0]);a?this.renderBackgroundRepeating(t,e,a,s.length-(o+1),r):i("Error loading background-image",n.args[0]);break;case"linear-gradient":case"gradient":var h=this.images.get(n.value);h?this.renderBackgroundGradient(h,e,r):i("Error loading background-image",n.args[0]);break;case"none":break;default:i("Unknown background-image type",n.args[0])}},this)},n.prototype.renderBackgroundRepeating=function(t,e,r,n,i){var o=t.parseBackgroundSize(e,r.image,n),s=t.parseBackgroundPosition(e,r.image,n,o),a=t.parseBackgroundRepeat(n);switch(a){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+i[3],e.top+s.top+i[0],99999,o.height,i);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+i[0],o.width,99999,i);break;case"no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+s.top+i[0],o.width,o.height,i);break;default:this.renderBackgroundRepeat(r,s,o,{top:e.top,left:e.left},i[3],i[0])}},e.exports=n},{"./log":15}],23:[function(t,e,r){function n(t,e){if(this.ratio=window.devicePixelRatio,t=this.applyRatio(t),e=this.applyRatio(e),o.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),!this.options.canvas&&(this.canvas.width=t,this.canvas.height=e,1!==this.ratio)){var r=1/this.ratio;this.canvas.style.transform="scaleX("+r+") scaleY("+r+")",this.canvas.style.transformOrigin="0 0"}this.ctx=this.canvas.getContext("2d"),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},a("Initialized CanvasRenderer with size",t,"x",e)}function i(t){return t.length>0}var o=t("../renderer"),s=t("../lineargradientcontainer"),a=t("../log");n.prototype=Object.create(o.prototype),n.prototype.applyRatio=function(t){return t*this.ratio},n.prototype.applyRatioToBounds=function(t){t.width=t.width*this.ratio,t.top=t.top*this.ratio;try{t.left=t.left*this.ratio,t.height=t.height*this.ratio}catch(e){}return t},n.prototype.applyRatioToPosition=function(t){return t.left=t.left*this.ratio,t.height=t.height*this.ratio,bounds},n.prototype.applyRatioToShape=function(t){for(var e=0;e";try{r.drawImage(t,0,0),e.toDataURL()}catch(n){return!1}return!0},e.exports=n},{}],26:[function(t,e,r){function n(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then(function(){return e.isInline(t)?i.resolve(e.inlineFormatting(t)):o(t)}).then(function(t){return new i(function(r){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,r))})})}var i=t("./promise"),o=t("./xhr"),s=t("./utils").decode64;n.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?i.resolve():i.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},n.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},n.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},n.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},n.prototype.createCanvas=function(t){var e=this;return function(r,n){var i=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=i.lowerCanvasEl,i.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(r,n)).renderAll(),t(i.lowerCanvasEl)}},n.prototype.decode64=function(t){return"function"==typeof window.atob?window.atob(t):s(t)},e.exports=n},{"./promise":18,"./utils":29,"./xhr":31}],27:[function(t,e,r){function n(t,e){this.src=t,this.image=null;var r=this;this.promise=e?new o(function(e,n){r.image=new Image,r.image.onload=e,r.image.onerror=n,r.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),r.image.complete===!0&&e(r.image)}):this.hasFabric().then(function(){return new o(function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,r.createCanvas.call(r,e))})})}var i=t("./svgcontainer"),o=t("./promise");n.prototype=Object.create(i.prototype),e.exports=n},{"./promise":18,"./svgcontainer":26}],28:[function(t,e,r){function n(t,e){o.call(this,t,e)}function i(t,e,r){return t.length>0?e+r.toUpperCase():void 0}var o=t("./nodecontainer");n.prototype=Object.create(o.prototype),n.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},n.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,i);case"uppercase":return e.toUpperCase();default:return e}},e.exports=n},{"./nodecontainer":16}],29:[function(t,e,r){r.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},r.bind=function(t,e){return function(){return t.apply(e,arguments)}},r.decode64=function(t){var e,r,n,i,o,s,a,h,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=t.length,c="";for(e=0;u>e;e+=4)r=l.indexOf(t[e]),n=l.indexOf(t[e+1]),i=l.indexOf(t[e+2]),o=l.indexOf(t[e+3]),s=r<<2|n>>4,a=(15&n)<<4|i>>2,h=(3&i)<<6|o,c+=64===i?String.fromCharCode(s):64===o||-1===o?String.fromCharCode(s,a):String.fromCharCode(s,a,h);return c},r.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),r=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+r,left:e.left,width:r,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},r.offsetBounds=function(t){var e=t.offsetParent?r.offsetBounds(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+e.top,bottom:t.offsetTop+t.offsetHeight+e.top,right:t.offsetLeft+e.left+t.offsetWidth,left:t.offsetLeft+e.left,width:t.offsetWidth,height:t.offsetHeight}},r.parseBackgrounds=function(t){var e,r,n,i,o,s,a,h=" \r\n ",l=[],u=0,c=0,f=function(){e&&('"'===r.substr(0,1)&&(r=r.substr(1,r.length-2)),r&&a.push(r),"-"===e.substr(0,1)&&(i=e.indexOf("-",1)+1)>0&&(n=e.substr(0,i),e=e.substr(i)),l.push({prefix:n,method:e.toLowerCase(),value:o,args:a,image:null})),a=[],e=n=r=o=""};return a=[],e=n=r=o="",t.split("").forEach(function(t){if(!(0===u&&h.indexOf(t)>-1)){switch(t){case'"':s?s===t&&(s=null):s=t;break;case"(":if(s)break;if(0===u)return u=1,void(o+=t);c++;break;case")":if(s)break;if(1===u){if(0===c)return u=0,o+=t,void f();c--}break;case",":if(s)break;if(0===u)return void f();if(1===u&&0===c&&!e.match(/^url$/i))return a.push(r),r="",void(o+=t)}o+=t,0===u?e+=t:r+=t}}),f(),l}},{}],30:[function(t,e,r){function n(t){i.apply(this,arguments),this.type="linear"===t.args[0]?this.TYPES.LINEAR:this.TYPES.RADIAL}var i=t("./gradientcontainer");n.prototype=Object.create(i.prototype),e.exports=n},{"./gradientcontainer":11}],31:[function(t,e,r){function n(t){return new i(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.onload=function(){200===n.status?e(n.responseText):r(new Error(n.statusText))},n.onerror=function(){r(new Error("Network Error"))},n.send()})}var i=t("./promise");e.exports=n},{"./promise":18}]},{},[6])(6)}),function(t){function e(t){var e=t.length,n=r.type(t);return"function"===n||r.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}if(!t.jQuery){var r=function(t,e){return new r.fn.init(t,e)};r.isWindow=function(t){return null!=t&&t==t.window},r.type=function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?i[s.call(t)]||"object":typeof t},r.isArray=Array.isArray||function(t){return"array"===r.type(t)},r.isPlainObject=function(t){var e;if(!t||"object"!==r.type(t)||t.nodeType||r.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}for(e in t);return void 0===e||o.call(t,e)},r.each=function(t,r,n){var i,o=0,s=t.length,a=e(t);if(n){if(a)for(;s>o&&(i=r.apply(t[o],n),i!==!1);o++);else for(o in t)if(i=r.apply(t[o],n),i===!1)break}else if(a)for(;s>o&&(i=r.call(t[o],o,t[o]),i!==!1);o++);else for(o in t)if(i=r.call(t[o],o,t[o]),i===!1)break;return t},r.data=function(t,e,i){if(void 0===i){var o=t[r.expando],s=o&&n[o];if(void 0===e)return s;if(s&&e in s)return s[e]}else if(void 0!==e){var o=t[r.expando]||(t[r.expando]=++r.uuid);return n[o]=n[o]||{},n[o][e]=i,i}},r.removeData=function(t,e){var i=t[r.expando],o=i&&n[i];o&&r.each(e,function(t,e){delete o[e]})},r.extend=function(){var t,e,n,i,o,s,a=arguments[0]||{},h=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[h]||{},h++),"object"!=typeof a&&"function"!==r.type(a)&&(a={}),h===l&&(a=this,h--);l>h;h++)if(null!=(o=arguments[h]))for(i in o)t=a[i],n=o[i],a!==n&&(u&&n&&(r.isPlainObject(n)||(e=r.isArray(n)))?(e?(e=!1,s=t&&r.isArray(t)?t:[]):s=t&&r.isPlainObject(t)?t:{},a[i]=r.extend(u,s,n)):void 0!==n&&(a[i]=n));return a},r.queue=function(t,n,i){function o(t,r){var n=r||[];return null!=t&&(e(Object(t))?!function(t,e){for(var r=+e.length,n=0,i=t.length;r>n;)t[i++]=e[n++];if(r!==r)for(;void 0!==e[n];)t[i++]=e[n++];return t.length=i,t}(n,"string"==typeof t?[t]:t):[].push.call(n,t)),n}if(t){n=(n||"fx")+"queue";var s=r.data(t,n);return i?(!s||r.isArray(i)?s=r.data(t,n,o(i)):s.push(i),s):s||[]}},r.dequeue=function(t,e){r.each(t.nodeType?[t]:t,function(t,n){e=e||"fx";var i=r.queue(n,e),o=i.shift();"inprogress"===o&&(o=i.shift()),o&&("fx"===e&&i.unshift("inprogress"),o.call(n,function(){r.dequeue(n,e)}))})},r.fn=r.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function t(){for(var t=this.offsetParent||document;t&&"html"===!t.nodeType.toLowerCase&&"static"===t.style.position;)t=t.offsetParent;return t||document}var e=this[0],t=t.apply(e),n=this.offset(),i=/^(?:body|html)$/i.test(t.nodeName)?{top:0,left:0}:r(t).offset();return n.top-=parseFloat(e.style.marginTop)||0,n.left-=parseFloat(e.style.marginLeft)||0,t.style&&(i.top+=parseFloat(t.style.borderTopWidth)||0,i.left+=parseFloat(t.style.borderLeftWidth)||0),{top:n.top-i.top,left:n.left-i.left}}};var n={};r.expando="velocity"+(new Date).getTime(),r.uuid=0;for(var i={},o=i.hasOwnProperty,s=i.toString,a="Boolean Number String Function Array Date RegExp Object Error".split(" "),h=0;hi;++i){var o=l(r,t,n);if(0===o)return r;var s=h(r,t,n)-e;r-=s/o}return r}function c(){for(var e=0;y>e;++e)C[e]=h(e*x,t,n)}function f(e,r,i){var o,s,a=0;do s=r+(i-r)/2,o=h(s,t,n)-e,o>0?i=s:r=s;while(Math.abs(o)>v&&++a=A?u(e,a):0==h?a:f(e,r,r+x)}function p(){b=!0,(t!=r||n!=i)&&c()}var g=4,A=.001,v=1e-7,m=10,y=11,x=1/(y-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var E=0;4>E;++E)if("number"!=typeof arguments[E]||isNaN(arguments[E])||!isFinite(arguments[E]))return!1;t=Math.min(t,1),n=Math.min(n,1),t=Math.max(t,0),n=Math.max(n,0);var C=w?new Float32Array(y):new Array(y),b=!1,B=function(e){return b||p(),t===r&&n===i?e:0===e?0:1===e?1:h(d(e),r,i)};B.getControlPoints=function(){return[{x:t,y:r},{x:n,y:i}]};var T="generateBezier("+[t,r,n,i]+")";return B.toString=function(){return T},B}function l(t,e){var r=t;return g.isString(t)?y.Easings[t]||(r=!1):r=g.isArray(t)&&1===t.length?a.apply(null,t):g.isArray(t)&&2===t.length?x.apply(null,t.concat([e])):g.isArray(t)&&4===t.length?h.apply(null,t):!1,r===!1&&(r=y.Easings[y.defaults.easing]?y.defaults.easing:m),r}function u(t){if(t){var e=(new Date).getTime(),r=y.State.calls.length;r>1e4&&(y.State.calls=i(y.State.calls));for(var o=0;r>o;o++)if(y.State.calls[o]){var a=y.State.calls[o],h=a[0],l=a[2],d=a[3],p=!!d,A=null;d||(d=y.State.calls[o][3]=e-16);for(var v=Math.min((e-d)/l.duration,1),m=0,x=h.length;x>m;m++){var E=h[m],b=E.element;if(s(b)){var B=!1;if(l.display!==n&&null!==l.display&&"none"!==l.display){if("flex"===l.display){var T=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];f.each(T,function(t,e){w.setPropertyValue(b,"display",e)})}w.setPropertyValue(b,"display",l.display)}l.visibility!==n&&"hidden"!==l.visibility&&w.setPropertyValue(b,"visibility",l.visibility);for(var D in E)if("element"!==D){var M,P=E[D],R=g.isString(P.easing)?y.Easings[P.easing]:P.easing;if(1===v)M=P.endValue;else{var I=P.endValue-P.startValue;if(M=P.startValue+I*R(v,l,I),!p&&M===P.currentValue)continue}if(P.currentValue=M,"tween"===D)A=M;else{if(w.Hooks.registered[D]){var S=w.Hooks.getRoot(D),O=s(b).rootPropertyValueCache[S];O&&(P.rootPropertyValue=O)}var F=w.setPropertyValue(b,D,P.currentValue+(0===parseFloat(M)?"":P.unitType),P.rootPropertyValue,P.scrollData);w.Hooks.registered[D]&&(w.Normalizations.registered[S]?s(b).rootPropertyValueCache[S]=w.Normalizations.registered[S]("extract",null,F[1]):s(b).rootPropertyValueCache[S]=F[1]),"transform"===F[0]&&(B=!0)}}l.mobileHA&&s(b).transformCache.translate3d===n&&(s(b).transformCache.translate3d="(0px, 0px, 0px)",B=!0),B&&w.flushTransformCache(b)}}l.display!==n&&"none"!==l.display&&(y.State.calls[o][2].display=!1),l.visibility!==n&&"hidden"!==l.visibility&&(y.State.calls[o][2].visibility=!1),l.progress&&l.progress.call(a[1],a[1],v,Math.max(0,d+l.duration-e),d,A),1===v&&c(o)}}y.State.isTicking&&C(u)}function c(t,e){if(!y.State.calls[t])return!1;for(var r=y.State.calls[t][0],i=y.State.calls[t][1],o=y.State.calls[t][2],a=y.State.calls[t][4],h=!1,l=0,u=r.length;u>l;l++){var c=r[l].element;if(e||o.loop||("none"===o.display&&w.setPropertyValue(c,"display",o.display),"hidden"===o.visibility&&w.setPropertyValue(c,"visibility",o.visibility)),o.loop!==!0&&(f.queue(c)[1]===n||!/\.velocityQueueEntryFlag/i.test(f.queue(c)[1]))&&s(c)){s(c).isAnimating=!1,s(c).rootPropertyValueCache={};var d=!1;f.each(w.Lists.transforms3D,function(t,e){var r=/^scale/.test(e)?1:0,i=s(c).transformCache[e];s(c).transformCache[e]!==n&&new RegExp("^\\("+r+"[^.]").test(i)&&(d=!0,delete s(c).transformCache[e])}),o.mobileHA&&(d=!0,delete s(c).transformCache.translate3d),d&&w.flushTransformCache(c),w.Values.removeClass(c,"velocity-animating")}if(!e&&o.complete&&!o.loop&&l===u-1)try{o.complete.call(i,i)}catch(p){setTimeout(function(){throw p},1)}a&&o.loop!==!0&&a(i),s(c)&&o.loop===!0&&!e&&(f.each(s(c).tweensContainer,function(t,e){/^rotate/.test(t)&&360===parseFloat(e.endValue)&&(e.endValue=0,e.startValue=360),/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),y(c,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&f.dequeue(c,o.queue)}y.State.calls[t]=!1;for(var g=0,A=y.State.calls.length;A>g;g++)if(y.State.calls[g]!==!1){h=!0;break}h===!1&&(y.State.isTicking=!1,delete y.State.calls,y.State.calls=[])}var f,d=function(){if(r.documentMode)return r.documentMode;for(var t=7;t>4;t--){var e=r.createElement("div");if(e.innerHTML="",e.getElementsByTagName("span").length)return e=null,t}return n}(),p=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var r,n=(new Date).getTime();return r=Math.max(0,16-(n-t)),t=n+r,setTimeout(function(){e(n+r)},r)}}(),g={isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isNodeList:function(t){return"object"==typeof t&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&t.length!==n&&(0===t.length||"object"==typeof t[0]&&t[0].nodeType>0)},isWrapped:function(t){return t&&(t.jquery||e.Zepto&&e.Zepto.zepto.isZ(t))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)return!1;return!0}},A=!1;if(t.fn&&t.fn.jquery?(f=t,A=!0):f=e.Velocity.Utilities,8>=d&&!A)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=d)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,m="swing",y={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:r.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:f,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:v,easing:m,begin:n,complete:n,progress:n,display:n,visibility:n,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(t){f.data(t,"velocity",{isSVG:g.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};e.pageYOffset!==n?(y.State.scrollAnchor=e,y.State.scrollPropertyLeft="pageXOffset",y.State.scrollPropertyTop="pageYOffset"):(y.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body,y.State.scrollPropertyLeft="scrollLeft",y.State.scrollPropertyTop="scrollTop");var x=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},o=e(r,.5*n,i),s=e(r,.5*n,o),a=e(r,n,s),h=1/6*(i.dx+2*(o.dx+s.dx)+a.dx),l=1/6*(i.dv+2*(o.dv+s.dv)+a.dv);return r.x=r.x+h*n,r.v=r.v+l*n,r}return function n(t,e,i){var o,s,a,h={x:-1,v:0,tension:null,friction:null},l=[0],u=0,c=1e-4,f=.016;for(t=parseFloat(t)||500,e=parseFloat(e)||20,i=i||null,h.tension=t,h.friction=e,o=null!==i,o?(u=n(t,e),s=u/i*f):s=f;;)if(a=r(a||h,s),l.push(1+a.x),u+=16,!(Math.abs(a.x)>c&&Math.abs(a.v)>c))break;return o?function(t){return l[t*(l.length-1)|0]}:u}}();y.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},f.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){y.Easings[e[0]]=h.apply(null,e[1])});var w=y.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t=d)switch(t){case"name":return"filter";case"extract":var n=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=n?n[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(t){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=d||y.State.isGingerbread||(w.Lists.transformsBase=w.Lists.transformsBase.concat(w.Lists.transforms3D));for(var t=0;ti&&(i=1),o=!/(\d)$/i.test(i);break;case"skew":o=!/(deg|\d)$/i.test(i);break;case"rotate":o=!/(deg|\d)$/i.test(i)}return o||(s(r).transformCache[e]="("+i+")"),s(r).transformCache[e]}}}();for(var t=0;t=d||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return 8>=d?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1"),(8>=d?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(d||y.State.isAndroid&&!y.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(y.State.prefixMatches[t])return[y.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],r=0,n=e.length;n>r;r++){var i;if(i=0===r?t:e[r]+t.replace(/^\w/,function(t){return t.toUpperCase()}),g.isString(y.State.prefixElement.style[i]))return y.State.prefixMatches[t]=i,[i,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e,r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return t=t.replace(r,function(t,e,r,n){return e+e+r+r+n+n}),e=n.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[0,0,0]},isCSSNullValue:function(t){return 0==t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){t.classList?t.classList.add(e):t.className+=(t.className.length?" ":"")+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(t,r,i,o){function a(t,r){function i(){l&&w.setPropertyValue(t,"display","none")}var h=0;if(8>=d)h=f.css(t,r);else{var l=!1;if(/^(width|height)$/.test(r)&&0===w.getPropertyValue(t,"display")&&(l=!0, +w.setPropertyValue(t,"display",w.Values.getDisplayType(t))),!o){if("height"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var u=t.offsetHeight-(parseFloat(w.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(w.getPropertyValue(t,"paddingBottom"))||0);return i(),u}if("width"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var c=t.offsetWidth-(parseFloat(w.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(w.getPropertyValue(t,"paddingRight"))||0);return i(),c}}var p;p=s(t)===n?e.getComputedStyle(t,null):s(t).computedStyle?s(t).computedStyle:s(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===r&&(r="borderTopColor"),h=9===d&&"filter"===r?p.getPropertyValue(r):p[r],(""===h||null===h)&&(h=t.style[r]),i()}if("auto"===h&&/^(top|right|bottom|left)$/i.test(r)){var g=a(t,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(r))&&(h=f(t).position()[r]+"px")}return h}var h;if(w.Hooks.registered[r]){var l=r,u=w.Hooks.getRoot(l);i===n&&(i=w.getPropertyValue(t,w.Names.prefixCheck(u)[0])),w.Normalizations.registered[u]&&(i=w.Normalizations.registered[u]("extract",t,i)),h=w.Hooks.extractValue(l,i)}else if(w.Normalizations.registered[r]){var c,p;c=w.Normalizations.registered[r]("name",t),"transform"!==c&&(p=a(t,w.Names.prefixCheck(c)[0]),w.Values.isCSSNullValue(p)&&w.Hooks.templates[r]&&(p=w.Hooks.templates[r][1])),h=w.Normalizations.registered[r]("extract",t,p)}if(!/^[\d-]/.test(h))if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{h=t.getBBox()[r]}catch(g){h=0}else h=t.getAttribute(r);else h=a(t,w.Names.prefixCheck(r)[0]);return w.Values.isCSSNullValue(h)&&(h=0),y.debug>=2&&console.log("Get "+r+": "+h),h},setPropertyValue:function(t,r,n,i,o){var a=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=n:"Left"===o.direction?e.scrollTo(n,o.alternateValue):e.scrollTo(o.alternateValue,n);else if(w.Normalizations.registered[r]&&"transform"===w.Normalizations.registered[r]("name",t))w.Normalizations.registered[r]("inject",t,n),a="transform",n=s(t).transformCache[r];else{if(w.Hooks.registered[r]){var h=r,l=w.Hooks.getRoot(r);i=i||w.getPropertyValue(t,l),n=w.Hooks.injectValue(h,n,i),r=l}if(w.Normalizations.registered[r]&&(n=w.Normalizations.registered[r]("inject",t,n),r=w.Normalizations.registered[r]("name",t)),a=w.Names.prefixCheck(r)[0],8>=d)try{t.style[a]=n}catch(u){y.debug&&console.log("Browser does not support ["+n+"] for ["+a+"]")}else if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))t.setAttribute(r,n);else{var c="webgl"===t.renderer?t.styleGL:t.style;c[a]=n}y.debug>=2&&console.log("Set "+r+" ("+a+"): "+n)}return[a,n]},flushTransformCache:function(t){function e(e){return parseFloat(w.getPropertyValue(t,e))}var r="";if((d||y.State.isAndroid&&!y.State.isChrome)&&s(t).isSVG){var n={translate:[e("translateX"),e("translateY")],skewX:[e("skewX")],skewY:[e("skewY")],scale:1!==e("scale")?[e("scale"),e("scale")]:[e("scaleX"),e("scaleY")],rotate:[e("rotateZ"),0,0]};f.each(s(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),n[t]&&(r+=t+"("+n[t].join(" ")+") ",delete n[t])})}else{var i,o;f.each(s(t).transformCache,function(e){return i=s(t).transformCache[e],"transformPerspective"===e?(o=i,!0):(9===d&&"rotateZ"===e&&(e="rotate"),void(r+=e+i+" "))}),o&&(r="perspective"+o+" "+r)}w.setPropertyValue(t,"transform",r)}};w.Hooks.register(),w.Normalizations.register(),y.hook=function(t,e,r){var i=n;return t=o(t),f.each(t,function(t,o){if(s(o)===n&&y.init(o),r===n)i===n&&(i=y.CSS.getPropertyValue(o,e));else{var a=y.CSS.setPropertyValue(o,e,r);"transform"===a[0]&&y.CSS.flushTransformCache(o),i=a}}),i};var E=function(){function t(){return a?D.promise||null:h}function i(){function t(t){function c(t,e){var r=n,i=n,s=n;return g.isArray(t)?(r=t[0],!g.isArray(t[1])&&/^[\d-]/.test(t[1])||g.isFunction(t[1])||w.RegEx.isHex.test(t[1])?s=t[1]:(g.isString(t[1])&&!w.RegEx.isHex.test(t[1])||g.isArray(t[1]))&&(i=e?t[1]:l(t[1],a.duration),t[2]!==n&&(s=t[2]))):r=t,e||(i=i||a.easing),g.isFunction(r)&&(r=r.call(o,b,C)),g.isFunction(s)&&(s=s.call(o,b,C)),[r||0,i,s]}function d(t,e){var r,n;return n=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return r=t,""}),r||(r=w.Values.getUnitType(t)),[n,r]}function v(){var t={myParent:o.parentNode||r.body,position:w.getPropertyValue(o,"position"),fontSize:w.getPropertyValue(o,"fontSize")},n=t.position===F.lastPosition&&t.myParent===F.lastParent,i=t.fontSize===F.lastFontSize;F.lastParent=t.myParent,F.lastPosition=t.position,F.lastFontSize=t.fontSize;var a=100,h={};if(i&&n)h.emToPx=F.lastEmToPx,h.percentToPxWidth=F.lastPercentToPxWidth,h.percentToPxHeight=F.lastPercentToPxHeight;else{var l=s(o).isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");y.init(l),t.myParent.appendChild(l),f.each(["overflow","overflowX","overflowY"],function(t,e){y.CSS.setPropertyValue(l,e,"hidden")}),y.CSS.setPropertyValue(l,"position",t.position),y.CSS.setPropertyValue(l,"fontSize",t.fontSize),y.CSS.setPropertyValue(l,"boxSizing","content-box"),f.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){y.CSS.setPropertyValue(l,e,a+"%")}),y.CSS.setPropertyValue(l,"paddingLeft",a+"em"),h.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(w.getPropertyValue(l,"width",null,!0))||1)/a,h.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(w.getPropertyValue(l,"height",null,!0))||1)/a,h.emToPx=F.lastEmToPx=(parseFloat(w.getPropertyValue(l,"paddingLeft"))||1)/a,t.myParent.removeChild(l)}return null===F.remToPx&&(F.remToPx=parseFloat(w.getPropertyValue(r.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),h.remToPx=F.remToPx,h.vwToPx=F.vwToPx,h.vhToPx=F.vhToPx,y.debug>=1&&console.log("Unit ratios: "+JSON.stringify(h),o),h}if(a.begin&&0===b)try{a.begin.call(p,p)}catch(x){setTimeout(function(){throw x},1)}if("scroll"===M){var E,B,T,P=/^x$/i.test(a.axis)?"Left":"Top",R=parseFloat(a.offset)||0;a.container?g.isWrapped(a.container)||g.isNode(a.container)?(a.container=a.container[0]||a.container,E=a.container["scroll"+P],T=E+f(o).position()[P.toLowerCase()]+R):a.container=null:(E=y.State.scrollAnchor[y.State["scrollProperty"+P]],B=y.State.scrollAnchor[y.State["scrollProperty"+("Left"===P?"Top":"Left")]],T=f(o).offset()[P.toLowerCase()]+R),h={scroll:{rootPropertyValue:!1,startValue:E,currentValue:E,endValue:T,unitType:"",easing:a.easing,scrollData:{container:a.container,direction:P,alternateValue:B}},element:o},y.debug&&console.log("tweensContainer (scroll): ",h.scroll,o)}else if("reverse"===M){if(!s(o).tweensContainer)return void f.dequeue(o,a.queue);"none"===s(o).opts.display&&(s(o).opts.display="auto"),"hidden"===s(o).opts.visibility&&(s(o).opts.visibility="visible"),s(o).opts.loop=!1,s(o).opts.begin=null,s(o).opts.complete=null,m.easing||delete a.easing,m.duration||delete a.duration,a=f.extend({},s(o).opts,a);var I=f.extend(!0,{},s(o).tweensContainer);for(var S in I)if("element"!==S){var O=I[S].startValue;I[S].startValue=I[S].currentValue=I[S].endValue,I[S].endValue=O,g.isEmptyObject(m)||(I[S].easing=a.easing),y.debug&&console.log("reverse tweensContainer ("+S+"): "+JSON.stringify(I[S]),o)}h=I}else if("start"===M){var I;s(o).tweensContainer&&s(o).isAnimating===!0&&(I=s(o).tweensContainer),f.each(A,function(t,e){if(RegExp("^"+w.Lists.colors.join("$|^")+"$").test(t)){var r=c(e,!0),i=r[0],o=r[1],s=r[2];if(w.RegEx.isHex.test(i)){for(var a=["Red","Green","Blue"],h=w.Values.hexToRgb(i),l=s?w.Values.hexToRgb(s):n,u=0;uN;N++){var H={delay:R.delay,progress:R.progress};N===L-1&&(H.display=R.display,H.visibility=R.visibility,H.complete=R.complete),E(p,"reverse",H)}return t()}};y=f.extend(E,y),y.animate=E;var C=e.requestAnimationFrame||p;return y.State.isMobile||r.hidden===n||r.addEventListener("visibilitychange",function(){r.hidden?(C=function(t){return setTimeout(function(){t(!0)},16)},u()):C=e.requestAnimationFrame||p}),t.Velocity=y,t!==e&&(t.fn.velocity=E,t.fn.velocity.defaults=y.defaults),f.each(["Down","Up"],function(t,e){y.Redirects["slide"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l=h.begin,u=h.complete,c={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};h.display===n&&(h.display="Down"===e?"inline"===y.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),h.begin=function(){var r="webgl"===t.renderer?t.styleGL:t.style;l&&l.call(s,s);for(var n in c){d[n]=r[n];var i=y.CSS.getPropertyValue(t,n);c[n]="Down"===e?[i,0]:[0,i]}d.overflow=r.overflow,r.overflow="hidden"},h.complete=function(){for(var t in d)style[t]=d[t];u&&u.call(s,s),a&&a.resolver(s)},y(t,c,h)}}),f.each(["In","Out"],function(t,e){y.Redirects["fade"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l={opacity:"In"===e?1:0},u=h.complete;i!==o-1?h.complete=h.begin=null:h.complete=function(){u&&u.call(s,s),a&&a.resolver(s)},h.display===n&&(h.display="In"===e?"auto":"none"),y(this,l,h)}}),y}(window.jQuery||window.Zepto||window,window,document)}),function(t){t.HTMLGL=t.HTMLGL||{},t.HTMLGL.util={getterSetter:function(t,e,r,n){Object.defineProperty?Object.defineProperty(t,e,{get:r,set:n}):document.__defineGetter__&&(t.__defineGetter__(e,r),t.__defineSetter__(e,n)),t["get"+e]=r,t["set"+e]=n},emitEvent:function(t,e){var r=new MouseEvent(e.type,e);r.dispatcher="html-gl",e.stopPropagation(),t.dispatchEvent(r)},debounce:function(t,e,r){var n;return function(){var i=this,o=arguments,s=function(){n=null,r||t.apply(i,o)},a=r&&!n;clearTimeout(n),n=setTimeout(s,e),a&&t.apply(i,o)}}}}(window),function(t){var e=function(t){},r=e.prototype;r.getElementByCoordinates=function(e,r){var n,i,o=this;return t.HTMLGL.elements.forEach(function(t){n=document.elementFromPoint(e-parseInt(t.transformObject.translateX||0),r-parseInt(t.transformObject.translateY||0)),o.isChildOf(n,t)&&(i=n)}),i},r.isChildOf=function(t,e){for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1},t.HTMLGL.GLElementResolver=e}(window),function(t){HTMLGL=t.HTMLGL=t.HTMLGL||{},HTMLGL.JQ_PLUGIN_NAME="htmlgl",HTMLGL.CUSTOM_ELEMENT_TAG_NAME="html-gl",HTMLGL.READY_EVENT="htmlglReady",HTMLGL.context=void 0,HTMLGL.stage=void 0,HTMLGL.renderer=void 0,HTMLGL.elements=[],HTMLGL.pixelRatio=null,HTMLGL.oldPixelRatio=null,HTMLGL.enabled=!0,HTMLGL.scrollX=0,HTMLGL.scrollY=0;var e=function(){t.HTMLGL.context=this,this.createStage(),this.updateScrollPosition(),this.initListeners(),this.elementResolver=new t.HTMLGL.GLElementResolver(this),document.body?this.initViewer():document.addEventListener("DOMContentLoaded",this.initViewer.bind(this))},r=e.prototype;r.initViewer=function(){this.createViewer(),this.resizeViewer(),this.appendViewer()},r.createViewer=function(){t.HTMLGL.renderer=this.renderer=PIXI.autoDetectRenderer(0,0,{transparent:!0}),this.renderer.view.style.position="fixed",this.renderer.view.style.top="0px",this.renderer.view.style.left="0px",this.renderer.view.style["pointer-events"]="none",this.renderer.view.style.pointerEvents="none"},r.appendViewer=function(){document.body.appendChild(this.renderer.view),requestAnimationFrame(this.redrawStage.bind(this))},r.resizeViewer=function(){var e=this,r=t.innerWidth,n=t.innerHeight;HTMLGL.pixelRatio=window.devicePixelRatio||1,console.log(HTMLGL.pixelRatio),r*=HTMLGL.pixelRatio,n*=HTMLGL.pixelRatio,HTMLGL.pixelRatio!==HTMLGL.oldPixelRatio?(this.disable(),this.updateTextures().then(function(){e.updateScrollPosition(),e.updateElementsPositions();var i=1/HTMLGL.pixelRatio;e.renderer.view.style.transformOrigin="0 0",e.renderer.view.style.webkitTransformOrigin="0 0",e.renderer.view.style.transform="scaleX("+i+") scaleY("+i+")",e.renderer.view.style.webkitTransform="scaleX("+i+") scaleY("+i+")",e.renderer.resize(r,n),this.enable(),t.HTMLGL.renderer.render(t.HTMLGL.stage)})):(this.renderer.view.parentNode&&this.updateTextures(),this.updateElementsPositions(),this.markStageAsChanged()),HTMLGL.oldPixelRatio=HTMLGL.pixelRatio},r.initListeners=function(){t.addEventListener("scroll",this.updateScrollPosition.bind(this)),t.addEventListener("resize",t.HTMLGL.util.debounce(this.resizeViewer,500).bind(this)),t.addEventListener("resize",this.updateElementsPositions.bind(this)),document.addEventListener("click",this.onMouseEvent.bind(this),!0),document.addEventListener("mousemove",this.onMouseEvent.bind(this),!0),document.addEventListener("mouseup",this.onMouseEvent.bind(this),!0),document.addEventListener("mousedown",this.onMouseEvent.bind(this),!0),document.addEventListener("touchstart",this.onMouseEvent.bind(this)),document.addEventListener("touchend",this.onMouseEvent.bind(this))},r.updateScrollPosition=function(){var e={};if(void 0!=window.pageYOffset)e={left:pageXOffset,top:pageYOffset};else{var r,n,i=document,o=i.documentElement,s=i.body;r=o.scrollLeft||s.scrollLeft||0,n=o.scrollTop||s.scrollTop||0,e={left:r,top:n}}this.document.x=-e.left*HTMLGL.pixelRatio,this.document.y=-e.top*HTMLGL.pixelRatio,t.HTMLGL.scrollX=e.left,t.HTMLGL.scrollY=e.top,this.markStageAsChanged()},r.createStage=function(){t.HTMLGL.stage=this.stage=new PIXI.Stage(16777215),t.HTMLGL.document=this.document=new PIXI.DisplayObjectContainer,this.stage.addChild(t.HTMLGL.document)},r.redrawStage=function(){t.HTMLGL.stage.changed&&t.HTMLGL.renderer&&t.HTMLGL.enabled&&(t.HTMLGL.renderer.render(t.HTMLGL.stage),t.HTMLGL.stage.changed=!1)},r.updateTextures=function(){var e=[];return t.HTMLGL.elements.forEach(function(t){e.push(t.updateTexture())}),Promise.all(e)},r.initElements=function(){t.HTMLGL.elements.forEach(function(t){t.init()})},r.updateElementsPositions=function(){t.HTMLGL.elements.forEach(function(t){t.updateBoundingRect(),t.updatePivot(),t.updateSpriteTransform()})},r.onMouseEvent=function(e){var r=e.x||e.pageX,n=e.y||e.pageY,i="html-gl"!==e.dispatcher?this.elementResolver.getElementByCoordinates(r,n):null;i?t.HTMLGL.util.emitEvent(i,e):null},r.markStageAsChanged=function(){t.HTMLGL.stage&&!t.HTMLGL.stage.changed&&(requestAnimationFrame(this.redrawStage),t.HTMLGL.stage.changed=!0)},r.disable=function(){t.HTMLGL.enabled=!0},r.enable=function(){t.HTMLGL.enabled=!1},t.HTMLGL.pixelRatio=window.devicePixelRatio||1,t.HTMLGL.GLContext=e,new e}(window),function(t){var e=function(t,e){this.element=t,this.images=this.element.querySelectorAll("img"),this.callback=e,this.imagesLoaded=this.getImagesLoaded(),this.images.length===this.imagesLoaded?this.onImageLoaded():this.addListeners()},r=e.prototype;r.getImagesLoaded=function(){for(var t=0,e=0;ei;++i)s[i].updateTransform()}var a=this.renderer.filterManager;this.renderer.filterManager=this.filterManager,this.renderer.renderDisplayObject(t,this.textureBuffer,r),this.renderer.filterManager=a}},n.prototype.renderCanvas=function(t,e,r,n){if(this.valid){n=!!n;var i=t.worldTransform,o=c;o.identity(),e&&o.append(e),t.worldTransform=o,t.worldAlpha=1;var s,a,h=t.children;for(s=0,a=h.length;a>s;++s)h[s].updateTransform();r&&this.textureBuffer.clear(),t.worldTransform=i;var l=this.textureBuffer.context,u=this.renderer.resolution;this.renderer.resolution=this.resolution,this.renderer.renderDisplayObject(t,l),this.renderer.resolution=u}},n.prototype.destroy=function(){o.prototype.destroy.call(this,!0),this.textureBuffer.destroy(),this.filterManager&&this.filterManager.destroy(),this.renderer=null},n.prototype.getImage=function(){var t=new Image;return t.src=this.getBase64(),t},n.prototype.getBase64=function(){return this.getCanvas().toDataURL()},n.prototype.getCanvas=function(){if(this.renderer.type===u.RENDERER_TYPE.WEBGL){var t=this.renderer.gl,e=this.textureBuffer.size.width,r=this.textureBuffer.size.height,n=new Uint8Array(4*e*r);t.bindFramebuffer(t.FRAMEBUFFER,this.textureBuffer.frameBuffer),t.readPixels(0,0,e,r,t.RGBA,t.UNSIGNED_BYTE,n),t.bindFramebuffer(t.FRAMEBUFFER,null);var i=new h(e,r),o=i.context.getImageData(0,0,e,r);return o.data.set(n),i.context.putImageData(o,0,0),i.canvas}return this.textureBuffer.canvas},n.prototype.getPixels=function(){var t,e;if(this.renderer.type===u.RENDERER_TYPE.WEBGL){var r=this.renderer.gl;t=this.textureBuffer.size.width,e=this.textureBuffer.size.height;var n=new Uint8Array(4*t*e);return r.bindFramebuffer(r.FRAMEBUFFER,this.textureBuffer.frameBuffer),r.readPixels(0,0,t,e,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,null),n}return t=this.textureBuffer.canvas.width,e=this.textureBuffer.canvas.height,this.textureBuffer.canvas.getContext("2d").getImageData(0,0,t,e).data},n.prototype.getPixel=function(t,e){if(this.renderer.type===u.RENDERER_TYPE.WEBGL){var r=this.renderer.gl,n=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this.textureBuffer.frameBuffer),r.readPixels(t,e,1,1,r.RGBA,r.UNSIGNED_BYTE,n),r.bindFramebuffer(r.FRAMEBUFFER,null),n}return this.textureBuffer.canvas.getContext("2d").getImageData(t,e,1,1).data}},{"../const":22,"../math":32,"../renderers/canvas/utils/CanvasBuffer":44,"../renderers/webgl/managers/FilterManager":53,"../renderers/webgl/utils/RenderTarget":64,"./BaseTexture":69,"./Texture":71}],71:[function(t,e,r){function n(t,e,r,i,o){a.call(this),this.noFrame=!1,e||(this.noFrame=!0,e=new h.Rectangle(0,0,1,1)),t instanceof n&&(t=t.baseTexture),this.baseTexture=t,this._frame=e,this.trim=i,this.valid=!1,this.requiresUpdate=!1,this._uvs=null,this.width=0,this.height=0,this.crop=r||e,this.rotate=!!o,t.hasLoaded?(this.noFrame&&(e=new h.Rectangle(0,0,t.width,t.height),t.on("update",this.onBaseTextureUpdated,this)),this.frame=e):t.once("loaded",this.onBaseTextureLoaded,this)}var i=t("./BaseTexture"),o=t("./VideoBaseTexture"),s=t("./TextureUvs"),a=t("eventemitter3"),h=t("../math"),l=t("../utils");n.prototype=Object.create(a.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{frame:{get:function(){return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,this.width=t.width,this.height=t.height,!this.trim&&!this.rotate&&(t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height))throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim?(this.width=this.trim.width,this.height=this.trim.height,this._frame.width=this.trim.width,this._frame.height=this.trim.height):this.crop=t,this.valid&&this._updateUvs()}}}),n.prototype.update=function(){this.baseTexture.update()},n.prototype.onBaseTextureLoaded=function(t){this.frame=this.noFrame?new h.Rectangle(0,0,t.width,t.height):this._frame,this.emit("update",this)},n.prototype.onBaseTextureUpdated=function(t){this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},n.prototype.destroy=function(t){this.baseTexture&&(t&&this.baseTexture.destroy(),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.crop=null,this.valid=!1},n.prototype.clone=function(){return new n(this.baseTexture,this.frame,this.crop,this.trim,this.rotate)},n.prototype._updateUvs=function(){this._uvs||(this._uvs=new s),this._uvs.set(this.crop,this.baseTexture,this.rotate)},n.fromImage=function(t,e,r){var o=l.TextureCache[t];return o||(o=new n(i.fromImage(t,e,r)),l.TextureCache[t]=o),o},n.fromFrame=function(t){var e=l.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},n.fromCanvas=function(t,e){return new n(i.fromCanvas(t,e))},n.fromVideo=function(t,e){return"string"==typeof t?n.fromVideoUrl(t,e):new n(o.fromVideo(t,e))},n.fromVideoUrl=function(t,e){return new n(o.fromUrl(t,e))},n.addTextureToCache=function(t,e){l.TextureCache[e]=t},n.removeTextureFromCache=function(t){var e=l.TextureCache[t];return delete l.TextureCache[t],delete l.BaseTextureCache[t],e},n.EMPTY=new n(new i)},{"../math":32,"../utils":76,"./BaseTexture":69,"./TextureUvs":72,"./VideoBaseTexture":73,eventemitter3:11}],72:[function(t,e,r){function n(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1}e.exports=n,n.prototype.set=function(t,e,r){var n=e.width,i=e.height;r?(this.x0=(t.x+t.height)/n,this.y0=t.y/i,this.x1=(t.x+t.height)/n,this.y1=(t.y+t.width)/i,this.x2=t.x/n,this.y2=(t.y+t.width)/i,this.x3=t.x/n,this.y3=t.y/i):(this.x0=t.x/n,this.y0=t.y/i,this.x1=(t.x+t.width)/n,this.y1=t.y/i,this.x2=(t.x+t.width)/n,this.y2=(t.y+t.height)/i,this.x3=t.x/n,this.y3=(t.y+t.height)/i)}},{}],73:[function(t,e,r){function n(t,e){if(!t)throw new Error("No video source element specified.");(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),o.call(this,t,e),this.autoUpdate=!1,this._onUpdate=this._onUpdate.bind(this),this._onCanPlay=this._onCanPlay.bind(this),t.complete||(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this))),this.__loaded=!1}function i(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=t,r.type=e,r}var o=t("./BaseTexture"),s=t("../utils");n.prototype=Object.create(o.prototype),n.prototype.constructor=n,e.exports=n,n.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this._onUpdate),this.update())},n.prototype._onPlayStart=function(){this.autoUpdate||(window.requestAnimationFrame(this._onUpdate),this.autoUpdate=!0)},n.prototype._onPlayStop=function(){this.autoUpdate=!1},n.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.source.play(),this.__loaded||(this.__loaded=!0,this.emit("loaded",this)))},n.prototype.destroy=function(){this.source&&this.source._pixiId&&(delete s.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),o.prototype.destroy.call(this)},n.fromVideo=function(t,e){t._pixiId||(t._pixiId="video_"+s.uid());var r=s.BaseTextureCache[t._pixiId];return r||(r=new n(t,e),s.BaseTextureCache[t._pixiId]=r),r},n.fromUrl=function(t,e){var r=document.createElement("video");if(Array.isArray(t))for(var o=0;othis._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*i.TARGET_FPMS*this.speed,this._emitter.emit(s,this.deltaTime),this.lastTime=t},e.exports=n},{"../const":22,eventemitter3:11}],75:[function(t,e,r){var n=t("./Ticker"),i=new n;i.autoStart=!0,e.exports={shared:i,Ticker:n}},{"./Ticker":74}],76:[function(t,e,r){var n=t("../const"),i=e.exports={_uid:0,_saidHello:!1,pluginTarget:t("./pluginTarget"),async:t("async"),uid:function(){return++i._uid},hex2rgb:function(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},hex2string:function(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t},rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},canUseNewCanvasBlendModes:function(){if("undefined"==typeof document)return!1;var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",e="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",r=new Image;r.src=t+"AP804Oa6"+e;var n=new Image;n.src=t+"/wCKxvRF"+e;var i=document.createElement("canvas");i.width=6,i.height=1;var o=i.getContext("2d");o.globalCompositeOperation="multiply",o.drawImage(r,0,0),o.drawImage(n,2,0);var s=o.getImageData(2,0,1,1).data;return 255===s[0]&&0===s[1]&&0===s[2]},getNextPowerOfTwo:function(t){if(t>0&&0===(t&t-1))return t;for(var e=1;t>e;)e<<=1;return e},isPowerOfTwo:function(t,e){return t>0&&0===(t&t-1)&&e>0&&0===(e&e-1)},getResolutionOfUrl:function(t){var e=n.RETINA_PREFIX.exec(t);return e?parseFloat(e[1]):1},sayHello:function(t){if(!i._saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+n.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+n.VERSION+" - "+t+" - http://www.pixijs.com/");i._saidHello=!0}},isWebGLSupported:function(){var t={stencil:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t);return!(!r||!r.getContextAttributes().stencil)}catch(n){return!1}},TextureCache:{},BaseTextureCache:{}}},{"../const":22,"./pluginTarget":77,async:2}],77:[function(t,e,r){function n(t){t.__plugins={},t.registerPlugin=function(e,r){t.__plugins[e]=r},t.prototype.initPlugins=function(){this.plugins=this.plugins||{};for(var e in t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}e.exports={mixin:function(t){n(t)}}},{}],78:[function(t,e,r){var n=t("./core"),i=t("./mesh"),o=t("./extras"),s=t("./filters");n.SpriteBatch=function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")},n.AssetLoader=function(){throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")},Object.defineProperties(n,{Stage:{get:function(){return console.warn("You do not need to use a PIXI Stage any more, you can simply render any container."),n.Container}},DisplayObjectContainer:{get:function(){return console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on."),n.Container}},Strip:{get:function(){return console.warn("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),i.Mesh}},Rope:{get:function(){return console.warn("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),i.Rope}},MovieClip:{get:function(){return console.warn("The MovieClip class has been moved to extras.MovieClip, please use extras.MovieClip from now on."),o.MovieClip}},TilingSprite:{get:function(){return console.warn("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),o.TilingSprite}},BitmapText:{get:function(){return console.warn("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),o.BitmapText}},blendModes:{get:function(){return console.warn("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),n.BLEND_MODES}},scaleModes:{get:function(){return console.warn("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),n.SCALE_MODES}},BaseTextureCache:{get:function(){return console.warn("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),n.utils.BaseTextureCache}},TextureCache:{get:function(){return console.warn("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),n.utils.TextureCache}},math:{get:function(){return console.warn("The math namespace is deprecated, please access members already accessible on PIXI."),n}}}),n.Sprite.prototype.setTexture=function(t){this.texture=t,console.warn("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},o.BitmapText.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")},n.Text.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},n.Text.prototype.setStyle=function(t){this.style=t,console.warn("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},n.Texture.prototype.setFrame=function(t){this.frame=t,console.warn("setFrame is now deprecated, please use the frame property, e.g : myTexture.frame = frame;")},Object.defineProperties(s,{AbstractFilter:{get:function(){return console.warn("filters.AbstractFilter is an undocumented alias, please use AbstractFilter from now on."),n.AbstractFilter}},FXAAFilter:{get:function(){return console.warn("filters.FXAAFilter is an undocumented alias, please use FXAAFilter from now on."),n.FXAAFilter}},SpriteMaskFilter:{get:function(){return console.warn("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),n.SpriteMaskFilter}}}),n.utils.uuid=function(){return console.warn("utils.uuid() is deprecated, please use utils.uid() from now on."),n.utils.uid()}},{"./core":29,"./extras":85,"./filters":102,"./mesh":126}],79:[function(t,e,r){function n(t,e){i.Container.call(this),e=e||{},this.textWidth=0,this.textHeight=0,this._glyphs=[],this._font={tint:void 0!==e.tint?e.tint:16777215,align:e.align||"left",name:null,size:0},this.font=e.font,this._text=t,this.maxWidth=0,this.dirty=!1,this.updateText()}var i=t("../core");n.prototype=Object.create(i.Container.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{tint:{get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},align:{get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},font:{get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):n.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),n.prototype.updateText=function(){for(var t=n.fonts[this._font.name],e=new i.Point,r=null,o=[],s=0,a=0,h=[],l=0,u=this._font.size/t.size,c=-1,f=0;f0&&e.x*u>this.maxWidth)o.splice(c,f-c),f=c,c=-1,h.push(s),a=Math.max(a,s),l++,e.x=0,e.y+=t.lineHeight,r=null;else{var p=t.chars[d];p&&(r&&p.kerning[r]&&(e.x+=p.kerning[r]),o.push({texture:p.texture,line:l,charCode:d,position:new i.Point(e.x+p.xOffset,e.y+p.yOffset)}),s=e.x+(p.texture.width+p.xOffset),e.x+=p.xAdvance,r=d)}}h.push(s),a=Math.max(a,s);var g=[];for(f=0;l>=f;f++){var A=0;"right"===this._font.align?A=a-h[f]:"center"===this._font.align&&(A=(a-h[f])/2),g.push(A)}var v=o.length,m=this.tint;for(f=0;v>f;f++){var y=this._glyphs[f];y?y.texture=o[f].texture:(y=new i.Sprite(o[f].texture),this._glyphs.push(y)),y.position.x=(o[f].position.x+g[o[f].line])*u,y.position.y=o[f].position.y*u,y.scale.x=y.scale.y=u,y.tint=m,y.parent||this.addChild(y)}for(f=v;fe?this.loop?this._texture=this._textures[this._textures.length-1+e%this._textures.length]:(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this.loop||e=this._textures.length&&(this.gotoAndStop(this.textures.length-1),this.onComplete&&this.onComplete())},n.prototype.destroy=function(){this.stop(),i.Sprite.prototype.destroy.call(this)},n.fromFrames=function(t){for(var e=[],r=0;ry?y:t,t=t>w?w:t,t=t>C?C:t,r=m,r=r>x?x:r,r=r>E?E:r,r=r>b?b:r,e=v,e=y>e?y:e,e=w>e?w:e,e=C>e?C:e,n=m,n=x>n?x:n,n=E>n?E:n,n=b>n?b:n;var B=this._bounds;return B.x=t,B.width=e-t,B.y=r,B.height=n-r,this._currentBounds=B,B},n.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,o);var e,r=this._width,n=this._height,i=-r*this.anchor.x;return o.x>i&&o.xe&&o.y 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n vec2 p = mod( uv / ( pixelSize * 0.5 ), 2.0) - vec2(1.0);\n col = col * character(n, p);\n\n gl_FragColor = vec4(col, 1.0);\n}\n",{dimensions:{type:"4fv",value:new Float32Array([0,0,0,0])},pixelSize:{type:"1f",value:8}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{size:{get:function(){return this.uniforms.pixelSize.value},set:function(t){this.uniforms.pixelSize.value=t}}})},{"../../core":29}],87:[function(t,e,r){function n(){i.AbstractFilter.call(this),this.blurXFilter=new o,this.blurYFilter=new s,this.defaultFilter=new i.AbstractFilter}var i=t("../../core"),o=t("../blur/BlurXFilter"),s=t("../blur/BlurYFilter");n.prototype=Object.create(i.AbstractFilter.prototype), n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r){var n=t.filterManager.getRenderTarget(!0);this.defaultFilter.applyFilter(t,e,r),this.blurXFilter.applyFilter(t,e,n),t.blendModeManager.setBlendMode(i.BLEND_MODES.SCREEN),this.blurYFilter.applyFilter(t,n,r),t.blendModeManager.setBlendMode(i.BLEND_MODES.NORMAL),t.filterManager.returnRenderTarget(n)},Object.defineProperties(n.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t}}})},{"../../core":29,"../blur/BlurXFilter":90,"../blur/BlurYFilter":91}],88:[function(t,e,r){function n(t,e){i.AbstractFilter.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform float strength;\nuniform float dirX;\nuniform float dirY;\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying vec2 vBlurTexCoords[3];\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n\n vBlurTexCoords[0] = aTextureCoord + vec2( (0.004 * strength) * dirX, (0.004 * strength) * dirY );\n vBlurTexCoords[1] = aTextureCoord + vec2( (0.008 * strength) * dirX, (0.008 * strength) * dirY );\n vBlurTexCoords[2] = aTextureCoord + vec2( (0.012 * strength) * dirX, (0.012 * strength) * dirY );\n\n vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n","precision lowp float;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vBlurTexCoords[3];\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = vec4(0.0);\n\n gl_FragColor += texture2D(uSampler, vTextureCoord ) * 0.3989422804014327;\n gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 0]) * 0.2419707245191454;\n gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 1]) * 0.05399096651318985;\n gl_FragColor += texture2D(uSampler, vBlurTexCoords[ 2]) * 0.004431848411938341;\n}\n",{strength:{type:"1f",value:1},dirX:{type:"1f",value:t||0},dirY:{type:"1f",value:e||0}}),this.defaultFilter=new i.AbstractFilter,this.passes=1,this.dirX=t||0,this.dirY=e||0,this.strength=4}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r,n){var i=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.width/e.size.width),1===this.passes)t.filterManager.applyFilter(i,e,r,n);else{var o=t.filterManager.getRenderTarget(!0);t.filterManager.applyFilter(i,e,o,n);for(var s=0;s>16&255)/255,s=(r>>8&255)/255,a=(255&r)/255,h=(n>>16&255)/255,l=(n>>8&255)/255,u=(255&n)/255,c=[.3,.59,.11,0,0,o,s,a,t,0,h,l,u,e,0,o-h,s-l,a-u,0,0];this._loadMatrix(c,i)},n.prototype.night=function(t,e){t=t||.1;var r=[-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(r,e)},n.prototype.predator=function(t,e){var r=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(r,e)},n.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},n.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},Object.defineProperties(n.prototype,{matrix:{get:function(){return this.uniforms.m.value},set:function(t){this.uniforms.m.value=t}}})},{"../../core":29}],94:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float step;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n color = floor(color * step) / step;\n\n gl_FragColor = color;\n}\n",{step:{type:"1f",value:5}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{step:{get:function(){return this.uniforms.step.value},set:function(t){this.uniforms.step.value=t}}})},{"../../core":29}],95:[function(t,e,r){function n(t,e,r){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n",{matrix:{type:"1fv",value:new Float32Array(t)},texelSize:{type:"v2",value:{x:1/e,y:1/r}}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{matrix:{get:function(){return this.uniforms.matrix.value},set:function(t){this.uniforms.matrix.value=new Float32Array(t)}},width:{get:function(){return 1/this.uniforms.texelSize.value.x},set:function(t){this.uniforms.texelSize.value.x=1/t}},height:{get:function(){return 1/this.uniforms.texelSize.value.y},set:function(t){this.uniforms.texelSize.value.y=1/t}}})},{"../../core":29}],96:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n")}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n},{"../../core":29}],97:[function(t,e,r){function n(t){var e=new i.Matrix;t.renderable=!1,i.AbstractFilter.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMapCoord;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n vMapCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n","precision lowp float;\n\nvarying vec2 vMapCoord;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec2 scale;\n\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nvoid main(void)\n{\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 map = texture2D(mapSampler, vMapCoord);\n\n map -= 0.5;\n map.xy *= scale;\n\n gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y));\n}\n",{mapSampler:{type:"sampler2D",value:t.texture},otherMatrix:{type:"mat3",value:e.toArray(!0)},scale:{type:"v2",value:{x:1,y:1}}}),this.maskSprite=t,this.maskMatrix=e,this.scale=new i.Point(20,20)}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r){var n=t.filterManager;n.calculateMappedMatrix(e.frame,this.maskSprite,this.maskMatrix),this.uniforms.otherMatrix.value=this.maskMatrix.toArray(!0),this.uniforms.scale.value.x=this.scale.x*(1/e.frame.width),this.uniforms.scale.value.y=this.scale.y*(1/e.frame.height);var i=this.getShader(t);n.applyFilter(i,e,r)},Object.defineProperties(n.prototype,{map:{get:function(){return this.uniforms.mapSampler.value},set:function(t){this.uniforms.mapSampler.value=t}}})},{"../../core":29}],98:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 dimensions;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * dimensions.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n",{scale:{type:"1f",value:1},angle:{type:"1f",value:5},dimensions:{type:"4fv",value:[0,0,0,0]}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{scale:{get:function(){return this.uniforms.scale.value},set:function(t){this.uniforms.scale.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},{"../../core":29}],99:[function(t,e,r){function n(){i.AbstractFilter.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform float strength;\nuniform vec2 offset;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying vec2 vBlurTexCoords[6];\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3((aVertexPosition+offset), 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n\n vBlurTexCoords[ 0] = aTextureCoord + vec2(0.0, -0.012 * strength);\n vBlurTexCoords[ 1] = aTextureCoord + vec2(0.0, -0.008 * strength);\n vBlurTexCoords[ 2] = aTextureCoord + vec2(0.0, -0.004 * strength);\n vBlurTexCoords[ 3] = aTextureCoord + vec2(0.0, 0.004 * strength);\n vBlurTexCoords[ 4] = aTextureCoord + vec2(0.0, 0.008 * strength);\n vBlurTexCoords[ 5] = aTextureCoord + vec2(0.0, 0.012 * strength);\n\n vColor = vec4(aColor.rgb * aColor.a, aColor.a);\n}\n","precision lowp float;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vBlurTexCoords[6];\nvarying vec4 vColor;\n\nuniform vec3 color;\nuniform float alpha;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n vec4 sum = vec4(0.0);\n\n sum += texture2D(uSampler, vBlurTexCoords[ 0])*0.004431848411938341;\n sum += texture2D(uSampler, vBlurTexCoords[ 1])*0.05399096651318985;\n sum += texture2D(uSampler, vBlurTexCoords[ 2])*0.2419707245191454;\n sum += texture2D(uSampler, vTextureCoord )*0.3989422804014327;\n sum += texture2D(uSampler, vBlurTexCoords[ 3])*0.2419707245191454;\n sum += texture2D(uSampler, vBlurTexCoords[ 4])*0.05399096651318985;\n sum += texture2D(uSampler, vBlurTexCoords[ 5])*0.004431848411938341;\n\n gl_FragColor = vec4( color.rgb * sum.a * alpha, sum.a * alpha );\n}\n",{blur:{type:"1f",value:1/512},color:{type:"c",value:[0,0,0]},alpha:{type:"1f",value:.7},offset:{type:"2f",value:[5,5]},strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r,n){var i=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.height/e.size.height),1===this.passes)t.filterManager.applyFilter(i,e,r,n);else{for(var o=t.filterManager.getRenderTarget(!0),s=e,a=o,h=0;h= (time - params.z)) )\n {\n float diff = (dist - time);\n float powDiff = 1.0 - pow(abs(diff*params.x), params.y);\n\n float diffTime = diff * powDiff;\n vec2 diffUV = normalize(uv - center);\n texCoord = uv + (diffUV * diffTime);\n }\n\n gl_FragColor = texture2D(uSampler, texCoord);\n}\n",{center:{type:"v2",value:{x:.5,y:.5}},params:{type:"v3",value:{x:10,y:.8,z:.1}},time:{type:"1f",value:0}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{center:{get:function(){return this.uniforms.center.value},set:function(t){this.uniforms.center.value=t}},params:{get:function(){return this.uniforms.params.value},set:function(t){this.uniforms.params.value=t}},time:{get:function(){return this.uniforms.time.value},set:function(t){this.uniforms.time.value=t}}})},{"../../core":29}],110:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n gl_FragColor = color / total;\n gl_FragColor.rgb /= gl_FragColor.a + 0.00001;\n}\n",{blur:{type:"1f",value:100},gradientBlur:{type:"1f",value:600},start:{type:"v2",value:{x:0,y:window.innerHeight/2}},end:{type:"v2",value:{x:600,y:window.innerHeight/2}},delta:{type:"v2",value:{x:30,y:30}},texSize:{type:"v2",value:{x:window.innerWidth,y:window.innerHeight}}}),this.updateDelta()}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.updateDelta=function(){this.uniforms.delta.value.x=0,this.uniforms.delta.value.y=0},Object.defineProperties(n.prototype,{blur:{get:function(){return this.uniforms.blur.value},set:function(t){this.uniforms.blur.value=t}},gradientBlur:{get:function(){return this.uniforms.gradientBlur.value},set:function(t){this.uniforms.gradientBlur.value=t}},start:{get:function(){return this.uniforms.start.value},set:function(t){this.uniforms.start.value=t,this.updateDelta()}},end:{get:function(){return this.uniforms.end.value},set:function(t){this.uniforms.end.value=t,this.updateDelta()}}})},{"../../core":29}],111:[function(t,e,r){function n(){i.AbstractFilter.call(this),this.tiltShiftXFilter=new o,this.tiltShiftYFilter=new s}var i=t("../../core"),o=t("./TiltShiftXFilter"),s=t("./TiltShiftYFilter");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.applyFilter=function(t,e,r){var n=t.filterManager.getRenderTarget(!0);this.tiltShiftXFilter.applyFilter(t,e,n),this.tiltShiftYFilter.applyFilter(t,n,r),t.filterManager.returnRenderTarget(n)},Object.defineProperties(n.prototype,{blur:{get:function(){return this.tiltShiftXFilter.blur},set:function(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}},gradientBlur:{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}},start:{get:function(){return this.tiltShiftXFilter.start},set:function(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}},end:{get:function(){return this.tiltShiftXFilter.end},set:function(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}}})},{"../../core":29,"./TiltShiftXFilter":112,"./TiltShiftYFilter":113}],112:[function(t,e,r){function n(){i.call(this)}var i=t("./TiltShiftAxisFilter");n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=t/r,this.uniforms.delta.value.y=e/r}},{"./TiltShiftAxisFilter":110}],113:[function(t,e,r){function n(){i.call(this)}var i=t("./TiltShiftAxisFilter");n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,r=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=-e/r,this.uniforms.delta.value.y=t/r}},{"./TiltShiftAxisFilter":110}],114:[function(t,e,r){function n(){i.AbstractFilter.call(this,null,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord - offset;\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratio = (radius - dist) / radius;\n float angleMod = ratio * ratio * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n gl_FragColor = texture2D(uSampler, coord+offset);\n}\n",{radius:{type:"1f",value:.5},angle:{type:"1f",value:5},offset:{type:"v2",value:{x:.5,y:.5}}})}var i=t("../../core");n.prototype=Object.create(i.AbstractFilter.prototype),n.prototype.constructor=n,e.exports=n,Object.defineProperties(n.prototype,{offset:{get:function(){return this.uniforms.offset.value},set:function(t){this.uniforms.offset.value=t}},radius:{get:function(){return this.uniforms.radius.value},set:function(t){this.uniforms.radius.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},{"../../core":29}],115:[function(t,e,r){function n(){this.global=new i.Point,this.target=null,this.originalEvent=null}var i=t("../core");n.prototype.constructor=n,e.exports=n,n.prototype.getLocalPosition=function(t,e,r){var n=t.worldTransform,o=r?r:this.global,s=n.a,a=n.c,h=n.tx,l=n.b,u=n.d,c=n.ty,f=1/(s*u+a*-l);return e=e||new i.Point,e.x=u*f*o.x+-a*f*o.x+(c*a-h*u)*f,e.y=s*f*o.y+-l*f*o.y+(-c*s+h*l)*f,e}},{"../core":29}],116:[function(t,e,r){function n(t,e){e=e||{},this.renderer=t,this.autoPreventDefault=void 0!==e.autoPreventDefault?e.autoPreventDefault:!0,this.interactionFrequency=e.interactionFrequency||10,this.mouse=new o,this.eventData={stopped:!1,target:null,type:null,data:this.mouse,stopPropagation:function(){this.stopped=!0}},this.interactiveDataPool=[],this.interactionDOMElement=null,this.eventsAdded=!1,this.onMouseUp=this.onMouseUp.bind(this),this.processMouseUp=this.processMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.processMouseDown=this.processMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.processMouseMove=this.processMouseMove.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.processMouseOverOut=this.processMouseOverOut.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.processTouchStart=this.processTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.processTouchEnd=this.processTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.processTouchMove=this.processTouchMove.bind(this),this.last=0,this.currentCursorStyle="inherit",this._tempPoint=new i.Point,this.resolution=1,this.setTargetElement(this.renderer.view,this.renderer.resolution)}var i=t("../core"),o=t("./InteractionData");Object.assign(i.DisplayObject.prototype,t("./interactiveTarget")),n.prototype.constructor=n,e.exports=n,n.prototype.setTargetElement=function(t,e){this.removeEvents(),this.interactionDOMElement=t,this.resolution=e||1,this.addEvents()},n.prototype.addEvents=function(){this.interactionDOMElement&&(i.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"),window.document.addEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!0)},n.prototype.removeEvents=function(){this.interactionDOMElement&&(i.ticker.shared.remove(this.update),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""),window.document.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!1)},n.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime=0;a--)!s&&n?s=this.processInteractive(t,o[a],r,!0,i):this.processInteractive(t,o[a],r,!1,!1);return i&&(n&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),s=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(s=e.containsPoint(t))),e.interactive&&r(e,s)),s},n.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0)},n.prototype.processMouseDown=function(t,e){var r=this.mouse.originalEvent,n=2===r.button||3===r.which;e&&(t[n?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,n?"rightdown":"mousedown",this.eventData))},n.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0)},n.prototype.processMouseUp=function(t,e){var r=this.mouse.originalEvent,n=2===r.button||3===r.which,i=n?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,n?"rightup":"mouseup",this.eventData),t[i]&&(t[i]=!1,this.dispatchEvent(t,n?"rightclick":"click",this.eventData))):t[i]&&(t[i]=!1,this.dispatchEvent(t,n?"rightupoutside":"mouseupoutside",this.eventData))},n.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor="inherit",this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},n.prototype.processMouseMove=function(t,e){this.dispatchEvent(t,"mousemove",this.eventData),this.processMouseOverOut(t,e)},n.prototype.onMouseOut=function(t){this.mouse.originalEvent=t,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor="inherit",this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1)},n.prototype.processMouseOverOut=function(t,e){e?(t._over||(t._over=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._over&&(t._over=!1,this.dispatchEvent(t,"mouseout",this.eventData))},n.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,n=0;r>n;n++){var i=e[n],o=this.getTouchData(i);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchStart,!0),this.returnTouchData(o)}},n.prototype.processTouchStart=function(t,e){e&&(t._touchDown=!0,this.dispatchEvent(t,"touchstart",this.eventData))},n.prototype.onTouchEnd=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,n=0;r>n;n++){var i=e[n],o=this.getTouchData(i);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchEnd,!0),this.returnTouchData(o)}},n.prototype.processTouchEnd=function(t,e){e?(this.dispatchEvent(t,"touchend",this.eventData),t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"tap",this.eventData))):t._touchDown&&(t._touchDown=!1,this.dispatchEvent(t,"touchendoutside",this.eventData))},n.prototype.onTouchMove=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,r=e.length,n=0;r>n;n++){var i=e[n],o=this.getTouchData(i);o.originalEvent=t,this.eventData.data=o,this.eventData.stopped=!1,this.processInteractive(o.global,this.renderer._lastObjectRendered,this.processTouchMove,!1),this.returnTouchData(o)}},n.prototype.processTouchMove=function(t,e){e=e,this.dispatchEvent(t,"touchmove",this.eventData)},n.prototype.getTouchData=function(t){var e=this.interactiveDataPool.pop();return e||(e=new o),e.identifier=t.identifier,this.mapPositionToPoint(e.global,t.clientX,t.clientY),navigator.isCocoonJS&&(e.global.x=e.global.x/this.resolution,e.global.y=e.global.y/this.resolution),t.globalX=e.global.x,t.globalY=e.global.y,e},n.prototype.returnTouchData=function(t){this.interactiveDataPool.push(t)},n.prototype.destroy=function(){this.removeEvents(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactiveDataPool=null,this.interactionDOMElement=null,this.onMouseUp=null,this.processMouseUp=null,this.onMouseDown=null,this.processMouseDown=null,this.onMouseMove=null,this.processMouseMove=null,this.onMouseOut=null,this.processMouseOverOut=null,this.onTouchStart=null,this.processTouchStart=null,this.onTouchEnd=null,this.processTouchEnd=null,this.onTouchMove=null,this.processTouchMove=null,this._tempPoint=null},i.WebGLRenderer.registerPlugin("interaction",n),i.CanvasRenderer.registerPlugin("interaction",n)},{"../core":29,"./InteractionData":115,"./interactiveTarget":118}],117:[function(t,e,r){e.exports={InteractionData:t("./InteractionData"),InteractionManager:t("./InteractionManager"),interactiveTarget:t("./interactiveTarget")}},{"./InteractionData":115,"./InteractionManager":116,"./interactiveTarget":118}],118:[function(t,e,r){var n={interactive:!1,buttonMode:!1,interactiveChildren:!0,defaultCursor:"pointer",_over:!1,_touchDown:!1};e.exports=n},{}],119:[function(t,e,r){function n(t,e){var r={},n=t.data.getElementsByTagName("info")[0],i=t.data.getElementsByTagName("common")[0];r.font=n.getAttribute("face"),r.size=parseInt(n.getAttribute("size"),10),r.lineHeight=parseInt(i.getAttribute("lineHeight"),10),r.chars={};for(var a=t.data.getElementsByTagName("char"),h=0;hi;i++){var o=2*i;this._renderCanvasDrawTriangle(t,e,r,o,o+2,o+4)}},n.prototype._renderCanvasTriangles=function(t){for(var e=this.vertices,r=this.uvs,n=this.indices,i=n.length,o=0;i>o;o+=3){var s=2*n[o],a=2*n[o+1],h=2*n[o+2];this._renderCanvasDrawTriangle(t,e,r,s,a,h)}},n.prototype._renderCanvasDrawTriangle=function(t,e,r,n,i,o){var s=this._texture.baseTexture.source,a=this._texture.baseTexture.width,h=this._texture.baseTexture.height,l=e[n],u=e[i],c=e[o],f=e[n+1],d=e[i+1],p=e[o+1],g=r[n]*a,A=r[i]*a,v=r[o]*a,m=r[n+1]*h,y=r[i+1]*h,x=r[o+1]*h;if(this.canvasPadding>0){var w=this.canvasPadding/this.worldTransform.a,E=this.canvasPadding/this.worldTransform.d,C=(l+u+c)/3,b=(f+d+p)/3,B=l-C,T=f-b,D=Math.sqrt(B*B+T*T);l=C+B/D*(D+w),f=b+T/D*(D+E),B=u-C,T=d-b,D=Math.sqrt(B*B+T*T),u=C+B/D*(D+w),d=b+T/D*(D+E),B=c-C,T=p-b,D=Math.sqrt(B*B+T*T),c=C+B/D*(D+w),p=b+T/D*(D+E)}t.save(),t.beginPath(),t.moveTo(l,f),t.lineTo(u,d),t.lineTo(c,p),t.closePath(),t.clip();var M=g*y+m*v+A*x-y*v-m*A-g*x,P=l*y+m*c+u*x-y*c-m*u-l*x,R=g*u+l*v+A*c-u*v-l*A-g*c,I=g*y*c+m*u*v+l*A*x-l*y*v-m*A*c-g*u*x,S=f*y+m*p+d*x-y*p-m*d-f*x,O=g*d+f*v+A*p-d*v-f*A-g*p,F=g*y*p+m*d*v+f*A*x-f*y*v-m*A*p-g*d*x;t.transform(P/M,S/M,R/M,O/M,I/M,F/M),t.drawImage(s,0,0),t.restore()},n.prototype.renderMeshFlat=function(t){var e=this.context,r=t.vertices,n=r.length/2;e.beginPath();for(var i=1;n-2>i;i++){var o=2*i,s=r[o],a=r[o+2],h=r[o+4],l=r[o+1],u=r[o+3],c=r[o+5];e.moveTo(s,l),e.lineTo(a,u),e.lineTo(h,c)}e.fillStyle="#FF0000",e.fill(),e.closePath()},n.prototype._onTextureUpdate=function(){this.updateFrame=!0},n.prototype.getBounds=function(t){if(!this._currentBounds){for(var e=t||this.worldTransform,r=e.a,n=e.b,o=e.c,s=e.d,a=e.tx,h=e.ty,l=-(1/0),u=-(1/0),c=1/0,f=1/0,d=this.vertices,p=0,g=d.length;g>p;p+=2){var A=d[p],v=d[p+1],m=r*A+o*v+a,y=s*v+n*A+h;c=c>m?m:c,f=f>y?y:f,l=m>l?m:l,u=y>u?y:u}if(c===-(1/0)||u===1/0)return i.Rectangle.EMPTY;var x=this._bounds;x.x=c,x.width=l-c,x.y=f,x.height=u-f,this._currentBounds=x}return this._currentBounds},n.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,o);var e,r,i=this.vertices,a=s.points;if(this.drawMode===n.DRAW_MODES.TRIANGLES){var h=this.indices;for(r=this.indices.length,e=0;r>e;e+=3){var l=2*h[e],u=2*h[e+1],c=2*h[e+2];if(a[0]=i[l],a[1]=i[l+1],a[2]=i[u],a[3]=i[u+1],a[4]=i[c],a[5]=i[c+1],s.contains(o.x,o.y))return!0}}else for(r=i.length,e=0;r>e;e+=6)if(a[0]=i[e],a[1]=i[e+1],a[2]=i[e+2],a[3]=i[e+3],a[4]=i[e+4],a[5]=i[e+5],s.contains(o.x,o.y))return!0;return!1},n.DRAW_MODES={TRIANGLE_MESH:0,TRIANGLES:1}},{"../core":29}],125:[function(t,e,r){function n(t,e){i.call(this,t),this.points=e,this.vertices=new Float32Array(4*e.length),this.uvs=new Float32Array(4*e.length),this.colors=new Float32Array(2*e.length), -this.indices=new Uint16Array(2*e.length),this._ready=!0,this.refresh()}var i=t("./Mesh"),o=t("../core");n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e.exports=n,n.prototype.refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){var e=this.uvs,r=this.indices,n=this.colors,i=this._texture._uvs,s=new o.Point(i.x0,i.y0),a=new o.Point(i.x2-i.x0,i.y2-i.y0);e[0]=0+s.x,e[1]=0+s.y,e[2]=0+s.x,e[3]=1*a.y+s.y,n[0]=1,n[1]=1,r[0]=0,r[1]=1;for(var h,l,u,c=t.length,f=1;c>f;f++)h=t[f],l=4*f,u=f/(c-1),e[l]=u*a.x+s.x,e[l+1]=0+s.y,e[l+2]=u*a.x+s.x,e[l+3]=1*a.y+s.y,l=2*f,n[l]=1,n[l+1]=1,l=2*f,r[l]=l,r[l+1]=l+1;this.dirty=!0}},n.prototype._onTextureUpdate=function(){i.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},n.prototype.updateTransform=function(){var t=this.points;if(!(t.length<1)){for(var e,r,n,i,o,s,a=t[0],h=0,l=0,u=this.vertices,c=t.length,f=0;c>f;f++)r=t[f],n=4*f,e=f1&&(i=1),o=Math.sqrt(h*h+l*l),s=this._texture.height/2,h/=o,l/=o,h*=s,l*=s,u[n]=r.x+h,u[n+1]=r.y+l,u[n+2]=r.x-h,u[n+3]=r.y-l,a=r;this.containerUpdateTransform()}}},{"../core":29,"./Mesh":124}],126:[function(t,e,r){e.exports={Mesh:t("./Mesh"),Rope:t("./Rope"),MeshRenderer:t("./webgl/MeshRenderer"),MeshShader:t("./webgl/MeshShader")}},{"./Mesh":124,"./Rope":125,"./webgl/MeshRenderer":127,"./webgl/MeshShader":128}],127:[function(t,e,r){function n(t){i.ObjectRenderer.call(this,t),this.indices=new Uint16Array(15e3);for(var e=0,r=0;15e3>e;e+=6,r+=4)this.indices[e+0]=r+0,this.indices[e+1]=r+1,this.indices[e+2]=r+2,this.indices[e+3]=r+0,this.indices[e+4]=r+2,this.indices[e+5]=r+3}var i=t("../../core"),o=t("../Mesh");n.prototype=Object.create(i.ObjectRenderer.prototype),n.prototype.constructor=n,e.exports=n,i.WebGLRenderer.registerPlugin("mesh",n),n.prototype.onContextChange=function(){},n.prototype.render=function(t){t._vertexBuffer||this._initWebGL(t);var e=this.renderer,r=e.gl,n=t._texture.baseTexture,i=e.shaderManager.plugins.meshShader,s=t.drawMode===o.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;e.blendModeManager.setBlendMode(t.blendMode),r.uniformMatrix3fv(i.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),r.uniformMatrix3fv(i.uniforms.projectionMatrix._location,!1,e.currentRenderTarget.projectionMatrix.toArray(!0)),r.uniform1f(i.uniforms.alpha._location,t.worldAlpha),t.dirty?(t.dirty=!1,r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferData(r.ARRAY_BUFFER,t.vertices,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.bufferData(r.ARRAY_BUFFER,t.uvs,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.indices,r.STATIC_DRAW)):(r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferSubData(r.ARRAY_BUFFER,0,t.vertices),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,t.indices)),r.drawElements(s,t.indices.length,r.UNSIGNED_SHORT,0)},n.prototype._initWebGL=function(t){var e=this.renderer.gl;t._vertexBuffer=e.createBuffer(),t._indexBuffer=e.createBuffer(),t._uvBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,t.vertices,e.DYNAMIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,t._uvBuffer),e.bufferData(e.ARRAY_BUFFER,t.uvs,e.STATIC_DRAW),t.colors&&(t._colorBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._colorBuffer),e.bufferData(e.ARRAY_BUFFER,t.colors,e.STATIC_DRAW)),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,t.indices,e.STATIC_DRAW)},n.prototype.flush=function(){},n.prototype.start=function(){var t=this.renderer.shaderManager.plugins.meshShader;this.renderer.shaderManager.setShader(t)},n.prototype.destroy=function(){}},{"../../core":29,"../Mesh":124}],128:[function(t,e,r){function n(t){i.Shader.call(this,t,["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","uniform float alpha;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * alpha ;","}"].join("\n"),{alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aTextureCoord:0})}var i=t("../../core");n.prototype=Object.create(i.Shader.prototype),n.prototype.constructor=n,e.exports=n,i.ShaderManager.registerPlugin("meshShader",n)},{"../../core":29}],129:[function(t,e,r){Object.assign||(Object.assign=t("object-assign"))},{"object-assign":12}],130:[function(t,e,r){t("./Object.assign"),t("./requestAnimationFrame")},{"./Object.assign":129,"./requestAnimationFrame":131}],131:[function(t,e,r){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),n=["ms","moz","webkit","o"],i=0;in&&(n=0),r=e,setTimeout(function(){r=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.html2canvas=t()}}(function(){var t;return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var h="function"==typeof require&&require;if(!a&&h)return h(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[s]={exports:{}};t[s][0].call(u.exports,function(e){var r=t[s][1][e];return i(r?r:e)},u,u.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;st;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}V=0}function A(){try{var t=e,r=t("vertx");return J=r.runOnLoop||r.runOnContext,c()}catch(n){return p()}}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function x(t){try{return t.then}catch(e){return st.error=e,st}}function w(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function E(t,e,r){Z(function(t){var n=!1,i=w(r,e,function(r){n||(n=!0,e!==r?B(t,r):D(t,r))},function(e){n||(n=!0,M(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,M(t,i))},t)}function C(t,e){e._state===it?D(t,e._result):e._state===ot?M(t,e._result):P(e,void 0,function(e){B(t,e)},function(e){M(t,e)})}function b(t,e){if(e.constructor===t.constructor)C(t,e);else{var r=x(e);r===st?M(t,st.error):void 0===r?D(t,e):s(r)?E(t,e,r):D(t,e)}}function B(t,e){t===e?M(t,m()):o(e)?b(t,e):D(t,e)}function T(t){t._onerror&&t._onerror(t._result),R(t)}function D(t,e){t._state===nt&&(t._result=e,t._state=it,0!==t._subscribers.length&&Z(R,t))}function M(t,e){t._state===nt&&(t._state=ot,t._result=e,Z(T,t))}function P(t,e,r,n){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+it]=r,i[o+ot]=n,0===o&&t._state&&Z(R,t)}function R(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,o=t._result,s=0;ss;s++)P(n.resolve(t[s]),void 0,e,r);return i}function H(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var r=new e(v);return B(r,t),r}function k(t){var e=this,r=new e(v);return M(r,t),r}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Y(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function j(t){this._id=dt++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(s(t)||G(),this instanceof j||Y(),F(this,t))}function z(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(t.Promise=pt)}var U;U=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var J,X,W,K=U,V=0,Z=({}.toString,function(t,e){rt[V]=t,rt[V+1]=e,V+=2,2===V&&(X?X(g):W())}),q="undefined"!=typeof window?window:void 0,_=q||{},$=_.MutationObserver||_.WebKitMutationObserver,tt="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);W=tt?u():$?f():et?d():void 0===q&&"function"==typeof e?A():p();var nt=void 0,it=1,ot=2,st=new I,at=new I;Q.prototype._validateInput=function(t){return K(t)},Q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},Q.prototype._init=function(){this._result=new Array(this.length)};var ht=Q;Q.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===nt&&e>i;i++)t._eachEntry(n[i],i)},Q.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;a(t)?t.constructor===n&&t._state!==nt?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},Q.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===nt&&(n._remaining--,t===ot?M(i,r):n._result[e]=r),0===n._remaining&&D(i,n._result)},Q.prototype._willSettleAt=function(t,e){var r=this;P(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(ot,e,t)})};var lt=L,ut=N,ct=H,ft=k,dt=0,pt=j;j.all=lt,j.race=ut,j.resolve=ct,j.reject=ft,j._setScheduler=h,j._setAsap=l,j._asap=Z,j.prototype={constructor:j,then:function(t,e){var r=this,n=r._state;if(n===it&&!t||n===ot&&!e)return this;var i=new this.constructor(v),o=r._result;if(n){var s=arguments[n-1];Z(function(){O(n,i,s,o)})}else P(r,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var gt=z,At={Promise:pt,polyfill:gt};"function"==typeof t&&t.amd?t(function(){return At}):"undefined"!=typeof r&&r.exports?r.exports=At:"undefined"!=typeof this&&(this.ES6Promise=At),gt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:2}],2:[function(t,e,r){function n(){u=!1,a.length?l=a.concat(l):c=-1,l.length&&i()}function i(){if(!u){var t=setTimeout(n);u=!0;for(var e=l.length;e;){for(a=l,l=[];++c1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(O,".");var i=t.split("."),o=s(i,e).join(".");return n+o}function h(t){for(var e,r,n=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function l(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function u(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:C}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?L(t/D):t>>1,t+=L(t/e);t>Q*B>>1;n+=C)t=L(t/Q);return L(n+(Q+1)*t/(t+T))}function d(t){var e,r,n,i,s,a,h,c,d,p,g=[],A=t.length,v=0,m=P,y=M;for(r=t.lastIndexOf(R),0>r&&(r=0),n=0;r>n;++n)t.charCodeAt(n)>=128&&o("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;A>i;){for(s=v,a=1,h=C;i>=A&&o("invalid-input"),c=u(t.charCodeAt(i++)),(c>=C||c>L((E-v)/a))&&o("overflow"),v+=c*a,d=y>=h?b:h>=y+B?B:h-y,!(d>c);h+=C)p=C-d,a>L(E/p)&&o("overflow"),a*=p;e=g.length+1,y=f(v-s,e,0==s),L(v/e)>E-m&&o("overflow"),m+=L(v/e),v%=e,g.splice(v++,0,m)}return l(g)}function p(t){var e,r,n,i,s,a,l,u,d,p,g,A,v,m,y,x=[];for(t=h(t),A=t.length,e=P,r=0,s=M,a=0;A>a;++a)g=t[a],128>g&&x.push(N(g));for(n=i=x.length,i&&x.push(R);A>n;){for(l=E,a=0;A>a;++a)g=t[a],g>=e&&l>g&&(l=g);for(v=n+1,l-e>L((E-r)/v)&&o("overflow"),r+=(l-e)*v,e=l,a=0;A>a;++a)if(g=t[a],e>g&&++r>E&&o("overflow"),g==e){for(u=r,d=C;p=s>=d?b:d>=s+B?B:d-s,!(p>u);d+=C)y=u-p,m=C-p,x.push(N(c(p+y%m,0))),u=L(y/m);x.push(N(c(u,0))),s=f(r,v,n==i),r=0,++n}++r,++e}return x.join("")}function g(t){return a(t,function(t){return I.test(t)?d(t.slice(4).toLowerCase()):t})}function A(t){return a(t,function(t){return S.test(t)?"xn--"+p(t):t})}var v="object"==typeof n&&n&&!n.nodeType&&n,m="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof e&&e;(y.global===y||y.window===y||y.self===y)&&(i=y);var x,w,E=2147483647,C=36,b=1,B=26,T=38,D=700,M=72,P=128,R="-",I=/^xn--/,S=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Q=C-b,L=Math.floor,N=String.fromCharCode;if(x={version:"1.3.2",ucs2:{decode:h,encode:l},decode:d,encode:p,toASCII:A,toUnicode:g},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&m)if(r.exports==v)m.exports=x;else for(w in x)x.hasOwnProperty(w)&&(v[w]=x[w]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,e,r){function n(t,e,r){!t.defaultView||e===t.defaultView.pageXOffset&&r===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,r)}function i(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(r){a("Unable to copy canvas content from",t,r)}}function o(t,e){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),n=t.firstChild;n;)(e===!0||1!==n.nodeType||"SCRIPT"!==n.nodeName)&&r.appendChild(o(n,e)),n=n.nextSibling;return 1===t.nodeType&&"BODY"!==t.tagName&&(r._scrollTop=t.scrollTop,r._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?i(t,r):("TEXTAREA"===t.nodeName||"SELECT"===t.nodeName)&&(r.value=t.value)),r}function s(t){if(1===t.nodeType){t.scrollTop=t._scrollTop,t.scrollLeft=t._scrollLeft;for(var e=t.firstChild;e;)s(e),e=e.nextSibling}}var a=t("./log"),h=t("./promise");e.exports=function(t,e,r,i,a,l,u){var c=o(t.documentElement,a.javascriptEnabled),f=e.createElement("iframe");return f.className="html2canvas-container",f.style.visibility="hidden",f.style.position="fixed",f.style.left="-10000px",f.style.top="0px",f.style.border="0",f.width=r,f.height=i,f.scrolling="no",e.body.appendChild(f),new h(function(e){var r=f.contentWindow.document;f.contentWindow.onload=f.onload=function(){var t=setInterval(function(){r.body.childNodes.length>0&&(s(r.documentElement),clearInterval(t),"view"===a.type&&(f.contentWindow.scrollTo(l,u),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||f.contentWindow.scrollY===u&&f.contentWindow.scrollX===l||(r.documentElement.style.top=-u+"px",r.documentElement.style.left=-l+"px",r.documentElement.style.position="absolute")),e(f))},50)},r.open(),r.write(""),n(t,l,u),r.replaceChild(r.adoptNode(c),r.documentElement),r.close()})}},{"./log":15,"./promise":18}],5:[function(t,e,r){function n(t){this.r=0,this.g=0,this.b=0,this.a=null;this.fromArray(t)||this.namedColor(t)||this.rgb(t)||this.rgba(t)||this.hex6(t)||this.hex3(t)}n.prototype.darken=function(t){var e=1-t;return new n([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(t){return Array.isArray(t)&&(this.r=Math.min(t[0],255),this.g=Math.min(t[1],255),this.b=Math.min(t[2],255),t.length>3&&(this.a=t[3])),Array.isArray(t)};var i=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(t){var e=null;return null!==(e=t.match(i))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(t){var e=null;return null!==(e=t.match(o))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var s=/^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;n.prototype.rgb=function(t){var e=null;return null!==(e=t.match(s))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var a=/^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;n.prototype.rgba=function(t){var e=null;return null!==(e=t.match(a))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(t){var e=h[t.toLowerCase()];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t.toLowerCase())return this.r=this.g=this.b=this.a=0,!0;return!!e},n.prototype.isColor=!0;var h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};e.exports=n},{}],6:[function(t,e,r){function n(t,e){var r=C++;if(e=e||{},e.logging&&(window.html2canvas.logging=!0,window.html2canvas.start=Date.now()),e.async="undefined"==typeof e.async?!0:e.async,e.allowTaint="undefined"==typeof e.allowTaint?!1:e.allowTaint,e.removeContainer="undefined"==typeof e.removeContainer?!0:e.removeContainer,e.javascriptEnabled="undefined"==typeof e.javascriptEnabled?!1:e.javascriptEnabled,e.imageTimeout="undefined"==typeof e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"==typeof e.renderer?e.renderer:d,e.strict=!!e.strict,"string"==typeof t){if("string"!=typeof e.proxy)return c.reject("Proxy must be used when rendering url");var n=null!=e.width?e.width:window.innerWidth,s=null!=e.height?e.height:window.innerHeight;return x(u(t),e.proxy,document,n,s,e).then(function(t){return o(t.contentWindow.document.documentElement,t,e,n,s)})}var a=(void 0===t?[document.documentElement]:t.length?t:[t])[0];return a.setAttribute(E+r,r),i(a.ownerDocument,e,a.ownerDocument.defaultView.innerWidth,a.ownerDocument.defaultView.innerHeight,r).then(function(t){return"function"==typeof e.onrendered&&(v("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),e.onrendered(t)),t})}function i(t,e,r,n,i){return y(t,t,r,n,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then(function(s){v("Document cloned");var a=E+i,h="["+a+"='"+i+"']";t.querySelector(h).removeAttribute(a);var l=s.contentWindow,u=l.document.querySelector(h);"0"===u.style.opacity&&"webgl"===u.getAttribute("renderer")?u.style.opacity=1:null;var f="function"==typeof e.onclone?c.resolve(e.onclone(l.document)):c.resolve(!0);return f.then(function(){return o(u,s,e,r,n)})})}function o(t,e,r,n,i){var o=e.contentWindow,u=new f(o.document),c=new p(r,u),d=w(t),A="view"===r.type?n:h(o.document),m="view"===r.type?i:l(o.document),y=new r.renderer(A,m,c,r,document),x=new g(t,y,u,c,r);return x.ready.then(function(){v("Finished rendering");var n;return"view"===r.type?n=a(y.canvas,{width:y.canvas.width,height:y.canvas.height,top:0,left:0,x:0,y:0}):t===o.document.body||t===o.document.documentElement||null!=r.canvas?n=y.canvas:(1!==window.devicePixelRatio&&(d.top=d.top*window.devicePixelRatio,d.left=d.left*window.devicePixelRatio,d.right=d.right*window.devicePixelRatio,d.bottom=d.bottom*window.devicePixelRatio),n=a(y.canvas,{width:null!=r.width?r.width:d.width,height:null!=r.height?r.height:d.height,top:d.top,left:d.left,x:o.pageXOffset,y:o.pageYOffset})),s(e,r),n})}function s(t,e){e.removeContainer&&(t.parentNode.removeChild(t),v("Cleaned up container"))}function a(t,e){var r=document.createElement("canvas"),n=Math.min(t.width-1,Math.max(0,e.left)),i=Math.min(t.width,Math.max(1,e.left+e.width)),o=Math.min(t.height-1,Math.max(0,e.top)),s=Math.min(t.height,Math.max(1,e.top+e.height));return r.width=e.width,r.height=e.height,v("Cropping canvas at:","left:",e.left,"top:",e.top,"width:",i-n,"height:",s-o),v("Resulting crop with width",e.width,"and height",e.height," with x",n,"and y",o),r.getContext("2d").drawImage(t,n,o,i-n,s-o,e.x,e.y,i-n,s-o),r}function h(t){return Math.max(Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),Math.max(t.body.offsetWidth,t.documentElement.offsetWidth),Math.max(t.body.clientWidth,t.documentElement.clientWidth))}function l(t){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))}function u(t){var e=document.createElement("a");return e.href=t,e.href=e.href,e}var c=t("./promise"),f=t("./support"),d=t("./renderers/canvas"),p=t("./imageloader"),g=t("./nodeparser"),A=t("./nodecontainer"),v=t("./log"),m=t("./utils"),y=t("./clone"),x=t("./proxy").loadUrlDocument,w=m.getBounds,E="data-html2canvas-node",C=0;n.Promise=c,n.CanvasRenderer=d,n.NodeContainer=A,n.log=v,n.utils=m,e.exports="undefined"==typeof document||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return c.reject("No canvas support")}:n},{"./clone":4,"./imageloader":13,"./log":15,"./nodecontainer":16,"./nodeparser":17,"./promise":18,"./proxy":19,"./renderers/canvas":23,"./support":25,"./utils":29}],7:[function(t,e,r){function n(t){if(this.src=t,o("DummyImageContainer for",t),!this.promise||!this.image){o("Initiating DummyImageContainer"),n.prototype.image=new Image;var e=this.image;n.prototype.promise=new i(function(t,r){e.onload=t,e.onerror=r,e.src=s(),e.complete===!0&&t(e)})}}var i=t("./promise"),o=t("./log"),s=t("./utils").smallImage;e.exports=n},{"./log":15,"./promise":18,"./utils":29}],8:[function(t,e,r){function n(t,e){var r,n,o=document.createElement("div"),s=document.createElement("img"),a=document.createElement("span"),h="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=t,o.style.fontSize=e,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),s.src=i(),s.width=1,s.height=1,s.style.margin=0,s.style.padding=0,s.style.verticalAlign="baseline",a.style.fontFamily=t,a.style.fontSize=e,a.style.margin=0,a.style.padding=0,a.appendChild(document.createTextNode(h)),o.appendChild(a),o.appendChild(s),r=s.offsetTop-a.offsetTop+1,o.removeChild(a),o.appendChild(document.createTextNode(h)),o.style.lineHeight="normal",s.style.verticalAlign="super",n=s.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=r,this.lineWidth=1,this.middle=n}var i=t("./utils").smallImage;e.exports=n},{"./utils":29}],9:[function(t,e,r){function n(){this.data={}}var i=t("./font");n.prototype.getMetrics=function(t,e){return void 0===this.data[t+"-"+e]&&(this.data[t+"-"+e]=new i(t,e)),this.data[t+"-"+e]},e.exports=n},{"./font":8}],10:[function(t,e,r){function n(e,r,n){this.image=null,this.src=e;var i=this,a=s(e);this.promise=(r?new o(function(t){"about:blank"===e.contentWindow.document.URL||null==e.contentWindow.document.documentElement?e.contentWindow.onload=e.onload=function(){t(e)}:t(e)}):this.proxyLoad(n.proxy,a,n)).then(function(e){var r=t("./core");return r(e.contentWindow.document.documentElement,{type:"view",width:e.width,height:e.height,proxy:n.proxy,javascriptEnabled:n.javascriptEnabled,removeContainer:n.removeContainer,allowTaint:n.allowTaint,imageTimeout:n.imageTimeout/2})}).then(function(t){return i.image=t})}var i=t("./utils"),o=t("./promise"),s=i.getBounds,a=t("./proxy").loadUrlDocument;n.prototype.proxyLoad=function(t,e,r){var n=this.src;return a(n.src,t,n.ownerDocument,e.width,e.height,r)},e.exports=n},{"./core":6,"./promise":18,"./proxy":19,"./utils":29}],11:[function(t,e,r){function n(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=i.resolve(!0)}var i=t("./promise");n.prototype.TYPES={LINEAR:1,RADIAL:2},e.exports=n},{"./promise":18}],12:[function(t,e,r){function n(t,e){this.src=t,this.image=new Image;var r=this;this.tainted=null,this.promise=new i(function(n,i){r.image.onload=n,r.image.onerror=i,e&&(r.image.crossOrigin="anonymous"),r.image.src=t,r.image.complete===!0&&n(r.image)})}var i=t("./promise");e.exports=n},{"./promise":18}],13:[function(t,e,r){function n(t,e){this.link=null,this.options=t,this.support=e,this.origin=this.getOrigin(window.location.href)}var i=t("./promise"),o=t("./log"),s=t("./imagecontainer"),a=t("./dummyimagecontainer"),h=t("./proxyimagecontainer"),l=t("./framecontainer"),u=t("./svgcontainer"),c=t("./svgnodecontainer"),f=t("./lineargradientcontainer"),d=t("./webkitgradientcontainer"),p=t("./utils").bind;n.prototype.findImages=function(t){ -var e=[];return t.reduce(function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t},[]).forEach(this.addImage(e,this.loadImage),this),e},n.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},n.prototype.addImage=function(t,e){return function(r){r.args.forEach(function(n){this.imageExists(t,n)||(t.splice(0,0,e.call(this,r)),o("Added image #"+t.length,"string"==typeof n?n.substring(0,100):n))},this)}},n.prototype.hasImageBackground=function(t){return"none"!==t.method},n.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new s(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||this.options.allowTaint===!0||this.isSVG(e)?new s(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new s(e,!0):this.options.proxy?new h(e,this.options.proxy):new a(e):new u(e)}return"linear-gradient"===t.method?new f(t):"gradient"===t.method?new d(t):"svg"===t.method?new c(t.args[0],this.support.svg):"IFRAME"===t.method?new l(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new a(t)},n.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||u.prototype.isInline(t)},n.prototype.imageExists=function(t,e){return t.some(function(t){return t.src===e})},n.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},n.prototype.getOrigin=function(t){var e=this.link||(this.link=document.createElement("a"));return e.href=t,e.href=e.href,e.protocol+e.hostname+e.port},n.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout)["catch"](function(){var e=new a(t.src);return e.promise.then(function(e){t.image=e})})},n.prototype.get=function(t){var e=null;return this.images.some(function(r){return(e=r).src===t})?e:null},n.prototype.fetch=function(t){return this.images=t.reduce(p(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach(function(t,e){t.promise.then(function(){o("Succesfully loaded image #"+(e+1),t)},function(r){o("Failed loading image #"+(e+1),t,r)})}),this.ready=i.all(this.images.map(this.getPromise,this)),o("Finished searching images"),this},n.prototype.timeout=function(t,e){var r,n=i.race([t.promise,new i(function(n,i){r=setTimeout(function(){o("Timed out loading image",t),i(t)},e)})]).then(function(t){return clearTimeout(r),t});return n["catch"](function(){clearTimeout(r)}),n},e.exports=n},{"./dummyimagecontainer":7,"./framecontainer":10,"./imagecontainer":12,"./lineargradientcontainer":14,"./log":15,"./promise":18,"./proxyimagecontainer":20,"./svgcontainer":26,"./svgnodecontainer":27,"./utils":29,"./webkitgradientcontainer":30}],14:[function(t,e,r){function n(t){i.apply(this,arguments),this.type=this.TYPES.LINEAR;var e=null===t.args[0].match(this.stepRegExp);e?t.args[0].split(" ").reverse().forEach(function(t){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var e=this.y0,r=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=r,this.y1=e}},this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map(function(t){var e=t.match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)|\w+)\s*(\d{1,3})?(%|px)?/);return{color:new o(e[1]),stop:"%"===e[3]?e[2]/100:null}},this),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach(function(t,e){null===t.stop&&this.colorStops.slice(e).some(function(r,n){return null!==r.stop?(t.stop=(r.stop-this.colorStops[e-1].stop)/(n+1)+this.colorStops[e-1].stop,!0):!1},this)},this)}var i=t("./gradientcontainer"),o=t("./color");n.prototype=Object.create(i.prototype),n.prototype.stepRegExp=/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/,e.exports=n},{"./color":5,"./gradientcontainer":11}],15:[function(t,e,r){e.exports=function(){window.html2canvas.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-window.html2canvas.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))}},{}],16:[function(t,e,r){function n(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function i(t){var e=t.options[t.selectedIndex||0];return e?e.text||"":""}function o(t){if(t&&"matrix"===t[1])return t[2].split(",").map(function(t){return parseFloat(t.trim())});if(t&&"matrix3d"===t[1]){var e=t[2].split(",").map(function(t){return parseFloat(t.trim())});return[e[0],e[1],e[4],e[5],e[12],e[13]]}}function s(t){return-1!==t.toString().indexOf("%")}function a(t){return t.replace("px","")}function h(t){return parseFloat(t)}var l=t("./color"),u=t("./utils"),c=u.getBounds,f=u.parseBackgrounds,d=u.offsetBounds;n.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},n.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},n.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},n.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},n.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},n.prototype.prefixedCss=function(t){var e=["webkit","moz","ms","o"],r=this.css(t);return void 0===r&&e.some(function(e){return r=this.css(e+t.substr(0,1).toUpperCase()+t.substr(1)),void 0!==r},this),void 0===r?null:r},n.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},n.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},n.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new l(this.css(t)))},n.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},n.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal"}return t},n.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},n.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=f(this.css("backgroundImage")))},n.prototype.cssList=function(t,e){var r=(this.css(t)||"").split(",");return r=r[e||0]||r[0]||"auto",r=r.trim().split(" "),1===r.length&&(r=[r[0],s(r[0])?"auto":r[0]]),r},n.prototype.parseBackgroundSize=function(t,e,r){var n,i,o=this.cssList("backgroundSize",r);if(s(o[0]))n=t.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=t.width/t.height,h=e.width/e.height;return h>a^"contain"===o[0]?{width:t.height*h,height:t.height}:{width:t.width,height:t.width/h}}n=parseInt(o[0],10)}return i="auto"===o[0]&&"auto"===o[1]?e.height:"auto"===o[1]?n/e.width*e.height:s(o[1])?t.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=i/e.height*e.width),{width:n,height:i}},n.prototype.parseBackgroundPosition=function(t,e,r,n){var i,o,a=this.cssList("backgroundPosition",r);return i=s(a[0])?(t.width-(n||e).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?i/e.width*e.height:s(a[1])?(t.height-(n||e).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(i=o/e.height*e.width),{left:i,top:o}},n.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},n.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var r=t.match(this.TEXT_SHADOW_PROPERTY),n=0;r&&n0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())},this))},this))}function i(t){return t.parent&&t.parent.clip.length}function o(t){return t.replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")})}function s(){}function a(t,e,r,n){return t.map(function(i,o){if(i.width>0){var s=e.left,a=e.top,h=e.width,l=e.height-t[2].width;switch(o){case 0:l=t[0].width,i.args=c({c1:[s,a],c2:[s+h,a],c3:[s+h-t[1].width,a+l],c4:[s+t[3].width,a+l]},n[0],n[1],r.topLeftOuter,r.topLeftInner,r.topRightOuter,r.topRightInner);break;case 1:s=e.left+e.width-t[1].width,h=t[1].width,i.args=c({c1:[s+h,a],c2:[s+h,a+l+t[2].width],c3:[s,a+l],c4:[s,a+t[0].width]},n[1],n[2],r.topRightOuter,r.topRightInner,r.bottomRightOuter,r.bottomRightInner);break;case 2:a=a+e.height-t[2].width,l=t[2].width,i.args=c({c1:[s+h,a+l],c2:[s,a+l],c3:[s+t[3].width,a],c4:[s+h-t[3].width,a]},n[2],n[3],r.bottomRightOuter,r.bottomRightInner,r.bottomLeftOuter,r.bottomLeftInner);break;case 3:h=t[3].width,i.args=c({c1:[s,a+l+t[2].width],c2:[s,a],c3:[s+h,a+t[0].width],c4:[s+h,a+l]},n[3],n[0],r.bottomLeftOuter,r.bottomLeftInner,r.topLeftOuter,r.topLeftInner)}}return i})}function h(t,e,r,n){var i=4*((Math.sqrt(2)-1)/3),o=r*i,s=n*i,a=t+r,h=e+n;return{topLeft:u({x:t,y:h},{x:t,y:h-s},{x:a-o,y:e},{x:a,y:e}),topRight:u({x:t,y:e},{x:t+o,y:e},{x:a,y:h-s},{x:a,y:h}),bottomRight:u({x:a,y:e},{x:a,y:e+s},{x:t+o,y:h},{x:t,y:h}),bottomLeft:u({x:a,y:h},{x:a-o,y:h},{x:t,y:e+s},{x:t,y:e})}}function l(t,e,r){var n=t.left,i=t.top,o=t.width,s=t.height,a=e[0][0],l=e[0][1],u=e[1][0],c=e[1][1],f=e[2][0],d=e[2][1],p=e[3][0],g=e[3][1],A=o-u,v=s-d,m=o-f,y=s-g;return{topLeftOuter:h(n,i,a,l).topLeft.subdivide(.5),topLeftInner:h(n+r[3].width,i+r[0].width,Math.max(0,a-r[3].width),Math.max(0,l-r[0].width)).topLeft.subdivide(.5),topRightOuter:h(n+A,i,u,c).topRight.subdivide(.5),topRightInner:h(n+Math.min(A,o+r[3].width),i+r[0].width,A>o+r[3].width?0:u-r[3].width,c-r[0].width).topRight.subdivide(.5),bottomRightOuter:h(n+m,i+v,f,d).bottomRight.subdivide(.5),bottomRightInner:h(n+Math.min(m,o-r[3].width),i+Math.min(v,s+r[0].width),Math.max(0,f-r[1].width),d-r[2].width).bottomRight.subdivide(.5),bottomLeftOuter:h(n,i+y,p,g).bottomLeft.subdivide(.5),bottomLeftInner:h(n+r[3].width,i+y,Math.max(0,p-r[3].width),g-r[2].width).bottomLeft.subdivide(.5)}}function u(t,e,r,n){var i=function(t,e,r){return{x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r}};return{start:t,startControl:e,endControl:r,end:n,subdivide:function(o){var s=i(t,e,o),a=i(e,r,o),h=i(r,n,o),l=i(s,a,o),c=i(a,h,o),f=i(l,c,o);return[u(t,s,l,f),u(f,c,h,n)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,r.x,r.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",r.x,r.y,e.x,e.y,t.x,t.y])}}}function c(t,e,r,n,i,o,s){var a=[];return e[0]>0||e[1]>0?(a.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(a)):a.push(["line",t.c1[0],t.c1[1]]),r[0]>0||r[1]>0?(a.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(a),a.push(["line",s[0].end.x,s[0].end.y]),s[0].curveToReversed(a)):(a.push(["line",t.c2[0],t.c2[1]]),a.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(a.push(["line",i[1].end.x,i[1].end.y]),i[1].curveToReversed(a)):a.push(["line",t.c4[0],t.c4[1]]),a}function f(t,e,r,n,i,o,s){e[0]>0||e[1]>0?(t.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(t),n[1].curveTo(t)):t.push(["line",o,s]),(r[0]>0||r[1]>0)&&t.push(["line",i[0].start.x,i[0].start.y])}function d(t){return t.cssInt("zIndex")<0}function p(t){return t.cssInt("zIndex")>0}function g(t){return 0===t.cssInt("zIndex")}function A(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function v(t){return t instanceof K}function m(t){return t.node.data.trim().length>0}function y(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function x(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(e){var r=t.css("border"+e+"Radius"),n=r.split(" ");return n.length<=1&&(n[1]=n[0]),n.map(S)})}function w(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function E(t){var e=t.css("position"),r=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==r}function C(t){return"static"!==t.css("position")}function b(t){return"none"!==t.css("float")}function B(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function T(t){var e=this;return function(){return!t.apply(e,arguments)}}function D(t){return t.node.nodeType===Node.ELEMENT_NODE}function M(t){return t.isPseudoElement===!0}function P(t){return t.node.nodeType===Node.TEXT_NODE}function R(t){return function(e,r){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(r.cssInt("zIndex")+t.indexOf(r)/t.length)}}function I(t){return t.getOpacity()<1}function S(t){return parseInt(t,10)}function O(t){return t.width}function F(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function Q(t){return[].concat.apply([],t)}function L(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}function N(t){for(var e,r=[],n=0,i=!1;t.length;)H(t[n])===i?(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)),i=!i,n=0):n++,n>=t.length&&(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)));return r}function H(t){return-1!==[32,13,10,9,45].indexOf(t)}function k(t){return/[^\u0000-\u00ff]/.test(t)}var G=t("./log"),Y=t("punycode"),j=t("./nodecontainer"),z=t("./textcontainer"),U=t("./pseudoelementcontainer"),J=t("./fontmetrics"),X=t("./color"),W=t("./promise"),K=t("./stackingcontext"),V=t("./utils"),Z=V.bind,q=V.getBounds,_=V.parseBackgrounds,$=V.offsetBounds;n.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(t){if(D(t)){M(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],r=t.parseClip();r&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+r.left,t.bounds.top+r.top,r.right-r.left,r.bottom-r.top]]),t.clip=i(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,M(t)&&t.cleanDOM()}else P(t)&&(t.clip=i(t)?t.parent.clip:[]);M(t)||(t.bounds=null)},this)},n.prototype.asyncRenderer=function(t,e,r){r=r||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():r+20>Date.now()?this.asyncRenderer(t,e,r):setTimeout(Z(function(){this.asyncRenderer(t,e)},this),0)},n.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},n.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},n.prototype.createStyles=function(t,e){var r=t.createElement("style");r.innerHTML=e,t.body.appendChild(r)},n.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var r=this.getPseudoElement(t,":before"),n=this.getPseudoElement(t,":after");r&&e.push(r),n&&e.push(n)}return Q(e)},n.prototype.getPseudoElement=function(t,e){var r=t.computedStyle(e);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var n=L(r.content),i="url"===n.substr(0,3),s=document.createElement(i?"img":"html2canvaspseudoelement"),a=new U(s,t,e),h=r.length-1;h>=0;h--){var l=o(r.item(h));s.style[l]=r[l]}if(s.className=U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,i)return s.src=_(n)[0].args[0],[a];var u=document.createTextNode(n);return s.appendChild(u),[a,new z(u,a)]},n.prototype.getChildren=function(t){return Q([].filter.call(t.node.childNodes,w).map(function(e){var r=[e.nodeType===Node.TEXT_NODE?new z(e,t):new j(e,t)].filter(F);return e.nodeType===Node.ELEMENT_NODE&&r.length&&"TEXTAREA"!==e.tagName?r[0].isElementVisible()?r.concat(this.getChildren(r[0])):[]:r},this))},n.prototype.newStackingContext=function(t,e){var r=new K(e,t.getOpacity(),t.node,t.parent);t.cloneTo(r);var n=e?r.getParentStack(this):r.parent.stack;n.contexts.push(r),t.stack=r},n.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){D(t)&&(this.isRootElement(t)||I(t)||E(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):D(t)&&(C(t)&&g(t)||B(t)||b(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)},this)},n.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},n.prototype.isRootElement=function(t){return null===t.parent},n.prototype.sortStackingContexts=function(t){t.contexts.sort(R(t.contexts.slice(0))),t.contexts.forEach(this.sortStackingContexts,this)},n.prototype.parseTextBounds=function(t){return function(e,r,n){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var i=n.slice(0,r).join("").length;return this.getRangeBounds(t.node,i,e.length)}if(t.node&&"string"==typeof t.node.data){var o=t.node.splitText(e.length),s=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=o,s}}else(!this.support.rangeBounds||t.parent.hasTransform())&&(t.node=t.node.splitText(e.length));return{}}},n.prototype.getWrapperBounds=function(t,e){var r=t.ownerDocument.createElement("html2canvaswrapper"),n=t.parentNode,i=t.cloneNode(!0);r.appendChild(t.cloneNode(!0)),n.replaceChild(r,t);var o=e?$(r):q(r);return n.replaceChild(i,r),o},n.prototype.getRangeBounds=function(t,e,r){var n=this.range||(this.range=t.ownerDocument.createRange());return n.setStart(t,e),n.setEnd(t,e+r),n.getBoundingClientRect()},n.prototype.parse=function(t){var e=t.contexts.filter(d),r=t.children.filter(D),n=r.filter(T(b)),i=n.filter(T(C)).filter(T(A)),o=r.filter(T(C)).filter(b),a=n.filter(T(C)).filter(A),h=t.contexts.concat(n.filter(C)).filter(g),l=t.children.filter(P).filter(m),u=t.contexts.filter(p);e.concat(i).concat(o).concat(a).concat(h).concat(l).concat(u).forEach(function(t){this.renderQueue.push(t),v(t)&&(this.parse(t),this.renderQueue.push(new s))},this)},n.prototype.paint=function(t){try{t instanceof s?this.renderer.ctx.restore():P(t)?(M(t.parent)&&t.parent.appendToDOM(),this.paintText(t),M(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(G(e),this.options.strict)throw e}},n.prototype.paintNode=function(t){v(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},n.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,function(){this.renderer.renderBackground(t,e,t.borders.borders.map(O))},this),this.renderer.clip(t.clip,function(){this.renderer.renderBorders(t.borders.borders)},this),this.renderer.clip(t.backgroundClip,function(){switch(t.node.nodeName){case"svg":case"IFRAME":var r=this.images.get(t.node);r?this.renderer.renderImage(t,e,t.borders,r):G("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var n=this.images.get(t.node.src);n?this.renderer.renderImage(t,e,t.borders,n):G("Error loading ",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this)},n.prototype.paintCheckbox=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height),n={width:r-1,height:r-1,top:e.top,left:e.left},i=[3,3],o=[i,i,i,i],s=[1,1,1,1].map(function(t){return{color:new X("#A5A5A5"),width:t}}),h=l(n,o,s);this.renderer.clip(t.backgroundClip,function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new X("#DEDEDE")),this.renderer.renderBorders(a(s,n,h,o)),t.node.checked&&(this.renderer.font(new X("#424242"),"normal","normal","bold",r-3+"px","arial"),this.renderer.text("✔",n.left+r/6,n.top+r-1))},this)},n.prototype.paintRadio=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,function(){this.renderer.circleStroke(e.left+1,e.top+1,r,new X("#DEDEDE"),1,new X("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+r/4)+1,Math.ceil(e.top+r/4)+1,Math.floor(r/2),new X("#424242"))},this)},n.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var r=t.node.ownerDocument,n=r.createElement("html2canvaswrapper"),i=["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"];i.forEach(function(e){try{n.style[e]=t.css(e)}catch(r){G("html2canvas: Parse: Exception caught in renderFormValue: "+r.message)}});var o=t.parseBounds();n.style.position="fixed",n.style.left=o.left+"px",n.style.top=o.top+"px",n.textContent=e,r.body.appendChild(n),this.paintText(new z(n.firstChild,t)),r.body.removeChild(n)}},n.prototype.paintText=function(t){t.applyTextTransform();var e=Y.ucs2.decode(t.node.data),r=this.options.letterRendering&&!y(t)||k(t.node.data)?e.map(function(t){return Y.ucs2.encode([t])}):N(e),n=t.parent.fontWeight(),i=t.parent.css("fontSize"),o=t.parent.css("fontFamily"),s=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),n,i,o),s.length?this.renderer.fontShadow(s[0].color,s[0].offsetX,s[0].offsetY,s[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){r.map(this.parseTextBounds(t),this).forEach(function(e,n){e&&(this.renderer.text(r[n],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(o,i)))},this)},this)},n.prototype.renderTextDecoration=function(t,e,r){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+r.baseline+r.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+r.middle+r.lineWidth),e.width,1,t.color("color"))}};var tt={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};n.prototype.parseBorders=function(t){var e=t.parseBounds(),r=x(t),n=["Top","Right","Bottom","Left"].map(function(e,r){var n=t.css("border"+e+"Style"),i=t.color("border"+e+"Color");"inset"===n&&i.isBlack()&&(i=new X([255,255,255,i.a]));var o=tt[n]?tt[n][r]:null;return{width:t.cssInt("border"+e+"Width"),color:o?i[o[0]](o[1]):i,args:null}}),i=l(e,r,n);return{clip:this.parseBackgroundClip(t,i,n,r,e),borders:a(n,e,i,r)}},n.prototype.parseBackgroundClip=function(t,e,r,n,i){var o=t.css("backgroundClip"),s=[];switch(o){case"content-box":case"padding-box":f(s,n[0],n[1],e.topLeftInner,e.topRightInner,i.left+r[3].width,i.top+r[0].width),f(s,n[1],n[2],e.topRightInner,e.bottomRightInner,i.left+i.width-r[1].width,i.top+r[0].width),f(s,n[2],n[3],e.bottomRightInner,e.bottomLeftInner,i.left+i.width-r[1].width,i.top+i.height-r[2].width),f(s,n[3],n[0],e.bottomLeftInner,e.topLeftInner,i.left+r[3].width,i.top+i.height-r[2].width);break;default:f(s,n[0],n[1],e.topLeftOuter,e.topRightOuter,i.left,i.top),f(s,n[1],n[2],e.topRightOuter,e.bottomRightOuter,i.left+i.width,i.top),f(s,n[2],n[3],e.bottomRightOuter,e.bottomLeftOuter,i.left+i.width,i.top+i.height),f(s,n[3],n[0],e.bottomLeftOuter,e.topLeftOuter,i.left,i.top+i.height)}return s},e.exports=n},{"./color":5,"./fontmetrics":9,"./log":15,"./nodecontainer":16,"./promise":18,"./pseudoelementcontainer":21,"./stackingcontext":24,"./textcontainer":28,"./utils":29,punycode:3}],18:[function(t,e,r){e.exports=t("es6-promise").Promise},{"es6-promise":1}],19:[function(t,e,r){function n(t,e,r){var n="withCredentials"in new XMLHttpRequest;if(!e)return u.reject("No proxy configured");var i=s(n),h=a(e,t,i);return n?c(h):o(r,h,i).then(function(t){return g(t.content)})}function i(t,e,r){var n="crossOrigin"in new Image,i=s(n),h=a(e,t,i);return n?u.resolve(h):o(r,h,i).then(function(t){return"data:"+t.type+";base64,"+t.content})}function o(t,e,r){return new u(function(n,i){var o=t.createElement("script"),s=function(){delete window.html2canvas.proxy[r],t.body.removeChild(o)};window.html2canvas.proxy[r]=function(t){s(),n(t)},o.src=e,o.onerror=function(t){s(),i(t)},t.body.appendChild(o)})}function s(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++A+"_"+Math.round(1e5*Math.random())}function a(t,e,r){return t+"?url="+encodeURIComponent(e)+(r.length?"&callback=html2canvas.proxy."+r:"")}function h(t){return function(e){var r,n=new DOMParser;try{r=n.parseFromString(e,"text/html")}catch(i){d("DOMParser not supported, falling back to createHTMLDocument"),r=document.implementation.createHTMLDocument("");try{r.open(),r.write(e),r.close()}catch(o){d("createHTMLDocument write not supported, falling back to document.body.innerHTML"),r.body.innerHTML=e}}var s=r.querySelector("base");if(!s||!s.href.host){var a=r.createElement("base");a.href=t,r.head.insertBefore(a,r.head.firstChild)}return r}}function l(t,e,r,i,o,s){return new n(t,e,window.document).then(h(t)).then(function(t){return p(t,r,i,o,s,0,0)})}var u=t("./promise"),c=t("./xhr"),f=t("./utils"),d=t("./log"),p=t("./clone"),g=f.decode64,A=0;r.Proxy=n,r.ProxyURL=i,r.loadUrlDocument=l},{"./clone":4,"./log":15,"./promise":18,"./utils":29,"./xhr":31}],20:[function(t,e,r){function n(t,e){var r=document.createElement("a");r.href=t,t=r.href,this.src=t,this.image=new Image;var n=this;this.promise=new o(function(r,o){n.image.crossOrigin="Anonymous",n.image.onload=r,n.image.onerror=o,new i(t,e,document).then(function(t){n.image.src=t})["catch"](o)})}var i=t("./proxy").ProxyURL,o=t("./promise");e.exports=n},{"./promise":18,"./proxy":19}],21:[function(t,e,r){function n(t,e,r){i.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===r}var i=t("./nodecontainer");n.prototype.cloneTo=function(t){n.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},n.prototype=Object.create(i.prototype),n.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},n.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},n.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",e.exports=n},{"./nodecontainer":16}],22:[function(t,e,r){function n(t,e,r,n,i){this.width=t,this.height=e,this.images=r,this.options=n,this.document=i}var i=t("./log");n.prototype.renderImage=function(t,e,r,n){var i=t.cssInt("paddingLeft"),o=t.cssInt("paddingTop"),s=t.cssInt("paddingRight"),a=t.cssInt("paddingBottom"),h=r.borders,l=e.width-(h[1].width+h[3].width+i+s),u=e.height-(h[0].width+h[2].width+o+a);this.drawImage(n,0,0,n.image.width||l,n.image.height||u,e.left+i+h[3].width,e.top+o+h[0].width,l,u)},n.prototype.renderBackground=function(t,e,r){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,r))},n.prototype.renderBackgroundColor=function(t,e){var r=t.color("backgroundColor");r.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,r)},n.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},n.prototype.renderBorder=function(t){t.color.isTransparent()||null===t.args||this.drawShape(t.args,t.color)},n.prototype.renderBackgroundImage=function(t,e,r){var n=t.parseBackgroundImages();n.reverse().forEach(function(n,o,s){switch(n.method){case"url":var a=this.images.get(n.args[0]);a?this.renderBackgroundRepeating(t,e,a,s.length-(o+1),r):i("Error loading background-image",n.args[0]); -break;case"linear-gradient":case"gradient":var h=this.images.get(n.value);h?this.renderBackgroundGradient(h,e,r):i("Error loading background-image",n.args[0]);break;case"none":break;default:i("Unknown background-image type",n.args[0])}},this)},n.prototype.renderBackgroundRepeating=function(t,e,r,n,i){var o=t.parseBackgroundSize(e,r.image,n),s=t.parseBackgroundPosition(e,r.image,n,o),a=t.parseBackgroundRepeat(n);switch(a){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+i[3],e.top+s.top+i[0],99999,o.height,i);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+i[0],o.width,99999,i);break;case"no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+s.top+i[0],o.width,o.height,i);break;default:this.renderBackgroundRepeat(r,s,o,{top:e.top,left:e.left},i[3],i[0])}},e.exports=n},{"./log":15}],23:[function(t,e,r){function n(t,e){if(this.ratio=window.devicePixelRatio,t=this.applyRatio(t),e=this.applyRatio(e),o.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),!this.options.canvas&&(this.canvas.width=t,this.canvas.height=e,1!==this.ratio)){var r=1/this.ratio;this.canvas.style.transform="scaleX("+r+") scaleY("+r+")",this.canvas.style.transformOrigin="0 0"}this.ctx=this.canvas.getContext("2d"),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},a("Initialized CanvasRenderer with size",t,"x",e)}function i(t){return t.length>0}var o=t("../renderer"),s=t("../lineargradientcontainer"),a=t("../log");n.prototype=Object.create(o.prototype),n.prototype.applyRatio=function(t){return t*this.ratio},n.prototype.applyRatioToBounds=function(t){t.width=t.width*this.ratio,t.top=t.top*this.ratio;try{t.left=t.left*this.ratio,t.height=t.height*this.ratio}catch(e){}return t},n.prototype.applyRatioToPosition=function(t){return t.left=t.left*this.ratio,t.height=t.height*this.ratio,bounds},n.prototype.applyRatioToShape=function(t){for(var e=0;e";try{r.drawImage(t,0,0),e.toDataURL()}catch(n){return!1}return!0},e.exports=n},{}],26:[function(t,e,r){function n(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then(function(){return e.isInline(t)?i.resolve(e.inlineFormatting(t)):o(t)}).then(function(t){return new i(function(r){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,r))})})}var i=t("./promise"),o=t("./xhr"),s=t("./utils").decode64;n.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?i.resolve():i.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},n.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},n.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},n.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},n.prototype.createCanvas=function(t){var e=this;return function(r,n){var i=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=i.lowerCanvasEl,i.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(r,n)).renderAll(),t(i.lowerCanvasEl)}},n.prototype.decode64=function(t){return"function"==typeof window.atob?window.atob(t):s(t)},e.exports=n},{"./promise":18,"./utils":29,"./xhr":31}],27:[function(t,e,r){function n(t,e){this.src=t,this.image=null;var r=this;this.promise=e?new o(function(e,n){r.image=new Image,r.image.onload=e,r.image.onerror=n,r.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),r.image.complete===!0&&e(r.image)}):this.hasFabric().then(function(){return new o(function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,r.createCanvas.call(r,e))})})}var i=t("./svgcontainer"),o=t("./promise");n.prototype=Object.create(i.prototype),e.exports=n},{"./promise":18,"./svgcontainer":26}],28:[function(t,e,r){function n(t,e){o.call(this,t,e)}function i(t,e,r){return t.length>0?e+r.toUpperCase():void 0}var o=t("./nodecontainer");n.prototype=Object.create(o.prototype),n.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},n.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,i);case"uppercase":return e.toUpperCase();default:return e}},e.exports=n},{"./nodecontainer":16}],29:[function(t,e,r){r.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},r.bind=function(t,e){return function(){return t.apply(e,arguments)}},r.decode64=function(t){var e,r,n,i,o,s,a,h,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=t.length,c="";for(e=0;u>e;e+=4)r=l.indexOf(t[e]),n=l.indexOf(t[e+1]),i=l.indexOf(t[e+2]),o=l.indexOf(t[e+3]),s=r<<2|n>>4,a=(15&n)<<4|i>>2,h=(3&i)<<6|o,c+=64===i?String.fromCharCode(s):64===o||-1===o?String.fromCharCode(s,a):String.fromCharCode(s,a,h);return c},r.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),r=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+r,left:e.left,width:r,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},r.offsetBounds=function(t){var e=t.offsetParent?r.offsetBounds(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+e.top,bottom:t.offsetTop+t.offsetHeight+e.top,right:t.offsetLeft+e.left+t.offsetWidth,left:t.offsetLeft+e.left,width:t.offsetWidth,height:t.offsetHeight}},r.parseBackgrounds=function(t){var e,r,n,i,o,s,a,h=" \r\n ",l=[],u=0,c=0,f=function(){e&&('"'===r.substr(0,1)&&(r=r.substr(1,r.length-2)),r&&a.push(r),"-"===e.substr(0,1)&&(i=e.indexOf("-",1)+1)>0&&(n=e.substr(0,i),e=e.substr(i)),l.push({prefix:n,method:e.toLowerCase(),value:o,args:a,image:null})),a=[],e=n=r=o=""};return a=[],e=n=r=o="",t.split("").forEach(function(t){if(!(0===u&&h.indexOf(t)>-1)){switch(t){case'"':s?s===t&&(s=null):s=t;break;case"(":if(s)break;if(0===u)return u=1,void(o+=t);c++;break;case")":if(s)break;if(1===u){if(0===c)return u=0,o+=t,void f();c--}break;case",":if(s)break;if(0===u)return void f();if(1===u&&0===c&&!e.match(/^url$/i))return a.push(r),r="",void(o+=t)}o+=t,0===u?e+=t:r+=t}}),f(),l}},{}],30:[function(t,e,r){function n(t){i.apply(this,arguments),this.type="linear"===t.args[0]?this.TYPES.LINEAR:this.TYPES.RADIAL}var i=t("./gradientcontainer");n.prototype=Object.create(i.prototype),e.exports=n},{"./gradientcontainer":11}],31:[function(t,e,r){function n(t){return new i(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.onload=function(){200===n.status?e(n.responseText):r(new Error(n.statusText))},n.onerror=function(){r(new Error("Network Error"))},n.send()})}var i=t("./promise");e.exports=n},{"./promise":18}]},{},[6])(6)}),function(t){function e(t){var e=t.length,n=r.type(t);return"function"===n||r.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}if(!t.jQuery){var r=function(t,e){return new r.fn.init(t,e)};r.isWindow=function(t){return null!=t&&t==t.window},r.type=function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?i[s.call(t)]||"object":typeof t},r.isArray=Array.isArray||function(t){return"array"===r.type(t)},r.isPlainObject=function(t){var e;if(!t||"object"!==r.type(t)||t.nodeType||r.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}for(e in t);return void 0===e||o.call(t,e)},r.each=function(t,r,n){var i,o=0,s=t.length,a=e(t);if(n){if(a)for(;s>o&&(i=r.apply(t[o],n),i!==!1);o++);else for(o in t)if(i=r.apply(t[o],n),i===!1)break}else if(a)for(;s>o&&(i=r.call(t[o],o,t[o]),i!==!1);o++);else for(o in t)if(i=r.call(t[o],o,t[o]),i===!1)break;return t},r.data=function(t,e,i){if(void 0===i){var o=t[r.expando],s=o&&n[o];if(void 0===e)return s;if(s&&e in s)return s[e]}else if(void 0!==e){var o=t[r.expando]||(t[r.expando]=++r.uuid);return n[o]=n[o]||{},n[o][e]=i,i}},r.removeData=function(t,e){var i=t[r.expando],o=i&&n[i];o&&r.each(e,function(t,e){delete o[e]})},r.extend=function(){var t,e,n,i,o,s,a=arguments[0]||{},h=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[h]||{},h++),"object"!=typeof a&&"function"!==r.type(a)&&(a={}),h===l&&(a=this,h--);l>h;h++)if(null!=(o=arguments[h]))for(i in o)t=a[i],n=o[i],a!==n&&(u&&n&&(r.isPlainObject(n)||(e=r.isArray(n)))?(e?(e=!1,s=t&&r.isArray(t)?t:[]):s=t&&r.isPlainObject(t)?t:{},a[i]=r.extend(u,s,n)):void 0!==n&&(a[i]=n));return a},r.queue=function(t,n,i){function o(t,r){var n=r||[];return null!=t&&(e(Object(t))?!function(t,e){for(var r=+e.length,n=0,i=t.length;r>n;)t[i++]=e[n++];if(r!==r)for(;void 0!==e[n];)t[i++]=e[n++];return t.length=i,t}(n,"string"==typeof t?[t]:t):[].push.call(n,t)),n}if(t){n=(n||"fx")+"queue";var s=r.data(t,n);return i?(!s||r.isArray(i)?s=r.data(t,n,o(i)):s.push(i),s):s||[]}},r.dequeue=function(t,e){r.each(t.nodeType?[t]:t,function(t,n){e=e||"fx";var i=r.queue(n,e),o=i.shift();"inprogress"===o&&(o=i.shift()),o&&("fx"===e&&i.unshift("inprogress"),o.call(n,function(){r.dequeue(n,e)}))})},r.fn=r.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function t(){for(var t=this.offsetParent||document;t&&"html"===!t.nodeType.toLowerCase&&"static"===t.style.position;)t=t.offsetParent;return t||document}var e=this[0],t=t.apply(e),n=this.offset(),i=/^(?:body|html)$/i.test(t.nodeName)?{top:0,left:0}:r(t).offset();return n.top-=parseFloat(e.style.marginTop)||0,n.left-=parseFloat(e.style.marginLeft)||0,t.style&&(i.top+=parseFloat(t.style.borderTopWidth)||0,i.left+=parseFloat(t.style.borderLeftWidth)||0),{top:n.top-i.top,left:n.left-i.left}}};var n={};r.expando="velocity"+(new Date).getTime(),r.uuid=0;for(var i={},o=i.hasOwnProperty,s=i.toString,a="Boolean Number String Function Array Date RegExp Object Error".split(" "),h=0;hi;++i){var o=l(r,t,n);if(0===o)return r;var s=h(r,t,n)-e;r-=s/o}return r}function c(){for(var e=0;y>e;++e)C[e]=h(e*x,t,n)}function f(e,r,i){var o,s,a=0;do s=r+(i-r)/2,o=h(s,t,n)-e,o>0?i=s:r=s;while(Math.abs(o)>v&&++a=A?u(e,a):0==h?a:f(e,r,r+x)}function p(){b=!0,(t!=r||n!=i)&&c()}var g=4,A=.001,v=1e-7,m=10,y=11,x=1/(y-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var E=0;4>E;++E)if("number"!=typeof arguments[E]||isNaN(arguments[E])||!isFinite(arguments[E]))return!1;t=Math.min(t,1),n=Math.min(n,1),t=Math.max(t,0),n=Math.max(n,0);var C=w?new Float32Array(y):new Array(y),b=!1,B=function(e){return b||p(),t===r&&n===i?e:0===e?0:1===e?1:h(d(e),r,i)};B.getControlPoints=function(){return[{x:t,y:r},{x:n,y:i}]};var T="generateBezier("+[t,r,n,i]+")";return B.toString=function(){return T},B}function l(t,e){var r=t;return g.isString(t)?y.Easings[t]||(r=!1):r=g.isArray(t)&&1===t.length?a.apply(null,t):g.isArray(t)&&2===t.length?x.apply(null,t.concat([e])):g.isArray(t)&&4===t.length?h.apply(null,t):!1,r===!1&&(r=y.Easings[y.defaults.easing]?y.defaults.easing:m),r}function u(t){if(t){var e=(new Date).getTime(),r=y.State.calls.length;r>1e4&&(y.State.calls=i(y.State.calls));for(var o=0;r>o;o++)if(y.State.calls[o]){var a=y.State.calls[o],h=a[0],l=a[2],d=a[3],p=!!d,A=null;d||(d=y.State.calls[o][3]=e-16);for(var v=Math.min((e-d)/l.duration,1),m=0,x=h.length;x>m;m++){var E=h[m],b=E.element;if(s(b)){var B=!1;if(l.display!==n&&null!==l.display&&"none"!==l.display){if("flex"===l.display){var T=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];f.each(T,function(t,e){w.setPropertyValue(b,"display",e)})}w.setPropertyValue(b,"display",l.display)}l.visibility!==n&&"hidden"!==l.visibility&&w.setPropertyValue(b,"visibility",l.visibility);for(var D in E)if("element"!==D){var M,P=E[D],R=g.isString(P.easing)?y.Easings[P.easing]:P.easing;if(1===v)M=P.endValue;else{var I=P.endValue-P.startValue;if(M=P.startValue+I*R(v,l,I),!p&&M===P.currentValue)continue}if(P.currentValue=M,"tween"===D)A=M;else{if(w.Hooks.registered[D]){var S=w.Hooks.getRoot(D),O=s(b).rootPropertyValueCache[S];O&&(P.rootPropertyValue=O)}var F=w.setPropertyValue(b,D,P.currentValue+(0===parseFloat(M)?"":P.unitType),P.rootPropertyValue,P.scrollData);w.Hooks.registered[D]&&(w.Normalizations.registered[S]?s(b).rootPropertyValueCache[S]=w.Normalizations.registered[S]("extract",null,F[1]):s(b).rootPropertyValueCache[S]=F[1]),"transform"===F[0]&&(B=!0)}}l.mobileHA&&s(b).transformCache.translate3d===n&&(s(b).transformCache.translate3d="(0px, 0px, 0px)",B=!0),B&&w.flushTransformCache(b)}}l.display!==n&&"none"!==l.display&&(y.State.calls[o][2].display=!1),l.visibility!==n&&"hidden"!==l.visibility&&(y.State.calls[o][2].visibility=!1),l.progress&&l.progress.call(a[1],a[1],v,Math.max(0,d+l.duration-e),d,A),1===v&&c(o)}}y.State.isTicking&&C(u)}function c(t,e){if(!y.State.calls[t])return!1;for(var r=y.State.calls[t][0],i=y.State.calls[t][1],o=y.State.calls[t][2],a=y.State.calls[t][4],h=!1,l=0,u=r.length;u>l;l++){var c=r[l].element;if(e||o.loop||("none"===o.display&&w.setPropertyValue(c,"display",o.display),"hidden"===o.visibility&&w.setPropertyValue(c,"visibility",o.visibility)),o.loop!==!0&&(f.queue(c)[1]===n||!/\.velocityQueueEntryFlag/i.test(f.queue(c)[1]))&&s(c)){s(c).isAnimating=!1,s(c).rootPropertyValueCache={};var d=!1;f.each(w.Lists.transforms3D,function(t,e){var r=/^scale/.test(e)?1:0,i=s(c).transformCache[e];s(c).transformCache[e]!==n&&new RegExp("^\\("+r+"[^.]").test(i)&&(d=!0,delete s(c).transformCache[e])}),o.mobileHA&&(d=!0,delete s(c).transformCache.translate3d),d&&w.flushTransformCache(c),w.Values.removeClass(c,"velocity-animating")}if(!e&&o.complete&&!o.loop&&l===u-1)try{o.complete.call(i,i)}catch(p){setTimeout(function(){throw p},1)}a&&o.loop!==!0&&a(i),s(c)&&o.loop===!0&&!e&&(f.each(s(c).tweensContainer,function(t,e){/^rotate/.test(t)&&360===parseFloat(e.endValue)&&(e.endValue=0,e.startValue=360),/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),y(c,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&f.dequeue(c,o.queue)}y.State.calls[t]=!1;for(var g=0,A=y.State.calls.length;A>g;g++)if(y.State.calls[g]!==!1){h=!0;break}h===!1&&(y.State.isTicking=!1,delete y.State.calls,y.State.calls=[])}var f,d=function(){if(r.documentMode)return r.documentMode;for(var t=7;t>4;t--){var e=r.createElement("div");if(e.innerHTML="",e.getElementsByTagName("span").length)return e=null,t}return n}(),p=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var r,n=(new Date).getTime();return r=Math.max(0,16-(n-t)),t=n+r,setTimeout(function(){e(n+r)},r)}}(),g={isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isNodeList:function(t){return"object"==typeof t&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&t.length!==n&&(0===t.length||"object"==typeof t[0]&&t[0].nodeType>0)},isWrapped:function(t){return t&&(t.jquery||e.Zepto&&e.Zepto.zepto.isZ(t))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)return!1;return!0}},A=!1;if(t.fn&&t.fn.jquery?(f=t,A=!0):f=e.Velocity.Utilities,8>=d&&!A)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=d)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,m="swing",y={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:r.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:f,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:v,easing:m,begin:n,complete:n,progress:n,display:n,visibility:n,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(t){f.data(t,"velocity",{isSVG:g.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};e.pageYOffset!==n?(y.State.scrollAnchor=e,y.State.scrollPropertyLeft="pageXOffset",y.State.scrollPropertyTop="pageYOffset"):(y.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body,y.State.scrollPropertyLeft="scrollLeft",y.State.scrollPropertyTop="scrollTop");var x=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},o=e(r,.5*n,i),s=e(r,.5*n,o),a=e(r,n,s),h=1/6*(i.dx+2*(o.dx+s.dx)+a.dx),l=1/6*(i.dv+2*(o.dv+s.dv)+a.dv);return r.x=r.x+h*n,r.v=r.v+l*n,r}return function n(t,e,i){var o,s,a,h={x:-1,v:0,tension:null,friction:null},l=[0],u=0,c=1e-4,f=.016;for(t=parseFloat(t)||500,e=parseFloat(e)||20,i=i||null,h.tension=t,h.friction=e,o=null!==i,o?(u=n(t,e),s=u/i*f):s=f;;)if(a=r(a||h,s),l.push(1+a.x),u+=16,!(Math.abs(a.x)>c&&Math.abs(a.v)>c))break;return o?function(t){return l[t*(l.length-1)|0]}:u}}();y.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},f.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){y.Easings[e[0]]=h.apply(null,e[1])});var w=y.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t=d)switch(t){case"name":return"filter";case"extract":var n=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=n?n[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(t){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=d||y.State.isGingerbread||(w.Lists.transformsBase=w.Lists.transformsBase.concat(w.Lists.transforms3D));for(var t=0;ti&&(i=1),o=!/(\d)$/i.test(i);break;case"skew":o=!/(deg|\d)$/i.test(i);break;case"rotate":o=!/(deg|\d)$/i.test(i)}return o||(s(r).transformCache[e]="("+i+")"),s(r).transformCache[e]}}}();for(var t=0;t=d||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return 8>=d?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1"),(8>=d?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(d||y.State.isAndroid&&!y.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(y.State.prefixMatches[t])return[y.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],r=0,n=e.length;n>r;r++){var i;if(i=0===r?t:e[r]+t.replace(/^\w/,function(t){return t.toUpperCase()}),g.isString(y.State.prefixElement.style[i]))return y.State.prefixMatches[t]=i,[i,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e,r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return t=t.replace(r,function(t,e,r,n){return e+e+r+r+n+n}),e=n.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[0,0,0]},isCSSNullValue:function(t){return 0==t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){t.classList?t.classList.add(e):t.className+=(t.className.length?" ":"")+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(t,r,i,o){function a(t,r){function i(){l&&w.setPropertyValue(t,"display","none")}var h=0;if(8>=d)h=f.css(t,r);else{var l=!1;if(/^(width|height)$/.test(r)&&0===w.getPropertyValue(t,"display")&&(l=!0,w.setPropertyValue(t,"display",w.Values.getDisplayType(t))),!o){if("height"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var u=t.offsetHeight-(parseFloat(w.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(w.getPropertyValue(t,"paddingBottom"))||0); -return i(),u}if("width"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var c=t.offsetWidth-(parseFloat(w.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(w.getPropertyValue(t,"paddingRight"))||0);return i(),c}}var p;p=s(t)===n?e.getComputedStyle(t,null):s(t).computedStyle?s(t).computedStyle:s(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===r&&(r="borderTopColor"),h=9===d&&"filter"===r?p.getPropertyValue(r):p[r],(""===h||null===h)&&(h=t.style[r]),i()}if("auto"===h&&/^(top|right|bottom|left)$/i.test(r)){var g=a(t,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(r))&&(h=f(t).position()[r]+"px")}return h}var h;if(w.Hooks.registered[r]){var l=r,u=w.Hooks.getRoot(l);i===n&&(i=w.getPropertyValue(t,w.Names.prefixCheck(u)[0])),w.Normalizations.registered[u]&&(i=w.Normalizations.registered[u]("extract",t,i)),h=w.Hooks.extractValue(l,i)}else if(w.Normalizations.registered[r]){var c,p;c=w.Normalizations.registered[r]("name",t),"transform"!==c&&(p=a(t,w.Names.prefixCheck(c)[0]),w.Values.isCSSNullValue(p)&&w.Hooks.templates[r]&&(p=w.Hooks.templates[r][1])),h=w.Normalizations.registered[r]("extract",t,p)}if(!/^[\d-]/.test(h))if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{h=t.getBBox()[r]}catch(g){h=0}else h=t.getAttribute(r);else h=a(t,w.Names.prefixCheck(r)[0]);return w.Values.isCSSNullValue(h)&&(h=0),y.debug>=2&&console.log("Get "+r+": "+h),h},setPropertyValue:function(t,r,n,i,o){var a=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=n:"Left"===o.direction?e.scrollTo(n,o.alternateValue):e.scrollTo(o.alternateValue,n);else if(w.Normalizations.registered[r]&&"transform"===w.Normalizations.registered[r]("name",t))w.Normalizations.registered[r]("inject",t,n),a="transform",n=s(t).transformCache[r];else{if(w.Hooks.registered[r]){var h=r,l=w.Hooks.getRoot(r);i=i||w.getPropertyValue(t,l),n=w.Hooks.injectValue(h,n,i),r=l}if(w.Normalizations.registered[r]&&(n=w.Normalizations.registered[r]("inject",t,n),r=w.Normalizations.registered[r]("name",t)),a=w.Names.prefixCheck(r)[0],8>=d)try{t.style[a]=n}catch(u){y.debug&&console.log("Browser does not support ["+n+"] for ["+a+"]")}else if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))t.setAttribute(r,n);else{var c="webgl"===t.renderer?t.styleGL:t.style;c[a]=n}y.debug>=2&&console.log("Set "+r+" ("+a+"): "+n)}return[a,n]},flushTransformCache:function(t){function e(e){return parseFloat(w.getPropertyValue(t,e))}var r="";if((d||y.State.isAndroid&&!y.State.isChrome)&&s(t).isSVG){var n={translate:[e("translateX"),e("translateY")],skewX:[e("skewX")],skewY:[e("skewY")],scale:1!==e("scale")?[e("scale"),e("scale")]:[e("scaleX"),e("scaleY")],rotate:[e("rotateZ"),0,0]};f.each(s(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),n[t]&&(r+=t+"("+n[t].join(" ")+") ",delete n[t])})}else{var i,o;f.each(s(t).transformCache,function(e){return i=s(t).transformCache[e],"transformPerspective"===e?(o=i,!0):(9===d&&"rotateZ"===e&&(e="rotate"),void(r+=e+i+" "))}),o&&(r="perspective"+o+" "+r)}w.setPropertyValue(t,"transform",r)}};w.Hooks.register(),w.Normalizations.register(),y.hook=function(t,e,r){var i=n;return t=o(t),f.each(t,function(t,o){if(s(o)===n&&y.init(o),r===n)i===n&&(i=y.CSS.getPropertyValue(o,e));else{var a=y.CSS.setPropertyValue(o,e,r);"transform"===a[0]&&y.CSS.flushTransformCache(o),i=a}}),i};var E=function(){function t(){return a?D.promise||null:h}function i(){function t(t){function c(t,e){var r=n,i=n,s=n;return g.isArray(t)?(r=t[0],!g.isArray(t[1])&&/^[\d-]/.test(t[1])||g.isFunction(t[1])||w.RegEx.isHex.test(t[1])?s=t[1]:(g.isString(t[1])&&!w.RegEx.isHex.test(t[1])||g.isArray(t[1]))&&(i=e?t[1]:l(t[1],a.duration),t[2]!==n&&(s=t[2]))):r=t,e||(i=i||a.easing),g.isFunction(r)&&(r=r.call(o,b,C)),g.isFunction(s)&&(s=s.call(o,b,C)),[r||0,i,s]}function d(t,e){var r,n;return n=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return r=t,""}),r||(r=w.Values.getUnitType(t)),[n,r]}function v(){var t={myParent:o.parentNode||r.body,position:w.getPropertyValue(o,"position"),fontSize:w.getPropertyValue(o,"fontSize")},n=t.position===F.lastPosition&&t.myParent===F.lastParent,i=t.fontSize===F.lastFontSize;F.lastParent=t.myParent,F.lastPosition=t.position,F.lastFontSize=t.fontSize;var a=100,h={};if(i&&n)h.emToPx=F.lastEmToPx,h.percentToPxWidth=F.lastPercentToPxWidth,h.percentToPxHeight=F.lastPercentToPxHeight;else{var l=s(o).isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");y.init(l),t.myParent.appendChild(l),f.each(["overflow","overflowX","overflowY"],function(t,e){y.CSS.setPropertyValue(l,e,"hidden")}),y.CSS.setPropertyValue(l,"position",t.position),y.CSS.setPropertyValue(l,"fontSize",t.fontSize),y.CSS.setPropertyValue(l,"boxSizing","content-box"),f.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){y.CSS.setPropertyValue(l,e,a+"%")}),y.CSS.setPropertyValue(l,"paddingLeft",a+"em"),h.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(w.getPropertyValue(l,"width",null,!0))||1)/a,h.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(w.getPropertyValue(l,"height",null,!0))||1)/a,h.emToPx=F.lastEmToPx=(parseFloat(w.getPropertyValue(l,"paddingLeft"))||1)/a,t.myParent.removeChild(l)}return null===F.remToPx&&(F.remToPx=parseFloat(w.getPropertyValue(r.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),h.remToPx=F.remToPx,h.vwToPx=F.vwToPx,h.vhToPx=F.vhToPx,y.debug>=1&&console.log("Unit ratios: "+JSON.stringify(h),o),h}if(a.begin&&0===b)try{a.begin.call(p,p)}catch(x){setTimeout(function(){throw x},1)}if("scroll"===M){var E,B,T,P=/^x$/i.test(a.axis)?"Left":"Top",R=parseFloat(a.offset)||0;a.container?g.isWrapped(a.container)||g.isNode(a.container)?(a.container=a.container[0]||a.container,E=a.container["scroll"+P],T=E+f(o).position()[P.toLowerCase()]+R):a.container=null:(E=y.State.scrollAnchor[y.State["scrollProperty"+P]],B=y.State.scrollAnchor[y.State["scrollProperty"+("Left"===P?"Top":"Left")]],T=f(o).offset()[P.toLowerCase()]+R),h={scroll:{rootPropertyValue:!1,startValue:E,currentValue:E,endValue:T,unitType:"",easing:a.easing,scrollData:{container:a.container,direction:P,alternateValue:B}},element:o},y.debug&&console.log("tweensContainer (scroll): ",h.scroll,o)}else if("reverse"===M){if(!s(o).tweensContainer)return void f.dequeue(o,a.queue);"none"===s(o).opts.display&&(s(o).opts.display="auto"),"hidden"===s(o).opts.visibility&&(s(o).opts.visibility="visible"),s(o).opts.loop=!1,s(o).opts.begin=null,s(o).opts.complete=null,m.easing||delete a.easing,m.duration||delete a.duration,a=f.extend({},s(o).opts,a);var I=f.extend(!0,{},s(o).tweensContainer);for(var S in I)if("element"!==S){var O=I[S].startValue;I[S].startValue=I[S].currentValue=I[S].endValue,I[S].endValue=O,g.isEmptyObject(m)||(I[S].easing=a.easing),y.debug&&console.log("reverse tweensContainer ("+S+"): "+JSON.stringify(I[S]),o)}h=I}else if("start"===M){var I;s(o).tweensContainer&&s(o).isAnimating===!0&&(I=s(o).tweensContainer),f.each(A,function(t,e){if(RegExp("^"+w.Lists.colors.join("$|^")+"$").test(t)){var r=c(e,!0),i=r[0],o=r[1],s=r[2];if(w.RegEx.isHex.test(i)){for(var a=["Red","Green","Blue"],h=w.Values.hexToRgb(i),l=s?w.Values.hexToRgb(s):n,u=0;uN;N++){var H={delay:R.delay,progress:R.progress};N===L-1&&(H.display=R.display,H.visibility=R.visibility,H.complete=R.complete),E(p,"reverse",H)}return t()}};y=f.extend(E,y),y.animate=E;var C=e.requestAnimationFrame||p;return y.State.isMobile||r.hidden===n||r.addEventListener("visibilitychange",function(){r.hidden?(C=function(t){return setTimeout(function(){t(!0)},16)},u()):C=e.requestAnimationFrame||p}),t.Velocity=y,t!==e&&(t.fn.velocity=E,t.fn.velocity.defaults=y.defaults),f.each(["Down","Up"],function(t,e){y.Redirects["slide"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l=h.begin,u=h.complete,c={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};h.display===n&&(h.display="Down"===e?"inline"===y.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),h.begin=function(){var r="webgl"===t.renderer?t.styleGL:t.style;l&&l.call(s,s);for(var n in c){d[n]=r[n];var i=y.CSS.getPropertyValue(t,n);c[n]="Down"===e?[i,0]:[0,i]}d.overflow=r.overflow,r.overflow="hidden"},h.complete=function(){for(var t in d)style[t]=d[t];u&&u.call(s,s),a&&a.resolver(s)},y(t,c,h)}}),f.each(["In","Out"],function(t,e){y.Redirects["fade"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l={opacity:"In"===e?1:0},u=h.complete;i!==o-1?h.complete=h.begin=null:h.complete=function(){u&&u.call(s,s),a&&a.resolver(s)},h.display===n&&(h.display="In"===e?"auto":"none"),y(this,l,h)}}),y}(window.jQuery||window.Zepto||window,window,document)}),function(t){t.HTMLGL=t.HTMLGL||{},t.HTMLGL.util={getterSetter:function(t,e,r,n){Object.defineProperty?Object.defineProperty(t,e,{get:r,set:n}):document.__defineGetter__&&(t.__defineGetter__(e,r),t.__defineSetter__(e,n)),t["get"+e]=r,t["set"+e]=n},emitEvent:function(t,e){var r=new MouseEvent(e.type,e);r.dispatcher="html-gl",e.stopPropagation(),t.dispatchEvent(r)},debounce:function(t,e,r){var n;return function(){var i=this,o=arguments,s=function(){n=null,r||t.apply(i,o)},a=r&&!n;clearTimeout(n),n=setTimeout(s,e),a&&t.apply(i,o)}}}}(window),function(t){var e=function(t){},r=e.prototype;r.getElementByCoordinates=function(e,r){var n,i,o=this;return t.HTMLGL.elements.forEach(function(t){n=document.elementFromPoint(e-parseInt(t.transformObject.translateX||0),r-parseInt(t.transformObject.translateY||0)),o.isChildOf(n,t)&&(i=n)}),i},r.isChildOf=function(t,e){for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1},t.HTMLGL.GLElementResolver=e}(window),function(t){HTMLGL=t.HTMLGL=t.HTMLGL||{},HTMLGL.JQ_PLUGIN_NAME="htmlgl",HTMLGL.CUSTOM_ELEMENT_TAG_NAME="html-gl",HTMLGL.READY_EVENT="htmlglReady",HTMLGL.context=void 0,HTMLGL.stage=void 0,HTMLGL.renderer=void 0,HTMLGL.elements=[],HTMLGL.pixelRatio=null,HTMLGL.oldPixelRatio=null,HTMLGL.enabled=!0,HTMLGL.scrollX=0,HTMLGL.scrollY=0;var e=function(){t.HTMLGL.context=this,this.createStage(),this.updateScrollPosition(),this.initListeners(),this.elementResolver=new t.HTMLGL.GLElementResolver(this),document.body?this.initViewer():document.addEventListener("DOMContentLoaded",this.initViewer.bind(this))},r=e.prototype;r.initViewer=function(){this.createViewer(),this.resizeViewer(),this.appendViewer()},r.createViewer=function(){t.HTMLGL.renderer=this.renderer=PIXI.autoDetectRenderer(0,0,{transparent:!0}),this.renderer.view.style.position="fixed",this.renderer.view.style.top="0px",this.renderer.view.style.left="0px",this.renderer.view.style["pointer-events"]="none",this.renderer.view.style.pointerEvents="none"},r.appendViewer=function(){document.body.appendChild(this.renderer.view),requestAnimationFrame(this.redrawStage.bind(this))},r.resizeViewer=function(){var e=this,r=t.innerWidth,n=t.innerHeight;HTMLGL.pixelRatio=window.devicePixelRatio||1,r*=HTMLGL.pixelRatio,n*=HTMLGL.pixelRatio,HTMLGL.pixelRatio!==HTMLGL.oldPixelRatio?(this.disable(),this.updateTextures().then(function(){e.updateScrollPosition(),e.updateElementsPositions();var i=1/HTMLGL.pixelRatio;e.renderer.view.style.transformOrigin="0 0",e.renderer.view.style.webkitTransformOrigin="0 0",e.renderer.view.style.transform="scaleX("+i+") scaleY("+i+")",e.renderer.view.style.webkitTransform="scaleX("+i+") scaleY("+i+")",e.renderer.resize(r,n),this.enable(),t.HTMLGL.renderer.render(t.HTMLGL.stage)})):(this.renderer.view.parentNode&&this.updateTextures(),this.updateElementsPositions(),this.markStageAsChanged()),HTMLGL.oldPixelRatio=HTMLGL.pixelRatio},r.initListeners=function(){t.addEventListener("scroll",this.updateScrollPosition.bind(this)),t.addEventListener("resize",t.HTMLGL.util.debounce(this.resizeViewer,500).bind(this)),t.addEventListener("resize",this.updateElementsPositions.bind(this)),document.addEventListener("click",this.onMouseEvent.bind(this),!0),document.addEventListener("mousemove",this.onMouseEvent.bind(this),!0),document.addEventListener("mouseup",this.onMouseEvent.bind(this),!0),document.addEventListener("mousedown",this.onMouseEvent.bind(this),!0),document.addEventListener("touchstart",this.onMouseEvent.bind(this)),document.addEventListener("touchend",this.onMouseEvent.bind(this))},r.updateScrollPosition=function(){var e={};if(void 0!=window.pageYOffset)e={left:pageXOffset,top:pageYOffset};else{var r,n,i=document,o=i.documentElement,s=i.body;r=o.scrollLeft||s.scrollLeft||0,n=o.scrollTop||s.scrollTop||0,e={left:r,top:n}}this.document.x=-e.left*HTMLGL.pixelRatio,this.document.y=-e.top*HTMLGL.pixelRatio,t.HTMLGL.scrollX=e.left,t.HTMLGL.scrollY=e.top,this.markStageAsChanged()},r.createStage=function(){t.HTMLGL.stage=this.stage=new PIXI.Stage(16777215),t.HTMLGL.document=this.document=new PIXI.DisplayObjectContainer,this.stage.addChild(t.HTMLGL.document)},r.redrawStage=function(){t.HTMLGL.stage.changed&&t.HTMLGL.renderer&&t.HTMLGL.enabled&&(t.HTMLGL.renderer.render(t.HTMLGL.stage),t.HTMLGL.stage.changed=!1)},r.updateTextures=function(){var e=[];return t.HTMLGL.elements.forEach(function(t){e.push(t.updateTexture())}),Promise.all(e)},r.initElements=function(){t.HTMLGL.elements.forEach(function(t){t.init()})},r.updateElementsPositions=function(){t.HTMLGL.elements.forEach(function(t){t.updateBoundingRect(),t.updatePivot(),t.updateSpriteTransform()})},r.onMouseEvent=function(e){var r=e.x||e.pageX,n=e.y||e.pageY,i="html-gl"!==e.dispatcher?this.elementResolver.getElementByCoordinates(r,n):null;i?t.HTMLGL.util.emitEvent(i,e):null},r.markStageAsChanged=function(){t.HTMLGL.stage&&!t.HTMLGL.stage.changed&&(requestAnimationFrame(this.redrawStage),t.HTMLGL.stage.changed=!0)},r.disable=function(){t.HTMLGL.enabled=!0},r.enable=function(){t.HTMLGL.enabled=!1},t.HTMLGL.pixelRatio=window.devicePixelRatio||1,t.HTMLGL.GLContext=e,new e}(window),function(t){var e=function(t,e){this.element=t,this.images=this.element.querySelectorAll("img"),this.callback=e,this.imagesLoaded=this.getImagesLoaded(),this.images.length===this.imagesLoaded?this.onImageLoaded():this.addListeners()},r=e.prototype;r.getImagesLoaded=function(){for(var t=0,e=0;ef;f++)h=t[f],l=4*f,u=f/(c-1),e[l]=u*a.x+s.x,e[l+1]=0+s.y,e[l+2]=u*a.x+s.x,e[l+3]=1*a.y+s.y,l=2*f,n[l]=1,n[l+1]=1,l=2*f,r[l]=l,r[l+1]=l+1;this.dirty=!0}},n.prototype._onTextureUpdate=function(){i.prototype._onTextureUpdate.call(this),this._ready&&this.refresh()},n.prototype.updateTransform=function(){var t=this.points;if(!(t.length<1)){for(var e,r,n,i,o,s,a=t[0],h=0,l=0,u=this.vertices,c=t.length,f=0;c>f;f++)r=t[f],n=4*f,e=f1&&(i=1),o=Math.sqrt(h*h+l*l),s=this._texture.height/2,h/=o,l/=o,h*=s,l*=s,u[n]=r.x+h,u[n+1]=r.y+l,u[n+2]=r.x-h,u[n+3]=r.y-l,a=r;this.containerUpdateTransform()}}},{"../core":29,"./Mesh":124}],126:[function(t,e,r){e.exports={Mesh:t("./Mesh"),Rope:t("./Rope"),MeshRenderer:t("./webgl/MeshRenderer"),MeshShader:t("./webgl/MeshShader")}},{"./Mesh":124,"./Rope":125,"./webgl/MeshRenderer":127,"./webgl/MeshShader":128}],127:[function(t,e,r){function n(t){i.ObjectRenderer.call(this,t),this.indices=new Uint16Array(15e3);for(var e=0,r=0;15e3>e;e+=6,r+=4)this.indices[e+0]=r+0,this.indices[e+1]=r+1,this.indices[e+2]=r+2,this.indices[e+3]=r+0,this.indices[e+4]=r+2,this.indices[e+5]=r+3}var i=t("../../core"),o=t("../Mesh");n.prototype=Object.create(i.ObjectRenderer.prototype),n.prototype.constructor=n,e.exports=n,i.WebGLRenderer.registerPlugin("mesh",n),n.prototype.onContextChange=function(){},n.prototype.render=function(t){t._vertexBuffer||this._initWebGL(t);var e=this.renderer,r=e.gl,n=t._texture.baseTexture,i=e.shaderManager.plugins.meshShader,s=t.drawMode===o.DRAW_MODES.TRIANGLE_MESH?r.TRIANGLE_STRIP:r.TRIANGLES;e.blendModeManager.setBlendMode(t.blendMode),r.uniformMatrix3fv(i.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),r.uniformMatrix3fv(i.uniforms.projectionMatrix._location,!1,e.currentRenderTarget.projectionMatrix.toArray(!0)),r.uniform1f(i.uniforms.alpha._location,t.worldAlpha),t.dirty?(t.dirty=!1,r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferData(r.ARRAY_BUFFER,t.vertices,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.bufferData(r.ARRAY_BUFFER,t.uvs,r.STATIC_DRAW),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.indices,r.STATIC_DRAW)):(r.bindBuffer(r.ARRAY_BUFFER,t._vertexBuffer),r.bufferSubData(r.ARRAY_BUFFER,0,t.vertices),r.vertexAttribPointer(i.attributes.aVertexPosition,2,r.FLOAT,!1,0,0),r.bindBuffer(r.ARRAY_BUFFER,t._uvBuffer),r.vertexAttribPointer(i.attributes.aTextureCoord,2,r.FLOAT,!1,0,0),r.activeTexture(r.TEXTURE0),n._glTextures[r.id]?r.bindTexture(r.TEXTURE_2D,n._glTextures[r.id]):this.renderer.updateTexture(n),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t._indexBuffer),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,t.indices)),r.drawElements(s,t.indices.length,r.UNSIGNED_SHORT,0)},n.prototype._initWebGL=function(t){var e=this.renderer.gl;t._vertexBuffer=e.createBuffer(),t._indexBuffer=e.createBuffer(),t._uvBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,t.vertices,e.DYNAMIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,t._uvBuffer),e.bufferData(e.ARRAY_BUFFER,t.uvs,e.STATIC_DRAW),t.colors&&(t._colorBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._colorBuffer),e.bufferData(e.ARRAY_BUFFER,t.colors,e.STATIC_DRAW)),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,t.indices,e.STATIC_DRAW)},n.prototype.flush=function(){},n.prototype.start=function(){var t=this.renderer.shaderManager.plugins.meshShader;this.renderer.shaderManager.setShader(t)},n.prototype.destroy=function(){}},{"../../core":29,"../Mesh":124}],128:[function(t,e,r){function n(t){i.Shader.call(this,t,["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","uniform float alpha;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * alpha ;","}"].join("\n"),{alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aTextureCoord:0})}var i=t("../../core");n.prototype=Object.create(i.Shader.prototype),n.prototype.constructor=n,e.exports=n,i.ShaderManager.registerPlugin("meshShader",n)},{"../../core":29}],129:[function(t,e,r){Object.assign||(Object.assign=t("object-assign"))},{"object-assign":12}],130:[function(t,e,r){t("./Object.assign"),t("./requestAnimationFrame")},{"./Object.assign":129,"./requestAnimationFrame":131}],131:[function(t,e,r){(function(t){if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}for(var r=Date.now(),n=["ms","moz","webkit","o"],i=0;in&&(n=0),r=e,setTimeout(function(){r=Date.now(),t(performance.now())},n)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.html2canvas=t()}}(function(){var t;return function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var h="function"==typeof require&&require;if(!a&&h)return h(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[s]={exports:{}};t[s][0].call(u.exports,function(e){var r=t[s][1][e];return i(r?r:e)},u,u.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;st;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}V=0}function A(){try{var t=e,r=t("vertx");return J=r.runOnLoop||r.runOnContext,c()}catch(n){return p()}}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function x(t){try{return t.then}catch(e){return st.error=e,st}}function w(t,e,r,n){try{t.call(e,r,n)}catch(i){return i}}function E(t,e,r){Z(function(t){var n=!1,i=w(r,e,function(r){n||(n=!0,e!==r?B(t,r):D(t,r))},function(e){n||(n=!0,M(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&i&&(n=!0,M(t,i))},t)}function C(t,e){e._state===it?D(t,e._result):e._state===ot?M(t,e._result):P(e,void 0,function(e){B(t,e)},function(e){M(t,e)})}function b(t,e){if(e.constructor===t.constructor)C(t,e);else{var r=x(e);r===st?M(t,st.error):void 0===r?D(t,e):s(r)?E(t,e,r):D(t,e)}}function B(t,e){t===e?M(t,m()):o(e)?b(t,e):D(t,e)}function T(t){t._onerror&&t._onerror(t._result),R(t)}function D(t,e){t._state===nt&&(t._result=e,t._state=it,0!==t._subscribers.length&&Z(R,t))}function M(t,e){t._state===nt&&(t._state=ot,t._result=e,Z(T,t))}function P(t,e,r,n){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+it]=r,i[o+ot]=n,0===o&&t._state&&Z(R,t)}function R(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n,i,o=t._result,s=0;ss;s++)P(n.resolve(t[s]),void 0,e,r);return i}function H(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var r=new e(v);return B(r,t),r}function k(t){var e=this,r=new e(v);return M(r,t),r}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Y(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function j(t){this._id=dt++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==t&&(s(t)||G(),this instanceof j||Y(),F(this,t))}function z(){var t;if("undefined"!=typeof i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(t.Promise=pt)}var U;U=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var J,X,W,K=U,V=0,Z=({}.toString,function(t,e){rt[V]=t,rt[V+1]=e,V+=2,2===V&&(X?X(g):W())}),q="undefined"!=typeof window?window:void 0,_=q||{},$=_.MutationObserver||_.WebKitMutationObserver,tt="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);W=tt?u():$?f():et?d():void 0===q&&"function"==typeof e?A():p();var nt=void 0,it=1,ot=2,st=new I,at=new I;Q.prototype._validateInput=function(t){return K(t)},Q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},Q.prototype._init=function(){this._result=new Array(this.length)};var ht=Q;Q.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,n=t._input,i=0;r._state===nt&&e>i;i++)t._eachEntry(n[i],i)},Q.prototype._eachEntry=function(t,e){var r=this,n=r._instanceConstructor;a(t)?t.constructor===n&&t._state!==nt?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(n.resolve(t),e):(r._remaining--,r._result[e]=t)},Q.prototype._settledAt=function(t,e,r){var n=this,i=n.promise;i._state===nt&&(n._remaining--,t===ot?M(i,r):n._result[e]=r),0===n._remaining&&D(i,n._result)},Q.prototype._willSettleAt=function(t,e){var r=this;P(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(ot,e,t)})};var lt=L,ut=N,ct=H,ft=k,dt=0,pt=j;j.all=lt,j.race=ut,j.resolve=ct,j.reject=ft,j._setScheduler=h,j._setAsap=l,j._asap=Z,j.prototype={constructor:j,then:function(t,e){var r=this,n=r._state;if(n===it&&!t||n===ot&&!e)return this;var i=new this.constructor(v),o=r._result;if(n){var s=arguments[n-1];Z(function(){O(n,i,s,o)})}else P(r,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var gt=z,At={Promise:pt,polyfill:gt};"function"==typeof t&&t.amd?t(function(){return At}):"undefined"!=typeof r&&r.exports?r.exports=At:"undefined"!=typeof this&&(this.ES6Promise=At),gt()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:2}],2:[function(t,e,r){function n(){u=!1,a.length?l=a.concat(l):c=-1,l.length&&i()}function i(){if(!u){var t=setTimeout(n);u=!0;for(var e=l.length;e;){for(a=l,l=[];++c1)for(var r=1;r1&&(n=r[0]+"@",t=r[1]),t=t.replace(O,".");var i=t.split("."),o=s(i,e).join(".");return n+o}function h(t){for(var e,r,n=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function l(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function u(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:C}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function f(t,e,r){var n=0;for(t=r?L(t/D):t>>1,t+=L(t/e);t>Q*B>>1;n+=C)t=L(t/Q);return L(n+(Q+1)*t/(t+T))}function d(t){var e,r,n,i,s,a,h,c,d,p,g=[],A=t.length,v=0,m=P,y=M;for(r=t.lastIndexOf(R),0>r&&(r=0),n=0;r>n;++n)t.charCodeAt(n)>=128&&o("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;A>i;){for(s=v,a=1,h=C;i>=A&&o("invalid-input"),c=u(t.charCodeAt(i++)),(c>=C||c>L((E-v)/a))&&o("overflow"),v+=c*a,d=y>=h?b:h>=y+B?B:h-y,!(d>c);h+=C)p=C-d,a>L(E/p)&&o("overflow"),a*=p;e=g.length+1,y=f(v-s,e,0==s),L(v/e)>E-m&&o("overflow"),m+=L(v/e),v%=e,g.splice(v++,0,m)}return l(g)}function p(t){var e,r,n,i,s,a,l,u,d,p,g,A,v,m,y,x=[];for(t=h(t),A=t.length,e=P,r=0,s=M,a=0;A>a;++a)g=t[a],128>g&&x.push(N(g));for(n=i=x.length,i&&x.push(R);A>n;){for(l=E,a=0;A>a;++a)g=t[a],g>=e&&l>g&&(l=g);for(v=n+1,l-e>L((E-r)/v)&&o("overflow"),r+=(l-e)*v,e=l,a=0;A>a;++a)if(g=t[a],e>g&&++r>E&&o("overflow"),g==e){for(u=r,d=C;p=s>=d?b:d>=s+B?B:d-s,!(p>u);d+=C)y=u-p,m=C-p,x.push(N(c(p+y%m,0))),u=L(y/m);x.push(N(c(u,0))),s=f(r,v,n==i),r=0,++n}++r,++e}return x.join("")}function g(t){return a(t,function(t){return I.test(t)?d(t.slice(4).toLowerCase()):t})}function A(t){return a(t,function(t){return S.test(t)?"xn--"+p(t):t})}var v="object"==typeof n&&n&&!n.nodeType&&n,m="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof e&&e;(y.global===y||y.window===y||y.self===y)&&(i=y);var x,w,E=2147483647,C=36,b=1,B=26,T=38,D=700,M=72,P=128,R="-",I=/^xn--/,S=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Q=C-b,L=Math.floor,N=String.fromCharCode;if(x={version:"1.3.2",ucs2:{decode:h,encode:l},decode:d,encode:p,toASCII:A,toUnicode:g},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(v&&m)if(r.exports==v)m.exports=x;else for(w in x)x.hasOwnProperty(w)&&(v[w]=x[w]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,e,r){function n(t,e,r){!t.defaultView||e===t.defaultView.pageXOffset&&r===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,r)}function i(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(r){a("Unable to copy canvas content from",t,r)}}function o(t,e){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),n=t.firstChild;n;)(e===!0||1!==n.nodeType||"SCRIPT"!==n.nodeName)&&(console.log(r),r.appendChild(o(n,e))),n=n.nextSibling;return 1===t.nodeType&&"BODY"!==t.tagName&&(r._scrollTop=t.scrollTop,r._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?i(t,r):("TEXTAREA"===t.nodeName||"SELECT"===t.nodeName)&&(r.value=t.value)),r}function s(t){if(1===t.nodeType){t.scrollTop=t._scrollTop,t.scrollLeft=t._scrollLeft;for(var e=t.firstChild;e;)s(e),e=e.nextSibling}}var a=t("./log"),h=t("./promise");e.exports=function(t,e,r,i,a,l,u){var c=o(t.documentElement,a.javascriptEnabled),f=e.createElement("iframe");return f.className="html2canvas-container",f.style.visibility="hidden",f.style.position="fixed",f.style.left="-10000px",f.style.top="0px",f.style.border="0",f.style.border="0",f.width=r,f.height=i,f.scrolling="no",e.body.appendChild(f),new h(function(e){var r=f.contentWindow.document;f.contentWindow.onload=f.onload=function(){var t=setInterval(function(){r.body.childNodes.length>0&&(s(r.documentElement),clearInterval(t),"view"===a.type&&(f.contentWindow.scrollTo(l,u),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||f.contentWindow.scrollY===u&&f.contentWindow.scrollX===l||(r.documentElement.style.top=-u+"px",r.documentElement.style.left=-l+"px",r.documentElement.style.position="absolute")),e(f))},50)},r.open(),r.write(""),n(t,l,u),r.replaceChild(r.adoptNode(c),r.documentElement),r.close()})}},{"./log":15,"./promise":18}],5:[function(t,e,r){function n(t){this.r=0,this.g=0,this.b=0,this.a=null;this.fromArray(t)||this.namedColor(t)||this.rgb(t)||this.rgba(t)||this.hex6(t)||this.hex3(t)}n.prototype.darken=function(t){var e=1-t;return new n([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},n.prototype.isTransparent=function(){return 0===this.a},n.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},n.prototype.fromArray=function(t){return Array.isArray(t)&&(this.r=Math.min(t[0],255),this.g=Math.min(t[1],255),this.b=Math.min(t[2],255),t.length>3&&(this.a=t[3])),Array.isArray(t)};var i=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(t){var e=null;return null!==(e=t.match(i))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var o=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(t){var e=null;return null!==(e=t.match(o))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var s=/^rgb\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3})\)$/;n.prototype.rgb=function(t){var e=null;return null!==(e=t.match(s))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var a=/^rgba\((\d{1,3}) *, *(\d{1,3}) *, *(\d{1,3}) *, *(\d+\.?\d*)\)$/;n.prototype.rgba=function(t){var e=null;return null!==(e=t.match(a))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(t){var e=h[t.toLowerCase()];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t.toLowerCase())return this.r=this.g=this.b=this.a=0,!0;return!!e},n.prototype.isColor=!0;var h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};e.exports=n},{}],6:[function(t,e,r){function n(t,e){var r=C++;if(e=e||{},e.logging&&(window.html2canvas.logging=!0,window.html2canvas.start=Date.now()),e.async="undefined"==typeof e.async?!0:e.async,e.allowTaint="undefined"==typeof e.allowTaint?!1:e.allowTaint,e.removeContainer="undefined"==typeof e.removeContainer?!0:e.removeContainer,e.javascriptEnabled="undefined"==typeof e.javascriptEnabled?!1:e.javascriptEnabled,e.imageTimeout="undefined"==typeof e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"==typeof e.renderer?e.renderer:d,e.strict=!!e.strict,"string"==typeof t){if("string"!=typeof e.proxy)return c.reject("Proxy must be used when rendering url");var n=null!=e.width?e.width:window.innerWidth,s=null!=e.height?e.height:window.innerHeight;return x(u(t),e.proxy,document,n,s,e).then(function(t){return o(t.contentWindow.document.documentElement,t,e,n,s)})}var a=(void 0===t?[document.documentElement]:t.length?t:[t])[0];return a.setAttribute(E+r,r),i(a.ownerDocument,e,a.ownerDocument.defaultView.innerWidth,a.ownerDocument.defaultView.innerHeight,r).then(function(t){return"function"==typeof e.onrendered&&(v("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),e.onrendered(t)),t})}function i(t,e,r,n,i){return y(t,t,r,n,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then(function(s){v("Document cloned");var a=E+i,h="["+a+"='"+i+"']";t.querySelector(h).removeAttribute(a);var l=s.contentWindow,u=l.document.querySelector(h);"0"===u.style.opacity&&"webgl"===u.getAttribute("renderer")?u.style.opacity=1:null;var f="function"==typeof e.onclone?c.resolve(e.onclone(l.document)):c.resolve(!0);return f.then(function(){return o(u,s,e,r,n)})})}function o(t,e,r,n,i){var o=e.contentWindow,u=new f(o.document),c=new p(r,u),d=w(t),A="view"===r.type?n:h(o.document),m="view"===r.type?i:l(o.document),y=new r.renderer(A,m,c,r,document),x=new g(t,y,u,c,r);return x.ready.then(function(){v("Finished rendering");var n;return"view"===r.type?n=a(y.canvas,{width:y.canvas.width,height:y.canvas.height,top:0,left:0,x:0,y:0}):t===o.document.body||t===o.document.documentElement||null!=r.canvas?n=y.canvas:(1!==window.devicePixelRatio&&(d.top=d.top*window.devicePixelRatio,d.left=d.left*window.devicePixelRatio,d.right=d.right*window.devicePixelRatio,d.bottom=d.bottom*window.devicePixelRatio),n=a(y.canvas,{width:null!=r.width?r.width:d.width,height:null!=r.height?r.height:d.height,top:d.top,left:d.left,x:o.pageXOffset,y:o.pageYOffset})),s(e,r),n})}function s(t,e){e.removeContainer&&(t.parentNode.removeChild(t),v("Cleaned up container"))}function a(t,e){var r=document.createElement("canvas"),n=Math.min(t.width-1,Math.max(0,e.left)),i=Math.min(t.width,Math.max(1,e.left+e.width)),o=Math.min(t.height-1,Math.max(0,e.top)),s=Math.min(t.height,Math.max(1,e.top+e.height));return r.width=e.width,r.height=e.height,v("Cropping canvas at:","left:",e.left,"top:",e.top,"width:",i-n,"height:",s-o),v("Resulting crop with width",e.width,"and height",e.height," with x",n,"and y",o),r.getContext("2d").drawImage(t,n,o,i-n,s-o,e.x,e.y,i-n,s-o),r}function h(t){return Math.max(Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),Math.max(t.body.offsetWidth,t.documentElement.offsetWidth),Math.max(t.body.clientWidth,t.documentElement.clientWidth))}function l(t){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))}function u(t){var e=document.createElement("a");return e.href=t,e.href=e.href,e}var c=t("./promise"),f=t("./support"),d=t("./renderers/canvas"),p=t("./imageloader"),g=t("./nodeparser"),A=t("./nodecontainer"),v=t("./log"),m=t("./utils"),y=t("./clone"),x=t("./proxy").loadUrlDocument,w=m.getBounds,E="data-html2canvas-node",C=0;n.Promise=c,n.CanvasRenderer=d,n.NodeContainer=A,n.log=v,n.utils=m,e.exports="undefined"==typeof document||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return c.reject("No canvas support")}:n},{"./clone":4,"./imageloader":13,"./log":15,"./nodecontainer":16,"./nodeparser":17,"./promise":18,"./proxy":19,"./renderers/canvas":23,"./support":25,"./utils":29}],7:[function(t,e,r){function n(t){if(this.src=t,o("DummyImageContainer for",t),!this.promise||!this.image){o("Initiating DummyImageContainer"),n.prototype.image=new Image;var e=this.image;n.prototype.promise=new i(function(t,r){e.onload=t,e.onerror=r,e.src=s(),e.complete===!0&&t(e)})}}var i=t("./promise"),o=t("./log"),s=t("./utils").smallImage;e.exports=n},{"./log":15,"./promise":18,"./utils":29}],8:[function(t,e,r){function n(t,e){var r,n,o=document.createElement("div"),s=document.createElement("img"),a=document.createElement("span"),h="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=t,o.style.fontSize=e,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),s.src=i(),s.width=1,s.height=1,s.style.margin=0,s.style.padding=0,s.style.verticalAlign="baseline",a.style.fontFamily=t,a.style.fontSize=e,a.style.margin=0,a.style.padding=0,a.appendChild(document.createTextNode(h)),o.appendChild(a),o.appendChild(s),r=s.offsetTop-a.offsetTop+1,o.removeChild(a),o.appendChild(document.createTextNode(h)),o.style.lineHeight="normal",s.style.verticalAlign="super",n=s.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=r,this.lineWidth=1,this.middle=n}var i=t("./utils").smallImage;e.exports=n},{"./utils":29}],9:[function(t,e,r){function n(){this.data={}}var i=t("./font");n.prototype.getMetrics=function(t,e){return void 0===this.data[t+"-"+e]&&(this.data[t+"-"+e]=new i(t,e)),this.data[t+"-"+e]},e.exports=n},{"./font":8}],10:[function(t,e,r){function n(e,r,n){this.image=null,this.src=e;var i=this,a=s(e);this.promise=(r?new o(function(t){"about:blank"===e.contentWindow.document.URL||null==e.contentWindow.document.documentElement?e.contentWindow.onload=e.onload=function(){t(e)}:t(e)}):this.proxyLoad(n.proxy,a,n)).then(function(e){var r=t("./core");return r(e.contentWindow.document.documentElement,{type:"view",width:e.width,height:e.height,proxy:n.proxy,javascriptEnabled:n.javascriptEnabled,removeContainer:n.removeContainer,allowTaint:n.allowTaint,imageTimeout:n.imageTimeout/2})}).then(function(t){return i.image=t})}var i=t("./utils"),o=t("./promise"),s=i.getBounds,a=t("./proxy").loadUrlDocument;n.prototype.proxyLoad=function(t,e,r){var n=this.src;return a(n.src,t,n.ownerDocument,e.width,e.height,r)},e.exports=n},{"./core":6,"./promise":18,"./proxy":19,"./utils":29}],11:[function(t,e,r){function n(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=i.resolve(!0)}var i=t("./promise");n.prototype.TYPES={LINEAR:1,RADIAL:2},e.exports=n},{"./promise":18}],12:[function(t,e,r){function n(t,e){this.src=t,this.image=new Image;var r=this;this.tainted=null,this.promise=new i(function(n,i){r.image.onload=n,r.image.onerror=i,e&&(r.image.crossOrigin="anonymous"),r.image.src=t,r.image.complete===!0&&n(r.image)})}var i=t("./promise");e.exports=n},{"./promise":18}],13:[function(t,e,r){function n(t,e){this.link=null,this.options=t,this.support=e,this.origin=this.getOrigin(window.location.href)}var i=t("./promise"),o=t("./log"),s=t("./imagecontainer"),a=t("./dummyimagecontainer"),h=t("./proxyimagecontainer"),l=t("./framecontainer"),u=t("./svgcontainer"),c=t("./svgnodecontainer"),f=t("./lineargradientcontainer"),d=t("./webkitgradientcontainer"),p=t("./utils").bind; +n.prototype.findImages=function(t){var e=[];return t.reduce(function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t},[]).forEach(this.addImage(e,this.loadImage),this),e},n.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},n.prototype.addImage=function(t,e){return function(r){r.args.forEach(function(n){this.imageExists(t,n)||(t.splice(0,0,e.call(this,r)),o("Added image #"+t.length,"string"==typeof n?n.substring(0,100):n))},this)}},n.prototype.hasImageBackground=function(t){return"none"!==t.method},n.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new s(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||this.options.allowTaint===!0||this.isSVG(e)?new s(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new s(e,!0):this.options.proxy?new h(e,this.options.proxy):new a(e):new u(e)}return"linear-gradient"===t.method?new f(t):"gradient"===t.method?new d(t):"svg"===t.method?new c(t.args[0],this.support.svg):"IFRAME"===t.method?new l(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new a(t)},n.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||u.prototype.isInline(t)},n.prototype.imageExists=function(t,e){return t.some(function(t){return t.src===e})},n.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},n.prototype.getOrigin=function(t){var e=this.link||(this.link=document.createElement("a"));return e.href=t,e.href=e.href,e.protocol+e.hostname+e.port},n.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout)["catch"](function(){var e=new a(t.src);return e.promise.then(function(e){t.image=e})})},n.prototype.get=function(t){var e=null;return this.images.some(function(r){return(e=r).src===t})?e:null},n.prototype.fetch=function(t){return this.images=t.reduce(p(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach(function(t,e){t.promise.then(function(){o("Succesfully loaded image #"+(e+1),t)},function(r){o("Failed loading image #"+(e+1),t,r)})}),this.ready=i.all(this.images.map(this.getPromise,this)),o("Finished searching images"),this},n.prototype.timeout=function(t,e){var r,n=i.race([t.promise,new i(function(n,i){r=setTimeout(function(){o("Timed out loading image",t),i(t)},e)})]).then(function(t){return clearTimeout(r),t});return n["catch"](function(){clearTimeout(r)}),n},e.exports=n},{"./dummyimagecontainer":7,"./framecontainer":10,"./imagecontainer":12,"./lineargradientcontainer":14,"./log":15,"./promise":18,"./proxyimagecontainer":20,"./svgcontainer":26,"./svgnodecontainer":27,"./utils":29,"./webkitgradientcontainer":30}],14:[function(t,e,r){function n(t){i.apply(this,arguments),this.type=this.TYPES.LINEAR;var e=null===t.args[0].match(this.stepRegExp);e?t.args[0].split(" ").reverse().forEach(function(t){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var e=this.y0,r=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=r,this.y1=e}},this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map(function(t){var e=t.match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)|\w+)\s*(\d{1,3})?(%|px)?/);return{color:new o(e[1]),stop:"%"===e[3]?e[2]/100:null}},this),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach(function(t,e){null===t.stop&&this.colorStops.slice(e).some(function(r,n){return null!==r.stop?(t.stop=(r.stop-this.colorStops[e-1].stop)/(n+1)+this.colorStops[e-1].stop,!0):!1},this)},this)}var i=t("./gradientcontainer"),o=t("./color");n.prototype=Object.create(i.prototype),n.prototype.stepRegExp=/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/,e.exports=n},{"./color":5,"./gradientcontainer":11}],15:[function(t,e,r){e.exports=function(){window.html2canvas.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-window.html2canvas.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))}},{}],16:[function(t,e,r){function n(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function i(t){var e=t.options[t.selectedIndex||0];return e?e.text||"":""}function o(t){if(t&&"matrix"===t[1])return t[2].split(",").map(function(t){return parseFloat(t.trim())});if(t&&"matrix3d"===t[1]){var e=t[2].split(",").map(function(t){return parseFloat(t.trim())});return[e[0],e[1],e[4],e[5],e[12],e[13]]}}function s(t){return-1!==t.toString().indexOf("%")}function a(t){return t.replace("px","")}function h(t){return parseFloat(t)}var l=t("./color"),u=t("./utils"),c=u.getBounds,f=u.parseBackgrounds,d=u.offsetBounds;n.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},n.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},n.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},n.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},n.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},n.prototype.prefixedCss=function(t){var e=["webkit","moz","ms","o"],r=this.css(t);return void 0===r&&e.some(function(e){return r=this.css(e+t.substr(0,1).toUpperCase()+t.substr(1)),void 0!==r},this),void 0===r?null:r},n.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},n.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},n.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new l(this.css(t)))},n.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},n.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal"}return t},n.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},n.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=f(this.css("backgroundImage")))},n.prototype.cssList=function(t,e){var r=(this.css(t)||"").split(",");return r=r[e||0]||r[0]||"auto",r=r.trim().split(" "),1===r.length&&(r=[r[0],s(r[0])?"auto":r[0]]),r},n.prototype.parseBackgroundSize=function(t,e,r){var n,i,o=this.cssList("backgroundSize",r);if(s(o[0]))n=t.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=t.width/t.height,h=e.width/e.height;return h>a^"contain"===o[0]?{width:t.height*h,height:t.height}:{width:t.width,height:t.width/h}}n=parseInt(o[0],10)}return i="auto"===o[0]&&"auto"===o[1]?e.height:"auto"===o[1]?n/e.width*e.height:s(o[1])?t.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(n=i/e.height*e.width),{width:n,height:i}},n.prototype.parseBackgroundPosition=function(t,e,r,n){var i,o,a=this.cssList("backgroundPosition",r);return i=s(a[0])?(t.width-(n||e).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?i/e.width*e.height:s(a[1])?(t.height-(n||e).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(i=o/e.height*e.width),{left:i,top:o}},n.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},n.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var r=t.match(this.TEXT_SHADOW_PROPERTY),n=0;r&&n0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())},this))},this))}function i(t){return t.parent&&t.parent.clip.length}function o(t){return t.replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")})}function s(){}function a(t,e,r,n){return t.map(function(i,o){if(i.width>0){var s=e.left,a=e.top,h=e.width,l=e.height-t[2].width;switch(o){case 0:l=t[0].width,i.args=c({c1:[s,a],c2:[s+h,a],c3:[s+h-t[1].width,a+l],c4:[s+t[3].width,a+l]},n[0],n[1],r.topLeftOuter,r.topLeftInner,r.topRightOuter,r.topRightInner);break;case 1:s=e.left+e.width-t[1].width,h=t[1].width,i.args=c({c1:[s+h,a],c2:[s+h,a+l+t[2].width],c3:[s,a+l],c4:[s,a+t[0].width]},n[1],n[2],r.topRightOuter,r.topRightInner,r.bottomRightOuter,r.bottomRightInner);break;case 2:a=a+e.height-t[2].width,l=t[2].width,i.args=c({c1:[s+h,a+l],c2:[s,a+l],c3:[s+t[3].width,a],c4:[s+h-t[3].width,a]},n[2],n[3],r.bottomRightOuter,r.bottomRightInner,r.bottomLeftOuter,r.bottomLeftInner);break;case 3:h=t[3].width,i.args=c({c1:[s,a+l+t[2].width],c2:[s,a],c3:[s+h,a+t[0].width],c4:[s+h,a+l]},n[3],n[0],r.bottomLeftOuter,r.bottomLeftInner,r.topLeftOuter,r.topLeftInner)}}return i})}function h(t,e,r,n){var i=4*((Math.sqrt(2)-1)/3),o=r*i,s=n*i,a=t+r,h=e+n;return{topLeft:u({x:t,y:h},{x:t,y:h-s},{x:a-o,y:e},{x:a,y:e}),topRight:u({x:t,y:e},{x:t+o,y:e},{x:a,y:h-s},{x:a,y:h}),bottomRight:u({x:a,y:e},{x:a,y:e+s},{x:t+o,y:h},{x:t,y:h}),bottomLeft:u({x:a,y:h},{x:a-o,y:h},{x:t,y:e+s},{x:t,y:e})}}function l(t,e,r){var n=t.left,i=t.top,o=t.width,s=t.height,a=e[0][0],l=e[0][1],u=e[1][0],c=e[1][1],f=e[2][0],d=e[2][1],p=e[3][0],g=e[3][1],A=Math.floor(s/2);a=a>A?A:a,l=l>A?A:l,u=u>A?A:u,c=c>A?A:c,f=f>A?A:f,d=d>A?A:d,p=p>A?A:p,g=g>A?A:g;var v=o-u,m=s-d,y=o-f,x=s-g;return{topLeftOuter:h(n,i,a,l).topLeft.subdivide(.5),topLeftInner:h(n+r[3].width,i+r[0].width,Math.max(0,a-r[3].width),Math.max(0,l-r[0].width)).topLeft.subdivide(.5),topRightOuter:h(n+v,i,u,c).topRight.subdivide(.5),topRightInner:h(n+Math.min(v,o+r[3].width),i+r[0].width,v>o+r[3].width?0:u-r[3].width,c-r[0].width).topRight.subdivide(.5),bottomRightOuter:h(n+y,i+m,f,d).bottomRight.subdivide(.5),bottomRightInner:h(n+Math.min(y,o-r[3].width),i+Math.min(m,s+r[0].width),Math.max(0,f-r[1].width),d-r[2].width).bottomRight.subdivide(.5),bottomLeftOuter:h(n,i+x,p,g).bottomLeft.subdivide(.5),bottomLeftInner:h(n+r[3].width,i+x,Math.max(0,p-r[3].width),g-r[2].width).bottomLeft.subdivide(.5)}}function u(t,e,r,n){var i=function(t,e,r){return{x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r}};return{start:t,startControl:e,endControl:r,end:n,subdivide:function(o){var s=i(t,e,o),a=i(e,r,o),h=i(r,n,o),l=i(s,a,o),c=i(a,h,o),f=i(l,c,o);return[u(t,s,l,f),u(f,c,h,n)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,r.x,r.y,n.x,n.y])},curveToReversed:function(n){n.push(["bezierCurve",r.x,r.y,e.x,e.y,t.x,t.y])}}}function c(t,e,r,n,i,o,s){var a=[];return e[0]>0||e[1]>0?(a.push(["line",n[1].start.x,n[1].start.y]),n[1].curveTo(a)):a.push(["line",t.c1[0],t.c1[1]]),r[0]>0||r[1]>0?(a.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(a),a.push(["line",s[0].end.x,s[0].end.y]),s[0].curveToReversed(a)):(a.push(["line",t.c2[0],t.c2[1]]),a.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(a.push(["line",i[1].end.x,i[1].end.y]),i[1].curveToReversed(a)):a.push(["line",t.c4[0],t.c4[1]]),a}function f(t,e,r,n,i,o,s){e[0]>0||e[1]>0?(t.push(["line",n[0].start.x,n[0].start.y]),n[0].curveTo(t),n[1].curveTo(t)):t.push(["line",o,s]),(r[0]>0||r[1]>0)&&t.push(["line",i[0].start.x,i[0].start.y])}function d(t){return t.cssInt("zIndex")<0}function p(t){return t.cssInt("zIndex")>0}function g(t){return 0===t.cssInt("zIndex")}function A(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function v(t){return t instanceof K}function m(t){return t.node.data.trim().length>0}function y(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function x(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(e){var r=t.css("border"+e+"Radius"),n=r.split(" ");return n.length<=1&&(n[1]=n[0]),n.map(S)})}function w(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function E(t){var e=t.css("position"),r=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==r}function C(t){return"static"!==t.css("position")}function b(t){return"none"!==t.css("float")}function B(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function T(t){var e=this;return function(){return!t.apply(e,arguments)}}function D(t){return t.node.nodeType===Node.ELEMENT_NODE}function M(t){return t.isPseudoElement===!0}function P(t){return t.node.nodeType===Node.TEXT_NODE}function R(t){return function(e,r){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(r.cssInt("zIndex")+t.indexOf(r)/t.length)}}function I(t){return t.getOpacity()<1}function S(t){return parseInt(t,10)}function O(t){return t.width}function F(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function Q(t){return[].concat.apply([],t)}function L(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}function N(t){for(var e,r=[],n=0,i=!1;t.length;)H(t[n])===i?(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)),i=!i,n=0):n++,n>=t.length&&(e=t.splice(0,n),e.length&&r.push(Y.ucs2.encode(e)));return r}function H(t){return-1!==[32,13,10,9,45].indexOf(t)}function k(t){return/[^\u0000-\u00ff]/.test(t)}var G=t("./log"),Y=t("punycode"),j=t("./nodecontainer"),z=t("./textcontainer"),U=t("./pseudoelementcontainer"),J=t("./fontmetrics"),X=t("./color"),W=t("./promise"),K=t("./stackingcontext"),V=t("./utils"),Z=V.bind,q=V.getBounds,_=V.parseBackgrounds,$=V.offsetBounds;n.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(t){if(D(t)){M(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],r=t.parseClip();r&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+r.left,t.bounds.top+r.top,r.right-r.left,r.bottom-r.top]]),t.clip=i(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,M(t)&&t.cleanDOM()}else P(t)&&(t.clip=i(t)?t.parent.clip:[]);M(t)||(t.bounds=null)},this)},n.prototype.asyncRenderer=function(t,e,r){r=r||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():r+20>Date.now()?this.asyncRenderer(t,e,r):setTimeout(Z(function(){this.asyncRenderer(t,e)},this),0)},n.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},n.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},n.prototype.createStyles=function(t,e){var r=t.createElement("style");r.innerHTML=e,t.body.appendChild(r)},n.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var r=this.getPseudoElement(t,":before"),n=this.getPseudoElement(t,":after");r&&e.push(r),n&&e.push(n)}return Q(e)},n.prototype.getPseudoElement=function(t,e){var r=t.computedStyle(e);if(!r||!r.content||"none"===r.content||"-moz-alt-content"===r.content||"none"===r.display)return null;for(var n=L(r.content),i="url"===n.substr(0,3),s=document.createElement(i?"img":"html2canvaspseudoelement"),a=new U(s,t,e),h=r.length-1;h>=0;h--){var l=o(r.item(h));s.style[l]=r[l]}if(s.className=U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,i)return s.src=_(n)[0].args[0],[a];var u=document.createTextNode(n);return s.appendChild(u),[a,new z(u,a)]},n.prototype.getChildren=function(t){return Q([].filter.call(t.node.childNodes,w).map(function(e){var r=[e.nodeType===Node.TEXT_NODE?new z(e,t):new j(e,t)].filter(F);return e.nodeType===Node.ELEMENT_NODE&&r.length&&"TEXTAREA"!==e.tagName?r[0].isElementVisible()?r.concat(this.getChildren(r[0])):[]:r},this))},n.prototype.newStackingContext=function(t,e){var r=new K(e,t.getOpacity(),t.node,t.parent);t.cloneTo(r);var n=e?r.getParentStack(this):r.parent.stack;n.contexts.push(r),t.stack=r},n.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){D(t)&&(this.isRootElement(t)||I(t)||E(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):D(t)&&(C(t)&&g(t)||B(t)||b(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)},this)},n.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},n.prototype.isRootElement=function(t){return null===t.parent},n.prototype.sortStackingContexts=function(t){t.contexts.sort(R(t.contexts.slice(0))),t.contexts.forEach(this.sortStackingContexts,this)},n.prototype.parseTextBounds=function(t){return function(e,r,n){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var i=n.slice(0,r).join("").length;return this.getRangeBounds(t.node,i,e.length)}if(t.node&&"string"==typeof t.node.data){var o=t.node.splitText(e.length),s=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=o,s}}else(!this.support.rangeBounds||t.parent.hasTransform())&&(t.node=t.node.splitText(e.length));return{}}},n.prototype.getWrapperBounds=function(t,e){var r=t.ownerDocument.createElement("html2canvaswrapper"),n=t.parentNode,i=t.cloneNode(!0);r.appendChild(t.cloneNode(!0)),n.replaceChild(r,t);var o=e?$(r):q(r);return n.replaceChild(i,r),o},n.prototype.getRangeBounds=function(t,e,r){var n=this.range||(this.range=t.ownerDocument.createRange());return n.setStart(t,e),n.setEnd(t,e+r),n.getBoundingClientRect()},n.prototype.parse=function(t){var e=t.contexts.filter(d),r=t.children.filter(D),n=r.filter(T(b)),i=n.filter(T(C)).filter(T(A)),o=r.filter(T(C)).filter(b),a=n.filter(T(C)).filter(A),h=t.contexts.concat(n.filter(C)).filter(g),l=t.children.filter(P).filter(m),u=t.contexts.filter(p);e.concat(i).concat(o).concat(a).concat(h).concat(l).concat(u).forEach(function(t){this.renderQueue.push(t),v(t)&&(this.parse(t),this.renderQueue.push(new s))},this)},n.prototype.paint=function(t){try{t instanceof s?this.renderer.ctx.restore():P(t)?(M(t.parent)&&t.parent.appendToDOM(),this.paintText(t),M(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(G(e),this.options.strict)throw e}},n.prototype.paintNode=function(t){v(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},n.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,function(){this.renderer.renderBackground(t,e,t.borders.borders.map(O))},this),this.renderer.clip(t.clip,function(){this.renderer.renderBorders(t.borders.borders)},this),this.renderer.clip(t.backgroundClip,function(){switch(t.node.nodeName){case"svg":case"IFRAME":var r=this.images.get(t.node);r?this.renderer.renderImage(t,e,t.borders,r):G("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var n=this.images.get(t.node.src);n?this.renderer.renderImage(t,e,t.borders,n):G("Error loading ",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this)},n.prototype.paintCheckbox=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height),n={width:r-1,height:r-1,top:e.top,left:e.left},i=[3,3],o=[i,i,i,i],s=[1,1,1,1].map(function(t){return{color:new X("#A5A5A5"),width:t}}),h=l(n,o,s);this.renderer.clip(t.backgroundClip,function(){this.renderer.rectangle(n.left+1,n.top+1,n.width-2,n.height-2,new X("#DEDEDE")),this.renderer.renderBorders(a(s,n,h,o)),t.node.checked&&(this.renderer.font(new X("#424242"),"normal","normal","bold",r-3+"px","arial"),this.renderer.text("✔",n.left+r/6,n.top+r-1))},this)},n.prototype.paintRadio=function(t){var e=t.parseBounds(),r=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,function(){this.renderer.circleStroke(e.left+1,e.top+1,r,new X("#DEDEDE"),1,new X("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+r/4)+1,Math.ceil(e.top+r/4)+1,Math.floor(r/2),new X("#424242"))},this)},n.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var r=t.node.ownerDocument,n=r.createElement("html2canvaswrapper"),i=["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"];i.forEach(function(e){try{n.style[e]=t.css(e)}catch(r){G("html2canvas: Parse: Exception caught in renderFormValue: "+r.message)}});var o=t.parseBounds();n.style.position="fixed",n.style.left=o.left+"px",n.style.top=o.top+"px",n.textContent=e,r.body.appendChild(n),this.paintText(new z(n.firstChild,t)),r.body.removeChild(n)}},n.prototype.paintText=function(t){t.applyTextTransform();var e=Y.ucs2.decode(t.node.data),r=this.options.letterRendering&&!y(t)||k(t.node.data)?e.map(function(t){return Y.ucs2.encode([t])}):N(e),n=t.parent.fontWeight(),i=t.parent.css("fontSize"),o=t.parent.css("fontFamily"),s=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),n,i,o),s.length?this.renderer.fontShadow(s[0].color,s[0].offsetX,s[0].offsetY,s[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){r.map(this.parseTextBounds(t),this).forEach(function(e,n){e&&(this.renderer.text(r[n],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(o,i)))},this)},this)},n.prototype.renderTextDecoration=function(t,e,r){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+r.baseline+r.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+r.middle+r.lineWidth),e.width,1,t.color("color"))}};var tt={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};n.prototype.parseBorders=function(t){var e=t.parseBounds(),r=x(t),n=["Top","Right","Bottom","Left"].map(function(e,r){var n=t.css("border"+e+"Style"),i=t.color("border"+e+"Color");"inset"===n&&i.isBlack()&&(i=new X([255,255,255,i.a]));var o=tt[n]?tt[n][r]:null;return{width:t.cssInt("border"+e+"Width"),color:o?i[o[0]](o[1]):i,args:null}}),i=l(e,r,n);return{clip:this.parseBackgroundClip(t,i,n,r,e),borders:a(n,e,i,r)}},n.prototype.parseBackgroundClip=function(t,e,r,n,i){var o=t.css("backgroundClip"),s=[];switch(o){case"content-box":case"padding-box":f(s,n[0],n[1],e.topLeftInner,e.topRightInner,i.left+r[3].width,i.top+r[0].width),f(s,n[1],n[2],e.topRightInner,e.bottomRightInner,i.left+i.width-r[1].width,i.top+r[0].width),f(s,n[2],n[3],e.bottomRightInner,e.bottomLeftInner,i.left+i.width-r[1].width,i.top+i.height-r[2].width),f(s,n[3],n[0],e.bottomLeftInner,e.topLeftInner,i.left+r[3].width,i.top+i.height-r[2].width);break;default:f(s,n[0],n[1],e.topLeftOuter,e.topRightOuter,i.left,i.top),f(s,n[1],n[2],e.topRightOuter,e.bottomRightOuter,i.left+i.width,i.top),f(s,n[2],n[3],e.bottomRightOuter,e.bottomLeftOuter,i.left+i.width,i.top+i.height),f(s,n[3],n[0],e.bottomLeftOuter,e.topLeftOuter,i.left,i.top+i.height)}return s},e.exports=n},{"./color":5,"./fontmetrics":9,"./log":15,"./nodecontainer":16,"./promise":18,"./pseudoelementcontainer":21,"./stackingcontext":24,"./textcontainer":28,"./utils":29,punycode:3}],18:[function(t,e,r){e.exports=t("es6-promise").Promise},{"es6-promise":1}],19:[function(t,e,r){function n(t,e,r){var n="withCredentials"in new XMLHttpRequest;if(!e)return u.reject("No proxy configured");var i=s(n),h=a(e,t,i);return n?c(h):o(r,h,i).then(function(t){return g(t.content)})}function i(t,e,r){var n="crossOrigin"in new Image,i=s(n),h=a(e,t,i);return n?u.resolve(h):o(r,h,i).then(function(t){return"data:"+t.type+";base64,"+t.content})}function o(t,e,r){return new u(function(n,i){var o=t.createElement("script"),s=function(){delete window.html2canvas.proxy[r],t.body.removeChild(o)};window.html2canvas.proxy[r]=function(t){s(),n(t)},o.src=e,o.onerror=function(t){s(),i(t)},t.body.appendChild(o)})}function s(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++A+"_"+Math.round(1e5*Math.random())}function a(t,e,r){return t+"?url="+encodeURIComponent(e)+(r.length?"&callback=html2canvas.proxy."+r:"")}function h(t){return function(e){var r,n=new DOMParser;try{r=n.parseFromString(e,"text/html")}catch(i){d("DOMParser not supported, falling back to createHTMLDocument"),r=document.implementation.createHTMLDocument("");try{r.open(),r.write(e),r.close()}catch(o){d("createHTMLDocument write not supported, falling back to document.body.innerHTML"),r.body.innerHTML=e}}var s=r.querySelector("base");if(!s||!s.href.host){var a=r.createElement("base");a.href=t,r.head.insertBefore(a,r.head.firstChild)}return r}}function l(t,e,r,i,o,s){return new n(t,e,window.document).then(h(t)).then(function(t){return p(t,r,i,o,s,0,0)})}var u=t("./promise"),c=t("./xhr"),f=t("./utils"),d=t("./log"),p=t("./clone"),g=f.decode64,A=0;r.Proxy=n,r.ProxyURL=i,r.loadUrlDocument=l},{"./clone":4,"./log":15,"./promise":18,"./utils":29,"./xhr":31}],20:[function(t,e,r){function n(t,e){var r=document.createElement("a");r.href=t,t=r.href,this.src=t,this.image=new Image;var n=this;this.promise=new o(function(r,o){n.image.crossOrigin="Anonymous",n.image.onload=r,n.image.onerror=o,new i(t,e,document).then(function(t){n.image.src=t})["catch"](o)})}var i=t("./proxy").ProxyURL,o=t("./promise");e.exports=n},{"./promise":18,"./proxy":19}],21:[function(t,e,r){function n(t,e,r){i.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===r}var i=t("./nodecontainer");n.prototype.cloneTo=function(t){n.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},n.prototype=Object.create(i.prototype),n.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},n.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},n.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",n.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",e.exports=n},{"./nodecontainer":16}],22:[function(t,e,r){function n(t,e,r,n,i){this.width=t,this.height=e,this.images=r,this.options=n,this.document=i}var i=t("./log");n.prototype.renderImage=function(t,e,r,n){var i=t.cssInt("paddingLeft"),o=t.cssInt("paddingTop"),s=t.cssInt("paddingRight"),a=t.cssInt("paddingBottom"),h=r.borders,l=e.width-(h[1].width+h[3].width+i+s),u=e.height-(h[0].width+h[2].width+o+a);this.drawImage(n,0,0,n.image.width||l,n.image.height||u,e.left+i+h[3].width,e.top+o+h[0].width,l,u)},n.prototype.renderBackground=function(t,e,r){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,r))},n.prototype.renderBackgroundColor=function(t,e){var r=t.color("backgroundColor");r.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,r)},n.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},n.prototype.renderBorder=function(t){t.color.isTransparent()||null===t.args||this.drawShape(t.args,t.color)},n.prototype.renderBackgroundImage=function(t,e,r){ +var n=t.parseBackgroundImages();n.reverse().forEach(function(n,o,s){switch(n.method){case"url":var a=this.images.get(n.args[0]);a?this.renderBackgroundRepeating(t,e,a,s.length-(o+1),r):i("Error loading background-image",n.args[0]);break;case"linear-gradient":case"gradient":var h=this.images.get(n.value);h?this.renderBackgroundGradient(h,e,r):i("Error loading background-image",n.args[0]);break;case"none":break;default:i("Unknown background-image type",n.args[0])}},this)},n.prototype.renderBackgroundRepeating=function(t,e,r,n,i){var o=t.parseBackgroundSize(e,r.image,n),s=t.parseBackgroundPosition(e,r.image,n,o),a=t.parseBackgroundRepeat(n);switch(a){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+i[3],e.top+s.top+i[0],99999,o.height,i);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+i[0],o.width,99999,i);break;case"no-repeat":this.backgroundRepeatShape(r,s,o,e,e.left+s.left+i[3],e.top+s.top+i[0],o.width,o.height,i);break;default:this.renderBackgroundRepeat(r,s,o,{top:e.top,left:e.left},i[3],i[0])}},e.exports=n},{"./log":15}],23:[function(t,e,r){function n(t,e){if(this.ratio=window.devicePixelRatio,t=this.applyRatio(t),e=this.applyRatio(e),o.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),!this.options.canvas&&(this.canvas.width=t,this.canvas.height=e,1!==this.ratio)){var r=1/this.ratio;this.canvas.style.transform="scaleX("+r+") scaleY("+r+")",this.canvas.style.transformOrigin="0 0"}this.ctx=this.canvas.getContext("2d"),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},a("Initialized CanvasRenderer with size",t,"x",e)}function i(t){return t.length>0}var o=t("../renderer"),s=t("../lineargradientcontainer"),a=t("../log");n.prototype=Object.create(o.prototype),n.prototype.applyRatio=function(t){return t*this.ratio},n.prototype.applyRatioToBounds=function(t){t.width=t.width*this.ratio,t.top=t.top*this.ratio;try{t.left=t.left*this.ratio,t.height=t.height*this.ratio}catch(e){}return t},n.prototype.applyRatioToPosition=function(t){return t.left=t.left*this.ratio,t.height=t.height*this.ratio,bounds},n.prototype.applyRatioToShape=function(t){for(var e=0;e";try{r.drawImage(t,0,0),e.toDataURL()}catch(n){return!1}return!0},e.exports=n},{}],26:[function(t,e,r){function n(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then(function(){return e.isInline(t)?i.resolve(e.inlineFormatting(t)):o(t)}).then(function(t){return new i(function(r){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,r))})})}var i=t("./promise"),o=t("./xhr"),s=t("./utils").decode64;n.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?i.resolve():i.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},n.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},n.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},n.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},n.prototype.createCanvas=function(t){var e=this;return function(r,n){var i=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=i.lowerCanvasEl,i.setWidth(n.width).setHeight(n.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(r,n)).renderAll(),t(i.lowerCanvasEl)}},n.prototype.decode64=function(t){return"function"==typeof window.atob?window.atob(t):s(t)},e.exports=n},{"./promise":18,"./utils":29,"./xhr":31}],27:[function(t,e,r){function n(t,e){this.src=t,this.image=null;var r=this;this.promise=e?new o(function(e,n){r.image=new Image,r.image.onload=e,r.image.onerror=n,r.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),r.image.complete===!0&&e(r.image)}):this.hasFabric().then(function(){return new o(function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,r.createCanvas.call(r,e))})})}var i=t("./svgcontainer"),o=t("./promise");n.prototype=Object.create(i.prototype),e.exports=n},{"./promise":18,"./svgcontainer":26}],28:[function(t,e,r){function n(t,e){o.call(this,t,e)}function i(t,e,r){return t.length>0?e+r.toUpperCase():void 0}var o=t("./nodecontainer");n.prototype=Object.create(o.prototype),n.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},n.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,i);case"uppercase":return e.toUpperCase();default:return e}},e.exports=n},{"./nodecontainer":16}],29:[function(t,e,r){r.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},r.bind=function(t,e){return function(){return t.apply(e,arguments)}},r.decode64=function(t){var e,r,n,i,o,s,a,h,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=t.length,c="";for(e=0;u>e;e+=4)r=l.indexOf(t[e]),n=l.indexOf(t[e+1]),i=l.indexOf(t[e+2]),o=l.indexOf(t[e+3]),s=r<<2|n>>4,a=(15&n)<<4|i>>2,h=(3&i)<<6|o,c+=64===i?String.fromCharCode(s):64===o||-1===o?String.fromCharCode(s,a):String.fromCharCode(s,a,h);return c},r.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),r=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+r,left:e.left,width:r,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},r.offsetBounds=function(t){var e=t.offsetParent?r.offsetBounds(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+e.top,bottom:t.offsetTop+t.offsetHeight+e.top,right:t.offsetLeft+e.left+t.offsetWidth,left:t.offsetLeft+e.left,width:t.offsetWidth,height:t.offsetHeight}},r.parseBackgrounds=function(t){var e,r,n,i,o,s,a,h=" \r\n ",l=[],u=0,c=0,f=function(){e&&('"'===r.substr(0,1)&&(r=r.substr(1,r.length-2)),r&&a.push(r),"-"===e.substr(0,1)&&(i=e.indexOf("-",1)+1)>0&&(n=e.substr(0,i),e=e.substr(i)),l.push({prefix:n,method:e.toLowerCase(),value:o,args:a,image:null})),a=[],e=n=r=o=""};return a=[],e=n=r=o="",t.split("").forEach(function(t){if(!(0===u&&h.indexOf(t)>-1)){switch(t){case'"':s?s===t&&(s=null):s=t;break;case"(":if(s)break;if(0===u)return u=1,void(o+=t);c++;break;case")":if(s)break;if(1===u){if(0===c)return u=0,o+=t,void f();c--}break;case",":if(s)break;if(0===u)return void f();if(1===u&&0===c&&!e.match(/^url$/i))return a.push(r),r="",void(o+=t)}o+=t,0===u?e+=t:r+=t}}),f(),l}},{}],30:[function(t,e,r){function n(t){i.apply(this,arguments),this.type="linear"===t.args[0]?this.TYPES.LINEAR:this.TYPES.RADIAL}var i=t("./gradientcontainer");n.prototype=Object.create(i.prototype),e.exports=n},{"./gradientcontainer":11}],31:[function(t,e,r){function n(t){return new i(function(e,r){var n=new XMLHttpRequest;n.open("GET",t),n.onload=function(){200===n.status?e(n.responseText):r(new Error(n.statusText))},n.onerror=function(){r(new Error("Network Error"))},n.send()})}var i=t("./promise");e.exports=n},{"./promise":18}]},{},[6])(6)}),function(t){function e(t){var e=t.length,n=r.type(t);return"function"===n||r.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}if(!t.jQuery){var r=function(t,e){return new r.fn.init(t,e)};r.isWindow=function(t){return null!=t&&t==t.window},r.type=function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?i[s.call(t)]||"object":typeof t},r.isArray=Array.isArray||function(t){return"array"===r.type(t)},r.isPlainObject=function(t){var e;if(!t||"object"!==r.type(t)||t.nodeType||r.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}for(e in t);return void 0===e||o.call(t,e)},r.each=function(t,r,n){var i,o=0,s=t.length,a=e(t);if(n){if(a)for(;s>o&&(i=r.apply(t[o],n),i!==!1);o++);else for(o in t)if(i=r.apply(t[o],n),i===!1)break}else if(a)for(;s>o&&(i=r.call(t[o],o,t[o]),i!==!1);o++);else for(o in t)if(i=r.call(t[o],o,t[o]),i===!1)break;return t},r.data=function(t,e,i){if(void 0===i){var o=t[r.expando],s=o&&n[o];if(void 0===e)return s;if(s&&e in s)return s[e]}else if(void 0!==e){var o=t[r.expando]||(t[r.expando]=++r.uuid);return n[o]=n[o]||{},n[o][e]=i,i}},r.removeData=function(t,e){var i=t[r.expando],o=i&&n[i];o&&r.each(e,function(t,e){delete o[e]})},r.extend=function(){var t,e,n,i,o,s,a=arguments[0]||{},h=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[h]||{},h++),"object"!=typeof a&&"function"!==r.type(a)&&(a={}),h===l&&(a=this,h--);l>h;h++)if(null!=(o=arguments[h]))for(i in o)t=a[i],n=o[i],a!==n&&(u&&n&&(r.isPlainObject(n)||(e=r.isArray(n)))?(e?(e=!1,s=t&&r.isArray(t)?t:[]):s=t&&r.isPlainObject(t)?t:{},a[i]=r.extend(u,s,n)):void 0!==n&&(a[i]=n));return a},r.queue=function(t,n,i){function o(t,r){var n=r||[];return null!=t&&(e(Object(t))?!function(t,e){for(var r=+e.length,n=0,i=t.length;r>n;)t[i++]=e[n++];if(r!==r)for(;void 0!==e[n];)t[i++]=e[n++];return t.length=i,t}(n,"string"==typeof t?[t]:t):[].push.call(n,t)),n}if(t){n=(n||"fx")+"queue";var s=r.data(t,n);return i?(!s||r.isArray(i)?s=r.data(t,n,o(i)):s.push(i),s):s||[]}},r.dequeue=function(t,e){r.each(t.nodeType?[t]:t,function(t,n){e=e||"fx";var i=r.queue(n,e),o=i.shift();"inprogress"===o&&(o=i.shift()),o&&("fx"===e&&i.unshift("inprogress"),o.call(n,function(){r.dequeue(n,e)}))})},r.fn=r.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function t(){for(var t=this.offsetParent||document;t&&"html"===!t.nodeType.toLowerCase&&"static"===t.style.position;)t=t.offsetParent;return t||document}var e=this[0],t=t.apply(e),n=this.offset(),i=/^(?:body|html)$/i.test(t.nodeName)?{top:0,left:0}:r(t).offset();return n.top-=parseFloat(e.style.marginTop)||0,n.left-=parseFloat(e.style.marginLeft)||0,t.style&&(i.top+=parseFloat(t.style.borderTopWidth)||0,i.left+=parseFloat(t.style.borderLeftWidth)||0),{top:n.top-i.top,left:n.left-i.left}}};var n={};r.expando="velocity"+(new Date).getTime(),r.uuid=0;for(var i={},o=i.hasOwnProperty,s=i.toString,a="Boolean Number String Function Array Date RegExp Object Error".split(" "),h=0;hi;++i){var o=l(r,t,n);if(0===o)return r;var s=h(r,t,n)-e;r-=s/o}return r}function c(){for(var e=0;y>e;++e)C[e]=h(e*x,t,n)}function f(e,r,i){var o,s,a=0;do s=r+(i-r)/2,o=h(s,t,n)-e,o>0?i=s:r=s;while(Math.abs(o)>v&&++a=A?u(e,a):0==h?a:f(e,r,r+x)}function p(){b=!0,(t!=r||n!=i)&&c()}var g=4,A=.001,v=1e-7,m=10,y=11,x=1/(y-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var E=0;4>E;++E)if("number"!=typeof arguments[E]||isNaN(arguments[E])||!isFinite(arguments[E]))return!1;t=Math.min(t,1),n=Math.min(n,1),t=Math.max(t,0),n=Math.max(n,0);var C=w?new Float32Array(y):new Array(y),b=!1,B=function(e){return b||p(),t===r&&n===i?e:0===e?0:1===e?1:h(d(e),r,i)};B.getControlPoints=function(){return[{x:t,y:r},{x:n,y:i}]};var T="generateBezier("+[t,r,n,i]+")";return B.toString=function(){return T},B}function l(t,e){var r=t;return g.isString(t)?y.Easings[t]||(r=!1):r=g.isArray(t)&&1===t.length?a.apply(null,t):g.isArray(t)&&2===t.length?x.apply(null,t.concat([e])):g.isArray(t)&&4===t.length?h.apply(null,t):!1,r===!1&&(r=y.Easings[y.defaults.easing]?y.defaults.easing:m),r}function u(t){if(t){var e=(new Date).getTime(),r=y.State.calls.length;r>1e4&&(y.State.calls=i(y.State.calls));for(var o=0;r>o;o++)if(y.State.calls[o]){var a=y.State.calls[o],h=a[0],l=a[2],d=a[3],p=!!d,A=null;d||(d=y.State.calls[o][3]=e-16);for(var v=Math.min((e-d)/l.duration,1),m=0,x=h.length;x>m;m++){var E=h[m],b=E.element;if(s(b)){var B=!1;if(l.display!==n&&null!==l.display&&"none"!==l.display){if("flex"===l.display){var T=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];f.each(T,function(t,e){w.setPropertyValue(b,"display",e)})}w.setPropertyValue(b,"display",l.display)}l.visibility!==n&&"hidden"!==l.visibility&&w.setPropertyValue(b,"visibility",l.visibility);for(var D in E)if("element"!==D){var M,P=E[D],R=g.isString(P.easing)?y.Easings[P.easing]:P.easing;if(1===v)M=P.endValue;else{var I=P.endValue-P.startValue;if(M=P.startValue+I*R(v,l,I),!p&&M===P.currentValue)continue}if(P.currentValue=M,"tween"===D)A=M;else{if(w.Hooks.registered[D]){var S=w.Hooks.getRoot(D),O=s(b).rootPropertyValueCache[S];O&&(P.rootPropertyValue=O)}var F=w.setPropertyValue(b,D,P.currentValue+(0===parseFloat(M)?"":P.unitType),P.rootPropertyValue,P.scrollData);w.Hooks.registered[D]&&(w.Normalizations.registered[S]?s(b).rootPropertyValueCache[S]=w.Normalizations.registered[S]("extract",null,F[1]):s(b).rootPropertyValueCache[S]=F[1]),"transform"===F[0]&&(B=!0)}}l.mobileHA&&s(b).transformCache.translate3d===n&&(s(b).transformCache.translate3d="(0px, 0px, 0px)",B=!0),B&&w.flushTransformCache(b)}}l.display!==n&&"none"!==l.display&&(y.State.calls[o][2].display=!1),l.visibility!==n&&"hidden"!==l.visibility&&(y.State.calls[o][2].visibility=!1),l.progress&&l.progress.call(a[1],a[1],v,Math.max(0,d+l.duration-e),d,A),1===v&&c(o)}}y.State.isTicking&&C(u)}function c(t,e){if(!y.State.calls[t])return!1;for(var r=y.State.calls[t][0],i=y.State.calls[t][1],o=y.State.calls[t][2],a=y.State.calls[t][4],h=!1,l=0,u=r.length;u>l;l++){var c=r[l].element;if(e||o.loop||("none"===o.display&&w.setPropertyValue(c,"display",o.display),"hidden"===o.visibility&&w.setPropertyValue(c,"visibility",o.visibility)),o.loop!==!0&&(f.queue(c)[1]===n||!/\.velocityQueueEntryFlag/i.test(f.queue(c)[1]))&&s(c)){s(c).isAnimating=!1,s(c).rootPropertyValueCache={};var d=!1;f.each(w.Lists.transforms3D,function(t,e){var r=/^scale/.test(e)?1:0,i=s(c).transformCache[e];s(c).transformCache[e]!==n&&new RegExp("^\\("+r+"[^.]").test(i)&&(d=!0,delete s(c).transformCache[e])}),o.mobileHA&&(d=!0,delete s(c).transformCache.translate3d),d&&w.flushTransformCache(c),w.Values.removeClass(c,"velocity-animating")}if(!e&&o.complete&&!o.loop&&l===u-1)try{o.complete.call(i,i)}catch(p){setTimeout(function(){throw p},1)}a&&o.loop!==!0&&a(i),s(c)&&o.loop===!0&&!e&&(f.each(s(c).tweensContainer,function(t,e){/^rotate/.test(t)&&360===parseFloat(e.endValue)&&(e.endValue=0,e.startValue=360),/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),y(c,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&f.dequeue(c,o.queue)}y.State.calls[t]=!1;for(var g=0,A=y.State.calls.length;A>g;g++)if(y.State.calls[g]!==!1){h=!0;break}h===!1&&(y.State.isTicking=!1,delete y.State.calls,y.State.calls=[])}var f,d=function(){if(r.documentMode)return r.documentMode;for(var t=7;t>4;t--){var e=r.createElement("div");if(e.innerHTML="",e.getElementsByTagName("span").length)return e=null,t}return n}(),p=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var r,n=(new Date).getTime();return r=Math.max(0,16-(n-t)),t=n+r,setTimeout(function(){e(n+r)},r)}}(),g={isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isNodeList:function(t){return"object"==typeof t&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&t.length!==n&&(0===t.length||"object"==typeof t[0]&&t[0].nodeType>0)},isWrapped:function(t){return t&&(t.jquery||e.Zepto&&e.Zepto.zepto.isZ(t))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)return!1;return!0}},A=!1;if(t.fn&&t.fn.jquery?(f=t,A=!0):f=e.Velocity.Utilities,8>=d&&!A)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=d)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,m="swing",y={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:r.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:f,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:v,easing:m,begin:n,complete:n,progress:n,display:n,visibility:n,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(t){f.data(t,"velocity",{isSVG:g.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};e.pageYOffset!==n?(y.State.scrollAnchor=e,y.State.scrollPropertyLeft="pageXOffset",y.State.scrollPropertyTop="pageYOffset"):(y.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body,y.State.scrollPropertyLeft="scrollLeft",y.State.scrollPropertyTop="scrollTop");var x=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},o=e(r,.5*n,i),s=e(r,.5*n,o),a=e(r,n,s),h=1/6*(i.dx+2*(o.dx+s.dx)+a.dx),l=1/6*(i.dv+2*(o.dv+s.dv)+a.dv);return r.x=r.x+h*n,r.v=r.v+l*n,r}return function n(t,e,i){var o,s,a,h={x:-1,v:0,tension:null,friction:null},l=[0],u=0,c=1e-4,f=.016;for(t=parseFloat(t)||500,e=parseFloat(e)||20,i=i||null,h.tension=t,h.friction=e,o=null!==i,o?(u=n(t,e),s=u/i*f):s=f;;)if(a=r(a||h,s),l.push(1+a.x),u+=16,!(Math.abs(a.x)>c&&Math.abs(a.v)>c))break;return o?function(t){return l[t*(l.length-1)|0]}:u}}();y.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},f.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){y.Easings[e[0]]=h.apply(null,e[1])});var w=y.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t=d)switch(t){case"name":return"filter";case"extract":var n=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=n?n[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(t){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=d||y.State.isGingerbread||(w.Lists.transformsBase=w.Lists.transformsBase.concat(w.Lists.transforms3D));for(var t=0;ti&&(i=1),o=!/(\d)$/i.test(i);break;case"skew":o=!/(deg|\d)$/i.test(i);break;case"rotate":o=!/(deg|\d)$/i.test(i)}return o||(s(r).transformCache[e]="("+i+")"),s(r).transformCache[e]}}}();for(var t=0;t=d||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return 8>=d?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1"),(8>=d?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(d||y.State.isAndroid&&!y.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(y.State.prefixMatches[t])return[y.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],r=0,n=e.length;n>r;r++){var i;if(i=0===r?t:e[r]+t.replace(/^\w/,function(t){return t.toUpperCase()}),g.isString(y.State.prefixElement.style[i]))return y.State.prefixMatches[t]=i,[i,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e,r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return t=t.replace(r,function(t,e,r,n){return e+e+r+r+n+n}),e=n.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[0,0,0]},isCSSNullValue:function(t){return 0==t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){t.classList?t.classList.add(e):t.className+=(t.className.length?" ":"")+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(t,r,i,o){function a(t,r){function i(){l&&w.setPropertyValue(t,"display","none")}var h=0;if(8>=d)h=f.css(t,r);else{var l=!1;if(/^(width|height)$/.test(r)&&0===w.getPropertyValue(t,"display")&&(l=!0, +w.setPropertyValue(t,"display",w.Values.getDisplayType(t))),!o){if("height"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var u=t.offsetHeight-(parseFloat(w.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(w.getPropertyValue(t,"paddingBottom"))||0);return i(),u}if("width"===r&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var c=t.offsetWidth-(parseFloat(w.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(w.getPropertyValue(t,"paddingRight"))||0);return i(),c}}var p;p=s(t)===n?e.getComputedStyle(t,null):s(t).computedStyle?s(t).computedStyle:s(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===r&&(r="borderTopColor"),h=9===d&&"filter"===r?p.getPropertyValue(r):p[r],(""===h||null===h)&&(h=t.style[r]),i()}if("auto"===h&&/^(top|right|bottom|left)$/i.test(r)){var g=a(t,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(r))&&(h=f(t).position()[r]+"px")}return h}var h;if(w.Hooks.registered[r]){var l=r,u=w.Hooks.getRoot(l);i===n&&(i=w.getPropertyValue(t,w.Names.prefixCheck(u)[0])),w.Normalizations.registered[u]&&(i=w.Normalizations.registered[u]("extract",t,i)),h=w.Hooks.extractValue(l,i)}else if(w.Normalizations.registered[r]){var c,p;c=w.Normalizations.registered[r]("name",t),"transform"!==c&&(p=a(t,w.Names.prefixCheck(c)[0]),w.Values.isCSSNullValue(p)&&w.Hooks.templates[r]&&(p=w.Hooks.templates[r][1])),h=w.Normalizations.registered[r]("extract",t,p)}if(!/^[\d-]/.test(h))if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{h=t.getBBox()[r]}catch(g){h=0}else h=t.getAttribute(r);else h=a(t,w.Names.prefixCheck(r)[0]);return w.Values.isCSSNullValue(h)&&(h=0),y.debug>=2&&console.log("Get "+r+": "+h),h},setPropertyValue:function(t,r,n,i,o){var a=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=n:"Left"===o.direction?e.scrollTo(n,o.alternateValue):e.scrollTo(o.alternateValue,n);else if(w.Normalizations.registered[r]&&"transform"===w.Normalizations.registered[r]("name",t))w.Normalizations.registered[r]("inject",t,n),a="transform",n=s(t).transformCache[r];else{if(w.Hooks.registered[r]){var h=r,l=w.Hooks.getRoot(r);i=i||w.getPropertyValue(t,l),n=w.Hooks.injectValue(h,n,i),r=l}if(w.Normalizations.registered[r]&&(n=w.Normalizations.registered[r]("inject",t,n),r=w.Normalizations.registered[r]("name",t)),a=w.Names.prefixCheck(r)[0],8>=d)try{t.style[a]=n}catch(u){y.debug&&console.log("Browser does not support ["+n+"] for ["+a+"]")}else if(s(t)&&s(t).isSVG&&w.Names.SVGAttribute(r))t.setAttribute(r,n);else{var c="webgl"===t.renderer?t.styleGL:t.style;c[a]=n}y.debug>=2&&console.log("Set "+r+" ("+a+"): "+n)}return[a,n]},flushTransformCache:function(t){function e(e){return parseFloat(w.getPropertyValue(t,e))}var r="";if((d||y.State.isAndroid&&!y.State.isChrome)&&s(t).isSVG){var n={translate:[e("translateX"),e("translateY")],skewX:[e("skewX")],skewY:[e("skewY")],scale:1!==e("scale")?[e("scale"),e("scale")]:[e("scaleX"),e("scaleY")],rotate:[e("rotateZ"),0,0]};f.each(s(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),n[t]&&(r+=t+"("+n[t].join(" ")+") ",delete n[t])})}else{var i,o;f.each(s(t).transformCache,function(e){return i=s(t).transformCache[e],"transformPerspective"===e?(o=i,!0):(9===d&&"rotateZ"===e&&(e="rotate"),void(r+=e+i+" "))}),o&&(r="perspective"+o+" "+r)}w.setPropertyValue(t,"transform",r)}};w.Hooks.register(),w.Normalizations.register(),y.hook=function(t,e,r){var i=n;return t=o(t),f.each(t,function(t,o){if(s(o)===n&&y.init(o),r===n)i===n&&(i=y.CSS.getPropertyValue(o,e));else{var a=y.CSS.setPropertyValue(o,e,r);"transform"===a[0]&&y.CSS.flushTransformCache(o),i=a}}),i};var E=function(){function t(){return a?D.promise||null:h}function i(){function t(t){function c(t,e){var r=n,i=n,s=n;return g.isArray(t)?(r=t[0],!g.isArray(t[1])&&/^[\d-]/.test(t[1])||g.isFunction(t[1])||w.RegEx.isHex.test(t[1])?s=t[1]:(g.isString(t[1])&&!w.RegEx.isHex.test(t[1])||g.isArray(t[1]))&&(i=e?t[1]:l(t[1],a.duration),t[2]!==n&&(s=t[2]))):r=t,e||(i=i||a.easing),g.isFunction(r)&&(r=r.call(o,b,C)),g.isFunction(s)&&(s=s.call(o,b,C)),[r||0,i,s]}function d(t,e){var r,n;return n=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return r=t,""}),r||(r=w.Values.getUnitType(t)),[n,r]}function v(){var t={myParent:o.parentNode||r.body,position:w.getPropertyValue(o,"position"),fontSize:w.getPropertyValue(o,"fontSize")},n=t.position===F.lastPosition&&t.myParent===F.lastParent,i=t.fontSize===F.lastFontSize;F.lastParent=t.myParent,F.lastPosition=t.position,F.lastFontSize=t.fontSize;var a=100,h={};if(i&&n)h.emToPx=F.lastEmToPx,h.percentToPxWidth=F.lastPercentToPxWidth,h.percentToPxHeight=F.lastPercentToPxHeight;else{var l=s(o).isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");y.init(l),t.myParent.appendChild(l),f.each(["overflow","overflowX","overflowY"],function(t,e){y.CSS.setPropertyValue(l,e,"hidden")}),y.CSS.setPropertyValue(l,"position",t.position),y.CSS.setPropertyValue(l,"fontSize",t.fontSize),y.CSS.setPropertyValue(l,"boxSizing","content-box"),f.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){y.CSS.setPropertyValue(l,e,a+"%")}),y.CSS.setPropertyValue(l,"paddingLeft",a+"em"),h.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(w.getPropertyValue(l,"width",null,!0))||1)/a,h.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(w.getPropertyValue(l,"height",null,!0))||1)/a,h.emToPx=F.lastEmToPx=(parseFloat(w.getPropertyValue(l,"paddingLeft"))||1)/a,t.myParent.removeChild(l)}return null===F.remToPx&&(F.remToPx=parseFloat(w.getPropertyValue(r.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),h.remToPx=F.remToPx,h.vwToPx=F.vwToPx,h.vhToPx=F.vhToPx,y.debug>=1&&console.log("Unit ratios: "+JSON.stringify(h),o),h}if(a.begin&&0===b)try{a.begin.call(p,p)}catch(x){setTimeout(function(){throw x},1)}if("scroll"===M){var E,B,T,P=/^x$/i.test(a.axis)?"Left":"Top",R=parseFloat(a.offset)||0;a.container?g.isWrapped(a.container)||g.isNode(a.container)?(a.container=a.container[0]||a.container,E=a.container["scroll"+P],T=E+f(o).position()[P.toLowerCase()]+R):a.container=null:(E=y.State.scrollAnchor[y.State["scrollProperty"+P]],B=y.State.scrollAnchor[y.State["scrollProperty"+("Left"===P?"Top":"Left")]],T=f(o).offset()[P.toLowerCase()]+R),h={scroll:{rootPropertyValue:!1,startValue:E,currentValue:E,endValue:T,unitType:"",easing:a.easing,scrollData:{container:a.container,direction:P,alternateValue:B}},element:o},y.debug&&console.log("tweensContainer (scroll): ",h.scroll,o)}else if("reverse"===M){if(!s(o).tweensContainer)return void f.dequeue(o,a.queue);"none"===s(o).opts.display&&(s(o).opts.display="auto"),"hidden"===s(o).opts.visibility&&(s(o).opts.visibility="visible"),s(o).opts.loop=!1,s(o).opts.begin=null,s(o).opts.complete=null,m.easing||delete a.easing,m.duration||delete a.duration,a=f.extend({},s(o).opts,a);var I=f.extend(!0,{},s(o).tweensContainer);for(var S in I)if("element"!==S){var O=I[S].startValue;I[S].startValue=I[S].currentValue=I[S].endValue,I[S].endValue=O,g.isEmptyObject(m)||(I[S].easing=a.easing),y.debug&&console.log("reverse tweensContainer ("+S+"): "+JSON.stringify(I[S]),o)}h=I}else if("start"===M){var I;s(o).tweensContainer&&s(o).isAnimating===!0&&(I=s(o).tweensContainer),f.each(A,function(t,e){if(RegExp("^"+w.Lists.colors.join("$|^")+"$").test(t)){var r=c(e,!0),i=r[0],o=r[1],s=r[2];if(w.RegEx.isHex.test(i)){for(var a=["Red","Green","Blue"],h=w.Values.hexToRgb(i),l=s?w.Values.hexToRgb(s):n,u=0;uN;N++){var H={delay:R.delay,progress:R.progress};N===L-1&&(H.display=R.display,H.visibility=R.visibility,H.complete=R.complete),E(p,"reverse",H)}return t()}};y=f.extend(E,y),y.animate=E;var C=e.requestAnimationFrame||p;return y.State.isMobile||r.hidden===n||r.addEventListener("visibilitychange",function(){r.hidden?(C=function(t){return setTimeout(function(){t(!0)},16)},u()):C=e.requestAnimationFrame||p}),t.Velocity=y,t!==e&&(t.fn.velocity=E,t.fn.velocity.defaults=y.defaults),f.each(["Down","Up"],function(t,e){y.Redirects["slide"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l=h.begin,u=h.complete,c={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};h.display===n&&(h.display="Down"===e?"inline"===y.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),h.begin=function(){var r="webgl"===t.renderer?t.styleGL:t.style;l&&l.call(s,s);for(var n in c){d[n]=r[n];var i=y.CSS.getPropertyValue(t,n);c[n]="Down"===e?[i,0]:[0,i]}d.overflow=r.overflow,r.overflow="hidden"},h.complete=function(){for(var t in d)style[t]=d[t];u&&u.call(s,s),a&&a.resolver(s)},y(t,c,h)}}),f.each(["In","Out"],function(t,e){y.Redirects["fade"+e]=function(t,r,i,o,s,a){var h=f.extend({},r),l={opacity:"In"===e?1:0},u=h.complete;i!==o-1?h.complete=h.begin=null:h.complete=function(){u&&u.call(s,s),a&&a.resolver(s)},h.display===n&&(h.display="In"===e?"auto":"none"),y(this,l,h)}}),y}(window.jQuery||window.Zepto||window,window,document)}),function(t){t.HTMLGL=t.HTMLGL||{},t.HTMLGL.util={getterSetter:function(t,e,r,n){Object.defineProperty?Object.defineProperty(t,e,{get:r,set:n}):document.__defineGetter__&&(t.__defineGetter__(e,r),t.__defineSetter__(e,n)),t["get"+e]=r,t["set"+e]=n},emitEvent:function(t,e){var r=new MouseEvent(e.type,e);r.dispatcher="html-gl",e.stopPropagation(),t.dispatchEvent(r)},debounce:function(t,e,r){var n;return function(){var i=this,o=arguments,s=function(){n=null,r||t.apply(i,o)},a=r&&!n;clearTimeout(n),n=setTimeout(s,e),a&&t.apply(i,o)}}}}(window),function(t){var e=function(t){},r=e.prototype;r.getElementByCoordinates=function(e,r){var n,i,o=this;return t.HTMLGL.elements.forEach(function(t){n=document.elementFromPoint(e-parseInt(t.transformObject.translateX||0),r-parseInt(t.transformObject.translateY||0)),o.isChildOf(n,t)&&(i=n)}),i},r.isChildOf=function(t,e){for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1},t.HTMLGL.GLElementResolver=e}(window),function(t){HTMLGL=t.HTMLGL=t.HTMLGL||{},HTMLGL.JQ_PLUGIN_NAME="htmlgl",HTMLGL.CUSTOM_ELEMENT_TAG_NAME="html-gl",HTMLGL.READY_EVENT="htmlglReady",HTMLGL.context=void 0,HTMLGL.stage=void 0,HTMLGL.renderer=void 0,HTMLGL.elements=[],HTMLGL.pixelRatio=null,HTMLGL.oldPixelRatio=null,HTMLGL.enabled=!0,HTMLGL.scrollX=0,HTMLGL.scrollY=0;var e=function(){t.HTMLGL.context=this,this.createStage(),this.updateScrollPosition(),this.initListeners(),this.elementResolver=new t.HTMLGL.GLElementResolver(this),document.body?this.initViewer():document.addEventListener("DOMContentLoaded",this.initViewer.bind(this))},r=e.prototype;r.initViewer=function(){this.createViewer(),this.resizeViewer(),this.appendViewer()},r.createViewer=function(){t.HTMLGL.renderer=this.renderer=PIXI.autoDetectRenderer(0,0,{transparent:!0}),this.renderer.view.style.position="fixed",this.renderer.view.style.top="0px",this.renderer.view.style.left="0px",this.renderer.view.style["pointer-events"]="none",this.renderer.view.style.pointerEvents="none"},r.appendViewer=function(){document.body.appendChild(this.renderer.view),requestAnimationFrame(this.redrawStage.bind(this))},r.resizeViewer=function(){var e=this,r=t.innerWidth,n=t.innerHeight;HTMLGL.pixelRatio=window.devicePixelRatio||1,console.log(HTMLGL.pixelRatio),r*=HTMLGL.pixelRatio,n*=HTMLGL.pixelRatio,HTMLGL.pixelRatio!==HTMLGL.oldPixelRatio?(this.disable(),this.updateTextures().then(function(){e.updateScrollPosition(),e.updateElementsPositions();var i=1/HTMLGL.pixelRatio;e.renderer.view.style.transformOrigin="0 0",e.renderer.view.style.webkitTransformOrigin="0 0",e.renderer.view.style.transform="scaleX("+i+") scaleY("+i+")",e.renderer.view.style.webkitTransform="scaleX("+i+") scaleY("+i+")",e.renderer.resize(r,n),this.enable(),t.HTMLGL.renderer.render(t.HTMLGL.stage)})):(this.renderer.view.parentNode&&this.updateTextures(),this.updateElementsPositions(),this.markStageAsChanged()),HTMLGL.oldPixelRatio=HTMLGL.pixelRatio},r.initListeners=function(){t.addEventListener("scroll",this.updateScrollPosition.bind(this)),t.addEventListener("resize",t.HTMLGL.util.debounce(this.resizeViewer,500).bind(this)),t.addEventListener("resize",this.updateElementsPositions.bind(this)),document.addEventListener("click",this.onMouseEvent.bind(this),!0),document.addEventListener("mousemove",this.onMouseEvent.bind(this),!0),document.addEventListener("mouseup",this.onMouseEvent.bind(this),!0),document.addEventListener("mousedown",this.onMouseEvent.bind(this),!0),document.addEventListener("touchstart",this.onMouseEvent.bind(this)),document.addEventListener("touchend",this.onMouseEvent.bind(this))},r.updateScrollPosition=function(){var e={};if(void 0!=window.pageYOffset)e={left:pageXOffset,top:pageYOffset};else{var r,n,i=document,o=i.documentElement,s=i.body;r=o.scrollLeft||s.scrollLeft||0,n=o.scrollTop||s.scrollTop||0,e={left:r,top:n}}this.document.x=-e.left*HTMLGL.pixelRatio,this.document.y=-e.top*HTMLGL.pixelRatio,t.HTMLGL.scrollX=e.left,t.HTMLGL.scrollY=e.top,this.markStageAsChanged()},r.createStage=function(){t.HTMLGL.stage=this.stage=new PIXI.Stage(16777215),t.HTMLGL.document=this.document=new PIXI.DisplayObjectContainer,this.stage.addChild(t.HTMLGL.document)},r.redrawStage=function(){t.HTMLGL.stage.changed&&t.HTMLGL.renderer&&t.HTMLGL.enabled&&(t.HTMLGL.renderer.render(t.HTMLGL.stage),t.HTMLGL.stage.changed=!1)},r.updateTextures=function(){var e=[];return t.HTMLGL.elements.forEach(function(t){e.push(t.updateTexture())}),Promise.all(e)},r.initElements=function(){t.HTMLGL.elements.forEach(function(t){t.init()})},r.updateElementsPositions=function(){t.HTMLGL.elements.forEach(function(t){t.updateBoundingRect(),t.updatePivot(),t.updateSpriteTransform()})},r.onMouseEvent=function(e){var r=e.x||e.pageX,n=e.y||e.pageY,i="html-gl"!==e.dispatcher?this.elementResolver.getElementByCoordinates(r,n):null;i?t.HTMLGL.util.emitEvent(i,e):null},r.markStageAsChanged=function(){t.HTMLGL.stage&&!t.HTMLGL.stage.changed&&(requestAnimationFrame(this.redrawStage),t.HTMLGL.stage.changed=!0)},r.disable=function(){t.HTMLGL.enabled=!0},r.enable=function(){t.HTMLGL.enabled=!1},t.HTMLGL.pixelRatio=window.devicePixelRatio||1,t.HTMLGL.GLContext=e,new e}(window),function(t){var e=function(t,e){this.element=t,this.images=this.element.querySelectorAll("img"),this.callback=e,this.imagesLoaded=this.getImagesLoaded(),this.images.length===this.imagesLoaded?this.onImageLoaded():this.addListeners()},r=e.prototype;r.getImagesLoaded=function(){for(var t=0,e=0;e