171 lines
109 KiB
JavaScript
171 lines
109 KiB
JavaScript
/**
|
|
* jsPDF - PDF Document creation from JavaScript
|
|
* Version 1.0.150-git Built on 2014-05-30T00:40
|
|
* CommitID dcbc9fcb9b
|
|
*
|
|
* Copyright (c) 2010-2014 James Hall, https://github.com/MrRio/jsPDF
|
|
* 2010 Aaron Spike, https://github.com/acspike
|
|
* 2012 Willow Systems Corporation, willow-systems.com
|
|
* 2012 Pablo Hess, https://github.com/pablohess
|
|
* 2012 Florian Jenett, https://github.com/fjenett
|
|
* 2013 Warren Weckesser, https://github.com/warrenweckesser
|
|
* 2013 Youssef Beddad, https://github.com/lifof
|
|
* 2013 Lee Driscoll, https://github.com/lsdriscoll
|
|
* 2013 Stefan Slonevskiy, https://github.com/stefslon
|
|
* 2013 Jeremy Morel, https://github.com/jmorel
|
|
* 2013 Christoph Hartmann, https://github.com/chris-rock
|
|
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
|
|
* 2014 James Makes, https://github.com/dollaruw
|
|
* 2014 Diego Casorran, https://github.com/diegocr
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining
|
|
* a copy of this software and associated documentation files (the
|
|
* "Software"), to deal in the Software without restriction, including
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
* the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be
|
|
* included in all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*
|
|
* Contributor(s):
|
|
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
|
|
* kim3er, mfo, alnorth,
|
|
*/
|
|
/**
|
|
* jsPDF addHTML PlugIn
|
|
* Copyright (c) 2014 Diego Casorran
|
|
* Licensed under the MIT License.
|
|
* http://opensource.org/licenses/mit-license
|
|
*/
|
|
/**
|
|
* jsPDF addImage plugin
|
|
* Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
|
|
* 2013 Chris Dowling, https://github.com/gingerchris
|
|
* 2013 Trinh Ho, https://github.com/ineedfat
|
|
* 2013 Edwin Alejandro Perez, https://github.com/eaparango
|
|
* 2013 Norah Smith, https://github.com/burnburnrocket
|
|
* 2014 Diego Casorran, https://github.com/diegocr
|
|
* 2014 James Robb, https://github.com/jamesbrobb
|
|
*/
|
|
/**
|
|
* jsPDF Cell plugin
|
|
* Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
|
|
* 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
|
|
* 2013 Lee Driscoll, https://github.com/lsdriscoll
|
|
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
|
|
* 2014 James Hall, james@parall.ax
|
|
* 2014 Diego Casorran, https://github.com/diegocr
|
|
*/
|
|
/**
|
|
* jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser
|
|
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
|
|
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
|
|
* 2014 Diego Casorran, https://github.com/diegocr
|
|
* 2014 Daniel Husar, https://github.com/danielhusar
|
|
* 2014 Wolfgang Gassler, https://github.com/woolfg
|
|
*/
|
|
/**
|
|
* jsPDF JavaScript plugin
|
|
* Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
|
|
*/
|
|
/**
|
|
* jsPDF PNG PlugIn
|
|
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
|
*/
|
|
/**
|
|
jsPDF Silly SVG plugin
|
|
Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
|
|
*/
|
|
/**
|
|
* jsPDF split_text_to_size plugin - MIT license.
|
|
* Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
|
|
* 2014 Diego Casorran, https://github.com/diegocr
|
|
*/
|
|
/**
|
|
jsPDF standard_fonts_metrics plugin
|
|
Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
|
|
MIT license.
|
|
*/
|
|
/**
|
|
* jsPDF total_pages plugin
|
|
* Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
|
|
*/
|
|
/* Blob.js
|
|
* A Blob implementation.
|
|
* 2014-05-27
|
|
* By Eli Grey, http://eligrey.com
|
|
* By Devin Samarin, https://github.com/eboyjr
|
|
* License: X11/MIT
|
|
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
|
|
*/
|
|
/* FileSaver.js
|
|
* A saveAs() FileSaver implementation.
|
|
* 2014-05-27
|
|
* By Eli Grey, http://eligrey.com
|
|
* License: X11/MIT
|
|
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
|
|
*/
|
|
/*
|
|
* Copyright (c) 2012 chick307 <chick307@gmail.com>
|
|
* Licensed under the MIT License.
|
|
* http://opensource.org/licenses/mit-license
|
|
*/
|
|
/*
|
|
Deflate.js - https://github.com/gildas-lormeau/zip.js
|
|
Copyright (c) 2013 Gildas Lormeau. All rights reserved.
|
|
Redistribution and use in source and binary forms, with or without
|
|
modification, are permitted provided that the following conditions are met:
|
|
1. Redistributions of source code must retain the above copyright notice,
|
|
this list of conditions and the following disclaimer.
|
|
2. Redistributions in binary form must reproduce the above copyright
|
|
notice, this list of conditions and the following disclaimer in
|
|
the documentation and/or other materials provided with the distribution.
|
|
3. The names of the authors may not be used to endorse or promote products
|
|
derived from this software without specific prior written permission.
|
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
|
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
|
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
/*
|
|
# PNG.js
|
|
# Copyright (c) 2011 Devon Govett
|
|
# MIT LICENSE
|
|
#
|
|
*/
|
|
/*
|
|
* Extracted from pdf.js
|
|
* https://github.com/andreasgal/pdf.js
|
|
* Copyright (c) 2011 Mozilla Foundation
|
|
* Contributors: Andreas Gal <gal@mozilla.com>
|
|
* Chris G Jones <cjones@mozilla.com>
|
|
* Shaon Barman <shaon.barman@gmail.com>
|
|
* Vivien Nicolas <21@vingtetun.org>
|
|
* Justin D'Arcangelo <justindarc@gmail.com>
|
|
* Yury Delendik
|
|
*/
|
|
/**
|
|
* JavaScript Polyfill functions for jsPDF
|
|
* Collected from public resources by
|
|
* https://github.com/diegocr
|
|
*/
|
|
!function(t,e){e["true"]=t;var r=function(t){"use strict";function e(e){var r={};this.subscribe=function(t,e,n){if("function"!=typeof e)return!1;r.hasOwnProperty(t)||(r[t]={});var s=Math.random().toString(35);return r[t][s]=[e,!!n],s},this.unsubscribe=function(t){for(var e in r)if(r[e][t])return delete r[e][t],!0;return!1},this.publish=function(n){if(r.hasOwnProperty(n)){var s=Array.prototype.slice.call(arguments,1),o=[];for(var i in r[n]){var a=r[n][i];try{a[0].apply(e,s)}catch(u){t.console&&console.error("jsPDF PubSub Error",u.message,u)}a[1]&&o.push(i)}o.length&&o.forEach(this.unsubscribe)}}}function r(a,u,c,l){var f={};"object"==typeof a&&(f=a,a=f.orientation,u=f.unit||u,c=f.format||c,l=f.compress||f.compressPdf||l),u=u||"mm",c=c||"a4",a=(""+(a||"P")).toLowerCase();var d,h,p,m,w,y=(""+c).toLowerCase(),g=!!l&&"function"==typeof Uint8Array,v=f.textColor||"0 g",b=f.drawColor||"0 G",q=f.fontSize||16,x=f.lineHeight||1.15,k=f.lineWidth||.200025,_=2,A=!1,C=[],S={},E={},z=0,I=[],T=[],B=0,O=0,P=0,R={title:"",subject:"",author:"",keywords:"",creator:""},D={},U=new e(D),F=function(t){return t.toFixed(2)},L=function(t){return t.toFixed(3)},j=function(t){return("0"+parseInt(t)).slice(-2)},N=function(t){A?I[z].push(t):(P+=t.length+1,T.push(t))},M=function(){return _++,C[_]=P,N(_+" 0 obj"),_},H=function(t){N("stream"),N(t),N("endstream")},G=function(){var e,n,o,i,a,u,c,l=m*h,f=w*h;for(c=t.adler32cs||r.adler32cs,g&&"undefined"==typeof c&&(g=!1),e=1;z>=e;e++){if(M(),N("<</Type /Page"),N("/Parent 1 0 R"),N("/Resources 2 0 R"),N("/Contents "+(_+1)+" 0 R>>"),N("endobj"),n=I[e].join("\n"),M(),g){for(o=[],i=n.length;i--;)o[i]=n.charCodeAt(i);u=c.from(n),a=new s(6),a.append(new Uint8Array(o)),n=a.flush(),o=new Uint8Array(n.length+6),o.set(new Uint8Array([120,156])),o.set(n,2),o.set(new Uint8Array([255&u,u>>8&255,u>>16&255,u>>24&255]),n.length+2),n=String.fromCharCode.apply(null,o),N("<</Length "+n.length+" /Filter [/FlateDecode]>>")}else N("<</Length "+n.length+">>");H(n),N("endobj")}C[1]=P,N("1 0 obj"),N("<</Type /Pages");var d="/Kids [";for(i=0;z>i;i++)d+=3+2*i+" 0 R ";N(d+"]"),N("/Count "+z),N("/MediaBox [0 0 "+F(l)+" "+F(f)+"]"),N(">>"),N("endobj")},J=function(t){t.objectNumber=M(),N("<</BaseFont/"+t.PostScriptName+"/Type/Font"),"string"==typeof t.encoding&&N("/Encoding/"+t.encoding),N("/Subtype/Type1>>"),N("endobj")},V=function(){for(var t in S)S.hasOwnProperty(t)&&J(S[t])},W=function(){U.publish("putXobjectDict")},X=function(){N("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),N("/Font <<");for(var t in S)S.hasOwnProperty(t)&&N("/"+t+" "+S[t].objectNumber+" 0 R");N(">>"),N("/XObject <<"),W(),N(">>")},Y=function(){V(),U.publish("putResources"),C[2]=P,N("2 0 obj"),N("<<"),X(),N(">>"),N("endobj"),U.publish("postPutResources")},K=function(t,e,r){E.hasOwnProperty(e)||(E[e]={}),E[e][r]=t},Q=function(t,e,r,n){var s="F"+(Object.keys(S).length+1).toString(10),o=S[s]={id:s,PostScriptName:t,fontName:e,fontStyle:r,encoding:n,metadata:{}};return K(s,e,r),U.publish("addFont",o),s},$=function(){for(var t="helvetica",e="times",r="courier",n="normal",s="bold",o="italic",i="bolditalic",a="StandardEncoding",u=[["Helvetica",t,n],["Helvetica-Bold",t,s],["Helvetica-Oblique",t,o],["Helvetica-BoldOblique",t,i],["Courier",r,n],["Courier-Bold",r,s],["Courier-Oblique",r,o],["Courier-BoldOblique",r,i],["Times-Roman",e,n],["Times-Bold",e,s],["Times-Italic",e,o],["Times-BoldItalic",e,i]],c=0,l=u.length;l>c;c++){var f=Q(u[c][0],u[c][1],u[c][2],a),d=u[c][0].split("-");K(f,d[0],d[1]||"")}U.publish("addFonts",{fonts:S,dictionary:E})},Z=function(e){return e.foo=function(){try{return e.apply(this,arguments)}catch(r){var n=r.stack||"";~n.indexOf(" at ")&&(n=n.split(" at ")[1]);var s="Error in function "+n.split("\n")[0].split("<")[0]+": "+r.message;if(!t.console)throw new Error(s);console.log(s,r),t.alert&&alert(s),console.trace()}},e.foo.bar=e,e.foo},te=function(t,e){var r,n,s,o,i,a,u,c,l;if(e=e||{},s=e.sourceEncoding||"Unicode",i=e.outputEncoding,(e.autoencode||i)&&S[d].metadata&&S[d].metadata[s]&&S[d].metadata[s].encoding&&(o=S[d].metadata[s].encoding,!i&&S[d].encoding&&(i=S[d].encoding),!i&&o.codePages&&(i=o.codePages[0]),"string"==typeof i&&(i=o[i]),i)){for(u=!1,a=[],r=0,n=t.length;n>r;r++)c=i[t.charCodeAt(r)],c?a.push(String.fromCharCode(c)):a.push(t[r]),a[r].charCodeAt(0)>>8&&(u=!0);t=a.join("")}for(r=t.length;void 0===u&&0!==r;)t.charCodeAt(r-1)>>8&&(u=!0),r--;if(!u)return t;for(a=e.noBOM?[]:[254,255],r=0,n=t.length;n>r;r++){if(c=t.charCodeAt(r),l=c>>8,l>>8)throw new Error("Character at position "+r+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(l),a.push(c-(l<<8))}return String.fromCharCode.apply(void 0,a)},ee=function(t,e){return te(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},re=function(){N("/Producer (jsPDF "+r.version+")");for(var t in R)R.hasOwnProperty(t)&&R[t]&&N("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+ee(R[t])+")");var e=new Date;N(["/CreationDate (D:",e.getFullYear(),j(e.getMonth()+1),j(e.getDate()),j(e.getHours()),j(e.getMinutes()),j(e.getSeconds()),")"].join(""))},ne=function(){N("/Type /Catalog"),N("/Pages 1 0 R"),N("/OpenAction [3 0 R /FitH null]"),N("/PageLayout /OneColumn"),U.publish("putCatalog")},se=function(){N("/Size "+(_+1)),N("/Root "+_+" 0 R"),N("/Info "+(_-1)+" 0 R")},oe=function(){z++,A=!0,I[z]=[]},ie=function(){oe(),N(F(k*h)+" w"),N(b),0!==B&&N(B+" J"),0!==O&&N(O+" j"),U.publish("addPage",{pageNumber:z})},ae=function(t,e){var r;t=void 0!==t?t:S[d].fontName,e=void 0!==e?e:S[d].fontStyle;try{r=E[t][e]}catch(n){}if(!r)throw new Error("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts.");return r},ue=function(){A=!1,_=2,T=[],C=[],N("%PDF-"+o),G(),Y(),M(),N("<<"),re(),N(">>"),N("endobj"),M(),N("<<"),ne(),N(">>"),N("endobj");var t,e=P,r="0000000000";for(N("xref"),N("0 "+(_+1)),N(r+" 65535 f "),t=1;_>=t;t++)N((r+C[t]).slice(-10)+" 00000 n ");return N("trailer"),N("<<"),se(),N(">>"),N("startxref"),N(e),N("%%EOF"),A=!0,T.join("\n")},ce=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":("f"===t||"f*"===t||"B"===t||"B*"===t)&&(e=t),e},le=function(){for(var t=ue(),e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r);e--;)n[e]=t.charCodeAt(e);return r},fe=function(){return new Blob([le()],{type:"application/pdf"})},de=Z(function(e,r){switch(e){case void 0:return ue();case"save":if(navigator.getUserMedia&&(void 0===t.URL||void 0===t.URL.createObjectURL))return D.output("dataurlnewwindow");n(fe(),r),"function"==typeof n.unload&&t.setTimeout&&setTimeout(n.unload,70);break;case"arraybuffer":return le();case"blob":return fe();case"datauristring":case"dataurlstring":return"data:application/pdf;base64,"+btoa(ue());case"datauri":case"dataurl":t.document.location.href="data:application/pdf;base64,"+btoa(ue());break;case"dataurlnewwindow":t.open("data:application/pdf;base64,"+btoa(ue()));break;default:throw new Error('Output type "'+e+'" is not supported.')}});switch(u){case"pt":h=1;break;case"mm":h=72/25.4;break;case"cm":h=72/2.54;break;case"in":h=72;break;case"px":h=96/72;break;case"pc":h=12;break;case"em":h=12;break;case"ex":h=6;break;default:throw"Invalid unit: "+u}if(i.hasOwnProperty(y))w=i[y][1]/h,m=i[y][0]/h;else try{w=c[1],m=c[0]}catch(he){throw new Error("Invalid format: "+c)}if("p"===a||"portrait"===a)a="p",m>w&&(p=m,m=w,w=p);else{if("l"!==a&&"landscape"!==a)throw"Invalid orientation: "+a;a="l",w>m&&(p=m,m=w,w=p)}D.internal={pdfEscape:ee,getStyle:ce,getFont:function(){return S[ae.apply(D,arguments)]},getFontSize:function(){return q},getLineHeight:function(){return q*x},write:function(t){N(1===arguments.length?t:Array.prototype.join.call(arguments," "))},getCoordinateString:function(t){return F(t*h)},getVerticalCoordinateString:function(t){return F((w-t)*h)},collections:{},newObject:M,putStream:H,events:U,scaleFactor:h,pageSize:{width:m,height:w},output:function(t,e){return de(t,e)},getNumberOfPages:function(){return I.length-1},pages:I},D.addPage=function(){return ie(),this},D.text=function(t,e,r,n,s){function o(t){return t=t.split(" ").join(Array(f.TabLen||9).join(" ")),ee(t,n)}"number"==typeof t&&(p=r,r=e,e=t,t=p),"string"==typeof t&&t.match(/[\n\r]/)&&(t=t.split(/\r\n|\r|\n/g)),"number"==typeof n&&(s=n,n=null);var i="",a="Td";if(s){s*=Math.PI/180;var u=Math.cos(s),c=Math.sin(s);i=[F(u),F(c),F(-1*c),F(u),""].join(" "),a="Tm"}if(n=n||{},"noBOM"in n||(n.noBOM=!0),"autoencode"in n||(n.autoencode=!0),"string"==typeof t)t=o(t);else{if(!(t instanceof Array))throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');for(var l=t.concat(),m=[],y=l.length;y--;)m.push(o(l.shift()));t=m.join(") Tj\nT* (")}return N("BT\n/"+d+" "+q+" Tf\n"+q*x+" TL\n"+v+"\n"+i+F(e*h)+" "+F((w-r)*h)+" "+a+"\n("+t+") Tj\nET"),this},D.line=function(t,e,r,n){return this.lines([[r-t,n-e]],t,e)},D.lines=function(t,e,r,n,s,o){var i,a,u,c,l,f,d,m,y,g,v;for("number"==typeof t&&(p=r,r=e,e=t,t=p),n=n||[1,1],N(L(e*h)+" "+L((w-r)*h)+" m "),i=n[0],a=n[1],c=t.length,g=e,v=r,u=0;c>u;u++)l=t[u],2===l.length?(g=l[0]*i+g,v=l[1]*a+v,N(L(g*h)+" "+L((w-v)*h)+" l")):(f=l[0]*i+g,d=l[1]*a+v,m=l[2]*i+g,y=l[3]*a+v,g=l[4]*i+g,v=l[5]*a+v,N(L(f*h)+" "+L((w-d)*h)+" "+L(m*h)+" "+L((w-y)*h)+" "+L(g*h)+" "+L((w-v)*h)+" c"));return o&&N(" h"),null!==s&&N(ce(s)),this},D.rect=function(t,e,r,n,s){ce(s);return N([F(t*h),F((w-e)*h),F(r*h),F(-n*h),"re"].join(" ")),null!==s&&N(ce(s)),this},D.triangle=function(t,e,r,n,s,o,i){return this.lines([[r-t,n-e],[s-r,o-n],[t-s,e-o]],t,e,[1,1],i,!0),this},D.roundedRect=function(t,e,r,n,s,o,i){var a=4/3*(Math.SQRT2-1);return this.lines([[r-2*s,0],[s*a,0,s,o-o*a,s,o],[0,n-2*o],[0,o*a,-(s*a),o,-s,o],[-r+2*s,0],[-(s*a),0,-s,-(o*a),-s,-o],[0,-n+2*o],[0,-(o*a),s*a,-o,s,-o]],t+s,e,[1,1],i),this},D.ellipse=function(t,e,r,n,s){var o=4/3*(Math.SQRT2-1)*r,i=4/3*(Math.SQRT2-1)*n;return N([F((t+r)*h),F((w-e)*h),"m",F((t+r)*h),F((w-(e-i))*h),F((t+o)*h),F((w-(e-n))*h),F(t*h),F((w-(e-n))*h),"c"].join(" ")),N([F((t-o)*h),F((w-(e-n))*h),F((t-r)*h),F((w-(e-i))*h),F((t-r)*h),F((w-e)*h),"c"].join(" ")),N([F((t-r)*h),F((w-(e+i))*h),F((t-o)*h),F((w-(e+n))*h),F(t*h),F((w-(e+n))*h),"c"].join(" ")),N([F((t+o)*h),F((w-(e+n))*h),F((t+r)*h),F((w-(e+i))*h),F((t+r)*h),F((w-e)*h),"c"].join(" ")),null!==s&&N(ce(s)),this},D.circle=function(t,e,r,n){return this.ellipse(t,e,r,r,n)},D.setProperties=function(t){for(var e in R)R.hasOwnProperty(e)&&t[e]&&(R[e]=t[e]);return this},D.setFontSize=function(t){return q=t,this},D.setFont=function(t,e){return d=ae(t,e),this},D.setFontStyle=D.setFontType=function(t){return d=ae(void 0,t),this},D.getFontList=function(){var t,e,r,n={};for(t in E)if(E.hasOwnProperty(t)){n[t]=r=[];for(e in E[t])E[t].hasOwnProperty(e)&&r.push(e)}return n},D.setLineWidth=function(t){return N((t*h).toFixed(2)+" w"),this},D.setDrawColor=function(t,e,r,n){var s;return s=void 0===e||void 0===n&&t===e===r?"string"==typeof t?t+" G":F(t/255)+" G":void 0===n?"string"==typeof t?[t,e,r,"RG"].join(" "):[F(t/255),F(e/255),F(r/255),"RG"].join(" "):"string"==typeof t?[t,e,r,n,"K"].join(" "):[F(t),F(e),F(r),F(n),"K"].join(" "),N(s),this},D.setFillColor=function(t,e,r,n){var s;return s=void 0===e||void 0===n&&t===e===r?"string"==typeof t?t+" g":F(t/255)+" g":void 0===n?"string"==typeof t?[t,e,r,"rg"].join(" "):[F(t/255),F(e/255),F(r/255),"rg"].join(" "):"string"==typeof t?[t,e,r,n,"k"].join(" "):[F(t),F(e),F(r),F(n),"k"].join(" "),N(s),this},D.setTextColor=function(t,e,r){if("string"==typeof t&&/^#[0-9A-Fa-f]{6}$/.test(t)){var n=parseInt(t.substr(1),16);t=n>>16&255,e=n>>8&255,r=255&n}return v=0===t&&0===e&&0===r||"undefined"==typeof e?L(t/255)+" g":[L(t/255),L(e/255),L(r/255),"rg"].join(" "),this},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.setLineCap=function(t){var e=this.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 B=e,N(e+" J"),this},D.setLineJoin=function(t){var e=this.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 O=e,N(e+" j"),this},D.output=de,D.save=function(t){D.output("save",t)};for(var pe in r.API)r.API.hasOwnProperty(pe)&&("events"===pe&&r.API.events.length?!function(t,e){var r,n,s;for(s=e.length-1;-1!==s;s--)r=e[s][0],n=e[s][1],t.subscribe.apply(t,[r].concat("function"==typeof n?[n]:n))}(U,r.API.events):D[pe]=r.API[pe]);return $(),d="F1",ie(),U.publish("initialized"),D}var o="1.3",i={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]};return r.API={events:[]},r.version="1.0.150-git 2014-05-30T00:40:diegocr","function"==typeof define&&define.amd?define(function(){return r}):t.jsPDF=r,r}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this);!function(t){"use strict";t.addHTML=function(t,e,r,n,s){if("undefined"==typeof html2canvas&&"undefined"==typeof rasterizeHTML)throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");"number"!=typeof e&&(n=e,s=r),"function"==typeof n&&(s=n,n=null);var o=this.internal,i=o.scaleFactor,a=o.pageSize.width,u=o.pageSize.height;if(n=n||{},n.onrendered=function(t){e=parseInt(e)||0,r=parseInt(r)||0;var o=n.dim||{},c=o.h||0,l=o.w||Math.min(a,t.width/i)-e,f="JPEG";if(n.format&&(f=n.format),t.height>u&&n.pagesplit){var d=function(){for(var n=0;;){var o=document.createElement("canvas");o.width=Math.min(a*i,t.width),o.height=Math.min(u*i,t.height-n);var c=o.getContext("2d");c.drawImage(t,0,n,t.width,o.height,0,0,o.width,o.height);var d=[o,e,n?0:r,o.width/i,o.height/i,f,null,"SLOW"];if(this.addImage.apply(this,d),n+=o.height,n>=t.height)break;this.addPage()}s(l,n,null,d)}.bind(this);if("CANVAS"===t.nodeName){var h=new Image;h.onload=d,h.src=t.toDataURL("image/png"),t=h}else d()}else{var p=Math.random().toString(35),m=[t,e,r,l,c,f,p,"SLOW"];this.addImage.apply(this,m),s(l,c,p,m)}}.bind(this),"undefined"!=typeof html2canvas&&!n.rstz)return html2canvas(t,n);if("undefined"!=typeof rasterizeHTML){var c="drawDocument";return"string"==typeof t&&(c=/^http/.test(t)?"drawURL":"drawHTML"),n.width=n.width||a*i,rasterizeHTML[c](t,void 0,n).then(function(t){n.onrendered(t.image)},function(t){s(null,t)})}return null}}(r.API),function(t){"use strict";var e="addImage_",r=["jpeg","jpg","png"],n=function(t){var e=this.internal.newObject(),r=this.internal.write,s=this.internal.putStream;if(t.n=e,r("<</Type /XObject"),r("/Subtype /Image"),r("/Width "+t.w),r("/Height "+t.h),t.cs===this.color_spaces.INDEXED?r("/ColorSpace [/Indexed /DeviceRGB "+(t.pal.length/3-1)+" "+("smask"in t?e+2:e+1)+" 0 R]"):(r("/ColorSpace /"+t.cs),t.cs===this.color_spaces.DEVICE_CMYK&&r("/Decode [1 0 1 0 1 0 1 0]")),r("/BitsPerComponent "+t.bpc),"f"in t&&r("/Filter /"+t.f),"dp"in t&&r("/DecodeParms <<"+t.dp+">>"),"trns"in t&&t.trns.constructor==Array){for(var o="",i=0,a=t.trns.length;a>i;i++)o+=t.trns[i]+" "+t.trns[i]+" ";r("/Mask ["+o+"]")}if("smask"in t&&r("/SMask "+(e+1)+" 0 R"),r("/Length "+t.data.length+">>"),s(t.data),r("endobj"),"smask"in t){var u="/Predictor 15 /Colors 1 /BitsPerComponent "+t.bpc+" /Columns "+t.w,c={w:t.w,h:t.h,cs:"DeviceGray",bpc:t.bpc,dp:u,data:t.smask};"f"in t&&(c.f=t.f),n.call(this,c)}t.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),r("<< /Length "+t.pal.length+">>"),s(this.arrayBufferToBinaryString(new Uint8Array(t.pal))),r("endobj"))},s=function(){var t=this.internal.collections[e+"images"];for(var r in t)n.call(this,t[r])},o=function(){var t,r=this.internal.collections[e+"images"],n=this.internal.write;for(var s in r)t=r[s],n("/I"+t.i,t.n,"0","R")},i=function(e){return e&&"string"==typeof e&&(e=e.toUpperCase()),e in t.image_compression?e:t.image_compression.NONE},a=function(){var t=this.internal.collections[e+"images"];return t||(this.internal.collections[e+"images"]=t={},this.internal.events.subscribe("putResources",s),this.internal.events.subscribe("putXobjectDict",o)),t},u=function(t){var e=0;return t&&(e=Object.keys?Object.keys(t).length:function(t){var e=0;for(var r in t)t.hasOwnProperty(r)&&e++;return e}(t)),e},c=function(t){return"undefined"==typeof t||null===t},l=function(){return void 0},f=function(t){return-1===r.indexOf(t)},d=function(e){return"function"!=typeof t["process"+e.toUpperCase()]},h=function(t){return"object"==typeof t&&1===t.nodeType},p=function(t,e){if("IMG"===t.nodeName&&t.hasAttribute("src")&&0===(""+t.getAttribute("src")).indexOf("data:image/"))return t.getAttribute("src");if("CANVAS"===t.nodeName)var r=t;else{var r=document.createElement("canvas");r.width=t.clientWidth||t.width,r.height=t.clientHeight||t.height;var n=r.getContext("2d");if(!n)throw"addImage requires canvas to be supported by browser.";n.drawImage(t,0,0,r.width,r.height)}return r.toDataURL("png"==e?"image/png":"image/jpeg")},m=function(t,e){var r;if(e)for(var n in e)if(t===e[n].alias){r=e[n];break}return r},w=function(t,e,r){return t||e||(t=-96,e=-96),0>t&&(t=-1*r.w*72/t/this.internal.scaleFactor),0>e&&(e=-1*r.h*72/e/this.internal.scaleFactor),0===t&&(t=e*r.w/r.h),0===e&&(e=t*r.h/r.w),[t,e]},y=function(t,e,r,n,s,o,i){var a=w.call(this,r,n,s),u=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;r=a[0],n=a[1],i[o]=s,this.internal.write("q",u(r),"0 0",u(n),u(t),c(e+n),"cm /I"+s.i,"Do Q")};t.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",SEPERATION:"Seperation",DEVICE_N:"DeviceN"},t.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"},t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},t.isString=function(t){return"string"==typeof t},t.extractInfoFromBase64DataURI=function(t){return/^data:([\w]+?\/([\w]+?));base64,(.+?)$/g.exec(t)},t.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},t.isArrayBuffer=function(t){return this.supportsArrayBuffer()?t instanceof ArrayBuffer:!1},t.isArrayBufferView=function(t){return this.supportsArrayBuffer()?"undefined"==typeof Uint32Array?!1: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:!1},t.binaryStringToUint8Array=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;e>n;n++)r[n]=t.charCodeAt(n);return r},t.arrayBufferToBinaryString=function(t){this.isArrayBuffer(t)&&(t=new Uint8Array(t));for(var e="",r=t.byteLength,n=0;r>n;n++)e+=String.fromCharCode(t[n]);return e},t.arrayBufferToBase64=function(t){for(var e,r,n,s,o,i="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=new Uint8Array(t),c=u.byteLength,l=c%3,f=c-l,d=0;f>d;d+=3)o=u[d]<<16|u[d+1]<<8|u[d+2],e=(16515072&o)>>18,r=(258048&o)>>12,n=(4032&o)>>6,s=63&o,i+=a[e]+a[r]+a[n]+a[s];return 1==l?(o=u[f],e=(252&o)>>2,r=(3&o)<<4,i+=a[e]+a[r]+"=="):2==l&&(o=u[f]<<8|u[f+1],e=(64512&o)>>10,r=(1008&o)>>4,n=(15&o)<<2,i+=a[e]+a[r]+a[n]+"="),i},t.createImageInfo=function(t,e,r,n,s,o,i,a,u,c,l,f){var d={alias:a,w:e,h:r,cs:n,bpc:s,i:i,data:t};return o&&(d.f=o),u&&(d.dp=u),c&&(d.trns=c),l&&(d.pal=l),f&&(d.smask=f),d},t.addImage=function(t,e,n,s,o,w,g,v){if("number"==typeof e){var b=w;w=o,o=s,s=n,n=e,e=b}var q,x,k=a.call(this);if(v=i(v),e=(e||"JPEG").toLowerCase(),c(g)&&(g=l(t)),h(t)&&(t=p(t,e)),this.isString(t)){var _=this.extractInfoFromBase64DataURI(t);_?(e=_[2],t=atob(_[3]),this.supportsArrayBuffer()&&(x=t,t=this.binaryStringToUint8Array(t))):255!==t.charCodeAt(0)&&(q=m(t,k))}if(f(e))throw new Error("addImage currently only supports formats "+r+", not '"+e+"'");if(d(e))throw new Error("please ensure that the plugin for '"+e+"' support is added");var A=u(k),C=q;if(C||(C=this["process"+e.toUpperCase()](t,A,g,v,x)),!C)throw new Error("An unkwown error occurred whilst processing the image");return y.call(this,n,s,o,w,C,A,k),this};var g=function(t){var e,r;if(255===!t.charCodeAt(0)||216===!t.charCodeAt(1)||255===!t.charCodeAt(2)||224===!t.charCodeAt(3)||!t.charCodeAt(6)==="J".charCodeAt(0)||!t.charCodeAt(7)==="F".charCodeAt(0)||!t.charCodeAt(8)==="I".charCodeAt(0)||!t.charCodeAt(9)==="F".charCodeAt(0)||0===!t.charCodeAt(10))throw new Error("getJpegSize requires a binary string jpeg file");for(var n=256*t.charCodeAt(4)+t.charCodeAt(5),s=4,o=t.length;o>s;){if(s+=n,255!==t.charCodeAt(s))throw new Error("getJpegSize could not find the size of the image");if(192===t.charCodeAt(s+1)||193===t.charCodeAt(s+1)||194===t.charCodeAt(s+1)||195===t.charCodeAt(s+1)||196===t.charCodeAt(s+1)||197===t.charCodeAt(s+1)||198===t.charCodeAt(s+1)||199===t.charCodeAt(s+1))return r=256*t.charCodeAt(s+5)+t.charCodeAt(s+6),e=256*t.charCodeAt(s+7)+t.charCodeAt(s+8),[e,r];s+=2,n=256*t.charCodeAt(s)+t.charCodeAt(s+1)}},v=function(t){var e=t[0]<<8|t[1];if(65496!==e)throw new Error("Supplied data is not a JPEG");for(var r,n,s,o=t.length,i=(t[4]<<8)+t[5],a=4;o>a;){if(a+=i,r=b(t,a),i=(r[2]<<8)+r[3],(192===r[1]||194===r[1])&&255===r[0]&&i>7)return r=b(t,a+5),n=(r[2]<<8)+r[3],s=(r[0]<<8)+r[1],{width:n,height:s};a+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image")},b=function(t,e){return t.subarray(e,e+4)};t.processJPEG=function(t,e,r,n,s){var o,i=this.color_spaces.DEVICE_RGB,a=this.decode.DCT_DECODE,u=8;return this.isString(t)?(o=g(t),this.createImageInfo(t,o[0],o[1],i,u,a,e,r)):(this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)?(o=v(t),t=s||this.arrayBufferToBinaryString(t),this.createImageInfo(t,o.width,o.height,i,u,a,e,r)):null)},t.processJPG=function(){return this.processJPEG.apply(this,arguments)}}(r.API),function(t){"use strict";t.autoPrint=function(){var t;return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.write("<< /S/Named /Type/Action /N/Print >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.write("/OpenAction "+t+" 0 R")}),this}}(r.API),function(t){"use strict";var e,r,n,s,o=3,i=13,a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1,c=function(t,e,r,n,s){a={x:t,y:e,w:r,h:n,ln:s}},l=function(){return a},f={left:0,top:0,bottom:0};t.setHeaderFunction=function(t){s=t},t.getTextDimensions=function(t){e=this.internal.getFont().fontName,r=this.table_font_size||this.internal.getFontSize(),n=this.internal.getFont().fontStyle;var s,o,i=19.049976/25.4;return o=document.createElement("font"),o.id="jsPDFCell",o.style.fontStyle=n,o.style.fontName=e,o.style.fontSize=r+"pt",o.innerText=t,document.body.appendChild(o),s={w:(o.offsetWidth+1)*i,h:(o.offsetHeight+1)*i},document.body.removeChild(o),s},t.cellAddPage=function(){var t=this.margins||f;this.addPage(),c(t.left,t.top,void 0,void 0),u+=1},t.cellInitialize=function(){a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1},t.cell=function(t,e,r,n,s,a,u){var d=l();if(void 0!==d.ln)if(d.ln===a)t=d.x+d.w,e=d.y;else{var h=this.margins||f;d.y+d.h+n+i>=this.internal.pageSize.height-h.bottom&&(this.cellAddPage(),this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(a,!0)),e=l().y+l().h}if(void 0!==s[0])if(this.printingHeaderRow?this.rect(t,e,r,n,"FD"):this.rect(t,e,r,n),"right"===u){if(s instanceof Array)for(var p=0;p<s.length;p++){var m=s[p],w=this.getStringUnitWidth(m)*this.internal.getFontSize();this.text(m,t+r-w-o,e+this.internal.getLineHeight()*(p+1))}}else this.text(s,t+o,e+this.internal.getLineHeight());return c(t,e,r,n,a),this},t.arrayMax=function(t,e){var r,n,s,o=t[0];for(r=0,n=t.length;n>r;r+=1)s=t[r],e?-1===e(o,s)&&(o=s):s>o&&(o=s);return o},t.table=function(e,r,n,s,o){if(!n)throw"No data for PDF table";var i,c,l,d,h,p,m,w,y,g,v=[],b=[],q={},x={},k=[],_=[],A=!1,C=!0,S=12,E=f;if(E.width=this.internal.pageSize.width,o&&(o.autoSize===!0&&(A=!0),o.printHeaders===!1&&(C=!1),o.fontSize&&(S=o.fontSize),o.margins&&(E=o.margins)),this.lnMod=0,a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1,this.printHeaders=C,this.margins=E,this.setFontSize(S),this.table_font_size=S,void 0===s||null===s)v=Object.keys(n[0]);else if(s[0]&&"string"!=typeof s[0]){var z=19.049976/25.4;for(c=0,l=s.length;l>c;c+=1)i=s[c],v.push(i.name),b.push(i.prompt),x[i.name]=i.width*z}else v=s;if(A)for(g=function(t){return t[i]},c=0,l=v.length;l>c;c+=1){for(i=v[c],q[i]=n.map(g),k.push(this.getTextDimensions(b[c]||i).w),p=q[i],m=0,d=p.length;d>m;m+=1)h=p[m],k.push(this.getTextDimensions(h).w);x[i]=t.arrayMax(k)}if(C){var I=this.calculateLineHeight(v,x,b.length?b:v);for(c=0,l=v.length;l>c;c+=1)i=v[c],_.push([e,r,x[i],I,String(b.length?b[c]:i)]);this.setTableHeaderRow(_),this.printHeaderRow(1,!1)}for(c=0,l=n.length;l>c;c+=1){var I;for(w=n[c],I=this.calculateLineHeight(v,x,w),m=0,y=v.length;y>m;m+=1)i=v[m],this.cell(e,r,x[i],I,w[i],c+2,i.align)}return this.lastCellPos=a,this.table_x=e,this.table_y=r,this},t.calculateLineHeight=function(t,e,r){for(var n,s=0,i=0;i<t.length;i++){n=t[i],r[n]=this.splitTextToSize(String(r[n]),e[n]-o);var a=this.internal.getLineHeight()*r[n].length+o;a>s&&(s=a)}return s},t.setTableHeaderRow=function(t){this.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var r,n,o,i;if(this.printingHeaderRow=!0,void 0!==s){var a=s(this,u);c(a[0],a[1],a[2],a[3],-1)}this.setFontStyle("bold");var l=[];for(o=0,i=this.tableHeaderRow.length;i>o;o+=1)this.setFillColor(200,200,200),r=this.tableHeaderRow[o],e&&(r[1]=this.margins&&this.margins.top||0,l.push(r)),n=[].concat(r),this.cell.apply(this,n.concat(t));l.length>0&&this.setTableHeaderRow(l),this.setFontStyle("normal"),this.printingHeaderRow=!1}}(r.API),function(t){var e,r,n,s,o,i,a,u,c,l,f,d,h,p,m,w,y;e=function(){function t(){}return function(e){return t.prototype=e,new t}}(),a=function(t){var e,r,n,s,o,i,a;for(r=0,n=t.length,e=void 0,s=!1,i=!1;!s&&r!==n;)e=t[r]=t[r].trimLeft(),e&&(s=!0),r++;for(r=n-1;n&&!i&&-1!==r;)e=t[r]=t[r].trimRight(),e&&(i=!0),r--;for(o=/\s+$/g,a=!0,r=0;r!==n;)e=t[r].replace(/\s+/g," "),a&&(e=e.trimLeft()),e&&(a=o.test(e)),t[r]=e,r++;return t},u=function(t,e,r,n){return this.pdf=t,this.x=e,this.y=r,this.settings=n,this.init(),this},c=function(t){var e,r,s;for(e=void 0,s=t.split(","),r=s.shift();!e&&r;)e=n[r.trim().toLowerCase()],r=s.shift();return e},l=function(t){t="auto"===t?"0px":t,t.indexOf("em")>-1&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),t.indexOf("pt")>-1&&!isNaN(Number(t.replace("pt","")))&&(t=1.333*Number(t.replace("pt",""))+"px");var e,r,n;return r=void 0,e=16,(n=f[t])?n:(n={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[{css_line_height_string:t}],n!==r?f[t]=n/e:(n=parseFloat(t))?f[t]=n/e:(n=t.match(/([\d\.]+)(px)/),f[t]=3===n.length?parseFloat(n[1])/e:1))},i=function(t){var e,r,n;return n=function(t){var e;return e=function(t){return document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle?t.currentStyle:t.style}(t),function(t){return t=t.replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()}),e[t]}}(t),e={},r=void 0,e["font-family"]=c(n("font-family"))||"times",e["font-style"]=s[n("font-style")]||"normal",e["text-align"]=TextAlignMap[n("text-align")]||"left",r=o[n("font-weight")]||"normal","bold"===r&&(e["font-style"]="normal"===e["font-style"]?r:r+e["font-style"]),e["font-size"]=l(n("font-size"))||1,e["line-height"]=l(n("line-height"))||1,e.display="inline"===n("display")?"inline":"block","block"===e.display&&(e["margin-top"]=l(n("margin-top"))||0,e["margin-bottom"]=l(n("margin-bottom"))||0,e["padding-top"]=l(n("padding-top"))||0,e["padding-bottom"]=l(n("padding-bottom"))||0,e["margin-left"]=l(n("margin-left"))||0,e["margin-right"]=l(n("margin-right"))||0,e["padding-left"]=l(n("padding-left"))||0,e["padding-right"]=l(n("padding-right"))||0),e},d=function(t,e,r){var n,s,o,i,a;if(o=!1,s=void 0,i=void 0,a=void 0,n=r["#"+t.id])if("function"==typeof n)o=n(t,e);else for(s=0,i=n.length;!o&&s!==i;)o=n[s](t,e),s++;if(n=r[t.nodeName],!o&&n)if("function"==typeof n)o=n(t,e);else for(s=0,i=n.length;!o&&s!==i;)o=n[s](t,e),s++;return o},y=function(t,e){var r,n,s,o,i,a,u,c,l,f;for(r=[],n=[],s=0,f=t.rows[0].cells.length,c=t.clientWidth;f>s;)l=t.rows[0].cells[s],n[s]={name:l.textContent.toLowerCase().replace(/\s+/g,""),prompt:l.textContent.replace(/\r?\n/g,""),width:l.clientWidth/c*e.pdf.internal.pageSize.width},s++;for(s=1;s<t.rows.length;){for(a=t.rows[s],i={},o=0;o<a.cells.length;)i[n[o].name]=a.cells[o].textContent.replace(/\r?\n/g,""),o++;r.push(i),s++}return u={rows:r,headers:n}};var g={SCRIPT:1,STYLE:1,NOSCRIPT:1,OBJECT:1,EMBED:1,SELECT:1},v=1;r=function(t,e,n){var s,o,a,u,c,l,f,p,m;for(o=t.childNodes,s=void 0,a=i(t),c="block"===a.display,c&&(e.setBlockBoundary(),e.setBlockStyle(a)),f=19.049976/25.4,u=0,l=o.length;l>u;){if(s=o[u],"object"==typeof s){if(1===s.nodeType&&"HEADER"===s.nodeName){var w=s,b=e.pdf.margins_doc.top;e.pdf.internal.events.subscribe("addPage",function(){e.y=b,r(w,e,n),e.pdf.margins_doc.top=e.y+10,e.y+=10},!1)}if(8===s.nodeType&&"#comment"===s.nodeName)~s.textContent.indexOf("ADD_PAGE")&&(e.pdf.addPage(),e.y=e.pdf.margins_doc.top);else if(1!==s.nodeType||g[s.nodeName])if(3===s.nodeType){var q=s.nodeValue;if(s.nodeValue&&"LI"===s.parentNode.nodeName)if("OL"===s.parentNode.parentNode.nodeName)q=v++ +". "+q;else{var x=16*a["font-size"],k=2;x>20&&(k=3),m=function(t,e){this.pdf.circle(t,e,k,"FD")}}e.addText(q,a)}else"string"==typeof s&&e.addText(s,a);else if("IMG"===s.nodeName&&h[s.getAttribute("src")])e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom<e.y+s.height&&e.y>e.pdf.margins_doc.top&&(e.pdf.addPage(),e.y=e.pdf.margins_doc.top),e.pdf.addImage(h[s.getAttribute("src")],e.x,e.y,s.width,s.height),e.y+=s.height;else if("TABLE"===s.nodeName)p=y(s,e),e.y+=10,e.pdf.table(e.x,e.y,p.rows,p.headers,{autoSize:!1,printHeaders:!0,margins:e.pdf.margins_doc}),e.y=e.pdf.lastCellPos.y+e.pdf.lastCellPos.h+20;else if("OL"===s.nodeName||"UL"===s.nodeName)v=1,d(s,e,n)||r(s,e,n),e.y+=10;else if("LI"===s.nodeName){var _=e.x;e.x+="UL"===s.parentNode.nodeName?22:10,e.y+=3,d(s,e,n)||r(s,e,n),e.x=_}else d(s,e,n)||r(s,e,n)}u++}return c?e.setBlockBoundary(m):void 0},h={},p=function(t,e,r,n){function s(){e.pdf.internal.events.publish("imagesLoaded"),n()}function o(t,e,r){if(t){var n=new Image;++u,n.crossOrigin="",n.onerror=n.onload=function(){n.complete&&(0===n.src.indexOf("data:image/")&&(n.width=e||n.width||0,n.height=r||n.height||0),n.width+n.height&&(h[t]=h[t]||n)),--u||s()},n.src=t}}for(var i=t.getElementsByTagName("img"),a=i.length,u=0;a--;)o(i[a].getAttribute("src"),i[a].width,i[a].height);return u||s()},m=function(t,e,n,s){var o=t.getElementsByTagName("footer");if(o.length>0){o=o[0];var i=e.pdf.internal.write,a=e.y;e.pdf.internal.write=function(){},r(o,e,n);var u=Math.ceil(e.y-a)+5;e.y=a,e.pdf.internal.write=i,e.pdf.margins_doc.bottom+=u;
|
|
for(var c=function(t){var s=void 0!==t?t.pageNumber:1,i=e.y;e.y=e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom,e.pdf.margins_doc.bottom-=u;for(var a=o.getElementsByTagName("span"),c=0;c<a.length;++c)(" "+a[c].className+" ").replace(/[\n\t]/g," ").indexOf(" pageCounter ")>-1&&(a[c].innerHTML=s),(" "+a[c].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&(a[c].innerHTML="###jsPDFVarTotalPages###");r(o,e,n),e.pdf.margins_doc.bottom+=u,e.y=i},l=o.getElementsByTagName("span"),f=0;f<l.length;++f)(" "+l[f].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&e.pdf.internal.events.subscribe("htmlRenderingFinished",e.pdf.putTotalPages.bind(e.pdf,"###jsPDFVarTotalPages###"),!0);e.pdf.internal.events.subscribe("addPage",c,!1),c(),g.FOOTER=1}s()},w=function(t,e,n,s,o,i){if(!e)return!1;"string"==typeof e||e.parentNode||(e=""+e.innerHTML),"string"==typeof e&&(e=function(t){var e,r,n,s;return n="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),s="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",r=document.createElement("div"),r.style.cssText=s,r.innerHTML='<iframe style="height:1px;width:1px" name="'+n+'" />',document.body.appendChild(r),e=window.frames[n],e.document.body.innerHTML=t,e.document.body}(e.replace(/<\/?script[^>]*?>/gi,"")));var a=new u(t,n,s,o);return i=i||function(){},p.call(this,e,a,o.elementHandlers,function(){m.call(this,e,a,o.elementHandlers,function(){r(e,a,o.elementHandlers),a.pdf.internal.events.publish("htmlRenderingFinished"),i(a.dispose())})}),a.dispose()},u.prototype.init=function(){return this.paragraph={text:[],style:[]},this.pdf.internal.write("q")},u.prototype.dispose=function(){return this.pdf.internal.write("Q"),{x:this.x,y:this.y}},u.prototype.splitFragmentsIntoLines=function(t,r){var n,s,o,i,a,u,c,l,f,d,h,p,m,w,y;for(s=12,h=this.pdf.internal.scaleFactor,a={},o=void 0,d=void 0,i=void 0,u=void 0,y=void 0,f=void 0,l=void 0,c=void 0,p=[],m=[p],n=0,w=this.settings.width;t.length;)if(u=t.shift(),y=r.shift(),u)if(o=y["font-family"],d=y["font-style"],i=a[o+d],i||(i=this.pdf.internal.getFont(o,d).metadata.Unicode,a[o+d]=i),f={widths:i.widths,kerning:i.kerning,fontSize:y["font-size"]*s,textIndent:n},l=this.pdf.getStringUnitWidth(u,f)*f.fontSize/h,n+l>w){for(c=this.pdf.splitTextToSize(u,w,f),p.push([c.shift(),y]);c.length;)p=[[c.shift(),y]],m.push(p);n=this.pdf.getStringUnitWidth(p[0][0],f)*f.fontSize/h}else p.push([u,y]),n+=l;if(void 0!==y["text-align"]&&("center"===y["text-align"]||"right"===y["text-align"]||"justify"===y["text-align"]))for(var g=0;g<m.length;++g){var v=this.pdf.getStringUnitWidth(m[g][0][0],f)*f.fontSize/h;g>0&&(m[g][0][1]=e(m[g][0][1]));var b=w-v;if("right"===y["text-align"])m[g][0][1]["margin-left"]=b;else if("center"===y["text-align"])m[g][0][1]["margin-left"]=b/2;else if("justify"===y["text-align"]){var q=m[g][0][0].split(" ").length-1;m[g][0][1]["word-spacing"]=b/q,g===m.length-1&&(m[g][0][1]["word-spacing"]=0)}}return m},u.prototype.RenderTextFragment=function(t,e){var r,n;this.pdf.internal.pageSize.height-this.pdf.margins_doc.bottom<this.y+this.pdf.internal.getFontSize()&&(this.pdf.internal.write("ET","Q"),this.pdf.addPage(),this.y=this.pdf.margins_doc.top,this.pdf.internal.write("q","BT",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td")),r=12,n=this.pdf.internal.getFont(e["font-family"],e["font-style"]),void 0!==e["word-spacing"]&&e["word-spacing"]>0&&this.pdf.internal.write(e["word-spacing"].toFixed(2),"Tw"),this.pdf.internal.write("/"+n.id,(r*e["font-size"]).toFixed(2),"Tf","("+this.pdf.internal.pdfEscape(t)+") Tj"),void 0!==e["word-spacing"]&&this.pdf.internal.write(0,"Tw")},u.prototype.renderParagraph=function(t){var e,r,n,s,o,i,u,c,l,f,d,h,p,m,w;if(s=a(this.paragraph.text),m=this.paragraph.style,e=this.paragraph.blockstyle,p=this.paragraph.blockstyle||{},this.paragraph={text:[],style:[],blockstyle:{},priorblockstyle:e},s.join("").trim()){c=this.splitFragmentsIntoLines(s,m),u=void 0,l=void 0,r=12,n=r/this.pdf.internal.scaleFactor,h=(Math.max((e["margin-top"]||0)-(p["margin-bottom"]||0),0)+(e["padding-top"]||0))*n,d=((e["margin-bottom"]||0)+(e["padding-bottom"]||0))*n,f=this.pdf.internal.write,o=void 0,i=void 0,this.y+=h,f("q","BT",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td");for(var y=0;c.length;){for(u=c.shift(),l=0,o=0,i=u.length;o!==i;)u[o][0].trim()&&(l=Math.max(l,u[o][1]["line-height"],u[o][1]["font-size"]),w=7*u[o][1]["font-size"]),o++;var g=0;for(void 0!==u[0][1]["margin-left"]&&u[0][1]["margin-left"]>0&&(wantedIndent=this.pdf.internal.getCoordinateString(u[0][1]["margin-left"]),g=wantedIndent-y,y=wantedIndent),f(g,(-1*r*l).toFixed(2),"Td"),o=0,i=u.length;o!==i;)u[o][0]&&this.RenderTextFragment(u[o][0],u[o][1]),o++;this.y+=l*n}return t&&"function"==typeof t&&t.call(this,this.x-9,this.y-w/2),f("ET","Q"),this.y+=d}},u.prototype.setBlockBoundary=function(t){return this.renderParagraph(t)},u.prototype.setBlockStyle=function(t){return this.paragraph.blockstyle=t},u.prototype.addText=function(t,e){return this.paragraph.text.push(t),this.paragraph.style.push(e)},n={helvetica:"helvetica","sans-serif":"helvetica","times new roman":"times",serif:"times",times:"times",monospace:"courier",courier:"courier"},o={100:"normal",200:"normal",300:"normal",400:"normal",500:"bold",600:"bold",700:"bold",800:"bold",900:"bold",normal:"normal",bold:"bold",bolder:"bold",lighter:"normal"},s={normal:"normal",italic:"italic",oblique:"italic"},TextAlignMap={left:"left",right:"right",center:"center",justify:"justify"},f={normal:1},t.fromHTML=function(t,e,r,n,s,o){"use strict";return this.margins_doc=o||{top:0,bottom:0},n||(n={}),n.elementHandlers||(n.elementHandlers={}),w(this,t,e||4,r||4,n,s)}}(r.API),function(t){"use strict";var e,r,n;t.addJS=function(t){return n=t,this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.write("<< /Names [(EmbeddedJS) "+(e+1)+" 0 R] >>","endobj"),r=this.internal.newObject(),this.internal.write("<< /S /JavaScript /JS (",n,") >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==e&&void 0!==r&&this.internal.write("/Names <</JavaScript "+e+" 0 R>>")}),this}}(r.API),function(t){"use strict";var e=function(){return"function"!=typeof PNG||"function"!=typeof i},r=function(e){return e!==t.image_compression.NONE&&n()},n=function(){var t="function"==typeof s;if(!t)throw new Error("requires deflate.js for compression");return t},o=function(e,r,n,o){var i=5,l=d;switch(o){case t.image_compression.FAST:i=3,l=f;break;case t.image_compression.MEDIUM:i=6,l=h;break;case t.image_compression.SLOW:i=9,l=p}e=c(e,r,n,l);var m=new Uint8Array(a(i)),w=u(e),y=new s(i),g=y.append(e),v=y.flush(),b=m.length+g.length+v.length,q=new Uint8Array(b+4);return q.set(m),q.set(g,m.length),q.set(v,m.length+g.length),q[b++]=w>>>24&255,q[b++]=w>>>16&255,q[b++]=w>>>8&255,q[b++]=255&w,t.arrayBufferToBinaryString(q)},a=function(t,e){var r=8,n=Math.LOG2E*Math.log(32768)-8,s=n<<4|r,o=s<<8,i=Math.min(3,(e-1&255)>>1);return o|=i<<6,o|=0,o+=31-o%31,[s,255&o&255]},u=function(t,e){for(var r,n=1,s=65535&n,o=n>>>16&65535,i=t.length,a=0;i>0;){r=i>e?e:i,i-=r;do s+=t[a++],o+=s;while(--r);s%=65521,o%=65521}return(o<<16|s)>>>0},c=function(t,e,r,n){for(var s,o,i,a=t.length/e,u=new Uint8Array(t.length+a),c=w(),l=0;a>l;l++){if(i=l*e,s=t.subarray(i,i+e),n)u.set(n(s,r,o),i+l);else{for(var f=0,d=c.length,h=[];d>f;f++)h[f]=c[f](s,r,o);var p=y(h.concat());u.set(h[p],i+l)}o=s}return u},l=function(t){var e=Array.apply([],t);return e.unshift(0),e},f=function(t,e){var r,n=[],s=0,o=t.length;for(n[0]=1;o>s;s++)r=t[s-e]||0,n[s+1]=t[s]-r+256&255;return n},d=function(t,e,r){var n,s=[],o=0,i=t.length;for(s[0]=2;i>o;o++)n=r&&r[o]||0,s[o+1]=t[o]-n+256&255;return s},h=function(t,e,r){var n,s,o=[],i=0,a=t.length;for(o[0]=3;a>i;i++)n=t[i-e]||0,s=r&&r[i]||0,o[i+1]=t[i]+256-(n+s>>>1)&255;return o},p=function(t,e,r){var n,s,o,i,a=[],u=0,c=t.length;for(a[0]=4;c>u;u++)n=t[u-e]||0,s=r&&r[u]||0,o=r&&r[u-e]||0,i=m(n,s,o),a[u+1]=t[u]-i+256&255;return a},m=function(t,e,r){var n=t+e-r,s=Math.abs(n-t),o=Math.abs(n-e),i=Math.abs(n-r);return o>=s&&i>=s?t:i>=o?e:r},w=function(){return[l,f,d,h,p]},y=function(t){for(var e,r,n,s=0,o=t.length;o>s;)e=g(t[s].slice(1)),(r>e||!r)&&(r=e,n=s),s++;return n},g=function(t){for(var e=0,r=t.length,n=0;r>e;)n+=Math.abs(t[e++]);return n};t.processPNG=function(t,n,s,i){var a,u,c,l,f,d,h=this.color_spaces.DEVICE_RGB,p=this.decode.FLATE_DECODE,m=8;if(this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)){if(e())throw new Error("PNG support requires png.js and zlib.js");if(a=new PNG(t),t=a.imgData,m=a.bits,h=a.colorSpace,l=a.colors,-1!==[4,6].indexOf(a.colorType)){if(8===a.bits)for(var w,y,g=window["Uint"+a.pixelBitlength+"Array"],v=new g(a.decodePixels().buffer),b=v.length,q=new Uint8Array(b*a.colors),x=new Uint8Array(b),k=a.pixelBitlength-a.bits,_=0,A=0;b>_;_++){for(w=v[_],y=0;k>y;)q[A++]=w>>>y&255,y+=a.bits;x[_]=w>>>y&255}if(16===a.bits){for(var w,v=new Uint32Array(a.decodePixels().buffer),b=v.length,q=new Uint8Array(b*(32/a.pixelBitlength)*a.colors),x=new Uint8Array(b*(32/a.pixelBitlength)),C=a.colors>1,_=0,A=0,S=0;b>_;)w=v[_++],q[A++]=w>>>0&255,C&&(q[A++]=w>>>16&255,w=v[_++],q[A++]=w>>>0&255),x[S++]=w>>>16&255;m=8}r(i)?(t=o(q,a.width*a.colors,a.colors,i),d=o(x,a.width,1,i)):(t=q,d=x,p=null)}if(3===a.colorType&&(h=this.color_spaces.INDEXED,f=a.palette,a.transparency.indexed)){for(var E=a.transparency.indexed,z=0,_=0,b=E.length;b>_;++_)z+=E[_];if(z/=255,z===b-1&&-1!==E.indexOf(0))c=[E.indexOf(0)];else if(z!==b){for(var v=a.decodePixels(),x=new Uint8Array(v.length),_=0,b=v.length;b>_;_++)x[_]=E[v[_]];d=o(x,a.width,1)}}return u=p===this.decode.FLATE_DECODE?"/Predictor 15 /Colors "+l+" /BitsPerComponent "+m+" /Columns "+a.width:"/Colors "+l+" /BitsPerComponent "+m+" /Columns "+a.width,(this.isArrayBuffer(t)||this.isArrayBufferView(t))&&(t=this.arrayBufferToBinaryString(t)),(d&&this.isArrayBuffer(d)||this.isArrayBufferView(d))&&(d=this.arrayBufferToBinaryString(d)),this.createImageInfo(t,a.width,a.height,h,m,p,n,s,u,c,f,d)}throw new Error("Unsupported PNG image data, try using JPEG instead.")}}(r.API),function(t){"use strict";t.addSVG=function(t,e,r,n,s){function o(t,e){var r=e.createElement("style");r.type="text/css",r.styleSheet?r.styleSheet.cssText=t:r.appendChild(e.createTextNode(t)),e.getElementsByTagName("head")[0].appendChild(r)}function i(t){var e="childframe",r=t.createElement("iframe");return o(".jsPDF_sillysvg_iframe {display:none;position:absolute;}",t),r.name=e,r.setAttribute("width",0),r.setAttribute("height",0),r.setAttribute("frameborder","0"),r.setAttribute("scrolling","no"),r.setAttribute("seamless","seamless"),r.setAttribute("class","jsPDF_sillysvg_iframe"),t.body.appendChild(r),r}function a(t,e){var r=(e.contentWindow||e.contentDocument).document;return r.write(t),r.close(),r.getElementsByTagName("svg")[0]}function u(t){for(var e=parseFloat(t[1]),r=parseFloat(t[2]),n=[],s=3,o=t.length;o>s;)"c"===t[s]?(n.push([parseFloat(t[s+1]),parseFloat(t[s+2]),parseFloat(t[s+3]),parseFloat(t[s+4]),parseFloat(t[s+5]),parseFloat(t[s+6])]),s+=7):"l"===t[s]?(n.push([parseFloat(t[s+1]),parseFloat(t[s+2])]),s+=3):s+=1;return[e,r,n]}var c;if(e===c||e===c)throw new Error("addSVG needs values for 'x' and 'y'");var l=i(document),f=a(t,l),d=[1,1],h=parseFloat(f.getAttribute("width")),p=parseFloat(f.getAttribute("height"));h&&p&&(n&&s?d=[n/h,s/p]:n?d=[n/h,n/h]:s&&(d=[s/p,s/p]));var m,w,y,g,v=f.childNodes;for(m=0,w=v.length;w>m;m++)y=v[m],y.tagName&&"PATH"===y.tagName.toUpperCase()&&(g=u(y.getAttribute("d").split(" ")),g[0]=g[0]*d[0]+e,g[1]=g[1]*d[1]+r,this.lines.call(this,g[2],g[0],g[1],d));return this}}(r.API),function(t){"use strict";var e=t.getCharWidthsArray=function(t,e){e||(e={});var r,n,s,o=e.widths?e.widths:this.internal.getFont().metadata.Unicode.widths,i=o.fof?o.fof:1,a=e.kerning?e.kerning:this.internal.getFont().metadata.Unicode.kerning,u=a.fof?a.fof:1,c=0,l=o[0]||i,f=[];for(r=0,n=t.length;n>r;r++)s=t.charCodeAt(r),f.push((o[s]||l)/i+(a[s]&&a[s][c]||0)/u),c=s;return f},r=function(t){for(var e=t.length,r=0;e;)e--,r+=t[e];return r},n=t.getStringUnitWidth=function(t,n){return r(e.call(this,t,n))},s=function(t,e,r,n){for(var s=[],o=0,i=t.length,a=0;o!==i&&a+e[o]<r;)a+=e[o],o++;s.push(t.slice(0,o));var u=o;for(a=0;o!==i;)a+e[o]>n&&(s.push(t.slice(u,o)),a=0,u=o),a+=e[o],o++;return u!==o&&s.push(t.slice(u,o)),s},o=function(t,o,i){i||(i={});var a,u,c,l,f,d,h=[],p=[h],m=i.textIndent||0,w=0,y=0,g=t.split(" "),v=e(" ",i)[0];if(d=-1===i.lineIndent?g[0].length+2:i.lineIndent||0){var b=Array(d).join(" "),q=[];g.map(function(t){t=t.split(/\s*\n/),t.length>1?q=q.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):q.push(t[0])}),g=q,d=n(b,i)}for(c=0,l=g.length;l>c;c++){var x=0;if(a=g[c],d&&"\n"==a[0]&&(a=a.substr(1),x=1),u=e(a,i),y=r(u),m+w+y>o||x){if(y>o){for(f=s(a,u,o-(m+w),o),h.push(f.shift()),h=[f.pop()];f.length;)p.push([f.shift()]);y=r(u.slice(a.length-h[0].length))}else h=[a];p.push(h),m=y+d,w=v}else h.push(a),m+=w+y,w=v}if(d)var k=function(t,e){return(e?b:"")+t.join(" ")};else var k=function(t){return t.join(" ")};return p.map(k)};t.splitTextToSize=function(t,e,r){r||(r={});var n,s=r.fontSize||this.internal.getFontSize(),i=function(t){var e={0:1},r={};if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var n=this.internal.getFont(t.fontName,t.fontStyle),s="Unicode";return n.metadata[s]?{widths:n.metadata[s].widths||e,kerning:n.metadata[s].kerning||r}:{widths:e,kerning:r}}.call(this,r);n=Array.isArray(t)?t:t.split(/\r?\n/);var a=1*this.internal.scaleFactor*e/s;i.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/s:0,i.lineIndent=r.lineIndent;var u,c,l=[];for(u=0,c=n.length;c>u;u++)l=l.concat(o(n[u],a,i));return l}}(r.API),function(t){"use strict";var e=function(t){for(var e="0123456789abcdef",r="klmnopqrstuvwxyz",n={},s=0;s<r.length;s++)n[r[s]]=e[s];var o,i,a,u,c,l={},f=1,d=l,h=[],p="",m="",w=t.length-1;for(s=1;s!=w;)c=t[s],s+=1,"'"==c?i?(u=i.join(""),i=o):i=[]:i?i.push(c):"{"==c?(h.push([d,u]),d={},u=o):"}"==c?(a=h.pop(),a[0][a[1]]=d,u=o,d=a[0]):"-"==c?f=-1:u===o?n.hasOwnProperty(c)?(p+=n[c],u=parseInt(p,16)*f,f=1,p=""):p+=c:n.hasOwnProperty(c)?(m+=n[c],d[u]=parseInt(m,16)*f,f=1,u=o,m=""):m+=c;return l},r={codePages:["WinAnsiEncoding"],WinAnsiEncoding:e("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},n={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}},s={Unicode:{"Courier-Oblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":e("{'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":e("{'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:e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":e("{'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}}}"),Helvetica:e("{'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":e("{'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-Bold":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":e("{'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":e("{'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":e("{'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(["addFonts",function(t){var e,r,o,i,a,u="Unicode";for(r in t.fonts)t.fonts.hasOwnProperty(r)&&(e=t.fonts[r],o=s[u][e.PostScriptName],o&&(i=e.metadata[u]?e.metadata[u]:e.metadata[u]={},i.widths=o.widths,i.kerning=o.kerning),a=n[u][e.PostScriptName],a&&(i=e.metadata[u]?e.metadata[u]:e.metadata[u]={},i.encoding=a,a.codePages&&a.codePages.length&&(e.encoding=a.codePages[0])))}])}(r.API),function(t){"use strict";t.putTotalPages=function(t){for(var e=new RegExp(t,"g"),r=1;r<=this.internal.getNumberOfPages();r++)for(var n=0;n<this.internal.pages[r].length;n++)this.internal.pages[r][n]=this.internal.pages[r][n].replace(e,this.internal.getNumberOfPages());return this}}(r.API),function(t){"use strict";if(t.URL=t.URL||t.webkitURL,t.Blob&&t.URL)try{return new Blob,void 0}catch(e){}var r=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},r=function(){this.data=[]},n=function(t,e,r){this.data=t,this.size=t.length,this.type=e,this.encoding=r},s=r.prototype,o=n.prototype,i=t.FileReaderSync,a=function(t){this.code=this[this.name=t]},u="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=u.length,l=t.URL||t.webkitURL||t,f=l.createObjectURL,d=l.revokeObjectURL,h=l,p=t.btoa,m=t.atob,w=t.ArrayBuffer,y=t.Uint8Array;for(n.fake=o.fake=!0;c--;)a.prototype[u[c]]=c+1;return l.createObjectURL||(h=t.URL={}),h.createObjectURL=function(t){var e,r=t.type;return null===r&&(r="application/octet-stream"),t instanceof n?(e="data:"+r,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):p?e+";base64,"+p(t.data):e+","+encodeURIComponent(t.data)):f?f.call(l,t):void 0},h.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&d&&d.call(l,t)},s.append=function(t){var r=this.data;if(y&&(t instanceof w||t instanceof y)){for(var s="",o=new y(t),u=0,c=o.length;c>u;u++)s+=String.fromCharCode(o[u]);r.push(s)}else if("Blob"===e(t)||"File"===e(t)){if(!i)throw new a("NOT_READABLE_ERR");var l=new i;r.push(l.readAsBinaryString(t))}else t instanceof n?"base64"===t.encoding&&m?r.push(m(t.data)):"URI"===t.encoding?r.push(decodeURIComponent(t.data)):"raw"===t.encoding&&r.push(t.data):("string"!=typeof t&&(t+=""),r.push(unescape(encodeURIComponent(t))))},s.getBlob=function(t){return arguments.length||(t=null),new n(this.data.join(""),t,"raw")},s.toString=function(){return"[object BlobBuilder]"},o.slice=function(t,e,r){var s=arguments.length;return 3>s&&(r=null),new n(this.data.slice(t,s>1?e:this.data.length),r,this.encoding)
|
|
},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=this.data.length=0},r}(t);t.Blob=function(t,e){var n=e?e.type||"":"",s=new r;if(t)for(var o=0,i=t.length;i>o;o++)s.append(t[o]);return s.getBlob(n)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);var n=n||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,r=function(){return t.URL||t.webkitURL||t},n=e.createElementNS("http://www.w3.org/1999/xhtml","a"),s=!t.externalHost&&"download"in n,o=function(r){var n=e.createEvent("MouseEvents");n.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)},i=t.webkitRequestFileSystem,a=t.requestFileSystem||i||t.mozRequestFileSystem,u=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},c="application/octet-stream",l=0,f=[],d=function(){for(var t=f.length;t--;){var e=f[t];"string"==typeof e?r().revokeObjectURL(e):e.remove()}f.length=0},h=function(t,e,r){e=[].concat(e);for(var n=e.length;n--;){var s=t["on"+e[n]];if("function"==typeof s)try{s.call(t,r||t)}catch(o){u(o)}}},p=function(e,u){var d,p,m,w=this,y=e.type,g=!1,v=function(){var t=r().createObjectURL(e);return f.push(t),t},b=function(){h(w,"writestart progress write writeend".split(" "))},q=function(){(g||!d)&&(d=v(e)),p?p.location.href=d:window.open(d,"_blank"),w.readyState=w.DONE,b()},x=function(t){return function(){return w.readyState!==w.DONE?t.apply(this,arguments):void 0}},k={create:!0,exclusive:!1};return w.readyState=w.INIT,u||(u="download"),s?(d=v(e),n.href=d,n.download=u,o(n),w.readyState=w.DONE,b(),void 0):(t.chrome&&y&&y!==c&&(m=e.slice||e.webkitSlice,e=m.call(e,0,e.size,c),g=!0),i&&"download"!==u&&(u+=".download"),(y===c||i)&&(p=t),a?(l+=e.size,a(t.TEMPORARY,l,x(function(t){t.root.getDirectory("saved",k,x(function(t){var r=function(){t.getFile(u,k,x(function(t){t.createWriter(x(function(r){r.onwriteend=function(e){p.location.href=t.toURL(),f.push(t),w.readyState=w.DONE,h(w,"writeend",e)},r.onerror=function(){var t=r.error;t.code!==t.ABORT_ERR&&q()},"writestart progress write abort".split(" ").forEach(function(t){r["on"+t]=w["on"+t]}),r.write(e),w.abort=function(){r.abort(),w.readyState=w.DONE},w.readyState=w.WRITING}),q)}),q)};t.getFile(u,{create:!1},x(function(t){t.remove(),r()}),x(function(t){t.code===t.NOT_FOUND_ERR?r():q()}))}),q)}),q),void 0):(q(),void 0))},m=p.prototype,w=function(t,e){return new p(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,h(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,t.addEventListener("unload",d,!1),w.unload=function(){d(),t.removeEventListener("unload",d,!1)},w}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&null!==module?module.exports=n:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return n}),void function(t,e){"object"==typeof module?module.exports=e():t.adler32cs=e()}(r,function(){var t="function"==typeof ArrayBuffer&&"function"==typeof Uint8Array,e=null,r=function(){if(!t)return function(){return!1};try{var r=require("buffer");"function"==typeof r.Buffer&&(e=r.Buffer)}catch(n){}return function(t){return t instanceof ArrayBuffer||null!==e&&t instanceof e}}(),n=function(){return null!==e?function(t){return new e(t,"utf8").toString("binary")}:function(t){return unescape(encodeURIComponent(t))}}(),s=65521,o=function(t,e){for(var r=65535&t,n=t>>>16,o=0,i=e.length;i>o;o++)r=(r+(255&e.charCodeAt(o)))%s,n=(n+r)%s;return(n<<16|r)>>>0},i=function(t,e){for(var r=65535&t,n=t>>>16,o=0,i=e.length;i>o;o++)r=(r+e[o])%s,n=(n+r)%s;return(n<<16|r)>>>0},a={},u=a.Adler32=function(){var e=function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(t=null==t?1:+t))throw new Error("First arguments needs to be a finite number.");this.checksum=t>>>0},s=e.prototype={};return s.constructor=e,e.from=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");this.checksum=o(1,t.toString())}),e.fromUtf8=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");var r=n(t.toString());this.checksum=o(1,r)}),t&&(e.fromBuffer=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(!r(t))throw new Error("First argument needs to be ArrayBuffer.");var n=new Uint8Array(t);return this.checksum=i(1,n)})),s.update=function(t){if(null==t)throw new Error("First argument needs to be a string.");return t=t.toString(),this.checksum=o(this.checksum,t)},s.updateUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=n(t.toString());return this.checksum=o(this.checksum,e)},t&&(s.updateBuffer=function(t){if(!r(t))throw new Error("First argument needs to be ArrayBuffer.");var e=new Uint8Array(t);return this.checksum=i(this.checksum,e)}),s.clone=function(){return new u(this.checksum)},e}();return a.from=function(t){if(null==t)throw new Error("First argument needs to be a string.");return o(1,t.toString())},a.fromUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=n(t.toString());return o(1,e)},t&&(a.fromBuffer=function(t){if(!r(t))throw new Error("First argument need to be ArrayBuffer.");var e=new Uint8Array(t);return i(1,e)}),a});var s=function(){function t(){function t(t){var e,r,s,o,a,u,c=n.dyn_tree,l=n.stat_desc.static_tree,f=n.stat_desc.extra_bits,h=n.stat_desc.extra_base,p=n.stat_desc.max_length,m=0;for(o=0;i>=o;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;d>e;e++)r=t.heap[e],o=c[2*c[2*r+1]+1]+1,o>p&&(o=p,m++),c[2*r+1]=o,r>n.max_code||(t.bl_count[o]++,a=0,r>=h&&(a=f[r-h]),u=c[2*r],t.opt_len+=u*(o+a),l&&(t.static_len+=u*(l[2*r+1]+a)));if(0!==m){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(o=p;0!==o;o--)for(r=t.bl_count[o];0!==r;)s=t.heap[--e],s>n.max_code||(c[2*s+1]!=o&&(t.opt_len+=(o-c[2*s+1])*c[2*s],c[2*s+1]=o),r--)}}function e(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function r(t,r,n){var s,o,a,u=[],c=0;for(s=1;i>=s;s++)u[s]=c=c+n[s-1]<<1;for(o=0;r>=o;o++)a=t[2*o+1],0!==a&&(t[2*o]=e(u[a]++,a))}var n=this;n.build_tree=function(e){var s,o,i,a=n.dyn_tree,u=n.stat_desc.static_tree,c=n.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=d,s=0;c>s;s++)0!==a[2*s]?(e.heap[++e.heap_len]=l=s,e.depth[s]=0):a[2*s+1]=0;for(;e.heap_len<2;)i=e.heap[++e.heap_len]=2>l?++l:0,a[2*i]=1,e.depth[i]=0,e.opt_len--,u&&(e.static_len-=u[2*i+1]);for(n.max_code=l,s=Math.floor(e.heap_len/2);s>=1;s--)e.pqdownheap(a,s);i=c;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],e.pqdownheap(a,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,a[2*i]=a[2*s]+a[2*o],e.depth[i]=Math.max(e.depth[s],e.depth[o])+1,a[2*s+1]=a[2*o+1]=i,e.heap[1]=i++,e.pqdownheap(a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],t(e),r(a,n.max_code,e.bl_count)}}function e(t,e,r,n,s){var o=this;o.static_tree=t,o.extra_bits=e,o.extra_base=r,o.elems=n,o.max_length=s}function r(t,e,r,n,s){var o=this;o.good_length=t,o.max_lazy=e,o.nice_length=r,o.max_chain=n,o.func=s}function n(t,e,r,n){var s=t[2*e],o=t[2*r];return o>s||s==o&&n[e]<=n[r]}function s(){function r(){var t;for(Ie=2*Ce,Be[Pe-1]=0,t=0;Pe-1>t;t++)Be[t]=0;We=L[Xe].max_lazy,Ke=L[Xe].good_length,Qe=L[Xe].nice_length,Ve=L[Xe].max_chain,Me=0,Fe=0,Ge=0,Le=Je=Z-1,Ne=0,Oe=0}function s(){var t;for(t=0;f>t;t++)$e[2*t]=0;for(t=0;a>t;t++)Ze[2*t]=0;for(t=0;u>t;t++)tr[2*t]=0;$e[2*h]=1,er.opt_len=er.static_len=0,ar=cr=0}function o(){rr.dyn_tree=$e,rr.stat_desc=e.static_l_desc,nr.dyn_tree=Ze,nr.stat_desc=e.static_d_desc,sr.dyn_tree=tr,sr.stat_desc=e.static_bl_desc,fr=0,dr=0,lr=8,s()}function i(t,e){var r,n,s=-1,o=t[1],i=0,a=7,u=4;for(0===o&&(a=138,u=3),t[2*(e+1)+1]=65535,r=0;e>=r;r++)n=o,o=t[2*(r+1)+1],++i<a&&n==o||(u>i?tr[2*n]+=i:0!==n?(n!=s&&tr[2*n]++,tr[2*m]++):10>=i?tr[2*w]++:tr[2*y]++,i=0,s=n,0===o?(a=138,u=3):n==o?(a=6,u=3):(a=7,u=4))}function c(){var e;for(i($e,rr.max_code),i(Ze,nr.max_code),sr.build_tree(er),e=u-1;e>=3&&0===tr[2*t.bl_order[e]+1];e--);return er.opt_len+=3*(e+1)+5+5+4,e}function d(t){er.pending_buf[er.pending++]=t}function p(t){d(255&t),d(t>>>8&255)}function O(t){d(t>>8&255),d(255&t&255)}function re(t,e){var r,n=e;dr>g-n?(r=t,fr|=r<<dr&65535,p(fr),fr=r>>>g-dr,dr+=n-g):(fr|=t<<dr&65535,dr+=n)}function ne(t,e){var r=2*t;re(65535&e[r],65535&e[r+1])}function se(t,e){var r,n,s=-1,o=t[1],i=0,a=7,u=4;for(0===o&&(a=138,u=3),r=0;e>=r;r++)if(n=o,o=t[2*(r+1)+1],!(++i<a&&n==o)){if(u>i){do ne(n,tr);while(0!==--i)}else 0!==n?(n!=s&&(ne(n,tr),i--),ne(m,tr),re(i-3,2)):10>=i?(ne(w,tr),re(i-3,3)):(ne(y,tr),re(i-11,7));i=0,s=n,0===o?(a=138,u=3):n==o?(a=6,u=3):(a=7,u=4)}}function oe(e,r,n){var s;for(re(e-257,5),re(r-1,5),re(n-4,4),s=0;n>s;s++)re(tr[2*t.bl_order[s]+1],3);se($e,e-1),se(Ze,r-1)}function ie(){16==dr?(p(fr),fr=0,dr=0):dr>=8&&(d(255&fr),fr>>>=8,dr-=8)}function ae(){re(Q<<1,3),ne(h,e.static_ltree),ie(),9>1+lr+10-dr&&(re(Q<<1,3),ne(h,e.static_ltree),ie()),lr=7}function ue(e,r){var n,s,o;if(er.pending_buf[ur+2*ar]=e>>>8&255,er.pending_buf[ur+2*ar+1]=255&e,er.pending_buf[or+ar]=255&r,ar++,0===e?$e[2*r]++:(cr++,e--,$e[2*(t._length_code[r]+l+1)]++,Ze[2*t.d_code(e)]++),0===(8191&ar)&&Xe>2){for(n=8*ar,s=Me-Fe,o=0;a>o;o++)n+=Ze[2*o]*(5+t.extra_dbits[o]);if(n>>>=3,cr<Math.floor(ar/2)&&n<Math.floor(s/2))return!0}return ar==ir-1}function ce(e,r){var n,s,o,i,a=0;if(0!==ar)do n=er.pending_buf[ur+2*a]<<8&65280|255&er.pending_buf[ur+2*a+1],s=255&er.pending_buf[or+a],a++,0===n?ne(s,e):(o=t._length_code[s],ne(o+l+1,e),i=t.extra_lbits[o],0!==i&&(s-=t.base_length[o],re(s,i)),n--,o=t.d_code(n),ne(o,r),i=t.extra_dbits[o],0!==i&&(n-=t.base_dist[o],re(n,i)));while(ar>a);ne(h,e),lr=e[2*h+1]}function le(){dr>8?p(fr):dr>0&&d(255&fr),fr=0,dr=0}function fe(t,e,r){le(),lr=8,r&&(p(e),p(~e)),er.pending_buf.set(ze.subarray(t,t+e),er.pending),er.pending+=e}function de(t,e,r){re((K<<1)+(r?1:0),3),fe(t,e,!0)}function he(t,r,n){var o,i,a=0;Xe>0?(rr.build_tree(er),nr.build_tree(er),a=c(),o=er.opt_len+3+7>>>3,i=er.static_len+3+7>>>3,o>=i&&(o=i)):o=i=r+5,o>=r+4&&-1!=t?de(t,r,n):i==o?(re((Q<<1)+(n?1:0),3),ce(e.static_ltree,e.static_dtree)):(re(($<<1)+(n?1:0),3),oe(rr.max_code+1,nr.max_code+1,a+1),ce($e,Ze)),s(),n&&le()}function pe(t){he(Fe>=0?Fe:-1,Me-Fe,t),Fe=Me,qe.flush_pending()}function me(){var t,e,r,n;do{if(n=Ie-Ge-Me,0===n&&0===Me&&0===Ge)n=Ce;else if(-1==n)n--;else if(Me>=Ce+Ce-ee){ze.set(ze.subarray(Ce,Ce+Ce),0),He-=Ce,Me-=Ce,Fe-=Ce,t=Pe,r=t;do e=65535&Be[--r],Be[r]=e>=Ce?e-Ce:0;while(0!==--t);t=Ce,r=t;do e=65535&Te[--r],Te[r]=e>=Ce?e-Ce:0;while(0!==--t);n+=Ce}if(0===qe.avail_in)return;t=qe.read_buf(ze,Me+Ge,n),Ge+=t,Ge>=Z&&(Oe=255&ze[Me],Oe=(Oe<<Ue^255&ze[Me+1])&De)}while(ee>Ge&&0!==qe.avail_in)}function we(t){var e,r=65535;for(r>ke-5&&(r=ke-5);;){if(1>=Ge){if(me(),0===Ge&&t==k)return N;if(0===Ge)break}if(Me+=Ge,Ge=0,e=Fe+r,(0===Me||Me>=e)&&(Ge=Me-e,Me=e,pe(!1),0===qe.avail_out))return N;if(Me-Fe>=Ce-ee&&(pe(!1),0===qe.avail_out))return N}return pe(t==C),0===qe.avail_out?t==C?H:N:t==C?G:M}function ye(t){var e,r,n=Ve,s=Me,o=Je,i=Me>Ce-ee?Me-(Ce-ee):0,a=Qe,u=Ee,c=Me+te,l=ze[s+o-1],f=ze[s+o];Je>=Ke&&(n>>=2),a>Ge&&(a=Ge);do if(e=t,ze[e+o]==f&&ze[e+o-1]==l&&ze[e]==ze[s]&&ze[++e]==ze[s+1]){s+=2,e++;do;while(ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&c>s);if(r=te-(c-s),s=c-te,r>o){if(He=t,o=r,r>=a)break;l=ze[s+o-1],f=ze[s+o]}}while((t=65535&Te[t&u])>i&&0!==--n);return Ge>=o?o:Ge}function ge(t){for(var e,r=0;;){if(ee>Ge){if(me(),ee>Ge&&t==k)return N;if(0===Ge)break}if(Ge>=Z&&(Oe=(Oe<<Ue^255&ze[Me+(Z-1)])&De,r=65535&Be[Oe],Te[Me&Ee]=Be[Oe],Be[Oe]=Me),0!==r&&Ce-ee>=(Me-r&65535)&&Ye!=q&&(Le=ye(r)),Le>=Z)if(e=ue(Me-He,Le-Z),Ge-=Le,We>=Le&&Ge>=Z){Le--;do Me++,Oe=(Oe<<Ue^255&ze[Me+(Z-1)])&De,r=65535&Be[Oe],Te[Me&Ee]=Be[Oe],Be[Oe]=Me;while(0!==--Le);Me++}else Me+=Le,Le=0,Oe=255&ze[Me],Oe=(Oe<<Ue^255&ze[Me+1])&De;else e=ue(0,255&ze[Me]),Ge--,Me++;if(e&&(pe(!1),0===qe.avail_out))return N}return pe(t==C),0===qe.avail_out?t==C?H:N:t==C?G:M}function ve(t){for(var e,r,n=0;;){if(ee>Ge){if(me(),ee>Ge&&t==k)return N;if(0===Ge)break}if(Ge>=Z&&(Oe=(Oe<<Ue^255&ze[Me+(Z-1)])&De,n=65535&Be[Oe],Te[Me&Ee]=Be[Oe],Be[Oe]=Me),Je=Le,je=He,Le=Z-1,0!==n&&We>Je&&Ce-ee>=(Me-n&65535)&&(Ye!=q&&(Le=ye(n)),5>=Le&&(Ye==b||Le==Z&&Me-He>4096)&&(Le=Z-1)),Je>=Z&&Je>=Le){r=Me+Ge-Z,e=ue(Me-1-je,Je-Z),Ge-=Je-1,Je-=2;do++Me<=r&&(Oe=(Oe<<Ue^255&ze[Me+(Z-1)])&De,n=65535&Be[Oe],Te[Me&Ee]=Be[Oe],Be[Oe]=Me);while(0!==--Je);if(Ne=0,Le=Z-1,Me++,e&&(pe(!1),0===qe.avail_out))return N}else if(0!==Ne){if(e=ue(0,255&ze[Me-1]),e&&pe(!1),Me++,Ge--,0===qe.avail_out)return N}else Ne=1,Me++,Ge--}return 0!==Ne&&(e=ue(0,255&ze[Me-1]),Ne=0),pe(t==C),0===qe.avail_out?t==C?H:N:t==C?G:M}function be(t){return t.total_in=t.total_out=0,t.msg=null,er.pending=0,er.pending_out=0,xe=W,Ae=k,o(),r(),S}var qe,xe,ke,_e,Ae,Ce,Se,Ee,ze,Ie,Te,Be,Oe,Pe,Re,De,Ue,Fe,Le,je,Ne,Me,He,Ge,Je,Ve,We,Xe,Ye,Ke,Qe,$e,Ze,tr,er=this,rr=new t,nr=new t,sr=new t;er.depth=[];var or,ir,ar,ur,cr,lr,fr,dr;er.bl_count=[],er.heap=[],$e=[],Ze=[],tr=[],er.pqdownheap=function(t,e){for(var r=er.heap,s=r[e],o=e<<1;o<=er.heap_len&&(o<er.heap_len&&n(t,r[o+1],r[o],er.depth)&&o++,!n(t,s,r[o],er.depth));)r[e]=r[o],e=o,o<<=1;r[e]=s},er.deflateInit=function(t,e,r,n,s,o){return n||(n=Y),s||(s=R),o||(o=x),t.msg=null,e==v&&(e=6),1>s||s>P||n!=Y||9>r||r>15||0>e||e>9||0>o||o>q?I:(t.dstate=er,Se=r,Ce=1<<Se,Ee=Ce-1,Re=s+7,Pe=1<<Re,De=Pe-1,Ue=Math.floor((Re+Z-1)/Z),ze=new Uint8Array(2*Ce),Te=[],Be=[],ir=1<<s+6,er.pending_buf=new Uint8Array(4*ir),ke=4*ir,ur=Math.floor(ir/2),or=3*ir,Xe=e,Ye=o,_e=255&n,be(t))},er.deflateEnd=function(){return xe!=V&&xe!=W&&xe!=X?I:(er.pending_buf=null,Be=null,Te=null,ze=null,er.dstate=null,xe==W?T:S)},er.deflateParams=function(t,e,r){var n=S;return e==v&&(e=6),0>e||e>9||0>r||r>q?I:(L[Xe].func!=L[e].func&&0!==t.total_in&&(n=t.deflate(_)),Xe!=e&&(Xe=e,We=L[Xe].max_lazy,Ke=L[Xe].good_length,Qe=L[Xe].nice_length,Ve=L[Xe].max_chain),Ye=r,n)},er.deflateSetDictionary=function(t,e,r){var n,s=r,o=0;if(!e||xe!=V)return I;if(Z>s)return S;for(s>Ce-ee&&(s=Ce-ee,o=r-s),ze.set(e.subarray(o,o+s),0),Me=s,Fe=s,Oe=255&ze[0],Oe=(Oe<<Ue^255&ze[1])&De,n=0;s-Z>=n;n++)Oe=(Oe<<Ue^255&ze[n+(Z-1)])&De,Te[n&Ee]=Be[Oe],Be[Oe]=n;return S},er.deflate=function(t,e){var r,n,s,o,i;if(e>C||0>e)return I;if(!t.next_out||!t.next_in&&0!==t.avail_in||xe==X&&e!=C)return t.msg=j[z-I],I;if(0===t.avail_out)return t.msg=j[z-B],B;if(qe=t,o=Ae,Ae=e,xe==V&&(n=Y+(Se-8<<4)<<8,s=(Xe-1&255)>>1,s>3&&(s=3),n|=s<<6,0!==Me&&(n|=J),n+=31-n%31,xe=W,O(n)),0!==er.pending){if(qe.flush_pending(),0===qe.avail_out)return Ae=-1,S}else if(0===qe.avail_in&&o>=e&&e!=C)return qe.msg=j[z-B],B;if(xe==X&&0!==qe.avail_in)return t.msg=j[z-B],B;if(0!==qe.avail_in||0!==Ge||e!=k&&xe!=X){switch(i=-1,L[Xe].func){case D:i=we(e);break;case U:i=ge(e);break;case F:i=ve(e)}if((i==H||i==G)&&(xe=X),i==N||i==H)return 0===qe.avail_out&&(Ae=-1),S;if(i==M){if(e==_)ae();else if(de(0,0,!1),e==A)for(r=0;Pe>r;r++)Be[r]=0;if(qe.flush_pending(),0===qe.avail_out)return Ae=-1,S}}return e!=C?S:E}}function o(){var t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}var i=15,a=30,u=19,c=29,l=256,f=l+1+c,d=2*f+1,h=256,p=7,m=16,w=17,y=18,g=16,v=-1,b=1,q=2,x=0,k=0,_=1,A=3,C=4,S=0,E=1,z=2,I=-2,T=-3,B=-5,O=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];t._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28],t.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],t.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],t.d_code=function(t){return 256>t?O[t]:O[256+(t>>>7)]},t.extra_lbits=[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],t.extra_dbits=[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],t.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],t.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],e.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],e.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],e.static_l_desc=new e(e.static_ltree,t.extra_lbits,l+1,f,i),e.static_d_desc=new e(e.static_dtree,t.extra_dbits,0,a,i),e.static_bl_desc=new e(null,t.extra_blbits,0,u,p);var P=9,R=8,D=0,U=1,F=2,L=[new r(0,0,0,0,D),new r(4,4,8,4,U),new r(4,5,16,8,U),new r(4,6,32,32,U),new r(4,4,16,16,F),new r(8,16,32,32,F),new r(8,16,128,128,F),new r(8,32,128,256,F),new r(32,128,258,1024,F),new r(32,258,258,4096,F)],j=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],N=0,M=1,H=2,G=3,J=32,V=42,W=113,X=666,Y=8,K=0,Q=1,$=2,Z=3,te=258,ee=te+Z+1;return o.prototype={deflateInit:function(t,e){var r=this;return r.dstate=new s,e||(e=i),r.dstate.deflateInit(r,t,e)},deflate:function(t){var e=this;return e.dstate?e.dstate.deflate(e,t):I},deflateEnd:function(){var t=this;if(!t.dstate)return I;var e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){var r=this;return r.dstate?r.dstate.deflateParams(r,t,e):I},deflateSetDictionary:function(t,e){var r=this;return r.dstate?r.dstate.deflateSetDictionary(r,t,e):I},read_buf:function(t,e,r){var n=this,s=n.avail_in;return s>r&&(s=r),0===s?0:(n.avail_in-=s,t.set(n.next_in.subarray(n.next_in_index,n.next_in_index+s),e),n.next_in_index+=s,n.total_in+=s,s)},flush_pending:function(){var t=this,e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}},function(t){var e=this,r=new o,n=512,s=k,i=new Uint8Array(n);"undefined"==typeof t&&(t=v),r.deflateInit(t),r.next_out=i,e.append=function(t,e){var o,a,u=[],c=0,l=0,f=0;if(t.length){r.next_in_index=0,r.next_in=t,r.avail_in=t.length;do{if(r.next_out_index=0,r.avail_out=n,o=r.deflate(s),o!=S)throw"deflating: "+r.msg;r.next_out_index&&(r.next_out_index==n?u.push(new Uint8Array(i)):u.push(new Uint8Array(i.subarray(0,r.next_out_index)))),f+=r.next_out_index,e&&r.next_in_index>0&&r.next_in_index!=c&&(e(r.next_in_index),c=r.next_in_index)}while(r.avail_in>0||0===r.avail_out);return a=new Uint8Array(f),u.forEach(function(t){a.set(t,l),l+=t.length}),a}},e.flush=function(){var t,e,s=[],o=0,a=0;do{if(r.next_out_index=0,r.avail_out=n,t=r.deflate(C),t!=E&&t!=S)throw"deflating: "+r.msg;n-r.avail_out>0&&s.push(new Uint8Array(i.subarray(0,r.next_out_index))),a+=r.next_out_index}while(r.avail_in>0||0===r.avail_out);return r.deflateEnd(),e=new Uint8Array(a),s.forEach(function(t){e.set(t,o),o+=t.length}),e}}}(this);!function(t){var e;e=function(){function e(t){var e,r,n,s,o,i,a,u,c,l,f,d,h,p,m;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],a=t=0;4>t;a=++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()},o=this.readUInt16(),s=this.readUInt16()||100,i.delay=1e3*o/s,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=i?i.data:void 0)||this.imgData,a=h=0;e>=0?e>h:h>e;a=e>=0?++h:--h)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(f=n-this.transparency.indexed.length,f>0)for(a=p=0;f>=0?f>p:p>f;a=f>=0?++p:--p)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":d=this.read(e),u=d.indexOf(0),c=String.fromCharCode.apply(String,d.slice(0,u)),this.text[c]=String.fromCharCode.apply(String,d.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===(m=this.colorType)||6===m,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),this.imgData=new Uint8Array(this.imgData),void 0;default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}var r,n,s,o,a,u,c,l;e.load=function(t,r,n){var s;return"function"==typeof r&&(n=r),s=new XMLHttpRequest,s.open("GET",t,!0),s.responseType="arraybuffer",s.onload=function(){var t,o;return t=new Uint8Array(s.response||s.mozResponseArrayBuffer),o=new e(t),"function"==typeof(null!=r?r.getContext:void 0)&&o.render(r),"function"==typeof n?n(o):void 0},s.send(null)},o=0,s=1,a=2,n=0,r=1,e.prototype.read=function(t){var e,r,n;for(n=[],e=r=0;t>=0?t>r:r>t;e=t>=0?++r:--r)n.push(this.data[this.pos++]);return n},e.prototype.readUInt32=function(){var t,e,r,n;return t=this.data[this.pos++]<<24,e=this.data[this.pos++]<<16,r=this.data[this.pos++]<<8,n=this.data[this.pos++],t|e|r|n},e.prototype.readUInt16=function(){var t,e;return t=this.data[this.pos++]<<8,e=this.data[this.pos++],t|e},e.prototype.decodePixels=function(t){var e,r,n,s,o,a,u,c,l,f,d,h,p,m,w,y,g,v,b,q,x,k,_;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=new i(t),t=t.getBytes(),h=this.pixelBitlength/8,y=h*this.width,p=new Uint8Array(y*this.height),a=t.length,w=0,m=0,r=0;a>m;){switch(t[m++]){case 0:for(s=b=0;y>b;s=b+=1)p[r++]=t[m++];break;case 1:for(s=q=0;y>q;s=q+=1)e=t[m++],o=h>s?0:p[r-h],p[r++]=(e+o)%256;break;case 2:for(s=x=0;y>x;s=x+=1)e=t[m++],n=(s-s%h)/h,g=w&&p[(w-1)*y+n*h+s%h],p[r++]=(g+e)%256;break;case 3:for(s=k=0;y>k;s=k+=1)e=t[m++],n=(s-s%h)/h,o=h>s?0:p[r-h],g=w&&p[(w-1)*y+n*h+s%h],p[r++]=(e+Math.floor((o+g)/2))%256;break;case 4:for(s=_=0;y>_;s=_+=1)e=t[m++],n=(s-s%h)/h,o=h>s?0:p[r-h],0===w?g=v=0:(g=p[(w-1)*y+n*h+s%h],v=n&&p[(w-1)*y+(n-1)*h+s%h]),u=o+g-v,c=Math.abs(u-o),f=Math.abs(u-g),d=Math.abs(u-v),l=f>=c&&d>=c?o:d>=f?g:v,p[r++]=(e+l)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}w++}return p},e.prototype.decodePalette=function(){var t,e,r,n,s,o,i,a,u,c;for(n=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+n.length),s=0,r=n.length,t=0,e=a=0,u=n.length;u>a;e=a+=3)o[s++]=n[e],o[s++]=n[e+1],o[s++]=n[e+2],o[s++]=null!=(c=i[t++])?c:255;return o},e.prototype.copyToImageData=function(t,e){var r,n,s,o,i,a,u,c,l,f,d;if(n=this.colors,l=null,r=this.hasAlphaChannel,this.palette.length&&(l=null!=(d=this._decodedPalette)?d:this._decodedPalette=this.decodePalette(),n=4,r=!0),s=t.data||t,c=s.length,i=l||e,o=a=0,1===n)for(;c>o;)u=l?4*e[o/4]:a,f=i[u++],s[o++]=f,s[o++]=f,s[o++]=f,s[o++]=r?i[u++]:255,a=u;else for(;c>o;)u=l?4*e[o/4]:a,s[o++]=i[u++],s[o++]=i[u++],s[o++]=i[u++],s[o++]=r?i[u++]:255,a=u},e.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};try{c=t.document.createElement("canvas"),l=c.getContext("2d")}catch(f){return-1}return u=function(t){var e;return l.width=t.width,l.height=t.height,l.clearRect(0,0,t.width,t.height),l.putImageData(t,0,0),e=new Image,e.src=c.toDataURL(),e},e.prototype.decodeFrames=function(t){var e,r,n,s,o,i,a,c;if(this.animation){for(a=this.animation.frames,c=[],r=o=0,i=a.length;i>o;r=++o)e=a[r],n=t.createImageData(e.width,e.height),s=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(n,s),e.imageData=n,c.push(e.image=u(n));return c}},e.prototype.renderFrame=function(t,e){var r,o,i;return o=this.animation.frames,r=o[e],i=o[e-1],0===e&&t.clearRect(0,0,this.width,this.height),(null!=i?i.disposeOp:void 0)===s?t.clearRect(i.xOffset,i.yOffset,i.width,i.height):(null!=i?i.disposeOp:void 0)===a&&t.putImageData(i.imageData,i.xOffset,i.yOffset),r.blendOp===n&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},e.prototype.animate=function(t){var e,r,n,s,o,i,a=this;return r=0,i=this.animation,s=i.numFrames,n=i.frames,o=i.numPlays,(e=function(){var i,u;return i=r++%s,u=n[i],a.renderFrame(t,i),s>1&&o>r/s?a.animation._timeout=setTimeout(e,u.delay):void 0})()},e.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},e.prototype.render=function(t){var e,r;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)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},e}(),t.PNG=e}("undefined"!=typeof window&&window||this);var o=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,r=e?e.byteLength:0;if(r>t)return e;for(var n=512;t>n;)n<<=1;for(var s=new Uint8Array(n),o=0;r>o;++o)s[o]=e[o];return this.buffer=s},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 r=e+t;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();var r=this.bufferLength}return this.pos=r,this.buffer.subarray(e,r)},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,r){for(var n=t+e;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,r)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),i=function(){function t(t){throw new Error(t)}function e(e){var r=0,n=e[r++],s=e[r++];(-1==n||-1==s)&&t("Invalid header in flate stream"),8!=(15&n)&&t("Unknown compression method in flate stream"),((n<<8)+s)%31!=0&&t("Bad FCHECK in flate stream"),32&s&&t("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=r,this.codeSize=0,this.codeBuf=0,o.call(this)}if("undefined"==typeof Uint32Array)return void 0;var r=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=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]),s=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]),i=[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],a=[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 e.prototype=Object.create(o.prototype),e.prototype.getBits=function(e){for(var r,n=this.codeSize,s=this.codeBuf,o=this.bytes,i=this.bytesPos;e>n;)"undefined"==typeof(r=o[i++])&&t("Bad encoding in flate stream"),s|=r<<n,n+=8;return r=s&(1<<e)-1,this.codeBuf=s>>e,this.codeSize=n-=e,this.bytesPos=i,r},e.prototype.getCode=function(e){for(var r=e[0],n=e[1],s=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;n>s;){var u;"undefined"==typeof(u=i[a++])&&t("Bad encoding in flate stream"),o|=u<<s,s+=8}var c=r[o&(1<<n)-1],l=c>>16,f=65535&c;return(0==s||l>s||0==l)&&t("Bad encoding in flate stream"),this.codeBuf=o>>l,this.codeSize=s-l,this.bytesPos=a,f},e.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,n=0;e>n;++n)t[n]>r&&(r=t[n]);for(var s=1<<r,o=new Uint32Array(s),i=1,a=0,u=2;r>=i;++i,a<<=1,u<<=1)for(var c=0;e>c;++c)if(t[c]==i){for(var l=0,f=a,n=0;i>n;++n)l=l<<1|1&f,f>>=1;for(var n=l;s>n;n+=u)o[n]=i<<16|c;++a}return[o,r]},e.prototype.readBlock=function(){function e(t,e,r,n,s){for(var o=t.getBits(r)+n;o-->0;)e[k++]=s}var o=this.getBits(3);if(1&o&&(this.eof=!0),o>>=1,0==o){var u,c=this.bytes,l=this.bytesPos;"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream");var f=u;"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream"),f|=u<<8,"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream");var d=u;"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream"),d|=u<<8,d!=(65535&~f)&&t("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var h=this.bufferLength,p=this.ensureBuffer(h+f),m=h+f;this.bufferLength=m;for(var w=h;m>w;++w){if("undefined"==typeof(u=c[l++])){this.eof=!0;break}p[w]=u}return this.bytesPos=l,void 0}var y,g;if(1==o)y=i,g=a;else if(2==o){for(var v=this.getBits(5)+257,b=this.getBits(5)+1,q=this.getBits(4)+4,x=Array(r.length),k=0;q>k;)x[r[k++]]=this.getBits(3);for(var _=this.generateHuffmanTable(x),A=0,k=0,C=v+b,S=new Array(C);C>k;){var E=this.getCode(_);16==E?e(this,S,2,3,A):17==E?e(this,S,3,3,A=0):18==E?e(this,S,7,11,A=0):S[k++]=A=E}y=this.generateHuffmanTable(S.slice(0,v)),g=this.generateHuffmanTable(S.slice(v,C))}else t("Unknown block type in flate stream");for(var p=this.buffer,z=p?p.length:0,I=this.bufferLength;;){var T=this.getCode(y);if(256>T)I+1>=z&&(p=this.ensureBuffer(I+1),z=p.length),p[I++]=T;else{if(256==T)return this.bufferLength=I,void 0;T-=257,T=n[T];var B=T>>16;B>0&&(B=this.getBits(B));var A=(65535&T)+B;T=this.getCode(g),T=s[T],B=T>>16,B>0&&(B=this.getBits(B));var O=(65535&T)+B;I+A>=z&&(p=this.ensureBuffer(I+A),z=p.length);for(var P=0;A>P;++P,++I)p[I]=p[I-O]}}},e}();!function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";"undefined"==typeof t.btoa&&(t.btoa=function(t){var r,n,s,o,i,a,u,c,l=0,f=0,d="",h=[];if(!t)return t;do r=t.charCodeAt(l++),n=t.charCodeAt(l++),s=t.charCodeAt(l++),c=r<<16|n<<8|s,o=c>>18&63,i=c>>12&63,a=c>>6&63,u=63&c,h[f++]=e.charAt(o)+e.charAt(i)+e.charAt(a)+e.charAt(u);while(l<t.length);d=h.join("");var p=t.length%3;return(p?d.slice(0,p-3):d)+"===".slice(p||3)}),"undefined"==typeof t.atob&&(t.atob=function(t){var r,n,s,o,i,a,u,c,l=0,f=0,d="",h=[];if(!t)return t;t+="";do o=e.indexOf(t.charAt(l++)),i=e.indexOf(t.charAt(l++)),a=e.indexOf(t.charAt(l++)),u=e.indexOf(t.charAt(l++)),c=o<<18|i<<12|a<<6|u,r=c>>16&255,n=c>>8&255,s=255&c,h[f++]=64==a?String.fromCharCode(r):64==u?String.fromCharCode(r,n):String.fromCharCode(r,n,s);while(l<t.length);return d=h.join("")}),Array.prototype.map||(Array.prototype.map=function(t){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var e=Object(this),r=e.length>>>0,n=new Array(r),s=arguments.length>1?arguments[1]:void 0,o=0;r>o;o++)o in e&&(n[o]=t.call(s,e[o],o,e));return n}),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){"use strict";if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var r=Object(this),n=r.length>>>0,s=0;n>s;s++)s in r&&t.call(e,r[s],s,r)}),Object.keys||(Object.keys=function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=r.length;return function(s){if("object"!=typeof s&&("function"!=typeof s||null===s))throw new TypeError;var o,i,a=[];for(o in s)t.call(s,o)&&a.push(o);if(e)for(i=0;n>i;i++)t.call(s,r[i])&&a.push(r[i]);return a}}()),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/g,"")}),String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")})}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this)}({},function(){return this}()); |