📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv2.demodesign.com.tr
/
panel
/
tasarla
/
js
📝
FancyProductDesigner-all.min.js
← Geri Dön
/* * Fancy Product Designer 5.2.8 * Copyright 2013, Rafael Dery * * Only for the sale at the envato marketplaces */ fabric.Object.prototype.offsetCorner=12,fabric.util.object.extend(fabric.Textbox.prototype,{maxWidth:0,fixedWidth:!0,hyphenation:!1,get2DCursorLocation:function(t,e){void 0===t&&(t=this.selectionStart);for(var n=e?this._unwrappedTextLines:this._textLines,i=n.length,o=0;o<i;o++){if(t<=n[o].length)return{lineIndex:o,charIndex:t};this._longLines[o]&&t++,t-=n[o].length+1}return{lineIndex:o-1,charIndex:n[o-1].length<t?n[o-1].length:t}},_renderText:function(t){"stroke"===this.paintFirst?(this._renderTextStroke(t),this._renderTextFill(t)):(this._renderTextFill(t),this._renderTextStroke(t)),this.hyphenation&&this._renderTextOversize(t)},_renderTextOversize:function(t){for(var e=0,n=0,i=this._textLines.length;n<i;n++){var o=this.measureLine(n).width,r=this._getLineLeftOffset(n),a=this.getHeightOfLine(n);this._longLines[n]&&t.fillRect(this._getLeftOffset()+r+o+2,this._getTopOffset()+e+a/2-1,5,this.fontSize/15),e+=a}},_getNewSelectionStartFromOffset:function(t,e,n,i,o){var e=t.x-e,t=n-t.x,r=i+(e<t||t<0?0:1);this.flipX&&(r=o-r);for(var a=0,s=0,l=0,c=0;c<this._textLines.length&&!(r<=(a+=this._textLines[c].length)+s);c++)this._longLines[c]&&(r--,l++),"\n"!==this.text[a+s]&&" "!==this.text[a+s]||s++;return r>this.text.length&&(r=this.text.length),r-c+s+l},_wrapLine:function(t,e,n){var i=0,o=[],r=[],a=t.split(this._reSpaceAndTab),s="",l=0,c=0,u=0,d=!0,h=this._getWidthOfCharSpacing();this._longLines=[];for(var p=this.maxWidth||this.fixedWidth&&this.width,f=!1,g=0;g<a.length;g++){var s=fabric.util.string.graphemeSplit(a[g]),m=this._measureWord(s,e,l);if(!this.breakWords)if(p&&p<m){0!=r.length&&(o.push(r),this._longLines.push(f),f=!1,i=0,r=[]);for(var v=0,b=0,y=s.length;b<y&&v<=+p;b++)v+=this._measureWord(s[b],e,b+l);var w=s.splice(0,b-1),f=!0;a.splice(g,1,w.join(""),s.join("")),g--,d=!0;continue}if((i+=c+m-h)>=this.width)if(this.breakWords){i-=m,r.push(" ");for(var x=s.splice(0);x.length;){var C=this._measureWord(x[0],e,l);i+C>this.width&&(o.push(r),this._longLines.push(!0),r=[],i=0),r.push(x.shift()),l++,i+=C}}else d||(o.push(r),this._longLines.push(f),i=m,d=!(f=!(r=[])));else i+=h;l+=s.length,d||r.push(" "),r=r.concat(s),c=this._measureWord(" ",e,l),l++,u<m&&(u=m),d=!1}return g&&o.push(r),this._longLines.push(!1),this.breakWords?this.dynamicMinWidth=0:u>this.dynamicMinWidth&&(this.dynamicMinWidth=u-h),o}}),fabric.util.snapToGrid=function(t,e,n){if("undefined"!=typeof Symbol){var i=null,o=!0,r=!1,a=void 0;try{for(var s=t.x[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var l=u.value,c=(l+e.offsetX-n)%e.size-n/2,u=Math.abs(c);u<n&&((i=i||{}).x=l+u,i.tx=l,i.dx=c)}}catch(t){r=!0,a=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw a}}var d=!0,h=!1,p=void 0;try{for(var f=t.y[Symbol.iterator]();!(d=(v=f.next()).done);d=!0){var g=v.value,m=(g+e.offsetY-n)%e.size-n/2,v=Math.abs(m);v<n&&((i=i||{}).y=g+v,i.ty=g,i.dy=m)}}catch(t){h=!0,p=t}finally{try{!d&&f.return&&f.return()}finally{if(h)throw p}}return i&&(i.distance=Math.abs(Math.round(i.dx&&i.dy&&Math.min(Math.abs(i.dx),Math.abs(i.dy))||i.dx||i.dy))),i}},fabric.util.snapToPoints=function(t,e,n){if("undefined"!=typeof Symbol){var i=null,o=n,r=!0,a=!1,s=void 0;try{for(var l,c=e[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var u=l.value;if(u.points){var d=!0,h=!1,p=void 0;try{for(var f,g=u.points[Symbol.iterator]();!(d=(f=g.next()).done);d=!0){var m=f.value,v=!0,b=!1,y=void 0;try{for(var w=t.points[Symbol.iterator]();!(v=(D=w.next()).done);v=!0){var x=D.value,C=m.x-x.x,A=m.y-x.y,D=(Math.abs(C)+Math.abs(A))/2;D<o&&(o=D,i={object:u,x:m.x,tx:x.x,dx:C,y:m.y,ty:x.y,dy:A})}}catch(t){b=!0,y=t}finally{try{!v&&w.return&&w.return()}finally{if(b)throw y}}}}catch(t){h=!0,p=t}finally{try{!d&&g.return&&g.return()}finally{if(h)throw p}}}}}catch(t){a=!0,s=t}finally{try{!r&&c.return&&c.return()}finally{if(a)throw s}}return i&&(i.distance=Math.round(Math.min(Math.abs(i.dx),Math.abs(i.dy)))),i}},fabric.util.snapToBounds=function(t,e,n){if("undefined"!=typeof Symbol){var i=null,o=n;if(t.cx){var r=!0,a=!1,s=void 0;try{for(var l=e[Symbol.iterator]();!(r=(u=l.next()).done);r=!0){var c,u,d=u.value;d.cx&&void 0===d.cy&&(c=d.cx-t.cx,(u=Math.abs(c))<o&&(o=u,(i=i||{}).objectX=d,i.x=d.cx,i.tx=t.cx,i.dx=c))}}catch(t){a=!0,s=t}finally{try{!r&&l.return&&l.return()}finally{if(a)throw s}}}if(o=n,t.cy){var h=!0,p=!1,f=void 0;try{for(var g=e[Symbol.iterator]();!(h=(v=g.next()).done);h=!0){var m,v,b=v.value;b.cy&&void 0===b.cx&&(m=b.cy-t.cy,(v=Math.abs(m))<o&&(o=v,(i=i||{}).objectY=b,i.y=b.cy,i.ty=t.cy,i.dy=m))}}catch(t){p=!0,f=t}finally{try{!h&&g.return&&g.return()}finally{if(p)throw f}}}o=n;var y=!0,w=!1,x=void 0;try{for(var C,A=e[Symbol.iterator]();!(y=(C=A.next()).done);y=!0){var D=C.value;if(D.x){var S=!0,_=!1,P=void 0;try{for(var k,F=(D.x.length?D.x:[D.x])[Symbol.iterator]();!(S=(k=F.next()).done);S=!0){var I=k.value,E=!0,L=!1,N=void 0;try{for(var O=t.x[Symbol.iterator]();!(E=(M=O.next()).done);E=!0){var T=M.value,B=I-T,M=Math.abs(B);M<o&&(o=M,(i=i||{}).objectX=D,i.x=I,i.tx=T,i.dx=B)}}catch(t){L=!0,N=t}finally{try{!E&&O.return&&O.return()}finally{if(L)throw N}}}}catch(t){_=!0,P=t}finally{try{!S&&F.return&&F.return()}finally{if(_)throw P}}}}}catch(t){w=!0,x=t}finally{try{!y&&A.return&&A.return()}finally{if(w)throw x}}o=n;var z=!0,j=!1,R=void 0;try{for(var U,W=e[Symbol.iterator]();!(z=(U=W.next()).done);z=!0){var H=U.value;if(H.y){var V=!0,q=!1,G=void 0;try{for(var Y,Z=(H.y.length?H.y:[H.y])[Symbol.iterator]();!(V=(Y=Z.next()).done);V=!0){var J=Y.value,X=!0,Q=!1,K=void 0;try{for(var $=t.y[Symbol.iterator]();!(X=(nt=$.next()).done);X=!0){var tt=nt.value,et=J-tt,nt=Math.abs(et);nt<o&&(o=nt,(i=i||{}).objectY=H,i.y=J,i.ty=tt,i.dy=et)}}catch(t){Q=!0,K=t}finally{try{!X&&$.return&&$.return()}finally{if(Q)throw K}}}}catch(t){q=!0,G=t}finally{try{!V&&Z.return&&Z.return()}finally{if(q)throw G}}}}}catch(t){j=!0,R=t}finally{try{!z&&W.return&&W.return()}finally{if(j)throw R}}return i&&(i.distance=Math.abs(Math.round(i.dx&&i.dy&&Math.min(Math.abs(i.dx),Math.abs(i.dy))||i.dx||i.dy))),i}},fabric.util.createSnapObject=function(t){var e=t.calcCoords(!0),n=[e.tl.x,e.tr.x,e.bl.x,e.br.x],i=[e.tl.y,e.tr.y,e.bl.y,e.br.y],o=fabric.util.array.min(n),r=fabric.util.array.max(n),n=fabric.util.array.min(i),i=fabric.util.array.max(i);return{instance:t,points:[e.tl,e.tr,e.br,e.bl],cx:o+(r-o)/2,cy:n+(i-n)/2,x:[o,r],y:[n,i]}},fabric.Canvas.prototype.renderSnapping=function(t,e){var i=this.contextTop,n=this.viewportTransform;function o(t){if(t&&t.points){var e=t.points;i.moveTo(e[0].x,e[0].y);for(var n=e.length;n--;)i.lineTo(e[n].x,e[n].y)}}this._currentTransform&&t&&this.clearContext(i),i.save(),i.strokeStyle=e,i.transform(n[0],n[1],n[2],n[3],n[4],n[5]),i.beginPath(),o(t.object),o(t.objectX),o(t.objectY),o(this.__snapCache.target),t.object&&(i.moveTo(t.tx,t.ty),i.lineTo(t.x,t.y),i.arc(t.x,t.y,2,0,2*Math.PI)),t.objectX&&(i.moveTo(t.x,0),i.lineTo(t.x,this.originalHeight)),t.objectY&&(i.moveTo(0,t.y),i.lineTo(this.originalWidth,t.y)),i.stroke(),i.restore()},fabric.Canvas.prototype.gridSnapMove=function(t){var e=t.area,n=t.objects||this._objects;if(!this.__snapCache){var i,o=t.guidlines||[];for(i in n){var r=n[i];r!==t.target&&r.snappable&&r.visible&&o.push(fabric.util.createSnapObject(r))}e&&o.push({instance:this,x:[e.x1,e.x2],y:[e.y1,e.y2]}),this.__snapCache={area:e,objects:o,grid:t.grid}}this.__snapCache.target=fabric.util.createSnapObject(t.target);var a=null,e=fabric.util.snapToPoints(this.__snapCache.target,this.__snapCache.objects,t.tolerance);(a=a||e)&&e&&e.distance<a.distance&&(a=e);e=fabric.util.snapToBounds(this.__snapCache.target,this.__snapCache.objects,t.tolerance);return(a=a||e)&&e&&e.distance<a.distance&&(a=e),t.grid&&(e=fabric.util.snapToGrid(this.__snapCache.target,this.__snapCache.grid,t.tolerance),(a=a||e)&&e&&e.distance<a.distance&&(a=e)),a&&(a.dx&&(t.target.left+=a.dx),a.dy&&(t.target.top+=a.dy),this.fire("object:snapto",{e:a})),a},fabric.util.object.extend(fabric.Object.prototype,{snappable:!0}),fabric.util.object.extend(fabric.Canvas.prototype,{tolerance:10,renderSnappingHelperLines:!0,setSnapping:function(t){function e(){this.renderSnappingHelperLines&&this.snapTo&&this.renderSnapping(this.snapTo,"#ffaaaa")}t?(this.on("object:moving",this.gridSnapMoveWrapper),this.on("mouse:up",this.clearSnapping),this.on("after:render",e)):(this.off("object:moving",this.gridSnapMoveWrapper),this.off("mouse:up",this.clearSnapping),this.off("after:render",e)),this.snapping=t},snapping:!1,clearSnapping:function(){delete this.__snapCache,this.clearContext(this.contextTop),this.snapTo=null},gridSnapMoveWrapper:function(t){if("undefined"!=typeof Symbol&&!t.e.shiftKey&&t.target.snappable){var e=[{cx:this.originalWidth/2},{cy:this.originalHeight/2}];if(this.supportLines){var n=!0,i=!1,o=void 0;try{for(var r=this.supportLines[Symbol.iterator]();!(n=(a=r.next()).done);n=!0){var a=a.value;e.push(a.x?{instance:a,x:a.x}:{instance:a,y:a.y})}}catch(t){i=!0,o=t}finally{try{!n&&r.return&&r.return()}finally{if(i)throw o}}}if(this.guidlines){var s=!0,l=!1,c=void 0;try{for(var u=this.guidlines[Symbol.iterator]();!(s=(d=u.next()).done);s=!0){var d=d.value;e.push(d.x?{instance:d,x:d.x}:{instance:d,y:d.y})}}catch(t){l=!0,c=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw c}}}this.snapTo=this.gridSnapMove({tolerance:this.tolerance,guidlines:e,objects:this._objects,target:t.target,area:{x1:this.offsets.left,y1:this.offsets.top,x2:this.originalWidth-this.offsets.right,y2:this.originalHeight-this.offsets.bottom},grid:this.grid&&{offsetX:this.offsets.left-this.grid._gridOffset.x,offsetY:this.offsets.top-this.grid._gridOffset.y,size:this.gridSize}})}}}),fabric.Text.prototype._constrainScale=function(t){if(Math.abs(t)<this.minScaleLimit)return t<0?-this.minScaleLimit:this.minScaleLimit;if(void 0!==this.minFontSize&&parseFloat(Number(t*this.fontSize).toFixed(0))<this.minFontSize)return this.minFontSize/this.fontSize;if(void 0!==this.maxFontSize&&parseFloat(Number(t*this.fontSize).toFixed(0))>this.maxFontSize)return this.maxFontSize/this.fontSize;return t},fabric.util.object.extend(fabric.Text.prototype,{_createTextCharSpan:function(t,e,n,i){e.fontWeight=this.fontWeight,e.fontStyle=this.fontStyle;var o=t!==t.trim()||t.match(/ +/g),r=this.getSvgSpanStyles(e,o),a=(r+="underline"===this.textDecoration?" text-decoration: underline;":"")?'style="'+r+'"':"",o=e.deltaY,r="",e=fabric.Object.NUM_FRACTION_DIGITS;return o&&(r=' dy="'+fabric.util.toFixed(o,e)+'" '),['<tspan x="',fabric.util.toFixed(n,e),'" y="',fabric.util.toFixed(i,e),'" ',r,a,">",fabric.util.string.escapeXml(t),"</tspan>"].join("")}}),fabric.Object.prototype._fpdBasicCalcCoords=function(t){var e,n,i,o,r,a,s,l,c=fabric.util.multiplyTransformMatrices,u=fabric.util.transformPoint,d=fabric.util.degreesToRadians,h=this._calcRotateMatrix(),p=c(this._calcTranslateMatrix(),h),f=this.getViewportTransform(),g=t?p:c(f,p),m=this._getTransformedDimensions(),v=m.x/2,h=m.y/2,c=u({x:-v,y:-h},g),f=u({x:v,y:-h},g),p=u({x:-v,y:h},g),v=u({x:v,y:h},g);this.offsetCorner&&(h=m.x/2+this.offsetCorner,m=m.y/2+this.offsetCorner,c._corner=u({x:-h,y:-m},g),f._corner=u({x:h,y:-m},g),p._corner=u({x:-h,y:m},g),v._corner=u({x:h,y:m},g)),t||(this.padding&&(i=this.padding,n=d(this.angle),s=(o=(l=fabric.util.cos(n))*i)+(r=(e=fabric.util.sin(n))*i),a=o-r,c.x-=a,c.y-=s,f.x+=s,f.y-=a,p.x-=s,p.y+=a,v.x+=a,v.y+=s,this.offsetCorner&&(c._corner.x-=a,c._corner.y-=s,f._corner.x+=s,f._corner.y-=a,p._corner.x-=s,p._corner.y+=a,v._corner.x+=a,v._corner.y+=s)),n=new fabric.Point((c.x+p.x)/2,(c.y+p.y)/2),i=new fabric.Point((f.x+c.x)/2,(f.y+c.y)/2),o=new fabric.Point((v.x+f.x)/2,(v.y+f.y)/2),r=new fabric.Point((v.x+p.x)/2,(v.y+p.y)/2),a=f.x,s=f.y,l=new fabric.Point(a+e*this.rotatingPointOffset,s-l*this.rotatingPointOffset),this.offsetCorner&&(l._corner=new fabric.Point(f._corner.x,f._corner.y)));p={tl:c,tr:f,br:v,bl:p};return t||(p.ml=n,p.mt=i,p.mr=o,p.mb=r,p.mtr=l),p},fabric.Object.prototype._fpdBasicsetCornerCoords=function(){var t,e,n,i=this.oCoords,o=fabric.util.degreesToRadians(45-this.angle),r=.707106*this.cornerSize,a=r*fabric.util.cos(o),s=r*fabric.util.sin(o);for(n in i)e=i[n]._corner?(t=i[n]._corner.x,i[n]._corner.y):(t=i[n].x,i[n].y),i[n].corner={tl:{x:t-s,y:e-a},tr:{x:t+a,y:e-s},bl:{x:t-a,y:e+s},br:{x:t+s,y:e+a}}},fabric.Canvas.prototype._fpdBasicgetRotatedCornerCursor=function(t,e,n){var i=Math.round(e.angle%360/45);switch(i<0&&(i+=8),i+={mt:0,tr:1,mr:2,br:3,mb:4,bl:5,ml:6,tl:7}[t],i%=8,t){case"tl":return e.copyable?"copy":"default";case"bl":return"pointer"}return this.cursorMap[i]},fabric.Object.prototype._fpdBasicdrawControl=function(t,e,n,i,o){var r=this.cornerSize,a=r-8,s=this.offsetCorner,l=!1;if(this.isControlVisible(t)){var c=this._calculateCurrentDimensions(),u=c.x;c.y;if("br"==t||"mtr"==t||"tl"==t||"bl"==t||"ml"==t||"mr"==t||"mb"==t||"mt"==t)switch(t){case"tl":i-=s,o-=s,l=!(!this.__editorMode&&!this.copyable)&&String.fromCharCode("0xe942");break;case"mtr":i=i+u/2+s,o-=s,l=!(!this.__editorMode&&!this.rotatable)&&String.fromCharCode("0xe923");break;case"br":i+=s,o+=s,l=!(!this.__editorMode&&!this.resizable||"textbox"===this.type)&&String.fromCharCode("0xe922");break;case"bl":i-=s,o+=s,l=!(!this.__editorMode&&!this.removable)&&String.fromCharCode("0xe926")}this.transparentCorners||e.clearRect(i,o,r,r);c="mt"==t||"mb"==t?5:0;e.fillStyle=this.cornerColor,("ml"!=t&&"mr"!=t||this.lockScalingX)&&("mt"!=t&&"mb"!=t||this.lockScalingY)?l&&(e.fillRect(i,o,r,r),e.font=a+"px FontFPD",e.fillStyle=this.cornerIconColor,e.textAlign="left",e.textBaseline="top",e.fillText(l,i+4+c,o+4)):(e.beginPath(),i+=12,o+=12,e.arc(i,o,4,0,2*Math.PI),e.fillStyle=this.cornerIconColor,e.fill())}},0==fabric.version.search("2.3.2")&&fabric.util.object.extend(fabric.Canvas.prototype,{_setSVGObject:function(t,e,n){var i,o,r=e.toSVG(n);e.clippingRect&&e.visible?(i=(o=new fabric.Rect({left:e.clippingRect.left,top:e.clippingRect.top,fill:"transparent",width:e.clippingRect.width,height:e.clippingRect.height,originX:"left",originY:"top"})).getCenterPoint(),n=-o.width/2,o=-o.height/2,n=i.x+n,i=i.y+o,o=e.id||++fabric.Object.__uid,t.push('<clipPath id="clip-'+o+'"><rect x="'+n+'" y="'+i+'" width="'+e.clippingRect.width+'" height="'+e.clippingRect.height+'" angle="'+(e.clippingRect.angle||0)+'"></rect></clipPath>'),t.push('<g clip-path="url(#clip-'+o+')">'+r+"</g>")):e.visible&&t.push(r)}});var FPDPathGroupName="1.6.7"===fabric.version?"path-group":"group",FPDUtil={isIE:function(){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")&&parseInt(t.split("msie")[1])},rekeyDeprecatedKeys:function(t){for(var e=[{old:"x",replace:"left"},{old:"y",replace:"top"},{old:"degree",replace:"angle"},{old:"currentColor",replace:"fill"},{old:"filters",replace:"availableFilters"},{old:"textSize",replace:"fontSize"},{old:"font",replace:"fontFamily"},{old:"scale",replace:["scaleX","scaleY"]},{old:"uploadZoneScaleMode",replace:"scaleMode"}],n=0;n<e.length;++n)if(t.hasOwnProperty(e[n].old)&&!t.hasOwnProperty(e[n].replace)){var i=e[n].replace;if("object"==typeof i)for(var o=0;o<i.length;++o)t[i[o]]=t[e[n].old];else t[e[n].replace]=t[e[n].old];delete t[e[n].old]}return t},log:function(t,e){if("undefined"==typeof console)return!1;"info"===e?console.info(t):"error"===e?console.error(t):"warn"===e?console.warn(t):console.log(t)},isUrl:function(t){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t)},removeFromArray:function(t,e){e=t.indexOf(e);return-1<e&&t.splice(e,1),t},isXML:function(t){try{return xmlDoc=jQuery.parseXML(t),!0}catch(t){return!1}},elementIsColorizable:function(t){if("text"===this.getType(t.type))return"text";if(!t.source)return!1;if(1==(e=t.source.split(".")).length)return-1==e[0].search("data:image/png;")?t.fill=t.colors=!1:"dataurl";var e=t.source.split("?")[0].split(".");return-1!=jQuery.inArray("png",e)||FPDUtil.isSVG(t)?FPDUtil.isSVG(t)?"svg":"png":t.fill=t.colors=!1},getType:function(t){return"text"===t||"i-text"===t||"curvedText"===t||"textbox"===t?"text":"image"},updateTooltip:function(t){(t?t.find(".fpd-tooltip"):jQuery(".fpd-tooltip")).each(function(t,e){e=jQuery(e);e.hasClass("tooltipstered")?e.tooltipster("reposition"):e.tooltipster({offsetY:0,position:"bottom",theme:".fpd-tooltip-theme",touchDevices:!1})})},arrayUnique:function(t){for(var e=t.concat(),n=0;n<e.length;++n)for(var i=n+1;i<e.length;++i)e[n]===e[i]&&e.splice(i--,1);return e},createScrollbar:function(t,e){e=void 0===e?"y":e,t.hasClass("mCustomScrollbar")?(t.mCustomScrollbar("update"),t.mCustomScrollbar("scrollTo",0)):t.mCustomScrollbar({scrollbarPosition:"outside",autoExpandScrollbar:!0,autoHideScrollbar:!1,scrollInertia:200,axis:e,keyboard:{enable:!1},mouseWheel:{preventDefault:!0},callbacks:{onTotalScrollOffset:100,onTotalScroll:function(){jQuery(this).trigger("_sbOnTotalScroll"),FPDUtil.refreshLazyLoad(jQuery(this).find(".fpd-grid"),!0)}}})},notEmpty:function(t){return void 0!==t&&!1!==t&&0!==t.length},showModal:function(t,e,n,i){n=void 0===n?"":n,(i=void 0===i?jQuery("body"):i).is("body")&&i.addClass("fpd-overflow-hidden");e=e?"fpd-fullscreen":"";return 0===jQuery(".fpd-modal-internal").length&&i.append('<div class="fpd-modal-internal fpd-modal-overlay"><div class="fpd-modal-wrapper fpd-shadow-3"><div class="fpd-modal-close"><span class="fpd-icon-close"></span></div><div class="fpd-modal-content"></div></div></div>').children(".fpd-modal-internal:first").click(function(t){t=jQuery(t.target);t.hasClass("fpd-modal-overlay")&&t.find(".fpd-modal-close").click()}),"prompt"===n?t='<input type="text" placeholder="'+t+'" /><span class="fpd-btn"></span>':"confirm"===n&&(t='<div class="fpd-confirm-msg">'+t+'</div><span class="fpd-btn fpd-confirm"></span>'),i.children(".fpd-modal-internal").attr("data-type",n).removeClass("fpd-fullscreen").addClass(e).fadeIn(300).find(".fpd-modal-content").html(t),i.children(".fpd-modal-internal")},showMessage:function(t,e){e=void 0===e||e;var n=jQuery("body"),n=(0<n.children(".fpd-snackbar-wrapper").length?n:n.append('<div class="fpd-snackbar-wrapper"></div>')).children(".fpd-snackbar-wrapper"),i=jQuery('<div class="fpd-snackbar fpd-shadow-1"><p></p></div>');return i.children("p").html(t),i.appendTo(n),setTimeout(function(){i.addClass("fpd-show-up"),e&&setTimeout(function(){i.remove()},5e3)},10),i},loadGridImage:function(t,e){var n;0<t.length&&e&&(t.addClass("fpd-on-loading"),(n=new Image).src=e,n.onload=function(){t.data("originWidth",this.width).data("originHeight",this.height).removeClass("fpd-on-loading").fadeOut(0).stop().fadeIn(200).css("background-image",'url("'+this.src+'")')},n.onerror=function(){t.parent(".fpd-item").remove()})},refreshLazyLoad:function(t,e){if(t&&0<t.length)for(var n=t.children(".fpd-item.fpd-hidden:first"),i=0,o=e?15:0;(i<o||t.parent(".mCSB_container").height()-150<t.parents(".fpd-scroll-area:first").height())&&0<n.length;){var r=n.children("picture");n.removeClass("fpd-hidden"),FPDUtil.loadGridImage(r,r.data("img")),n=n.next(".fpd-item.fpd-hidden"),i++}},parseFabricObjectToFPDElement:function(t){if(!t)return{};for(var e=new FancyProductDesignerOptions,n=Object.keys(e.defaults.elementParameters),e="text"===FPDUtil.getType(t.type)?Object.keys(e.defaults.textParameters):Object.keys(e.defaults.imageParameters),n=jQuery.merge(n,e),i={},o=0;o<n.length;++o){var r=n[o];void 0!==t[r]&&(i[r]=t[r])}return{type:FPDUtil.getType(t.type),source:t.source,title:t.title,parameters:i}},popupBlockerAlert:function(t,e){null!=t&&void 0!==t||FPDUtil.showModal(e.getTranslation("misc","popup_blocker_alert"))},getScalingByDimesions:function(t,e,n,i,o){var r=1,a=0!==(n="number"!=typeof n?0:n),s=0!==(i="number"!=typeof i?0:i);return r="cover"===(o=void 0===o?"fit":o)?n-t<i-e?a?Math.max(n/t,i/e):1:s?Math.max(n/t,i/e):1:e<t?a?Math.min(n/t,i/e):1:s?Math.min(n/t,i/e):1,parseFloat(r.toFixed(10))},localStorageAvailable:function(){var e=!0;try{window.localStorage.length,window.localStorage.setItem("fpd-storage","just-testing")}catch(t){e=!1}return e},checkImageDimensions:function(t,e,n){var i=t.currentViewInstance.options.customImageParameters,o=t.currentViewInstance.getUploadZone(t.currentViewInstance.currentUploadZone);if(o&&(i=$.extend({},i,o)),e>i.maxW||e<i.minW||n>i.maxH||n<i.minH){t._loadingCustomImage=!1,t.mainBar&&(t.mainBar.toggleDialog(!1),t.currentViewInstance.currentUploadZone&&t.mainBar.toggleUploadZonePanel(!1));i=t.getTranslation("misc","uploaded_image_size_alert").replace("%minW",i.minW).replace("%minH",i.minH).replace("%maxW",i.maxW).replace("%maxH",i.maxH);return FPDUtil.showModal(i),!1}return!0},elementHasColorSelection:function(t){return(Array.isArray(t.colors)||Boolean(t.colors)||t.colorLinkGroup||t.__editorMode)&&!1!==FPDUtil.elementIsColorizable(t)},elementAvailableColors:function(t,e){var n=[];if(t.type==FPDPathGroupName){var i=t.getObjects();if(1===i.length)n=t.colors;else{n=[];for(var o=0;o<i.length;++o){var r=i[o],r=tinycolor(r.fill);n.push(r.toHexString())}}}else n=(t.colorLinkGroup&&e.colorLinkGroups[t.colorLinkGroup]?e.colorLinkGroups[t.colorLinkGroup]:t).colors;return n},changePathColor:function(t,e,n){for(var i=[],o=t.getObjects(),r=0;r<o.length;++r){var a=o[r],a=tinycolor(a.fill);i.push(a.toHexString())}return i[e]="string"==typeof n?n:n.toHexString(),i},isHex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},addThousandSep:function(t){var e=/(\d+)(\d{3})/;return String(t).replace(/^\d+/,function(t){for(;e.test(t);)t=t.replace(e,"$1"+thousandSeparator+"$2");return t})},getFilter:function(t,e){if("string"!=typeof t)return null;if(e=void 0===e?{}:e,t=t.toLowerCase(),FPDFilters[t]&&FPDFilters[t].array)return new fabric.Image.filters.ColorMatrix({matrix:FPDFilters[t].array});switch(t){case"grayscale":return new fabric.Image.filters.Grayscale;case"sepia":return new fabric.Image.filters.Sepia;case"sepia2":return new fabric.Image.filters.Sepia2;case"brightness":return new fabric.Image.filters.Brightness(e);case"contrast":return new fabric.Image.filters.Contrast(e);case"removewhite":return new fabric.Image.filters.RemoveColor(e)}return null},spectrumColorNames:function(o,r){o.find(".sp-palette-container .sp-thumb-el").each(function(t,e){var n=e.title,i=r.mainOptions.hexNames[n.replace("#","").toLowerCase()];jQuery(e).attr("title",i||n).addClass("fpd-tooltip"),FPDUtil.updateTooltip(o)})},getDeviceByScreenSize:function(){var t=jQuery(window).width();return t<568?"smartphone":568<t&&t<=768?"tablet":"desktop"},elementIsEditable:function(t){return t&&("object"==typeof t.colors||!0===t.colors||1==t.colors||t.removable||t.draggable||t.resizable||t.rotatable||t.zChangeable||t.advancedEditing||t.editable||t.uploadZone||t.colorLinkGroup&&0<t.colorLinkGroup.length||t.__editorMode)},hexToRgb:function(t){t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},unitToPixel:function(t,e,n){n=t*(n=void 0===n?72:n);return"cm"==e?Math.round(n/2.54):"mm"==e?Math.round(n/25.4):Math.round(n)},pixelToUnit:function(t,e,n){n=t/(n=void 0===n?72:n);return"cm"==e?Math.round(2.54*n):"mm"==e?Math.round(25.4*n):Math.round(n)},isSVG:function(t){return null!==t&&(t.type===FPDPathGroupName||void 0!==t.d||t.source&&-1!==jQuery.inArray("svg",t.source.split(".")))},inRange:function(t,e,n){return n=void 0===n?10:n,Math.abs(t-e)<n},objectHasKeys:function(t,e){if(t&&"object"==typeof t){for(var n=!0,i=0;i<e.length;++i){var o=e[i];if(!t.hasOwnProperty(o)){n=!1;break}}return n}return!1},setItemPrice:function(t,e){var n,i,o;e.currentViewInstance&&(n=e.currentViewInstance.options,i=null,e.currentViewInstance&&e.currentViewInstance.currentUploadZone&&0<t.parents(".fpd-upload-zone-adds-panel").length&&((o=e.currentViewInstance.getUploadZone(e.currentViewInstance.currentUploadZone))&&o.price&&(i=o.price)),0<t.parents('[data-module="images"]:first').length&&null===i?isNaN(t.data("price"))?n&&n.customImageParameters.price&&(i=n.customImageParameters.price):i=t.data("price"):t.data("parameters")&&t.data("parameters").price&&null===i&&(i=t.data("parameters").price),t.children(".fpd-price").toggle(Boolean(i)).html(i?e.formatPrice(i):""))},isZero:function(t){return 0===t||"string"==typeof t&&"0"===t},isEmpty:function(t){return void 0===t||(null==t||("string"==typeof t||Array.isArray(t)?!t.length:"object"==typeof t&&!Object.keys(t).length))},getBgCssFromElement:function(t){var e=t.fill;return"string"==typeof e?e:"object"==typeof e?e.source?"url("+(e=e.source.src)+")":e[0]:!0===t.colors&&t.type===FPDPathGroupName?tinycolor(t.getObjects()[0].fill):!1===e&&t.colors&&t.colors[0]?t.colors[0]:void 0},isMobile:function(){var t,e=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0),e},parseFontsToEmbed:function(e,n){var i,o,r="";return n=void 0===n?"":n,e.hasOwnProperty("url")&&(e.name,i=-1!==e.url.search(".woff")?"woff":"TrueType",o=n?n+e.url:e.url,r+='@font-face {font-family:"'+e.name+'"; font-style: normal; font-weight: normal; src:url("'+o+'") format("'+i+'");}',e.variants&&(Object.keys(e.variants).forEach(function(t){o=n?n+e.variants[t]:e.variants[t],r+='@font-face {font-family:"'+e.name+'"; '+{n7:"font-style: normal; font-weight: bold;",i4:"font-style: italic; font-weight: normal;",i7:"font-style: italic; font-weight: bold;"}[t]+' src:url("'+o+'") format("'+i+'");}'}),Object.keys(e.variants).toString())),r},convertHexToRGBA:function(t,e){var n=t.replace("#","");3===n.length&&(n="".concat(n[0]).concat(n[0]).concat(n[1]).concat(n[1]).concat(n[2]).concat(n[2]));var i=parseInt(n.substring(0,2),16),t=parseInt(n.substring(2,4),16),n=parseInt(n.substring(4,6),16);return"rgba(".concat(i,",").concat(t,",").concat(n,",").concat(e/100,")")},getDataUriSize:function(t,e){e=void 0===e?"mb":e;t=t.split(",")[1].length,t=4*Math.ceil(t/3)*.5624896334383812;return"byte"==e?t:"kb"==e?t/1e3:t/1e6},getFileExtension:function(t){return t.split(".").pop().toLowerCase().split("?")[0]}},FPDEmojisRegex=/\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\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uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F/g,FancyProductDesignerOptions=function(){this.defaults={imageLoadTimestamp:!1,stageWidth:900,stageHeight:600,editorMode:!1,editorBoxParameters:["left","top","angle","fill","width","height","fontSize","price"],fonts:[{name:"Arial"},{name:"Lobster",url:"google"}],templatesDirectory:"html/",facebookAppId:"",instagramClientId:"",instagramRedirectUri:"",instagramTokenUri:"",zoomStep:.2,maxZoom:3,hexNames:{},selectedColor:"#f5f5f5",boundingBoxColor:"#2185d0",outOfBoundaryColor:"#990000",replaceInitialElements:!1,lazyLoad:!0,templatesType:"html",customImageAjaxSettings:{url:"php/custom-image-handler.php",method:"POST",dataType:"json",data:{saveOnServer:0,uploadsDir:"./uploads",uploadsDirURL:"http://yourdomain.com/uploads"}},improvedResizeQuality:!1,responsive:!0,cornerIconColor:"#000000",langJSON:"lang/default.json",colorPickerPalette:[],actions:{top:[],right:[],bottom:[],left:[]},mainBarModules:["products","images","text","designs","manage-layers"],initialActiveModule:"",maxValues:{},watermark:!1,gridColumns:2,priceFormat:{currency:"$%d",decimalSep:".",thousandSep:","},mainBarContainer:!1,modalMode:!1,keyboardControl:!0,deselectActiveOnOutside:!0,uploadZonesTopped:!0,loadFirstProductInStage:!0,unsavedProductAlert:!1,hideDialogOnAdd:!0,toolbarPlacement:"smart",snapGridSize:[50,50],fabricCanvasOptions:{},namesNumbersDropdown:[],namesNumbersEntryPrice:0,colorSelectionPlacement:"",colorSelectionDisplayType:"grid",bulkVariationsPlacement:"",bulkVariations:{},toolbarDynamicContext:"body",boundingBoxProps:{strokeWidth:1},fitImagesInCanvas:!1,maxPrice:-1,inCanvasTextEditing:!0,openTextInputOnSelect:!1,designCategories:[],optionalView:!1,saveActionBrowserStorage:!0,pricingRules:[],uploadAgreementModal:!1,imageEditorSettings:{masks:[]},printingBox:{},autoOpenInfo:!1,guidedTour:null,replaceColorsInColorGroup:!1,allowedImageTypes:["jpeg","png","svg","pdf"],pixabayApiKey:"",pixabayHighResImages:!1,pixabayLang:"en",openModalInDesigner:!1,imageSizeTooltip:!1,depositphotosApiKey:"",depositphotosLang:"en",depositphotosPrice:0,highlightEditableObjects:"",applyFillWhenReplacing:!0,layouts:[],dynamicViewsOptions:{unit:"mm",formats:[],pricePerArea:0,minWidth:0,minHeight:0,maxWidth:1e4,maxHeight:1e4},disableTextEmojis:!1,smartGuides:!1,toolbarTheme:"white",usePrintingBoxAsBounding:!1,productsJSON:null,designsJSON:null,customizationRequiredRule:"any",swapProductConfirmation:!1,toolbarTextareaPosition:"sub",setTextboxWidth:!1,textLinkGroupProps:[],textTemplates:[],multiSelection:!1,uiTheme:"flat",maxCanvasHeight:1,mobileGesturesBehaviour:"none",imageQualityRatings:null,splitMultiSVG:!1,cornerControlsStyle:"advanced",downloadFilename:"Product",autoFillUploadZones:!1,dragDropImagesToUploadZones:!1,elementParameters:{objectCaching:!1,z:-1,price:0,colors:!1,removable:!1,draggable:!1,rotatable:!1,resizable:!1,copyable:!1,zChangeable:!1,boundingBox:!1,boundingBoxMode:"clipping",autoCenter:!1,replace:"",replaceInAllViews:!1,autoSelect:!1,topped:!1,colorPrices:{},colorLinkGroup:!1,patterns:[],sku:"",excludeFromExport:!1,showInColorSelection:!1,locked:!1,uniScalingUnlockable:!1,fixed:!1,originX:"center",originY:"center",cornerSize:24,fill:!1,lockUniScaling:!0,pattern:!1,top:0,left:0,angle:0,flipX:!1,flipY:!1,opacity:1,scaleX:1,scaleY:1},textParameters:{maxLength:0,curved:!1,curvable:!1,curveSpacing:10,curveRadius:80,curveReverse:!1,maxLines:0,textBox:!1,textPlaceholder:!1,numberPlaceholder:!1,letterSpacing:0,chargeAfterEditing:!1,minFontSize:1,textTransform:"none",widthFontSize:0,maxFontSize:200,shadowColor:"",shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textLinkGroup:"",strokeColors:[],editable:!0,fontFamily:"Arial",fontSize:18,lineHeight:1,fontWeight:"normal",fontStyle:"normal",textDecoration:"normal",padding:10,textAlign:"left",stroke:null,strokeWidth:0,charSpacing:0},imageParameters:{uploadZone:!1,filter:null,scaleMode:"fit",resizeToW:0,resizeToH:0,advancedEditing:!1,uploadZoneMovable:!1,uploadZoneRemovable:!1,padding:0,minScaleLimit:.01},customImageParameters:{minW:100,minH:100,maxW:1500,maxH:1500,minDPI:72,maxSize:10},customTextParameters:{},customAdds:{designs:!0,uploads:!0,texts:!0,drawing:!0},qrCodeProps:{autoCenter:!0,draggable:!0,removable:!0,resizable:!0}},this.merge=function(t,e){e=jQuery.extend({},t,e);return e.elementParameters=jQuery.extend({},t.elementParameters,e.elementParameters),e.textParameters=jQuery.extend({},t.textParameters,e.textParameters),e.imageParameters=jQuery.extend({},t.imageParameters,e.imageParameters),e.customTextParameters=jQuery.extend({},t.customTextParameters,e.customTextParameters),e.customImageParameters=jQuery.extend({},t.customImageParameters,e.customImageParameters),e.customAdds=jQuery.extend({},t.customAdds,e.customAdds),e.customImageAjaxSettings=jQuery.extend({},t.customImageAjaxSettings,e.customImageAjaxSettings),e.qrCodeProps=jQuery.extend({},t.qrCodeProps,e.qrCodeProps),e.imageEditorSettings=jQuery.extend({},t.imageEditorSettings,e.imageEditorSettings),e.dynamicViewsOptions=jQuery.extend({},t.dynamicViewsOptions,e.dynamicViewsOptions),e.priceFormat=jQuery.extend({},t.priceFormat,e.priceFormat),e.printingBox=jQuery.extend({},t.printingBox,e.printingBox),e},this.getParameterKeys=function(){var t=Object.keys(this.defaults.elementParameters),e=Object.keys(this.defaults.imageParameters),n=Object.keys(this.defaults.textParameters);return t=(t=t.concat(e)).concat(n)}},FancyProductDesignerView=function(r,n,t,i){"use strict";$=jQuery,i=void 0===i?{}:i;function e(){var i,o;t.call(t,y),w=!0,y.options.keyboardControl&&$(document).on("keydown",function(t){var e=$(t.target);if(y.currentElement&&!e.is('textarea,input[type="text"],input[type="number"]')){switch(t.which){case 8:y.currentElement.removable&&0==$(".fpd-image-editor-container").length&&y.removeElement(y.currentElement);break;case 37:y.currentElement.draggable&&y.setElementParameters({left:y.currentElement.left-1});break;case 38:y.currentElement.draggable&&y.setElementParameters({top:y.currentElement.top-1});break;case 39:y.currentElement.draggable&&y.setElementParameters({left:y.currentElement.left+1});break;case 40:y.currentElement.draggable&&y.setElementParameters({top:y.currentElement.top+1});break;default:return}t.preventDefault()}}),y.stage.on({"after:render":function(){3<y.options.highlightEditableObjects.length&&(y.stage.contextContainer.strokeStyle=y.options.highlightEditableObjects,y.stage.forEachObject(function(t){t!==y.stage.getActiveObject()&&!t.isMoving&&("text"===FPDUtil.getType(t.type)&&t.editable||t.uploadZone)?(t=t.getBoundingRect(),y.stage.contextContainer.setLineDash([5,15]),y.stage.contextContainer.strokeRect(t.left,t.top,t.width,t.height)):y.stage.contextContainer.setLineDash([])}))},"mouse:over":function(t){y.currentElement&&y.currentElement.draggable&&t.target===y.currentElement?y.stage.hoverCursor="move":y.stage.hoverCursor="pointer",b.trigger("canvas:mouseOver",[y,t])},"mouse:out":function(t){b.trigger("canvas:mouseOut",[y,t])},"mouse:down":function(t){var e;t.e.touches&&(i=t.e.touches[0].clientX,o=t.e.touches[0].clientY),a=!0,t.target&&t.target.__corner&&"function"==typeof t.target.exitEditing&&t.target.exitEditing(),null==t.target?y.deselectElement():(e=t.target.__corner,"basic"!==y.options.cornerControlsStyle&&"bl"==e&&(t.target.removable||y.options.editorMode)?y.removeElement(t.target):"basic"===y.options.cornerControlsStyle||"tl"!=e||!t.target.copyable&&!y.options.editorMode||t.target.hasUploadZone?s=y.getElementJSON():y.duplicate(t.target)),b.trigger("canvas:mouseDown",[y,t])},"mouse:up":function(t){r.siblings(".fpd-snap-line-v, .fpd-snap-line-h").hide(),a=!1,b.trigger("canvas:mouseUp",[y,t])},"mouse:move":function(t){var e,n;a&&y.dragStage&&(t.e.touches&&(e=t.e.touches[0].clientX,n=t.e.touches[0].clientY),y.stage.relativePan(new fabric.Point(t.e.touches?e-i:t.e.movementX,t.e.touches?n-o:t.e.movementY)),t.e.touches&&(i=e,o=n)),b.trigger("canvas:mouseMove",[y,t])},"text:editing:entered":function(t){b.trigger("textEditEnter",[t.target])},"text:changed":function(t){y.setElementParameters({text:t.target.text}),b.trigger("textChange",[t.target])},"text:editing:exited":function(t){b.trigger("textEditExit",[t.target])},"object:moving":function(t){l="moving",t.target.lockMovementX&&t.target.lockMovementY||(p(t.target),y.options.smartGuides&&f(t.target)),y.stage.contextContainer.strokeStyle="#990000",A(t.target),b.trigger("elementChange",[l,t.target])},"object:scaling":function(t){l="scaling",A(t.target),r.siblings(".fpd-snap-line-v, .fpd-snap-line-h").hide(),b.trigger("elementChange",[l,t.target])},"object:rotating":function(t){l="rotating",A(t.target),b.trigger("elementChange",[l,t.target])},"object:modified":function(t){var e=t.target;if(s&&(t.target._ignore||(x({element:e,parameters:s,interaction:"modify"}),s=null)),"text"!==FPDUtil.getType(e.type)||"curvedText"===e.type||e.uniScalingUnlockable||(t=t.target.fontSize*t.target.scaleX,t=parseFloat(Number(t).toFixed(0)),e.scaleX=1,e.scaleY=1,e._clearCache(),e.set("fontSize",t),e.fontSize=t),null!==l){var n={};switch(l){case"moving":n.left=Number(e.left),n.top=Number(e.top);break;case"scaling":"text"!==FPDUtil.getType(e.type)||"curvedText"===e.type||e.uniScalingUnlockable?(n.scaleX=parseFloat(e.scaleX),n.scaleY=parseFloat(e.scaleY)):n.fontSize=parseInt(e.fontSize);break;case"rotating":n.angle=e.angle}b.trigger("elementModify",[e,n])}l=null},"selection:updated":h,"object:selected":h}),y.stage.renderAll(),b.trigger("priceChange",[0,y.truePrice])}function v(t,e){w&&t.colorPrices&&"object"==typeof t.colors&&1<t.colors.length&&(void 0!==t.currentColorPrice&&(t.price-=t.currentColorPrice,y.changePrice(t.currentColorPrice,"-")),"string"==typeof e?(e=e.replace("#",""),t.colorPrices.hasOwnProperty(e)||t.colorPrices.hasOwnProperty(e.toUpperCase())?(e=void 0===t.colorPrices[e]?t.colorPrices[e.toUpperCase()]:t.colorPrices[e],t.currentColorPrice=e,t.price+=t.currentColorPrice,y.changePrice(t.currentColorPrice,"+")):t.currentColorPrice=0):t.currentColorPrice=0)}function o(t){if(t&&t.hasUploadZone){for(var e=y.stage.getObjects(),n=!0,i=0;i<e.length;++i)if(e[i].replace==t.replace){n=!1;break}var o=y.getUploadZone(t.replace);o&&(o.set("opacity",n?1:0),o.evented=n),y.stage.renderAll()}}var b=$(this),y=this,a=!1,w=!1,s=null,l=null,c={},u=new FancyProductDesignerOptions,d=function(e){y.options.multiSelection&&e.target&&"activeSelection"==e.target.type&&(e.target.set({cornerColor:y.options.selectedColor,lockScalingX:!0,lockScalingY:!0,lockRotation:!0,hasControls:!1,rotatingPointOffset:0,borderColor:y.options.selectedColor,borderDashArray:[2,2],rotatingPointOffset:60,cornerStyle:"circle",cornerSize:16,transparentCorners:!1,cornerStrokeColor:"#333f48",borderScaleFactor:1.5}),e.target._objects.forEach(function(t){t.draggable&&!t.locked||e.target.removeWithUpdate(t),t.set({borderColor:y.options.selectedColor})}))},h=function(t){t=t.target;if(y.deselectElement(!1),y.dragStage)return y.deselectElement(),!1;y.currentElement=t,b.trigger("elementSelect",[t]),"basic"!==y.options.cornerControlsStyle&&t.setControlVisible("tr",!1),t._ignore||t.set({borderColor:y.options.selectedColor,cornerIconColor:y.options.cornerIconColor,cornerColor:"basic"==y.options.cornerControlsStyle?y.options.cornerIconColor:y.options.selectedColor,borderDashArray:[2,2],rotatingPointOffset:"basic"==y.options.cornerControlsStyle?60:0,cornerStyle:"basic"==y.options.cornerControlsStyle?"circle":"rect",cornerSize:"basic"==y.options.cornerControlsStyle?16:24,transparentCorners:"basic"!=y.options.cornerControlsStyle,cornerStrokeColor:"basic"==y.options.cornerControlsStyle?y.options.selectedColor:null,borderScaleFactor:1.5}),t.draggable?y.stage.hoverCursor="move":y.stage.hoverCursor="pointer",t.boundingBox&&!t.uploadZone&&y.renderElementBoundingBox(t)},x=function(t,e,n){n=void 0===n||n,t&&(y.undos.push(t),20<y.undos.length&&y.undos.shift()),e&&y.redos.push(e),y.isCustomized=!0,n&&b.trigger("undoRedoSet",[y.undos,y.redos])},C=function(){for(var t=y.stage.getObjects(),e=[],n=0;n<t.length;++n){var i=t[n];(i.topped||i.uploadZone&&y.options.uploadZonesTopped)&&e.push(i)}for(n=0;n<e.length;++n)e[n].bringToFront();y.currentBoundingObject&&y.currentBoundingObject.bringToFront(),y.printingBoxObject&&y.printingBoxObject.bringToFront();var o=y.getElementByID("_snap_lines_group");o&&o.bringToFront(),y.stage.renderAll()},p=function(t){var e,n,i;y._snapElements&&(e=y.options.snapGridSize[0]||50,i=y.options.snapGridSize[1]||50,n=t.getPointByOrigin("left","top"),i=new fabric.Point(t.padding+Math.round(n.x/e)*e,t.padding+Math.round(n.y/i)*i),t.setPositionByOrigin(i,"left","top"))},f=function(t){r.siblings(".fpd-snap-line-v, .fpd-snap-line-h").hide();var e=y.stage.getObjects().filter(function(t){return t.hasRotatingPoint}),n=(n=y.currentBoundingObject)||{left:0,top:0,width:y.options.stageWidth,height:y.options.stageHeight},t=y.stage.gridSnapMove({tolerance:8,guidlines:[{cx:n.left+n.width/2},{cy:n.top+n.height/2}],objects:e,target:t});delete y.stage.__snapCache,t&&(void 0!==t.x&&r.siblings(".fpd-snap-line-v").css("left",r.position().left+t.x*y.responsiveScale).show(),void 0!==t.y&&r.siblings(".fpd-snap-line-h").css("top",r.position().top+t.y*y.responsiveScale).show())},A=function(t){var e,n,i,o,r;y.currentBoundingObject&&!t.hasUploadZone&&(t.setCoords(),"limitModify"===t.boundingBoxMode?(r=t.getBoundingRect(),e=(o=y.currentBoundingObject.getBoundingRect()).left,n=o.left+o.width-r.width,i=o.top,o=o.top+o.height-r.height,t.isContainedWithinObject(y.currentBoundingObject)?(c={left:t.left,top:t.top,angle:t.angle,scaleX:t.scaleX,scaleY:t.scaleY},"text"==FPDUtil.getType(t.type)&&(c.fontSize=t.fontSize,c.lineHeight=t.lineHeight,c.charSpacing=t.charSpacing)):(0===t.__corner&&(r.left>e&&r.left<n&&(c.left=t.left),r.top>i&&r.top<o&&(c.top=t.top)),t.setOptions(c)),b.trigger("elementCheckContainemt",[t,"limitModify"])):"inside"!==t.boundingBoxMode&&"clipping"!==t.boundingBoxMode||(r=!1,o=t.isOut,(r=!t.isContainedWithinObject(y.currentBoundingObject))?("inside"===t.boundingBoxMode&&(t.borderColor=y.options.outOfBoundaryColor),t.isOut=!0):("inside"===t.boundingBoxMode&&(t.borderColor=y.options.selectedColor),t.isOut=!1),o!=t.isOut&&null!=o&&(r?b.trigger("elementOut",[t]):b.trigger("elementIn",[t])),b.trigger("elementCheckContainemt",[t,t.boundingBoxMode]))),y.stage.renderAll()},D=function(t,e,n){n=void 0===n?1:n;var i=e.clippingRect;t.save();e=e.calcTransformMatrix(),e=fabric.util.invertTransform(e);t.transform.apply(t,e),t.translate(0,0),t.beginPath(),t.rect(i.left,i.top,i.width*n,i.height*n),t.fillStyle="transparent",t.fill(),t.closePath(),t.restore()};this.getElementByID=function(t){for(var e=y.stage.getObjects(),n=0;n<e.length;++n)if(e[n].id==t)return e[n];return!1},this.addElement=function(t,e,n,o){if(void 0!==t&&void 0!==e&&void 0!==n){if(b.trigger("beforeElementAdd",[t,e,n,o]),o=void 0!==o?o:{},"text"===t&&(e=e.replace(/(<([^>]+)>)/gi,""),n=n.replace(/(<([^>]+)>)/gi,"")),"object"!=typeof o)return FPDUtil.showModal("The element "+n+" does not have a valid JSON object as parameters! Please check the syntax, maybe you set quotes wrong."),!1;"string"==typeof o.fill||$.isArray(o.fill)||(o.fill=!1),o=FPDUtil.rekeyDeprecatedKeys(o);var i;(o="text"===FPDUtil.getType(t)?$.extend({},y.options.elementParameters,y.options.textParameters,o):$.extend({},y.options.elementParameters,y.options.imageParameters,o)).colors&&"string"==typeof o.colors&&0==o.colors.indexOf("#")&&(i=o.colors.replace(/\s+/g,"").split(","),o.colors=i),o._isInitial=!w,"text"===FPDUtil.getType(t)&&(r=o.colors[0]||"#000000",o.fill=o.fill||r);var r,a,s,l,c,u,d={source:e,title:n,id:String((new Date).getTime()),cornerColor:y.options.selectedColor,cornerIconColor:y.options.cornerIconColor};y.options.editorMode?(o.__editorMode=y.options.editorMode,d.selectable=d.evented=!0):$.extend(d,{selectable:!1,lockRotation:!0,hasRotatingPoint:!1,lockScalingX:!0,lockScalingY:!0,lockMovementX:!0,lockMovementY:!0,hasControls:!1,evented:!1,lockScalingFlip:!0}),(d=$.extend({},o,d)).isCustom&&(y.isCustomized=!0),y.options.usePrintingBoxAsBounding&&!d.boundingBox&&FPDUtil.objectHasKeys(y.options.printingBox,["left","top","width","height"])&&(d.boundingBox={x:y.options.printingBox.left-1,y:y.options.printingBox.top-1,width:y.options.printingBox.width+1,height:y.options.printingBox.height+1}),"image"==t||"path"==t||t==FPDPathGroupName?(d.crossOrigin="",d.lockUniScaling=!y.options.editorMode&&!d.uniScalingUnlockable,-1===e.search("<svg ")&&(r=e.split("?"),e=d.source=r[0]),a=function(t,e,n,i){t?(i=void 0===i?{}:i,$.extend(e,{originParams:$.extend({},e,i)}),t.setOptions(e),y.stage.add(t),y.setElementParameters(e,t,!1),t.originParams.angle=t.angle,t.originParams.z=y.getZIndex(t),y.options.improvedResizeQuality&&!n&&(t.resizeFilter=new fabric.Image.filters.Resize({type:"hermite"})),t._isInitial||t._ignore||x({element:t,parameters:e,interaction:"add"})):FPDUtil.showModal("The image with the URL<br /><i style='font-size: 10px;'>"+e.source+"</i><br />can not be loaded into the canvas. <p><br />Troubleshooting<br/><ul><li>The URL is not correct!</li><li>The image has been blocked by <a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS' target='_blank'>CORS policy</a>. You need to host the image under the same protocol and domain or enable 'Access-Control-Allow-Origin' on the server where you host the image. <a href='http://enable-cors.org/' target='_blank'>Read more about it here.</a></li></ul></p>"),b.trigger("elementAdd",[t])},void 0!==e&&0!==e.length?-1!==e.search("<svg")?fabric.loadSVGFromString(e,function(t,e){e=fabric.util.groupSVGElements(t,e);if(d.fill)d.svgFill||(d.svgFill=d.fill),delete d.fill;else if(!d.fill&&!d.svgFill){if(t){o.colors=[];for(var n=0;n<t.length;++n){var i=0<t[n].fill.length?tinycolor(t[n].fill).toHexString():"transparent";o.colors.push(i)}o.svgFill=o.colors}d.svgFill=o.svgFill}delete d.clippingRect,delete d.boundingBox,delete d.originParams,delete d.colors,delete d.svgFill,delete d.width,delete d.height,delete d.originX,delete d.originY,delete d.objectCaching,a(e,d,!0,{svgFill:o.svgFill})}):-1!=$.inArray("svg",e.split("."))?(s=Date.now().toString(),l=y.options._loadFromScript||"",c=FPDUtil.isUrl(e)?new URL(l+e):e,!e.includes(".cloudfront.net/")&&!y.options.imageLoadTimestamp||y.options._loadFromScript||c.searchParams.append("t",s),"object"==typeof c&&(c=c.toString()),fabric.loadSVGFromURL(c,function(t,e){e=t?fabric.util.groupSVGElements(t,e):null;if(d.fill)d.svgFill||(d.svgFill=d.fill),delete d.fill;else if(!d.fill&&!d.svgFill){if(t){o.colors=[];for(var n=0;n<t.length;++n){var i=0<t[n].fill.length?tinycolor(t[n].fill).toHexString():"transparent";o.colors.push(i)}o.svgFill=o.colors}d.svgFill=o.svgFill}a(e,d,!0,{svgFill:o.svgFill})})):(s=Date.now().toString(),l=y.options._loadFromScript||"",-1==e.indexOf("data:image/")?(c=FPDUtil.isUrl(e)?new URL(l+e):e,!e.includes(".cloudfront.net/")&&!y.options.imageLoadTimestamp||y.options._loadFromScript||c.searchParams.append("t",s),"object"==typeof c&&(c=c.toString())):c=e,new fabric.Image.fromURL(c,function(t){t=""===t.getSrc()?null:t,a(t,d,!1)},{crossOrigin:"anonymous"})):FPDUtil.log("No image source set for: "+n)):"text"===FPDUtil.getType(t)?(e=e.replace(/\\n/g,"\n"),o.text=o.text||e,d._initialText=o.hasOwnProperty("_initialText")?o._initialText:o.text,$.extend(d,{spacing:o.curveSpacing,radius:o.curveRadius,reverse:o.curveReverse,originParams:$.extend({},o)}),o.originParams&&o.originParams.text&&(d.originParams.text=d._initialText),o.curved&&void 0!==fabric.CurvedText?(t=d.text,u=new fabric.CurvedText(e,d),d.text=t):(o.textBox?(d.lockUniScaling=!y.options.editorMode,y.options.setTextboxWidth&&(d.lockUniScaling=!1,d.lockScalingX=!1),d.lockScalingY=!0,(u=new fabric.Textbox(e,d)).setControlVisible("bl",!0)):u=new fabric.IText(e,d),y.options.inCanvasTextEditing||u.on({"editing:entered":function(){this.exitEditing()}})),(d.textPlaceholder||d.numberPlaceholder)&&(d.textPlaceholder&&(y.textPlaceholder=u,d.removable=!1),d.numberPlaceholder&&(y.numberPlaceholder=u,d.removable=!1)),y.stage.add(u),y.setElementParameters(d,u,!1),u.originParams=$.extend({},u.toJSON(),u.originParams),delete u.originParams.clipTo,u.originParams.z=y.getZIndex(u),u._isInitial||u._ignore||x({element:u,parameters:d,interaction:"add"}),b.trigger("elementAdd",[u])):FPDUtil.showModal("Sorry. This type of element is not allowed!")}},this.getElementByTitle=function(t){for(var e=y.stage.getObjects(),n=0;n<e.length;++n)if(e[n].title==t)return e[n]},this.deselectElement=function(t){t=void 0===t||t,y.currentBoundingObject&&(y.stage.remove(y.currentBoundingObject),b.trigger("boundingBoxToggle",[y.currentBoundingObject,!1]),y.currentBoundingObject=null),t&&y.stage.discardActiveObject(),y.currentElement=null,y.stage.renderAll().calcOffset(),b.trigger("elementSelect",[null])},this.removeElement=function(t){var e;"string"==typeof t&&(t=y.getElementByTitle(t)),t._ignore||((e=y.getElementJSON(t)).z=y.getZIndex(t),x({element:t,parameters:e,interaction:"remove"})),this.deselectElement(),setTimeout(function(){y.stage.remove(t),o(t),b.trigger("elementRemove",[t])},1)},this.setElementParameters=function(t,e,n){if(n=void 0===n||n,!(e=void 0===e?y.stage.getActiveObject():e)||void 0===t)return!1;"string"==typeof e&&(e=y.getElementByTitle(e));var i,o,r,a,s,l,c,u,d,h,p=FPDUtil.getType(e.type);n&&w&&(n=y.getElementJSON(),e._tempFill&&(n.fill=e._tempFill,e._tempFill=void 0),e._ignore||x({element:e,parameters:n,interaction:"modify"})),"image"!=FPDUtil.getType(e.type)||e._isInitial||e._addToUZ||1!==e.scaleX||(r=null,FPDUtil.isZero(e.resizeToW)&&FPDUtil.isZero(e.resizeToH)?e.boundingBox?(i=y.getBoundingBoxCoords(e),r=FPDUtil.getScalingByDimesions(e.width,e.height,i.width,i.height,e.scaleMode)):y.options.fitImagesInCanvas&&(o=3*e.cornerSize,(e.width*e.scaleX+o>y.options.stageWidth||e.height*e.scaleY+o>y.options.stageHeight)&&(r=FPDUtil.getScalingByDimesions(e.width,e.height,y.options.stageWidth-o,y.options.stageHeight-o))):(i=e.resizeToW,o=e.resizeToH,i=isNaN(i)?parseFloat(i)/100*y.options.stageWidth:parseInt(i),o=isNaN(o)?parseFloat(o)/100*y.options.stageHeight:parseInt(o),r=FPDUtil.getScalingByDimesions(e.width,e.height,i,o,e.scaleMode)),null!==r&&$.extend(t,{scaleX:r,scaleY:r})),e._addToUZ&&""!=e._addToUZ&&(t.z=-1,a=y.getElementByTitle(e._addToUZ),r=1,"image"==FPDUtil.getType(e.type)&&(r=FPDUtil.getScalingByDimesions(e.width,e.height,a.width*a.scaleX,a.height*a.scaleY,a.scaleMode)),$.extend(t,{boundingBox:e._addToUZ,boundingBoxMode:"clipping",scaleX:r,scaleY:r,autoCenter:!0,removable:!0,zChangeable:!1,autoSelect:!1,copyable:!1,hasUploadZone:!0,z:y.getZIndex(y.getElementByTitle(e._addToUZ)),rotatable:a.rotatable,draggable:a.draggable,resizable:a.resizable,price:a.price||t.price,replace:e._addToUZ,lockUniScaling:a.lockUniScaling,uniScalingUnlockable:a.uniScalingUnlockable,advancedEditing:a.advancedEditing,originX:a.originX,originY:a.originY,angle:a.angle}),$.extend(t.originParams,{boundingBox:t.boundingBox,replace:t.replace,rotatable:t.rotatable,draggable:t.draggable,resizable:t.resizable,lockUniScaling:t.lockUniScaling,uniScalingUnlockable:t.uniScalingUnlockable,price:t.price,scaleX:t.scaleX,scaleY:t.scaleY,hasUploadZone:!0,autoCenter:!0,originX:t.originX,originY:t.originY,angle:t.angle}),delete t[""],delete e._addToUZ),t.topped&&(t.zChangeable=!1),FPDUtil.elementIsEditable(t)&&(t.isEditable=t.evented=t.selectable=!0),t.uploadZone&&!y.options.editorMode||(t.draggable&&(t.lockMovementX=t.lockMovementY=!1),t.rotatable&&(t.lockRotation=!1,t.hasRotatingPoint=!0),t.resizable&&(t.lockScalingX=t.lockScalingY=!1),(t.resizable||t.rotatable||t.removable)&&(t.hasControls=!0)),t.uploadZone&&(y.options.editorMode||(t.uploadZoneMovable&&(t.lockMovementX=t.lockMovementY=!1),t.uploadZoneRemovable&&(t.removable=!0,t.copyable=!1,t.hasControls=!0)),"3.0.0"!==fabric.version&&(t.lockRotation=!0,t.hasRotatingPoint=!1)),t.fixed&&FPDUtil.isEmpty(t.replace)&&(t.replace=e.title),!t.replace||""==t.replace||null!==(a=y.getElementByReplace(t.replace))&&a!==e&&(t.z=y.getZIndex(a),t.left=e.originParams.left=a.left,t.top=e.originParams.top=a.top,t.autoCenter=!1,y.options.applyFillWhenReplacing&&(t.fill=a.fill),y.removeElement(a)),"string"==typeof t.text&&(s=t.text,y.options.disableTextEmojis&&(s=(s=s.replace(FPDEmojisRegex,"")).replace(String.fromCharCode(65039),"")),0!=e.maxLength&&s.length>e.maxLength&&(s=s.substr(0,e.maxLength),e.selectionStart=e.maxLength),0!=e.maxLines&&("textbox"==e.type&&e.__lineHeights?s=function(t,e){for(t.set("text",e);t.__lineHeights.length>t.maxLines;)e=(e=t.text).slice(0,-1),t.set("text",e),t.__lineHeights.length<=t.maxLines&&t.exitEditing();return e}(e,s):s.split("\n").length>e.maxLines&&(s=s.replace(/([\s\S]*)\n/,"$1"),e.exitEditing())),e.set("text",s),t.text=s,w&&e.chargeAfterEditing&&(e._isPriced||(y.changePrice(e.price,"+"),e._isPriced=!0),e._initialText===s&&e._isPriced&&(y.changePrice(e.price,"-"),e._isPriced=!1))),"text"===p&&(t.hasOwnProperty("textDecoration")&&(t.underline="underline"===t.textDecoration),void 0!==t.letterSpacing&&(t.charSpacing=100*t.letterSpacing),t.fontSize&&t.fontSize<e.minFontSize?t.fontSize=e.minFontSize:t.fontSize&&t.fontSize>e.maxFontSize&&(t.fontSize=e.maxFontSize),t.text&&("uppercase"===e.textTransform?s=s.toUpperCase():"lowercase"===e.textTransform&&(s=s.toLowerCase()),e.set("text",s),t.text=s),t.textTransform&&(s=e.text,"uppercase"===t.textTransform?s=s.toUpperCase():"lowercase"===t.textTransform&&(s=s.toLowerCase()),e.set("text",s),t.text=s),(t.shadowColor||t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)&&!e.shadow&&(l={color:t.shadowColor||"rgba(0,0,0,0)"},e.setShadow(l)),e.shadow&&t.hasOwnProperty("shadowColor")&&(t.shadowColor?e.shadow.color=t.shadowColor:e.setShadow(null)),e.shadow&&(t.shadowBlur&&(e.shadow.blur=t.shadowBlur),t.shadowOffsetX&&(e.shadow.offsetX=t.shadowOffsetX),t.shadowOffsetY&&(e.shadow.offsetY=t.shadowOffsetY))),delete t.paths,e.setOptions(t),"i-text"==e.type&&e.widthFontSize&&0<e.text.length&&((c=e.width>e.widthFontSize?e.fontSize*(e.widthFontSize/(e.width+1)):e.fontSize*(e.widthFontSize/(e.width-1)))<e.minFontSize?c=e.minFontSize:c>e.maxFontSize&&(c=e.maxFontSize),c=parseInt(c),t.fontSize=c,e.set("fontSize",c)),(e.boundingBox&&"clipping"===t.boundingBoxMode||t.hasUploadZone)&&(l=e,(c=y.getBoundingBoxCoords(l)||l.clippingRect)&&(l.clippingRect=c,0==fabric.version.indexOf("3.")?(c=new fabric.Rect({originX:"left",originY:"top",angle:c.angle||0,left:c.left,top:c.top,width:c.width,height:c.height,fill:"#DDD",absolutePositioned:!0}),l.clipPath=c):l.clipTo=function(t){D(t,this)})),t.autoCenter&&y.centerElement(!0,!0,e),void 0===t.fill&&void 0===t.svgFill||(d=void 0!==t.svgFill?t.svgFill:t.fill,y.changeColor(e,d),e.pattern=void 0),void 0!==t.pattern&&(u=e,h=t.pattern,d=y.options._loadFromScript||"",h=h&&d+h,FPDUtil.isSVG(u)?h&&fabric.util.loadImage(h,function(t){if("function"==typeof u.getObjects)for(var e=u.getObjects(),n=0;n<e.length;++n)e[n].set("fill",new fabric.Pattern({source:t,repeat:"repeat"}));else u.set("fill",new fabric.Pattern({source:t,repeat:"repeat"}));y.stage.renderAll()}):"text"===FPDUtil.getType(u.type)&&(h?fabric.util.loadImage(h,function(t){u.set("fill",new fabric.Pattern({source:t,repeat:"repeat"})),y.stage.renderAll()}):(h=(h=u.fill||u.colors[0])||"#000000",u.set("fill",h))),v(e,t.pattern)),t.filter&&(e.filters=[],null!=(h=FPDUtil.getFilter(t.filter))&&e.filters.push(h),void 0!==e.applyFilters&&e.applyFilters()),e.canvas&&0<=t.z&&(e.moveTo(t.z),C()),e.curved&&(t.curveRadius&&e.set("radius",t.curveRadius),t.curveSpacing&&e.set("spacing",t.curveSpacing),void 0!==t.curveReverse&&e.set("reverse",t.curveReverse)),e.uploadZone?e.evented=0!==e.opacity:e.isEditable&&!y.options.editorMode&&(e.evented=!t.locked),"basic"==y.options.cornerControlsStyle&&e.lockScalingX&&e.lockScalingY&&e.setControlsVisibility({mt:!1,mb:!1,ml:!1,mr:!1,bl:!1,br:!1,tl:!1,tr:!1});for(var f=y.stage.getObjects(),g=0;g<f.length;++g){var m=f[g];m.uploadZone&&m.title==t.replace&&(m.opacity=0,m.evented=!1)}e.setCoords(),y.stage.renderAll().calcOffset(),b.trigger("elementModify",[e,t]),A(e),t.autoSelect&&e.isEditable&&!y.options.editorMode&&$(y.stage.getElement()).is(":visible")&&setTimeout(function(){y.stage.setActiveObject(e),y.stage.renderAll()},350)},this.getBoundingBoxCoords=function(t){if(t.boundingBox||t.uploadZone){if("object"==typeof t.boundingBox)return!!(t.boundingBox.hasOwnProperty("x")&&t.boundingBox.hasOwnProperty("y")&&t.boundingBox.width&&t.boundingBox.height)&&{left:t.boundingBox.x,top:t.boundingBox.y,width:t.boundingBox.width,height:t.boundingBox.height};for(var e=y.stage.getObjects(),n=0;n<e.length;++n){var i=e[n];if(t.boundingBox==i.title){var o=i.getPointByOrigin("left","top");return{left:o.x,top:o.y,width:i.width*i.scaleX,height:i.height*i.scaleY,angle:i.angle||0}}}}return!1},this.toDataURL=function(e,t,n,i,o){e=void 0===e?function(){}:e,t=void 0===t?"transparent":t,(n=void 0===n?{}:n).onlyExportable=void 0!==n.onlyExportable&&n.onlyExportable,n.multiplier=void 0===n.multiplier?1:n.multiplier,n.enableRetinaScaling=void 0!==n.enableRetinaScaling&&n.enableRetinaScaling,i=void 0!==i&&i,o=void 0===o||o;var r=["_snap_lines_group","_ruler_hor","_ruler_ver"],a=[],s=y.options.highlightEditableObjects;y.options.highlightEditableObjects="transparent",y.stage.getObjects().forEach(function(t){(-1!==r.indexOf(t.id)||t.excludeFromExport&&n.onlyExportable)&&(t.visible=!1,a.push(t))}),o&&y.deselectElement();var l=fabric.devicePixelRatio;fabric.devicePixelRatio=1,y.stage.setDimensions({width:y.options.stageWidth,height:y.options.stageHeight}).setZoom(1),y.maskObject&&y.maskObject._originParams&&(y.maskObject.left=y.maskObject._originParams.left*n.multiplier,y.maskObject.top=y.maskObject._originParams.top*n.multiplier,y.maskObject.scaleX=y.maskObject._originParams.scaleX*n.multiplier,y.maskObject.scaleY=y.maskObject._originParams.scaleY*n.multiplier,y.maskObject.setCoords()),y.stage.setBackgroundColor(t,function(){i&&(y.stage.add(i),i.center(),i.bringToFront()),e(y.stage.toDataURL(n)),i&&y.stage.remove(i),$(y.stage.wrapperEl).is(":visible")&&y.resetCanvasSize(),y.stage.setBackgroundColor("transparent",function(){y.stage.renderAll()});for(var t=0;t<a.length;++t)a[t].visible=!0;y.stage.renderAll(),fabric.devicePixelRatio=l,y.options.highlightEditableObjects=s})},this.toSVG=function(t,e,n,i,o){t=void 0===t?{}:t,n=void 0!==n&&n,i=void 0===i?null:i,o=void 0===o?[]:o,y.deselectElement(),n&&FPDUtil.objectHasKeys(y.options.printingBox,["left","top","width","height"])?(r=n=0,FPDUtil.objectHasKeys(y.options.output,["bleed","width","height"])&&(n=y.options.output.bleed/y.options.output.width*y.options.printingBox.width,r=y.options.output.bleed/y.options.output.height*y.options.printingBox.height),t.viewBox={x:y.options.printingBox.left-n,y:y.options.printingBox.top-r,width:y.options.printingBox.width+2*n,height:y.options.printingBox.height+2*r},y.stage.setDimensions({width:y.options.printingBox.width,height:y.options.printingBox.height}).setZoom(1)):y.stage.setDimensions({width:y.options.stageWidth,height:y.options.stageHeight}).setZoom(1);var r=y.stage.backgroundColor;"transparent"==r&&(y.stage.backgroundColor=!1),i&&(y.stage.add(i),i.center(),i.bringToFront()),e=y.stage.toSVG(t,e),i&&y.stage.remove(i),y.stage.backgroundColor=r,$(y.stage.wrapperEl).is(":visible")&&y.resetCanvasSize();r=$(e);r.find("clipPath").appendTo(r.children("defs")),r.children("defs").append('<style type="text/css"></style>');var a="",s="";return o.forEach(function(t){t.hasOwnProperty("url")&&("google"==t.url?a+=t.name.replace(/\s/g,"+")+":ital,wght@0,400;0,700;1,700&":s+=FPDUtil.parseFontsToEmbed(t))}),0<a.length&&r.find("defs > style").append('@import url("https://fonts.googleapis.com/css2?family='+a.replace(/&/g,"&")+'display=swap");'),0<s.length&&r.find("defs > style").append(s),e=$("<div>").append(r.clone()).html().replace(/(?:\r\n|\r|\n)/g,"").replace(/700&/g,"700&")},this.duplicate=function(t){t=void 0===t?y.stage.getActiveObject():t;var e=y.getElementJSON(t);e.top=e.top+30,e.left=e.left+30,y.options.editorMode||(e.autoSelect=!0),y.addElement(FPDUtil.getType(t.type),t.source,"Copy "+t.title,e)},this.reset=function(t){t=void 0===t||t,y.undos=[],y.redos=[],y.elements=[],y.totalPrice=y.truePrice=y.additionalPrice=0,y.stage.clear(),t&&y.stage.wrapperEl.remove(),b.trigger("clear"),b.trigger("priceChange",[0,0])},this.undo=function(){var t,e;return 0<y.undos.length&&("remove"===(t=y.undos.pop()).interaction?(y.stage.add(t.element),t.interaction="add",b.trigger("elementAdd",[t.element])):"add"===t.interaction&&(e=t.element.replace,y.stage.remove(t.element),t.interaction="remove",b.trigger("elementRemove",[t.element]),e&&y.undos.length&&y.undos[y.undos.length-1].element.replace==e&&(t=y.undos.pop(),y.stage.add(t.element),b.trigger("elementAdd",[t.element]))),t.element._ignore||x(!1,{element:t.element,parameters:y.getElementJSON(t.element),interaction:t.interaction}),y.setElementParameters(t.parameters,t.element,!1),this.deselectElement(),o(t.element)),y.undos},this.redo=function(){var t;return 0<y.redos.length&&("remove"===(t=y.redos.pop()).interaction?(y.stage.add(t.element),t.interaction="add",b.trigger("elementAdd",[t.element])):"add"===t.interaction&&(y.stage.remove(t.element),t.interaction="remove",b.trigger("elementRemove",[t.element])),t.element._ignore||x({element:t.element,parameters:y.getElementJSON(t.element),interaction:t.interaction}),y.setElementParameters(t.parameters,t.element,!1),this.deselectElement(),o(t.element)),y.redos},this.getJSON=function(){var t=(t=u.getParameterKeys()).concat(FancyProductDesignerView.propertiesToInclude);return y.stage.toJSON(t)},this.resetCanvasSize=function(){y.responsiveScale=r.outerWidth()<y.options.stageWidth?r.outerWidth()/y.options.stageWidth:1,isNaN(y.options.maxCanvasHeight)||1===y.options.maxCanvasHeight||(t=window.innerHeight*parseFloat(y.options.maxCanvasHeight),y.options.stageHeight>y.options.stageWidth&&y.options.stageHeight*y.responsiveScale>t&&(y.responsiveScale=t/y.options.stageHeight)),y.responsiveScale=parseFloat(Number(y.responsiveScale.toFixed(7))),y.responsiveScale=Math.min(y.responsiveScale,1),y.options.responsive||(y.responsiveScale=1),!y.options.editorMode&&y.maskObject&&y.maskObject._originParams?(y.maskObject.left=y.maskObject._originParams.left*y.responsiveScale,y.maskObject.top=y.maskObject._originParams.top*y.responsiveScale,y.maskObject.scaleX=y.maskObject._originParams.scaleX*y.responsiveScale,y.maskObject.scaleY=y.maskObject._originParams.scaleY*y.responsiveScale):y.maskObject&&y.maskObject.setCoords(),y.stage.setDimensions({width:r.width(),height:y.options.stageHeight*y.responsiveScale}).setZoom(y.responsiveScale).calcOffset().renderAll(),r.height(y.stage.height).parent(".fpd-main-wrapper").css("min-height",y.stage.height);var t=r.parents(".fpd-container:first");return 0<t.length&&(t.height(t.hasClass("fpd-sidebar")?y.stage.height:"auto"),t.width(t.hasClass("fpd-topbar")?y.options.stageWidth:"auto")),y.responsiveScale},this.getElementByReplace=function(t){for(var e=y.stage.getObjects(),n=0;n<e.length;++n){var i=e[n];if(i.replace===t)return i}return null},this.getElementJSON=function(t,e){if(e=void 0!==e&&e,!(t=void 0===t?y.stage.getActiveObject():t))return{};var n=Object.keys(y.options.elementParameters),i="text"===FPDUtil.getType(t.type)?Object.keys(y.options.textParameters):Object.keys(y.options.imageParameters),n=$.merge(n,i);e&&(n=$.merge(n,FancyProductDesignerView.propertiesToInclude)),t.uploadZone&&(n.push("customAdds"),n.push("designCategories"),n.push("designCategories[]")),"text"===FPDUtil.getType(t.type)&&(n.push("text"),n.push("_initialText")),t.type===FPDPathGroupName&&n.push("svgFill"),n.push("width"),n.push("height"),n.push("isEditable"),n.push("hasUploadZone"),n.push("clippingRect"),n.push("evented"),n.push("isCustom"),n.push("currentColorPrice"),n.push("_isPriced"),n.push("originParams"),n.push("originSource"),n.push("depositphotos"),n=n.sort();i=t.getPointByOrigin("left","top");if(e)return(o=t.toJSON(n)).topLeftX=i.x,o.topLeftY=i.y,o;for(var o={},r=0;r<n.length;++r){var a=n[r];void 0!==t[a]&&(o[a]=t[a])}return o.topLeftX=i.x,o.topLeftY=i.y,o},this.centerElement=function(t,e,n){var i,o,r,a;n=void 0===n?y.stage.getActiveObject():n,o=t,r=e,a=(i=n).getCenterPoint(),t=y.getBoundingBoxCoords(i),e=a.x,a=a.y,o&&(e=t?t.left+.5*t.width:.5*y.options.stageWidth),r&&(a=t?t.top+.5*t.height:.5*y.options.stageHeight),i.setPositionByOrigin(new fabric.Point(e,a),"center","center"),y.stage.renderAll(),i.setCoords(),A(i),n.autoCenter=!1},this.alignElement=function(t,e){var n=(e=void 0===e?y.stage.getActiveObject():e).getPointByOrigin("left","top"),i=y.getBoundingBoxCoords(e),o="left",r="top";"left"===t?(n.x=i?i.left:0,n.x+=e.padding+1):"top"===t?(n.y=i?i.top:0,n.y+=e.padding+1):"right"===t?(n.x=i?i.left+i.width-e.padding:y.options.stageWidth-e.padding,n.x-="text"==FPDUtil.getType(e.type)?4:0,o="right"):(n.y=i?i.top+i.height-e.padding:y.options.stageHeight,n.y-="text"==FPDUtil.getType(e.type)?4:0,r="bottom"),e.setPositionByOrigin(n,o,r),y.stage.renderAll(),e.setCoords(),A(e)},this.getZIndex=function(t){return t=void 0===t?y.stage.getActiveObject():t,y.stage.getObjects().indexOf(t)},this.changeColor=function(t,e,n){n=void 0===n||n;var i=FPDUtil.elementIsColorizable(t);if("string"==typeof e&&4==e.length&&(e+=e.substr(1,e.length)),"text"===FPDUtil.getType(t.type))"object"==typeof(e=!1===e?"#000000":e)&&(e=e[0]),t.set("fill",e),y.stage.renderAll(),t.pattern=null,t.fill=e;else if(t.type==FPDPathGroupName&&"object"==typeof e){for(var o=0;o<e.length;++o)t.getObjects()[o]&&t.getObjects()[o].set("fill",e[o]);y.stage.renderAll(),t.svgFill=e,delete t.fill}else"object"==typeof e&&(e=e[0]),"string"!=typeof e&&(e=!1),"png"==i||"dataurl"==i?(t.filters=[],setTimeout(function(){e&&t.filters.push(new fabric.Image.filters.BlendColor({mode:"tint",color:e})),t.applyFilters(),y.stage.renderAll(),b.trigger("elementColorChange",[t,e,n])},1),t.fill=e):"svg"==i&&(t.set("fill",e),y.stage.renderAll(),b.trigger("elementColorChange",[t,e,n]));v(t,e),b.trigger("elementColorChange",[t,e,n])},this.getIndex=function(){return r.children(".fpd-view-stage").index(y.stage.wrapperEl)},this.getUploadZone=function(t){for(var e=y.stage.getObjects(),n=0;n<e.length;++n)if(e[n].uploadZone&&e[n].title==t)return e[n]},this.changePrice=function(t,e,n){return n=void 0===n?null:n,"number"!=typeof t&&(t=Number(t)),"+"===e?y.totalPrice+=t:y.totalPrice-=t,null!==n&&(e=y.additionalPrice,y.totalPrice-=e,y.additionalPrice=n,y.totalPrice+=n),y.truePrice=y.totalPrice,"number"==typeof y.options.maxPrice&&-1!=y.options.maxPrice&&y.truePrice>y.options.maxPrice&&(y.truePrice=Number(y.options.maxPrice)),y.truePrice%1!=0&&(y.truePrice=Number(y.truePrice.toFixed(2))),b.trigger("priceChange",[t,y.truePrice]),y.truePrice},this.setMask=function(i,o){var t,e;o=void 0!==o?o:function(){},i&&i.url&&-1!=$.inArray("svg",i.url.split("."))?(y.mask=i,t=Date.now().toString(),e=(y.options._loadFromScript||"")+i.url,y.options.imageLoadTimestamp&&!y.options._loadFromScript&&(e+="?"+t),$.get(e).done(function(t){fabric.loadSVGFromURL(e,function(t,e){var n=null;t&&((n=t?fabric.util.groupSVGElements(t,e):null).setOptions({left:i.left?Number(i.left):0,top:i.top?Number(i.top):0,scaleX:i.scaleX?Number(i.scaleX):1,scaleY:i.scaleY?Number(i.scaleY):1,selectable:!0,evented:!1,resizable:!0,lockUniScaling:!1,lockRotation:!0,borderColor:"transparent",fill:"rgba(0,0,0,0)",transparentCorners:!0,cornerColor:y.options.selectedColor,cornerIconColor:y.options.cornerIconColor,cornerSize:24,originX:"left",originY:"top",name:"view-mask",objectCaching:!1,excludeFromExport:!0,_ignore:!0,_originParams:{left:i.left?Number(i.left):0,top:i.top?Number(i.top):0,scaleX:i.scaleX?Number(i.scaleX):1,scaleY:i.scaleY?Number(i.scaleY):1}}),y.stage.clipTo=function(t){n.render(t)},y.stage.renderAll(),y.maskObject=n,y.resetCanvasSize()),o(n)})}).fail(o)):(y.stage.clipTo=y.maskObject=y.mask=null,y.stage.renderAll())},this.getOptions=function(){var e={};return"object"==typeof FancyProductDesignerView.relevantOptions&&FancyProductDesignerView.relevantOptions.forEach(function(t){e[t]=y.options[t]}),e},this.toggleLock=function(t){return t=void 0===t||t,y.locked=t,b.trigger("priceChange",[0,y.truePrice]),t},this.loadElements=function(t,e){w&&y.reset(!1),y.elements=[],y.addElements(t,e)},this.addElements=function(n,e){var i=0;function o(){var t;++i<n.length?r(t=n[i])||y.addElement(t.type,t.source,t.title,t.parameters):(b.off("elementAdd",o),void 0!==e&&e.call(e,y))}function r(t){if(void 0===t.type||void 0===t.source||void 0===t.title){var e=n.indexOf(t);if(-1!==e)return FPDUtil.log("Element index "+e+" from elements removed, its not a valid element object!","info"),o(),1}else y.elements.push(t)}var t=n[0];t?(b.on("elementAdd",o),r(t)||y.addElement(t.type,t.source,t.title,t.parameters)):void 0!==e&&e.call(e,y)},this.renderElementBoundingBox=function(t){var e;y.currentBoundingObject&&(y.stage.remove(y.currentBoundingObject),y.currentBoundingObject=null),t&&((e=y.getBoundingBoxCoords(t))?(e={left:e.left,top:e.top,width:e.width,height:e.height,angle:e.angle||0,stroke:y.options.boundingBoxColor,strokeWidth:1,strokeLineCap:"square",strokeDashArray:[10,10],fill:!1,selectable:!1,evented:!1,originX:"left",originY:"top",name:"bounding-box",excludeFromExport:!0,_ignore:!0},e=$.extend({},e,y.options.boundingBoxProps),y.currentBoundingObject=new fabric.Rect(e),y.stage.add(y.currentBoundingObject),y.currentBoundingObject.bringToFront(),b.trigger("boundingBoxToggle",[y.currentBoundingObject,!0])):t.clipTo=null,A(t))},this.renderPrintingBox=function(){var t;y.printingBoxObject&&(y.stage.remove(y.printingBoxObject),y.printingBoxObject=null),FPDUtil.objectHasKeys(y.options.printingBox,["left","top","width","height"])&&(t=new fabric.Rect({left:0,top:0,width:y.options.printingBox.width,height:y.options.printingBox.height,stroke:y.options.printingBox.visibility||y.options.editorMode?"#db2828":"transparent",strokeWidth:1,strokeLineCap:"square",fill:!1,originX:"left",originY:"top",name:"printing-box",excludeFromExport:!0,_ignore:!0}),y.printingBoxObject=new fabric.Group([t],{left:y.options.printingBox.left,top:y.options.printingBox.top,evented:!1,resizable:!0,lockUniScaling:!0,lockRotation:!0,borderColor:"transparent",transparentCorners:!0,cornerColor:y.options.selectedColor,cornerIconColor:y.options.cornerIconColor,cornerSize:24,originX:"left",originY:"top",name:"printing-boxes",excludeFromExport:!0,selectable:!1,_ignore:!0}),y.stage.add(y.printingBoxObject),y.printingBoxObject.setCoords(),y.stage.renderAll())},this.setup=function(){this.loadElements(n.elements,e)},function(){y.title=n.title,y.thumbnail=n.thumbnail,y.elements=[],y.options=n.options,y.undos=[],y.redos=[],y.totalPrice=0,y.truePrice=0,y.additionalPrice=0,y.zoom=1,y.responsiveScale=1,y.currentElement=null,y.currentBoundingObject=null,y.currentUploadZone=null,y.stage=null,y.fCanv=null,y.mask=n.mask||null,y.maskObject=null,y.printingBoxObject=null,y.locked=void 0!==n.locked?n.locked:n.options.optionalView,y.dragStage=!1,y.isCustomized=!1,y.textPlaceholder=null,y.numberPlaceholder=null,y.names_numbers=n.names_numbers||null,y.options.width&&(y.options.stageWidth=y.options.width,delete y.options.width),r.append("<canvas></canvas>"),b.on("elementAdd",function(t,e){e&&(C(),!e.isCustom||e.hasUploadZone||e.replace||(e.copyable=e.originParams.copyable=!0,y.stage.renderAll()))});var t="#54dfe6",e=r.children("canvas:last").get(0),t=$.extend({},{containerClass:"fpd-view-stage fpd-hidden",selection:y.options.multiSelection,selectionBorderColor:t,selectionColor:FPDUtil.convertHexToRGBA(t,10),hoverCursor:"pointer",controlsAboveOverlay:!0,centeredScaling:!0,allowTouchScrolling:!0,preserveObjectStacking:!0},i);y.fCanv=y.stage=new fabric.Canvas(e,t).on({"object:added":function(t){var e=t.target,t=e.price;"basic"!==y.options.cornerControlsStyle&&(e.calcCoords=e._fpdBasicCalcCoords,e._setCornerCoords=e._fpdBasicsetCornerCoords,e._getRotatedCornerCursor=e._fpdBasicgetRotatedCornerCursor,e._drawControl=e._fpdBasicdrawControl),e._addToUZ&&""!=e._addToUZ&&(t=y.getElementByTitle(e._addToUZ).price||t),void 0===t||0===t||e.uploadZone||e._ignore||e.chargeAfterEditing&&!e._isPriced||(e.setCoords(),y.changePrice(t,"+")),b.trigger("fabricObject:added",[e])},"object:removed":function(t){t=t.target;void 0===t.price||0===t.price||t.uploadZone||t.chargeAfterEditing&&!t._isPriced||y.changePrice(t.price,"-"),b.trigger("fabricObject:removed",[t])},"selection:created":d,"selection:updated":d}),y.stage.setDimensions({width:y.options.stageWidth,height:y.options.stageHeight}),y.mask&&y.setMask(y.mask),y.renderPrintingBox()}()};FancyProductDesignerView.relevantOptions=["stageWidth","stageHeight","customAdds","customImageParameters","customTextParameters","maxPrice","optionalView","designCategories","printingBox","output","layouts","usePrintingBoxAsBounding"],FancyProductDesignerView.propertiesToInclude=["_isInitial","lockMovementX","lockMovementY","lockRotation","lockScalingX","lockScalingY","lockScalingFlip","lockUniScaling","resizeType","clipTo","clippingRect","boundingBox","boundingBoxMode","selectable","evented","title","editable","cornerColor","cornerIconColor","borderColor","isEditable","hasUploadZone"];var FPDFilters={none:{name:"None",preview:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAABGhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJod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XJH4g+7iL9qAcY2XE2/kgtrMrdeoROXfRPyZ3GV3+TnBTMYRKRKbW0HuObtIdD5xcegmhbv7nkNZqf7LT+vRnJE/PtjRdAPDGT/Ggb9yOYGVX708gfI598Y8yXKjrgSfFXk1N/HxoydSzGC0PzpZjXys3gabmXK71L6ztIH5twH6d5nNMcLXLwNlBFP9c/r7nAH430plIMckZbdwGWIm7B6LXbD87LAUGF5e9poNZhlAuOU/WqnyRdHkdHMAAAAASUVORK5CYII="},sepia2:{name:"Sepia Second",preview:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAYAAAA6oTAqAAAQAklEQVRoQ92a2YtcdRbHT1fvWzpJL+nsmmScmBhNok6MmgEjGaKD+jCC48DIoL74oMEFfBCZiYIiio/RAUcfRFDQVxUVQRFEQ9Qsrkk06c5mkk7vay13+Jxzv3Vvdwb/gCmoruq7/H7ne5bvWW7V2P/RqwYs/f33JbW1BaupMUuSQFepJDY1VbILF6bs4MEBO3163M/PzFSsWKxYpVKpXsvxurqCNTTUWn19wZqb66yxsdaamvgsWGNjnTU0FPwc1/FZKPC9xmpqaqxQ4NP8zfffekm+QiF/FWuY+Z0nTtyf1NbGwkmSuJABpmwjI9P23XcX7PDhId9serps5TJgYjEJICERFBDNzbUOAlAAie8FQ2lcw37cIzAuTApslpg5bHlFa+/45KIkAxPaqrFyOXEgvBF8dHTGgXz77YADxSpYh/NcH280imVC0MwqABIYPsNygOANIO4HYKwR/18MJo6xf3xm33WtW5Z/Tp68P3FtFQpWrlSsVMI6iQsNmGPHRuybb865RQDLcb5rc4RCINwGgQEQIPQOgLwFJD7jPoGSlUPTYfW5L1knOx6e5NcLDBsjHBpH+wIzNjZjJ06M2VdfnbXJyZLfBBjOZ5YJnxeQiJVaa8AK9RFLuFhYhneACHebDUbungcicHOtIytFrKduhmXmghEowJw5M2H7959zi7W2hqBoVi6BZiCLiYmSW4y1IAHF0WxrZSAUOwIUMRMx8L+skrdS3kKKc7fM8eP3Jfg7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x7pu/N0RyBKXsjStzWUmaj9BRW89dZmrywaOGkZdiFr7ROAHgnY/Wxv48xtidqrfKdcZnYarksKbW2kOrZ2xt67sXb2tzY1OoqFTiN2mBwxuIGnyuAlrvSmNhsEtxzS9eA71AHx/T0u9t6tH+oxfqyor/6zjeqlI+ajfk2fQG0SLXamCc5mQqxcFg9QdgTuibvUy8s07ENmKTPd8YeiW3CPh5TC5GsXEtNWBHMwbuXeDJWIUdD6HVAp8ea2IDVlyaKNLowoU0MRE3p/kS3ujynjasruvXMFisvG+pQDQdPEQ3+fO5GC8C5nQHWVNaUNx2WJVrcTw7u+8OMeZnVOoLXLBQTC2mLkplPZgkNV8LRn8/W6CFisOzF6jhhbda8C1QMI9dgjM1EwAvgOWO7X/HEhqit6utBCI4pzztnOLj9iSH0/EDKC9iMGHa4iD9Ofz46dVKJ84fpOPdvvsNQFVrBBEiHCSOnSW4UUFA0nBCothSvhZ0JEDqGtbxE6vOkwTQcHYzhOo2UPy3P/ksGFnIZg5COl/AfcCwsu/x/WywcSoRQq7nY4NxaekcMC8kDvhrO/RtbYzCbKbwVFA2XuIwEzMcvL5wZQhYk7NYOswQLBzPiUp5zJ2h2mlETAiAssOUbJArxHwXsHddjnt5LmabxWfbmtz3mQi9kY54IknH0XLauH0FRV9ZW0jEWDOAblo2nwgcoX0edi1k48h5XEkMq1FYWkGQU3AdmnUHD6glPetIwCUJcKuzlVXjhQnmm8d/ZIQT/5W/U4TdTAbUwOQ8FsSABj2kXzMCIohfvc/H/bzaox/FhNkIYD9Pwq6b/BoN59YGiHgKVAAAAAElFTkSuQmCC"},vintage:{name:"Vintage",array:[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],preview:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAEDWlDQ1BJQ0MgU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C"},kodachrome:{name:"Kodachrome",array:[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],preview:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgEtmDz14ySfaRcTIBInmKPE32kxyyE2Tv+thKbEVePDfW/byMM1Kmm0XdObS7oGD/MypMXFPXrCwOtoYjyyn7BV29/M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bPF6JxNkRmA+0ANfgTiuvc6zqwXlzMX4n5LLs8XHe5pZni7W4Cq8PkeY3t9pzf8AsrK0pATIteUAAAAASUVORK5CYII="},technicolor:{name:"Technicolor",array:[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],preview:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAEDWlDQ1BJQ0MgUHJvZmlsZQAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvRFys2weqvp+krbWKIX7nhDbzLOItiM8358pTwdirqpPFnMF2xLc1WvLyOwTAibpbmvHHcvttU57y5+XqNZrLe3lE/Pq8eUj2fXKfOe3pfOjzhJYtB/yll5SDFcSDiH+hRkH25+L+sdxKEAMZahrlSX8ukqMOWy/jXW2m6M9LDBc31B9LFuv6gVKg/0Szi3KAr1kGq1GMjU/aLbnq6/lRxc4XfJ98hTargX++DbMJBSiYMIe9Ck1YAxFkKEAG3xbYaKmDDgYyFK0UGYpfoWYXG+fAPPI6tJnNwb7ClP7IyF+D+bjOtCpkhz6CFrIa/I6sFtNl8auFXGMTP34sNwI/JhkgE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iFPoyq1iG+XErzwb2mZGf742EeUVNCZqNomKufMT8zEwjENv4HwLls4mCZeUijQw2BHw6KRJdrYHoU/Oy6ka8xwb20eF3W16brRTfY31N1HVMCI3Sb4t3nvbbhGEQiW9f/MeZcqKQrld41/wVldlbrlOW/wwAAAAASUVORK5CYII="}},FPDToolbarSmart=function(c,u){"use strict";$=jQuery;var d=this,s=$("body"),h=c.children(".fpd-sub-panel"),p=c.find(".fpd-color-wrapper"),f=($(window),!1),g=!0;this.isTransforming=!1,this.placement=u.mainOptions.toolbarPlacement;function n(t,e){return e=void 0===e||e,c.find(".fpd-tool-"+t).toggleClass("fpd-hidden",!e)}function i(t,e,n){return n=Boolean(n),h.children(".fpd-panel-"+t).children(".fpd-tool-"+e).toggleClass("fpd-hidden",!n)}function r(t,e,n){h.children(".fpd-panel-"+t).find('.fpd-panel-tabs [data-tab="'+e+'"]').toggleClass("fpd-disabled",!n)}var m=function(t){c.find(".fpd-tool-color").css("background",t),u.currentViewInstance.changeColor(u.currentViewInstance.currentElement,t)},l=function(t){h.find(".fpd-tool-uniscaling-locker > span").removeClass().addClass(t?"fpd-icon-locked":"fpd-icon-unlocked"),h.find(".fpd-tool-scaleY").toggleClass("fpd-disabled",t)};this.update=function(o){this.hideTools(),c.removeClass("fpd-type-image"),n("reset");var t=o.source;t&&(e=(t=t.split("?")[0]).split(".").pop().toLowerCase()),o.advancedEditing&&t&&(FPDUtil.isSVG(o)||-1!==$.inArray(e,["png","jpg","jpeg","svg"])||-1!==e.search(/data:image\/(jpeg|png);/))&&n("advanced-editing"),FPDUtil.elementHasColorSelection(o)&&(n("color"),r("color","fill",!0),p.removeClass("fpd-hidden"));var e=o.resizable&&"image"===FPDUtil.getType(o.type)||o.uniScalingUnlockable||o.__editorMode;(e||o.rotatable||o.__editorMode)&&(n("transform"),i("transform","scale",e),l(o.lockUniScaling),i("transform","uniscaling-locker",o.uniScalingUnlockable||o.__editorMode),i("transform","angle",Boolean(o.rotatable||o.__editorMode))),(o.draggable||o.__editorMode)&&n("position"),(o.zChangeable||o.__editorMode)&&n("layer-depth"),(FPDUtil.isSVG(o)||"text"===FPDUtil.getType(o.type))&&o.patterns&&o.patterns.length?(n("color"),r("color","fill",!0),n("patterns",!0)):n("patterns",!1),"text"===FPDUtil.getType(o.type)&&(o.editable||o.__editorMode)?(n("font-family"),n("text-size",Boolean(o.resizable||o.__editorMode)),n("text-line-height"),n("text-letter-spacing"),n("text-styles"),n("text-transform"),n("text-align"),r("color","stroke",!0),r("color","shadow",!0),o.curvable&&!o.textBox&&n("curved-text"),c.find('textarea[data-control="text"]').val(o.get("text")),"smart"==u.mainOptions.toolbarPlacement&&"top"==u.mainOptions.toolbarTextareaPosition?c.children(".fpd-panel-edit-text").toggleClass("fpd-hidden",o.textPlaceholder||o.numberPlaceholder):n("edit-text",!o.textPlaceholder&&!o.numberPlaceholder)):c.addClass("fpd-type-image"),c.find(".fpd-top-tools, .fpd-bottom-tools").children("div").removeClass("fpd-no-margin").filter(":visible:last").addClass("fpd-no-margin"),h.find(".fpd-panel-tabs").each(function(t,e){e=$(e);e.toggle(1<e.children(":not(.fpd-disabled)").length),e.children(":not(.fpd-disabled):first").addClass("fpd-active").click()}),c.find("[data-control]").each(function(t,e){var n=$(e),i=n.data("control");n.hasClass("fpd-number")?void 0!==o[i]&&(e=n.attr("step")&&1<n.attr("step").length?parseFloat(o[i]).toFixed(2):parseInt(o[i]),n.val(e),n.prev(".fpd-range-wrapper")&&("fontSize"==i?n.prev(".fpd-range-wrapper").children("input").attr("min",o.minFontSize).attr("max",o.maxFontSize):"scaleX"!=i&&"scaleY"!=i||n.prev(".fpd-range-wrapper").children("input").attr("min",o.minScaleLimit),n.prev(".fpd-range-wrapper").children("input").val(e).rangeslider("update",!0,!1))):n.hasClass("fpd-toggle")?n.toggleClass("fpd-enabled",o[i]===n.data("enabled")):n.hasClass("fpd-btn-options")?n.children("span").removeClass().addClass(n.data("options")[o[i]]):n.hasClass("fpd-tool-color")?n.css("background",FPDUtil.getBgCssFromElement(o)):"fontSize"==i?c.find(".fpd-tool-text-size > .fpd-current-val").text(parseInt(o[i])):"fontFamily"==i&&void 0!==o[i]&&c.find(".fpd-tool-font-family > .fpd-current-val").text(o[i]).css("font-family",o[i])}),c.children(".fpd-scroll-area").mCustomScrollbar("update"),d.updatePosition(o)},this.updateUIValue=function(t,e){t=c.find('[data-control="'+t+'"]');t.val(e),t.filter(".fpd-slider-range").rangeslider("update",!0,!1)},this.hideTools=function(){c.find(".fpd-top-tools > div, .fpd-bottom-tools > div").addClass("fpd-hidden").removeClass("fpd-active"),h.hide().children().removeClass("fpd-active").find(".fpd-panel-tabs > span").addClass("fpd-disabled"),h.find(".fpd-panel-tabs-content, .fpd-panel-tabs").children().removeClass("fpd-active"),p.addClass("fpd-hidden"),c.children(".fpd-panel-edit-text").addClass("fpd-hidden")},this.updatePosition=function(t,e){var n,i,o,r,a,s,l;e=void 0===e||e,t?(s=t.oCoords,r=s.mb.y,l=u.$productStage.offset(),n=t.getBoundingRect(),i=u.mainOptions.modalMode?parseInt(u.$container.parents(".fpd-modal-product-designer:first > .fpd-modal-wrapper").css("padding-top")):l.top,o=n.top+n.height,a=t.padding+t.cornerSize+i,r=(r=o+a)>u.$productStage.height()+i?u.$productStage.height()+i+5:r,a=(u.mainOptions.modalMode?u.$container.parents(".fpd-modal-product-designer:first > .fpd-modal-wrapper")[0]:document.body).scrollHeight,r=r+c.children(".fpd-sub-panel").height()>a?i+n.top-(c.children(".fpd-sub-panel").height()+t.padding+t.cornerSize):r,l=(l=(l=l.left+s.mb.x)<(s=.5*c.outerWidth())?s:l)>$(window).width()-s?$(window).width()-s:l,c.css({left:l,top:r}),g&&"smart"==u.mainOptions.toolbarPlacement&&!u.mainOptions.modalMode&&FPDUtil.isMobile()&&(setTimeout(function(){c.offset().top<r&&$(window).scrollTop($(document).scrollTop()+(r-c.offset().top)),g=!0},500),g=!1),this.toggle(e,!1)):this.toggle(!1)},this.toggle=function(t,e){e=void 0===e||e,!t&&e&&p.spectrum("destroy"),t=0!=c.find(".fpd-top-tools > div:visible, .fpd-bottom-tools > div:visible").length&&t,c.toggleClass("fpd-show",t)},this.setPlacement=function(t){d.placement=t,c.removeClass(function(t,e){return(e.match(/(^|\s)fpd-toolbar-placement-\S+/g)||[]).join(" ")}),c.addClass("fpd-toolbar-placement-"+t),-1!==["inside-bottom","inside-top"].indexOf(t)?(c.appendTo(u.$mainWrapper),c.children(".fpd-scroll-area").mCustomScrollbar("disable")):(0<u.$container.parents(".fpd-modal-product-designer").length&&!u.$container.hasClass("fpd-device-smartphone")?c.appendTo(u.$container.parents(".fpd-modal-product-designer:first > .fpd-modal-wrapper")):c.appendTo(u.mainOptions.toolbarDynamicContext),c.children(".fpd-scroll-area").mCustomScrollbar("update"))},function(){c.data("instance",d).addClass("fpd-theme-"+u.mainOptions.toolbarTheme),d.setPlacement(u.mainOptions.toolbarPlacement),0<c.length&&c.get(0).addEventListener("touchmove",function(t){"text"!==t.target.dataset.control&&t.preventDefault()},!1),c.children(".fpd-scroll-area").mCustomScrollbar({axis:"x",scrollInertia:200,mouseWheel:{enable:!0},advanced:{autoExpandHorizontalScroll:!0}}),s.on("mousedown touchstart",function(t){0<$(t.target).parents(".fpd-range-slider").length&&(d.isTransforming=!0)}).on("mouseup touchend",function(){d.isTransforming=!1}),c.on("click touchend",".fpd-close-panel",function(t){t.stopPropagation(),t.preventDefault(),c.find(".fpd-panel-font-family input").val("").keyup(),p.children("input").spectrum("hide"),h.hide(),u.currentElement&&"function"===u.currentElement.exitEditing&&u.currentElement.exitEditing(),u.$container.trigger("toolbarPanelClose")});for(var t=Object.keys(u.mainOptions.maxValues),e=0;e<t.length;++e){var n=t[e];c.find('[data-control="'+n+'"]').attr("max",u.mainOptions.maxValues[n])}c.find('[class^="fpd-tool-"]').click(function(){var t=$(this);if(t.data("panel")){t.tooltipster("hide"),h.show().children().removeClass("fpd-active").filter(".fpd-panel-"+t.data("panel")).addClass("fpd-active"),h.find(".fpd-slider-range").rangeslider("update",!1,!1);var n=u.currentElement;if("color"==t.data("panel")){if(FPDUtil.elementHasColorSelection(n)){var e=n.__editorMode?["#000"]:(n.colorLinkGroup?u.colorLinkGroups[n.colorLinkGroup]:n).colors;if(p.children("input").spectrum("destroy"),p.empty().removeClass("fpd-colorpicker-group"),n.type==FPDPathGroupName&&(1<n.getObjects().length||1==e||n.__editorMode)){for(var i=n.getObjects(),o=0;o<i.length;++o){var r=i[o],a=tinycolor(r.fill);p.append('<input type="text" value="'+a.toHexString()+'" />')}p.addClass("fpd-colorpicker-group").children("input").spectrum("destroy").spectrum({showPaletteOnly:$.isArray(n.colors)&&!n.__editorMode,preferredFormat:"hex",showInput:!0,showInitial:!0,showButtons:!1,showPalette:u.mainOptions.colorPickerPalette&&0<u.mainOptions.colorPickerPalette.length,palette:$.isArray(n.colors)?n.colors:u.mainOptions.colorPickerPalette,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,show:function(t){t=FPDUtil.changePathColor(u.currentElement,p.children("input").index(this),t);FPDUtil.spectrumColorNames($(this).spectrum("container"),u),n._tempFill=t},move:function(t){t=FPDUtil.changePathColor(n,p.children("input").index(this),t);u.currentViewInstance.setElementParameters({fill:t},n)},change:function(t){t=FPDUtil.changePathColor(n,p.children("input").index(this),t);$(document).unbind("click.spectrum"),u.currentViewInstance.setElementParameters({fill:t},n)}})}else if(1<e.length||n.type==FPDPathGroupName&&1===n.getObjects().length){p.html('<div class="fpd-scroll-area"><div class="fpd-color-palette fpd-grid"></div></div>');for(o=0;o<e.length;++o){var a=e[o],s=(s=u.mainOptions.hexNames[a.replace("#","").toLowerCase()])||a;p.find(".fpd-grid").append('<div class="fpd-item fpd-tooltip" title="'+s+'" style="background-color: '+a+';"></div>').children(".fpd-item:last").click(function(){var t=tinycolor($(this).css("backgroundColor"));c.find(".fpd-tool-color").css("background",t.toHexString());var e=t.toHexString();u.currentElement.type==FPDPathGroupName&&(e=FPDUtil.changePathColor(n,0,t)),u.currentViewInstance.setElementParameters({fill:e})})}FPDUtil.updateTooltip(),p.children(".fpd-scroll-area").mCustomScrollbar({scrollInertia:200,documentTouchScroll:!1,contentTouchScroll:!0,mouseWheel:{enable:!0,preventDefault:!0}})}else p.html('<input type="text" value="'+(n.fill||e[0])+'" />'),p.children("input").spectrum({flat:!0,preferredFormat:"hex",showInput:!0,showInitial:!0,showPalette:u.mainOptions.colorPickerPalette&&0<u.mainOptions.colorPickerPalette.length,palette:u.mainOptions.colorPickerPalette,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,allowEmpty:Boolean(n.__editorMode),show:function(t){FPDUtil.spectrumColorNames($(this).spectrum("container").next(".sp-container"),u),n._tempFill=t.toHexString()},move:function(t){!1!==f&&"png"===FPDUtil.elementIsColorizable(n)||m(t?t.toHexString():"")},change:function(t){$(document).unbind("click.spectrum"),u.currentViewInstance.setElementParameters({fill:!!t&&t.toHexString()},n)}}).on("dragstart.spectrum",function(){f=!0}).on("dragstop.spectrum",function(t,e){f=!1,m(e.toHexString())})}if((FPDUtil.isSVG(n)||"text"===FPDUtil.getType(n.type))&&n.patterns&&n.patterns.length){h.find(".fpd-tool-patterns .fpd-grid").empty();for(o=0;o<n.patterns.length;++o){var l=n.patterns[o];$("<div/>",{class:"fpd-item","data-pattern":l,html:'<picture style="background-image: url('+l+');"></picture>'}).appendTo(h.find(".fpd-tool-patterns .fpd-grid")).click(function(){var t=$(this).data("pattern");c.find(".fpd-tool-color").css("background","url("+t+")"),u.currentViewInstance.setElementParameters({pattern:t})})}h.find(".fpd-tool-patterns .fpd-scroll-area").mCustomScrollbar({scrollInertia:200,documentTouchScroll:!1,contentTouchScroll:!0,mouseWheel:{enable:!0,preventDefault:!0}})}h.find(".fpd-stroke-color-picker input").spectrum("destroy").spectrum({color:n.stroke||"#000",flat:!0,preferredFormat:"hex",showInput:!0,showInitial:!0,palette:n.strokeColors,showPaletteOnly:n.strokeColors&&0<n.strokeColors.length,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,move:function(t){d.isTransforming=!0,u.currentViewInstance.setElementParameters({stroke:t.toHexString()})},change:function(t){u.currentViewInstance.setElementParameters({stroke:t.toHexString()})}}),h.find(".fpd-shadow-color-picker input").spectrum("destroy").spectrum({color:n.stroke||"#000",flat:!0,preferredFormat:"hex",showInput:!0,showInitial:!0,allowEmpty:!0,showPalette:u.mainOptions.colorPickerPalette&&0<u.mainOptions.colorPickerPalette.length,palette:u.mainOptions.colorPickerPalette,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,move:function(t){t&&(d.isTransforming=!0,u.currentViewInstance.setElementParameters({shadowColor:t.toHexString()}))},change:function(t){u.currentViewInstance.setElementParameters({shadowColor:t?t.toHexString():""})}})}c.find(".fpd-panel-font-family .fpd-fonts-list").mCustomScrollbar({axis:"y",scrollInertia:200,documentTouchScroll:!1,contentTouchScroll:!0,mouseWheel:{enable:!0,preventDefault:!0},advanced:{autoExpandHorizontalScroll:!0}}),d.updatePosition(u.currentElement),u.$container.trigger("toolbarPanelOpen",[t.data("panel")])}}),h.find(".fpd-panel-tabs > span").click(function(){var t=$(this);t.addClass("fpd-active").siblings().removeClass("fpd-active");t=t.parent().siblings(".fpd-panel-tabs-content").children('[data-id="'+this.dataset.tab+'"]').addClass("fpd-active");t.siblings().removeClass("fpd-active"),t.find(".fpd-slider-range").rangeslider("update",!0,!1),d.updatePosition(u.currentElement)});var o=!0;if(h.find(".fpd-slider-range").rangeslider({polyfill:!1,rangeClass:"fpd-range-slider",disabledClass:"fpd-range-slider--disabled",horizontalClass:"fpd-range-slider--horizontal",verticalClass:"fpd-range-slider--vertical",fillClass:"fpd-range-slider__fill",handleClass:"fpd-range-slider__handle",onSlide:function(t,e){var n,i;d.isTransforming=!0,u.currentViewInstance&&u.currentViewInstance.currentElement&&this.$element.is(":visible")&&((n={})[i=this.$element.data("control")]=e,"scaleX"===i&&u.currentElement&&u.currentElement.lockUniScaling&&(n.scaleY=e),"scaleX"==i&&0==e||"scaleY"==i&&0==e||(u.currentViewInstance.setElementParameters(n,u.currentViewInstance.currentElement,o),this.$element.parent().siblings(".fpd-slider-number").val(e),o=!1))},onSlideEnd:function(t,e){"scaleX"===this.$element.data("control")&&u.currentElement&&u.currentElement.lockUniScaling&&c.find('[data-control="scaleY"]').val(e).filter(".fpd-slider-range").rangeslider("update",!0,!1),d.isTransforming=!1,o=!0}}),c.on("click",".fpd-btn-options",function(t){t.preventDefault();var e=$(this),n=e.data("options"),i=Object.keys(n),t=u.currentElement?u.currentElement[this.dataset.control]:i[0],i=i.indexOf(t)==i.length-1?i[0]:i[i.indexOf(t)+1],t={};t[this.dataset.control]=i,e.children("span").removeClass().addClass(n[i]),u.currentViewInstance.setElementParameters(t)}),c.find(".fpd-toggle").click(function(){var t=$(this).toggleClass("fpd-enabled"),e={};t.hasClass("fpd-curved-text-switcher")||(e[t.data("control")]=t.hasClass("fpd-enabled")?t.data("enabled"):t.data("disabled"),t.hasClass("fpd-tool-uniscaling-locker")&&l(t.hasClass("fpd-enabled")),u.currentViewInstance.setElementParameters(e))}),c.find(".fpd-number").change(function(){var t=$(this),e={};this.value>Number(t.attr("max"))&&(this.value=Number(t.attr("max"))),this.value<Number(t.attr("min"))&&(this.value=Number(t.attr("min")));var n=Number(this.value);t.hasClass("fpd-slider-number")&&(t.siblings(".fpd-range-wrapper").children("input").val(this.value).rangeslider("update",!0,!1),"scaleX"===t.data("control")&&u.currentElement&&u.currentElement.lockUniScaling&&c.find('[data-control="scaleY"]').val(n).change()),e[t.data("control")]=n,u.currentViewInstance&&$(document.activeElement).is(":not(textarea)")&&u.currentViewInstance.setElementParameters(e,u.currentViewInstance.currentElement)}),u.mainOptions.fonts&&0<u.mainOptions.fonts.length){for(var i=h.find(".fpd-fonts-list"),e=0;e<u.mainOptions.fonts.length;++e){var r=u.mainOptions.fonts[e],a=r;"object"==typeof r&&(a=r.name),$("<span/>",{class:"fpd-item","data-value":a,html:a,css:{fontFamily:a}}).appendTo(i)}c.on("keyup",".fpd-panel-font-family input",function(){var t=$(this).css("font-family","Helvetica").nextAll(".fpd-fonts-list").find(".fpd-item").hide();(0===this.value.length?t:t.filter(':containsCaseInsensitive("'+this.value+'")')).show()}).on("click",".fpd-fonts-list .fpd-item",function(){var t=this.dataset.value;c.find(".fpd-tool-font-family .fpd-current-val").text(t).css("fontFamily",t),u.currentViewInstance.setElementParameters({fontFamily:t})})}c.on("click",".fpd-tool-edit-text",function(){var t=h.find(".fpd-panel-edit-text textarea").val();h.find(".fpd-panel-edit-text textarea").focus().val("").val(t)}),c.find('textarea[data-control="text"]').on("keyup",function(t){t.stopPropagation,t.preventDefault();var e=this.selectionStart,t=this.selectionEnd;u.currentViewInstance.setElementParameters({text:this.value}),this.selectionStart=e,this.selectionEnd=t}),c.find(".fpd-tool-advanced-editing").click(function(){var t,e;u.currentViewInstance&&u.currentViewInstance.currentElement&&u.currentViewInstance.currentElement.source&&(t=u.currentViewInstance.currentElement.source,e=FPDUtil.showModal($(u.translatedUI).children(".fpd-image-editor-container").clone(),!0),new FPDImageEditor(e.find(".fpd-image-editor-container"),u.currentViewInstance.currentElement,u).loadImage(t))}),h.on("click",".fpd-panel-position.fpd-icon-button-group > span",function(){var t=$(this);t.hasClass("fpd-align-left")?u.currentViewInstance.alignElement("left"):t.hasClass("fpd-align-top")?u.currentViewInstance.alignElement("top"):t.hasClass("fpd-align-right")?u.currentViewInstance.alignElement("right"):t.hasClass("fpd-align-bottom")?u.currentViewInstance.alignElement("bottom"):t.hasClass("fpd-align-center-h")?u.currentViewInstance.centerElement(!0,!1):t.hasClass("fpd-align-center-v")?u.currentViewInstance.centerElement(!1,!0):t.hasClass("fpd-flip-h")?u.currentViewInstance.setElementParameters({flipX:!u.currentElement.get("flipX")}):t.hasClass("fpd-flip-v")&&u.currentViewInstance.setElementParameters({flipY:!u.currentElement.get("flipY")}),d.updatePosition(u.currentElement)}),c.find(".fpd-tool-move-up, .fpd-tool-move-down").click(function(){var t=u.currentViewInstance.getZIndex();t=(t=$(this).hasClass("fpd-tool-move-up")?t+1:t-1)<0?0:t,u.currentViewInstance.setElementParameters({z:t})}),c.find(".fpd-tool-reset").click(function(){$(document).unbind("click.spectrum"),c.find(".tooltipstered").tooltipster("destroy");var t=u.currentElement.originParams;delete t.clipPath,u.currentElement.boundingBox&&(u.currentElement.scaleX=1,t.boundingBox=u.currentElement.boundingBox),u.currentViewInstance.setElementParameters(u.currentElement.originParams),u.currentViewInstance.deselectElement(),FPDUtil.updateTooltip()}),u.$container.on("elementModify",function(t,e,n){n.fontSize&&c.find(".fpd-tool-text-size > .fpd-current-val").text(parseInt(n.fontSize))})}()},FPDMainBar=function(u,r,d,a){"use strict";$=jQuery;var h=this,s=$("body"),p=r.children(".fpd-navigation");this.currentModules=u.mainOptions.mainBarModules,this.$selectedModule=null,this.$container=r,h.$content=$('<div class="fpd-content"></div>'),this.mainBarShowing=!0;this.callModule=function(t,e){var n=p.children("div").removeClass("fpd-active").filter(e?'[data-dynamic-designs-id="'+e+'"]':'[data-module="'+t+'"]:not([data-dynamic-designs-id])').addClass("fpd-active");h.$selectedModule=h.$content.children("div").removeClass("fpd-active").filter(e?'[data-dynamic-designs-id="'+e+'"]':'[data-module="'+t+'"]:not([data-dynamic-designs-id])').addClass("fpd-active"),"doyle"!==u.mainOptions.uiTheme&&0<h.$content.parent(".fpd-draggable-dialog").length&&(void 0!==a.attr("style")&&""!==a.attr("style")||(e=u.$productStage.offset().top,0<a.parent(".fpd-modal-product-designer").length&&(e=parseInt(a.siblings(".fpd-modal-wrapper").css("paddingTop"))+r.height()),a.css("top",e)),a.addClass("fpd-active").find(".fpd-dialog-title").text(n.find(".fpd-label").text())),"text"===t?h.$selectedModule.find("textarea").focus():"manage-layers"===t?u.productCreated&&FPDLayersModule.createList(u,h.$selectedModule):"text-layers"===t?u.productCreated&&FPDTextLayersModule.createList(u,h.$selectedModule):"undefined"!=typeof FPDNamesNumbersModule&&"names-numbers"===t&&u.productCreated&&FPDNamesNumbersModule.setup(u,h.$selectedModule),h.toggleDialog(!0),FPDUtil.refreshLazyLoad(h.$selectedModule.find(".fpd-grid"),!1)},this.callSecondary=function(t){h.callModule("secondary"),h.$content.children(".fpd-secondary-module").children("."+t).addClass("fpd-active").siblings().removeClass("fpd-active");var e=null;"fpd-upload-zone-adds-panel"===t?h.$content.find(".fpd-upload-zone-adds-panel .fpd-bottom-nav > :not(.fpd-hidden)").first().click():"fpd-saved-designs-panel"===t&&(e=u.getTranslation("actions","load")),"doyle"!==u.mainOptions.uiTheme&&0<h.$content.parent(".fpd-draggable-dialog").length&&e&&a.addClass("fpd-active").find(".fpd-dialog-title").text(e),u.$container.trigger("secondaryModuleCalled",[t,h.$content.children(".fpd-secondary-module").children(".fpd-active")])},this.setContentWrapper=function(t){a.removeClass("fpd-active"),"sidebar"===t?(0===p.children(".fpd-active").length&&p.children().first().addClass("fpd-active"),h.$content.appendTo(r)):"draggable-dialog"===t&&(h.$content.appendTo(a),p.removeClass("fpd-hidden")),h.currentModules.length<=1&&!u.$container.hasClass("fpd-topbar")?p.addClass("fpd-hidden"):p.removeClass("fpd-hidden"),p.children().each(function(t,e){e=$(e);e.filter(".tooltipstered").tooltipster("destroy"),u.$container.hasClass("fpd-sidebar")?e.addClass("fpd-tooltip").attr("title",e.children(".fpd-label").text()):e.removeClass("fpd-tooltip").removeAttr("title")}),FPDUtil.updateTooltip(p),p.children(".fpd-active").click()},this.toggleDialog=function(t){t=void 0===t||t,("doyle"!==u.mainOptions.uiTheme&&u.$container.hasClass("fpd-topbar")&&0===u.$container.filter('[class*="fpd-off-canvas-"]').length?a:u.$container.toggleClass("fpd-module-visible",t).children(".fpd-content")).toggleClass("fpd-active",t),0<u.$container.filter('[class*="fpd-off-canvas-"]').length&&(h.$container.toggleClass("fpd-show",t).children(".fpd-close-off-canvas").removeAttr("style"),h.$content.removeAttr("style").height(u.$mainWrapper.height()),0===p.children("div").length?h.$content.css("top",0):h.$content.css("top",p.height()),!t&&h.mainBarShowing&&u.deselectElement()),t||p.children(".fpd-active").removeClass("fpd-active"),h.mainBarShowing=t},this.toggleUploadZonePanel=function(t){t=void 0===t||t,u._loadingCustomImage||(t?h.callSecondary("fpd-upload-zone-adds-panel"):(u.currentViewInstance.currentUploadZone=null,h.toggleDialog(!1)))},this.toggleUploadZoneAdds=function(t){var e=h.$content.find(".fpd-upload-zone-adds-panel");e.find(".fpd-add-image").toggleClass("fpd-hidden",!Boolean(t.uploads)),e.find(".fpd-add-text").toggleClass("fpd-hidden",!Boolean(t.texts)),e.find(".fpd-add-design").toggleClass("fpd-hidden",!Boolean(t.designs)),u.currentElement.price?e.find('[data-module="text"] .fpd-btn > .fpd-price').html(" - "+u.formatPrice(u.currentElement.price)):e.find('[data-module="text"] .fpd-btn > .fpd-price').html(""),u.UZmoduleInstance_designs&&u.UZmoduleInstance_designs.toggleCategories(),e.find(".fpd-off-canvas-nav > :not(.fpd-hidden)").first().click()},this.setup=function(t){h.currentModules=t;var e=u.mainOptions.initialActiveModule||"";h.currentModules.length<=1&&!u.$container.hasClass("fpd-topbar")?(e=h.currentModules[0]||"",p.addClass("fpd-hidden")):u.$container.hasClass("fpd-sidebar")&&""==e?e=p.children().first().data("module"):p.removeClass("fpd-hidden"),p.empty(),h.$content.empty(),t.forEach(function(t){var e=t,n=$('<span class="fpd-nav-icon"></span>'),i="",o=null,r="",a=!0;if(0==t.search("designs")&&(e="designs",!FPDUtil.isEmpty(u.mainOptions.dynamicDesigns)&&0==t.search("designs_"))){if(!(o=t.split("_").pop())||!u.mainOptions.dynamicDesigns[o])return;var s=u.mainOptions.dynamicDesigns[o],i=s.name;r+=' data-dynamic-designs-id="'+o+'"',FPDUtil.isEmpty(s.icon)||-1==s.icon.indexOf(".svg")||(a=!1,$.get(s.icon,function(t){n.append($(t).children("svg"))}))}var l,c=d.children('[data-module="'+e+'"]'),s=c.clone();o||(i=c.data("title")),a&&n.addClass(c.data("moduleicon")),r+=u.$container.hasClass("fpd-sidebar")?' class="fpd-tooltip"':"",r+=u.$container.hasClass("fpd-sidebar")?' title="'+i+'"':"",p.append('<div data-module="'+e+'" '+r+'><span class="fpd-label">'+i+"</span></div>"),p.children("div:last").prepend(n),h.$content.append(s),"products"===e?l=new FPDProductsModule(u,s):"text"===e?l=new FPDTextModule(u,s):"designs"===e?l=new FPDDesignsModule(u,s,o):"images"===e?l=new FPDImagesModule(u,s):"layouts"===e?l=new FPDLayoutsModule(u,s):"undefined"!=typeof FPDDrawingModule&&"drawing"===e?l=new FPDDrawingModule(u,s):"undefined"!=typeof FPDDynamicViews&&"dynamic-views"===e&&(l=new FPDDynamicViews(u,s)),l&&(u["moduleInstance_"+t]=l)}),0===h.$content.children('[data-module="manage-layers"]').length&&h.$content.append(d.children('[data-module="manage-layers"]').clone()),h.$content.append(d.children('[data-module="secondary"]').clone());for(var n=["images","text","designs"],i=0;i<n.length;++i){var o,r=n[i],a=d.children('[data-module="'+r+'"]').clone();h.$content.find(".fpd-upload-zone-content").append(a),"text"===r?o=new FPDTextModule(u,a):"designs"===r?o=new FPDDesignsModule(u,a):"images"===r&&(o=new FPDImagesModule(u,a)),o&&(u["UZmoduleInstance_"+r]=o)}(u.$container.hasClass("fpd-device-desktop")||u.$container.parents(".ui-composer-page").length)&&p.children('[data-module="'+e+'"]').click()},function(){var e,n,i,o;a.addClass("fpd-grid-columns-"+u.mainOptions.gridColumns).toggleClass("fpd-hidden",u.$container.hasClass("fpd-main-bar-container-enabled")),"doyle"!==u.mainOptions.uiTheme&&u.$container.hasClass("fpd-topbar")&&!u.$container.hasClass("fpd-main-bar-container-enabled")&&0===u.$container.filter('[class*="fpd-off-canvas-"]').length?h.setContentWrapper("draggable-dialog"):h.setContentWrapper("sidebar"),0<u.$container.filter('[class*="fpd-off-canvas-"]').length&&(i=n=e=0,o=r.children(".fpd-close-off-canvas"),h.$content.on("touchstart",function(t){e=t.originalEvent.touches[0].pageX,i=parseInt(o.css(u.$container.hasClass("fpd-off-canvas-left")?"left":"right"))}).on("touchmove",function(t){t.preventDefault();t=t.originalEvent.touches[0].pageX;n=e-t,targetPos=u.$container.hasClass("fpd-off-canvas-left")?"left":"right",n=Math.abs(n)<0?0:Math.abs(n),h.$content.css(targetPos,-n),o.css(targetPos,i-n)}).on("touchend",function(t){var e=u.$container.hasClass("fpd-off-canvas-left")?"left":"right";100<Math.abs(n)?h.toggleDialog(!1):(h.$content.css(e,0),o.css(e,i)),n=0})),r.on("click",".fpd-close-off-canvas",function(t){t.stopPropagation(),p.children("div").removeClass("fpd-active"),h.toggleDialog(!1)});var t=u.mainOptions.modalMode?$(".fpd-modal-product-designer"):s;t.append(a),a.draggable({handle:a.find(".fpd-dialog-head"),containment:t}),p.on("click","> div",function(t){t.stopPropagation();t=$(this);u.deselectElement(),u.currentViewInstance&&(u.currentViewInstance.currentUploadZone=null),h.$content.find(".fpd-manage-layers-panel").find(".fpd-current-color, .fpd-path-colorpicker").spectrum("destroy"),(u.$container.hasClass("fpd-topbar")||"doyle"==u.mainOptions.uiTheme)&&t.hasClass("fpd-active")?(u.$container.removeClass("fpd-module-visible"),t.removeClass("fpd-active"),h.toggleDialog(!1)):h.callModule(t.data("module"),t.data("dynamic-designs-id"))}),a.on("mousewheel",function(t){t.preventDefault()}),h.$content.on("click",".fpd-bottom-nav > div",function(){var t=$(this);t.addClass("fpd-active").siblings().removeClass("fpd-active");var e=t.parent().next().children('[data-module="'+t.data("module")+'"]').addClass("fpd-active");e.siblings().removeClass("fpd-active"),setTimeout(function(){FPDUtil.refreshLazyLoad(e.find(".fpd-grid"),!1)},10)}),s.on("click touchend",".fpd-close-dialog",function(){u.currentViewInstance&&u.currentViewInstance.currentUploadZone&&u.currentViewInstance.deselectElement(),h.toggleDialog(!1)}),u.$container.on("viewSelect",function(){h.$selectedModule&&(0<h.$selectedModule.filter('[data-module="manage-layers"]').length?FPDLayersModule.createList(u,h.$selectedModule):0<h.$selectedModule.filter('[data-module="text-layers"]').length?FPDTextLayersModule.createList(u,h.$selectedModule):"undefined"!=typeof FPDNamesNumbersModule&&0<h.$selectedModule.filter('[data-module="names-numbers"]').length&&FPDNamesNumbersModule.setup(u,h.$selectedModule)),u.$container.trigger("layersListUpdate")}),u.$container.on("fabricObject:added fabricObject:removed",function(t,e){u.productCreated&&!e._ignore&&(h.$selectedModule&&(0<h.$selectedModule.filter('[data-module="manage-layers"]').length?FPDLayersModule.createList(u,h.$selectedModule):0<h.$selectedModule.filter('[data-module="text-layers"]').length&&FPDTextLayersModule.createList(u,h.$selectedModule)),u.$container.trigger("layersListUpdate"))}),h.setup(h.currentModules)}()};FPDMainBar.availableModules=["products","images","text","designs","manage-layers","text-layers","layouts"];var FPDActions=function(y,a){"use strict";$=jQuery;var w,x=this,s=y.mainOptions.downloadFilename;this.currentActions=y.mainOptions.actions;function C(){return!!FPDUtil.localStorageAvailable()&&JSON.parse(window.localStorage.getItem(y.$container.attr("id")))}this.downloadFile=function(e,t){var n,i;y.currentViewInstance&&(t=void 0!==t&&t,"jpeg"===e||"png"===e?(n=document.createElement("a"),i="jpeg"===e?"#fff":"transparent",void 0!==n.download?t?y.currentViewInstance.toDataURL(function(t){download(t,s+"."+e,"image/"+e)},i,{format:e},y.watermarkImg):y.getProductDataURL(function(t){download(t,s+"."+e,"image/"+e)},i,{format:e}):y.createImage(!0,!1,i,{format:e},t)):"svg"===e?download(y.currentViewInstance.toSVG({suppressPreamble:!1},null,!1,y.watermarkImg),"Product_"+y.currentViewIndex+".svg","image/svg+xml"):(i=function(t){var e;t="string"==typeof t?[t]:t;for(var n=0;n<t.length;++n){var i=y.viewInstances[n].options.stageWidth,o=y.viewInstances[n].options.stageHeight,r=o<i?"l":"p";0!=n?e.addPage([i,o],r):e=new jspdf.jsPDF({orientation:r,unit:"px",format:[i,o]}),e.addImage(t[n],"PNG",0,0,e.internal.pageSize.getWidth(),e.internal.pageSize.getHeight())}e.save(s+".pdf")},t?y.currentViewInstance.toDataURL(i,"transparent",{format:"png"},y.watermarkImg):y.getViewsDataURL(i,"transparent",{format:"png"})))},this.setup=function(t){this.currentActions=t,y.$container.find(".fpd-actions-container").empty();for(var e=Object.keys(t),n=0;n<e.length;++n){var i=t[e[n]];"object"==typeof i&&0<i.length&&function(t){y.$container.find(".fpd-actions-container").append('<div class="fpd-actions-wrapper fpd-pos-'+t+'"></div>');var e=x.currentActions[t];if("doyle"==y.mainOptions.uiTheme){if("left"==t)for(var n=y.$container.find(".fpd-actions-wrapper.fpd-pos-"+t).append('<div class="fpd-dropdown-btn"><span class="fpd-label">'+y.getTranslation("actions","menu_file","File")+'</span><div class="fpd-dropdown-menu"></div></div>').find(".fpd-dropdown-menu"),i=0;i<e.length;++i){var o=e[i];(r=(r=a.children('[data-action="'+o+'"]')).clone().removeClass("fpd-tooltip")).append(r.attr("title")),n.append(r)}if("right"==t)for(n=y.$container.find(".fpd-actions-wrapper.fpd-pos-"+t).append('<div class="fpd-dropdown-btn"><span class="fpd-label">'+y.getTranslation("actions","menu_tools","Tools")+'</span><div class="fpd-dropdown-menu"></div></div>').find(".fpd-dropdown-menu"),i=0;i<e.length;++i){o=e[i];(r=(r=a.children('[data-action="'+o+'"]')).clone().removeClass("fpd-tooltip")).append(r.attr("title")),n.append(r)}if("top"==t)for(n=y.$container.find(".fpd-actions-wrapper.fpd-pos-"+t),i=0;i<e.length;++i){o=e[i];(r=(r=a.children('[data-action="'+o+'"]')).clone().removeClass("fpd-tooltip")).append("<span>"+r.attr("title")+"</span>"),n.append(r)}}else for(i=0;i<e.length;++i){var o=e[i],r=a.children('[data-action="'+o+'"]');y.$container.find(".fpd-actions-wrapper.fpd-pos-"+t).append(r.clone())}}(e[n])}},this.doAction=function(t){if(y.currentViewInstance){var n,e,i,o,r,a,s=t.data("action");if(y.deselectElement(),"print"===s)y.print();else if("reset-product"===s)confirm(y.getTranslation("misc","reset_confirm"))&&y.loadProduct(y.currentViews);else if("undo"===s)y.currentViewInstance.undo();else if("redo"===s)y.currentViewInstance.redo();else if("info"===s)FPDUtil.showModal(t.children(".fpd-info-content").text(),!1,"",y.$modalContainer);else if("preview-lightbox"===s)y.getProductDataURL(function(t){var e=new Image;e.src=t,e.onload=function(){FPDUtil.showModal('<div style="text-align: center;"><img src="'+this.src+'" download="product.png" /></div>',!0)}});else if("save"===s){y.mainBar.toggleDialog(!1);var l=FPDUtil.showModal(y.getTranslation("actions","save_placeholder"),!1,"prompt",y.$modalContainer);l.find(".fpd-btn").text(y.getTranslation("actions","save")).click(function(){y.doUnsavedAlert=!1;var i=$(this).siblings("input:first").val(),t=FPDUtil.getScalingByDimesions(y.currentViewInstance.options.stageWidth,y.currentViewInstance.options.stageHeight,300,300,"cover");y.currentViewInstance.toDataURL(function(t){var e,n=y.getProduct();n&&y.mainOptions.saveActionBrowserStorage&&((e=(e=C())||[]).push({thumbnail:t,product:n,title:i}),window.localStorage.setItem(y.$container.attr("id"),JSON.stringify(e)),FPDUtil.showMessage(y.getTranslation("misc","product_saved"))),l.find(".fpd-modal-close").click(),y.$container.trigger("actionSave",[i,t,n])},"transparent",{multiplier:t,format:"png"})})}else if("load"===s){if(y.mainBar.$content.find(".fpd-saved-designs-panel .fpd-grid").empty(),y.mainOptions.saveActionBrowserStorage){var c=C();if(c&&0<c.length){for(var u=0;u<c.length;++u){var d=c[u];x.addSavedProduct(d.thumbnail,d.product,d.title)}FPDUtil.createScrollbar(y.mainBar.$content.find(".fpd-saved-designs-panel .fpd-scroll-area")),y.mainBar.$content.find(".fpd-saved-designs-panel .fpd-scroll-area").mCustomScrollbar("update")}else y.mainBar.$content.find(".fpd-saved-designs-panel .fpd-empty-saved-designs").toggleClass("fpd-hidden",!1)}y.$container.trigger("actionLoad"),y.mainBar.callSecondary("fpd-saved-designs-panel")}else if("manage-layers"===s)y.mainBar.callModule("manage-layers");else if("snap"===s)if(t.toggleClass("fpd-active"),y.currentViewInstance._snapElements=t.hasClass("fpd-active"),y.$mainWrapper.children(".fpd-snap-line-h, .fpd-snap-line-v").hide(),t.hasClass("fpd-active")){for(var h=[],p=y.mainOptions.snapGridSize[0]||50,f=y.mainOptions.snapGridSize[1]||50,g=Math.ceil(y.currentViewInstance.options.stageWidth/p),m=Math.ceil(y.currentViewInstance.options.stageHeight/f),u=0;u<g;++u){var v=new fabric.Rect({width:1,height:y.currentViewInstance.options.stageHeight,fill:"#ccc",opacity:.6,left:u*p,top:0});h.push(v)}for(u=0;u<m;++u){var b=new fabric.Rect({width:y.currentViewInstance.options.stageWidth,height:1,fill:"#ccc",opacity:.6,top:u*f,left:0});h.push(b)}w=new fabric.Group(h,{id:"_snap_lines_group",left:0,top:0,evented:!1,selectable:!1,_ignore:!0}),y.currentViewInstance.stage.add(w)}else w&&y.currentViewInstance.stage.remove(w);else"qr-code"===s?(n=(o=FPDUtil.showModal(t.children(".fpd-modal-context").clone(),!1,"",y.$modalContainer)).find(".fpd-qrcode-colors input").spectrum({preferredFormat:"hex",showInput:!0,showInitial:!0,showButtons:!1,replacerClassName:"fpd-spectrum-replacer"}),o.find(".fpd-add-qr-code").click(function(){var t,e=o.find(".fpd-modal-context > input").val();e&&0!==e.length&&(t=o.find(".fpd-qrcode-wrapper").empty(),new QRCode(t.get(0),{text:e,width:256,height:256,colorDark:n.filter(".fpd-qrcode-color-dark").spectrum("get").toHexString(),colorLight:n.filter(".fpd-qrcode-color-light").spectrum("get").toHexString(),correctLevel:QRCode.CorrectLevel.H}),t.find("img").on("load",function(){y.addElement("image",this.src,"QR-Code - "+e,y.currentViewInstance.options.qrCodeProps),o.find(".fpd-modal-close").click()}))}),o.on("modalRemove",function(){n.spectrum("destroy")})):"zoom"===s?(t.hasClass("fpd-active")?(y.currentViewInstance.dragStage=!1,y.$productStage.removeClass("fpd-drag"),y.$mainWrapper.children(".fpd-action-context").remove()):(e=t.children(".fpd-action-context").clone(),y.$mainWrapper.append(e),i=y.currentViewInstance.stage.getZoom()/y.currentViewInstance.responsiveScale,e.find(".fpd-zoom-slider").attr("step",y.mainOptions.zoomStep).attr("max",y.mainOptions.maxZoom).val(i).rangeslider({polyfill:!1,rangeClass:"fpd-range-slider",disabledClass:"fpd-range-slider--disabled",horizontalClass:"fpd-range-slider--horizontal",verticalClass:"fpd-range-slider--vertical",fillClass:"fpd-range-slider__fill",handleClass:"fpd-range-slider__handle",onSlide:function(t,e){y.setZoom(e)}}),e.find(".fpd-stage-pan").click(function(){y.currentViewInstance.dragStage=!y.currentViewInstance.dragStage,y.$productStage.toggleClass("fpd-drag")})),t.toggleClass("fpd-active")):"download"===s?(o=FPDUtil.showModal(t.children(".fpd-modal-context").clone(),!1,"",y.$modalContainer)).find(".fpd-modal-context span[data-value]").click(function(){var t=$(this);x.downloadFile(t.data("value"),t.siblings(".fpd-checkbox:first").children("input").is(":checked")),o.find(".fpd-modal-close").click()}):"magnify-glass"===s?(y.resetZoom(),t.hasClass("fpd-active")?($(".fpd-zoom-image,.zoomContainer").remove(),y.$productStage.children(".fpd-view-stage").eq(y.currentViewIndex).removeClass("fpd-hidden")):(y.toggleSpinner(),r=Number(2e3/y.currentViewInstance.options.stageWidth).toFixed(2),r=y.currentViewInstance.stage.toDataURL({multiplier:r,format:"png"}),y.$productStage.append('<img src="'+r+'" class="fpd-zoom-image" />').children(".fpd-zoom-image").elevateZoom({scrollZoom:!0,borderSize:1,zoomType:"lens",lensShape:"round",lensSize:200,responsive:!0,onZoomedImageLoaded:function(t){$(".zoomContainer").appendTo(".fpd-modal-product-designer .fpd-main-wrapper"),y.toggleSpinner(!1)}}),y.$productStage.children(".fpd-view-stage").addClass("fpd-hidden")),t.toggleClass("fpd-active")):"ruler"===s?(t.hasClass("fpd-active")?((r=y.currentViewInstance.getElementByID("_ruler_hor"))&&y.currentViewInstance.stage.remove(r),(r=y.currentViewInstance.getElementByID("_ruler_ver"))&&y.currentViewInstance.stage.remove(r)):(a={fill:"#979797",fontSize:10,fontFamily:"Arial"},fabric.util.loadImage(FPDActions.rulerHorImg,function(t){var e=new fabric.Group([],{left:0,top:0,originX:"left",originY:"top",evented:!1,selectable:!1,id:"_ruler_hor"}),n=new fabric.Rect({width:y.currentViewInstance.options.stageWidth,height:30});n.setPatternFill({source:t,repeat:"repeat-x"}),e.addWithUpdate(n);for(var i=Math.ceil(y.currentViewInstance.options.stageWidth/100),o=1;o<i;++o){var r=new fabric.Text(String(100*o),$.extend({},a,{top:3,left:100*o+3}));e.addWithUpdate(r)}y.currentViewInstance.stage.add(e).renderAll()}),fabric.util.loadImage(FPDActions.rulerVerImg,function(t){var e=new fabric.Group([],{left:0,top:0,originX:"left",originY:"top",evented:!1,selectable:!1,id:"_ruler_ver"}),n=new fabric.Rect({width:30,height:y.currentViewInstance.options.stageHeight});n.setPatternFill({source:t,repeat:"repeat-y"}),e.addWithUpdate(n);for(var i=Math.ceil(y.currentViewInstance.options.stageWidth/100),o=1;o<i;++o){var r=new fabric.Text(String(100*o),$.extend({},a,{top:100*o+3,left:12,angle:90,originY:"bottom"}));e.addWithUpdate(r)}y.currentViewInstance.stage.add(e).renderAll()})),t.toggleClass("fpd-active")):"previous-view"===s?y.selectView(y.currentViewIndex-1):"next-view"===s?y.selectView(y.currentViewIndex+1):"guided-tour"===s&&y.mainOptions.guidedTour&&0<Object.keys(y.mainOptions.guidedTour).length&&(s=Object.keys(y.mainOptions.guidedTour)[0],y.selectGuidedTourStep(s))}},this.resetAllActions=function(){$(".fpd-zoom-image,.zoomContainer").remove(),y.$productStage.children(".fpd-view-stage").eq(y.currentViewIndex).removeClass("fpd-hidden"),y.$mainWrapper.find(".fpd-action-btn").removeClass("fpd-active")},this.hideAllTooltips=function(){y.$mainWrapper.find(".fpd-action-btn.tooltipstered").tooltipster("hide")},this.addSavedProduct=function(t,e,n){n=n||"";var i=y.mainBar.$content.find(".fpd-saved-designs-panel .fpd-grid"),n=""!==n?'title="'+n+'"':"";return i.append('<div class="fpd-item fpd-tooltip" '+n+'><picture style="background-image: url('+t+')" ></picture><div class="fpd-remove-design"><span class="fpd-icon-remove"></span></div></div>').children(".fpd-item:last").click(function(t){y.loadProduct($(this).data("product")),y.currentProductIndex=-1}).data("product",e).children(".fpd-remove-design").click(function(t){t.stopPropagation();var e=$(this).parent(".fpd-item"),n=e.parent(".fpd-grid").children(".fpd-item").index(e);y.mainOptions.saveActionBrowserStorage&&((t=C()).splice(n,1),window.localStorage.setItem(y.$container.attr("id"),JSON.stringify(t))),y.$container.trigger("actionLoad:Remove",[n,e]),e.remove()}),FPDUtil.updateTooltip(i),i.children(".fpd-item:last")},a&&(x.setup(x.currentActions),y.$container.on("click",".fpd-actions-wrapper .fpd-action-btn",function(){var t=$(this);t.hasClass("tooltipstered")&&t.tooltipster("hide"),x.doAction(t),t.parents(".fpd-dropdown-btn:first").removeClass("fpd-active")}),y.$container.on("click",".fpd-actions-wrapper .fpd-dropdown-btn > .fpd-label",function(){$(this).parent().toggleClass("fpd-active").parents(".fpd-actions-wrapper:first").siblings().find(".fpd-dropdown-btn").removeClass("fpd-active")})),y.$container.on("viewSelect",function(t,e,n){x.resetAllActions(),y.$mainWrapper.find('[data-action="previous-view"], [data-action="next-view"]').toggleClass("fpd-hidden",y.viewInstances.length<=1),y.$mainWrapper.find('[data-action="previous-view"]').toggleClass("fpd-disabled",0===e),y.$mainWrapper.find('[data-action="next-view"]').toggleClass("fpd-disabled",e===y.viewInstances.length-1)})};FPDActions.availableActions=["print","reset-product","undo","redo","info","save","load","manage-layers","snap","qr-code","zoom","download","magnify-glass","preview-lightbox","ruler","previous-view","next-view","guided-tour"],FPDActions.rulerHorImg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAAXNSR0IArs4c6QAAAMtJREFUaAXt0bENAkEMBVGgJVranja5lq4myH50wUr+wQRDZCHWWPPee+/fdV33yw+iwAdxhUekgCBJwRgEYTjkCkGSgjEIwnDIFYIkBWMQhOGQKwRJCsYgCMMhVwiSFIxBEIZDrhAkKRiDIAyHXCFIUjAGQRgOuUKQpGAMgjAccoUgScEYjkHWWt+Tk/3dc6XTLscgz3/jt+0CgrSLDvcJMgzYfi5Iu+hwnyDDgO3ngrSLDvcJMgzYfi5Iu+hwnyDDgO3ngrSLDvf9ARH1Efg/D4CQAAAAAElFTkSuQmCC",FPDActions.rulerVerImg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABkCAYAAACRiYAFAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAA40lEQVRoBe2UwQ3CUBTD+KzUYXvpSHQmECzgIlk8CbnXRonqvGZt2/a4DTz3gcxPZME/Ix/q/0e99n1/Xv3M4zjOq1rSrZaLEFnv+48tkugTakRkCVouiyT6dNWIyBKE2iKJPmOoWy7sxhKMdVywVSH6hBoRWYKWyyKJPl01IrIEobZIos8Y6pYLu7EEYx0XbFWIPqFGRJag5bJIok9XjYgsQagtkugzhrrlwm4swVjHBVsVok+oEZElaLkskujTVSMiSxBqiyT6jKFuubAbSzDWccFWhegTakRkCb5aLiv07fMCuAVB+Jp9DBgAAAAASUVORK5CYII=";var FPDImageEditor=function(o,r,s){"use strict";$=jQuery;var l,c,t=s.mainOptions.imageEditorSettings,u=this,d=0,h=0,e=o.children(".fpd-image-editor-main"),n=o.children(".fpd-loader-wrapper"),p=(o.children(".fpd-svg-group-objects"),o.children(".fpd-svg-group-tools")),f=!1,g=null,m="none",i=s.mainOptions.customImageAjaxSettings,a=i.data&&i.data.saveOnServer?1:0,v=i.data&&i.data.uploadsDir?i.data.uploadsDir:"",b=i.data&&i.data.uploadsDirURL?i.data.uploadsDirURL:"",y=!1,w=!1,x=["jpeg","jpg","png","svg"],C={rotatable:!0,lockRotation:!1,resizable:!0,hasRotatingPoint:!0,hasControls:!0,lockUniScaling:!1,centeredScaling:!0,objectCaching:!1,padding:0,cornerColor:s.mainOptions.cornerColor||s.mainOptions.selectedColor,borderColor:"#333f48",borderDashArray:[2,2],rotatingPointOffset:40,cornerStyle:"circle",cornerSize:16,transparentCorners:!1,cornerStrokeColor:"#333f48",borderScaleFactor:1.5},A={opacity:.3,borderColor:"#333f48",borderDashArray:[3,3],cornerStyle:"circle",cornerSize:16,transparentCorners:!1,cornerStrokeColor:"#333f48",cornerColor:"#fff",borderScaleFactor:2,hasRotatingPoint:!0,centeredScaling:!0,objectCaching:!1,__editorMode:!0,__imageEditor:!0},D=function(t,e){var n=FPDUtil.getFileExtension(t);a&&!x.includes(n)?((n=$.extend({},i)).success=function(t){t&&void 0===t.error?e({src:t.image_src}):e({error:t.error})},n.data={url:t,uploadsDir:v,uploadsDirURL:b,saveOnServer:a},$.ajax(n).fail(function(t){e({error:t.statusText})})):e({src:t})},S=function(e){"RemoveWhite"==e&&(e="RemoveColor"),c.filters=c.filters.filter(function(t){return t.type!==e}),k()},_=function(t,e){e=void 0===e?{}:e;var n=t;"RemoveWhite"==t&&(n="RemoveColor");var i=c.filters.filter(function(t){return t.type===n});0<i.length?$.extend(i[0],e):(e=FPDUtil.getFilter(t,e),c.filters.push(e)),k()},P=function(){var t=o.children(".fpd-image-editor-main");u.responsiveScale=t.outerWidth()<d?t.outerWidth()/d:1,u.responsiveScale=parseFloat(Number(u.responsiveScale.toFixed(7))),u.responsiveScale=1<u.responsiveScale?1:u.responsiveScale,g&&(g.left=g.left*u.responsiveScale,g.top=g.top*u.responsiveScale,g.scaleX=g.scaleX*u.responsiveScale,g.scaleY=g.scaleY*u.responsiveScale,g.setCoords()),l.setDimensions({width:t.width(),height:h*u.responsiveScale}).setZoom(u.responsiveScale).calcOffset().renderAll()},k=function(){c.applyFilters(),l.renderAll()};this.loadImage=function(t,e){e=null==e?r:e,y=Boolean(s.mainOptions.splitMultiSVG)&&"group"==e.type,n.toggle(!0),this.reset(),o.toggleClass("fpd-is-svg-group",y),y?(y=!0,e.clone(function(t){t.setOptions({scaleX:1,scaleY:1});t.getObjects();d=e.width,h=e.height,l.setDimensions({width:d,height:h}),l.add(t),t.center(),t._restoreObjectsState(),t._objects.forEach(function(t){l.add(t),t.setOptions(C),t.setCoords()}),l.remove(t),n.toggle(!1),P(),w=!0})):(y=!1,new fabric.Image.fromURL(t,function(t){d=(c=t).width,h=t.height,FPDUtil.log("AIE - Canvas Width: "+d),FPDUtil.log("AIE - Canvas Height: "+h),c.setOptions({borderColor:"#333f48",borderDashArray:[3,3],cornerStyle:"circle",cornerSize:16,transparentCorners:!1,cornerStrokeColor:"#333f48",cornerColor:"#fff",borderScaleFactor:2,__editorMode:!0,__imageEditor:!0}),l.setDimensions({width:d,height:h}),l.add(t),P(),n.toggle(!1),w=!0},{crossOrigin:"anonymous"}))},this.getImage=function(){if(y)return l.toSVG({suppressPreamble:!1});var t=parseInt(fabric.textureSize),e=1,e=h<d?t<d?t/d:1:t<h?t/h:1;FPDUtil.log("AIE - Data URI Width: "+d*e),FPDUtil.log("AIE - Data URI Height: "+h*e),l.setDimensions({width:d,height:h}).setZoom(1),g&&(g.left=g.left/u.responsiveScale*e,g.top=g.top/u.responsiveScale*e,g.scaleX=g.scaleX/u.responsiveScale*e,g.scaleY=g.scaleY/u.responsiveScale*e,g.setCoords()),l.renderAll();e=l.toDataURL({format:"png",multiplier:e});return FPDUtil.log("AIE - Data URI Size: "+FPDUtil.getDataUriSize(e)),P(),e},this.reset=function(){o.find(".fpd-switch-container").removeClass("fpd-enabled"),l.clipTo=null,g=null,l.discardActiveObject(),c&&(c.setOptions({scaleX:1,scaleY:1,angle:0,left:0,top:0}),c.filters=[],k())},function(){s.deselectElement(),r.originSource=r.originSource||r.source,u.responsiveScale=1,o.addClass("fpd-container"),e.append("<canvas>"),l=new fabric.Canvas(e.children("canvas:last").get(0),{containerClass:"fpd-image-editor-canvas-wrapper",selection:!1,hoverCursor:"pointer",controlsAboveOverlay:!0,centeredScaling:!0,allowTouchScrolling:!0,preserveObjectStacking:!0,enableRetinaScaling:!1,objectCaching:!1,renderOnAddRemove:!0});var n={},i=!1;l.on({"mouse:down":function(t){!g&&f&&(i=!0,t=l.getPointer(t.e),n.x=t.x,n.y=t.y,g=new fabric.Rect($.extend({},{width:0,height:0,left:t.x/u.responsiveScale,top:t.y/u.responsiveScale,fill:"#000"},A)),P(),l.add(g),l.renderAll(),l.setActiveObject(g))},"mouse:move":function(t){if(i){var e=l.getPointer(t.e),t=Math.abs(e.x-n.x),e=Math.abs(e.y-n.y);if(!t||!e)return!1;g.setOptions({width:t/u.responsiveScale,height:e/u.responsiveScale}),g.setCoords(),l.renderAll()}},"mouse:up":function(t){i=!1},"object:selected":function(t){y&&p.children(".fpd-action-svg-remove-path").removeClass("fpd-disabled")},"selection:cleared":function(t){y&&p.children(".fpd-action-svg-remove-path").addClass("fpd-disabled")},"object:modified":function(t){m="yes"},"object:removed":function(t){w&&(m="yes")}}),o.on("click",".fpd-image-editor-menu > span",function(){var t=$(this),e=t.data("id");t.addClass("fpd-active").siblings().removeClass("fpd-active"),o.find(".fpd-tab-content > div").removeClass("fpd-active").filter('[data-id="'+e+'"]').addClass("fpd-active")}),t.masks&&$.isArray(t.masks)&&t.masks.forEach(function(t){var e=(e=t.split(/[\\/]/).pop()).substr(0,e.lastIndexOf("."));o.find(".fpd-mask-selection").append('<span data-mask="'+t+'" class="fpd-tooltip" title="'+e+'" style="background-image: url('+t+')"></span>')}),o.on("click",".fpd-mask-selection > span",function(){if(!c)return!1;var t=$(this).data("mask");l.discardActiveObject(),c.evented=!1,l.clipTo=null,g=null,"custom-rect"===t?f=!0:fabric.loadSVGFromURL(t,function(t,e){e=t?fabric.util.groupSVGElements(t,e):null;l.add(e),e.setOptions($.extend({},A,{opacity:1,fill:"rgba(0,0,0,0)"})),l.width>l.height?e.scaleToHeight((l.height-80)/u.responsiveScale):e.scaleToWidth((l.width-80)/u.responsiveScale),e.set("stroke","#2ecc71").set("strokeWidth",3/e.scaleX),g=e,P(),e.left=0,e.top=0,e.setPositionByOrigin(new fabric.Point(.5*d,.5*h),"center","center"),e.setCoords(),l.renderAll()}),l.renderAll(),o.addClass("fpd-show-secondary")}),o.on("click",".fpd-mask-cancel, .fpd-mask-save",function(){return!!c&&(c.evented=!0,f=!1,l.discardActiveObject(),g&&($(this).hasClass("fpd-mask-save")&&(P(),g.set("strokeWidth",0),g.set("fill","transparent"),l.clipTo=function(t){g.render(t)}),l.remove(g)),o.removeClass("fpd-show-secondary"),void(m="yes"))}),["none","grayscale","sepia","cold","black_white","old","milk","purple","yellow","monochrome"].forEach(function(t){o.find(".fpd-content-filters").append('<div data-type="'+t+'" style="background-image: url('+FPDFilters[t].preview+')" data-defaulttext="'+FPDFilters[t].name+'" title="image_editor.filter_'+t+'" class="fpd-tooltip"></div>')}),o.find(".fpd-content-filters [data-defaulttext]").each(function(t,e){s.translateElement($(e))}),o.on("click",".fpd-content-filters > div",function(){if(!c)return!1;var e=["Grayscale","Sepia","Sepia2","ColorMatrix"];c.filters=c.filters.filter(function(t){return t&&-1===e.indexOf(t.type)}),c.filters.push(FPDUtil.getFilter($(this).data("type"))),k(),m="yes"}),o.on("click",".fpd-switch-container",function(){if(!c)return!1;var n,t=$(this),e=t.data("filter");t.toggleClass("fpd-enabled"),t.nextAll(".fpd-range-tooltip:first").toggleClass("fpd-enabled",t.hasClass("fpd-enabled")),t.hasClass("fpd-enabled")?(n={},t.parent().find(".fpd-input-range").each(function(t,e){n[e.name]=parseFloat(e.value)}),_(e,n)):S(e)});var a=null;o.on("input change",".fpd-input-range",function(){if(!c)return!1;var t=$(this),e=t.parent(".fpd-range-tooltip").siblings(".fpd-switch-container:first"),n=e.data("filter"),i=parseFloat(this.min),o=parseFloat(this.max),r=parseFloat(this.value),i=(this.value-i)/(o-i);e.parent().siblings(".fpd-left").find(".fpd-range-tooltip").removeClass("fpd-moving"),t.parent(".fpd-range-tooltip").addClass("fpd-moving").children(".fpd-tooltip").text(r.toFixed(2)).css("left",String(100*i)+"%");i={color:"#fff"};i[t.attr("name")]=r,_(n,i),a&&(clearTimeout(a),a=null),a=setTimeout(function(){t.parent(".fpd-range-tooltip").removeClass("fpd-moving"),clearTimeout(a),a=null},2e3),m="yes"}),p.on("click",".fpd-action-svg-remove-path",function(){y&&l.getActiveObject()&&l.remove(l.getActiveObject())}),$(document).on("keydown",function(t){o.is(":visible")&&y&&l.getActiveObject()&&8==t.which&&l.remove(l.getActiveObject())}),o.on("click",".fpd-action-restore",function(){if(y)fabric.loadSVGFromURL(r.originSource,function(t,e){e=fabric.util.groupSVGElements(t,e);l.clear(),u.loadImage(r.originSource,e),m="restored"});else{if(!c)return!1;l.clear(),u.loadImage(r.originSource),m="restored"}}),o.on("click",".fpd-action-save",function(){s.toggleSpinner(!0),o.parent().siblings(".fpd-modal-close").click();var t=u.getImage();if("none"==m)return s.toggleSpinner(!1),!1;"restored"==m&&(t=r.originSource),D(t,function(t){return t.error?(s.toggleSpinner(!1),void FPDUtil.showModal(t.error)):void(-1!==$.inArray("svg",r.originSource.split("."))?(s.toggleSpinner(!1),delete(e=s.currentViewInstance.getElementJSON(r)).fill,delete e.svgFill,delete e.width,delete e.height,s.currentViewInstance.removeElement(r.title,r),s.currentViewInstance.addElement("image",t.src,r.title,e)):(r.source=t.src,r.setSrc(t.src,function(){s.toggleSpinner(!1),r.setCoords(),r.canvas.renderAll()})));var e})}),o.parents(".fpd-modal-wrapper:first").on("click",".fpd-modal-close",function(){}),FPDUtil.updateTooltip(o)}()},FPDDesignsModule=function(i,o,r){"use strict";$=jQuery;var a=this,s="",l=o.find(".fpd-head"),n=o.find(".fpd-scroll-area"),c=o.find(".fpd-grid"),u=i.mainOptions.lazyLoad?"fpd-hidden":"",d=null,h=!1,p=[],f=function(t,e){n.find(".fpd-grid").empty(),l.find(".fpd-input-search input").val(""),o.removeClass("fpd-designs-active").addClass("fpd-categories-active"),t.forEach(function(t,e){g(t)}),e&&(l.find(".fpd-input-search input").attr("placeholder",s+" "+e.title.toUpperCase()),o.addClass("fpd-head-visible")),FPDUtil.refreshLazyLoad(c,!1),FPDUtil.createScrollbar(n)},g=function(t){var e=t.thumbnail?'<picture data-img="'+t.thumbnail+'"></picture>':"",e=(t.thumbnail,$("<div/>",{class:"fpd-category fpd-item "+u,"data-search":t.title.toLowerCase(),html:e+"<span>"+t.title+"</span>"}).appendTo(c));e.click(function(t){var e=$(this),n=e.parent().children(".fpd-item").index(e),i=d[n];i.category?(p.push(n),d=i.category,f(d,i)):m(i.designs,i.parameters),l.find(".fpd-input-search input").attr("placeholder",s+" "+e.children("span").text().toUpperCase())}),!u&&t.thumbnail&&FPDUtil.loadGridImage(e.children("picture"),t.thumbnail)},m=function(t,e){n.find(".fpd-grid").empty(),l.find(".fpd-input-search input").val(""),o.removeClass("fpd-categories-active").addClass("fpd-designs-active fpd-head-visible");e=e||{};t.forEach(function(t){t.parameters=$.extend({},e,t.parameters),v(t)}),FPDUtil.refreshLazyLoad(c,!1),FPDUtil.createScrollbar(n),FPDUtil.updateTooltip()},v=function(t){t.thumbnail=void 0===t.thumbnail?t.source:t.thumbnail;var e=$("<div/>",{class:"fpd-item "+u,"data-title":t.title,"data-source":t.source,"data-search":t.title.toLowerCase(),"data-thumbnail":t.thumbnail,html:'<picture data-img="'+t.thumbnail+'"></picture><span class="fpd-price"></span>'}).appendTo(c);e.click(function(){var t=$(this);i._addCanvasDesign(t.data("source"),t.data("title"),t.data("parameters"))}).data("parameters",t.parameters),FPDUtil.setItemPrice(e,i),u||FPDUtil.loadGridImage(e.children("picture"),t.thumbnail)};this.toggleCategories=function(){var e,t,n;h&&(o.removeClass("fpd-head-visible fpd-single-cat"),d=i.designs,f(d),e=[],i.currentViewInstance&&(t=i.currentViewInstance.currentElement,e=t&&t.uploadZone&&t.designCategories?i.currentViewInstance.currentElement.designCategories:r?i.mainOptions.dynamicDesigns[r].categories:i.currentViewInstance.options.designCategories),t=c.find(".fpd-category"),0<e.length?1===(n=t.hide().filter(function(){var t=$(this).children("span").text();return-1<$.inArray(t,e)}).show(n)).length&&(o.toggleClass("fpd-single-cat"),n.first().click(),o.find(".fpd-category").filter(function(){return"block"==$(this).css("display")}).click()):t.show())},r&&o.attr("data-dynamic-designs-id",r),s=i.getTranslation("modules","designs_search_in").toUpperCase(),l.find(".fpd-input-search input").keyup(function(){var t;""==this.value?c.children(".fpd-item").css("display","block"):(c.children(".fpd-item").css("display","none"),t=this.value.toLowerCase().trim().split(" "),c.children(".fpd-item").filter(function(){var n=0,i=this;if($.each(t,function(t,e){n+=$(i).is("[data-search*='"+e+"']")}),n==t.length)return 1}).css("display","block"))}),l.find(".fpd-back").click(function(){0<c.children(".fpd-category").length&&p.pop();var e,n=i.designs;p.forEach(function(t){e=n[t],n=e.category}),(d=n)&&f(d,e),void 0===e&&a.toggleCategories()}),i.$container.on("designsSet",function(t,e){$.isArray(e)&&0!==e.length&&(e[0].hasOwnProperty("source")?(o.addClass("fpd-single-cat"),m(e)):1<e.length||e[0].category?(h=!0,a.toggleCategories()):1===e.length&&e[0].designs&&(o.addClass("fpd-single-cat"),m(e[0].designs)))}).on("viewSelect",function(){a.toggleCategories()})},FPDProductsModule=function(i,n){"use strict";$=jQuery;var o=this,r=0,a=n.find(".fpd-product-categories"),s=n.children(".fpd-scroll-area"),l=n.find(".fpd-grid"),c=i.mainOptions.lazyLoad?"fpd-hidden":"",u=function(t){var e=t[0].productThumbnail||t[0].thumbnail,n=t[0].productTitle||t[0].title,n=$("<div/>",{class:"fpd-item fpd-tooltip "+c,"data-title":n,"data-source":e,html:'<picture data-img="'+e+'"></picture>'}).appendTo(l);n.click(function(t){t.preventDefault();var e,t=$(this),n=l.children(".fpd-item").index(t);i.mainOptions.swapProductConfirmation?(e=FPDUtil.showModal(i.getTranslation("modules","products_confirm_replacement"),!1,"confirm",i.$modalContainer)).find(".fpd-confirm").text(i.getTranslation("modules","products_confirm_button")).click(function(){i.selectProduct(n,r),e.find(".fpd-modal-close").click()}):i.selectProduct(n,r)}).data("views",t),c?FPDUtil.refreshLazyLoad(l,!1):FPDUtil.loadGridImage(n.children("picture"),e),FPDUtil.updateTooltip(l)},d=function(){var t,e;i.mainOptions.editorMode||(e=void 0===(t=i.products[0]),void 0!==t&&(e=!!(!t.hasOwnProperty("category")&&i.products.length<2||t.hasOwnProperty("category")&&t.products.length<2&&i.products.length<2)),i.$container.toggleClass("fpd-products-module-hidden",e))};this.selectCategory=function(t){var e;s.find(".fpd-grid").empty(),i.products&&0<i.products.length&&(void 0!==i.products[0].category?(e=i.products[t].products,a.children("input").val(i.products[t].category)):e=i.products,e.forEach(function(t){u(t)}),FPDUtil.createScrollbar(s))},d(),a.children("input").keyup(function(){var t=a.find(".fpd-dropdown-list .fpd-item");t.hide(),(0===this.value.length?t:t.filter(':containsCaseInsensitive("'+this.value+'")')).show()}),a.on("click",".fpd-dropdown-list .fpd-item",function(){var t=$(this);r=t.data("value"),t.parent().prevAll(".fpd-dropdown-current:first").val(t.text()),o.selectCategory(r),t.siblings(".fpd-item").show(),FPDUtil.refreshLazyLoad(l,!1)}),i.$container.on("productsSet",function(t,e){a.find(".fpd-dropdown-list .fpd-item").remove(),l.empty(),e&&0<e.length&&(void 0!==e[0].category&&1<e.length&&(n.addClass("fpd-categories-enabled"),e.forEach(function(t,e){a.find(".fpd-dropdown-list > .fpd-scroll-area").append('<span class="fpd-item" data-value="'+e+'">'+t.category+"</span>")})),d(),o.selectCategory(0)),FPDUtil.createScrollbar(a.find(".fpd-dropdown-list .fpd-scroll-area"))}),i.$container.on("productAdd",function(t,e,n,i){i==r&&u(e)})},FPDTextModule=function(o,r){"use strict";var a;$=jQuery;var i;r.find(".fpd-textbox-wrapper").toggle(Boolean(o.mainOptions.setTextboxWidth)),o.$container.on("viewSelect",function(t,e,n){(a=n.options).customTextParameters&&a.customTextParameters.price?(n=o.formatPrice(a.customTextParameters.price),r.find(".fpd-btn > .fpd-price").html(" - "+n)):r.find(".fpd-btn > .fpd-price").html("")}),r.on("click",".fpd-btn",function(){var t,e,n=$(this).prevAll("textarea:first"),i=n.val();o.currentViewInstance&&i&&0<i.length&&(t=parseInt(r.find(".fpd-textbox-width").val()),r.find(".fpd-textbox-width").val(""),e=$.extend({},a.customTextParameters,{isCustom:!0,_addToUZ:o.currentViewInstance.currentUploadZone}),isNaN(t)||(e.textBox=!0,e.width=t,e.resizable=!0),o.addElement("text",i,i,e)),n.val("")}),r.on("input change","textarea",function(){var t=this.value,e=a?a.customTextParameters.maxLength:0,n=a?a.customTextParameters.maxLines:0;o.mainOptions.disableTextEmojis&&(t=(t=t.replace(FPDEmojisRegex,"")).replace(String.fromCharCode(65039),"")),0!=e&&t.length>e&&(t=t.substr(0,e)),0!=n&&t.split("\n").length>n&&(t=t.replace(/([\s\S]*)\n/,"$1")),this.value=t}),$.isArray(o.mainOptions.textTemplates)&&(i=r.find(".fpd-text-templates .fpd-grid"),o.mainOptions.textTemplates.forEach(function(t){var e=t.properties,n="font-family:"+(e.fontFamily||"Arial");n+="; text-align:"+(e.textAlign||"left"),$("<div/>",{class:"fpd-item","data-props":JSON.stringify(t.properties),"data-text":t.text,html:'<div style="'+n+'">'+t.text.replace(/(?:\r\n|\r|\n)/g,"<br>")+"</div>"}).appendTo(i).click(function(){var t;o.currentViewInstance&&(t=$.extend({},a.customTextParameters,{isCustom:!0,_addToUZ:o.currentViewInstance.currentUploadZone},$(this).data("props")),o.addElement("text",this.dataset.text,this.dataset.text,t))})}),FPDUtil.createScrollbar(i.parent(".fpd-scroll-area")))},FPDLayersModule={createList:function(a,s){var l,i=!1;s.off();s.find(".fpd-current-color").spectrum("destroy"),s.find(".fpd-list").empty(),a.getElements(a.currentViewIndex).forEach(function(t){FPDUtil.elementIsEditable(t)&&function(t){var e="<span></span>";FPDUtil.elementHasColorSelection(t)&&(i=FPDUtil.elementAvailableColors(t,a),e=t.uploadZone?"<span></span>":t.type==FPDPathGroupName&&1<t.getObjects().length?'<span class="fpd-current-color" style="background: '+FPDUtil.getBgCssFromElement(t)+'"></span>':1!=i&&(1<i.length||t.type==FPDPathGroupName&&1===t.getObjects().length)?'<span class="fpd-current-color" style="background: '+FPDUtil.getBgCssFromElement(t)+'" data-colors=""></span>':'<input class="fpd-current-color" type="text" value="'+FPDUtil.getBgCssFromElement(t)+'" />');var n=t.title;"text"===FPDUtil.getType(t.type)&&t.editable&&(n="<textarea>"+t.text+"</textarea>"),s.find(".fpd-list").append('<div class="fpd-list-row" id="'+t.id+'"><div class="fpd-cell-0">'+e+'</div><div class="fpd-cell-1">'+n+'</div><div class="fpd-cell-2"></div></div>');var i,e=s.find(".fpd-list-row:last").data("element",t).data("colors",i);t.uploadZone?(e.addClass("fpd-add-layer").find(".fpd-cell-2").append('<span class="fpd-icon-add"></span>'),t.uploadZoneRemovable&&e.find(".fpd-icon-add").after('<span class="fpd-remove-element"><span class="fpd-icon-remove"></span></span>')):(n=t.locked?"fpd-icon-locked-full":"fpd-icon-unlocked",i=t.zChangeable?'<span class="fpd-icon-reorder"></span>':"",e.find(".fpd-cell-2").append(i+'<span class="fpd-lock-element"><span class="'+n+'"></span></span>'),(t.removable||t.__editorMode)&&e.find(".fpd-lock-element").after('<span class="fpd-remove-element"><span class="fpd-icon-remove"></span></span>'),e.toggleClass("fpd-locked",t.locked))}(t)}),FPDUtil.createScrollbar(s.find(".fpd-scroll-area"));var o=0;s.find(".fpd-list").sortable({handle:".fpd-icon-reorder",placeholder:"fpd-list-row fpd-sortable-placeholder",scroll:!1,axis:"y",containment:"parent",items:".fpd-list-row:not(.fpd-locked)",start:function(t,e){o=e.originalPosition.top},change:function(t,e){var n=a.getElementByID(e.item.attr("id")),i=(e.position.top>o?e.placeholder.prevAll(".fpd-list-row:not(.ui-sortable-helper)"):e.placeholder.nextAll(".fpd-list-row:not(.ui-sortable-helper)")).first(),i=a.currentViewInstance.getElementByID(i.attr("id")),i=a.currentViewInstance.getZIndex(i);a.setElementParameters({z:i},n),o=e.position.top}}),s.find("input.fpd-current-color").spectrum("destroy").spectrum({flat:!1,preferredFormat:"hex",showInput:!0,showInitial:!0,showPalette:a.mainOptions.colorPickerPalette&&0<a.mainOptions.colorPickerPalette.length,palette:a.mainOptions.colorPickerPalette,showButtons:!1,show:function(t){FPDUtil.spectrumColorNames($(this).spectrum("container"),a),$(this).parents(".fpd-list-row:first").data("element")._tempFill=t.toHexString()},move:function(t){var e=$(this).parents(".fpd-list-row:first").data("element");!1!==i&&"png"===FPDUtil.elementIsColorizable(e)||a.currentViewInstance.changeColor(e,t.toHexString())},change:function(t){$(document).unbind("click.spectrum");var e=$(this).parents(".fpd-list-row:first").data("element");a.currentViewInstance.setElementParameters({fill:t.toHexString()},e)}}).on("beforeShow.spectrum",function(t,e){l&&(l.remove(),l=null)}).on("dragstart.spectrum",function(){i=!0}).on("dragstop.spectrum",function(t,e){i=!1;var n=$(this).parents(".fpd-list-row:first").data("element");a.currentViewInstance.changeColor(n,e.toHexString())}),s.off("click",".fpd-current-color").on("click",".fpd-current-color",function(t){t.stopPropagation(),s.find(".fpd-path-colorpicker").spectrum("destroy"),s.find("input.fpd-current-color").spectrum("hide");var n=$(this).parents(".fpd-list-row"),e=n.data("element"),i=n.data("colors");if(l&&0<n.children(".fpd-scroll-area").length)return l.slideUp(200,function(){$(this).remove()}),void(l=null);if(l&&(l.slideUp(200,function(){$(this).remove()}),l=null),0<i.length){n.append('<div class="fpd-scroll-area"><div class="fpd-color-palette fpd-grid"></div></div>');for(var o,r=0;r<i.length;++r)o=e.type===FPDPathGroupName&&1<e.getObjects().length?'<input class="fpd-path-colorpicker" type="text" value="'+i[r]+'" />':'<div class="fpd-item fpd-tooltip" title="'+(a.mainOptions.hexNames[i[r].replace("#","").toLowerCase()]||i[r])+'" style="background-color: '+i[r]+'" data-color="'+i[r]+'"></div>',n.find(".fpd-color-palette").append(o);FPDUtil.createScrollbar(n.children(".fpd-scroll-area")),FPDUtil.updateTooltip(n),e.type===FPDPathGroupName&&1<e.getObjects().length?n.find(".fpd-path-colorpicker").spectrum({showPaletteOnly:$.isArray(e.colors),preferredFormat:"hex",showInput:!0,showInitial:!0,showButtons:!1,showPalette:a.mainOptions.colorPickerPalette&&0<a.mainOptions.colorPickerPalette.length,palette:$.isArray(e.colors)?e.colors:a.mainOptions.colorPickerPalette,show:function(t){var e=$(this).parents(".fpd-list-row"),n=e.data("element"),t=FPDUtil.changePathColor(n,e.find(".fpd-path-colorpicker").index(this),t);FPDUtil.spectrumColorNames($(this).spectrum("container"),a),n._tempFill=t},move:function(t){var e=$(this).parents(".fpd-list-row"),n=e.data("element"),t=FPDUtil.changePathColor(n,e.find(".fpd-path-colorpicker").index(this),t);a.currentViewInstance.changeColor(n,t)},change:function(t){var e=$(this).parents(".fpd-list-row"),n=e.data("element"),t=FPDUtil.changePathColor(n,e.find(".fpd-path-colorpicker").index(this),t);$(document).unbind("click.spectrum"),a.currentViewInstance.setElementParameters({fill:t},n)}}):$.isArray(e.patterns)&&(FPDUtil.isSVG(e)||"text"===FPDUtil.getType(e.type))&&(e.patterns.forEach(function(t){var e=t.replace(/^.*[\\\/]/,"").replace(/\.[^/.]+$/,"").replace("_"," ");n.find(".fpd-color-palette").append('<div data-pattern="'+t+'" style="background-image: url('+t+')" class="fpd-item fpd-tooltip fpd-pattern" title="'+e+'"></div>')}),FPDUtil.updateTooltip(n)),l=n.children(".fpd-scroll-area").slideDown(300)}}),s.on("click",".fpd-color-palette .fpd-item",function(t){t.stopPropagation();var e=$(this),n=e.parents(".fpd-list-row"),i=n.data("element"),o=e.data("pattern")?e.data("pattern"):e.data("color"),t=e.data("pattern")?{pattern:o}:{fill:o};n.find(".fpd-current-color").css("background",e.data("pattern")?"url("+o+")":o),i.type==FPDPathGroupName&&(newColor=FPDUtil.changePathColor(i,0,o)),a.currentViewInstance.setElementParameters(t,i)}),s.on("click",".fpd-list-row",function(t){$(this).hasClass("fpd-locked")||$(t.target).is("textarea")||(t=a.getElementByID(this.id))&&t.canvas.setActiveObject(t).renderAll()}),s.on("click",".fpd-lock-element",function(t){t.stopPropagation();var e=$(this),t=e.parents(".fpd-list-row").data("element");l&&(l.slideUp(200,function(){$(this).remove()}),l=null),t.evented=!t.evented,t.locked=!t.evented,e.children("span").toggleClass("fpd-icon-unlocked",t.evented).toggleClass("fpd-icon-locked-full",!t.evented),e.parents(".fpd-list-row").toggleClass("fpd-locked",!t.evented),e.parents(".fpd-list:first").sortable("refresh")}),s.on("click",".fpd-remove-element",function(t){t.stopPropagation();t=$(this).parents(".fpd-list-row");a.currentViewInstance.removeElement(t.data("element"))}),s.on("keyup","textarea",function(t){t.stopPropagation();t=$(this).parents(".fpd-list-row").data("element");a.mainOptions.disableTextEmojis&&(this.value=this.value.replace(FPDEmojisRegex,""),this.value=this.value.replace(String.fromCharCode(65039),"")),a.currentViewInstance.setElementParameters({text:this.value},t)});var t=function(t,e,n){n.text&&(document.activeElement&&$(document.activeElement).parent(".fpd-cell-1").length||s.find(".fpd-list").find('[id="'+e.id+'"] textarea').val(n.text))};a.$container.off("elementModify",t),a.$container.on("elementModify",t);t=function(t,e,n,i){e=s.find(".fpd-list").find('[id="'+e.id+'"] .fpd-current-color');e.is("input")?e.spectrum("set",n):e.css("background",n)};a.$container.off("elementColorChange",t),a.$container.on("elementColorChange",t)}},FPDImagesModule=function(u,a){"use strict";$=jQuery;var s=u.mainOptions.lazyLoad?"fpd-hidden":"",l=a.find(".fpd-input-image"),n=a.find('[data-context="upload"] .fpd-scroll-area'),c=n.find(".fpd-grid"),d=0,h=!1,p=[],f=0,g=a.find(".fpd-facebook-albums"),m=a.find('[data-context="facebook"] .fpd-scroll-area'),v=m.find(".fpd-grid"),b=a.find('[data-context="instagram"] .fpd-scroll-area'),y=b.find(".fpd-grid"),w=u.mainOptions.facebookAppId,x=u.mainOptions.instagramClientId,r=u.mainOptions.instagramRedirectUri,i=null,C=!1,A=null,D=FPDUtil.localStorageAvailable(),S=u.mainOptions.customImageAjaxSettings,_=S.data&&S.data.saveOnServer?1:0,P=S.data&&S.data.uploadsDir?S.data.uploadsDir:"",k=S.data&&S.data.uploadsDirURL?S.data.uploadsDirURL:"",F=u.mainOptions.allowedImageTypes,I=u.mainOptions.pixabayApiKey,E=a.find('[data-context="pixabay"] .fpd-scroll-area'),L=E.find(".fpd-grid"),N=!1,e="",O=1,T=u.mainOptions.depositphotosApiKey,B=a.find('[data-context="depositphotos"] .fpd-scroll-area'),M=B.find(".fpd-grid"),z=!1,j="",R="",U=null,W=0,H=($("body"),$(window),function(s,l){var t=1024*u.mainOptions.customImageParameters.maxSize*1024;if(s.size>t)return FPDUtil.showMessage(u.getTranslation("misc","maximum_size_info").replace("%filename",s.name).replace("%mb",u.mainOptions.customImageParameters.maxSize)),void(u._loadingCustomImage=!1);t=new FileReader;t.onload=function(t){if("application/pdf"!==s.type){if("image/jpeg"===s.type&&u.mainOptions.customImageParameters.minDPI){var e,n=new JpegMeta.JpegFile(atob(this.result.replace(/^.*?,/,"")),s.name),i=null;if(n.tiff&&n.tiff.XResolution&&n.tiff.XResolution.value?(e=n.tiff.XResolution.value.den,i=n.tiff.XResolution.value.num/e):n.jfif&&n.jfif.Xdensity&&n.jfif.Xdensity.value&&(i=n.jfif.Xdensity.value),null!==i){if(FPDUtil.log(s.name+" Real Resolution: "+i,"info"),i<u.mainOptions.customImageParameters.minDPI)return FPDUtil.showModal(u.getTranslation("misc","minimum_dpi_info").replace("%dpi",u.mainOptions.customImageParameters.minDPI),!1,"",u.$modalContainer),u._loadingCustomImage=!1}else FPDUtil.log(s.name+": Resolution is not accessible.","info")}var o=this.result,r=q(o,s.name);_&&r.addClass("fpd-loading").append('<div class="fpd-loading-bar"><div class="fpd-loading-progress"></div></div>');n=new Image;n.onload=function(){var t=this.height,e=this.width;u.currentViewInstance.options.customImageParameters;FPDUtil.checkImageDimensions(u,e,t)?_?((e=new FormData).append("uploadsDir",P),e.append("uploadsDirURL",k),e.append("images[]",s),(t=$.extend({},S)).data=e,t.processData=!1,t.contentType=!1,t.xhr=function(){var t=$.ajaxSettings.xhr();return t.upload&&t.upload.addEventListener("progress",function(t){var e;t.lengthComputable&&(e=t.total,t=t.loaded,e=parseInt(100*t/e),r.find(".fpd-loading-progress").css("width",e+"%"))},!1),t},t.success=function(t){0!=r.parents("body").length&&(t&&void 0===t.error?(G(t.image_src,t.filename),r.data("source",t.image_src).removeClass("fpd-loading").children(".fpd-loading-bar").remove(),V(r,l),d++):(u._loadingCustomImage=!1,r.remove(),FPDUtil.showModal(t.error)))},t=$.ajax(t).fail(function(t){u._loadingCustomImage=!1,"abort"!==t.statusText&&(r.remove(),FPDUtil.showModal(t.statusText))}),r.data("xhr",t)):(G(o,s.name),V(r,l),d++):(r.remove(),u.currentViewInstance.currentUploadZone=null)},n.src=o}else{var a=FPDUtil.showMessage(u.getTranslation("modules","images_pdf_upload_info"),!1),i=new FormData;i.append("uploadsDir",P),i.append("uploadsDirURL",k),i.append("pdf",s);n=$.extend({},S);n.data=i,n.processData=!1,n.contentType=!1,n.success=function(t){t&&void 0===t.error?(f--,t.pdf_images.forEach(function(t,e){var n=q(t.image_url,t.filename);V(n,l=0==e),G(t.image_url,t.filename),d++}),a.remove(),f++):(a.remove(),FPDUtil.showModal(t.error))};$.ajax(n).fail(function(t){"abort"!==t.statusText&&(u._loadingCustomImage=!1,a.remove(),FPDUtil.showModal(t.statusText))})}},t.readAsDataURL(s)}),V=function(t,e){var n;!h&&u.mainOptions.autoFillUploadZones?(n=p[d]?p[d].title:null)&&u._addGridItemToStage(t,{_addToUZ:n}):e&&u._addGridItemToStage(t),d==f-1&&(h=!0)},q=function(t,e){e=c.append('<div class="fpd-item" data-title="'+e+'"><picture data-img="'+t+'"></picture><span class="fpd-price"></span><span class="fpd-icon-remove"></span></div>').children(".fpd-item:last").data("source",t);return FPDUtil.setItemPrice(e,u),FPDUtil.loadGridImage(e.children("picture"),t),FPDUtil.createScrollbar(n),o(e,t),e},o=function(o,t){var r,a,s,l,c,e;u.mainOptions.imageQualityRatings&&"object"==typeof u.mainOptions.imageQualityRatings&&(r=u.mainOptions.imageQualityRatings.low||null,a=u.mainOptions.imageQualityRatings.mid||null,s=u.mainOptions.imageQualityRatings.high||null,l="fpd-icon-star",c="fpd-icon-star-outline",(e=new Image).onload=function(){var t,e,n,i=o.append('<div class="fpd-image-quality-ratings"></div>').children(".fpd-image-quality-ratings");r&&2==r.length&&(e=this.width<Number(r[0])||this.height<Number(r[1])?c:l,i.append('<span class="'+e+'"></span>'),e==l&&(t=u.getTranslation("misc","image_quality_rating_low"))),a&&2==a.length&&(n=this.width<Number(a[0])||this.height<Number(a[1])?c:l,i.append('<span class="'+n+'"></span>'),n==l&&(t=u.getTranslation("misc","image_quality_rating_mid"))),s&&2==s.length&&(n=this.width<Number(s[0])||this.height<Number(s[1])?c:l,i.append('<span class="'+n+'"></span>'),n==l&&(t=u.getTranslation("misc","image_quality_rating_high"))),t&&i.data("quality-label",t)},e.src=t)},G=function(t,e){D&&(t={url:t,title:e},(e=window.localStorage.getItem("fpd_uploaded_images")?JSON.parse(window.localStorage.getItem("fpd_uploaded_images")):[]).push(t),window.localStorage.setItem("fpd_uploaded_images",JSON.stringify(e)))},Y=function(){var o=g.find(".fpd-dropdown-list .fpd-item");g.children("input").keyup(function(){o.hide(),(0===this.value.length?o:o.filter(':containsCaseInsensitive("'+this.value+'")')).show()}),g.on("click",".fpd-dropdown-list .fpd-item",function(){var t=$(this);t.parent().prevAll(".fpd-dropdown-current:first").val(t.text()),t.siblings(".fpd-item").show(),e(t.data("value"))});var e=function(e){v.empty(),g.addClass("fpd-on-loading"),FB.api("/"+e+"?fields=count",function(t){t=t.count;FB.api("/"+e+"?fields=photos.limit("+t+").fields(source,images)",function(t){if(g.removeClass("fpd-on-loading"),!t.error){for(var e=t.photos.data,n=0;n<e.length;++n){var i=e[n],o=(i.images[0]||i).source,r=(i.images[i.images.length-1]?i.images[i.images.length-1]:i).source,o=$("<div/>",{class:"fpd-item "+s,"data-title":i.id,"data-source":o,html:'<picture data-img="'+r+'"></picture><span class="fpd-price"></span>'}).appendTo(v);FPDUtil.setItemPrice(o,u),s||FPDUtil.loadGridImage(o.children("picture"),r)}FPDUtil.createScrollbar(m),FPDUtil.refreshLazyLoad(v,!1)}u.toggleSpinner(!1)})})};"https:"===location.protocol?($.ajaxSetup({cache:!0}),$.getScript("//connect.facebook.com/en_US/sdk.js",function(){FB.init({appId:w,status:!0,cookie:!0,xfbml:!0,version:"v5.0"}),FB.Event.subscribe("auth.statusChange",function(t){"connected"===t.status&&(a.addClass("fpd-facebook-logged-in"),FB.api("/me/albums?fields=name,count,id",function(t){for(var e=t.data,n=0;n<e.length;++n){var i=e[n];0<i.count&&g.find(".fpd-dropdown-list").append('<span class="fpd-item" data-value="'+i.id+'">'+i.name+"</span>")}o=g.find(".fpd-dropdown-list .fpd-item"),g.removeClass("fpd-on-loading")}))})})):FPDUtil.log("Facebook Apps can only run in https","info")},Z=function(){var t=(window.screen.width-700)/2,e=(window.screen.height-500)/2,n={app_id:x,redirect_uri:r,scope:"user_profile,user_media",response_type:"code"},i=window.open("https://api.instagram.com/oauth/authorize?"+$.param(n),"","width=700,height=500,left="+t+",top="+e),o=setInterval(function(){i.closed&&clearInterval(o);try{var t;i.location&&i.location.href&&((t=new URL(i.location.href).searchParams.get("code"))&&(t=t.replace("#_",""),J(t),i.close()))}catch(t){}},100)},J=function(t){u.toggleSpinner(!0),$.getJSON(u.mainOptions.instagramTokenUri,{code:t,client_app_id:x,redirect_uri:r},function(t){t?t.access_token?(i=t.access_token,X()):t.error_message&&(FPDUtil.log(t),alert(t.error_message),u.toggleSpinner(!1)):u.toggleSpinner(!1)})},X=function(t,e){t=void 0===t?"https://graph.instagram.com/me/media":t,e=void 0===e||e,C=!0,u.toggleSpinner(!0),e&&y.empty(),$.getJSON(t,{fields:"id,caption,media_url,media_type",access_token:i},function(t){u.toggleSpinner(!1),t.data&&(A=t.paging&&t.paging.next?t.paging.next:null,$.each(t.data,function(t,e){var n;"VIDEO"!==e.media_type&&(n=e.media_url,e=$("<div/>",{class:"fpd-item "+s,"data-title":e.id,"data-source":n,"data-thumbnail":e.thumbnail_url||e.media_url,html:'<picture data-img="'+(e.thumbnail_url||e.media_url)+'"></picture><span class="fpd-price"></span>'}).appendTo(y),FPDUtil.setItemPrice(e,u),s||FPDUtil.loadGridImage(e.children("picture"),n))}),e&&(FPDUtil.createScrollbar(b),FPDUtil.refreshLazyLoad(y,!1))),C=!1})},Q=function(t,n){if(e===t)return!1;N=!0,e=void 0===t?e:t,n=void 0===n||n;t=u.mainOptions.pixabayHighResImages?"&response_group=high_resolution":"",t="https://pixabay.com/api/?safesearch=true&key="+I+"&page="+O+"&per_page=40&min_width="+u.mainOptions.customImageParameters.minW+"&min_height="+u.mainOptions.customImageParameters.minH+t+"&q="+encodeURIComponent(e)+"&lang="+u.mainOptions.pixabayLang;n&&L.empty(),E.prevAll(".fpd-loader-wrapper:first").removeClass("fpd-hidden"),$.getJSON(t,function(t){E.prevAll(".fpd-loader-wrapper:first").addClass("fpd-hidden"),0<t.hits.length&&t.hits.forEach(function(t){var e=t.imageURL||t.webformatURL,e=$("<div/>",{class:"fpd-item "+s,"data-title":t.id||t.id_hash,"data-source":e,"data-thumbnail":t.webformatURL,html:'<picture data-img="'+t.webformatURL+'"></picture><span class="fpd-price"></span>'}).appendTo(L);FPDUtil.setItemPrice(e,u),s||FPDUtil.loadGridImage(e.children("picture"),t.previewURL),n&&(FPDUtil.createScrollbar(E),FPDUtil.refreshLazyLoad(L,!1))}),N=!1}).fail(function(t,e,n){E.prevAll(".fpd-loader-wrapper:first").addClass("fpd-hidden"),FPDUtil.log(e)})},K=function(n,t,i){i=void 0===i||i,j=n=void 0===n?"search":n,R=t,z=!0;var e=location.protocol+"//api.depositphotos.com?dp_apikey="+T;"search"==n?(e+="&dp_command=search&dp_search_limit=40&dp_search_offset="+W+"&dp_search_query="+encodeURIComponent(t),U&&(e+="&dp_search_categories="+encodeURIComponent(U))):"search-cats"==n?e+="&dp_command=search&dp_search_limit=40&dp_search_offset="+W+"&dp_search_query="+encodeURIComponent(t):"list-cats"==n&&(e+="&dp_command=getCategoriesList&dp_lang="+u.mainOptions.depositphotosLang),i&&M.empty(),B.prev(".fpd-head").toggleClass("fpd-cats-shown","list-cats"==n).prev(".fpd-loader-wrapper").removeClass("fpd-hidden"),$.getJSON(e,function(t){B.prevAll(".fpd-loader-wrapper:first").addClass("fpd-hidden"),(t="list-cats"==n?$.map(t.result,function(t,e){return[[e,t]]}):t.result)&&0<t.length&&t.forEach(function(t){var e;"list-cats"==n?$("<div/>",{class:"fpd-category fpd-item","data-category":t[1],html:"<span>"+t[1]+"</span>"}).appendTo(M):0==B.prev(".fpd-cats-shown").length&&((e=$("<div/>",{class:"fpd-item "+s,"data-title":t.title,"data-source":t.url_big,"data-price":u.mainOptions.depositphotosPrice,"data-thumbnail":t.thumb_huge,html:'<picture data-img="'+t.thumb_huge+'"></picture><span class="fpd-price"></span>'}).appendTo(M)).data("options",{depositphotos:{id:t.id,itemURL:t.itemurl},price:u.mainOptions.depositphotosPrice}),FPDUtil.setItemPrice(e,u),s||FPDUtil.loadGridImage(e.children("picture"),t.thumb_huge)),i&&(FPDUtil.createScrollbar(B),FPDUtil.refreshLazyLoad(M,!1))}),z=!1}).fail(function(t,e,n){FPDUtil.log(e)})};!function(){u.$container.on("viewSelect secondaryModuleCalled",function(t){var e,n,i;u.currentViewInstance&&(e=u.currentViewInstance.options,n=null,!u.currentViewInstance.currentUploadZone||(i=u.currentViewInstance.getUploadZone(u.currentViewInstance.currentUploadZone))&&i.price&&(n=i.price),null==n&&e.customImageParameters&&e.customImageParameters.price&&(n=u.formatPrice(e.customImageParameters.price)),a.find(".fpd-upload-zone .fpd-price").html(n||""))}).on("productCreate",function(){h=!1}),a.on("click",".fpd-grid .fpd-item:not(.fpd-category):not(.fpd-loading)",function(t){u._loadingCustomImage||u._addGridItemToStage($(this))}),-1!==F.indexOf("jpeg")&&-1===F.indexOf("jpg")&&F.push("jpg");var e=[];F.forEach(function(t){"pdf"==t?e.push("application/pdf"):("svg"==t&&(t+="+xml"),e.push("image/"+t))}),l.attr("accept",e.join());var o=a.find(".fpd-upload-zone");function t(t){t.stopPropagation(),t.preventDefault();var e,n=t.target.files||t.dataTransfer.files;u.mainOptions.uploadAgreementModal?(e=FPDUtil.showModal(u.getTranslation("modules","images_agreement"),!1,"confirm",u.$modalContainer)).find(".fpd-confirm").text(u.getTranslation("modules","images_confirm_button")).click(function(){e.find(".fpd-modal-close").click(),setTimeout(function(){i(n)},300)}):i(n)}o.click(function(t){t.preventDefault(),l.click()}).on("dragover dragleave",function(t){t.stopPropagation(),t.preventDefault(),$(this).toggleClass("fpd-hover","dragover"===t.type)});var r,i=function(t){if(d=0,f=t.length,u.getElements().forEach(function(t){t.uploadZone&&p.push(t)}),window.FileReader){var e=!0;u._loadingCustomImage=!0;for(var n=0;n<t.length;++n){var i=t[n].name.split(".").pop().toLowerCase();-1<F.indexOf(i)&&(H(t[n],e),e=!1)}}o.removeClass("fpd-hover"),l.val("")};o.get(0)&&o.get(0).addEventListener("drop",t,!1),a.find(".fpd-upload-form").on("change",t),D&&window.localStorage.getItem("fpd_uploaded_images")&&(r=JSON.parse(window.localStorage.getItem("fpd_uploaded_images"))).forEach(function(t){q(t.url,t.title);var i=new Image;i.src=t.url,i.onerror=function(){var n=null;r.forEach(function(t,e){t.url==i.src&&(n=e)}),null!=n&&(r.splice(n,1),window.localStorage.setItem("fpd_uploaded_images",JSON.stringify(r)))}}),a.find('.fpd-module-tabs-content [data-context="upload"]').on("click",".fpd-icon-remove",function(t){t.stopPropagation();var e=$(this).parents(".fpd-item:first"),n=c.children(".fpd-item").index(e);e.hasClass("fpd-loading")||((t=JSON.parse(window.localStorage.getItem("fpd_uploaded_images"))).splice(n,1),window.localStorage.setItem("fpd_uploaded_images",JSON.stringify(t))),e.data("xhr")&&e.data("xhr").abort(),e.remove(),$(".fpd-thumbnail-preview").remove()}),w&&5<w.length&&(a.find('.fpd-module-tabs [data-context="facebook"]').removeClass("fpd-hidden"),Y()),x&&5<x.length&&(a.find('.fpd-module-tabs [data-context="instagram"]').removeClass("fpd-hidden").on("click",function(){0<y.children(".fpd-item").length||Z()}),b.on("_sbOnTotalScroll",function(){null===A||C||X(A,!1)})),I&&5<I.length&&(a.find('.fpd-module-tabs [data-context="pixabay"]').removeClass("fpd-hidden").on("click",function(){0<L.children(".fpd-item").length||Q()}),a.on("keypress",'.fpd-module-tabs-content [data-context="pixabay"] input[type="text"]',function(t){13==t.which&&(O=1,Q(this.value))}),E.on("_sbOnTotalScroll",function(){N||(O++,Q(void 0,!1))})),T&&5<T.length&&(a.find('.fpd-module-tabs [data-context="depositphotos"]').removeClass("fpd-hidden").on("click",function(){0<M.children(".fpd-item").length||K("list-cats",null)}),a.on("keypress",'.fpd-module-tabs-content [data-context="depositphotos"] input[type="text"]',function(t){13==t.which&&(W=0,K("search",this.value))}).on("click",'.fpd-module-tabs-content [data-context="depositphotos"] .fpd-category',function(){var t=$(this),e=t.text();a.find('.fpd-module-tabs-content [data-context="depositphotos"] .fpd-input-search input').attr("placeholder",u.getTranslation("modules","depositphotos_search_category")+e),U=t.data("category"),K("search-cats",U)}).on("click",'.fpd-module-tabs-content [data-context="depositphotos"] .fpd-back',function(){W=0,U=null,a.find('.fpd-module-tabs-content [data-context="depositphotos"] .fpd-input-search input').val("").attr("placeholder",u.getTranslation("modules","depositphotos_search")),K("list-cats",null)}),B.on("_sbOnTotalScroll",function(){z||0!=B.prev(".fpd-cats-shown").length||(W++,K(j,R,!1))})),a.find(".fpd-module-tabs > :not(.fpd-hidden)").length<2&&a.addClass("fpd-hide-tabs"),a.children(".fpd-module-tabs").children("div:not(.fpd-hidden):first").click()}()},FPDTextLayersModule={createList:function(s,l){var n,i=!1;l.off();l.find(".fpd-current-color").spectrum("destroy"),l.find(".fpd-list").empty(),s.getElements(s.currentViewIndex).forEach(function(t){FPDUtil.elementIsEditable(t)&&"text"===FPDUtil.getType(t.type)&&function(t){var n="";if(FPDUtil.elementHasColorSelection(t)){var e=FPDUtil.elementAvailableColors(t,s),i="";if(1<e.length){n=$('<div class="fpd-color-palette fpd-grid"></div>');for(var o=0;o<e.length;++o){var r=s.mainOptions.hexNames[e[o].replace("#","").toLowerCase()],r='<div class="fpd-item fpd-tooltip" title="'+(r=r||e[o])+'" style="background-color: '+e[o]+'" data-color="'+e[o]+'"></div>';n.append(r)}$.isArray(t.patterns)&&(FPDUtil.isSVG(t)||"text"===FPDUtil.getType(t.type))&&t.patterns.forEach(function(t){var e=t.replace(/^.*[\\\/]/,"").replace(/\.[^/.]+$/,"").replace("_"," ");n.append('<div data-pattern="'+t+'" style="background-image: url('+t+')" class="fpd-item fpd-tooltip fpd-pattern" title="'+e+'"></div>')})}else i=t.fill||e[0],n=$('<div class="fpd-color-picker"><input class="fpd-current-color" type="text" value="'+i+'" /></div>')}i=1===t.maxLines?'<input type="text" value="'+t.text+'">':"<textarea>"+t.text+"</textarea>",l.find(".fpd-list").append('<div class="fpd-text-layer-item" id="'+t.id+'"><div class="fpd-title">'+t.title+'</div><div class="fpd-text-layer-content">'+i+'<span class="fpd-text-layer-clear">'+s.getTranslation("modules","text_layers_clear")+'</span></div><div class="fpd-text-layer-meta"></div></div>');var a=l.find(".fpd-text-layer-item:last").data("element",t).data("colors",e),i=$.isArray(s.mainOptions.fonts)?s.mainOptions.fonts:[];a.find(".fpd-text-layer-meta").append('<div class="fpd-text-layer-styles"></div>'),0<i.length&&(a.find(".fpd-text-layer-styles").append('<div class="fpd-text-layer-font-family fpd-dropdown fpd-search"><input type="text" class="fpd-dropdown-current" value="'+t.fontFamily+'" style="font-family: '+t.fontFamily+'"><div class="fpd-dropdown-arrow"><span class="fpd-icon-arrow-dropdown"></span></div><div class="fpd-dropdown-list"><div class="fpd-scroll-area"></div></div></div>'),i.forEach(function(t,e){"object"==typeof t&&(t=t.name),$("<span/>",{class:"fpd-item","data-value":t,html:t,css:{fontFamily:t}}).appendTo(a.find(".fpd-text-layer-font-family .fpd-scroll-area"))})),(t.resizable||t.__editorMode)&&a.find(".fpd-text-layer-styles").append('<input type="number" class="fpd-text-layer-font-size fpd-tooltip" title="'+s.getTranslation("toolbar","font_size")+'" value="'+t.fontSize+'" min="'+t.minFontSize+'" max="'+t.maxFontSize+'" />'),a.find(".fpd-text-layer-meta").append(n),FPDUtil.updateTooltip(a)}(t)}),FPDUtil.createScrollbar(l.find(".fpd-text-layers-panel .fpd-scroll-area")),l.find("input.fpd-current-color").spectrum("destroy").spectrum({flat:!1,preferredFormat:"hex",showInput:!0,showInitial:!0,showPalette:s.mainOptions.colorPickerPalette&&0<s.mainOptions.colorPickerPalette.length,palette:s.mainOptions.colorPickerPalette,showButtons:!1,show:function(t){FPDUtil.spectrumColorNames($(this).spectrum("container"),s),$(this).parents(".fpd-text-layer-item:first").data("element")._tempFill=t.toHexString()},move:function(t){var e=$(this).parents(".fpd-text-layer-item:first").data("element");!1!==i&&"png"===FPDUtil.elementIsColorizable(e)||s.currentViewInstance.changeColor(e,t.toHexString())},change:function(t){$(document).unbind("click.spectrum");var e=$(this).parents(".fpd-text-layer-item:first").data("element");s.currentViewInstance.setElementParameters({fill:t.toHexString()},e)}}).on("beforeShow.spectrum",function(t,e){n&&(n.remove(),n=null)}).on("dragstart.spectrum",function(){i=!0}).on("dragstop.spectrum",function(t,e){i=!1;var n=$(this).parents(".fpd-text-layer-item:first").data("element");s.currentViewInstance.changeColor(n,e.toHexString())}),l.on("click",".fpd-color-palette .fpd-item",function(t){t.stopPropagation();var e=$(this),n=e.parents(".fpd-text-layer-item").data("element"),t=e.data("pattern")?e.data("pattern"):e.data("color"),t=e.data("pattern")?{pattern:t}:{fill:t};s.deselectElement(),s.currentViewInstance.setElementParameters(t,n)}),l.on("click",".fpd-text-layer-clear",function(t){t.stopPropagation();var e=$(this).parents(".fpd-text-layer-item"),t=e.data("element");s.currentViewInstance.setElementParameters({text:""},t),e.find(".fpd-text-layer-content > *").val("")}),l.on("keyup",'textarea, .fpd-text-layer-content input[type="text"]',function(t){t.stopPropagation();t=$(this).parents(".fpd-text-layer-item").data("element");s.mainOptions.disableTextEmojis&&(this.value=this.value.replace(FPDEmojisRegex,""),this.value=this.value.replace(String.fromCharCode(65039),"")),s.currentViewInstance.setElementParameters({text:this.value},t)}).on("change",".fpd-text-layer-font-size",function(){var t=$(this).parents(".fpd-text-layer-item").data("element");s.currentViewInstance.setElementParameters({fontSize:parseInt(this.value)},t),this.value=t.fontSize}).on("click",".fpd-text-layer-font-family.fpd-dropdown",function(){$(this).toggleClass("fpd-active")}).on("keyup",".fpd-text-layer-font-family .fpd-dropdown-current",function(){var t=$(this).nextAll(".fpd-dropdown-list").find(".fpd-item");t.hide(),(0===this.value.length?t:t.filter(':containsCaseInsensitive("'+this.value+'")')).show()}).on("click touchend",".fpd-text-layer-font-family .fpd-item",function(t){var e=$(this),n=e.parents(".fpd-text-layer-item").data("element");e.parents(".fpd-dropdown").children(".fpd-dropdown-current").val(e.text()),s.currentViewInstance.setElementParameters({fontFamily:e.data("value")},n)});var t=function(t,e,n){n.text?document.activeElement&&$(document.activeElement).parent(".fpd-text-layer-content").length||l.find(".fpd-list").find('[id="'+e.id+'"] textarea, [id="'+e.id+'"] .fpd-text-layer-content input[type="text"]').val(n.text):n.fontSize?l.find(".fpd-list").find('[id="'+e.id+'"] .fpd-text-layer-font-size').val(n.fontSize):n.fontFamily&&l.find(".fpd-list").find('[id="'+e.id+'"] .fpd-text-layer-font-family > .fpd-dropdown-current').val(n.fontFamily).css("font-family",n.fontFamily)};s.$container.off("elementModify",t),s.$container.on("elementModify",t);t=function(t,e,n,i){e=l.find(".fpd-list").find('[id="'+e.id+'"] .fpd-current-color');e.is("input")?e.spectrum("set",n):e.css("background",n)};s.$container.off("elementColorChange",t),s.$container.on("elementColorChange",t)}},FPDLayoutsModule=function(r,t){"use strict";$=jQuery;function i(t,e,n,i,o){a++,i=i+"<br>"+String(a)+"/"+s,r.$container.find(".fpd-loader-text").html(i)}var o=[],a=0,s=0,l=t.find(".fpd-scroll-area");r.$container.on("productCreate",function(t,e){0<e.length&&(e=e[0].options.layouts,$.isArray(e)&&(o=e,l.find(".fpd-grid").empty(),e.forEach(function(t){$("<div/>",{class:"fpd-item fpd-tooltip",title:t.title,html:'<picture style="background-image: url('+t.thumbnail+'");"></picture>'}).appendTo(l.find(".fpd-grid"))}),FPDUtil.updateTooltip(l.find(".fpd-grid")),FPDUtil.createScrollbar(l)))}),l.on("click",".fpd-item",function(){var e,n;r.productCreated&&(e=FPDUtil.showModal(r.getTranslation("modules","layouts_confirm_replacement"),!1,"confirm",r.$modalContainer),n=l.find(".fpd-item").index($(this)),e.find(".fpd-confirm").text(r.getTranslation("modules","layouts_confirm_button")).click(function(){a=0;var t=$(r.currentViewInstance);s=o[n].elements.length,r.globalCustomElements=[],r.mainOptions.replaceInitialElements&&(r.globalCustomElements=r.getCustomElements()),t.on("beforeElementAdd",i),r.toggleSpinner(!0),r.currentViewInstance.loadElements(o[n].elements,function(){r.toggleSpinner(!1),t.off("beforeElementAdd",i),r.$container.trigger("layoutElementsAdded",[o[n].elements])}),r.$viewSelectionWrapper.find(".fpd-item").eq(r.currentViewIndex).children("picture").css("background-image","url("+o[n].thumbnail+")"),e.find(".fpd-modal-close").click()}))})},FPDToolbarSide=function(c,u){"use strict";$=jQuery;var d=this,l=$("body"),h=c.children(".fpd-sub-panel"),p=c.find(".fpd-color-wrapper"),f=!1,g=!0;this.isTransforming=!1,this.placement=u.mainOptions.toolbarPlacement;function i(t,e,n){return e=void 0===e||e,t=c.find(".fpd-tools-nav > .fpd-tool-"+t),n&&(t=t.filter('[data-fields="'+n+'"]')),t.toggleClass("fpd-hidden",!e)}function r(t,e,n){return n=Boolean(n),h.children(".fpd-panel-"+t).find(".fpd-tool-"+e).toggleClass("fpd-hidden",!n).find('[class^="fpd-tool-"],div[class*=" fpd-tool-"]').toggleClass("fpd-hidden",!n)}function a(t,e,n){h.children(".fpd-panel-"+t).find('.fpd-panel-tabs [data-tab="'+e+'"]').toggleClass("fpd-disabled",!n)}var m=function(t){t.mCustomScrollbar("destroy").mCustomScrollbar({axis:u.$container.hasClass("fpd-device-desktop")?"y":"x",scrollInertia:200,documentTouchScroll:!1,contentTouchScroll:!0,mouseWheel:{enable:!0,preventDefault:!0},advanced:{autoExpandHorizontalScroll:!0}})},v=function(t){c.find(".fpd-current-fill").css("background",t),u.currentViewInstance.changeColor(u.currentViewInstance.currentElement,t)},b=function(t){h.find(".fpd-tool-uniscaling-locker > span").removeClass().addClass(t?"fpd-icon-locked":"fpd-icon-unlocked"),h.find(".fpd-tool-scaleY").toggleClass("fpd-disabled",t)};this.update=function(o){this.hideTools(),c.removeClass("fpd-type-image");var t,e=o.source;e&&(t=(e=e.split("?")[0]).split(".").pop().toLowerCase()),FPDUtil.elementHasColorSelection(o)&&(i("color"),a("color","fill",!0),p.removeClass("fpd-hidden")),(FPDUtil.isSVG(o)||"text"===FPDUtil.getType(o.type))&&o.patterns&&o.patterns.length?(i("color"),a("color","fill",!0),r("color","patterns",!0)):r("color","patterns",!1);var n=Boolean(o.resizable&&"image"===FPDUtil.getType(o.type)||o.uniScalingUnlockable||o.__editorMode);(n||o.rotatable||o.draggable||o.zChangeable||o.__editorMode)&&(i("transform"),i("layer-depth",Boolean(o.zChangeable||o.__editorMode)),u.$container.hasClass("fpd-device-desktop")||i("transform",o.rotatable||n,"transform"),r("transform","scale",n),b(o.lockUniScaling),r("transform","uniscaling-locker",Boolean(o.uniScalingUnlockable||o.__editorMode)),r("transform","angle",Boolean(o.rotatable||o.__editorMode)),r("transform","position",Boolean(o.draggable||o.__editorMode)),r("transform","flip",Boolean(o.draggable||o.__editorMode)),r("transform","layer-depth",Boolean(o.zChangeable||o.__editorMode))),"text"===FPDUtil.getType(o.type)&&(o.editable||o.__editorMode)?(i("edit-text"),i("font-family"),i("text-bold"),i("text-italic"),i("text-underline"),i("text-align"),i("text-transform"),r("edit-text","text-styles",!0),r("edit-text","text-size",Boolean(o.resizable||o.__editorMode)),r("edit-text","line-height",Boolean(o.resizable||o.__editorMode)),r("edit-text","letter-spacing",Boolean(o.resizable||o.__editorMode)),a("color","stroke",!0),a("color","shadow",!0),o.curvable&&!o.textBox&&i("curved-text"),c.find('textarea[data-control="text"]').val(o.get("text")),i("edit-text",!o.textPlaceholder&&!o.numberPlaceholder)):c.addClass("fpd-type-image"),o.advancedEditing&&e&&(FPDUtil.isSVG(o)||-1!==$.inArray(t,["png","jpg","jpeg","svg"])||-1!==t.search(/data:image\/(jpeg|png);/))&&i("advanced-editing"),i("reset"),i("duplicate",o.copyable),i("remove",o.removable),h.find(".fpd-panel-tabs").each(function(t,e){e=$(e);e.toggleClass("fpd-hidden",e.children(":not(.fpd-disabled)").length<=1),e.children(":not(.fpd-disabled):first").addClass("fpd-active").click()}),c.find("[data-control]").each(function(t,e){var n=$(e),i=n.data("control");n.hasClass("fpd-number")?void 0!==o[i]&&(e=n.attr("step")&&1<n.attr("step").length?parseFloat(o[i]).toFixed(2):parseInt(o[i]),n.val(e),n.prev(".fpd-range-wrapper")&&("fontSize"==i?n.prev(".fpd-range-wrapper").children("input").attr("min",o.minFontSize).attr("max",o.maxFontSize):"scaleX"!=i&&"scaleY"!=i||n.prev(".fpd-range-wrapper").children("input").attr("min",o.minScaleLimit),n.prev(".fpd-range-wrapper").children("input").val(e).rangeslider("update",!0,!1))):n.hasClass("fpd-toggle")?n.toggleClass("fpd-enabled",o[i]===n.data("enabled")):n.hasClass("fpd-btn-options")?n.children("span:first").removeClass().addClass(n.data("options")[o[i]]):"fontSize"==i?c.find(".fpd-tool-text-size > .fpd-current-val").text(parseInt(o[i])):"fontFamily"==i&&void 0!==o[i]&&c.find(".fpd-fonts-list .fpd-item").removeClass("fpd-active").filter('[data-value="'+o[i]+'"]').addClass("fpd-active");i=FPDUtil.getBgCssFromElement(o);i&&c.find(".fpd-current-fill").css("background",i)}),u.$container.hasClass("fpd-device-desktop")?c.find(".fpd-tools-nav > [data-panel]:not(.fpd-hidden):first").click():d.toggle(!0,!1),c.children(".fpd-scroll-area").scrollTop(0),c.children(".fpd-scroll-area").scrollLeft(0)},this.updateUIValue=function(t,e){t=c.find('[data-control="'+t+'"]');t.val(e),t.filter(".fpd-slider-range").rangeslider("update",!0,!1)},this.hideTools=function(){c.removeClass("fpd-panel-visible").find(".fpd-tools-nav > div").addClass("fpd-hidden").removeClass("fpd-active"),h.children().removeClass("fpd-active").find(".fpd-panel-tabs > span").addClass("fpd-disabled").removeClass("fpd-hidden"),h.find(".fpd-panel-tabs-content, .fpd-panel-tabs").children().removeClass("fpd-active"),p.addClass("fpd-hidden")},this.updatePosition=function(t,e){},this.toggle=function(t,e){e=void 0===e||e,!(t=void 0===t||t)&&e&&p.spectrum("destroy"),c.toggleClass("fpd-show",t)},this.setPlacement=function(t){"body"==(d.placement=t)?c.appendTo(u.mainOptions.toolbarDynamicContext):c.appendTo(u.mainBar.$container)},function(){c.addClass("fpd-ui-theme-"+u.mainOptions.uiTheme),d.setPlacement(u.mainOptions.toolbarPlacement),l.on("mousedown touchstart",function(t){"function"==typeof t.target.className.includes&&t.target.className.includes("fpd-range-slider")&&(d.isTransforming=!0,t.preventDefault())}).on("touchmove",function(t){t.target.className.includes("fpd-range-slider")&&t.preventDefault()}).on("mouseup touchend",function(){d.isTransforming=!1});var n=c.children(".fpd-scroll-area");u.$container.hasClass("fpd-device-desktop")||c.children(".fpd-scroll-area").on("mousewheel",function(t,e){(this.scrollLeft===n.get(0).scrollWidth-n.width()&&e<0||0===this.scrollLeft&&0<e)&&t.preventDefault()}),u.$container.on("screenSizeChange",function(t,e){"desktop"==e?d.setPlacement("mainbar"):d.setPlacement("body"),m(c.find(".fpd-sub-panel .fpd-scroll-area"))}),c.on("click",".fpd-close-sub-panel",function(){c.find(".fpd-panel-font-family input").val("").keyup(),p.children("input").spectrum("hide"),u.currentElement&&"function"===u.currentElement.exitEditing&&u.currentElement.exitEditing(),c.removeClass("fpd-panel-visible"),u.$container.trigger("toolbarPanelClose")}).on("click",".fpd-close-panel",function(){c.find(".fpd-panel-font-family input").val("").keyup(),p.children("input").spectrum("hide"),u.currentElement&&"function"===u.currentElement.exitEditing&&u.currentElement.exitEditing(),u.deselectElement(),u.$container.trigger("toolbarPanelClose")});for(var t=Object.keys(u.mainOptions.maxValues),e=0;e<t.length;++e){var i=t[e];c.find('[data-control="'+i+'"]').attr("max",u.mainOptions.maxValues[i])}c.find(".fpd-tools-nav > div").click(function(){g=!1;var t=$(this);if(t.data("panel")){var n=u.currentElement;if(t.addClass("fpd-active").siblings().removeClass("fpd-active"),h.children().removeClass("fpd-active").filter(".fpd-panel-"+t.data("panel")).addClass("fpd-active"),c.addClass("fpd-panel-visible").attr("data-fields",t.data("fields")?t.data("fields"):""),"color"==t.data("panel")){if(FPDUtil.elementHasColorSelection(n)){var e=n.__editorMode?["#000"]:(n.colorLinkGroup?u.colorLinkGroups[n.colorLinkGroup]:n).colors;if(p.children("input").spectrum("destroy"),p.empty().removeClass("fpd-colorpicker-group"),n.type==FPDPathGroupName&&(1<n.getObjects().length||1==e||n.__editorMode)){for(var i=n.getObjects(),o=0;o<i.length;++o){var r=i[o],a=tinycolor(r.fill);p.append('<input type="text" value="'+a.toHexString()+'" />')}p.addClass("fpd-colorpicker-group").children("input").spectrum("destroy").spectrum({showPaletteOnly:$.isArray(n.colors)&&!n.__editorMode,preferredFormat:"hex",showInput:!0,showInitial:!0,showButtons:!1,showPalette:u.mainOptions.colorPickerPalette&&0<u.mainOptions.colorPickerPalette.length,palette:$.isArray(n.colors)?n.colors:u.mainOptions.colorPickerPalette,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,show:function(t){t=FPDUtil.changePathColor(u.currentElement,p.children("input").index(this),t);FPDUtil.spectrumColorNames($(this).spectrum("container"),u),n._tempFill=t},move:function(t){t=FPDUtil.changePathColor(n,p.children("input").index(this),t);u.currentViewInstance.setElementParameters({fill:t},n)},change:function(t){t=FPDUtil.changePathColor(n,p.children("input").index(this),t);$(document).unbind("click.spectrum"),u.currentViewInstance.setElementParameters({fill:t},n)}})}else if(1<e.length||n.type==FPDPathGroupName&&1===n.getObjects().length){p.html('<div class="fpd-scroll-area"><div class="fpd-color-palette fpd-grid"></div></div>');for(o=0;o<e.length;++o){var a=e[o],s=(s=u.mainOptions.hexNames[a.replace("#","").toLowerCase()])||a;p.find(".fpd-grid").append('<div class="fpd-item fpd-tooltip" title="'+s+'" style="background-color: '+a+';"></div>').children(".fpd-item:last").click(function(){var t=tinycolor($(this).css("backgroundColor"));c.find(".fpd-current-fill").css("background",t.toHexString());var e=t.toHexString();u.currentElement.type==FPDPathGroupName&&(e=FPDUtil.changePathColor(n,0,t)),u.currentViewInstance.setElementParameters({fill:e})})}m(p.children(".fpd-scroll-area")),FPDUtil.updateTooltip(p)}else p.html('<input type="text" value="'+(n.fill||e[0])+'" />'),p.children("input").spectrum({flat:!0,preferredFormat:"hex",showInput:!0,showInitial:!0,showPalette:u.mainOptions.colorPickerPalette&&0<u.mainOptions.colorPickerPalette.length,palette:u.mainOptions.colorPickerPalette,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,allowEmpty:Boolean(n.__editorMode),show:function(t){FPDUtil.spectrumColorNames($(this).spectrum("container").next(".sp-container"),u),n._tempFill=t.toHexString()},move:function(t){!1!==f&&"png"===FPDUtil.elementIsColorizable(n)||v(t?t.toHexString():"")},change:function(t){$(document).unbind("click.spectrum"),u.currentViewInstance.setElementParameters({fill:!!t&&t.toHexString()},n)}}).on("dragstart.spectrum",function(){f=!0}).on("dragstop.spectrum",function(t,e){f=!1,v(e.toHexString())})}if((FPDUtil.isSVG(n)||"text"===FPDUtil.getType(n.type))&&n.patterns&&n.patterns.length){h.find(".fpd-tool-patterns .fpd-grid").empty();for(o=0;o<n.patterns.length;++o){var l=n.patterns[o];$("<div/>",{class:"fpd-item","data-pattern":l,html:'<picture style="background-image: url('+l+');"></picture>'}).appendTo(h.find(".fpd-tool-patterns .fpd-grid")).click(function(){var t=$(this).data("pattern");c.find(".fpd-current-fill").css("background","url("+t+")"),u.currentViewInstance.setElementParameters({pattern:t})})}m(h.find(".fpd-tool-patterns .fpd-scroll-area"))}h.find(".fpd-stroke-color-picker input").spectrum("destroy").spectrum({color:n.stroke||"#000",flat:!0,preferredFormat:"hex",showInput:!0,showInitial:!0,palette:n.strokeColors,showPaletteOnly:n.strokeColors&&0<n.strokeColors.length,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,move:function(t){d.isTransforming=!0,u.currentViewInstance.setElementParameters({stroke:t.toHexString()})},change:function(t){u.currentViewInstance.setElementParameters({stroke:t.toHexString()})}}),h.find(".fpd-shadow-color-picker input").spectrum("destroy").spectrum({color:n.stroke||"#000",flat:!0,preferredFormat:"hex",showInput:!0,showInitial:!0,allowEmpty:!0,showPalette:u.mainOptions.colorPickerPalette&&0<u.mainOptions.colorPickerPalette.length,palette:u.mainOptions.colorPickerPalette,containerClassName:"fpd-theme-"+u.mainOptions.toolbarTheme,move:function(t){t&&(d.isTransforming=!0,u.currentViewInstance.setElementParameters({shadowColor:t.toHexString()}))},change:function(t){u.currentViewInstance.setElementParameters({shadowColor:t?t.toHexString():""})}})}d.toggle(),h.find(".fpd-slider-number").change(),FPDUtil.createScrollbar(h.find(".fpd-active .fpd-scroll-area")),u.$container.trigger("toolbarPanelOpen",[t.data("panel")]),g=!0}}),h.find(".fpd-panel-tabs > span").click(function(){var t=$(this);t.addClass("fpd-active").siblings().removeClass("fpd-active");t=t.parent().siblings(".fpd-panel-tabs-content").children('[data-id="'+this.dataset.tab+'"]').addClass("fpd-active");t.siblings().removeClass("fpd-active"),t.find(".fpd-slider-range").rangeslider("update",!0,!1)});var o=!0;if(h.find(".fpd-slider-range").rangeslider({polyfill:!1,rangeClass:"fpd-range-slider",disabledClass:"fpd-range-slider--disabled",horizontalClass:"fpd-range-slider--horizontal",verticalClass:"fpd-range-slider--vertical",fillClass:"fpd-range-slider__fill",handleClass:"fpd-range-slider__handle",onSlide:function(t,e){var n,i;d.isTransforming=!0,u.currentViewInstance&&u.currentViewInstance.currentElement&&d.isTransforming&&this.$element.is(":visible")&&((n={})[i=this.$element.data("control")]=e,"scaleX"===i&&u.currentElement&&u.currentElement.lockUniScaling&&(n.scaleY=e),"scaleX"==i&&0==e||"scaleY"==i&&0==e||(u.currentViewInstance.setElementParameters(n,u.currentViewInstance.currentElement,o),this.$element.parent().siblings(".fpd-slider-number").val(e),o=!1))},onSlideEnd:function(t,e){"scaleX"===this.$element.data("control")&&u.currentElement&&u.currentElement.lockUniScaling&&c.find('[data-control="scaleY"]').val(e).filter(".fpd-slider-range").rangeslider("update",!0,!1),d.isTransforming=!1,o=!0}}),c.on("click",".fpd-btn-options",function(t){t.preventDefault();var e=$(this),n=e.data("options"),i=Object.keys(n),t=u.currentElement?u.currentElement[this.dataset.control]:i[0],i=i.indexOf(t)==i.length-1?i[0]:i[i.indexOf(t)+1],t={};t[this.dataset.control]=i,e.children("span:first").removeClass().addClass(n[i]),u.currentViewInstance.setElementParameters(t)}),c.find(".fpd-toggle").click(function(){var t=$(this).toggleClass("fpd-enabled"),e={};t.hasClass("fpd-curved-text-switcher")||(e[t.data("control")]=t.hasClass("fpd-enabled")?t.data("enabled"):t.data("disabled"),t.hasClass("fpd-tool-uniscaling-locker")&&b(t.hasClass("fpd-enabled")),u.currentViewInstance.setElementParameters(e))}),c.find(".fpd-number").change(function(){var t=$(this),e={};this.value>Number(t.attr("max"))&&(this.value=Number(t.attr("max"))),this.value<Number(t.attr("min"))&&(this.value=Number(t.attr("min")));var n=Number(this.value);t.hasClass("fpd-slider-number")&&(t.siblings(".fpd-range-wrapper").children("input").val(this.value).rangeslider("update",!0,!1),"scaleX"===t.data("control")&&u.currentElement&&u.currentElement.lockUniScaling&&c.find('[data-control="scaleY"]').val(n).change()),e[t.data("control")]=n,g&&u.currentViewInstance&&$(document.activeElement).is(":not(textarea)")&&u.currentViewInstance.setElementParameters(e,u.currentViewInstance.currentElement)}),u.mainOptions.fonts&&0<u.mainOptions.fonts.length){for(var r=h.find(".fpd-fonts-list"),e=0;e<u.mainOptions.fonts.length;++e){var a=u.mainOptions.fonts[e],s=a;"object"==typeof a&&(s=a.name),$("<span/>",{class:"fpd-item","data-value":s,html:s,css:{fontFamily:s}}).appendTo(r)}h.on("keyup",".fpd-panel-font-family input",function(){var t=$(this).css("font-family","Helvetica").next(".fpd-scroll-area").find(".fpd-fonts-list .fpd-item").hide();(0===this.value.length?t:t.filter(':containsCaseInsensitive("'+this.value+'")')).show()}).on("click",".fpd-fonts-list .fpd-item",function(){var t=this.dataset.value;c.find(".fpd-fonts-list .fpd-item").removeClass("fpd-active").filter('[data-value="'+t+'"]').addClass("fpd-active"),u.currentViewInstance.setElementParameters({fontFamily:t})})}h.find('textarea[data-control="text"]').on("keyup",function(t){t.stopPropagation,t.preventDefault();var e=this.selectionStart,t=this.selectionEnd;u.currentViewInstance.setElementParameters({text:this.value}),this.selectionStart=e,this.selectionEnd=t}),c.find(".fpd-tool-advanced-editing").click(function(){var t,e;u.currentViewInstance&&u.currentViewInstance.currentElement&&u.currentViewInstance.currentElement.source&&(t=u.currentViewInstance.currentElement.source,e=FPDUtil.showModal($(u.translatedUI).children(".fpd-image-editor-container").clone(),!0),new FPDImageEditor(e.find(".fpd-image-editor-container"),u.currentViewInstance.currentElement,u).loadImage(t))}),h.on("click",".fpd-icon-button-group > span",function(){var t=$(this);t.hasClass("fpd-align-left")?u.currentViewInstance.alignElement("left"):t.hasClass("fpd-align-top")?u.currentViewInstance.alignElement("top"):t.hasClass("fpd-align-right")?u.currentViewInstance.alignElement("right"):t.hasClass("fpd-align-bottom")?u.currentViewInstance.alignElement("bottom"):t.hasClass("fpd-align-center-h")?u.currentViewInstance.centerElement(!0,!1):t.hasClass("fpd-align-center-v")?u.currentViewInstance.centerElement(!1,!0):t.hasClass("fpd-flip-h")?u.currentViewInstance.setElementParameters({flipX:!u.currentElement.get("flipX")}):t.hasClass("fpd-flip-v")&&u.currentViewInstance.setElementParameters({flipY:!u.currentElement.get("flipY")})}),c.find(".fpd-tool-layer-up, .fpd-tool-layer-down").click(function(){var t=u.currentViewInstance.getZIndex();t=(t=$(this).hasClass("fpd-tool-layer-up")?t+1:t-1)<0?0:t,u.currentViewInstance.setElementParameters({z:t})}),c.find(".fpd-tool-reset").click(function(){$(document).unbind("click.spectrum"),c.find(".tooltipstered").tooltipster("destroy");var t=u.currentElement.originParams;delete t.clipPath,u.currentElement.boundingBox&&(u.currentElement.scaleX=1,t.boundingBox=u.currentElement.boundingBox),u.currentViewInstance.setElementParameters(u.currentElement.originParams),u.currentViewInstance.deselectElement()}),c.find(".fpd-tool-duplicate").click(function(){$(document).unbind("click.spectrum"),c.find(".tooltipstered").tooltipster("destroy"),u.currentViewInstance.duplicate()}),c.find(".fpd-tool-remove").click(function(){$(document).unbind("click.spectrum"),c.find(".tooltipstered").tooltipster("destroy"),u.currentViewInstance.removeElement(u.currentViewInstance.currentElement)}),u.$container.on("elementModify",function(t,e,n){n.fontSize&&c.find(".fpd-tool-text-size > .fpd-current-val").text(parseInt(n.fontSize))}),FPDUtil.updateTooltip(c)}()},FancyProductDesigner=function(i,t){"use strict";$=jQuery;var o,s,c,l,r,a,u,d,f=this,h=$(window),p=$("body"),g=null,m=null,e=!1,v=!1,b=!1,y=!1,w="",x=0,C=0,n="";this.products=[],this.designs=[],this.currentCategoryIndex=0,this.currentProductIndex=0,this.currentViewIndex=0,this.currentPrice=0,this.singleProductPrice=0,this.currentViews=null,this.currentViewInstance=null,this.currentElement=null,this.langJson=null,this.mainOptions,this.$productStage=null,this.$elementTooltip=null,this.watermarkImg=null,this.productCreated=!1,this.doUnsavedAlert=!1,this.viewInstances=[],this.colorLinkGroups={},this.orderQuantity=1,this.bulkVariations=null,this.pricingRulesPrice=0,this.$modalContainer=$("body"),this.globalCustomElements=[],this.fixedElements=[],this.mouseOverCanvas=!1,this.languageJSON={toolbar:{},actions:{},modules:{},misc:{},image_editor:{},plus:{}},this._order={},this._loadingCustomImage=!1,this._prevPrintingBoxes=[];var A=new FancyProductDesignerOptions;this.mainOptions=A.merge(A.defaults,t);function D(t,e){0===t.length?f.$actionsWrapper.find('[data-action="undo"]').addClass("fpd-disabled"):f.$actionsWrapper.find('[data-action="undo"]').removeClass("fpd-disabled"),0===e.length?f.$actionsWrapper.find('[data-action="redo"]').addClass("fpd-disabled"):f.$actionsWrapper.find('[data-action="redo"]').removeClass("fpd-disabled")}function S(){var t=f.currentElement;t&&f.$elementTooltip&&f.productCreated&&!t.uploadZone&&!t.__editorMode?(t.isOut&&"inside"===t.boundingBoxMode?f.$elementTooltip.text(n).show():f.mainOptions.imageSizeTooltip&&"image"===FPDUtil.getType(t.type)?f.$elementTooltip.text(parseInt(t.width*t.scaleX)+" x "+parseInt(t.height*t.scaleY)).show():f.$elementTooltip.hide(),t=t.oCoords,f.$elementTooltip.css({left:f.$productStage.position().left+t.mt.x,top:t.mt.y-10+f.$productStage.position().top})):f.$elementTooltip&&f.$elementTooltip.hide()}var _=function(){f.$mainWrapper=c.addClass("fpd-container fpd-clearfix fpd-grid-columns-"+f.mainOptions.gridColumns).html('<div class="fpd-loader-wrapper"><div class="fpd-loader"><div class="fpd-loader-circle"></div><span class="fpd-loader-text" data-defaulttext="Initializing Product Designer">misc.initializing</span></div></div><div class="fpd-main-wrapper"><div class="fpd-element-tooltip" style="display: none;" data-defaulttext="Move element in its containment!">misc.out_of_bounding_box</div><div class="fpd-snap-line-h"></div><div class="fpd-snap-line-v"></div><div class="fpd-product-stage" style="width:'+f.mainOptions.stageWidth+"px;height: "+f.mainOptions.stageHeight+'px;"></div></div>').children(".fpd-main-wrapper"),f.$actionsWrapper=$('<div class="fpd-actions-container"></div>'),"doyle"==f.mainOptions.uiTheme?f.$actionsWrapper.addClass("fpd-primary-bg-color").prependTo(f.$container):f.$actionsWrapper.appendTo(f.$mainWrapper),f.mainOptions.editorMode||c.after('<div class="fpd-device-info">'+f.getTranslation("misc","not_supported_device_info")+"</div>"),f.$mainWrapper.prepend('<div class="fpd-modal-lock"><div class="fpd-toggle-lock"><span class="fpd-icon-unlocked"></span><span class="fpd-icon-locked"></span><div>'+f.getTranslation("misc","view_optional_unlock")+"</div></div></div>"),f.$productStage=f.$mainWrapper.children(".fpd-product-stage"),f.$elementTooltip=f.$mainWrapper.children(".fpd-element-tooltip"),r=c.children(".fpd-loader-wrapper"),f.translateElement(r.find(".fpd-loader-text")),n=f.translateElement(f.$elementTooltip),f.mainOptions.modalMode&&f.translateElement(p.find(".fpd-modal-overlay .fpd-done")),"string"==typeof f.mainOptions.editorMode&&(g=$('<div class="fpd-editor-box"><h5></h5><div class="fpd-clearfix"></div></div>'),$(f.mainOptions.editorMode).append(g)),p.on("focus blur",'[class^="fpd-element-toolbar"] textarea, [class^="fpd-element-toolbar"] input[type="number"], [class^="fpd-element-toolbar"] input[type="text"]',function(t){y="focusin"==t.type}),f.$container.on("screenSizeChange",function(t,e){"doyle"!==f.mainOptions.uiTheme&&("smartphone"===e?f.$actionsWrapper.insertBefore(f.$mainWrapper):f.$actionsWrapper.appendTo(f.$mainWrapper))});var e="";h.resize(function(){var t;y||(f.currentViewInstance&&f.currentViewInstance.resetCanvasSize(),f.mainBar&&f.mainBar.$content&&0<f.$container.filter('[class*="fpd-off-canvas-"]').length&&f.mainBar.$content.height(f.$mainWrapper.height()),f.actions&&(f.actions.hideAllTooltips(),v||f.resetZoom()),f.currentElement&&$(document.activeElement).is(":not(input)")&&$(document.activeElement).is(":not(textarea)")&&f.deselectElement(),f.currentElement&&f.currentElement.isEditing||f.mainOptions.editorMode||("smartphone"==(t=FPDUtil.getDeviceByScreenSize())?!f.$container.hasClass("fpd-topbar")&&f.mainBar&&"doyle"!==f.mainOptions.uiTheme&&(f.$container.removeClass("fpd-sidebar").addClass("fpd-topbar"),f.mainBar.setContentWrapper("draggable-dialog")):"tablet"==t||"desktop"==t&&"doyle"!==f.mainOptions.uiTheme&&-1===w.search("fpd-topbar")&&f.$container.hasClass("fpd-topbar")&&(f.$container.removeClass("fpd-topbar").addClass("fpd-sidebar"),f.mainBar&&!f.mainOptions.mainBarContainer&&f.mainBar.setContentWrapper("sidebar")),e!==t&&c.trigger("screenSizeChange",[t]),f.currentViewInstance&&f.currentViewInstance.resetCanvasSize(),e=t))}),f.loadFonts(f.mainOptions.fonts,function(){f.mainOptions.templatesDirectory?N("productdesigner",f.mainOptions.templatesType,0,P):k()})},P=function(t){c.trigger("templateLoad",[this.url]),(a=$(t)).find("[data-defaulttext]").each(function(t,e){f.translateElement($(e))}),f.translatedUI=a,l=f.mainOptions.mainBarContainer?(c.addClass("fpd-main-bar-container-enabled"),$(f.mainOptions.mainBarContainer).addClass("fpd-container fpd-main-bar-container fpd-tabs fpd-tabs-top fpd-sidebar fpd-grid-columns-"+f.mainOptions.gridColumns).html(a.children(".fpd-mainbar")).children(".fpd-mainbar")):a.children(".fpd-mainbar").insertBefore(c.children(".fpd-loader-wrapper")),u=a.children(".fpd-modules"),c.hasClass("fpd-sidebar")?c.height(f.mainOptions.stageHeight):c.width(f.mainOptions.stageWidth),p.on("click",".fpd-module-tabs > div",function(){var t=$(this),e=$(this).data("context");t.addClass("fpd-active").siblings().removeClass("fpd-active"),t.parent().next(".fpd-module-tabs-content").children().hide().filter('[data-context="'+e+'"]').show()}),f.mainOptions.mainBarModules&&(f.mainBar=new FPDMainBar(f,l,u,a.children(".fpd-draggable-dialog"))),f.mainOptions.actions&&(f.actions=new FPDActions(f,a.children(".fpd-actions"))),c.trigger("uiSet");var i=a.children(".fpd-element-toolbar");"doyle"===f.mainOptions.uiTheme?(i=a.children(".fpd-element-toolbar-side"),f.toolbar=new FPDToolbarSide(i,f)):(i=a.children(".fpd-element-toolbar-smart"),f.toolbar=new FPDToolbarSmart(i,f));c.on("elementSelect",function(t,e){var n;t.stopPropagation(),t.preventDefault(),e&&!e._ignore&&f.currentViewInstance?!e.uploadZone||f.mainOptions.editorMode?(f.currentViewInstance.currentUploadZone&&(f.mainBar.toggleDialog(!1),f.mainBar.toggleUploadZonePanel(!1)),f.toolbar.update(e),f.mainOptions.openTextInputOnSelect&&"text"===FPDUtil.getType(e.type)&&e.editable&&i.find(".fpd-tool-edit-text").click(),E(e)):(e.set("borderColor","transparent"),n=$.extend({},f.currentViewInstance.options.customAdds,e.customAdds||{}),setTimeout(function(){f.currentViewInstance.currentUploadZone=e.title,f.mainBar.toggleUploadZoneAdds(n),f.mainBar.toggleUploadZonePanel()},100)):(f.toolbar.toggle(!1),p.children('[class^="fpd-element-toolbar"]').find("input").spectrum("destroy"))}).on("elementChange",function(t,e,n){n._ignore||"doyle"===f.mainOptions.uiTheme||f.toolbar.toggle(!1,!1),f.mainOptions.fabricCanvasOptions.allowTouchScrolling&&(c.addClass("fpd-disable-touch-scrolling"),f.currentViewInstance.stage.allowTouchScrolling=!1)}).on("elementModify",function(t,i,e){if(f.productCreated&&!i._ignore){if(f.toolbar.isTransforming||(void 0!==e.fontSize&&f.toolbar.updateUIValue("fontSize",Number(e.fontSize)),void 0!==e.scaleX&&f.toolbar.updateUIValue("scaleX",parseFloat(Number(e.scaleX).toFixed(2))),void 0!==e.scaleY&&f.toolbar.updateUIValue("scaleY",parseFloat(Number(e.scaleY).toFixed(2))),void 0!==e.angle&&f.toolbar.updateUIValue("angle",parseInt(e.angle)),void 0!==e.text&&f.toolbar.updateUIValue("text",e.text),f.currentElement&&!f.currentElement.uploadZone&&f.toolbar.updatePosition(f.currentElement),void 0!==e.shadowColor&&""==e.shadowColor&&(f.toolbar.updateUIValue("shadowBlur",0),f.toolbar.updateUIValue("shadowOffsetX",0),f.toolbar.updateUIValue("shadowOffsetY",0))),e.text&&!FPDUtil.isEmpty(i.textLinkGroup))for(var n=0;n<f.viewInstances.length;++n)f.viewInstances[n].fCanv.getObjects().forEach(function(t){t!==i&&"text"===FPDUtil.getType(t.type)&&t.textLinkGroup===i.textLinkGroup&&(t.set("text",i.text),c.trigger("_doPricingRules"))});var o;FPDUtil.isEmpty(i.textLinkGroup)||(o=f.mainOptions.textLinkGroupProps||[],Object.keys(e).forEach(function(n){-1!=o.indexOf(n)&&f.viewInstances.forEach(function(t){t.fCanv.getObjects().forEach(function(t){var e;t!==i&&"text"===FPDUtil.getType(t.type)&&t.textLinkGroup===i.textLinkGroup&&(e=i[n],"textDecoration"==n&&t.set("underline","underline"===e),"letterSpacing"==n&&t.set("charSpacing",100*e),t.set(n,e),c.trigger("_doPricingRules"))})})}))}}).on("screenSizeChange",function(t,e){c.removeClass("fpd-device-smartphone fpd-device-tablet fpd-device-desktop").addClass("fpd-device-"+e)}),$(".fpd-switch-container").click(function(){var t,e,n;$(this).hasClass("fpd-curved-text-switcher")&&(t=f.currentViewInstance.getZIndex(f.currentElement),e=f.currentElement.get("text"),(n=f.currentViewInstance.getElementJSON(f.currentElement)).z=t,n.curved="i-text"==f.currentElement.type,n.textAlign="center",delete n.shadow,c.on("elementAdd",function t(e,n){f.currentViewInstance.stage.setActiveObject(n),c.off("elementAdd",t),setTimeout(function(){$(".fpd-tool-curved-text").click()},100)}),f.currentViewInstance.removeElement(f.currentElement),f.currentViewInstance.addElement("text",e,e,n))}),$(".fpd-dropdown").click(function(){$(this).toggleClass("fpd-active")}),p.on("click",".fpd-views-wrapper .fpd-view-prev, .fpd-views-wrapper .fpd-view-next",function(){$(this).hasClass("fpd-view-prev")?f.selectView(f.currentViewIndex-1):f.selectView(f.currentViewIndex+1)});var e,n=!1;p.on("mousedown touchdown",".fpd-grid .fpd-item:not(.fpd-category):not(.fpd-loading)",function(t){f.mainOptions.dragDropImagesToUploadZones&&1==t.which&&(e=$(this),n=!1,d=$('<div class="fpd-dragged-image fpd-hidden"><picture></picture></div>'),FPDUtil.loadGridImage(d.children("picture"),e.data("thumbnail")?e.data("thumbnail"):e.data("source")),p.append(d),$(".fpd-thumbnail-preview").remove())}).on("mousemove",function(t){n=!0,d&&(t.pageX+10+d.outerWidth()>h.width()?(h.width(),d.outerWidth()):t.pageX,d.css({left:t.pageX-.5*d.width(),top:t.pageY-.5*d.height()}),p.children(".fpd-dragged-image").removeClass("fpd-hidden"),setTimeout(function(){d&&d.addClass("fpd-animate")},1),t.stopPropagation(),t.preventDefault())}).on("mouseup",function(t){!f._loadingCustomImage&&n&&d&&f.mouseOverCanvas&&f._addGridItemToStage(e,f.mouseOverCanvas.uploadZone?{_addToUZ:f.mouseOverCanvas.title}:{}),p.children(".fpd-dragged-image").remove(),d=null}),k()},k=function(){f.mainOptions.watermark&&3<f.mainOptions.watermark.length&&fabric.Image.fromURL(f.mainOptions.watermark,function(t){f.watermarkImg=t},{crossOrigin:"anonymous"}),f.mainOptions.unsavedProductAlert&&(window.onbeforeunload=function(){if(f.doUnsavedAlert)return""});var n,i,t,e=!1;p.on("click",".fpd-modal-close",function(t){var e=$(this),n=e.parents(".fpd-modal-overlay:first");e.parents(".fpd-modal-product-designer:first").length&&p.addClass("fpd-modal-mode-active"),n.fadeOut(200,function(){e.removeClass("fpd-fullscreen"),n.hasClass("fpd-modal-product-designer")||n.trigger("modalRemove").remove(),c.trigger("modalClose")}),0<e.parents(".fpd-modal-product-designer:first").length?(p.removeClass("fpd-overflow-hidden"),f.deselectElement()):0==p.find(".fpd-modal-product-designer").length&&p.removeClass("fpd-overflow-hidden")}).on("mouseup touchend",function(t){t=$(t.target);0===t.closest('.fpd-container, [class^="fpd-element-toolbar"], .sp-container').length&&f.mainOptions.deselectActiveOnOutside&&!e&&f.deselectElement(),0===t.closest(".fpd-container, .fpd-modal-internal").length&&f.currentViewInstance&&f.currentViewInstance.currentUploadZone&&r.is(":hidden")&&f.mainBar.toggleUploadZonePanel(!1),e=!1}).on("mouseover mouseout mousemove click",'[data-module="designs"] .fpd-item, [data-module="images"] .fpd-item, [data-module="products"] .fpd-item',function(t){var e,n=$(this),i=null;if(f.currentViewInstance&&f.currentViewInstance.currentUploadZone&&0<$(t.target).parents(".fpd-upload-zone-adds-panel").length&&((e=f.currentViewInstance.getUploadZone(f.currentViewInstance.currentUploadZone))&&e.price&&(i=e.price)),!d){if("mouseover"===t.type&&n.data("source")){if(n.parents(".mCustomScrollBox:first").next(".mCSB_scrollTools_onDrag").length)return;m=$('<div class="fpd-thumbnail-preview"><picture></picture></div>'),FPDUtil.loadGridImage(m.children("picture"),n.children("picture").data("img")),0<n.parents('[data-module="images"]:first').length&&null===i?isNaN(n.data("price"))?f.currentViewInstance&&f.currentViewInstance.options.customImageParameters.price&&(i=f.currentViewInstance.options.customImageParameters.price):i=n.data("price"):(n.data("title")&&(m.addClass("fpd-title-enabled"),m.append('<div class="fpd-preview-title">'+n.data("title")+"</div>")),n.data("parameters")&&n.data("parameters").price&&null===i&&(i=n.data("parameters").price)),i&&m.append('<div class="fpd-preview-price">'+f.formatPrice(i)+"</div>"),n.children(".fpd-image-quality-ratings").length&&(i=n.children(".fpd-image-quality-ratings").clone(),m.append(i),n.children(".fpd-image-quality-ratings").data("quality-label")&&i.append('<span class="fpd-image-quality-rating-label">'+n.children(".fpd-image-quality-ratings").data("quality-label")+"</span>")),p.append(m)}null!==m&&("mousemove"===t.type||"mouseover"===t.type?(n=t.pageX+10+m.outerWidth()>h.width()?h.width()-m.outerWidth():t.pageX+10,m.css({left:n,top:t.pageY+10})):"mouseout"!==t.type&&"click"!=t.type||(m.siblings(".fpd-thumbnail-preview").remove(),m.remove()))}}).on("mousedown",function(t){t=$(t.target);e=!(!t.is("textarea")||!t.data("control"))}).on("click",".fpd-gt-close",function(){FPDUtil.localStorageAvailable()&&window.localStorage.setItem("fpd-gt-closed","yes"),$(this).parent(".fpd-gt-step").remove()}).on("click",".fpd-gt-next, .fpd-gt-back",function(){f.selectGuidedTourStep($(this).data("target"))}),f.$container.on("productCreate modalDesignerOpen layoutElementsAdded",function(t,e){var n,i,o;function r(t){var e,n=f.viewInstances[t.viewIndex];n?(e=t.element,f._prevPrintingBoxes[t.viewIndex]&&(t=f._prevPrintingBoxes[t.viewIndex],"object"==typeof e.boundingBox&&FPDUtil.objectHasKeys(n.options.printingBox,["left","top","width","height"])&&JSON.stringify(t)===JSON.stringify(e.boundingBox)&&(e.boundingBox=n.options.printingBox)),n.addElement(FPDUtil.getType(e.type),e.source,e.title,n.getElementJSON(e))):a()}function a(){++o<i.length?r(i[o]):c.off("elementAdd",a)}(b||f.mainOptions.modalMode)&&(b||"modalDesignerOpen"!==t.type)||(f.mainOptions.autoOpenInfo&&f.$container.find('[data-action="info"]').click(),f.mainOptions.guidedTour&&0<Object.keys(f.mainOptions.guidedTour).length&&(n=Object.keys(f.mainOptions.guidedTour)[0],FPDUtil.localStorageAvailable()&&"yes"===window.localStorage.getItem("fpd-gt-closed")||f.selectGuidedTourStep(n))),-1!=["productCreate","layoutElementsAdded"].indexOf(t.type)&&(0<f.globalCustomElements.length||0<f.fixedElements.length)&&(i=f.globalCustomElements.concat(f.fixedElements),o=0,c.on("elementAdd",a),r(i[0])),b=f.mainOptions.modalMode&&"modalDesignerOpen"===t.type}).on("viewSelect",function(t,e,n){n.options,$('[data-module="designs"] .fpd-item, [data-module="images"] .fpd-item');$('[data-module="designs"] .fpd-item, [data-module="images"] .fpd-item').each(function(){FPDUtil.setItemPrice($(this),f)}),f.$viewSelectionWrapper.children(".fpd-view-prev, fpd-view-next").toggleClass("fpd-hidden",f.viewInstances.length<=1),f.$viewSelectionWrapper.find(".fpd-view-prev").toggleClass("fpd-disabled",0===e),f.$viewSelectionWrapper.find(".fpd-view-next").toggleClass("fpd-disabled",e===f.viewInstances.length-1)}).on("secondaryModuleCalled",function(t,e,n){FPDUtil.setItemPrice(n.find(".fpd-item"),f)}),f.$mainWrapper.on("click",".fpd-modal-lock > .fpd-toggle-lock",function(){$(this).parents(".fpd-modal-lock:first").toggleClass("fpd-unlocked"),f.currentViewInstance.toggleLock(!f.currentViewInstance.locked)}),f.mainOptions.productsJSON?"object"==typeof f.mainOptions.productsJSON?f.setupProducts(f.mainOptions.productsJSON):$.getJSON(f.mainOptions.productsJSON).done(function(t){f.setupProducts(t)}).fail(function(){FPDUtil.showModal("Products JSON could not be loaded. Please check that your URL is correct!<br>URL: <i>"+f.mainOptions.productsJSON+"</i>")}):F(o),f.mainOptions.designsJSON?"object"==typeof f.mainOptions.designsJSON?f.setupDesigns(f.mainOptions.designsJSON):$.getJSON(f.mainOptions.designsJSON).done(function(t){f.setupDesigns(t)}).fail(function(){FPDUtil.showModal("Designs JSON could not be loaded. Please check that your URL is correct!<br>URL: <i>"+f.mainOptions.designsJSON+"</i>")}):I(s),"undefined"!=typeof Hammer&&"none"!=f.mainOptions.mobileGesturesBehaviour&&((t=new Hammer.Manager($(".fpd-product-stage").get(0))).add(new Hammer.Pan({threshold:0,pointers:2})),t.add(new Hammer.Pinch({threshold:0})).recognizeWith([t.get("pan")]),t.on("pinchmove pinchstart",function(t){var e=f.currentElement;"pinchImageScale"==f.mainOptions.mobileGesturesBehaviour&&e&&"image"==FPDUtil.getType(e.type)&&e.resizable?"pinchstart"==t.type?(n=e.scaleX,i=e.scaleY):f.currentViewInstance.setElementParameters({scaleX:n*t.scale,scaleY:i*t.scale},e):"pinchPanCanvas"==f.mainOptions.mobileGesturesBehaviour&&f.setZoom(t.scale)}),t.on("panmove",function(t){var e,n;"pinchPanCanvas"==f.mainOptions.mobileGesturesBehaviour&&(n=e=0,2==t.direction||4==t.direction?e=2==t.direction?-1:1:8!=t.direction&&16!=t.direction||(n=8==t.direction?-1:1),e*=10*Math.abs(t.velocity),n*=10*Math.abs(t.velocity),f.currentViewInstance.stage.relativePan(new fabric.Point(e,n)))})),c.trigger("ready"),h.resize()},F=function(t){t.length&&FPDUtil.log("FPD: Creating products from HTML is deprecated, use a JSON file to store your products. Please check out the documentation!","warn");function n(t,n){for(var e=0;e<t.length;++e){var i=$(t.get(e)).children(".fpd-product");i.splice(0,0,t.get(e));var o=[];i.each(function(t,e){var n=$(e),i={title:e.title,thumbnail:n.data("thumbnail"),elements:[],options:n.data("options")};i.mask=n.data("mask")?n.data("mask"):null,0===t&&(n.data("producttitle")&&(i.productTitle=n.data("producttitle")),n.data("productthumbnail")&&(i.productThumbnail=n.data("productthumbnail"))),n.children("img,span").each(function(t,e){var n=$(e),e=n.is("img")?null==n.data("src")?n.attr("src"):n.data("src"):n.text(),n={type:n.is("img")?"image":"text",source:e,title:n.attr("title"),parameters:null==n.data("parameters")||n.data("parameters").length<=2?{}:n.data("parameters")};i.elements.push(n)}),o.push(i)}),n?(i=$.map(r,function(t,e){if(t.category==n)return e}).shift(),isNaN(i)&&(i=r.length,r.push({category:n,products:[]})),r[i].products.push(o)):r.push(o)}}var r=[];t.is(".fpd-category")&&1<t.filter(".fpd-category").length?t.each(function(t,e){e=$(e);n(e.children(".fpd-product"),e.attr("title"))}):(t=0===t.filter(".fpd-category").length?t:t.children(".fpd-product"),n(t,!1)),0<r.length&&f.setupProducts(r)},I=function(t){var e,r=function(t,o){t.each(function(t,e){var n,i=$(e),e={title:i.attr("title"),thumbnail:i.data("thumbnail")};i.data("parameters")&&(e.parameters=i.data("parameters")),(o||f.designs).push(e),0<i.children(".fpd-category").length?(e.category=[],r(i.children(".fpd-category"),e.category)):(n=[],i.children("img").each(function(t,e){e=$(e),e={source:void 0===e.data("src")?e.attr("src"):e.data("src"),title:e.attr("title"),parameters:e.data("parameters"),thumbnail:e.data("thumbnail")};n.push(e)}),e.designs=n)})};0<t.length&&(FPDUtil.log("FPD: Creating designs from HTML is deprecated, use a JSON file to store your products. Please check out the documentation!","warn"),1<t.filter(".fpd-category").length||0<t.filter(".fpd-category:first").children(".fpd-category").length?r(t.filter(".fpd-category")):((e=t).hasClass("fpd-category")&&(e=e.children("img")),e.each(function(t,e){e=$(e),e={source:void 0===e.data("src")?e.attr("src"):e.data("src"),title:e.attr("title"),parameters:e.data("parameters"),thumbnail:e.data("thumbnail")};f.designs.push(e)})),t.remove(),f.setupDesigns(f.designs))},E=function(t){if(null!==g){g.children("div").empty(),g.children("h5").text(t.title);for(var e=0;e<f.mainOptions.editorBoxParameters.length;++e){var n=f.mainOptions.editorBoxParameters[e],i=t[n];void 0!==i&&(i="object"==typeof(i="number"==typeof i?i.toFixed(2):i)&&i.source?i.source.src:i,"fill"===n&&t.type===FPDPathGroupName&&(i=t.svgFill),g.children("div").append("<p><i>"+n+'</i>: <input type="text" value="'+i+'" readonly /></p>'))}}},L=function(){if(f.viewInstances.length<f.currentViews.length)f.addView(f.currentViews[f.viewInstances.length]);else{if(c.off("viewCreate",L),f.toggleSpinner(!1),f.selectView(0),!f.mainOptions.editorMode&&f.currentViewInstance&&$(f.currentViewInstance.stage.getElement()).is(":visible"))for(var t=f.currentViewInstance.stage.getObjects(),e=null,n=0;n<t.length;++n){var i=t[n];i.autoSelect&&!i.hasUploadZone&&(e=i)}e&&f.currentViewInstance&&setTimeout(function(){f.currentViewInstance.stage.setActiveObject(e),e.setCoords(),f.currentViewInstance.stage.renderAll()},500),f.productCreated=!0,f.mainBar&&f.mainBar.__setup,f.mainBar&&(f.mainBar.__setup=!0),h.resize(),c.trigger("productCreate",[f.currentViews])}},N=function(t,e,n,i){var o=$.isArray(e)?e[n]:e;$.get(f.mainOptions.templatesDirectory+t+"."+o,i).fail(function(){$.isArray(e)&&e[n+1]?N(t,e,++n,i):alert(f.mainOptions.templatesDirectory+t+"."+o+" could not be loaded.")})};this._addGridItemToStage=function(t,e){var n,i;f.currentViewInstance&&(e=void 0===e?{}:e,n=t.parents(".fpd-module:first").data("module"),t.data("title")&&t.data("title"),"designs"==n?(i=$.extend({},t.data("parameters")?t.data("parameters"):{},e),f._addCanvasDesign(t.data("source"),t.data("title"),i)):(i=$.extend({},t.data("options")?t.data("options"):{},{_addToUZ:f.currentViewInstance.currentUploadZone},e),f._addCanvasImage(t.data("source"),t.data("title"),i,0==t.parents('[data-context="upload"]').length)))},this._addCanvasImage=function(t,e,n,i){var o;n=void 0===n?{}:n,i=void 0!==i&&i,f.currentViewInstance&&(((o=f.mainOptions.customImageAjaxSettings).data&&o.data.saveOnServer?1:0)&&i?function(t,e,n){n=void 0===n?{}:n;var i=f.mainOptions.customImageAjaxSettings,o=i.data&&i.data.uploadsDir?i.data.uploadsDir:"",r=i.data&&i.data.uploadsDirURL?i.data.uploadsDirURL:"",a=i.data&&i.data.saveOnServer?1:0;f._loadingCustomImage=!0,f.toggleSpinner(!0,f.getTranslation("misc","loading_image")),f.$viewSelectionWrapper.addClass("fpd-disabled"),(i=$.extend({},i)).success=function(t){t&&void 0===t.error?f.addCustomImage(t.image_src,t.filename||e,n):(f.toggleSpinner(!1),FPDUtil.showModal(t.error))},i.data={url:t,uploadsDir:o,uploadsDirURL:r,saveOnServer:a},$.ajax(i).fail(function(t){f._loadingCustomImage=!1,f.toggleSpinner(!1),FPDUtil.showModal(t.statusText)}),f.productCreated&&f.mainOptions.hideDialogOnAdd&&f.$container.hasClass("fpd-topbar")&&f.mainBar&&f.mainBar.toggleDialog(!1)}(t,e,n):(f._loadingCustomImage=!0,f.addCustomImage(t,e,n)),f.productCreated&&f.mainOptions.hideDialogOnAdd&&f.mainBar&&f.mainBar.toggleDialog(!1))},this._addCanvasDesign=function(t,e,n){n=void 0===n?{}:n,f.currentViewInstance&&(f.toggleSpinner(!0,f.getTranslation("misc","loading_image")),(n=$.extend({},f.currentViewInstance.options.customImageParameters,n)).isCustom=!0,f.currentViewInstance.currentUploadZone&&(n._addToUZ=f.currentViewInstance.currentUploadZone),f.addElement("image",t,e,n),f.productCreated&&f.mainOptions.hideDialogOnAdd&&f.mainBar&&f.mainBar.toggleDialog(!1))},this.addProduct=function(t,e){var n,i,i=(n=e,i=$.map(f.products,function(t,e){if(t.category==n)return e}).shift(),!isNaN(i)&&i);void 0===e?f.products.push(t):(!1===i&&(i=f.products.length,f.products[i]={category:e,products:[]}),f.products[i].products.push(t)),c.trigger("productAdd",[t,e,i])},this.selectProduct=function(t,e){f.currentCategoryIndex=void 0===e?f.currentCategoryIndex:e,n=(f.products&&f.products.length&&f.products[0].category?f.products[f.currentCategoryIndex]:f).products,(f.currentProductIndex=t)<0?currentProductIndex=0:t>n.length-1&&(f.currentProductIndex=n.length-1);var n=n[f.currentProductIndex];c.trigger("productSelect",[t,e,n]),f.loadProduct(n,f.mainOptions.replaceInitialElements)},this.loadProduct=function(t,e,n){t&&(f._prevPrintingBoxes=[],this.viewInstances.forEach(function(t){f._prevPrintingBoxes.push(FPDUtil.objectHasKeys(t.options.printingBox,["left","top","width","height"])?t.options.printingBox:null)}),e=void 0!==e&&e,n=void 0!==n&&n,r.is(":hidden")&&f.toggleSpinner(!0),f.productCreated=!1,f.colorLinkGroups={},f.globalCustomElements=[],e?f.globalCustomElements=f.getCustomElements():f.doUnsavedAlert=!1,f.fixedElements=f.getFixedElements(),f.reset(),n&&t.forEach(function(t,e){t.options=A.merge(f.mainOptions,t.options)}),f.currentViews=t,x=C=0,t.forEach(function(t,e){x+=t.elements.length}),f.$viewSelectionWrapper||(f.$viewSelectionWrapper=$('<div class="fpd-views-wrapper"><span class="fpd-view-prev"><span class="fpd-icon-forward"></span></span><div class="fpd-views-selection"></div><span class="fpd-view-next"><span class="fpd-icon-forward"></span></span></div>')),!c.hasClass("fpd-views-outside")&&!c.hasClass("fpd-device-smartphone")||f.mainOptions.modalMode?f.$mainWrapper.append(f.$viewSelectionWrapper):c.after(f.$viewSelectionWrapper),c.on("viewCreate",L),t&&f.addView(t[0]))},this.addView=function(t){var e=f.mainOptions._loadFromScript?f.mainOptions._loadFromScript+t.thumbnail:t.thumbnail;f.$viewSelectionWrapper.children(".fpd-views-selection").append('<div class="fpd-shadow-1 fpd-item fpd-tooltip" title="'+t.title+'"><picture style="background-image: url('+e+');"></picture></div>').children("div:last").click(function(t){f.selectView(f.$viewSelectionWrapper.children(".fpd-views-selection").children(".fpd-item").index($(this)))});e=$.extend(!0,{},f.mainOptions);delete e.productsJSON,delete e.designsJSON,delete e.guidedTour,delete e.fonts,delete e.pricingRules,delete e.hexNames,delete e.customImageAjaxSettings,delete e.colorPickerPalette,delete e.imageEditorSettings,delete e.mainBarModules,t.options=void 0===t.options&&"object"!=typeof t.options?e:$.extend(!0,{},A.merge(e,t.options));var l=new FancyProductDesignerView(f.$productStage,t,function(t){0!==$(t.stage.wrapperEl).parent().length?(0==f.viewInstances.length&&t.resetCanvasSize(),f.viewInstances.push(t),c.trigger("viewCreate",[t])):t.reset()},f.mainOptions.fabricCanvasOptions);l.stage.on({"object:scaling":function(t){},"object:moving":function(t){},"object:rotating":function(t){}}),$(l).on("beforeElementAdd",function(t,e,n,i,o){f.productCreated||(C++,i=i+"<br>"+String(C)+"/"+x,r.find(".fpd-loader-text").html(i))}).on("canvas:mouseUp",function(t,e){f.mainOptions.fabricCanvasOptions.allowTouchScrolling&&(c.removeClass("fpd-disable-touch-scrolling"),f.currentViewInstance.stage.allowTouchScrolling=!0)}).on("canvas:mouseMove",function(t,e,n){f.mouseOverCanvas=n.target||!0}).on("canvas:mouseOut",function(t,e){f.mouseOverCanvas=!1}).on("elementAdd",function(t,e){var n,i;e?(f.productCreated&&"image"==FPDUtil.getType(e.type)&&e.isCustom&&(f.toggleSpinner(!1),FPDUtil.showMessage(f.getTranslation("misc","image_added"))),e.colorLinkGroup&&0<e.colorLinkGroup.length&&!f.mainOptions.editorMode&&(n=this.getIndex(),f.colorLinkGroups.hasOwnProperty(e.colorLinkGroup)?(f.colorLinkGroups[e.colorLinkGroup].elements.push({id:e.id,viewIndex:n}),"object"==typeof e.colors&&(i=f.mainOptions.replaceColorsInColorGroup?e.colors:f.colorLinkGroups[e.colorLinkGroup].colors.concat(e.colors),f.colorLinkGroups[e.colorLinkGroup].colors=FPDUtil.arrayUnique(i))):(f.colorLinkGroups[e.colorLinkGroup]={elements:[{id:e.id,viewIndex:n}],colors:[]},"object"==typeof e.colors&&(f.colorLinkGroups[e.colorLinkGroup].colors=e.colors))),f.mainBar&&f.productCreated&&f.mainOptions.hideDialogOnAdd&&f.mainBar.toggleDialog(!1),c.trigger("elementAdd",[e]),c.trigger("viewCanvasUpdate",[l])):f.toggleSpinner(!1)}).on("boundingBoxToggle",function(t,e,n){c.trigger("boundingBoxToggle",[e,n])}).on("elementSelect",function(t,e){(f.currentElement=e)?S():(f.$elementTooltip&&f.$elementTooltip.hide(),f.$mainWrapper.children(".fpd-snap-line-h, .fpd-snap-line-v").hide()),c.trigger("elementSelect",[e])}).on("elementChange",function(t,e,n){S(),E(n.getBoundingRect()),c.trigger("elementChange",[e,n])}).on("elementModify",function(t,e,n){S(),c.trigger("elementModify",[e,n]),c.trigger("viewCanvasUpdate",[l])}).on("undoRedoSet",function(t,e,n){f.doUnsavedAlert=!0,D(e,n),c.trigger("undoRedoSet",[e,n])}).on("priceChange",function(t,e,n){var i=f.calculatePrice();c.trigger("priceChange",[e,i,f.singleProductPrice])}).on("elementCheckContainemt",function(t,e,n){"inside"===n&&S()}).on("elementColorChange",function(t,e,n,i){if(f.productCreated&&i&&e.colorLinkGroup&&0<e.colorLinkGroup.length){var o=f.colorLinkGroups[e.colorLinkGroup];if(o&&o.elements)for(var r=0;r<o.elements.length;++r){var a=o.elements[r].id,s=o.elements[r].viewIndex,a=f.getElementByID(a,s);a&&a!==e&&n&&f.viewInstances[s].changeColor(a,n,!1)}}c.trigger("elementColorChange",[e,n,i]),c.trigger("viewCanvasUpdate",[l])}).on("elementRemove",function(t,e){var n=f.fixedElements.findIndex(function(t){return t.element.title==e.title});-1!=n&&f.fixedElements.splice(n,1),c.trigger("elementRemove",[e]),c.trigger("viewCanvasUpdate",[l])}).on("fabricObject:added fabricObject:removed",function(t,e){c.trigger(t.type,[e])}).on("textEditEnter",function(){f.currentElement&&f.toolbar.updatePosition(f.currentElement)}),l.setup(),FPDUtil.updateTooltip(),1<f.$viewSelectionWrapper.children(".fpd-views-selection").children().length?f.$viewSelectionWrapper.show():f.$viewSelectionWrapper.hide()},this.selectView=function(t){if(!(f.viewInstances.length<=0)){if(f.resetZoom(),(f.currentViewIndex=t)<0?f.currentViewIndex=0:t>f.viewInstances.length-1&&(f.currentViewIndex=f.viewInstances.length-1),f.$viewSelectionWrapper.children(".fpd-views-selection").children("div").removeClass("fpd-view-active").eq(t).addClass("fpd-view-active"),f.$mainWrapper.children(".fpd-ruler").remove(),f.currentViewInstance){f.currentViewInstance.undos=[],f.currentViewInstance.redos=[];for(var e=["_snap_lines_group","_ruler_hor","_ruler_ver"],n=0;n<e.length;++n){var i=f.currentViewInstance.getElementByID(e[n]);i&&f.currentViewInstance.stage.remove(i)}f.currentViewInstance._snapElements=!1}var o;f.currentViewInstance=f.viewInstances[f.currentViewIndex],f.deselectElement(),f.$productStage.children(".fpd-view-stage").addClass("fpd-hidden").eq(f.currentViewIndex).removeClass("fpd-hidden"),f.currentViewInstance.stage.renderAll(),l&&l.find(".fpd-navigation").length&&(o=f.currentViewInstance.options,(t=l.find(".fpd-navigation")).children('[data-module="designs"]').toggleClass("fpd-disabled",!o.customAdds.designs),t.children('[data-module="images"]').toggleClass("fpd-disabled",!o.customAdds.uploads),t.children('[data-module="text"]').toggleClass("fpd-disabled",!o.customAdds.texts),"undefined"!=typeof FPDNamesNumbersModule&&t.children('[data-module="names-numbers"]').toggleClass("fpd-disabled",!f.currentViewInstance.textPlaceholder&&!f.currentViewInstance.numberPlaceholder),t.children('[data-module="drawing"]').toggleClass("fpd-disabled",!o.customAdds.drawing),c.hasClass("fpd-device-desktop")&&(c.hasClass("fpd-sidebar")?0===t.children(".fpd-active").length||t.children(".fpd-active").hasClass("fpd-disabled")?0<t.children(":not(.fpd-disabled)").length?t.children(":not(.fpd-disabled)").first().click():f.mainBar.$content.children(".fpd-module").removeClass("fpd-active"):0==f.mainBar.$content.children(".fpd-active").length&&f.productCreated&&t.children(":first").click():c.hasClass("fpd-topbar")&&t.children(".fpd-active").hasClass("fpd-disabled")&&f.mainBar.toggleDialog(!1)),f.$container.hasClass("fpd-products-module-hidden")&&0<t.children(".fpd-active").filter('[data-module="products"]').length&&t.children(":not(.fpd-disabled)").eq(1).click()),f.mainBar&&f.mainBar.$content&&0<f.$container.filter('[class*="fpd-off-canvas-"]').length&&f.mainBar.$content.height(f.$mainWrapper.height()),D(f.currentViewInstance.undos,f.currentViewInstance.redos),f.$mainWrapper.children(".fpd-modal-lock").removeClass("fpd-animated").toggleClass("fpd-active",f.currentViewInstance.options.optionalView).toggleClass("fpd-unlocked",!f.currentViewInstance.locked),setTimeout(function(){f.$mainWrapper.children(".fpd-modal-lock").addClass("fpd-animated")},1),f.$productStage.width(f.currentViewInstance.options.stageWidth),f.currentViewInstance.resetCanvasSize(),f.currentViewInstance.resetCanvasSize(),c.trigger("viewSelect",[f.currentViewIndex,f.currentViewInstance])}},this.addElement=function(t,e,n,i,o){if(i=void 0===i?{}:i,o=void 0===o?f.currentViewIndex:o,f.viewInstances[o].addElement(t,e,n,i),i.replace&&i.replaceInAllViews)for(var r=0;r<f.viewInstances.length;++r){var a=f.viewInstances[r];o!==r&&null!==a.getElementByReplace(i.replace)&&a.addElement(t,e,n,i,r)}},this.setElementParameters=function(t,e,n){if(e=void 0===e?f.stage.getActiveObject():e,n=void 0===n?f.currentViewIndex:n,!e||void 0===t)return!1;f.viewInstances[n].setElementParameters(t,e)},this.reset=function(){null!==f.currentViews&&(c.off("viewCreate",L),f.deselectElement(),f.resetZoom(),f.currentViewIndex=f.currentPrice=f.singleProductPrice=f.pricingRulesPrice=0,f.currentViewInstance=f.currentViews=f.currentElement=null,f.viewInstances.forEach(function(t){t.stage.clear()}),f.$mainWrapper.find(".fpd-view-stage").remove(),p.find(".fpd-views-selection").children().remove(),f.viewInstances=[],c.trigger("clear"),c.trigger("priceChange",[0,0,0]),e=!0)},this.deselectElement=function(){f.currentViewInstance&&f.currentViewInstance.deselectElement()},this.getProductDataURL=function(i,t,o,e){var r,a,s,l,c;i=void 0===i?function(){}:i,t=void 0===t?"transparent":t,(o=void 0===o?{}:o).onlyExportable=void 0!==o.onlyExportable&&o.onlyExportable,o.enableRetinaScaling=void 0!==o.enableRetinaScaling&&o.enableRetinaScaling,e=void 0===e?[]:e,0!==f.viewInstances.length?(f.resetZoom(),p.append('<canvas id="fpd-hidden-canvas"></canvas>'),r=fabric.devicePixelRatio,a=new fabric.Canvas("fpd-hidden-canvas",{containerClass:"fpd-hidden fpd-hidden-canvas",enableRetinaScaling:!1}),s=0,l=o.multiplier||1,e=(c=2==e.length?f.viewInstances.slice(e[0],e[1]):f.viewInstances)[0],a.setDimensions({width:e.options.stageWidth*l,height:e.options.stageHeight*l}),function e(n){fabric.devicePixelRatio=1,n.toDataURL(function(t){fabric.Image.fromURL(t,function(t){a.add(t),0<s&&(t.set("top",a.getHeight()),a.setDimensions({height:a.getHeight()+n.options.stageHeight*l})),++s<c.length?e(c[s]):(delete o.multiplier,setTimeout(function(){i(a.toDataURL(o)),fabric.devicePixelRatio=r,a.dispose(),p.children("#fpd-hidden-canvas").remove(),f.currentViewInstance&&f.currentViewInstance.resetCanvasSize()},100))},{crossOrigin:"anonymous"})},t,o,f.watermarkImg),n.options.stageWidth*l>a.getWidth()&&a.setDimensions({width:n.options.stageWidth*l})}(e)):i("")},this.getViewsDataURL=function(e,t,n){e=void 0===e?function(){}:e,t=void 0===t?"transparent":t,n="undefined"===n?{}:n;var i=[];f.resetZoom();for(var o=0;o<f.viewInstances.length;++o)f.viewInstances[o].toDataURL(function(t){i.push(t),i.length===f.viewInstances.length&&e(i)},t,n,f.watermarkImg)},this.getViewsSVG=function(t,e,n){for(var i=[],o=0;o<f.viewInstances.length;++o)i.push(f.viewInstances[o].toSVG(t,e,n,null,this.getUsedFonts()));return i},this.toggleSpinner=function(t,e){return e=void 0===e?"":e,(t=void 0===t||t)?r.fadeIn(300).find(".fpd-loader-text").html(e):r.stop().fadeOut(300),r},this.getElementByTitle=function(e,t){var n=!1;return this.getElements(t,"all",!1).some(function(t){if(t.title==e)return n=t,!0}),n},this.getElements=function(t,e,n){t=void 0===t||isNaN(t)?-1:t,e=void 0===e?"all":e,(n=void 0===n||n)&&this.deselectElement();var i=[];if(-1===t)for(var o=0;o<f.viewInstances.length;++o)i=i.concat(f.viewInstances[o].stage.getObjects());else{if(!f.viewInstances[t])return[];i=f.viewInstances[t].stage.getObjects()}if(i=i.filter(function(t){return!t._ignore}),"text"===e){var r=[];return i.forEach(function(t){"text"===FPDUtil.getType(t.type)&&r.push(t)}),r}if("image"!==e)return i;var a=[];return i.forEach(function(t){"image"===FPDUtil.getType(t.type)&&a.push(t)}),a},this.print=function(){f.getViewsDataURL(function(n){for(var i=[],o=0,t=0;t<n.length;++t){var e=new Image;e.src=n[t],e.onload=function(){if(i.push(this),++o==n.length){var t=window.open("","","width="+i[0].width+",height="+i[0].height*n.length+",location=no,menubar=no,scrollbars=yes,status=no,toolbar=no");FPDUtil.popupBlockerAlert(t,f),t.document.title="Print Image";for(var e=0;e<i.length;++e)$(t.document.body).append('<img src="'+i[e].src+'" />');setTimeout(function(){t.print()},1e3)}}}})},this.createImage=function(n,i,t,e,o){n=void 0===n||n,i=void 0!==i&&i,t=void 0===t?"transparent":t,o=void 0!==o&&o;function r(t){var e=new Image;e.src=t,e.onload=function(){var t;n&&(t=window.open("","_blank"),FPDUtil.popupBlockerAlert(t,f),t.document.title="Product Image",$(t.document.body).append('<img src="'+this.src+'" download="product.'+a+'" />'),i&&(window.location.href=t.document.getElementsByTagName("img")[0].src.replace("image/"+a,"image/octet-stream")))}}var a=void 0===(e=void 0===e?{}:e).format?"png":e.format;o?f.currentViewInstance.toDataURL(r,t,e):f.getProductDataURL(r,t,e)},this.setZoom=function(t){var e,n;y||(v=!1,this.deselectElement(),f.currentViewInstance&&(e=f.currentViewInstance.responsiveScale,n=new fabric.Point(.5*f.currentViewInstance.stage.getWidth(),.5*f.currentViewInstance.stage.getHeight()),f.currentViewInstance.stage.zoomToPoint(n,t*e),1==t&&f.resetZoom()))},this.resetZoom=function(){var t;v=!0,this.deselectElement(),f.currentViewInstance&&(t=f.currentViewInstance.responsiveScale,f.currentViewInstance.stage.zoomToPoint(new fabric.Point(0,0),t),f.currentViewInstance.stage.absolutePan(new fabric.Point(0,0)))},this.getElementByID=function(t,e){return e=void 0===e?f.currentViewIndex:e,f.viewInstances[e]?f.viewInstances[e].getElementByID(t):null},this.getProduct=function(t,e){t=void 0!==t&&t,e=void 0!==e&&e;var n="all"==f.mainOptions.customizationRequiredRule?"every":"some",i=f.viewInstances[n](function(t){return t.isCustomized});if(e&&!i)return FPDUtil.showMessage(f.getTranslation("misc","customization_required_info")),!1;this.deselectElement(),this.resetZoom(),f.doUnsavedAlert=!1;var o=this.getElements(),r=[];if(o.forEach(function(t){t.isOut&&"inside"===t.boundingBoxMode&&!t.__editorMode&&(FPDUtil.showMessage(t.title+": "+f.getTranslation("misc","out_of_bounding_box")),r=!1)}),!1===r)return!1;for(var a=0;a<f.viewInstances.length;++a){for(var s=f.viewInstances[a],l=s.getOptions(),o=f.viewInstances[a].stage.getObjects(),c=[],u=0;u<o.length;++u){var d,h,p=o[u];void 0!==p.title&&void 0!==p.source&&(d={title:p.title,source:p.source,parameters:f.viewInstances[a].getElementJSON(p),type:FPDUtil.getType(p.type)},l.printingBox&&l.printingBox.hasOwnProperty("left")&&l.printingBox.hasOwnProperty("top")&&(h=p.getPointByOrigin("left","top"),new fabric.Point(l.printingBox.left,l.printingBox.top),new fabric.Point(l.printingBox.left+l.printingBox.width,l.printingBox.top+l.printingBox.height),d.printingBoxCoords={left:h.x-l.printingBox.left,top:h.y-l.printingBox.top}),t&&!p.isEditable||c.push(d))}s={title:s.title,thumbnail:s.thumbnail,elements:c,options:l,names_numbers:s.names_numbers,mask:s.mask,locked:s.locked};0==a&&f.currentViews[0].hasOwnProperty("productTitle")&&(s.productTitle=f.currentViews[0].productTitle),r.push(s)}return r},this.getTranslation=function(t,e,n){return n=void 0===n?"":n,f.langJson&&(t=f.langJson[t])&&t[e]||n},this.getCustomElements=function(t,e,n){var n=this.getElements(e,t,n),i=[];return n.forEach(function(t){var e;t.isCustom&&(e=f.$productStage.children(".fpd-view-stage").index(t.canvas.wrapperEl),i.push({element:t,viewIndex:e}))}),i},this.getFixedElements=function(t,e,n){var n=this.getElements(e,t,n),i=[];return n.forEach(function(t){var e;t.fixed&&(e=f.$productStage.children(".fpd-view-stage").index(t.canvas.wrapperEl),i.push({element:t,viewIndex:e}))}),i},this.addCustomImage=function(o,r,a){a=void 0===a?{}:a;var t=new Image;t.crossOrigin="anonymous",t.src=o,this.toggleSpinner(!0,f.getTranslation("misc","loading_image")),f.$viewSelectionWrapper.addClass("fpd-disabled"),t.onload=function(){f._loadingCustomImage=!1;var t=this.height,e=this.width,n=f.currentViewInstance.options.customImageParameters,i=this.src.split(".");if(!FPDUtil.checkImageDimensions(f,e,t))return f.toggleSpinner(!1),!1;t={isCustom:!0};-1==$.inArray("svg",i)||n.colors||(t.colors=!0),f.addElement("image",o,r,$.extend({},n,t,a)),f.$viewSelectionWrapper.removeClass("fpd-disabled")},t.onerror=function(t){FPDUtil.showModal("Image could not be loaded!")}},this.setDimensions=function(e,n,i){var t=[];-1==(i=void 0===i?-1:i)?(f.mainOptions.stageWidth=e,f.mainOptions.stageHeight=n,t=f.viewInstances):t.push(f.viewInstances[i]),i!=f.currentViewIndex&&-1!=i||f.$container.find(".fpd-product-stage").width(e),t.forEach(function(t){t.options.stageWidth=e,t.options.stageHeight=n,i==f.currentViewIndex&&t.resetCanvasSize()}),(i==f.currentViewIndex||-1==i)&&f.mainBar&&f.mainBar.$content&&0<f.$container.filter('[class*="fpd-off-canvas-"]').length&&f.mainBar.$content.height(f.$mainWrapper.height())},this.setOrderQuantity=function(t){t=""==t||t<0?1:t,f.orderQuantity=t;t=f.calculatePrice();c.trigger("priceChange",[null,t,f.singleProductPrice])},this.getOrder=function(t){return t=void 0===t?{}:t,f._order.product=f.getProduct(t.onlyEditableElements||!1,t.customizationRequired||!1),f._order.usedFonts=f.getUsedFonts(),f._order.usedColors=[],f.getUsedColors().forEach(function(t){var e=f.mainOptions.hexNames[t.replace("#","").toLowerCase()],t={hex:t};e&&(t.name=e),f._order.usedColors.push(t)}),f._order.usedDepositPhotos=f.getDepositPhotos(),c.trigger("getOrder"),f._order},this.getUsedFonts=function(){var i=[],o=[];return this.getElements(-1,"all",!1).forEach(function(e){var t,n;"text"===FPDUtil.getType(e.type)&&-1===i.indexOf(e.fontFamily)&&(t={name:e.fontFamily},0<(n=$.grep(f.mainOptions.fonts,function(t){return t.name==e.fontFamily})).length&&n[0].url&&(t.url=n[0].url),i.push(e.fontFamily),o.push(t))}),o},this.getUsedColors=function(t){var n=[];return this.getElements(t,"all",!1).forEach(function(t){var e=FPDUtil.elementIsColorizable(t);e&&("svg"===e&&t.type===FPDPathGroupName?t.getObjects().forEach(function(t){FPDUtil.isHex(t.fill)&&n.push(t.fill)}):FPDUtil.isHex(t.fill)&&n.push(t.fill))}),FPDUtil.arrayUnique(n)},this.calculatePrice=function(t){t=void 0===t||t,function(){for(var t=f.currentPrice=f.singleProductPrice=0;t<f.viewInstances.length;++t)f.viewInstances[t].locked||(f.singleProductPrice+=f.viewInstances[t].truePrice)}();var e=f.singleProductPrice;return f.currentPrice=e,e+=f.pricingRulesPrice,t&&(e*=f.orderQuantity),e%1!=0&&(e=Number(e.toFixed(2))),e},this.removeView=function(t){t=void 0===t?0:t;var e=f.$productStage.children(".fpd-view-stage").eq(t);f.$viewSelectionWrapper.find(".fpd-item").eq(t).remove(),e.remove(),f.viewInstances.splice(t,1),0<f.viewInstances.length&&(t==f.currentViewIndex?f.selectView(0):f.selectView(t)),c.trigger("viewRemove",[t]);t=f.calculatePrice();c.trigger("priceChange",[null,t,f.singleProductPrice])},this.formatPrice=function(t){if("object"!=typeof f.mainOptions.priceFormat)return t=f.mainOptions.priceFormat.replace("%d",t);var e=f.mainOptions.priceFormat.thousandSep,n=f.mainOptions.priceFormat.decimalSep,t=t.toString().split("."),i=t[0],t=t[1],o="";if(void 0!==i){for(var r=i.length-1;0<=r;r--)o+=i.charAt(r);(o=o.replace(/(\d{3})/g,"$1"+e)).slice(-e.length)==e&&(o=o.slice(0,-e.length)),i="";for(r=o.length-1;0<=r;r--)i+=o.charAt(r);void 0!==t&&0<t.length&&(1==t.length&&(t+="0"),i+=n+t)}return i=f.mainOptions.priceFormat.currency.replace("%d",i.toString())},this.translateElement=function(t){var e,n,i="";return f.langJson?(e=(void 0!==t.attr("placeholder")?t.attr("placeholder"):void 0!==t.attr("title")?t.attr("title"):void 0!==t.data("title")?t.data("title"):t.text()).split("."),(n=f.langJson[e[0]])&&void 0!==(i=n[e[1]])||(i=t.data("defaulttext")),f.languageJSON[e[0]][e[1]]=i):i=t.data("defaulttext"),void 0!==t.attr("placeholder")?t.attr("placeholder",i).text(""):void 0!==t.attr("title")?t.attr("title",i):void 0!==t.data("title")?t.data("title",i):t.text(i),i},this.selectGuidedTourStep=function(t){p.children(".fpd-gt-step").remove();var e,n,i=Object.keys(f.mainOptions.guidedTour).indexOf(t),o=t.split(":"),r=null;"module"===o[0]?r=l.find(".fpd-navigation").children('[data-module="'+o[1]+'"]'):"action"===o[0]?r=$('.fpd-action-btn[data-action="'+o[1]+'"]'):1===o.length&&(r=$(o[0])),r&&(0!==r.length?(e=p.append('<div class="fpd-container fpd-gt-step"><div class="fpd-gt-pointer"><span class="fpd-icon-arrow-dropdown"></span></div><div class="fpd-gt-close"><span class="fpd-icon-close"></span></div><div class="fpd-gt-text">'+f.mainOptions.guidedTour[t]+'</div><div class="fpd-gt-actions fpd-clearfix"><div class="fpd-gt-next fpd-btn fpd-primary">'+f.getTranslation("misc","guided_tour_next")+'</div><div class="fpd-gt-back fpd-btn fpd-primary">'+f.getTranslation("misc","guided_tour_back")+'</div><span class="fpd-gt-counter">'+String(i+1)+"/"+Object.keys(f.mainOptions.guidedTour).length+"</span></div></div>").children(".fpd-gt-step"),n=r.offset(),o=.5*r.outerWidth(),(t=n.left+o)<24&&(t=24),e.css({left:t,top:n.top+r.outerHeight()+0}),e.outerWidth()+t>window.innerWidth&&(o=window.innerWidth-(e.outerWidth()+t),e.css("left",t+o).children(".fpd-gt-pointer").css("margin-left",Math.abs(o))),Object.keys(f.mainOptions.guidedTour)[i-1]?e.find(".fpd-gt-back").data("target",Object.keys(f.mainOptions.guidedTour)[i-1]):e.find(".fpd-gt-back").hide(),Object.keys(f.mainOptions.guidedTour)[i+1]?e.find(".fpd-gt-next").data("target",Object.keys(f.mainOptions.guidedTour)[i+1]):e.find(".fpd-gt-next").hide()):Object.keys(f.mainOptions.guidedTour)[i+1]&&f.selectGuidedTourStep(Object.keys(f.mainOptions.guidedTour)[i+1]))},this.setupProducts=function(t){t=void 0===t?[]:t,this.products=[],t.forEach(function(e){e.hasOwnProperty("category")?e.products.forEach(function(t){f.addProduct(t,e.category)}):f.addProduct(e)}),f.mainOptions.loadFirstProductInStage&&0<t.length&&!e?f.selectProduct(0):f.toggleSpinner(!1),c.trigger("productsSet",[f.products])},this.setupDesigns=function(t){f.designs=t,c.trigger("designsSet",[f.designs])},this.toggleResponsive=function(n){return n=void 0===n?c.hasClass("fpd-not-responsive"):n,c.toggleClass("fpd-not-responsive",!n),this.viewInstances.forEach(function(t,e){t.options.responsive=n,e==f.currentViewIndex&&t.resetCanvasSize()}),n},this.getDepositPhotos=function(){var e=[];return this.getElements(-1,"image").forEach(function(t){t.source&&t.depositphotos&&e.push({depositphotos:t.depositphotos,source:t.source})}),e},this.getDepositPhotosPurchaseMedia=function(n,i,t,e,o,r,a){o=void 0===o?"s":o,r=void 0===r?"standard":r,a=void 0===a?"credits":a;e={dp_apikey:f.mainOptions.depositphotosApiKey,dp_command:"login",dp_login_user:t,dp_login_password:e};$.getJSON(location.protocol+"//api.depositphotos.com?"+$.param(e),function(t){var e;t.error?(n(t),alert(t.error.errormsg)):t.sessionid?(e={dp_apikey:f.mainOptions.depositphotosApiKey,dp_command:"getMedia",dp_session_id:t.sessionid,dp_media_id:i,dp_media_option:o,dp_media_license:r,dp_purchase_currency:a,dp_force_purchase_method:a},$.getJSON(location.protocol+"//api.depositphotos.com?"+$.param(e),function(t){n(t),t.error&&alert(t.error.errormsg)})):(n(t),alert("No Sessions ID!"))})},this.loadFonts=function(t,i){var o,r,a,n,s;t&&0<t.length&&"object"==typeof t[0]?(o=[],r=[],(a=0)==f.$container.prevAll("#fpd-custom-fonts").length?(n=$('<style type="text/css" id="fpd-custom-fonts"></style>'),f.$container.before(n)):n=f.$container.prevAll("#fpd-custom-fonts:first").empty(),t.forEach(function(t){var e;t.hasOwnProperty("url")&&("google"==t.url?o.push(t.name+":400,400i,700,700i"):(e=t.name,e+=":n4",t.variants&&(e+=","+Object.keys(t.variants).toString()),r.push(e),n.append(FPDUtil.parseFontsToEmbed(t,f.mainOptions._loadFromScript))))}),s=function(t,e,n){"inactive"==t&&FPDUtil.log(e+" font could not be loaded.","warn"),a==o.length+r.length-1&&i(),a++},t={fontactive:function(t,e){s("active",t)},fontinactive:function(t,e){s("inactive",t)},timeout:3e3},0<o.length&&(t.google={families:o}),0<r.length&&(t.custom={families:r}),"undefined"!=typeof WebFont&&(0<o.length||0<r.length)?WebFont.load(t):i()):i()},this.getPrintOrderData=function(){for(var e={used_fonts:f.getUsedFonts(),svg_data:[],custom_images:[]},t=0;t<f.viewInstances.length;++t)e.svg_data.push({svg:f.viewInstances[t].toSVG({},null,!0),output:f.viewInstances[t].options.output});return f.getCustomElements("image").forEach(function(t){e.custom_images.push(t.element.source)}),e},function(){var r,a;$.expr[":"].containsCaseInsensitive=$.expr.createPseudo(function(e){return function(t){return 0<=$(t).text().toUpperCase().indexOf(e.toUpperCase())}}),c=i instanceof jQuery?i:$(i),f.$modalContainer=f.mainOptions.openModalInDesigner?c:$("body"),c.removeClass("fpd-module-visible fpd-ui-theme-doyle"),w=c.attr("class")?c.attr("class"):"",f.mainOptions.mainBarContainer=!1===f.mainOptions.modalMode&&f.mainOptions.mainBarContainer,f.mainOptions.mainBarContainer&&c.removeClass("fpd-sidebar").addClass("fpd-topbar"),f.mainOptions.fabricCanvasOptions.allowTouchScrolling||c.addClass("fpd-disable-touch-scrolling"),c.addClass("fpd-device-"+FPDUtil.getDeviceByScreenSize()),c.addClass("fpd-ui-theme-"+f.mainOptions.uiTheme),"doyle"==f.mainOptions.uiTheme&&c.removeClass("fpd-topbar fpd-tabs-top").addClass("fpd-sidebar fpd-tabs-side"),f.$container=c.data("instance",f),o=(0<c.children(".fpd-category").length?c.children(".fpd-category"):c.children(".fpd-product")).remove(),s=0<c.find(".fpd-design > .fpd-category").length?c.find(".fpd-design > .fpd-category"):c.find(".fpd-design > img"),c.children(".fpd-design").remove(),f.mainOptions.modalMode&&(c.removeClass("fpd-hidden"),p.addClass("fpd-modal-mode-active"),r=c.wrap('<div class="fpd-modal-product-designer fpd-modal-overlay fpd-fullscreen"><div class="fpd-modal-wrapper"></div></div>').parents(".fpd-modal-overlay:first"),a=!1,r.children().append('<div class="fpd-done fpd-btn" data-defaulttext="Done">misc.modal_done</div><div class="fpd-modal-close"><span class="fpd-icon-close"></span></div>'),r.addClass("fpd-ui-theme-"+f.mainOptions.uiTheme),$(f.mainOptions.modalMode).addClass("fpd-modal-mode-btn").click(function(t){t.preventDefault(),p.addClass("fpd-overflow-hidden").removeClass("fpd-modal-mode-active"),r.addClass("fpd-fullscreen").fadeIn(300),f.currentViewInstance&&(f.currentViewInstance.resetCanvasSize(),f.resetZoom());t=l.children(".fpd-navigation").children(".fpd-active");0<t.length&&f.mainBar.callModule(t.data("module"));var e=null;if(!a&&!f.mainOptions.editorMode&&f.currentViewInstance)for(var n=f.currentViewInstance.stage.getObjects(),i=0;i<n.length;++i){var o=n[i];o.autoSelect&&!o.hasUploadZone&&(e=o)}setTimeout(function(){e&&(f.currentViewInstance.stage.setActiveObject(e),f.currentViewInstance.stage.renderAll())},300),a=!0,f.$container.trigger("modalDesignerOpen")}),r.find(".fpd-done").click(function(){r.find(".fpd-modal-close").click(),f.$container.trigger("modalDesignerClose")}));var t=document.createElement("canvas"),e=Boolean(t.getContext&&t.getContext("2d")),t=f.mainOptions.templatesDirectory?9:8;if(!e||FPDUtil.isIE()&&Number(FPDUtil.isIE())<=t)return N("canvaserror",f.mainOptions.templatesType,0,function(t){c.append($.parseHTML(t)).fadeIn(300),c.trigger("templateLoad",[this.url])}),c.trigger("canvasFail");Object.keys(f.mainOptions.hexNames).length;var n={};Object.keys(f.mainOptions.hexNames).forEach(function(t){n[t.toLowerCase()]=f.mainOptions.hexNames[t]}),f.mainOptions.hexNames=n,f.mainOptions.fonts&&0<f.mainOptions.fonts.length&&("object"==typeof f.mainOptions.fonts[0]?f.mainOptions.fonts.sort(function(t,e){t=t.name.toUpperCase(),e=e.name.toUpperCase();return t<e?-1:e<t?1:0}):f.mainOptions.fonts.sort()),"undefined"!=typeof FancyProductDesignerPlus&&FancyProductDesignerPlus.setup(c,f),"undefined"!=typeof FPDPricingRules&&(f.pricingRulesInstance=new FPDPricingRules(c,f)),!1!==f.mainOptions.langJSON?"object"==typeof f.mainOptions.langJSON?(f.langJson=f.mainOptions.langJSON,c.trigger("langJSONLoad",[f.langJson]),_()):$.getJSON(f.mainOptions.langJSON).done(function(t){f.langJson=t,c.trigger("langJSONLoad",[f.langJson]),_()}).fail(function(t){FPDUtil.showModal('Language JSON "'+f.mainOptions.langJSON+'" could not be loaded or is not valid. Make sure you set the correct URL in the options and the JSON is valid!'),c.trigger("langJSONLoad",[f.langJson])}):_()}()};if(!function(t){var e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t())}(function(){return function i(o,r,a){function s(n,t){if(!r[n]){if(!o[n]){var e="function"==typeof _dereq_&&_dereq_;if(!t&&e)return e(n,!0);if(l)return l(n,!0);e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}e=r[n]={exports:{}};o[n][0].call(e.exports,function(t){var e=o[n][1][t];return s(e||t)},e,e.exports,i,o,r,a)}return r[n].exports}for(var l="function"==typeof _dereq_&&_dereq_,t=0;t<a.length;t++)s(a[t]);return s}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),t=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),t}var n=t._SomePromiseArray;t.any=e,t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function i(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new c(16),this._normalQueue=new c(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=l}function o(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function r(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function a(t){this._normalQueue._pushOne(t),this._queueTick()}var s;try{throw new Error}catch(t){s=t}var l=t("./schedule"),c=t("./queue"),u=t("./util");i.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},i.prototype.hasCustomScheduler=function(){return this._customScheduler},i.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},i.prototype.disableTrampolineIfNecessary=function(){u.hasDevTools&&(this._trampolineEnabled=!1)},i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},i.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},i.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},u.hasDevTools?(i.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},i.prototype.invoke=function(t,e,n){this._trampolineEnabled?r.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},i.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(i.prototype.invokeLater=o,i.prototype.invoke=r,i.prototype.settlePromises=a),i.prototype.invokeFirst=function(t,e,n){this._normalQueue.unshift(t,e,n),this._queueTick()},i.prototype._drainQueue=function(t){for(;0<t.length();){var e,n,i=t.shift();"function"==typeof i?(e=t.shift(),n=t.shift(),i.call(e,n)):i._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},e.exports=i,e.exports.firstLineError=s},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(o,r,a,s){function n(t,e){this._reject(e)}function l(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(n,n,null,this,t)}function c(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)}function u(t,e){e.promiseRejectionQueued||this._reject(t)}var d=!1;o.prototype.bind=function(t){d||(d=!0,o.prototype._propagateFrom=s.propagateFromFunction(),o.prototype._boundValue=s.boundValueFunction());var e=a(t),n=new o(r);n._propagateFrom(this,1);var i=this._target();return n._setBoundTo(e),e instanceof o?(t={promiseRejectionQueued:!1,promise:n,target:i,bindingPromise:e},i._then(r,l,void 0,n,t),e._then(c,u,void 0,n,t),n._setOnCancel(e)):n._resolveCallback(i),n},o.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},o.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},o.bind=function(t,e){return o.resolve(e).bind(t)}}},{}],4:[function(t,e,n){"use strict";var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=function(){try{Promise===o&&(Promise=i)}catch(t){}return o},e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var i,o=Object.create;o&&(i=o(null),o=o(null),i[" size"]=o[" size"]=0),e.exports=function(i){function n(t){return function(t,e){var n;if(null!=t&&(n=t[e]),"function"==typeof n)return n;throw e="Object "+a.classString(t)+" has no method '"+a.toString(e)+"'",new i.TypeError(e)}(t,this.pop()).apply(t,this)}function o(t){return t[this]}function r(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a=t("./util"),s=a.canEvaluate;a.isIdentifier,i.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(n,void 0,void 0,e,void 0)},i.prototype.get=function(t){var e;return e="number"==typeof t?r:s&&null!==(e=(void 0)(t))?e:o,this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(l,t,e){"use strict";t.exports=function(t,e,n,i){var o=l("./util"),r=o.tryCatch,a=o.errorObj,s=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t.isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n.isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),e=t,t=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this.isCancellable()&&(this._setCancelled(),s.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){0<this._length()&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(t,e){var n;if(o.isArray(t))for(var i=0;i<t.length;++i)this._doInvokeOnCancel(t[i],e);else void 0!==t&&("function"==typeof t?e||(n=r(t).call(this._boundValue()))===a&&(this._attachExtraTrace(n.e),s.throwLater(n.e)):t._resultCancelled(this))},t.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),s.invoke(this._doInvokeOnCancel,this,t)},t.prototype._invokeInternalOnCancel=function(){this.isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(d){var h=t("./util"),p=t("./es5").keys,f=h.tryCatch,g=h.errorObj;return function(l,c,u){return function(t){var e=u._boundValue();t:for(var n=0;n<l.length;++n){var i=l[n];if(i===Error||null!=i&&i.prototype instanceof Error){if(t instanceof i)return f(c).call(e,t)}else if("function"==typeof i){var o=f(i).call(e,t);if(o===g)return o;if(o)return f(c).call(e,t)}else if(h.isObject(t)){for(var r=p(i),a=0;a<r.length;++a){var s=r[a];if(i[s]!=t[s])continue t}return f(c).call(e,t)}}return d}}}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(r){function a(){this._trace=new a.CapturedTrace(s())}function s(){var t=n.length-1;return 0<=t?n[t]:void 0}var l=!1,n=[];return r.prototype._promiseCreated=function(){},r.prototype._pushContext=function(){},r.prototype._popContext=function(){return null},r._peekContext=r.prototype._peekContext=function(){},a.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},a.prototype._popContext=function(){if(void 0===this._trace)return null;var t=n.pop(),e=t._promiseCreated;return t._promiseCreated=null,e},a.CapturedTrace=null,a.create=function(){return l?new a:void 0},a.deactivateLongStackTraces=function(){},a.activateLongStackTraces=function(){var t=r.prototype._pushContext,e=r.prototype._popContext,n=r._peekContext,i=r.prototype._peekContext,o=r.prototype._promiseCreated;a.deactivateLongStackTraces=function(){r.prototype._pushContext=t,r.prototype._popContext=e,r._peekContext=n,r.prototype._peekContext=i,r.prototype._promiseCreated=o,l=!1},l=!0,r.prototype._pushContext=a.prototype._pushContext,r.prototype._popContext=a.prototype._popContext,r._peekContext=r.prototype._peekContext=s,r.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},a}},{}],9:[function(Y,t,e){"use strict";t.exports=function(o,n){function t(t,e){return{promise:e}}function i(){return!1}function r(t,e,n){var i=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+k.toString(t));i._attachCancellationCallback(t)})}catch(t){return t}}function a(t){if(!this.isCancellable())return this;var e=this._onCancel();void 0!==e?k.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function l(t){this._onCancelField=t}function c(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){var n;0!=(1&e)&&(void 0===(n=(this._cancellationParent=t)._branchesRemainingToCancel)&&(n=0),t._branchesRemainingToCancel=n+1),0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function e(){var t=this._boundTo;return void 0!==t&&t instanceof o?t.isFulfilled()?t.value():void 0:t}function d(){this._trace=new x(this._peekContext())}function h(t,e){var n;F(t)&&(void 0!==(n=this._trace)&&e&&(n=n._parent),void 0!==n?n.attachExtraTrace(t):t.__stackCleaned__||(n=g(t),k.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),k.notEnumerableProp(t,"__stackCleaned__",!0)))}function p(t,e,n){var i;G.warnings&&(t=new P(t),e?n._attachExtraTrace(t):G.longStackTraces&&(i=o._peekContext())?i.attachExtraTrace(t):(i=g(t),t.stack=i.message+"\n"+i.stack.join("\n")),U("warning",t)||m(t,"",!0))}function f(t){for(var e=[],n=0;n<t.length;++n){var i=t[n],o=" (No stack trace)"===i||E.test(i),r=o&&H(i);o&&!r&&(N&&" "!==i.charAt(0)&&(i=" "+i),e.push(i))}return e}function g(t){var e=t.stack;return{message:t.toString(),stack:f(e="string"==typeof e&&0<e.length?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var i=e[n];if(" (No stack trace)"===i||E.test(i))break}return 0<n&&(e=e.slice(n)),e}(t):[" (No stack trace)"])}}function m(t,e,n){var i;"undefined"!=typeof console&&(t=k.isObject(t)?(i=t.stack,e+L(i,t)):e+String(t),"function"==typeof D?D(t,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(t))}function v(t,e,n,i){var o=!1;try{"function"==typeof e&&(o=!0,"rejectionHandled"===t?e(i):e(n,i))}catch(t){_.throwLater(t)}"unhandledRejection"===t?U(t,n,i)||o||m(n,"Unhandled rejection "):U(t,i)}function b(t){var e;if("function"==typeof t)n="[function "+(t.name||"anonymous")+"]";else{n=t&&"function"==typeof t.toString?t.toString():k.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(n))try{var n=JSON.stringify(t)}catch(t){}0===n.length&&(n="(empty array)")}return"(<"+((e=n).length<41?e:e.substr(0,38)+"...")+">, no stack trace)"}function y(){return"function"==typeof q}function w(t){t=t.match(V);return t?{fileName:t[1],line:parseInt(t[2],10)}:void 0}function x(t){this._parent=t,this._promisesCreated=0;t=this._length=1+(void 0===t?0:t._length);q(this,x),32<t&&this.uncycle()}var C,A,D,S=o._getDomain,_=o._async,P=Y("./errors").Warning,k=Y("./util"),F=k.canAttachTrace,I=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,E=null,L=null,N=!1,O=!(0==k.env("BLUEBIRD_DEBUG")||!k.env("BLUEBIRD_DEBUG")&&"development"!==k.env("NODE_ENV")),T=!(0==k.env("BLUEBIRD_WARNINGS")||!O&&!k.env("BLUEBIRD_WARNINGS")),O=!(0==k.env("BLUEBIRD_LONG_STACK_TRACES")||!O&&!k.env("BLUEBIRD_LONG_STACK_TRACES")),B=0!=k.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(T||!!k.env("BLUEBIRD_W_FORGOTTEN_RETURN"));o.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},o.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),_.invokeLater(this._notifyUnhandledRejection,this,void 0))},o.prototype._notifyUnhandledRejectionIsHandled=function(){v("rejectionHandled",C,void 0,this)},o.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},o.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},o.prototype._notifyUnhandledRejection=function(){var t;this._isRejectionUnhandled()&&(t=this._settledValue(),this._setUnhandledRejectionIsNotified(),v("unhandledRejection",A,t,this))},o.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},o.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},o.prototype._isUnhandledRejectionNotified=function(){return 0<(262144&this._bitField)},o.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},o.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},o.prototype._isRejectionUnhandled=function(){return 0<(1048576&this._bitField)},o.prototype._warn=function(t,e,n){return p(t,e,n||this)},o.onPossiblyUnhandledRejection=function(t){var e=S();A="function"==typeof t?null===e?t:e.bind(t):void 0},o.onUnhandledRejectionHandled=function(t){var e=S();C="function"==typeof t?null===e?t:e.bind(t):void 0};var M=function(){};o.longStackTraces=function(){if(_.haveItemsQueued()&&!G.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");var t,e;!G.longStackTraces&&y()&&(t=o.prototype._captureStackTrace,e=o.prototype._attachExtraTrace,G.longStackTraces=!0,M=function(){if(_.haveItemsQueued()&&!G.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");o.prototype._captureStackTrace=t,o.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),_.enableTrampoline(),G.longStackTraces=!1},o.prototype._captureStackTrace=d,o.prototype._attachExtraTrace=h,n.activateLongStackTraces(),_.disableTrampolineIfNecessary())},o.hasLongStackTraces=function(){return G.longStackTraces&&y()};var z=function(){try{var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),k.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!k.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),j=k.isNode?function(){return process.emit.apply(process,arguments)}:k.global?function(t){t="on"+t.toLowerCase(),t=k.global[t];return!!t&&(t.apply(k.global,[].slice.call(arguments,1)),!0)}:function(){return!1},R={promiseCreated:t,promiseFulfilled:t,promiseRejected:t,promiseResolved:t,promiseCancelled:t,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:t},U=function(t){var e=!1;try{e=j.apply(null,arguments)}catch(t){_.throwLater(t),e=!0}var n=!1;try{n=z(t,R[t].apply(null,arguments))}catch(t){_.throwLater(t),n=!0}return n||e};o.config=function(t){var e;if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?o.longStackTraces():!t.longStackTraces&&o.hasLongStackTraces()&&M()),"warnings"in t&&(e=t.warnings,G.warnings=!!e,B=G.warnings,k.isObject(e)&&"wForgottenReturn"in e&&(B=!!e.wForgottenReturn)),"cancellation"in t&&t.cancellation&&!G.cancellation){if(_.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");o.prototype._clearCancellationData=c,o.prototype._propagateFrom=u,o.prototype._onCancel=s,o.prototype._setOnCancel=l,o.prototype._attachCancellationCallback=a,o.prototype._execute=r,W=u,G.cancellation=!0}"monitoring"in t&&(t.monitoring&&!G.monitoring?(G.monitoring=!0,o.prototype._fireEvent=U):!t.monitoring&&G.monitoring&&(G.monitoring=!1,o.prototype._fireEvent=i))},o.prototype._fireEvent=i,o.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},o.prototype._onCancel=function(){},o.prototype._setOnCancel=function(t){},o.prototype._attachCancellationCallback=function(t){},o.prototype._captureStackTrace=function(){},o.prototype._attachExtraTrace=function(){},o.prototype._clearCancellationData=function(){},o.prototype._propagateFrom=function(t,e){};var W=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)},H=function(){return!1},V=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;k.inherits(x,Error),(n.CapturedTrace=x).prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},i=0,o=this;void 0!==o;++i)e.push(o),o=o._parent;for(i=(t=this._length=i)-1;0<=i;--i){var r=e[i].stack;void 0===n[r]&&(n[r]=i)}for(i=0;i<t;++i){var a=n[e[i].stack];if(void 0!==a&&a!==i){0<a&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[i]._parent=void 0,e[i]._length=1;var s=0<i?e[i-1]:this;a<t-1?(s._parent=e[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var l=s._length+1,c=i-2;0<=c;--c)e[c]._length=l,l++;return}}}},x.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=g(t),n=e.message,i=[e.stack],o=this;void 0!==o;)i.push(f(o.stack.split("\n"))),o=o._parent;(function(t){for(var e=t[0],n=1;n<t.length;++n){for(var i=t[n],o=e.length-1,r=e[o],a=-1,s=i.length-1;0<=s;--s)if(i[s]===r){a=s;break}for(s=a;0<=s;--s){var l=i[s];if(e[o]!==l)break;e.pop(),o--}e=i}})(i),function(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}(i),k.notEnumerableProp(t,"stack",function(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}(n,i)),k.notEnumerableProp(t,"__stackCleaned__",!0)}};var q=function(){function t(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():b(e)}var e=/^\s*at\s*/;if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,E=e,L=t;var n=Error.captureStackTrace;return H=function(t){return I.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var i,o=new Error;if("string"==typeof o.stack&&0<=o.stack.split("\n")[0].indexOf("stackDetection@"))return E=/@/,L=t,N=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){i="stack"in t}return"stack"in o||!i||"number"!=typeof Error.stackTraceLimit?(L=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?b(e):e.toString()},null):(E=e,L=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(D=function(t){console.warn(t)},k.isNode&&process.stderr.isTTY?D=function(t,e){e=e?"[33m":"[31m";console.warn(e+t+"[0m\n")}:k.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var G={warnings:T,longStackTraces:!1,cancellation:!1,monitoring:!1};return O&&o.longStackTraces(),{longStackTraces:function(){return G.longStackTraces},warnings:function(){return G.warnings},cancellation:function(){return G.cancellation},monitoring:function(){return G.monitoring},propagateFromFunction:function(){return W},boundValueFunction:function(){return e},checkForgottenReturns:function(t,e,n,i,o){void 0===t&&null!==e&&B&&(void 0!==o&&o._returnedNonUndefined()||0!=(65535&i._bitField)&&(n&&(n+=" "),n="a promise was created in a "+n+"handler but was not returned from it",i._warn(n,!0,e)))},setBounds:function(t,e){if(y()){for(var n,i,o=t.stack.split("\n"),r=e.stack.split("\n"),a=-1,s=-1,l=0;l<o.length;++l)if(c=w(o[l])){n=c.fileName,a=c.line;break}for(var c,l=0;l<r.length;++l)if(c=w(r[l])){i=c.fileName,s=c.line;break}a<0||s<0||!n||!i||n!==i||s<=a||(H=function(t){if(I.test(t))return!0;t=w(t);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}},warn:p,deprecated:function(t,e){return t+=" is deprecated and will be removed in a future version.",e&&(t+=" Use "+e+" instead."),p(t)},CapturedTrace:x,fireDomEvent:z,fireGlobalEvent:j}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(n){function i(){return this.value}function o(){throw this.reason}n.prototype.return=n.prototype.thenReturn=function(t){return t instanceof n&&t.suppressUnhandledRejections(),this._then(i,void 0,void 0,{value:t},void 0)},n.prototype.throw=n.prototype.thenThrow=function(t){return this._then(o,void 0,void 0,{reason:t},void 0)},n.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,o,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},n.prototype.catchReturn=function(t){if(arguments.length<=1)return t instanceof n&&t.suppressUnhandledRejections(),this._then(void 0,i,void 0,{value:t},void 0);var e=arguments[1];e instanceof n&&e.suppressUnhandledRejections();return this.caught(t,function(){return e})}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,n){function i(){return e(this)}function o(t,e){return r(t,e,n,n)}var r=t.reduce,e=t.all;t.prototype.each=function(t){return this.mapSeries(t)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,n,n)},t.each=function(t,e){return o(t,e)._then(i,void 0,void 0,t,void 0)},t.mapSeries=o}},{}],12:[function(t,e,n){"use strict";function i(e,n){function i(t){return this instanceof i?(d(this,"message","string"==typeof t?t:n),d(this,"name",e),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new i(t)}return u(i,Error),i}function o(t){return this instanceof o?(d(this,"name","OperationalError"),d(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(d(this,"message",t.message),d(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(t)}var r,a,s=t("./es5"),l=s.freeze,c=t("./util"),u=c.inherits,d=c.notEnumerableProp,h=i("Warning","warning"),p=i("CancellationError","cancellation error"),t=i("TimeoutError","timeout error"),f=i("AggregateError","aggregate error");try{r=TypeError,a=RangeError}catch(t){r=i("TypeError","type error"),a=i("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<g.length;++m)"function"==typeof Array.prototype[g[m]]&&(f.prototype[g[m]]=Array.prototype[g[m]]);s.defineProperty(f.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),f.prototype.isOperational=!0;var v=0;f.prototype.toString=function(){var t=Array(4*v+1).join(" "),e="\n"+t+"AggregateError of:\n";v++,t=Array(4*v+1).join(" ");for(var n=0;n<this.length;++n){for(var i=this[n]===this?"[Circular AggregateError]":this[n]+"",o=i.split("\n"),r=0;r<o.length;++r)o[r]=t+o[r];e+=(i=o.join("\n"))+"\n"}return v--,e},u(o,Error);c=Error.__BluebirdErrorTypes__;c||(c=l({CancellationError:p,TimeoutError:t,OperationalError:o,RejectionError:o,AggregateError:f}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:c,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:r,RangeError:a,CancellationError:c.CancellationError,OperationalError:c.OperationalError,TimeoutError:c.TimeoutError,AggregateError:c.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var i,o,r,a,s=function(){"use strict";return void 0===this}();s?e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:s,propertyIsWritable:function(t,e){e=Object.getOwnPropertyDescriptor(t,e);return!(e&&!e.writable&&!e.set)}}:(i={}.hasOwnProperty,o={}.toString,r={}.constructor.prototype,a=function(t){var e,n=[];for(e in t)i.call(t,e)&&n.push(e);return n},e.exports={isArray:function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}},keys:a,names:a,defineProperty:function(t,e,n){return t[e]=n.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return r}},isES5:s,propertyIsWritable:function(){return!0}})},{}],14:[function(t,e,n){"use strict";e.exports=function(t,i){var o=t.map;t.prototype.filter=function(t,e){return o(this,t,e,i)},t.filter=function(t,e,n){return o(t,e,n,i)}}},{}],15:[function(n,t,e){"use strict";t.exports=function(o,r){function a(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function s(t){this.finallyHandler=t}function l(t,e){return null!=t.cancelPromise&&(1<arguments.length?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,1)}function c(){return e.call(this,this.promise._target()._settledValue())}function u(t){return l(this,t)?void 0:(h.e=t,h)}function e(t){var e=this.promise,n=this.handler;if(!this.called){this.called=!0;var i=this.isFinallyHandler()?n.call(e._boundValue()):n.call(e._boundValue(),t);if(void 0!==i){e._setReturnedNonUndefined();n=r(i,e);if(n instanceof o){if(null!=this.cancelPromise){if(n.isCancelled()){i=new d("late cancellation observer");return e._attachExtraTrace(i),h.e=i,h}n.isPending()&&n._attachCancellationCallback(new s(this))}return n._then(c,u,void 0,this,void 0)}}}return e.isRejected()?(l(this),h.e=t,h):(l(this),t)}var t=n("./util"),d=o.CancellationError,h=t.errorObj;return a.prototype.isFinallyHandler=function(){return 0===this.type},s.prototype._resultCancelled=function(){l(this.finallyHandler)},o.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new a(this,e,t),void 0)},o.prototype.lastly=o.prototype.finally=function(t){return this._passThrough(t,0,e,e)},o.prototype.tap=function(t){return this._passThrough(t,1,e)},a}},{"./util":36}],16:[function(i,t,e){"use strict";t.exports=function(a,n,s,l,t,c){function u(t,e,n,i){var o,r;c.cancellation()?(o=new a(s),r=this._finallyPromise=new a(s),this._promise=o.lastly(function(){return r}),o._captureStackTrace(),o._setOnCancel(this)):(this._promise=new a(s))._captureStackTrace(),this._stack=i,this._generatorFunction=t,this._receiver=e,this._generator=void 0,this._yieldHandlers="function"==typeof n?[n].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}var d=i("./errors").TypeError,e=i("./util"),h=e.errorObj,p=e.tryCatch,f=[];e.inherits(u,t),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,c.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){var t;this._isResolved()||(t=void 0!==this._generator.return?(this._promise._pushContext(),p(this._generator.return).call(this._generator,void 0)):(t=new a.CancellationError("generator .return() sentinel"),a.coroutine.returnSentinel=t,this._promise._attachExtraTrace(t),this._promise._pushContext(),p(this._generator.throw).call(this._generator,t)),this._promise._popContext(),this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t))},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();t=p(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(t)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();t=p(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(t)},u.prototype._resultCancelled=function(){var t;this._yieldedPromise instanceof a&&(t=this._yieldedPromise,this._yieldedPromise=null,t.cancel())},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(t){var e=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?e.cancel():e._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?e.cancel():e._resolveCallback(n);t=l(n,this._promise);t instanceof a||null!==(t=function(t,e,n){for(var i=0;i<e.length;++i){n._pushContext();var o=p(e[i])(t);if(n._popContext(),o===h){n._pushContext();var r=a.reject(h.e);return n._popContext(),r}o=l(o,n);if(o instanceof a)return o}return null}(t,this._yieldHandlers,this._promise))?0==(50397184&(e=(t=t._target())._bitField))?(this._yieldedPromise=t)._proxy(this,null):0!=(33554432&e)?this._promiseFulfilled(t._value()):0!=(16777216&e)?this._promiseRejected(t._reason()):this._promiseCancelled():this._promiseRejected(new d("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},a.coroutine=function(i,t){if("function"!=typeof i)throw new d("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var o=Object(t).yieldHandler,r=u,a=(new Error).stack;return function(){var t=i.apply(this,arguments),e=new r(void 0,void 0,o,a),n=e.promise();return e._generator=t,e._promiseFulfilled(void 0),n}},a.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new d("expecting a function but got "+e.classString(t));f.push(t)},a.spawn=function(t){if(c.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var e=new u(t,this),t=e.promise();return e._run(a.spawn),t}}},{"./errors":12,"./util":36}],17:[function(r,t,e){"use strict";t.exports=function(t,n,e,i){var o=r("./util");o.canEvaluate,o.tryCatch,o.errorObj,t.join=function(){var t,e=arguments.length-1;0<e&&"function"==typeof arguments[e]&&(t=arguments[e]);var e=[].slice.call(arguments);t&&e.pop();e=new n(e).promise();return void 0!==t?e.spread(t):e}}},{"./util":36}],18:[function(e,t,n){"use strict";t.exports=function(c,t,o,u,r,d){function a(t,e,n,i){this.constructor$(t),this._promise._captureStackTrace();t=s();this._callback=null===t?e:t.bind(e),this._preservedValues=i===r?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=1<=n?[]:f,this._init$(void 0,-2)}function n(t,e,n,i){if("function"!=typeof e)return o("expecting a function but got "+l.classString(e));n="object"==typeof n&&null!==n?n.concurrency:0;return new a(t,e,n="number"==typeof n&&isFinite(n)&&1<=n?n:0,i).promise()}var s=c._getDomain,l=e("./util"),h=l.tryCatch,p=l.errorObj,f=[];l.inherits(a,t),a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,e){var n=this._values,i=this.length(),o=this._preservedValues,r=this._limit;if(e<0){if(n[e=-1*e-1]=t,1<=r&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(1<=r&&this._inFlight>=r)return n[e]=t,this._queue.push(e),!1;null!==o&&(o[e]=t);var a=this._promise,s=this._callback,l=a._boundValue();a._pushContext();l=h(s).call(l,t,e,i),t=a._popContext();if(d.checkForgottenReturns(l,t,null!==o?"Promise.filter":"Promise.map",a),l===p)return this._reject(l.e),!0;t=u(l,this._promise);if(t instanceof c){a=(t=t._target())._bitField;if(0==(50397184&a))return 1<=r&&this._inFlight++,(n[e]=t)._proxy(this,-1*(e+1)),!1;if(0==(33554432&a))return 0!=(16777216&a)?this._reject(t._reason()):this._cancel(),!0;l=t._value()}n[e]=l}return i<=++this._totalResolved&&(null!==o?this._filter(n,o):this._resolve(n),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;0<t.length&&this._inFlight<e;){if(this._isResolved())return;var i=t.pop();this._promiseFulfilled(n[i],i)}},a.prototype._filter=function(t,e){for(var n=e.length,i=new Array(n),o=0,r=0;r<n;++r)t[r]&&(i[o++]=e[r]);i.length=o,this._resolve(i)},a.prototype.preservedValues=function(){return this._preservedValues},c.prototype.map=function(t,e){return n(this,t,e,null)},c.map=n}},{"./util":36}],19:[function(e,t,n){"use strict";t.exports=function(o,r,t,a,s){var l=e("./util"),c=l.tryCatch;o.method=function(i){if("function"!=typeof i)throw new o.TypeError("expecting a function but got "+l.classString(i));return function(){var t=new o(r);t._captureStackTrace(),t._pushContext();var e=c(i).apply(this,arguments),n=t._popContext();return s.checkForgottenReturns(e,n,"Promise.method",t),t._resolveFromSyncValue(e),t}},o.attempt=o.try=function(t){if("function"!=typeof t)return a("expecting a function but got "+l.classString(t));var e,n,i=new o(r);i._captureStackTrace(),i._pushContext(),n=1<arguments.length?(s.deprecated("calling Promise.try with more than 1 argument"),n=arguments[1],e=arguments[2],l.isArray(n)?c(t).apply(e,n):c(t).call(e,n)):c(t)();t=i._popContext();return s.checkForgottenReturns(n,t,"Promise.try",i),i._resolveFromSyncValue(n),i},o.prototype._resolveFromSyncValue=function(t){t===l.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){var e,n;if((n=t)instanceof Error&&c.getPrototypeOf(n)===Error.prototype){(e=new l(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var i=c.keys(t),o=0;o<i.length;++o){var r=i[o];u.test(r)||(e[r]=t[r])}return e}return a.markAsOriginatingFromRejection(t),t}var a=t("./util"),s=a.maybeWrapAsError,l=t("./errors").OperationalError,c=t("./es5"),u=/^(?:name|message|stack|cause)$/;e.exports=function(i,o){return function(t,e){var n;null!==i&&(t?(n=r(s(t)),i._attachExtraTrace(n),i._reject(n)):o?(n=[].slice.call(arguments,1),i._fulfill(n)):i._fulfill(e),i=null)}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,n){"use strict";t.exports=function(t){function i(t,e){if(!n.isArray(t))return o.call(this,t,e);t=s(e).apply(this._boundValue(),[null].concat(t));t===l&&a.throwLater(t.e)}function o(t,e){var n=this._boundValue(),t=void 0===t?s(e).call(n,null):s(e).call(n,null,t);t===l&&a.throwLater(t.e)}function r(t,e){var n;t||((n=new Error(t+"")).cause=t,t=n);t=s(e).call(this._boundValue(),t);t===l&&a.throwLater(t.e)}var n=e("./util"),a=t._async,s=n.tryCatch,l=n.errorObj;t.prototype.asCallback=t.prototype.nodeify=function(t,e){var n;return"function"==typeof t&&(n=o,void 0!==e&&Object(e).spread&&(n=i),this._then(n,r,void 0,this,t)),this}}},{"./util":36}],22:[function(k,t,e){"use strict";t.exports=function(){function s(){}function d(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==v&&(function(t,e){if("function"!=typeof e)throw new g("expecting a function but got "+u.classString(e));if(t.constructor!==d)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function t(t){this.promise._resolveCallback(t)}function e(t){this.promise._rejectCallback(t,!1)}function n(t){var e=new d(v);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}function a(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")}function l(){return new d.PromiseInspection(this._target())}function c(t){return d.reject(new g(t))}var r={},u=k("./util"),h=u.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null};u.notEnumerableProp(d,"_getDomain",h);var i=k("./es5"),o=k("./async"),p=new o;i.defineProperty(d,"_async",{value:p});var f=k("./errors"),g=d.TypeError=f.TypeError;d.RangeError=f.RangeError;var m=d.CancellationError=f.CancellationError;d.TimeoutError=f.TimeoutError,d.OperationalError=f.OperationalError,d.RejectionError=f.OperationalError,d.AggregateError=f.AggregateError;var v=function(){},b={},y={},w=k("./thenables")(d,v),x=k("./promise_array")(d,v,w,c,s),i=k("./context")(d),f=i.create,C=k("./debuggability")(d,i),A=(C.CapturedTrace,k("./finally")(d,w)),D=k("./catch_filter")(y),S=k("./nodeback"),_=u.errorObj,P=u.tryCatch;return d.prototype.toString=function(){return"[object Promise]"},d.prototype.caught=d.prototype.catch=function(t){var e=arguments.length;if(1<e){for(var n=new Array(e-1),i=0,o=0;o<e-1;++o){var r=arguments[o];if(!u.isObject(r))return c("expecting an object but got "+u.classString(r));n[i++]=r}return n.length=i,t=arguments[o],this.then(void 0,D(n,t,this))}return this.then(void 0,t)},d.prototype.reflect=function(){return this._then(l,l,void 0,this,void 0)},d.prototype.then=function(t,e){var n;return C.warnings()&&0<arguments.length&&"function"!=typeof t&&"function"!=typeof e&&(n=".then() only accepts functions but was passed: "+u.classString(t),1<arguments.length&&(n+=", "+u.classString(e)),this._warn(n)),this._then(t,e,void 0,void 0,void 0)},d.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},d.prototype.spread=function(t){return"function"!=typeof t?c("expecting a function but got "+u.classString(t)):this.all()._then(t,void 0,void 0,b,void 0)},d.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},d.prototype.all=function(){return 0<arguments.length&&this._warn(".all() was passed arguments but it does not take any"),new x(this).promise()},d.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},d.is=function(t){return t instanceof d},d.fromNode=d.fromCallback=function(t){var e=new d(v);e._captureStackTrace();var n=1<arguments.length&&!!Object(arguments[1]).multiArgs,n=P(t)(S(e,n));return n===_&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},d.all=function(t){return new x(t).promise()},d.resolve=d.fulfilled=d.cast=function(t){var e=w(t);return e instanceof d||((e=new d(v))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},d.reject=d.rejected=function(t){var e=new d(v);return e._captureStackTrace(),e._rejectCallback(t,!0),e},d.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+u.classString(t));return p.setScheduler(t)},d.prototype._then=function(t,e,n,i,o){var r=void 0!==o,a=r?o:new d(v),s=this._target(),l=s._bitField;r||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===i&&0!=(2097152&this._bitField)&&(i=0!=(50397184&l)?this._boundValue():s===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var c,u,o=h();return 0!=(50397184&l)?(r=s._settlePromiseCtx,0!=(33554432&l)?(u=s._rejectionHandler0,c=t):0!=(16777216&l)?(u=s._fulfillmentHandler0,c=e,s._unsetRejectionIsUnhandled()):(r=s._settlePromiseLateCancellationObserver,u=new m("late cancellation observer"),s._attachExtraTrace(u),c=e),p.invoke(r,s,{handler:null===o?c:"function"==typeof c&&o.bind(c),promise:a,receiver:i,value:u})):s._addCallbacks(t,e,a,i,o),a},d.prototype._length=function(){return 65535&this._bitField},d.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},d.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},d.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},d.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},d.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},d.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},d.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},d.prototype._isFinal=function(){return 0<(4194304&this._bitField)},d.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},d.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},d.prototype._setAsyncGuaranteed=function(){p.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},d.prototype._receiverAt=function(t){t=0===t?this._receiver0:this[4*t-4+3];return t===r?void 0:void 0===t&&this._isBound()?this._boundValue():t},d.prototype._promiseAt=function(t){return this[4*t-4+2]},d.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4]},d.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},d.prototype._boundValue=function(){},d.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,i=t._promise0,t=t._receiverAt(0);void 0===t&&(t=r),this._addCallbacks(e,n,i,t,null)},d.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),i=t._rejectionHandlerAt(e),o=t._promiseAt(e),e=t._receiverAt(e);void 0===e&&(e=r),this._addCallbacks(n,i,o,e,null)},d.prototype._addCallbacks=function(t,e,n,i,o){var r,a=this._length();return 65531<=a&&(a=0,this._setLength(0)),0===a?(this._promise0=n,this._receiver0=i,"function"==typeof t&&(this._fulfillmentHandler0=null===o?t:o.bind(t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:o.bind(e))):(this[2+(r=4*a-4)]=n,this[3+r]=i,"function"==typeof t&&(this[r]=null===o?t:o.bind(t)),"function"==typeof e&&(this[1+r]=null===o?e:o.bind(e))),this._setLength(a+1),a},d.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},d.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(a(),!1);var n=w(t,this);if(!(n instanceof d))return this._fulfill(t);e&&this._propagateFrom(n,2);var i=n._target();if(i!==this){n=i._bitField;if(0==(50397184&n)){var o=this._length();0<o&&i._migrateCallback0(this);for(var r=1;r<o;++r)i._migrateCallbackAt(this,r);this._setFollowing(),this._setLength(0),this._setFollowee(i)}else 0!=(33554432&n)?this._fulfill(i._value()):0!=(16777216&n)?this._reject(i._reason()):(n=new m("late cancellation observer"),i._attachExtraTrace(n),this._reject(n))}else this._reject(a())}},d.prototype._rejectCallback=function(t,e,n){var i=u.ensureErrorObject(t),o=i===t;o||n||!C.warnings()||(n="a promise was rejected with a non-error: "+u.classString(t),this._warn(n,!0)),this._attachExtraTrace(i,!!e&&o),this._reject(t)},d.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,t=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)}),n=!1;this._popContext(),void 0!==t&&e._rejectCallback(t,!0)},d.prototype._settlePromiseFromHandler=function(t,e,n,i){var o;0==(65536&i._bitField)&&(i._pushContext(),e===b?n&&"number"==typeof n.length?o=P(t).apply(this._boundValue(),n):(o=_).e=new g("cannot .spread() a non-array: "+u.classString(n)):o=P(t).call(e,n),e=i._popContext(),0==(65536&i._bitField)&&(o===y?i._reject(n):o===_?i._rejectCallback(o.e,!1):(C.checkForgottenReturns(o,e,"",i,this),i._resolveCallback(o))))},d.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},d.prototype._followee=function(){return this._rejectionHandler0},d.prototype._setFollowee=function(t){this._rejectionHandler0=t},d.prototype._settlePromise=function(t,e,n,i){var o=t instanceof d,r=this._bitField,a=0!=(134217728&r);0!=(65536&r)?(o&&t._invokeInternalOnCancel(),n instanceof A&&n.isFinallyHandler()?(n.cancelPromise=t,P(e).call(n,i)===_&&t._reject(_.e)):e===l?t._fulfill(l.call(n)):n instanceof s?n._promiseCancelled(t):o||t instanceof x?t._cancel():n.cancel()):"function"==typeof e?o?(a&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,n,i,t)):e.call(n,i,t):n instanceof s?n._isResolved()||(0!=(33554432&r)?n._promiseFulfilled(i,t):n._promiseRejected(i,t)):o&&(a&&t._setAsyncGuaranteed(),0!=(33554432&r)?t._fulfill(i):t._reject(i))},d.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,i=t.receiver,t=t.value;"function"==typeof e?n instanceof d?this._settlePromiseFromHandler(e,i,t,n):e.call(i,t,n):n instanceof d&&n._reject(t)},d.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},d.prototype._settlePromise0=function(t,e,n){var i=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(i,t,o,e)},d.prototype._clearCallbackDataAtIndex=function(t){t=4*t-4;this[2+t]=this[3+t]=this[t]=this[1+t]=void 0},d.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=a();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,0<(65535&e)&&(0!=(134217728&e)?this._settlePromises():p.settlePromises(this))}},d.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?p.fatalError(t,u.isNode):void(0<(65535&e)?p.settlePromises(this):this._ensurePossibleRejectionHandled())},d.prototype._fulfillPromises=function(t,e){for(var n=1;n<t;n++){var i=this._fulfillmentHandlerAt(n),o=this._promiseAt(n),r=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,i,r,e)}},d.prototype._rejectPromises=function(t,e){for(var n=1;n<t;n++){var i=this._rejectionHandlerAt(n),o=this._promiseAt(n),r=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(o,i,r,e)}},d.prototype._settlePromises=function(){var t,e=this._bitField,n=65535&e;0<n&&(0!=(16842752&e)?(t=this._fulfillmentHandler0,this._settlePromise0(this._rejectionHandler0,t,e),this._rejectPromises(n,t)):(t=this._rejectionHandler0,this._settlePromise0(this._fulfillmentHandler0,t,e),this._fulfillPromises(n,t)),this._setLength(0)),this._clearCancellationData()},d.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},d.defer=d.pending=function(){return C.deprecated("Promise.defer","new Promise"),{promise:new d(v),resolve:t,reject:e}},u.notEnumerableProp(d,"_makeSelfResolutionError",a),k("./method")(d,v,w,c,C),k("./bind")(d,v,w,C),k("./cancel")(d,x,c,C),k("./direct_resolve")(d),k("./synchronous_inspection")(d),k("./join")(d,x,w,v,C),d.Promise=d,k("./map.js")(d,x,c,w,v,C),k("./call_get.js")(d),k("./using.js")(d,c,w,f,v,C),k("./timers.js")(d,v,C),k("./generators.js")(d,c,v,w,s,C),k("./nodeify.js")(d),k("./promisify.js")(d,v),k("./props.js")(d,x,w,c),k("./race.js")(d,v,w,c),k("./reduce.js")(d,x,c,w,v,C),k("./settle.js")(d,x,C),k("./some.js")(d,x,c),k("./filter.js")(d,v),k("./each.js")(d,v),k("./any.js")(d),u.toFastProperties(d),u.toFastProperties(d.prototype),n({a:1}),n({b:2}),n({c:3}),n(1),n(function(){}),n(void 0),n(!1),n(new d(v)),C.setBounds(o.firstLineError,u.lastLineError),d}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(i,t,e){"use strict";t.exports=function(s,n,l,r,t){function e(t){var e=this._promise=new s(n);t instanceof s&&e._propagateFrom(t,3),e._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var a=i("./util");return a.isArray,a.inherits(e,t),e.prototype.length=function(){return this._length},e.prototype.promise=function(){return this._promise},e.prototype._init=function t(e,n){var i=l(this._values,this._promise);if(i instanceof s){var o=(i=i._target())._bitField;if(this._values=i,0==(50397184&o))return this._promise._setAsyncGuaranteed(),i._then(t,this._reject,void 0,this,n);if(0==(33554432&o))return 0!=(16777216&o)?this._reject(i._reason()):this._cancel();i=i._value()}if(null!==(i=a.asArray(i)))return 0===i.length?void(-5===n?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{}}}(n))):void this._iterate(i);i=r("expecting an array or an iterable object but got "+a.classString(i)).reason();this._promise._rejectCallback(i,!1)},e.prototype._iterate=function(t){var e=this.getActualLength(t.length);this._length=e,this._values=this.shouldCopyValues()?new Array(e):this._values;for(var n=this._promise,i=!1,o=null,r=0;r<e;++r){var a=l(t[r],n),o=a instanceof s?(a=a._target())._bitField:null;i?null!==o&&a.suppressUnhandledRejections():null!==o?0==(50397184&o)?(a._proxy(this,r),this._values[r]=a):i=0!=(33554432&o)?this._promiseFulfilled(a._value(),r):0!=(16777216&o)?this._promiseRejected(a._reason(),r):this._promiseCancelled(r):i=this._promiseFulfilled(a,r)}i||n._setAsyncGuaranteed()},e.prototype._isResolved=function(){return null===this._values},e.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},e.prototype._cancel=function(){!this._isResolved()&&this._promise.isCancellable()&&(this._values=null,this._promise._cancel())},e.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},e.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},e.prototype._promiseCancelled=function(){return this._cancel(),!0},e.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},e.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof s)t.cancel();else for(var e=0;e<t.length;++e)t[e]instanceof s&&t[e].cancel()}},e.prototype.shouldCopyValues=function(){return!0},e.prototype.getActualLength=function(t){return t},e}},{"./util":36}],24:[function(n,t,e){"use strict";t.exports=function(c,u){function o(t){return!e.test(t)}function p(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function f(t,e,n,i){for(var o,r,a,s=m.inheritedDataKeys(t),l=[],c=0;c<s.length;++c){var u=s[c],d=t[u],h=i===x||x(u,d,t);"function"!=typeof d||p(d)||(o=t,r=u,a=e,(a=m.getDataPropertyOrDefault(o,r+a,w))&&p(a))||!i(u,d,t,h)||l.push(u,d)}return function(t,e,n){for(var i=0;i<t.length;i+=2){var o=t[i];if(n.test(o))for(var r=o.replace(n,""),a=0;a<t.length;a+=2)if(t[a]===r)throw new y("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(l,e,n),l}function d(t,e,n,i,o){for(var r=new RegExp(C(e)+"$"),a=f(t,e,r,n),s=0,l=a.length;s<l;s+=2){var c,u=a[s],d=a[s+1],h=u+e;i===A?t[h]=A(u,g,u,d,e,o):(c=i(d,function(){return A(u,g,u,d,e,o)}),m.notEnumerableProp(c,"__isPromisified__",!0),t[h]=c)}return m.toFastProperties(t),t}var g={},m=n("./util"),h=n("./nodeback"),v=m.withAppended,b=m.maybeWrapAsError,t=m.canEvaluate,y=n("./errors").TypeError,w={__isPromisified__:!0},e=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),x=function(t){return m.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},C=function(t){return t.replace(/([$])/,"\\$")},A=t?void 0:function(o,r,t,e,n,a){function i(){var t=r;r===g&&(t=this);var e=new c(u);e._captureStackTrace();var n="string"==typeof l&&this!==s?this[l]:o,i=h(e,a);try{n.apply(t,v(arguments,i))}catch(t){e._rejectCallback(b(t),!0,!0)}return e._isFateSealed()||e._setAsyncGuaranteed(),e}var s=function(){return this}(),l=o;return"string"==typeof l&&(o=e),m.notEnumerableProp(i,"__isPromisified__",!0),i};c.promisify=function(t,e){if("function"!=typeof t)throw new y("expecting a function but got "+m.classString(t));if(p(t))return t;var n=void 0===(e=Object(e)).context?g:e.context,i=!!e.multiArgs,i=A(e=t,n,void 0,e,null,i);return m.copyDescriptors(t,i,o),i},c.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new y("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var n=!!(e=Object(e)).multiArgs,i=e.suffix;"string"!=typeof i&&(i="Async");var o=e.filter;"function"!=typeof o&&(o=x);var r=e.promisifier;if("function"!=typeof r&&(r=A),!m.isIdentifier(i))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=m.inheritedDataKeys(t),s=0;s<a.length;++s){var l=t[a[s]];"constructor"!==a[s]&&m.isClass(l)&&(d(l.prototype,i,o,r,n),d(l,i,o,r,n))}return d(t,i,o,r,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(f,t,e){"use strict";t.exports=function(n,t,i,o){function r(t){var e=!1;if(void 0!==s&&t instanceof s)o=h(t),e=!0;else for(var n=c.keys(t),i=n.length,o=new Array(2*i),r=0;r<i;++r){var a=n[r];o[r]=t[a],o[r+i]=a}this.constructor$(o),this._isMap=e,this._init$(void 0,-3)}function e(t){var e=i(t);return l(e)?(t=e instanceof n?e._then(n.props,void 0,void 0,void 0,void 0):new r(e).promise(),e instanceof n&&t._propagateFrom(e,2),t):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,a=f("./util"),l=a.isObject,c=f("./es5");"function"==typeof Map&&(s=Map);var u,d,h=(d=0,function(t){u=t.size,d=0;var e=new Array(2*t.size);return t.forEach(p,e),e});function p(t,e){this[d]=t,this[d+u]=e,d++}a.inherits(r,t),r.prototype._init=function(){},r.prototype._promiseFulfilled=function(t,e){var n;if(this._values[e]=t,++this._totalResolved>=this._length){if(this._isMap)n=function(t){for(var e=new s,n=t.length/2|0,i=0;i<n;++i){var o=t[n+i],r=t[i];e.set(o,r)}return e}(this._values);else{n={};for(var i=this.length(),o=0,r=this.length();o<r;++o)n[this._values[o+i]]=this._values[o]}return this._resolve(n),!0}return!1},r.prototype.shouldCopyValues=function(){return!1},r.prototype.getActualLength=function(t){return t>>1},n.prototype.props=function(){return e(this)},n.props=e}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},i.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);e=(this._front-1&e-1^e)-e;this[e]=t,this._front=e,this._length=this.length()+1},i.prototype.unshift=function(t,e,n){this._unshiftOne(n),this._unshiftOne(e),this._unshiftOne(t)},i.prototype.push=function(t,e,n){var i=this.length()+3;if(this._willBeOverCapacity(i))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var o=this._front+i-3;this._checkCapacity(i);var r=this._capacity-1;this[o&r]=t,this[1+o&r]=e,this[2+o&r]=n,this._length=i},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,function(t,e,n,i,o){for(var r=0;r<o;++r)n[r+i]=t[r+e],t[r+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(c,u,d,h){function n(t,e){var n=d(t);if(n instanceof c)return f(n);if(null===(t=p.asArray(t)))return h("expecting an array or an iterable object but got "+p.classString(t));var i=new c(u);void 0!==e&&i._propagateFrom(e,3);for(var o=i._fulfill,r=i._reject,a=0,s=t.length;a<s;++a){var l=t[a];(void 0!==l||a in t)&&c.cast(l)._then(o,r,void 0,i,null)}return i}var p=t("./util"),f=function(e){return e.then(function(t){return n(t,e)})};c.race=function(t){return n(t,void 0)},c.prototype.race=function(){return n(this,void 0)}}},{"./util":36}],28:[function(f,t,e){"use strict";t.exports=function(r,t,o,e,a,s){function l(t,e,n,i){this.constructor$(t);t=d();this._fn=null===t?e:t.bind(e),void 0!==n&&(n=r.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===a?[]:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function n(t,e,n,i){return"function"!=typeof e?o("expecting a function but got "+h.classString(e)):new l(t,e,n,i).promise()}function u(t){this.accum=t,this.array._gotAccum(t);t=e(this.value,this.array._promise);return t instanceof r?(this.array._currentCancellable=t)._then(i,void 0,void 0,this,void 0):i.call(this,t)}function i(t){var e=this.array,n=e._promise,i=p(e._fn);n._pushContext(),(i=void 0!==e._eachValues?i.call(n._boundValue(),t,this.index,this.length):i.call(n._boundValue(),this.accum,t,this.index,this.length))instanceof r&&(e._currentCancellable=i);t=n._popContext();return s.checkForgottenReturns(i,t,void 0!==e._eachValues?"Promise.each":"Promise.reduce",n),i}var d=r._getDomain,h=f("./util"),p=h.tryCatch;h.inherits(l,t),l.prototype._gotAccum=function(t){void 0!==this._eachValues&&t!==a&&this._eachValues.push(t)},l.prototype._eachComplete=function(t){return this._eachValues.push(t),this._eachValues},l.prototype._init=function(){},l.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},l.prototype.shouldCopyValues=function(){return!1},l.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},l.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof r&&this._currentCancellable.cancel(),this._initialValue instanceof r&&this._initialValue.cancel()))},l.prototype._iterate=function(t){var e=(this._values=t).length,n=void 0!==this._initialValue?(o=this._initialValue,0):(o=r.resolve(t[0]),1);if(!(this._currentCancellable=o).isRejected())for(;n<e;++n)var i={accum:null,value:t[n],index:n,length:e,array:this},o=o._then(u,void 0,void 0,i,void 0);void 0!==this._eachValues&&(o=o._then(this._eachComplete,void 0,void 0,this,void 0)),o._then(c,c,void 0,o,this)},r.prototype.reduce=function(t,e){return n(this,t,e,null)},r.reduce=n}},{"./util":36}],29:[function(t,e,n){"use strict";var i,o,r,a=t("./util"),t=a.getNativePromise();t=a.isNode&&"undefined"==typeof MutationObserver?(i=global.setImmediate,o=process.nextTick,a.isRecentNode?function(t){i.call(global,t)}:function(t){o.call(process,t)}):"function"==typeof t?(r=t.resolve(),function(t){r.then(t)}):"undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&window.navigator.standalone?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}:function(){var n=document.createElement("div"),i={attributes:!0},o=!1,r=document.createElement("div");new MutationObserver(function(){n.classList.toggle("foo"),o=!1}).observe(r,i);return function(t){var e=new MutationObserver(function(){e.disconnect(),t()});e.observe(n,i),o||(o=!0,r.classList.toggle("foo"))}}(),e.exports=t},{"./util":36}],30:[function(r,t,e){"use strict";t.exports=function(t,e,n){function i(t){this.constructor$(t)}var o=t.PromiseInspection;r("./util").inherits(i,e),i.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(u,t,e){"use strict";t.exports=function(t,e,i){function o(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function n(t,e){if((0|e)!==e||e<0)return i("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new o(t),t=n.promise();return n.setHowMany(e),n.init(),t}var r=u("./util"),a=u("./errors").RangeError,s=u("./errors").AggregateError,l=r.isArray,c={};r.inherits(o,e),o.prototype._init=function(){var t;this._initialized&&(0!==this._howMany?(this._init$(void 0,-5),t=l(this._values),!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))):this._resolve([]))},o.prototype.init=function(){this._initialized=!0,this._init()},o.prototype.setUnwrap=function(){this._unwrap=!0},o.prototype.howMany=function(){return this._howMany},o.prototype.setHowMany=function(t){this._howMany=t},o.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},o.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},o.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},o.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e<this._values.length;++e)this._values[e]!==c&&t.push(this._values[e]);return 0<t.length?this._reject(t):this._cancel(),!0}return!1},o.prototype._fulfilled=function(){return this._totalResolved},o.prototype._rejected=function(){return this._values.length-this.length()},o.prototype._addRejected=function(t){this._values.push(t)},o.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},o.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},o.prototype._getRangeError=function(t){t="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(t)},o.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=n,t.prototype.some=function(t){return n(this,t)},t._SomePromiseArray=o}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},r=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=t.prototype._isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype.isCancelled=function(){return this._target()._isCancelled()},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return r.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),i.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(a,s){var l=t("./util"),c=l.errorObj,r=l.isObject,u={}.hasOwnProperty;return function(t,e){if(r(t)){if(t instanceof a)return t;var n=function(t){try{return t.then}catch(t){return c.e=t,c}}(t);if(n===c){e&&e._pushContext();var i=a.reject(n.e);return e&&e._popContext(),i}if("function"==typeof n){if(o=t,u.call(o,"_promise0")){i=new a(s);return t._then(i._fulfill,i._reject,void 0,i,null),i}return function(t,e,n){var i=new a(s),o=i;n&&n._pushContext(),i._captureStackTrace(),n&&n._popContext();var r=!0,t=l.tryCatch(e).call(t,function(t){i&&(i._resolveCallback(t),i=null)},function(t){i&&(i._rejectCallback(t,r,!0),i=null)});return r=!1,i&&t===c&&(i._rejectCallback(t.e,!0,!0),i=null),o}(t,n,e)}}var o;return t}}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(i,o,a){function s(t){this.handle=t}function e(t){return clearTimeout(this.handle),t}function n(t){throw clearTimeout(this.handle),t}var l=t("./util"),c=i.TimeoutError;s.prototype._resultCancelled=function(){clearTimeout(this.handle)};function r(t){return u(+this).thenReturn(t)}var u=i.delay=function(t,e){var n;return void 0!==e?(n=i.resolve(e)._then(r,null,null,t,void 0),a.cancellation()&&e instanceof i&&n._setOnCancel(e)):(n=new i(o),t=setTimeout(function(){n._fulfill()},+t),a.cancellation()&&n._setOnCancel(new s(t))),n._setAsyncGuaranteed(),n};i.prototype.delay=function(t){return u(t,this)};i.prototype.timeout=function(t,i){t=+t;var o,r,t=new s(setTimeout(function(){var t,e,n;o.isPending()&&(t=o,n=r,e="string"!=typeof(e=i)?e instanceof Error?e:new c("operation timed out"):new c(e),l.markAsOriginatingFromRejection(e),t._attachExtraTrace(e),t._reject(e),null!=n&&n.cancel())},t));return a.cancellation()?(r=this.then(),(o=r._then(e,n,void 0,t,void 0))._setOnCancel(t)):o=this._then(e,n,void 0,t,void 0),o}}},{"./util":36}],35:[function(r,t,e){"use strict";t.exports=function(d,h,p,e,t,f){function c(t){setTimeout(function(){throw t},0)}function g(o,r){var a=0,s=o.length,l=new d(t);return function t(){if(s<=a)return l._fulfill();var e,n,i=(e=o[a++],(n=p(e))!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&n._setDisposable(e._getDisposer()),n);if(i instanceof d&&i._isDisposable()){try{i=p(i._getDisposer().tryDispose(r),o.promise)}catch(t){return c(t)}if(i instanceof d)return i._then(t,c,null,null,null)}t()}(),l}function m(t,e,n){this._data=t,this._promise=e,this._context=n}function n(t,e,n){this.constructor$(t,e,n)}function v(t){return m.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function b(t){this.length=t,this.promise=null,this[t-1]=null}var y=r("./util"),i=r("./errors").TypeError,o=r("./util").inherits,w=y.errorObj,x=y.tryCatch;m.prototype.data=function(){return this._data},m.prototype.promise=function(){return this._promise},m.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},m.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();t=null!==e?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,t},m.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},o(n,m),n.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},b.prototype._resultCancelled=function(){for(var t=this.length,e=0;e<t;++e){var n=this[e];n instanceof d&&n.cancel()}},d.using=function(){var t=arguments.length;if(t<2)return h("you must pass at least 2 arguments to Promise.using");var r=arguments[t-1];if("function"!=typeof r)return h("expecting a function but got "+y.classString(r));var e,a=!0;2===t&&Array.isArray(arguments[0])?(t=(e=arguments[0]).length,a=!1):(e=arguments,t--);for(var n=new b(t),i=0;i<t;++i){var o,s=e[i];m.isDisposer(s)?(s=(o=s).promise())._setDisposable(o):(o=p(s))instanceof d&&(s=o._then(v,null,null,{resources:n,index:i},void 0)),n[i]=s}for(var l=new Array(n.length),i=0;i<l.length;++i)l[i]=d.resolve(n[i]).reflect();var c=d.all(l).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return w.e=n.error(),w;if(!n.isFulfilled())return void c.cancel();t[e]=n.value()}u._pushContext(),r=x(r);var i=a?r.apply(void 0,t):r(t),o=u._popContext();return f.checkForgottenReturns(i,o,"Promise.using",u),i}),u=c.lastly(function(){var t=new d.PromiseInspection(c);return g(n,t)});return(n.promise=u)._setOnCancel(n),u},d.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},d.prototype._isDisposable=function(){return 0<(131072&this._bitField)},d.prototype._getDisposer=function(){return this._disposer},d.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},d.prototype.disposer=function(t){if("function"==typeof t)return new n(t,this,e());throw new i}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function i(){try{var t=u;return u=null,t.apply(this,arguments)}catch(t){return f.e=t,f}}function o(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function r(t,e,n){if(o(t))return t;n={value:n,configurable:!0,enumerable:!1,writable:!0};return h.defineProperty(t,e,n),t}function a(t){try{return t+""}catch(t){return"[no string representation]"}}function s(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function l(t){return s(t)&&h.propertyIsWritable(t,"stack")}function c(t){return{}.toString.call(t)}var u,d,h=t("./es5"),p="undefined"==typeof navigator,f={e:{}},g="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,m=function(){function s(t){for(var e=0;e<o.length;++e)if(o[e]===t)return 1}var o=[Array.prototype,Object.prototype,Function.prototype];if(h.isES5){var l=Object.getOwnPropertyNames;return function(t){for(var e,n=[],i=Object.create(null);null!=t&&!s(t);){try{e=l(t)}catch(t){return n}for(var o=0;o<e.length;++o){var r,a=e[o];i[a]||(i[a]=!0,null!=(r=Object.getOwnPropertyDescriptor(t,a))&&null==r.get&&null==r.set&&n.push(a))}t=h.getPrototypeOf(t)}return n}}var r={}.hasOwnProperty;return function(t){if(s(t))return[];var e=[];t:for(var n in t)if(r.call(t,n))e.push(n);else{for(var i=0;i<o.length;++i)if(r.call(o[i],n))continue t;e.push(n)}return e}}(),v=/this\s*\.\s*\S+\s*=/,b=/^[a-z$_][a-z$_0-9]*$/i,y="stack"in new Error?function(t){return l(t)?t:new Error(a(t))}:function(t){if(l(t))return t;try{throw new Error(a(t))}catch(t){return t}},t=function(t){return h.isArray(t)?t:null};"undefined"!=typeof Symbol&&Symbol.iterator&&(d="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],i=t[Symbol.iterator]();!(e=i.next()).done;)n.push(e.value);return n},t=function(t){return h.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?d(t):null});var w="undefined"!=typeof process&&"[object process]"===c(process).toLowerCase(),y={isClass:function(t){try{if("function"==typeof t){var e=h.names(t.prototype),n=h.isES5&&1<e.length,i=0<e.length&&!(1===e.length&&"constructor"===e[0]),e=v.test(t+"")&&0<h.names(t).length;if(n||i||e)return!0}return!1}catch(t){return!1}},isIdentifier:function(t){return b.test(t)},inheritedDataKeys:m,getDataPropertyOrDefault:function(t,e,n){return h.isES5?null!=(e=Object.getOwnPropertyDescriptor(t,e))?null==e.get&&null==e.set?e.value:n:void 0:{}.hasOwnProperty.call(t,e)?t[e]:void 0},thrower:function(t){throw t},isArray:h.isArray,asArray:t,notEnumerableProp:r,isPrimitive:o,isObject:function(t){return"function"==typeof t||"object"==typeof t&&null!==t},isError:s,canEvaluate:p,errorObj:f,tryCatch:function(t){return u=t,i},inherits:function(e,n){function t(){for(var t in this.constructor=e,(this.constructor$=n).prototype)i.call(n.prototype,t)&&"$"!==t.charAt(t.length-1)&&(this[t+"$"]=n.prototype[t])}var i={}.hasOwnProperty;return t.prototype=n.prototype,e.prototype=new t,e.prototype},withAppended:function(t,e){for(var n=t.length,i=new Array(n+1),o=0;o<n;++o)i[o]=t[o];return i[o]=e,i},maybeWrapAsError:function(t){return o(t)?new Error(a(t)):t},toFastProperties:function(t){for(var e=8;e--;);return t},filledRange:function(t,e,n){for(var i=new Array(t),o=0;o<t;++o)i[o]=e+o+n;return i},toString:a,canAttachTrace:l,ensureErrorObject:y,originatesFromRejection:function(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)},markAsOriginatingFromRejection:function(t){try{r(t,"isOperational",!0)}catch(t){}},classString:c,copyDescriptors:function(t,e,n){for(var i=h.names(t),o=0;o<i.length;++o){var r=i[o];if(n(r))try{h.defineProperty(e,r,h.getDescriptor(t,r))}catch(t){}}},hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:w,env:function(t,e){return w?process.env[t]:e},global:g,getNativePromise:function(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}};y.isRecentNode=y.isNode&&(0===(g=process.versions.node.split(".").map(Number))[0]&&10<g[1]||0<g[0]),y.isNode&&y.toFastProperties(process);try{throw new Error}catch(t){y.lastLineError=t}e.exports=y},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.download=e()}(this,function(){return function e(t,n,i){var o,r=window,a="application/octet-stream",s=i||a,l=t,t=!n&&!i&&l,c=document.createElement("a"),i=function(t){return String(t)},u=r.Blob||r.MozBlob||r.WebKitBlob||i,d=n||"download",u=u.call?u.bind(r):Blob;if("true"===String(this)&&(s=(l=[l,s])[0],l=l[1]),t&&t.length<2048&&(d=t.split("/").pop().split("?")[0],c.href=t,-1!==c.href.indexOf(t))){var h=new XMLHttpRequest;return h.open("GET",t,!0),h.responseType="blob",h.onload=function(t){e(t.target.response,d,a)},setTimeout(function(){h.send()},0),h}if(/^data\:[\w+\-]+\/[\w+\-]+[,;]/.test(l)){if(!(2096103.424<l.length&&u!==i))return navigator.msSaveBlob?navigator.msSaveBlob(p(l),d):f(l);s=(l=p(l)).type||a}function p(t){for(var e=t.split(/[:;,]/),t=e[1],n=("base64"==e[2]?atob:decodeURIComponent)(e.pop()),i=n.length,o=0,r=new Uint8Array(i);o<i;++o)r[o]=n.charCodeAt(o);return new u([r],{type:t})}function f(t,e){if("download"in c)return c.href=t,c.setAttribute("download",d),c.className="download-js-link",c.innerHTML="downloading...",c.style.display="none",document.body.appendChild(c),setTimeout(function(){c.click(),document.body.removeChild(c),!0===e&&setTimeout(function(){r.URL.revokeObjectURL(c.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return t=t.replace(/^data:([\w\/\-\+]+)/,a),window.open(t)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=t),!0;var n=document.createElement("iframe");document.body.appendChild(n),e||(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,a)),n.src=t,setTimeout(function(){document.body.removeChild(n)},333)}if(o=l instanceof u?l:new u([l],{type:s}),navigator.msSaveBlob)return navigator.msSaveBlob(o,d);if(r.URL)f(r.URL.createObjectURL(o),!0);else{if("string"==typeof o||o.constructor===i)try{return f("data:"+s+";base64,"+r.btoa(o))}catch(t){return f("data:"+s+","+encodeURIComponent(o))}(i=new FileReader).onload=function(t){f(this.result)},i.readAsDataURL(o)}return!0}}),function(t){"use strict";var e,C,A=t.fabric||(t.fabric={}),n=A.util.object.extend;A.util.object.clone,A.CurvedText?A.warn("fabric.CurvedText is already defined"):((e=A.Text.prototype.stateProperties.concat()).push("radius","spacing","reverse","effect","range","largeFont","smallFont"),t=A.Text.prototype._dimensionAffectingProps.concat(["radius","spacing","reverse","fill","effect","width","height","range","fontSize","shadow","largeFont","smallFont"]),C=["backgroundColor","textBackgroundColor","textDecoration","stroke","strokeWidth","shadow","fontWeight","fontStyle","strokeWidth","textAlign"],A.CurvedText=A.util.createClass(A.Text,A.Collection,{type:"curvedText",radius:50,range:5,smallFont:10,largeFont:30,effect:"curved",spacing:20,reverse:!1,stateProperties:e,_dimensionAffectingProps:t,_isRendering:0,complexity:function(){this.callSuper("complexity")},initialize:function(t,e){e=e||{},this.__skipDimension=!0,delete e.text,this.setOptions(e),this.__skipDimension=!1,2<=parseFloat(A.version)&&this.callSuper("initialize",t,e),this.letters=new A.Group([],{selectable:!1,padding:0}),this.setText(t)},setText:function(t){if(this.letters){for(;this.letters.size();)this.letters.remove(this.letters.item(0));for(var e=0;e<t.length;e++)void 0===this.letters.item(e)?this.letters.add(new A.Text(t[e])):this.letters.item(e).text=t[e]}this.text=t;for(e=this.letters.size();e--;)this.letters.item(e).set({objectCaching:!1,fill:this.fill,stroke:this.stroke,strokeWidth:this.strokeWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontWeight:this.fontWeight,underline:this.underline,overline:this.overline,linethrough:this.linethrough,lineHeight:this.lineHeight});this._updateLetters(),this.canvas&&this.canvas.renderAll()},_initDimensions:function(t){this.__skipDimension||(t||(t=A.util.createCanvasElement().getContext("2d"),this._setTextStyles(t)),this._textLines=this.text.split(this._reNewline),this._clearCache(),t=this.textAlign,this.textAlign="left",this.width=this.get("width"),this.textAlign=t,this.height=this.get("height"),this._updateLetters())},_updateLetters:function(){var t=A.util.getRandomInt(100,999);if(this._isRendering=t,this.letters&&this.text){var e=0,n=0,i=0,o=parseInt(this.spacing),r=0;if("curved"===this.effect){for(var a=0,s=this.text.length;a<s;a++)i+=this.letters.item(a).width+o;i-=o}else"arc"===this.effect&&(r=(this.letters.item(0).fontSize+o)/this.radius/(Math.PI/180),i=(this.text.length+1)*(this.letters.item(0).fontSize+o));e="right"===this.get("textAlign")?90-i/2/this.radius/(Math.PI/180):"left"===this.get("textAlign")?-90-i/2/this.radius/(Math.PI/180):-(i/2/this.radius/(Math.PI/180)),this.reverse&&(e=-e);for(var l,c,u,d,h,p,f,g=0,m=this.reverse?-1:1,v=0,a=0,s=this.text.length;a<s;a++){if(t!==this._isRendering)return;for(var b in C)this.letters.item(a).set(b,this.get(b));this.letters.item(a).set("left",g),this.letters.item(a).set("top",0),this.letters.item(a).set("angle",0),this.letters.item(a).set("padding",0),"curved"===this.effect?(l=(this.letters.item(a).width+o)/this.radius/(Math.PI/180),n=(e=m*(m*e+v))*(Math.PI/180),v=l,this.letters.item(a).set("angle",e),this.letters.item(a).set("top",-1*m*(Math.cos(n)*this.radius)),this.letters.item(a).set("left",m*(Math.sin(n)*this.radius)),this.letters.item(a).set("padding",0),this.letters.item(a).set("selectable",!1)):"arc"===this.effect?(n=(e=m*(m*e+r))*(Math.PI/180),this.letters.item(a).set("top",-1*m*(Math.cos(n)*this.radius)),this.letters.item(a).set("left",m*(Math.sin(n)*this.radius)),this.letters.item(a).set("padding",0),this.letters.item(a).set("selectable",!1)):"STRAIGHT"===this.effect?(this.letters.item(a).set("left",g),this.letters.item(a).set("top",0),this.letters.item(a).set("angle",0),g+=this.letters.item(a).get("width"),this.letters.item(a).set("padding",0),this.letters.item(a).set({borderColor:"red",cornerColor:"green",cornerSize:6,transparentCorners:!1}),this.letters.item(a).set("selectable",!1)):"smallToLarge"===this.effect?(c=parseInt(this.smallFont),d=(u=parseInt(this.largeFont))-c,h=Math.ceil(this.text.length/2),f=c+a*(p=d/this.text.length),this.letters.item(a).set("fontSize",f),this.letters.item(a).set("left",g),g+=this.letters.item(a).get("width"),this.letters.item(a).set("padding",0),this.letters.item(a).set("selectable",!1),this.letters.item(a).set("top",-1*this.letters.item(a).get("fontSize")+a)):"largeToSmallTop"===this.effect?(c=parseInt(this.largeFont),d=(u=parseInt(this.smallFont))-c,h=Math.ceil(this.text.length/2),f=c+a*(p=d/this.text.length),this.letters.item(a).set("fontSize",f),this.letters.item(a).set("left",g),g+=this.letters.item(a).get("width"),this.letters.item(a).set("padding",0),this.letters.item(a).set({borderColor:"red",cornerColor:"green",cornerSize:6,transparentCorners:!1}),this.letters.item(a).set("padding",0),this.letters.item(a).set("selectable",!1),this.letters.item(a).top=-1*this.letters.item(a).get("fontSize")+a/this.text.length):"largeToSmallBottom"===this.effect?(c=parseInt(this.largeFont),d=(u=parseInt(this.smallFont))-c,h=Math.ceil(this.text.length/2),f=c+a*(p=d/this.text.length),this.letters.item(a).set("fontSize",f),this.letters.item(a).set("left",g),g+=this.letters.item(a).get("width"),this.letters.item(a).set("padding",0),this.letters.item(a).set({borderColor:"red",cornerColor:"green",cornerSize:6,transparentCorners:!1}),this.letters.item(a).set("padding",0),this.letters.item(a).set("selectable",!1),this.letters.item(a).top=-1*this.letters.item(a).get("fontSize")-a):"bulge"===this.effect&&(c=parseInt(this.smallFont),d=(u=parseInt(this.largeFont))-c,h=Math.ceil(this.text.length/2),p=d/(this.text.length-h),f=a<h?c+a*p:u-(a-h+1)*p,this.letters.item(a).set("fontSize",f),this.letters.item(a).set("left",g),g+=this.letters.item(a).get("width"),this.letters.item(a).set("padding",0),this.letters.item(a).set("selectable",!1),this.letters.item(a).set("top",-1*this.letters.item(a).get("height")/2))}var y=this.letters.get("scaleX"),w=this.letters.get("scaleY"),x=this.letters.get("angle");this.letters.set("scaleX",1),this.letters.set("scaleY",1),this.letters.set("angle",0),this.letters._calcBounds(),this.letters._updateObjectsCoords(),this.letters.set("scaleX",y),this.letters.set("scaleY",w),this.letters.set("angle",x),this.width=this.letters.width,this.height=this.letters.height,this.letters.left=-this.letters.width/2,this.letters.top=-this.letters.height/2}},render:function(t){if(this.visible&&this.letters){t.save(),this.transform(t);Math.max(this.scaleX,this.scaleY);this.clipTo&&A.util.clipContext(this,t);for(var e=0,n=this.letters.size();e<n;e++){var i=this.letters.item(e);i.borderScaleFactor,i.hasRotatingPoint;i.visible&&i.render(t)}this.clipTo&&t.restore(),t.restore(),this.setCoords()}},_set:function(t,e){if("text"!==t){if(this.callSuper("_set",t,e),this.text&&this.letters){if(-1===["angle","left","top","scaleX","scaleY","width","height"].indexOf(t))for(var n=this.letters.size();n--;)this.letters.item(n).set(t,e);-1!==this._dimensionAffectingProps.indexOf(t)&&(this._updateLetters(),this.setCoords())}}else this.setText(e)},initDimensions:function(){},toObject:function(t){t=n(this.callSuper("toObject",t),{radius:this.radius,spacing:this.spacing,reverse:this.reverse,effect:this.effect,range:this.range,smallFont:this.smallFont,largeFont:this.largeFont});return this.includeDefaultValues||this._removeDefaultValues(t),t},toString:function(){return"#<fabric.CurvedText ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'", "radius": "'+this.radius+'", "spacing": "'+this.spacing+'", "reverse": "'+this.reverse+'" }>'},toSVG:function(t){var e=0==A.version.search("3.")?["<g ",this.getSvgTransform(),">"]:["<g ",'transform="',this.getSvgTransform(),'">'];if(this.letters)for(var n=0,i=this.letters.size();n<i;n++)e.push(this.letters.item(n).toSVG(t));return e.push("</g>"),t?t(e.join("")):e.join("")}}),A.CurvedText.fromObject=function(t,e){return A.Object._fromObject("CurvedText",t,e,"text")},A.CurvedText.async=!1)}("undefined"!=typeof exports?exports:this),function(o,s,c){"use strict";var r,a=["","webkit","Moz","MS","ms","o"],t=s.createElement("div"),n="function",l=Math.round,u=Math.abs,d=Date.now;function h(t,e,n){return setTimeout(v(t,n),e)}function i(t,e,n){return Array.isArray(t)&&(p(t,n[e],n),1)}function p(t,e,n){if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==c)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(var i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function e(n,t,e){var i="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),e=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",t=o.console&&(o.console.warn||o.console.log);return t&&t.call(o.console,i,e),n.apply(this,arguments)}}r="function"!=typeof Object.assign?function(t){if(t===c||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==c&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])}return e}:Object.assign;var f=e(function(t,e,n){for(var i=Object.keys(e),o=0;o<i.length;)(!n||n&&t[i[o]]===c)&&(t[i[o]]=e[i[o]]),o++;return t},"extend","Use `assign`."),g=e(function(t,e){return f(t,e,!0)},"merge","Use `assign`.");function m(t,e,n){var i=e.prototype,e=t.prototype=Object.create(i);e.constructor=t,e._super=i,n&&r(e,n)}function v(t,e){return function(){return t.apply(e,arguments)}}function b(t,e){return typeof t==n?t.apply(e&&e[0]||c,e):t}function y(t,e){return t===c?e:t}function w(e,t,n){p(D(t),function(t){e.addEventListener(t,n,!1)})}function x(e,t,n){p(D(t),function(t){e.removeEventListener(t,n,!1)})}function C(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function A(t,e){return-1<t.indexOf(e)}function D(t){return t.trim().split(/\s+/g)}function S(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function _(t){return Array.prototype.slice.call(t,0)}function P(t,n,e){for(var i=[],o=[],r=0;r<t.length;){var a=n?t[r][n]:t[r];S(o,a)<0&&i.push(t[r]),o[r]=a,r++}return e&&(i=n?i.sort(function(t,e){return t[n]>e[n]}):i.sort()),i}function k(t,e){for(var n,i=e[0].toUpperCase()+e.slice(1),o=0;o<a.length;){if((n=(n=a[o])?n+i:e)in t)return n;o++}return c}var F=1;function I(t){t=t.ownerDocument||t;return t.defaultView||t.parentWindow||o}var E="ontouchstart"in o,L=k(o,"PointerEvent")!==c,N=E&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),O="touch",T=25,B=1,M=4,z=8,j=1,R=2,U=4,W=8,H=16,V=R|U,q=W|H,G=V|q,Y=["x","y"],Z=["clientX","clientY"];function J(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function X(t,e,n){var i=n.pointers.length,o=n.changedPointers.length,r=e&B&&i-o==0,o=e&(M|z)&&i-o==0;n.isFirst=!!r,n.isFinal=!!o,r&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,o=i.length;n.firstInput||(n.firstInput=Q(e)),1<o&&!n.firstMultiple?n.firstMultiple=Q(e):1===o&&(n.firstMultiple=!1);var r=n.firstInput,a=n.firstMultiple,s=(a||r).center,o=e.center=K(i);e.timeStamp=d(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=nt(s,o),e.distance=et(s,o),function(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==B&&r.eventType!==M||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}(n,e),e.offsetDirection=tt(e.deltaX,e.deltaY),o=$(e.deltaTime,e.deltaX,e.deltaY),e.overallVelocityX=o.x,e.overallVelocityY=o.y,e.overallVelocity=u(o.x)>u(o.y)?o.x:o.y,e.scale=a?function(t,e){return et(e[0],e[1],Z)/et(t[0],t[1],Z)}(a.pointers,i):1,e.rotation=a?function(t,e){return nt(e[1],e[0],Z)+nt(t[1],t[0],Z)}(a.pointers,i):0,e.maxPointers=!n.prevInput||e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers,function(t,e){var n,i,o,r,a,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;e.eventType!=z&&(T<l||s.velocity===c)?(o=e.deltaX-s.deltaX,r=e.deltaY-s.deltaY,a=$(l,o,r),n=a.x,i=a.y,a=u(a.x)>u(a.y)?a.x:a.y,r=tt(o,r),t.lastInterval=e):(a=s.velocity,n=s.velocityX,i=s.velocityY,r=s.direction),e.velocity=a,e.velocityX=n,e.velocityY=i,e.direction=r}(n,e),t=t.element,C(e.srcEvent.target,t)&&(t=e.srcEvent.target),e.target=t}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function Q(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:d(),pointers:e,center:K(e),deltaX:t.deltaX,deltaY:t.deltaY}}function K(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,i=0,o=0;o<e;)n+=t[o].clientX,i+=t[o].clientY,o++;return{x:l(n/e),y:l(i/e)}}function $(t,e,n){return{x:e/t||0,y:n/t||0}}function tt(t,e){return t===e?j:u(t)>=u(e)?t<0?R:U:e<0?W:H}function et(t,e,n){var i=e[(n=n||Y)[0]]-t[n[0]],n=e[n[1]]-t[n[1]];return Math.sqrt(i*i+n*n)}function nt(t,e,n){var i=e[(n=n||Y)[0]]-t[n[0]],n=e[n[1]]-t[n[1]];return 180*Math.atan2(n,i)/Math.PI}J.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(I(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(I(this.element),this.evWin,this.domHandler)}};var it={mousedown:B,mousemove:2,mouseup:M},ot="mousedown",rt="mousemove mouseup";function at(){this.evEl=ot,this.evWin=rt,this.pressed=!1,J.apply(this,arguments)}m(at,J,{handler:function(t){var e=it[t.type];e&B&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=M),this.pressed&&(e&M&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var st={pointerdown:B,pointermove:2,pointerup:M,pointercancel:z,pointerout:z},lt={2:O,3:"pen",4:"mouse",5:"kinect"},ct="pointerdown",ut="pointermove pointerup pointercancel";function dt(){this.evEl=ct,this.evWin=ut,J.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(ct="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),m(dt,J,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),o=st[i],r=lt[t.pointerType]||t.pointerType,a=r==O,i=S(e,t.pointerId,"pointerId");o&B&&(0===t.button||a)?i<0&&(e.push(t),i=e.length-1):o&(M|z)&&(n=!0),i<0||(e[i]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(i,1))}});var ht={touchstart:B,touchmove:2,touchend:M,touchcancel:z};function pt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,J.apply(this,arguments)}m(pt,J,{handler:function(t){var e,n=ht[t.type];n===B&&(this.started=!0),this.started&&(e=function(t,e){var n=_(t.touches),t=_(t.changedTouches);e&(M|z)&&(n=P(n.concat(t),"identifier",!0));return[n,t]}.call(this,t,n),n&(M|z)&&e[0].length-e[1].length==0&&(this.started=!1),this.callback(this.manager,n,{pointers:e[0],changedPointers:e[1],pointerType:O,srcEvent:t}))}});var ft={touchstart:B,touchmove:2,touchend:M,touchcancel:z},gt="touchstart touchmove touchend touchcancel";function mt(){this.evTarget=gt,this.targetIds={},J.apply(this,arguments)}m(mt,J,{handler:function(t){var e=ft[t.type],n=function(t,e){var n=_(t.touches),i=this.targetIds;if(e&(2|B)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,a=_(t.changedTouches),s=[],l=this.target;if(r=n.filter(function(t){return C(t.target,l)}),e===B)for(o=0;o<r.length;)i[r[o].identifier]=!0,o++;o=0;for(;o<a.length;)i[a[o].identifier]&&s.push(a[o]),e&(M|z)&&delete i[a[o].identifier],o++;return s.length?[P(r.concat(s),"identifier",!0),s]:void 0}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:O,srcEvent:t})}});var vt=2500;function bt(){J.apply(this,arguments);var t=v(this.handler,this);this.touch=new mt(this.manager,t),this.mouse=new at(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function yt(t){var e,n,t=t.changedPointers[0];t.identifier===this.primaryTouch&&(e={x:t.clientX,y:t.clientY},this.lastTouches.push(e),n=this.lastTouches,setTimeout(function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)},vt))}m(bt,J,{handler:function(t,e,n){var i=n.pointerType==O,o="mouse"==n.pointerType;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&B?(this.primaryTouch=e.changedPointers[0].identifier,yt.call(this,e)):t&(M|z)&&yt.call(this,e)}).call(this,e,n);else if(o&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var o=this.lastTouches[i],r=Math.abs(e-o.x),o=Math.abs(n-o.y);if(r<=25&&o<=25)return!0}return!1}.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var wt=k(t.style,"touchAction"),xt=wt!==c,Ct="manipulation",At="none",Dt="pan-x",St="pan-y",_t=function(){if(!xt)return!1;var e={},n=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){e[t]=!n||o.CSS.supports("touch-action",t)}),e}();function Pt(t,e){this.manager=t,this.set(e)}Pt.prototype={set:function(t){"compute"==t&&(t=this.compute()),xt&&this.manager.element.style&&_t[t]&&(this.manager.element.style[wt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return p(this.manager.recognizers,function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(A(t,At))return At;var e=A(t,Dt),n=A(t,St);if(e&&n)return At;if(e||n)return e?Dt:St;if(A(t,Ct))return Ct;return"auto"}(e.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,o=A(i,At)&&!_t.none,r=A(i,St)&&!_t[St],a=A(i,Dt)&&!_t[Dt];if(o){var s=1===t.pointers.length,i=t.distance<2,t=t.deltaTime<250;if(s&&i&&t)return}if(!a||!r)return o||r&&n&V||a&&n&q?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var kt=1;function Ft(t){this.options=r({},this.defaults,t||{}),this.id=F++,this.manager=null,this.options.enable=y(this.options.enable,!0),this.state=kt,this.simultaneous={},this.requireFail=[]}function It(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Et(t){return t==H?"down":t==W?"up":t==R?"left":t==U?"right":""}function Lt(t,e){e=e.manager;return e?e.get(t):t}function Nt(){Ft.apply(this,arguments)}function Ot(){Nt.apply(this,arguments),this.pX=null,this.pY=null}function Tt(){Nt.apply(this,arguments)}function Bt(){Ft.apply(this,arguments),this._timer=null,this._input=null}function Mt(){Nt.apply(this,arguments)}function zt(){Nt.apply(this,arguments)}function jt(){Ft.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Rt(t,e){return(e=e||{}).recognizers=y(e.recognizers,Rt.defaults.preset),new Ut(t,e)}function Ut(t,e){this.options=r({},Rt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((t=this).options.inputClass||(L?dt:N?mt:E?bt:at))(t,X),this.touchAction=new Pt(this,this.options.touchAction),Wt(this,!0),p(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Wt(n,i){var o,r=n.element;r.style&&(p(n.options.cssProps,function(t,e){o=k(r.style,e),i?(n.oldCssProps[o]=r.style[o],r.style[o]=t):r.style[o]=n.oldCssProps[o]||""}),i||(n.oldCssProps={}))}Ft.prototype={defaults:{},set:function(t){return r(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(i(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Lt(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},dropRecognizeWith:function(t){return i(t,"dropRecognizeWith",this)||(t=Lt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(i(t,"requireFailure",this))return this;var e=this.requireFail;return-1===S(e,t=Lt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(i(t,"dropRequireFailure",this))return this;t=Lt(t,this);t=S(this.requireFail,t);return-1<t&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return 0<this.requireFail.length},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(e){var n=this,t=this.state;function i(t){n.manager.emit(t,e)}t<8&&i(n.options.event+It(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+It(t))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|kt)))return!1;t++}return!0},recognize:function(t){t=r({},t);if(!b(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=kt),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(t){},getTouchAction:function(){},reset:function(){}},m(Nt,Ft,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=6&e,t=this.attrTest(t);return i&&(n&z||!t)?16|e:i||t?n&M?8|e:2&e?4|e:2:32}}),m(Ot,Nt,{defaults:{event:"pan",threshold:10,pointers:1,direction:G},getTouchAction:function(){var t=this.options.direction,e=[];return t&V&&e.push(St),t&q&&e.push(Dt),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,o=t.direction,r=t.deltaX,a=t.deltaY;return o&e.direction||(i=e.direction&V?(o=0===r?j:r<0?R:U,n=r!=this.pX,Math.abs(t.deltaX)):(o=0===a?j:a<0?W:H,n=a!=this.pY,Math.abs(t.deltaY))),t.direction=o,n&&i>e.threshold&&o&e.direction},attrTest:function(t){return Nt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),m(Tt,Nt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[At]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){var e;1!==t.scale&&(e=t.scale<1?"in":"out",t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),m(Bt,Ft,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,o=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(M|z)&&!o)this.reset();else if(t.eventType&B)this.reset(),this._timer=h(function(){this.state=8,this.tryEmit()},e.time,this);else if(t.eventType&M)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&M?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),m(Mt,Nt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[At]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),m(zt,Nt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:V|q,pointers:1},getTouchAction:function(){return Ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(V|q)?e=t.overallVelocity:n&V?e=t.overallVelocityX:n&q&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&u(e)>this.options.velocity&&t.eventType&M},emit:function(t){var e=Et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),m(jt,Ft,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ct]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,o=t.deltaTime<e.time;if(this.reset(),t.eventType&B&&0===this.count)return this.failTimeout();if(i&&o&&n){if(t.eventType!=M)return this.failTimeout();o=!this.pTime||t.timeStamp-this.pTime<e.interval,n=!this.pCenter||et(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,n&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=h(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=h(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Rt.VERSION="2.0.8",Rt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[Mt,{enable:!1}],[Tt,{enable:!1},["rotate"]],[zt,{direction:V}],[Ot,{direction:V},["swipe"]],[jt],[jt,{event:"doubletap",taps:2},["tap"]],[Bt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ut.prototype={set:function(t){return r(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e,n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var i=this.recognizers,o=n.curRecognizer;(!o||o&&8&o.state)&&(o=n.curRecognizer=null);for(var r=0;r<i.length;)e=i[r],2===n.stopped||o&&e!=o&&!e.canRecognizeWith(o)?e.reset():e.recognize(t),!o&&14&e.state&&(o=n.curRecognizer=e),r++}},get:function(t){if(t instanceof Ft)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(i(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},remove:function(t){return i(t,"remove",this)||!(t=this.get(t))||-1!==(t=S(e=this.recognizers,t))&&(e.splice(t,1),this.touchAction.update()),this;var e},on:function(t,e){if(t!==c&&e!==c){var n=this.handlers;return p(D(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==c){var n=this.handlers;return p(D(t),function(t){e?n[t]&&n[t].splice(S(n[t],e),1):delete n[t]}),this}},emit:function(t,e){var n,i,o;this.options.domEvents&&(n=t,i=e,(o=s.createEvent("Event")).initEvent(n,!0,!0),(o.gesture=i).target.dispatchEvent(o));var r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var a=0;a<r.length;)r[a](e),a++}},destroy:function(){this.element&&Wt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},r(Rt,{INPUT_START:B,INPUT_MOVE:2,INPUT_END:M,INPUT_CANCEL:z,STATE_POSSIBLE:kt,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:j,DIRECTION_LEFT:R,DIRECTION_RIGHT:U,DIRECTION_UP:W,DIRECTION_DOWN:H,DIRECTION_HORIZONTAL:V,DIRECTION_VERTICAL:q,DIRECTION_ALL:G,Manager:Ut,Input:J,TouchAction:Pt,TouchInput:mt,MouseInput:at,PointerEventInput:dt,TouchMouseInput:bt,SingleTouchInput:pt,Recognizer:Ft,AttrRecognizer:Nt,Tap:jt,Pan:Ot,Swipe:zt,Pinch:Tt,Rotate:Mt,Press:Bt,on:w,off:x,each:p,merge:g,extend:f,assign:r,inherit:m,bindFn:v,prefixed:k}),(void 0!==o?o:"undefined"!=typeof self?self:{}).Hammer=Rt,"function"==typeof define&&define.amd?define(function(){return Rt}):"undefined"!=typeof module&&module.exports?module.exports=Rt:o.Hammer=Rt}(window,document),this.JpegMeta)throw Error("Library included multiple times");var QRCode,JpegMeta={stringIsClean:function(t){for(var e=0;e<t.length;e++)if(t.charCodeAt(e)<32)return!1;return!0},parseNum:function(t,e,n,i){var o,r,a=">"===t;for(void 0===n&&(n=0),void 0===i&&(i=e.length-n),o=a?n:n+i-1;a?o<n+i:n<=o;a?o++:o--)r<<=8,r+=e.charCodeAt(o);return r},parseSnum:function(t,e,n,i){var o,r,a,s=">"===t;for(void 0===n&&(n=0),void 0===i&&(i=e.length-n),o=s?n:n+i-1;s?o<n+i:n<=o;s?o++:o--)void 0===a&&(a=128==(128&e.charCodeAt(o))),r<<=8,r+=a?255&~e.charCodeAt(o):e.charCodeAt(o);return a&&(r+=1,r*=-1),r},Rational:function(t,e){return this.num=t,this.den=e||1,this}};JpegMeta.Rational.prototype.toString=function(){return 0===this.num||1===this.den?""+this.num:1===this.num?this.num+" / "+this.den:this.num/this.den},JpegMeta.Rational.prototype.asFloat=function(){return this.num/this.den},JpegMeta.MetaGroup=function(t,e){return this.fieldName=t,this.description=e,this.metaProps={},this},JpegMeta.MetaGroup.prototype._addProperty=function(t,e,n){n=new JpegMeta.MetaProp(t,e,n);this[n.fieldName]=n,this.metaProps[n.fieldName]=n},JpegMeta.MetaGroup.prototype.toString=function(){return"[MetaGroup "+this.description+"]"},JpegMeta.MetaProp=function(t,e,n){return this.fieldName=t,this.description=e,this.value=n,this},JpegMeta.MetaProp.prototype.toString=function(){return""+this.value},this.JpegMeta.JpegFile=function(t,e){var n=this._SOS;this.metaGroups={},this._binary_data=t,this.filename=e;var i,o,r,a,s,l=0;if(this._binary_data.slice(0,2)!==this._SOI_MARKER)throw new Error("Doesn't look like a JPEG file. First two bytes are "+this._binary_data.charCodeAt(0)+","+this._binary_data.charCodeAt(1)+".");for(l+=2;l<this._binary_data.length&&(o=this._binary_data.charCodeAt(l++),r=this._binary_data.charCodeAt(l++),i=l,o==this._DELIM)&&r!==n;){for(l+=JpegMeta.parseNum(">",this._binary_data,l,2);l<this._binary_data.length;)if(o=this._binary_data.charCodeAt(l++),o==this._DELIM&&0!=this._binary_data.charCodeAt(l++)){l-=2;break}a=l-i,(s=this._markers[r]?(this._markers[r][0],this._markers[r][1]):void 0)&&this[s](r,i+2,a-2)}if(void 0===this.general)throw Error("Invalid JPEG file.");return this},this.JpegMeta.JpegFile.prototype.toString=function(){return"[JpegFile "+this.filename+" "+this.general.type+" "+this.general.pixelWidth+"x"+this.general.pixelHeight+" Depth: "+this.general.depth+"]"},this.JpegMeta.JpegFile.prototype._SOI_MARKER="ÿØ",this.JpegMeta.JpegFile.prototype._DELIM=255,this.JpegMeta.JpegFile.prototype._EOI=217,this.JpegMeta.JpegFile.prototype._SOS=218,this.JpegMeta.JpegFile.prototype._sofHandler=function(t,e){if(void 0!==this.general)throw Error("Unexpected multiple-frame image");this._addMetaGroup("general","General"),this.general._addProperty("depth","Depth",JpegMeta.parseNum(">",this._binary_data,e,1)),this.general._addProperty("pixelHeight","Pixel Height",JpegMeta.parseNum(">",this._binary_data,e+1,2)),this.general._addProperty("pixelWidth","Pixel Width",JpegMeta.parseNum(">",this._binary_data,e+3,2)),this.general._addProperty("type","Type",this._markers[t][2])},this.JpegMeta.JpegFile.prototype._commentHandler=function(t,e,n){var i,o;for(n--,i=++e,o="";i<e+n;)o+=String.fromCharCode(this._binary_data.charCodeAt(i)),i++;this._addMetaGroup("comment","Comment"),this.comment._addProperty("comment","Comment",o)},this.JpegMeta.JpegFile.prototype._JFIF_IDENT="JFIF\0",this.JpegMeta.JpegFile.prototype._JFXX_IDENT="JFXX\0",this.JpegMeta.JpegFile.prototype._EXIF_IDENT="Exif\0",this.JpegMeta.JpegFile.prototype._types={1:["BYTE",1],2:["ASCII",1],3:["SHORT",2],4:["LONG",4],5:["RATIONAL",8],6:["SBYTE",1],7:["UNDEFINED",1],8:["SSHORT",2],9:["SLONG",4],10:["SRATIONAL",8],11:["FLOAT",4],12:["DOUBLE",8]},this.JpegMeta.JpegFile.prototype._tifftags={256:["Image width","ImageWidth"],257:["Image height","ImageLength"],258:["Number of bits per component","BitsPerSample"],259:["Compression scheme","Compression",{1:"uncompressed",6:"JPEG compression"}],262:["Pixel composition","PhotmetricInerpretation",{2:"RGB",6:"YCbCr"}],274:["Orientation of image","Orientation",{1:"Normal",2:"Reverse?",3:"Upside-down",4:"Upside-down Reverse",5:"90 degree CW",6:"90 degree CW reverse",7:"90 degree CCW",8:"90 degree CCW reverse"}],277:["Number of components","SamplesPerPixel"],284:["Image data arrangement","PlanarConfiguration",{1:"chunky format",2:"planar format"}],530:["Subsampling ratio of Y to C","YCbCrSubSampling"],531:["Y and C positioning","YCbCrPositioning",{1:"centered",2:"co-sited"}],282:["X Resolution","XResolution"],283:["Y Resolution","YResolution"],296:["Resolution Unit","ResolutionUnit",{2:"inches",3:"centimeters"}],273:["Image data location","StripOffsets"],278:["Number of rows per strip","RowsPerStrip"],279:["Bytes per compressed strip","StripByteCounts"],513:["Offset to JPEG SOI","JPEGInterchangeFormat"],514:["Bytes of JPEG Data","JPEGInterchangeFormatLength"],301:["Transfer function","TransferFunction"],318:["White point chromaticity","WhitePoint"],319:["Chromaticities of primaries","PrimaryChromaticities"],529:["Color space transformation matrix coefficients","YCbCrCoefficients"],532:["Pair of black and white reference values","ReferenceBlackWhite"],306:["Date and time","DateTime"],270:["Image title","ImageDescription"],271:["Make","Make"],272:["Model","Model"],305:["Software","Software"],315:["Person who created the image","Artist"],316:["Host Computer","HostComputer"],33432:["Copyright holder","Copyright"],34665:["Exif tag","ExifIfdPointer"],34853:["GPS tag","GPSInfoIfdPointer"]},this.JpegMeta.JpegFile.prototype._exiftags={36864:["Exif Version","ExifVersion"],40960:["FlashPix Version","FlashpixVersion"],40961:["Color Space","ColorSpace"],37121:["Meaning of each component","ComponentsConfiguration"],37122:["Compressed Bits Per Pixel","CompressedBitsPerPixel"],40962:["Pixel X Dimension","PixelXDimension"],40963:["Pixel Y Dimension","PixelYDimension"],37500:["Manufacturer notes","MakerNote"],37510:["User comments","UserComment"],40964:["Related audio file","RelatedSoundFile"],36867:["Date Time Original","DateTimeOriginal"],36868:["Date Time Digitized","DateTimeDigitized"],37520:["DateTime subseconds","SubSecTime"],37521:["DateTimeOriginal subseconds","SubSecTimeOriginal"],37522:["DateTimeDigitized subseconds","SubSecTimeDigitized"],33434:["Exposure time","ExposureTime"],33437:["FNumber","FNumber"],34850:["Exposure program","ExposureProgram"],34852:["Spectral sensitivity","SpectralSensitivity"],34855:["ISO Speed Ratings","ISOSpeedRatings"],34856:["Optoelectric coefficient","OECF"],37377:["Shutter Speed","ShutterSpeedValue"],37378:["Aperture Value","ApertureValue"],37379:["Brightness","BrightnessValue"],37380:["Exposure Bias Value","ExposureBiasValue"],37381:["Max Aperture Value","MaxApertureValue"],37382:["Subject Distance","SubjectDistance"],37383:["Metering Mode","MeteringMode"],37384:["Light Source","LightSource"],37385:["Flash","Flash"],37386:["Focal Length","FocalLength"],37396:["Subject Area","SubjectArea"],41483:["Flash Energy","FlashEnergy"],41484:["Spatial Frequency Response","SpatialFrequencyResponse"],41486:["Focal Plane X Resolution","FocalPlaneXResolution"],41487:["Focal Plane Y Resolution","FocalPlaneYResolution"],41488:["Focal Plane Resolution Unit","FocalPlaneResolutionUnit"],41492:["Subject Location","SubjectLocation"],41493:["Exposure Index","ExposureIndex"],41495:["Sensing Method","SensingMethod"],41728:["File Source","FileSource"],41729:["Scene Type","SceneType"],41730:["CFA Pattern","CFAPattern"],41985:["Custom Rendered","CustomRendered"],41986:["Exposure Mode","Exposure Mode"],41987:["White Balance","WhiteBalance"],41988:["Digital Zoom Ratio","DigitalZoomRatio"],41989:["Focal length in 35 mm film","FocalLengthIn35mmFilm"],41990:["Scene Capture Type","SceneCaptureType"],41991:["Gain Control","GainControl"],41992:["Contrast","Contrast"],41993:["Saturation","Saturation"],41994:["Sharpness","Sharpness"],41995:["Device settings description","DeviceSettingDescription"],41996:["Subject distance range","SubjectDistanceRange"],42016:["Unique image ID","ImageUniqueID"],40965:["Interoperability tag","InteroperabilityIFDPointer"]},this.JpegMeta.JpegFile.prototype._gpstags={0:["GPS tag version","GPSVersionID"],1:["North or South Latitude","GPSLatitudeRef"],2:["Latitude","GPSLatitude"],3:["East or West Longitude","GPSLongitudeRef"],4:["Longitude","GPSLongitude"],5:["Altitude reference","GPSAltitudeRef"],6:["Altitude","GPSAltitude"],7:["GPS time (atomic clock)","GPSTimeStamp"],8:["GPS satellites usedd for measurement","GPSSatellites"],9:["GPS receiver status","GPSStatus"],10:["GPS mesaurement mode","GPSMeasureMode"],11:["Measurement precision","GPSDOP"],12:["Speed unit","GPSSpeedRef"],13:["Speed of GPS receiver","GPSSpeed"],14:["Reference for direction of movement","GPSTrackRef"],15:["Direction of movement","GPSTrack"],16:["Reference for direction of image","GPSImgDirectionRef"],17:["Direction of image","GPSImgDirection"],18:["Geodetic survey data used","GPSMapDatum"],19:["Reference for latitude of destination","GPSDestLatitudeRef"],20:["Latitude of destination","GPSDestLatitude"],21:["Reference for longitude of destination","GPSDestLongitudeRef"],22:["Longitude of destination","GPSDestLongitude"],23:["Reference for bearing of destination","GPSDestBearingRef"],24:["Bearing of destination","GPSDestBearing"],25:["Reference for distance to destination","GPSDestDistanceRef"],26:["Distance to destination","GPSDestDistance"],27:["Name of GPS processing method","GPSProcessingMethod"],28:["Name of GPS area","GPSAreaInformation"],29:["GPS Date","GPSDateStamp"],30:["GPS differential correction","GPSDifferential"]},this.JpegMeta.JpegFile.prototype._iptctags={0:["Record Version","recordVersion"],3:["Object Type Reference","objectType"],4:["Object Attribute Reference","objectAttribute"],5:["Object Name","objectName"],7:["Edit Status","editStatus"],8:["Editorial Update","editorialUpdate"],10:["Urgency","urgency"],12:["Subject Reference","subjectRef"],15:["Category","category"],20:["Supplemental Category","supplCategory"],22:["Fixture Identifier","fixtureID"],25:["Keywords","keywords"],26:["Content Location Code","contentLocCode"],27:["Content Location Name","contentLocName"],30:["Release Date","releaseDate"],35:["Release Time","releaseTime"],37:["Expiration Date","expirationDate"],38:["Expiration Time","expirationTime"],40:["Special Instructions","specialInstructions"],42:["Action Advised","actionAdvised"],45:["Reference Service","refService"],47:["Reference Date","refDate"],50:["Reference Number","refNumber"],55:["Date Created","dateCreated"],60:["Time Created","timeCreated"],62:["Digital Creation Date","digitalCreationDate"],63:["Digital Creation Time","digitalCreationTime"],65:["Originating Program","originatingProgram"],70:["Program Version","programVersion"],75:["Object Cycle","objectCycle"],80:["By-line","byline"],85:["By-line Title","bylineTitle"],90:["City","city"],92:["Sub-location","sublocation"],95:["Province/State","state"],100:["Country Code","countryCode"],101:["Country Name","countryName"],103:["Original Transmission Reference","origTransRef"],105:["Headline","headline"],110:["Credit","credit"],115:["Source","source"],116:["Copyright Notice","copyrightNotice"],118:["Contact","contact"],120:["Caption/Abstract","caption"],122:["Writer/Editor","writerEditor"],125:["Rasterized Caption","rasterizedCaption"],130:["Image Type","imageType"],131:["Image Orientation","imageOrientation"],135:["Language Identifier","languageID"],150:["Audio Type","audioType"],151:["Audio Sampling Rate","audioSamplingRate"],152:["Audio Sampling Resolution","audioSamplingRes"],153:["Audio Duration","audioDuration"],154:["Audio Outcue","audioOutcue"],200:["Preview File Format","previewFileFormat"],201:["Preview File Format Version","previewFileFormatVer"],202:["Preview Data","previewData"]},this.JpegMeta.JpegFile.prototype._markers={192:["SOF0","_sofHandler","Baseline DCT"],193:["SOF1","_sofHandler","Extended sequential DCT"],194:["SOF2","_sofHandler","Progressive DCT"],195:["SOF3","_sofHandler","Lossless (sequential)"],197:["SOF5","_sofHandler","Differential sequential DCT"],198:["SOF6","_sofHandler","Differential progressive DCT"],199:["SOF7","_sofHandler","Differential lossless (sequential)"],200:["JPG",null,"Reserved for JPEG extensions"],201:["SOF9","_sofHandler","Extended sequential DCT"],202:["SOF10","_sofHandler","Progressive DCT"],203:["SOF11","_sofHandler","Lossless (sequential)"],205:["SOF13","_sofHandler","Differential sequential DCT"],206:["SOF14","_sofHandler","Differential progressive DCT"],207:["SOF15","_sofHandler","Differential lossless (sequential)"],196:["DHT",null,"Define Huffman table(s)"],204:["DAC",null,"Define arithmetic coding conditioning(s)"],208:["RST0",null,"Restart with modulo 8 count �0�"],209:["RST1",null,"Restart with modulo 8 count �1�"],210:["RST2",null,"Restart with modulo 8 count �2�"],211:["RST3",null,"Restart with modulo 8 count �3�"],212:["RST4",null,"Restart with modulo 8 count �4�"],213:["RST5",null,"Restart with modulo 8 count �5�"],214:["RST6",null,"Restart with modulo 8 count �6�"],215:["RST7",null,"Restart with modulo 8 count �7�"],216:["SOI",null,"Start of image"],217:["EOI",null,"End of image"],218:["SOS",null,"Start of scan"],219:["DQT",null,"Define quantization table(s)"],220:["DNL",null,"Define number of lines"],221:["DRI",null,"Define restart interval"],222:["DHP",null,"Define hierarchical progression"],223:["EXP",null,"Expand reference component(s)"],224:["APP0","_app0Handler","Reserved for application segments"],225:["APP1","_app1Handler"],226:["APP2",null],227:["APP3",null],228:["APP4",null],229:["APP5",null],230:["APP6",null],231:["APP7",null],232:["APP8",null],233:["APP9",null],234:["APP10",null],235:["APP11",null],236:["APP12",null],237:["IPTC","_iptcHandler","IPTC Photo Metadata"],238:["APP14",null],239:["APP15",null],240:["JPG0",null],241:["JPG1",null],242:["JPG2",null],243:["JPG3",null],244:["JPG4",null],245:["JPG5",null],246:["JPG6",null],247:["JPG7",null],248:["JPG8",null],249:["JPG9",null],250:["JPG10",null],251:["JPG11",null],252:["JPG12",null],253:["JPG13",null],254:["COM","_commentHandler","Comment"],1:["JPG13",null]},this.JpegMeta.JpegFile.prototype._addMetaGroup=function(t,e){e=new JpegMeta.MetaGroup(t,e);return this[e.fieldName]=e,this.metaGroups[e.fieldName]=e},this.JpegMeta.JpegFile.prototype._parseIfd=function(t,e,n,i,o,r,a){for(var s,l,c,u,d,h,p,f,g,m,v=JpegMeta.parseNum(t,e,n+i,2),b=this._addMetaGroup(r,a),y=0;y<v;y++)if(s=n+i+2+12*y,l=JpegMeta.parseNum(t,e,s,2),u=JpegMeta.parseNum(t,e,s+2,2),h=JpegMeta.parseNum(t,e,s+4,4),p=JpegMeta.parseNum(t,e,s+8,4),void 0!==this._types[u]){if(c=this._types[u][0],p=(d=this._types[u][1])*h<=4?s+8:n+p,"UNDEFINED"==c)f=void 0;else if("ASCII"==c)f=(f=e.slice(p,p+h)).split("\0")[0],JpegMeta.stringIsClean(f)||(f="");else{f=new Array;for(var w=0;w<h;w++,p+=d)"BYTE"!=c&&"SHORT"!=c&&"LONG"!=c||f.push(JpegMeta.parseNum(t,e,p,d)),"SBYTE"!=c&&"SSHORT"!=c&&"SLONG"!=c||f.push(JpegMeta.parseSnum(t,e,p,d)),"RATIONAL"==c&&(g=JpegMeta.parseNum(t,e,p,4),m=JpegMeta.parseNum(t,e,p+4,4),f.push(new JpegMeta.Rational(g,m))),"SRATIONAL"==c&&(g=JpegMeta.parseSnum(t,e,p,4),m=JpegMeta.parseSnum(t,e,p+4,4),f.push(new JpegMeta.Rational(g,m))),f.push();1===h&&(f=f[0])}o.hasOwnProperty(l)?b._addProperty(o[l][1],o[l][0],f):console.log("WARNING(jpegmeta.js): Unknown tag: ",l)}},this.JpegMeta.JpegFile.prototype._jfifHandler=function(t,e){if(void 0!==this.jfif)throw Error("Multiple JFIF segments found");this._addMetaGroup("jfif","JFIF"),this.jfif._addProperty("version_major","Version Major",this._binary_data.charCodeAt(e+5)),this.jfif._addProperty("version_minor","Version Minor",this._binary_data.charCodeAt(e+6)),this.jfif._addProperty("version","JFIF Version",this.jfif.version_major.value+"."+this.jfif.version_minor.value),this.jfif._addProperty("units","Density Unit",this._binary_data.charCodeAt(e+7)),this.jfif._addProperty("Xdensity","X density",JpegMeta.parseNum(">",this._binary_data,e+8,2)),this.jfif._addProperty("Ydensity","Y Density",JpegMeta.parseNum(">",this._binary_data,e+10,2)),this.jfif._addProperty("Xthumbnail","X Thumbnail",JpegMeta.parseNum(">",this._binary_data,e+12,1)),this.jfif._addProperty("Ythumbnail","Y Thumbnail",JpegMeta.parseNum(">",this._binary_data,e+13,1))},this.JpegMeta.JpegFile.prototype._app0Handler=function(t,e){var n=this._binary_data.slice(e,e+5);n==this._JFIF_IDENT?this._jfifHandler(t,e):this._JFXX_IDENT},this.JpegMeta.JpegFile.prototype._app1Handler=function(t,e){this._binary_data.slice(e,e+5)==this._EXIF_IDENT&&this._exifHandler(t,e+6)},JpegMeta.JpegFile.prototype._exifHandler=function(t,e){if(void 0!==this.exif)throw new Error("Multiple JFIF segments found");var n,i,o=this._binary_data.slice(e,e+2);if("II"===o)n="<";else{if("MM"!==o)throw new Error("Malformed TIFF meta-data. Unknown endianess: "+o);n=">"}if(42!==(o=JpegMeta.parseNum(n,this._binary_data,e+2,2)))throw new Error("Malformed TIFF meta-data. Bad magic: "+o);o=JpegMeta.parseNum(n,this._binary_data,e+4,4),this._parseIfd(n,this._binary_data,e,o,this._tifftags,"tiff","TIFF"),this.tiff.ExifIfdPointer&&this._parseIfd(n,this._binary_data,e,this.tiff.ExifIfdPointer.value,this._exiftags,"exif","Exif"),this.tiff.GPSInfoIfdPointer&&(this._parseIfd(n,this._binary_data,e,this.tiff.GPSInfoIfdPointer.value,this._gpstags,"gps","GPS"),this.gps.GPSLatitude&&(i=this.gps.GPSLatitude.value[0].asFloat()+1/60*this.gps.GPSLatitude.value[1].asFloat()+1/3600*this.gps.GPSLatitude.value[2].asFloat(),"S"===this.gps.GPSLatitudeRef.value&&(i=-i),this.gps._addProperty("latitude","Dec. Latitude",i)),this.gps.GPSLongitude&&(i=this.gps.GPSLongitude.value[0].asFloat()+1/60*this.gps.GPSLongitude.value[1].asFloat()+1/3600*this.gps.GPSLongitude.value[2].asFloat(),"W"===this.gps.GPSLongitudeRef.value&&(i=-i),this.gps._addProperty("longitude","Dec. Longitude",i)))},this.JpegMeta.JpegFile.prototype._iptcHandler=function(t,e,n){this._addMetaGroup("iptc","IPTC");for(var i,o,r,a=JpegMeta.parseNum("<",this._binary_data,e+4,1),s=0;s<n;s++)if(o=e+s,2==JpegMeta.parseNum("<",this._binary_data,o,1)&&(r=JpegMeta.parseNum("<",this._binary_data,o+1,1),tag_desc=this._iptctags[r],tag_desc)){for(a=0,i=2;i<n&&28!=JpegMeta.parseNum("<",this._binary_data,o+i,1)&&2!=JpegMeta.parseNum("<",this._binary_data,o+i+1,1);)i++,a++;a&&(r=(r=this._binary_data.slice(e+s+2,e+s+2+a)).replace("\0","").trim(),this.iptc._addProperty(tag_desc[1],tag_desc[0],r),s+=a-1)}},"function"!=typeof Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e}),function(a){var n={init:function(t,e){var n=this;n.elem=e,n.$elem=a(e),n.imageSrc=n.$elem.data("zoom-image")?n.$elem.data("zoom-image"):n.$elem.attr("src"),n.options=a.extend({},a.fn.elevateZoom.options,t),n.options.tint&&(n.options.lensColour="none",n.options.lensOpacity="1"),"inner"==n.options.zoomType&&(n.options.showLens=!1),n.$elem.parent().removeAttr("title").removeAttr("alt"),n.zoomImage=n.imageSrc,n.refresh(1),a("#"+n.options.gallery+" a").click(function(t){return n.options.galleryActiveClass&&(a("#"+n.options.gallery+" a").removeClass(n.options.galleryActiveClass),a(this).addClass(n.options.galleryActiveClass)),t.preventDefault(),a(this).data("zoom-image")?n.zoomImagePre=a(this).data("zoom-image"):n.zoomImagePre=a(this).data("image"),n.swaptheimage(a(this).data("image"),n.zoomImagePre),!1})},refresh:function(t){var e=this;setTimeout(function(){e.fetch(e.imageSrc)},t||e.options.refresh)},fetch:function(t){var e=this,n=new Image;n.onload=function(){e.largeWidth=n.width,e.largeHeight=n.height,e.startZoom(),e.currentImage=e.imageSrc,e.options.onZoomedImageLoaded(e.$elem)},n.src=t},startZoom:function(){var t,n=this;n.nzWidth=n.$elem.width(),n.nzHeight=n.$elem.height(),n.isWindowActive=!1,n.isLensActive=!1,n.isTintActive=!1,n.overWindow=!1,n.options.imageCrossfade&&(n.zoomWrap=n.$elem.wrap('<div style="height:'+n.nzHeight+"px;width:"+n.nzWidth+'px;" class="zoomWrapper" />'),n.$elem.css("position","absolute")),n.zoomLock=1,n.scrollingLock=!1,n.changeBgSize=!1,n.currentZoomLevel=n.options.zoomLevel,n.nzOffset=n.$elem.offset(),n.widthRatio=n.largeWidth/n.currentZoomLevel/n.nzWidth,n.heightRatio=n.largeHeight/n.currentZoomLevel/n.nzHeight,"window"==n.options.zoomType&&(n.zoomWindowStyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+String(n.options.zoomWindowBgColour)+";width: "+String(n.options.zoomWindowWidth)+"px;height: "+String(n.options.zoomWindowHeight)+"px;float: left;background-size: "+n.largeWidth/n.currentZoomLevel+"px "+n.largeHeight/n.currentZoomLevel+"px;display: none;z-index:100;border: "+String(n.options.borderSize)+"px solid "+n.options.borderColour+";background-repeat: no-repeat;position: absolute;"),"inner"==n.options.zoomType&&(t=n.$elem.css("border-left-width"),n.zoomWindowStyle="overflow: hidden;margin-left: "+String(t)+";margin-top: "+String(t)+";background-position: 0px 0px;width: "+String(n.nzWidth)+"px;height: "+String(n.nzHeight)+"px;px;float: left;display: none;cursor:"+n.options.cursor+";px solid "+n.options.borderColour+";background-repeat: no-repeat;position: absolute;"),"window"==n.options.zoomType&&(lensHeight=n.nzHeight<n.options.zoomWindowWidth/n.widthRatio?n.nzHeight:String(n.options.zoomWindowHeight/n.heightRatio),lensWidth=n.largeWidth<n.options.zoomWindowWidth?n.nzWidth:n.options.zoomWindowWidth/n.widthRatio,n.lensStyle="background-position: 0px 0px;width: "+String(n.options.zoomWindowWidth/n.widthRatio)+"px;height: "+String(n.options.zoomWindowHeight/n.heightRatio)+"px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:"+n.options.lensOpacity+";filter: alpha(opacity = "+100*n.options.lensOpacity+"); zoom:1;width:"+lensWidth+"px;height:"+lensHeight+"px;background-color:"+n.options.lensColour+";cursor:"+n.options.cursor+";border: "+n.options.lensBorderSize+"px solid "+n.options.lensBorderColour+";background-repeat: no-repeat;position: absolute;"),n.tintStyle="display: block;position: absolute;background-color: "+n.options.tintColour+";filter:alpha(opacity=0);opacity: 0;width: "+n.nzWidth+"px;height: "+n.nzHeight+"px;",n.lensRound="","lens"==n.options.zoomType&&(n.lensStyle="background-position: 0px 0px;float: left;display: none;border: "+String(n.options.borderSize)+"px solid "+n.options.borderColour+";width:"+String(n.options.lensSize)+"px;height:"+String(n.options.lensSize)+"px;background-repeat: no-repeat;position: absolute;"),"round"==n.options.lensShape&&(n.lensRound="border-top-left-radius: "+String(n.options.lensSize/2+n.options.borderSize)+"px;border-top-right-radius: "+String(n.options.lensSize/2+n.options.borderSize)+"px;border-bottom-left-radius: "+String(n.options.lensSize/2+n.options.borderSize)+"px;border-bottom-right-radius: "+String(n.options.lensSize/2+n.options.borderSize)+"px;"),n.zoomContainer=a('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+n.nzOffset.left+"px;top:"+n.nzOffset.top+"px;height:"+n.nzHeight+"px;width:"+n.nzWidth+'px;"></div>'),a("body").append(n.zoomContainer),n.options.containLensZoom&&"lens"==n.options.zoomType&&n.zoomContainer.css("overflow","hidden"),"inner"!=n.options.zoomType&&(n.zoomLens=a("<div class='zoomLens' style='"+n.lensStyle+n.lensRound+"'> </div>").appendTo(n.zoomContainer).click(function(){n.$elem.trigger("click")}),n.options.tint&&(n.tintContainer=a("<div/>").addClass("tintContainer"),n.zoomTint=a("<div class='zoomTint' style='"+n.tintStyle+"'></div>"),n.zoomLens.wrap(n.tintContainer),n.zoomTintcss=n.zoomLens.after(n.zoomTint),n.zoomTintImage=a('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+n.nzWidth+"px; height: "+n.nzHeight+'px;" src="'+n.imageSrc+'">').appendTo(n.zoomLens).click(function(){n.$elem.trigger("click")}))),isNaN(n.options.zoomWindowPosition)?n.zoomWindow=a("<div style='z-index:999;left:"+n.windowOffsetLeft+"px;top:"+n.windowOffsetTop+"px;"+n.zoomWindowStyle+"' class='zoomWindow'> </div>").appendTo("body").click(function(){n.$elem.trigger("click")}):n.zoomWindow=a("<div style='z-index:999;left:"+n.windowOffsetLeft+"px;top:"+n.windowOffsetTop+"px;"+n.zoomWindowStyle+"' class='zoomWindow'> </div>").appendTo(n.zoomContainer).click(function(){n.$elem.trigger("click")}),n.zoomWindowContainer=a("<div/>").addClass("zoomWindowContainer").css("width",n.options.zoomWindowWidth),n.zoomWindow.wrap(n.zoomWindowContainer),"lens"==n.options.zoomType&&n.zoomLens.css({backgroundImage:"url('"+n.imageSrc+"')"}),"window"==n.options.zoomType&&n.zoomWindow.css({backgroundImage:"url('"+n.imageSrc+"')"}),"inner"==n.options.zoomType&&n.zoomWindow.css({backgroundImage:"url('"+n.imageSrc+"')"}),n.$elem.bind("touchmove",function(t){t.preventDefault();t=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];n.setPosition(t)}),n.zoomContainer.bind("touchmove",function(t){"inner"==n.options.zoomType&&n.showHideWindow("show"),t.preventDefault();t=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];n.setPosition(t)}),n.zoomContainer.bind("touchend",function(t){n.showHideWindow("hide"),n.options.showLens&&n.showHideLens("hide"),n.options.tint&&"inner"!=n.options.zoomType&&n.showHideTint("hide")}),n.$elem.bind("touchend",function(t){n.showHideWindow("hide"),n.options.showLens&&n.showHideLens("hide"),n.options.tint&&"inner"!=n.options.zoomType&&n.showHideTint("hide")}),n.options.showLens&&(n.zoomLens.bind("touchmove",function(t){t.preventDefault();t=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];n.setPosition(t)}),n.zoomLens.bind("touchend",function(t){n.showHideWindow("hide"),n.options.showLens&&n.showHideLens("hide"),n.options.tint&&"inner"!=n.options.zoomType&&n.showHideTint("hide")})),n.$elem.bind("mousemove",function(t){0==n.overWindow&&n.setElements("show"),n.lastX===t.clientX&&n.lastY===t.clientY||(n.setPosition(t),n.currentLoc=t),n.lastX=t.clientX,n.lastY=t.clientY}),n.zoomContainer.bind("mousemove",function(t){0==n.overWindow&&n.setElements("show"),n.lastX===t.clientX&&n.lastY===t.clientY||(n.setPosition(t),n.currentLoc=t),n.lastX=t.clientX,n.lastY=t.clientY}),"inner"!=n.options.zoomType&&n.zoomLens.bind("mousemove",function(t){n.lastX===t.clientX&&n.lastY===t.clientY||(n.setPosition(t),n.currentLoc=t),n.lastX=t.clientX,n.lastY=t.clientY}),n.options.tint&&"inner"!=n.options.zoomType&&n.zoomTint.bind("mousemove",function(t){n.lastX===t.clientX&&n.lastY===t.clientY||(n.setPosition(t),n.currentLoc=t),n.lastX=t.clientX,n.lastY=t.clientY}),"inner"==n.options.zoomType&&n.zoomWindow.bind("mousemove",function(t){n.lastX===t.clientX&&n.lastY===t.clientY||(n.setPosition(t),n.currentLoc=t),n.lastX=t.clientX,n.lastY=t.clientY}),n.zoomContainer.add(n.$elem).mouseenter(function(){0==n.overWindow&&n.setElements("show")}).mouseleave(function(){n.scrollLock||(n.setElements("hide"),n.options.onDestroy(n.$elem))}),"inner"!=n.options.zoomType&&n.zoomWindow.mouseenter(function(){n.overWindow=!0,n.setElements("hide")}).mouseleave(function(){n.overWindow=!1}),n.options.zoomLevel,n.options.minZoomLevel?n.minZoomLevel=n.options.minZoomLevel:n.minZoomLevel=2*n.options.scrollZoomIncrement,n.options.scrollZoom&&n.zoomContainer.add(n.$elem).bind("mousewheel DOMMouseScroll MozMousePixelScroll",function(t){n.scrollLock=!0,clearTimeout(a.data(this,"timer")),a.data(this,"timer",setTimeout(function(){n.scrollLock=!1},250));var e=t.originalEvent.wheelDelta||-1*t.originalEvent.detail;return t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),0<e/120?n.currentZoomLevel>=n.minZoomLevel&&n.changeZoomLevel(n.currentZoomLevel-n.options.scrollZoomIncrement):(!n.options.maxZoomLevel||n.currentZoomLevel<=n.options.maxZoomLevel)&&n.changeZoomLevel(parseFloat(n.currentZoomLevel)+n.options.scrollZoomIncrement),!1})},setElements:function(t){var e=this;return!!e.options.zoomEnabled&&("show"==t&&e.isWindowSet&&("inner"==e.options.zoomType&&e.showHideWindow("show"),"window"==e.options.zoomType&&e.showHideWindow("show"),e.options.showLens&&e.showHideLens("show"),e.options.tint&&"inner"!=e.options.zoomType&&e.showHideTint("show")),void("hide"==t&&("window"==e.options.zoomType&&e.showHideWindow("hide"),e.options.tint||e.showHideWindow("hide"),e.options.showLens&&e.showHideLens("hide"),e.options.tint&&e.showHideTint("hide"))))},setPosition:function(t){var e=this;return!!e.options.zoomEnabled&&(e.nzHeight=e.$elem.height(),e.nzWidth=e.$elem.width(),e.nzOffset=e.$elem.offset(),e.options.tint&&"inner"!=e.options.zoomType&&(e.zoomTint.css({top:0}),e.zoomTint.css({left:0})),e.options.responsive&&!e.options.scrollZoom&&e.options.showLens&&(lensHeight=e.nzHeight<e.options.zoomWindowWidth/e.widthRatio?e.nzHeight:String(e.options.zoomWindowHeight/e.heightRatio),lensWidth=e.largeWidth<e.options.zoomWindowWidth?e.nzWidth:e.options.zoomWindowWidth/e.widthRatio,e.widthRatio=e.largeWidth/e.nzWidth,e.heightRatio=e.largeHeight/e.nzHeight,"lens"!=e.options.zoomType&&(lensHeight=e.nzHeight<e.options.zoomWindowWidth/e.widthRatio?e.nzHeight:String(e.options.zoomWindowHeight/e.heightRatio),lensWidth=e.nzWidth<e.options.zoomWindowHeight/e.heightRatio?e.nzWidth:String(e.options.zoomWindowWidth/e.widthRatio),e.zoomLens.css("width",lensWidth),e.zoomLens.css("height",lensHeight),e.options.tint&&(e.zoomTintImage.css("width",e.nzWidth),e.zoomTintImage.css("height",e.nzHeight))),"lens"==e.options.zoomType&&e.zoomLens.css({width:String(e.options.lensSize)+"px",height:String(e.options.lensSize)+"px"})),e.zoomContainer.css({top:e.nzOffset.top}),e.zoomContainer.css({left:e.nzOffset.left}),e.mouseLeft=parseInt(t.pageX-e.nzOffset.left),e.mouseTop=parseInt(t.pageY-e.nzOffset.top),"window"==e.options.zoomType&&(e.Etoppos=e.mouseTop<e.zoomLens.height()/2,e.Eboppos=e.mouseTop>e.nzHeight-e.zoomLens.height()/2-2*e.options.lensBorderSize,e.Eloppos=e.mouseLeft<0+e.zoomLens.width()/2,e.Eroppos=e.mouseLeft>e.nzWidth-e.zoomLens.width()/2-2*e.options.lensBorderSize),"inner"==e.options.zoomType&&(e.Etoppos=e.mouseTop<e.nzHeight/2/e.heightRatio,e.Eboppos=e.mouseTop>e.nzHeight-e.nzHeight/2/e.heightRatio,e.Eloppos=e.mouseLeft<0+e.nzWidth/2/e.widthRatio,e.Eroppos=e.mouseLeft>e.nzWidth-e.nzWidth/2/e.widthRatio-2*e.options.lensBorderSize),e.mouseLeft<0||e.mouseTop<0||e.mouseLeft>e.nzWidth||e.mouseTop>e.nzHeight?void e.setElements("hide"):(e.options.showLens&&(e.lensLeftPos=String(Math.floor(e.mouseLeft-e.zoomLens.width()/2)),e.lensTopPos=String(Math.floor(e.mouseTop-e.zoomLens.height()/2))),e.Etoppos&&(e.lensTopPos=0),e.Eloppos&&(e.windowLeftPos=0,e.lensLeftPos=0,e.tintpos=0),"window"==e.options.zoomType&&(e.Eboppos&&(e.lensTopPos=Math.max(e.nzHeight-e.zoomLens.height()-2*e.options.lensBorderSize,0)),e.Eroppos&&(e.lensLeftPos=e.nzWidth-e.zoomLens.width()-2*e.options.lensBorderSize)),"inner"==e.options.zoomType&&(e.Eboppos&&(e.lensTopPos=Math.max(e.nzHeight-2*e.options.lensBorderSize,0)),e.Eroppos&&(e.lensLeftPos=e.nzWidth-e.nzWidth-2*e.options.lensBorderSize)),"lens"==e.options.zoomType&&(e.windowLeftPos=String(-1*((t.pageX-e.nzOffset.left)*e.widthRatio-e.zoomLens.width()/2)),e.windowTopPos=String(-1*((t.pageY-e.nzOffset.top)*e.heightRatio-e.zoomLens.height()/2)),e.zoomLens.css({backgroundPosition:e.windowLeftPos+"px "+e.windowTopPos+"px"}),e.changeBgSize&&(e.nzHeight>e.nzWidth?("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"})):("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"})),e.changeBgSize=!1),e.setWindowPostition(t)),e.options.tint&&"inner"!=e.options.zoomType&&e.setTintPosition(t),"window"==e.options.zoomType&&e.setWindowPostition(t),"inner"==e.options.zoomType&&e.setWindowPostition(t),void(e.options.showLens&&(e.fullwidth&&"lens"!=e.options.zoomType&&(e.lensLeftPos=0),e.zoomLens.css({left:e.lensLeftPos+"px",top:e.lensTopPos+"px"})))))},showHideWindow:function(t){var e=this;"show"==t&&(e.isWindowActive||(e.options.zoomWindowFadeIn?e.zoomWindow.stop(!0,!0,!1).fadeIn(e.options.zoomWindowFadeIn):e.zoomWindow.show(),e.isWindowActive=!0)),"hide"==t&&e.isWindowActive&&(e.options.zoomWindowFadeOut?e.zoomWindow.stop(!0,!0).fadeOut(e.options.zoomWindowFadeOut,function(){e.loop&&(clearInterval(e.loop),e.loop=!1)}):e.zoomWindow.hide(),e.isWindowActive=!1)},showHideLens:function(t){var e=this;"show"==t&&(e.isLensActive||(e.options.lensFadeIn?e.zoomLens.stop(!0,!0,!1).fadeIn(e.options.lensFadeIn):e.zoomLens.show(),e.isLensActive=!0)),"hide"==t&&e.isLensActive&&(e.options.lensFadeOut?e.zoomLens.stop(!0,!0).fadeOut(e.options.lensFadeOut):e.zoomLens.hide(),e.isLensActive=!1)},showHideTint:function(t){var e=this;"show"==t&&(e.isTintActive||(e.options.zoomTintFadeIn?e.zoomTint.css({opacity:e.options.tintOpacity}).animate().stop(!0,!0).fadeIn("slow"):(e.zoomTint.css({opacity:e.options.tintOpacity}).animate(),e.zoomTint.show()),e.isTintActive=!0)),"hide"==t&&e.isTintActive&&(e.options.zoomTintFadeOut?e.zoomTint.stop(!0,!0).fadeOut(e.options.zoomTintFadeOut):e.zoomTint.hide(),e.isTintActive=!1)},setLensPostition:function(t){},setWindowPostition:function(t){var e=this;if(isNaN(e.options.zoomWindowPosition))e.externalContainer=a("#"+e.options.zoomWindowPosition),e.externalContainerWidth=e.externalContainer.width(),e.externalContainerHeight=e.externalContainer.height(),e.externalContainerOffset=e.externalContainer.offset(),e.windowOffsetTop=e.externalContainerOffset.top,e.windowOffsetLeft=e.externalContainerOffset.left;else switch(e.options.zoomWindowPosition){case 1:e.windowOffsetTop=e.options.zoomWindowOffety,e.windowOffsetLeft=+e.nzWidth;break;case 2:e.options.zoomWindowHeight>e.nzHeight&&(e.windowOffsetTop=-1*(e.options.zoomWindowHeight/2-e.nzHeight/2),e.windowOffsetLeft=e.nzWidth);break;case 3:e.windowOffsetTop=e.nzHeight-e.zoomWindow.height()-2*e.options.borderSize,e.windowOffsetLeft=e.nzWidth;break;case 4:e.windowOffsetTop=e.nzHeight,e.windowOffsetLeft=e.nzWidth;break;case 5:e.windowOffsetTop=e.nzHeight,e.windowOffsetLeft=e.nzWidth-e.zoomWindow.width()-2*e.options.borderSize;break;case 6:e.options.zoomWindowHeight>e.nzHeight&&(e.windowOffsetTop=e.nzHeight,e.windowOffsetLeft=-1*(e.options.zoomWindowWidth/2-e.nzWidth/2+2*e.options.borderSize));break;case 7:e.windowOffsetTop=e.nzHeight,e.windowOffsetLeft=0;break;case 8:e.windowOffsetTop=e.nzHeight,e.windowOffsetLeft=-1*(e.zoomWindow.width()+2*e.options.borderSize);break;case 9:e.windowOffsetTop=e.nzHeight-e.zoomWindow.height()-2*e.options.borderSize,e.windowOffsetLeft=-1*(e.zoomWindow.width()+2*e.options.borderSize);break;case 10:e.options.zoomWindowHeight>e.nzHeight&&(e.windowOffsetTop=-1*(e.options.zoomWindowHeight/2-e.nzHeight/2),e.windowOffsetLeft=-1*(e.zoomWindow.width()+2*e.options.borderSize));break;case 11:e.windowOffsetTop=e.options.zoomWindowOffety,e.windowOffsetLeft=-1*(e.zoomWindow.width()+2*e.options.borderSize);break;case 12:e.windowOffsetTop=-1*(e.zoomWindow.height()+2*e.options.borderSize),e.windowOffsetLeft=-1*(e.zoomWindow.width()+2*e.options.borderSize);break;case 13:e.windowOffsetTop=-1*(e.zoomWindow.height()+2*e.options.borderSize),e.windowOffsetLeft=0;break;case 14:e.options.zoomWindowHeight>e.nzHeight&&(e.windowOffsetTop=-1*(e.zoomWindow.height()+2*e.options.borderSize),e.windowOffsetLeft=-1*(e.options.zoomWindowWidth/2-e.nzWidth/2+2*e.options.borderSize));break;case 15:e.windowOffsetTop=-1*(e.zoomWindow.height()+2*e.options.borderSize),e.windowOffsetLeft=e.nzWidth-e.zoomWindow.width()-2*e.options.borderSize;break;case 16:e.windowOffsetTop=-1*(e.zoomWindow.height()+2*e.options.borderSize),e.windowOffsetLeft=e.nzWidth;break;default:e.windowOffsetTop=e.options.zoomWindowOffety,e.windowOffsetLeft=e.nzWidth}e.isWindowSet=!0,e.windowOffsetTop=e.windowOffsetTop+e.options.zoomWindowOffety,e.windowOffsetLeft=e.windowOffsetLeft+e.options.zoomWindowOffetx,e.zoomWindow.css({top:e.windowOffsetTop}),e.zoomWindow.css({left:e.windowOffsetLeft}),"inner"==e.options.zoomType&&(e.zoomWindow.css({top:0}),e.zoomWindow.css({left:0})),e.windowLeftPos=String(-1*((t.pageX-e.nzOffset.left)*e.widthRatio-e.zoomWindow.width()/2)),e.windowTopPos=String(-1*((t.pageY-e.nzOffset.top)*e.heightRatio-e.zoomWindow.height()/2)),e.Etoppos&&(e.windowTopPos=0),e.Eloppos&&(e.windowLeftPos=0),e.Eboppos&&(e.windowTopPos=-1*(e.largeHeight/e.currentZoomLevel-e.zoomWindow.height())),e.Eroppos&&(e.windowLeftPos=-1*(e.largeWidth/e.currentZoomLevel-e.zoomWindow.width())),e.fullheight&&(e.windowTopPos=0),e.fullwidth&&(e.windowLeftPos=0),"window"!=e.options.zoomType&&"inner"!=e.options.zoomType||(1==e.zoomLock&&(e.widthRatio<=1&&(e.windowLeftPos=0),e.heightRatio<=1&&(e.windowTopPos=0)),"window"==e.options.zoomType&&(e.largeHeight<e.options.zoomWindowHeight&&(e.windowTopPos=0),e.largeWidth<e.options.zoomWindowWidth&&(e.windowLeftPos=0)),e.options.easing?(e.xp||(e.xp=0),e.yp||(e.yp=0),e.loop||(e.loop=setInterval(function(){e.xp+=(e.windowLeftPos-e.xp)/e.options.easingAmount,e.yp+=(e.windowTopPos-e.yp)/e.options.easingAmount,e.scrollingLock?(clearInterval(e.loop),e.xp=e.windowLeftPos,e.yp=e.windowTopPos,e.xp=-1*((t.pageX-e.nzOffset.left)*e.widthRatio-e.zoomWindow.width()/2),e.yp=-1*((t.pageY-e.nzOffset.top)*e.heightRatio-e.zoomWindow.height()/2),e.changeBgSize&&(e.nzHeight>e.nzWidth?("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"})):("lens"!=e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvalueheight+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"})),e.changeBgSize=!1),e.zoomWindow.css({backgroundPosition:e.windowLeftPos+"px "+e.windowTopPos+"px"}),e.scrollingLock=!1,e.loop=!1):Math.round(Math.abs(e.xp-e.windowLeftPos)+Math.abs(e.yp-e.windowTopPos))<1?(clearInterval(e.loop),e.zoomWindow.css({backgroundPosition:e.windowLeftPos+"px "+e.windowTopPos+"px"}),e.loop=!1):(e.changeBgSize&&(e.nzHeight>e.nzWidth?("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"})):("lens"!=e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"})),e.changeBgSize=!1),e.zoomWindow.css({backgroundPosition:e.xp+"px "+e.yp+"px"}))},16))):(e.changeBgSize&&(e.nzHeight>e.nzWidth?("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"}),e.zoomWindow.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"})):("lens"==e.options.zoomType&&e.zoomLens.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"}),e.largeHeight/e.newvaluewidth<e.options.zoomWindowHeight?e.zoomWindow.css({"background-size":e.largeWidth/e.newvaluewidth+"px "+e.largeHeight/e.newvaluewidth+"px"}):e.zoomWindow.css({"background-size":e.largeWidth/e.newvalueheight+"px "+e.largeHeight/e.newvalueheight+"px"})),e.changeBgSize=!1),e.zoomWindow.css({backgroundPosition:e.windowLeftPos+"px "+e.windowTopPos+"px"})))},setTintPosition:function(t){var e=this;e.nzOffset=e.$elem.offset(),e.tintpos=String(-1*(t.pageX-e.nzOffset.left-e.zoomLens.width()/2)),e.tintposy=String(-1*(t.pageY-e.nzOffset.top-e.zoomLens.height()/2)),e.Etoppos&&(e.tintposy=0),e.Eloppos&&(e.tintpos=0),e.Eboppos&&(e.tintposy=-1*(e.nzHeight-e.zoomLens.height()-2*e.options.lensBorderSize)),e.Eroppos&&(e.tintpos=-1*(e.nzWidth-e.zoomLens.width()-2*e.options.lensBorderSize)),e.options.tint&&(e.fullheight&&(e.tintposy=0),e.fullwidth&&(e.tintpos=0),e.zoomTintImage.css({left:e.tintpos+"px"}),e.zoomTintImage.css({top:e.tintposy+"px"}))},swaptheimage:function(t,e){var n=this,i=new Image;n.options.loadingIcon&&(n.spinner=a("<div style=\"background: url('"+n.options.loadingIcon+"') no-repeat center;height:"+n.nzHeight+"px;width:"+n.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>'),n.$elem.after(n.spinner)),n.options.onImageSwap(n.$elem),i.onload=function(){n.largeWidth=i.width,n.largeHeight=i.height,n.zoomImage=e,n.zoomWindow.css({"background-size":n.largeWidth+"px "+n.largeHeight+"px"}),n.swapAction(t,e)},i.src=e},swapAction:function(t,e){var n,i,o=this,r=new Image;r.onload=function(){o.nzHeight=r.height,o.nzWidth=r.width,o.options.onImageSwapComplete(o.$elem),o.doneCallback()},r.src=t,o.currentZoomLevel=o.options.zoomLevel,o.options.maxZoomLevel=!1,"lens"==o.options.zoomType&&o.zoomLens.css({backgroundImage:"url('"+e+"')"}),"window"==o.options.zoomType&&o.zoomWindow.css({backgroundImage:"url('"+e+"')"}),"inner"==o.options.zoomType&&o.zoomWindow.css({backgroundImage:"url('"+e+"')"}),o.currentImage=e,o.options.imageCrossfade?(n=(i=o.$elem).clone(),o.$elem.attr("src",t),o.$elem.after(n),n.stop(!0).fadeOut(o.options.imageCrossfade,function(){a(this).remove()}),o.$elem.width("auto").removeAttr("width"),o.$elem.height("auto").removeAttr("height"),i.fadeIn(o.options.imageCrossfade),o.options.tint&&"inner"!=o.options.zoomType&&(i=(n=o.zoomTintImage).clone(),o.zoomTintImage.attr("src",e),o.zoomTintImage.after(i),i.stop(!0).fadeOut(o.options.imageCrossfade,function(){a(this).remove()}),n.fadeIn(o.options.imageCrossfade),o.zoomTint.css({height:o.$elem.height()}),o.zoomTint.css({width:o.$elem.width()})),o.zoomContainer.css("height",o.$elem.height()),o.zoomContainer.css("width",o.$elem.width()),"inner"==o.options.zoomType&&(o.options.constrainType||(o.zoomWrap.parent().css("height",o.$elem.height()),o.zoomWrap.parent().css("width",o.$elem.width()),o.zoomWindow.css("height",o.$elem.height()),o.zoomWindow.css("width",o.$elem.width())))):(o.$elem.attr("src",t),o.options.tint&&(o.zoomTintImage.attr("src",e),o.zoomTintImage.attr("height",o.$elem.height()),o.zoomTintImage.css({height:o.$elem.height()}),o.zoomTint.css({height:o.$elem.height()})),o.zoomContainer.css("height",o.$elem.height()),o.zoomContainer.css("width",o.$elem.width())),o.options.imageCrossfade&&(o.zoomWrap.css("height",o.$elem.height()),o.zoomWrap.css("width",o.$elem.width())),o.options.constrainType&&("height"==o.options.constrainType&&(o.zoomContainer.css("height",o.options.constrainSize),o.zoomContainer.css("width","auto"),o.options.imageCrossfade?(o.zoomWrap.css("height",o.options.constrainSize),o.zoomWrap.css("width","auto"),o.constwidth=o.zoomWrap.width()):(o.$elem.css("height",o.options.constrainSize),o.$elem.css("width","auto"),o.constwidth=o.$elem.width()),"inner"==o.options.zoomType&&(o.zoomWrap.parent().css("height",o.options.constrainSize),o.zoomWrap.parent().css("width",o.constwidth),o.zoomWindow.css("height",o.options.constrainSize),o.zoomWindow.css("width",o.constwidth)),o.options.tint&&(o.tintContainer.css("height",o.options.constrainSize),o.tintContainer.css("width",o.constwidth),o.zoomTint.css("height",o.options.constrainSize),o.zoomTint.css("width",o.constwidth),o.zoomTintImage.css("height",o.options.constrainSize),o.zoomTintImage.css("width",o.constwidth))),"width"==o.options.constrainType&&(o.zoomContainer.css("height","auto"),o.zoomContainer.css("width",o.options.constrainSize),o.options.imageCrossfade?(o.zoomWrap.css("height","auto"),o.zoomWrap.css("width",o.options.constrainSize),o.constheight=o.zoomWrap.height()):(o.$elem.css("height","auto"),o.$elem.css("width",o.options.constrainSize),o.constheight=o.$elem.height()),"inner"==o.options.zoomType&&(o.zoomWrap.parent().css("height",o.constheight),o.zoomWrap.parent().css("width",o.options.constrainSize),o.zoomWindow.css("height",o.constheight),o.zoomWindow.css("width",o.options.constrainSize)),o.options.tint&&(o.tintContainer.css("height",o.constheight),o.tintContainer.css("width",o.options.constrainSize),o.zoomTint.css("height",o.constheight),o.zoomTint.css("width",o.options.constrainSize),o.zoomTintImage.css("height",o.constheight),o.zoomTintImage.css("width",o.options.constrainSize))))},doneCallback:function(){var t=this;t.options.loadingIcon&&t.spinner.hide(),t.nzOffset=t.$elem.offset(),t.nzWidth=t.$elem.width(),t.nzHeight=t.$elem.height(),t.currentZoomLevel=t.options.zoomLevel,t.widthRatio=t.largeWidth/t.nzWidth,t.heightRatio=t.largeHeight/t.nzHeight,"window"==t.options.zoomType&&(lensHeight=t.nzHeight<t.options.zoomWindowWidth/t.widthRatio?t.nzHeight:String(t.options.zoomWindowHeight/t.heightRatio),lensWidth=t.options.zoomWindowWidth<t.options.zoomWindowWidth?t.nzWidth:t.options.zoomWindowWidth/t.widthRatio,t.zoomLens&&(t.zoomLens.css("width",lensWidth),t.zoomLens.css("height",lensHeight)))},getCurrentImage:function(){return this.zoomImage},getGalleryList:function(){var e=this;return e.gallerylist=[],e.options.gallery?a("#"+e.options.gallery+" a").each(function(){var t="";a(this).data("zoom-image")?t=a(this).data("zoom-image"):a(this).data("image")&&(t=a(this).data("image")),t==e.zoomImage?e.gallerylist.unshift({href:""+t,title:a(this).find("img").attr("title")}):e.gallerylist.push({href:""+t,title:a(this).find("img").attr("title")})}):e.gallerylist.push({href:""+e.zoomImage,title:a(this).find("img").attr("title")}),e.gallerylist},changeZoomLevel:function(t){var e=this;e.scrollingLock=!0,e.newvalue=parseFloat(t).toFixed(2),newvalue=parseFloat(t).toFixed(2),maxheightnewvalue=e.largeHeight/(e.options.zoomWindowHeight/e.nzHeight*e.nzHeight),maxwidthtnewvalue=e.largeWidth/(e.options.zoomWindowWidth/e.nzWidth*e.nzWidth),"inner"!=e.options.zoomType&&(maxheightnewvalue<=newvalue?(e.heightRatio=e.largeHeight/maxheightnewvalue/e.nzHeight,e.newvalueheight=maxheightnewvalue,e.fullheight=!0):(e.heightRatio=e.largeHeight/newvalue/e.nzHeight,e.newvalueheight=newvalue,e.fullheight=!1),maxwidthtnewvalue<=newvalue?(e.widthRatio=e.largeWidth/maxwidthtnewvalue/e.nzWidth,e.newvaluewidth=maxwidthtnewvalue,e.fullwidth=!0):(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,e.newvaluewidth=newvalue,e.fullwidth=!1),"lens"==e.options.zoomType&&(maxheightnewvalue<=newvalue?(e.fullwidth=!0,e.newvaluewidth=maxheightnewvalue):(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,e.newvaluewidth=newvalue,e.fullwidth=!1))),"inner"==e.options.zoomType&&(maxheightnewvalue=parseFloat(e.largeHeight/e.nzHeight).toFixed(2),maxwidthtnewvalue=parseFloat(e.largeWidth/e.nzWidth).toFixed(2),newvalue>maxheightnewvalue&&(newvalue=maxheightnewvalue),newvalue>maxwidthtnewvalue&&(newvalue=maxwidthtnewvalue),maxheightnewvalue<=newvalue?(e.heightRatio=e.largeHeight/newvalue/e.nzHeight,newvalue>maxheightnewvalue?e.newvalueheight=maxheightnewvalue:e.newvalueheight=newvalue,e.fullheight=!0):(e.heightRatio=e.largeHeight/newvalue/e.nzHeight,newvalue>maxheightnewvalue?e.newvalueheight=maxheightnewvalue:e.newvalueheight=newvalue,e.fullheight=!1),maxwidthtnewvalue<=newvalue?(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,newvalue>maxwidthtnewvalue?e.newvaluewidth=maxwidthtnewvalue:e.newvaluewidth=newvalue,e.fullwidth=!0):(e.widthRatio=e.largeWidth/newvalue/e.nzWidth,e.newvaluewidth=newvalue,e.fullwidth=!1)),scrcontinue=!1,"inner"==e.options.zoomType&&(e.nzWidth>=e.nzHeight&&(e.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,e.fullheight=!0,e.fullwidth=!0)),e.nzHeight>e.nzWidth&&(e.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,e.fullheight=!0,e.fullwidth=!0))),"inner"!=e.options.zoomType&&(scrcontinue=!0),scrcontinue&&(e.zoomLock=0,e.changeZoom=!0,e.options.zoomWindowHeight/e.heightRatio<=e.nzHeight&&(e.currentZoomLevel=e.newvalueheight,"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType&&(e.changeBgSize=!0,e.zoomLens.css({height:String(e.options.zoomWindowHeight/e.heightRatio)+"px"})),"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType||(e.changeBgSize=!0)),e.options.zoomWindowWidth/e.widthRatio<=e.nzWidth&&("inner"!=e.options.zoomType&&e.newvaluewidth>e.newvalueheight&&(e.currentZoomLevel=e.newvaluewidth),"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType&&(e.changeBgSize=!0,e.zoomLens.css({width:String(e.options.zoomWindowWidth/e.widthRatio)+"px"})),"lens"!=e.options.zoomType&&"inner"!=e.options.zoomType||(e.changeBgSize=!0)),"inner"==e.options.zoomType&&(e.changeBgSize=!0,e.nzWidth>e.nzHeight&&(e.currentZoomLevel=e.newvaluewidth),e.nzHeight>e.nzWidth&&(e.currentZoomLevel=e.newvaluewidth))),e.setPosition(e.currentLoc)},closeAll:function(){self.zoomWindow&&self.zoomWindow.hide(),self.zoomLens&&self.zoomLens.hide(),self.zoomTint&&self.zoomTint.hide()},changeState:function(t){"enable"==t&&(this.options.zoomEnabled=!0),"disable"==t&&(this.options.zoomEnabled=!1)}};a.fn.elevateZoom=function(e){return this.each(function(){var t=Object.create(n);t.init(e,this),a.data(this,"elevateZoom",t)})},a.fn.elevateZoom.options={zoomActivation:"hover",zoomEnabled:!0,preloading:1,zoomLevel:1,scrollZoom:!1,scrollZoomIncrement:.1,minZoomLevel:!1,maxZoomLevel:!1,easing:!1,easingAmount:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:400,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",lensFadeIn:!1,lensFadeOut:!1,debug:!1,zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowAlwaysShow:!1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,borderSize:4,showLens:!0,borderColour:"#888",lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:!1,lensColour:"white",lensOpacity:.4,lenszoom:!1,tint:!1,tintColour:"#333",tintOpacity:.4,gallery:!1,galleryActiveClass:"zoomGalleryActive",imageCrossfade:!1,constrainType:!1,constrainSize:!1,loadingIcon:!1,cursor:"default",responsive:!0,onComplete:a.noop,onDestroy:function(){},onZoomedImageLoaded:function(){},onImageSwap:a.noop,onImageSwapComplete:a.noop}}(jQuery,(window,document)),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t:t(jQuery,window,document)}(function(N){var l,O,i,o,s,r,g,T,B,m,h,c,u,d,p,f,v,b,y,w,x,C,D,A,S,_,P,k,M,a,F,I,E,L,z,j,R,U,W,H,V,q,G,Y,Z,J,X,Q,K,$,e,tt,et,nt,it,ot,rt,t,n,at;t="function"==typeof define&&define.amd,n="undefined"!=typeof module&&module.exports,at="https:"==document.location.protocol?"https:":"http:",t||(n?require("jquery-mousewheel")(N):N.event.special.mousewheel||N("head").append(decodeURI("%3Cscript src="+at+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),l="mCustomScrollbar",O="mCS",i=".mCustomScrollbar",o={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},s=0,r={},g=window.attachEvent&&!window.addEventListener?1:0,T=!1,m=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],h={init:function(a){var a=N.extend(!0,{},o,a),t=c.call(this);if(a.live){var e=a.liveSelector||this.selector||i,n=N(e);if("off"===a.live)return void d(e);r[e]=setTimeout(function(){n.mCustomScrollbar(a),"once"===a.live&&n.length&&d(e)},500)}else d(e);return a.setWidth=a.set_width||a.setWidth,a.setHeight=a.set_height||a.setHeight,a.axis=a.horizontalScroll?"x":p(a.axis),a.scrollInertia=0<a.scrollInertia&&a.scrollInertia<17?17:a.scrollInertia,"object"!=typeof a.mouseWheel&&1==a.mouseWheel&&(a.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),a.mouseWheel.scrollAmount=a.mouseWheelPixels||a.mouseWheel.scrollAmount,a.mouseWheel.normalizeDelta=a.advanced.normalizeMouseWheelDelta||a.mouseWheel.normalizeDelta,a.scrollButtons.scrollType=f(a.scrollButtons.scrollType),u(a),N(t).each(function(){var t,e,n,i,o,r=N(this);r.data(O)||(r.data(O,{idx:++s,opt:a,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:r.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}}),e=(t=r.data(O)).opt,n=r.data("mcs-axis"),i=r.data("mcs-scrollbar-position"),o=r.data("mcs-theme"),n&&(e.axis=n),i&&(e.scrollbarPosition=i),o&&(e.theme=o,u(e)),v.call(this),t&&e.callbacks.onCreate&&"function"==typeof e.callbacks.onCreate&&e.callbacks.onCreate.call(this),N("#mCSB_"+t.idx+"_container img:not(."+m[2]+")").addClass(m[2]),h.update.call(null,r))})},update:function(t,a){t=t||c.call(this);return N(t).each(function(){var t,e,n,i,o,r=N(this);r.data(O)&&(e=(t=r.data(O)).opt,o=N("#mCSB_"+t.idx+"_container"),n=N("#mCSB_"+t.idx),i=[N("#mCSB_"+t.idx+"_dragger_vertical"),N("#mCSB_"+t.idx+"_dragger_horizontal")],o.length&&(t.tweenRunning&&X(r),a&&t&&e.callbacks.onBeforeUpdate&&"function"==typeof e.callbacks.onBeforeUpdate&&e.callbacks.onBeforeUpdate.call(this),r.hasClass(m[3])&&r.removeClass(m[3]),r.hasClass(m[4])&&r.removeClass(m[4]),n.css("max-height","none"),n.height()!==r.height()&&n.css("max-height",r.height()),y.call(this),"y"===e.axis||e.advanced.autoExpandHorizontalScroll||o.css("width",b(o)),t.overflowed=A.call(this),k.call(this),e.autoDraggerLength&&x.call(this),C.call(this),_.call(this),o=[Math.abs(o[0].offsetTop),Math.abs(o[0].offsetLeft)],"x"!==e.axis&&(t.overflowed[0]?i[0].height()>i[0].parent().height()?S.call(this):(Q(r,o[0].toString(),{dir:"y",dur:0,overwrite:"none"}),t.contentReset.y=null):(S.call(this),"y"===e.axis?P.call(this):"yx"===e.axis&&t.overflowed[1]&&Q(r,o[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==e.axis&&(t.overflowed[1]?i[1].width()>i[1].parent().width()?S.call(this):(Q(r,o[1].toString(),{dir:"x",dur:0,overwrite:"none"}),t.contentReset.x=null):(S.call(this),"x"===e.axis?P.call(this):"yx"===e.axis&&t.overflowed[0]&&Q(r,o[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),a&&t&&(2===a&&e.callbacks.onImageLoad&&"function"==typeof e.callbacks.onImageLoad?e.callbacks.onImageLoad.call(this):3===a&&e.callbacks.onSelectorChange&&"function"==typeof e.callbacks.onSelectorChange?e.callbacks.onSelectorChange.call(this):e.callbacks.onUpdate&&"function"==typeof e.callbacks.onUpdate&&e.callbacks.onUpdate.call(this)),J.call(this)))})},scrollTo:function(a,s){if(void 0!==a&&null!=a){var t=c.call(this);return N(t).each(function(){var t,e,n,i,o,r=N(this);r.data(O)&&(t=r.data(O),o={trigger:"external",scrollInertia:(e=t.opt).scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=N.extend(!0,{},o,s),i=Y.call(this,a),o=0<n.scrollInertia&&n.scrollInertia<17?17:n.scrollInertia,i[0]=Z.call(this,i[0],"y"),i[1]=Z.call(this,i[1],"x"),n.moveDragger&&(i[0]*=t.scrollRatio.y,i[1]*=t.scrollRatio.x),n.dur=rt()?0:o,setTimeout(function(){null!==i[0]&&void 0!==i[0]&&"x"!==e.axis&&t.overflowed[0]&&(n.dir="y",n.overwrite="all",Q(r,i[0].toString(),n)),null!==i[1]&&void 0!==i[1]&&"y"!==e.axis&&t.overflowed[1]&&(n.dir="x",n.overwrite="none",Q(r,i[1].toString(),n))},n.timeout))})}},stop:function(){var t=c.call(this);return N(t).each(function(){var t=N(this);t.data(O)&&X(t)})},disable:function(e){var t=c.call(this);return N(t).each(function(){var t=N(this);t.data(O)&&(t.data(O),J.call(this,"remove"),P.call(this),e&&S.call(this),k.call(this,!0),t.addClass(m[3]))})},destroy:function(){var a=c.call(this);return N(a).each(function(){var t,e,n,i,o,r=N(this);r.data(O)&&(e=(t=r.data(O)).opt,n=N("#mCSB_"+t.idx),i=N("#mCSB_"+t.idx+"_container"),o=N(".mCSB_"+t.idx+"_scrollbar"),e.live&&d(e.liveSelector||N(a).selector),J.call(this,"remove"),P.call(this),S.call(this),r.removeData(O),tt(this,"mcs"),o.remove(),i.find("img."+m[2]).removeClass(m[2]),n.replaceWith(i.contents()),r.removeClass(l+" _"+O+"_"+t.idx+" "+m[6]+" "+m[7]+" "+m[5]+" "+m[3]).addClass(m[4]))})}},c=function(){return"object"!=typeof N(this)||N(this).length<1?i:this},u=function(t){t.autoDraggerLength=!(-1<N.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"]))&&t.autoDraggerLength,t.autoExpandScrollbar=!(-1<N.inArray(t.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"]))&&t.autoExpandScrollbar,t.scrollButtons.enable=!(-1<N.inArray(t.theme,["minimal","minimal-dark"]))&&t.scrollButtons.enable,t.autoHideScrollbar=-1<N.inArray(t.theme,["minimal","minimal-dark"])||t.autoHideScrollbar,t.scrollbarPosition=-1<N.inArray(t.theme,["minimal","minimal-dark"])?"outside":t.scrollbarPosition},d=function(t){r[t]&&(clearTimeout(r[t]),tt(r,t))},p=function(t){return"yx"===t||"xy"===t||"auto"===t?"yx":"x"===t||"horizontal"===t?"x":"y"},f=function(t){return"stepped"===t||"pixels"===t||"step"===t||"click"===t?"stepped":"stepless"},v=function(){var t=N(this),e=t.data(O),n=e.opt,i=n.autoExpandScrollbar?" "+m[1]+"_expand":"",o=["<div id='mCSB_"+e.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_vertical"+i+"'><div class='"+m[12]+"'><div id='mCSB_"+e.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div></div><div class='mCSB_draggerRail' /></div>","<div id='mCSB_"+e.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+e.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_horizontal"+i+"'><div class='"+m[12]+"'><div id='mCSB_"+e.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],r="yx"===n.axis?"mCSB_vertical_horizontal":"x"===n.axis?"mCSB_horizontal":"mCSB_vertical",a="yx"===n.axis?o[0]+o[1]:"x"===n.axis?o[1]:o[0],s="yx"===n.axis?"<div id='mCSB_"+e.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",i=n.autoHideScrollbar?" "+m[6]:"",o="x"!==n.axis&&"rtl"===e.langDir?" "+m[7]:"";n.setWidth&&t.css("width",n.setWidth),n.setHeight&&t.css("height",n.setHeight),n.setLeft="y"!==n.axis&&"rtl"===e.langDir?"989999px":n.setLeft,t.addClass(l+" _"+O+"_"+e.idx+i+o).wrapInner("<div id='mCSB_"+e.idx+"' class='mCustomScrollBox mCS-"+n.theme+" "+r+"'><div id='mCSB_"+e.idx+"_container' class='mCSB_container' style='position:relative; top:"+n.setTop+"; left:"+n.setLeft+";' dir='"+e.langDir+"' /></div>");o=N("#mCSB_"+e.idx),r=N("#mCSB_"+e.idx+"_container");"y"===n.axis||n.advanced.autoExpandHorizontalScroll||r.css("width",b(r)),"outside"===n.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),o.addClass("mCSB_outside").after(a)):(o.addClass("mCSB_inside").append(a),r.wrap(s)),w.call(this);e=[N("#mCSB_"+e.idx+"_dragger_vertical"),N("#mCSB_"+e.idx+"_dragger_horizontal")];e[0].css("min-height",e[0].height()),e[1].css("min-width",e[1].width())},b=function(t){var e=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return N(this).outerWidth(!0)}).get())],t=t.parent().width();return t<e[0]?e[0]:t<e[1]?e[1]:"100%"},y=function(){var t=N(this).data(O),e=t.opt,n=N("#mCSB_"+t.idx+"_container");e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis&&(n.css({width:"auto","min-width":0,"overflow-x":"scroll"}),t=Math.ceil(n[0].scrollWidth),3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&t>n.parent().width()?n.css({width:t,"min-width":"100%","overflow-x":"inherit"}):n.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(n[0].getBoundingClientRect().right+.4)-Math.floor(n[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap())},w=function(){var t=N(this).data(O),e=t.opt,n=N(".mCSB_"+t.idx+"_scrollbar:first"),t=it(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",t=["<a href='#' class='"+m[13]+"' "+t+" />","<a href='#' class='"+m[14]+"' "+t+" />","<a href='#' class='"+m[15]+"' "+t+" />","<a href='#' class='"+m[16]+"' "+t+" />"],t=["x"===e.axis?t[2]:t[0],"x"===e.axis?t[3]:t[1],t[2],t[3]];e.scrollButtons.enable&&n.prepend(t[0]).append(t[1]).next(".mCSB_scrollTools").prepend(t[2]).append(t[3])},x=function(){var t=N(this).data(O),e=N("#mCSB_"+t.idx),n=N("#mCSB_"+t.idx+"_container"),i=[N("#mCSB_"+t.idx+"_dragger_vertical"),N("#mCSB_"+t.idx+"_dragger_horizontal")],t=[e.height()/n.outerHeight(!1),e.width()/n.outerWidth(!1)],e=[parseInt(i[0].css("min-height")),Math.round(t[0]*i[0].parent().height()),parseInt(i[1].css("min-width")),Math.round(t[1]*i[1].parent().width())],n=g&&e[1]<e[0]?e[0]:e[1],t=g&&e[3]<e[2]?e[2]:e[3];i[0].css({height:n,"max-height":i[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":e[0]+"px"}),i[1].css({width:t,"max-width":i[1].parent().width()-10})},C=function(){var t=N(this).data(O),e=N("#mCSB_"+t.idx),n=N("#mCSB_"+t.idx+"_container"),i=[N("#mCSB_"+t.idx+"_dragger_vertical"),N("#mCSB_"+t.idx+"_dragger_horizontal")],e=[n.outerHeight(!1)-e.height(),n.outerWidth(!1)-e.width()],i=[e[0]/(i[0].parent().height()-i[0].height()),e[1]/(i[1].parent().width()-i[1].width())];t.scrollRatio={y:i[0],x:i[1]}},D=function(t,e,n){var i=n?m[0]+"_expanded":"",n=t.closest(".mCSB_scrollTools");"active"===e?(t.toggleClass(m[0]+" "+i),n.toggleClass(m[1]),t[0]._draggable=t[0]._draggable?0:1):t[0]._draggable||("hide"===e?(t.removeClass(m[0]),n.removeClass(m[1])):(t.addClass(m[0]),n.addClass(m[1])))},A=function(){var t=N(this).data(O),e=N("#mCSB_"+t.idx),n=N("#mCSB_"+t.idx+"_container"),i=null==t.overflowed?n.height():n.outerHeight(!1),o=null==t.overflowed?n.width():n.outerWidth(!1),t=n[0].scrollHeight,n=n[0].scrollWidth;return i<t&&(i=t),o<n&&(o=n),[i>e.height(),o>e.width()]},S=function(){var t=N(this),e=t.data(O),n=e.opt,i=N("#mCSB_"+e.idx),o=N("#mCSB_"+e.idx+"_container"),r=[N("#mCSB_"+e.idx+"_dragger_vertical"),N("#mCSB_"+e.idx+"_dragger_horizontal")];X(t),("x"!==n.axis&&!e.overflowed[0]||"y"===n.axis&&e.overflowed[0])&&(r[0].add(o).css("top",0),Q(t,"_resetY")),("y"!==n.axis&&!e.overflowed[1]||"x"===n.axis&&e.overflowed[1])&&(n=dx=0,"rtl"===e.langDir&&(n=i.width()-o.outerWidth(!1),dx=Math.abs(n/e.scrollRatio.x)),o.css("left",n),r[1].css("left",dx),Q(t,"_resetX"))},_=function(){var e,n=N(this),t=n.data(O),i=t.opt;t.bindEvents||(a.call(this),i.contentTouchScroll&&F.call(this),I.call(this),i.mouseWheel.enable&&function t(){e=setTimeout(function(){N.event.special.mousewheel?(clearTimeout(e),E.call(n[0])):t()},100)}(),U.call(this),H.call(this),i.advanced.autoScrollOnFocus&&W.call(this),i.scrollButtons.enable&&V.call(this),i.keyboard.enable&&q.call(this),t.bindEvents=!0)},P=function(){var t=N(this),e=t.data(O),n=e.opt,i="mCS_"+e.idx,o=".mCSB_"+e.idx+"_scrollbar",r=N("#mCSB_"+e.idx+",#mCSB_"+e.idx+"_container,#mCSB_"+e.idx+"_container_wrapper,"+o+" ."+m[12]+",#mCSB_"+e.idx+"_dragger_vertical,#mCSB_"+e.idx+"_dragger_horizontal,"+o+">a"),o=N("#mCSB_"+e.idx+"_container");n.advanced.releaseDraggableSelectors&&r.add(N(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&r.add(N(n.advanced.extraDraggableSelectors)),e.bindEvents&&(N(document).add(N(!z()||top.document)).unbind("."+i),r.each(function(){N(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),tt(t[0],"_focusTimeout"),clearTimeout(e.sequential.step),tt(e.sequential,"step"),clearTimeout(o[0].onCompleteTimeout),tt(o[0],"onCompleteTimeout"),e.bindEvents=!1)},k=function(t){var e=N(this),n=e.data(O),i=n.opt,o=N("#mCSB_"+n.idx+"_container_wrapper"),r=o.length?o:N("#mCSB_"+n.idx+"_container"),a=[N("#mCSB_"+n.idx+"_scrollbar_vertical"),N("#mCSB_"+n.idx+"_scrollbar_horizontal")],o=[a[0].find(".mCSB_dragger"),a[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(a[0].add(o[0]).add(a[0].children("a")).css("display","block"),r.removeClass(m[8]+" "+m[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&o[0].css("display","none"),r.removeClass(m[10])):(a[0].css("display","none"),r.addClass(m[10])),r.addClass(m[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(a[1].add(o[1]).add(a[1].children("a")).css("display","block"),r.removeClass(m[9]+" "+m[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&o[1].css("display","none"),r.removeClass(m[11])):(a[1].css("display","none"),r.addClass(m[11])),r.addClass(m[9]))),n.overflowed[0]||n.overflowed[1]?e.removeClass(m[5]):e.addClass(m[5])},M=function(t){var e=t.type,n=t.target.ownerDocument!==document&&null!==frameElement?[N(frameElement).offset().top,N(frameElement).offset().left]:null,i=z()&&t.target.ownerDocument!==top.document&&null!==frameElement?[N(t.view.frameElement).offset().top,N(t.view.frameElement).offset().left]:[0,0];switch(e){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return n?[t.originalEvent.pageY-n[0]+i[0],t.originalEvent.pageX-n[1]+i[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var o=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[o.screenY,o.screenX,1<r]:[o.pageY,o.pageX,1<r];default:return n?[t.pageY-n[0]+i[0],t.pageX-n[1]+i[1],!1]:[t.pageY,t.pageX,!1]}},a=function(){var r,o,a,s=N(this),l=s.data(O),c=l.opt,t="mCS_"+l.idx,u=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],d=N("#mCSB_"+l.idx+"_container"),e=N("#"+u[0]+",#"+u[1]),n=c.advanced.releaseDraggableSelectors?e.add(N(c.advanced.releaseDraggableSelectors)):e,i=c.advanced.extraDraggableSelectors?N(!z()||top.document).add(N(c.advanced.extraDraggableSelectors)):N(!z()||top.document);function h(t,e,n,i){var o;d[0].idleTimer=c.scrollInertia<233?250:0,n=r.attr("id")===u[1]?(o="x",(r[0].offsetLeft-e+i)*l.scrollRatio.x):(o="y",(r[0].offsetTop-t+n)*l.scrollRatio.y),Q(s,n.toString(),{dir:o,drag:!0})}e.bind("contextmenu."+t,function(t){t.preventDefault()}).bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,function(t){var e,n,i;t.stopImmediatePropagation(),t.preventDefault(),et(t)&&(T=!0,g&&(document.onselectstart=function(){return!1}),j.call(d,!1),X(s),i=(r=N(this)).offset(),e=M(t)[0]-i.top,n=M(t)[1]-i.left,t=r.height()+i.top,i=r.width()+i.left,e<t&&0<e&&n<i&&0<n&&(o=e,a=n),D(r,"active",c.autoExpandScrollbar))}).bind("touchmove."+t,function(t){t.stopImmediatePropagation(),t.preventDefault();var e=r.offset(),n=M(t)[0]-e.top,e=M(t)[1]-e.left;h(o,a,n,e)}),N(document).add(i).bind("mousemove."+t+" pointermove."+t+" MSPointerMove."+t,function(t){var e,n;r&&(n=r.offset(),e=M(t)[0]-n.top,n=M(t)[1]-n.left,o===e&&a===n||h(o,a,e,n))}).add(n).bind("mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t,function(t){r&&(D(r,"active",c.autoExpandScrollbar),r=null),T=!1,g&&(document.onselectstart=null),j.call(d,!0)})},F=function(){var a,s,l,r,c,u,d,h,p,f,g,m,v=N(this),b=v.data(O),y=b.opt,t="mCS_"+b.idx,w=N("#mCSB_"+b.idx),x=N("#mCSB_"+b.idx+"_container"),C=[N("#mCSB_"+b.idx+"_dragger_vertical"),N("#mCSB_"+b.idx+"_dragger_horizontal")],A=[],D=[],S=0,_="yx"===y.axis?"none":"all",P=[],e=x.find("iframe"),n=["touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,"touchmove."+t+" pointermove."+t+" MSPointerMove."+t,"touchend."+t+" pointerup."+t+" MSPointerUp."+t],k=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;function i(t){var e;!nt(t)||T||M(t)[2]?B=0:(m=g=0,a=B=1,v.removeClass("mCS_touch_action"),e=x.offset(),s=M(t)[0]-e.top,l=M(t)[1]-e.left,P=[M(t)[0],M(t)[1]])}function o(t){var e,n,i,o,r;!nt(t)||T||M(t)[2]||(y.documentTouchScroll||t.preventDefault(),t.stopImmediatePropagation(),m&&!g||a&&(d=$(),i=w.offset(),e=M(t)[0]-i.top,n=M(t)[1]-i.left,i="mcsLinearOut",A.push(e),D.push(n),P[2]=Math.abs(M(t)[0]-P[0]),P[3]=Math.abs(M(t)[1]-P[1]),b.overflowed[0]&&(o=C[0].parent().height()-C[0].height(),o=0<s-e&&e-s>-(o*b.scrollRatio.y)&&(2*P[3]<P[2]||"yx"===y.axis)),b.overflowed[1]&&(r=C[1].parent().width()-C[1].width(),r=0<l-n&&n-l>-(r*b.scrollRatio.x)&&(2*P[2]<P[3]||"yx"===y.axis)),o||r?(k||t.preventDefault(),g=1):(m=1,v.addClass("mCS_touch_action")),k&&t.preventDefault(),p="yx"===y.axis?[s-e,l-n]:"x"===y.axis?[null,l-n]:[s-e,null],x[0].idleTimer=250,b.overflowed[0]&&L(p[0],S,i,"y","all",!0),b.overflowed[1]&&L(p[1],S,i,"x",_,!0)))}function F(t){var e;!nt(t)||T||M(t)[2]?B=0:(B=1,t.stopImmediatePropagation(),X(v),u=$(),e=w.offset(),r=M(t)[0]-e.top,c=M(t)[1]-e.left,A=[],D=[])}function I(t){var e,n,i,o;!nt(t)||T||M(t)[2]||(a=0,t.stopImmediatePropagation(),m=g=0,h=$(),i=w.offset(),e=M(t)[0]-i.top,o=M(t)[1]-i.left,30<h-d||(n="mcsEaseOut",i=(t=(f=1e3/(h-u))<2.5)?[A[A.length-2],D[D.length-2]]:[0,0],h=t?[e-i[0],o-i[1]]:[e-r,o-c],o=[Math.abs(h[0]),Math.abs(h[1])],f=t?[Math.abs(h[0]/4),Math.abs(h[1]/4)]:[f,f],t=[Math.abs(x[0].offsetTop)-h[0]*E(o[0]/f[0],f[0]),Math.abs(x[0].offsetLeft)-h[1]*E(o[1]/f[1],f[1])],p="yx"===y.axis?[t[0],t[1]]:"x"===y.axis?[null,t[1]]:[t[0],null],f=[4*o[0]+y.scrollInertia,4*o[1]+y.scrollInertia],t=parseInt(y.contentTouchScroll)||0,p[0]=t<o[0]?p[0]:0,p[1]=t<o[1]?p[1]:0,b.overflowed[0]&&L(p[0],f[0],n,"y",_,!1),b.overflowed[1]&&L(p[1],f[1],n,"x",_,!1)))}function E(t,e){var n=[1.5*e,2*e,e/1.5,e/2];return 90<t?4<e?n[0]:n[3]:60<t?3<e?n[3]:n[2]:30<t?8<e?n[1]:6<e?n[0]:4<e?e:n[2]:8<e?e:n[3]}function L(t,e,n,i,o,r){t&&Q(v,t.toString(),{dur:e,scrollEasing:n,dir:i,overwrite:o,drag:r})}x.bind(n[0],function(t){i(t)}).bind(n[1],function(t){o(t)}),w.bind(n[0],function(t){F(t)}).bind(n[2],function(t){I(t)}),e.length&&e.each(function(){N(this).bind("load",function(){z(this)&&N(this.contentDocument||this.contentWindow.document).bind(n[0],function(t){i(t),F(t)}).bind(n[1],function(t){o(t)}).bind(n[2],function(t){I(t)})})})},I=function(){var i,o=N(this),r=o.data(O),a=r.opt,s=r.sequential,t="mCS_"+r.idx,l=N("#mCSB_"+r.idx+"_container"),c=l.parent();function u(t,e,n){s.type=n&&i?"stepped":"stepless",s.scrollAmount=10,G(o,t,e,"mcsLinearOut",n?60:null)}l.bind("mousedown."+t,function(t){B||i||(i=1,T=!0)}).add(document).bind("mousemove."+t,function(t){var e,n;!B&&i&&(window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type&&document.selection.createRange().text)&&(n=l.offset(),e=M(t)[0]-n.top+l[0].offsetTop,n=M(t)[1]-n.left+l[0].offsetLeft,0<e&&e<c.height()&&0<n&&n<c.width()?s.step&&u("off",null,"stepped"):("x"!==a.axis&&r.overflowed[0]&&(e<0?u("on",38):e>c.height()&&u("on",40)),"y"!==a.axis&&r.overflowed[1]&&(n<0?u("on",37):n>c.width()&&u("on",39))))}).bind("mouseup."+t+" dragend."+t,function(t){B||(i&&(i=0,u("off",null)),T=!1)})},E=function(){var u,d,h,t,p,f,e;function n(t,e){var n,i,o,r,a,s,l,c;X(u),R(u,t.target)||(n="auto"!==h.mouseWheel.deltaFactor?parseInt(h.mouseWheel.deltaFactor):!(g&&t.deltaFactor<100)&&t.deltaFactor||100,i=h.scrollInertia,e="x"===h.axis||"x"===h.mouseWheel.axis?(o="x",r=[Math.round(n*d.scrollRatio.x),parseInt(h.mouseWheel.scrollAmount)],a="auto"!==h.mouseWheel.scrollAmount?r[1]:r[0]>=p.width()?.9*p.width():r[0],s=Math.abs(N("#mCSB_"+d.idx+"_container")[0].offsetLeft),l=f[1][0].offsetLeft,c=f[1].parent().width()-f[1].width(),"y"===h.mouseWheel.axis?t.deltaY||e:t.deltaX):(o="y",r=[Math.round(n*d.scrollRatio.y),parseInt(h.mouseWheel.scrollAmount)],a="auto"!==h.mouseWheel.scrollAmount?r[1]:r[0]>=p.height()?.9*p.height():r[0],s=Math.abs(N("#mCSB_"+d.idx+"_container")[0].offsetTop),l=f[0][0].offsetTop,c=f[0].parent().height()-f[0].height(),t.deltaY||e),"y"===o&&!d.overflowed[0]||"x"===o&&!d.overflowed[1]||((h.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(e=-e),h.mouseWheel.normalizeDelta&&(e=e<0?-1:1),(0<e&&0!==l||e<0&&l!==c||h.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!h.mouseWheel.normalizeDelta&&(a=t.deltaFactor,i=17),Q(u,(s-e*a).toString(),{dir:o,dur:i})))}N(this).data(O)&&(u=N(this),d=u.data(O),h=d.opt,t="mCS_"+d.idx,p=N("#mCSB_"+d.idx),f=[N("#mCSB_"+d.idx+"_dragger_vertical"),N("#mCSB_"+d.idx+"_dragger_horizontal")],(e=N("#mCSB_"+d.idx+"_container").find("iframe")).length&&e.each(function(){N(this).bind("load",function(){z(this)&&N(this.contentDocument||this.contentWindow.document).bind("mousewheel."+t,function(t,e){n(t,e)})})}),p.bind("mousewheel."+t,function(t,e){n(t,e)}))},L=new Object,z=function(t){var e=!1,n=!1,i=null;if(void 0===t?n="#empty":void 0!==N(t).attr("id")&&(n=N(t).attr("id")),!1!==n&&void 0!==L[n])return L[n];if(t){try{i=(t.contentDocument||t.contentWindow.document).body.innerHTML}catch(t){}e=null!==i}else{try{i=top.document.body.innerHTML}catch(t){}e=null!==i}return!1!==n&&(L[n]=e),e},j=function(t){var e=this.find("iframe");e.length&&(t=t?"auto":"none",e.css("pointer-events",t))},R=function(t,e){var n=e.nodeName.toLowerCase(),t=t.data(O).opt.mouseWheel.disableOver;return-1<N.inArray(n,t)&&!(-1<N.inArray(n,["select","textarea"])&&!N(e).is(":focus"))},U=function(){var a,s=N(this),l=s.data(O),t="mCS_"+l.idx,c=N("#mCSB_"+l.idx+"_container"),u=c.parent();N(".mCSB_"+l.idx+"_scrollbar ."+m[12]).bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t,function(t){T=!0,N(t.target).hasClass("mCSB_dragger")||(a=1)}).bind("touchend."+t+" pointerup."+t+" MSPointerUp."+t,function(t){T=!1}).bind("click."+t,function(t){if(a&&(a=0,N(t.target).hasClass(m[12])||N(t.target).hasClass("mCSB_draggerRail"))){X(s);var e=N(this),n=e.find(".mCSB_dragger");if(0<e.parent(".mCSB_scrollTools_horizontal").length){if(!l.overflowed[1])return;var i="x",o=t.pageX>n.offset().left?-1:1,r=Math.abs(c[0].offsetLeft)-o*(.9*u.width())}else{if(!l.overflowed[0])return;i="y",o=t.pageY>n.offset().top?-1:1,r=Math.abs(c[0].offsetTop)-o*(.9*u.height())}Q(s,r.toString(),{dir:i,scrollEasing:"mcsEaseInOut"})}})},W=function(){var o=N(this),t=o.data(O),r=t.opt,e="mCS_"+t.idx,a=N("#mCSB_"+t.idx+"_container"),s=a.parent();a.bind("focusin."+e,function(t){var i=N(document.activeElement),e=a.find(".mCustomScrollBox").length;i.is(r.advanced.autoScrollOnFocus)&&(X(o),clearTimeout(o[0]._focusTimeout),o[0]._focusTimer=e?17*e:0,o[0]._focusTimeout=setTimeout(function(){var t=[ot(i)[0],ot(i)[1]],e=[a[0].offsetTop,a[0].offsetLeft],n=[0<=e[0]+t[0]&&e[0]+t[0]<s.height()-i.outerHeight(!1),0<=e[1]+t[1]&&e[0]+t[1]<s.width()-i.outerWidth(!1)],e="yx"!==r.axis||n[0]||n[1]?"all":"none";"x"===r.axis||n[0]||Q(o,t[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:e,dur:0}),"y"===r.axis||n[1]||Q(o,t[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:e,dur:0})},o[0]._focusTimer))})},H=function(){var e=N(this).data(O),t="mCS_"+e.idx,n=N("#mCSB_"+e.idx+"_container").parent();n.bind("scroll."+t,function(t){0===n.scrollTop()&&0===n.scrollLeft()||N(".mCSB_"+e.idx+"_scrollbar").css("visibility","hidden")})},V=function(){var i=N(this),o=i.data(O),r=o.opt,a=o.sequential,t="mCS_"+o.idx,e=".mCSB_"+o.idx+"_scrollbar";N(e+">a").bind("contextmenu."+t,function(t){t.preventDefault()}).bind("mousedown."+t+" touchstart."+t+" pointerdown."+t+" MSPointerDown."+t+" mouseup."+t+" touchend."+t+" pointerup."+t+" MSPointerUp."+t+" mouseout."+t+" pointerout."+t+" MSPointerOut."+t+" click."+t,function(t){if(t.preventDefault(),et(t)){var e=N(this).attr("class");switch(a.type=r.scrollButtons.scrollType,t.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===a.type)return;T=!0,o.tweenRunning=!1,n("on",e);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===a.type)return;T=!1,a.dir&&n("off",e);break;case"click":if("stepped"!==a.type||o.tweenRunning)return;n("on",e)}}function n(t,e){a.scrollAmount=r.scrollButtons.scrollAmount,G(i,t,e)}})},q=function(){var a=N(this),s=a.data(O),l=s.opt,c=s.sequential,t="mCS_"+s.idx,e=N("#mCSB_"+s.idx),u=N("#mCSB_"+s.idx+"_container"),d=u.parent(),h="input,textarea,select,datalist,keygen,[contenteditable='true']",n=u.find("iframe"),i=["blur."+t+" keydown."+t+" keyup."+t];function o(t){switch(t.type){case"blur":s.tweenRunning&&c.dir&&r("off",null);break;case"keydown":case"keyup":var e,n,i=t.keyCode||t.which,o="on";if("x"!==l.axis&&(38===i||40===i)||"y"!==l.axis&&(37===i||39===i)){if((38===i||40===i)&&!s.overflowed[0]||(37===i||39===i)&&!s.overflowed[1])return;"keyup"===t.type&&(o="off"),N(document.activeElement).is(h)||(t.preventDefault(),t.stopImmediatePropagation(),r(o,i))}else 33===i||34===i?((s.overflowed[0]||s.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type&&(X(a),n=34===i?-1:1,n="x"===l.axis||"yx"===l.axis&&s.overflowed[1]&&!s.overflowed[0]?(e="x",Math.abs(u[0].offsetLeft)-n*(.9*d.width())):(e="y",Math.abs(u[0].offsetTop)-n*(.9*d.height())),Q(a,n.toString(),{dir:e,scrollEasing:"mcsEaseInOut"}))):35!==i&&36!==i||N(document.activeElement).is(h)||((s.overflowed[0]||s.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type&&(n="x"===l.axis||"yx"===l.axis&&s.overflowed[1]&&!s.overflowed[0]?(e="x",35===i?Math.abs(d.width()-u.outerWidth(!1)):0):(e="y",35===i?Math.abs(d.height()-u.outerHeight(!1)):0),Q(a,n.toString(),{dir:e,scrollEasing:"mcsEaseInOut"})))}function r(t,e){c.type=l.keyboard.scrollType,c.scrollAmount=l.keyboard.scrollAmount,"stepped"===c.type&&s.tweenRunning||G(a,t,e)}}n.length&&n.each(function(){N(this).bind("load",function(){z(this)&&N(this.contentDocument||this.contentWindow.document).bind(i[0],function(t){o(t)})})}),e.attr("tabindex","0").bind(i[0],function(t){o(t)})},G=function(a,t,e,s,l){var c=a.data(O),u=c.opt,d=c.sequential,h=N("#mCSB_"+c.idx+"_container"),n="stepped"===d.type,p=u.scrollInertia<26?26:u.scrollInertia,f=u.scrollInertia<1?17:u.scrollInertia;switch(t){case"on":if(d.dir=[e===m[16]||e===m[15]||39===e||37===e?"x":"y",e===m[13]||e===m[15]||38===e||37===e?-1:1],X(a),it(e)&&"stepped"===d.type)return;g(n);break;case"off":clearTimeout(d.step),tt(d,"step"),X(a),(n||c.tweenRunning&&d.dir)&&g(!0)}function g(t){u.snapAmount&&(d.scrollAmount=u.snapAmount instanceof Array?"x"===d.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var e="stepped"!==d.type,n=l||(t?e?p/1.5:f:1e3/60),i=t?e?7.5:40:2.5,o=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],r=[10<c.scrollRatio.y?10:c.scrollRatio.y,10<c.scrollRatio.x?10:c.scrollRatio.x],r="x"===d.dir[0]?o[1]+d.dir[1]*(r[1]*i):o[0]+d.dir[1]*(r[0]*i),i="x"===d.dir[0]?o[1]+d.dir[1]*parseInt(d.scrollAmount):o[0]+d.dir[1]*parseInt(d.scrollAmount),i="auto"!==d.scrollAmount?i:r,r=s||(t?e?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),e=!!t;t&&n<17&&(i="x"===d.dir[0]?o[1]:o[0]),Q(a,i.toString(),{dir:d.dir[0],scrollEasing:r,dur:n,onComplete:e}),t?d.dir=!1:(clearTimeout(d.step),d.step=setTimeout(function(){g()},n))}},Y=function(t){var e=N(this).data(O).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=1<t.length?[t[0],t[1]]:"x"===e.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y||(t.x||"x"===e.axis?null:t),n[1]=t.x||(t.y||"y"===e.axis?null:t)),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},Z=function(t,e){if(null!=t&&void 0!==t){var n=N(this),i=n.data(O),o=i.opt,r=N("#mCSB_"+i.idx+"_container"),a=r.parent(),i=typeof t,s="x"===(e=e||("x"===o.axis?"x":"y"))?r.outerWidth(!1)-a.width():r.outerHeight(!1)-a.height(),l="x"===e?r[0].offsetLeft:r[0].offsetTop,c="x"===e?"left":"top";switch(i){case"function":return t();case"object":return(d=t.jquery?t:N(t)).length?"x"===e?ot(d)[1]:ot(d)[0]:void 0;case"string":case"number":if(it(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(s*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(l-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var u=l+parseInt(t.split("+=")[1]);return 0<=u?0:Math.abs(u)}if(-1!==t.indexOf("px")&&it(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(a.height()-r.outerHeight(!1));if("right"===t)return Math.abs(a.width()-r.outerWidth(!1));if("first"!==t&&"last"!==t)return N(t).length?"x"===e?ot(N(t))[1]:ot(N(t))[0]:(r.css(c,t),void h.update.call(null,n[0]));var d=r.find(":"+t);return"x"===e?ot(d)[1]:ot(d)[0]}}},J=function(t){var e=N(this),n=e.data(O),i=n.opt,o=N("#mCSB_"+n.idx+"_container");if(t)return clearTimeout(o[0].autoUpdate),void tt(o[0],"autoUpdate");function r(t){var e,n,i;N(t).hasClass(m[2])?s():((e=new Image).onload=(n=e,i=function(){this.onload=null,N(t).addClass(m[2]),s(2)},function(){return i.apply(n,arguments)}),e.src=t.src)}function a(){!0===i.advanced.updateOnSelectorChange&&(i.advanced.updateOnSelectorChange="*");var t=0,e=o.find(i.advanced.updateOnSelectorChange);return i.advanced.updateOnSelectorChange&&0<e.length&&e.each(function(){t+=this.offsetHeight+this.offsetWidth}),t}function s(t){clearTimeout(o[0].autoUpdate),h.update.call(null,e[0],t)}!function t(){clearTimeout(o[0].autoUpdate);if(0===e.parents("html").length)return void(e=null);o[0].autoUpdate=setTimeout(function(){return i.advanced.updateOnSelectorChange&&(n.poll.change.n=a(),n.poll.change.n!==n.poll.change.o)?(n.poll.change.o=n.poll.change.n,void s(3)):i.advanced.updateOnContentResize&&(n.poll.size.n=e[0].scrollHeight+e[0].scrollWidth+o[0].offsetHeight+e[0].offsetHeight+e[0].offsetWidth,n.poll.size.n!==n.poll.size.o)?(n.poll.size.o=n.poll.size.n,void s(1)):!i.advanced.updateOnImageLoad||"auto"===i.advanced.updateOnImageLoad&&"y"===i.axis||(n.poll.img.n=o.find("img").length,n.poll.img.n===n.poll.img.o)?void((i.advanced.updateOnSelectorChange||i.advanced.updateOnContentResize||i.advanced.updateOnImageLoad)&&t()):(n.poll.img.o=n.poll.img.n,void o.find("img").each(function(){r(this)}))},i.advanced.autoUpdateTimeout)}()},X=function(t){t=t.data(O);N("#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal").each(function(){e.call(this)})},Q=function(o,t,r){var e,n=o.data(O),i=n.opt,a={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:i.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=[(r=N.extend(a,r)).dur,r.drag?0:r.dur],l=N("#mCSB_"+n.idx),c=N("#mCSB_"+n.idx+"_container"),u=c.parent(),d=i.callbacks.onTotalScrollOffset?Y.call(o,i.callbacks.onTotalScrollOffset):[0,0],h=i.callbacks.onTotalScrollBackOffset?Y.call(o,i.callbacks.onTotalScrollBackOffset):[0,0];if(n.trigger=r.trigger,0===u.scrollTop()&&0===u.scrollLeft()||(N(".mCSB_"+n.idx+"_scrollbar").css("visibility","visible"),u.scrollTop(0).scrollLeft(0)),"_resetY"!==t||n.contentReset.y||(C("onOverflowYNone")&&i.callbacks.onOverflowYNone.call(o[0]),n.contentReset.y=1),"_resetX"!==t||n.contentReset.x||(C("onOverflowXNone")&&i.callbacks.onOverflowXNone.call(o[0]),n.contentReset.x=1),"_resetY"!==t&&"_resetX"!==t){switch(!n.contentReset.y&&o[0].mcs||!n.overflowed[0]||(C("onOverflowY")&&i.callbacks.onOverflowY.call(o[0]),n.contentReset.x=null),!n.contentReset.x&&o[0].mcs||!n.overflowed[1]||(C("onOverflowX")&&i.callbacks.onOverflowX.call(o[0]),n.contentReset.x=null),i.snapAmount&&(e=i.snapAmount instanceof Array?"x"===r.dir?i.snapAmount[1]:i.snapAmount[0]:i.snapAmount,a=t,u=e,e=i.snapOffset,t=Math.round(a/u)*u-e),r.dir){case"x":var p=N("#mCSB_"+n.idx+"_dragger_horizontal"),f="left",g=c[0].offsetLeft,m=[l.width()-c.outerWidth(!1),p.parent().width()-p.width()],v=[t,0===t?0:t/n.scrollRatio.x],b=d[1],y=h[1],w=0<b?b/n.scrollRatio.x:0,x=0<y?y/n.scrollRatio.x:0;break;case"y":p=N("#mCSB_"+n.idx+"_dragger_vertical"),f="top",g=c[0].offsetTop,m=[l.height()-c.outerHeight(!1),p.parent().height()-p.height()],v=[t,0===t?0:t/n.scrollRatio.y],b=d[0],y=h[0],w=0<b?b/n.scrollRatio.y:0,x=0<y?y/n.scrollRatio.y:0}v[1]<0||0===v[0]&&0===v[1]?v=[0,0]:v[1]>=m[1]?v=[m[0],m[1]]:v[0]=-v[0],o[0].mcs||(A(),C("onInit")&&i.callbacks.onInit.call(o[0])),clearTimeout(c[0].onCompleteTimeout),K(p[0],f,Math.round(v[1]),s[1],r.scrollEasing),!n.tweenRunning&&(0===g&&0<=v[0]||g===m[0]&&v[0]<=m[0])||K(c[0],f,Math.round(v[0]),s[0],r.scrollEasing,r.overwrite,{onStart:function(){r.callbacks&&r.onStart&&!n.tweenRunning&&(C("onScrollStart")&&(A(),i.callbacks.onScrollStart.call(o[0])),n.tweenRunning=!0,D(p),n.cbOffsets=[i.callbacks.alwaysTriggerOffsets||g>=m[0]+b,i.callbacks.alwaysTriggerOffsets||g<=-y])},onUpdate:function(){r.callbacks&&r.onUpdate&&C("whileScrolling")&&(A(),i.callbacks.whileScrolling.call(o[0]))},onComplete:function(){var t;r.callbacks&&r.onComplete&&("yx"===i.axis&&clearTimeout(c[0].onCompleteTimeout),t=c[0].idleTimer||0,c[0].onCompleteTimeout=setTimeout(function(){C("onScroll")&&(A(),i.callbacks.onScroll.call(o[0])),C("onTotalScroll")&&v[1]>=m[1]-w&&n.cbOffsets[0]&&(A(),i.callbacks.onTotalScroll.call(o[0])),C("onTotalScrollBack")&&v[1]<=x&&n.cbOffsets[1]&&(A(),i.callbacks.onTotalScrollBack.call(o[0])),n.tweenRunning=!1,c[0].idleTimer=0,D(p,"hide")},t))}})}function C(t){return n&&i.callbacks[t]&&"function"==typeof i.callbacks[t]}function A(){var t=[c[0].offsetTop,c[0].offsetLeft],e=[p[0].offsetTop,p[0].offsetLeft],n=[c.outerHeight(!1),c.outerWidth(!1)],i=[l.height(),l.width()];o[0].mcs={content:c,top:t[0],left:t[1],draggerTop:e[0],draggerLeft:e[1],topPct:Math.round(100*Math.abs(t[0])/(Math.abs(n[0])-i[0])),leftPct:Math.round(100*Math.abs(t[1])/(Math.abs(n[1])-i[1])),direction:r.dir}}},K=function(t,e,n,i,o,r,a){t._mTween||(t._mTween={top:{},left:{}});var s,l,c=(a=a||{}).onStart||function(){},u=a.onUpdate||function(){},d=a.onComplete||function(){},h=$(),p=0,f=t.offsetTop,g=t.style,m=t._mTween[e];"left"===e&&(f=t.offsetLeft);var v=n-f;function b(){m.stop||(p||c.call(),p=$()-h,y(),p>=m.time&&(m.time=p>m.time?p+s-(p-m.time):p+s-1,m.time<p+1&&(m.time=p+1)),m.time<i?m.id=l(b):d.call())}function y(){0<i?(m.currVal=function(t,e,n,i,o){switch(o){case"linear":case"mcsLinear":return n*t/i+e;case"mcsLinearOut":return t/=i,t--,n*Math.sqrt(1-t*t)+e;case"easeInOutSmooth":return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e;case"easeInOutStrong":return(t/=i/2)<1?n/2*Math.pow(2,10*(t-1))+e:(t--,n/2*(2-Math.pow(2,-10*t))+e);case"easeInOut":case"mcsEaseInOut":return(t/=i/2)<1?n/2*t*t*t+e:n/2*((t-=2)*t*t+2)+e;case"easeOutSmooth":return t/=i,-n*(--t*t*t*t-1)+e;case"easeOutStrong":return n*(1-Math.pow(2,-10*t/i))+e;case"easeOut":case"mcsEaseOut":default:var r=(t/=i)*t,a=r*t;return e+n*(.499999999999997*a*r+-2.5*r*r+5.5*a+-6.5*r+4*t)}}(m.time,f,v,i,o),g[e]=Math.round(m.currVal)+"px"):g[e]=n+"px",u.call()}m.stop=0,"none"===r||null!=m.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(m.id):clearTimeout(m.id),m.id=null),s=1e3/60,m.time=p+s,l=window.requestAnimationFrame||function(t){return y(),setTimeout(t,.01)},m.id=l(b)},$=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},e=function(){this._mTween||(this._mTween={top:{},left:{}});for(var t=["top","left"],e=0;e<t.length;e++){var n=t[e];this._mTween[n].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(this._mTween[n].id):clearTimeout(this._mTween[n].id),this._mTween[n].id=null,this._mTween[n].stop=1)}},tt=function(e,n){try{delete e[n]}catch(t){e[n]=null}},et=function(t){return!(t.which&&1!==t.which)},nt=function(t){t=t.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},it=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ot=function(t){var e=t.parents(".mCSB_container");return[t.offset().top-e.offset().top,t.offset().left-e.offset().left]},rt=function(){var t=function(){var t=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var e=0;e<t.length;e++)if(t[e]+"Hidden"in document)return t[e]+"Hidden";return null}();return!!t&&document[t]},N.fn[l]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void N.error("Method "+t+" does not exist"):h.init.apply(this,arguments)},N[l]=function(t){return h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void N.error("Method "+t+" does not exist"):h.init.apply(this,arguments)},N[l].defaults=o,window[l]=!0,N(window).bind("load",function(){N(i)[l](),N.extend(N.expr[":"],{mcsInView:N.expr[":"].mcsInView||function(t){var e=N(t),n=e.parents(".mCSB_container");if(n.length)return t=n.parent(),0<=(n=[n[0].offsetTop,n[0].offsetLeft])[0]+ot(e)[0]&&n[0]+ot(e)[0]<t.height()-e.outerHeight(!1)&&0<=n[1]+ot(e)[1]&&n[1]+ot(e)[1]<t.width()-e.outerWidth(!1)},mcsInSight:N.expr[":"].mcsInSight||function(t,e,n){var i=N(t),o=i.parents(".mCSB_container"),t="exact"===n[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(o.length)return n=[i.outerHeight(!1),i.outerWidth(!1)],i=[o[0].offsetTop+ot(i)[0],o[0].offsetLeft+ot(i)[1]],o=[o.parent()[0].offsetHeight,o.parent()[0].offsetWidth],i[0]-o[0]*(t=[n[0]<o[0]?t[0]:t[1],n[1]<o[1]?t[0]:t[1]])[0][0]<0&&0<=i[0]+n[0]-o[0]*t[0][1]&&i[1]-o[1]*t[1][0]<0&&0<=i[1]+n[1]-o[1]*t[1][1]},mcsOverflow:N.expr[":"].mcsOverflow||function(t){t=N(t).data(O);if(t)return t.overflowed[0]||t.overflowed[1]}})})}),function(N,O,i){function s(t,e){this.bodyOverflowX,this.callbacks={hide:[],show:[]},this.checkInterval=null,this.Content,this.$el=N(t),this.$elProxy,this.elProxyPosition,this.enabled=!0,this.options=N.extend({},l,e),this.mouseIsOverProxy=!1,this.namespace="tooltipster-"+Math.round(1e5*Math.random()),this.Status="hidden",this.timerHide=null,this.timerShow=null,this.$tooltip,this.options.iconTheme=this.options.iconTheme.replace(".",""),this.options.theme=this.options.theme.replace(".",""),this._init()}function o(n,i){var o=!0;return N.each(n,function(t,e){return void 0===i[t]||n[t]!==i[t]?o=!1:void 0}),o}function n(){return!t&&d}function u(){var t,e=(i.body||i.documentElement).style;if("string"==typeof e.transition)return 1;v=["Moz","Webkit","Khtml","O","ms"],t="transition".charAt(0).toUpperCase()+"transition".substr(1);for(var n=0;n<v.length;n++)if("string"==typeof e[v[n]+t])return 1}var l={animation:"fade",arrow:!0,arrowColor:"",autoClose:!0,content:null,contentAsHTML:!1,contentCloning:!0,debug:!0,delay:200,minWidth:0,maxWidth:null,functionInit:function(t,e){},functionBefore:function(t,e){e()},functionReady:function(t,e){},functionAfter:function(t){},hideOnClick:!1,icon:"(?)",iconCloning:!0,iconDesktop:!1,iconTouch:!1,iconTheme:"tooltipster-icon",interactive:!1,interactiveTolerance:350,multiple:!1,offsetX:0,offsetY:0,onlyOne:!1,position:"top",positionTracker:!1,positionTrackerCallback:function(t){"hover"==this.option("trigger")&&this.option("autoClose")&&this.hide()},restoration:"current",speed:350,timer:0,theme:"tooltipster-default",touchDevices:!0,trigger:"hover",updateAnimation:!0};s.prototype={_init:function(){var t,e=this;i.querySelector&&(t=null,void 0===e.$el.data("tooltipster-initialTitle")&&(void 0===(t=e.$el.attr("title"))&&(t=null),e.$el.data("tooltipster-initialTitle",t)),null!==e.options.content?e._content_set(e.options.content):e._content_set(t),void 0!==(t=e.options.functionInit.call(e.$el,e.$el,e.Content))&&e._content_set(t),e.$el.removeAttr("title").addClass("tooltipstered"),!d&&e.options.iconDesktop||d&&e.options.iconTouch?("string"==typeof e.options.icon?(e.$elProxy=N('<span class="'+e.options.iconTheme+'"></span>'),e.$elProxy.text(e.options.icon)):e.options.iconCloning?e.$elProxy=e.options.icon.clone(!0):e.$elProxy=e.options.icon,e.$elProxy.insertAfter(e.$el)):e.$elProxy=e.$el,"hover"==e.options.trigger?(e.$elProxy.on("mouseenter."+e.namespace,function(){n()&&!e.options.touchDevices||(e.mouseIsOverProxy=!0,e._show())}).on("mouseleave."+e.namespace,function(){n()&&!e.options.touchDevices||(e.mouseIsOverProxy=!1)}),d&&e.options.touchDevices&&e.$elProxy.on("touchstart."+e.namespace,function(){e._showNow()})):"click"==e.options.trigger&&e.$elProxy.on("click."+e.namespace,function(){n()&&!e.options.touchDevices||e._show()}))},_show:function(){var t=this;"shown"!=t.Status&&"appearing"!=t.Status&&(t.options.delay?t.timerShow=setTimeout(function(){("click"==t.options.trigger||"hover"==t.options.trigger&&t.mouseIsOverProxy)&&t._showNow()},t.options.delay):t._showNow())},_showNow:function(l){var c=this;c.options.functionBefore.call(c.$el,c.$el,function(){var t,e,n,i,o,r,a,s;c.enabled&&null!==c.Content&&(l&&c.callbacks.show.push(l),c.callbacks.hide=[],clearTimeout(c.timerShow),c.timerShow=null,clearTimeout(c.timerHide),c.timerHide=null,c.options.onlyOne&&N(".tooltipstered").not(c.$el).each(function(t,e){var o=N(e),e=o.data("tooltipster-ns");N.each(e,function(t,e){var n=o.data(e),i=n.status(),e=n.option("autoClose");"hidden"!==i&&"disappearing"!==i&&e&&n.hide()})}),t=function(){c.Status="shown",N.each(c.callbacks.show,function(t,e){e.call(c.$el)}),c.callbacks.show=[]},"hidden"!==c.Status?(e=0,"disappearing"===c.Status?(c.Status="appearing",u()?(c.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+c.options.animation+"-show"),0<c.options.speed&&c.$tooltip.delay(c.options.speed),c.$tooltip.queue(t)):c.$tooltip.stop().fadeIn(t)):"shown"===c.Status&&t()):(c.Status="appearing",e=c.options.speed,c.bodyOverflowX=N("body").css("overflow-x"),N("body").css("overflow-x","hidden"),n="tooltipster-"+c.options.animation,i="-webkit-transition-duration: "+c.options.speed+"ms; -webkit-animation-duration: "+c.options.speed+"ms; -moz-transition-duration: "+c.options.speed+"ms; -moz-animation-duration: "+c.options.speed+"ms; -o-transition-duration: "+c.options.speed+"ms; -o-animation-duration: "+c.options.speed+"ms; -ms-transition-duration: "+c.options.speed+"ms; -ms-animation-duration: "+c.options.speed+"ms; transition-duration: "+c.options.speed+"ms; animation-duration: "+c.options.speed+"ms;",o=c.options.minWidth?"min-width:"+Math.round(c.options.minWidth)+"px;":"",r=c.options.maxWidth?"max-width:"+Math.round(c.options.maxWidth)+"px;":"",a=c.options.interactive?"pointer-events: auto;":"",c.$tooltip=N('<div class="tooltipster-base '+c.options.theme+'" style="'+o+" "+r+" "+a+" "+i+'"><div class="tooltipster-content"></div></div>'),u()&&c.$tooltip.addClass(n),c._content_insert(),c.$tooltip.appendTo("body"),c.reposition(),c.options.functionReady.call(c.$el,c.$el,c.$tooltip),u()?(c.$tooltip.addClass(n+"-show"),0<c.options.speed&&c.$tooltip.delay(c.options.speed),c.$tooltip.queue(t)):c.$tooltip.css("display","none").fadeIn(c.options.speed,t),c._interval_set(),N(O).on("scroll."+c.namespace+" resize."+c.namespace,function(){c.reposition()}),c.options.autoClose&&(N("body").off("."+c.namespace),"hover"==c.options.trigger?(d&&setTimeout(function(){N("body").on("touchstart."+c.namespace,function(){c.hide()})},0),c.options.interactive?(d&&c.$tooltip.on("touchstart."+c.namespace,function(t){t.stopPropagation()}),s=null,c.$elProxy.add(c.$tooltip).on("mouseleave."+c.namespace+"-autoClose",function(){clearTimeout(s),s=setTimeout(function(){c.hide()},c.options.interactiveTolerance)}).on("mouseenter."+c.namespace+"-autoClose",function(){clearTimeout(s)})):c.$elProxy.on("mouseleave."+c.namespace+"-autoClose",function(){c.hide()}),c.options.hideOnClick&&c.$elProxy.on("click."+c.namespace+"-autoClose",function(){c.hide()})):"click"==c.options.trigger&&(setTimeout(function(){N("body").on("click."+c.namespace+" touchstart."+c.namespace,function(){c.hide()})},0),c.options.interactive&&c.$tooltip.on("click."+c.namespace+" touchstart."+c.namespace,function(t){t.stopPropagation()})))),0<c.options.timer&&(c.timerHide=setTimeout(function(){c.timerHide=null,c.hide()},c.options.timer+e)))})},_interval_set:function(){var n=this;n.checkInterval=setInterval(function(){var t,e;0===N("body").find(n.$el).length||0===N("body").find(n.$elProxy).length||"hidden"==n.Status||0===N("body").find(n.$tooltip).length?("shown"!=n.Status&&"appearing"!=n.Status||n.hide(),n._interval_cancel()):n.options.positionTracker&&(e=!1,o((t=n._repositionInfo(n.$elProxy)).dimension,n.elProxyPosition.dimension)&&("fixed"===n.$elProxy.css("position")?o(t.position,n.elProxyPosition.position)&&(e=!0):o(t.offset,n.elProxyPosition.offset)&&(e=!0)),e||(n.reposition(),n.options.positionTrackerCallback.call(n,n.$el)))},200)},_interval_cancel:function(){clearInterval(this.checkInterval),this.checkInterval=null},_content_set:function(t){"object"==typeof t&&null!==t&&this.options.contentCloning&&(t=t.clone(!0)),this.Content=t},_content_insert:function(){var t=this.$tooltip.find(".tooltipster-content");"string"!=typeof this.Content||this.options.contentAsHTML?t.empty().append(this.Content):t.text(this.Content)},_update:function(t){var e=this;e._content_set(t),null!==e.Content?"hidden"!==e.Status&&(e._content_insert(),e.reposition(),e.options.updateAnimation&&(u()?(e.$tooltip.css({width:"","-webkit-transition":"all "+e.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+e.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+e.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+e.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+e.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing"),setTimeout(function(){"hidden"!=e.Status&&(e.$tooltip.removeClass("tooltipster-content-changing"),setTimeout(function(){"hidden"!==e.Status&&e.$tooltip.css({"-webkit-transition":e.options.speed+"ms","-moz-transition":e.options.speed+"ms","-o-transition":e.options.speed+"ms","-ms-transition":e.options.speed+"ms",transition:e.options.speed+"ms"})},e.options.speed))},e.options.speed)):e.$tooltip.fadeTo(e.options.speed,.5,function(){"hidden"!=e.Status&&e.$tooltip.fadeTo(e.options.speed,1)}))):e.hide()},_repositionInfo:function(t){return{dimension:{height:t.outerHeight(!1),width:t.outerWidth(!1)},offset:t.offset(),position:{left:parseInt(t.css("left")),top:parseInt(t.css("top"))}}},hide:function(t){var n=this;t&&n.callbacks.hide.push(t),n.callbacks.show=[],clearTimeout(n.timerShow),n.timerShow=null,clearTimeout(n.timerHide),n.timerHide=null;function e(){N.each(n.callbacks.hide,function(t,e){e.call(n.$el)}),n.callbacks.hide=[]}return"shown"==n.Status||"appearing"==n.Status?(n.Status="disappearing",t=function(){n.Status="hidden","object"==typeof n.Content&&null!==n.Content&&n.Content.detach(),n.$tooltip.remove(),n.$tooltip=null,N(O).off("."+n.namespace),N("body").off("."+n.namespace).css("overflow-x",n.bodyOverflowX),N("body").off("."+n.namespace),n.$elProxy.off("."+n.namespace+"-autoClose"),n.options.functionAfter.call(n.$el,n.$el),e()},u()?(n.$tooltip.clearQueue().removeClass("tooltipster-"+n.options.animation+"-show").addClass("tooltipster-dying"),0<n.options.speed&&n.$tooltip.delay(n.options.speed),n.$tooltip.queue(t)):n.$tooltip.stop().fadeOut(n.options.speed,t)):"hidden"==n.Status&&e(),n},show:function(t){return this._showNow(t),this},update:function(t){return this.content(t)},content:function(t){return void 0===t?this.Content:(this._update(t),this)},reposition:function(){function t(){var t=N(O).scrollLeft();F-t<0&&(i=F-t,F=t),o<F+a-t&&(i=F-(o+t-a),F=o+t-a)}function e(t,e){r.offset.top-N(O).scrollTop()-s-E-12<0&&-1<e.indexOf("top")&&(L=t),r.offset.top+r.dimension.height+s+12+E>N(O).scrollTop()+N(O).height()&&-1<e.indexOf("bottom")&&(L=t,I=r.offset.top-s-E-12)}var n=this;if(0!==N("body").find(n.$tooltip).length){n.$tooltip.css("width",""),n.elProxyPosition=n._repositionInfo(n.$elProxy);var i=null,o=N(O).width(),r=n.elProxyPosition,a=n.$tooltip.outerWidth(!1),s=(n.$tooltip.innerWidth(),n.$tooltip.outerHeight(!1));if(n.$elProxy.is("area")){var l=n.$elProxy.attr("shape"),c=n.$elProxy.parent().attr("name"),u=N('img[usemap="#'+c+'"]'),d=u.offset().left,h=u.offset().top,p=void 0!==n.$elProxy.attr("coords")?n.$elProxy.attr("coords").split(","):void 0;if("circle"==l){var f=parseInt(p[0]),g=parseInt(p[1]),m=parseInt(p[2]);r.dimension.height=2*m,r.dimension.width=2*m,r.offset.top=h+g-m,r.offset.left=d+f-m}else if("rect"==l){f=parseInt(p[0]),g=parseInt(p[1]),c=parseInt(p[2]),m=parseInt(p[3]);r.dimension.height=m-g,r.dimension.width=c-f,r.offset.top=h+g,r.offset.left=d+f}else if("poly"==l){for(var v=0,b=0,y=0,w=0,x="even",C=0;C<p.length;C++)var A=parseInt(p[C]),x="even"==x?(y<A&&(y=A,0===C&&(v=y)),A<v&&(v=A),"odd"):(w<A&&(w=A,1==C&&(b=w)),A<b&&(b=A),"even");r.dimension.height=w-b,r.dimension.width=y-v,r.offset.top=h+b,r.offset.left=d+v}else r.dimension.height=u.outerHeight(!1),r.dimension.width=u.outerWidth(!1),r.offset.top=h,r.offset.left=d}var D,S,_,P,k,F=0,h=0,I=0,E=parseInt(n.options.offsetY),d=parseInt(n.options.offsetX),L=n.options.position;"top"==L&&(D=r.offset.left+a-(r.offset.left+r.dimension.width),F=r.offset.left+d-D/2,I=r.offset.top-s-E-12,t(),e("bottom","top")),"top-left"==L&&(F=r.offset.left+d,I=r.offset.top-s-E-12,t(),e("bottom-left","top-left")),"top-right"==L&&(F=r.offset.left+r.dimension.width+d-a,I=r.offset.top-s-E-12,t(),e("bottom-right","top-right")),"bottom"==L&&(D=r.offset.left+a-(r.offset.left+r.dimension.width),F=r.offset.left-D/2+d,I=r.offset.top+r.dimension.height+E+12,t(),e("top","bottom")),"bottom-left"==L&&(F=r.offset.left+d,I=r.offset.top+r.dimension.height+E+12,t(),e("top-left","bottom-left")),"bottom-right"==L&&(F=r.offset.left+r.dimension.width+d-a,I=r.offset.top+r.dimension.height+E+12,t(),e("top-right","bottom-right")),"left"==L&&(F=r.offset.left-d-a-12,h=r.offset.left+d+r.dimension.width+12,_=r.offset.top+s-(r.offset.top+r.dimension.height),I=r.offset.top-_/2-E,F<0&&o<h+a?(k=2*parseFloat(n.$tooltip.css("border-width")),P=a+F-k,n.$tooltip.css("width",P+"px"),s=n.$tooltip.outerHeight(!1),F=r.offset.left-d-P-12-k,_=r.offset.top+s-(r.offset.top+r.dimension.height),I=r.offset.top-_/2-E):F<0&&(F=r.offset.left+d+r.dimension.width+12,i="left")),"right"==L&&(F=r.offset.left+d+r.dimension.width+12,h=r.offset.left-d-a-12,_=r.offset.top+s-(r.offset.top+r.dimension.height),I=r.offset.top-_/2-E,o<F+a&&h<0?(k=2*parseFloat(n.$tooltip.css("border-width")),P=o-F-k,n.$tooltip.css("width",P+"px"),s=n.$tooltip.outerHeight(!1),_=r.offset.top+s-(r.offset.top+r.dimension.height),I=r.offset.top-_/2-E):o<F+a&&(F=r.offset.left-d-a-12,i="right")),n.options.arrow&&(h="tooltipster-arrow-"+L,k=n.options.arrowColor.length<1?n.$tooltip.css("background-color"):n.options.arrowColor,i=i?"left"==i?(h="tooltipster-arrow-right",""):"right"==i?(h="tooltipster-arrow-left",""):"left:"+Math.round(i)+"px;":"",P="top"==L||"top-left"==L||"top-right"==L?(S=parseFloat(n.$tooltip.css("border-bottom-width")),n.$tooltip.css("border-bottom-color")):"bottom"==L||"bottom-left"==L||"bottom-right"==L?(S=parseFloat(n.$tooltip.css("border-top-width")),n.$tooltip.css("border-top-color")):"left"==L?(S=parseFloat(n.$tooltip.css("border-right-width")),n.$tooltip.css("border-right-color")):"right"==L?(S=parseFloat(n.$tooltip.css("border-left-width")),n.$tooltip.css("border-left-color")):(S=parseFloat(n.$tooltip.css("border-bottom-width")),n.$tooltip.css("border-bottom-color")),1<S&&S++,_="",0!==S&&(d="",P="border-color: "+P+";",-1!==h.indexOf("bottom")?d="margin-top: -"+Math.round(S)+"px;":-1!==h.indexOf("top")?d="margin-bottom: -"+Math.round(S)+"px;":-1!==h.indexOf("left")?d="margin-right: -"+Math.round(S)+"px;":-1!==h.indexOf("right")&&(d="margin-left: -"+Math.round(S)+"px;"),_='<span class="tooltipster-arrow-border" style="'+d+" "+P+';"></span>'),n.$tooltip.find(".tooltipster-arrow").remove(),k='<div class="'+h+' tooltipster-arrow" style="'+i+'">'+_+'<span style="border-color:'+k+';"></span></div>',n.$tooltip.append(k)),n.$tooltip.css({top:Math.round(I)+"px",left:Math.round(F)+"px"})}return n},enable:function(){return this.enabled=!0,this},disable:function(){return this.hide(),this.enabled=!1,this},destroy:function(){var n=this;n.hide(),n.$el[0]!==n.$elProxy[0]&&n.$elProxy.remove(),n.$el.removeData(n.namespace).off("."+n.namespace);var t,e=n.$el.data("tooltipster-ns");return 1===e.length?(t=null,"previous"===n.options.restoration?t=n.$el.data("tooltipster-initialTitle"):"current"===n.options.restoration&&(t="string"==typeof n.Content?n.Content:N("<div></div>").append(n.Content).html()),t&&n.$el.attr("title",t),n.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")):(e=N.grep(e,function(t,e){return t!==n.namespace}),n.$el.data("tooltipster-ns",e)),n},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:void 0},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:void 0},option:function(t,e){return void 0===e?this.options[t]:(this.options[t]=e,this)},status:function(){return this.Status}},N.fn.tooltipster=function(){var i=arguments;if(0===this.length){if("string"!=typeof i[0])return this;var t=!0;return"setDefaults"===i[0]?N.extend(l,i[1]):t=!1,!!t||this}if("string"==typeof i[0]){var n="#*$~&";return this.each(function(){var t=N(this).data("tooltipster-ns"),e=t?N(this).data(t[0]):null;if(!e)throw new Error("You called Tooltipster's \""+i[0]+'" method on an uninitialized element');if("function"!=typeof e[i[0]])throw new Error('Unknown method .tooltipster("'+i[0]+'")');t=e[i[0]](i[1],i[2]);return t!==e?(n=t,!1):void 0}),"#*$~&"!==n?n:this}var o=[],t=i[0]&&void 0!==i[0].multiple,r=t&&i[0].multiple||!t&&l.multiple,t=i[0]&&void 0!==i[0].debug,a=t&&i[0].debug||!t&&l.debug;return this.each(function(){var t=!1,e=N(this).data("tooltipster-ns"),n=null;!e||r?t=!0:a&&console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.'),t&&(n=new s(this,i[0]),(e=e||[]).push(n.namespace),N(this).data("tooltipster-ns",e),N(this).data(n.namespace,n)),o.push(n)}),r?o:this};var d=!!("ontouchstart"in O),t=!1;N("body").one("mousemove",function(){t=!0})}(jQuery,window,document),function(t){var e,n,i,o;function r(t,e){var n,i;1<t.originalEvent.touches.length||(t.preventDefault(),n=t.originalEvent.changedTouches[0],(i=document.createEvent("MouseEvents")).initMouseEvent(e,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(i))}t.support.touch="ontouchend"in document,t.support.touch&&(e=t.ui.mouse.prototype,n=e._mouseInit,i=e._mouseDestroy,e._touchStart=function(t){!o&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(o=!0,this._touchMoved=!1,r(t,"mouseover"),r(t,"mousemove"),r(t,"mousedown"))},e._touchMove=function(t){o&&(this._touchMoved=!0,r(t,"mousemove"))},e._touchEnd=function(t){o&&(r(t,"mouseup"),r(t,"mouseout"),this._touchMoved||r(t,"click"),o=!1)},e._mouseInit=function(){this.element.bind({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),n.call(this)},e._mouseDestroy=function(){this.element.unbind({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),i.call(this)})}(jQuery),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).jspdf={})}(this,function(h){"use strict";var rn=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function e(){rn.console&&"function"==typeof rn.console.log&&rn.console.log.apply(rn.console,arguments)}var an={log:e,warn:function(t){rn.console&&("function"==typeof rn.console.warn?rn.console.warn.apply(rn.console,arguments):e.call(null,arguments))},error:function(t){rn.console&&("function"==typeof rn.console.error?rn.console.error.apply(rn.console,arguments):e(t))}};function l(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){ln(i.response,e,n)},i.onerror=function(){an.error("could not download file")},i.send()}function r(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&e.status<=299}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}var P,sn,ln=rn.saveAs||("object"!=typeof window||window!==rn?function(){}:"download"in HTMLAnchorElement.prototype?function(t,e,n){var i=rn.URL||rn.webkitURL,o=document.createElement("a");e=e||t.name||"download",o.download=e,o.rel="noopener","string"==typeof t?(o.href=t,o.origin!==location.origin?r(o.href)?l(t,e,n):a(o,o.target="_blank"):a(o)):(o.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){a(o)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){var i;e=e||t.name||"download","string"==typeof t?r(t)?l(t,e,n):((i=document.createElement("a")).href=t,i.target="_blank",setTimeout(function(){a(i)})):navigator.msSaveOrOpenBlob((t=t,void 0===(n=n)?n={autoBom:!1}:"object"!=typeof n&&(an.warn("Deprecated: Expected third argument to be a object"),n={autoBom:!n}),n.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t),e)}:function(t,e,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return l(t,e,n);var o,r,a,e="application/octet-stream"===t.type,n=/constructor/i.test(rn.HTMLElement)||rn.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);(s||e&&n)&&"object"==typeof FileReader?((o=new FileReader).onloadend=function(){var t=o.result,t=s?t:t.replace(/^data:[^;]*;/,"data:attachment/file;");i?i.location.href=t:location=t,i=null},o.readAsDataURL(t)):(r=rn.URL||rn.webkitURL,a=r.createObjectURL(t),i?i.location=a:location.href=a,i=null,setTimeout(function(){r.revokeObjectURL(a)},4e4))});function cn(t){t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6));t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<e.length;n++){var i=e[n].re,o=e[n].process,i=i.exec(t);i&&(i=o(i),this.r=i[0],this.g=i[1],this.b=i[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:255<this.r?255:this.r,this.g=this.g<0||isNaN(this.g)?0:255<this.g?255:this.g,this.b=this.b<0||isNaN(this.b)?0:255<this.b?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==n.length&&(n="0"+n),"#"+t+e+n}}function s(t,e){var n=u(n=t[0],r=t[1],o=t[2],i=t[3],e[0],7,-680876936),i=u(i,n,r,o,e[1],12,-389564586),o=u(o,i,n,r,e[2],17,606105819),r=u(r,o,i,n,e[3],22,-1044525330);n=u(n,r,o,i,e[4],7,-176418897),i=u(i,n,r,o,e[5],12,1200080426),o=u(o,i,n,r,e[6],17,-1473231341),r=u(r,o,i,n,e[7],22,-45705983),n=u(n,r,o,i,e[8],7,1770035416),i=u(i,n,r,o,e[9],12,-1958414417),o=u(o,i,n,r,e[10],17,-42063),r=u(r,o,i,n,e[11],22,-1990404162),n=u(n,r,o,i,e[12],7,1804603682),i=u(i,n,r,o,e[13],12,-40341101),o=u(o,i,n,r,e[14],17,-1502002290),n=d(n,r=u(r,o,i,n,e[15],22,1236535329),o,i,e[1],5,-165796510),i=d(i,n,r,o,e[6],9,-1069501632),o=d(o,i,n,r,e[11],14,643717713),r=d(r,o,i,n,e[0],20,-373897302),n=d(n,r,o,i,e[5],5,-701558691),i=d(i,n,r,o,e[10],9,38016083),o=d(o,i,n,r,e[15],14,-660478335),r=d(r,o,i,n,e[4],20,-405537848),n=d(n,r,o,i,e[9],5,568446438),i=d(i,n,r,o,e[14],9,-1019803690),o=d(o,i,n,r,e[3],14,-187363961),r=d(r,o,i,n,e[8],20,1163531501),n=d(n,r,o,i,e[13],5,-1444681467),i=d(i,n,r,o,e[2],9,-51403784),o=d(o,i,n,r,e[7],14,1735328473),n=p(n,r=d(r,o,i,n,e[12],20,-1926607734),o,i,e[5],4,-378558),i=p(i,n,r,o,e[8],11,-2022574463),o=p(o,i,n,r,e[11],16,1839030562),r=p(r,o,i,n,e[14],23,-35309556),n=p(n,r,o,i,e[1],4,-1530992060),i=p(i,n,r,o,e[4],11,1272893353),o=p(o,i,n,r,e[7],16,-155497632),r=p(r,o,i,n,e[10],23,-1094730640),n=p(n,r,o,i,e[13],4,681279174),i=p(i,n,r,o,e[0],11,-358537222),o=p(o,i,n,r,e[3],16,-722521979),r=p(r,o,i,n,e[6],23,76029189),n=p(n,r,o,i,e[9],4,-640364487),i=p(i,n,r,o,e[12],11,-421815835),o=p(o,i,n,r,e[15],16,530742520),n=f(n,r=p(r,o,i,n,e[2],23,-995338651),o,i,e[0],6,-198630844),i=f(i,n,r,o,e[7],10,1126891415),o=f(o,i,n,r,e[14],15,-1416354905),r=f(r,o,i,n,e[5],21,-57434055),n=f(n,r,o,i,e[12],6,1700485571),i=f(i,n,r,o,e[3],10,-1894986606),o=f(o,i,n,r,e[10],15,-1051523),r=f(r,o,i,n,e[1],21,-2054922799),n=f(n,r,o,i,e[8],6,1873313359),i=f(i,n,r,o,e[15],10,-30611744),o=f(o,i,n,r,e[6],15,-1560198380),r=f(r,o,i,n,e[13],21,1309151649),n=f(n,r,o,i,e[4],6,-145523070),i=f(i,n,r,o,e[11],10,-1120210379),o=f(o,i,n,r,e[2],15,718787259),r=f(r,o,i,n,e[9],21,-343485551),t[0]=m(n,t[0]),t[1]=m(r,t[1]),t[2]=m(o,t[2]),t[3]=m(i,t[3])}function c(t,e,n,i,o,r){return e=m(m(e,t),m(i,r)),m(e<<o|e>>>32-o,n)}function u(t,e,n,i,o,r,a){return c(e&n|~e&i,t,e,o,r,a)}function d(t,e,n,i,o,r,a){return c(e&i|n&~i,t,e,o,r,a)}function p(t,e,n,i,o,r,a){return c(e^n^i,t,e,o,r,a)}function f(t,e,n,i,o,r,a){return c(n^(e|~i),t,e,o,r,a)}function n(t){for(var e=t.length,n=[1732584193,-271733879,-1732584194,271733878],i=64;i<=t.length;i+=64)s(n,function(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}(t.substring(i-64,i)));t=t.substring(i-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<t.length;i++)o[i>>2]|=t.charCodeAt(i)<<(i%4<<3);if(o[i>>2]|=128<<(i%4<<3),55<i)for(s(n,o),i=0;i<16;i++)o[i]=0;return o[14]=8*e,s(n,o),n}P=rn.atob.bind(rn),sn=rn.btoa.bind(rn);var i="0123456789abcdef".split("");function t(t){for(var e=0;e<t.length;e++)t[e]=function(t){for(var e="",n=0;n<4;n++)e+=i[t>>8*n+4&15]+i[t>>8*n&15];return e}(t[e]);return t.join("")}function o(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function g(t){return n(t).map(o).join("")}function m(t,e){return t+e&4294967295}function m(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function v(t,e){var n,i;if(void 0!==t){for(var o=(i=1+(256/(n=t).length>>0),new Array(i+1).join(n)),r=[],a=0;a<256;a++)r[a]=a;for(var s=0,a=0;a<256;a++){var l=r[a],s=(s+l+o.charCodeAt(a))%256;r[a]=r[s],r[s]=l}n=r}else r=n;for(var c=e.length,u=0,d=0,h="",a=0;a<c;a++)d=(d+(l=r[u=(u+1)%256]))%256,r[u]=r[d],r[d]=l,o=r[(r[u]+r[d])%256],h+=String.fromCharCode(e.charCodeAt(a)^o);return h}t(n("hello"));var b={print:4,modify:8,copy:16,"annot-forms":32};function un(t,e,n,i){this.v=1,this.r=2;let o=192;t.forEach(function(t){if(void 0!==b.perm)throw new Error("Invalid permission: "+t);o+=b[t]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";e=(e+this.padding).substr(0,32),n=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(e,n),this.P=-(1+(255^o)),this.encryptionKey=g(e+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=v(this.encryptionKey,this.padding)}function dn(r){if("object"!=typeof r)throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var a={};this.subscribe=function(t,e,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");a.hasOwnProperty(t)||(a[t]={});var i=Math.random().toString(35);return a[t][i]=[e,!!n],i},this.unsubscribe=function(t){for(var e in a)if(a[e][t])return delete a[e][t],0===Object.keys(a[e]).length&&delete a[e],!0;return!1},this.publish=function(t){if(a.hasOwnProperty(t)){var e,n=Array.prototype.slice.call(arguments,1),i=[];for(e in a[t]){var o=a[t][e];try{o[0].apply(r,n)}catch(t){rn.console&&an.error("jsPDF PubSub Error",t.message,t)}o[1]&&i.push(e)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return a}}function hn(t){if(!(this instanceof hn))return new hn(t);var e,n="opacity,stroke-opacity".split(",");for(e in t)t.hasOwnProperty(e)&&0<=n.indexOf(e)&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function y(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function pn(t,e,n,i,o){if(!(this instanceof pn))return new pn(t,e,n,i,o);this.type="axial"===t?2:3,this.coords=e,this.colors=n,y.call(this,i,o)}function fn(t,e,n,i,o){if(!(this instanceof fn))return new fn(t,e,n,i,o);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,y.call(this,i,o)}function gn(t){var n,o="string"==typeof arguments[0]?arguments[0]:"p",e=arguments[1],r=arguments[2],i=arguments[3],a=[],s=1,l=16,c="S",f=null;"object"==typeof(t=t||{})&&(o=t.orientation,e=t.unit||e,r=t.format||r,i=t.compress||t.compressPdf||i,null!==(f=t.encryption||null)&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),s="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(n=t.precision),void 0!==t.floatPrecision&&(l=t.floatPrecision),c=t.defaultPathOperation||"S"),a=t.filters||(!0===i?["FlateEncode"]:a),e=e||"mm",o=(""+(o||"P")).toLowerCase();var u=t.putOnlyUsedFonts||!1,G={},d={internal:{},__private__:{}};d.__private__.PubSub=dn;var h="1.3",p=d.__private__.getPdfVersion=function(){return h};d.__private__.setPdfVersion=function(t){h=t};var g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};d.__private__.getPageFormats=function(){return g};var m=d.__private__.getPageFormat=function(t){return g[t]},r=r||"a4",v="compat",Y="advanced",Z=v;function b(){this.saveGraphicsState(),K(new It(dt,0,0,-dt,0,nn()*dt).toString()+" cm"),this.setFontSize(this.getFontSize()/dt),c="n",Z=Y}function y(){this.restoreGraphicsState(),c="S",Z=v}d.advancedAPI=function(t){var e=Z===v;return e&&b.call(this),"function"!=typeof t||(t(this),e&&y.call(this)),this},d.compatAPI=function(t){var e=Z===Y;return e&&y.call(this),"function"!=typeof t||(t(this),e&&b.call(this)),this},d.isAdvancedAPI=function(){return Z===Y};function J(t){if(Z!==Y)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")}function w(t){return Q((t=t,Z===v?nn()-t:Z===Y?t:void 0))}var x=d.roundToPrecision=d.__private__.roundToPrecision=function(t,e){e=n||e;if(isNaN(t)||isNaN(e))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(e).replace(/0+$/,"")},X=d.hpf=d.__private__.hpf="number"==typeof l?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return x(t,l)}:"smart"===l?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return x(t,-1<t&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return x(t,16)},C=d.f2=d.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return x(t,2)},A=d.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return x(t,3)},Q=d.scale=d.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return Z===v?t*dt:Z===Y?t:void 0};d.__private__.setPrecision=d.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(n=parseInt(t,10))};var D,S="00000000000000000000000000000000",_=d.__private__.getFileId=function(){return S},P=d.__private__.setFileId=function(t){return S=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():S.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),null!==f&&(ve=new un(f.userPermissions,f.userPassword,f.ownerPassword,S)),S};d.setFileId=function(t){return P(t),this},d.getFileId=function(){return _()};var k=d.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),n=e<0?"+":"-",i=Math.floor(Math.abs(e/60)),e=Math.abs(e%60),e=[n,N(i),"'",N(e),"'"].join("");return["D:",t.getFullYear(),N(t.getMonth()+1),N(t.getDate()),N(t.getHours()),N(t.getMinutes()),N(t.getSeconds()),e].join("")},F=d.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),n=parseInt(t.substr(6,2),10)-1,i=parseInt(t.substr(8,2),10),o=parseInt(t.substr(10,2),10),r=parseInt(t.substr(12,2),10),t=parseInt(t.substr(14,2),10);return new Date(e,n,i,o,r,t,0)},I=d.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=k(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return D=e},E=d.__private__.getCreationDate=function(t){var e=D;return"jsDate"===t&&(e=F(D)),e};d.setCreationDate=function(t){return I(t),this},d.getCreationDate=function(t){return E(t)};var L,N=d.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},O=d.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},T=0,B=[],M=[],z=0,j=[],R=[],U=!1,W=M;d.__private__.setCustomOutputDestination=function(t){U=!0,W=t};function H(t){U||(W=t)}d.__private__.resetCustomOutputDestination=function(){U=!1,W=M};var K=d.__private__.out=function(t){return t=t.toString(),z+=t.length+1,W.push(t),W},V=d.__private__.write=function(t){return K(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},q=d.__private__.getArrayBuffer=function(t){for(var e=t.length,n=new ArrayBuffer(e),i=new Uint8Array(n);e--;)i[e]=t.charCodeAt(e);return n},$=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];d.__private__.getStandardFonts=function(){return $};var tt=t.fontSize||16;d.__private__.setFontSize=d.setFontSize=function(t){return tt=Z===Y?t/dt:t,this};var et,nt=d.__private__.getFontSize=d.getFontSize=function(){return Z===v?tt:tt*dt},it=t.R2L||!1;d.__private__.setR2L=d.setR2L=function(t){return it=t,this},d.__private__.getR2L=d.getR2L=function(){return it};var ot,rt=d.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(t))et=t;else if(isNaN(t)){if(-1===e.indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');et=t}else et=parseInt(t,10)};d.__private__.getZoomMode=function(){return et};var at,st=d.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');ot=t};d.__private__.getPageMode=function(){return ot};var lt=d.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');at=t};d.__private__.getLayoutMode=function(){return at},d.__private__.setDisplayMode=d.setDisplayMode=function(t,e,n){return rt(t),lt(e),st(n),this};var ct={title:"",subject:"",author:"",keywords:"",creator:""};d.__private__.getDocumentProperty=function(t){if(-1===Object.keys(ct).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ct[t]},d.__private__.getDocumentProperties=function(){return ct},d.__private__.setDocumentProperties=d.setProperties=d.setDocumentProperties=function(t){for(var e in ct)ct.hasOwnProperty(e)&&t[e]&&(ct[e]=t[e]);return this},d.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(ct).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ct[t]=e};var ut,dt,ht,pt,ft,gt={},mt={},vt=[],bt={},yt={},wt={},xt={},Ct=null,At=0,Dt=[],St=new dn(d),_t=t.hotfixes||[],Pt={},kt={},Ft=[],It=function(t,e,n,i,o,r){if(!(this instanceof It))return new It(t,e,n,i,o,r);isNaN(t)&&(t=1),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(i)&&(i=1),isNaN(o)&&(o=0),isNaN(r)&&(r=0),this._matrix=[t,e,n,i,o,r]};Object.defineProperty(It.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(It.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(It.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(It.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(It.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(It.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(It.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(It.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(It.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(It.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(It.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(It.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(It.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(It.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(It.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(It.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),It.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(X).join(t)},It.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,n=t.sx*this.shy+t.shy*this.sy,i=t.shx*this.sx+t.sy*this.shx,o=t.shx*this.shy+t.sy*this.sy,r=t.tx*this.sx+t.ty*this.shx+this.tx,t=t.tx*this.shy+t.ty*this.sy+this.ty;return new It(e,n,i,o,r,t)},It.prototype.decompose=function(){var t=this.sx,e=this.shy,n=this.shx,i=this.sy,o=this.tx,r=this.ty,a=Math.sqrt(t*t+e*e),s=(t/=a)*n+(e/=a)*i;n-=t*s,i-=e*s;var l=Math.sqrt(n*n+i*i);return s/=l,t*(i/=l)<e*(n/=l)&&(t=-t,e=-e,s=-s,a=-a),{scale:new It(a,0,0,l,0,0),translate:new It(1,0,0,1,o,r),rotate:new It(t,e,-e,t,0,0),skew:new It(1,0,s,1,0,0)}},It.prototype.toString=function(t){return this.join(" ")},It.prototype.inversed=function(){var t=this.sx,e=this.shy,n=this.shx,i=this.sy,o=this.tx,r=this.ty,a=1/(t*i-e*n),i=i*a,e=-e*a,n=-n*a,a=t*a;return new It(i,e,n,a,-i*o-n*r,-e*o-a*r)},It.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,t=t.x*this.shy+t.y*this.sy+this.ty;return new Xe(e,t)},It.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),t=this.applyToPoint(new Xe(t.x+t.w,t.y+t.h));return new Qe(e.x,e.y,t.x-e.x,t.y-e.y)},It.prototype.clone=function(){var t=this.sx,e=this.shy,n=this.shx,i=this.sy,o=this.tx,r=this.ty;return new It(t,e,n,i,o,r)},d.Matrix=It;var Et=d.matrixMult=function(t,e){return e.multiply(t)},Lt=new It(1,0,0,1,0,0);d.unitMatrix=d.identityMatrix=Lt;function Nt(t,e){var n;yt[t]||(n=(e instanceof pn?"Sh":"P")+(Object.keys(bt).length+1).toString(10),e.id=n,yt[t]=n,bt[n]=e,St.publish("addPattern",e))}d.ShadingPattern=pn,d.TilingPattern=fn,d.addShadingPattern=function(t,e){return J("addShadingPattern()"),Nt(t,e),this},d.beginTilingPattern=function(t){J("beginTilingPattern()"),$e(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},d.endTilingPattern=function(t,e){J("endTilingPattern()"),e.stream=R[L].join("\n"),Nt(t,e),St.publish("endTilingPattern",e),Ft.pop().restore()};function Ot(t){function e(t,e){return-1!==t.indexOf(" ")?"("+re(t,e)+")":re(t,e)}St.publish("putFont",{font:t,out:K,newObject:Yt,putStream:ne,pdfEscapeWithNeededParanthesis:e}),!0!==t.isAlreadyPutted&&(t.objectNumber=Yt(),K("<<"),K("/Type /Font"),K("/BaseFont /"+e(t.postScriptName)),K("/Subtype /Type1"),"string"==typeof t.encoding&&K("/Encoding /"+t.encoding),K("/FirstChar 32"),K("/LastChar 255"),K(">>"),K("endobj"))}function Tt(){for(var t in Pt)Pt.hasOwnProperty(t)&&function(t){t.objectNumber=Yt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[X(t.x),X(t.y),X(t.x+t.width),X(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var n=t.pages[1].join("\n");ne({data:n,additionalKeyValues:e,objectId:t.objectNumber}),K("endobj")}(Pt[t])}function Bt(t,e){e=e||21;var n=Yt(),i=function(t,e){for(var n,i=[],o=1/(e-1),r=0;r<1;r+=o)i.push(r);i.push(1),0!=t[0].offset&&(n={offset:0,color:t[0].color},t.unshift(n)),1!=t[t.length-1].offset&&(n={offset:1,color:t[t.length-1].color},t.push(n));for(var a="",s=0,l=0;l<i.length;l++){for(r=i[l];r>t[s+1].offset;)s++;var c=t[s].offset,u=(r-c)/(t[s+1].offset-c),d=t[s].color,c=t[s+1].color;a+=O(Math.round((1-u)*d[0]+u*c[0]).toString(16))+O(Math.round((1-u)*d[1]+u*c[1]).toString(16))+O(Math.round((1-u)*d[2]+u*c[2]).toString(16))}return a.trim()}(t.colors,e),o=[];o.push({key:"FunctionType",value:"0"}),o.push({key:"Domain",value:"[0.0 1.0]"}),o.push({key:"Size",value:"["+e+"]"}),o.push({key:"BitsPerSample",value:"8"}),o.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),o.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ne({data:i,additionalKeyValues:o,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),K("endobj"),t.objectNumber=Yt(),K("<< /ShadingType "+t.type),K("/ColorSpace /DeviceRGB"),o="/Coords ["+X(parseFloat(t.coords[0]))+" "+X(parseFloat(t.coords[1]))+" ",2===t.type?o+=X(parseFloat(t.coords[2]))+" "+X(parseFloat(t.coords[3])):o+=X(parseFloat(t.coords[2]))+" "+X(parseFloat(t.coords[3]))+" "+X(parseFloat(t.coords[4]))+" "+X(parseFloat(t.coords[5])),K(o+="]"),t.matrix&&K("/Matrix ["+t.matrix.toString()+"]"),K("/Function "+n+" 0 R"),K("/Extend [true true]"),K(">>"),K("endobj")}function Mt(t){var e,n,i,o,r;for(e in bt)bt.hasOwnProperty(e)&&(bt[e]instanceof pn?Bt(bt[e]):bt[e]instanceof fn&&(n=bt[e],i=t,r=o=void 0,o=Zt(),r=Yt(),i.push({resourcesOid:o,objectOid:r}),n.objectNumber=r,(r=[]).push({key:"Type",value:"/Pattern"}),r.push({key:"PatternType",value:"1"}),r.push({key:"PaintType",value:"1"}),r.push({key:"TilingType",value:"1"}),r.push({key:"BBox",value:"["+n.boundingBox.map(X).join(" ")+"]"}),r.push({key:"XStep",value:X(n.xStep)}),r.push({key:"YStep",value:X(n.yStep)}),r.push({key:"Resources",value:o+" 0 R"}),n.matrix&&r.push({key:"Matrix",value:"["+n.matrix.toString()+"]"}),ne({data:n.stream,additionalKeyValues:r,objectId:n.objectNumber}),K("endobj")))}function zt(){for(var t in wt)wt.hasOwnProperty(t)&&function(t){for(var e in t.objectNumber=Yt(),K("<<"),t)switch(e){case"opacity":K("/ca "+C(t[e]));break;case"stroke-opacity":K("/CA "+C(t[e]))}K(">>"),K("endobj")}(wt[t])}function jt(t){Jt(t.resourcesOid,!0),K("<<"),K("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in K("/Font <<"),gt)gt.hasOwnProperty(t)&&(!1===u||!0===u&&G.hasOwnProperty(t))&&K("/"+t+" "+gt[t].objectNumber+" 0 R");K(">>")}(),function(){if(0<Object.keys(bt).length){for(var t in K("/Shading <<"),bt)bt.hasOwnProperty(t)&&bt[t]instanceof pn&&0<=bt[t].objectNumber&&K("/"+t+" "+bt[t].objectNumber+" 0 R");St.publish("putShadingPatternDict"),K(">>")}}(),function(t){if(0<Object.keys(bt).length){for(var e in K("/Pattern <<"),bt)bt.hasOwnProperty(e)&&bt[e]instanceof d.TilingPattern&&0<=bt[e].objectNumber&&bt[e].objectNumber<t&&K("/"+e+" "+bt[e].objectNumber+" 0 R");St.publish("putTilingPatternDict"),K(">>")}}(t.objectOid),function(){if(0<Object.keys(wt).length){for(var t in K("/ExtGState <<"),wt)wt.hasOwnProperty(t)&&0<=wt[t].objectNumber&&K("/"+t+" "+wt[t].objectNumber+" 0 R");St.publish("putGStateDict"),K(">>")}}(),function(){for(var t in K("/XObject <<"),Pt)Pt.hasOwnProperty(t)&&0<=Pt[t].objectNumber&&K("/"+t+" "+Pt[t].objectNumber+" 0 R");St.publish("putXobjectDict"),K(">>")}(),K(">>"),K("endobj")}function Rt(){var t=[];!function(){for(var t in gt)gt.hasOwnProperty(t)&&(!1===u||!0===u&&G.hasOwnProperty(t))&&Ot(gt[t])}(),zt(),Tt(),Mt(t),St.publish("putResources"),t.forEach(jt),jt({resourcesOid:Kt,objectOid:Number.MAX_SAFE_INTEGER}),St.publish("postPutResources")}function Ut(t){mt[t.fontName]=mt[t.fontName]||{},mt[t.fontName][t.fontStyle]=t.id}function Wt(t,e,n,i,o){return o={id:"F"+(Object.keys(gt).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:n,encoding:i,isStandardFont:o||!1,metadata:{}},St.publish("addFont",{font:o,instance:this}),gt[o.id]=o,Ut(o),o.id}function Ht(t,e){var n,i;switch(o=e||o,"string"==typeof t&&(e=m(t.toLowerCase()),Array.isArray(e)&&(n=e[0],i=e[1])),Array.isArray(t)&&(n=t[0]*dt,i=t[1]*dt),isNaN(n)&&(n=r[0],i=r[1]),(14400<n||14400<i)&&(an.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),n=Math.min(14400,n),i=Math.min(14400,i)),r=[n,i],o.substr(0,1)){case"l":n<i&&(r=[i,n]);break;case"p":i<n&&(r=[i,n])}ae(r),Te(Oe),K(We),0!==Ge&&K(Ge+" J"),0!==Ye&&K(Ye+" j"),St.publish("addPage",{pageNumber:At})}function Vt(t,e,n){var i,o=void 0;return n=n||{},t=void 0!==t?t:gt[ut].fontName,e=void 0!==e?e:gt[ut].fontStyle,i=t.toLowerCase(),void 0!==mt[i]&&void 0!==mt[i][e]?o=mt[i][e]:void 0!==mt[t]&&void 0!==mt[t][e]?o=mt[t][e]:!1===n.disableWarning&&an.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),o||n.noFallback||null==(o=mt.times[e])&&(o=mt.times.normal),o}function qt(t){return!0===Array.isArray(_t)&&-1<_t.indexOf(t)}var Gt,Yt=d.__private__.newObject=function(){var t=Zt();return Jt(t,!0),t},Zt=d.__private__.newObjectDeferred=function(){return B[++T]=function(){return z},T},Jt=function(t,e){return e="boolean"==typeof e&&e,B[t]=z,e&&K(t+" 0 obj"),t},Xt=d.__private__.newAdditionalObject=function(){var t={objId:Zt(),content:""};return j.push(t),t},Qt=Zt(),Kt=Zt(),$t=d.__private__.decodeColorString=function(t){var e=t.split(" ");2!==e.length||"g"!==e[1]&&"G"!==e[1]?5!==e.length||"k"!==e[4]&&"K"!==e[4]||(e=[(1-e[0])*(1-e[3]),(1-e[1])*(1-e[3]),(1-e[2])*(1-e[3]),"r"]):e=[t=parseFloat(e[0]),t,t,"r"];for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(e[i])).toString(16)).slice(-2);return n},te=d.__private__.encodeColorString=function(t){var e;"string"==typeof t&&(t={ch1:t});var n=t.ch1,i=t.ch2,o=t.ch3,r=t.ch4,a="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var s=new cn(n);if(s.ok)n=s.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)&&(n=(s=parseInt(n.substr(1),16))>>16&255,i=s>>8&255,o=255&s),void 0===i||void 0===r&&n===i&&i===o)if("string"==typeof n)e=n+" "+a[0];else switch(t.precision){case 2:e=C(n/255)+" "+a[0];break;case 3:default:e=A(n/255)+" "+a[0]}else if(void 0===r||"object"==typeof r){if(r&&!isNaN(r.a)&&0===r.a)return e=["1.","1.","1.",a[1]].join(" ");e=("string"==typeof n?[n,i,o,a[1]]:2===t.precision?[C(n/255),C(i/255),C(o/255),a[1]]:[A(n/255),A(i/255),A(o/255),a[1]]).join(" ")}else if("string"==typeof n)e=[n,i,o,r,a[2]].join(" ");else switch(t.precision){case 2:e=[C(n),C(i),C(o),C(r),a[2]].join(" ");break;case 3:default:e=[A(n),A(i),A(o),A(r),a[2]].join(" ")}return e},ee=d.__private__.getFilters=function(){return a},ne=d.__private__.putStream=function(t){var e=(t=t||{}).data||"",n=t.filters||ee(),i=t.alreadyAppliedFilters||[],o=t.addLength1||!1,r=e.length,a=t.objectId,s=function(t){return t};if(null!==f&&void 0===a)throw new Error("ObjectId must be passed to putStream for file encryption");null!==f&&(s=ve.encryptor(a,0));var l={};!0===n&&(n=["FlateEncode"]);var c=t.additionalKeyValues||[],i=(l=void 0!==gn.API.processDataByFilters?gn.API.processDataByFilters(e,n):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(i)?i.join(" "):i.toString());if(0!==l.data.length&&(c.push({key:"Length",value:l.data.length}),!0===o&&c.push({key:"Length1",value:r})),0!=i.length)if(i.split("/").length-1==1)c.push({key:"Filter",value:i});else{c.push({key:"Filter",value:"["+i+"]"});for(var u=0;u<c.length;u+=1)if("DecodeParms"===c[u].key){for(var d=[],h=0;h<l.reverseChain.split("/").length-1;h+=1)d.push("null");d.push(c[u].value),c[u].value="["+d.join(" ")+"]"}}K("<<");for(var p=0;p<c.length;p++)K("/"+c[p].key+" "+c[p].value);K(">>"),0!==l.data.length&&(K("stream"),K(s(l.data)),K("endstream"))},ie=d.__private__.putPage=function(t){var e=t.number,n=t.data,i=t.objId,o=t.contentsObjId;Jt(i,!0),K("<</Type /Page"),K("/Parent "+t.rootDictionaryObjId+" 0 R"),K("/Resources "+t.resourceDictionaryObjId+" 0 R"),K("/MediaBox ["+parseFloat(X(t.mediaBox.bottomLeftX))+" "+parseFloat(X(t.mediaBox.bottomLeftY))+" "+X(t.mediaBox.topRightX)+" "+X(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&K("/CropBox ["+X(t.cropBox.bottomLeftX)+" "+X(t.cropBox.bottomLeftY)+" "+X(t.cropBox.topRightX)+" "+X(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&K("/BleedBox ["+X(t.bleedBox.bottomLeftX)+" "+X(t.bleedBox.bottomLeftY)+" "+X(t.bleedBox.topRightX)+" "+X(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&K("/TrimBox ["+X(t.trimBox.bottomLeftX)+" "+X(t.trimBox.bottomLeftY)+" "+X(t.trimBox.topRightX)+" "+X(t.trimBox.topRightY)+"]"),null!==t.artBox&&K("/ArtBox ["+X(t.artBox.bottomLeftX)+" "+X(t.artBox.bottomLeftY)+" "+X(t.artBox.topRightX)+" "+X(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&K("/UserUnit "+t.userUnit),St.publish("putPage",{objId:i,pageContext:Dt[e],pageNumber:e,page:n}),K("/Contents "+o+" 0 R"),K(">>"),K("endobj");n=n.join("\n");return Z===Y&&(n+="\nQ"),Jt(o,!0),ne({data:n,filters:ee(),objectId:o}),K("endobj"),i},oe=d.__private__.putPages=function(){for(var t=[],e=1;e<=At;e++)Dt[e].objId=Zt(),Dt[e].contentsObjId=Zt();for(e=1;e<=At;e++)t.push(ie({number:e,data:R[e],objId:Dt[e].objId,contentsObjId:Dt[e].contentsObjId,mediaBox:Dt[e].mediaBox,cropBox:Dt[e].cropBox,bleedBox:Dt[e].bleedBox,trimBox:Dt[e].trimBox,artBox:Dt[e].artBox,userUnit:Dt[e].userUnit,rootDictionaryObjId:Qt,resourceDictionaryObjId:Kt}));Jt(Qt,!0),K("<</Type /Pages");for(var n="/Kids [",i=0;i<At;i++)n+=t[i]+" 0 R ";K(n+"]"),K("/Count "+At),K(">>"),K("endobj"),St.publish("postPutPages")},re=d.__private__.pdfEscape=d.pdfEscape=function(t,e){return function(t,e){var n,i,o,r,a,s,l,c;if(e=e||{},o=e.sourceEncoding||"Unicode",r=e.outputEncoding,(e.autoencode||r)&>[ut].metadata&>[ut].metadata[o]&>[ut].metadata[o].encoding&&(o=gt[ut].metadata[o].encoding,!r&>[ut].encoding&&(r=gt[ut].encoding),!r&&o.codePages&&(r=o.codePages[0]),"string"==typeof r&&(r=o[r]),r)){for(s=!1,a=[],n=0,i=t.length;n<i;n++)(l=r[t.charCodeAt(n)])?a.push(String.fromCharCode(l)):a.push(t[n]),a[n].charCodeAt(0)>>8&&(s=!0);t=a.join("")}for(n=t.length;void 0===s&&0!==n;)t.charCodeAt(n-1)>>8&&(s=!0),n--;if(!s)return t;for(a=e.noBOM?[]:[254,255],n=0,i=t.length;n<i;n++){if((c=(l=t.charCodeAt(n))>>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(c),a.push(l-(c<<8))}return String.fromCharCode.apply(void 0,a)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ae=d.__private__.beginPage=function(t){R[++At]=[],Dt[At]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},se(At),H(R[L])},se=function(t){0<t&&t<=At&&(L=t)},le=d.__private__.getNumberOfPages=d.getNumberOfPages=function(){return R.length-1},ce=d.__private__.putInfo=function(){var t,e=Yt(),n=function(t){return t};for(t in null!==f&&(n=ve.encryptor(e,0)),K("<<"),K("/Producer ("+re(n("jsPDF "+gn.version))+")"),ct)ct.hasOwnProperty(t)&&ct[t]&&K("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+re(n(ct[t]))+")");K("/CreationDate ("+re(n(D))+")"),K(">>"),K("endobj")},ue=d.__private__.putCatalog=function(t){t=(t=t||{}).rootDictionaryObjId||Qt;switch(Yt(),K("<<"),K("/Type /Catalog"),K("/Pages "+t+" 0 R"),et=et||"fullwidth"){case"fullwidth":K("/OpenAction [3 0 R /FitH null]");break;case"fullheight":K("/OpenAction [3 0 R /FitV null]");break;case"fullpage":K("/OpenAction [3 0 R /Fit]");break;case"original":K("/OpenAction [3 0 R /XYZ null null 1]");break;default:var e=""+et;"%"===e.substr(e.length-1)&&(et=parseInt(et)/100),"number"==typeof et&&K("/OpenAction [3 0 R /XYZ null null "+C(et)+"]")}switch(at=at||"continuous"){case"continuous":K("/PageLayout /OneColumn");break;case"single":K("/PageLayout /SinglePage");break;case"two":case"twoleft":K("/PageLayout /TwoColumnLeft");break;case"tworight":K("/PageLayout /TwoColumnRight")}ot&&K("/PageMode /"+ot),St.publish("putCatalog"),K(">>"),K("endobj")},de=d.__private__.putTrailer=function(){K("trailer"),K("<<"),K("/Size "+(T+1)),K("/Root "+T+" 0 R"),K("/Info "+(T-1)+" 0 R"),null!==f&&K("/Encrypt "+ve.oid+" 0 R"),K("/ID [ <"+S+"> <"+S+"> ]"),K(">>")},he=d.__private__.putHeader=function(){K("%PDF-"+h),K("%ºß¬à")},pe=d.__private__.putXRef=function(){var t="0000000000";K("xref"),K("0 "+(T+1)),K("0000000000 65535 f ");for(var e=1;e<=T;e++)"function"==typeof B[e]?K((t+B[e]()).slice(-10)+" 00000 n "):void 0!==B[e]?K((t+B[e]).slice(-10)+" 00000 n "):K("0000000000 00000 n ")},fe=d.__private__.buildDocument=function(){z=T=0,M=[],B=[],j=[],Qt=Zt(),Kt=Zt(),H(M),St.publish("buildDocument"),he(),oe(),function(){St.publish("putAdditionalObjects");for(var t=0;t<j.length;t++){var e=j[t];Jt(e.objId,!0),K(e.content),K("endobj")}St.publish("postPutAdditionalObjects")}(),Rt(),null!==f&&(ve.oid=Yt(),K("<<"),K("/Filter /Standard"),K("/V "+ve.v),K("/R "+ve.r),K("/U <"+ve.toHexString(ve.U)+">"),K("/O <"+ve.toHexString(ve.O)+">"),K("/P "+ve.P),K(">>"),K("endobj")),ce(),ue();var t=z;return pe(),de(),K("startxref"),K(""+t),K("%%EOF"),H(R[L]),M.join("\n")},ge=d.__private__.getBlob=function(t){return new Blob([q(t)],{type:"application/pdf"})},me=d.output=d.__private__.output=((Gt=function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return fe();case"save":d.save(e.filename);break;case"arraybuffer":return q(fe());case"blob":return ge(fe());case"bloburi":case"bloburl":if(void 0!==rn.URL&&"function"==typeof rn.URL.createObjectURL)return rn.URL&&rn.URL.createObjectURL(ge(fe()))||void 0;an.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",i=fe();try{n=sn(i)}catch(t){n=sn(unescape(encodeURIComponent(i)))}return"data:application/pdf;filename="+e.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"!==Object.prototype.toString.call(rn))throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");var o='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+(e.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(e)+");<\/script></body></html>",r=rn.open();return null!==r&&r.document.write(o),r;case"pdfjsnewwindow":if("[object Window]"!==Object.prototype.toString.call(rn))throw new Error("The option pdfjsnewwindow just works in a browser-environment.");var a,s='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(e.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+e.filename+'" width="500px" height="400px" /></body></html>',l=rn.open();return null!==l&&(l.document.write(s),a=this,l.document.documentElement.querySelector("#pdfViewer").onload=function(){l.document.title=e.filename,l.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(a.output("bloburl"))}),l;case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(rn))throw new Error("The option dataurlnewwindow just works in a browser-environment.");r='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",e)+'"></iframe></body></html>',s=rn.open();if(null!==s&&(s.document.write(r),s.document.title=e.filename),s||"undefined"==typeof safari)return s;break;case"datauri":case"dataurl":return rn.document.location.href=this.output("datauristring",e);default:return null}}).foo=function(){try{return Gt.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);e="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!rn.console)throw new Error(e);rn.console.error(e,t),rn.alert&&alert(e)}},(Gt.foo.bar=Gt).foo);switch(e){case"pt":dt=1;break;case"mm":dt=72/25.4;break;case"cm":dt=72/2.54;break;case"in":dt=72;break;case"px":dt=1==qt("px_scaling")?.75:96/72;break;case"pc":case"em":dt=12;break;case"ex":dt=6;break;default:throw new Error("Invalid unit: "+e)}var ve=null;I(),P();var be=d.__private__.getPageInfo=d.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Dt[t].objId,pageNumber:t,pageContext:Dt[t]}},ye=d.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in Dt)if(Dt[e].objId===t)break;return be(e)},we=d.__private__.getCurrentPageInfo=d.getCurrentPageInfo=function(){return{objId:Dt[L].objId,pageNumber:L,pageContext:Dt[L]}};d.addPage=function(){return Ht.apply(this,arguments),this},d.setPage=function(){return se.apply(this,arguments),H.call(this,R[L]),this},d.insertPage=function(t){return this.addPage(),this.movePage(L,t),this},d.movePage=function(t,e){var n,i;if(e<t){n=R[t],i=Dt[t];for(var o=t;e<o;o--)R[o]=R[o-1],Dt[o]=Dt[o-1];R[e]=n,Dt[e]=i,this.setPage(e)}else if(t<e){n=R[t],i=Dt[t];for(var r=t;r<e;r++)R[r]=R[r+1],Dt[r]=Dt[r+1];R[e]=n,Dt[e]=i,this.setPage(e)}return this},d.deletePage=function(){return function(t){0<t&&t<=At&&(R.splice(t,1),Dt.splice(t,1),--At<L&&(L=At),this.setPage(L))}.apply(this,arguments),this},d.__private__.text=d.text=function(t,e,n,i,o){var r,a=(i=i||{}).scope||this;if("number"!=typeof t||"number"!=typeof e||"string"!=typeof n&&!Array.isArray(n)||(p=n,n=e,e=t,t=p),arguments[3]instanceof It==!1?(E=arguments[3],D=o,r=arguments[5],"object"==typeof E&&null!==E||("string"==typeof D&&(r=D,D=null),"string"==typeof E&&(r=E,E=null),"number"==typeof E&&(D=E,E=null),i={flags:E,angle:D,align:r})):(J("The transform parameter of text() with a Matrix value"),y=o),isNaN(e)||isNaN(n)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return a;var s,l="",c="number"==typeof i.lineHeightFactor?i.lineHeightFactor:Ne,u=a.internal.scaleFactor;function d(t){for(var e,n=t.concat(),i=[],o=n.length;o--;)"string"==typeof(e=n.shift())?i.push(e):Array.isArray(t)&&(1===e.length||void 0===e[1]&&void 0===e[2])?i.push(e[0]):i.push([e[0],e[1],e[2]]);return i}function h(t,e){var n;if("string"==typeof t)n=e(t)[0];else if(Array.isArray(t)){for(var i,o=t.concat(),r=[],a=o.length;a--;)"string"==typeof(i=o.shift())?r.push(e(i)[0]):Array.isArray(i)&&"string"==typeof i[0]&&(i=e(i[0],i[1],i[2]),r.push([i[0],i[1],i[2]]));n=r}return n}var p=!1,f=!0;if("string"==typeof t)p=!0;else if(Array.isArray(t)){for(var g,m=t.concat(),v=[],b=m.length;b--;)("string"!=typeof(g=m.shift())||Array.isArray(g)&&"string"!=typeof g[0])&&(f=!1);p=f}if(!1===p)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var y,w=tt/a.internal.scaleFactor,x=w*(Ne-1);switch(i.baseline){case"bottom":n-=x;break;case"top":n+=w-x;break;case"hanging":n+=w-2*x;break;case"middle":n+=w/2-x}0<(I=i.maxWidth||0)&&("string"==typeof t?t=a.splitTextToSize(t,I):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,e){return t.concat(a.splitTextToSize(e,I))},[]))),o={text:t,x:e,y:n,options:i,mutex:{pdfEscape:re,activeFontKey:ut,fonts:gt,activeFontSize:tt}},St.publish("preProcessText",o),t=o.text,D=(i=o.options).angle,y instanceof It==!1&&D&&"number"==typeof D?(D*=Math.PI/180,0===i.rotationDirection&&(D=-D),Z===Y&&(D=-D),A=Math.cos(D),p=Math.sin(D),y=new It(A,p,-p,A,0,0)):D&&D instanceof It&&(y=D),Z!==Y||y||(y=Lt),void 0!==(F=i.charSpace||qe)&&(l+=X(Q(F))+" Tc\n",this.setCharSpace(this.getCharSpace()||0));i.lang;var C=-1,A=void 0!==i.renderingMode?i.renderingMode:i.stroke,D=a.internal.getCurrentPageInfo().pageContext;switch(A){case 0:case!1:case"fill":C=0;break;case 1:case!0:case"stroke":C=1;break;case 2:case"fillThenStroke":C=2;break;case 3:case"invisible":C=3;break;case 4:case"fillAndAddForClipping":C=4;break;case 5:case"strokeAndAddPathForClipping":C=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":C=6;break;case 7:case"addToPathForClipping":C=7}A=void 0!==D.usedRenderingMode?D.usedRenderingMode:-1;-1!==C?l+=C+" Tr\n":-1!==A&&(l+="0 Tr\n"),-1!==C&&(D.usedRenderingMode=C),r=i.align||"left";var S,_,P=tt*c,D=a.internal.pageSize.getWidth(),k=gt[ut],F=i.charSpace||qe,I=i.maxWidth||0,E={},L=[];if("[object Array]"===Object.prototype.toString.call(t)){v=d(t),"left"!==r&&(S=v.map(function(t){return a.getStringUnitWidth(t,{font:k,charSpace:F,fontSize:tt,doKerning:!1})*tt/u}));var N,O=0;if("right"===r){e-=S[0],t=[],b=v.length;for(var T=0;T<b;T++)_=0===T?(N=je(e),Re(n)):(N=Q(O-S[T]),-P),t.push([v[T],N,_]),O=S[T]}else if("center"===r){e-=S[0]/2,t=[],b=v.length;for(var B=0;B<b;B++)_=0===B?(N=je(e),Re(n)):(N=Q((O-S[B])/2),-P),t.push([v[B],N,_]),O=S[B]}else if("left"===r){t=[],b=v.length;for(var M=0;M<b;M++)t.push(v[M])}else{if("justify"!==r)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');t=[],b=v.length,I=0!==I?I:D;for(var z=0;z<b;z++)_=0===z?Re(n):-P,N=0===z?je(e):0,z<b-1&&L.push(X(Q((I-S[z])/(v[z].split(" ").length-1)))),t.push([v[z],N,_])}}!0===("boolean"==typeof i.R2L?i.R2L:it)&&(t=h(t,function(t,e,n){return[t.split("").reverse().join(""),e,n]})),o={text:t,x:e,y:n,options:i,mutex:{pdfEscape:re,activeFontKey:ut,fonts:gt,activeFontSize:tt}},St.publish("postProcessText",o),t=o.text,s=o.mutex.isHex||!1;o=gt[ut].encoding;"WinAnsiEncoding"!==o&&"StandardEncoding"!==o||(t=h(t,function(t,e,n){return[(t=(t=t).split("\t").join(Array(i.TabLen||9).join(" ")),re(t,E)),e,n]})),v=d(t),t=[];for(var j,R,U,W=Array.isArray(v[0])?1:0,H="",V=function(t,e,n){return n instanceof It?(n="number"==typeof i.angle?Et(n,new It(1,0,0,1,t,e)):Et(new It(1,0,0,1,t,e),n),Z===Y&&(n=Et(new It(1,0,0,-1,0,0),n)),n.join(" ")+" Tm\n"):X(t)+" "+X(e)+" Td\n"},q=0;q<v.length;q++){switch(H="",W){case 1:U=(s?"<":"(")+v[q][0]+(s?">":")"),j=parseFloat(v[q][1]),R=parseFloat(v[q][2]);break;case 0:U=(s?"<":"(")+v[q]+(s?">":")"),j=je(e),R=Re(n)}void 0!==L&&void 0!==L[q]&&(H=L[q]+" Tw\n"),0===q?t.push(H+V(j,R,y)+U):0==W?t.push(H+U):1==W&&t.push(H+V(j,R,y)+U)}t=0==W?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";o="BT\n/";return o+=ut+" "+tt+" Tf\n",o+=X(tt*c)+" TL\n",o+=Ve+"\n",o+=l,o+=t,K(o+="ET"),G[ut]=!0,a};var xe=d.__private__.clip=d.clip=function(t){return K("evenodd"===t?"W*":"W"),this};d.clipEvenOdd=function(){return xe("evenodd")},d.__private__.discardPath=d.discardPath=function(){return K("n"),this};var Ce=d.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(e=!0),e};d.__private__.setDefaultPathOperation=d.setDefaultPathOperation=function(t){return Ce(t)&&(c=t),this};var Ae=d.__private__.getStyle=d.getStyle=function(t){var e=c;switch(t){case"D":case"S":e="S";break;case"F":e="f";break;case"FD":case"DF":e="B";break;case"f":case"f*":case"B":case"B*":e=t}return e},De=d.close=function(){return K("h"),this};d.stroke=function(){return K("S"),this},d.fill=function(t){return _e("f",t),this},d.fillEvenOdd=function(t){return _e("f*",t),this},d.fillStroke=function(t){return _e("B",t),this},d.fillStrokeEvenOdd=function(t){return _e("B*",t),this};function Se(t){null===t||Z===Y&&void 0===t||(t=Ae(t),K(t))}var _e=function(t,e){"object"==typeof e?Pe(e,t):K(t)};var Pe=function(t,e){var n,i=yt[t.key],o=bt[i];o instanceof pn?(K("q"),K(ke(e)),o.gState&&d.setGState(o.gState),K(t.matrix.toString()+" cm"),K("/"+i+" sh"),K("Q")):o instanceof fn&&(n=new It(1,0,0,-1,0,nn()),t.matrix&&(n=n.multiply(t.matrix||Lt),i=function(t,e,n,i,o){return(o=new fn(e||this.boundingBox,n||this.xStep,i||this.yStep,this.gState,o||this.matrix)).stream=this.stream,t=t+"$$"+this.cloneIndex+++"$$",Nt(t,o),o}.call(o,t.key,t.boundingBox,t.xStep,t.yStep,n).id),K("q"),K("/Pattern cs"),K("/"+i+" scn"),o.gState&&d.setGState(o.gState),K(e),K("Q"))},ke=function(t){switch(t){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Fe=d.moveTo=function(t,e){return K(X(Q(t))+" "+X(w(e))+" m"),this},Ie=d.lineTo=function(t,e){return K(X(Q(t))+" "+X(w(e))+" l"),this},Ee=d.curveTo=function(t,e,n,i,o,r){return K([X(Q(t)),X(w(e)),X(Q(n)),X(w(i)),X(Q(o)),X(w(r)),"c"].join(" ")),this};d.__private__.line=d.line=function(t,e,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i)||!Ce(o))throw new Error("Invalid arguments passed to jsPDF.line");return Z===v?this.lines([[n-t,i-e]],t,e,[1,1],o||"S"):this.lines([[n-t,i-e]],t,e,[1,1]).stroke()},d.__private__.lines=d.lines=function(t,e,n,i,o,r){var a,s,l,c,u,d,h,p,f,g,m,v;if("number"==typeof t&&(v=n,n=e,e=t,t=v),i=i||[1,1],r=r||!1,isNaN(e)||isNaN(n)||!Array.isArray(t)||!Array.isArray(i)||!Ce(o)||"boolean"!=typeof r)throw new Error("Invalid arguments passed to jsPDF.lines");for(Fe(e,n),a=i[0],s=i[1],c=t.length,g=e,m=n,l=0;l<c;l++)2===(u=t[l]).length?(g=u[0]*a+g,m=u[1]*s+m,Ie(g,m)):(d=u[0]*a+g,h=u[1]*s+m,p=u[2]*a+g,f=u[3]*s+m,g=u[4]*a+g,m=u[5]*s+m,Ee(d,h,p,f,g,m));return r&&De(),Se(o),this},d.path=function(t){for(var e=0;e<t.length;e++){var n=t[e],i=n.c;switch(n.op){case"m":Fe(i[0],i[1]);break;case"l":Ie(i[0],i[1]);break;case"c":Ee.apply(this,i);break;case"h":De()}}return this},d.__private__.rect=d.rect=function(t,e,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i)||!Ce(o))throw new Error("Invalid arguments passed to jsPDF.rect");return Z===v&&(i=-i),K([X(Q(t)),X(w(e)),X(Q(n)),X(Q(i)),"re"].join(" ")),Se(o),this},d.__private__.triangle=d.triangle=function(t,e,n,i,o,r,a){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(r)||!Ce(a))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[n-t,i-e],[o-n,r-i],[t-o,e-r]],t,e,[1,1],a,!0),this},d.__private__.roundedRect=d.roundedRect=function(t,e,n,i,o,r,a){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(r)||!Ce(a))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return o=Math.min(o,.5*n),r=Math.min(r,.5*i),this.lines([[n-2*o,0],[o*s,0,o,r-r*s,o,r],[0,i-2*r],[0,r*s,-o*s,r,-o,r],[2*o-n,0],[-o*s,0,-o,-r*s,-o,-r],[0,2*r-i],[0,-r*s,o*s,-r,o,-r]],t+o,e,[1,1],a,!0),this},d.__private__.ellipse=d.ellipse=function(t,e,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i)||!Ce(o))throw new Error("Invalid arguments passed to jsPDF.ellipse");var r=4/3*(Math.SQRT2-1)*n,a=4/3*(Math.SQRT2-1)*i;return Fe(t+n,e),Ee(t+n,e-a,t+r,e-i,t,e-i),Ee(t-r,e-i,t-n,e-a,t-n,e),Ee(t-n,e+a,t-r,e+i,t,e+i),Ee(t+r,e+i,t+n,e+a,t+n,e),Se(o),this},d.__private__.circle=d.circle=function(t,e,n,i){if(isNaN(t)||isNaN(e)||isNaN(n)||!Ce(i))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,n,n,i)},d.setFont=function(t,e){return ut=Vt(t,e,{disableWarning:!1}),this};var Le=d.__private__.getFont=d.getFont=function(){return gt[Vt.apply(d,arguments)]};d.__private__.getFontList=d.getFontList=function(){var t,e,n={};for(t in mt)if(mt.hasOwnProperty(t))for(e in n[t]=[],mt[t])mt[t].hasOwnProperty(e)&&n[t].push(e);return n},d.addFont=function(t,e,n,i){return Wt.call(this,t,e,n,i=i||"Identity-H")};var Ne,Oe=t.lineWidth||.200025,Te=d.__private__.setLineWidth=d.setLineWidth=function(t){return K(X(Q(t))+" w"),this};d.__private__.setLineDash=gn.API.setLineDash=gn.API.setLineDashPattern=function(t,e){if(t=t||[],e=e||0,isNaN(e)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map(function(t){return X(Q(t))}).join(" "),e=X(Q(e)),K("["+t+"] "+e+" d"),this};var Be=d.__private__.getLineHeight=d.getLineHeight=function(){return tt*Ne};d.__private__.getLineHeight=d.getLineHeight=function(){return tt*Ne};var Me=d.__private__.setLineHeightFactor=d.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Ne=t),this},ze=d.__private__.getLineHeightFactor=d.getLineHeightFactor=function(){return Ne};Me(t.lineHeight);var je=d.__private__.getHorizontalCoordinate=function(t){return Q(t)},Re=d.__private__.getVerticalCoordinate=function(t){return Z===Y?t:Dt[L].mediaBox.topRightY-Dt[L].mediaBox.bottomLeftY-Q(t)},Ue=d.__private__.getHorizontalCoordinateString=d.getHorizontalCoordinateString=function(t){return X(je(t))},i=d.__private__.getVerticalCoordinateString=d.getVerticalCoordinateString=function(t){return X(Re(t))},We=t.strokeColor||"0 G";d.__private__.getStrokeColor=d.getDrawColor=function(){return $t(We)},d.__private__.setStrokeColor=d.setDrawColor=function(t,e,n,i){return We=te({ch1:t,ch2:e,ch3:n,ch4:i,pdfColorType:"draw",precision:2}),K(We),this};var He=t.fillColor||"0 g";d.__private__.getFillColor=d.getFillColor=function(){return $t(He)},d.__private__.setFillColor=d.setFillColor=function(t,e,n,i){return He=te({ch1:t,ch2:e,ch3:n,ch4:i,pdfColorType:"fill",precision:2}),K(He),this};var Ve=t.textColor||"0 g",Me=d.__private__.getTextColor=d.getTextColor=function(){return $t(Ve)};d.__private__.setTextColor=d.setTextColor=function(t,e,n,i){return Ve=te({ch1:t,ch2:e,ch3:n,ch4:i,pdfColorType:"text",precision:3}),this};var qe=t.charSpace,t=d.__private__.getCharSpace=d.getCharSpace=function(){return parseFloat(qe||0)};d.__private__.setCharSpace=d.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return qe=t,this};var Ge=0;d.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},d.__private__.setLineCap=d.setLineCap=function(t){var e=d.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return K((Ge=e)+" J"),this};var Ye=0;d.__private__.setLineJoin=d.setLineJoin=function(t){var e=d.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return K((Ye=e)+" j"),this},d.__private__.setLineMiterLimit=d.__private__.setMiterLimit=d.setLineMiterLimit=d.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return K(X(Q(t))+" M"),this},d.GState=hn,d.setGState=function(t){(t="string"==typeof t?wt[xt[t]]:Ze(null,t)).equals(Ct)||(K("/"+t.id+" gs"),Ct=t)};var Ze=function(t,e){if(!t||!xt[t]){var n,i,o=!1;for(n in wt)if(wt.hasOwnProperty(n)&&wt[n].equals(e)){o=!0;break}return o?e=wt[n]:(i="GS"+(Object.keys(wt).length+1).toString(10),(wt[i]=e).id=i),t&&(xt[t]=e.id),St.publish("addGState",e),e}};d.addGState=function(t,e){return Ze(t,e),this},d.saveGraphicsState=function(){return K("q"),vt.push({key:ut,size:tt,color:Ve}),this},d.restoreGraphicsState=function(){K("Q");var t=vt.pop();return ut=t.key,tt=t.size,Ve=t.color,Ct=null,this},d.setCurrentTransformationMatrix=function(t){return K(t.toString()+" cm"),this},d.comment=function(t){return K("#"+t),this};function Je(){this.page=At,this.currentPage=L,this.pages=R.slice(0),this.pagesContext=Dt.slice(0),this.x=ht,this.y=pt,this.matrix=ft,this.width=tn(L),this.height=nn(L),this.outputDestination=W,this.id="",this.objectNumber=-1}var Xe=function(t,e){var n=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var i=e||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var o="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return o},set:function(t){o=t.toString()}}),this},Qe=function(t,e,n,i){Xe.call(this,t,e),this.type="rect";var o=n||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return o},set:function(t){isNaN(t)||(o=parseFloat(t))}});var r=i||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}}),this};Je.prototype.restore=function(){At=this.page,L=this.currentPage,Dt=this.pagesContext,R=this.pages,ht=this.x,pt=this.y,ft=this.matrix,en(L,this.width),on(L,this.height),W=this.outputDestination};var Ke,$e=function(t,e,n,i,o){Ft.push(new Je),At=L=0,R=[],ht=t,pt=e,ft=o,ae([n,i])};for(Ke in d.beginFormObject=function(t,e,n,i,o){return $e(t,e,n,i,o),this},d.endFormObject=function(t){var e,n;return kt[e=t]||(n=new Je,t="Xo"+(Object.keys(Pt).length+1).toString(10),n.id=t,kt[e]=t,Pt[t]=n,St.publish("addFormObject",n),Ft.pop().restore()),this},d.doFormObject=function(t,e){t=Pt[kt[t]];return K("q"),K(e.toString()+" cm"),K("/"+t.id+" Do"),K("Q"),this},d.getFormObject=function(t){t=Pt[kt[t]];return{x:t.x,y:t.y,width:t.width,height:t.height,matrix:t.matrix}},d.save=function(i,t){return i=i||"generated.pdf",(t=t||{}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?(ln(ge(fe()),i),"function"==typeof ln.unload&&rn.setTimeout&&setTimeout(ln.unload,911),this):new Promise(function(t,e){try{var n=ln(ge(fe()),i);"function"==typeof ln.unload&&rn.setTimeout&&setTimeout(ln.unload,911),t(n)}catch(t){e(t.message)}})},gn.API)gn.API.hasOwnProperty(Ke)&&("events"===Ke&&gn.API.events.length?function(t,e){for(var n,i,o=e.length-1;-1!==o;o--)n=e[o][0],i=e[o][1],t.subscribe.apply(t,[n].concat("function"==typeof i?[i]:i))}(St,gn.API.events):d[Ke]=gn.API[Ke]);var tn=d.getPageWidth=function(t){return(Dt[t=t||L].mediaBox.topRightX-Dt[t].mediaBox.bottomLeftX)/dt},en=d.setPageWidth=function(t,e){Dt[t].mediaBox.topRightX=e*dt+Dt[t].mediaBox.bottomLeftX},nn=d.getPageHeight=function(t){return(Dt[t=t||L].mediaBox.topRightY-Dt[t].mediaBox.bottomLeftY)/dt},on=d.setPageHeight=function(t,e){Dt[t].mediaBox.topRightY=e*dt+Dt[t].mediaBox.bottomLeftY};return d.internal={pdfEscape:re,getStyle:Ae,getFont:Le,getFontSize:nt,getCharSpace:t,getTextColor:Me,getLineHeight:Be,getLineHeightFactor:ze,write:V,getHorizontalCoordinate:je,getVerticalCoordinate:Re,getCoordinateString:Ue,getVerticalCoordinateString:i,collections:{},newObject:Yt,newAdditionalObject:Xt,newObjectDeferred:Zt,newObjectDeferredBegin:Jt,getFilters:ee,putStream:ne,events:St,scaleFactor:dt,pageSize:{getWidth:function(){return tn(L)},setWidth:function(t){en(L,t)},getHeight:function(){return nn(L)},setHeight:function(t){on(L,t)}},encryptionOptions:f,encryption:ve,getEncryptor:function(t){return null!==f?ve.encryptor(t,0):function(t){return t}},output:me,getNumberOfPages:le,pages:R,out:K,f2:C,f3:A,getPageInfo:be,getPageInfoByObjId:ye,getCurrentPageInfo:we,getPDFVersion:p,Point:Xe,Rectangle:Qe,Matrix:It,hasHotfix:qt},Object.defineProperty(d.internal.pageSize,"width",{get:function(){return tn(L)},set:function(t){en(L,t)},enumerable:!0,configurable:!0}),Object.defineProperty(d.internal.pageSize,"height",{get:function(){return nn(L)},set:function(t){on(L,t)},enumerable:!0,configurable:!0}),function(t){for(var e=0,n=$.length;e<n;e++){var i=Wt.call(this,t[e][0],t[e][1],t[e][2],$[e][3],!0);!1===u&&(G[i]=!0);var o=t[e][0].split("-");Ut({id:i,fontName:o[0],fontStyle:o[1]||""})}St.publish("addFonts",{fonts:gt,dictionary:mt})}.call(d,$),ut="F1",Ht(r,o),St.publish("initialized"),d}un.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},un.prototype.toHexString=function(t){return t.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},un.prototype.hexToBytes=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(String.fromCharCode(parseInt(t.substr(n,2),16)));return e.join("")},un.prototype.processOwnerPassword=function(t,e){return v(g(e).substr(0,5),t)},un.prototype.encryptor=function(t,e){var n=g(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return v(n,t)}},hn.prototype.equals=function(t){var e,n="id,objectNumber,equals";if(!t||typeof t!=typeof this)return!1;var i=0;for(e in this)if(!(0<=n.indexOf(e))){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e))return!1;if(this[e]!==t[e])return!1;i++}for(e in t)t.hasOwnProperty(e)&&n.indexOf(e)<0&&i--;return 0===i},gn.API={events:[]},gn.version="2.2.0";function A(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function w(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function D(t){return t.toFixed(2)}function x(t){return t.toFixed(5)}var C=gn.API,S=1;C.__acroform__={};function _(t){return t*S}function k(t){var e=new Z,n=lt.internal.getHeight(t)||0,t=lt.internal.getWidth(t)||0;return e.BBox=[0,0,Number(D(t)),Number(D(n))],e}function F(t,e){var n=!t;for(u in t||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(u)){var i=t[u],o=[],r=i.Rect;if(i.Rect&&(i.Rect=z(i.Rect,e)),e.internal.newObjectDeferredBegin(i.objId,!0),i.DA=lt.createDefaultAppearanceStream(i),"object"==typeof i&&"function"==typeof i.getKeyValueListForStream&&(o=i.getKeyValueListForStream()),i.Rect=r,i.hasAppearanceStream&&!i.appearanceStreamContent&&(r=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],n=t._V||t.DV,i=j(t,n),n=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+n+" "+D(i.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(i.text),e.push("ET"),e.push("Q"),e.push("EMC");i=k(t);return i.scope=t.scope,i.stream=e.join("\n"),i}}(i),o.push({key:"AP",value:"<</N "+r+">>"}),e.internal.acroformPlugin.xForms.push(r)),i.appearanceStreamContent){var a,s="";for(a in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(a)){var l,c=i.appearanceStreamContent[a];if(s+="/"+a+" ",s+="<<",1<=Object.keys(c).length||Array.isArray(c))for(var u in c)c.hasOwnProperty(u)&&("function"==typeof(l=c[u])&&(l=l.call(e,i)),s+="/"+u+" "+l+" ",0<=e.internal.acroformPlugin.xForms.indexOf(l)||e.internal.acroformPlugin.xForms.push(l));else"function"==typeof(l=c)&&(l=l.call(e,i)),s+="/"+u+" "+l,0<=e.internal.acroformPlugin.xForms.indexOf(l)||e.internal.acroformPlugin.xForms.push(l);s+=">>"}o.push({key:"AP",value:"<<\n"+s+">>"})}e.internal.putStream({additionalKeyValues:o,objectId:i.objId}),e.internal.out("endobj")}n&&H(e.internal.acroformPlugin.xForms,e)}function I(e,t){if(void 0!==(t.scope=e).internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(X.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(U)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");S=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new J,(e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e).internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){var t;(t=e).internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}),e.internal.events.subscribe("buildDocument",function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e,n,i=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(e in i)i.hasOwnProperty(e)&&((n=i[e]).objId=void 0,n.hasAnnotation&&W(n,t))}(e)}),e.internal.events.subscribe("putCatalog",function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(e)}),e.internal.events.subscribe("postPutPages",function(t){F(t,e)}),e.internal.acroformPlugin.isInitialized=!0}}var E=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},L=C.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|=1<<e},N=C.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&=~(1<<e)},O=C.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},T=C.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return O(t,e-1)},B=C.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return L(t,e-1)},M=C.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return N(t,e-1)},z=C.__acroform__.calculateCoordinates=function(t,e){var n=e.internal.getHorizontalCoordinate,i=e.internal.getVerticalCoordinate,o=t[0],r=t[1],a=t[2],e=t[3],t={};return t.lowerLeft_X=n(o)||0,t.lowerLeft_Y=i(r+e)||0,t.upperRight_X=n(o+a)||0,t.upperRight_Y=i(r)||0,[Number(D(t.lowerLeft_X)),Number(D(t.lowerLeft_Y)),Number(D(t.upperRight_X)),Number(D(t.upperRight_Y))]},j=function(i,t){var e=0===i.fontSize?i.maxFontSize:i.fontSize,n={text:"",fontSize:""},o=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" "),r=e,a=(a=lt.internal.getHeight(i)||0)<0?-a:a,s=(s=lt.internal.getWidth(i)||0)<0?-s:s;r++;t:for(;0<r;){t="";var l,c,u=R("3",i,--r).height,d=i.multiline?a-r:(a-u)/2,h=d+=2,p=0,f=0;if(r<=0){t="(...) Tj\n",t+="% Width of Text: "+R(t,i,r=12).width+", FieldWidth:"+s+"\n";break}var g,m="",v=0;for(g in o)if(o.hasOwnProperty(g)){m=" "==(m+=o[g]+" ").substr(m.length-1)?m.substr(0,m.length-1):m;var b=parseInt(g),y=function(t,e,n){if(t+1<o.length){t=e+" "+o[t+1];return R(t,i,n).width<=s-4}return!1}(b,m,r),w=g>=o.length-1;if(y&&!w)m+=" ";else{if(y||w){if(w)f=b;else if(i.multiline&&a<(u+2)*(v+2)+2)continue t}else{if(!i.multiline)continue t;if(a<(u+2)*(v+2)+2)continue t;f=b}for(var x="",C=p;C<=f;C++)x+=o[C]+" ";switch(x=" "==x.substr(x.length-1)?x.substr(0,x.length-1):x,c=R(x,i,r).width,i.textAlign){case"right":l=s-c-2;break;case"center":l=(s-c)/2;break;case"left":default:l=2}t+=D(l)+" "+D(h)+" Td\n",t+="("+A(x)+") Tj\n",t+=-D(l)+" 0 Td\n",h=-(r+2),c=0,p=f+1,v++,m=""}}break}return n.text=t,n.fontSize=r,n},R=function(t,e,n){var i=e.scope.internal.getFont(e.fontName,e.fontStyle),t=e.scope.getStringUnitWidth(t,{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:e.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:t}},U={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},W=function(t,e){var n={type:"reference",object:t};void 0===e.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===n.type&&t.object===n.object})&&e.internal.getPageInfo(t.page).pageContext.annotations.push(n)},H=function(t,e){for(var n in t){var i,o;t.hasOwnProperty(n)&&(o=t[i=n],e.internal.newObjectDeferredBegin(o.objId,!0),"object"==typeof o&&"function"==typeof o.putStream&&o.putStream(),delete t[i])}},V=C.__acroform__.arrayToPdfArray=function(t,e,n){var i=function(t){return t};if(Array.isArray(t)){for(var o="[",r=0;r<t.length;r++)switch(0!==r&&(o+=" "),typeof t[r]){case"boolean":case"number":case"object":o+=t[r].toString();break;case"string":"/"!==t[r].substr(0,1)?(void 0!==e&&n&&(i=n.internal.getEncryptor(e)),o+="("+A(i(t[r].toString()))+")"):o+=t[r].toString()}return o+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")};function q(t){var e=[];return"string"==typeof t&&(e=function(t,e,n){n=n||1;for(var i,o=[];i=e.exec(t);)o.push(i[n]);return o}(t,/\((.*?)\)/g)),e}function G(t,e,n){var i=function(t){return t};return void 0!==e&&n&&(i=n.internal.getEncryptor(e)),(t=t||"").toString(),t="("+A(i(t))+")"}function Y(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})}Y.prototype.toString=function(){return this.objId+" 0 R"},Y.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},Y.prototype.getKeyValueListForStream=function(){var t,e,n,i=[],o=Object.getOwnPropertyNames(this).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)});for(t in o)!1!==Object.getOwnPropertyDescriptor(this,o[t]).configurable||(n=this[e=o[t]])&&(Array.isArray(n)?i.push({key:e,value:V(n,this.objId,this.scope)}):n instanceof Y?(n.scope=this.scope,i.push({key:e,value:n.objId+" 0 R"})):"function"!=typeof n&&i.push({key:e,value:n}));return i};var Z=function(){Y.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,n=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};E(Z,Y);var J=function(){Y.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){if(0<t.length)return t}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(t){return t};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+A(t(e))+")"}},set:function(t){e=t}})};E(J,Y);var X=function(){Y.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(e,3))},set:function(t){!0===Boolean(t)?this.F=B(e,3):this.F=M(e,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');n=t}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==i.length)return i},set:function(t){i=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(t){i[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(t){i[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(t){i[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(t){i[3]=t}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var r=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!r||r.length<1){if(this instanceof ot)return;r="FieldObject"+X.FieldNum++}var t=function(t){return t};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+A(t(r))+")"},set:function(t){r=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return r},set:function(t){r=t}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(t){l=t}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===c?50/S:c},set:function(t){c=t}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(t){u=t}});var d="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof ot||this instanceof at))return G(d,this.objId,this.scope)},set:function(t){t=t.toString(),d=t}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof et==!1?G(h,this.objId,this.scope):h},set:function(t){t=t.toString(),h=this instanceof et==!1?"("===t.substr(0,1)?w(t.substr(1,t.length-2)):w(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof et==!0?w(h.substr(1,h.length-1)):h},set:function(t){t=t.toString(),h=this instanceof et==!0?"/"+t:t}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof et==!1?G(p,this.objId,this.scope):p},set:function(t){t=t.toString(),p=this instanceof et==!1?"("===t.substr(0,1)?w(t.substr(1,t.length-2)):w(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof et==!0?w(p.substr(1,p.length-1)):p},set:function(t){t=t.toString(),p=this instanceof et==!0?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var f,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(t){t=Boolean(t),g=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(f)return f},set:function(t){f=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,1):this.Ff=M(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,2):this.Ff=M(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,3):this.Ff=M(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==m)return m},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');m=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(m){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:m=2;break;case"center":case 1:m=1;break;case"left":case 0:default:m=0}}})};E(X,Y);function Q(){X.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return V(n,this.objId,this.scope)},set:function(t){n=q(t)}}),this.getOptions=function(){return n},this.setOptions=function(t){n=t,this.sort&&n.sort()},this.addOption=function(t){t=(t=t||"").toString(),n.push(t),this.sort&&n.sort()},this.removeOption=function(t,e){for(e=e||!1,t=(t=t||"").toString();-1!==n.indexOf(t)&&(n.splice(n.indexOf(t),1),!1!==e););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,18):this.Ff=M(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=B(this.Ff,19):this.Ff=M(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=B(this.Ff,20),n.sort()):this.Ff=M(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,22):this.Ff=M(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,23):this.Ff=M(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,27):this.Ff=M(this.Ff,27)}}),this.hasAppearanceStream=!1}E(Q,X);function K(){Q.call(this),this.fontName="helvetica",this.combo=!1}E(K,Q);function $(){K.call(this),this.combo=!0}E($,K);function tt(){$.call(this),this.edit=!0}E(tt,$);var et=function(){X.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,15):this.Ff=M(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,16):this.Ff=M(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,17):this.Ff=M(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,26):this.Ff=M(this.Ff,26)}});var e,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(i).length){var e,n=[];for(e in n.push("<<"),i)n.push("/"+e+" ("+A(t(i[e]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"==typeof t&&(i=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};E(et,X);function nt(){et.call(this),this.pushButton=!0}E(nt,et);function it(){et.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})}E(it,et);var ot=function(){var e,n;X.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t}});var i,o={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var e,n=[];for(e in n.push("<<"),o)n.push("/"+e+" ("+A(t(o[e]))+")");return n.push(">>"),n.join("\n")},set:function(t){"object"==typeof t&&(o=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return o.CA||""},set:function(t){"string"==typeof t&&(o.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(t){i="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=lt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};E(ot,X),it.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids){var n;this.Kids.hasOwnProperty(e)&&((n=this.Kids[e]).appearanceStreamContent=t.createAppearanceStream(n.optionName),n.caption=t.getCA())}},it.prototype.createOption=function(t){var e=new ot;return e.Parent=this,e.optionName=t,this.Kids.push(e),ct.call(this.scope,e),e};function rt(){et.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=lt.CheckBox.createAppearanceStream()}E(rt,et);var at=function(){X.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,13):this.Ff=M(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,21):this.Ff=M(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,23):this.Ff=M(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,24):this.Ff=M(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,25):this.Ff=M(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,26):this.Ff=M(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};E(at,X);function st(){at.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(T(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=B(this.Ff,14):this.Ff=M(this.Ff,14)}}),this.password=!0}E(st,at);var lt={CheckBox:{createAppearanceStream:function(){return{N:{On:lt.CheckBox.YesNormal},D:{On:lt.CheckBox.YesPushDown,Off:lt.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=k(t);e.scope=t.scope;var n=[],i=t.scope.internal.getFont(t.fontName,t.fontStyle).id,o=t.scope.__private__.encodeColorString(t.color),r=j(t,t.caption);return n.push("0.749023 g"),n.push("0 0 "+D(lt.internal.getWidth(t))+" "+D(lt.internal.getHeight(t))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+i+" "+D(r.fontSize)+" Tf "+o),n.push("BT"),n.push(r.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join("\n"),e},YesNormal:function(t){var e=k(t);e.scope=t.scope;var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),o=[],r=lt.internal.getHeight(t),a=lt.internal.getWidth(t),t=j(t,t.caption);return o.push("1 g"),o.push("0 0 "+D(a)+" "+D(r)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+D(a-1)+" "+D(r-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+n+" "+D(t.fontSize)+" Tf "+i),o.push(t.text),o.push("ET"),o.push("Q"),e.stream=o.join("\n"),e},OffPushDown:function(t){var e=k(t);e.scope=t.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+D(lt.internal.getWidth(t))+" "+D(lt.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:lt.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=lt.RadioButton.Circle.YesNormal,e.D[t]=lt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=k(t);e.scope=t.scope;var n=[],i=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4,i=Number((.9*i).toFixed(5)),o=lt.internal.Bezier_C,o=Number((i*o).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+x(lt.internal.getWidth(t)/2)+" "+x(lt.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=k(t);e.scope=t.scope;var n=[],i=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4,i=Number((.9*i).toFixed(5)),o=Number((2*i).toFixed(5)),r=Number((o*lt.internal.Bezier_C).toFixed(5)),a=Number((i*lt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+x(lt.internal.getWidth(t)/2)+" "+x(lt.internal.getHeight(t)/2)+" cm"),n.push(o+" 0 m"),n.push(o+" "+r+" "+r+" "+o+" 0 "+o+" c"),n.push("-"+r+" "+o+" -"+o+" "+r+" -"+o+" 0 c"),n.push("-"+o+" -"+r+" -"+r+" -"+o+" 0 -"+o+" c"),n.push(r+" -"+o+" "+o+" -"+r+" "+o+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+x(lt.internal.getWidth(t)/2)+" "+x(lt.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=k(t);e.scope=t.scope;var n=[],i=lt.internal.getWidth(t)<=lt.internal.getHeight(t)?lt.internal.getWidth(t)/4:lt.internal.getHeight(t)/4,i=Number((.9*i).toFixed(5)),o=Number((2*i).toFixed(5)),i=Number((o*lt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+x(lt.internal.getWidth(t)/2)+" "+x(lt.internal.getHeight(t)/2)+" cm"),n.push(o+" 0 m"),n.push(o+" "+i+" "+i+" "+o+" 0 "+o+" c"),n.push("-"+i+" "+o+" -"+o+" "+i+" -"+o+" 0 c"),n.push("-"+o+" -"+i+" -"+i+" -"+o+" 0 -"+o+" c"),n.push(i+" -"+o+" "+o+" -"+i+" "+o+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:lt.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=lt.RadioButton.Cross.YesNormal,e.D[t]=lt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=k(t);e.scope=t.scope;var n=[],i=lt.internal.calculateCross(t);return n.push("q"),n.push("1 1 "+D(lt.internal.getWidth(t)-2)+" "+D(lt.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(D(i.x1.x)+" "+D(i.x1.y)+" m"),n.push(D(i.x2.x)+" "+D(i.x2.y)+" l"),n.push(D(i.x4.x)+" "+D(i.x4.y)+" m"),n.push(D(i.x3.x)+" "+D(i.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=k(t);e.scope=t.scope;var n=lt.internal.calculateCross(t),i=[];return i.push("0.749023 g"),i.push("0 0 "+D(lt.internal.getWidth(t))+" "+D(lt.internal.getHeight(t))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+D(lt.internal.getWidth(t)-2)+" "+D(lt.internal.getHeight(t)-2)+" re"),i.push("W"),i.push("n"),i.push(D(n.x1.x)+" "+D(n.x1.y)+" m"),i.push(D(n.x2.x)+" "+D(n.x2.y)+" l"),i.push(D(n.x4.x)+" "+D(n.x4.y)+" m"),i.push(D(n.x3.x)+" "+D(n.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=k(t);e.scope=t.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+D(lt.internal.getWidth(t))+" "+D(lt.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+n}};lt.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=lt.internal.getWidth(t),n=lt.internal.getHeight(t),t=Math.min(e,n);return{x1:{x:(e-t)/2,y:(n-t)/2+t},x2:{x:(e-t)/2+t,y:(n-t)/2},x3:{x:(e-t)/2,y:(n-t)/2},x4:{x:(e-t)/2+t,y:(n-t)/2+t}}}},lt.internal.getWidth=function(t){var e=0;return"object"==typeof t&&(e=_(t.Rect[2])),e},lt.internal.getHeight=function(t){var e=0;return"object"==typeof t&&(e=_(t.Rect[3])),e};var ct=C.addField=function(t){if(I(this,t),!(t instanceof X))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};C.AcroFormChoiceField=Q,C.AcroFormListBox=K,C.AcroFormComboBox=$,C.AcroFormEditBox=tt,C.AcroFormButton=et,C.AcroFormPushButton=nt,C.AcroFormRadioButton=it,C.AcroFormCheckBox=rt,C.AcroFormTextField=at,C.AcroFormPasswordField=st,C.AcroFormAppearance=lt,C.AcroForm={ChoiceField:Q,ListBox:K,ComboBox:$,EditBox:tt,Button:et,PushButton:nt,RadioButton:it,CheckBox:rt,TextField:at,PasswordField:st,Appearance:lt},gn.AcroForm={ChoiceField:Q,ListBox:K,ComboBox:$,EditBox:tt,Button:et,PushButton:nt,RadioButton:it,CheckBox:rt,TextField:at,PasswordField:st,Appearance:lt};var ut=gn.AcroForm;function dt(t){return void 0!==t&&""!=t}function ht(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(t){n=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(t){i=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var o=[];Object.defineProperty(this,"childNodes",{get:function(){return o},set:function(t){o=t}});var r={};Object.defineProperty(this,"style",{get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"parentNode",{})}!function(s){var d="addImage_";function t(){var t,e=this.internal.collections[d+"images"];for(t in e)v.call(this,e[t])}function e(){var t,e,n=this.internal.collections[d+"images"],i=this.internal.write;for(e in n)i("/I"+(t=n[e]).index,t.objectId,"0","R")}function h(){this.internal.collections[d+"images"]||(this.internal.collections[d+"images"]={},this.internal.events.subscribe("putResources",t),this.internal.events.subscribe("putXobjectDict",e))}function l(t){return"function"==typeof s["process"+t.toUpperCase()]}function u(t){return"object"==typeof t&&1===t.nodeType}function c(t,e){if("IMG"===t.nodeName&&t.hasAttribute("src")){var n=""+t.getAttribute("src");if(0===n.indexOf("data:image/"))return P(unescape(n).split("base64,").pop());n=s.loadFile(n,!0);if(void 0!==n)return n}if("CANVAS"===t.nodeName){var i;switch(e){case"PNG":i="image/png";break;case"WEBP":i="image/webp";break;case"JPEG":case"JPG":default:i="image/jpeg"}return P(t.toDataURL(i,1).split("base64,").pop())}}function p(t,e,n,i,o,r){var a,s=function(t,e,n){return t||e||(e=t=-96),t<0&&(t=-1*n.width*72/t/this.internal.scaleFactor),e<0&&(e=-1*n.height*72/e/this.internal.scaleFactor),0===t&&(t=e*n.width/n.height),0===e&&(e=t*n.height/n.width),[t,e]}.call(this,n,i,o),l=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,u=function(){var t=this.internal.collections[d+"images"];return h.call(this),t}.call(this);n=s[0],i=s[1],u[o.index]=o,r&&(r*=Math.PI/180,a=Math.cos(r),s=Math.sin(r),a=[(u=function(t){return t.toFixed(4)})(a),u(s),u(-1*s),u(a),0,0,"cm"]),this.internal.write("q"),r?(this.internal.write([1,"0","0",1,l(t),c(e+i),"cm"].join(" ")),this.internal.write(a.join(" ")),this.internal.write([l(n),"0","0",l(i),"0","0","cm"].join(" "))):this.internal.write([l(n),"0","0",l(i),l(t),c(e+i),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+o.index+" Do"),this.internal.write("Q")}s.__addimage__={};var f="UNKNOWN",g={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},m=s.__addimage__.getImageFileTypeByImageData=function(t,e){var n,i;e=e||f;var o,r,a,s=f;if(C(t))for(a in g)for(o=g[a],n=0;n<o.length;n+=1){for(r=!0,i=0;i<o[n].length;i+=1)if(void 0!==o[n][i]&&o[n][i]!==t[i]){r=!1;break}if(!0===r){s=a;break}}else for(a in g)for(o=g[a],n=0;n<o.length;n+=1){for(r=!0,i=0;i<o[n].length;i+=1)if(void 0!==o[n][i]&&o[n][i]!==t.charCodeAt(i)){r=!1;break}if(!0===r){s=a;break}}return s===f&&e!==f&&(s=e),s},v=function(t){for(var e=this.internal.write,n=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var o=[];if(o.push({key:"Type",value:"/XObject"}),o.push({key:"Subtype",value:"/Image"}),o.push({key:"Width",value:t.width}),o.push({key:"Height",value:t.height}),t.colorSpace===b.INDEXED?o.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(o.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===b.DEVICE_CMYK&&o.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),o.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&o.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)){for(var r="",a=0,s=t.transparency.length;a<s;a++)r+=t.transparency[a]+" "+t.transparency[a]+" ";o.push({key:"Mask",value:"["+r+"]"})}void 0!==t.sMask&&o.push({key:"SMask",value:t.objectId+1+" 0 R"});var l,c=void 0!==t.filter?["/"+t.filter]:void 0;n({data:t.data,additionalKeyValues:o,alreadyAppliedFilters:c,objectId:t.objectId}),e("endobj"),"sMask"in t&&void 0!==t.sMask&&(l="/Predictor "+t.predictor+" /Colors 1 /BitsPerComponent "+t.bitsPerComponent+" /Columns "+t.width,l={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:t.bitsPerComponent,decodeParameters:l,data:t.sMask},"filter"in t&&(l.filter=t.filter),v.call(this,l)),t.colorSpace===b.INDEXED&&(l=this.internal.newObject(),n({data:D(new Uint8Array(t.palette)),objectId:l}),e("endobj"))},b=s.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};s.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var y=s.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=s.__addimage__.sHashCode=function(t){var e,n,i=0;if("string"==typeof t)for(n=t.length,e=0;e<n;e++)i=(i<<5)-i+t.charCodeAt(e),i|=0;else if(C(t))for(n=t.byteLength/2,e=0;e<n;e++)i=(i<<5)-i+t[e],i|=0;return i},r=s.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var e=!0;return 0===t.length&&(e=!1),t.length%4!=0&&(e=!1),!1===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(e=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(e=!1),e},a=s.__addimage__.extractImageFromDataUrl=function(t){var e=(t=t||"").split("base64,"),n=null;return 2===e.length&&(t=/^data:(\w*\/\w*);*(charset=[\w=-]*)*;*$/.exec(e[0]),Array.isArray(t)&&(n={mimeType:t[1],charset:t[2],data:e[1]})),n},x=s.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};s.__addimage__.isArrayBuffer=function(t){return x()&&t instanceof ArrayBuffer};var C=s.__addimage__.isArrayBufferView=function(t){return x()&&"undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)},A=s.__addimage__.binaryStringToUint8Array=function(t){for(var e=t.length,n=new Uint8Array(e),i=0;i<e;i++)n[i]=t.charCodeAt(i);return n},D=s.__addimage__.arrayBufferToBinaryString=function(e){try{return P(sn(String.fromCharCode.apply(null,e)))}catch(t){if("undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.reduce)return new Uint8Array(e).reduce(function(t,e){return t.push(String.fromCharCode(e)),t},[]).join("")}};s.addImage=function(){var t,e,n,i,o,r,a,s;t=arguments[0],s="number"==typeof arguments[1]?(e=f,n=arguments[1],i=arguments[2],o=arguments[3],r=arguments[4],a=arguments[5],c=arguments[6],arguments[7]):(e=arguments[1],n=arguments[2],i=arguments[3],o=arguments[4],r=arguments[5],a=arguments[6],c=arguments[7],arguments[8]),"object"==typeof t&&!u(t)&&"imageData"in t&&(t=(l=t).imageData,e=l.format||e||f,n=l.x||n||0,i=l.y||i||0,o=l.w||l.width||o,r=l.h||l.height||r,a=l.alias||a,c=l.compression||c,s=l.rotation||l.angle||s);var l=this.internal.getFilters();if(void 0===c&&-1!==l.indexOf("FlateEncode")&&(c="SLOW"),isNaN(n)||isNaN(i))throw new Error("Invalid coordinates passed to jsPDF.addImage");h.call(this);var c=S.call(this,t,e,a,c);return p.call(this,n,i,o,r,c,s),this};var S=function(t,e,n,i){var o,r,a;if("string"==typeof t&&m(t)===f&&(t=unescape(t),""===(a=_(t,!1))&&void 0===(a=s.loadFile(t,!0))||(t=a)),u(t)&&(t=c(t,e)),e=m(t,e),!l(e))throw new Error("addImage does not support files of type '"+e+"', please ensure that a plugin for '"+e+"' support is added.");if(null!=(a=n)&&0!==a.length||(n="string"==typeof(r=t)||C(r)?w(r):null),(r=function(t){var e=this.internal.collections[d+"images"];if(e)for(var n in e)if(t===e[n].alias)return e[n]}.call(this,n))||(x()&&(t instanceof Uint8Array||(t=A(o=t))),r=this["process"+e.toUpperCase()](t,function(){return Object.keys(this.internal.collections[d+"images"]).length}.call(this),n,((i=i)&&"string"==typeof i&&(i=i.toUpperCase()),i in s.image_compression?i:y.NONE),o)),!r)throw new Error("An unknown error occurred whilst processing the image.");return r},_=s.__addimage__.convertBase64ToBinaryString=function(t,e){var n;e="boolean"!=typeof e||e;var i,o="";if("string"==typeof t){i=null!==(n=a(t))?n.data:t;try{o=P(i)}catch(t){if(e)throw r(i)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return o};s.getImageProperties=function(t){var e="";if(u(t)&&(t=c(t)),"string"==typeof t&&m(t)===f&&(""===(e=_(t,!1))&&(e=s.loadFile(t)||""),t=e),e=m(t),!l(e))throw new Error("addImage does not support files of type '"+e+"', please ensure that a plugin for '"+e+"' support is added.");if(!x()||t instanceof Uint8Array||(t=A(t)),!(t=this["process"+e.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return t.fileType=e,t}}(gn.API),ei=gn.API,gn.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),ei.events.push(["putPage",function(t){for(var e,n=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(t.objId),r=t.pageContext.annotations,a=!1,s=0;s<r.length&&!a;s++)switch((e=r[s]).type){case"link":(dt(e.options.url)||dt(e.options.pageNumber))&&(a=!0);break;case"reference":case"text":case"freetext":a=!0}if(0!=a){this.internal.write("/Annots [");for(var l=0;l<r.length;l++){e=r[l];var c=this.internal.pdfEscape,u=this.internal.getEncryptor(t.objId);switch(e.type){case"reference":this.internal.write(" "+e.object.objId+" 0 R ");break;case"text":var d,h=this.internal.newAdditionalObject(),p=this.internal.newAdditionalObject(),f=this.internal.getEncryptor(h.objId),g=e.title||"Note",m="<</Type /Annot /Subtype /Text "+(d="/Rect ["+n(e.bounds.x)+" "+i(e.bounds.y+e.bounds.h)+" "+n(e.bounds.x+e.bounds.w)+" "+i(e.bounds.y)+"] ")+"/Contents ("+c(f(e.contents))+")";m+=" /Popup "+p.objId+" 0 R",m+=" /P "+o.objId+" 0 R",m+=" /T ("+c(f(g))+") >>",h.content=m;g=h.objId+" 0 R";m="<</Type /Annot /Subtype /Popup "+(d="/Rect ["+n(e.bounds.x+30)+" "+i(e.bounds.y+e.bounds.h)+" "+n(e.bounds.x+e.bounds.w+30)+" "+i(e.bounds.y)+"] ")+" /Parent "+g,e.open&&(m+=" /Open true"),m+=" >>",p.content=m,this.internal.write(h.objId,"0 R",p.objId,"0 R");break;case"freetext":d="/Rect ["+n(e.bounds.x)+" "+i(e.bounds.y)+" "+n(e.bounds.x+e.bounds.w)+" "+i(e.bounds.y+e.bounds.h)+"] ";var v=e.color||"#000000";m="<</Type /Annot /Subtype /FreeText "+d+"/Contents ("+c(u(e.contents))+")",m+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+v+")",m+=" /Border [0 0 0]",m+=" >>",this.internal.write(m);break;case"link":if(e.options.name?(v=this.annotations._nameMap[e.options.name],e.options.pageNumber=v.page,e.options.top=v.y):e.options.top||(e.options.top=0),d="/Rect ["+e.finalBounds.x+" "+e.finalBounds.y+" "+e.finalBounds.w+" "+e.finalBounds.h+"] ",m="",e.options.url)m="<</Type /Annot /Subtype /Link "+d+"/Border [0 0 0] /A <</S /URI /URI ("+c(u(e.options.url))+") >>";else if(e.options.pageNumber)switch(m="<</Type /Annot /Subtype /Link "+d+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(e.options.pageNumber).objId+" 0 R",e.options.magFactor=e.options.magFactor||"XYZ",e.options.magFactor){case"Fit":m+=" /Fit]";break;case"FitH":m+=" /FitH "+e.options.top+"]";break;case"FitV":e.options.left=e.options.left||0,m+=" /FitV "+e.options.left+"]";break;case"XYZ":default:var b=i(e.options.top);e.options.left=e.options.left||0,void 0===e.options.zoom&&(e.options.zoom=0),m+=" /XYZ "+e.options.left+" "+b+" "+e.options.zoom+"]"}""!=m&&(m+=" >>",this.internal.write(m))}}this.internal.write("]")}}]),ei.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},ei.link=function(t,e,n,i,o){var r=this.internal.getCurrentPageInfo(),a=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;r.pageContext.annotations.push({finalBounds:{x:a(t),y:s(e),w:a(t+n),h:s(e+i)},options:o,type:"link"})},ei.textWithLink=function(t,e,n,i){var o=this.getTextWidth(t),r=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(t,e,n,i),n+=.2*r,this.link(e,n-r,o,r,i),o},ei.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},function(t){var l={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},e={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];t.__arabicParser__={};var i=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==l[t.charCodeAt(0)]},c=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},o=t.__arabicParser__.isArabicEndLetter=function(t){return c(t)&&i(t)&&l[t.charCodeAt(0)].length<=2},a=t.__arabicParser__.isArabicAlfLetter=function(t){return c(t)&&0<=n.indexOf(t.charCodeAt(0))};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return c(t)&&i(t)&&1<=l[t.charCodeAt(0)].length};var s=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return c(t)&&i(t)&&2<=l[t.charCodeAt(0)].length};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return c(t)&&i(t)&&3<=l[t.charCodeAt(0)].length};var u=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return c(t)&&i(t)&&4==l[t.charCodeAt(0)].length},d=t.__arabicParser__.resolveLigatures=function(t){for(var e=0,n=r,i="",o=0,e=0;e<t.length;e+=1)void 0!==n[t.charCodeAt(e)]?(o++,"number"==typeof(n=n[t.charCodeAt(e)])&&(i+=String.fromCharCode(n),n=r,o=0),e===t.length-1&&(n=r,i+=t.charAt(e-(o-1)),e-=o-1,o=0)):(n=r,i+=t.charAt(e-o),e-=o,o=0);return i};function h(t){for(var e,n,i=0,o=0,r="",a=(t=t||"").split("\\s+"),s=[],i=0;i<a.length;i+=1){for(s.push(""),o=0;o<a[i].length;o+=1)r=a[i][o],e=a[i][o-1],n=a[i][o+1],c(r)?(n=p(r,e,n),s[i]+=-1!==n?String.fromCharCode(l[r.charCodeAt(0)][n]):r):s[i]+=r;s[i]=d(s[i])}return s.join(" ")}t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==e[t.charCodeAt(0)]};var p=t.__arabicParser__.getCorrectForm=function(t,e,n){return!c(t)||!1===i(t)?-1:!s(t)||!c(e)&&!c(n)||!c(n)&&o(e)||o(t)&&!c(e)||o(t)&&a(e)||o(t)&&o(e)?0:u(t)&&c(e)&&!o(e)&&c(n)&&s(n)?3:o(t)||!c(n)?1:2},f=t.__arabicParser__.processArabic=t.processArabic=function(){var t,e="string"==typeof arguments[0]?arguments[0]:arguments[0].text,n=[];if(Array.isArray(e)){for(var i=0,n=[],i=0;i<e.length;i+=1)Array.isArray(e[i])?n.push([h(e[i][0]),e[i][1],e[i][2]]):n.push([h(e[i])]);t=n}else t=h(e);return"string"==typeof arguments[0]?t:(arguments[0].text=t,arguments[0])};t.events.push(["preProcessText",f])}(gn.API),gn.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},E=gn.API,ht.prototype.getContext=function(t,e){if("2d"!==(t=t||"2d"))return null;for(var n in e)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=e[n]);return(this.pdf.context2d._canvas=this).pdf.context2d},ht.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},E.events.push(["initialized",function(){this.canvas=new ht,this.canvas.pdf=this}]),function(t){function S(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},_),this.internal.__cell__.margins.width=this.getPageWidth(),P.call(this))}var _={left:0,top:0,bottom:0,right:0},a=!1,P=function(){this.internal.__cell__.lastCell=new k,this.internal.__cell__.pages=1},k=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var n=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var i=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return i},set:function(t){i=t}});var o=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return o},set:function(t){o=t}});var r=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return a},set:function(t){a=t}});var s=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return s},set:function(t){s=t}}),this};k.prototype.clone=function(){return new k(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},k.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(t){return S.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},t.getTextDimensions=function(t,e){S.call(this);var n,i=(e=e||{}).fontSize||this.getFontSize(),o=e.font||this.getFont(),r=e.scaleFactor||this.internal.scaleFactor,a=0,s=0;if(!Array.isArray(t)&&"string"!=typeof t){if("number"!=typeof t)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");t=String(t)}var l=e.maxWidth;0<l?"string"==typeof t?t=this.splitTextToSize(t,l):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,e){return t.concat(scope.splitTextToSize(e,l))},[])):t=Array.isArray(t)?t:[t];for(var c=0;c<t.length;c++)a<(n=this.getStringUnitWidth(t[c],{font:o})*i)&&(a=n);return 0!==a&&(s=t.length),{w:a/=r,h:Math.max((s*i*this.getLineHeightFactor()-i*(this.getLineHeightFactor()-1))/r,0)}},t.cellAddPage=function(){S.call(this),this.addPage();var t=this.internal.__cell__.margins||_;return this.internal.__cell__.lastCell=new k(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var F=t.cell=function(){var t=arguments[0]instanceof k?arguments[0]:new k(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);S.call(this);var e=this.internal.__cell__.lastCell,n=this.internal.__cell__.padding,i=this.internal.__cell__.margins||_,o=this.internal.__cell__.tableHeaderRow,r=this.internal.__cell__.printHeaders;return void 0!==e.lineNumber&&(e.lineNumber===t.lineNumber?(t.x=(e.x||0)+(e.width||0),t.y=e.y||0):e.y+e.height+t.height+i.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=i.top,r&&o&&(this.printHeaderRow(t.lineNumber,!0),t.y+=o[0].height)):t.y=e.y+e.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===a?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-n,t.y+n,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+n,{align:"center",baseline:"top",maxWidth:t.width-n-n}):this.text(t.text,t.x+n,t.y+n,{align:"left",baseline:"top",maxWidth:t.width-n-n})),this.internal.__cell__.lastCell=t,this};t.table=function(e,n,t,i,o){if(S.call(this),!t)throw new Error("No data for PDF table.");var r,a=[],s=[],l=[],c={},u={},d=[],h=(o=o||{}).autoSize||!1,p=!1!==o.printHeaders,f=o.css&&void 0!==o.css["font-size"]?16*o.css["font-size"]:o.fontSize||12,g=o.margins||Object.assign({width:this.getPageWidth()},_),m="number"==typeof o.padding?o.padding:3,o=o.headerBackgroundColor||"#c8c8c8";if(P.call(this),this.internal.__cell__.printHeaders=p,this.internal.__cell__.margins=g,this.internal.__cell__.table_font_size=f,this.internal.__cell__.padding=m,this.internal.__cell__.headerBackgroundColor=o,this.setFontSize(f),null==i)l=(s=a=Object.keys(t[0])).map(function(){return"left"});else if(Array.isArray(i)&&"object"==typeof i[0])for(a=i.map(function(t){return t.name}),s=i.map(function(t){return t.prompt||t.name||""}),l=a.map(function(t){return t.align||"left"}),b=0;b<i.length;b+=1)u[i[b].name]=i[b].width*(19.049976/25.4);else Array.isArray(i)&&"string"==typeof i[0]&&(l=(s=a=i).map(function(){return"left"}));if(h)for(var v,b=0;b<a.length;b+=1){for(c[v=a[b]]=t.map(function(t){return t[v]}),this.setFont(void 0,"bold"),d.push(this.getTextDimensions(s[b],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),r=c[v],this.setFont(void 0,"normal"),D=0;D<r.length;D+=1)d.push(this.getTextDimensions(r[D],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);u[v]=Math.max.apply(null,d)+m+m,d=[]}if(p){var y={};for(b=0;b<a.length;b+=1)y[a[b]]={},y[a[b]].text=s[b],y[a[b]].align=l[b];var w=I.call(this,y,u),x=a.map(function(t){return new k(e,n,u[t],w,y[t].text,void 0,y[t].align)});this.setTableHeaderRow(x),this.printHeaderRow(1,!1)}var C=i.reduce(function(t,e){return t[e.name]=e.align,t},{});for(b=0;b<t.length;b+=1)for(var A=I.call(this,t[b],u),D=0;D<a.length;D+=1)F.call(this,new k(e,n,u[a[D]],A,t[b][a[D]],b+2,C[a[D]]));return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var I=function(n,i){var o=this.internal.__cell__.padding,e=this.internal.__cell__.table_font_size,r=this.internal.scaleFactor;return Object.keys(n).map(function(t){var e=n[t];return this.splitTextToSize(e.hasOwnProperty("text")?e.text:e,i[t]-o-o)},this).map(function(t){return this.getLineHeightFactor()*t.length*e/r+o+o},this).reduce(function(t,e){return Math.max(t,e)},0)};t.setTableHeaderRow=function(t){S.call(this),this.internal.__cell__.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(S.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var n,i;a=!0,"function"==typeof this.internal.__cell__.headerFunction&&(i=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages),this.internal.__cell__.lastCell=new k(i[0],i[1],i[2],i[3],void 0,-1)),this.setFont(void 0,"bold");for(var o=[],r=0;r<this.internal.__cell__.tableHeaderRow.length;r+=1)n=this.internal.__cell__.tableHeaderRow[r].clone(),e&&(n.y=this.internal.__cell__.margins.top||0,o.push(n)),n.lineNumber=t,this.setFillColor(this.internal.__cell__.headerBackgroundColor),F.call(this,n);0<o.length&&this.setTableHeaderRow(o),this.setFont(void 0,"normal"),a=!1}}(gn.API),function(){function u(t){return t=t||{},this.isStrokeTransparent=t.isStrokeTransparent||!1,this.strokeOpacity=t.strokeOpacity||1,this.strokeStyle=t.strokeStyle||"#000000",this.fillStyle=t.fillStyle||"#000000",this.isFillTransparent=t.isFillTransparent||!1,this.fillOpacity=t.fillOpacity||1,this.font=t.font||"10px sans-serif",this.textBaseline=t.textBaseline||"alphabetic",this.textAlign=t.textAlign||"left",this.lineWidth=t.lineWidth||1,this.lineJoin=t.lineJoin||"miter",this.lineCap=t.lineCap||"butt",this.path=t.path||[],this.transform=void 0!==t.transform?t.transform.clone():new D,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new g,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new g,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this}var l,o,r,c,d,g,A,D,h;gn.API.events.push(["initialized",function(){this.context2d=new t(this),l=this.internal.f2,o=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,c=this.internal.getHorizontalCoordinate,d=this.internal.getVerticalCoordinate,g=this.internal.Point,A=this.internal.Rectangle,D=this.internal.Matrix,h=new u}]);var t=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var e=t;Object.defineProperty(this,"pdf",{get:function(){return e}});var n=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(t){n=Boolean(t)}});var i=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return i},set:function(t){i=Boolean(t)}});var o=0;Object.defineProperty(this,"posX",{get:function(){return o},set:function(t){isNaN(t)||(o=t)}});var r=0;Object.defineProperty(this,"posY",{get:function(){return r},set:function(t){isNaN(t)||(r=t)}});var a=!1;Object.defineProperty(this,"autoPaging",{get:function(){return a},set:function(t){a=Boolean(t)}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(t){s=t}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(t){l=t}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(t){t instanceof u&&(h=t)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(t){h.path=t}});var c=[];Object.defineProperty(this,"ctxStack",{get:function(){return c},set:function(t){c=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){t=p(t);this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=0===t.a,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){t=p(t);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=0===t.a,this.ctx.strokeOpacity=t.a,0===t.a?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){if(this.ctx.font=t,null!==(o=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(t))){var e=o[1],n=(o[2],o[3]),i=o[4],t=(o[5],o[6]),o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2],i="px"!==o&&"em"===o?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor);this.pdf.setFontSize(i);var r="";("bold"===n||700<=parseInt(n,10)||"bold"===e)&&(r="bold"),"italic"===e&&(r+="italic"),0===r.length&&(r="normal");for(var a="",s=t.replace(/"|'/g,"").split(/\s*,\s*/),l={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},c=0;c<s.length;c++){if(void 0!==this.pdf.internal.getFont(s[c],r,{noFallback:!0,disableWarning:!0})){a=s[c];break}if("bolditalic"===r&&void 0!==this.pdf.internal.getFont(s[c],"bold",{noFallback:!0,disableWarning:!0}))a=s[c],r="bold";else if(void 0!==this.pdf.internal.getFont(s[c],"normal",{noFallback:!0,disableWarning:!0})){a=s[c],r="normal";break}}if(""===a)for(var u=0;u<s.length;u++)if(l[s[u]]){a=l[s[u]];break}a=""===a?"Times":a,this.pdf.setFont(a,r)}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(t){this.ctx.globalCompositeOperation=t}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(t){this.ctx.globalAlpha=t}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};t.prototype.fill=function(){e.call(this,"fill",!1)},t.prototype.stroke=function(){e.call(this,"stroke",!1)},t.prototype.beginPath=function(){this.path=[{type:"begin"}]},t.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw an.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var n=this.ctx.transform.applyToPoint(new g(t,e));this.path.push({type:"mt",x:n.x,y:n.y}),this.ctx.lastPoint=new g(t,e)},t.prototype.closePath=function(){for(var t=new g(0,0),e=0,e=this.path.length-1;-1!==e;e--)if("begin"===this.path[e].type&&"object"==typeof this.path[e+1]&&"number"==typeof this.path[e+1].x){t=new g(this.path[e+1].x,this.path[e+1].y),this.path.push({type:"lt",x:t.x,y:t.y});break}"object"==typeof this.path[e+2]&&"number"==typeof this.path[e+2].x&&this.path.push(JSON.parse(JSON.stringify(this.path[e+2]))),this.path.push({type:"close"}),this.ctx.lastPoint=new g(t.x,t.y)},t.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw an.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");e=this.ctx.transform.applyToPoint(new g(t,e));this.path.push({type:"lt",x:e.x,y:e.y}),this.ctx.lastPoint=new g(e.x,e.y)},t.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),e.call(this,null,!0)},t.prototype.quadraticCurveTo=function(t,e,n,i){if(isNaN(n)||isNaN(i)||isNaN(t)||isNaN(e))throw an.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");i=this.ctx.transform.applyToPoint(new g(n,i)),e=this.ctx.transform.applyToPoint(new g(t,e));this.path.push({type:"qct",x1:e.x,y1:e.y,x:i.x,y:i.y}),this.ctx.lastPoint=new g(i.x,i.y)},t.prototype.bezierCurveTo=function(t,e,n,i,o,r){if(isNaN(o)||isNaN(r)||isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i))throw an.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");r=this.ctx.transform.applyToPoint(new g(o,r)),e=this.ctx.transform.applyToPoint(new g(t,e)),i=this.ctx.transform.applyToPoint(new g(n,i));this.path.push({type:"bct",x1:e.x,y1:e.y,x2:i.x,y2:i.y,x:r.x,y:r.y}),this.ctx.lastPoint=new g(r.x,r.y)},t.prototype.arc=function(t,e,n,i,o,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(o))throw an.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");var a,s;r=Boolean(r),this.ctx.transform.isIdentity||(t=(s=this.ctx.transform.applyToPoint(new g(t,e))).x,e=s.y,a=this.ctx.transform.applyToPoint(new g(0,n)),s=this.ctx.transform.applyToPoint(new g(0,0)),n=Math.sqrt(Math.pow(a.x-s.x,2)+Math.pow(a.y-s.y,2))),Math.abs(o-i)>=2*Math.PI&&(i=0,o=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:n,startAngle:i,endAngle:o,counterclockwise:r})},t.prototype.arcTo=function(t,e,n,i,o){throw new Error("arcTo not implemented.")},t.prototype.rect=function(t,e,n,i){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i))throw an.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.lineTo(t+n,e),this.lineTo(t,e)},t.prototype.fillRect=function(t,e,n,i){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i))throw an.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");var o;x.call(this)||(o={},"butt"!==this.lineCap&&(o.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(o.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,n,i),this.fill(),o.hasOwnProperty("lineCap")&&(this.lineCap=o.lineCap),o.hasOwnProperty("lineJoin")&&(this.lineJoin=o.lineJoin))},t.prototype.strokeRect=function(t,e,n,i){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i))throw an.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");C.call(this)||(this.beginPath(),this.rect(t,e,n,i),this.stroke())},t.prototype.clearRect=function(t,e,n,i){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i))throw an.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,n,i))},t.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("q");this.pdf.setPage(e),t&&(this.ctx.fontSize=this.pdf.internal.getFontSize(),t=new u(this.ctx),this.ctxStack.push(this.ctx),this.ctx=t)},t.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("Q");this.pdf.setPage(e),t&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin)},t.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var p=function(t){var e,n,i,o,r;return!0===t.isCanvasGradient&&(t=t.getColor()),t?(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t)?o=i=n=e=0:null!==(r=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t))?(e=parseInt(r[1]),n=parseInt(r[2]),i=parseInt(r[3]),o=1):null!==(r=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t))?(e=parseInt(r[1]),n=parseInt(r[2]),i=parseInt(r[3]),o=parseFloat(r[4])):(o=1,"string"==typeof t&&"#"!==t.charAt(0)&&(t=(r=new cn(t)).ok?r.toHex():"#000000"),4===t.length?(e=t.substring(1,2),e+=e,n=t.substring(2,3),n+=n,i=t.substring(3,4),i+=i):(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7)),e=parseInt(e,16),n=parseInt(n,16),i=parseInt(i,16)),{r:e,g:n,b:i,a:o,style:t}):{r:0,g:0,b:0,a:0,style:t}},x=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},C=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};t.prototype.fillText=function(t,e,n,i){if(isNaN(e)||isNaN(n)||"string"!=typeof t)throw an.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");var o,r;i=isNaN(i)?void 0:i,x.call(this)||(n=a.call(this,n),o=O(this.ctx.transform.rotation),r=this.ctx.transform.scaleX,s.call(this,{text:t,x:e,y:n,scale:r,angle:o,align:this.textAlign,maxWidth:i}))},t.prototype.strokeText=function(t,e,n,i){if(isNaN(e)||isNaN(n)||"string"!=typeof t)throw an.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");var o,r;C.call(this)||(i=isNaN(i)?void 0:i,n=a.call(this,n),o=O(this.ctx.transform.rotation),r=this.ctx.transform.scaleX,s.call(this,{text:t,x:e,y:n,scale:r,renderingMode:"stroke",angle:o,align:this.textAlign,maxWidth:i}))},t.prototype.measureText=function(t){if("string"!=typeof t)throw an.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var e=this.pdf,n=this.pdf.internal.scaleFactor,i=e.internal.getFontSize(),e=e.getStringUnitWidth(t)*i/e.internal.scaleFactor;return new function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this}({width:e*=Math.round(96*n/72*1e4)/1e4})},t.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw an.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");e=new D(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(e)},t.prototype.rotate=function(t){if(isNaN(t))throw an.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");t=new D(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},t.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw an.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");e=new D(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(e)},t.prototype.transform=function(t,e,n,i,o,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(r))throw an.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");r=new D(t,e,n,i,o,r);this.ctx.transform=this.ctx.transform.multiply(r)},t.prototype.setTransform=function(t,e,n,i,o,r){t=isNaN(t)?1:t,e=isNaN(e)?0:e,n=isNaN(n)?0:n,i=isNaN(i)?1:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,this.ctx.transform=new D(t,e,n,i,o,r)},t.prototype.drawImage=function(t,e,n,i,o,r,a,s,l){var c=this.pdf.getImageProperties(t),u=1,d=1,h=1,p=1;void 0!==i&&void 0!==s&&(h=s/i,p=l/o,u=c.width/i*s/i,d=c.height/o*l/o),void 0===r&&(r=e,a=n,n=e=0),void 0!==i&&void 0===s&&(s=i,l=o),void 0===i&&void 0===s&&(s=c.width,l=c.height);for(var c=this.ctx.transform.decompose(),f=O(c.rotate.shx),l=new D,g=(l=(l=(l=l.multiply(c.translate)).multiply(c.skew)).multiply(c.scale)).applyToRectangle(new A(r-e*h,a-n*p,i*u,o*d)),m=S.call(this,g),v=[],b=0;b<m.length;b+=1)-1===v.indexOf(m[b])&&v.push(m[b]);if(P(v),this.autoPaging)for(var y,d=v[0],w=v[v.length-1],x=d;x<w+1;x++){this.pdf.setPage(x),0!==this.ctx.clip_path.length&&(C=this.path,y=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(y,this.posX,-1*this.pdf.internal.pageSize.height*(x-1)+this.posY),k.call(this,"fill",!0),this.path=C);var C=JSON.parse(JSON.stringify(g)),C=_([C],this.posX,-1*this.pdf.internal.pageSize.height*(x-1)+this.posY)[0];this.pdf.addImage(t,"JPEG",C.x,C.y,C.w,C.h,null,null,f)}else this.pdf.addImage(t,"JPEG",g.x,g.y,g.w,g.h,null,null,f)};var S=function(t,e,n){var i=[];switch(e=e||this.pdf.internal.pageSize.width,n=n||this.pdf.internal.pageSize.height,t.type){default:case"mt":case"lt":i.push(Math.floor((t.y+this.posY)/n)+1);break;case"arc":i.push(Math.floor((t.y+this.posY-t.radius)/n)+1),i.push(Math.floor((t.y+this.posY+t.radius)/n)+1);break;case"qct":var o=y(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);i.push(Math.floor(o.y/n)+1),i.push(Math.floor((o.y+o.h)/n)+1);break;case"bct":o=T(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);i.push(Math.floor(o.y/n)+1),i.push(Math.floor((o.y+o.h)/n)+1);break;case"rect":i.push(Math.floor((t.y+this.posY)/n)+1),i.push(Math.floor((t.y+t.h+this.posY)/n)+1)}for(var r=0;r<i.length;r+=1)for(;this.pdf.internal.getNumberOfPages()<i[r];)w.call(this);return i},w=function(){var t=this.fillStyle,e=this.strokeStyle,n=this.font,i=this.lineCap,o=this.lineWidth,r=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=e,this.font=n,this.lineCap=i,this.lineWidth=o,this.lineJoin=r},_=function(t,e,n){for(var i=0;i<t.length;i++)switch(t[i].type){case"bct":t[i].x2+=e,t[i].y2+=n;case"qct":t[i].x1+=e,t[i].y1+=n;case"mt":case"lt":case"arc":default:t[i].x+=e,t[i].y+=n}return t},P=function(t){return t.sort(function(t,e){return t-e})},e=function(t,e){for(var n=this.fillStyle,i=this.strokeStyle,o=this.lineCap,r=this.lineWidth,a=r*this.ctx.transform.scaleX,s=this.lineJoin,l=JSON.parse(JSON.stringify(this.path)),c=JSON.parse(JSON.stringify(this.path)),u=[],d=0;d<c.length;d++)if(void 0!==c[d].x)for(var h=S.call(this,c[d]),p=0;p<h.length;p+=1)-1===u.indexOf(h[p])&&u.push(h[p]);for(var f=0;f<u.length;f++)for(;this.pdf.internal.getNumberOfPages()<u[f];)w.call(this);if(P(u),this.autoPaging)for(var g,m,v=u[0],b=u[u.length-1],y=v;y<b+1;y++)this.pdf.setPage(y),this.fillStyle=n,this.strokeStyle=i,this.lineCap=o,this.lineWidth=a,this.lineJoin=s,0!==this.ctx.clip_path.length&&(g=this.path,m=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(m,this.posX,-1*this.pdf.internal.pageSize.height*(y-1)+this.posY),k.call(this,t,!0),this.path=g),g=JSON.parse(JSON.stringify(l)),this.path=_(g,this.posX,-1*this.pdf.internal.pageSize.height*(y-1)+this.posY),!1!==e&&0!==y||k.call(this,t,e),this.lineWidth=r;else this.lineWidth=a,k.call(this,t,e),this.lineWidth=r;this.path=l},k=function(t,e){if(("stroke"!==t||e||!C.call(this))&&("stroke"===t||e||!x.call(this))){for(var n,i=[],o=this.path,r=0;r<o.length;r++){var a=o[r];switch(a.type){case"begin":i.push({begin:!0});break;case"close":i.push({close:!0});break;case"mt":i.push({start:a,deltas:[],abs:[]});break;case"lt":var s=i.length;if(!isNaN(o[r-1].x)&&(f=[a.x-o[r-1].x,a.y-o[r-1].y],0<s))for(;0<=s;s--)if(!0!==i[s-1].close&&!0!==i[s-1].begin){i[s-1].deltas.push(f),i[s-1].abs.push(a);break}break;case"bct":f=[a.x1-o[r-1].x,a.y1-o[r-1].y,a.x2-o[r-1].x,a.y2-o[r-1].y,a.x-o[r-1].x,a.y-o[r-1].y],i[i.length-1].deltas.push(f);break;case"qct":var l=o[r-1].x+2/3*(a.x1-o[r-1].x),c=o[r-1].y+2/3*(a.y1-o[r-1].y),u=a.x+2/3*(a.x1-a.x),d=a.y+2/3*(a.y1-a.y),h=a.x,p=a.y,f=[l-o[r-1].x,c-o[r-1].y,u-o[r-1].x,d-o[r-1].y,h-o[r-1].x,p-o[r-1].y];i[i.length-1].deltas.push(f);break;case"arc":i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(a)}}n=e?null:"stroke"===t?"stroke":"fill";for(var g,m,v=0;v<i.length;v++){if(i[v].arc){for(var b=i[v].abs,y=0;y<b.length;y++){var w=b[y];"arc"===w.type?F.call(this,w.x,w.y,w.radius,w.startAngle,w.endAngle,w.counterclockwise,void 0,e):L.call(this,w.x,w.y)}I.call(this,n),this.pdf.internal.out("h")}i[v].arc||!0!==i[v].close&&!0!==i[v].begin&&(g=i[v].start.x,m=i[v].start.y,N.call(this,i[v].deltas,g,m))}n&&I.call(this,n),e&&E.call(this)}},a=function(t){var e=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=e*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-n;case"top":return t+e-n;case"hanging":return t+e-2*n;case"middle":return t+e/2-n;case"ideographic":return t;case"alphabetic":default:return t}};t.prototype.createLinearGradient=function(){function t(){}return t.colorStops=[],t.addColorStop=function(t,e){this.colorStops.push([t,e])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},t.prototype.createPattern=function(){return this.createLinearGradient()},t.prototype.createRadialGradient=function(){return this.createLinearGradient()};var F=function(t,e,n,i,o,r,a,s){for(var l=v.call(this,n,i,o,r),c=0;c<l.length;c++){var u=l[c];0===c&&f.call(this,u.x1+t,u.y1+e),m.call(this,t,e,u.x2,u.y2,u.x3,u.y3,u.x4,u.y4)}s?E.call(this):I.call(this,a)},I=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},E=function(){this.pdf.clip(),this.pdf.discardPath()},f=function(t,e){this.pdf.internal.out(o(t)+" "+r(e)+" m")},s=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;case"left":case"start":default:e="left"}var n=this.ctx.transform.applyToPoint(new g(t.x,t.y)),i=this.ctx.transform.decompose(),o=new D;o=(o=(o=o.multiply(i.translate)).multiply(i.skew)).multiply(i.scale);for(var r,a,i=this.pdf.getTextDimensions(t.text),s=this.ctx.transform.applyToRectangle(new A(t.x,t.y,i.w,i.h)),i=o.applyToRectangle(new A(t.x,t.y-i.h,i.w,i.h)),l=S.call(this,i),c=[],u=0;u<l.length;u+=1)-1===c.indexOf(l[u])&&c.push(l[u]);if(P(c),!0===this.autoPaging)for(var d,i=c[0],h=c[c.length-1],p=i;p<h+1;p++){this.pdf.setPage(p),0!==this.ctx.clip_path.length&&(f=this.path,d=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(d,this.posX,-1*this.pdf.internal.pageSize.height*(p-1)+this.posY),k.call(this,"fill",!0),this.path=f);var f=JSON.parse(JSON.stringify(s)),f=_([f],this.posX,-1*this.pdf.internal.pageSize.height*(p-1)+this.posY)[0];.01<=t.scale&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*t.scale),a=this.lineWidth,this.lineWidth=a*t.scale),this.pdf.text(t.text,f.x,f.y,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),.01<=t.scale&&(this.pdf.setFontSize(r),this.lineWidth=a)}else.01<=t.scale&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*t.scale),a=this.lineWidth,this.lineWidth=a*t.scale),this.pdf.text(t.text,n.x+this.posX,n.y+this.posY,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),.01<=t.scale&&(this.pdf.setFontSize(r),this.lineWidth=a)},L=function(t,e,n,i){n=n||0,i=i||0,this.pdf.internal.out(o(t+n)+" "+r(e+i)+" l")},N=function(t,e,n){return this.pdf.lines(t,e,n,null,null)},m=function(t,e,n,i,o,r,a,s){this.pdf.internal.out([l(c(n+t)),l(d(i+e)),l(c(o+t)),l(d(r+e)),l(c(a+t)),l(d(s+e)),"c"].join(" "))},v=function(t,e,n,i){for(var o=2*Math.PI,r=Math.PI/2;n<e;)e-=o;var a=Math.abs(n-e);a<o&&i&&(a=o-a);for(var s=[],l=i?-1:1,c=e;1e-5<a;){var u=c+l*Math.min(a,r);s.push(b.call(this,t,c,u)),a-=Math.abs(u-c),c=u}return s},b=function(t,e,n){var i=(n-e)/2,o=t*Math.cos(i),r=t*Math.sin(i),a=o,s=-r,l=a*a+s*s,c=l+a*o+s*r,c=4/3*(Math.sqrt(2*l*c)-c)/(a*r-s*o),r=a-c*s,o=s+c*a,s=r,c=-o,a=i+e,i=Math.cos(a),a=Math.sin(a);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:r*i-o*a,y2:r*a+o*i,x3:s*i-c*a,y3:s*a+c*i,x4:t*Math.cos(n),y4:t*Math.sin(n)}},O=function(t){return 180*t/Math.PI},y=function(t,e,n,i,o,r){var a=t+.5*(n-t),s=e+.5*(i-e),l=o+.5*(n-o),n=r+.5*(i-r),i=Math.min(t,o,a,l),a=Math.max(t,o,a,l),l=Math.min(e,r,s,n),n=Math.max(e,r,s,n);return new A(i,l,a-i,n-l)},T=function(t,e,n,i,o,r,a,s){for(var l,c,u,d,h,p,f,g,m=n-t,v=i-e,b=o-n,y=r-i,w=a-o,x=s-r,C=0;C<41;C++)u=(c=(u=t+(l=C/40)*m)+l*((d=n+l*b)-u))+l*(d+l*(o+l*w-d)-c),d=(d=(d=e+l*v)+l*((c=i+l*y)-d))+l*(c+l*(r+l*x-c)-d),g=0==C?(f=h=u,p=d):(h=Math.min(h,u),p=Math.min(p,d),f=Math.max(f,u),Math.max(g,d));return new A(Math.round(h),Math.round(p),Math.round(f-h),Math.round(g-p))}}();var pt,ft=(function(e){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;e.assign=function(t){for(var e,n,i=Array.prototype.slice.call(arguments,1);i.length;){var o=i.shift();if(o){if("object"!=typeof o)throw new TypeError(o+"must be non-object");for(var r in o)e=o,n=r,Object.prototype.hasOwnProperty.call(e,n)&&(t[r]=o[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,n,i,o){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+i),o);else for(var r=0;r<i;r++)t[o+r]=e[n+r]},flattenChunks:function(t){for(var e,n,i,o=0,r=0,a=t.length;r<a;r++)o+=t[r].length;for(i=new Uint8Array(o),r=e=0,a=t.length;r<a;r++)n=t[r],i.set(n,e),e+=n.length;return i}},i={arraySet:function(t,e,n,i,o){for(var r=0;r<i;r++)t[o+r]=e[n+r]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)}((pt={exports:{}},pt.exports)),pt.exports),gt=(ft.assign,ft.shrinkBuf,ft.setTyped,ft.Buf8,ft.Buf16,ft.Buf32,0),mt=1;function vt(t){for(var e=t.length;0<=--e;)t[e]=0}var bt=0,yt=29,wt=256,xt=wt+1+yt,Ct=30,At=19,Dt=2*xt+1,St=15,_t=16,Pt=7,kt=256,Ft=16,It=17,Et=18,Lt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Nt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ot=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Tt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bt=new Array(2*(xt+2));vt(Bt);var Mt=new Array(2*Ct);vt(Mt);var zt=new Array(512);vt(zt);var jt=new Array(256);vt(jt);var Rt=new Array(yt);vt(Rt);var Ut,Wt,Ht,Vt=new Array(Ct);function qt(t,e,n,i,o){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=i,this.max_length=o,this.has_stree=t&&t.length}function Gt(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Yt(t){return t<256?zt[t]:zt[256+(t>>>7)]}function Zt(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Jt(t,e,n){t.bi_valid>_t-n?(t.bi_buf|=e<<t.bi_valid&65535,Zt(t,t.bi_buf),t.bi_buf=e>>_t-t.bi_valid,t.bi_valid+=n-_t):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function Xt(t,e,n){Jt(t,n[2*e],n[2*e+1])}function Qt(t,e){for(var n=0;n|=1&t,t>>>=1,n<<=1,0<--e;);return n>>>1}function Kt(t,e,n){for(var i,o=new Array(St+1),r=0,a=1;a<=St;a++)o[a]=r=r+n[a-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=Qt(o[s]++,s))}}function $t(t){for(var e=0;e<xt;e++)t.dyn_ltree[2*e]=0;for(e=0;e<Ct;e++)t.dyn_dtree[2*e]=0;for(e=0;e<At;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*kt]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function te(t){8<t.bi_valid?Zt(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function ee(t,e,n,i){var o=2*e,r=2*n;return t[o]<t[r]||t[o]===t[r]&&i[e]<=i[n]}function ne(t,e,n){for(var i=t.heap[n],o=n<<1;o<=t.heap_len&&(o<t.heap_len&&ee(e,t.heap[o+1],t.heap[o],t.depth)&&o++,!ee(e,i,t.heap[o],t.depth));)t.heap[n]=t.heap[o],n=o,o<<=1;t.heap[n]=i}function ie(t,e,n){var i,o,r,a,s=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],o=t.pending_buf[t.l_buf+s],s++,0==i?Xt(t,o,e):(Xt(t,(r=jt[o])+wt+1,e),0!==(a=Lt[r])&&Jt(t,o-=Rt[r],a),Xt(t,r=Yt(--i),n),0!==(a=Nt[r])&&Jt(t,i-=Vt[r],a)),s<t.last_lit;);Xt(t,kt,e)}function oe(t,g){var e,n,i,o=g.dyn_tree,r=g.stat_desc.static_tree,a=g.stat_desc.has_stree,s=g.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=Dt,e=0;e<s;e++)0!==o[2*e]?(t.heap[++t.heap_len]=l=e,t.depth[e]=0):o[2*e+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=r[2*i+1]);for(g.max_code=l,e=t.heap_len>>1;1<=e;e--)ne(t,o,e);for(i=s;e=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ne(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=e,t.heap[--t.heap_max]=n,o[2*i]=o[2*e]+o[2*n],t.depth[i]=(t.depth[e]>=t.depth[n]?t.depth[e]:t.depth[n])+1,o[2*e+1]=o[2*n+1]=i,t.heap[1]=i++,ne(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t){for(var e,n,i,o,r,a=g.dyn_tree,s=g.max_code,l=g.stat_desc.static_tree,c=g.stat_desc.has_stree,u=g.stat_desc.extra_bits,d=g.stat_desc.extra_base,h=g.stat_desc.max_length,p=0,f=0;f<=St;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;e<Dt;e++)h<(f=a[2*a[2*(n=t.heap[e])+1]+1]+1)&&(f=h,p++),a[2*n+1]=f,s<n||(t.bl_count[f]++,o=0,d<=n&&(o=u[n-d]),r=a[2*n],t.opt_len+=r*(f+o),c&&(t.static_len+=r*(l[2*n+1]+o)));if(0!==p){do{for(f=h-1;0===t.bl_count[f];)f--}while(t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[h]--,0<(p-=2));for(f=h;0!==f;f--)for(n=t.bl_count[f];0!==n;)s<(i=t.heap[--e])||(a[2*i+1]!==f&&(t.opt_len+=(f-a[2*i+1])*a[2*i],a[2*i+1]=f),n--)}}(t),Kt(o,l,t.bl_count)}function re(t,e,n){var i,o,r=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(n+1)+1]=65535,i=0;i<=n;i++)o=a,a=e[2*(i+1)+1],++s<l&&o===a||(s<c?t.bl_tree[2*o]+=s:0!==o?(o!==r&&t.bl_tree[2*o]++,t.bl_tree[2*Ft]++):s<=10?t.bl_tree[2*It]++:t.bl_tree[2*Et]++,r=o,c=(s=0)===a?(l=138,3):o===a?(l=6,3):(l=7,4))}function ae(t,e,n){var i,o,r=-1,a=e[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),i=0;i<=n;i++)if(o=a,a=e[2*(i+1)+1],!(++s<l&&o===a)){if(s<c)for(;Xt(t,o,t.bl_tree),0!=--s;);else 0!==o?(o!==r&&(Xt(t,o,t.bl_tree),s--),Xt(t,Ft,t.bl_tree),Jt(t,s-3,2)):s<=10?(Xt(t,It,t.bl_tree),Jt(t,s-3,3)):(Xt(t,Et,t.bl_tree),Jt(t,s-11,7));r=o,c=(s=0)===a?(l=138,3):o===a?(l=6,3):(l=7,4)}}vt(Vt);var se=!1;function le(t,e,n,i){Jt(t,(bt<<1)+(i?1:0),3),i=e,e=n,n=!0,te(t=t),n&&(Zt(t,e),Zt(t,~e)),ft.arraySet(t.pending_buf,t.window,i,e,t.pending),t.pending+=e}var ce={_tr_init:function(t){se||(function(){for(var t,e,n,i=new Array(St+1),o=0,r=0;r<yt-1;r++)for(Rt[r]=o,t=0;t<1<<Lt[r];t++)jt[o++]=r;for(jt[o-1]=r,r=n=0;r<16;r++)for(Vt[r]=n,t=0;t<1<<Nt[r];t++)zt[n++]=r;for(n>>=7;r<Ct;r++)for(Vt[r]=n<<7,t=0;t<1<<Nt[r]-7;t++)zt[256+n++]=r;for(e=0;e<=St;e++)i[e]=0;for(t=0;t<=143;)Bt[2*t+1]=8,t++,i[8]++;for(;t<=255;)Bt[2*t+1]=9,t++,i[9]++;for(;t<=279;)Bt[2*t+1]=7,t++,i[7]++;for(;t<=287;)Bt[2*t+1]=8,t++,i[8]++;for(Kt(Bt,xt+1,i),t=0;t<Ct;t++)Mt[2*t+1]=5,Mt[2*t]=Qt(t,5);Ut=new qt(Bt,Lt,wt+1,xt,St),Wt=new qt(Mt,Nt,0,Ct,St),Ht=new qt(new Array(0),Ot,0,At,Pt)}(),se=!0),t.l_desc=new Gt(t.dyn_ltree,Ut),t.d_desc=new Gt(t.dyn_dtree,Wt),t.bl_desc=new Gt(t.bl_tree,Ht),t.bi_buf=0,t.bi_valid=0,$t(t)},_tr_stored_block:le,_tr_flush_block:function(t,e,n,i){var o,r,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){for(var e=4093624447,n=0;n<=31;n++,e>>>=1)if(1&e&&0!==t.dyn_ltree[2*n])return gt;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return mt;for(n=32;n<wt;n++)if(0!==t.dyn_ltree[2*n])return mt;return gt}(t)),oe(t,t.l_desc),oe(t,t.d_desc),a=function(t){var e;for(re(t,t.dyn_ltree,t.l_desc.max_code),re(t,t.dyn_dtree,t.d_desc.max_code),oe(t,t.bl_desc),e=At-1;3<=e&&0===t.bl_tree[2*Tt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),o=t.opt_len+3+7>>>3,(r=t.static_len+3+7>>>3)<=o&&(o=r)):o=r=n+5,n+4<=o&&-1!==e?le(t,e,n,i):4===t.strategy||r===o?(Jt(t,2+(i?1:0),3),ie(t,Bt,Mt)):(Jt(t,4+(i?1:0),3),function(t,e,n,i){var o;for(Jt(t,e-257,5),Jt(t,n-1,5),Jt(t,i-4,4),o=0;o<i;o++)Jt(t,t.bl_tree[2*Tt[o]+1],3);ae(t,t.dyn_ltree,e-1),ae(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),ie(t,t.dyn_ltree,t.dyn_dtree)),$t(t),i&&te(t)},_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(jt[n]+wt+1)]++,t.dyn_dtree[2*Yt(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){Jt(t,2,3),Xt(t,kt,Bt),16===(t=t).bi_valid?(Zt(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}};var ue=function(t,e,n,i){for(var o=65535&t|0,r=t>>>16&65535|0,a=0;0!==n;){for(a=2e3<n?2e3:n,n-=a;r=r+(o=o+e[i++]|0)|0,--a;);o%=65521,r%=65521}return o|r<<16|0};var de=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();var he,pe=function(t,e,n,i){var o=de,r=i+n;t^=-1;for(var a=i;a<r;a++)t=t>>>8^o[255&(t^e[a])];return-1^t},fe={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ge=0,me=4,ve=0,be=-2,ye=-1,we=4,xe=2,Ce=8,Ae=9,De=286,Se=30,_e=19,Pe=2*De+1,ke=15,Fe=3,Ie=258,Ee=Ie+Fe+1,Le=42,Ne=113,Oe=1,Te=2,Be=3,Me=4;function ze(t,e){return t.msg=fe[e],e}function je(t){return(t<<1)-(4<t?9:0)}function Re(t){for(var e=t.length;0<=--e;)t[e]=0}function Ue(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(ft.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function We(t,e){ce._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Ue(t.strm)}function He(t,e){t.pending_buf[t.pending++]=e}function Ve(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function qe(t,e){var n,i,o=t.max_chain_length,r=t.strstart,a=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-Ee?t.strstart-(t.w_size-Ee):0,c=t.window,u=t.w_mask,d=t.prev,h=t.strstart+Ie,p=c[r+a-1],f=c[r+a];t.prev_length>=t.good_match&&(o>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(n=e)+a]===f&&c[n+a-1]===p&&c[n]===c[r]&&c[++n]===c[r+1]){for(r+=2,n++;c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&r<h;);if(i=Ie-(h-r),r=h-Ie,a<i){if(t.match_start=e,s<=(a=i))break;p=c[r+a-1],f=c[r+a]}}}while((e=d[e&u])>l&&0!=--o);return a<=t.lookahead?a:t.lookahead}function Ge(t){var e,n,i,o,r,a,s,l,c,u=t.w_size;do{if(c=t.window_size-t.lookahead-t.strstart,t.strstart>=u+(u-Ee)){for(ft.arraySet(t.window,t.window,u,u,0),t.match_start-=u,t.strstart-=u,t.block_start-=u,n=t.hash_size,e=n;i=t.head[--e],t.head[e]=u<=i?i-u:0,--n;);for(n=u,e=n;i=t.prev[--e],t.prev[e]=u<=i?i-u:0,--n;);c+=u}if(0===t.strm.avail_in)break;if(r=t.strm,a=t.window,s=t.strstart+t.lookahead,l=c,c=void 0,c=r.avail_in,l<c&&(c=l),n=0===c?0:(r.avail_in-=c,ft.arraySet(a,r.input,r.next_in,c,s),1===r.state.wrap?r.adler=ue(r.adler,a,c,s):2===r.state.wrap&&(r.adler=pe(r.adler,a,c,s)),r.next_in+=c,r.total_in+=c,c),t.lookahead+=n,t.lookahead+t.insert>=Fe)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+Fe-1])&t.hash_mask,t.prev[o&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=o,o++,t.insert--,!(t.lookahead+t.insert<Fe)););}while(t.lookahead<Ee&&0!==t.strm.avail_in)}function Ye(t,e){for(var n,i;;){if(t.lookahead<Ee){if(Ge(t),t.lookahead<Ee&&e===ge)return Oe;if(0===t.lookahead)break}if(n=0,t.lookahead>=Fe&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Fe-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-Ee&&(t.match_length=qe(t,n)),t.match_length>=Fe)if(i=ce._tr_tally(t,t.strstart-t.match_start,t.match_length-Fe),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=Fe){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Fe-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=ce._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(We(t,!1),0===t.strm.avail_out))return Oe}return t.insert=t.strstart<Fe-1?t.strstart:Fe-1,e===me?(We(t,!0),0===t.strm.avail_out?Be:Me):t.last_lit&&(We(t,!1),0===t.strm.avail_out)?Oe:Te}function Ze(t,e){for(var n,i,o;;){if(t.lookahead<Ee){if(Ge(t),t.lookahead<Ee&&e===ge)return Oe;if(0===t.lookahead)break}if(n=0,t.lookahead>=Fe&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Fe-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=Fe-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-Ee&&(t.match_length=qe(t,n),t.match_length<=5&&(1===t.strategy||t.match_length===Fe&&4096<t.strstart-t.match_start)&&(t.match_length=Fe-1)),t.prev_length>=Fe&&t.match_length<=t.prev_length){for(o=t.strstart+t.lookahead-Fe,i=ce._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-Fe),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=o&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+Fe-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=Fe-1,t.strstart++,i&&(We(t,!1),0===t.strm.avail_out))return Oe}else if(t.match_available){if((i=ce._tr_tally(t,0,t.window[t.strstart-1]))&&We(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return Oe}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=ce._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<Fe-1?t.strstart:Fe-1,e===me?(We(t,!0),0===t.strm.avail_out?Be:Me):t.last_lit&&(We(t,!1),0===t.strm.avail_out)?Oe:Te}function Je(t,e,n,i,o){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=i,this.func=o}function Xe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ce,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ft.Buf16(2*Pe),this.dyn_dtree=new ft.Buf16(2*(2*Se+1)),this.bl_tree=new ft.Buf16(2*(2*_e+1)),Re(this.dyn_ltree),Re(this.dyn_dtree),Re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ft.Buf16(ke+1),this.heap=new ft.Buf16(2*De+1),Re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ft.Buf16(2*De+1),Re(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Qe(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=xe,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?Le:Ne,t.adler=2===e.wrap?0:1,e.last_flush=ge,ce._tr_init(e),ve):ze(t,be)}function Ke(t){var e=Qe(t);return e===ve&&((t=t.state).window_size=2*t.w_size,Re(t.head),t.max_lazy_match=he[t.level].max_lazy,t.good_match=he[t.level].good_length,t.nice_match=he[t.level].nice_length,t.max_chain_length=he[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Fe-1,t.match_available=0,t.ins_h=0),e}function $e(t,e,n,i,o,r){if(!t)return be;var a=1;if(e===ye&&(e=6),i<0?(a=0,i=-i):15<i&&(a=2,i-=16),o<1||Ae<o||n!==Ce||i<8||15<i||e<0||9<e||r<0||we<r)return ze(t,be);8===i&&(i=9);var s=new Xe;return(t.state=s).strm=t,s.wrap=a,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Fe-1)/Fe),s.window=new ft.Buf8(2*s.w_size),s.head=new ft.Buf16(s.hash_size),s.prev=new ft.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new ft.Buf8(s.pending_buf_size),s.d_buf=+s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=r,s.method=n,Ke(t)}he=[new Je(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ge(t),0===t.lookahead&&e===ge)return Oe;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,We(t,!1),0===t.strm.avail_out))return Oe;if(t.strstart-t.block_start>=t.w_size-Ee&&(We(t,!1),0===t.strm.avail_out))return Oe}return t.insert=0,e===me?(We(t,!0),0===t.strm.avail_out?Be:Me):(t.strstart>t.block_start&&(We(t,!1),t.strm.avail_out),Oe)}),new Je(4,4,8,4,Ye),new Je(4,5,16,8,Ye),new Je(4,6,32,32,Ye),new Je(4,4,16,16,Ze),new Je(8,16,32,32,Ze),new Je(8,16,128,128,Ze),new Je(8,32,128,256,Ze),new Je(32,128,258,1024,Ze),new Je(32,258,258,4096,Ze)];var tn={deflateInit:function(t,e){return $e(t,e,Ce,15,8,0)},deflateInit2:$e,deflateReset:Ke,deflateResetKeep:Qe,deflateSetHeader:function(t,e){return!t||!t.state||2!==t.state.wrap?be:(t.state.gzhead=e,ve)},deflate:function(t,e){var n,i,o,r;if(!t||!t.state||5<e||e<0)return t?ze(t,be):be;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&e!==me)return ze(t,0===t.avail_out?-5:be);if(n.strm=t,a=n.last_flush,n.last_flush=e,n.status===Le&&(2===n.wrap?(t.adler=0,He(n,31),He(n,139),He(n,8),n.gzhead?(He(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),He(n,255&n.gzhead.time),He(n,n.gzhead.time>>8&255),He(n,n.gzhead.time>>16&255),He(n,n.gzhead.time>>24&255),He(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),He(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(He(n,255&n.gzhead.extra.length),He(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=pe(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(He(n,0),He(n,0),He(n,0),He(n,0),He(n,0),He(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),He(n,3),n.status=Ne)):(r=Ce+(n.w_bits-8<<4)<<8,r|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),r+=31-r%31,n.status=Ne,Ve(n,r),0!==n.strstart&&(Ve(n,t.adler>>>16),Ve(n,65535&t.adler)),t.adler=1)),69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(t.adler=pe(t.adler,n.pending_buf,n.pending-i,i)),Ue(t),i=n.pending,n.pending!==n.pending_buf_size));)He(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(t.adler=pe(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(t.adler=pe(t.adler,n.pending_buf,n.pending-i,i)),Ue(t),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}}while(o=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,He(n,o),0!==o);n.gzhead.hcrc&&n.pending>i&&(t.adler=pe(t.adler,n.pending_buf,n.pending-i,i)),0===o&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(t.adler=pe(t.adler,n.pending_buf,n.pending-i,i)),Ue(t),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}}while(o=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,He(n,o),0!==o);n.gzhead.hcrc&&n.pending>i&&(t.adler=pe(t.adler,n.pending_buf,n.pending-i,i)),0===o&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Ue(t),n.pending+2<=n.pending_buf_size&&(He(n,255&t.adler),He(n,t.adler>>8&255),t.adler=0,n.status=Ne)):n.status=Ne),0!==n.pending){if(Ue(t),0===t.avail_out)return n.last_flush=-1,ve}else if(0===t.avail_in&&je(e)<=je(a)&&e!==me)return ze(t,-5);if(666===n.status&&0!==t.avail_in)return ze(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==ge&&666!==n.status){var a=2===n.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(Ge(t),0===t.lookahead)){if(e===ge)return Oe;break}if(t.match_length=0,n=ce._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(We(t,!1),0===t.strm.avail_out))return Oe}return t.insert=0,e===me?(We(t,!0),0===t.strm.avail_out?Be:Me):t.last_lit&&(We(t,!1),0===t.strm.avail_out)?Oe:Te}(n,e):3===n.strategy?function(t,e){for(var n,i,o,r,a=t.window;;){if(t.lookahead<=Ie){if(Ge(t),t.lookahead<=Ie&&e===ge)return Oe;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=Fe&&0<t.strstart&&(i=a[o=t.strstart-1])===a[++o]&&i===a[++o]&&i===a[++o]){for(r=t.strstart+Ie;i===a[++o]&&i===a[++o]&&i===a[++o]&&i===a[++o]&&i===a[++o]&&i===a[++o]&&i===a[++o]&&i===a[++o]&&o<r;);t.match_length=Ie-(r-o),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=Fe?(n=ce._tr_tally(t,1,t.match_length-Fe),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=ce._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(We(t,!1),0===t.strm.avail_out))return Oe}return t.insert=0,e===me?(We(t,!0),0===t.strm.avail_out?Be:Me):t.last_lit&&(We(t,!1),0===t.strm.avail_out)?Oe:Te}(n,e):he[n.level].func(n,e);if(a!==Be&&a!==Me||(n.status=666),a===Oe||a===Be)return 0===t.avail_out&&(n.last_flush=-1),ve;if(a===Te&&(1===e?ce._tr_align(n):5!==e&&(ce._tr_stored_block(n,0,0,!1),3===e&&(Re(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Ue(t),0===t.avail_out))return n.last_flush=-1,ve}return e!==me?ve:n.wrap<=0?1:(2===n.wrap?(He(n,255&t.adler),He(n,t.adler>>8&255),He(n,t.adler>>16&255),He(n,t.adler>>24&255),He(n,255&t.total_in),He(n,t.total_in>>8&255),He(n,t.total_in>>16&255),He(n,t.total_in>>24&255)):(Ve(n,t.adler>>>16),Ve(n,65535&t.adler)),Ue(t),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?ve:1)},deflateEnd:function(t){var e;return t&&t.state?(e=t.state.status)!==Le&&69!==e&&73!==e&&91!==e&&103!==e&&e!==Ne&&666!==e?ze(t,be):(t.state=null,e===Ne?ze(t,-3):ve):be},deflateSetDictionary:function(t,e){var n,i,o,r,a,s,l,c=e.length;if(!t||!t.state)return be;if(2===(r=(n=t.state).wrap)||1===r&&n.status!==Le||n.lookahead)return be;for(1===r&&(t.adler=ue(t.adler,e,c,0)),n.wrap=0,c>=n.w_size&&(0===r&&(Re(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new ft.Buf8(n.w_size),ft.arraySet(l,e,c-n.w_size,n.w_size,0),e=l,c=n.w_size),a=t.avail_in,s=t.next_in,l=t.input,t.avail_in=c,t.next_in=0,t.input=e,Ge(n);n.lookahead>=Fe;){for(i=n.strstart,o=n.lookahead-(Fe-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+Fe-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++,--o;);n.strstart=i,n.lookahead=Fe-1,Ge(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=Fe-1,n.match_available=0,t.next_in=s,t.input=l,t.avail_in=a,n.wrap=r,ve},deflateInfo:"pako deflate (from Nodeca project)"},en=!0,nn=!0;try{String.fromCharCode.apply(null,[0])}catch(t){en=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){nn=!1}for(var on=new ft.Buf8(256),mn=0;mn<256;mn++)on[mn]=252<=mn?6:248<=mn?5:240<=mn?4:224<=mn?3:192<=mn?2:1;on[254]=on[254]=1;function vn(t,e){if(e<65534&&(t.subarray&&nn||!t.subarray&&en))return String.fromCharCode.apply(null,ft.shrinkBuf(t,e));for(var n="",i=0;i<e;i++)n+=String.fromCharCode(t[i]);return n}var bn={string2buf:function(t){for(var e,n,i,o,r=t.length,a=0,s=0;s<r;s++)55296==(64512&(n=t.charCodeAt(s)))&&s+1<r&&56320==(64512&(i=t.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new ft.Buf8(a),s=o=0;o<a;s++)55296==(64512&(n=t.charCodeAt(s)))&&s+1<r&&56320==(64512&(i=t.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),n<128?e[o++]=n:(n<2048?e[o++]=192|n>>>6:(n<65536?e[o++]=224|n>>>12:(e[o++]=240|n>>>18,e[o++]=128|n>>>12&63),e[o++]=128|n>>>6&63),e[o++]=128|63&n);return e},buf2binstring:function(t){return vn(t,t.length)},binstring2buf:function(t){for(var e=new ft.Buf8(t.length),n=0,i=e.length;n<i;n++)e[n]=t.charCodeAt(n);return e},buf2string:function(t,e){for(var n,i,o=e||t.length,r=new Array(2*o),a=0,s=0;s<o;)if((n=t[s++])<128)r[a++]=n;else if(4<(i=on[n]))r[a++]=65533,s+=i-1;else{for(n&=2===i?31:3===i?15:7;1<i&&s<o;)n=n<<6|63&t[s++],i--;1<i?r[a++]=65533:n<65536?r[a++]=n:(n-=65536,r[a++]=55296|n>>10&1023,r[a++]=56320|1023&n)}return vn(r,a)},utf8border:function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return!(n<0)&&0!==n&&n+on[t[n]]>e?n:e}};var yn=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},wn=Object.prototype.toString,xn=0,Cn=-1,An=0,Dn=8;function Sn(t){if(!(this instanceof Sn))return new Sn(t);this.options=ft.assign({level:Cn,method:Dn,chunkSize:16384,windowBits:15,memLevel:8,strategy:An,to:""},t||{});var e=this.options;if(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new yn,this.strm.avail_out=0,(t=tn.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy))!==xn)throw new Error(fe[t]);if(e.header&&tn.deflateSetHeader(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?bn.string2buf(e.dictionary):"[object ArrayBuffer]"===wn.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=tn.deflateSetDictionary(this.strm,e))!==xn)throw new Error(fe[t]);this._dict_set=!0}}function _n(t,e){e=new Sn(e);if(e.push(t,!0),e.err)throw e.msg||fe[e.err];return e.result}Sn.prototype.push=function(t,e){var n,i,o=this.strm,r=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=bn.string2buf(t):"[object ArrayBuffer]"===wn.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new ft.Buf8(r),o.next_out=0,o.avail_out=r),1!==(n=tn.deflate(o,i))&&n!==xn)return this.onEnd(n),!(this.ended=!0)}while(0!==o.avail_out&&(0!==o.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(bn.buf2binstring(ft.shrinkBuf(o.output,o.next_out))):this.onData(ft.shrinkBuf(o.output,o.next_out))),(0<o.avail_in||0===o.avail_out)&&1!==n);return 4===i?(n=tn.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===xn):2!==i||(this.onEnd(xn),!(o.avail_out=0))},Sn.prototype.onData=function(t){this.chunks.push(t)},Sn.prototype.onEnd=function(t){t===xn&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=ft.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var C={Deflate:Sn,deflate:_n,deflateRaw:function(t,e){return(e=e||{}).raw=!0,_n(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,_n(t,e)}},Pn=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],kn=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Fn=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],In=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],En=function(t,e,n,i,o,r,a,s){for(var l,c,u,d,h,p,f,g,m,v=s.bits,b=0,y=0,w=0,x=0,C=0,A=0,D=0,S=0,_=0,P=0,k=null,F=0,I=new ft.Buf16(16),E=new ft.Buf16(16),L=null,N=0,b=0;b<=15;b++)I[b]=0;for(y=0;y<i;y++)I[e[n+y]]++;for(C=v,x=15;1<=x&&0===I[x];x--);if(x<C&&(C=x),0===x)return o[r++]=20971520,o[r++]=20971520,s.bits=1,0;for(w=1;w<x&&0===I[w];w++);for(C<w&&(C=w),b=S=1;b<=15;b++)if(S<<=1,(S-=I[b])<0)return-1;if(0<S&&(0===t||1!==x))return-1;for(E[1]=0,b=1;b<15;b++)E[b+1]=E[b]+I[b];for(y=0;y<i;y++)0!==e[n+y]&&(a[E[e[n+y]]++]=y);if(p=0===t?(k=L=a,19):1===t?(k=Pn,F-=257,L=kn,N-=257,256):(k=Fn,L=In,-1),b=w,h=r,D=y=P=0,u=-1,d=(_=1<<(A=C))-1,1===t&&852<_||2===t&&592<_)return 1;for(;;){for(f=b-D,m=a[y]<p?(g=0,a[y]):a[y]>p?(g=L[N+a[y]],k[F+a[y]]):(g=96,0),l=1<<b-D,c=1<<A,w=c;o[h+(P>>D)+(c-=l)]=f<<24|g<<16|m|0,0!==c;);for(l=1<<b-1;P&l;)l>>=1;if(0!==l?(P&=l-1,P+=l):P=0,y++,0==--I[b]){if(b===x)break;b=e[n+a[y]]}if(C<b&&(P&d)!==u){for(0===D&&(D=C),h+=w,S=1<<(A=b-D);A+D<x&&!((S-=I[A+D])<=0);)A++,S<<=1;if(_+=1<<A,1===t&&852<_||2===t&&592<_)return 1;o[u=P&d]=C<<24|A<<16|h-r|0}}return 0!==P&&(o[h+P]=b-D<<24|64<<16|0),s.bits=C,0},Ln=1,Nn=2,On=0,Tn=-2,Bn=1,Mn=852,zn=592;function jn(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Rn(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ft.Buf16(320),this.work=new ft.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Un(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Bn,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new ft.Buf32(Mn),e.distcode=e.distdyn=new ft.Buf32(zn),e.sane=1,e.back=-1,On):Tn}function Wn(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,Un(t)):Tn}function Hn(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?Tn:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,Wn(t))):Tn}function Vn(t,e){var n;return t?(n=new Rn,(t.state=n).window=null,(e=Hn(t,e))!==On&&(t.state=null),e):Tn}var qn,Gn,Yn=!0;function Zn(t,e,n,i){var o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new ft.Buf8(o.wsize)),i>=o.wsize?(ft.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(t=o.wsize-o.wnext)&&(t=i),ft.arraySet(o.window,e,n-i,t,o.wnext),(i-=t)?(ft.arraySet(o.window,e,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=t,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=t))),0}var Jn={inflateReset:Wn,inflateReset2:Hn,inflateResetKeep:Un,inflateInit:function(t){return Vn(t,15)},inflateInit2:Vn,inflate:function(t,e){var n,i,o,r,a,s,l,c,u,d,_,h,p,f,g,m,v,b,y,w,x,C,A,D,S=0,P=new ft.Buf8(4),k=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return Tn;12===(n=t.state).mode&&(n.mode=13),a=t.next_out,o=t.output,l=t.avail_out,r=t.next_in,i=t.input,s=t.avail_in,c=n.hold,u=n.bits,d=s,_=l,C=On;t:for(;;)switch(n.mode){case Bn:if(0===n.wrap){n.mode=13;break}for(;u<16;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(2&n.wrap&&35615===c){P[n.check=0]=255&c,P[1]=c>>>8&255,n.check=pe(n.check,P,2,0),u=c=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){t.msg="unknown compression method",n.mode=30;break}if(u-=4,x=8+(15&(c>>>=4)),0===n.wbits)n.wbits=x;else if(x>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<<x,t.adler=n.check=1,n.mode=512&c?10:12,u=c=0;break;case 2:for(;u<16;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(n.flags=c,8!=(255&n.flags)){t.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&(P[0]=255&c,P[1]=c>>>8&255,n.check=pe(n.check,P,2,0)),u=c=0,n.mode=3;case 3:for(;u<32;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}n.head&&(n.head.time=c),512&n.flags&&(P[0]=255&c,P[1]=c>>>8&255,P[2]=c>>>16&255,P[3]=c>>>24&255,n.check=pe(n.check,P,4,0)),u=c=0,n.mode=4;case 4:for(;u<16;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&(P[0]=255&c,P[1]=c>>>8&255,n.check=pe(n.check,P,2,0)),u=c=0,n.mode=5;case 5:if(1024&n.flags){for(;u<16;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&(P[0]=255&c,P[1]=c>>>8&255,n.check=pe(n.check,P,2,0)),u=c=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(s<(h=n.length)&&(h=s),h&&(n.head&&(x=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),ft.arraySet(n.head.extra,i,r,h,x)),512&n.flags&&(n.check=pe(n.check,i,h,r)),s-=h,r+=h,n.length-=h),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break t;for(h=0;x=i[r+h++],n.head&&x&&n.length<65536&&(n.head.name+=String.fromCharCode(x)),x&&h<s;);if(512&n.flags&&(n.check=pe(n.check,i,h,r)),s-=h,r+=h,x)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break t;for(h=0;x=i[r+h++],n.head&&x&&n.length<65536&&(n.head.comment+=String.fromCharCode(x)),x&&h<s;);if(512&n.flags&&(n.check=pe(n.check,i,h,r)),s-=h,r+=h,x)break t}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;u<16;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(c!==(65535&n.check)){t.msg="header crc mismatch",n.mode=30;break}u=c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;u<32;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}t.adler=n.check=jn(c),u=c=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=a,t.avail_out=l,t.next_in=r,t.avail_in=s,n.hold=c,n.bits=u,2;t.adler=n.check=1,n.mode=12;case 12:if(5===e||6===e)break t;case 13:if(n.last){c>>>=7&u,u-=7&u,n.mode=27;break}for(;u<3;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}switch(n.last=1&c,--u,3&(c>>>=1)){case 0:n.mode=14;break;case 1:if(!function(t){if(Yn){var e;for(qn=new ft.Buf32(512),Gn=new ft.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(En(Ln,t.lens,0,288,qn,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;En(Nn,t.lens,0,32,Gn,0,t.work,{bits:5}),Yn=!1}t.lencode=qn,t.lenbits=9,t.distcode=Gn,t.distbits=5}(n),n.mode=20,6!==e)break;c>>>=2,u-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}c>>>=2,u-=2;break;case 14:for(c>>>=7&u,u-=7&u;u<32;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,u=c=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(h=n.length){if(s<h&&(h=s),l<h&&(h=l),0===h)break t;ft.arraySet(o,i,r,h,a),s-=h,r+=h,l-=h,a+=h,n.length-=h;break}n.mode=12;break;case 17:for(;u<14;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(n.nlen=257+(31&c),c>>>=5,u-=5,n.ndist=1+(31&c),c>>>=5,u-=5,n.ncode=4+(15&c),c>>>=4,u-=4,286<n.nlen||30<n.ndist){t.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;u<3;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}n.lens[k[n.have++]]=7&c,c>>>=3,u-=3}for(;n.have<19;)n.lens[k[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},C=En(0,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,C){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;m=(S=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,v=65535&S,!((g=S>>>24)<=u);){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(v<16)c>>>=g,u-=g,n.lens[n.have++]=v;else{if(16===v){for(D=g+2;u<D;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(c>>>=g,u-=g,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}x=n.lens[n.have-1],h=3+(3&c),c>>>=2,u-=2}else if(17===v){for(D=g+3;u<D;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}u-=g,x=0,h=3+(7&(c>>>=g)),c>>>=3,u-=3}else{for(D=g+7;u<D;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}u-=g,x=0,h=11+(127&(c>>>=g)),c>>>=7,u-=7}if(n.have+h>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;h--;)n.lens[n.have++]=x}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,A={bits:n.lenbits},C=En(Ln,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,C){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},C=En(Nn,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,C){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=s&&258<=l){t.next_out=a,t.avail_out=l,t.next_in=r,t.avail_in=s,n.hold=c,n.bits=u,function(t){var e,n,i,o,r,a,s=t.state,l=t.next_in,c=t.input,u=l+(t.avail_in-5),d=t.next_out,h=t.output,p=d-(_-t.avail_out),f=d+(t.avail_out-257),g=s.dmax,m=s.wsize,v=s.whave,b=s.wnext,y=s.window,w=s.hold,x=s.bits,C=s.lencode,A=s.distcode,D=(1<<s.lenbits)-1,S=(1<<s.distbits)-1;e:do{x<15&&(w+=c[l++]<<x,x+=8,w+=c[l++]<<x,x+=8),e=C[w&D];n:for(;;){if(w>>>=n=e>>>24,x-=n,0===(n=e>>>16&255))h[d++]=65535&e;else{if(!(16&n)){if(0==(64&n)){e=C[(65535&e)+(w&(1<<n)-1)];continue n}if(32&n){s.mode=12;break e}t.msg="invalid literal/length code",s.mode=30;break e}i=65535&e,(n&=15)&&(x<n&&(w+=c[l++]<<x,x+=8),i+=w&(1<<n)-1,w>>>=n,x-=n),x<15&&(w+=c[l++]<<x,x+=8,w+=c[l++]<<x,x+=8),e=A[w&S];i:for(;;){if(w>>>=n=e>>>24,x-=n,!(16&(n=e>>>16&255))){if(0==(64&n)){e=A[(65535&e)+(w&(1<<n)-1)];continue i}t.msg="invalid distance code",s.mode=30;break e}if(o=65535&e,x<(n&=15)&&(w+=c[l++]<<x,(x+=8)<n&&(w+=c[l++]<<x,x+=8)),g<(o+=w&(1<<n)-1)){t.msg="invalid distance too far back",s.mode=30;break e}if(w>>>=n,x-=n,(n=d-p)<o){if(n=o-n,v<n&&s.sane){t.msg="invalid distance too far back",s.mode=30;break e}if(a=y,(r=0)===b){if(r+=m-n,n<i){for(i-=n;h[d++]=y[r++],--n;);r=d-o,a=h}}else if(b<n){if(r+=m+b-n,(n-=b)<i){for(i-=n;h[d++]=y[r++],--n;);if(r=0,b<i){for(n=b,i-=n;h[d++]=y[r++],--n;);r=d-o,a=h}}}else if(r+=b-n,n<i){for(i-=n;h[d++]=y[r++],--n;);r=d-o,a=h}for(;2<i;)h[d++]=a[r++],h[d++]=a[r++],h[d++]=a[r++],i-=3;i&&(h[d++]=a[r++],1<i&&(h[d++]=a[r++]))}else{for(r=d-o;h[d++]=h[r++],h[d++]=h[r++],h[d++]=h[r++],i-=3,2<i;);i&&(h[d++]=h[r++],1<i&&(h[d++]=h[r++]))}break}}break}}while(l<u&&d<f);l-=i=x>>3,w&=(1<<(x-=i<<3))-1,t.next_in=l,t.next_out=d,t.avail_in=l<u?u-l+5:5-(l-u),t.avail_out=d<f?f-d+257:257-(d-f),s.hold=w,s.bits=x}(t),a=t.next_out,o=t.output,l=t.avail_out,r=t.next_in,i=t.input,s=t.avail_in,c=n.hold,u=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;m=(S=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,v=65535&S,!((g=S>>>24)<=u);){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(m&&0==(240&m)){for(b=g,y=m,w=v;m=(S=n.lencode[w+((c&(1<<b+y)-1)>>b)])>>>16&255,v=65535&S,!(b+(g=S>>>24)<=u);){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}c>>>=b,u-=b,n.back+=b}if(c>>>=g,u-=g,n.back+=g,n.length=v,0===m){n.mode=26;break}if(32&m){n.back=-1,n.mode=12;break}if(64&m){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&m,n.mode=22;case 22:if(n.extra){for(D=n.extra;u<D;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;m=(S=n.distcode[c&(1<<n.distbits)-1])>>>16&255,v=65535&S,!((g=S>>>24)<=u);){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(0==(240&m)){for(b=g,y=m,w=v;m=(S=n.distcode[w+((c&(1<<b+y)-1)>>b)])>>>16&255,v=65535&S,!(b+(g=S>>>24)<=u);){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}c>>>=b,u-=b,n.back+=b}if(c>>>=g,u-=g,n.back+=g,64&m){t.msg="invalid distance code",n.mode=30;break}n.offset=v,n.extra=15&m,n.mode=24;case 24:if(n.extra){for(D=n.extra;u<D;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===l)break t;if(h=_-l,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}p=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),f=n.window}else f=o,p=a-n.offset,h=n.length;for(l<h&&(h=l),l-=h,n.length-=h;o[a++]=f[p++],--h;);0===n.length&&(n.mode=21);break;case 26:if(0===l)break t;o[a++]=n.length,l--,n.mode=21;break;case 27:if(n.wrap){for(;u<32;){if(0===s)break t;s--,c|=i[r++]<<u,u+=8}if(_-=l,t.total_out+=_,n.total+=_,_&&(t.adler=n.check=(n.flags?pe:ue)(n.check,o,_,a-_)),_=l,(n.flags?c:jn(c))!==n.check){t.msg="incorrect data check",n.mode=30;break}u=c=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;u<32;){if(0===s)break t;s--,c+=i[r++]<<u,u+=8}if(c!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=30;break}u=c=0}n.mode=29;case 29:C=1;break t;case 30:C=-3;break t;case 31:return-4;case 32:default:return Tn}return t.next_out=a,t.avail_out=l,t.next_in=r,t.avail_in=s,n.hold=c,n.bits=u,(n.wsize||_!==t.avail_out&&n.mode<30&&(n.mode<27||4!==e))&&Zn(t,t.output,t.next_out,_-t.avail_out),d-=t.avail_in,_-=t.avail_out,t.total_in+=d,t.total_out+=_,n.total+=_,n.wrap&&_&&(t.adler=n.check=(n.flags?pe:ue)(n.check,o,_,t.next_out-_)),t.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==d&&0===_||4===e)&&C===On&&(C=-5),C},inflateEnd:function(t){if(!t||!t.state)return Tn;var e=t.state;return e.window&&(e.window=null),t.state=null,On},inflateGetHeader:function(t,e){return!t||!t.state||0==(2&(t=t.state).wrap)?Tn:((t.head=e).done=!1,On)},inflateSetDictionary:function(t,e){var n,i=e.length;return!t||!t.state||0!==(n=t.state).wrap&&11!==n.mode?Tn:11===n.mode&&ue(1,e,i,0)!==n.check?-3:Zn(t,e,i,i)?(n.mode=31,-4):(n.havedict=1,On)},inflateInfo:"pako inflate (from Nodeca project)"},Xn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};var Qn=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},Kn=Object.prototype.toString;function $n(t){if(!(this instanceof $n))return new $n(t);this.options=ft.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new yn,this.strm.avail_out=0;t=Jn.inflateInit2(this.strm,e.windowBits);if(t!==Xn.Z_OK)throw new Error(fe[t]);if(this.header=new Qn,Jn.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=bn.string2buf(e.dictionary):"[object ArrayBuffer]"===Kn.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=Jn.inflateSetDictionary(this.strm,e.dictionary))!==Xn.Z_OK))throw new Error(fe[t])}function ti(t,e){e=new $n(e);if(e.push(t,!0),e.err)throw e.msg||fe[e.err];return e.result}$n.prototype.push=function(t,e){var n,i,o,r,a,s=this.strm,l=this.options.chunkSize,c=this.options.dictionary,u=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?Xn.Z_FINISH:Xn.Z_NO_FLUSH,"string"==typeof t?s.input=bn.binstring2buf(t):"[object ArrayBuffer]"===Kn.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new ft.Buf8(l),s.next_out=0,s.avail_out=l),(n=Jn.inflate(s,Xn.Z_NO_FLUSH))===Xn.Z_NEED_DICT&&c&&(n=Jn.inflateSetDictionary(this.strm,c)),n===Xn.Z_BUF_ERROR&&!0===u&&(n=Xn.Z_OK,u=!1),n!==Xn.Z_STREAM_END&&n!==Xn.Z_OK)return this.onEnd(n),!(this.ended=!0)}while(s.next_out&&(0!==s.avail_out&&n!==Xn.Z_STREAM_END&&(0!==s.avail_in||i!==Xn.Z_FINISH&&i!==Xn.Z_SYNC_FLUSH)||("string"===this.options.to?(o=bn.utf8border(s.output,s.next_out),r=s.next_out-o,a=bn.buf2string(s.output,o),s.next_out=r,s.avail_out=l-r,r&&ft.arraySet(s.output,s.output,o,r,0),this.onData(a)):this.onData(ft.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(u=!0),(0<s.avail_in||0===s.avail_out)&&n!==Xn.Z_STREAM_END);return n===Xn.Z_STREAM_END&&(i=Xn.Z_FINISH),i===Xn.Z_FINISH?(n=Jn.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Xn.Z_OK):i!==Xn.Z_SYNC_FLUSH||(this.onEnd(Xn.Z_OK),!(s.avail_out=0))},$n.prototype.onData=function(t){this.chunks.push(t)},$n.prototype.onEnd=function(t){t===Xn.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=ft.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ei={Inflate:$n,inflate:ti,inflateRaw:function(t,e){return(e=e||{}).raw=!0,ti(t,e)},ungzip:ti},E={};(0,ft.assign)(E,C,ei,Xn);var ni,ii,oi,ri,ai,si,li,ci=E;function ui(t){var n,e,i,o,r,a,s,l,c;for(/[^\x00-\xFF]/.test(t),e=[],i=0,o=(t+=n="\0\0\0\0".slice(t.length%4||4)).length;i<o;i+=4)0!==(r=(t.charCodeAt(i)<<24)+(t.charCodeAt(i+1)<<16)+(t.charCodeAt(i+2)<<8)+t.charCodeAt(i+3))?(r=((r=((r=((r=(r-(c=r%85))/85)-(l=r%85))/85)-(s=r%85))/85)-(a=r%85))/85%85,e.push(33+r,33+a,33+s,33+l,33+c)):e.push(122);return function(t){for(var e=n.length;0<e;e--)t.pop()}(e),String.fromCharCode.apply(String,e)+"~>"}function di(t){var n,e,i,o,r,a=String,s="length",l="charCodeAt";for(t.slice(-2),t=t.slice(0,-2).replace(/\s/g,"").replace("z","!!!!!"),i=[],o=0,r=(t+=n="uuuuu".slice(t[s]%5||5))[s];o<r;o+=5)e=52200625*(t[l](o)-33)+614125*(t[l](o+1)-33)+7225*(t[l](o+2)-33)+85*(t[l](o+3)-33)+(t[l](o+4)-33),i.push(255&e>>24,255&e>>16,255&e>>8,255&e);return function(t){for(var e=n[s];0<e;e--)t.pop()}(i),a.fromCharCode.apply(a,i)}function hi(){return(rn.html2canvas?Promise.resolve(rn.html2canvas):"object"==typeof h&&"undefined"!=typeof module?new Promise(function(t,e){try{t(require("html2canvas"))}catch(t){e(t)}}):"function"==typeof define&&define.amd?new Promise(function(t,e){try{require(["html2canvas"],t)}catch(t){e(t)}}):Promise.reject(new Error("Could not load html2canvas"))).catch(function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))}).then(function(t){return t.default||t})}function pi(){return(rn.DOMPurify?Promise.resolve(rn.DOMPurify):"object"==typeof h&&"undefined"!=typeof module?new Promise(function(t,e){try{t(require("dompurify"))}catch(t){e(t)}}):"function"==typeof define&&define.amd?new Promise(function(t,e){try{require(["dompurify"],t)}catch(t){e(t)}}):Promise.reject(new Error("Could not load dompurify"))).catch(function(t){return Promise.reject(new Error("Could not load dompurify: "+t))}).then(function(t){return t.default||t})}function fi(t){var e=typeof t;return"undefined"==e?"undefined":"string"==e||t instanceof String?"string":"number"==e||t instanceof Number?"number":"function"==e||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"==e?"object":"unknown"}function gi(t,e){var n,i=document.createElement(t);for(n in e.className&&(i.className=e.className),e.innerHTML&&e.dompurify&&(i.innerHTML=e.dompurify.sanitize(e.innerHTML)),e.style)i.style[n]=e.style[n];return i}function mi(t){var e=Object.assign(mi.convert(Promise.resolve()),JSON.parse(JSON.stringify(mi.template)));return e=(e=(e=mi.convert(Promise.resolve(),e)).setProgress(1,mi,1,[mi])).set(t)}(ni=gn.API).processDataByFilters=function(t,e){var n=0,i=t||"",o=[];for("string"==typeof(e=e||[])&&(e=[e]),n=0;n<e.length;n+=1)switch(e[n]){case"ASCII85Decode":case"/ASCII85Decode":i=di(i),o.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":i=ui(i),o.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":i=function(t){var e=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var n="",i=0;i<t.length;i+=2)n+=String.fromCharCode("0x"+(t[i]+t[i+1]));return n}(i),o.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":i=i.split("").map(function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)}).join("")+">",o.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":i=function(t){for(var e,n=[],i=t.length;i--;)n[i]=t.charCodeAt(i);return e=ni.adler32cs.from(t),t=ci.deflate(n),(n=new Uint8Array(t.byteLength+4)).set(t,0),n.set(new Uint8Array([255&e,e>>8&255,e>>16&255,e>>24&255]),t.byteLength),t=n.reduce(function(t,e){return t+String.fromCharCode(e)},"")}(i),o.push("/FlateDecode");break;default:throw new Error('The filter: "'+e[n]+'" is not implemented')}return{data:i,reverseChain:o.reverse().join(" ")}},(ei=gn.API).loadFile=function(t,e,n){e=!1!==e,n="function"==typeof n?n:function(){};var i=void 0;try{i=function(t,e,n){function i(t){var e=t.length,n=[],i=String.fromCharCode;for(r=0;r<e;r+=1)n.push(i(255&t.charCodeAt(r)));return n.join("")}var o=new XMLHttpRequest,r=0;if(o.open("GET",t,!e),o.overrideMimeType("text/plain; charset=x-user-defined"),!1===e&&(o.onload=function(){200===o.status?n(i(this.responseText)):n(void 0)}),o.send(null),e&&200===o.status)return i(o.responseText)}(t,e,n)}catch(t){}return i},ei.loadImageFile=ei.loadFile,E=gn.API,ii=function(t,e){for(var n=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==e&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(ii(i,e));return 1===t.nodeType&&("CANVAS"===t.nodeName?(n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(n.value=t.value),n.addEventListener("load",function(){n.scrollTop=t.scrollTop,n.scrollLeft=t.scrollLeft},!0)),n},((mi.prototype=Object.create(Promise.prototype)).constructor=mi).convert=function(t,e){return t.__proto__=e||mi.prototype,t},mi.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},mi.prototype.from=function(e,t){return this.then(function(){switch(t=t||function(t){switch(fi(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.then(pi).then(function(t){return this.set({src:gi("div",{innerHTML:e,dompurify:t})})});case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}})},mi.prototype.to=function(t){switch(t){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},mi.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var t={position:"relative",display:"inline-block",width:Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},e=ii(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=gi("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=gi("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(gi("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},mi.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(hi).then(function(t){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,t(this.prop.container,e)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},mi.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(hi).then(function(t){var e=this.opt.jsPDF,n=Object.assign({async:!0,allowTaint:!0,scale:1,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);return delete n.onrendered,e.context2d.autoPaging=!0,e.context2d.posX=this.opt.x,e.context2d.posY=this.opt.y,n.windowHeight=n.windowHeight||0,n.windowHeight=0==n.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):n.windowHeight,t(this.prop.container,n)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},mi.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t})},mi.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},mi.prototype.output=function(t,e,n){return"img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},mi.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(t,e)})},mi.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(t){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+t+'" is not supported.'}})},mi.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},mi.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},mi.prototype.set=function(e){if("object"!==fi(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in mi.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},mi.prototype.get=function(e,n){return this.then(function(){var t=(e in mi.template.prop?this.prop:this.opt)[e];return n?n(t):t})},mi.prototype.setMargin=function(t){return this.then(function(){switch(fi(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t}).then(this.setPageSize)},mi.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then(function(){(t=t||gn.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:e(t.inner.width,t.k),height:e(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t})},mi.prototype.setProgress=function(t,e,n,i){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=n&&(this.progress.n=n),null!=i&&(this.progress.stack=i),this.progress.ratio=this.progress.val/this.progress.state,this},mi.prototype.updateProgress=function(t,e,n,i){return this.setProgress(t?this.progress.val+t:null,e||null,n?this.progress.n+n:null,i?this.progress.stack.concat(i):null)},mi.prototype.then=function(t,e){var n=this;return this.thenCore(t,e,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(t){return n.updateProgress(1),t})})},mi.prototype.thenCore=function(t,e,n){n=n||Promise.prototype.then;t=t&&t.bind(this),e=e&&e.bind(this);var i=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:mi.convert(Object.assign({},this),Promise.prototype),e=n.call(i,t,e);return mi.convert(e,this.__proto__)},mi.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},mi.prototype.thenList=function(t){var e=this;return t.forEach(function(t){e=e.thenCore(t)}),e},mi.prototype.catch=function(t){t=t&&t.bind(this);t=Promise.prototype.catch.call(this,t);return mi.convert(t,this)},mi.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},mi.prototype.error=function(t){return this.then(function(){throw new Error(t)})},mi.prototype.using=mi.prototype.set,mi.prototype.saveAs=mi.prototype.save,mi.prototype.export=mi.prototype.output,mi.prototype.run=mi.prototype.then,gn.getPageSize=function(t,e,n){"object"==typeof t&&(t=(r=t).orientation,e=r.unit||e,n=r.format||n),e=e||"mm",n=n||"a4",t=(""+(t||"P")).toLowerCase();var i,o=(""+n).toLowerCase(),r={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(e){case"pt":i=1;break;case"mm":i=72/25.4;break;case"cm":i=72/2.54;break;case"in":i=72;break;case"px":i=.75;break;case"pc":case"em":i=12;break;case"ex":i=6;break;default:throw"Invalid unit: "+e}var a,s=0,l=0;if(r.hasOwnProperty(o))s=r[o][1]/i,l=r[o][0]/i;else try{s=n[1],l=n[0]}catch(t){throw new Error("Invalid format: "+n)}if("p"===t||"portrait"===t)t="p",s<l&&(a=l,l=s,s=a);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",l<s&&(a=l,l=s,s=a)}return{width:l,height:s,unit:e,k:i,orientation:t}},E.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this;var n=new mi(e);return e.worker?n:n.from(t).doCallback()},gn.API.addJS=function(t){return ai=t,this.internal.events.subscribe("postPutResources",function(){oi=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(oi+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),ri=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+ai+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==oi&&void 0!==ri&&this.internal.out("/Names <</JavaScript "+oi+" 0 R>>")}),this},(ei=gn.API).events.push(["postPutResources",function(){var t=this,e=/^(\d+) 0 obj$/;if(0<this.outline.root.children.length)for(var n=t.outline.render().split(/\r\n/),i=0;i<n.length;i++){var o=n[i],r=e.exec(o);null!=r&&(r=r[1],t.internal.newObjectDeferredBegin(r,!1)),t.internal.write(o)}if(this.outline.createNamedDestinations){for(var a=this.internal.pages.length,s=[],i=0;i<a;i++){var l=t.internal.newObject();s.push(l);l=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+l.objId+" 0 R /XYZ null null null]>> endobj")}var c=t.internal.newObject();t.internal.write("<< /Names [ ");for(i=0;i<s.length;i++)t.internal.write("(page_"+(i+1)+")"+s[i]+" 0 R");t.internal.write(" ] >>","endobj"),si=t.internal.newObject(),t.internal.write("<< /Dests "+c+" 0 R"),t.internal.write(">>","endobj")}}]),ei.events.push(["putCatalog",function(){0<this.outline.root.children.length&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+si+" 0 R"))}]),ei.events.push(["initialized",function(){var a=this;a.outline={createNamedDestinations:!1,root:{children:[]}},a.outline.add=function(t,e,n){n={title:e,options:n,children:[]};return null==t&&(t=this.root),t.children.push(n),n},a.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=a,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},a.outline.genIds_r=function(t){t.id=a.internal.newObjectDeferred();for(var e=0;e<t.children.length;e++)this.genIds_r(t.children[e])},a.outline.renderRoot=function(t){this.objStart(t),this.line("/Type /Outlines"),0<t.children.length&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},a.outline.renderItems=function(t){for(var e=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n<t.children.length;n++){var i=t.children[n];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(t)),0<n&&this.line("/Prev "+this.makeRef(t.children[n-1])),n<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[n+1])),0<i.children.length&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var o=this.count=this.count_r({count:0},i);0<o&&this.line("/Count "+o),i.options&&i.options.pageNumber&&(i=a.internal.getPageInfo(i.options.pageNumber),this.line("/Dest ["+i.objId+" 0 R /XYZ 0 "+e(0)+" 0]")),this.objEnd()}for(var r=0;r<t.children.length;r++)this.renderItems(t.children[r])},a.outline.line=function(t){this.ctx.val+=t+"\r\n"},a.outline.makeRef=function(t){return t.id+" 0 R"},a.outline.makeString=function(t){return"("+a.internal.pdfEscape(t)+")"},a.outline.objStart=function(t){this.ctx.val+="\r\n"+t.id+" 0 obj\r\n<<\r\n"},a.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},a.outline.count_r=function(t,e){for(var n=0;n<e.children.length;n++)t.count++,this.count_r(t,e.children[n]);return t.count}}]),E=gn.API,li=[192,193,194,195,196,197,198,199],E.processJPEG=function(t,e,n,i,o,r){var a=this.decode.DCT_DECODE,s=null;if("string"==typeof t||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(o=function(t){for(var e,n=256*t.charCodeAt(4)+t.charCodeAt(5),i=t.length,o={width:0,height:0,numcomponents:1},r=4;r<i;r+=2){if(r+=n,-1!==li.indexOf(t.charCodeAt(r+1))){e=256*t.charCodeAt(r+5)+t.charCodeAt(r+6),o={width:256*t.charCodeAt(r+7)+t.charCodeAt(r+8),height:e,numcomponents:t.charCodeAt(r+9)};break}n=256*t.charCodeAt(r+2)+t.charCodeAt(r+3)}return o}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:r=this.color_spaces.DEVICE_GRAY;break;case 4:r=this.color_spaces.DEVICE_CMYK;break;case 3:r=this.color_spaces.DEVICE_RGB}s={data:t,width:o.width,height:o.height,colorSpace:r,bitsPerComponent:8,filter:a,index:e,alias:n}}return s};var vi=(bi.prototype={ensureBuffer:function(t){var e=this.buffer,n=e?e.byteLength:0;if(t<n)return e;for(var i=512;i<t;)i<<=1;for(var o=new Uint8Array(i),r=0;r<n;++r)o[r]=e[r];return this.buffer=o},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var n=e+t;!this.eof&&this.bufferLength<n;)this.readBlock();t=this.bufferLength;t<n&&(n=t)}else{for(;!this.eof;)this.readBlock();n=this.bufferLength}return this.pos=n,this.buffer.subarray(e,n)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,n){for(var i=t+e;this.bufferLength<=i&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,n)},skip:function(t){t=t||1,this.pos+=t},reset:function(){this.pos=0}},bi);function bi(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}var yi,wi,xi,Ci,Ai,Di,Si,_i,Pi,ki,Fi,Ii,Ei,Li,Ni,Oi,Ti,Bi,Mi,zi=("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||"undefined"!=typeof global&&global||Function('return typeof this === "object" && this.content')()||Function("return this")()).FlateStream=function(){if("undefined"!=typeof Uint32Array){var _=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),P=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),k=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),F=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],I=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return(t.prototype=Object.create(vi.prototype)).getBits=function(t){for(var e,n=this.codeSize,i=this.codeBuf,o=this.bytes,r=this.bytesPos;n<t;)void 0===(e=o[r++])&&E("Bad encoding in flate stream"),i|=e<<n,n+=8;return e=i&(1<<t)-1,this.codeBuf=i>>t,this.codeSize=n-=t,this.bytesPos=r,e},t.prototype.getCode=function(t){for(var e,n=t[0],i=t[1],o=this.codeSize,r=this.codeBuf,a=this.bytes,s=this.bytesPos;o<i;)void 0===(e=a[s++])&&E("Bad encoding in flate stream"),r|=e<<o,o+=8;t=n[r&(1<<i)-1],n=t>>16,t&=65535;return(0==o||o<n||0==n)&&E("Bad encoding in flate stream"),this.codeBuf=r>>n,this.codeSize=o-n,this.bytesPos=s,t},t.prototype.generateHuffmanTable=function(t){for(var e=t.length,n=0,i=0;i<e;++i)t[i]>n&&(n=t[i]);for(var o=1<<n,r=new Uint32Array(o),a=1,s=0,l=2;a<=n;++a,s<<=1,l<<=1)for(var c=0;c<e;++c)if(t[c]==a){for(var u=0,d=s,i=0;i<a;++i)u=u<<1|1&d,d>>=1;for(i=u;i<o;i+=l)r[i]=a<<16|c;++s}return[r,n]},t.prototype.readBlock=function(){function t(t,e,n,i,o){for(var r=t.getBits(n)+i;0<r--;)e[l++]=o}var e,n,i=this.getBits(3);if(1&i&&(this.eof=!0),0!=(i>>=1)){if(1==i)e=F,n=I;else if(2==i){for(var o=this.getBits(5)+257,r=this.getBits(5)+1,a=this.getBits(4)+4,s=Array(_.length),l=0;l<a;)s[_[l++]]=this.getBits(3);for(var c=this.generateHuffmanTable(s),u=0,l=0,d=o+r,h=new Array(d);l<d;){var p=this.getCode(c);16==p?t(this,h,2,3,u):17==p?t(this,h,3,3,u=0):18==p?t(this,h,7,11,u=0):h[l++]=u=p}e=this.generateHuffmanTable(h.slice(0,o)),n=this.generateHuffmanTable(h.slice(o,d))}else E("Unknown block type in flate stream");for(var f=(A=this.buffer)?A.length:0,g=this.bufferLength;;)if((v=this.getCode(e))<256)f<=g+1&&(f=(A=this.ensureBuffer(g+1)).length),A[g++]=v;else{if(256==v)return void(this.bufferLength=g);var m=(v=P[v-=257])>>16;0<m&&(m=this.getBits(m));var u=(65535&v)+m,v=this.getCode(n);0<(m=(v=k[v])>>16)&&(m=this.getBits(m));var b=(65535&v)+m;f<=g+u&&(f=(A=this.ensureBuffer(g+u)).length);for(var y=0;y<u;++y,++g)A[g]=A[g-b]}}else{var w,x=this.bytes,C=this.bytesPos;void 0===(w=x[C++])&&E("Bad block header in flate stream");r=w;void 0===(w=x[C++])&&E("Bad block header in flate stream"),r|=w<<8,void 0===(w=x[C++])&&E("Bad block header in flate stream");o=w;void 0===(w=x[C++])&&E("Bad block header in flate stream"),(o|=w<<8)!=(65535&~r)&&E("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var o=this.bufferLength,A=this.ensureBuffer(o+r),D=o+r;this.bufferLength=D;for(var S=o;S<D;++S){if(void 0===(w=x[C++])){this.eof=!0;break}A[S]=w}this.bytesPos=C}},t}function E(t){throw new Error(t)}function t(t){var e=0,n=t[e++],e=t[+e];-1!=n&&-1!=e||E("Invalid header in flate stream"),8!=(15&n)&&E("Unknown compression method in flate stream"),((n<<8)+e)%31!=0&&E("Bad FCHECK in flate stream"),32&e&&E("FDICT bit set in flate stream"),this.bytes=t,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,vi.call(this)}}(),ji=function(){var c,e,n;function t(t){var e,n,i,o,r,a,s,l,c,u;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(e=this.readUInt32(),r=function(){var t,e=[];for(t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},s=this.readUInt16(),o=this.readUInt16()||100,i.delay=1e3*s/o,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===r&&(this.pos+=4,e-=4),t=(null!=i?i.data:void 0)||this.imgData,l=0;0<=e?l<e:e<l;0<=e?++l:--l)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(n=this.palette.length/3,this.transparency.indexed=this.read(e),this.transparency.indexed.length>n)throw new Error("More transparent colors than palette size");if(0<(a=n-this.transparency.indexed.length))for(c=0;0<=a?c<a:a<c;0<=a?++c:--c)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":u=(s=this.read(e)).indexOf(0),o=String.fromCharCode.apply(String,s.slice(0,u)),this.text[o]=String.fromCharCode.apply(String,s.slice(u+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(u=this.colorType)||6===u,u=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*u,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}t.prototype.read=function(t){var e,n=[];for(e=0;0<=t?e<t:t<e;0<=t?++e:--e)n.push(this.data[this.pos++]);return n},t.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},t.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},t.prototype.decodePixels=function(F){var I=this.pixelBitlength/8,E=new Uint8Array(this.width*this.height*I),L=0,N=this;return null==F&&(F=this.imgData),0===F.length?new Uint8Array(0):(F=(F=new zi(F)).getBytes(),1==N.interlaceMethod?(t(0,0,8,8),t(4,0,8,8),t(0,4,4,8),t(2,0,4,4),t(0,2,2,4),t(1,0,2,2),t(0,1,1,2)):t(0,0,1,1),E);function t(t,e,n,i){for(var o,r,a,s,l,c,u,d,h,p,f,g,m,v=Math.ceil((N.width-t)/n),b=Math.ceil((N.height-e)/i),y=N.width==v&&N.height==b,w=I*v,x=y?E:new Uint8Array(w*b),C=F.length,A=0,D=0;A<b&&L<C;){switch(F[L++]){case 0:for(P=h=0;h<w;P=h+=1)x[D++]=F[L++];break;case 1:for(P=p=0;p<w;P=p+=1)o=F[L++],a=P<I?0:x[D-I],x[D++]=(o+a)%256;break;case 2:for(P=f=0;f<w;P=f+=1)o=F[L++],r=(P-P%I)/I,u=A&&x[(A-1)*w+r*I+P%I],x[D++]=(u+o)%256;break;case 3:for(P=g=0;g<w;P=g+=1)o=F[L++],r=(P-P%I)/I,a=P<I?0:x[D-I],u=A&&x[(A-1)*w+r*I+P%I],x[D++]=(o+Math.floor((a+u)/2))%256;break;case 4:for(P=m=0;m<w;P=m+=1)o=F[L++],r=(P-P%I)/I,a=P<I?0:x[D-I],0===A?u=d=0:(u=x[(A-1)*w+r*I+P%I],d=r&&x[(A-1)*w+(r-1)*I+P%I]),c=a+u-d,s=Math.abs(c-a),l=Math.abs(c-u),c=Math.abs(c-d),c=s<=l&&s<=c?a:l<=c?u:d,x[D++]=(o+c)%256;break;default:throw new Error("Invalid filter algorithm: "+F[L-1])}if(!y)for(var S=((e+A*i)*N.width+t)*I,_=A*w,P=0;P<v;P+=1){for(var k=0;k<I;k+=1)E[S++]=x[_++];S+=(n-1)*I}A++}}},t.prototype.decodePalette=function(){for(var t,e,n=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+n.length),r=0,a=0,s=t=0,l=n.length;t<l;s=t+=3)o[r++]=n[s],o[r++]=n[s+1],o[r++]=n[s+2],o[r++]=null!=(e=i[a++])?e:255;return o},t.prototype.copyToImageData=function(t,e){var n,i,o,r,a,s,l,c,u=this.colors,d=null,h=this.hasAlphaChannel;if(this.palette.length&&(d=null!=(c=this._decodedPalette)?c:this._decodedPalette=this.decodePalette(),u=4,h=!0),s=(n=t.data||t).length,o=d||e,i=r=0,1===u)for(;i<s;)a=d?4*e[i/4]:r,l=o[a++],n[i++]=l,n[i++]=l,n[i++]=l,n[i++]=h?o[a++]:255,r=a;else for(;i<s;)a=d?4*e[i/4]:r,n[i++]=o[a++],n[i++]=o[a++],n[i++]=o[a++],n[i++]=h?o[a++]:255,r=a},t.prototype.decode=function(){var t=new Uint8Array(this.width*this.height*4);return this.copyToImageData(t,this.decodePixels()),t};function i(){if("[object Window]"!==Object.prototype.toString.call(rn))return!1;try{e=rn.document.createElement("canvas"),n=e.getContext("2d")}catch(t){return!1}return!0}return i(),c=function(t){if(!0!==i())throw new Error("This method requires a Browser with Canvas-capability.");return n.width=t.width,n.height=t.height,n.clearRect(0,0,t.width,t.height),n.putImageData(t,0,0),(t=new Image).src=e.toDataURL(),t},t.prototype.decodeFrames=function(t){var e,n,i,o,r,a,s,l;if(this.animation){for(l=[],n=r=0,a=(s=this.animation.frames).length;r<a;n=++r)e=s[n],i=t.createImageData(e.width,e.height),o=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(i,o),e.imageData=i,l.push(e.image=c(i));return l}},t.prototype.renderFrame=function(t,e){var n=this.animation.frames,i=n[e],n=n[e-1];return 0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=n?n.disposeOp:void 0)?t.clearRect(n.xOffset,n.yOffset,n.width,n.height):2===(null!=n?n.disposeOp:void 0)&&t.putImageData(n.imageData,n.xOffset,n.yOffset),0===i.blendOp&&t.clearRect(i.xOffset,i.yOffset,i.width,i.height),t.drawImage(i.image,i.xOffset,i.yOffset)},t.prototype.animate=function(n){var i,o=this,r=0,t=this.animation,a=t.numFrames,s=t.frames,l=t.numPlays;return(i=function(){var t=r++%a,e=s[t];if(o.renderFrame(n,t),1<a&&r/a<l)return o.animation._timeout=setTimeout(i,e.delay)})()},t.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},t.prototype.render=function(t){var e;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(t=e.createImageData(this.width,this.height),this.copyToImageData(t,this.decodePixels()),e.putImageData(t,0,0))},t}();function Ri(t,e,n,i){var o=5,r=Ai;switch(i){case yi.image_compression.FAST:o=3,r=Ci;break;case yi.image_compression.MEDIUM:o=6,r=Di;break;case yi.image_compression.SLOW:o=9,r=Si}return t=xi(t,e,n,r),i=gn.API.adler32cs.fromBuffer(t.buffer),(e=new ci.Deflate({level:o})).push(t,!0),n=e.result,t=n.length,(e=new Uint8Array(n.length+4)).set(n,0),e[t++]=i>>>24&255,e[t++]=i>>>16&255,e[t++]=i>>>8&255,e[t++]=255&i,yi.__addimage__.arrayBufferToBinaryString(e)}function Ui(t){return(t=Array.apply([],t)).unshift(0),t}function Wi(y){var t=0;if(71!==y[t++]||73!==y[t++]||70!==y[t++]||56!==y[t++]||56!=(y[t++]+1&253)||97!==y[t++])throw new Error("Invalid GIF 87a/89a header.");var w=y[t++]|y[t++]<<8,e=y[t++]|y[t++]<<8,n=y[t++],i=n>>7,n=1<<1+(7&n);y[t++];y[t++];var o=null,r=null;i&&(o=t,t+=3*(r=n));var a=!0,s=[],l=0,c=null,u=0,d=null;for(this.width=w,this.height=e;a&&t<y.length;)switch(y[t++]){case 33:switch(y[t++]){case 255:if(11!==y[t]||78==y[t+1]&&69==y[t+2]&&84==y[t+3]&&83==y[t+4]&&67==y[t+5]&&65==y[t+6]&&80==y[t+7]&&69==y[t+8]&&50==y[t+9]&&46==y[t+10]&&48==y[t+11]&&3==y[t+12]&&1==y[t+13]&&0==y[t+16])t+=14,d=y[t++]|y[t++]<<8,t++;else for(t+=12;;){if(!(0<=(S=y[t++])))throw Error("Invalid block size");if(0===S)break;t+=S}break;case 249:if(4!==y[t++]||0!==y[t+4])throw new Error("Invalid graphics extension block.");var h=y[t++],l=y[t++]|y[t++]<<8,c=y[t++];0==(1&h)&&(c=null),u=h>>2&7,t++;break;case 254:for(;;){if(!(0<=(S=y[t++])))throw Error("Invalid block size");if(0===S)break;t+=S}break;default:throw new Error("Unknown graphic control label: 0x"+y[t-1].toString(16))}break;case 44:var p=y[t++]|y[t++]<<8,f=y[t++]|y[t++]<<8,g=y[t++]|y[t++]<<8,m=y[t++]|y[t++]<<8,v=y[t++],b=v>>6&1,x=1<<1+(7&v),C=o,A=r,D=!1;v>>7&&(D=!0,C=t,t+=3*(A=x));var S,x=t;for(t++;;){if(!(0<=(S=y[t++])))throw Error("Invalid block size");if(0===S)break;t+=S}s.push({x:p,y:f,width:g,height:m,has_local_palette:D,palette_offset:C,palette_size:A,data_offset:x,data_length:t-x,transparent_index:c,interlaced:!!b,delay:l,disposal:u});break;case 59:a=!1;break;default:throw new Error("Unknown gif block: 0x"+y[t-1].toString(16))}this.numFrames=function(){return s.length},this.loopCount=function(){return d},this.frameInfo=function(t){if(t<0||t>=s.length)throw new Error("Frame index out of range.");return s[t]},this.decodeAndBlitFrameBGRA=function(t,e){var n=this.frameInfo(t),t=n.width*n.height,i=new Uint8Array(t);Hi(y,n.data_offset,i,t);var o=n.palette_offset,r=n.transparent_index;null===r&&(r=256);var a=n.width,s=w-a,l=a,c=4*(n.y*w+n.x),u=4*((n.y+n.height)*w+n.x),d=c,h=4*s;!0===n.interlaced&&(h+=4*w*7);for(var p=8,f=0,g=i.length;f<g;++f){var m,v,b=i[f];0===l&&(l=a,u<=(d+=h)&&(h=4*s+4*w*(p-1),d=c+(a+s)*(p<<1),p>>=1)),b===r?d+=4:(m=y[o+3*b],v=y[o+3*b+1],b=y[o+3*b+2],e[d++]=b,e[d++]=v,e[d++]=m,e[d++]=255),--l}},this.decodeAndBlitFrameRGBA=function(t,e){var n=this.frameInfo(t),t=n.width*n.height,i=new Uint8Array(t);Hi(y,n.data_offset,i,t);var o=n.palette_offset,r=n.transparent_index;null===r&&(r=256);var a=n.width,s=w-a,l=a,c=4*(n.y*w+n.x),u=4*((n.y+n.height)*w+n.x),d=c,h=4*s;!0===n.interlaced&&(h+=4*w*7);for(var p=8,f=0,g=i.length;f<g;++f){var m,v,b=i[f];0===l&&(l=a,u<=(d+=h)&&(h=4*s+4*w*(p-1),d=c+(a+s)*(p<<1),p>>=1)),b===r?d+=4:(m=y[o+3*b],v=y[o+3*b+1],b=y[o+3*b+2],e[d++]=m,e[d++]=v,e[d++]=b,e[d++]=255),--l}}}function Hi(t,e,n,i){for(var o=t[e++],r=1<<o,a=1+r,s=1+a,l=o+1,c=(1<<l)-1,u=0,d=0,h=0,p=t[e++],f=new Int32Array(4096),g=null;;){for(;u<16&&0!==p;)d|=t[e++]<<u,u+=8,1===p?p=t[e++]:--p;if(u<l)break;var m=d&c;if(d>>=l,u-=l,m!=r){if(m==a)break;for(var v=m<s?m:g,b=0,y=v;r<y;)y=f[y]>>8,++b;var w=y;if(i<h+b+(v!==m?1:0))return void an.log("Warning, gif stream longer than expected.");n[h++]=w;var x=h+=b;for(v!==m&&(n[h++]=w),y=v;b--;)y=f[y],n[--x]=255&y,y>>=8;null!==g&&s<4096&&(f[s++]=g<<8|w,c+1<=s&&l<12&&(++l,c=c<<1|1)),g=m}else s=1+a,c=(1<<(l=o+1))-1,g=null}return h!==i&&an.log("Warning, gif stream shorter than expected."),n}function Vi(t){var b,y,w,x,e,d=Math.floor,C=new Array(64),A=new Array(64),D=new Array(64),S=new Array(64),g=new Array(65535),m=new Array(65535),E=new Array(64),v=new Array(64),_=[],P=0,k=7,F=new Array(64),I=new Array(64),L=new Array(64),n=new Array(256),N=new Array(2048),O=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],B=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],z=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],j=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function i(t,e){for(var n=0,i=0,o=new Array,r=1;r<=16;r++){for(var a=1;a<=t[r];a++)o[e[i]]=[],o[e[i]][0]=n,o[e[i]][1]=r,i++,n++;n*=2}return o}function H(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(P|=1<<k),n--,--k<0&&(255==P?(V(255),V(0)):V(P),k=7,P=0)}function V(t){_.push(t)}function q(t){V(t>>8&255),V(255&t)}function G(t,e,n,i,o){for(var r,a=o[0],s=o[240],l=function(t,e){for(var n,i,o,r,a,s,l,c,u,d=0,h=0;h<8;++h){n=t[d],i=t[d+1],o=t[d+2],r=t[d+3],a=t[d+4],s=t[d+5],l=t[d+6];var p=n+(c=t[d+7]),f=n-c,g=i+l,m=i-l,v=o+s,b=o-s,y=r+a,w=r-a,x=p+y,p=p-y,y=g+v,g=g-v;t[d]=x+y,t[d+4]=x-y;v=.707106781*(g+p);t[d+2]=p+v,t[d+6]=p-v;w=.382683433*((x=w+b)-(g=m+f)),x=.5411961*x+w,w=1.306562965*g+w,m=.707106781*(b+m),y=f+m,m=f-m;t[d+5]=m+x,t[d+3]=m-x,t[d+1]=y+w,t[d+7]=y-w,d+=8}for(h=d=0;h<8;++h){n=t[d],i=t[d+8],o=t[d+16],r=t[d+24],a=t[d+32],s=t[d+40],l=t[d+48];var C=n+(c=t[d+56]),A=n-c,D=i+l,S=i-l,_=o+s,P=o-s,k=r+a,F=r-a,I=C+k,C=C-k,k=D+_,D=D-_;t[d]=I+k,t[d+32]=I-k;_=.707106781*(D+C);t[d+16]=C+_,t[d+48]=C-_;F=.382683433*((I=F+P)-(D=S+A)),I=.5411961*I+F,F=1.306562965*D+F,S=.707106781*(P+S),k=A+S,S=A-S;t[d+40]=S+I,t[d+24]=S-I,t[d+8]=k+F,t[d+56]=k-F,d++}for(h=0;h<64;++h)u=t[h]*e[h],E[h]=0<u?.5+u|0:u-.5|0;return E}(t,e),c=0;c<64;++c)v[O[c]]=l[c];e=v[0]-n;n=v[0],0==e?H(i[0]):(H(i[m[r=32767+e]]),H(g[r]));for(var u=63;0<u&&0==v[u];)u--;if(0==u)return H(a),n;for(var d,h=1;h<=u;){for(var p=h;0==v[h]&&h<=u;)++h;p=h-p;if(16<=p){d=p>>4;for(var f=1;f<=d;++f)H(s);p&=15}r=32767+v[h],H(o[(p<<4)+m[r]]),H(g[r]),h++}return 63!=u&&H(a),n}function Y(t){t=Math.min(Math.max(t,1),100),e!=t&&(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var i=d((e[n]*t+50)/100),i=Math.min(Math.max(i,1),255);C[O[n]]=i}for(var o=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],r=0;r<64;r++){var a=d((o[r]*t+50)/100),a=Math.min(Math.max(a,1),255);A[O[r]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,c=0;c<8;c++)for(var u=0;u<8;u++)D[l]=1/(C[O[l]]*s[c]*s[u]*8),S[l]=1/(A[O[l]]*s[c]*s[u]*8),l++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t)}this.encode=function(t,e){e&&Y(e),_=new Array,P=0,k=7,q(65496),q(65504),q(16),V(74),V(70),V(73),V(70),V(0),V(1),V(1),V(0),q(1),q(1),V(0),V(0),function(){q(65499),q(132),V(0);for(var t=0;t<64;t++)V(C[t]);V(1);for(var e=0;e<64;e++)V(A[e])}(),f=t.width,e=t.height,q(65472),q(17),V(8),q(e),q(f),V(3),V(1),V(17),V(0),V(2),V(17),V(1),V(3),V(17),V(1),function(){q(65476),q(418),V(0);for(var t=0;t<16;t++)V(T[t+1]);for(var e=0;e<=11;e++)V(B[e]);V(16);for(var n=0;n<16;n++)V(M[n+1]);for(var i=0;i<=161;i++)V(z[i]);V(1);for(var o=0;o<16;o++)V(j[o+1]);for(var r=0;r<=11;r++)V(R[r]);V(17);for(var a=0;a<16;a++)V(U[a+1]);for(var s=0;s<=161;s++)V(W[s])}(),q(65498),q(12),V(3),V(1),V(0),V(2),V(17),V(3),V(17),V(0),V(63),V(0);var n=0,i=0,o=0;P=0,k=7,this.encode.displayName="_encode_";for(var r,a,s,l,c,u,d,h,p=t.data,f=t.width,g=t.height,m=4*f,v=0;v<g;){for(r=0;r<m;){for(l=m*v+r,h=0;h<64;h++)c=l+(d=h>>3)*m+(u=4*(7&h)),g<=v+d&&(c-=m*(v+1+d-g)),m<=r+u&&(c-=r+u-m+4),a=p[c++],s=p[c++],c=p[c++],F[h]=(N[a]+N[s+256>>0]+N[c+512>>0]>>16)-128,I[h]=(N[a+768>>0]+N[s+1024>>0]+N[c+1280>>0]>>16)-128,L[h]=(N[a+1280>>0]+N[s+1536>>0]+N[c+1792>>0]>>16)-128;n=G(F,D,n,b,w),i=G(I,S,i,y,x),o=G(L,S,o,y,x),r+=32}v+=8}return 0<=k&&((f=[])[1]=k+1,f[0]=(1<<k+1)-1,H(f)),q(65497),new Uint8Array(_)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),b=i(T,B),y=i(j,R),w=i(M,z),x=i(U,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var i=t;i<e;i++)m[32767+i]=n,g[32767+i]=[],g[32767+i][1]=n,g[32767+i][0]=i;for(var o=-(e-1);o<=-t;o++)m[32767+o]=n,g[32767+o]=[],g[32767+o][1]=n,g[32767+o][0]=e-1+o;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)N[t]=19595*t,N[t+256>>0]=38470*t,N[t+512>>0]=7471*t+32768,N[t+768>>0]=-11059*t,N[t+1024>>0]=-21709*t,N[t+1280>>0]=32768*t+8421375,N[t+1536>>0]=-27439*t,N[t+1792>>0]=-5329*t}(),Y(t)}function qi(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Gi(t){function Bo(t){if(!t)throw Error("assert :P")}function Mo(t,e,n){for(var i=0;i<4;i++)if(t[e+i]!=n.charCodeAt(i))return 1}function zo(t,e,n,i,o){for(var r=0;r<o;r++)t[e+r]=n[i+r]}function jo(t,e,n,i){for(var o=0;o<i;o++)t[e+o]=n}function Ro(t){return new Int32Array(t)}function Uo(t,e){for(var n=[],i=0;i<t;i++)n.push(new e);return n}function Wo(){var t=[];return function t(e,n,i){for(var o=i[n],r=0;r<o&&(e.push(i.length>n+1?[]:0),!(i.length<n+1));r++)t(e[r],n+1,i)}(t,0,[3,11]),t}function Ho(t,a){var e=[];return function t(e,n,i){for(var o=i[n],r=0;r<o&&(e.push(i.length>n+1?[]:new a),!(i.length<n+1));r++)t(e[r],n+1,i)}(e,0,t),e}function f(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16)>>>0}function g(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new(Gi=function(){var m=this;function y(t,e){for(var n=1<<e-1>>>0;t&n;)n>>>=1;return n?(t&n-1)+n:t}function w(t,e,n,i,o){for(Bo(!(i%n));i-=n,t[e+i]=o,0<i;);}function Vt(t,e,n,i,o){if(Bo(o<=2328),o<=512)var r=Ro(512);else if(null==(r=Ro(o)))return 0;return function(t,e,n,i,o,r){var a=e,s=1<<n,l=Ro(16),c=Ro(16);for(Bo(0!=o),Bo(null!=i),Bo(null!=t),Bo(0<n),v=0;v<o;++v){if(15<i[v])return 0;++l[i[v]]}if(l[0]==o)return 0;for(c[1]=0,b=1;b<15;++b){if(l[b]>1<<b)return 0;c[b+1]=c[b]+l[b]}for(v=0;v<o;++v)b=i[v],0<i[v]&&(r[c[b]++]=v);if(1==c[15])return(i=new qt).g=0,i.value=r[0],w(t,a,1,s,i),s;var u,d=-1,h=s-1,p=0,f=1,g=1,m=1<<n,v=0,b=1;for(o=2;b<=n;++b,o<<=1){if(f+=g<<=1,(g-=l[b])<0)return 0;for(;0<l[b];--l[b])(i=new qt).g=b,i.value=r[v++],w(t,a+p,o,m,i),p=y(p,b)}for(b=n+1,o=2;b<=15;++b,o<<=1){if(f+=g<<=1,(g-=l[b])<0)return 0;for(;0<l[b];--l[b]){if(i=new qt,(p&h)!=d){for(a+=m,u=1<<(d=b)-n;d<15&&!((u-=l[d])<=0);)++d,u<<=1;s+=m=1<<(u=d-n),t[e+(d=p&h)].g=u+n,t[e+d].value=a-e-d}i.g=b-n,i.value=r[v++],w(t,a+(p>>n),o,m,i),p=y(p,b)}}return f!=2*c[15]-1?0:s}(t,e,n,i,o,r)}function qt(){this.value=this.g=0}function t(){this.value=this.g=0}function Gt(){this.G=Uo(5,qt),this.H=Ro(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=Uo(En,t)}function f(t,e,n,i){Bo(null!=t),Bo(null!=e),Bo(i<2147483648),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=e,t.pa=n,t.Jd=e,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,b(t)}function g(t,e){for(var n=0;0<e--;)n|=j(t,128)<<e;return n}function v(t,e){e=g(t,e);return x(t)?-e:e}function M(t,e,n,i){var o,r=0;for(Bo(null!=t),Bo(null!=e),Bo(i<4294967288),t.Sb=i,t.Ra=0,t.u=0,4<i&&(i=4),o=t.h=0;o<i;++o)r+=e[n+o]<<8*o;t.Ra=r,t.bb=i,t.oa=e,t.pa=n}function i(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<On-8>>>0,++t.bb,t.u-=8;z(t)&&(t.h=1,t.u=0)}function Yt(t,e){if(Bo(0<=e),!t.h&&e<=Nn){var n=Zt(t)&Ln[e];return t.u+=e,i(t),n}return t.h=1,t.u=0}function e(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function k(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function Zt(t){return t.Ra>>>(t.u&On-1)>>>0}function z(t){return Bo(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>On}function Jt(t,e){t.u=e,t.h=z(t)}function Xt(t){t.u>=Tn&&(Bo(t.u>=Tn),i(t))}function b(t){Bo(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(Bo(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function x(t){return g(t,1)}function j(t,e){var n=t.Ca;t.b<0&&b(t);var i=t.b,o=n*e>>>8,e=+(t.I>>>i>o);for(e?(n-=o,t.I-=o+1<<i>>>0):n=o+1,i=n,o=0;256<=i;)o+=8,i>>=8;return i=7^o+Bn[i],t.b-=i,t.Ca=(n<<i)-1,e}function a(t,e,n){t[e+0]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=n>>0&255}function n(t,e){return t[e+0]<<0|t[e+1]<<8}function F(t,e){return n(t,e)|t[e+2]<<16}function I(t,e){return n(t,e)|n(t,e+2)<<16}function Qt(t,e){var n=1<<e;return Bo(null!=t),Bo(0<e),t.X=Ro(n),null!=t.X&&(t.Mb=32-e,t.Xa=e,1)}function D(t,e){Bo(null!=t),Bo(null!=e),Bo(t.Xa==e.Xa),zo(e.X,0,t.X,0,1<<e.Xa)}function o(){this.X=[],this.Xa=this.Mb=0}function C(t,e,n,i){Bo(null!=n),Bo(null!=i);var o=n[0],r=i[0];return 0==o&&(o=(t*r+e/2)/e),0==r&&(r=(e*o+t/2)/t),!(o<=0||r<=0)&&(n[0]=o,i[0]=r,1)}function Kt(t,e){return t+(1<<e)-1>>>e}function $t(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function r(c,t){m[t]=function(t,e,n,i,o,r,a){for(var s=0;s<o;++s){var l=m[c](r[a+s-1],n,i+s);r[a+s]=$t(t[e+s],l)}}}function E(){this.ud=this.hd=this.jd=0}function s(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function l(t){return 0<=t&&t<256?t:t<0?0:255<t?255:void 0}function c(t,e){return l(t+(t-e+.5>>1))}function u(t,e,n){return Math.abs(e-n)-Math.abs(t-n)}function L(t,e,n,i,o,r,a){for(i=r[a-1],n=0;n<o;++n)r[a+n]=i=$t(t[e+n],i)}function d(t,e,n,i,o){for(var r=0;r<n;++r){var a=t[e+r],s=a>>8&255,s=16711935&(s=(s<<16)+s+(s=16711935&a));i[o+r]=(4278255360&a)+s>>>0}}function N(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function h(t,e,n,i,o,r){for(var a=0;a<i;++a){var s=e[n+a],l=s>>>8,c=s,u=255&(u=(u=s>>>16)+((t.jd<<24>>24)*(l<<24>>24)>>>5)),c=255&(c=(c=c+((t.hd<<24>>24)*(l<<24>>24)>>>5))+((t.ud<<24>>24)*(u<<24>>24)>>>5));o[r+a]=(4278255360&s)+(u<<16)+c}}function p(t,e,p,f,g){m[e]=function(t,e,n,i,o,r,a,s,l){for(i=a;i<s;++i)for(a=0;a<l;++a)o[r++]=g(n[f(t[e++])])},m[t]=function(t,e,n,i,o,r,a){var s=8>>t.b,l=t.Ea,c=t.K[0],u=t.w;if(s<8)for(t=(1<<t.b)-1,u=(1<<s)-1;e<n;++e)for(var d=0,h=0;h<l;++h)h&t||(d=f(i[o++])),r[a++]=g(c[d&u]),d>>=s;else m["VP8LMapColor"+p](i,o,c,u,r,a,e,n,l)}}function A(t,e,n,i,o){for(n=e+n;e<n;){var r=t[e++];i[o++]=r>>16&255,i[o++]=r>>8&255,i[o++]=r>>0&255}}function S(t,e,n,i,o){for(n=e+n;e<n;){var r=t[e++];i[o++]=r>>16&255,i[o++]=r>>8&255,i[o++]=r>>0&255,i[o++]=r>>24&255}}function _(t,e,n,i,o){for(n=e+n;e<n;){var r=(a=t[e++])>>16&240|a>>12&15,a=a>>0&240|a>>28&15;i[o++]=r,i[o++]=a}}function P(t,e,n,i,o){for(n=e+n;e<n;){var r=(a=t[e++])>>16&248|a>>13&7,a=a>>5&224|a>>3&31;i[o++]=r,i[o++]=a}}function O(t,e,n,i,o){for(n=e+n;e<n;){var r=t[e++];i[o++]=r>>0&255,i[o++]=r>>8&255,i[o++]=r>>16&255}}function T(t,e,n,i,o,r){if(0==r)for(n=e+n;e<n;)a(i,((r=t[e++])[0]>>24|r[1]>>8&65280|r[2]<<8&16711680|r[3]<<24)>>>0),o+=32;else zo(i,o,t,e,n)}function B(t,e){m[e][0]=m[t+"0"],m[e][1]=m[t+"1"],m[e][2]=m[t+"2"],m[e][3]=m[t+"3"],m[e][4]=m[t+"4"],m[e][5]=m[t+"5"],m[e][6]=m[t+"6"],m[e][7]=m[t+"7"],m[e][8]=m[t+"8"],m[e][9]=m[t+"9"],m[e][10]=m[t+"10"],m[e][11]=m[t+"11"],m[e][12]=m[t+"12"],m[e][13]=m[t+"13"],m[e][14]=m[t+"0"],m[e][15]=m[t+"0"]}function R(t){return t==Ti||t==Bi||t==Mi||t==zi}function U(){this.eb=[],this.size=this.A=this.fb=0}function W(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function H(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new U,this.f.kb=new W,this.sd=null}function V(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function q(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function G(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function Y(t,e){var n=t.T,i=e.ba.f.RGBA,o=i.eb,r=i.fb+t.ka*i.A,a=co[e.ba.S],s=t.y,l=t.O,c=t.f,u=t.N,d=t.ea,h=t.W,p=e.cc,f=e.dc,g=e.Mc,m=e.Nc,v=t.ka,b=t.ka+t.T,y=t.U,w=y+1>>1;for(0==v?a(s,l,null,null,c,u,d,h,c,u,d,h,o,r,null,null,y):(a(e.ec,e.fc,s,l,p,f,g,m,c,u,d,h,o,r-i.A,o,r,y),++n);v+2<b;v+=2)p=c,f=u,g=d,m=h,u+=t.Rc,h+=t.Rc,r+=2*i.A,a(s,(l+=2*t.fa)-t.fa,s,l,p,f,g,m,c,u,d,h,o,r-i.A,o,r,y);return l+=t.fa,t.j+b<t.o?(zo(e.ec,e.fc,s,l,y),zo(e.cc,e.dc,c,u,w),zo(e.Mc,e.Nc,d,h,w),n--):1&b||a(s,l,null,null,c,u,d,h,c,u,d,h,o,r+i.A,null,null,y),n}function Z(t,e,n){var i,o,r,a,s,l,c=t.F,u=[t.J];return null!=c&&(i=t.U,r=(o=e.ba.S)==Li||o==Mi,e=e.ba.f.RGBA,a=[0],l=t.ka,a[0]=t.T,t.Kb&&(0==l?--a[0]:(--l,u[0]-=t.width),t.j+t.ka+t.T==t.o&&(a[0]=t.o-t.j-l)),s=e.eb,l=e.fb+l*e.A,t=vi(c,u[0],t.width,i,a,s,l+(r?0:3),e.A),Bo(n==a),t&&R(o)&&gi(s,l,r,i,a,e.A)),0}function J(t){var e=t.ma,n=e.ba.S,i=n<11,o=n==Fi||n==Ei||n==Li||n==Ni||12==n||R(n);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!kn(e.Oa,t,o?11:12))return 0;if(o&&R(n)&&dn(),t.da)alert("todo:use_scaling");else{if(i){if(e.Ib=G,t.Kb){if(n=t.U+1>>1,e.memory=Ro(t.U+2*n),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+n,e.Ib=Y,dn()}}else alert("todo:EmitYUV");o&&(e.Jb=Z,i&&cn())}if(i&&!Do){for(t=0;t<256;++t)So[t]=89858*(t-128)+yo>>bo,ko[t]=-22014*(t-128)+yo,Po[t]=-45773*(t-128),_o[t]=113618*(t-128)+yo>>bo;for(t=wo;t<xo;++t)e=76283*(t-16)+yo>>bo,Fo[t-wo]=Dt(e,255),Io[t-wo]=Dt(e+8>>4,15);Do=1}return 1}function X(t){var e=t.ma,n=t.U,i=t.T;return Bo(!(1&t.ka)),n<=0||i<=0?0:(n=e.Ib(t,e),null!=e.Jb&&e.Jb(t,e,n),e.Dc+=n,1)}function Q(t){t.ma.memory=null}function K(t,e,n,i){return 47==Yt(t,8)&&(e[0]=Yt(t,14)+1,n[0]=Yt(t,14)+1,i[0]=Yt(t,1),0==Yt(t,3)&&!t.h)}function $(t,e){if(t<4)return t+1;var n=t-2>>1;return(2+(1&t)<<n)+Yt(e,n)+1}function tt(t,e){if(120<e)return e-120;e=Vi[e-1];return 1<=(e=(e>>4)*t+(8-(15&e)))?e:1}function et(t,e,n){var i=Zt(n),o=t[e+=255&i].g-8;return 0<o&&(Jt(n,n.u+8),i=Zt(n),e+=t[e].value,e+=i&(1<<o)-1),Jt(n,n.u+t[e].g),t[e].value}function te(t,e,n){return n.g+=t.g,n.value+=t.value<<e>>>0,Bo(n.g<=8),t.g}function nt(t,e,n){var i=t.xc;return Bo((e=0==i?0:t.vc[t.md*(n>>i)+(e>>i)])<t.Wb),t.Ya[e]}function it(t,e,n,i){var o=t.ab,r=t.c*e,a=t.C;e=a+e;var s=n,l=i;for(i=t.Ta,n=t.Ua;0<o--;){var c=t.gc[o],u=a,d=e,h=s,p=l,l=i,s=n,f=c.Ea;switch(Bo(u<d),Bo(d<=c.nc),c.hc){case 2:jn(h,p,(d-u)*f,l,s);break;case 0:var g=u,m=d,v=l,b=s,y=(D=c).Ea;0==g&&(Mn(h,p,null,null,1,v,b),L(h,p+1,0,0,y-1,v,b+1),p+=y,b+=y,++g);for(var w=1<<D.b,x=w-1,C=Kt(y,D.b),A=D.K,D=D.w+(g>>D.b)*C;g<m;){var S=A,_=D,P=1;for(zn(h,p,v,b-y,1,v,b);P<y;){var k=(P&~x)+w;y<k&&(k=y),(0,Vn[S[_++]>>8&15])(h,p+ +P,v,b+P-y,k-P,v,b+P),P=k}p+=y,b+=y,++g&x||(D+=C)}d!=c.nc&&zo(l,s-f,l,s+(d-u-1)*f,f);break;case 1:for(f=h,m=p,y=(h=c.Ea)-(b=h&~(v=(p=1<<c.b)-1)),g=Kt(h,c.b),w=c.K,c=c.w+(u>>c.b)*g;u<d;){for(x=w,C=c,A=new E,D=m+b,S=m+h;m<D;)N(x[C++],A),qn(A,f,m,p,l,s),m+=p,s+=p;m<S&&(N(x[C++],A),qn(A,f,m,y,l,s),m+=y,s+=y),++u&v||(c+=g)}break;case 3:if(h==l&&p==s&&0<c.b){for(h=f=s+(d-u)*f-(b=(d-u)*Kt(c.Ea,c.b)),p=m=l,v=s,g=[],b=(y=b)-1;0<=b;--b)g[b]=p[v+b];for(b=y-1;0<=b;--b)m[h+b]=g[b];Rn(c,u,d,l,f,l,s)}else Rn(c,u,d,h,p,l,s)}s=i,l=n}l!=n&&zo(i,n,s,l,r)}function ot(t,e){var n=t.V,i=t.Ba+t.c*t.C,o=e-t.C;if(Bo(e<=t.l.o),Bo(o<=16),0<o){var r=t.l,a=t.Ta,s=t.Ua,l=r.width;if(it(t,o,n,i),o=s=[s],Bo((n=t.C)<(i=e)),Bo(r.v<r.va),i>r.o&&(i=r.o),n<r.j&&(u=r.j-n,n=r.j,o[0]+=u*l),n=i<=n?0:(o[0]+=4*r.v,r.ka=n-r.j,r.U=r.va-r.v,r.T=i-n,1)){if(s=s[0],(n=t.ca).S<11){for(var c=n.f.RGBA,i=n.S,o=r.U,r=r.T,u=c.eb,d=c.A,h=r,c=c.fb+t.Ma*c.A;0<h--;){var p=a,f=s,g=o,m=u,v=c;switch(i){case ki:Gn(p,f,g,m,v);break;case Fi:Yn(p,f,g,m,v);break;case Ti:Yn(p,f,g,m,v),gi(m,v,0,g,1,0);break;case Ii:Xn(p,f,g,m,v);break;case Ei:T(p,f,g,m,v,1);break;case Bi:T(p,f,g,m,v,1),gi(m,v,0,g,1,0);break;case Li:T(p,f,g,m,v,0);break;case Mi:T(p,f,g,m,v,0),gi(m,v,1,g,1,0);break;case Ni:Zn(p,f,g,m,v);break;case zi:Zn(p,f,g,m,v),mi(m,v,g,1,0);break;case Oi:Jn(p,f,g,m,v);break;default:Bo(0)}s+=l,c+=d}t.Ma+=r}else alert("todo:EmitRescaledRowsYUVA");Bo(t.Ma<=n.height)}}t.C=e,Bo(t.C<=t.i)}function rt(t){var e;if(0<t.ua)return 0;for(e=0;e<t.Wb;++e){var n=t.Ya[e].G,i=t.Ya[e].H;if(0<n[1][i[1]+0].g||0<n[2][i[2]+0].g||0<n[3][i[3]+0].g)return 0}return 1}function at(t,e,n,i,o,r){if(0!=t.Z){var a=t.qd,s=t.rd;for(Bo(null!=lo[t.Z]);e<n;++e)lo[t.Z](a,s,i,o,i,o,r),a=i,s=o,o+=r;t.qd=a,t.rd=s}}function st(t,e){var n,i,o,r,a,s,l=t.l.ma,c=0==l.Z||1==l.Z?t.l.j:t.C,c=t.C<c?c:t.C;Bo(e<=t.l.o),c<e&&(n=t.l.width,i=l.ca,o=l.tb+n*c,r=t.V,a=t.Ba+t.c*c,s=t.gc,Bo(1==t.ab),Bo(3==s[0].hc),Wn(s[0],c,e,r,a,i,o),at(l,c,e,i,o,n)),t.C=t.Ma=e}function ee(t,e,n,i,o,r,a){var s=t.$/i,l=t.$%i,c=t.m,u=t.s,d=n+t.$,h=d;o=n+i*o;var p=n+i*r,f=280+u.ua,g=t.Pb?s:16777216,m=0<u.ua?u.Wa:null,v=u.wc,b=d<p?nt(u,l,s):null;Bo(t.C<r),Bo(p<=o);var y=!1;t:for(;;){for(;y||d<p;){var w,x,C,A=0;if(g<=s&&(w=d-n,Bo((g=t).Pb),g.wd=g.m,g.xd=w,0<g.s.ua&&D(g.s.Wa,g.s.vb),g=s+Gi),l&v||(b=nt(u,l,s)),Bo(null!=b),b.Qb&&(e[d]=b.qb,y=!0),y||(Xt(c),b.jc?(A=c,w=e,x=d,C=b.pd[Zt(A)&En-1],Bo(b.jc),0==(A=C.g<256?(Jt(A,A.u+C.g),w[x]=C.value,0):(Jt(A,A.u+C.g-256),Bo(256<=C.value),C.value))&&(y=!0)):A=et(b.G[0],b.H[0],c)),c.h)break;if(y||A<256){if(!y)if(b.nd)e[d]=(b.qb|A<<8)>>>0;else{if(Xt(c),y=et(b.G[1],b.H[1],c),Xt(c),w=et(b.G[2],b.H[2],c),x=et(b.G[3],b.H[3],c),c.h)break;e[d]=(x<<24|y<<16|A<<8|w)>>>0}if(y=!1,++d,i<=++l&&(l=0,++s,null!=a&&s<=r&&!(s%16)&&a(t,s),null!=m))for(;h<d;)A=e[h++],m.X[(506832829*A&4294967295)>>>m.Mb]=A}else if(A<280){if(A=$(A-256,c),w=et(b.G[4],b.H[4],c),Xt(c),w=tt(i,w=$(w,c)),c.h)break;if(d-n<w||o-d<A)break t;for(x=0;x<A;++x)e[d+x]=e[d+x-w];for(d+=A,l+=A;i<=l;)l-=i,++s,null!=a&&s<=r&&!(s%16)&&a(t,s);if(Bo(d<=o),l&v&&(b=nt(u,l,s)),null!=m)for(;h<d;)A=e[h++],m.X[(506832829*A&4294967295)>>>m.Mb]=A}else{if(!(A<f))break t;for(y=A-280,Bo(null!=m);h<d;)A=e[h++],m.X[(506832829*A&4294967295)>>>m.Mb]=A;A=d,Bo(!(y>>>(w=m).Xa)),e[A]=w.X[y],y=!0}y||Bo(c.h==z(c))}if(t.Pb&&c.h&&d<o)Bo(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&D(t.s.vb,t.s.Wa);else{if(c.h)break t;null!=a&&a(t,r<s?r:s),t.a=0,t.$=d-n}return 1}return t.a=3,0}function ne(t){Bo(null!=t),t.vc=null,t.yc=null,t.Ya=null;var e=t.Wa;null!=e&&(e.X=null),Bo((t.vb=null)!=t)}function lt(){var t=new $e;return null==t?null:(t.a=0,t.xb=so,B("Predictor","VP8LPredictors"),B("Predictor","VP8LPredictors_C"),B("PredictorAdd","VP8LPredictorsAdd"),B("PredictorAdd","VP8LPredictorsAdd_C"),jn=d,qn=h,Gn=A,Yn=S,Zn=_,Jn=P,Xn=O,m.VP8LMapColor32b=Un,m.VP8LMapColor8b=Hn,t)}function ie(t,e,n,i,o){var r,a=1,s=[t],l=[e],c=i.m,u=i.s,d=null,h=0;t:for(;;){if(n)for(;a&&Yt(c,1);){var p=s,f=l,g=i,m=1,v=g.m,b=g.gc[g.ab],y=Yt(v,2);if(g.Oc&1<<y)a=0;else{switch(g.Oc|=1<<y,b.hc=y,b.Ea=p[0],b.nc=f[0],b.K=[null],++g.ab,Bo(g.ab<=4),y){case 0:case 1:b.b=Yt(v,3)+2,m=ie(Kt(b.Ea,b.b),Kt(b.nc,b.b),0,g,b.K),b.K=b.K[0];break;case 3:var w=Yt(v,8)+1,x=16<w?0:4<w?1:2<w?2:3;if(p[0]=Kt(b.Ea,x),b.b=x,x=m=ie(w,1,0,g,b.K)){var C,A=w,w=b,D=1<<(8>>w.b),S=Ro(D);if(null==S)x=0;else{var _=w.K[0],P=w.w;for(S[0]=w.K[0][0],C=1;C<+A;++C)S[C]=$t(_[P+C],S[C-1]);for(;C<4*D;++C)S[C]=0;w.K[0]=null,w.K[0]=S,x=1}}m=x;break;case 2:break;default:Bo(0)}a=m}}if(s=s[0],l=l[0],a&&Yt(c,1)&&!(a=1<=(h=Yt(c,4))&&h<=11)){i.a=3;break t}if(r=a)e:{var k,F=i,I=s,E=l,L=h,N=n,O=F.m,T=F.s,B=[null],M=1,z=0,j=qi[L];n:for(;;){if(N&&Yt(O,1)){var R=Yt(O,3)+2,U=Kt(I,R),W=Kt(E,R),H=U*W;if(!ie(U,W,0,F,B))break n;for(B=B[0],T.xc=R,J=0;J<H;++J){var V=B[J]>>8&65535;M<=(B[J]=V)&&(M=1+V)}}if(O.h)break n;for(nt=0;nt<5;++nt){var q=Ui[nt];!nt&&0<L&&(q+=1<<L),z<q&&(z=q)}var U=Uo(M*j,qt),W=M,R=Uo(W,Gt),G=null==R?null:(Bo(W<=65536),R),Y=Ro(z);if(null==G||null==Y||null==U){F.a=1;break n}for(var Z=U,J=k=0;J<M;++J){for(var X=G[J],Q=X.G,K=X.H,$=0,tt=1,et=0,nt=0;nt<5;++nt){q=Ui[nt],!nt&&0<L&&(q+=1<<L);i:{var it,ot=q,rt=F,at=Y,st=Q[nt]=Z,lt=K[nt]=k,ct=0,ut=rt.m,dt=Yt(ut,1);if(jo(at,0,0,ot),dt){var ht=Yt(ut,1)+1,pt=Yt(ut,1),pt=Yt(ut,0==pt?1:8);at[pt]=1,2==ht&&(at[pt=Yt(ut,8)]=1);ht=1}else{var ft=Ro(19),gt=Yt(ut,4)+4;if(19<gt){rt.a=3;var mt=0;break i}for(it=0;it<gt;++it)ft[Hi[it]]=Yt(ut,3);var vt=void 0,bt=void 0,pt=rt,yt=ft,wt=ot,xt=at,Ct=0,At=pt.m,Dt=8,St=Uo(128,qt);o:for(;Vt(St,0,7,yt,19);){if(Yt(At,1)){var _t=2+2*Yt(At,3);if(wt<(vt=2+Yt(At,_t)))break o}else vt=wt;for(bt=0;bt<wt&&vt--;){Xt(At);var Pt=St[127&Zt(At)];Jt(At,At.u+Pt.g);var kt=Pt.value;if(kt<16)0!=(xt[bt++]=kt)&&(Dt=kt);else{var Ft=16==kt,Pt=kt-16,kt=Ri[Pt],It=Yt(At,ji[Pt])+kt;if(wt<bt+It)break o;for(var Et=Ft?Dt:0;0<It--;)xt[bt++]=Et}}Ct=1;break o}Ct||(pt.a=3),ht=Ct}(ht=ht&&!ut.h)&&(ct=Vt(st,lt,8,at,ot)),mt=ht&&0!=ct?ct:(rt.a=3,0)}if(0==mt)break n;if(tt&&1==Wi[nt]&&(tt=0==Z[k].g),$+=Z[k].g,k+=mt,nt<=3){for(var Lt=Y[0],Nt=1;Nt<q;++Nt)Y[Nt]>Lt&&(Lt=Y[Nt]);et+=Lt}}if(X.nd=tt,X.Qb=0,tt&&(X.qb=(Q[3][K[3]+0].value<<24|Q[1][K[1]+0].value<<16|Q[2][K[2]+0].value)>>>0,0==$&&Q[0][K[0]+0].value<256&&(X.Qb=1,X.qb+=Q[0][K[0]+0].value<<8)),X.jc=!X.Qb&&et<6,X.jc)for(var Ot=X,Tt=0;Tt<En;++Tt){var Bt=Tt,Mt=Ot.pd[Bt],zt=Ot.G[0][Ot.H[0]+Bt];256<=zt.value?(Mt.g=zt.g+256,Mt.value=zt.value):(Mt.g=0,Mt.value=0,Bt>>=te(zt,8,Mt),Bt>>=te(Ot.G[1][Ot.H[1]+Bt],16,Mt),Bt>>=te(Ot.G[2][Ot.H[2]+Bt],0,Mt),te(Ot.G[3][Ot.H[3]+Bt],24,Mt))}}T.vc=B,T.Wb=M,T.Ya=G,T.yc=U,r=1;break e}r=0}if(!(a=r)){i.a=3;break t}if(0<h){if(u.ua=1<<h,!Qt(u.Wa,h)){i.a=1,a=0;break t}}else u.ua=0;var jt=i,Rt=s,Ut=l,Wt=jt.s,Ht=Wt.xc;if(jt.c=Rt,jt.i=Ut,Wt.md=Kt(Rt,Ht),Wt.wc=0==Ht?-1:(1<<Ht)-1,n){i.xb=ao;break t}if(null==(d=Ro(s*l))){i.a=1,a=0;break t}a=(a=ee(i,d,0,s,l,l,null))&&!c.h;break t}return a?(null!=o?o[0]=d:(Bo(null==d),Bo(n)),i.$=0,n||ne(u)):ne(u),a}function ct(t,e){var n=t.c*t.i,i=n+e+16*e;return Bo(t.c<=e),t.V=Ro(i),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+e,1)}function ut(t,e){var n=t.C,i=e-n,o=t.V,r=t.Ba+t.c*n;for(Bo(e<=t.l.o);0<i;){var a=16<i?16:i,s=t.l.ma,l=t.l.width,c=l*a,u=s.ca,d=s.tb+l*n,h=t.Ta,p=t.Ua;it(t,a,o,r),bi(h,p,u,d,c),at(s,n,n+a,u,d,l),i-=a,o+=a*t.c,n+=a}Bo(n==e),t.C=t.Ma=e}function dt(){this.ub=this.yd=this.td=this.Rb=0}function ht(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function pt(){this.Fb=this.Bb=this.Cb=0,this.Zb=Ro(4),this.Lb=Ro(4)}function ft(){this.Yb=Wo()}function gt(){this.jb=Ro(3),this.Wc=Ho([4,8],ft),this.Xc=Ho([4,17],ft)}function mt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new Ro(4),this.od=new Ro(4)}function vt(){this.ld=this.La=this.dd=this.tc=0}function bt(){this.Na=this.la=0}function yt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function wt(){this.ad=Ro(384),this.Za=0,this.Ob=Ro(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function xt(){this.uc=this.M=this.Nb=0,this.wa=Array(new vt),this.Y=0,this.ya=Array(new wt),this.aa=0,this.l=new St}function Ct(){this.y=Ro(16),this.f=Ro(8),this.ea=Ro(8)}function At(){this.cb=this.a=0,this.sc="",this.m=new e,this.Od=new dt,this.Kc=new ht,this.ed=new mt,this.Qa=new pt,this.Ic=this.$c=this.Aa=0,this.D=new xt,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=Uo(8,e),this.ia=0,this.pb=Uo(4,yt),this.Pa=new gt,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ct),this.Hd=0,this.rb=Array(new bt),this.sb=0,this.wa=Array(new vt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new wt),this.L=this.aa=0,this.gd=Ho([4,2],vt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Dt(t,e){return t<0?0:e<t?e:t}function St(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function _t(){var t=new At;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,Ji=Ji||It),t}function Pt(t,e,n){return 0==t.a&&(t.a=e,t.sc=n,t.cb=0),0}function kt(t,e,n){return 3<=n&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function Ft(t,e){if(null!=t){if(t.a=0,t.sc="OK",null==e)return Pt(t,2,"null VP8Io passed to VP8GetHeaders()"),0;var n=e.data,i=e.w;if((u=e.ha)<4)return Pt(t,7,"Truncated header."),0;var o=n[i+0]|n[i+1]<<8|n[i+2]<<16,r=t.Od;if(r.Rb=!(1&o),r.td=o>>1&7,r.yd=o>>4&1,r.ub=o>>5,3<r.td)return Pt(t,3,"Incorrect keyframe parameters."),0;if(!r.yd)return Pt(t,4,"Frame not displayable."),0;i+=3,u-=3;var a=t.Kc;if(r.Rb){if(u<7)return Pt(t,7,"cannot parse picture header"),0;if(!kt(n,i,u))return Pt(t,3,"Bad code word"),0;a.c=16383&(n[i+4]<<8|n[i+3]),a.Td=n[i+4]>>6,a.i=16383&(n[i+6]<<8|n[i+5]),a.Ud=n[i+6]>>6,i+=7,u-=7,t.za=a.c+15>>4,t.Ub=a.i+15>>4,e.width=a.c,e.height=a.i,e.Da=0,e.j=0,e.v=0,e.va=e.width,e.o=e.height,e.da=0,e.ib=e.width,e.hb=e.height,e.U=e.width,e.T=e.height,jo((o=t.Pa).jb,0,255,o.jb.length),Bo(null!=(o=t.Qa)),o.Cb=0,o.Bb=0,o.Fb=1,jo(o.Zb,0,0,o.Zb.length),jo(o.Lb,0,0,o.Lb)}if(r.ub>u)return Pt(t,7,"bad partition length"),0;f(o=t.m,n,i,r.ub),i+=r.ub,u-=r.ub,r.Rb&&(a.Ld=x(o),a.Kd=x(o)),a=t.Qa;var s,l=t.Pa;if(Bo(null!=o),Bo(null!=a),a.Cb=x(o),a.Cb){if(a.Bb=x(o),x(o)){for(a.Fb=x(o),s=0;s<4;++s)a.Zb[s]=x(o)?v(o,7):0;for(s=0;s<4;++s)a.Lb[s]=x(o)?v(o,6):0}if(a.Bb)for(s=0;s<3;++s)l.jb[s]=x(o)?g(o,8):255}else a.Bb=0;if(o.Ka)return Pt(t,3,"cannot parse segment header"),0;if((a=t.ed).zd=x(o),a.Tb=g(o,6),a.wb=g(o,3),a.Pc=x(o),a.Pc&&x(o)){for(l=0;l<4;++l)x(o)&&(a.vd[l]=v(o,6));for(l=0;l<4;++l)x(o)&&(a.od[l]=v(o,6))}if(t.L=0==a.Tb?0:a.zd?1:2,o.Ka)return Pt(t,3,"cannot parse filter header"),0;var c=u,u=s=i,i=s+c,a=c;if(t.Xb=(1<<g(t.m,2))-1,c<3*(l=t.Xb))n=7;else{for(s+=3*l,a-=3*l,c=0;c<l;++c){var d=n[u+0]|n[u+1]<<8|n[u+2]<<16;a<d&&(d=a),f(t.Jc[+c],n,s,d),s+=d,a-=d,u+=3}f(t.Jc[+l],n,s,a),n=s<i?0:5}if(0!=n)return Pt(t,n,"cannot parse partitions"),0;for(n=g(s=t.m,7),u=x(s)?v(s,4):0,i=x(s)?v(s,4):0,a=x(s)?v(s,4):0,l=x(s)?v(s,4):0,s=x(s)?v(s,4):0,c=t.Qa,d=0;d<4;++d){if(c.Cb){var h=c.Zb[d];c.Fb||(h+=n)}else{if(0<d){t.pb[d]=t.pb[0];continue}h=n}var p=t.pb[d];p.Sc[0]=Yi[Dt(h+u,127)],p.Sc[1]=Zi[Dt(h+0,127)],p.Eb[0]=2*Yi[Dt(h+i,127)],p.Eb[1]=101581*Zi[Dt(h+a,127)]>>16,p.Eb[1]<8&&(p.Eb[1]=8),p.Qc[0]=Yi[Dt(h+l,117)],p.Qc[1]=Zi[Dt(h+s,127)],p.lc=h+s}if(!r.Rb)return Pt(t,4,"Not a key frame."),0;for(x(o),r=t.Pa,n=0;n<4;++n){for(u=0;u<8;++u)for(i=0;i<3;++i)for(a=0;a<11;++a)l=j(o,eo[n][u][i][a])?g(o,8):$i[n][u][i][a],r.Wc[n][u].Yb[i][a]=l;for(u=0;u<17;++u)r.Xc[n][u]=r.Wc[n][no[u]]}return t.kc=x(o),t.kc&&(t.Bd=g(o,8)),t.cb=1}}function It(t,e,n,i,o,r,a){var s=e[o].Yb[n];for(n=0;o<16;++o){if(!j(t,s[n+0]))return o;for(;!j(t,s[n+1]);)if(s=e[++o].Yb[0],n=0,16==o)return 16;var l=e[o+1].Yb;if(j(t,s[n+2])){var c=t,u=0;if(j(c,(h=s)[(d=n)+3]))if(j(c,h[d+6])){for(s=0,d=2*(u=j(c,h[d+8]))+(h=j(c,h[d+9+u])),u=0,h=Xi[d];h[s];++s)u+=u+j(c,h[s]);u+=3+(8<<d)}else j(c,h[d+7])?(u=7+2*j(c,165),u+=j(c,145)):u=5+j(c,159);else u=j(c,h[d+4])?3+j(c,h[d+5]):2;s=l[2]}else s=l[u=1];l=a+Qi[o],(c=t).b<0&&b(c);var d,h=c.b,p=(d=c.Ca>>1)-(c.I>>h)>>31;--c.b,c.Ca+=p,c.Ca|=1,c.I-=(d+1&p)<<h,r[l]=((u^p)-p)*i[+(0<o)]}return 16}function Et(t){var e=t.rb[t.sb-1];e.la=0,e.Na=0,jo(t.zc,0,0,t.zc.length),t.ja=0}function Lt(t,e){for(t.M=0;t.M<t.Va;++t.M){for(var n=t.Jc[t.M&t.Xb],i=t.m,o=t,r=0;r<o.za;++r){var a=i,s=(p=o).Ac,l=p.Bc+4*r,c=p.zc,u=p.ya[p.aa+r];if(p.Qa.Bb?u.$b=j(a,p.Pa.jb[0])?2+j(a,p.Pa.jb[2]):j(a,p.Pa.jb[1]):u.$b=0,p.kc&&(u.Ad=j(a,p.Bd)),u.Za=+!j(a,145),u.Za)for(var d=u.Ob,h=0,p=0;p<4;++p){for(var f=c[0+p],g=0;g<4;++g){f=to[s[l+g]][f];for(var m=Ki[j(a,f[0])];0<m;)m=Ki[2*m+j(a,f[m])];f=-m,s[l+g]=f}zo(d,h,s,l,4),h+=4,c[0+p]=f}else f=j(a,156)?j(a,128)?1:3:j(a,163)?2:0,jo(s,l,u.Ob[0]=f,4),jo(c,0,f,4);u.Dd=j(a,142)?j(a,114)?j(a,183)?1:3:2:0}if(o.m.Ka)return Pt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(o=n,a=(i=t).rb[i.sb-1],s=i.rb[i.sb+i.ja],r=i.ya[i.aa+i.ja],l=i.kc?r.Ad:0)a.la=s.la=0,r.Za||(a.Na=s.Na=0),r.Hc=0,r.Gc=0,r.ia=0;else{var v,a=s,s=o,l=i.Pa.Xc,c=i.ya[i.aa+i.ja],u=i.pb[c.$b];if(p=c.ad,d=0,h=i.rb[i.sb-1],jo(p,d,f=g=0,384),c.Za)var b=0,y=l[3];else{m=Ro(16);var w=a.Na+h.Na,w=Ji(s,l[1],w,u.Eb,0,m,0);if(a.Na=h.Na=+(0<w),1<w)Qn(m,0,p,d);else for(var x=m[0]+3>>3,m=0;m<256;m+=16)p[d+m]=x;b=1,y=l[0]}var C=15&a.la,A=15&h.la;for(m=0;m<4;++m){for(var D=1&A,x=v=0;x<4;++x)C=C>>1|(D=b<(w=Ji(s,y,w=D+(1&C),u.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,k,F,S,B+4,T,I)),L.La&&(li(N,O,E,B,T,I),ui(_,P,k,F,S,B,T,I)),0<y&&(ii(N,O,E,B+4,T,I),ri(_,P,k,F,S,B+4,T,I)),L.La&&(si(N,O,E,B,T,I),ci(_,P,k,F,S,B,T,I))))}if(n.ia&&alert("todo:DitherRow"),null!=i.put){if(v=16*C,C=16*(C+1),A?(i.y=n.sa,i.O=n.ta+m,i.f=n.qa,i.N=n.ra+x,i.ea=n.Ha,i.W=n.Ia+x):(v-=f,i.y=l,i.O=c,i.f=u,i.N=p,i.ea=d,i.W=h),g||(C-=f),C>i.o&&(C=i.o),i.F=null,(i.J=null)!=n.Fa&&0<n.Fa.length&&v<C&&(i.J=function(t,e,n,i){var o,r,a=e.width,s=e.o;if(Bo(null!=t&&null!=e),n<0||i<=0||s<n+i)return null;if(!t.Cc){if(null==t.ga){if(t.ga=new tn,(o=null==t.ga)||(o=e.width*e.o,Bo(0==t.Gb.length),t.Gb=Ro(o),t.Uc=0,o=!(o=null==t.Gb?0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,1))),!o){o=t.ga;var l=t.Fa,c=t.P,u=t.qc,d=t.mb,h=t.nb,p=c+1,f=u-1,g=o.l;if(Bo(null!=l&&null!=d&&null!=e),lo[0]=null,lo[1]=en,lo[2]=nn,lo[3]=on,o.ca=d,o.tb=h,o.c=e.width,o.i=e.height,Bo(0<o.c&&0<o.i),u<=1)e=0;else if(o.$a=l[c+0]>>0&3,o.Z=l[c+0]>>2&3,o.Lc=l[c+0]>>4&3,c=l[c+0]>>6&3,o.$a<0||1<o.$a||4<=o.Z||1<o.Lc||c)e=0;else if(g.put=X,g.ac=J,g.bc=Q,g.ma=o,g.width=e.width,g.height=e.height,g.Da=e.Da,g.v=e.v,g.va=e.va,g.j=e.j,g.o=e.o,o.$a)e:{Bo(1==o.$a),e=lt();n:for(;;){if(null==e){e=0;break e}if(Bo(null!=o),(o.mc=e).c=o.c,e.i=o.i,e.l=o.l,e.l.ma=o,e.l.width=o.c,e.l.height=o.i,e.a=0,M(e.m,l,p,f),!ie(o.c,o.i,1,e,null))break n;if(!(e=1==e.ab&&3==e.gc[0].hc&&rt(e.s)?(o.ic=1,l=e.c*e.i,e.Ta=null,e.Ua=0,e.V=Ro(l),e.Ba=0,null==e.V?(e.a=1,0):1):(o.ic=0,ct(e,o.c))))break n;e=1;break e}o.mc=null,e=0}else e=f>=o.c*o.i;o=!e}if(o)return null;1!=t.ga.Lc?t.Ga=0:i=s-n}Bo(null!=t.ga),Bo(n+i<=s);e:{if(l=t.ga,e=l.c,s=l.l.o,0==l.$a){if(p=t.rc,f=t.Vc,g=t.Fa,c=t.P+1+n*e,u=t.mb,d=t.nb+n*e,Bo(c<=t.P+t.qc),0!=l.Z)for(Bo(null!=lo[l.Z]),o=0;o<i;++o)lo[l.Z](p,f,g,c,u,d,e),p=u,f=d,d+=e,c+=e;else for(o=0;o<i;++o)zo(u,d,g,c,e),p=u,f=d,d+=e,c+=e;t.rc=p,t.Vc=f}else{if(Bo(null!=l.mc),e=n+i,Bo(null!=(o=l.mc)),Bo(e<=o.i),o.C>=e)e=1;else if(l.ic||cn(),l.ic){var l=o.V,p=o.Ba,f=o.c,m=o.i,g=1,c=o.$/f,u=o.$%f,d=o.m,h=o.s,v=o.$,b=f*m,y=f*e,w=h.wc,x=v<y?nt(h,u,c):null;Bo(v<=b),Bo(e<=m),Bo(rt(h));n:for(;;){for(;!d.h&&v<y;){if(u&w||(x=nt(h,u,c)),Bo(null!=x),Xt(d),(m=et(x.G[0],x.H[0],d))<256)l[p+v]=m,++v,f<=++u&&(u=0,++c<=e&&!(c%16)&&st(o,c));else{if(!(m<280)){g=0;break n}var m=$(m-256,d),C=et(x.G[4],x.H[4],d);if(Xt(d),C=$(C,d),!((C=tt(f,C))<=v&&m<=b-v)){g=0;break n}for(r=0;r<m;++r)l[p+v+r]=l[p+v+r-C];for(v+=m,u+=m;f<=u;)u-=f,++c<=e&&!(c%16)&&st(o,c);v<y&&u&w&&(x=nt(h,u,c))}Bo(d.h==z(d))}st(o,e<c?e:c);break n}!g||d.h&&v<b?(g=0,o.a=d.h?5:3):o.$=v,e=g}else e=ee(o,o.V,o.Ba,o.c,o.i,e,ut);if(!e){i=0;break e}}s<=n+i&&(t.Cc=1),i=1}if(!i)return null;if(t.Cc&&(null!=(i=t.ga)&&(i.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+n*a}(n,i,v,C-v),i.F=n.mb,null==i.F&&0==i.F.length)){o=Pt(n,3,"Could not decode alpha data.");break t}v<i.j&&(f=i.j-v,v=i.j,Bo(!(1&f)),i.O+=n.R*f,i.N+=n.B*(f>>1),i.W+=n.B*(f>>1),null!=i.F&&(i.J+=i.width*f)),v<C&&(i.O+=i.v,i.N+=i.v>>1,i.W+=i.v>>1,null!=i.F&&(i.J+=i.v),i.ka=v-i.j,i.U=i.va-i.v,i.T=C-v,o=i.put(i))}r+1!=n.Ic||g||(zo(n.sa,n.ta-a,l,c+16*n.R,a),zo(n.qa,n.ra-s,u,p+8*n.B,s),zo(n.Ha,n.Ia-s,d,h+8*n.B,s))}if(!o)return Pt(t,6,"Output aborted.")}return 1}function Nt(t,e,n,i,o){o=t[e+n+32*i]+(o>>3),t[e+n+32*i]=-256&o?o<0?0:255:o}function Ot(t,e,n,i,o,r){Nt(t,e,0,n,i+o),Nt(t,e,1,n,i+r),Nt(t,e,2,n,i-r),Nt(t,e,3,n,i-o)}function Tt(t){return(20091*t>>16)+t}function Bt(t,e,n,i){for(var o=0,r=Ro(16),a=0;a<4;++a){var s=t[e+0]+t[e+8],l=t[e+0]-t[e+8],c=(35468*t[e+4]>>16)-Tt(t[e+12]),u=Tt(t[e+4])+(35468*t[e+12]>>16);r[o+0]=s+u,r[o+1]=l+c,r[o+2]=l-c,r[o+3]=s-u,o+=4,e++}for(a=o=0;a<4;++a)s=(t=r[o+0]+4)+r[o+8],l=t-r[o+8],c=(35468*r[o+4]>>16)-Tt(r[o+12]),Nt(n,i,0,0,s+(u=Tt(r[o+4])+(35468*r[o+12]>>16))),Nt(n,i,1,0,l+c),Nt(n,i,2,0,l-c),Nt(n,i,3,0,s-u),o++,i+=32}function Mt(t,e,n,i){var o=t[e+0]+4,r=35468*t[e+4]>>16,a=Tt(t[e+4]),s=35468*t[e+1]>>16;Ot(n,i,0,o+a,t=Tt(t[e+1]),s),Ot(n,i,1,o+r,t,s),Ot(n,i,2,o-r,t,s),Ot(n,i,3,o-a,t,s)}function zt(t,e,n,i,o){Bt(t,e,n,i),o&&Bt(t,e+16,n,i+4)}function jt(t,e,n,i){Kn(t,e+0,n,i,1),Kn(t,e+32,n,i+128,1)}function Rt(t,e,n,i){var o;for(t=t[e+0]+4,o=0;o<4;++o)for(e=0;e<4;++e)Nt(n,i,e,o,t)}function Ut(t,e,n,i){t[e+0]&&ei(t,e+0,n,i),t[e+16]&&ei(t,e+16,n,i+4),t[e+32]&&ei(t,e+32,n,i+128),t[e+48]&&ei(t,e+48,n,i+128+4)}function Wt(t,e,n,i){for(var o=Ro(16),r=0;r<4;++r){var a=t[e+0+r]+t[e+12+r],s=t[e+4+r]+t[e+8+r],l=t[e+4+r]-t[e+8+r],c=t[e+0+r]-t[e+12+r];o[0+r]=a+s,o[8+r]=a-s,o[4+r]=c+l,o[12+r]=c-l}for(r=0;r<4;++r)a=(t=o[0+4*r]+3)+o[3+4*r],s=o[1+4*r]+o[2+4*r],l=o[1+4*r]-o[2+4*r],c=t-o[3+4*r],n[i+0]=a+s>>3,n[i+16]=c+l>>3,n[i+32]=a-s>>3,n[i+48]=c-l>>3,i+=64}function Ht(t,e,n){for(var i=e-32,o=_i,r=255-t[i-1],a=0;a<n;++a){for(var s=o,l=r+t[e-1],c=0;c<n;++c)t[e+c]=s[l+t[i+c]];e+=32}}function oe(t,e){Ht(t,e,4)}function re(t,e){Ht(t,e,8)}function ae(t,e){Ht(t,e,16)}function se(t,e){for(var n=0;n<16;++n)zo(t,e+32*n,t,e-32,16)}function le(t,e){for(var n=16;0<n;--n)jo(t,e,t[e-1],16),e+=32}function ce(t,e,n){for(var i=0;i<16;++i)jo(e,n+32*i,t,16)}function ue(t,e){for(var n=16,i=0;i<16;++i)n+=t[e-1+32*i]+t[e+i-32];ce(n>>5,t,e)}function de(t,e){for(var n=8,i=0;i<16;++i)n+=t[e-1+32*i];ce(n>>4,t,e)}function he(t,e){for(var n=8,i=0;i<16;++i)n+=t[e+i-32];ce(n>>4,t,e)}function pe(t,e){ce(128,t,e)}function fe(t,e,n){return t+2*e+n+2>>2}function ge(t,e){for(var n=e-32,n=new Uint8Array([fe(t[n-1],t[n],t[1+n]),fe(t[n],t[1+n],t[2+n]),fe(t[1+n],t[2+n],t[3+n]),fe(t[2+n],t[3+n],t[4+n])]),i=0;i<4;++i)zo(t,e+32*i,n,0,n.length)}function me(t,e){var n=t[e-1],i=t[e-1+32],o=t[e-1+64],r=t[e-1+96];a(t,e+0,16843009*fe(t[e-1-32],n,i)),a(t,e+32,16843009*fe(n,i,o)),a(t,e+64,16843009*fe(i,o,r)),a(t,e+96,16843009*fe(o,r,r))}function ve(t,e){for(var n=4,i=0;i<4;++i)n+=t[e+i-32]+t[e-1+32*i];for(n>>=3,i=0;i<4;++i)jo(t,e+32*i,n,4)}function be(t,e){var n=t[e-1],i=t[e-1+32],o=t[e-1+64],r=t[e-1-32],a=t[e+0-32],s=t[e+1-32],l=t[e+2-32],c=t[e+3-32];t[e+0+96]=fe(i,o,t[e-1+96]),t[e+1+96]=t[e+0+64]=fe(n,i,o),t[e+2+96]=t[e+1+64]=t[e+0+32]=fe(r,n,i),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=fe(a,r,n),t[e+3+64]=t[e+2+32]=t[e+1+0]=fe(s,a,r),t[e+3+32]=t[e+2+0]=fe(l,s,a),t[e+3+0]=fe(c,l,s)}function ye(t,e){var n=t[e+1-32],i=t[e+2-32],o=t[e+3-32],r=t[e+4-32],a=t[e+5-32],s=t[e+6-32],l=t[e+7-32];t[e+0+0]=fe(t[e+0-32],n,i),t[e+1+0]=t[e+0+32]=fe(n,i,o),t[e+2+0]=t[e+1+32]=t[e+0+64]=fe(i,o,r),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=fe(o,r,a),t[e+3+32]=t[e+2+64]=t[e+1+96]=fe(r,a,s),t[e+3+64]=t[e+2+96]=fe(a,s,l),t[e+3+96]=fe(s,l,l)}function we(t,e){var n=t[e-1],i=t[e-1+32],o=t[e-1+64],r=t[e-1-32],a=t[e+0-32],s=t[e+1-32],l=t[e+2-32],c=t[e+3-32];t[e+0+0]=t[e+1+64]=r+a+1>>1,t[e+1+0]=t[e+2+64]=a+s+1>>1,t[e+2+0]=t[e+3+64]=s+l+1>>1,t[e+3+0]=l+c+1>>1,t[e+0+96]=fe(o,i,n),t[e+0+64]=fe(i,n,r),t[e+0+32]=t[e+1+96]=fe(n,r,a),t[e+1+32]=t[e+2+96]=fe(r,a,s),t[e+2+32]=t[e+3+96]=fe(a,s,l),t[e+3+32]=fe(s,l,c)}function xe(t,e){var n=t[e+0-32],i=t[e+1-32],o=t[e+2-32],r=t[e+3-32],a=t[e+4-32],s=t[e+5-32],l=t[e+6-32],c=t[e+7-32];t[e+0+0]=n+i+1>>1,t[e+1+0]=t[e+0+64]=i+o+1>>1,t[e+2+0]=t[e+1+64]=o+r+1>>1,t[e+3+0]=t[e+2+64]=r+a+1>>1,t[e+0+32]=fe(n,i,o),t[e+1+32]=t[e+0+96]=fe(i,o,r),t[e+2+32]=t[e+1+96]=fe(o,r,a),t[e+3+32]=t[e+2+96]=fe(r,a,s),t[e+3+64]=fe(a,s,l),t[e+3+96]=fe(s,l,c)}function Ce(t,e){var n=t[e-1],i=t[e-1+32],o=t[e-1+64],r=t[e-1+96];t[e+0+0]=n+i+1>>1,t[e+2+0]=t[e+0+32]=i+o+1>>1,t[e+2+32]=t[e+0+64]=o+r+1>>1,t[e+1+0]=fe(n,i,o),t[e+3+0]=t[e+1+32]=fe(i,o,r),t[e+3+32]=t[e+1+64]=fe(o,r,r),t[e+3+64]=t[e+2+64]=t[e+0+96]=t[e+1+96]=t[e+2+96]=t[e+3+96]=r}function Ae(t,e){var n=t[e-1],i=t[e-1+32],o=t[e-1+64],r=t[e-1+96],a=t[e-1-32],s=t[e+0-32],l=t[e+1-32],c=t[e+2-32];t[e+0+0]=t[e+2+32]=n+a+1>>1,t[e+0+32]=t[e+2+64]=i+n+1>>1,t[e+0+64]=t[e+2+96]=o+i+1>>1,t[e+0+96]=r+o+1>>1,t[e+3+0]=fe(s,l,c),t[e+2+0]=fe(a,s,l),t[e+1+0]=t[e+3+32]=fe(n,a,s),t[e+1+32]=t[e+3+64]=fe(i,n,a),t[e+1+64]=t[e+3+96]=fe(o,i,n),t[e+1+96]=fe(r,o,i)}function De(t,e){for(var n=0;n<8;++n)zo(t,e+32*n,t,e-32,8)}function Se(t,e){for(var n=0;n<8;++n)jo(t,e,t[e-1],8),e+=32}function _e(t,e,n){for(var i=0;i<8;++i)jo(e,n+32*i,t,8)}function Pe(t,e){for(var n=8,i=0;i<8;++i)n+=t[e+i-32]+t[e-1+32*i];_e(n>>4,t,e)}function ke(t,e){for(var n=4,i=0;i<8;++i)n+=t[e+i-32];_e(n>>3,t,e)}function Fe(t,e){for(var n=4,i=0;i<8;++i)n+=t[e-1+32*i];_e(n>>3,t,e)}function Ie(t,e){_e(128,t,e)}function Ee(t,e,n){var i=t[e-n],o=t[e+0],r=3*(o-i)+Di[1020+t[e-2*n]-t[e+n]],a=Si[112+(r+4>>3)];t[e-n]=_i[255+i+Si[112+(r+3>>3)]],t[e+0]=_i[255+o-a]}function Le(t,e,n,i){var o=t[e+0],r=t[e+n];return Pi[255+t[e-2*n]-t[e-n]]>i||Pi[255+r-o]>i}function Ne(t,e,n,i){return 4*Pi[255+t[e-n]-t[e+0]]+Pi[255+t[e-2*n]-t[e+n]]<=i}function Oe(t,e,n,i,o){var r=t[e-3*n],a=t[e-2*n],s=t[e-n],l=t[e+0],c=t[e+n],u=t[e+2*n],d=t[e+3*n];return!(4*Pi[255+s-l]+Pi[255+a-c]>i)&&(Pi[255+t[e-4*n]-r]<=o&&Pi[255+r-a]<=o&&Pi[255+a-s]<=o&&Pi[255+d-u]<=o&&Pi[255+u-c]<=o&&Pi[255+c-l]<=o)}function Te(t,e,n,i){var o=2*i+1;for(i=0;i<16;++i)Ne(t,e+i,n,o)&&Ee(t,e+i,n)}function Be(t,e,n,i){var o=2*i+1;for(i=0;i<16;++i)Ne(t,e+i*n,1,o)&&Ee(t,e+i*n,1)}function Me(t,e,n,i){for(var o=3;0<o;--o)Te(t,e+=4*n,n,i)}function ze(t,e,n,i){for(var o=3;0<o;--o)Be(t,e+=4,n,i)}function je(t,e,n,i,o,r,a,s){for(r=2*r+1;0<o--;){var l,c,u,d,h,p,f,g,m,v,b;Oe(t,e,n,r,a)&&(Le(t,e,n,s)?Ee(t,e,n):(d=(l=t)[(c=e)-2*(u=n)],h=l[c-u],p=l[c+0],f=l[c+u],g=l[c+2*u],m=27*(b=Di[1020+3*(p-h)+Di[1020+d-f]])+63>>7,v=18*b+63>>7,b=9*b+63>>7,l[c-3*u]=_i[255+l[c-3*u]+b],l[c-2*u]=_i[255+d+v],l[c-u]=_i[255+h+m],l[c+0]=_i[255+p-m],l[c+u]=_i[255+f-v],l[c+2*u]=_i[255+g-b])),e+=i}}function Re(t,e,n,i,o,r,a,s){for(r=2*r+1;0<o--;){var l,c,u,d,h,p,f,g,m;Oe(t,e,n,r,a)&&(Le(t,e,n,s)?Ee(t,e,n):(d=(l=t)[(c=e)-(u=n)],h=l[c+0],p=l[c+u],f=Si[112+(4+(g=3*(h-d))>>3)],g=Si[112+(3+g>>3)],m=f+1>>1,l[c-2*u]=_i[255+l[c-2*u]+m],l[c-u]=_i[255+d+g],l[c+0]=_i[255+h-f],l[c+u]=_i[255+p-m])),e+=i}}function Ue(t,e,n,i,o,r){je(t,e,n,1,16,i,o,r)}function We(t,e,n,i,o,r){je(t,e,1,n,16,i,o,r)}function He(t,e,n,i,o,r){for(var a=3;0<a;--a)Re(t,e+=4*n,n,1,16,i,o,r)}function Ve(t,e,n,i,o,r){for(var a=3;0<a;--a)Re(t,e+=4,1,n,16,i,o,r)}function qe(t,e,n,i,o,r,a,s){je(t,e,o,1,8,r,a,s),je(n,i,o,1,8,r,a,s)}function Ge(t,e,n,i,o,r,a,s){je(t,e,1,o,8,r,a,s),je(n,i,1,o,8,r,a,s)}function Ye(t,e,n,i,o,r,a,s){Re(t,e+4*o,o,1,8,r,a,s),Re(n,i+4*o,o,1,8,r,a,s)}function Ze(t,e,n,i,o,r,a,s){Re(t,e+4,1,o,8,r,a,s),Re(n,i+4,1,o,8,r,a,s)}function Je(){this.ba=new H,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new q,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Xe(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Qe(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ke(){this.ua=0,this.Wa=new o,this.vb=new o,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Gt,this.yc=new qt}function $e(){this.xb=this.a=0,this.l=new St,this.ca=new H,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new k,this.Pb=0,this.wd=new k,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ke,this.ab=0,this.gc=Uo(4,Qe),this.Oc=0}function tn(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new St,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function en(t,e,n,i,o,r,a){for(t=null==t?0:t[e+0],e=0;e<a;++e)o[r+e]=t+n[i+e]&255,t=o[r+e]}function nn(t,e,n,i,o,r,a){if(null==t)en(null,null,n,i,o,r,a);else for(var s=0;s<a;++s)o[r+s]=t[e+s]+n[i+s]&255}function on(t,e,n,i,o,r,a){if(null==t)en(null,null,n,i,o,r,a);else for(var s=t[e+0],l=s,c=s,u=0;u<a;++u)l=c+(s=t[e+u])-l,c=n[i+u]+(-256&l?l<0?0:255:l)&255,l=s,o[r+u]=c}function rn(t,e,n,i,o,r){for(;0<o--;){for(var a=t,s=e+(n?1:0),l=t,c=e+(n?0:3),u=0;u<i;++u){var d=l[c+4*u];255!=d&&(d*=32897,a[s+4*u+0]=a[s+4*u+0]*d>>23,a[s+4*u+1]=a[s+4*u+1]*d>>23,a[s+4*u+2]=a[s+4*u+2]*d>>23)}e+=r}}function an(t,e,n,i,o){for(;0<i--;){for(var r=0;r<n;++r){var a=t[e+2*r+0],s=15&(c=t[e+2*r+1]),l=4369*s,c=(240&c|c>>4)*l>>16;t[e+2*r+0]=(240&a|a>>4)*l>>16&240|(15&a|a<<4)*l>>16>>4&15,t[e+2*r+1]=240&c|s}e+=o}}function sn(t,e,n,i,o,r,a,s){for(var l,c=255,u=0;u<o;++u){for(l=0;l<i;++l){var d=t[e+l];c&=r[a+4*l]=d}e+=n,a+=s}return 255!=c}function ln(t,e,n,i,o){for(var r=0;r<o;++r)n[i+r]=t[e+r]>>8}function cn(){gi=rn,mi=an,vi=sn,bi=ln}function un(t,_,P){m[t]=function(t,e,n,i,o,r,a,s,l,c,u,d,h,p,f,g,m){var v,b=m-1>>1,y=o[r+0]|a[s+0]<<16,w=l[c+0]|u[d+0]<<16;Bo(null!=t);var x=3*y+w+131074>>2;for(_(t[e+0],255&x,x>>16,h,p),null!=n&&(x=3*w+y+131074>>2,_(n[i+0],255&x,x>>16,f,g)),v=1;v<=b;++v){var C=o[r+v]|a[s+v]<<16,A=l[c+v]|u[d+v]<<16,D=y+C+w+A+524296,S=D+2*(C+w)>>3,x=S+y>>1,y=(D=D+2*(y+A)>>3)+C>>1;_(t[e+2*v-1],255&x,x>>16,h,p+(2*v-1)*P),_(t[+(e+2*v)],255&y,y>>16,h,p+2*v*P),null!=n&&(x=D+w>>1,y=S+A>>1,_(n[i+2*v-1],255&x,x>>16,f,g+(2*v-1)*P),_(n[i+2*v+0],255&y,y>>16,f,g+(2*v+0)*P)),y=C,w=A}1&m||(x=3*y+w+131074>>2,_(t[e+m-1],255&x,x>>16,h,p+(m-1)*P),null!=n&&(x=3*w+y+131074>>2,_(n[i+m-1],255&x,x>>16,f,g+(m-1)*P)))}}function dn(){co[ki]=uo,co[Fi]=po,co[Ii]=ho,co[Ei]=fo,co[Li]=go,co[Ni]=mo,co[Oi]=vo,co[Ti]=po,co[Bi]=fo,co[Mi]=go,co[zi]=mo}function hn(t){return t&~Ao?t<0?0:255:t>>Co}function pn(t,e){return hn((19077*t>>8)+(26149*e>>8)-14234)}function fn(t,e,n){return hn((19077*t>>8)-(6419*e>>8)-(13320*n>>8)+8708)}function gn(t,e){return hn((19077*t>>8)+(33050*e>>8)-17685)}function mn(t,e,n,i,o){i[o+0]=pn(t,n),i[o+1]=fn(t,e,n),i[o+2]=gn(t,e)}function vn(t,e,n,i,o){i[o+0]=gn(t,e),i[o+1]=fn(t,e,n),i[o+2]=pn(t,n)}function bn(t,e,n,i,o){var r=fn(t,e,n);e=r<<3&224|gn(t,e)>>3,i[o+0]=248&pn(t,n)|r>>5,i[o+1]=e}function yn(t,e,n,i,o){var r=240&gn(t,e)|15;i[o+0]=240&pn(t,n)|fn(t,e,n)>>4,i[o+1]=r}function wn(t,e,n,i,o){i[o+0]=255,mn(t,e,n,i,o+1)}function xn(t,e,n,i,o){vn(t,e,n,i,o),i[o+3]=255}function Cn(t,e,n,i,o){mn(t,e,n,i,o),i[o+3]=255}function Dt(t,e){return t<0?0:e<t?e:t}function An(t,u,d){m[t]=function(t,e,n,i,o,r,a,s,l){for(var c=s+(-2&l)*d;s!=c;)u(t[e+0],n[i+0],o[r+0],a,s),u(t[e+1],n[i+0],o[r+0],a,s+d),e+=2,++i,++r,s+=2*d;1&l&&u(t[e+0],n[i+0],o[r+0],a,s)}}function Dn(t,e,n){return 0==n?0==t?0==e?6:5:0==e?4:0:n}function Sn(t,e,n,i,o){switch(t>>>30){case 3:Kn(e,n,i,o,0);break;case 2:$n(e,n,i,o);break;case 1:ei(e,n,i,o)}}function _n(t,e){for(var n,i=e.M,o=e.Nb,r=t.oc,a=t.pc+40,s=t.oc,l=t.pc+584,c=t.oc,u=t.pc+600,d=0;d<16;++d)r[a+32*d-1]=129;for(d=0;d<8;++d)s[l+32*d-1]=129,c[u+32*d-1]=129;for(0<i?r[a-1-32]=s[l-1-32]=c[u-1-32]=129:(jo(r,a-32-1,127,21),jo(s,l-32-1,127,9),jo(c,u-32-1,127,9)),n=0;n<t.za;++n){var h=e.ya[e.aa+n];if(0<n){for(d=-1;d<16;++d)zo(r,a+32*d-4,r,a+32*d+12,4);for(d=-1;d<8;++d)zo(s,l+32*d-4,s,l+32*d+4,4),zo(c,u+32*d-4,c,u+32*d+4,4)}var p=t.Gd,f=t.Hd+n,g=h.ad,m=h.Hc;if(0<i&&(zo(r,a-32,p[f].y,0,16),zo(s,l-32,p[f].f,0,8),zo(c,u-32,p[f].ea,0,8)),h.Za){var v=r,b=a-32+16;for(0<i&&(n>=t.za-1?jo(v,b,p[f].y[15],4):zo(v,b,p[f+1].y,0,4)),d=0;d<4;d++)v[b+128+d]=v[b+256+d]=v[b+384+d]=v[b+0+d];for(d=0;d<16;++d,m<<=2)v=r,b=a+Eo[d],oo[h.Ob[d]](v,b),Sn(m,g,16*+d,v,b)}else if(v=Dn(n,i,h.Ob[0]),io[v](r,a),0!=m)for(d=0;d<16;++d,m<<=2)Sn(m,g,16*+d,r,a+Eo[d]);for(d=h.Gc,v=Dn(n,i,h.Dd),ro[v](s,l),ro[v](c,u),m=g,v=s,b=l,255&(h=d>>0)&&(170&h?ti:ni)(m,256,v,b),h=c,m=u,255&(d>>=8)&&(170&d?ti:ni)(g,320,h,m),i<t.Ub-1&&(zo(p[f].y,0,r,a+480,16),zo(p[f].f,0,s,l+224,8),zo(p[f].ea,0,c,u+224,8)),d=8*o*t.B,p=t.sa,f=t.ta+16*n+16*o*t.R,g=t.qa,h=t.ra+8*n+d,m=t.Ha,v=t.Ia+8*n+d,d=0;d<16;++d)zo(p,f+d*t.R,r,a+32*d,16);for(d=0;d<8;++d)zo(g,h+d*t.B,s,l+32*d,8),zo(m,v+d*t.B,c,u+32*d,8)}}function Pn(t,e,n,i,o,r,a,s,l){var c=[0],u=[0],d=0,h=null!=l?l.kd:0,p=null!=l?l:new Xe;if(null==t||n<12)return 7;p.data=t,e=[p.w=e],n=[p.ha=n],p.gb=[p.gb];t:{var f=e,g=n,m=p.gb;if(Bo(null!=t),Bo(null!=g),Bo(null!=m),12<=g[m[0]=0]&&!Mo(t,f[0],"RIFF")){if(Mo(t,f[0]+8,"WEBP")){m=3;break t}var v=I(t,f[0]+4);if(v<12||4294967286<v){m=3;break t}if(h&&v>g[0]-8){m=7;break t}m[0]=v,f[0]+=12,g[0]-=12}m=0}if(0!=m)return m;for(v=0<p.gb[0],n=n[0];;){t:{var b=t,g=e,y=c,w=u,x=f=[0];if((m=n)[(D=d=[d])[0]=0]<8)m=7;else{if(!Mo(b,g[0],"VP8X")){if(10!=I(b,g[0]+4)){m=3;break t}if(m[0]<18){m=7;break t}var C=I(b,g[0]+8),A=1+F(b,g[0]+12);if(2147483648<=A*(b=1+F(b,g[0]+15))){m=3;break t}null!=x&&(x[0]=C),null!=y&&(y[0]=A),null!=w&&(w[0]=b),g[0]+=18,m[0]-=18,D[0]=1}m=0}}if(d=d[0],f=f[0],0!=m)return m;if(g=!!(2&f),!v&&d)return 3;if(null!=r&&(r[0]=!!(16&f)),null!=a&&(a[0]=g),null!=s&&(s[0]=0),a=c[0],f=u[0],d&&g&&null==l){m=0;break}if(n<4){m=7;break}if(v&&d||!v&&!d&&!Mo(t,e[0],"ALPH")){n=[n],p.na=[p.na],p.P=[p.P],p.Sa=[p.Sa];t:{C=t,m=e,v=n;var D=p.gb,y=p.na,w=p.P,x=p.Sa,A=22;Bo(null!=C),Bo(null!=v),b=m[0];var S=v[0];for(Bo(null!=y),Bo(null!=x),y[0]=null,w[0]=null,x[0]=0;;){if(m[0]=b,(v[0]=S)<8){m=7;break t}var _=I(C,b+4);if(4294967286<_){m=3;break t}var P=8+_+1&-2;if(A+=P,0<D&&D<A){m=3;break t}if(!Mo(C,b,"VP8 ")||!Mo(C,b,"VP8L")){m=0;break t}if(S[0]<P){m=7;break t}Mo(C,b,"ALPH")||(y[0]=C,w[0]=b+8,x[0]=_),b+=P,S-=P}}if(n=n[0],p.na=p.na[0],p.P=p.P[0],p.Sa=p.Sa[0],0!=m)break}n=[n],p.Ja=[p.Ja],p.xa=[p.xa];t:if(D=t,m=e,v=n,y=p.gb[0],w=p.Ja,x=p.xa,C=m[0],b=!Mo(D,C,"VP8 "),A=!Mo(D,C,"VP8L"),Bo(null!=D),Bo(null!=v),Bo(null!=w),Bo(null!=x),v[0]<8)m=7;else{if(b||A){if(D=I(D,C+4),12<=y&&y-12<D){m=3;break t}if(h&&D>v[0]-8){m=7;break t}w[0]=D,m[0]+=8,v[0]-=8,x[0]=A}else x[0]=5<=v[0]&&47==D[C+0]&&!(D[C+4]>>5),w[0]=v[0];m=0}if(n=n[0],p.Ja=p.Ja[0],p.xa=p.xa[0],e=e[0],0!=m)break;if(4294967286<p.Ja)return 3;if(null==s||g||(s[0]=p.xa?2:1),a=[a],f=[f],p.xa){if(n<5){m=7;break}s=a,h=f,g=r,t=!(null==t||n<5)&&5<=n&&47==t[e+0]&&!(t[e+4]>>5)?(v=[0],D=[0],y=[0],M(w=new k,t,e,n),K(w,v,D,y)?(null!=s&&(s[0]=v[0]),null!=h&&(h[0]=D[0]),null!=g&&(g[0]=y[0]),1):0):0}else{if(n<10){m=7;break}s=f,t=null==t||n<10||!kt(t,e+3,n-3)?0:(h=t[e+0]|t[e+1]<<8|t[e+2]<<16,g=16383&(t[e+7]<<8|t[e+6]),t=16383&(t[e+9]<<8|t[e+8]),1&h||3<(h>>1&7)||!(h>>4&1)||h>>5>=p.Ja||!g||!t?0:(a&&(a[0]=g),s&&(s[0]=t),1))}if(!t)return 3;if(a=a[0],f=f[0],d&&(c[0]!=a||u[0]!=f))return 3;null!=l&&(l[0]=p,l.offset=e-l.w,Bo(e-l.w<4294967286),Bo(l.offset==l.ha-n));break}return 0==m||7==m&&d&&null==l?(null!=r&&(r[0]|=null!=p.na&&0<p.na.length),null!=i&&(i[0]=a),null!=o&&(o[0]=f),0):m}function kn(t,e,n){var i=e.width,o=e.height,r=0,a=0,s=i,l=o;if(e.Da=null!=t&&0<t.Da,!(e.Da&&(s=t.cd,l=t.bd,r=t.v,a=t.j,n<11||(r&=-2,a&=-2),r<0||a<0||s<=0||l<=0||i<r+s||o<a+l))){if(e.v=r,e.j=a,e.va=r+s,e.o=a+l,e.U=s,e.T=l,e.da=null!=t&&0<t.da,e.da){if(!C(s,l,n=[t.ib],r=[t.hb]))return;e.ib=n[0],e.hb=r[0]}return e.ob=null!=t&&t.ob,e.Kb=null==t||!t.Sd,e.da&&(e.ob=e.ib<3*i/4&&e.hb<3*o/4,e.Kb=0),1}}function Fn(t){return null==t?2:(t.S<11?((e=t.f.RGBA).fb+=(t.height-1)*e.A,e.A=-e.A):(e=t.f.kb,t=t.height,e.O+=(t-1)*e.fa,e.fa=-e.fa,e.N+=(t-1>>1)*e.Ab,e.Ab=-e.Ab,e.W+=(t-1>>1)*e.Db,e.Db=-e.Db,null!=e.F&&(e.J+=(t-1)*e.lb,e.lb=-e.lb)),0);var e}function In(t,e,n,i){if(null==i||t<=0||e<=0)return 2;if(null!=n){if(n.Da){var o=n.cd,r=n.bd,a=-2&n.v,s=-2&n.j;if(a<0||s<0||o<=0||r<=0||t<a+o||e<s+r)return 2;t=o,e=r}if(n.da){if(!C(t,e,o=[n.ib],r=[n.hb]))return 2;t=o[0],e=r[0]}}i.width=t,i.height=e;t:{var l,c,u,d=i.width,h=i.height;if(t=i.S,d<=0||h<=0||!(ki<=t&&t<13))t=2;else{if(i.Rd<=0&&null==i.sd){var a=r=o=e=0,p=(s=d*To[t])*h;if(t<11||(r=(h+1)/2*(e=(d+1)/2),12==t&&(a=(o=d)*h)),null==(h=Ro(p+2*r+a))){t=1;break t}i.sd=h,t<11?((d=i.f.RGBA).eb=h,d.fb=0,d.A=s,d.size=p):((d=i.f.kb).y=h,d.O=0,d.fa=s,d.Fd=p,d.f=h,d.N=0+p,d.Ab=e,d.Cd=r,d.ea=h,d.W=0+p+r,d.Db=e,d.Ed=r,12==t&&(d.F=h,d.J=0+p+2*r),d.Tc=a,d.lb=o)}e=1,o=i.S,r=i.width,a=i.height,ki<=o&&o<13?o<11?(t=i.f.RGBA,e&=(s=Math.abs(t.A))*(a-1)+r<=t.size,e&=s>=r*To[o],e&=null!=t.eb):(t=i.f.kb,s=(r+1)/2,p=(a+1)/2,d=Math.abs(t.fa),h=Math.abs(t.Ab),l=Math.abs(t.Db),u=(c=Math.abs(t.lb))*(a-1)+r,e&=d*(a-1)+r<=t.Fd,e&=h*(p-1)+s<=t.Cd,e=(e&=l*(p-1)+s<=t.Ed)&r<=d&s<=h&s<=l,e&=null!=t.y,e&=null!=t.f,e&=null!=t.ea,12==o&&(e&=r<=c,e&=u<=t.Tc,e&=null!=t.F)):e=0,t=e?0:2}}return 0!=t||null!=n&&n.fd&&(t=Fn(i)),t}var En=64,Ln=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Nn=24,On=32,Tn=8,Bn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];r("Predictor0","PredictorAdd0"),m.Predictor0=function(){return 4278190080},m.Predictor1=function(t){return t},m.Predictor2=function(t,e,n){return e[n+0]},m.Predictor3=function(t,e,n){return e[n+1]},m.Predictor4=function(t,e,n){return e[n-1]},m.Predictor5=function(t,e,n){return s(s(t,e[n+1]),e[n+0])},m.Predictor6=function(t,e,n){return s(t,e[n-1])},m.Predictor7=function(t,e,n){return s(t,e[n+0])},m.Predictor8=function(t,e,n){return s(e[n-1],e[n+0])},m.Predictor9=function(t,e,n){return s(e[n+0],e[n+1])},m.Predictor10=function(t,e,n){return s(s(t,e[n-1]),s(e[n+0],e[n+1]))},m.Predictor11=function(t,e,n){var i=e[n+0];return u(i>>24&255,t>>24&255,(e=e[n-1])>>24&255)+u(i>>16&255,t>>16&255,e>>16&255)+u(i>>8&255,t>>8&255,e>>8&255)+u(255&i,255&t,255&e)<=0?i:t},m.Predictor12=function(t,e,n){var i=e[n+0];return(l((t>>24&255)+(i>>24&255)-((e=e[n-1])>>24&255))<<24|l((t>>16&255)+(i>>16&255)-(e>>16&255))<<16|l((t>>8&255)+(i>>8&255)-(e>>8&255))<<8|l((255&t)+(255&i)-(255&e)))>>>0},m.Predictor13=function(t,e,n){var i=e[n-1];return(c((t=s(t,e[n+0]))>>24&255,i>>24&255)<<24|c(t>>16&255,i>>16&255)<<16|c(t>>8&255,i>>8&255)<<8|c(t>>0&255,i>>0&255))>>>0};var Mn=m.PredictorAdd0;m.PredictorAdd1=L,r("Predictor2","PredictorAdd2"),r("Predictor3","PredictorAdd3"),r("Predictor4","PredictorAdd4"),r("Predictor5","PredictorAdd5"),r("Predictor6","PredictorAdd6"),r("Predictor7","PredictorAdd7"),r("Predictor8","PredictorAdd8"),r("Predictor9","PredictorAdd9"),r("Predictor10","PredictorAdd10"),r("Predictor11","PredictorAdd11"),r("Predictor12","PredictorAdd12"),r("Predictor13","PredictorAdd13");var zn=m.PredictorAdd2;p("ColorIndexInverseTransform","MapARGB","32b",function(t){return t>>8&255},function(t){return t}),p("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(t){return t},function(t){return t>>8&255});var jn,Rn=m.ColorIndexInverseTransform,Un=m.MapARGB,Wn=m.VP8LColorIndexInverseTransformAlpha,Hn=m.MapAlpha,Vn=m.VP8LPredictorsAdd=[];Vn.length=16,(m.VP8LPredictors=[]).length=16,(m.VP8LPredictorsAdd_C=[]).length=16,(m.VP8LPredictors_C=[]).length=16;var qn,Gn,Yn,Zn,Jn,Xn,Qn,Kn,$n,ti,ei,ni,ii,oi,ri,ai,si,li,ci,ui,di,hi,pi,fi,gi,mi,vi,bi,yi=Ro(511),wi=Ro(2041),xi=Ro(225),Ci=Ro(767),Ai=0,Di=wi,Si=xi,_i=Ci,Pi=yi,ki=0,Fi=1,Ii=2,Ei=3,Li=4,Ni=5,Oi=6,Ti=7,Bi=8,Mi=9,zi=10,ji=[2,3,7],Ri=[3,3,11],Ui=[280,256,256,256,40],Wi=[0,1,1,1,0],Hi=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Vi=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],qi=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Gi=8,Yi=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Zi=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Ji=null,Xi=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Qi=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Ki=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],$i=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],to=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],eo=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],no=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],io=[],oo=[],ro=[],ao=1,so=2,lo=[],co=[];un("UpsampleRgbLinePair",mn,3),un("UpsampleBgrLinePair",vn,3),un("UpsampleRgbaLinePair",Cn,4),un("UpsampleBgraLinePair",xn,4),un("UpsampleArgbLinePair",wn,4),un("UpsampleRgba4444LinePair",yn,2),un("UpsampleRgb565LinePair",bn,2);var uo=m.UpsampleRgbLinePair,ho=m.UpsampleBgrLinePair,po=m.UpsampleRgbaLinePair,fo=m.UpsampleBgraLinePair,go=m.UpsampleArgbLinePair,mo=m.UpsampleRgba4444LinePair,vo=m.UpsampleRgb565LinePair,bo=16,yo=1<<bo-1,wo=-227,xo=482,Co=6,Ao=(256<<Co)-1,Do=0,So=Ro(256),_o=Ro(256),Po=Ro(256),ko=Ro(256),Fo=Ro(xo-wo),Io=Ro(xo-wo);An("YuvToRgbRow",mn,3),An("YuvToBgrRow",vn,3),An("YuvToRgbaRow",Cn,4),An("YuvToBgraRow",xn,4),An("YuvToArgbRow",wn,4),An("YuvToRgba4444Row",yn,2),An("YuvToRgb565Row",bn,2);var Eo=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Lo=[0,2,8],No=[8,7,6,4,4,2,2,2,1,1,1,1],Oo=1;this.WebPDecodeRGBA=function(t,e,n,i,o){var r=Fi,a=new Je,s=new H;(a.ba=s).S=r,s.width=[s.width],s.height=[s.height];var l=s.width,c=s.height,u=new V,d=null==u||null==t?2:(Bo(null!=u),Pn(t,e,n,u.width,u.height,u.Pd,u.Qd,u.format,null));if(l=0!=d?0:(null!=l&&(l[0]=u.width[0]),null!=c&&(c[0]=u.height[0]),1)){s.width=s.width[0],s.height=s.height[0],null!=i&&(i[0]=s.width),null!=o&&(o[0]=s.height);t:{if(i=new St,(o=new Xe).data=t,o.w=e,o.ha=n,o.kd=1,e=[0],Bo(null!=o),0!=(t=Pn(o.data,o.w,o.ha,null,null,null,e,null,o))&&7!=t||!e[0]||(t=4),0==(e=t)){if(Bo(null!=a),i.data=o.data,i.w=o.w+o.offset,i.ha=o.ha-o.offset,i.put=X,i.ac=J,i.bc=Q,i.ma=a,o.xa){if(null==(t=lt())){a=1;break t}if(function(t,e){var n=[0],i=[0],o=[0];e:for(;;){if(null==t)return;if(null==e)return t.a=2,0;if(t.l=e,t.a=0,M(t.m,e.data,e.w,e.ha),!K(t.m,n,i,o)){t.a=3;break e}if(t.xb=so,e.width=n[0],e.height=i[0],!ie(n[0],i[0],1,t,null))break e;return 1}Bo(0!=t.a)}(t,i)){if(i=0==(e=In(i.width,i.height,a.Oa,a.ba))){e:{i=t;n:for(;;){if(null==i){i=0;break e}if(Bo(null!=i.s.yc),Bo(null!=i.s.Ya),Bo(0<i.s.Wb),Bo(null!=(n=i.l)),Bo(null!=(o=n.ma)),0!=i.xb){if(i.ca=o.ba,i.tb=o.tb,Bo(null!=i.ca),!kn(o.Oa,n,Ei)){i.a=2;break n}if(!ct(i,n.width))break n;if(n.da)break n;if((n.da||R(i.ca.S))&&cn(),i.ca.S<11||(alert("todo:WebPInitConvertARGBToYUV"),null!=i.ca.f.kb.F&&cn()),i.Pb&&0<i.s.ua&&null==i.s.vb.X&&!Qt(i.s.vb,i.s.Wa.Xa)){i.a=1;break n}i.xb=0}if(!ee(i,i.V,i.Ba,i.c,i.i,n.o,ot))break n;o.Dc=i.Ma,i=1;break e}Bo(0!=i.a),i=0}i=!i}i&&(e=t.a)}else e=t.a}else{if(null==(t=new _t)){a=1;break t}if(t.Fa=o.na,t.P=o.P,t.qc=o.Sa,Ft(t,i)){if(0==(e=In(i.width,i.height,a.Oa,a.ba))){if(t.Aa=0,n=a.Oa,Bo(null!=(o=t)),null!=n){if(0<(l=(l=n.Md)<0?0:100<l?255:255*l/100)){for(c=u=0;c<4;++c)(d=o.pb[c]).lc<12&&(d.ia=l*No[d.lc<0?0:d.lc]>>3),u|=d.ia;u&&(alert("todo:VP8InitRandom"),o.ia=1)}o.Ga=n.Id,100<o.Ga?o.Ga=100:o.Ga<0&&(o.Ga=0)}!function(t,e){if(null!=t){if(null==e)return Pt(t,2,"NULL VP8Io parameter in VP8Decode()."),0;if(t.cb||Ft(t,e)){if(Bo(t.cb),null==e.ac||e.ac(e)){e.ob&&(t.L=0);var n=Lo[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=e.v-n>>4,t.zb=e.j-n>>4,t.yb<0&&(t.yb=0),t.zb<0&&(t.zb=0)),t.Va=e.o+15+n>>4,t.Hb=e.va+15+n>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L)for(var i=t.ed,n=0;n<4;++n)for(t.Qa.Cb?(l=t.Qa.Lb[n],t.Qa.Fb||(l+=i.Tb)):l=i.Tb,s=0;s<=1;++s){var o=t.gd[n][s],r=l;i.Pc&&(r+=i.vd[0],s&&(r+=i.od[0])),0<(r=r<0?0:63<r?63:r)?(a=r,0<i.wb&&((a=4<i.wb?a>>2:a>>1)>9-i.wb&&(a=9-i.wb)),a<1&&(a=1),o.dd=a,o.tc=2*r+a,o.ld=40<=r?2:15<=r?1:0):o.tc=0,o.La=s}n=0}else Pt(t,6,"Frame setup failed"),n=t.a;if(n=0==n){if(n){(t.$c=0)<t.Aa||(t.Ic=Oo);e:{n=t.Ic;var a,s,l,i=4*(a=t.za),c=32*a,u=a+1,d=0<t.L?a*(0<t.Aa?2:1):0,h=(2==t.Aa?2:1)*a;if((o=i+832+(s=3*(16*n+Lo[t.L])/2*c)+(l=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=o)n=0;else{if(o>t.Vb){if(t.Vb=0,t.Ec=Ro(o),t.Fc=0,null==t.Ec){n=Pt(t,1,"no memory during frame initialization.");break e}t.Vb=o}o=t.Ec,r=t.Fc,t.Ac=o,t.Bc=r,r+=i,t.Gd=Uo(c,Ct),t.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(e),n&=1}return n?(t.cb=0,n):void 0}}}(t,i)&&(e=t.a)}}else e=t.a}0==e&&null!=a.Oa&&a.Oa.fd&&(e=Fn(a.ba))}a=e}r=0!=a?null:r<11?s.f.RGBA.eb:s.f.kb.y}else r=null;return r};var To=[3,4,3,4,4,2,2,4,4,4,2,1,1]});var e=[0],n=[0],i=[],o=new Gi,r=t,a=function(t,e){var n,i={},o=0,r=!1,a=0,s=0;if(i.frames=[],!function(t,e,n,i){for(var o=0;o<i;o++)if(t[e+o]!=n.charCodeAt(o))return 1}(t,e,"RIFF",4)){g(t,e+=4);for(e+=8;e<t.length;){var l=function(t,e){for(var n="",i=0;i<4;i++)n+=String.fromCharCode(t[e++]);return n}(t,e),c=g(t,e+=4);e+=4;var u=c+(1&c);switch(l){case"VP8 ":case"VP8L":void 0===i.frames[o]&&(i.frames[o]={});(h=i.frames[o]).src_off=r?s:e-8,h.src_size=a+c+8,o++,r&&(r=!1,s=a=0);break;case"VP8X":(h=i.header={}).feature_flags=t[e];var d=e+4;h.canvas_width=1+f(t,d);d+=3;h.canvas_height=1+f(t,d);d+=3;break;case"ALPH":r=!0,a=u+8,s=e-8;break;case"ANIM":(h=i.header).bgcolor=g(t,e);d=e+4,h.loop_count=(n=t)[(p=d)+0]<<0|n[p+1]<<8;d+=2;break;case"ANMF":var h,p=0;(h=i.frames[o]={}).offset_x=2*f(t,e),e+=3,h.offset_y=2*f(t,e),e+=3,h.width=1+f(t,e),e+=3,h.height=1+f(t,e),e+=3,h.duration=f(t,e),e+=3,p=t[e++],h.dispose=1&p,h.blend=p>>1&1}"ANMF"!=l&&(e+=u)}return i}}(r,0);a.response=r,a.rgbaoutput=!0,a.dataurl=!1;var t=a.header||null,s=a.frames||null;if(t){t.loop_counter=t.loop_count,e=[t.canvas_height],n=[t.canvas_width];for(var l=0;l<s.length&&0!=s[l].blend;l++);}var t=s[0],c=o.WebPDecodeRGBA(r,t.src_off,t.src_size,n,e);t.rgba=c,t.imgwidth=n[0],t.imgheight=e[0];for(var u=0;u<n[0]*e[0]*4;u++)i[u]=c[u];return this.width=n,this.height=e,this.data=i,this}function Yi(t,e,n,i){for(var o=[],r=0,a=t.length,s=0;r!==a&&s+e[r]<n;)s+=e[r],r++;o.push(t.slice(0,r));for(var l=r,s=0;r!==a;)s+e[r]>i&&(o.push(t.slice(l,r)),s=0,l=r),s+=e[r],r++;return l!==r&&o.push(t.slice(l,r)),o}function Zi(t,e,n){var i,o,r,a,s,l,c=[],u=[c],d=(n=n||{}).textIndent||0,h=0,p=0,f=t.split(" "),g=Ni.apply(this,[" ",n])[0],m=-1===n.lineIndent?f[0].length+2:n.lineIndent||0;for(m&&(s=Array(m).join(" "),l=[],f.map(function(t){1<(t=t.split(/\s*\n/)).length?l=l.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):l.push(t[0])}),f=l,m=Oi.apply(this,[s,n])),o=0,r=f.length;o<r;o++){var v=0,b=f[o];if(m&&"\n"==b[0]&&(b=b.substr(1),v=1),e<d+h+(p=(i=Ni.apply(this,[b,n])).reduce(function(t,e){return t+e},0))||v){if(e<p){for(a=Yi.apply(this,[b,i,e-(d+h),e]),c.push(a.shift()),c=[a.pop()];a.length;)u.push([a.shift()]);p=i.slice(b.length-(c[0]?c[0].length:0)).reduce(function(t,e){return t+e},0)}else c=[b];u.push(c),d=p+m,h=g}else c.push(b),d+=h+p,h=g}return t=m?function(t,e){return(e?s:"")+t.join(" ")}:function(t){return t.join(" ")},u.map(t)}function Ji(t){for(var e=t.length,n=new Uint8Array(e),i=0;i<e;i++)n[i]=t.charCodeAt(i);return n}function Xi(){var t='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',e=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),n=unescape(encodeURIComponent(t)),i=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),o=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),r=unescape(encodeURIComponent("</x:xmpmeta>")),t=n.length+i.length+o.length+e.length+r.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t+" >>"),this.internal.write("stream"),this.internal.write(e+n+i+o+r),this.internal.write("endstream"),this.internal.write("endobj")}function Qi(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")}function Ki(t){for(var e,n,i="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",o=Object.keys(t).sort(function(t,e){return t-e}),r=[],a=0,s=o.length;a<s;a++)e=o[a],100<=r.length&&(i+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),void 0!==t[e]&&null!==t[e]&&"function"==typeof t[e].toString&&(n=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),r.push("<"+e+"><"+n+">"));return r.length&&(i+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),i+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"}function $i(t){var e,n=t.text||"",i=t.x,o=t.y,r=t.options||{},a=t.mutex||{},s=a.pdfEscape,l=a.activeFontKey,c=a.fonts,u=l,d="",h=0,p="",t=c[u].encoding;if("Identity-H"!==c[u].encoding)return{text:n,x:i,y:o,options:r,mutex:a};for(p=n,u=l,Array.isArray(n)&&(p=n[0]),h=0;h<p.length;h+=1)c[u].metadata.hasOwnProperty("cmap")&&(e=c[u].metadata.cmap.unicode.codeMap[p[h].charCodeAt(0)]),e||p[h].charCodeAt(0)<256&&c[u].metadata.hasOwnProperty("Unicode")?d+=p[h]:d+="";return n="",parseInt(u.slice(1))<14||"WinAnsiEncoding"===t?n=s(d,u).split("").map(function(t){return t.charCodeAt(0).toString(16)}).join(""):"Identity-H"===t&&(n=Mi(d,c[u])),a.isHex=!0,{text:n,x:i,y:o,options:r,mutex:a}}function to(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0}function eo(t){if(this.rawData=t,t=this.contents=new no(t),this.contents.pos=4,"ttcf"===t.readString(4))throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new jo(this),this.registerTTF()}yi=gn.API,wi=function(){return"function"==typeof ci.deflate},xi=function(t,e,n,i){for(var o,r,a,s=t.length/e,l=new Uint8Array(t.length+s),c=Pi(),u=0;u<s;u+=1){if(a=u*e,o=t.subarray(a,a+e),i)l.set(i(o,n,r),a+u);else{for(var d,h=c.length,p=[];d<h;d+=1)p[d]=c[d](o,n,r);var f=ki(p.concat());l.set(p[f],a+u)}r=o}return l},Ci=function(t,e){var n,i=[],o=t.length;i[0]=1;for(var r=0;r<o;r+=1)n=t[r-e]||0,i[r+1]=t[r]-n+256&255;return i},Ai=function(t,e,n){var i,o=[],r=t.length;o[0]=2;for(var a=0;a<r;a+=1)i=n&&n[a]||0,o[a+1]=t[a]-i+256&255;return o},Di=function(t,e,n){var i,o,r=[],a=t.length;r[0]=3;for(var s=0;s<a;s+=1)i=t[s-e]||0,o=n&&n[s]||0,r[s+1]=t[s]+256-(i+o>>>1)&255;return r},Si=function(t,e,n){var i,o,r,a=[],s=t.length;a[0]=4;for(var l=0;l<s;l+=1)i=t[l-e]||0,o=n&&n[l]||0,r=n&&n[l-e]||0,r=_i(i,o,r),a[l+1]=t[l]-r+256&255;return a},_i=function(t,e,n){if(t===e&&e===n)return t;var i=Math.abs(e-n),o=Math.abs(t-n),r=Math.abs(t+e-n-n);return i<=o&&i<=r?t:o<=r?e:n},Pi=function(){return[Ui,Ci,Ai,Di,Si]},ki=function(t){t=t.map(function(t){return t.reduce(function(t,e){return t+Math.abs(e)},0)});return t.indexOf(Math.min.apply(null,t))},yi.processPNG=function(t,e,n,i){var o,r,a,s,l,c,u,d,h,p,f,g,m,v=this.decode.FLATE_DECODE,b="";if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){if(t=(a=new ji(t)).imgData,r=a.bits,o=a.colorSpace,l=a.colors,-1!==[4,6].indexOf(a.colorType)){if(8===a.bits){h=(d=new(32==a.pixelBitlength?Uint32Array:16==a.pixelBitlength?Uint16Array:Uint8Array)(a.decodePixels().buffer)).length,f=new Uint8Array(h*a.colors),p=new Uint8Array(h);for(var y,w=a.pixelBitlength-a.bits,x=0,C=0;x<h;x++){for(m=d[x],y=0;y<w;)f[C++]=m>>>y&255,y+=a.bits;p[x]=m>>>y&255}}if(16===a.bits){h=(d=new Uint32Array(a.decodePixels().buffer)).length,f=new Uint8Array(h*(32/a.pixelBitlength)*a.colors),p=new Uint8Array(h*(32/a.pixelBitlength)),g=1<a.colors;for(var A=C=x=0;x<h;)m=d[x++],f[C++]=m>>>0&255,g&&(f[C++]=m>>>16&255,m=d[x++],f[C++]=m>>>0&255),p[A++]=m>>>16&255;r=8}i!==yi.image_compression.NONE&&wi()?(t=Ri(f,a.width*a.colors,a.colors,i),u=Ri(p,a.width,1,i)):(t=f,u=p,v=void 0)}if(3===a.colorType&&(o=this.color_spaces.INDEXED,c=a.palette,a.transparency.indexed)){var D=a.transparency.indexed,S=0;for(x=0,h=D.length;x<h;++x)S+=D[x];if((S/=255)===h-1&&-1!==D.indexOf(0))s=[D.indexOf(0)];else if(S!==h){for(d=a.decodePixels(),p=new Uint8Array(d.length),x=0,h=d.length;x<h;x++)p[x]=D[d[x]];u=Ri(p,a.width,1)}}i=function(t){var e;switch(t){case yi.image_compression.FAST:e=11;break;case yi.image_compression.MEDIUM:e=13;break;case yi.image_compression.SLOW:e=14;break;default:e=12}return e}(i);return v===this.decode.FLATE_DECODE&&(b="/Predictor "+i+" "),b+="/Colors "+l+" /BitsPerComponent "+r+" /Columns "+a.width,(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(u&&this.__addimage__.isArrayBuffer(u)||this.__addimage__.isArrayBufferView(u))&&(u=this.__addimage__.arrayBufferToBinaryString(u)),{alias:n,data:t,index:e,filter:v,decodeParameters:b,transparency:s,palette:c,sMask:u,predictor:i,width:a.width,height:a.height,bitsPerComponent:r,colorSpace:o}}},(Fi=gn.API).processGIF89A=function(t,e,n,i){var o=new Wi(t),r=o.width,a=o.height,t=[];o.decodeAndBlitFrameRGBA(0,t);a={data:t,width:r,height:a},a=new Vi(100).encode(a,100);return Fi.processJPEG.call(this,a,e,n,i)},Fi.processGIF87A=Fi.processGIF89A,qi.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:o,green:i,blue:n,quad:r}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},qi.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(t){an.log("bit decode error:"+t)}},qi.prototype.bit1=function(){for(var t=Math.ceil(this.width/8),e=t%4,n=this.height-1;0<=n;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o<t;o++)for(var r=this.datav.getUint8(this.pos++,!0),a=i*this.width*4+8*o*4,s=0;s<8&&8*o+s<this.width;s++){var l=this.palette[r>>7-s&1];this.data[a+4*s]=l.blue,this.data[a+4*s+1]=l.green,this.data[a+4*s+2]=l.red,this.data[a+4*s+3]=255}0!=e&&(this.pos+=4-e)}},qi.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,n=this.height-1;0<=n;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o<t;o++){var r=this.datav.getUint8(this.pos++,!0),a=i*this.width*4+2*o*4,s=r>>4,r=15&r,s=this.palette[s];if(this.data[a]=s.blue,this.data[1+a]=s.green,this.data[2+a]=s.red,this.data[3+a]=255,2*o+1>=this.width)break;s=this.palette[r],this.data[4+a]=s.blue,this.data[4+a+1]=s.green,this.data[4+a+2]=s.red,this.data[4+a+3]=255}0!=e&&(this.pos+=4-e)}},qi.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;0<=e;e--){for(var n=this.bottom_up?e:this.height-1-e,i=0;i<this.width;i++){var o=this.datav.getUint8(this.pos++,!0),r=n*this.width*4+4*i;o<this.palette.length?(o=this.palette[o],this.data[r]=o.red,this.data[1+r]=o.green,this.data[2+r]=o.blue):(this.data[r]=255,this.data[1+r]=255,this.data[2+r]=255),this.data[3+r]=255}0!=t&&(this.pos+=4-t)}},qi.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),n=this.height-1;0<=n;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o<this.width;o++){var r=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(r&e)/e*255|0,s=(r>>5&e)/e*255|0,l=(r>>10&e)/e*255|0,c=r>>15?255:0,r=i*this.width*4+4*o;this.data[r]=l,this.data[1+r]=s,this.data[2+r]=a,this.data[3+r]=c}this.pos+=t}},qi.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),n=parseInt("111111",2),i=this.height-1;0<=i;i--){for(var o=this.bottom_up?i:this.height-1-i,r=0;r<this.width;r++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(a&e)/e*255|0,l=(a>>5&n)/n*255|0,c=(a>>11)/e*255|0,a=o*this.width*4+4*r;this.data[a]=c,this.data[1+a]=l,this.data[2+a]=s,this.data[3+a]=255}this.pos+=t}},qi.prototype.bit24=function(){for(var t=this.height-1;0<=t;t--){for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*n;this.data[a]=r,this.data[1+a]=o,this.data[2+a]=i,this.data[3+a]=255}this.pos+=this.width%4}},qi.prototype.bit32=function(){for(var t=this.height-1;0<=t;t--)for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*n;this.data[s]=r,this.data[1+s]=o,this.data[2+s]=i,this.data[3+s]=a}},qi.prototype.getData=function(){return this.data},(Ii=gn.API).processBMP=function(t,e,n,i){var o=new qi(t,!1),r=o.width,t=o.height,t={data:o.getData(),width:r,height:t},t=new Vi(100).encode(t,100);return Ii.processJPEG.call(this,t,e,n,i)},Gi.prototype.getData=function(){return this.data},(Ei=gn.API).processWEBP=function(t,e,n,i){var o=new Gi(t,!1),r=o.width,t=o.height,t={data:o.getData(),width:r,height:t},t=new Vi(100).encode(t,100);return Ei.processJPEG.call(this,t,e,n,i)},gn.API.setLanguage=function(t){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"FYRO Macedonian",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]&&(this.internal.languageSettings.languageCode=t,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Li=gn.API,Ni=Li.getCharWidthsArray=function(t,e){for(var n,i=(e=e||{}).font||this.internal.getFont(),o=e.fontSize||this.internal.getFontSize(),r=e.charSpace||this.internal.getCharSpace(),a=e.widths||i.metadata.Unicode.widths,s=a.fof||1,l=e.kerning||i.metadata.Unicode.kerning,c=l.fof||1,u=!1!==e.doKerning,d=0,h=t.length,p=0,f=a[0]||s,g=[],m=0;m<h;m++)n=t.charCodeAt(m),"function"==typeof i.metadata.widthOfString?g.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+r*(1e3/o)||0)/1e3):(d=u&&"object"==typeof l[n]&&!isNaN(parseInt(l[n][p],10))?l[n][p]/c:0,g.push((a[n]||f)/s+d)),p=n;return g},Oi=Li.getStringUnitWidth=function(t,e){var n=(e=e||{}).fontSize||this.internal.getFontSize(),i=e.font||this.internal.getFont(),e=e.charSpace||this.internal.getCharSpace();return Li.processArabic&&(t=Li.processArabic(t)),"function"==typeof i.metadata.widthOfString?i.metadata.widthOfString(t,n,e)/n:Ni.apply(this,arguments).reduce(function(t,e){return t+e},0)},Li.splitTextToSize=function(t,e,n){var i=(n=n||{}).fontSize||this.internal.getFontSize(),o=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle),t="Unicode";return e.metadata[t]?{widths:e.metadata[t].widths||{0:1},kerning:e.metadata[t].kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n),r=Array.isArray(t)?t:String(t).split(/\r?\n/),a=+this.internal.scaleFactor*e/i;o.textIndent=n.textIndent?+n.textIndent*this.internal.scaleFactor/i:0,o.lineIndent=n.lineIndent;for(var s=[],l=0,c=r.length;l<c;l++)s=s.concat(Zi.apply(this,[r[l],a,o]));return s},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",n="klmnopqrstuvwxyz",p={},a={},i=0;i<n.length;i++)p[n[i]]=e[i],a[e[i]]=n[i];function s(t){return"0x"+parseInt(t,10).toString(16)}var l=t.__fontmetrics__.compress=function(t){var e,n,i,o,r=["{"];for(o in t){if(e=t[o],n=isNaN(parseInt(o,10))?"'"+o+"'":(o=parseInt(o,10),(n=s(o).slice(2)).slice(0,-1)+a[n.slice(-1)]),"number"==typeof e)i=(e<0?(i=s(e).slice(3),"-"):(i=s(e).slice(2),""))+i.slice(0,-1)+a[i.slice(-1)];else{if("object"!=typeof e)throw new Error("Don't know what to do with value type "+typeof e+".");i=l(e)}r.push(n+i)}return r.push("}"),r.join("")},o=t.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw new Error("Invalid argument passed to uncompress.");for(var e,n,i,o,r={},a=1,s=r,l=[],c="",u="",d=t.length-1,h=1;h<d;h+=1)"'"==(o=t[h])?e=e?void(i=e.join("")):[]:e?e.push(o):"{"==o?(l.push([s,i]),s={},i=void 0):"}"==o?((n=l.pop())[0][n[1]]=s,i=void 0,s=n[0]):"-"==o?a=-1:void 0===i?p.hasOwnProperty(o)?(c+=p[o],i=parseInt(c,16)*a,a=1,c=""):c+=o:p.hasOwnProperty(o)?(u+=p[o],s[i]=parseInt(u,16)*a,a=1,i=void 0,u=""):u+=o;return r},r={codePages:["WinAnsiEncoding"],WinAnsiEncoding:o("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:r,"Courier-Bold":r,"Courier-BoldOblique":r,"Courier-Oblique":r,Helvetica:r,"Helvetica-Bold":r,"Helvetica-BoldOblique":r,"Helvetica-Oblique":r,"Times-Roman":r,"Times-Bold":r,"Times-BoldItalic":r,"Times-Italic":r}},u={Unicode:{"Courier-Oblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":o("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":o("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:o("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":o("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:o("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":o("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":o("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":o("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":o("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(t){var e=t.font,t=u.Unicode[e.postScriptName];t&&(e.metadata.Unicode={},e.metadata.Unicode.widths=t.widths,e.metadata.Unicode.kerning=t.kerning);t=c.Unicode[e.postScriptName];t&&(e.metadata.Unicode.encoding=t,e.encoding=t.codePages[0])}])}(gn.API),(Ti=gn).API.events.push(["addFont",function(t){var e=void 0,n=t.font,t=t.instance;if(!n.isStandardFont){if(void 0===t)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");if("string"!=typeof(e=!1===t.existsFileInVFS(n.postScriptName)?t.loadFile(n.postScriptName):t.getFileFromVFS(n.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+n.postScriptName+"').");n=n,e=/^\x00\x01\x00\x00/.test(e=e)?Ji(e):Ji(P(e)),n.metadata=Ti.API.TTFFont.open(e),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]}}]),gn.API.addSvgAsImage=function(e,t,n,i,o,r,a,s){if(isNaN(t)||isNaN(n))throw an.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw an.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=i,l.height=o;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(rn.canvg?Promise.resolve(rn.canvg):"object"==typeof h&&"undefined"!=typeof module?new Promise(function(t,e){try{t(require("canvg"))}catch(t){e(t)}}):"function"==typeof define&&define.amd?new Promise(function(t,e){try{require(["canvg"],t)}catch(t){e(t)}}):Promise.reject(new Error("Could not load canvg"))).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default||t}).then(function(t){return t.fromString(c,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(t){return t.render(u)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),t,n,i,o,a,s)})},gn.API.putTotalPages=function(t){for(var e,n=0,n=parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont())),i=1;i<=this.internal.getNumberOfPages();i++)for(var o=0;o<this.internal.pages[i].length;o++)this.internal.pages[i][o]=this.internal.pages[i][o].replace(e,n);return this},gn.API.viewerPreferences=function(t,e){var n;t=t||{},e=e||!1;var i,o,r,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(a),l=[],c=0,u=0,d=0;function h(t,e){for(var n=!1,i=0;i<t.length;i+=1)t[i]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===t||!0===e)for(var p=s.length,d=0;d<p;d+=1)n[s[d]].value=n[s[d]].defaultValue,n[s[d]].explicitSet=!1;if("object"==typeof t)for(o in t)if(r=t[o],h(s,o)&&void 0!==r){if("boolean"===n[o].type&&"boolean"==typeof r)n[o].value=r;else if("name"===n[o].type&&h(n[o].valueSet,r))n[o].value=r;else if("integer"===n[o].type&&Number.isInteger(r))n[o].value=r;else if("array"===n[o].type){for(c=0;c<r.length;c+=1)if(i=!0,1===r[c].length&&"number"==typeof r[c][0])l.push(String(r[c]-1));else if(1<r[c].length){for(u=0;u<r[c].length;u+=1)"number"!=typeof r[c][u]&&(i=!1);!0===i&&l.push([r[c][0]-1,r[c][1]-1].join(" "))}n[o].value="["+l.join(" ")+"]"}else n[o].value=n[o].defaultValue;n[o].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},gn.API.addMetadata=function(t,e){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceuri:e||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",Qi),this.internal.events.subscribe("postPutResources",Xi)),this},ei=(Bi=gn).API,Mi=ei.pdfEscape16=function(t,e){for(var n,i=e.metadata.Unicode.widths,o=["","0","00","000","0000"],r=[""],a=0,s=t.length;a<s;++a){if(n=e.metadata.characterToGlyph(t.charCodeAt(a)),e.metadata.glyIdsUsed.push(n),e.metadata.toUnicode[n]=t.charCodeAt(a),-1==i.indexOf(n)&&(i.push(n),i.push([parseInt(e.metadata.widthOfGlyph(n),10)])),"0"==n)return r.join("");n=n.toString(16),r.push(o[4-n.length],n)}return r.join("")},ei.events.push(["putFont",function(t){!function(t){var e=t.font,n=t.out,i=t.newObject,o=t.putStream,r=t.pdfEscapeWithNeededParanthesis;if(e.metadata instanceof Bi.API.TTFFont&&"Identity-H"===e.encoding){for(var a=e.metadata.Unicode.widths,s=e.metadata.subset.encode(e.metadata.glyIdsUsed,1),l="",c=0;c<s.length;c++)l+=String.fromCharCode(s[c]);var u=i();o({data:l,addLength1:!0,objectId:u}),n("endobj");t=i();o({data:Ki(e.metadata.toUnicode),addLength1:!0,objectId:t}),n("endobj");o=i();n("<<"),n("/Type /FontDescriptor"),n("/FontName /"+r(e.fontName)),n("/FontFile2 "+u+" 0 R"),n("/FontBBox "+Bi.API.PDFObject.convert(e.metadata.bbox)),n("/Flags "+e.metadata.flags),n("/StemV "+e.metadata.stemV),n("/ItalicAngle "+e.metadata.italicAngle),n("/Ascent "+e.metadata.ascender),n("/Descent "+e.metadata.decender),n("/CapHeight "+e.metadata.capHeight),n(">>"),n("endobj");u=i();n("<<"),n("/Type /Font"),n("/BaseFont /"+r(e.fontName)),n("/FontDescriptor "+o+" 0 R"),n("/W "+Bi.API.PDFObject.convert(a)),n("/CIDToGIDMap /Identity"),n("/DW 1000"),n("/Subtype /CIDFontType2"),n("/CIDSystemInfo"),n("<<"),n("/Supplement 0"),n("/Registry (Adobe)"),n("/Ordering ("+e.encoding+")"),n(">>"),n(">>"),n("endobj"),e.objectNumber=i(),n("<<"),n("/Type /Font"),n("/Subtype /Type0"),n("/ToUnicode "+t+" 0 R"),n("/BaseFont /"+r(e.fontName)),n("/Encoding /"+e.encoding),n("/DescendantFonts ["+u+" 0 R]"),n(">>"),n("endobj"),e.isAlreadyPutted=!0}}(t)}]),ei.events.push(["putFont",function(t){!function(t){var e=t.font,n=t.out,i=t.newObject,o=t.putStream,r=t.pdfEscapeWithNeededParanthesis;if(e.metadata instanceof Bi.API.TTFFont&&"WinAnsiEncoding"===e.encoding){for(var a=e.metadata.rawData,s="",l=0;l<a.length;l++)s+=String.fromCharCode(a[l]);var c=i();o({data:s,addLength1:!0,objectId:c}),n("endobj");t=i();o({data:Ki(e.metadata.toUnicode),addLength1:!0,objectId:t}),n("endobj");o=i();n("<<"),n("/Descent "+e.metadata.decender),n("/CapHeight "+e.metadata.capHeight),n("/StemV "+e.metadata.stemV),n("/Type /FontDescriptor"),n("/FontFile2 "+c+" 0 R"),n("/Flags 96"),n("/FontBBox "+Bi.API.PDFObject.convert(e.metadata.bbox)),n("/FontName /"+r(e.fontName)),n("/ItalicAngle "+e.metadata.italicAngle),n("/Ascent "+e.metadata.ascender),n(">>"),n("endobj"),e.objectNumber=i();for(var u=0;u<e.metadata.hmtx.widths.length;u++)e.metadata.hmtx.widths[u]=parseInt(e.metadata.hmtx.widths[u]*(1e3/e.metadata.head.unitsPerEm));n("<</Subtype/TrueType/Type/Font/ToUnicode "+t+" 0 R/BaseFont/"+r(e.fontName)+"/FontDescriptor "+o+" 0 R/Encoding/"+e.encoding+" /FirstChar 29 /LastChar 255 /Widths "+Bi.API.PDFObject.convert(e.metadata.hmtx.widths)+">>"),n("endobj"),e.isAlreadyPutted=!0}}(t)}]),ei.events.push(["postProcessText",function(t){var e=t.text||"",n=[],i={text:e,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(e)){for(var o=0,o=0;o<e.length;o+=1)Array.isArray(e[o])&&3===e[o].length?n.push([$i(Object.assign({},i,{text:e[o][0]})).text,e[o][1],e[o][2]]):n.push($i(Object.assign({},i,{text:e[o]})).text);t.text=n}else t.text=$i(Object.assign({},i,{text:e})).text}]),(E=gn.API).existsFileInVFS=function(t){return to.call(this),void 0!==this.internal.vFS[t]},E.addFileToVFS=function(t,e){return to.call(this),this.internal.vFS[t]=e,this},E.getFileFromVFS=function(t){return to.call(this),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null},function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var p,f,g,m,o,r,a,i=e,v=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],b=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],y={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},s={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},l=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],c=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),w=!1,x=0;this.__bidiEngine__={};function C(t){var e=t.charCodeAt(),n=e>>8;return void 0!==(t=s[n])?i[256*t+(255&e)]:252==n||253==n?"AL":c.test(n)?"L":8==n?"R":"N"}function u(t,e,n){return t=t.split(""),n&&D(t,n,{hiLevel:x}),t.reverse(),e&&e.reverse(),t.join("")}function d(t,e,n,i,o){if(!(o.hiLevel<t)){if(1===t&&1===x&&!p)return e.reverse(),n&&n.reverse(),0;for(var r,a,s,l,c=e.length,u=0;u<c;){if(i[u]>=t){for(s=u+1;s<c&&i[s]>=t;)s++;for(l=u,a=s-1;l<a;l++,a--)r=e[l],e[l]=e[a],e[a]=r,n&&(r=n[l],n[l]=n[a],n[a]=r);u=s}u++}}}function h(t,e,n){var t=t.split(""),o={hiLevel:x};return D(t,n=n||[],o),function(t,e){if(0!==o.hiLevel&&a)for(var n,i=0;i<t.length;i++)1===e[i]&&0<=(n=l.indexOf(t[i]))&&(t[i]=l[n+1])}(t,n),d(2,t,e,n,o),d(1,t,e,n,o),t.join("")}var A=function(t){for(var e,n=0;n<t.length;n++){if("L"===(e=C(t.charAt(n))))return!1;if("R"===e)return!0}return!1},D=function(t,e,n){var i,o,r,a,s=-1,l=t.length,c=0,u=[],d=x?b:v,h=[];for(f=p=w=!1,i=0;i<l;i++)h[i]=C(t[i]);for(o=0;o<l;o++){if(a=c,u[o]=function(t,e,n,i){var o,r,a=e[i];switch(a){case"L":case"R":w=!1;break;case"N":case"AN":break;case"EN":w&&(a="AN");break;case"AL":w=!0,a="R";break;case"WS":a="N";break;case"CS":i<1||i+1>=e.length||"EN"!==(l=n[i-1])&&"AN"!==l||"EN"!==(s=e[i+1])&&"AN"!==s?a="N":w&&(s="AN"),a=s===l?s:"N";break;case"ES":a="EN"===(l=0<i?n[i-1]:"B")&&i+1<e.length&&"EN"===e[i+1]?"EN":"N";break;case"ET":if(0<i&&"EN"===n[i-1]){a="EN";break}if(w){a="N";break}for(o=i+1,r=e.length;o<r&&"ET"===e[o];)o++;a=o<r&&"EN"===e[o]?"EN":"N";break;case"NSM":if(g&&!m){for(r=e.length,o=i+1;o<r&&"NSM"===e[o];)o++;if(o<r){var s=t[i],s=1425<=s&&s<=2303||64286===s,l=e[o];if(s&&("R"===l||"AL"===l)){a="R";break}}}a=i<1||"B"===(l=e[i-1])?"N":n[i-1];break;case"B":p=!(w=!1),a=x;break;case"S":f=!0,a="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":w=!1;break;case"BN":a="N"}return a}(t,h,u,o),a=240&(c=d[a][y[u[o]]]),c&=15,e[o]=r=d[c][5],0<a)if(16==a){for(i=s;i<o;i++)e[i]=1;s=-1}else s=-1;if(d[c][6])-1===s&&(s=o);else if(-1<s){for(i=s;i<o;i++)e[i]=r;s=-1}"B"===h[o]&&(e[o]=0),n.hiLevel|=r}f&&function(t,e,n){for(var i=0;i<n;i++)if("S"===t[i]){e[i]=x;for(var o=i-1;0<=o&&"WS"===t[o];o--)e[o]=x}}(h,e,l)};return this.__bidiEngine__.doBidiReorder=function(t,e,n){var i;return function(t,e){if(e)for(var n=0;n<t.length;n++)e[n]=n;void 0===m&&(m=A(t)),void 0===r&&(r=A(t))}(t,e),g||!o||r?g&&o&&m^r?(x=m?1:0,t=u(t,e,n)):!g&&o&&r?(x=m?1:0,t=h(t,e,n),t=u(t,e)):!g||m||o||r?g&&!o&&m^r?(t=u(t,e),t=m?(x=0,h(t,e,n)):(x=1,t=h(t,e,n),u(t,e))):g&&m&&!o&&r?(x=1,t=h(t,e,n),t=u(t,e)):!g&&!o&&m^r&&(i=a,m?(x=1,t=h(t,e,n),x=0,a=!1,t=h(t,e,n),a=i):(x=0,t=h(t,e,n),t=u(t,e),a=!(x=1),t=h(t,e,n),a=i,t=u(t,e))):(x=0,t=h(t,e,n)):(x=m?1:0,t=h(t,e,n)),t},this.__bidiEngine__.setOptions=function(t){t&&(g=t.isInputVisual,o=t.isOutputVisual,m=t.isInputRtl,r=t.isOutputRtl,a=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var e=t.text,n=(t.x,t.y,t.options||{}),i=(t.mutex,n.lang,[]);if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,r.setOptions(n),"[object Array]"===Object.prototype.toString.call(e)){for(var o=0,i=[],o=0;o<e.length;o+=1)"[object Array]"===Object.prototype.toString.call(e[o])?i.push([r.doBidiReorder(e[o][0]),e[o][1],e[o][2]]):i.push([r.doBidiReorder(e[o])]);t.text=i}else t.text=r.doBidiReorder(e);r.setOptions({isInputVisual:!0})}])}(gn),gn.API.TTFFont=(eo.open=function(t){return new eo(t)},eo.prototype.parse=function(){return this.directory=new ro(this.contents),this.head=new co(this),this.name=new Ao(this),this.cmap=new fo(this),this.toUnicode={},this.hhea=new mo(this),this.maxp=new So(this),this.hmtx=new Po(this),this.post=new wo(this),this.os2=new bo(this),this.loca=new Bo(this),this.glyf=new Io(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},eo.prototype.registerTTF=function(){var o,t,e;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){for(var t=this.bbox,e=[],n=0,i=t.length;n<i;n++)o=t[n],e.push(Math.round(o*this.scaleFactor));return e}.call(this),this.stemV=0,this.post.exists?(e=255&(t=this.post.italic_angle),0!=(32768&(t=t>>16))&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+e)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(e=this.familyClass)||2===e||3===e||4===e||5===e||7===e,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},eo.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},eo.prototype.widthOfGlyph=function(t){var e=1e3/this.head.unitsPerEm;return this.hmtx.forGlyph(t).advance*e},eo.prototype.widthOfString=function(t,e,n){for(var i,o,r=o=0,a=(t=""+t).length;0<=a?r<a:a<r;r=0<=a?++r:--r)i=t.charCodeAt(r),o+=this.widthOfGlyph(this.characterToGlyph(i))+n*(1e3/e)||0;return o*(e/1e3)},eo.prototype.lineHeight=function(t,e){return null==e&&(e=!1),e=e?this.lineGap:0,(this.ascender+e-this.decender)/1e3*t},eo);var no=(io.prototype.readByte=function(){return this.data[this.pos++]},io.prototype.writeByte=function(t){return this.data[this.pos++]=t},io.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},io.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},io.prototype.readInt32=function(){var t=this.readUInt32();return 2147483648<=t?t-4294967296:t},io.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},io.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},io.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},io.prototype.readInt16=function(){var t=this.readUInt16();return 32768<=t?t-65536:t},io.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},io.prototype.readString=function(t){for(var e=[],n=0;0<=t?n<t:t<n;n=0<=t?++n:--n)e[n]=String.fromCharCode(this.readByte());return e.join("")},io.prototype.writeString=function(t){for(var e=[],n=0,i=t.length;0<=i?n<i:i<n;n=0<=i?++n:--n)e.push(this.writeByte(t.charCodeAt(n)));return e},io.prototype.readShort=function(){return this.readInt16()},io.prototype.writeShort=function(t){return this.writeInt16(t)},io.prototype.readLongLong=function(){var t=this.readByte(),e=this.readByte(),n=this.readByte(),i=this.readByte(),o=this.readByte(),r=this.readByte(),a=this.readByte(),s=this.readByte();return 128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^n)+4294967296*(255^i)+16777216*(255^o)+65536*(255^r)+256*(255^a)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*n+4294967296*i+16777216*o+65536*r+256*a+s},io.prototype.writeLongLong=function(t){var e=Math.floor(t/4294967296),t=4294967295&t;return this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},io.prototype.readInt=function(){return this.readInt32()},io.prototype.writeInt=function(t){return this.writeInt32(t)},io.prototype.read=function(t){for(var e=[],n=0;0<=t?n<t:t<n;n=0<=t?++n:--n)e.push(this.readByte());return e},io.prototype.write=function(t){for(var e,n=[],i=0,o=t.length;i<o;i++)e=t[i],n.push(this.writeByte(e));return n},io);function io(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}var oo,ro=(ao.prototype.encode=function(t){var e,n,i,o,r,a=Object.keys(t).length,s=Math.log(2),l=16*Math.floor(Math.log(a)/s),c=Math.floor(l/s),s=16*a-l,u=new no;for(r in u.writeInt(this.scalarType),u.writeShort(a),u.writeShort(l),u.writeShort(c),u.writeShort(s),a=16*a,n=u.pos+a,e=null,o=[],t)for(i=t[r],u.writeString(r),u.writeInt(oo(i)),u.writeInt(n),u.writeInt(i.length),o=o.concat(i),"head"===r&&(e=n),n+=i.length;n%4;)o.push(0),n++;return u.write(o),a=2981146554-oo(u.data),u.pos=e+8,u.writeUInt32(a),u.data},oo=function(t){var e,n,i,o;for(t=Fo.call(t);t.length%4;)t.push(0);for(i=new no(t),e=n=0,o=t.length;e<o;e+=4)n+=i.readUInt32();return 4294967295&n},ao);function ao(t){var e,n,i;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},n=0,i=this.tableCount;0<=i?n<i:i<n;n=0<=i?++n:--n)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}var so={}.hasOwnProperty,ei=function(t,e){for(var n in e)so.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t};function lo(t){this.file=t,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}lo.prototype.parse=function(){},lo.prototype.encode=function(){},lo.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null};var co=(ei(uo,E=lo),uo.prototype.tag="head",uo.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},uo.prototype.encode=function(t){var e=new no;return e.writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},uo);function uo(){return uo.__super__.constructor.apply(this,arguments)}var ho=(po.encode=function(t,e){var n,i,o,r,a,s,l,c,u,d,h,p,f,g,m,v,b,y,w,x,C,A,D,S,_,P,k,F,I,E,L,N,O,T,B,M,z,j,R,U,W,H,V,q,G=new no,Y=Object.keys(t).sort(function(t,e){return t-e});switch(e){case"macroman":for(p=0,f=function(){var t=[];for(h=0;h<256;++h)t.push(0);return t}(),m={0:0},o={},k=0,L=Y.length;k<L;k++)null==m[W=t[i=Y[k]]]&&(m[W]=++p),o[i]={old:t[i],new:m[t[i]]},f[i]=m[t[i]];return G.writeUInt16(1),G.writeUInt16(0),G.writeUInt32(12),G.writeUInt16(0),G.writeUInt16(262),G.writeUInt16(0),G.write(f),{charMap:o,subtable:G.data,maxGlyphID:p+1};case"unicode":for(_=[],c=[],m={},n={},g=s=null,F=v=0,N=Y.length;F<N;F++)null==m[y=t[i=Y[F]]]&&(m[y]=++v),n[i]={old:y,new:m[y]},r=m[y]-i,null!=g&&r===s||(g&&c.push(g),_.push(i),s=r),g=i;for(g&&c.push(g),c.push(65535),_.push(65535),D=2*(A=_.length),C=2*Math.pow(Math.log(A)/Math.LN2,2),u=Math.log(C/2)/Math.LN2,x=2*A-C,a=[],w=[],d=[],h=I=0,O=_.length;I<O;h=++I){if(S=_[h],l=c[h],65535===S){a.push(0),w.push(0);break}if(32768<=S-(P=n[S].new))for(a.push(0),w.push(2*(d.length+A-h)),i=E=S;S<=l?E<=l:l<=E;i=S<=l?++E:--E)d.push(n[i].new);else a.push(P-S),w.push(0)}for(G.writeUInt16(3),G.writeUInt16(1),G.writeUInt32(12),G.writeUInt16(4),G.writeUInt16(16+8*A+2*d.length),G.writeUInt16(0),G.writeUInt16(D),G.writeUInt16(C),G.writeUInt16(u),G.writeUInt16(x),R=0,T=c.length;R<T;R++)i=c[R],G.writeUInt16(i);for(G.writeUInt16(0),U=0,B=_.length;U<B;U++)i=_[U],G.writeUInt16(i);for(H=0,M=a.length;H<M;H++)r=a[H],G.writeUInt16(r);for(V=0,z=w.length;V<z;V++)b=w[V],G.writeUInt16(b);for(q=0,j=d.length;q<j;q++)p=d[q],G.writeUInt16(p);return{charMap:n,subtable:G.data,maxGlyphID:v+1}}},po);function po(n,t){var e,i,o,r,a,s,l,c,u,d,h,p,f,g,m,v;switch(this.platformID=n.readUInt16(),this.encodingID=n.readShort(),this.offset=t+n.readInt(),t=n.pos,n.pos=this.offset,this.format=n.readUInt16(),this.length=n.readUInt16(),this.language=n.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=n.readByte();break;case 4:for(d=n.readUInt16(),u=d/2,n.pos+=6,o=function(){var t,e=[];for(s=t=0;0<=u?t<u:u<t;s=0<=u?++t:--t)e.push(n.readUInt16());return e}(),n.pos+=2,p=function(){var t,e=[];for(s=t=0;0<=u?t<u:u<t;s=0<=u?++t:--t)e.push(n.readUInt16());return e}(),l=function(){var t,e=[];for(s=t=0;0<=u?t<u:u<t;s=0<=u?++t:--t)e.push(n.readUInt16());return e}(),c=function(){var t,e=[];for(s=t=0;0<=u?t<u:u<t;s=0<=u?++t:--t)e.push(n.readUInt16());return e}(),i=(this.length-n.pos+this.offset)/2,a=function(){var t,e=[];for(s=t=0;0<=i?t<i:i<t;s=0<=i?++t:--t)e.push(n.readUInt16());return e}(),s=g=0,v=o.length;g<v;s=++g)for(f=o[s],e=m=h=p[s];h<=f?m<=f:f<=m;e=h<=f?++m:--m)0===c[s]?r=e+l[s]:0!==(r=a[c[s]/2+(e-h)-(u-s)]||0)&&(r+=l[s]),this.codeMap[e]=65535&r}n.pos=t}var fo=(ei(go,E),go.prototype.tag="cmap",go.prototype.parse=function(t){var e,n,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=i?n<i:i<n;n=0<=i?++n:--n)e=new ho(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},go.encode=function(t,e){return null==e&&(e="macroman"),t=ho.encode(t,e),(e=new no).writeUInt16(0),e.writeUInt16(1),t.table=e.data.concat(t.subtable),t},go);function go(){return go.__super__.constructor.apply(this,arguments)}var mo=(ei(vo,E),vo.prototype.tag="hhea",vo.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},vo);function vo(){return vo.__super__.constructor.apply(this,arguments)}var bo=(ei(yo,E),yo.prototype.tag="OS/2",yo.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=function(){for(var t=[],e=0;e<10;++e)t.push(n.readByte());return t}(),this.charRange=function(){for(var t=[],e=0;e<4;++e)t.push(n.readInt());return t}(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),0<this.version&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=function(){for(var t=[],e=0;e<2;e=++e)t.push(n.readInt());return t}(),1<this.version))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},yo);function yo(){return yo.__super__.constructor.apply(this,arguments)}var wo=(ei(xo,E),xo.prototype.tag="post",xo.prototype.parse=function(i){var t,e;switch(i.pos=this.offset,this.format=i.readInt(),this.italicAngle=i.readInt(),this.underlinePosition=i.readShort(),this.underlineThickness=i.readShort(),this.isFixedPitch=i.readInt(),this.minMemType42=i.readInt(),this.maxMemType42=i.readInt(),this.minMemType1=i.readInt(),this.maxMemType1=i.readInt(),this.format){case 65536:break;case 131072:var o,n=i.readUInt16();for(this.glyphNameIndex=[],o=0;0<=n?o<n:n<o;o=0<=n?++o:--o)this.glyphNameIndex.push(i.readUInt16());for(this.names=[],e=[];i.pos<this.offset+this.length;)t=i.readByte(),e.push(this.names.push(i.readString(t)));return e;case 151552:return n=i.readUInt16(),this.offsets=i.read(n);case 196608:break;case 262144:return this.map=function(){var t,e,n=[];for(o=t=0,e=this.file.maxp.numGlyphs;0<=e?t<e:e<t;o=0<=e?++t:--t)n.push(i.readUInt32());return n}.call(this)}},xo);function xo(){return xo.__super__.constructor.apply(this,arguments)}var Co=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},Ao=(ei(Do,E),Do.prototype.tag="name",Do.prototype.parse=function(t){var e,n,i,o,r,a,s,l,c,u;for(t.pos=this.offset,t.readShort(),e=t.readShort(),a=t.readShort(),n=[],o=0;0<=e?o<e:e<o;o=0<=e?++o:--o)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+a+t.readShort()});for(s={},o=l=0,c=n.length;l<c;o=++l)i=n[o],t.pos=i.offset,u=t.readString(i.length),r=new Co(u,i),null==s[u=i.nameID]&&(s[u]=[]),s[i.nameID].push(r);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},Do);function Do(){return Do.__super__.constructor.apply(this,arguments)}var So=(ei(_o,E),_o.prototype.tag="maxp",_o.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},_o);function _o(){return _o.__super__.constructor.apply(this,arguments)}var Po=(ei(ko,E),ko.prototype.tag="hmtx",ko.prototype.parse=function(n){var i,t,o,r,e,a,s;for(n.pos=this.offset,this.metrics=[],i=0,a=this.file.hhea.numberOfMetrics;0<=a?i<a:a<i;i=0<=a?++i:--i)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var t,e=[];for(i=t=0;0<=o?t<o:o<t;i=0<=o?++t:--t)e.push(n.readInt16());return e}(),this.widths=function(){for(var t=this.metrics,e=[],n=0,i=t.length;n<i;n++)r=t[n],e.push(r.advance);return e}.call(this),t=this.widths[this.widths.length-1],s=[],i=e=0;0<=o?e<o:o<e;i=0<=o?++e:--e)s.push(this.widths.push(t));return s},ko.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},ko);function ko(){return ko.__super__.constructor.apply(this,arguments)}var Fo=[].slice,Io=(ei(Eo,E),Eo.prototype.tag="glyf",Eo.prototype.parse=function(){return this.cache={}},Eo.prototype.glyphFor=function(t){var e,n,i,o,r,a;return t in this.cache?this.cache[t]:(o=this.file.loca,i=this.file.contents,a=o.indexOf(t),0===(r=o.lengthOf(t))?this.cache[t]=null:(i.pos=this.offset+a,e=(n=new no(i.read(r))).readShort(),o=n.readShort(),a=n.readShort(),i=n.readShort(),r=n.readShort(),this.cache[t]=-1===e?new Oo(n,o,a,i,r):new Lo(n,e,o,a,i,r),this.cache[t]))},Eo.prototype.encode=function(t,e,n){for(var i,o=[],r=[],a=0,s=e.length;a<s;a++)i=t[e[a]],r.push(o.length),i&&(o=o.concat(i.encode(n)));return r.push(o.length),{table:o,offsets:r}},Eo);function Eo(){return Eo.__super__.constructor.apply(this,arguments)}var Lo=(No.prototype.encode=function(){return this.raw.data},No);function No(t,e,n,i,o,r){this.raw=t,this.numberOfContours=e,this.xMin=n,this.yMin=i,this.xMax=o,this.yMax=r,this.compound=!1}var Oo=(To.prototype.encode=function(){for(var t=new no(Fo.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},To);function To(t,e,n,i,o){var r,a;for(this.raw=t,this.xMin=e,this.yMin=n,this.xMax=i,this.yMax=o,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],r=this.raw;a=r.readShort(),this.glyphOffsets.push(r.pos),this.glyphIDs.push(r.readUInt16()),32&a;)r.pos+=1&a?4:2,128&a?r.pos+=8:64&a?r.pos+=4:8&a&&(r.pos+=2)}var Bo=(ei(Mo,E),Mo.prototype.tag="loca",Mo.prototype.parse=function(n){var t,i;return n.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=(0===t?function(){var t,e=[];for(i=0,t=this.length;i<t;i+=2)e.push(2*n.readUInt16());return e}:function(){var t,e=[];for(i=0,t=this.length;i<t;i+=4)e.push(n.readUInt32());return e}).call(this)},Mo.prototype.indexOf=function(t){return this.offsets[t]},Mo.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},Mo.prototype.encode=function(t,e){for(var n,i=new Uint32Array(this.offsets.length),o=0,r=0,a=0;a<i.length;++a)i[a]=o,r<e.length&&e[r]==a&&(++r,i[a]=o,n=this.offsets[a],0<(n=this.offsets[a+1]-n)&&(o+=n));for(var s=new Array(4*i.length),l=0;l<i.length;++l)s[4*l+3]=255&i[l],s[4*l+2]=(65280&i[l])>>8,s[4*l+1]=(16711680&i[l])>>16,s[4*l]=(4278190080&i[l])>>24;return s},Mo);function Mo(){return Mo.__super__.constructor.apply(this,arguments)}var zo,jo=(Ro.prototype.generateCmap=function(){var t,e,n=this.font.cmap.tables[0].codeMap,i={},o=this.subset;for(t in o)e=o[t],i[t]=n[e];return i},Ro.prototype.glyphsFor=function(t){for(var e,n,i,o,r={},a=0,s=t.length;a<s;a++)r[i=t[a]]=this.font.glyf.glyphFor(i);for(i in e=[],r)null!=(n=r[i])&&n.compound&&e.push.apply(e,n.glyphIDs);if(0<e.length)for(i in o=this.glyphsFor(e))n=o[i],r[i]=n;return r},Ro.prototype.encode=function(t,e){var n,i,o,r,a,s,l,c=fo.encode(this.generateCmap(),"unicode"),t=this.glyphsFor(t),u={0:0},d=c.charMap;for(n in d)u[(o=d[n]).old]=o.new;for(l in s=c.maxGlyphID,t)l in u||(u[l]=s++);return r=function(t){var e,n={};for(e in t)n[t[e]]=e;return n}(u),a=Object.keys(r).sort(function(t,e){return t-e}),c=function(){for(var t=[],e=0,n=a.length;e<n;e++)i=a[e],t.push(r[i]);return t}(),t=this.font.glyf.encode(t,c,u),c=this.font.loca.encode(t.offsets,c),e={cmap:this.font.cmap.raw(),glyf:t.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(e["OS/2"]=this.font.os2.raw()),this.font.directory.encode(e)},Ro);function Ro(t){this.font=t,this.subset={},this.unicodes={},this.next=33}function Uo(){}gn.API.PDFObject=(zo=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},Uo.convert=function(i){var o,t,e,n;if(Array.isArray(i))return"["+function(){for(var t=[],e=0,n=i.length;e<n;e++)o=i[e],t.push(Uo.convert(o));return t}().join(" ")+"]";if("string"==typeof i)return"/"+i;if(null!=i&&i.isString)return"("+i+")";if(i instanceof Date)return"(D:"+zo(i.getUTCFullYear(),4)+zo(i.getUTCMonth(),2)+zo(i.getUTCDate(),2)+zo(i.getUTCHours(),2)+zo(i.getUTCMinutes(),2)+zo(i.getUTCSeconds(),2)+"Z)";if("[object Object]"!=={}.toString.call(i))return""+i;for(t in e=["<<"],i)n=i[t],e.push("/"+t+" "+Uo.convert(n));return e.push(">>"),e.join("\n")},Uo),gn.API.adler32cs=function(){var n=typeof ArrayBuffer==="function"&&typeof Uint8Array==="function",i=null,o=function(){if(!n)return function t(){return false};try{var t={};if(typeof t.Buffer==="function")i=t.Buffer}catch(t){}return function t(e){return e instanceof ArrayBuffer||i!==null&&e instanceof i}}(),r=function(){if(i!==null)return function t(e){return new i(e,"utf8").toString("binary")};else return function t(e){return unescape(encodeURIComponent(e))}}(),s=65521,a=function t(e,n){var i=e&65535,o=e>>>16;for(var r=0,a=n.length;r<a;r++){i=(i+(n.charCodeAt(r)&255))%s;o=(o+i)%s}return(o<<16|i)>>>0},l=function t(e,n){var i=e&65535,o=e>>>16;for(var r=0,a=n.length;r<a;r++){i=(i+n[r])%s;o=(o+i)%s}return(o<<16|i)>>>0},t={},c=t.Adler32=function(){var i=function t(e){if(!(this instanceof i))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(e=e===null?1:+e))throw new Error("First arguments needs to be a finite number.");this.checksum=e>>>0};var e=i.prototype={};e.constructor=i;i.from=function(t){t.prototype=e;return t}(function t(e){if(!(this instanceof i))throw new TypeError("Constructor cannot called be as a function.");if(e===null)throw new Error("First argument needs to be a string.");this.checksum=a(1,e.toString())});i.fromUtf8=function(t){t.prototype=e;return t}(function t(e){if(!(this instanceof i))throw new TypeError("Constructor cannot called be as a function.");if(e===null)throw new Error("First argument needs to be a string.");var n=r(e.toString());this.checksum=a(1,n)});if(n)i.fromBuffer=function(t){t.prototype=e;return t}(function t(e){if(!(this instanceof i))throw new TypeError("Constructor cannot called be as a function.");if(!o(e))throw new Error("First argument needs to be ArrayBuffer.");var n=new Uint8Array(e);return this.checksum=l(1,n)});e.update=function t(e){if(e===null)throw new Error("First argument needs to be a string.");e=e.toString();return this.checksum=a(this.checksum,e)};e.updateUtf8=function t(e){if(e===null)throw new Error("First argument needs to be a string.");var n=r(e.toString());return this.checksum=a(this.checksum,n)};if(n)e.updateBuffer=function t(e){if(!o(e))throw new Error("First argument needs to be ArrayBuffer.");var n=new Uint8Array(e);return this.checksum=l(this.checksum,n)};e.clone=function t(){return new c(this.checksum)};return i}();if(t.from=function t(e){if(e===null)throw new Error("First argument needs to be a string.");return a(1,e.toString())},t.fromUtf8=function t(e){if(e===null)throw new Error("First argument needs to be a string.");var n=r(e.toString());return a(1,n)},n)t.fromBuffer=function t(e){if(!o(e))throw new Error("First argument need to be ArrayBuffer.");var n=new Uint8Array(e);return l(1,n)};return t}(),h.AcroForm=ut,h.AcroFormAppearance=lt,h.AcroFormButton=et,h.AcroFormCheckBox=rt,h.AcroFormChoiceField=Q,h.AcroFormComboBox=$,h.AcroFormEditBox=tt,h.AcroFormListBox=K,h.AcroFormPasswordField=st,h.AcroFormPushButton=nt,h.AcroFormRadioButton=it,h.AcroFormTextField=at,h.GState=hn,h.ShadingPattern=pn,h.TilingPattern=fn,h.default=gn,h.jsPDF=gn,Object.defineProperty(h,"__esModule",{value:!0})}),function(){function e(t){this.mode=r.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,n=this.data.length;e<n;e++){var i=[],o=this.data.charCodeAt(e);65536<o?(i[0]=240|(1835008&o)>>>18,i[1]=128|(258048&o)>>>12,i[2]=128|(4032&o)>>>6,i[3]=128|63&o):2048<o?(i[0]=224|(61440&o)>>>12,i[1]=128|(4032&o)>>>6,i[2]=128|63&o):128<o?(i[0]=192|(1984&o)>>>6,i[1]=128|63&o):i[0]=o,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function l(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function m(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var i=0;i<t.length-n;i++)this.num[i]=t[i+n]}function u(t,e){this.totalCount=t,this.dataCount=e}function c(){this.buffer=[],this.length=0}function i(){var t=!1,e=navigator.userAgent;return/android/i.test(e)&&(t=!0,(e=e.toString().match(/android ([0-9]\.[0-9])/i))&&e[1]&&(t=parseFloat(e[1]))),t}function n(t,e){for(var n,i=1,o=(n=t,(t=encodeURI(n).toString().replace(/\%[0-9a-fA-F]{2}/g,"a")).length+(t.length!=n?3:0)),r=0,a=w.length;r<=a;r++){var s=0;switch(e){case d.L:s=w[r][0];break;case d.M:s=w[r][1];break;case d.Q:s=w[r][2];break;case d.H:s=w[r][3]}if(o<=s)break;i++}if(w.length<i)throw new Error("Too long data");return i}e.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},l.prototype={addData:function(t){t=new e(t);this.dataList.push(t),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),7<=this.typeNumber&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var i=-1;i<=7;i++)e+i<=-1||this.moduleCount<=e+i||(this.modules[t+n][e+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},getBestMaskPattern:function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var i=b.getLostPoint(this);(0==n||i<t)&&(t=i,e=n)}return e},createMovieClip:function(t,e,n){var i=t.createEmptyMovieClip(e,n);this.make();for(var o=0;o<this.modules.length;o++)for(var r=+o,a=0;a<this.modules[o].length;a++){var s=+a;this.modules[o][a]&&(i.beginFill(0,100),i.moveTo(s,r),i.lineTo(1+s,r),i.lineTo(1+s,1+r),i.lineTo(s,1+r),i.endFill())}return i},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=b.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var i=t[e],o=t[n];if(null==this.modules[i][o])for(var r=-2;r<=2;r++)for(var a=-2;a<=2;a++)this.modules[i+r][o+a]=-2==r||2==r||-2==a||2==a||0==r&&0==a}},setupTypeNumber:function(t){for(var e=b.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var i=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=i}for(n=0;n<18;n++){i=!t&&1==(e>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=i}},setupTypeInfo:function(t,e){for(var e=this.errorCorrectLevel<<3|e,n=b.getBCHTypeInfo(e),i=0;i<15;i++){var o=!t&&1==(n>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!t&&1==(n>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,i=this.moduleCount-1,o=7,r=0,a=this.moduleCount-1;0<a;a-=2)for(6==a&&a--;;){for(var s,l=0;l<2;l++)null==this.modules[i][a-l]&&(s=!1,r<t.length&&(s=1==(t[r]>>>o&1)),b.getMask(e,i,a-l)&&(s=!s),this.modules[i][a-l]=s,-1==--o&&(r++,o=7));if((i+=n)<0||this.moduleCount<=i){i-=n,n=-n;break}}}},l.PAD0=236,l.PAD1=17,l.createData=function(t,e,n){for(var i=u.getRSBlocks(t,e),o=new c,r=0;r<n.length;r++){var a=n[r];o.put(a.mode,4),o.put(a.getLength(),b.getLengthInBits(a.mode,t)),a.write(o)}for(var s=0,r=0;r<i.length;r++)s+=i[r].dataCount;if(o.getLengthInBits()>8*s)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*s+")");for(o.getLengthInBits()+4<=8*s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*s)&&(o.put(l.PAD0,8),!(o.getLengthInBits()>=8*s));)o.put(l.PAD1,8);return l.createBytes(o,i)},l.createBytes=function(t,e){for(var n=0,i=0,o=0,r=new Array(e.length),a=new Array(e.length),s=0;s<e.length;s++){var l=e[s].dataCount,c=e[s].totalCount-l,i=Math.max(i,l),o=Math.max(o,c);r[s]=new Array(l);for(var u=0;u<r[s].length;u++)r[s][u]=255&t.buffer[u+n];n+=l;var c=b.getErrorCorrectPolynomial(c),d=new m(r[s],c.getLength()-1).mod(c);a[s]=new Array(c.getLength()-1);for(u=0;u<a[s].length;u++){var h=u+d.getLength()-a[s].length;a[s][u]=0<=h?d.get(h):0}}for(var p=0,u=0;u<e.length;u++)p+=e[u].totalCount;for(var f=new Array(p),g=0,u=0;u<i;u++)for(s=0;s<e.length;s++)u<r[s].length&&(f[g++]=r[s][u]);for(u=0;u<o;u++)for(s=0;s<e.length;s++)u<a[s].length&&(f[g++]=a[s][u]);return f};for(var r={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},d={L:1,M:0,Q:3,H:2},o=0,a=1,s=2,h=3,p=4,f=5,g=6,v=7,b={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;0<=b.getBCHDigit(e)-b.getBCHDigit(b.G15);)e^=b.G15<<b.getBCHDigit(e)-b.getBCHDigit(b.G15);return(t<<10|e)^b.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;0<=b.getBCHDigit(e)-b.getBCHDigit(b.G18);)e^=b.G18<<b.getBCHDigit(e)-b.getBCHDigit(b.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return b.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case o:return(e+n)%2==0;case a:return e%2==0;case s:return n%3==0;case h:return(e+n)%3==0;case p:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case f:return e*n%2+e*n%3==0;case g:return(e*n%2+e*n%3)%2==0;case v:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new m([1],0),n=0;n<t;n++)e=e.multiply(new m([1,y.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,i=0;i<e;i++)for(var o=0;o<e;o++){for(var r=0,a=t.isDark(i,o),s=-1;s<=1;s++)if(!(i+s<0||e<=i+s))for(var l=-1;l<=1;l++)o+l<0||e<=o+l||0==s&&0==l||a!=t.isDark(i+s,o+l)||r++;5<r&&(n+=3+r-5)}for(i=0;i<e-1;i++)for(o=0;o<e-1;o++){var c=0;t.isDark(i,o)&&c++,t.isDark(i+1,o)&&c++,t.isDark(i,o+1)&&c++,t.isDark(i+1,o+1)&&c++,0!=c&&4!=c||(n+=3)}for(i=0;i<e;i++)for(o=0;o<e-6;o++)t.isDark(i,o)&&!t.isDark(i,o+1)&&t.isDark(i,o+2)&&t.isDark(i,o+3)&&t.isDark(i,o+4)&&!t.isDark(i,o+5)&&t.isDark(i,o+6)&&(n+=40);for(o=0;o<e;o++)for(i=0;i<e-6;i++)t.isDark(i,o)&&!t.isDark(i+1,o)&&t.isDark(i+2,o)&&t.isDark(i+3,o)&&t.isDark(i+4,o)&&!t.isDark(i+5,o)&&t.isDark(i+6,o)&&(n+=40);for(var u=0,o=0;o<e;o++)for(i=0;i<e;i++)t.isDark(i,o)&&u++;return n+10*(Math.abs(100*u/e/e-50)/5)}},y={glog:function(t){if(t<1)throw new Error("glog("+t+")");return y.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;256<=t;)t-=255;return y.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)y.EXP_TABLE[t]=1<<t;for(t=8;t<256;t++)y.EXP_TABLE[t]=y.EXP_TABLE[t-4]^y.EXP_TABLE[t-5]^y.EXP_TABLE[t-6]^y.EXP_TABLE[t-8];for(t=0;t<255;t++)y.LOG_TABLE[y.EXP_TABLE[t]]=t;m.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<t.getLength();i++)e[n+i]^=y.gexp(y.glog(this.get(n))+y.glog(t.get(i)));return new m(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=y.glog(this.get(0))-y.glog(t.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<t.getLength();i++)n[i]^=y.gexp(y.glog(t.get(i))+e);return new m(n,0).mod(t)}},u.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],u.getRSBlocks=function(t,e){var n=u.getRsBlockTable(t,e);if(null==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var i=n.length/3,o=[],r=0;r<i;r++)for(var a=n[3*r+0],s=n[3*r+1],l=n[3*r+2],c=0;c<a;c++)o.push(new u(s,l));return o},u.getRsBlockTable=function(t,e){switch(e){case d.L:return u.RS_BLOCK_TABLE[4*(t-1)+0];case d.M:return u.RS_BLOCK_TABLE[4*(t-1)+1];case d.Q:return u.RS_BLOCK_TABLE[4*(t-1)+2];case d.H:return u.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},c.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var w=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],x=(D.prototype.draw=function(t){function e(t,e){var n,i=document.createElementNS("http://www.w3.org/2000/svg",t);for(n in e)e.hasOwnProperty(n)&&i.setAttribute(n,e[n]);return i}var n=this._htOption,i=this._el,o=t.getModuleCount();Math.floor(n.width/o),Math.floor(n.height/o);this.clear();var r=e("svg",{viewBox:"0 0 "+String(o)+" "+String(o),width:"100%",height:"100%",fill:n.colorLight});r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),i.appendChild(r),r.appendChild(e("rect",{fill:n.colorLight,width:"100%",height:"100%"})),r.appendChild(e("rect",{fill:n.colorDark,width:"1",height:"1",id:"template"}));for(var a,s=0;s<o;s++)for(var l=0;l<o;l++)t.isDark(s,l)&&((a=e("use",{x:String(l),y:String(s)})).setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),r.appendChild(a))},D.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},D),C="svg"===document.documentElement.tagName.toLowerCase()?x:"undefined"!=typeof CanvasRenderingContext2D?function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function e(t,e){var n=this;if(n._fFail=e,n._fSuccess=t,null===n._bSupportDataURI){e=document.createElement("img"),t=function(){n._bSupportDataURI=!1,n._fFail&&n._fFail.call(n)};return e.onabort=t,e.onerror=t,e.onload=function(){n._bSupportDataURI=!0,n._fSuccess&&n._fSuccess.call(n)},void(e.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}!0===n._bSupportDataURI&&n._fSuccess?n._fSuccess.call(n):!1===n._bSupportDataURI&&n._fFail&&n._fFail.call(n)}var u,d;this._android&&this._android<=2.1&&(u=1/window.devicePixelRatio,d=CanvasRenderingContext2D.prototype.drawImage,CanvasRenderingContext2D.prototype.drawImage=function(t,e,n,i,o,r,a,s,l){if("nodeName"in t&&/img/i.test(t.nodeName))for(var c=arguments.length-1;1<=c;c--)arguments[c]=arguments[c]*u;else void 0===s&&(arguments[1]*=u,arguments[2]*=u,arguments[3]*=u,arguments[4]*=u);d.apply(this,arguments)});function n(t,e){this._bIsPainted=!1,this._android=i(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null}return n.prototype.draw=function(t){var e=this._elImage,n=this._oContext,i=this._htOption,o=t.getModuleCount(),r=i.width/o,a=i.height/o,s=Math.round(r),l=Math.round(a);e.style.display="none",this.clear();for(var c=0;c<o;c++)for(var u=0;u<o;u++){var d=t.isDark(c,u),h=u*r,p=c*a;n.strokeStyle=d?i.colorDark:i.colorLight,n.lineWidth=1,n.fillStyle=d?i.colorDark:i.colorLight,n.fillRect(h,p,r,a),n.strokeRect(Math.floor(h)+.5,Math.floor(p)+.5,s,l),n.strokeRect(Math.ceil(h)-.5,Math.ceil(p)-.5,s,l)}this._bIsPainted=!0},n.prototype.makeImage=function(){this._bIsPainted&&e.call(this,t)},n.prototype.isPainted=function(){return this._bIsPainted},n.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},n.prototype.round=function(t){return t&&Math.floor(1e3*t)/1e3},n}():(A.prototype.draw=function(t){for(var e=this._htOption,n=this._el,i=t.getModuleCount(),o=Math.floor(e.width/i),r=Math.floor(e.height/i),a=['<table style="border:0;border-collapse:collapse;">'],s=0;s<i;s++){a.push("<tr>");for(var l=0;l<i;l++)a.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+o+"px;height:"+r+"px;background-color:"+(t.isDark(s,l)?e.colorDark:e.colorLight)+';"></td>');a.push("</tr>")}a.push("</table>"),n.innerHTML=a.join("");var c=n.childNodes[0],u=(e.width-c.offsetWidth)/2,n=(e.height-c.offsetHeight)/2;0<u&&0<n&&(c.style.margin=n+"px "+u+"px")},A.prototype.clear=function(){this._el.innerHTML=""},A);function A(t,e){this._el=t,this._htOption=e}function D(t,e){this._el=t,this._htOption=e}(QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"string"==typeof e&&(e={text:e}),e)for(var n in e)this._htOption[n]=e[n];"string"==typeof t&&(t=document.getElementById(t)),this._htOption.useSVG&&(C=x),this._android=i(),this._el=t,this._oQRCode=null,this._oDrawing=new C(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)}).prototype.makeCode=function(t){this._oQRCode=new l(n(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||3<=this._android)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}(),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(r){"use strict";Number.isNaN=Number.isNaN||function(t){return"number"==typeof t&&t!=t};var t,a="rangeslider",s=0,l=((t=document.createElement("input")).setAttribute("type","range"),"text"!==t.type),c={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},u={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};function n(t,e){var n=function(t){for(var e,n=[],i=t.parentNode;(e=i)&&(0===e.offsetWidth||0===e.offsetHeight||!1===e.open);)n.push(i),i=i.parentNode;return n}(t),i=n.length,o=[],r=t[e];function a(t){void 0!==t.open&&(t.open=!t.open)}if(i){for(var s=0;s<i;s++)o[s]=n[s].style.cssText,n[s].style.setProperty?n[s].style.setProperty("display","block","important"):n[s].style.cssText+=";display: block !important",n[s].style.height="0",n[s].style.overflow="hidden",n[s].style.visibility="hidden",a(n[s]);r=t[e];for(var l=0;l<i;l++)n[l].style.cssText=o[l],a(n[l])}return r}function i(t,e){t=parseFloat(t);return Number.isNaN(t)?e:t}function o(t){return t.charAt(0).toUpperCase()+t.substr(1)}function d(t,e){if(this.$window=r(window),this.$document=r(document),this.$element=r(t),this.options=r.extend({},c,e),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=u.orientation[this.orientation].dimension,this.DIRECTION=u.orientation[this.orientation].direction,this.DIRECTION_STYLE=u.orientation[this.orientation].directionStyle,this.COORDINATE=u.orientation[this.orientation].coordinate,this.polyfill&&l)return!1;this.identifier="js-"+a+"-"+s++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=r('<div class="'+this.options.fillClass+'" />'),this.$handle=r('<div class="'+this.options.handleClass+'" />'),this.$range=r('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=r.proxy(this.handleDown,this),this.handleMove=r.proxy(this.handleMove,this),this.handleEnd=r.proxy(this.handleEnd,this),this.init();var n,i,o=this;this.$window.on("resize."+this.identifier,(n=function(){!function(t,e){var n=Array.prototype.slice.call(arguments,2);setTimeout(function(){return t.apply(null,n)},e)}(function(){o.update(!1,!1)},300)},i=(i=20)||100,function(){var t;return n.debouncing||(t=Array.prototype.slice.apply(arguments),n.lastReturnVal=n.apply(window,t),n.debouncing=!0),clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},i),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(t,e){e&&e.origin===o.identifier||(t=t.target.value,t=o.getPositionFromValue(t),o.setPosition(t))})}return d.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},d.prototype.update=function(t,e){(t=t||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=n(this.$handle[0],"offset"+o(this.DIMENSION)),this.rangeDimension=n(this.$range[0],"offset"+o(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,e)},d.prototype.handleDown=function(t){var e,n;t.preventDefault(),t.button&&0!==t.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),-1<(" "+t.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)||(e=this.getRelativePosition(t),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],t=this.getPositionFromNode(this.$handle[0])-n,n="vertical"===this.orientation?this.maxHandlePos-(e-this.grabPos):e-this.grabPos,this.setPosition(n),t<=e&&e<t+this.handleDimension&&(this.grabPos=e-t)))},d.prototype.handleMove=function(t){t.preventDefault();t=this.getRelativePosition(t),t="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(t)},d.prototype.handleEnd=function(t){t.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},d.prototype.cap=function(t,e,n){return t<e?e:n<t?n:t},d.prototype.setPosition=function(t,e){var n;void 0===e&&(e=!0),n=this.getValueFromPosition(this.cap(t,0,this.maxHandlePos)),t=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=t+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=t+"px",this.setValue(n),this.position=t,this.value=n,e&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(t,n)},d.prototype.getPositionFromNode=function(t){for(var e=0;null!==t;)e+=t.offsetLeft,t=t.offsetParent;return e},d.prototype.getRelativePosition=function(t){var e=o(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==t.originalEvent["client"+e]?i=t.originalEvent["client"+e]:t.originalEvent.touches&&t.originalEvent.touches[0]&&void 0!==t.originalEvent.touches[0]["client"+e]?i=t.originalEvent.touches[0]["client"+e]:t.currentPoint&&void 0!==t.currentPoint[this.COORDINATE]&&(i=t.currentPoint[this.COORDINATE]),i-n},d.prototype.getPositionFromValue=function(t){t=(t-this.min)/(this.max-this.min);return Number.isNaN(t)?0:t*this.maxHandlePos},d.prototype.getValueFromPosition=function(t){var t=t/(this.maxHandlePos||1),t=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min;return Number(t.toFixed(this.toFixed))},d.prototype.setValue=function(t){t===this.value&&""!==this.$element[0].value||this.$element.val(t).trigger("input",{origin:this.identifier})},d.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+a),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},r.fn[a]=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=r(this),e=t.data("plugin_"+a);e||t.data("plugin_"+a,e=new d(this,n)),"string"==typeof n&&e[n].apply(e,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):t(jQuery)}(function(Lt,Nt){"use strict";var t,Ot={beforeShow:n,move:n,change:n,show:n,hide:n,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},Tt=[],Bt=!!/msie/i.exec(window.navigator.userAgent),Mt=((t=document.createElement("div").style).cssText="background-color:rgba(0,0,0,.5)",e(t.backgroundColor,"rgba")||e(t.backgroundColor,"hsla")),zt=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>▼</div>","</div>"].join(""),jt=function(){var t="";if(Bt)for(var e=1;e<=6;e++)t+="<div class='sp-"+e+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",t,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false' />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}();function e(t,e){return!!~(""+t).indexOf(e)}function Rt(t,e,n,i){for(var o=[],r=0;r<t.length;r++){var a,s,l,c=t[r];c?(s=(a=tinycolor(c)).toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light",s+=tinycolor.equals(e,c)?" sp-thumb-active":"",l=a.toString(i.preferredFormat||"rgb"),c=Mt?"background-color:"+a.toRgbString():"filter:"+a.toFilter(),o.push('<span title="'+l+'" data-color="'+a.toRgbString()+'" class="'+s+'"><span class="sp-thumb-inner" style="'+c+';"></span></span>')):o.push(Lt("<div />").append(Lt('<span data-color="" style="background-color:transparent;" class="sp-clear-display"></span>').attr("title",i.noColorSelectedText)).html())}return"<div class='sp-cf "+n+"'>"+o.join("")+"</div>"}function r(t,e){var n,i,o,r,a,l=(a=e,e=t,(a=Lt.extend({},Ot,a)).callbacks={move:Wt(a.move,e),change:Wt(a.change,e),show:Wt(a.show,e),hide:Wt(a.hide,e),beforeShow:Wt(a.beforeShow,e)},a),c=l.flat,s=l.showSelectionPalette,u=l.localStorageKey,a=l.theme,d=l.callbacks,h=(n=Ft,function(){var t=this,e=arguments;o&&clearTimeout(r),!o&&r||(r=setTimeout(function(){r=null,n.apply(t,e)},i))}),p=!(i=10),f=!1,g=0,m=0,v=0,b=0,y=0,w=0,x=0,C=0,A=0,D=0,S=1,_=[],P=[],k={},F=l.selectionPalette.slice(0),I=l.maxSelectionSize,E="sp-dragging",L=null,N=t.ownerDocument,O=(N.body,Lt(t)),T=!1,B=Lt(jt,N).addClass(a),M=B.find(".sp-picker-container"),z=B.find(".sp-color"),j=B.find(".sp-dragger"),R=B.find(".sp-hue"),U=B.find(".sp-slider"),W=B.find(".sp-alpha-inner"),H=B.find(".sp-alpha"),V=B.find(".sp-alpha-handle"),q=B.find(".sp-input"),G=B.find(".sp-palette"),Y=B.find(".sp-initial"),Z=B.find(".sp-cancel"),J=B.find(".sp-clear"),X=B.find(".sp-choose"),Q=B.find(".sp-palette-toggle"),K=O.is("input"),t=K&&"color"===O.attr("type")&&Vt(),$=K&&!c,tt=$?Lt(zt).addClass(a).addClass(l.className).addClass(l.replacerClassName):Lt([]),et=$?tt:O,nt=tt.find(".sp-preview-inner"),it=l.color||K&&O.val(),ot=!1,rt=l.preferredFormat,at=!l.showButtons||l.clickoutFiresChange,st=!it,lt=l.allowEmpty&&!t;function ct(){if(l.showPaletteOnly&&(l.showPalette=!0),Q.text(l.showPaletteOnly?l.togglePaletteMoreText:l.togglePaletteLessText),l.palette){_=l.palette.slice(0),P=Array.isArray(_[0])?_:[_],k={};for(var t=0;t<P.length;t++)for(var e=0;e<P[t].length;e++){var n=tinycolor(P[t][e]).toRgbString();k[n]=!0}}B.toggleClass("sp-flat",c),B.toggleClass("sp-input-disabled",!l.showInput),B.toggleClass("sp-alpha-enabled",l.showAlpha),B.toggleClass("sp-clear-enabled",lt),B.toggleClass("sp-buttons-disabled",!l.showButtons),B.toggleClass("sp-palette-buttons-disabled",!l.togglePaletteOnly),B.toggleClass("sp-palette-disabled",!l.showPalette),B.toggleClass("sp-palette-only",l.showPaletteOnly),B.toggleClass("sp-initial-disabled",!l.showInitial),B.addClass(l.className).addClass(l.containerClassName),Ft()}function ut(){if(u&&window.localStorage){try{var t=window.localStorage[u].split(",#");1<t.length&&(delete window.localStorage[u],Lt.each(t,function(t,e){dt(e)}))}catch(t){}try{F=window.localStorage[u].split(";")}catch(t){}}}function dt(t){if(s){t=tinycolor(t).toRgbString();if(!k[t]&&-1===Lt.inArray(t,F))for(F.push(t);F.length>I;)F.shift();if(u&&window.localStorage)try{window.localStorage[u]=F.join(";")}catch(t){}}}function ht(){var n=Dt(),t=Lt.map(P,function(t,e){return Rt(t,n,"sp-palette-row sp-palette-row-"+e,l)});ut(),F&&t.push(Rt(function(){var t=[];if(l.showPalette)for(var e=0;e<F.length;e++){var n=tinycolor(F[e]).toRgbString();k[n]||t.push(F[e])}return t.reverse().slice(0,l.maxSelectionSize)}(),n,"sp-palette-row sp-palette-row-selection",l)),G.html(t.join(""))}function pt(){var t,e;l.showInitial&&(t=ot,e=Dt(),Y.html(Rt([t,e],e,"sp-palette-row-initial",l)))}function ft(){(m<=0||g<=0||b<=0)&&Ft(),f=!0,B.addClass(E),L=null,O.trigger("dragstart.spectrum",[Dt()])}function gt(){f=!1,B.removeClass(E),O.trigger("dragstop.spectrum",[Dt()])}function mt(){var t=q.val();null!==t&&""!==t||!lt?(t=tinycolor(t)).isValid()?(At(t),St(),kt()):q.addClass("sp-validation-error"):(At(null),St(),kt())}function vt(){(p?xt:bt)()}function bt(){var t=Lt.Event("beforeShow.spectrum");p?Ft():(O.trigger(t,[Dt()]),!1===d.beforeShow(Dt())||t.isDefaultPrevented()||(function(){for(var t=0;t<Tt.length;t++)Tt[t]&&Tt[t].hide()}(),p=!0,Lt(N).on("keydown.spectrum",yt),Lt(N).on("click.spectrum",wt),Lt(window).on("resize.spectrum",h),tt.addClass("sp-active"),B.removeClass("sp-hidden"),Ft(),_t(),ot=Dt(),pt(),d.show(ot),O.trigger("show.spectrum",[ot])))}function yt(t){27===t.keyCode&&xt()}function wt(t){2!=t.button&&(f||(at?kt(!0):Ct(),xt()))}function xt(){p&&!c&&(p=!1,Lt(N).off("keydown.spectrum",yt),Lt(N).off("click.spectrum",wt),Lt(window).off("resize.spectrum",h),tt.removeClass("sp-active"),B.addClass("sp-hidden"),d.hide(Dt()),O.trigger("hide.spectrum",[Dt()]))}function Ct(){At(ot,!0),kt(!0)}function At(t,e){var n;tinycolor.equals(t,Dt())?_t():(!t&<?st=!0:(st=!1,t=(n=tinycolor(t)).toHsv(),C=t.h%360/360,A=t.s,D=t.v,S=t.a),_t(),n&&n.isValid()&&!e&&(rt=l.preferredFormat||n.getFormat()))}function Dt(t){return t=t||{},lt&&st?null:tinycolor.fromRatio({h:C,s:A,v:D,a:Math.round(1e3*S)/1e3},{format:t.format||rt})}function St(){_t(),d.move(Dt()),O.trigger("move.spectrum",[Dt()])}function _t(){q.removeClass("sp-validation-error"),Pt();var t=tinycolor.fromRatio({h:C,s:1,v:1});z.css("background-color",t.toHexString());var e=rt;S<1&&(0!==S||"name"!==e)&&("hex"!==e&&"hex3"!==e&&"hex6"!==e&&"name"!==e||(e="rgb"));var n,i,o=Dt({format:e}),r="";nt.removeClass("sp-clear-display"),nt.css("background-color","transparent"),!o&<?nt.addClass("sp-clear-display"):(n=o.toHexString(),i=o.toRgbString(),Mt||1===o.alpha?nt.css("background-color",i):(nt.css("background-color","transparent"),nt.css("filter",o.toFilter())),l.showAlpha&&((t=o.toRgb()).a=0,t="linear-gradient(left, "+(i=tinycolor(t).toRgbString())+", "+n+")",Bt?W.css("filter",tinycolor(i).toFilter({gradientType:1},n)):(W.css("background","-webkit-"+t),W.css("background","-moz-"+t),W.css("background","-ms-"+t),W.css("background","linear-gradient(to right, "+i+", "+n+")"))),r=o.toString(e)),l.showInput&&q.val(r),l.showPalette&&ht(),pt()}function Pt(){var t=A,e=D;lt&&st?(V.hide(),U.hide(),j.hide()):(V.show(),U.show(),j.show(),t=t*g,e=m-e*m,t=Math.max(-v,Math.min(g-v,t-v)),e=Math.max(-v,Math.min(m-v,e-v)),j.css({top:e+"px",left:t+"px"}),t=S*y,V.css({left:t-w/2+"px"}),t=C*b,U.css({top:t-x+"px"}))}function kt(t){var e=Dt(),n="",i=!tinycolor.equals(e,ot);e&&(n=e.toString(rt),dt(e)),K&&O.val(n),t&&i&&(d.change(e),O.trigger("change",[e]))}function Ft(){var t,e,n,i,o,r,a,s;p&&(g=z.width(),m=z.height(),v=j.height(),R.width(),b=R.height(),x=U.height(),y=H.width(),w=V.width(),c||(B.css("position","absolute"),l.offset?B.offset(l.offset):B.offset((e=et,n=(t=B).outerWidth(),i=t.outerHeight(),o=e.outerHeight(),r=t[0].ownerDocument,a=r.documentElement,s=a.clientWidth+Lt(r).scrollLeft(),t=a.clientHeight+Lt(r).scrollTop(),a=e.offset(),r=a.left,e=a.top,e+=o,r-=Math.min(r,s<r+n&&n<s?Math.abs(r+n-s):0),{top:e-=Math.min(e,t<e+i&&i<t?Math.abs(+(i+o)):0),bottom:a.bottom,left:r,right:a.right,width:a.width,height:a.height}))),Pt(),l.showPalette&&ht(),O.trigger("reflow.spectrum"))}function It(){xt(),T=!0,O.attr("disabled",!0),et.addClass("sp-disabled")}!function(){function t(t){return t.data&&t.data.ignore?(At(Lt(t.target).closest(".sp-thumb-el").data("color")),St()):(At(Lt(t.target).closest(".sp-thumb-el").data("color")),St(),l.hideAfterPaletteSelect?(kt(!0),xt()):kt()),!1}Bt&&B.find("*:not(input)").attr("unselectable","on"),ct(),$&&O.after(tt).hide(),lt||J.hide(),c?O.after(B).hide():(1!==(e="parent"===l.appendTo?O.parent():Lt(l.appendTo)).length&&(e=Lt("body")),e.append(B)),ut(),et.on("click.spectrum touchstart.spectrum",function(t){T||vt(),t.stopPropagation(),Lt(t.target).is("input")||t.preventDefault()}),!O.is(":disabled")&&!0!==l.disabled||It(),B.on("click",Ut),q.on("change",mt),q.on("paste",function(){setTimeout(mt,1)}),q.on("keydown",function(t){13==t.keyCode&&mt()}),Z.text(l.cancelText),Z.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Ct(),xt()}),J.attr("title",l.clearText),J.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),st=!0,St(),c&&kt(!0)}),X.text(l.chooseText),X.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Bt&&q.is(":focus")&&q.trigger("change"),q.hasClass("sp-validation-error")||(kt(!0),xt())}),Q.text(l.showPaletteOnly?l.togglePaletteMoreText:l.togglePaletteLessText),Q.on("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),l.showPaletteOnly=!l.showPaletteOnly,l.showPaletteOnly||c||B.css("left","-="+(M.outerWidth(!0)+5)),ct()}),Ht(H,function(t,e,n){S=t/y,st=!1,n.shiftKey&&(S=Math.round(10*S)/10),St()},ft,gt),Ht(R,function(t,e){C=parseFloat(e/b),st=!1,l.showAlpha||(S=1),St()},ft,gt),Ht(z,function(t,e,n){n.shiftKey?L||(n=A*g,i=m-D*m,i=Math.abs(t-n)>Math.abs(e-i),L=i?"x":"y"):L=null;var i=!L||"y"===L;L&&"x"!==L||(A=parseFloat(t/g)),i&&(D=parseFloat((m-e)/m)),st=!1,l.showAlpha||(S=1),St()},ft,gt),it?(At(it),_t(),rt=l.preferredFormat||tinycolor(it).format,dt(it)):_t(),c&&bt();var e=Bt?"mousedown.spectrum":"click.spectrum touchstart.spectrum";G.on(e,".sp-thumb-el",t),Y.on(e,".sp-thumb-el:nth-child(1)",{ignore:!0},t)}();var Et={show:bt,hide:xt,toggle:vt,reflow:Ft,option:function(t,e){return t===Nt?Lt.extend({},l):e===Nt?l[t]:(l[t]=e,"preferredFormat"===t&&(rt=l.preferredFormat),void ct())},enable:function(){T=!1,O.attr("disabled",!1),et.removeClass("sp-disabled")},disable:It,offset:function(t){l.offset=t,Ft()},set:function(t){At(t),kt()},get:Dt,destroy:function(){O.show(),et.off("click.spectrum touchstart.spectrum"),B.remove(),tt.remove(),Tt[Et.id]=null},container:B};return Et.id=Tt.push(Et)-1,Et}function n(){}function Ut(t){t.stopPropagation()}function Wt(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function Ht(i,o,e,t){o=o||function(){},e=e||function(){},t=t||function(){};var r=document,a=!1,s={},l=0,c=0,u="ontouchstart"in window,n={};function d(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function h(t){if(a){if(Bt&&r.documentMode<9&&!t.button)return p();var e=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],n=e&&e.pageX||t.pageX,e=e&&e.pageY||t.pageY,n=Math.max(0,Math.min(n-s.left,c)),e=Math.max(0,Math.min(e-s.top,l));u&&d(t),o.apply(i,[n,e,t])}}function p(){a&&(Lt(r).off(n),Lt(r.body).removeClass("sp-dragging"),setTimeout(function(){t.apply(i,arguments)},0)),a=!1}n.selectstart=d,n.dragstart=d,n["touchmove mousemove"]=h,n["touchend mouseup"]=p,Lt(i).on("touchstart mousedown",function(t){(t.which?3==t.which:2==t.button)||a||!1!==e.apply(i,arguments)&&(a=!0,l=Lt(i).height(),c=Lt(i).width(),s=Lt(i).offset(),Lt(r).on(n),Lt(r.body).addClass("sp-dragging"),h(t),d(t))})}function Vt(){return Lt.fn.spectrum.inputTypeColorSupport()}var a="spectrum.id";Lt.fn.spectrum=function(n,t){if("string"!=typeof n)return this.spectrum("destroy").each(function(){var t=r(this,Lt.extend({},Lt(this).data(),n));Lt(this).data(a,t.id)});var i=this,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=Tt[Lt(this).data(a)];if(t){var e=t[n];if(!e)throw new Error("Spectrum: no such method: '"+n+"'");"get"==n?i=t.get():"container"==n?i=t.container:"option"==n?i=t.option.apply(t,o):"destroy"==n?(t.destroy(),Lt(this).removeData(a)):e.apply(t,o)}}),i},Lt.fn.spectrum.load=!0,Lt.fn.spectrum.loadOpts={},Lt.fn.spectrum.draggable=Ht,Lt.fn.spectrum.defaults=Ot,Lt.fn.spectrum.inputTypeColorSupport=function t(){var e;return void 0===t._cachedResult&&(e=Lt("<input type='color'/>")[0],t._cachedResult="color"===e.type&&""!==e.value),t._cachedResult},Lt.spectrum={},Lt.spectrum.localization={},Lt.spectrum.palettes={},Lt.fn.spectrum.processNativeColorInputs=function(){var t=Lt("input[type=color]");t.length&&!Vt()&&t.spectrum({preferredFormat:"hex6"})},function(){var r=/^[\s,#]+/,a=/\s+$/,i=0,s=Math,o=s.round,c=s.min,u=s.max,t=s.random,l=function(t,e){if(e=e||{},(t=t||"")instanceof l)return t;if(!(this instanceof l))return new l(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,i=!1,o=!1;"string"==typeof t&&(t=function(t){t=t.replace(r,"").replace(a,"").toLowerCase();var e,n=!1;if(_[t])t=_[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=B.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=B.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=B.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=B.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=B.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=B.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=B.hex8.exec(t))return{a:function(t){return E(t)/255}(e[1]),r:E(e[2]),g:E(e[3]),b:E(e[4]),format:n?"name":"hex8"};if(e=B.hex6.exec(t))return{r:E(e[1]),g:E(e[2]),b:E(e[3]),format:n?"name":"hex"};if(e=B.hex3.exec(t))return{r:E(e[1]+""+e[1]),g:E(e[2]+""+e[2]),b:E(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(t));"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=function(t,e,n){return{r:255*F(t,255),g:255*F(e,255),b:255*F(n,255)}}(t.r,t.g,t.b),i=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=N(t.s),t.v=N(t.v),e=function(t,e,n){t=6*F(t,360),e=F(e,100),n=F(n,100);var i=s.floor(t),o=t-i,r=n*(1-e),t=n*(1-o*e),e=n*(1-(1-o)*e),i=i%6;return{r:255*[n,t,r,r,e,n][i],g:255*[e,n,n,t,r,r][i],b:255*[r,r,e,n,n,t][i]}}(t.h,t.s,t.v),i=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=N(t.s),t.l=N(t.l),e=function(t,e,n){var i,o,r;function a(t,e,n){return n<0&&(n+=1),1<n&&--n,n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}t=F(t,360),e=F(e,100),n=F(n,100),0===e?i=o=r=n:(i=a(e=2*n-(n=n<.5?n*(1+e):n+e-n*e),n,t+1/3),o=a(e,n,t),r=a(e,n,t-1/3));return{r:255*i,g:255*o,b:255*r}}(t.h,t.s,t.l),i=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a));return n=k(n),{ok:i,format:t.format||o,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=o(1e3*this._a)/1e3,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=n.ok,this._tc_id=i++};function d(t,e,n){t=F(t,255),e=F(e,255),n=F(n,255);var i,o=u(t,e,n),r=c(t,e,n),a=(o+r)/2;if(o==r)i=l=0;else{var s=o-r,l=.5<a?s/(2-o-r):s/(o+r);switch(o){case t:i=(e-n)/s+(e<n?6:0);break;case e:i=(n-t)/s+2;break;case n:i=(t-e)/s+4}i/=6}return{h:i,s:l,l:a}}function h(t,e,n){t=F(t,255),e=F(e,255),n=F(n,255);var i,o=u(t,e,n),r=c(t,e,n),a=o,s=o-r,l=0===o?0:s/o;if(o==r)i=0;else{switch(o){case t:i=(e-n)/s+(e<n?6:0);break;case e:i=(n-t)/s+2;break;case n:i=(t-e)/s+4}i/=6}return{h:i,s:l,v:a}}function e(t,e,n,i){n=[L(o(t).toString(16)),L(o(e).toString(16)),L(o(n).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function p(t,e,n,i){return[L((i=i,Math.round(255*parseFloat(i)).toString(16))),L(o(t).toString(16)),L(o(e).toString(16)),L(o(n).toString(16))].join("")}function n(t,e){e=0===e?0:e||10;t=l(t).toHsl();return t.s-=e/100,t.s=I(t.s),l(t)}function f(t,e){e=0===e?0:e||10;t=l(t).toHsl();return t.s+=e/100,t.s=I(t.s),l(t)}function g(t){return l(t).desaturate(100)}function m(t,e){e=0===e?0:e||10;t=l(t).toHsl();return t.l+=e/100,t.l=I(t.l),l(t)}function v(t,e){e=0===e?0:e||10;t=l(t).toRgb();return t.r=u(0,c(255,t.r-o(-e/100*255))),t.g=u(0,c(255,t.g-o(-e/100*255))),t.b=u(0,c(255,t.b-o(-e/100*255))),l(t)}function b(t,e){e=0===e?0:e||10;t=l(t).toHsl();return t.l-=e/100,t.l=I(t.l),l(t)}function y(t,e){t=l(t).toHsl(),e=(o(t.h)+e)%360;return t.h=e<0?360+e:e,l(t)}function w(t){t=l(t).toHsl();return t.h=(t.h+180)%360,l(t)}function x(t){var e=l(t).toHsl(),n=e.h;return[l(t),l({h:(n+120)%360,s:e.s,l:e.l}),l({h:(n+240)%360,s:e.s,l:e.l})]}function C(t){var e=l(t).toHsl(),n=e.h;return[l(t),l({h:(n+90)%360,s:e.s,l:e.l}),l({h:(n+180)%360,s:e.s,l:e.l}),l({h:(n+270)%360,s:e.s,l:e.l})]}function A(t){var e=l(t).toHsl(),n=e.h;return[l(t),l({h:(n+72)%360,s:e.s,l:e.l}),l({h:(n+216)%360,s:e.s,l:e.l})]}function D(t,e,n){e=e||6,n=n||30;var i=l(t).toHsl(),o=360/n,r=[l(t)];for(i.h=(i.h-(o*e>>1)+720)%360;--e;)i.h=(i.h+o)%360,r.push(l(i));return r}function S(t,e){e=e||6;for(var t=l(t).toHsv(),n=t.h,i=t.s,o=t.v,r=[],a=1/e;e--;)r.push(l({h:n,s:i,v:o})),o=(o+a)%1;return r}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=k(t),this._roundA=o(1e3*this._a)/1e3,this},toHsv:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=h(this._r,this._g,this._b),e=o(360*t.h),n=o(100*t.s),t=o(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+t+"%)":"hsva("+e+", "+n+"%, "+t+"%, "+this._roundA+")"},toHsl:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d(this._r,this._g,this._b),e=o(360*t.h),n=o(100*t.s),t=o(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+t+"%)":"hsla("+e+", "+n+"%, "+t+"%, "+this._roundA+")"},toHex:function(t){return e(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return p(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*F(this._r,255))+"%",g:o(100*F(this._g,255))+"%",b:o(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*F(this._r,255))+"%, "+o(100*F(this._g,255))+"%, "+o(100*F(this._b,255))+"%)":"rgba("+o(100*F(this._r,255))+"%, "+o(100*F(this._g,255))+"%, "+o(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&P[e(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+p(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";return t&&(n=l(t).toHex8String()),"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&0<=this._a;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){e=t.apply(null,[this].concat([].slice.call(e)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(S,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},l.fromRatio=function(t,e){if("object"==typeof t){var n,i={};for(n in t)t.hasOwnProperty(n)&&(i[n]="a"===n?t[n]:N(t[n]));t=i}return l(t,e)},l.equals=function(t,e){return!(!t||!e)&&l(t).toRgbString()==l(e).toRgbString()},l.random=function(){return l.fromRatio({r:t(),g:t(),b:t()})},l.mix=function(t,e,n){n=0===n?0:n||50;var i=l(t).toRgb(),o=l(e).toRgb(),t=n/100,e=2*t-1,n=o.a-i.a,e=e*n==-1?e:(e+n)/(1+e*n),n=1-(e=(e+1)/2),t={r:o.r*e+i.r*n,g:o.g*e+i.g*n,b:o.b*e+i.b*n,a:o.a*t+i.a*(1-t)};return l(t)},l.readability=function(t,e){var n=l(t),i=l(e),t=n.toRgb(),e=i.toRgb(),n=n.getBrightness(),i=i.getBrightness(),e=Math.max(t.r,e.r)-Math.min(t.r,e.r)+Math.max(t.g,e.g)-Math.min(t.g,e.g)+Math.max(t.b,e.b)-Math.min(t.b,e.b);return{brightness:Math.abs(n-i),color:e}},l.isReadable=function(t,e){e=l.readability(t,e);return 125<e.brightness&&500<e.color},l.mostReadable=function(t,e){for(var n=null,i=0,o=!1,r=0;r<e.length;r++){var a=l.readability(t,e[r]),s=125<a.brightness&&500<a.color,a=a.brightness/125*3+a.color/500;(s&&!o||s&&o&&i<a||!s&&!o&&i<a)&&(o=s,i=a,n=l(e[r]))}return n};var _=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=l.hexNames=function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}(_);function k(t){return t=parseFloat(t),(isNaN(t)||t<0||1<t)&&(t=1),t}function F(t,e){"string"==typeof(n=t)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(t="100%");var n,n="string"==typeof(n=t)&&-1!=n.indexOf("%");return t=c(e,u(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),s.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function I(t){return c(1,u(0,t))}function E(t){return parseInt(t,16)}function L(t){return 1==t.length?"0"+t:""+t}function N(t){return t<=1&&(t=100*t+"%"),t}var O,T,B=(T="[\\s|\\(]+("+(O="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",O="[\\s|\\(]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",{rgb:new RegExp("rgb"+T),rgba:new RegExp("rgba"+O),hsl:new RegExp("hsl"+T),hsla:new RegExp("hsla"+O),hsv:new RegExp("hsv"+T),hsva:new RegExp("hsva"+O),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=l}(),Lt(function(){Lt.fn.spectrum.load&&Lt.fn.spectrum.processNativeColorInputs()})}),function(){function i(t,e,n){return t.call.apply(t.bind,arguments)}function o(e,n,t){if(!e)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var t=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(t,i),e.apply(n,t)}}return function(){return e.apply(n,arguments)}}function f(t,e,n){return(f=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?i:o).apply(null,arguments)}var s=Date.now||function(){return+new Date};function e(t,e){this.a=t,this.m=e||t,this.c=this.m.document}var l=!!window.FontFace;function c(t,e,n,i){if(e=t.c.createElement(e),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return i&&e.appendChild(t.c.createTextNode(i)),e}function u(t,e,n){(t=(t=t.c.getElementsByTagName(e)[0])||document.documentElement).insertBefore(n,t.lastChild)}function n(t){t.parentNode&&t.parentNode.removeChild(t)}function g(t,e,n){e=e||[],n=n||[];for(var i=t.className.split(/\s+/),o=0;o<e.length;o+=1){for(var r=!1,a=0;a<i.length;a+=1)if(e[o]===i[a]){r=!0;break}r||i.push(e[o])}for(e=[],o=0;o<i.length;o+=1){for(r=!1,a=0;a<n.length;a+=1)if(i[o]===n[a]){r=!0;break}r||e.push(i[o])}t.className=e.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function r(t,e){for(var n=t.className.split(/\s+/),i=0,o=n.length;i<o;i++)if(n[i]==e)return!0;return!1}function d(t){if("string"==typeof t.f)return t.f;var e=t.m.location.protocol;return"about:"==e&&(e=t.a.location.protocol),"https:"==e?"https:":"http:"}function h(t,e,n){function i(){a&&o&&(a(r),a=null)}e=c(t,"link",{rel:"stylesheet",href:e,media:"all"});var o=!1,r=null,a=n||null;l?(e.onload=function(){o=!0,i()},e.onerror=function(){o=!0,r=Error("Stylesheet failed to load"),i()}):setTimeout(function(){o=!0,i()},0),u(t,"head",e)}function p(t,e,n,i){var o=t.c.getElementsByTagName("head")[0];if(o){var r=c(t,"script",{src:e}),a=!1;return r.onload=r.onreadystatechange=function(){a||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(a=!0,n&&n(null),r.onload=r.onreadystatechange=null,"HEAD"==r.parentNode.tagName&&o.removeChild(r))},o.appendChild(r),setTimeout(function(){a||(a=!0,n&&n(Error("Script load timeout")))},i||5e3),r}return null}function m(){this.a=0,this.c=null}function v(t){return t.a++,function(){t.a--,a(t)}}function b(t,e){t.c=e,a(t)}function a(t){0==t.a&&t.c&&(t.c(),t.c=null)}function y(t){this.a=t||"-"}function w(t,e){this.c=t,this.f=4,this.a="n";e=(e||"n4").match(/^([nio])([1-9])$/i);e&&(this.a=e[1],this.f=parseInt(e[2],10))}function x(t){var e=[];t=t.split(/,\s*/);for(var n=0;n<t.length;n++){var i=t[n].replace(/['"]/g,"");-1!=i.indexOf(" ")||/^\d/.test(i)?e.push("'"+i+"'"):e.push(i)}return e.join(",")}function C(t){return t.a+t.f}function A(t){var e="normal";return"o"===t.a?e="oblique":"i"===t.a&&(e="italic"),e}function D(t,e){this.c=t,this.f=t.m.document.documentElement,this.h=e,this.a=new y("-"),this.j=!1!==e.events,this.g=!1!==e.classes}function S(t){var e,n,i;t.g&&(e=r(t.f,t.a.c("wf","active")),n=[],i=[t.a.c("wf","loading")],e||n.push(t.a.c("wf","inactive")),g(t.f,n,i)),_(t,"inactive")}function _(t,e,n){t.j&&t.h[e]&&(n?t.h[e](n.c,C(n)):t.h[e]())}function P(){this.c={}}function k(t,e){this.c=t,this.f=e,this.a=c(this.c,"span",{"aria-hidden":"true"},this.f)}function F(t){u(t.c,"body",t.a)}function I(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+x(t.c)+";font-style:"+A(t)+";font-weight:"+t.f+"00;"}function E(t,e,n,i,o,r){this.g=t,this.j=e,this.a=i,this.c=n,this.f=o||3e3,this.h=r||void 0}function L(t,e,n,i,o,r,a){this.v=t,this.B=e,this.c=n,this.a=i,this.s=a||"BESbswy",this.f={},this.w=o||3e3,this.u=r||null,this.o=this.j=this.h=this.g=null,this.g=new k(this.c,this.s),this.h=new k(this.c,this.s),this.j=new k(this.c,this.s),this.o=new k(this.c,this.s),t=I(t=new w(this.a.c+",serif",C(this.a))),this.g.a.style.cssText=t,t=I(t=new w(this.a.c+",sans-serif",C(this.a))),this.h.a.style.cssText=t,t=I(t=new w("serif",C(this.a))),this.j.a.style.cssText=t,t=I(t=new w("sans-serif",C(this.a))),this.o.a.style.cssText=t,F(this.g),F(this.h),F(this.j),F(this.o)}y.prototype.c=function(t){for(var e=[],n=0;n<arguments.length;n++)e.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.a)},E.prototype.start=function(){var o=this.c.m.document,r=this,a=s(),t=new Promise(function(n,i){!function e(){var t;s()-a>=r.f?i():o.fonts.load(A(t=r.a)+" "+t.f+"00 300px "+x(t.c),r.h).then(function(t){1<=t.length?n():setTimeout(e,25)},function(){i()})}()}),e=new Promise(function(t,e){setTimeout(e,r.f)});Promise.race([e,t]).then(function(){r.g(r.a)},function(){r.j(r.a)})};var N={D:"serif",C:"sans-serif"},O=null;function T(){var t;return null===O&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),O=!!t&&(parseInt(t[1],10)<536||536===parseInt(t[1],10)&&parseInt(t[2],10)<=11)),O}function B(t,e,n){for(var i in N)if(N.hasOwnProperty(i)&&e===t.f[N[i]]&&n===t.f[N[i]])return!0;return!1}function M(t){var e,n=t.g.a.offsetWidth,i=t.h.a.offsetWidth;(e=n===t.f.serif&&i===t.f["sans-serif"])||(e=T()&&B(t,n,i)),e?s()-t.A>=t.w?T()&&B(t,n,i)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?z(t,t.v):z(t,t.B):setTimeout(f(function(){M(this)},t),50):z(t,t.v)}function z(t,e){setTimeout(f(function(){n(this.g.a),n(this.h.a),n(this.j.a),n(this.o.a),e(this.a)},t),0)}function j(t,e,n){this.c=t,this.a=e,this.f=0,this.o=this.j=!1,this.s=n}L.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.o.a.offsetWidth,this.A=s(),M(this)};var R=null;function U(t){0==--t.f&&t.j&&(t.o?((t=t.a).g&&g(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),_(t,"active")):S(t.a))}function t(t){this.j=t,this.a=new P,this.h=0,this.f=this.g=!0}function W(t,e){this.c=t,this.a=e}function H(t,e){this.c=t,this.a=e}function V(t,e,n){this.c=t||e+"//fonts.googleapis.com/css",this.a=[],this.f=[],this.g=n||""}function q(t){this.f=t,this.a=[],this.c={}}j.prototype.g=function(t){var e=this.a;e.g&&g(e.f,[e.a.c("wf",t.c,C(t).toString(),"active")],[e.a.c("wf",t.c,C(t).toString(),"loading"),e.a.c("wf",t.c,C(t).toString(),"inactive")]),_(e,"fontactive",t),this.o=!0,U(this)},j.prototype.h=function(t){var e,n,i,o=this.a;o.g&&(e=r(o.f,o.a.c("wf",t.c,C(t).toString(),"active")),n=[],i=[o.a.c("wf",t.c,C(t).toString(),"loading")],e||n.push(o.a.c("wf",t.c,C(t).toString(),"inactive")),g(o.f,n,i)),_(o,"fontinactive",t),U(this)},t.prototype.load=function(t){this.c=new e(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(i,t,e){var n=[],o=e.timeout;!function(t){t.g&&g(t.f,[t.a.c("wf","loading")]),_(t,"loading")}(t);var n=function(t,e,n){var i,o,r=[];for(i in e)!e.hasOwnProperty(i)||(o=t.c[i])&&r.push(o(e[i],n));return r}(i.a,e,i.c),r=new j(i.c,t,o);for(i.h=n.length,t=0,e=n.length;t<e;t++)n[t].load(function(t,e,n){var c,u,d,h,p;c=r,u=t,d=e,h=n,p=0==--(n=i).h,(n.f||n.g)&&setTimeout(function(){var t=h||null,e=d||{};if(0===u.length&&p)S(c.a);else{c.f+=u.length,p&&(c.j=p);for(var n=[],i=0;i<u.length;i++){var o,r=u[i],a=e[r.c],s=c.a,l=r;s.g&&g(s.f,[s.a.c("wf",l.c,C(l).toString(),"loading")]),_(s,"fontloading",l),(s=null)===R&&(R=!!window.FontFace&&(l=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),o=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor),l?42<parseInt(l[1],10):!o)),s=R?new E(f(c.g,c),f(c.h,c),c.c,r,c.s,a):new L(f(c.g,c),f(c.h,c),c.c,r,c.s,t,a),n.push(s)}for(i=0;i<n.length;i++)n[i].start()}},0)})}(this,new D(this.c,t),t)},W.prototype.load=function(a){var s,t,e,n=this,l=n.a.projectId,i=n.a.version;l?(s=n.c.m,p(this.c,(t=l,e=i,d((i=n).c)+"//"+(i=(i.a.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,""))+"/"+t+".js"+(e?"?v="+e:"")),function(t){t?a([]):(s["__MonotypeConfiguration__"+l]=function(){return n.a},function t(){if(s["__mti_fntLst"+l]){var e,n=s["__mti_fntLst"+l](),i=[];if(n)for(var o=0;o<n.length;o++){var r=n[o].fontfamily;null!=n[o].fontStyle&&null!=n[o].fontWeight?(e=n[o].fontStyle+n[o].fontWeight,i.push(new w(r,e))):i.push(new w(r))}a(i)}else setTimeout(function(){t()},50)}())}).id="__MonotypeAPIScript__"+l):a([])},H.prototype.load=function(t){for(var e=this.a.urls||[],n=this.a.families||[],i=this.a.testStrings||{},o=new m,r=0,a=e.length;r<a;r++)h(this.c,e[r],v(o));var s=[];for(r=0,a=n.length;r<a;r++)if((e=n[r].split(":"))[1])for(var l=e[1].split(","),c=0;c<l.length;c+=1)s.push(new w(e[0],l[c]));else s.push(new w(e[0]));b(o,function(){t(s,i)})};var G={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Y={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Z={i:"i",italic:"i",n:"n",normal:"n"},J=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function X(t,e){this.c=t,this.a=e}var Q={Arimo:!0,Cousine:!0,Tinos:!0};function K(t,e){this.c=t,this.a=e}function $(t,e){this.c=t,this.f=e,this.a=[]}X.prototype.load=function(t){var e=new m,n=this.c,i=new V(this.a.api,d(n),this.a.text),o=this.a.families;!function(t,e){for(var n=e.length,i=0;i<n;i++){var o=e[i].split(":");3==o.length&&t.f.push(o.pop());var r="";2==o.length&&""!=o[1]&&(r=":"),t.a.push(o.join(r))}}(i,o);var r=new q(o);!function(t){for(var e=t.f.length,n=0;n<e;n++){var i=t.f[n].split(":"),o=i[0].replace(/\+/g," "),r=["n4"];if(2<=i.length){var a,s,l=i[1],c=[];if(l)for(var u=(l=l.split(",")).length,d=0;d<u;d++)(s=!(s=l[d]).match(/^[\w-]+$/)||null==(a=J.exec(s.toLowerCase()))?"":[s=null==(s=a[2])||""==s?"n":Z[s],a=null==(a=a[1])||""==a?"4":Y[a]||(isNaN(a)?"4":a.substr(0,1))].join(""))&&c.push(s);0<c.length&&(r=c),3==i.length&&(c=[],0<(i=(i=i[2])?i.split(","):c).length&&(i=G[i[0]])&&(t.c[o]=i))}for(t.c[o]||(i=G[o])&&(t.c[o]=i),i=0;i<r.length;i+=1)t.a.push(new w(o,r[i]))}}(r),h(n,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var e=t.a.length,n=[],i=0;i<e;i++)n.push(t.a[i].replace(/ /g,"+"));return e=t.c+"?family="+n.join("%7C"),0<t.f.length&&(e+="&subset="+t.f.join(",")),0<t.g.length&&(e+="&text="+encodeURIComponent(t.g)),e}(i),v(e)),b(e,function(){t(r.a,r.c,Q)})},K.prototype.load=function(a){var t=this.a.id,s=this.c.m;t?p(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",function(t){if(t)a([]);else if(s.Typekit&&s.Typekit.config&&s.Typekit.config.fn){t=s.Typekit.config.fn;for(var e=[],n=0;n<t.length;n+=2)for(var i=t[n],o=t[n+1],r=0;r<o.length;r++)e.push(new w(i,o[r]));try{s.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}a(e)}},2e3):a([])},$.prototype.load=function(l){var t=this.f.id,e=this.c.m,c=this;t?(e.__webfontfontdeckmodule__||(e.__webfontfontdeckmodule__={}),e.__webfontfontdeckmodule__[t]=function(t,e){for(var n,i,o,r=0,a=e.fonts.length;r<a;++r){var s=e.fonts[r];c.a.push(new w(s.name,(n="font-weight:"+s.weight+";font-style:"+s.style,s=o=i=void 0,i=4,o="n",s=null,n&&((s=n.match(/(normal|oblique|italic)/i))&&s[1]&&(o=s[1].substr(0,1).toLowerCase()),(s=n.match(/([1-9]00|normal|bold)/i))&&s[1]&&(/bold/i.test(s[1])?i=7:/[1-9]00/.test(s[1])&&(i=parseInt(s[1].substr(0,1),10)))),o+i)))}l(c.a)},p(this.c,d(this.c)+(this.f.api||"//f.fontdeck.com/s/css/js/")+((e=this.c).m.location.hostname||e.a.location.hostname)+"/"+t+".js",function(t){t&&l([])})):l([])};var tt=new t(window);tt.a.c.custom=function(t,e){return new H(e,t)},tt.a.c.fontdeck=function(t,e){return new $(e,t)},tt.a.c.monotype=function(t,e){return new W(e,t)},tt.a.c.typekit=function(t,e){return new K(e,t)},tt.a.c.google=function(t,e){return new X(e,t)};var et={load:f(tt.load,tt)};"function"==typeof define&&define.amd?define(function(){return et}):"undefined"!=typeof module&&module.exports?module.exports=et:(window.WebFont=et,window.WebFontConfig&&tt.load(window.WebFontConfig))}();
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula