Clazz.declarePackage("J.api");Clazz.declareInterface(J.api,"JmolZipUtility");Clazz.declarePackage("J.io2");
Clazz.load(["J.api.JmolZipUtility"],"J.io2.ZipUtil","java.io.BufferedInputStream $.BufferedReader $.ByteArrayInputStream $.ByteArrayOutputStream $.FileInputStream $.FileOutputStream $.StringReader java.lang.Character $.Long java.util.Date $.Hashtable $.StringTokenizer java.util.zip.CRC32 $.GZIPInputStream $.ZipEntry $.ZipInputStream $.ZipOutputStream J.adapter.smarter.AtomSetCollection J.api.Interface J.io.JmolBinary J.io2.JmolZipInputStream J.util.Escape $.JmolList $.Logger $.Parser $.SB $.TextFormat J.viewer.FileManager $.JC $.Viewer".split(" "),function(){c$=
Clazz.declareType(J.io2,"ZipUtil",null,J.api.JmolZipUtility);Clazz.makeConstructor(c$,function(){});Clazz.overrideMethod(c$,"newZipInputStream",function(a){return J.io2.ZipUtil.newZIS(a)},"java.io.InputStream");c$.newZIS=$_M(c$,"newZIS",($fz=function(a){return Clazz.instanceOf(a,J.api.ZInputStream)?a:Clazz.instanceOf(a,java.io.BufferedInputStream)?new J.io2.JmolZipInputStream(a):new J.io2.JmolZipInputStream(new java.io.BufferedInputStream(a))},$fz.isPrivate=!0,$fz),"java.io.InputStream");Clazz.overrideMethod(c$,
"getAllZipData",function(a,b,c,d,e){J.io2.ZipUtil.getAllZipDataStatic(a,b,c,d,e)},"java.io.InputStream,~A,~S,~S,java.util.Map");c$.getAllZipDataStatic=$_M(c$,"getAllZipDataStatic",($fz=function(a,b,c,d,e){a=J.io2.ZipUtil.newZIS(a);var f,g=new J.util.SB;d="|"+d+"|";b=J.util.TextFormat.join(b,"/",1);var h=null;null!=b&&(h=b.substring(0,b.indexOf("/")+1),0==h.length&&(h=null));try{for(;null!=(f=a.getNextEntry());){var j=f.getName();if(!(null!=b&&null!=h&&!j.equals(b)&&!j.startsWith(h))){g.append(j).appendC("\n");
var k="|"+j.substring(j.lastIndexOf("/")+1)+"|",l=0<=d.indexOf(k),n=J.io.JmolBinary.getStreamBytes(a,f.getSize()),p;l?(p=J.io2.ZipUtil.getBinaryStringForBytes(n),j+=":asBinaryString"):p=J.io.JmolBinary.fixUTF(n);p="BEGIN Directory Entry "+j+"\n"+p+"\nEND Directory Entry "+j+"\n";e.put(c+"|"+j,p)}}}catch(m){if(!Clazz.exceptionOf(m,Exception))throw m;}e.put("#Directory_Listing",g.toString())},$fz.isPrivate=!0,$fz),"java.io.InputStream,~A,~S,~S,java.util.Map");c$.getBinaryStringForBytes=$_M(c$,"getBinaryStringForBytes",
($fz=function(a){for(var b=new J.util.SB,c=0;c<a.length;c++)b.append(Integer.toHexString(a[c]&255)).appendC(" ");return b.toString()},$fz.isPrivate=!0,$fz),"~A");Clazz.overrideMethod(c$,"getZipFileContents",function(a,b,c,d){var e;if(null==b||c>=b.length)return this.getZipDirectoryAsStringAndClose(a);var f=b[c];a=new java.util.zip.ZipInputStream(a);var g;try{var h=f.equals(".");if(h||f.lastIndexOf("/")==f.length-1){for(e=new J.util.SB;null!=(g=a.getNextEntry());){var j=g.getName();(h||j.startsWith(f))&&
e.append(j).appendC("\n")}var k=e.toString();return d?new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(k.getBytes())):k}h=!1;0<f.indexOf(":asBinaryString")&&(f=f.substring(0,f.indexOf(":asBinaryString")),h=!0);for(;null!=(g=a.getNextEntry());)if(f.equals(g.getName())){var l=J.io.JmolBinary.getStreamBytes(a,g.getSize());if(J.io.JmolBinary.isZipFile(l))return this.getZipFileContents(new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(l)),b,++c,d);if(d)return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(l));
if(h){e=new J.util.SB;for(b=0;b<l.length;b++)e.append(Integer.toHexString(l[b]&255)).appendC(" ");return e.toString()}return J.io.JmolBinary.fixUTF(l)}}catch(n){if(!Clazz.exceptionOf(n,Exception))throw n;}return""},"java.io.BufferedInputStream,~A,~N,~B");Clazz.overrideMethod(c$,"getZipFileContentsAsBytes",function(a,b,c){var d=Clazz.newByteArray(0,0),e=b[c];if(e.lastIndexOf("/")==e.length-1)return d;try{a=J.io.JmolBinary.checkPngZipStream(a);for(var f=new java.util.zip.ZipInputStream(a),g;null!=(g=
f.getNextEntry());)if(e.equals(g.getName())){var h=J.io.JmolBinary.getStreamBytes(f,g.getSize());return J.io.JmolBinary.isZipFile(h)&&++c<b.length?this.getZipFileContentsAsBytes(new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(h)),b,c):h}}catch(j){if(!Clazz.exceptionOf(j,Exception))throw j;}return d},"java.io.BufferedInputStream,~A,~N");Clazz.overrideMethod(c$,"getZipDirectoryAsStringAndClose",function(a){var b=new J.util.SB,c=[];try{c=this.getZipDirectoryOrErrorAndClose(a,!1),a.close()}catch(d){if(Clazz.exceptionOf(d,
Exception))J.util.Logger.error(d.toString());else throw d;}for(a=0;a<c.length;a++)b.append(c[a]).appendC("\n");return b.toString()},"java.io.BufferedInputStream");Clazz.overrideMethod(c$,"getZipDirectoryAndClose",function(a,b){var c=[];try{c=this.getZipDirectoryOrErrorAndClose(a,b),a.close()}catch(d){if(Clazz.exceptionOf(d,Exception))J.util.Logger.error(d.toString());else throw d;}return c},"java.io.BufferedInputStream,~B");$_M(c$,"getZipDirectoryOrErrorAndClose",($fz=function(a,b){a=J.io.JmolBinary.checkPngZipStream(a);
for(var c=new J.util.JmolList,d=new java.util.zip.ZipInputStream(a),e,f=null;null!=(e=d.getNextEntry());)e=e.getName(),b&&J.io2.ZipUtil.isJmolManifest(e)?f=J.io2.ZipUtil.getZipEntryAsString(d):e.startsWith("__MACOS")||c.addLast(e);d.close();b&&c.add(0,null==f?"":f+"\n############\n");return c.toArray(Array(c.size()))},$fz.isPrivate=!0,$fz),"java.io.BufferedInputStream,~B");c$.getZipEntryAsString=$_M(c$,"getZipEntryAsString",($fz=function(a){return J.io.JmolBinary.fixUTF(J.io.JmolBinary.getStreamBytes(a,
-1))},$fz.isPrivate=!0,$fz),"java.io.InputStream");c$.isJmolManifest=$_M(c$,"isJmolManifest",($fz=function(a){return a.startsWith("JmolManifest")},$fz.isPrivate=!0,$fz),"~S");Clazz.overrideMethod(c$,"cacheZipContents",function(a,b,c){a=this.newZipInputStream(a);var d,e=new J.util.SB,f=0;try{for(;null!=(d=a.getNextEntry());){var g=d.getName();e.append(g).appendC("\n");var h=d.getSize(),j=J.io.JmolBinary.getStreamBytes(a,h),f=f+j.length;c.put(b+"|"+g,j)}a.close()}catch(k){if(Clazz.exceptionOf(k,Exception)){try{a.close()}catch(l){if(!Clazz.exceptionOf(l,
java.io.IOException))throw l;}return null}throw k;}J.util.Logger.info("ZipUtil cached "+f+" bytes from "+b);return e.toString()},"java.io.BufferedInputStream,~S,java.util.Map");Clazz.overrideMethod(c$,"getGzippedBytesAsString",function(a){return J.io2.ZipUtil.staticGetGzippedBytesAsString(a)},"~A");c$.staticGetGzippedBytesAsString=$_M(c$,"staticGetGzippedBytesAsString",function(a){try{var b=new java.io.ByteArrayInputStream(a);do b=new java.io.BufferedInputStream(new java.util.zip.GZIPInputStream(b,
512));while(J.io.JmolBinary.isGzipS(b));var c=J.io2.ZipUtil.getZipEntryAsString(b);b.close();return c}catch(d){if(Clazz.exceptionOf(d,Exception))return"";throw d;}},"~A");$_M(c$,"getGzippedInputStream",function(a){try{var b=new java.io.ByteArrayInputStream(a);do b=new java.io.BufferedInputStream(new java.util.zip.GZIPInputStream(b,512));while(J.io.JmolBinary.isGzipS(b));return b}catch(c){if(Clazz.exceptionOf(c,Exception))return null;throw c;}},"~A");Clazz.overrideMethod(c$,"newGZIPInputStream",function(a){return new java.util.zip.GZIPInputStream(a,
512)},"java.io.BufferedInputStream");$_M(c$,"addPngFileBytes",($fz=function(a,b,c,d,e,f,g,h){var j=new java.util.zip.CRC32;j.update(b,0,b.length);j=Long.$valueOf(j.getValue());d.containsKey(j)?f=d.get(j):(e&&(f=f.$replace(".","_")),d.containsKey(f)&&(e=f.lastIndexOf("."),f=e>g?f.substring(0,e)+"["+c+"]"+f.substring(e):f+"["+c+"]"),h.addLast(a),h.addLast(f),h.addLast(b),d.put(j,f));return f},$fz.isPrivate=!0,$fz),"~S,~A,~N,java.util.Hashtable,~B,~S,~N,J.util.JmolList");Clazz.overrideMethod(c$,"writeZipFile",
function(a,b,c,d,e){var f=Clazz.newByteArray(1024,0),g=0,h=0;J.util.Logger.info("creating zip file "+(null==c?"":c)+"...");var j=null,k="";try{for(var l=null==c||c.startsWith("http://")?new java.io.ByteArrayOutputStream:null,n=new java.util.zip.ZipOutputStream(null==l?new java.io.FileOutputStream(c):l),p=0;p<d.size();p+=3){var m=d.get(p),q=null;if(0==m.indexOf("file:/"))m=m.substring(5),2<m.length&&":"==m.charAt(2)&&(m=m.substring(1));else if(0==m.indexOf("cache://"))var r=a.cacheGet(m,!1),m=m.substring(8),
q=J.util.Escape.isAB(r)?r:r.getBytes();var v=d.get(p+1);null==v&&(v=m);null==q&&(q=d.get(p+2));var u=";"+v+";";if(0<=k.indexOf(u))J.util.Logger.info("duplicate entry");else{k+=u;n.putNextEntry(new java.util.zip.ZipEntry(v));u=0;if(null==q){for(var s=new java.io.FileInputStream(m),t;0<(t=s.read(f,0,1024));)n.write(f,0,t),u+=t;s.close()}else n.write(q,0,q.length),u+=q.length;g+=u;n.closeEntry();J.util.Logger.info("...added "+m+" ("+u+" bytes)")}}n.close();J.util.Logger.info(g+" bytes prior to compression");
if(null!=l){q=l.toByteArray();if(null==c)return q;var j=c,h=q.length,w=J.io.JmolBinary.postByteArray(a,c,q);if(0<=w.indexOf("Exception"))return w;e+=" "+w}else var y=b.apiPlatform.newFile(c),j=y.getAbsolutePath().$replace("\\","/"),h=y.length()}catch(x){if(Clazz.exceptionOf(x,java.io.IOException))return J.util.Logger.info(x.toString()),x.toString();throw x;}return e+" "+h+" "+j},"J.viewer.FileManager,J.viewer.Viewer,~S,J.util.JmolList,~S");Clazz.overrideMethod(c$,"getSceneScript",function(a,b,c){for(var d=
0,e=0,f=(new J.util.SB).append("###scene.spt###").append(" Jmol ").append(J.viewer.Viewer.getJmolVersion()).append("\n{\nsceneScripts={"),g=1;g<a.length;g++){a[g-1]=J.util.TextFormat.trim(a[g-1],"\t\n\r ");var h=Clazz.newIntArray(1,0),e=J.util.Parser.parseIntNext(a[g],h);if(-2147483648==e)return"bad scene ID: "+e;a[g]=a[g].substring(h[0]);c.addLast(Integer.$valueOf(e));d=d+"-"+e;b.put(d,a[g-1]);1<g&&f.append(",");f.appendC("\n").append(J.util.Escape.eS(d)).append(": ").append(J.util.Escape.eS(a[g-
1]));d=e}f.append("\n}\n");if(0==c.size())return"no lines 'pause scene n'";f.append("\nthisSceneRoot = '$SCRIPT_PATH$'.split('_scene_')[1];\n").append("thisSceneID = 0 + ('$SCRIPT_PATH$'.split('_scene_')[2]).split('.')[1];\n").append("var thisSceneState = '$SCRIPT_PATH$'.replace('.min.png','.all.png') + 'state.spt';\n").append("var spath = ''+currentSceneID+'-'+thisSceneID;\n").append("print thisSceneRoot + ' ' + spath;\n").append("var sscript = sceneScripts[spath];\n").append("var isOK = true;\n").append("try{\n").append("if (thisSceneRoot != currentSceneRoot){\n").append(" isOK = false;\n").append("} else if (sscript != '') {\n").append(" isOK = true;\n").append("} else if (thisSceneID <= currentSceneID){\n").append(" isOK = false;\n").append("} else {\n").append(" sscript = '';\n").append(" for (var i = currentSceneID; i < thisSceneID; i++){\n").append("  var key = ''+i+'-'+(i + 1); var script = sceneScripts[key];\n").append("  if (script = '') {isOK = false;break;}\n").append("  sscript += ';'+script;\n").append(" }\n").append("}\n}catch(e){print e;isOK = false}\n").append("if (isOK) {"+
J.io2.ZipUtil.wrapPathForAllFiles("script inline @sscript","print e;isOK = false")+"}\n").append("if (!isOK){script @thisSceneState}\n").append("currentSceneRoot = thisSceneRoot; currentSceneID = thisSceneID;\n}\n");return f.toString()},"~A,java.util.Map,J.util.JmolList");c$.wrapPathForAllFiles=$_M(c$,"wrapPathForAllFiles",($fz=function(a,b){var c="v__"+(""+Math.random()).substring(3);return"# Jmol script\n{\n\tVar "+c+' = pathForAllFiles\n\tpathForAllFiles="$SCRIPT_PATH$"\n\ttry{\n\t\t'+a+"\n\t}catch(e){"+
b+"}\n\tpathForAllFiles = "+c+"\n}\n"},$fz.isPrivate=!0,$fz),"~S,~S");Clazz.overrideMethod(c$,"createZipSet",function(a,b,c,d,e,f){var g=new J.util.JmolList,h=new J.util.JmolList,j=new java.util.Hashtable,k=null!=e&&3==e.length&&e[1].startsWith("###scene.spt###"),l=k&&e[2].equals("min");l||(J.io.JmolBinary.getFileReferences(d,h),k&&J.io.JmolBinary.getFileReferences(e[1],h));if(!k&&null!=e&&0<e.length){d=J.io2.ZipUtil.wrapPathForAllFiles("script "+J.util.Escape.eS(e[0]),"");for(var n=0;n<e.length;n++)h.addLast(e[n])}var p=
h.size();null!=c&&(c=c.$replace("\\","/"));n=c;null!=n&&(n=c.substring(c.lastIndexOf("/")+1),0<=n.indexOf(".")&&(n=n.substring(0,n.indexOf("."))));for(var m=new J.util.JmolList,q=0;q<p;q++){var r=h.get(q),v=!b.isJS&&J.viewer.FileManager.isLocal(r),u=r;if(v||f){var s=r.lastIndexOf("/"),u=0<r.indexOf("?")&&0>r.indexOf("|")?J.util.TextFormat.replaceAllCharacters(r,"/:?\"'=&","_"):J.viewer.FileManager.stripPath(r),u=J.util.TextFormat.replaceAllCharacters(u,"[]","_"),t=null!=a.spardirCache&&a.spardirCache.containsKey(r);
if(v&&0>r.indexOf("|")&&!t)g.addLast(r),g.addLast(u),g.addLast(null);else{v=t?a.spardirCache.get(r):a.getFileAsBytes(r,null,!0);if(!J.util.Escape.isAB(v))return v;u=this.addPngFileBytes(r,v,q,j,t,u,s,g)}r="$SCRIPT_PATH$"+u}j.put(u,u);m.addLast(r)}l||(d=J.util.TextFormat.replaceQuotedStrings(d,h,m),g.addLast("state.spt"),g.addLast(null),g.addLast(d.getBytes()));k&&(null!=e[0]&&(g.addLast("animate.spt"),g.addLast(null),g.addLast(e[0].getBytes())),g.addLast("scene.spt"),g.addLast(null),d=J.util.TextFormat.replaceQuotedStrings(e[1],
h,m),g.addLast(d.getBytes()));e=k?"scene.spt":"state.spt";g.addLast("JmolManifest.txt");g.addLast(null);e="# Jmol Manifest Zip Format 1.1\n# Created "+new java.util.Date+"\n# JmolVersion "+J.viewer.Viewer.getJmolVersion()+"\n"+e;g.addLast(e.getBytes());g.addLast("Jmol_version_"+J.viewer.Viewer.getJmolVersion().$replace(" ","_").$replace(":","."));g.addLast(null);g.addLast(Clazz.newByteArray(0,0));null!=n&&(d=b.getImageAsWithComment("PNG",-1,-1,-1,null,null,null,J.viewer.JC.embedScript(d)),J.util.Escape.isAB(d)&&
(g.addLast("preview.png"),g.addLast(null),g.addLast(d)));return J.io.JmolBinary.writeZipFile(a,b,c,g,"OK JMOL")},"J.viewer.FileManager,J.viewer.Viewer,~S,~S,~A,~B");Clazz.overrideMethod(c$,"getAtomSetCollectionOrBufferedReaderFromZip",function(a,b,c,d,e,f,g,h){var j=1==f;e.put("zipSet",c);var k=e.get("subFileList");null==k&&(k=J.io2.ZipUtil.checkSpecialInZip(d));var l=null==k||f>=k.length?null:k[f];if(null!=l&&(l.startsWith("/")||l.startsWith("\\")))l=l.substring(1);var n=0;null==l&&e.containsKey("modelNumber")&&
(n=e.get("modelNumber").intValue(),0<n&&j&&e.remove("modelNumber"));var p=e.get("manifest"),m=null==p;m&&(p=0<d.length?d[0]:"");var q=0<p.length;q&&J.util.Logger.debugging&&J.util.Logger.info("manifest for  "+c+":\n"+p);var k=0<=p.indexOf("IGNORE_ERRORS"),r=0<=p.indexOf("IGNORE_MANIFEST"),v=0<=p.indexOf("EXCEPT_FILES");if(r||null!=l)q=!1;if(m&&q&&(m=J.io.JmolBinary.getManifestScriptPath(p),null!=m))return"NOTE: file recognized as a script file: "+c+m+"\n";m=new J.util.JmolList;r=q?new java.util.Hashtable:
null;d=J.io2.ZipUtil.checkSpecialData(b,d);if(Clazz.instanceOf(d,String))return d;var u=d;try{if(null!=u){var s=new java.io.BufferedReader(new java.io.StringReader(u.toString()));if(g)return s;d=a.getAtomSetCollectionFromReader(c,s,e);return Clazz.instanceOf(d,String)?d:Clazz.instanceOf(d,J.adapter.smarter.AtomSetCollection)?(c=d,null!=c.errorMessage?k?null:c.errorMessage:c):k?null:"unknown reader error"}Clazz.instanceOf(b,java.io.BufferedInputStream)&&(b=J.io.JmolBinary.checkPngZipStream(b));var t=
J.io.JmolBinary.newZipInputStream(b),w;for(q&&(p="|"+p.$replace("\r","|").$replace("\n","|")+"|");null!=(w=t.getNextEntry())&&(0>=n||m.size()<n);)if(!w.isDirectory()){var y=w.getName();if(null==l||y.equals(l))if(null!=l&&e.put("subFileName",l),!(J.io2.ZipUtil.isJmolManifest(y)||q&&v==0<=p.indexOf("|"+y+"|"))){var x=J.io.JmolBinary.getStreamBytes(t,w.getSize());if(J.io.JmolBinary.isZipFile(x)){var A=new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(x)),D=J.io.JmolBinary.getZipDirectoryAndClose(A,
!0),A=new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(x)),z=this.getAtomSetCollectionOrBufferedReaderFromZip(a,A,c+"|"+y,D,e,++f,g,h);if(Clazz.instanceOf(z,String)){if(!k)return z}else if(Clazz.instanceOf(z,J.adapter.smarter.AtomSetCollection)||Clazz.instanceOf(z,J.util.JmolList))q&&!v?r.put(y,z):m.addLast(z);else{if(Clazz.instanceOf(z,java.io.BufferedReader))return j&&t.close(),z;if(!k)return t.close(),"unknown zip reader error"}}else{if(h){if(J.io.JmolBinary.isGzipB(x))return this.getGzippedInputStream(x);
A=new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(x));j&&t.close();return A}var E;if(J.io.JmolBinary.isCompoundDocumentArray(x)){var G=J.api.Interface.getInterface("jmol.util.CompoundDocument");G.setStream(new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(x)),!0);E=G.getAllDataFiles("Molecule","Input").toString()}else E=J.io.JmolBinary.isGzipB(x)?J.io.JmolBinary.getGzippedBytesAsString(x):J.io.JmolBinary.fixUTF(x);s=new java.io.BufferedReader(new java.io.StringReader(E));
if(g)return j&&t.close(),s;var I=c+"|"+w.getName();d=a.getAtomSetCollectionFromReader(I,s,e);if(!Clazz.instanceOf(d,J.adapter.smarter.AtomSetCollection)){if(k)continue;t.close();return""+d}q&&!v?r.put(y,d):m.addLast(d);b=d;if(null!=b.errorMessage&&!k)return t.close(),b.errorMessage}}}j&&t.close();if(q&&!v){var H=J.util.TextFormat.split(p,"|");for(a=0;a<H.length;a++){var C=H[a];0==C.length||0==C.indexOf("#")||(r.containsKey(C)?m.addLast(r.get(C)):J.util.Logger.debugging&&J.util.Logger.info("manifested file "+
C+" was not found in "+c))}}if(!j)return m;var F=new J.adapter.smarter.AtomSetCollection("Array",null,null,m);return null!=F.errorMessage?k?null:F.errorMessage:0<n&&n<=m.size()?m.get(n-1):F}catch(B){if(Clazz.exceptionOf(B,Exception)){if(k)return null;J.util.Logger.error(""+B);return""+B}if(Clazz.exceptionOf(B,Error))return J.util.Logger.errorEx(null,B),""+B;throw B;}},"J.api.JmolAdapter,java.io.InputStream,~S,~A,java.util.Map,~N,~B,~B");c$.checkSpecialData=$_M(c$,"checkSpecialData",($fz=function(a,
b){for(var c=!1,d=1;d<b.length;d++)if(b[d].endsWith(".spardir/")||0<=b[d].indexOf("_spartandir")){c=!0;break}if(!c)return null;c=new J.util.SB;c.append("Zip File Directory: ").append("\n").append(J.util.Escape.eAS(b,!0)).append("\n");var e=new java.util.Hashtable;J.io2.ZipUtil.getAllZipDataStatic(a,[],"","Molecule",e);var d="|",f=e.get(d+"output");null==f&&(f=e.get((d="|"+b[1])+"output"));c.append(f);f=J.io2.ZipUtil.getSpartanFileList(d,J.io2.ZipUtil.getSpartanDirs(f));for(d=2;d<f.length;d++){var g=
f[d];e.containsKey(g)?c.append(e.get(g)):c.append(g+"\n")}return c},$fz.isPrivate=!0,$fz),"java.io.InputStream,~A");Clazz.overrideMethod(c$,"spartanFileList",function(a,b){var c=J.io2.ZipUtil.getSpartanDirs(b);if(0==c.length&&a.endsWith(".spardir.zip")&&0<=b.indexOf(".zip|output")){var c=a.$replace("\\","/"),d=a.lastIndexOf(".spardir"),d=c.lastIndexOf("/"),c=a+"|"+a.substring(d+1,a.length-4);return["SpartanSmol",c,c+"/output"]}return J.io2.ZipUtil.getSpartanFileList(a,c)},"~S,~S");c$.getSpartanDirs=
$_M(c$,"getSpartanDirs",($fz=function(a){if(null==a)return[];if(a.startsWith("java.io.FileNotFoundException")||a.startsWith("FILE NOT FOUND")||0<=a.indexOf("<html"))return["M0001"];var b=new J.util.JmolList,c,d="";try{for(var e=new java.util.StringTokenizer(a," \t\r\n");e.hasMoreTokens();)(c=e.nextToken()).equals(")")?b.addLast(d):c.equals("Start-")&&e.nextToken().equals("Molecule")&&b.addLast(J.util.TextFormat.split(e.nextToken(),'"')[1]),d=c}catch(f){if(!Clazz.exceptionOf(f,Exception))throw f;}return b.toArray(Array(b.size()))},
$fz.isPrivate=!0,$fz),"~S");c$.getSpartanFileList=$_M(c$,"getSpartanFileList",($fz=function(a,b){var c=Array(2+5*b.length);c[0]="SpartanSmol";c[1]="Directory Entry ";var d=2;a=a.$replace("\\","/");a.endsWith("/")&&(a=a.substring(0,a.length-1));for(var e=0;e<b.length;e++){var f=a+(Character.isDigit(b[e].charAt(0))?"/Profile."+b[e]:"/"+b[e]);c[d++]=f+"/#JMOL_MODEL "+b[e];c[d++]=f+"/input";c[d++]=f+"/archive";c[d++]=f+"/Molecule:asBinaryString";c[d++]=f+"/proparc"}return c},$fz.isPrivate=!0,$fz),"~S,~A");
c$.checkSpecialInZip=$_M(c$,"checkSpecialInZip",function(a){var b;return 2>a.length?null:(b=a[1]).endsWith(".spardir/")||2==a.length?["",b.endsWith("/")?b.substring(0,b.length-1):b]:null},"~A");Clazz.overrideMethod(c$,"getCachedPngjBytes",function(a,b){if(0>b.indexOf(".png"))return null;J.util.Logger.info("FileManager checking PNGJ cache for "+b);var c=J.io2.ZipUtil.shortSceneFilename(b);if(null==a.pngjCache&&!this.cachePngjFile(a,[b,null]))return null;var d=a.pngjCache,e=0<=b.indexOf(".min.");if(!e){var f=
a.getCanonicalName(J.io.JmolBinary.getZipRoot(b));if(!d.containsKey(f)&&!this.cachePngjFile(a,[b,null]))return null;0>b.indexOf("|")&&(c=f)}if(d.containsKey(c))return J.util.Logger.info("FileManager using memory cache "+c),d.get(c);for(var g,f=d.keySet().iterator();f.hasNext()&&((g=f.next())||1);)System.out.println(g);System.out.println("FileManager memory cache ("+d.size()+") did not find "+b+" as "+c);if(!e||!this.cachePngjFile(a,[b,null]))return null;J.util.Logger.info("FileManager using memory cache "+
c);return d.get(c)},"J.viewer.FileManager,~S");Clazz.overrideMethod(c$,"cachePngjFile",function(a,b){var c=a.pngjCache=new java.util.Hashtable;b[1]=null;if(null==b[0])return!1;b[0]=J.io.JmolBinary.getZipRoot(b[0]);var d=J.io2.ZipUtil.shortSceneFilename(b[0]);try{b[1]=this.cacheZipContents(J.io.JmolBinary.checkPngZipStream(a.getBufferedInputStreamOrErrorMessageFromName(b[0],null,!1,!1,null,!1)),d,a.pngjCache)}catch(e){if(Clazz.exceptionOf(e,Exception))return!1;throw e;}if(null==b[1])return!1;var f=
b[1].getBytes();c.put(a.getCanonicalName(b[0]),f);0<=d.indexOf("_scene_")&&(c.put(J.io2.ZipUtil.shortSceneFilename(b[0]),f),f=c.remove(d+"|state.spt"),null!=f&&c.put(J.io2.ZipUtil.shortSceneFilename(b[0]+"|state.spt"),f));for(var g,c=c.keySet().iterator();c.hasNext()&&((g=c.next())||1);)System.out.println(g);return!0},"J.viewer.FileManager,~A");c$.shortSceneFilename=$_M(c$,"shortSceneFilename",($fz=function(a){var b=a.indexOf("_scene_")+7;if(7>b)return a;var c="";if(a.endsWith("|state.spt")){c=a.indexOf(".",
b);if(0>c)return a;c=a.substring(b,c)}var d=a.lastIndexOf("|");return a.substring(0,b)+c+(0<d?a.substring(d):"")},$fz.isPrivate=!0,$fz),"~S");Clazz.defineStatics(c$,"SCENE_TAG","###scene.spt###")});
Clazz.load(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.OutOfMemoryError","J.util.ArrayUtil"],function(){c$=Clazz.decorateAsClass(function(){this.buf=null;this.count=0;Clazz.instantialize(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);Clazz.makeConstructor(c$,function(){this.construct(32)});Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.io.ByteArrayOutputStream,[]);if(0>
a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=Clazz.newByteArray(a,0)},"~N");$_M(c$,"ensureCapacity",($fz=function(a){0<a-this.buf.length&&this.grow(a)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"grow",($fz=function(a){var b=this.buf.length<<1;0>b-a&&(b=a);if(0>b){if(0>a)throw new OutOfMemoryError;b=2147483647}this.buf=J.util.ArrayUtil.arrayCopyByte(this.buf,b)},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);
this.buf[this.count]=a;this.count+=1},"~N");$_M(c$,"write",function(a,b,c){if(0>b||b>a.length||0>c||0<b+c-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+c);System.arraycopy(a,b,this.buf,this.count,c);this.count+=c},"~A,~N,~N");$_M(c$,"writeTo",function(a){a.write(this.buf,0,this.count)},"java.io.OutputStream");$_M(c$,"reset",function(){this.count=0});$_M(c$,"toByteArray",function(){return this.count==this.buf.length?this.buf:J.util.ArrayUtil.arrayCopyByte(this.buf,this.count)});
$_M(c$,"size",function(){return this.count});Clazz.overrideMethod(c$,"toString",function(){return String.instantialize(this.buf,0,this.count)});Clazz.overrideMethod(c$,"close",function(){})});
$_L(["java.io.Closeable","$.InputStream"],"java.io.FileInputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=$_C(function(){this.fd=null;this.innerFD=!1;$_Z(this,arguments)},java.io,"FileInputStream",java.io.InputStream,java.io.Closeable);$_K(c$,function(){$_R(this,java.io.FileInputStream)},"java.io.File");$_K(c$,function(a){$_R(this,java.io.FileInputStream);if(null==a)throw new NullPointerException;},"java.io.FileDescriptor");$_K(c$,function(){this.construct(null)},
"~S");$_V(c$,"available",function(){return 0});$_V(c$,"close",function(){});$_V(c$,"finalize",function(){this.close()});$_M(c$,"getFD",function(){return this.fd});$_M(c$,"read",function(){var a=$_A(1,0);return-1==this.read(a,0,1)?-1:a[0]&255});$_M(c$,"read",function(a){return this.read(a,0,a.length)},"~A");$_M(c$,"read",function(a,b,c){if(c>a.length-b||0>c||0>b)throw new IndexOutOfBoundsException;return 0},"~A,~N,~N");$_V(c$,"skip",function(){return 0},"~N")});Clazz.declarePackage("JZ");
Clazz.declareInterface(JZ,"Checksum");Clazz.declarePackage("JZ");
Clazz.load(["JZ.Checksum"],"JZ.CRC32",null,function(){c$=Clazz.decorateAsClass(function(){this.crc=0;this.b1=null;Clazz.instantialize(this,arguments)},JZ,"CRC32",null,JZ.Checksum);Clazz.prepareFields(c$,function(){this.b1=Clazz.newByteArray(1,0)});Clazz.overrideMethod(c$,"update",function(a,b,c){for(var d=~this.crc;0<=--c;)d=JZ.CRC32.crc_table[(d^a[b++])&255]^d>>>8;this.crc=~d},"~A,~N,~N");Clazz.overrideMethod(c$,"reset",function(){this.crc=0});Clazz.overrideMethod(c$,"resetLong",function(a){this.crc=
a&4294967295},"~N");Clazz.overrideMethod(c$,"getValue",function(){return this.crc&4294967295});Clazz.overrideMethod(c$,"updateByteAsInt",function(a){this.b1[0]=a;this.update(this.b1,0,1)},"~N");Clazz.defineStatics(c$,"crc_table",[0,1996959894,-301047508,-1727442502,124634137,1886057615,-379345611,-1637575261,249268274,2044508324,-522852066,-1747789432,162941995,2125561021,-407360249,-1866523247,498536548,1789927666,-205950648,-2067906082,450548861,1843258603,-187386543,-2083289657,325883990,1684777152,
-43845254,-1973040660,335633487,1661365465,-99664541,-1928851979,997073096,1281953886,-715111964,-1570279054,1006888145,1258607687,-770865667,-1526024853,901097722,1119000684,-608450090,-1396901568,853044451,1172266101,-589951537,-1412350631,651767980,1373503546,-925412992,-1076862698,565507253,1454621731,-809855591,-1195530993,671266974,1594198024,-972236366,-1324619484,795835527,1483230225,-1050600021,-1234817731,1994146192,31158534,-1731059524,-271249366,1907459465,112637215,-1614814043,-390540237,
2013776290,251722036,-1777751922,-519137256,2137656763,141376813,-1855689577,-429695999,1802195444,476864866,-2056965928,-228458418,1812370925,453092731,-2113342271,-183516073,1706088902,314042704,-1950435094,-54949764,1658658271,366619977,-1932296973,-69972891,1303535960,984961486,-1547960204,-725929758,1256170817,1037604311,-1529756563,-740887301,1131014506,879679996,-1385723834,-631195440,1141124467,855842277,-1442165665,-586318647,1342533948,654459306,-1106571248,-921952122,1466479909,544179635,
-1184443383,-832445281,1591671054,702138776,-1328506846,-942167884,1504918807,783551873,-1212326853,-1061524307,-306674912,-1698712650,62317068,1957810842,-355121351,-1647151185,81470997,1943803523,-480048366,-1805370492,225274430,2053790376,-468791541,-1828061283,167816743,2097651377,-267414716,-2029476910,503444072,1762050814,-144550051,-2140837941,426522225,1852507879,-19653770,-1982649376,282753626,1742555852,-105259153,-1900089351,397917763,1622183637,-690576408,-1580100738,953729732,1340076626,
-776247311,-1497606297,1068828381,1219638859,-670225446,-1358292148,906185462,1090812512,-547295293,-1469587627,829329135,1181335161,-882789492,-1134132454,628085408,1382605366,-871598187,-1156888829,570562233,1426400815,-977650754,-1296233688,733239954,1555261956,-1026031705,-1244606671,752459403,1541320221,-1687895376,-328994266,1969922972,40735498,-1677130071,-351390145,1913087877,83908371,-1782625662,-491226604,2075208622,213261112,-1831694693,-438977011,2094854071,198958881,-2032938284,-237706686,
1759359992,534414190,-2118248755,-155638181,1873836001,414664567,-2012718362,-15766928,1711684554,285281116,-1889165569,-127750551,1634467795,376229701,-1609899400,-686959890,1308918612,956543938,-1486412191,-799009033,1231636301,1047427035,-1362007478,-640263460,1088359270,936918E3,-1447252397,-558129467,1202900863,817233897,-1111625188,-893730166,1404277552,615818150,-1160759803,-841546093,1423857449,601450431,-1285129682,-1000256840,1567103746,711928724,-1274298825,-1022587231,1510334235,755167117])});
Clazz.declarePackage("java.util.zip");Clazz.load(["JZ.CRC32"],"java.util.zip.CRC32",null,function(){c$=Clazz.declareType(java.util.zip,"CRC32",JZ.CRC32)});Clazz.declarePackage("JZ");
Clazz.load(["java.io.FilterInputStream"],"JZ.InflaterInputStream",["java.io.EOFException","$.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=Clazz.decorateAsClass(function(){this.buf=this.inflater=null;this.len=0;this.eof=this.closed=!1;this.close_in=!0;this.myinflater=!1;this.b=this.byte1=null;Clazz.instantialize(this,arguments)},JZ,"InflaterInputStream",java.io.FilterInputStream);Clazz.prepareFields(c$,function(){this.byte1=
Clazz.newByteArray(1,0);this.b=Clazz.newByteArray(512,0)});Clazz.makeConstructor(c$,function(a,b,c,d){Clazz.superConstructor(this,JZ.InflaterInputStream,[a]);this.inflater=b;this.buf=Clazz.newByteArray(c,0);this.close_in=d},"java.io.InputStream,JZ.Inflater,~N,~B");Clazz.overrideMethod(c$,"readByteAsInt",function(){if(this.closed)throw new java.io.IOException("Stream closed");return-1==this.read(this.byte1,0,1)?-1:this.byte1[0]&255});Clazz.overrideMethod(c$,"read",function(a,b,c){return this.readInf(a,
b,c)},"~A,~N,~N");$_M(c$,"readInf",function(a,b,c){if(this.closed)throw new java.io.IOException("Stream closed");if(null==a)throw new NullPointerException;if(0>b||0>c||c>a.length-b)throw new IndexOutOfBoundsException;if(0==c)return 0;if(this.eof)return-1;var d=0;for(this.inflater.setOutput(a,b,c);!this.eof;){0==this.inflater.avail_in&&this.fill();a=this.inflater.inflate(0);d+=this.inflater.next_out_index-b;b=this.inflater.next_out_index;switch(a){case -3:throw new java.io.IOException(this.inflater.msg);
case 1:case 2:if(this.eof=!0,2==a)return-1}if(0==this.inflater.avail_out)break}return d},"~A,~N,~N");Clazz.overrideMethod(c$,"available",function(){if(this.closed)throw new java.io.IOException("Stream closed");return this.eof?0:1});Clazz.overrideMethod(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("negative skip length");if(this.closed)throw new java.io.IOException("Stream closed");a=Math.min(a,2147483647);for(var b=0;b<a;){var c=a-b;c>this.b.length&&(c=this.b.length);c=this.read(this.b,
0,c);if(-1==c){this.eof=!0;break}b+=c}return b},"~N");Clazz.overrideMethod(c$,"close",function(){this.closed||(this.myinflater&&this.inflater.end(),this.close_in&&this.$in.close(),this.closed=!0)});$_M(c$,"fill",function(){if(this.closed)throw new java.io.IOException("Stream closed");this.len=this.$in.read(this.buf,0,this.buf.length);if(-1==this.len)if(0==this.inflater.istate.wrap&&!this.inflater.finished())this.buf[0]=0,this.len=1;else{if(-1!=this.inflater.istate.was)throw new java.io.IOException("footer is not found");
throw new java.io.EOFException("Unexpected end of ZLIB input stream");}this.inflater.setInput(this.buf,0,this.len,!0)});Clazz.overrideMethod(c$,"markSupported",function(){return!1});Clazz.overrideMethod(c$,"mark",function(){},"~N");Clazz.overrideMethod(c$,"reset",function(){throw new java.io.IOException("mark/reset not supported");});$_M(c$,"getTotalIn",function(){return this.inflater.getTotalIn()});$_M(c$,"getTotalOut",function(){return this.inflater.getTotalOut()});$_M(c$,"getAvailIn",function(){if(0>=
this.inflater.avail_in)return null;var a=Clazz.newByteArray(this.inflater.avail_in,0);System.arraycopy(this.inflater.next_in,this.inflater.next_in_index,a,0,this.inflater.avail_in);return a});$_M(c$,"readHeader",function(){var a="".getBytes();this.inflater.setInput(a,0,0,!1);this.inflater.setOutput(a,0,0);a=this.inflater.inflate(0);if(this.inflater.istate.inParsingHeader()){var b=Clazz.newByteArray(1,0);do{if(0>=this.$in.read(b,0,1))throw new java.io.IOException("no input");this.inflater.setInput(b,
0,b.length,!1);a=this.inflater.inflate(0);if(0!=a)throw new java.io.IOException(this.inflater.msg);}while(this.inflater.istate.inParsingHeader())}});$_M(c$,"getInflater",function(){return this.inflater});Clazz.defineStatics(c$,"DEFAULT_BUFSIZE",512)});Clazz.declarePackage("java.util.zip");
Clazz.load(["JZ.InflaterInputStream"],"java.util.zip.InflaterInputStream",null,function(){c$=Clazz.decorateAsClass(function(){this.inf=null;Clazz.instantialize(this,arguments)},java.util.zip,"InflaterInputStream",JZ.InflaterInputStream);Clazz.makeConstructor(c$,function(a,b,c){Clazz.superConstructor(this,java.util.zip.InflaterInputStream,[a,b,c,!0]);this.inf=b},"java.io.InputStream,java.util.zip.Inflater,~N")});Clazz.declarePackage("java.util.zip");
Clazz.load(["java.util.zip.InflaterInputStream","$.CRC32"],"java.util.zip.GZIPInputStream",["java.io.EOFException","$.IOException","java.util.zip.CheckedInputStream","$.Inflater","$.ZipException"],function(){c$=Clazz.decorateAsClass(function(){this.crc=null;this.$closed=this.eos=!1;this.tmpbuf=null;Clazz.instantialize(this,arguments)},java.util.zip,"GZIPInputStream",java.util.zip.InflaterInputStream);Clazz.prepareFields(c$,function(){this.crc=new java.util.zip.CRC32;this.tmpbuf=Clazz.newByteArray(128,
0)});$_M(c$,"ensureOpen",($fz=function(){if(this.$closed)throw new java.io.IOException("Stream closed");},$fz.isPrivate=!0,$fz));Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,java.util.zip.GZIPInputStream,[a,(new java.util.zip.Inflater).init(0,!0),b]);this.readHeader(a)},"java.io.InputStream,~N");Clazz.overrideMethod(c$,"read",function(a,b,c){this.ensureOpen();if(this.eos)return-1;var d=this.readInf(a,b,c);if(-1==d)if(this.readTrailer())this.eos=!0;else return this.read(a,b,c);
else this.crc.update(a,b,d);return d},"~A,~N,~N");$_M(c$,"close",function(){this.$closed||(Clazz.superCall(this,java.util.zip.GZIPInputStream,"close",[]),this.$closed=this.eos=!0)});$_M(c$,"readHeader",($fz=function(a){a=new java.util.zip.CheckedInputStream(a,this.crc);this.crc.reset();if(35615!=this.readUShort(a))throw new java.util.zip.ZipException("Not in GZIP format");if(8!=this.readUByte(a))throw new java.util.zip.ZipException("Unsupported compression method");var b=this.readUByte(a);this.skipBytes(a,
6);var c=10;if(4==(b&4)){var d=this.readUShort(a);this.skipBytes(a,d);c+=d+2}if(8==(b&8)){do c++;while(0!=this.readUByte(a))}if(16==(b&16)){do c++;while(0!=this.readUByte(a))}if(2==(b&2)){b=this.crc.getValue()&65535;if(this.readUShort(a)!=b)throw new java.util.zip.ZipException("Corrupt GZIP header");c+=2}this.crc.reset();return c},$fz.isPrivate=!0,$fz),"java.io.InputStream");$_M(c$,"readTrailer",($fz=function(){return!0},$fz.isPrivate=!0,$fz));$_M(c$,"readUShort",($fz=function(a){var b=this.readUByte(a);
return this.readUByte(a)<<8|b},$fz.isPrivate=!0,$fz),"java.io.InputStream");$_M(c$,"readUByte",($fz=function(a){a=a.readByteAsInt();if(-1==a)throw new java.io.EOFException;if(-1>a||255<a)throw new java.io.IOException(this.$in.getClass().getName()+".read() returned value out of range -1..255: "+a);return a},$fz.isPrivate=!0,$fz),"java.io.InputStream");$_M(c$,"skipBytes",($fz=function(a,b){for(;0<b;){var c=a.read(this.tmpbuf,0,b<this.tmpbuf.length?b:this.tmpbuf.length);if(-1==c)throw new java.io.EOFException;
b-=c}},$fz.isPrivate=!0,$fz),"java.io.InputStream,~N");Clazz.defineStatics(c$,"GZIP_MAGIC",35615,"FHCRC",2,"FEXTRA",4,"FNAME",8,"FCOMMENT",16)});Clazz.declarePackage("JZ");
Clazz.load(null,"JZ.ZStream",["JZ.Adler32"],function(){c$=Clazz.decorateAsClass(function(){this.next_in=null;this.total_in=this.avail_in=this.next_in_index=0;this.next_out=null;this.total_out=this.avail_out=this.next_out_index=0;this.istate=this.dstate=this.msg=null;this.data_type=0;this.checksum=null;Clazz.instantialize(this,arguments)},JZ,"ZStream");$_M(c$,"setAdler32",function(){this.checksum=new JZ.Adler32});$_M(c$,"inflate",function(a){return null==this.istate?-2:this.istate.inflate(a)},"~N");
$_M(c$,"deflate",function(a){return null==this.dstate?-2:this.dstate.deflate(a)},"~N");$_M(c$,"flush_pending",function(){var a=this.dstate.pending;a>this.avail_out&&(a=this.avail_out);0!=a&&(System.arraycopy(this.dstate.pending_buf,this.dstate.pending_out,this.next_out,this.next_out_index,a),this.next_out_index+=a,this.dstate.pending_out+=a,this.total_out+=a,this.avail_out-=a,this.dstate.pending-=a,0==this.dstate.pending&&(this.dstate.pending_out=0))});$_M(c$,"read_buf",function(a,b,c){var d=this.avail_in;
d>c&&(d=c);if(0==d)return 0;this.avail_in-=d;0!=this.dstate.wrap&&this.checksum.update(this.next_in,this.next_in_index,d);System.arraycopy(this.next_in,this.next_in_index,a,b,d);this.next_in_index+=d;this.total_in+=d;return d},"~A,~N,~N");$_M(c$,"getAdler",function(){return this.checksum.getValue()});$_M(c$,"free",function(){this.msg=this.next_out=this.next_in=null});$_M(c$,"setOutput",function(a,b,c){this.next_out=a;this.next_out_index=b;this.avail_out=c},"~A,~N,~N");$_M(c$,"setInput",function(a,
b,c,d){0>=c&&d&&null!=this.next_in||(0<this.avail_in&&d?(d=Clazz.newByteArray(this.avail_in+c,0),System.arraycopy(this.next_in,this.next_in_index,d,0,this.avail_in),System.arraycopy(a,b,d,this.avail_in,c),this.next_in=d,this.next_in_index=0,this.avail_in+=c):(this.next_in=a,this.next_in_index=b,this.avail_in=c))},"~A,~N,~N,~B");$_M(c$,"getAvailIn",function(){return this.avail_in});$_M(c$,"getTotalOut",function(){return this.total_out});$_M(c$,"getTotalIn",function(){return this.total_in});c$.getBytes=
$_M(c$,"getBytes",function(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);127>=d?b.push(d):2047>=d?(b.push(192|d>>6&31),b.push(128|d&63)):65535>=d?(b.push(224|d>>12&15),b.push(128|d>>6&63),b.push(128|d&63)):b.push(63)}return Int32Array!=Array?new Int32Array(b):b},"~S");Clazz.defineStatics(c$,"Z_STREAM_ERROR",-2)});Clazz.declarePackage("JZ");
Clazz.load(["JZ.ZStream"],"JZ.Inflater",["JZ.Inflate"],function(){c$=Clazz.declareType(JZ,"Inflater",JZ.ZStream);$_M(c$,"init",function(a,b){this.setAdler32();0==a&&(a=15);this.istate=new JZ.Inflate(this);this.istate.inflateInit(b?-a:a);return this},"~N,~B");Clazz.overrideMethod(c$,"inflate",function(a){return null==this.istate?-2:this.istate.inflate(a)},"~N");Clazz.overrideMethod(c$,"end",function(){return null==this.istate?-2:this.istate.inflateEnd()});$_M(c$,"sync",function(){return null==this.istate?
-2:this.istate.inflateSync()});$_M(c$,"syncPoint",function(){return null==this.istate?-2:this.istate.inflateSyncPoint()});$_M(c$,"setDictionary",function(a,b){return null==this.istate?-2:this.istate.inflateSetDictionary(a,b)},"~A,~N");Clazz.overrideMethod(c$,"finished",function(){return 12==this.istate.mode});$_M(c$,"reset",function(){this.avail_in=0;null!=this.istate&&this.istate.reset()});Clazz.defineStatics(c$,"MAX_WBITS",15,"DEF_WBITS",15,"$Z_STREAM_ERROR",-2)});Clazz.declarePackage("JZ");
Clazz.load(["JZ.Checksum"],"JZ.Adler32",null,function(){c$=Clazz.decorateAsClass(function(){this.s1=1;this.s2=0;this.b1=null;Clazz.instantialize(this,arguments)},JZ,"Adler32",null,JZ.Checksum);Clazz.prepareFields(c$,function(){this.b1=Clazz.newByteArray(1,0)});Clazz.overrideMethod(c$,"resetLong",function(a){this.s1=a&65535;this.s2=a>>16&65535},"~N");Clazz.overrideMethod(c$,"reset",function(){this.s1=1;this.s2=0});Clazz.overrideMethod(c$,"getValue",function(){return this.s2<<16|this.s1});Clazz.overrideMethod(c$,
"update",function(a,b,c){if(1==c)this.s1+=a[b++]&255,this.s2+=this.s1;else{for(var d=Clazz.doubleToInt(c/5552),e=c%5552;0<d--;){var f=5552;for(c-=f;0<f--;)this.s1+=a[b++]&255,this.s2+=this.s1;this.s1%=65521;this.s2%=65521}for(f=e;0<f--;)this.s1+=a[b++]&255,this.s2+=this.s1}this.s1%=65521;this.s2%=65521},"~A,~N,~N");Clazz.overrideMethod(c$,"updateByteAsInt",function(a){this.b1[0]=a;this.update(this.b1,0,1)},"~N");Clazz.defineStatics(c$,"BASE",65521,"NMAX",5552)});Clazz.declarePackage("JZ");
c$=Clazz.decorateAsClass(function(){this.dyn_tree=null;this.max_code=0;this.stat_desc=null;Clazz.instantialize(this,arguments)},JZ,"Tree");c$.d_code=$_M(c$,"d_code",function(a){return 256>a?JZ.Tree._dist_code[a]:JZ.Tree._dist_code[256+(a>>>7)]},"~N");
$_M(c$,"gen_bitlen",function(a){var b=this.dyn_tree,c=this.stat_desc.static_tree,d=this.stat_desc.extra_bits,e=this.stat_desc.extra_base,f=this.stat_desc.max_length,g,h,j,k,l,n=0;for(j=0;15>=j;j++)a.bl_count[j]=0;b[2*a.heap[a.heap_max]+1]=0;for(g=a.heap_max+1;573>g;g++)h=a.heap[g],j=b[2*b[2*h+1]+1]+1,j>f&&(j=f,n++),b[2*h+1]=j,h>this.max_code||(a.bl_count[j]++,k=0,h>=e&&(k=d[h-e]),l=b[2*h],a.opt_len+=l*(j+k),null!=c&&(a.static_len+=l*(c[2*h+1]+k)));if(0!=n){do{for(j=f-1;0==a.bl_count[j];)j--;a.bl_count[j]--;
a.bl_count[j+1]+=2;a.bl_count[f]--;n-=2}while(0<n);for(j=f;0!=j;j--)for(h=a.bl_count[j];0!=h;)c=a.heap[--g],c>this.max_code||(b[2*c+1]!=j&&(a.opt_len+=(j-b[2*c+1])*b[2*c],b[2*c+1]=j),h--)}},"JZ.Deflate");
$_M(c$,"build_tree",function(a){var b=this.dyn_tree,c=this.stat_desc.static_tree,d=this.stat_desc.elems,e,f=-1,g;a.heap_len=0;a.heap_max=573;for(e=0;e<d;e++)0!=b[2*e]?(a.heap[++a.heap_len]=f=e,a.depth[e]=0):b[2*e+1]=0;for(;2>a.heap_len;)g=a.heap[++a.heap_len]=2>f?++f:0,b[2*g]=1,a.depth[g]=0,a.opt_len--,null!=c&&(a.static_len-=c[2*g+1]);this.max_code=f;for(e=Clazz.doubleToInt(a.heap_len/2);1<=e;e--)a.pqdownheap(b,e);g=d;do e=a.heap[1],a.heap[1]=a.heap[a.heap_len--],a.pqdownheap(b,1),c=a.heap[1],a.heap[--a.heap_max]=
e,a.heap[--a.heap_max]=c,b[2*g]=b[2*e]+b[2*c],a.depth[g]=Math.max(a.depth[e],a.depth[c])+1,b[2*e+1]=b[2*c+1]=g,a.heap[1]=g++,a.pqdownheap(b,1);while(2<=a.heap_len);a.heap[--a.heap_max]=a.heap[1];this.gen_bitlen(a);JZ.Tree.gen_codes(b,f,a.bl_count)},"JZ.Deflate");c$.gen_codes=$_M(c$,"gen_codes",function(a,b,c){var d=0,e;JZ.Tree.next_code[0]=0;for(e=1;15>=e;e++)JZ.Tree.next_code[e]=d=d+c[e-1]<<1;for(c=0;c<=b;c++)d=a[2*c+1],0!=d&&(a[2*c]=JZ.Tree.bi_reverse(JZ.Tree.next_code[d]++,d))},"~A,~N,~A");
c$.bi_reverse=$_M(c$,"bi_reverse",function(a,b){var c=0;do c|=a&1,a>>>=1,c<<=1;while(0<--b);return c>>>1},"~N,~N");
Clazz.defineStatics(c$,"MAX_BITS",15,"LITERALS",256,"LENGTH_CODES",29,"L_CODES",286,"HEAP_SIZE",573,"MAX_BL_BITS",7,"END_BLOCK",256,"REP_3_6",16,"REPZ_3_10",17,"REPZ_11_138",18,"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],"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],"extra_blbits",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],"bl_order",[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],"Buf_size",16,"DIST_CODE_LEN",512,"_dist_code",[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],"_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],"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],"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],"next_code",Clazz.newShortArray(16,
0));Clazz.declarePackage("JZ");
Clazz.load(["JZ.Tree"],"JZ.StaticTree",null,function(){c$=Clazz.decorateAsClass(function(){this.extra_bits=this.static_tree=null;this.max_length=this.elems=this.extra_base=0;Clazz.instantialize(this,arguments)},JZ,"StaticTree");Clazz.makeConstructor(c$,($fz=function(a,b,c,d,e){this.static_tree=a;this.extra_bits=b;this.extra_base=c;this.elems=d;this.max_length=e},$fz.isPrivate=!0,$fz),"~A,~A,~N,~N,~N");Clazz.defineStatics(c$,"MAX_BITS",15,"BL_CODES",19,"D_CODES",30,"LITERALS",256,"LENGTH_CODES",29,
"L_CODES",286,"MAX_BL_BITS",7,"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],"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]);c$.static_l_desc=c$.prototype.static_l_desc=new JZ.StaticTree(JZ.StaticTree.static_ltree,JZ.Tree.extra_lbits,257,286,15);c$.static_d_desc=c$.prototype.static_d_desc=new JZ.StaticTree(JZ.StaticTree.static_dtree,
JZ.Tree.extra_dbits,0,30,15);c$.static_bl_desc=c$.prototype.static_bl_desc=new JZ.StaticTree(null,JZ.Tree.extra_blbits,0,19,7)});Clazz.declarePackage("JZ");
Clazz.load(["JZ.Tree"],"JZ.Deflate",["JZ.CRC32","$.GZIPHeader","$.StaticTree"],function(){c$=Clazz.decorateAsClass(function(){this.strm=null;this.status=0;this.pending_buf=null;this.pending=this.pending_out=this.pending_buf_size=0;this.wrap=1;this.w_mask=this.w_bits=this.w_size=this.last_flush=this.method=this.data_type=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=
this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.heap=this.bl_count=this.bl_desc=this.d_desc=this.l_desc=this.bl_tree=this.dyn_dtree=this.dyn_ltree=null;this.heap_max=this.heap_len=0;this.depth=null;this.bi_valid=this.bi_buf=this.last_eob_len=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0;this.gheader=
null;Clazz.instantialize(this,arguments)},JZ,"Deflate");Clazz.prepareFields(c$,function(){this.l_desc=new JZ.Tree;this.d_desc=new JZ.Tree;this.bl_desc=new JZ.Tree;this.bl_count=Clazz.newShortArray(16,0);this.heap=Clazz.newIntArray(573,0);this.depth=Clazz.newByteArray(573,0)});Clazz.makeConstructor(c$,function(a){this.strm=a;this.dyn_ltree=Clazz.newShortArray(1146,0);this.dyn_dtree=Clazz.newShortArray(122,0);this.bl_tree=Clazz.newShortArray(78,0)},"JZ.ZStream");$_M(c$,"deflateInit",function(a){return this.deflateInit2(a,
15)},"~N");$_M(c$,"deflateInit2",function(a,b){return this.deflateInit5(a,8,b,8,0)},"~N,~N");$_M(c$,"deflateInit3",function(a,b,c){return this.deflateInit5(a,8,b,c,0)},"~N,~N,~N");$_M(c$,"lm_init",function(){this.window_size=2*this.w_size;for(var a=this.head[this.hash_size-1]=0;a<this.hash_size-1;a++)this.head[a]=0;this.max_lazy_match=JZ.Deflate.config_table[this.level].max_lazy;this.good_match=JZ.Deflate.config_table[this.level].good_length;this.nice_match=JZ.Deflate.config_table[this.level].nice_length;
this.max_chain_length=JZ.Deflate.config_table[this.level].max_chain;this.lookahead=this.block_start=this.strstart=0;this.match_length=this.prev_length=2;this.ins_h=this.match_available=0});$_M(c$,"tr_init",function(){this.l_desc.dyn_tree=this.dyn_ltree;this.l_desc.stat_desc=JZ.StaticTree.static_l_desc;this.d_desc.dyn_tree=this.dyn_dtree;this.d_desc.stat_desc=JZ.StaticTree.static_d_desc;this.bl_desc.dyn_tree=this.bl_tree;this.bl_desc.stat_desc=JZ.StaticTree.static_bl_desc;this.bi_valid=this.bi_buf=
0;this.last_eob_len=8;this.init_block()});$_M(c$,"init_block",function(){for(var a=0;286>a;a++)this.dyn_ltree[2*a]=0;for(a=0;30>a;a++)this.dyn_dtree[2*a]=0;for(a=0;19>a;a++)this.bl_tree[2*a]=0;this.dyn_ltree[512]=1;this.last_lit=this.matches=this.opt_len=this.static_len=0});$_M(c$,"pqdownheap",function(a,b){for(var c=this.heap[b],d=b<<1;d<=this.heap_len;){d<this.heap_len&&JZ.Deflate.smaller(a,this.heap[d+1],this.heap[d],this.depth)&&d++;if(JZ.Deflate.smaller(a,c,this.heap[d],this.depth))break;this.heap[b]=
this.heap[d];b=d;d<<=1}this.heap[b]=c},"~A,~N");c$.smaller=$_M(c$,"smaller",function(a,b,c,d){var e=a[2*b];a=a[2*c];return e<a||e==a&&d[b]<=d[c]},"~A,~N,~N,~A");$_M(c$,"scan_tree",function(a,b){var c,d=-1,e,f=a[1],g=0,h=7,j=4;0==f&&(h=138,j=3);a[2*(b+1)+1]=65535;for(c=0;c<=b;c++)e=f,f=a[2*(c+1)+1],++g<h&&e==f||(g<j?this.bl_tree[2*e]+=g:0!=e?(e!=d&&this.bl_tree[2*e]++,this.bl_tree[32]++):10>=g?this.bl_tree[34]++:this.bl_tree[36]++,g=0,d=e,0==f?(h=138,j=3):e==f?(h=6,j=3):(h=7,j=4))},"~A,~N");$_M(c$,
"build_bl_tree",function(){var a;this.scan_tree(this.dyn_ltree,this.l_desc.max_code);this.scan_tree(this.dyn_dtree,this.d_desc.max_code);this.bl_desc.build_tree(this);for(a=18;3<=a&&0==this.bl_tree[2*JZ.Tree.bl_order[a]+1];a--);this.opt_len+=3*(a+1)+14;return a});$_M(c$,"send_all_trees",function(a,b,c){var d;this.send_bits(a-257,5);this.send_bits(b-1,5);this.send_bits(c-4,4);for(d=0;d<c;d++)this.send_bits(this.bl_tree[2*JZ.Tree.bl_order[d]+1],3);this.send_tree(this.dyn_ltree,a-1);this.send_tree(this.dyn_dtree,
b-1)},"~N,~N,~N");$_M(c$,"send_tree",function(a,b){var c,d=-1,e,f=a[1],g=0,h=7,j=4;0==f&&(h=138,j=3);for(c=0;c<=b;c++)if(e=f,f=a[2*(c+1)+1],!(++g<h&&e==f)){if(g<j){do this.send_code(e,this.bl_tree);while(0!=--g)}else 0!=e?(e!=d&&(this.send_code(e,this.bl_tree),g--),this.send_code(16,this.bl_tree),this.send_bits(g-3,2)):10>=g?(this.send_code(17,this.bl_tree),this.send_bits(g-3,3)):(this.send_code(18,this.bl_tree),this.send_bits(g-11,7));g=0;d=e;0==f?(h=138,j=3):e==f?(h=6,j=3):(h=7,j=4)}},"~A,~N");
$_M(c$,"put_byte",function(a,b,c){System.arraycopy(a,b,this.pending_buf,this.pending,c);this.pending+=c},"~A,~N,~N");$_M(c$,"put_byteB",function(a){this.pending_buf[this.pending++]=a&255},"~N");$_M(c$,"put_short",function(a){this.put_byteB(a);this.put_byteB(a>>>8)},"~N");$_M(c$,"putShortMSB",function(a){this.put_byteB(a>>8);this.put_byteB(a)},"~N");$_M(c$,"send_code",function(a,b){var c=2*a;this.send_bits(b[c]&65535,b[c+1]&65535)},"~N,~A");$_M(c$,"send_bits",function(a,b){this.bi_valid>16-b?(this.bi_buf|=
a<<this.bi_valid&65535,this.put_short(this.bi_buf),this.bi_buf=a>>>16-this.bi_valid&65535,this.bi_valid+=b-16):(this.bi_buf|=a<<this.bi_valid&65535,this.bi_valid+=b)},"~N,~N");$_M(c$,"_tr_align",function(){this.send_bits(2,3);this.send_code(256,JZ.StaticTree.static_ltree);this.bi_flush();9>1+this.last_eob_len+10-this.bi_valid&&(this.send_bits(2,3),this.send_code(256,JZ.StaticTree.static_ltree),this.bi_flush());this.last_eob_len=7});$_M(c$,"_tr_tally",function(a,b){this.pending_buf[this.d_buf+2*this.last_lit]=
a>>>8;this.pending_buf[this.d_buf+2*this.last_lit+1]=a;this.pending_buf[this.l_buf+this.last_lit]=b;this.last_lit++;0==a?this.dyn_ltree[2*b]++:(this.matches++,a--,this.dyn_ltree[2*(JZ.Tree._length_code[b]+256+1)]++,this.dyn_dtree[2*JZ.Tree.d_code(a)]++);if(0==(this.last_lit&8191)&&2<this.level){var c=8*this.last_lit,d=this.strstart-this.block_start,e;for(e=0;30>e;e++)c+=this.dyn_dtree[2*e]*(5+JZ.Tree.extra_dbits[e]);c>>>=3;if(this.matches<Clazz.doubleToInt(this.last_lit/2)&&c<Clazz.doubleToInt(d/
2))return!0}return this.last_lit==this.lit_bufsize-1},"~N,~N");$_M(c$,"compress_block",function(a,b){var c,d,e=0,f,g;if(0!=this.last_lit){do c=this.pending_buf[this.d_buf+2*e]<<8&65280|this.pending_buf[this.d_buf+2*e+1]&255,d=this.pending_buf[this.l_buf+e]&255,e++,0==c?this.send_code(d,a):(f=JZ.Tree._length_code[d],this.send_code(f+256+1,a),g=JZ.Tree.extra_lbits[f],0!=g&&(d-=JZ.Tree.base_length[f],this.send_bits(d,g)),c--,f=JZ.Tree.d_code(c),this.send_code(f,b),g=JZ.Tree.extra_dbits[f],0!=g&&(c-=
JZ.Tree.base_dist[f],this.send_bits(c,g)));while(e<this.last_lit)}this.send_code(256,a);this.last_eob_len=a[513]},"~A,~A");$_M(c$,"set_data_type",function(){for(var a=0,b=0,c=0;7>a;)c+=this.dyn_ltree[2*a],a++;for(;128>a;)b+=this.dyn_ltree[2*a],a++;for(;256>a;)c+=this.dyn_ltree[2*a],a++;this.data_type=c>b>>>2?0:1});$_M(c$,"bi_flush",function(){16==this.bi_valid?(this.put_short(this.bi_buf),this.bi_valid=this.bi_buf=0):8<=this.bi_valid&&(this.put_byteB(this.bi_buf),this.bi_buf>>>=8,this.bi_valid-=8)});
$_M(c$,"bi_windup",function(){8<this.bi_valid?this.put_short(this.bi_buf):0<this.bi_valid&&this.put_byteB(this.bi_buf);this.bi_valid=this.bi_buf=0});$_M(c$,"copy_block",function(a,b,c){this.bi_windup();this.last_eob_len=8;c&&(this.put_short(b),this.put_short(~b));this.put_byte(this.window,a,b)},"~N,~N,~B");$_M(c$,"flush_block_only",function(a){this._tr_flush_block(0<=this.block_start?this.block_start:-1,this.strstart-this.block_start,a);this.block_start=this.strstart;this.strm.flush_pending()},"~B");
$_M(c$,"deflate_stored",function(a){var b=65535,c;for(b>this.pending_buf_size-5&&(b=this.pending_buf_size-5);;){if(1>=this.lookahead){this.fill_window();if(0==this.lookahead&&0==a)return 0;if(0==this.lookahead)break}this.strstart+=this.lookahead;this.lookahead=0;c=this.block_start+b;if(0==this.strstart||this.strstart>=c)if(this.lookahead=this.strstart-c,this.strstart=c,this.flush_block_only(!1),0==this.strm.avail_out)return 0;if(this.strstart-this.block_start>=this.w_size-262&&(this.flush_block_only(!1),
0==this.strm.avail_out))return 0}this.flush_block_only(4==a);return 0==this.strm.avail_out?4==a?2:0:4==a?3:1},"~N");$_M(c$,"_tr_stored_block",function(a,b,c){this.send_bits(0+(c?1:0),3);this.copy_block(a,b,!0)},"~N,~N,~B");$_M(c$,"_tr_flush_block",function(a,b,c){var d,e,f=0;0<this.level?(2==this.data_type&&this.set_data_type(),this.l_desc.build_tree(this),this.d_desc.build_tree(this),f=this.build_bl_tree(),d=this.opt_len+3+7>>>3,e=this.static_len+3+7>>>3,e<=d&&(d=e)):d=e=b+5;b+4<=d&&-1!=a?this._tr_stored_block(a,
b,c):e==d?(this.send_bits(2+(c?1:0),3),this.compress_block(JZ.StaticTree.static_ltree,JZ.StaticTree.static_dtree)):(this.send_bits(4+(c?1:0),3),this.send_all_trees(this.l_desc.max_code+1,this.d_desc.max_code+1,f+1),this.compress_block(this.dyn_ltree,this.dyn_dtree));this.init_block();c&&this.bi_windup()},"~N,~N,~B");$_M(c$,"fill_window",function(){var a,b,c,d;do{d=this.window_size-this.lookahead-this.strstart;if(0==d&&0==this.strstart&&0==this.lookahead)d=this.w_size;else if(-1==d)d--;else if(this.strstart>=
this.w_size+this.w_size-262){System.arraycopy(this.window,this.w_size,this.window,0,this.w_size);this.match_start-=this.w_size;this.strstart-=this.w_size;this.block_start-=this.w_size;c=a=this.hash_size;do b=this.head[--c]&65535,this.head[c]=b>=this.w_size?b-this.w_size:0;while(0!=--a);c=a=this.w_size;do b=this.prev[--c]&65535,this.prev[c]=b>=this.w_size?b-this.w_size:0;while(0!=--a);d+=this.w_size}if(0==this.strm.avail_in)break;a=this.strm.read_buf(this.window,this.strstart+this.lookahead,d);this.lookahead+=
a;3<=this.lookahead&&(this.ins_h=this.window[this.strstart]&255,this.ins_h=(this.ins_h<<this.hash_shift^this.window[this.strstart+1]&255)&this.hash_mask)}while(262>this.lookahead&&0!=this.strm.avail_in)});$_M(c$,"deflate_fast",function(a){for(var b=0,c;;){if(262>this.lookahead){this.fill_window();if(262>this.lookahead&&0==a)return 0;if(0==this.lookahead)break}3<=this.lookahead&&(this.ins_h=(this.ins_h<<this.hash_shift^this.window[this.strstart+2]&255)&this.hash_mask,b=this.head[this.ins_h]&65535,
this.prev[this.strstart&this.w_mask]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart);0!=b&&(this.strstart-b&65535)<=this.w_size-262&&2!=this.strategy&&(this.match_length=this.longest_match(b));if(3<=this.match_length)if(c=this._tr_tally(this.strstart-this.match_start,this.match_length-3),this.lookahead-=this.match_length,this.match_length<=this.max_lazy_match&&3<=this.lookahead){this.match_length--;do this.strstart++,this.ins_h=(this.ins_h<<this.hash_shift^this.window[this.strstart+2]&
255)&this.hash_mask,b=this.head[this.ins_h]&65535,this.prev[this.strstart&this.w_mask]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart;while(0!=--this.match_length);this.strstart++}else this.strstart+=this.match_length,this.match_length=0,this.ins_h=this.window[this.strstart]&255,this.ins_h=(this.ins_h<<this.hash_shift^this.window[this.strstart+1]&255)&this.hash_mask;else c=this._tr_tally(0,this.window[this.strstart]&255),this.lookahead--,this.strstart++;if(c&&(this.flush_block_only(!1),
0==this.strm.avail_out))return 0}this.flush_block_only(4==a);return 0==this.strm.avail_out?4==a?2:0:4==a?3:1},"~N");$_M(c$,"deflate_slow",function(a){for(var b=0,c;;){if(262>this.lookahead){this.fill_window();if(262>this.lookahead&&0==a)return 0;if(0==this.lookahead)break}3<=this.lookahead&&(this.ins_h=(this.ins_h<<this.hash_shift^this.window[this.strstart+2]&255)&this.hash_mask,b=this.head[this.ins_h]&65535,this.prev[this.strstart&this.w_mask]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart);
this.prev_length=this.match_length;this.prev_match=this.match_start;this.match_length=2;if(0!=b&&(this.prev_length<this.max_lazy_match&&(this.strstart-b&65535)<=this.w_size-262)&&(2!=this.strategy&&(this.match_length=this.longest_match(b)),5>=this.match_length&&(1==this.strategy||3==this.match_length&&4096<this.strstart-this.match_start)))this.match_length=2;if(3<=this.prev_length&&this.match_length<=this.prev_length){var d=this.strstart+this.lookahead-3;c=this._tr_tally(this.strstart-1-this.prev_match,
this.prev_length-3);this.lookahead-=this.prev_length-1;this.prev_length-=2;do++this.strstart<=d&&(this.ins_h=(this.ins_h<<this.hash_shift^this.window[this.strstart+2]&255)&this.hash_mask,b=this.head[this.ins_h]&65535,this.prev[this.strstart&this.w_mask]=this.head[this.ins_h],this.head[this.ins_h]=this.strstart);while(0!=--this.prev_length);this.match_available=0;this.match_length=2;this.strstart++;if(c&&(this.flush_block_only(!1),0==this.strm.avail_out))return 0}else if(0!=this.match_available){if((c=
this._tr_tally(0,this.window[this.strstart-1]&255))&&this.flush_block_only(!1),this.strstart++,this.lookahead--,0==this.strm.avail_out)return 0}else this.match_available=1,this.strstart++,this.lookahead--}0!=this.match_available&&(this._tr_tally(0,this.window[this.strstart-1]&255),this.match_available=0);this.flush_block_only(4==a);return 0==this.strm.avail_out?4==a?2:0:4==a?3:1},"~N");$_M(c$,"longest_match",function(a){var b=this.max_chain_length,c=this.strstart,d,e=this.prev_length,f=this.strstart>
this.w_size-262?this.strstart-(this.w_size-262):0,g=this.nice_match,h=this.w_mask,j=this.strstart+258,k=this.window[c+e-1],l=this.window[c+e];this.prev_length>=this.good_match&&(b>>=2);g>this.lookahead&&(g=this.lookahead);do if(d=a,!(this.window[d+e]!=l||this.window[d+e-1]!=k||this.window[d]!=this.window[c]||this.window[++d]!=this.window[c+1])){c+=2;d++;do;while(this.window[++c]==this.window[++d]&&this.window[++c]==this.window[++d]&&this.window[++c]==this.window[++d]&&this.window[++c]==this.window[++d]&&
this.window[++c]==this.window[++d]&&this.window[++c]==this.window[++d]&&this.window[++c]==this.window[++d]&&this.window[++c]==this.window[++d]&&c<j);d=258-(j-c);c=j-258;if(d>e){this.match_start=a;e=d;if(d>=g)break;k=this.window[c+e-1];l=this.window[c+e]}}while((a=this.prev[a&h]&65535)>f&&0!=--b);return e<=this.lookahead?e:this.lookahead},"~N");$_M(c$,"deflateInit5",($fz=function(a,b,c,d,e){var f=1;this.strm.msg=null;-1==a&&(a=6);0>c?(f=0,c=-c):15<c&&(f=2,c-=16,this.strm.checksum=new JZ.CRC32);if(1>
d||9<d||8!=b||9>c||15<c||0>a||9<a||0>e||2<e)return-2;this.strm.dstate=this;this.wrap=f;this.w_bits=c;this.w_size=1<<this.w_bits;this.w_mask=this.w_size-1;this.hash_bits=d+7;this.hash_size=1<<this.hash_bits;this.hash_mask=this.hash_size-1;this.hash_shift=Clazz.doubleToInt((this.hash_bits+3-1)/3);this.window=Clazz.newByteArray(2*this.w_size,0);this.prev=Clazz.newShortArray(this.w_size,0);this.head=Clazz.newShortArray(this.hash_size,0);this.lit_bufsize=1<<d+6;this.pending_buf=Clazz.newByteArray(4*this.lit_bufsize,
0);this.pending_buf_size=4*this.lit_bufsize;this.d_buf=Clazz.doubleToInt(this.lit_bufsize/2);this.l_buf=3*this.lit_bufsize;this.level=a;this.strategy=e;this.method=b;return this.deflateReset()},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~N");$_M(c$,"deflateReset",function(){this.strm.total_in=this.strm.total_out=0;this.strm.msg=null;this.strm.data_type=2;this.pending_out=this.pending=0;0>this.wrap&&(this.wrap=-this.wrap);this.status=0==this.wrap?113:42;this.strm.checksum.reset();this.last_flush=0;this.tr_init();
this.lm_init();return 0});$_M(c$,"deflateEnd",function(){if(42!=this.status&&113!=this.status&&666!=this.status)return-2;this.window=this.prev=this.head=this.pending_buf=null;return 113==this.status?-3:0});$_M(c$,"deflateParams",function(a,b){var c=0;-1==a&&(a=6);if(0>a||9<a||0>b||2<b)return-2;JZ.Deflate.config_table[this.level].func!=JZ.Deflate.config_table[a].func&&0!=this.strm.total_in&&(c=this.strm.deflate(1));this.level!=a&&(this.level=a,this.max_lazy_match=JZ.Deflate.config_table[this.level].max_lazy,
this.good_match=JZ.Deflate.config_table[this.level].good_length,this.nice_match=JZ.Deflate.config_table[this.level].nice_length,this.max_chain_length=JZ.Deflate.config_table[this.level].max_chain);this.strategy=b;return c},"~N,~N");$_M(c$,"deflateSetDictionary",function(a,b){var c=b,d=0;if(null==a||42!=this.status)return-2;this.strm.checksum.update(a,0,b);if(3>c)return 0;c>this.w_size-262&&(c=this.w_size-262,d=b-c);System.arraycopy(a,d,this.window,0,c);this.block_start=this.strstart=c;this.ins_h=
this.window[0]&255;this.ins_h=(this.ins_h<<this.hash_shift^this.window[1]&255)&this.hash_mask;for(d=0;d<=c-3;d++)this.ins_h=(this.ins_h<<this.hash_shift^this.window[d+2]&255)&this.hash_mask,this.prev[d&this.w_mask]=this.head[this.ins_h],this.head[this.ins_h]=d;return 0},"~A,~N");$_M(c$,"deflate",function(a){var b;if(4<a||0>a)return-2;if(null==this.strm.next_out||null==this.strm.next_in&&0!=this.strm.avail_in||666==this.status&&4!=a)return this.strm.msg=JZ.Deflate.z_errmsg[4],-2;if(0==this.strm.avail_out)return this.strm.msg=
JZ.Deflate.z_errmsg[7],-5;b=this.last_flush;this.last_flush=a;if(42==this.status){if(2==this.wrap)this.getGZIPHeader().put(this),this.status=113;else{var c=8+(this.w_bits-8<<4)<<8,d=(this.level-1&255)>>1;3<d&&(d=3);c|=d<<6;0!=this.strstart&&(c|=32);this.status=113;this.putShortMSB(c+(31-c%31));0!=this.strstart&&(c=this.strm.checksum.getValue(),this.putShortMSB(c>>>16),this.putShortMSB(c&65535))}this.strm.checksum.reset()}if(0!=this.pending){if(this.strm.flush_pending(),0==this.strm.avail_out)return this.last_flush=
-1,0}else if(0==this.strm.avail_in&&a<=b&&4!=a)return this.strm.msg=JZ.Deflate.z_errmsg[7],-5;if(666==this.status&&0!=this.strm.avail_in)return this.strm.msg=JZ.Deflate.z_errmsg[7],-5;if(0!=this.strm.avail_in||0!=this.lookahead||0!=a&&666!=this.status){b=-1;switch(JZ.Deflate.config_table[this.level].func){case 0:b=this.deflate_stored(a);break;case 1:b=this.deflate_fast(a);break;case 2:b=this.deflate_slow(a)}if(2==b||3==b)this.status=666;if(0==b||2==b)return 0==this.strm.avail_out&&(this.last_flush=
-1),0;if(1==b){if(1==a)this._tr_align();else if(this._tr_stored_block(0,0,!1),3==a)for(b=0;b<this.hash_size;b++)this.head[b]=0;this.strm.flush_pending();if(0==this.strm.avail_out)return this.last_flush=-1,0}}if(4!=a)return 0;if(0>=this.wrap)return 1;2==this.wrap?(c=this.strm.checksum.getValue(),this.put_byteB(c&255),this.put_byteB(c>>8&255),this.put_byteB(c>>16&255),this.put_byteB(c>>24&255),this.put_byteB(this.strm.total_in&255),this.put_byteB(this.strm.total_in>>8&255),this.put_byteB(this.strm.total_in>>
16&255),this.put_byteB(this.strm.total_in>>24&255),this.getGZIPHeader().setCRC(c)):(c=this.strm.checksum.getValue(),this.putShortMSB(c>>>16),this.putShortMSB(c&65535));this.strm.flush_pending();0<this.wrap&&(this.wrap=-this.wrap);return 0!=this.pending?0:1},"~N");$_M(c$,"getGZIPHeader",function(){null==this.gheader&&(this.gheader=new JZ.GZIPHeader);return this.gheader});$_M(c$,"getBytesRead",function(){return this.strm.total_in});$_M(c$,"getBytesWritten",function(){return this.strm.total_out});Clazz.pu$h();
c$=Clazz.decorateAsClass(function(){this.func=this.max_chain=this.nice_length=this.max_lazy=this.good_length=0;Clazz.instantialize(this,arguments)},JZ.Deflate,"Config");Clazz.makeConstructor(c$,function(a,b,c,d,e){this.good_length=a;this.max_lazy=b;this.nice_length=c;this.max_chain=d;this.func=e},"~N,~N,~N,~N,~N");c$=Clazz.p0p();Clazz.defineStatics(c$,"MAX_MEM_LEVEL",9,"Z_DEFAULT_COMPRESSION",-1,"MAX_WBITS",15,"DEF_MEM_LEVEL",8,"STORED",0,"FAST",1,"SLOW",2,"config_table",null);$t$=JZ.Deflate.config_table=
Array(10);JZ.Deflate.prototype.config_table=JZ.Deflate.config_table;$t$;JZ.Deflate.config_table[0]=new JZ.Deflate.Config(0,0,0,0,0);JZ.Deflate.config_table[1]=new JZ.Deflate.Config(4,4,8,4,1);JZ.Deflate.config_table[2]=new JZ.Deflate.Config(4,5,16,8,1);JZ.Deflate.config_table[3]=new JZ.Deflate.Config(4,6,32,32,1);JZ.Deflate.config_table[4]=new JZ.Deflate.Config(4,4,16,16,2);JZ.Deflate.config_table[5]=new JZ.Deflate.Config(8,16,32,32,2);JZ.Deflate.config_table[6]=new JZ.Deflate.Config(8,16,128,128,
2);JZ.Deflate.config_table[7]=new JZ.Deflate.Config(8,32,128,256,2);JZ.Deflate.config_table[8]=new JZ.Deflate.Config(32,128,258,1024,2);JZ.Deflate.config_table[9]=new JZ.Deflate.Config(32,258,258,4096,2);Clazz.defineStatics(c$,"z_errmsg","need dictionary;stream end;;file error;stream error;data error;insufficient memory;buffer error;incompatible version;".split(";"),"NeedMore",0,"BlockDone",1,"FinishStarted",2,"FinishDone",3,"PRESET_DICT",32,"Z_FILTERED",1,"Z_HUFFMAN_ONLY",2,"Z_DEFAULT_STRATEGY",
0,"Z_NO_FLUSH",0,"Z_PARTIAL_FLUSH",1,"Z_FULL_FLUSH",3,"Z_FINISH",4,"Z_OK",0,"Z_STREAM_END",1,"Z_NEED_DICT",2,"Z_STREAM_ERROR",-2,"Z_DATA_ERROR",-3,"Z_BUF_ERROR",-5,"INIT_STATE",42,"BUSY_STATE",113,"FINISH_STATE",666,"Z_DEFLATED",8,"STORED_BLOCK",0,"STATIC_TREES",1,"DYN_TREES",2,"Z_BINARY",0,"Z_ASCII",1,"Z_UNKNOWN",2,"Buf_size",16,"REP_3_6",16,"REPZ_3_10",17,"REPZ_11_138",18,"MIN_MATCH",3,"MAX_MATCH",258,"MIN_LOOKAHEAD",262,"MAX_BITS",15,"D_CODES",30,"BL_CODES",19,"LENGTH_CODES",29,"LITERALS",256,
"L_CODES",286,"HEAP_SIZE",573,"END_BLOCK",256)});Clazz.declarePackage("JZ");
Clazz.load(["JZ.ZStream"],"JZ.Deflater",["JZ.Deflate"],function(){c$=Clazz.decorateAsClass(function(){this.$finished=!1;Clazz.instantialize(this,arguments)},JZ,"Deflater",JZ.ZStream);$_M(c$,"init",function(a,b,c){0==b&&(b=15);this.$finished=!1;this.setAdler32();this.dstate=new JZ.Deflate(this);this.dstate.deflateInit2(a,c?-b:b);return this},"~N,~N,~B");Clazz.overrideMethod(c$,"deflate",function(a){if(null==this.dstate)return-2;a=this.dstate.deflate(a);1==a&&(this.$finished=!0);return a},"~N");Clazz.overrideMethod(c$,
"end",function(){this.$finished=!0;if(null==this.dstate)return-2;var a=this.dstate.deflateEnd();this.dstate=null;this.free();return a});$_M(c$,"params",function(a,b){return null==this.dstate?-2:this.dstate.deflateParams(a,b)},"~N,~N");$_M(c$,"setDictionary",function(a,b){return null==this.dstate?-2:this.dstate.deflateSetDictionary(a,b)},"~A,~N");Clazz.overrideMethod(c$,"finished",function(){return this.$finished});$_M(c$,"finish",function(){});$_M(c$,"getBytesRead",function(){return this.dstate.getBytesRead()});
$_M(c$,"getBytesWritten",function(){return this.dstate.getBytesWritten()});Clazz.defineStatics(c$,"MAX_WBITS",15,"Z_STREAM_END",1,"$Z_STREAM_ERROR",-2)});Clazz.declarePackage("JZ");
Clazz.load(null,"JZ.GZIPHeader",["JZ.ZStream","java.lang.IllegalArgumentException","$.InternalError"],function(){c$=Clazz.decorateAsClass(function(){this.fhcrc=this.text=!1;this.xflags=this.time=0;this.os=255;this.comment=this.name=this.extra=null;this.crc=this.hcrc=0;this.done=!1;this.mtime=0;Clazz.instantialize(this,arguments)},JZ,"GZIPHeader",null,Cloneable);$_M(c$,"setModifiedTime",function(a){this.mtime=a},"~N");$_M(c$,"getModifiedTime",function(){return this.mtime});$_M(c$,"setOS",function(a){if(0<=
a&&13>=a||255==a)this.os=a;else throw new IllegalArgumentException("os: "+a);},"~N");$_M(c$,"getOS",function(){return this.os});$_M(c$,"setName",function(a){this.name=JZ.ZStream.getBytes(a)},"~S");$_M(c$,"getName",function(){if(null==this.name)return"";try{return String.instantialize(this.name,"ISO-8859-1")}catch(a){if(Clazz.exceptionOf(a,java.io.UnsupportedEncodingException))throw new InternalError(a.toString());throw a;}});$_M(c$,"setComment",function(a){this.comment=JZ.ZStream.getBytes(a)},"~S");
$_M(c$,"getComment",function(){if(null==this.comment)return"";try{return String.instantialize(this.comment,"ISO-8859-1")}catch(a){if(Clazz.exceptionOf(a,java.io.UnsupportedEncodingException))throw new InternalError(a.toString());throw a;}});$_M(c$,"setCRC",function(a){this.crc=a},"~N");$_M(c$,"getCRC",function(){return this.crc});$_M(c$,"put",function(a){var b=0;this.text&&(b|=1);this.fhcrc&&(b|=2);null!=this.extra&&(b|=4);null!=this.name&&(b|=8);null!=this.comment&&(b|=16);var c=0;1==a.level?c|=
4:9==a.level&&(c|=2);a.put_short(35615);a.put_byteB(8);a.put_byteB(b);a.put_byteB(this.mtime);a.put_byteB(this.mtime>>8);a.put_byteB(this.mtime>>16);a.put_byteB(this.mtime>>24);a.put_byteB(c);a.put_byteB(this.os);null!=this.extra&&(a.put_byteB(this.extra.length),a.put_byteB(this.extra.length>>8),a.put_byte(this.extra,0,this.extra.length));null!=this.name&&(a.put_byte(this.name,0,this.name.length),a.put_byteB(0));null!=this.comment&&(a.put_byte(this.comment,0,this.comment.length),a.put_byteB(0))},
"JZ.Deflate");$_M(c$,"clone",function(){var a=Clazz.superCall(this,JZ.GZIPHeader,"clone",[]),b;null!=a.extra&&(b=Clazz.newByteArray(a.extra.length,0),System.arraycopy(a.extra,0,b,0,b.length),a.extra=b);null!=a.name&&(b=Clazz.newByteArray(a.name.length,0),System.arraycopy(a.name,0,b,0,b.length),a.name=b);null!=a.comment&&(b=Clazz.newByteArray(a.comment.length,0),System.arraycopy(a.comment,0,b,0,b.length),a.comment=b);return a});Clazz.defineStatics(c$,"OS_MSDOS",0,"OS_AMIGA",1,"OS_VMS",2,"OS_UNIX",
3,"OS_ATARI",5,"OS_OS2",6,"OS_MACOS",7,"OS_TOPS20",10,"OS_WIN32",11,"OS_VMCMS",4,"OS_ZSYSTEM",8,"OS_CPM",9,"OS_QDOS",12,"OS_RISCOS",13,"OS_UNKNOWN",255)});Clazz.declarePackage("JZ");
Clazz.load(["java.lang.Exception"],"JZ.Inflate",["JZ.Adler32","$.CRC32","$.GZIPHeader","$.InfBlocks","java.io.ByteArrayOutputStream"],function(){c$=Clazz.decorateAsClass(function(){this.method=this.mode=0;this.was=-1;this.wbits=this.wrap=this.marker=this.need=0;this.z=this.blocks=null;this.flags=0;this.need_bytes=-1;this.gheader=this.crcbuf=null;Clazz.isClassDefined("JZ.Inflate.Return")||JZ.Inflate.$Inflate$Return$();this.tmp_string=null;Clazz.instantialize(this,arguments)},JZ,"Inflate");Clazz.prepareFields(c$,
function(){this.crcbuf=Clazz.newByteArray(4,0)});$_M(c$,"reset",function(){this.inflateReset()});$_M(c$,"inflateReset",function(){if(null==this.z)return-2;this.z.total_in=this.z.total_out=0;this.z.msg=null;this.mode=14;this.need_bytes=-1;this.blocks.reset();return 0});$_M(c$,"inflateEnd",function(){null!=this.blocks&&this.blocks.free();return 0});Clazz.makeConstructor(c$,function(a){this.z=a},"JZ.ZStream");$_M(c$,"inflateInit",function(a){this.blocks=this.z.msg=null;this.wrap=0;0>a?a=-a:(this.wrap=
(a>>4)+1,48>a&&(a&=15));if(8>a||15<a)return this.inflateEnd(),-2;null!=this.blocks&&this.wbits!=a&&(this.blocks.free(),this.blocks=null);this.wbits=a;this.blocks=new JZ.InfBlocks(this.z,1<<a);this.inflateReset();return 0},"~N");$_M(c$,"inflate",function(a){var b,c;if(null==this.z||null==this.z.next_in)return 4==a&&14==this.mode?0:-2;a=4==a?-5:0;for(b=-5;;)switch(this.mode){case 14:if(0==this.wrap){this.mode=7;break}try{b=this.readBytes(2,b,a)}catch(d){if(Clazz.exceptionOf(d,JZ.Inflate.Return))return d.r;
throw d;}if(0!=(this.wrap&2)&&35615==this.need){this.z.checksum=new JZ.CRC32;this.checksum(2,this.need);null==this.gheader&&(this.gheader=new JZ.GZIPHeader);this.mode=23;break}this.flags=0;this.method=this.need&255;c=this.need>>8&255;if(0==(this.wrap&1)||0!=((this.method<<8)+c)%31){this.mode=13;this.z.msg="incorrect header check";break}if(8!=(this.method&15)){this.mode=13;this.z.msg="unknown compression method";break}if((this.method>>4)+8>this.wbits){this.mode=13;this.z.msg="invalid window size";
break}this.z.checksum=new JZ.Adler32;if(0==(c&32)){this.mode=7;break}this.mode=2;case 2:if(0==this.z.avail_in)return b;b=a;this.z.avail_in--;this.z.total_in++;this.need=(this.z.next_in[this.z.next_in_index++]&255)<<24&4278190080;this.mode=3;case 3:if(0==this.z.avail_in)return b;b=a;this.z.avail_in--;this.z.total_in++;this.need+=(this.z.next_in[this.z.next_in_index++]&255)<<16&16711680;this.mode=4;case 4:if(0==this.z.avail_in)return b;b=a;this.z.avail_in--;this.z.total_in++;this.need+=(this.z.next_in[this.z.next_in_index++]&
255)<<8&65280;this.mode=5;case 5:if(0==this.z.avail_in)return b;this.z.avail_in--;this.z.total_in++;this.need+=this.z.next_in[this.z.next_in_index++]&255;this.z.checksum.resetLong(this.need);this.mode=6;return 2;case 6:return this.mode=13,this.z.msg="need dictionary",this.marker=0,-2;case 7:b=this.blocks.proc(b);if(-3==b){this.mode=13;this.marker=0;break}0==b&&(b=a);if(1!=b)return b;b=a;this.was=this.z.checksum.getValue();this.blocks.reset();if(0==this.wrap){this.mode=12;break}this.mode=8;case 8:if(0==
this.z.avail_in)return b;b=a;this.z.avail_in--;this.z.total_in++;this.need=(this.z.next_in[this.z.next_in_index++]&255)<<24&4278190080;this.mode=9;case 9:if(0==this.z.avail_in)return b;b=a;this.z.avail_in--;this.z.total_in++;this.need+=(this.z.next_in[this.z.next_in_index++]&255)<<16&16711680;this.mode=10;case 10:if(0==this.z.avail_in)return b;b=a;this.z.avail_in--;this.z.total_in++;this.need+=(this.z.next_in[this.z.next_in_index++]&255)<<8&65280;this.mode=11;case 11:if(0==this.z.avail_in)return b;
b=a;this.z.avail_in--;this.z.total_in++;this.need+=this.z.next_in[this.z.next_in_index++]&255;0!=this.flags&&(this.need=((this.need&4278190080)>>24|(this.need&16711680)>>8|(this.need&65280)<<8|(this.need&65535)<<24)&4294967295);this.was!=this.need?this.z.msg="incorrect data check":0!=this.flags&&null!=this.gheader&&(this.gheader.crc=this.need);this.mode=15;case 15:if(0!=this.wrap&&0!=this.flags){try{b=this.readBytes(4,b,a)}catch(e){if(Clazz.exceptionOf(e,JZ.Inflate.Return))return e.r;throw e;}if(null!=
this.z.msg&&this.z.msg.equals("incorrect data check")){this.mode=13;this.marker=5;break}if(this.need!=(this.z.total_out&4294967295)){this.z.msg="incorrect length check";this.mode=13;break}this.z.msg=null}else if(null!=this.z.msg&&this.z.msg.equals("incorrect data check")){this.mode=13;this.marker=5;break}this.mode=12;case 12:return 1;case 13:return-3;case 23:try{b=this.readBytes(2,b,a)}catch(f){if(Clazz.exceptionOf(f,JZ.Inflate.Return))return f.r;throw f;}this.flags=this.need&65535;if(8!=(this.flags&
255)){this.z.msg="unknown compression method";this.mode=13;break}if(0!=(this.flags&57344)){this.z.msg="unknown header flags set";this.mode=13;break}0!=(this.flags&512)&&this.checksum(2,this.need);this.mode=16;case 16:try{b=this.readBytes(4,b,a)}catch(g){if(Clazz.exceptionOf(g,JZ.Inflate.Return))return g.r;throw g;}null!=this.gheader&&(this.gheader.time=this.need);0!=(this.flags&512)&&this.checksum(4,this.need);this.mode=17;case 17:try{b=this.readBytes(2,b,a)}catch(h){if(Clazz.exceptionOf(h,JZ.Inflate.Return))return h.r;
throw h;}null!=this.gheader&&(this.gheader.xflags=this.need&255,this.gheader.os=this.need>>8&255);0!=(this.flags&512)&&this.checksum(2,this.need);this.mode=18;case 18:if(0!=(this.flags&1024)){try{b=this.readBytes(2,b,a)}catch(j){if(Clazz.exceptionOf(j,JZ.Inflate.Return))return j.r;throw j;}null!=this.gheader&&(this.gheader.extra=Clazz.newByteArray(this.need&65535,0));0!=(this.flags&512)&&this.checksum(2,this.need)}else null!=this.gheader&&(this.gheader.extra=null);this.mode=19;case 19:if(0!=(this.flags&
1024))try{if(b=this.readBytes(b,a),null!=this.gheader){var k=this.tmp_string.toByteArray();this.tmp_string=null;if(k.length==this.gheader.extra.length)System.arraycopy(k,0,this.gheader.extra,0,k.length);else{this.z.msg="bad extra field length";this.mode=13;break}}}catch(l){if(Clazz.exceptionOf(l,JZ.Inflate.Return))return l.r;throw l;}else null!=this.gheader&&(this.gheader.extra=null);this.mode=20;case 20:if(0!=(this.flags&2048))try{b=this.readString(b,a),null!=this.gheader&&(this.gheader.name=this.tmp_string.toByteArray()),
this.tmp_string=null}catch(n){if(Clazz.exceptionOf(n,JZ.Inflate.Return))return n.r;throw n;}else null!=this.gheader&&(this.gheader.name=null);this.mode=21;case 21:if(0!=(this.flags&4096))try{b=this.readString(b,a),null!=this.gheader&&(this.gheader.comment=this.tmp_string.toByteArray()),this.tmp_string=null}catch(p){if(Clazz.exceptionOf(p,JZ.Inflate.Return))return p.r;throw p;}else null!=this.gheader&&(this.gheader.comment=null);this.mode=22;case 22:if(0!=(this.flags&512)){try{b=this.readBytes(2,b,
a)}catch(m){if(Clazz.exceptionOf(m,JZ.Inflate.Return))return m.r;throw m;}null!=this.gheader&&(this.gheader.hcrc=this.need&65535);if(this.need!=(this.z.checksum.getValue()&65535)){this.mode=13;this.z.msg="header crc mismatch";this.marker=5;break}}this.z.checksum=new JZ.CRC32;this.mode=7;break;default:return-2}},"~N");$_M(c$,"inflateSetDictionary",function(a,b){if(null==this.z||6!=this.mode&&0!=this.wrap)return-2;var c=0,d=b;if(6==this.mode){var e=this.z.checksum.getValue();this.z.checksum.reset();
this.z.checksum.update(a,0,b);if(this.z.checksum.getValue()!=e)return-3}this.z.checksum.reset();d>=1<<this.wbits&&(d=(1<<this.wbits)-1,c=b-d);this.blocks.set_dictionary(a,c,d);this.mode=7;return 0},"~A,~N");$_M(c$,"inflateSync",function(){var a,b,c;if(null==this.z)return-2;13!=this.mode&&(this.mode=13,this.marker=0);if(0==(a=this.z.avail_in))return-5;b=this.z.next_in_index;for(c=this.marker;0!=a&&4>c;)this.z.next_in[b]==JZ.Inflate.mark[c]?c++:c=0!=this.z.next_in[b]?0:4-c,b++,a--;this.z.total_in+=
b-this.z.next_in_index;this.z.next_in_index=b;this.z.avail_in=a;this.marker=c;if(4!=c)return-3;a=this.z.total_in;b=this.z.total_out;this.inflateReset();this.z.total_in=a;this.z.total_out=b;this.mode=7;return 0});$_M(c$,"inflateSyncPoint",function(){return null==this.z||null==this.blocks?-2:this.blocks.sync_point()});$_M(c$,"readBytes",($fz=function(a,b,c){-1==this.need_bytes&&(this.need_bytes=a,this.need=0);for(;0<this.need_bytes;){if(0==this.z.avail_in)throw Clazz.innerTypeInstance(JZ.Inflate.Return,
this,null,b);b=c;this.z.avail_in--;this.z.total_in++;this.need|=(this.z.next_in[this.z.next_in_index++]&255)<<8*(a-this.need_bytes);this.need_bytes--}2==a?this.need&=65535:4==a&&(this.need&=4294967295);this.need_bytes=-1;return b},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"readString",($fz=function(a,b){null==this.tmp_string&&(this.tmp_string=new java.io.ByteArrayOutputStream);var c=0;do{if(0==this.z.avail_in)throw Clazz.innerTypeInstance(JZ.Inflate.Return,this,null,a);a=b;this.z.avail_in--;this.z.total_in++;
c=this.z.next_in[this.z.next_in_index];0!=c&&this.tmp_string.write(this.z.next_in,this.z.next_in_index,1);this.z.checksum.update(this.z.next_in,this.z.next_in_index,1);this.z.next_in_index++}while(0!=c);return a},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"readBytes",($fz=function(a,b){null==this.tmp_string&&(this.tmp_string=new java.io.ByteArrayOutputStream);for(;0<this.need;){if(0==this.z.avail_in)throw Clazz.innerTypeInstance(JZ.Inflate.Return,this,null,a);a=b;this.z.avail_in--;this.z.total_in++;this.tmp_string.write(this.z.next_in,
this.z.next_in_index,1);this.z.checksum.update(this.z.next_in,this.z.next_in_index,1);this.z.next_in_index++;this.need--}return a},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"checksum",($fz=function(a,b){for(var c=0;c<a;c++)this.crcbuf[c]=b&255,b>>=8;this.z.checksum.update(this.crcbuf,0,a)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"getGZIPHeader",function(){return this.gheader});$_M(c$,"inParsingHeader",function(){switch(this.mode){case 14:case 2:case 3:case 4:case 5:case 23:case 16:case 17:case 18:case 19:case 20:case 21:case 22:return!0;
default:return!1}});c$.$Inflate$Return$=function(){Clazz.pu$h();c$=Clazz.decorateAsClass(function(){Clazz.prepareCallback(this,arguments);this.r=0;Clazz.instantialize(this,arguments)},JZ.Inflate,"Return",Exception);Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,JZ.Inflate.Return,[]);this.r=a},"~N");c$=Clazz.p0p()};Clazz.defineStatics(c$,"PRESET_DICT",32,"Z_NO_FLUSH",0,"Z_PARTIAL_FLUSH",1,"Z_SYNC_FLUSH",2,"Z_FULL_FLUSH",3,"Z_FINISH",4,"Z_DEFLATED",8,"Z_OK",0,"Z_STREAM_END",1,"Z_NEED_DICT",
2,"Z_STREAM_ERROR",-2,"Z_DATA_ERROR",-3,"Z_BUF_ERROR",-5,"DICT4",2,"DICT3",3,"DICT2",4,"DICT1",5,"DICT0",6,"BLOCKS",7,"CHECK4",8,"CHECK3",9,"CHECK2",10,"CHECK1",11,"DONE",12,"BAD",13,"HEAD",14,"LENGTH",15,"TIME",16,"OS",17,"EXLEN",18,"EXTRA",19,"NAME",20,"COMMENT",21,"HCRC",22,"FLAGS",23,"mark",[0,0,255,255])});Clazz.declarePackage("JZ");c$=Clazz.decorateAsClass(function(){this.x=this.u=this.r=this.c=this.v=this.hn=null;Clazz.instantialize(this,arguments)},JZ,"InfTree");
$_M(c$,"huft_build",($fz=function(a,b,c,d,e,f,g,h,j,k,l){var n,p,m,q,r,v,u,s,t,w;u=0;m=c;do this.c[a[b+u]]++,u++,m--;while(0!=m);if(this.c[0]==c)return g[0]=-1,h[0]=0;v=h[0];for(q=1;15>=q&&0==this.c[q];q++);r=q;v<q&&(v=q);for(m=15;0!=m&&0==this.c[m];m--);p=m;v>m&&(v=m);h[0]=v;for(h=1<<q;q<m;q++,h<<=1)if(0>(h-=this.c[q]))return-3;if(0>(h-=this.c[m]))return-3;this.c[m]+=h;this.x[1]=q=0;u=1;for(s=2;0!=--m;)this.x[s]=q+=this.c[u],s++,u++;u=m=0;do{if(0!=(q=a[b+u]))l[this.x[q]++]=m;u++}while(++m<c);c=this.x[p];
u=this.x[0]=m=0;b=-1;t=-v;for(w=s=this.u[0]=0;r<=p;r++)for(a=this.c[r];0!=a--;){for(;r>t+v;){b++;t+=v;w=p-t;w=w>v?v:w;if((n=1<<(q=r-t))>a+1)if(n-=a+1,s=r,q<w)for(;++q<w&&!((n<<=1)<=this.c[++s]);)n-=this.c[s];w=1<<q;if(1440<k[0]+w)return-3;this.u[b]=s=k[0];k[0]+=w;0!=b?(this.x[b]=m,this.r[0]=q,this.r[1]=v,q=m>>>t-v,this.r[2]=s-this.u[b-1]-q,System.arraycopy(this.r,0,j,3*(this.u[b-1]+q),3)):g[0]=s}this.r[1]=r-t;u>=c?this.r[0]=192:l[u]<d?(this.r[0]=256>l[u]?0:96,this.r[2]=l[u++]):(this.r[0]=f[l[u]-d]+
16+64,this.r[2]=e[l[u++]-d]);n=1<<r-t;for(q=m>>>t;q<w;q+=n)System.arraycopy(this.r,0,j,3*(s+q),3);for(q=1<<r-1;0!=(m&q);q>>>=1)m^=q;m^=q;for(q=(1<<t)-1;(m&q)!=this.x[b];)b--,t-=v,q=(1<<t)-1}return 0!=h&&1!=p?-5:0},$fz.isPrivate=!0,$fz),"~A,~N,~N,~N,~A,~A,~A,~A,~A,~A,~A");
$_M(c$,"inflate_trees_bits",function(a,b,c,d,e){this.initWorkArea(19);this.hn[0]=0;a=this.huft_build(a,0,19,19,null,null,c,b,d,this.hn,this.v);if(-3==a)e.msg="oversubscribed dynamic bit lengths tree";else if(-5==a||0==b[0])e.msg="incomplete dynamic bit lengths tree",a=-3;return a},"~A,~A,~A,~A,JZ.ZStream");
$_M(c$,"inflate_trees_dynamic",function(a,b,c,d,e,f,g,h,j){this.initWorkArea(288);this.hn[0]=0;f=this.huft_build(c,0,a,257,JZ.InfTree.cplens,JZ.InfTree.cplext,f,d,h,this.hn,this.v);if(0!=f||0==d[0])return-3==f?j.msg="oversubscribed literal/length tree":-4!=f&&(j.msg="incomplete literal/length tree",f=-3),f;this.initWorkArea(288);f=this.huft_build(c,a,b,0,JZ.InfTree.cpdist,JZ.InfTree.cpdext,g,e,h,this.hn,this.v);return 0!=f||0==e[0]&&257<a?(-3==f?j.msg="oversubscribed distance tree":-5==f?(j.msg="incomplete distance tree",
f=-3):-4!=f&&(j.msg="empty distance tree with lengths",f=-3),f):0},"~N,~N,~A,~A,~A,~A,~A,~A,JZ.ZStream");c$.inflate_trees_fixed=$_M(c$,"inflate_trees_fixed",function(a,b,c,d){a[0]=9;b[0]=5;c[0]=JZ.InfTree.fixed_tl;d[0]=JZ.InfTree.fixed_td;return 0},"~A,~A,~A,~A,JZ.ZStream");
$_M(c$,"initWorkArea",($fz=function(a){null==this.hn&&(this.hn=Clazz.newIntArray(1,0),this.v=Clazz.newIntArray(a,0),this.c=Clazz.newIntArray(16,0),this.r=Clazz.newIntArray(3,0),this.u=Clazz.newIntArray(15,0),this.x=Clazz.newIntArray(16,0));this.v.length<a&&(this.v=Clazz.newIntArray(a,0));for(var b=0;b<a;b++)this.v[b]=0;for(b=0;16>b;b++)this.c[b]=0;for(b=0;3>b;b++)this.r[b]=0;System.arraycopy(this.c,0,this.u,0,15);System.arraycopy(this.c,0,this.x,0,16)},$fz.isPrivate=!0,$fz),"~N");
Clazz.defineStatics(c$,"MANY",1440,"Z_OK",0,"Z_DATA_ERROR",-3,"Z_MEM_ERROR",-4,"Z_BUF_ERROR",-5,"fixed_bl",9,"fixed_bd",5,"fixed_tl",[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,
8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,
156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,
0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,
27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,
0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,
142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,
80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],"fixed_td",[80,5,1,
87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],"cplens",[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],"cplext",[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,112,112],"cpdist",[1,2,3,4,5,7,9,13,17,25,33,49,65,97,
129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],"cpdext",[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],"BMAX",15);Clazz.declarePackage("JZ");
Clazz.load(["JZ.InfTree"],"JZ.InfBlocks",["JZ.InfCodes"],function(){c$=Clazz.decorateAsClass(function(){this.index=this.table=this.left=this.mode=0;this.codes=this.tdi=this.tli=this.td=this.tl=this.bd=this.bl=this.tb=this.bb=this.blens=null;this.bitb=this.bitk=this.last=0;this.window=this.hufts=null;this.write=this.read=this.end=0;this.check=!1;this.z=this.inftree=null;Clazz.instantialize(this,arguments)},JZ,"InfBlocks");Clazz.prepareFields(c$,function(){this.bb=Clazz.newIntArray(1,0);this.tb=Clazz.newIntArray(1,
0);this.bl=Clazz.newIntArray(1,0);this.bd=Clazz.newIntArray(1,0);this.tli=Clazz.newIntArray(1,0);this.tdi=Clazz.newIntArray(1,0);this.inftree=new JZ.InfTree});Clazz.makeConstructor(c$,function(a,b){this.z=a;this.codes=new JZ.InfCodes(this.z,this);this.hufts=Clazz.newIntArray(4320,0);this.window=Clazz.newByteArray(b,0);this.end=b;this.check=0==a.istate.wrap?!1:!0;this.mode=0;this.tl=Clazz.newArray(1,null);this.td=Clazz.newArray(1,null);this.reset()},"JZ.ZStream,~N");$_M(c$,"reset",function(){6==this.mode&&
this.codes.free(this.z);this.read=this.write=this.bitb=this.bitk=this.mode=0;this.check&&this.z.checksum.reset()});$_M(c$,"proc",function(a){var b,c,d,e,f,g,h;e=this.z.next_in_index;f=this.z.avail_in;c=this.bitb;d=this.bitk;g=this.write;for(h=g<this.read?this.read-g-1:this.end-g;;)switch(this.mode){case 0:for(;3>d;){if(0!=f)a=0;else return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);f--;c|=(this.z.next_in[e++]&
255)<<d;d+=8}b=c&7;this.last=b&1;switch(b>>>1){case 0:c>>>=3;d-=3;b=d&7;c>>>=b;d-=b;this.mode=1;break;case 1:JZ.InfTree.inflate_trees_fixed(this.bl,this.bd,this.tl,this.td,this.z);this.codes.init(this.bl[0],this.bd[0],this.tl[0],0,this.td[0],0);c>>>=3;d-=3;this.mode=6;break;case 2:c>>>=3;d-=3;this.mode=3;break;case 3:return c>>>=3,d-=3,this.mode=9,this.z.msg="invalid block type",a=-3,this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=
g,this.inflate_flush(a)}break;case 1:for(;32>d;){if(0!=f)a=0;else return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);f--;c|=(this.z.next_in[e++]&255)<<d;d+=8}if((~c>>>16&65535)!=(c&65535))return this.mode=9,this.z.msg="invalid stored block lengths",a=-3,this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);this.left=c&
65535;c=d=0;this.mode=0!=this.left?2:0!=this.last?7:0;break;case 2:if(0==f||0==h&&(g==this.end&&0!=this.read&&(g=0,h=g<this.read?this.read-g-1:this.end-g),0==h&&(this.write=g,a=this.inflate_flush(a),g=this.write,h=g<this.read?this.read-g-1:this.end-g,g==this.end&&0!=this.read&&(g=0,h=g<this.read?this.read-g-1:this.end-g),0==h)))return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);a=0;b=this.left;b>f&&(b=
f);b>h&&(b=h);System.arraycopy(this.z.next_in,e,this.window,g,b);e+=b;f-=b;g+=b;h-=b;if(0!=(this.left-=b))break;this.mode=0!=this.last?7:0;break;case 3:for(;14>d;){if(0!=f)a=0;else return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);f--;c|=(this.z.next_in[e++]&255)<<d;d+=8}this.table=b=c&16383;if(29<(b&31)||29<(b>>5&31))return this.mode=9,this.z.msg="too many length or distance symbols",a=-3,this.bitb=c,
this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);b=258+(b&31)+(b>>5&31);if(null==this.blens||this.blens.length<b)this.blens=Clazz.newIntArray(b,0);else for(h=0;h<b;h++)this.blens[h]=0;c>>>=14;d-=14;this.index=0;this.mode=4;case 4:for(;this.index<4+(this.table>>>10);){for(;3>d;){if(0!=f)a=0;else return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);
f--;c|=(this.z.next_in[e++]&255)<<d;d+=8}this.blens[JZ.InfBlocks.border[this.index++]]=c&7;c>>>=3;d-=3}for(;19>this.index;)this.blens[JZ.InfBlocks.border[this.index++]]=0;this.bb[0]=7;b=this.inftree.inflate_trees_bits(this.blens,this.bb,this.tb,this.hufts,this.z);if(0!=b)return a=b,-3==a&&(this.blens=null,this.mode=9),this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);this.index=0;this.mode=5;case 5:for(;;){b=
this.table;if(!(this.index<258+(b&31)+(b>>5&31)))break;var j,k;for(b=this.bb[0];d<b;){if(0!=f)a=0;else return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);f--;c|=(this.z.next_in[e++]&255)<<d;d+=8}b=this.hufts[3*(this.tb[0]+(c&JZ.InfBlocks.inflate_mask[b]))+1];k=this.hufts[3*(this.tb[0]+(c&JZ.InfBlocks.inflate_mask[b]))+2];if(16>k)c>>>=b,d-=b,this.blens[this.index++]=k;else{h=18==k?7:k-14;for(j=18==k?11:
3;d<b+h;){if(0!=f)a=0;else return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);f--;c|=(this.z.next_in[e++]&255)<<d;d+=8}c>>>=b;d-=b;j+=c&JZ.InfBlocks.inflate_mask[h];c>>>=h;d-=h;h=this.index;b=this.table;if(h+j>258+(b&31)+(b>>5&31)||16==k&&1>h)return this.blens=null,this.mode=9,this.z.msg="invalid bit length repeat",a=-3,this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=
e,this.write=g,this.inflate_flush(a);k=16==k?this.blens[h-1]:0;do this.blens[h++]=k;while(0!=--j);this.index=h}}this.tb[0]=-1;this.bl[0]=9;this.bd[0]=6;b=this.table;b=this.inftree.inflate_trees_dynamic(257+(b&31),1+(b>>5&31),this.blens,this.bl,this.bd,this.tli,this.tdi,this.hufts,this.z);if(0!=b)return-3==b&&(this.blens=null,this.mode=9),a=b,this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);this.codes.init(this.bl[0],
this.bd[0],this.hufts,this.tli[0],this.hufts,this.tdi[0]);this.mode=6;case 6:this.bitb=c;this.bitk=d;this.z.avail_in=f;this.z.total_in+=e-this.z.next_in_index;this.z.next_in_index=e;this.write=g;if(1!=(a=this.codes.proc(a)))return this.inflate_flush(a);a=0;this.codes.free(this.z);e=this.z.next_in_index;f=this.z.avail_in;c=this.bitb;d=this.bitk;g=this.write;h=g<this.read?this.read-g-1:this.end-g;if(0==this.last){this.mode=0;break}this.mode=7;case 7:this.write=g;a=this.inflate_flush(a);g=this.write;
if(this.read!=this.write)return this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);this.mode=8;case 8:return a=1,this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);case 9:return a=-3,this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a);
default:return a=-2,this.bitb=c,this.bitk=d,this.z.avail_in=f,this.z.total_in+=e-this.z.next_in_index,this.z.next_in_index=e,this.write=g,this.inflate_flush(a)}},"~N");$_M(c$,"free",function(){this.reset();this.hufts=this.window=null});$_M(c$,"set_dictionary",function(a,b,c){System.arraycopy(a,b,this.window,0,c);this.read=this.write=c},"~A,~N,~N");$_M(c$,"sync_point",function(){return 1==this.mode?1:0});$_M(c$,"inflate_flush",function(a){var b,c,d;c=this.z.next_out_index;d=this.read;b=(d<=this.write?
this.write:this.end)-d;b>this.z.avail_out&&(b=this.z.avail_out);0!=b&&-5==a&&(a=0);this.z.avail_out-=b;this.z.total_out+=b;this.check&&0<b&&this.z.checksum.update(this.window,d,b);System.arraycopy(this.window,d,this.z.next_out,c,b);c+=b;d+=b;d==this.end&&(d=0,this.write==this.end&&(this.write=0),b=this.write-d,b>this.z.avail_out&&(b=this.z.avail_out),0!=b&&-5==a&&(a=0),this.z.avail_out-=b,this.z.total_out+=b,this.check&&0<b&&this.z.checksum.update(this.window,d,b),System.arraycopy(this.window,d,this.z.next_out,
c,b),c+=b,d+=b);this.z.next_out_index=c;this.read=d;return a},"~N");Clazz.defineStatics(c$,"MANY",1440,"inflate_mask",[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],"border",[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],"Z_OK",0,"Z_STREAM_END",1,"Z_STREAM_ERROR",-2,"Z_DATA_ERROR",-3,"Z_BUF_ERROR",-5,"TYPE",0,"LENS",1,"STORED",2,"TABLE",3,"BTREE",4,"DTREE",5,"CODES",6,"DRY",7,"DONE",8,"BAD",9)});Clazz.declarePackage("JZ");
c$=Clazz.decorateAsClass(function(){this.len=this.mode=0;this.tree=null;this.dbits=this.lbits=this.dist=this.get=this.lit=this.need=this.tree_index=0;this.ltree=null;this.ltree_index=0;this.dtree=null;this.dtree_index=0;this.s=this.z=null;Clazz.instantialize(this,arguments)},JZ,"InfCodes");Clazz.makeConstructor(c$,function(a,b){this.z=a;this.s=b},"JZ.ZStream,JZ.InfBlocks");
$_M(c$,"init",function(a,b,c,d,e,f){this.mode=0;this.lbits=a;this.dbits=b;this.ltree=c;this.ltree_index=d;this.dtree=e;this.dtree_index=f;this.tree=null},"~N,~N,~A,~N,~A,~N");
$_M(c$,"proc",function(a){var b,c,d=0,e=0,f=0,g,h,j,f=this.z.next_in_index;g=this.z.avail_in;d=this.s.bitb;e=this.s.bitk;h=this.s.write;for(j=h<this.s.read?this.s.read-h-1:this.s.end-h;;)switch(this.mode){case 0:if(258<=j&&10<=g&&(this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,a=this.inflate_fast(this.lbits,this.dbits,this.ltree,this.ltree_index,this.dtree,this.dtree_index,this.s,this.z),f=this.z.next_in_index,g=this.z.avail_in,
d=this.s.bitb,e=this.s.bitk,h=this.s.write,j=h<this.s.read?this.s.read-h-1:this.s.end-h,0!=a)){this.mode=1==a?7:9;break}this.need=this.lbits;this.tree=this.ltree;this.tree_index=this.ltree_index;this.mode=1;case 1:for(b=this.need;e<b;){if(0!=g)a=0;else return this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);g--;d|=(this.z.next_in[f++]&255)<<e;e+=8}b=3*(this.tree_index+(d&JZ.InfCodes.inflate_mask[b]));
d>>>=this.tree[b+1];e-=this.tree[b+1];c=this.tree[b];if(0==c){this.lit=this.tree[b+2];this.mode=6;break}if(0!=(c&16)){this.get=c&15;this.len=this.tree[b+2];this.mode=2;break}if(0==(c&64)){this.need=c;this.tree_index=Clazz.doubleToInt(b/3)+this.tree[b+2];break}if(0!=(c&32)){this.mode=7;break}this.mode=9;this.z.msg="invalid literal/length code";a=-3;this.s.bitb=d;this.s.bitk=e;this.z.avail_in=g;this.z.total_in+=f-this.z.next_in_index;this.z.next_in_index=f;this.s.write=h;return this.s.inflate_flush(a);
case 2:for(b=this.get;e<b;){if(0!=g)a=0;else return this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);g--;d|=(this.z.next_in[f++]&255)<<e;e+=8}this.len+=d&JZ.InfCodes.inflate_mask[b];d>>=b;e-=b;this.need=this.dbits;this.tree=this.dtree;this.tree_index=this.dtree_index;this.mode=3;case 3:for(b=this.need;e<b;){if(0!=g)a=0;else return this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,
this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);g--;d|=(this.z.next_in[f++]&255)<<e;e+=8}b=3*(this.tree_index+(d&JZ.InfCodes.inflate_mask[b]));d>>=this.tree[b+1];e-=this.tree[b+1];c=this.tree[b];if(0!=(c&16)){this.get=c&15;this.dist=this.tree[b+2];this.mode=4;break}if(0==(c&64)){this.need=c;this.tree_index=Clazz.doubleToInt(b/3)+this.tree[b+2];break}this.mode=9;this.z.msg="invalid distance code";a=-3;this.s.bitb=d;this.s.bitk=e;this.z.avail_in=g;this.z.total_in+=f-this.z.next_in_index;
this.z.next_in_index=f;this.s.write=h;return this.s.inflate_flush(a);case 4:for(b=this.get;e<b;){if(0!=g)a=0;else return this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);g--;d|=(this.z.next_in[f++]&255)<<e;e+=8}this.dist+=d&JZ.InfCodes.inflate_mask[b];d>>=b;e-=b;this.mode=5;case 5:for(b=h-this.dist;0>b;)b+=this.s.end;for(;0!=this.len;){if(0==j&&(h==this.s.end&&0!=this.s.read&&(h=0,j=h<this.s.read?this.s.read-
h-1:this.s.end-h),0==j&&(this.s.write=h,a=this.s.inflate_flush(a),h=this.s.write,j=h<this.s.read?this.s.read-h-1:this.s.end-h,h==this.s.end&&0!=this.s.read&&(h=0,j=h<this.s.read?this.s.read-h-1:this.s.end-h),0==j)))return this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);this.s.window[h++]=this.s.window[b++];j--;b==this.s.end&&(b=0);this.len--}this.mode=0;break;case 6:if(0==j&&(h==this.s.end&&0!=this.s.read&&
(h=0,j=h<this.s.read?this.s.read-h-1:this.s.end-h),0==j&&(this.s.write=h,a=this.s.inflate_flush(a),h=this.s.write,j=h<this.s.read?this.s.read-h-1:this.s.end-h,h==this.s.end&&0!=this.s.read&&(h=0,j=h<this.s.read?this.s.read-h-1:this.s.end-h),0==j)))return this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);a=0;this.s.window[h++]=this.lit;j--;this.mode=0;break;case 7:7<e&&(e-=8,g++,f--);this.s.write=h;a=
this.s.inflate_flush(a);h=this.s.write;if(this.s.read!=this.s.write)return this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);this.mode=8;case 8:return a=1,this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);case 9:return a=-3,this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,
this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a);default:return a=-2,this.s.bitb=d,this.s.bitk=e,this.z.avail_in=g,this.z.total_in+=f-this.z.next_in_index,this.z.next_in_index=f,this.s.write=h,this.s.inflate_flush(a)}},"~N");$_M(c$,"free",function(){},"JZ.ZStream");
$_M(c$,"inflate_fast",function(a,b,c,d,e,f,g,h){var j,k,l,n,p,m,q,r,v,u,s,t;m=h.next_in_index;q=h.avail_in;n=g.bitb;p=g.bitk;r=g.write;v=r<g.read?g.read-r-1:g.end-r;a=JZ.InfCodes.inflate_mask[a];u=JZ.InfCodes.inflate_mask[b];do{for(;20>p;)q--,n|=(h.next_in[m++]&255)<<p,p+=8;j=n&a;k=c;l=d;t=3*(l+j);if(0==(b=k[t]))n>>=k[t+1],p-=k[t+1],g.window[r++]=k[t+2],v--;else{do{n>>=k[t+1];p-=k[t+1];if(0!=(b&16)){b&=15;s=k[t+2]+(n&JZ.InfCodes.inflate_mask[b]);n>>=b;for(p-=b;15>p;)q--,n|=(h.next_in[m++]&255)<<p,
p+=8;j=n&u;k=e;l=f;t=3*(l+j);b=k[t];do if(n>>=k[t+1],p-=k[t+1],0!=(b&16)){for(b&=15;p<b;)q--,n|=(h.next_in[m++]&255)<<p,p+=8;j=k[t+2]+(n&JZ.InfCodes.inflate_mask[b]);n>>=b;p-=b;v-=s;if(r>=j)j=r-j,0<r-j&&2>r-j?(g.window[r++]=g.window[j++],g.window[r++]=g.window[j++]):(System.arraycopy(g.window,j,g.window,r,2),r+=2,j+=2),s-=2;else{j=r-j;do j+=g.end;while(0>j);b=g.end-j;if(s>b){s-=b;if(0<r-j&&b>r-j){do g.window[r++]=g.window[j++];while(0!=--b)}else System.arraycopy(g.window,j,g.window,r,b),r+=b;j=0}}if(0<
r-j&&s>r-j){do g.window[r++]=g.window[j++];while(0!=--s)}else System.arraycopy(g.window,j,g.window,r,s),r+=s;break}else if(0==(b&64))j+=k[t+2],j+=n&JZ.InfCodes.inflate_mask[b],t=3*(l+j),b=k[t];else return h.msg="invalid distance code",s=h.avail_in-q,s=p>>3<s?p>>3:s,q+=s,m-=s,p-=s<<3,g.bitb=n,g.bitk=p,h.avail_in=q,h.total_in+=m-h.next_in_index,h.next_in_index=m,g.write=r,-3;while(1);break}if(0==(b&64)){if(j+=k[t+2],j+=n&JZ.InfCodes.inflate_mask[b],t=3*(l+j),0==(b=k[t])){n>>=k[t+1];p-=k[t+1];g.window[r++]=
k[t+2];v--;break}}else{if(0!=(b&32))return s=h.avail_in-q,s=p>>3<s?p>>3:s,q+=s,m-=s,p-=s<<3,g.bitb=n,g.bitk=p,h.avail_in=q,h.total_in+=m-h.next_in_index,h.next_in_index=m,g.write=r,1;h.msg="invalid literal/length code";s=h.avail_in-q;s=p>>3<s?p>>3:s;q+=s;m-=s;p-=s<<3;g.bitb=n;g.bitk=p;h.avail_in=q;h.total_in+=m-h.next_in_index;h.next_in_index=m;g.write=r;return-3}}while(1)}}while(258<=v&&10<=q);s=h.avail_in-q;s=p>>3<s?p>>3:s;m-=s;g.bitb=n;g.bitk=p-(s<<3);h.avail_in=q+s;h.total_in+=m-h.next_in_index;
h.next_in_index=m;g.write=r;return 0},"~N,~N,~A,~N,~A,~N,JZ.InfBlocks,JZ.ZStream");Clazz.defineStatics(c$,"inflate_mask",[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],"Z_OK",0,"Z_STREAM_END",1,"Z_STREAM_ERROR",-2,"Z_DATA_ERROR",-3,"START",0,"LEN",1,"LENEXT",2,"DIST",3,"DISTEXT",4,"COPY",5,"LIT",6,"WASH",7,"END",8,"BADCODE",9);Clazz.declarePackage("java.util.zip");
Clazz.load(["java.io.FilterInputStream"],"java.util.zip.CheckedInputStream",null,function(){c$=Clazz.decorateAsClass(function(){this.cksum=null;Clazz.instantialize(this,arguments)},java.util.zip,"CheckedInputStream",java.io.FilterInputStream);Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,java.util.zip.CheckedInputStream,[a]);this.cksum=b},"java.io.InputStream,JZ.Checksum");Clazz.overrideMethod(c$,"readByteAsInt",function(){var a=this.$in.readByteAsInt();-1!=a&&this.cksum.updateByteAsInt(a);
return a});Clazz.overrideMethod(c$,"read",function(a,b,c){c=this.$in.read(a,b,c);-1!=c&&this.cksum.update(a,b,c);return c},"~A,~N,~N");Clazz.overrideMethod(c$,"skip",function(a){for(var b=Clazz.newByteArray(512,0),c=0;c<a;){var d=a-c,d=this.read(b,0,d<b.length?d:b.length);if(-1==d)break;c+=d}return c},"~N");$_M(c$,"getChecksum",function(){return this.cksum})});Clazz.declarePackage("java.util.zip");
Clazz.load(["JZ.Inflater"],"java.util.zip.Inflater",null,function(){c$=Clazz.declareType(java.util.zip,"Inflater",JZ.Inflater);$_M(c$,"initialize",function(a){return this.init(0,a)},"~B")});Clazz.declarePackage("java.util.zip");Clazz.load(["java.io.IOException"],"java.util.zip.ZipException",null,function(){c$=Clazz.declareType(java.util.zip,"ZipException",java.io.IOException)});Clazz.declarePackage("java.util.zip");c$=Clazz.declareInterface(java.util.zip,"ZipConstants");
Clazz.defineStatics(c$,"LOCSIG",67324752,"EXTSIG",134695760,"CENSIG",33639248,"ENDSIG",101010256,"LOCHDR",30,"EXTHDR",16,"CENHDR",46,"ENDHDR",22,"LOCVER",4,"LOCFLG",6,"LOCHOW",8,"LOCTIM",10,"LOCCRC",14,"LOCSIZ",18,"LOCLEN",22,"LOCNAM",26,"LOCEXT",28,"EXTCRC",4,"EXTSIZ",8,"EXTLEN",12,"CENVEM",4,"CENVER",6,"CENFLG",8,"CENHOW",10,"CENTIM",12,"CENCRC",16,"CENSIZ",20,"CENLEN",24,"CENNAM",28,"CENEXT",30,"CENCOM",32,"CENDSK",34,"CENATT",36,"CENATX",38,"CENOFF",42,"ENDSUB",8,"ENDTOT",10,"ENDSIZ",12,"ENDOFF",
16,"ENDCOM",20);Clazz.declarePackage("java.util.zip");
Clazz.load(["java.util.zip.ZipConstants"],"java.util.zip.ZipEntry",["java.lang.IllegalArgumentException","$.InternalError","$.NullPointerException","java.util.Date"],function(){c$=Clazz.decorateAsClass(function(){this.offset=0;this.name=null;this.method=this.csize=this.size=this.crc=this.time=-1;this.flag=0;this.comment=this.extra=null;Clazz.instantialize(this,arguments)},java.util.zip,"ZipEntry",null,[java.util.zip.ZipConstants,Cloneable]);Clazz.makeConstructor(c$,function(a){if(null==a)throw new NullPointerException;
if(65535<a.length)throw new IllegalArgumentException("entry name too long");this.name=a},"~S");$_M(c$,"getName",function(){return this.name});$_M(c$,"setTime",function(a){this.time=java.util.zip.ZipEntry.javaToDosTime(a)},"~N");$_M(c$,"getTime",function(){return-1!=this.time?java.util.zip.ZipEntry.dosToJavaTime(this.time):-1});$_M(c$,"setSize",function(a){if(0>a)throw new IllegalArgumentException("invalid entry size");this.size=a},"~N");$_M(c$,"getSize",function(){return this.size});$_M(c$,"getCompressedSize",
function(){return this.csize});$_M(c$,"setCompressedSize",function(a){this.csize=a},"~N");$_M(c$,"setCrc",function(a){if(0>a||4294967295<a)throw new IllegalArgumentException("invalid entry crc-32");this.crc=a},"~N");$_M(c$,"getCrc",function(){return this.crc});$_M(c$,"setMethod",function(a){if(0!=a&&8!=a)throw new IllegalArgumentException("invalid compression method");this.method=a},"~N");$_M(c$,"getMethod",function(){return this.method});$_M(c$,"setExtra",function(a){if(null!=a&&65535<a.length)throw new IllegalArgumentException("invalid extra field length");
this.extra=a},"~A");$_M(c$,"getExtra",function(){return this.extra});$_M(c$,"setComment",function(a){this.comment=a},"~S");$_M(c$,"getComment",function(){return this.comment});$_M(c$,"isDirectory",function(){return this.name.endsWith("/")});Clazz.overrideMethod(c$,"toString",function(){return this.getName()});c$.dosToJavaTime=$_M(c$,"dosToJavaTime",($fz=function(a){return(new java.util.Date((a>>25&127)+80,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,a<<1&62)).getTime()},$fz.isPrivate=!0,$fz),"~N");c$.javaToDosTime=
$_M(c$,"javaToDosTime",($fz=function(a){a=new java.util.Date(a);var b=a.getYear()+1900;return 1980>b?2162688:b-1980<<25|a.getMonth()+1<<21|a.getDate()<<16|a.getHours()<<11|a.getMinutes()<<5|a.getSeconds()>>1},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"hashCode",function(){return this.name.hashCode()});$_M(c$,"clone",function(){try{var a=Clazz.superCall(this,java.util.zip.ZipEntry,"clone",[]);null!=this.extra&&(a.extra=Clazz.newByteArray(this.extra.length,0),System.arraycopy(this.extra,0,
a.extra,0,this.extra.length));return a}catch(b){if(Clazz.exceptionOf(b,CloneNotSupportedException))throw new InternalError;throw b;}});Clazz.defineStatics(c$,"STORED",0,"DEFLATED",8)});Clazz.declarePackage("java.util.zip");c$=Clazz.declareType(java.util.zip,"ZipConstants64");
Clazz.defineStatics(c$,"ZIP64_ENDSIG",101075792,"ZIP64_LOCSIG",117853008,"ZIP64_ENDHDR",56,"ZIP64_LOCHDR",20,"ZIP64_EXTHDR",24,"ZIP64_EXTID",1,"ZIP64_MAGICCOUNT",65535,"ZIP64_MAGICVAL",4294967295,"ZIP64_ENDLEN",4,"ZIP64_ENDVEM",12,"ZIP64_ENDVER",14,"ZIP64_ENDNMD",16,"ZIP64_ENDDSK",20,"ZIP64_ENDTOD",24,"ZIP64_ENDTOT",32,"ZIP64_ENDSIZ",40,"ZIP64_ENDOFF",48,"ZIP64_ENDEXT",56,"ZIP64_LOCDSK",4,"ZIP64_LOCOFF",8,"ZIP64_LOCTOT",16,"ZIP64_EXTCRC",4,"ZIP64_EXTSIZ",8,"ZIP64_EXTLEN",16,"EFS",2048);Clazz.declarePackage("java.util.zip");
Clazz.load(["java.util.zip.InflaterInputStream","$.ZipConstants","$.CRC32"],"java.util.zip.ZipInputStream","java.io.EOFException $.IOException $.PushbackInputStream java.lang.IllegalArgumentException $.IndexOutOfBoundsException $.Long $.NullPointerException java.util.zip.Inflater $.ZipEntry $.ZipException".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.entry=null;this.flag=0;this.crc=null;this.remaining=0;this.tmpbuf=null;this.entryEOF=this.$closed=!1;this.$b=this.byteTest=this.zc=
null;Clazz.instantialize(this,arguments)},java.util.zip,"ZipInputStream",java.util.zip.InflaterInputStream,java.util.zip.ZipConstants);Clazz.prepareFields(c$,function(){this.crc=new java.util.zip.CRC32;this.tmpbuf=Clazz.newByteArray(512,0);this.byteTest=[32];this.$b=Clazz.newByteArray(256,0)});$_M(c$,"ensureOpen",($fz=function(){if(this.$closed)throw new java.io.IOException("Stream closed");},$fz.isPrivate=!0,$fz));Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.util.zip.ZipInputStream,
[new java.io.PushbackInputStream(a,1024),java.util.zip.ZipInputStream.newInflater(),512]);try{String.instantialize(this.byteTest,"UTF-8")}catch(b){if(Clazz.exceptionOf(b,java.io.UnsupportedEncodingException))throw new NullPointerException("charset is invalid");throw b;}this.zc="UTF-8"},"java.io.InputStream");c$.newInflater=$_M(c$,"newInflater",($fz=function(){return(new java.util.zip.Inflater).init(0,!0)},$fz.isPrivate=!0,$fz));$_M(c$,"getNextEntry",function(){this.ensureOpen();null!=this.entry&&
this.closeEntry();this.crc.reset();this.inflater=this.inf=java.util.zip.ZipInputStream.newInflater();if(null==(this.entry=this.readLOC()))return null;0==this.entry.method&&(this.remaining=this.entry.size);this.entryEOF=!1;return this.entry});$_M(c$,"closeEntry",function(){for(this.ensureOpen();-1!=this.read(this.tmpbuf,0,this.tmpbuf.length););this.entryEOF=!0});Clazz.overrideMethod(c$,"available",function(){this.ensureOpen();return this.entryEOF?0:1});Clazz.overrideMethod(c$,"read",function(a,b,c){this.ensureOpen();
if(0>b||0>c||b>a.length-c)throw new IndexOutOfBoundsException;if(0==c)return 0;if(null==this.entry)return-1;switch(this.entry.method){case 8:return c=this.readInf(a,b,c),-1==c?(this.readEnd(this.entry),this.entryEOF=!0,this.entry=null):this.crc.update(a,b,c),c;case 0:if(0>=this.remaining)return this.entryEOF=!0,this.entry=null,-1;c>this.remaining&&(c=this.remaining);c=this.$in.read(a,b,c);if(-1==c)throw new java.util.zip.ZipException("unexpected EOF");this.crc.update(a,b,c);this.remaining-=c;if(0==
this.remaining&&this.entry.crc!=this.crc.getValue())throw new java.util.zip.ZipException("invalid entry CRC (expected 0x"+Long.toHexString(this.entry.crc)+" but got 0x"+Long.toHexString(this.crc.getValue())+")");return c;default:throw new java.util.zip.ZipException("invalid compression method");}},"~A,~N,~N");Clazz.overrideMethod(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("negative skip length");this.ensureOpen();a=Math.min(a,2147483647);for(var b=0;b<a;){var c=a-b;c>this.tmpbuf.length&&
(c=this.tmpbuf.length);c=this.read(this.tmpbuf,0,c);if(-1==c){this.entryEOF=!0;break}b+=c}return b},"~N");$_M(c$,"close",function(){this.$closed||(Clazz.superCall(this,java.util.zip.ZipInputStream,"close",[]),this.$closed=!0)});$_M(c$,"readLOC",($fz=function(){try{this.readFully(this.tmpbuf,0,30)}catch(a){if(Clazz.exceptionOf(a,java.io.EOFException))return null;throw a;}if(67324752!=java.util.zip.ZipInputStream.get32(this.tmpbuf,0))return null;this.flag=java.util.zip.ZipInputStream.get16(this.tmpbuf,
6);var b=java.util.zip.ZipInputStream.get16(this.tmpbuf,26),c=this.$b.length;if(b>c){do c*=2;while(b>c);this.$b=Clazz.newByteArray(c,0)}this.readFully(this.$b,0,b);c=this.createZipEntry(0!=(this.flag&2048)?this.toStringUTF8(this.$b,b):this.toStringb2(this.$b,b));if(1==(this.flag&1))throw new java.util.zip.ZipException("encrypted ZIP entry not supported");c.method=java.util.zip.ZipInputStream.get16(this.tmpbuf,8);c.time=java.util.zip.ZipInputStream.get32(this.tmpbuf,10);if(8==(this.flag&8)){if(8!=
c.method)throw new java.util.zip.ZipException("only DEFLATED entries can have EXT descriptor");}else c.crc=java.util.zip.ZipInputStream.get32(this.tmpbuf,14),c.csize=java.util.zip.ZipInputStream.get32(this.tmpbuf,18),c.size=java.util.zip.ZipInputStream.get32(this.tmpbuf,22);b=java.util.zip.ZipInputStream.get16(this.tmpbuf,28);if(0<b){var d=Clazz.newByteArray(b,0);this.readFully(d,0,b);c.setExtra(d);if(4294967295==c.csize||4294967295==c.size)for(var e=0;e+4<b;){var f=java.util.zip.ZipInputStream.get16(d,
e+2);if(1==java.util.zip.ZipInputStream.get16(d,e)){e+=4;if(16>f||e+f>b)break;c.size=java.util.zip.ZipInputStream.get64(d,e);c.csize=java.util.zip.ZipInputStream.get64(d,e+8);break}e+=f+4}}return c},$fz.isPrivate=!0,$fz));$_M(c$,"toStringUTF8",($fz=function(a,b){try{return String.instantialize(a,0,b,this.zc)}catch(c){if(Clazz.exceptionOf(c,java.io.UnsupportedEncodingException))return this.toStringb2(a,b);throw c;}},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"toStringb2",($fz=function(a,b){return String.instantialize(a,
0,b)},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"createZipEntry",function(a){return new java.util.zip.ZipEntry(a)},"~S");$_M(c$,"readEnd",($fz=function(a){var b=this.inf.getAvailIn();0<b&&(this.$in.unread(this.buf,this.len-b,b),this.eof=!1);8==(this.flag&8)&&(4294967295<this.inf.getTotalOut()||4294967295<this.inf.getTotalIn()?(this.readFully(this.tmpbuf,0,24),b=java.util.zip.ZipInputStream.get32(this.tmpbuf,0),134695760!=b?(a.crc=b,a.csize=java.util.zip.ZipInputStream.get64(this.tmpbuf,4),a.size=java.util.zip.ZipInputStream.get64(this.tmpbuf,
12),this.$in.unread(this.tmpbuf,19,4)):(a.crc=java.util.zip.ZipInputStream.get32(this.tmpbuf,4),a.csize=java.util.zip.ZipInputStream.get64(this.tmpbuf,8),a.size=java.util.zip.ZipInputStream.get64(this.tmpbuf,16))):(this.readFully(this.tmpbuf,0,16),b=java.util.zip.ZipInputStream.get32(this.tmpbuf,0),134695760!=b?(a.crc=b,a.csize=java.util.zip.ZipInputStream.get32(this.tmpbuf,4),a.size=java.util.zip.ZipInputStream.get32(this.tmpbuf,8),this.$in.unread(this.tmpbuf,11,4)):(a.crc=java.util.zip.ZipInputStream.get32(this.tmpbuf,
4),a.csize=java.util.zip.ZipInputStream.get32(this.tmpbuf,8),a.size=java.util.zip.ZipInputStream.get32(this.tmpbuf,12))));if(a.size!=this.inf.getTotalOut())throw new java.util.zip.ZipException("invalid entry size (expected "+a.size+" but got "+this.inf.getTotalOut()+" bytes)");if(a.csize!=this.inf.getTotalIn())throw new java.util.zip.ZipException("invalid entry compressed size (expected "+a.csize+" but got "+this.inf.getTotalIn()+" bytes)");if(a.crc!=this.crc.getValue())throw new java.util.zip.ZipException("invalid entry CRC (expected 0x"+
Long.toHexString(a.crc)+" but got 0x"+Long.toHexString(this.crc.getValue())+")");},$fz.isPrivate=!0,$fz),"java.util.zip.ZipEntry");$_M(c$,"readFully",($fz=function(a,b,c){for(;0<c;){var d=this.$in.read(a,b,c);if(-1==d)throw new java.io.EOFException;b+=d;c-=d}},$fz.isPrivate=!0,$fz),"~A,~N,~N");c$.get16=$_M(c$,"get16",($fz=function(a,b){return a[b]&255|(a[b+1]&255)<<8},$fz.isPrivate=!0,$fz),"~A,~N");c$.get32=$_M(c$,"get32",($fz=function(a,b){return(java.util.zip.ZipInputStream.get16(a,b)|java.util.zip.ZipInputStream.get16(a,
b+2)<<16)&4294967295},$fz.isPrivate=!0,$fz),"~A,~N");c$.get64=$_M(c$,"get64",($fz=function(a,b){return java.util.zip.ZipInputStream.get32(a,b)|java.util.zip.ZipInputStream.get32(a,b+4)<<32},$fz.isPrivate=!0,$fz),"~A,~N");Clazz.defineStatics(c$,"STORED",0,"DEFLATED",8)});
Clazz.load(["java.io.FilterInputStream"],"java.io.PushbackInputStream",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=Clazz.decorateAsClass(function(){this.buf=null;this.pos=0;Clazz.instantialize(this,arguments)},java.io,"PushbackInputStream",java.io.FilterInputStream);$_M(c$,"ensureOpen",($fz=function(){if(null==this.$in)throw new java.io.IOException("Stream closed");},$fz.isPrivate=!0,$fz));Clazz.makeConstructor(c$,
function(a,b){Clazz.superConstructor(this,java.io.PushbackInputStream,[a]);if(0>=b)throw new IllegalArgumentException("size <= 0");this.buf=Clazz.newByteArray(b,0);this.pos=b},"java.io.InputStream,~N");Clazz.overrideMethod(c$,"readByteAsInt",function(){this.ensureOpen();return this.pos<this.buf.length?this.buf[this.pos++]&255:this.$in.readByteAsInt()});Clazz.overrideMethod(c$,"read",function(a,b,c){this.ensureOpen();if(null==a)throw new NullPointerException;if(0>b||0>c||c>a.length-b)throw new IndexOutOfBoundsException;
if(0==c)return 0;var d=this.buf.length-this.pos;0<d&&(c<d&&(d=c),System.arraycopy(this.buf,this.pos,a,b,d),this.pos+=d,b+=d,c-=d);return 0<c?(c=this.$in.read(a,b,c),-1==c?0==d?-1:d:d+c):d},"~A,~N,~N");$_M(c$,"unreadByte",function(a){this.ensureOpen();if(0==this.pos)throw new java.io.IOException("Push back buffer is full");this.buf[--this.pos]=a},"~N");$_M(c$,"unread",function(a,b,c){this.ensureOpen();if(c>this.pos)throw new java.io.IOException("Push back buffer is full");this.pos-=c;System.arraycopy(a,
b,this.buf,this.pos,c)},"~A,~N,~N");Clazz.overrideMethod(c$,"available",function(){this.ensureOpen();var a=this.buf.length-this.pos,b=this.$in.available();return a>2147483647-b?2147483647:a+b});Clazz.overrideMethod(c$,"skip",function(a){this.ensureOpen();if(0>=a)return 0;var b=this.buf.length-this.pos;0<b&&(a<b&&(b=a),this.pos+=b,a-=b);0<a&&(b+=this.$in.skip(a));return b},"~N");Clazz.overrideMethod(c$,"markSupported",function(){return!1});Clazz.overrideMethod(c$,"mark",function(){},"~N");Clazz.overrideMethod(c$,
"reset",function(){throw new java.io.IOException("mark/reset not supported");});Clazz.overrideMethod(c$,"close",function(){null!=this.$in&&(this.$in.close(),this.buf=this.$in=null)})});Clazz.declarePackage("J.api");Clazz.declareInterface(J.api,"ZInputStream");Clazz.declarePackage("J.io2");Clazz.load(["java.util.zip.ZipInputStream","J.api.ZInputStream"],"J.io2.JmolZipInputStream",null,function(){c$=Clazz.declareType(J.io2,"JmolZipInputStream",java.util.zip.ZipInputStream,J.api.ZInputStream)});Clazz.declarePackage("JZ");
Clazz.load(["java.io.FilterOutputStream"],"JZ.DeflaterOutputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException"],function(){c$=Clazz.decorateAsClass(function(){this.buffer=this.deflater=null;this.syncFlush=this.closed=!1;this.buf1=null;this.mydeflater=!1;this.close_out=!0;Clazz.instantialize(this,arguments)},JZ,"DeflaterOutputStream",java.io.FilterOutputStream);Clazz.prepareFields(c$,function(){this.buf1=Clazz.newByteArray(1,0)});Clazz.makeConstructor(c$,function(a,b,c,d){Clazz.superConstructor(this,
JZ.DeflaterOutputStream,[a]);0==c&&(c=512);this.deflater=b;this.buffer=Clazz.newByteArray(c,0);this.close_out=d},"java.io.OutputStream,JZ.Deflater,~N,~B");Clazz.overrideMethod(c$,"writeByteAsInt",function(a){this.buf1[0]=a&255;this.write(this.buf1,0,1)},"~N");$_M(c$,"write",function(a,b,c){if(this.deflater.finished())throw new java.io.IOException("finished");if((new Boolean((new Boolean(0>b|0>c)).valueOf()|b+c>a.length)).valueOf())throw new IndexOutOfBoundsException;if(0!=c){var d=this.syncFlush?
2:0;for(this.deflater.setInput(a,b,c,!0);0<this.deflater.avail_in&&1!=this.deflate(d););}},"~A,~N,~N");$_M(c$,"finish",function(){for(;!this.deflater.finished();)this.deflate(4)});Clazz.overrideMethod(c$,"close",function(){this.closed||(this.finish(),this.mydeflater&&this.deflater.end(),this.close_out&&this.out.close(),this.closed=!0)});$_M(c$,"deflate",function(a){this.deflater.setOutput(this.buffer,0,this.buffer.length);var b=this.deflater.deflate(a);switch(b){case 0:case 1:break;case -5:if(0>=
this.deflater.avail_in&&4!=a)break;default:throw new java.io.IOException("failed to deflate");}a=this.deflater.next_out_index;0<a&&this.out.write(this.buffer,0,a);return b},"~N");Clazz.overrideMethod(c$,"flush",function(){if(this.syncFlush&&!this.deflater.finished())for(;;){var a=this.deflate(2);if(this.deflater.next_out_index<this.buffer.length)break;if(1==a)break}this.out.flush()});$_M(c$,"getTotalIn",function(){return this.deflater.getTotalIn()});$_M(c$,"getTotalOut",function(){return this.deflater.getTotalOut()});
$_M(c$,"setSyncFlush",function(a){this.syncFlush=a},"~B");$_M(c$,"getSyncFlush",function(){return this.syncFlush});$_M(c$,"getDeflater",function(){return this.deflater});Clazz.defineStatics(c$,"DEFAULT_BUFSIZE",512)});Clazz.declarePackage("java.util.zip");
Clazz.load(["JZ.Deflater"],"java.util.zip.Deflater",null,function(){c$=Clazz.declareType(java.util.zip,"Deflater",JZ.Deflater);Clazz.makeConstructor(c$,function(a){2147483647!=a&&this.init(a,0,!1)},"~N");Clazz.defineStatics(c$,"DEFAULT_COMPRESSION",-1)});Clazz.declarePackage("java.util.zip");
Clazz.load(["JZ.DeflaterOutputStream"],"java.util.zip.DeflaterOutputStream",null,function(){c$=Clazz.declareType(java.util.zip,"DeflaterOutputStream",JZ.DeflaterOutputStream);Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,java.util.zip.DeflaterOutputStream,[a,b,0,!0])},"java.io.OutputStream,java.util.zip.Deflater")});Clazz.declarePackage("java.util.zip");
Clazz.load(["java.util.zip.DeflaterOutputStream","$.ZipConstants","java.util.Hashtable","java.util.zip.CRC32","J.util.JmolList"],"java.util.zip.ZipOutputStream","JZ.ZStream java.io.IOException java.lang.Boolean $.IllegalArgumentException $.IndexOutOfBoundsException $.Long java.util.zip.Deflater $.ZipException".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.crc=this.names=this.xentries=this.current=null;this.locoff=this.written=0;this.comment=null;this.method=8;this.$closed=this.finished=
!1;Clazz.instantialize(this,arguments)},java.util.zip,"ZipOutputStream",java.util.zip.DeflaterOutputStream,java.util.zip.ZipConstants);Clazz.prepareFields(c$,function(){this.xentries=new J.util.JmolList;this.names=new java.util.Hashtable;this.crc=new java.util.zip.CRC32});c$.version=$_M(c$,"version",($fz=function(a){switch(a.method){case 8:return 20;case 0:return 10;default:throw new java.util.zip.ZipException("unsupported compression method");}},$fz.isPrivate=!0,$fz),"java.util.zip.ZipEntry");$_M(c$,
"ensureOpen",($fz=function(){if(this.$closed)throw new java.io.IOException("Stream closed");},$fz.isPrivate=!0,$fz));Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,java.util.zip.ZipOutputStream,[a,java.util.zip.ZipOutputStream.newDeflater()])},"java.io.OutputStream");c$.newDeflater=$_M(c$,"newDeflater",($fz=function(){return(new java.util.zip.Deflater(2147483647)).init(-1,0,!0)},$fz.isPrivate=!0,$fz));$_M(c$,"setComment",function(a){if(null!=a&&(this.comment=JZ.ZStream.getBytes(a),
65535<this.comment.length))throw new IllegalArgumentException("ZIP file comment too long.");},"~S");$_M(c$,"putNextEntry",function(a){this.ensureOpen();null!=this.current&&this.closeEntry();-1==a.time&&a.setTime(System.currentTimeMillis());-1==a.method&&(a.method=this.method);a.flag=0;switch(a.method){case 8:if(-1==a.size||-1==a.csize||-1==a.crc)a.flag=8;break;case 0:if(-1==a.size)a.size=a.csize;else if(-1==a.csize)a.csize=a.size;else if(a.size!=a.csize)throw new java.util.zip.ZipException("STORED entry where compressed != uncompressed size");
if(-1==a.size||-1==a.crc)throw new java.util.zip.ZipException("STORED entry missing size, compressed size, or crc-32");break;default:throw new java.util.zip.ZipException("unsupported compression method");}if(this.names.containsKey(a.name))throw new java.util.zip.ZipException("duplicate entry: "+a.name);this.names.put(a.name,Boolean.TRUE);a.flag|=2048;this.current=a;this.current.offset=this.written;this.xentries.addLast(this.current);this.writeLOC(this.current)},"java.util.zip.ZipEntry");$_M(c$,"closeEntry",
function(){this.ensureOpen();if(null!=this.current){var a=this.current;switch(a.method){case 8:this.deflater.finish();Clazz.superCall(this,java.util.zip.ZipOutputStream,"finish",[]);if(0==(a.flag&8)){if(a.size!=this.deflater.getBytesRead())throw new java.util.zip.ZipException("invalid entry size (expected "+a.size+" but got "+this.deflater.getBytesRead()+" bytes)");if(a.csize!=this.deflater.getBytesWritten())throw new java.util.zip.ZipException("invalid entry compressed size (expected "+a.csize+" but got "+
this.deflater.getBytesWritten()+" bytes)");if(a.crc!=this.crc.getValue())throw new java.util.zip.ZipException("invalid entry CRC-32 (expected 0x"+Long.toHexString(a.crc)+" but got 0x"+Long.toHexString(this.crc.getValue())+")");}else a.size=this.deflater.getBytesRead(),a.csize=this.deflater.getBytesWritten(),a.crc=this.crc.getValue(),this.writeEXT(a);this.deflater=java.util.zip.ZipOutputStream.newDeflater();this.written+=a.csize;break;case 0:if(a.size!=this.written-this.locoff)throw new java.util.zip.ZipException("invalid entry size (expected "+
a.size+" but got "+(this.written-this.locoff)+" bytes)");if(a.crc!=this.crc.getValue())throw new java.util.zip.ZipException("invalid entry crc-32 (expected 0x"+Long.toHexString(a.crc)+" but got 0x"+Long.toHexString(this.crc.getValue())+")");break;default:throw new java.util.zip.ZipException("invalid compression method");}this.crc.reset();this.current=null}});$_M(c$,"write",function(a,b,c){this.ensureOpen();if(0>b||0>c||b>a.length-c)throw new IndexOutOfBoundsException;if(0!=c){if(null==this.current)throw new java.util.zip.ZipException("no current ZIP entry");
var d=this.current;switch(d.method){case 8:Clazz.superCall(this,java.util.zip.ZipOutputStream,"write",[a,b,c]);break;case 0:this.written+=c;if(this.written-this.locoff>d.size)throw new java.util.zip.ZipException("attempt to write past end of STORED entry");this.out.write(a,b,c);break;default:throw new java.util.zip.ZipException("invalid compression method");}this.crc.update(a,b,c)}},"~A,~N,~N");$_M(c$,"finish",function(){this.ensureOpen();if(!this.finished){null!=this.current&&this.closeEntry();for(var a=
this.written,b,c=this.xentries.iterator();c.hasNext()&&((b=c.next())||1);)this.writeCEN(b);this.writeEND(a,this.written-a);this.finished=!0}});$_M(c$,"close",function(){this.$closed||(Clazz.superCall(this,java.util.zip.ZipOutputStream,"close",[]),this.$closed=!0)});$_M(c$,"writeLOC",($fz=function(a){var b=a.flag,c=null!=a.extra?a.extra.length:0,d=!1;this.writeInt(67324752);8==(b&8)?(this.writeShort(java.util.zip.ZipOutputStream.version(a)),this.writeShort(b),this.writeShort(a.method),this.writeInt(a.time),
this.writeInt(0),this.writeInt(0),this.writeInt(0)):(4294967295<=a.csize||4294967295<=a.size?(d=!0,this.writeShort(45)):this.writeShort(java.util.zip.ZipOutputStream.version(a)),this.writeShort(b),this.writeShort(a.method),this.writeInt(a.time),this.writeInt(a.crc),d?(this.writeInt(4294967295),this.writeInt(4294967295),c+=20):(this.writeInt(a.csize),this.writeInt(a.size)));b=JZ.ZStream.getBytes(a.name);this.writeShort(b.length);this.writeShort(c);this.writeBytes(b,0,b.length);d&&(this.writeShort(1),
this.writeShort(16),this.writeLong(a.size),this.writeLong(a.csize));null!=a.extra&&this.writeBytes(a.extra,0,a.extra.length);this.locoff=this.written},$fz.isPrivate=!0,$fz),"java.util.zip.ZipEntry");$_M(c$,"writeEXT",($fz=function(a){this.writeInt(134695760);this.writeInt(a.crc);4294967295<=a.csize||4294967295<=a.size?(this.writeLong(a.csize),this.writeLong(a.size)):(this.writeInt(a.csize),this.writeInt(a.size))},$fz.isPrivate=!0,$fz),"java.util.zip.ZipEntry");$_M(c$,"writeCEN",($fz=function(a){var b=
a.flag,c=java.util.zip.ZipOutputStream.version(a),d=a.csize,e=a.size,f=a.offset,g=0,h=!1;4294967295<=a.csize&&(d=4294967295,g+=8,h=!0);4294967295<=a.size&&(e=4294967295,g+=8,h=!0);4294967295<=a.offset&&(f=4294967295,g+=8,h=!0);this.writeInt(33639248);h?(this.writeShort(45),this.writeShort(45)):(this.writeShort(c),this.writeShort(c));this.writeShort(b);this.writeShort(a.method);this.writeInt(a.time);this.writeInt(a.crc);this.writeInt(d);this.writeInt(e);b=JZ.ZStream.getBytes(a.name);this.writeShort(b.length);
h?this.writeShort(g+4+(null!=a.extra?a.extra.length:0)):this.writeShort(null!=a.extra?a.extra.length:0);null!=a.comment?(c=JZ.ZStream.getBytes(a.comment),this.writeShort(Math.min(c.length,65535))):(c=null,this.writeShort(0));this.writeShort(0);this.writeShort(0);this.writeInt(0);this.writeInt(f);this.writeBytes(b,0,b.length);h&&(this.writeShort(1),this.writeShort(g),4294967295==e&&this.writeLong(a.size),4294967295==d&&this.writeLong(a.csize),4294967295==f&&this.writeLong(a.offset));null!=a.extra&&
this.writeBytes(a.extra,0,a.extra.length);null!=c&&this.writeBytes(c,0,Math.min(c.length,65535))},$fz.isPrivate=!0,$fz),"java.util.zip.ZipEntry");$_M(c$,"writeEND",($fz=function(a,b){var c=!1,d=b,e=a;4294967295<=d&&(d=4294967295,c=!0);4294967295<=e&&(e=4294967295,c=!0);var f=this.xentries.size();65535<=f&&(f=65535,c=!0);c&&(c=this.written,this.writeInt(101075792),this.writeLong(44),this.writeShort(45),this.writeShort(45),this.writeInt(0),this.writeInt(0),this.writeLong(this.xentries.size()),this.writeLong(this.xentries.size()),
this.writeLong(b),this.writeLong(a),this.writeInt(117853008),this.writeInt(0),this.writeLong(c),this.writeInt(1));this.writeInt(101010256);this.writeShort(0);this.writeShort(0);this.writeShort(f);this.writeShort(f);this.writeInt(d);this.writeInt(e);null!=this.comment?(this.writeShort(this.comment.length),this.writeBytes(this.comment,0,this.comment.length)):this.writeShort(0)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"writeShort",($fz=function(a){var b=this.out;b.writeByteAsInt(a>>>0&255);b.writeByteAsInt(a>>>
8&255);this.written+=2},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"writeInt",($fz=function(a){var b=this.out;b.writeByteAsInt(a>>>0&255);b.writeByteAsInt(a>>>8&255);b.writeByteAsInt(a>>>16&255);b.writeByteAsInt(a>>>24&255);this.written+=4},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"writeLong",($fz=function(a){var b=this.out;b.writeByteAsInt(a>>>0&255);b.writeByteAsInt(a>>>8&255);b.writeByteAsInt(a>>>16&255);b.writeByteAsInt(a>>>24&255);b.writeByteAsInt(0);b.writeByteAsInt(0);b.writeByteAsInt(0);b.writeByteAsInt(0);
this.written+=8},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"writeBytes",($fz=function(a,b,c){this.out.write(a,b,c);this.written+=c},$fz.isPrivate=!0,$fz),"~A,~N,~N");Clazz.defineStatics(c$,"STORED",0,"DEFLATED",8)});Clazz.declarePackage("J.io2");
Clazz.load(["J.util.ArrayUtil"],["J.io2.Huffman","$.JpegEncoder","$.JpegObj","$.DCT"],["java.io.BufferedOutputStream","$.ByteArrayOutputStream","J.util.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.dct=this.huf=this.jpegObj=this.outStream=null;this.jpegQuality=0;Clazz.instantialize(this,arguments)},J.io2,"JpegEncoder");Clazz.makeConstructor(c$,function(a,b,c,d,e){this.jpegQuality=c;this.jpegObj=new J.io2.JpegObj(a,b,e);this.outStream=new java.io.BufferedOutputStream(d);this.dct=new J.io2.DCT(this.jpegQuality);
this.huf=new J.io2.Huffman(this.jpegObj.imageWidth,this.jpegObj.imageHeight)},"J.api.ApiPlatform,~O,~N,java.io.OutputStream,~S");c$.getBytes=$_M(c$,"getBytes",function(a,b,c,d){var e=new java.io.ByteArrayOutputStream;J.io2.JpegEncoder.write(a,b,c,e,d);try{e.flush(),e.close()}catch(f){if(!Clazz.exceptionOf(f,java.io.IOException))throw f;}return e.toByteArray()},"J.api.ApiPlatform,~O,~N,~S");c$.write=$_M(c$,"write",function(a,b,c,d,e){(new J.io2.JpegEncoder(a,b,c,d,e)).Compress()},"J.api.ApiPlatform,~O,~N,java.io.OutputStream,~S");
$_M(c$,"Compress",function(){if(null!=this.jpegObj){var a=J.io2.JpegEncoder.WriteHeaders(this.outStream,this.jpegObj,this.dct);J.io2.JpegEncoder.WriteCompressedData(this.outStream,this.jpegObj,this.dct,this.huf);J.io2.JpegEncoder.WriteEOI(this.outStream);if(null!=a)try{var b=a.getBytes();this.outStream.write(b,0,b.length)}catch(c){if(Clazz.exceptionOf(c,java.io.IOException))System.out.println("ERROR WRITING COMMENT");else throw c;}try{this.outStream.flush()}catch(d){if(Clazz.exceptionOf(d,java.io.IOException))J.util.Logger.errorEx("IO Error",
d);else throw d;}}});c$.WriteCompressedData=$_M(c$,"WriteCompressedData",($fz=function(a,b,c,d){var e,f,g,h,j,k,l,n,p,m,q,r,v=Clazz.newFloatArray(8,8,0);j=Clazz.newDoubleArray(8,8,0);j=Clazz.newIntArray(64,0);var u=Clazz.newIntArray(b.numberOfComponents,0),s,t;s=0!=d.imageWidth%8?8*Clazz.doubleToInt(Math.floor(d.imageWidth/8)+1):d.imageWidth;t=0!=d.imageHeight%8?8*Clazz.doubleToInt(Math.floor(d.imageHeight/8)+1):d.imageHeight;for(l=0;l<b.numberOfComponents;l++)s=Math.min(s,b.blockWidth[l]),t=Math.min(t,
b.blockHeight[l]);for(g=0;g<t;g++)for(h=0;h<s;h++){n=8*h;p=8*g;for(l=0;l<b.numberOfComponents;l++){r=b.components[l];var w=b.vsampFactor[l],y=b.hsampFactor[l],x=b.qtableNumber[l],A=b.dctableNumber[l],D=b.actableNumber[l];for(e=0;e<w;e++)for(f=0;f<y;f++){m=8*f;q=8*e;for(j=0;8>j;j++)for(k=0;8>k;k++)v[j][k]=r[p+q+j][n+m+k];j=J.io2.DCT.forwardDCT(v);j=J.io2.DCT.quantizeBlock(j,c.divisors[x]);d.HuffmanBlockEncoder(a,j,u[l],A,D);u[l]=j[0]}}}d.flushBuffer(a)},$fz.isPrivate=!0,$fz),"java.io.BufferedOutputStream,J.io2.JpegObj,J.io2.DCT,J.io2.Huffman");
c$.WriteEOI=$_M(c$,"WriteEOI",($fz=function(a){J.io2.JpegEncoder.WriteMarker(J.io2.JpegEncoder.eoi,a)},$fz.isPrivate=!0,$fz),"java.io.BufferedOutputStream");c$.WriteHeaders=$_M(c$,"WriteHeaders",($fz=function(a,b,c){var d,e,f,g;J.io2.JpegEncoder.WriteMarker(J.io2.JpegEncoder.soi,a);J.io2.JpegEncoder.writeArray(J.io2.JpegEncoder.jfif,a);0<b.comment.length&&J.io2.JpegEncoder.writeString(b.comment,225,a);J.io2.JpegEncoder.writeString("JPEG Encoder Copyright 1998, James R. Weeks and BioElectroMech.\n\n",
254,a);var h=Clazz.newByteArray(134,0);h[0]=255;h[1]=219;h[2]=0;h[3]=132;f=4;for(d=0;2>d;d++){h[f++]=0+d;g=c.quantum[d];for(e=0;64>e;e++)h[f++]=g[J.io2.Huffman.jpegNaturalOrder[e]]}J.io2.JpegEncoder.writeArray(h,a);e=Clazz.newByteArray(19,0);e[0]=255;e[1]=192;e[2]=0;e[3]=17;e[4]=b.precision;e[5]=b.imageHeight>>8&255;e[6]=b.imageHeight&255;e[7]=b.imageWidth>>8&255;e[8]=b.imageWidth&255;e[9]=b.numberOfComponents;c=10;for(d=0;d<e[9];d++)e[c++]=b.compID[d],e[c++]=(b.hsampFactor[d]<<4)+b.vsampFactor[d],
e[c++]=b.qtableNumber[d];J.io2.JpegEncoder.writeArray(e,a);J.io2.JpegEncoder.WriteDHTHeader(J.io2.Huffman.bitsDCluminance,J.io2.Huffman.valDCluminance,a);J.io2.JpegEncoder.WriteDHTHeader(J.io2.Huffman.bitsACluminance,J.io2.Huffman.valACluminance,a);J.io2.JpegEncoder.WriteDHTHeader(J.io2.Huffman.bitsDCchrominance,J.io2.Huffman.valDCchrominance,a);J.io2.JpegEncoder.WriteDHTHeader(J.io2.Huffman.bitsACchrominance,J.io2.Huffman.valACchrominance,a);e=Clazz.newByteArray(14,0);e[0]=255;e[1]=218;e[2]=0;e[3]=
12;e[4]=b.numberOfComponents;c=5;for(d=0;d<e[4];d++)e[c++]=b.compID[d],e[c++]=(b.dctableNumber[d]<<4)+b.actableNumber[d];e[c++]=b.ss;e[c++]=b.se;e[c++]=(b.ah<<4)+b.al;J.io2.JpegEncoder.writeArray(e,a);return null},$fz.isPrivate=!0,$fz),"java.io.BufferedOutputStream,J.io2.JpegObj,J.io2.DCT");c$.writeString=$_M(c$,"writeString",($fz=function(a,b,c){for(var d=a.length,e=0,f=" #Jmol...\x00";e<d;){var g=d-e;if(65510<g){var g=65500,h=a.lastIndexOf("\n",e+g);h>e+1&&(g=h-e)}e+g==d&&(f="");J.io2.JpegEncoder.writeTag(g+
f.length,b,c);J.io2.JpegEncoder.writeArray(a.substring(e,e+g).getBytes(),c);0<f.length&&J.io2.JpegEncoder.writeArray(f.getBytes(),c);e+=g}},$fz.isPrivate=!0,$fz),"~S,~N,java.io.BufferedOutputStream");c$.writeTag=$_M(c$,"writeTag",($fz=function(a,b,c){a+=2;var d=Clazz.newByteArray(4,0);d[0]=255;d[1]=b;d[2]=a>>8&255;d[3]=a&255;J.io2.JpegEncoder.writeArray(d,c)},$fz.isPrivate=!0,$fz),"~N,~N,java.io.BufferedOutputStream");c$.WriteDHTHeader=$_M(c$,"WriteDHTHeader",function(a,b,c){for(var d,e=0,f=1;17>
f;f++)e+=a[f];d=Clazz.newByteArray(21+e,0);d[0]=255;d[1]=196;for(var g=4,f=0;17>f;f++)d[g++]=a[f];for(f=0;f<e;f++)d[g++]=b[f];d[2]=g-2>>8&255;d[3]=g-2&255;J.io2.JpegEncoder.writeArray(d,c)},"~A,~A,java.io.BufferedOutputStream");c$.WriteMarker=$_M(c$,"WriteMarker",function(a,b){try{b.write(a,0,2)}catch(c){if(Clazz.exceptionOf(c,java.io.IOException))J.util.Logger.errorEx("IO Error",c);else throw c;}},"~A,java.io.BufferedOutputStream");c$.writeArray=$_M(c$,"writeArray",function(a,b){try{b.write(a,0,
a.length)}catch(c){if(Clazz.exceptionOf(c,java.io.IOException))J.util.Logger.errorEx("IO Error",c);else throw c;}},"~A,java.io.BufferedOutputStream");Clazz.defineStatics(c$,"CONTINUE_MAX",65500,"CONTINUE_MAX_BUFFER",65510,"eoi",[255,217],"jfif",[255,224,0,16,74,70,73,70,0,1,0,0,0,1,0,1,0,0],"soi",[255,216]);c$=Clazz.decorateAsClass(function(){this.DivisorsChrominance=this.quantum_chrominance=this.DivisorsLuminance=this.quantum_luminance=this.divisors=this.quantum=null;Clazz.instantialize(this,arguments)},
J.io2,"DCT");Clazz.prepareFields(c$,function(){this.quantum=J.util.ArrayUtil.newInt2(2);this.divisors=J.util.ArrayUtil.newDouble2(2);this.quantum_luminance=Clazz.newIntArray(64,0);this.DivisorsLuminance=Clazz.newDoubleArray(64,0);this.quantum_chrominance=Clazz.newIntArray(64,0);this.DivisorsChrominance=Clazz.newDoubleArray(64,0)});Clazz.makeConstructor(c$,function(a){this.initMatrix(a)},"~N");$_M(c$,"initMatrix",($fz=function(a){a=1>a?1:100<a?100:a;a=50>a?Clazz.doubleToInt(5E3/a):200-2*a;this.quantum_luminance[0]=
16;this.quantum_luminance[1]=11;this.quantum_luminance[2]=10;this.quantum_luminance[3]=16;this.quantum_luminance[4]=24;this.quantum_luminance[5]=40;this.quantum_luminance[6]=51;this.quantum_luminance[7]=61;this.quantum_luminance[8]=12;this.quantum_luminance[9]=12;this.quantum_luminance[10]=14;this.quantum_luminance[11]=19;this.quantum_luminance[12]=26;this.quantum_luminance[13]=58;this.quantum_luminance[14]=60;this.quantum_luminance[15]=55;this.quantum_luminance[16]=14;this.quantum_luminance[17]=
13;this.quantum_luminance[18]=16;this.quantum_luminance[19]=24;this.quantum_luminance[20]=40;this.quantum_luminance[21]=57;this.quantum_luminance[22]=69;this.quantum_luminance[23]=56;this.quantum_luminance[24]=14;this.quantum_luminance[25]=17;this.quantum_luminance[26]=22;this.quantum_luminance[27]=29;this.quantum_luminance[28]=51;this.quantum_luminance[29]=87;this.quantum_luminance[30]=80;this.quantum_luminance[31]=62;this.quantum_luminance[32]=18;this.quantum_luminance[33]=22;this.quantum_luminance[34]=
37;this.quantum_luminance[35]=56;this.quantum_luminance[36]=68;this.quantum_luminance[37]=109;this.quantum_luminance[38]=103;this.quantum_luminance[39]=77;this.quantum_luminance[40]=24;this.quantum_luminance[41]=35;this.quantum_luminance[42]=55;this.quantum_luminance[43]=64;this.quantum_luminance[44]=81;this.quantum_luminance[45]=104;this.quantum_luminance[46]=113;this.quantum_luminance[47]=92;this.quantum_luminance[48]=49;this.quantum_luminance[49]=64;this.quantum_luminance[50]=78;this.quantum_luminance[51]=
87;this.quantum_luminance[52]=103;this.quantum_luminance[53]=121;this.quantum_luminance[54]=120;this.quantum_luminance[55]=101;this.quantum_luminance[56]=72;this.quantum_luminance[57]=92;this.quantum_luminance[58]=95;this.quantum_luminance[59]=98;this.quantum_luminance[60]=112;this.quantum_luminance[61]=100;this.quantum_luminance[62]=103;this.quantum_luminance[63]=99;J.io2.DCT.AANscale(this.DivisorsLuminance,this.quantum_luminance,a);for(var b=4;64>b;b++)this.quantum_chrominance[b]=99;this.quantum_chrominance[0]=
17;this.quantum_chrominance[1]=18;this.quantum_chrominance[2]=24;this.quantum_chrominance[3]=47;this.quantum_chrominance[8]=18;this.quantum_chrominance[9]=21;this.quantum_chrominance[10]=26;this.quantum_chrominance[11]=66;this.quantum_chrominance[16]=24;this.quantum_chrominance[17]=26;this.quantum_chrominance[18]=56;this.quantum_chrominance[24]=47;this.quantum_chrominance[25]=66;J.io2.DCT.AANscale(this.DivisorsChrominance,this.quantum_chrominance,a);this.quantum[0]=this.quantum_luminance;this.quantum[1]=
this.quantum_chrominance;this.divisors[0]=this.DivisorsLuminance;this.divisors[1]=this.DivisorsChrominance},$fz.isPrivate=!0,$fz),"~N");c$.AANscale=$_M(c$,"AANscale",($fz=function(a,b,c){for(var d=0;64>d;d++){var e=Clazz.doubleToInt((b[d]*c+50)/100);b[d]=1>e?1:255<e?255:e}for(e=c=0;8>c;c++)for(d=0;8>d;d++,e++)a[e]=0.125/(b[e]*J.io2.DCT.AANscaleFactor[c]*J.io2.DCT.AANscaleFactor[d])},$fz.isPrivate=!0,$fz),"~A,~A,~N");c$.forwardDCT=$_M(c$,"forwardDCT",function(a){for(var b=Clazz.newDoubleArray(8,8,
0),c,d,e,f,g,h,j,k,l=0;8>l;l++)for(g=0;8>g;g++)b[l][g]=a[l][g]-128;for(l=0;8>l;l++)c=b[l][0]+b[l][7],a=b[l][0]-b[l][7],d=b[l][1]+b[l][6],j=b[l][1]-b[l][6],e=b[l][2]+b[l][5],h=b[l][2]-b[l][5],f=b[l][3]+b[l][4],g=b[l][3]-b[l][4],k=c+f,f=c-f,c=d+e,d-=e,b[l][0]=k+c,b[l][4]=k-c,k=0.707106781*(d+f),b[l][2]=f+k,b[l][6]=f-k,k=g+h,c=h+j,d=j+a,h=0.382683433*(k-d),g=0.5411961*k+h,h=1.306562965*d+h,k=0.707106781*c,j=a+k,a-=k,b[l][5]=a+g,b[l][3]=a-g,b[l][1]=j+h,b[l][7]=j-h;for(l=0;8>l;l++)c=b[0][l]+b[7][l],a=
b[0][l]-b[7][l],d=b[1][l]+b[6][l],j=b[1][l]-b[6][l],e=b[2][l]+b[5][l],h=b[2][l]-b[5][l],f=b[3][l]+b[4][l],g=b[3][l]-b[4][l],k=c+f,f=c-f,c=d+e,d-=e,b[0][l]=k+c,b[4][l]=k-c,k=0.707106781*(d+f),b[2][l]=f+k,b[6][l]=f-k,k=g+h,c=h+j,d=j+a,h=0.382683433*(k-d),g=0.5411961*k+h,h=1.306562965*d+h,k=0.707106781*c,j=a+k,a-=k,b[5][l]=a+g,b[3][l]=a-g,b[1][l]=j+h,b[7][l]=j-h;return b},"~A");c$.quantizeBlock=$_M(c$,"quantizeBlock",function(a,b){for(var c=Clazz.newIntArray(64,0),d=0,e=0;8>d;d++)for(var f=0;8>f;f++,
e++)c[e]=Math.round(a[d][f]*b[e]);return c},"~A,~A");Clazz.defineStatics(c$,"N",8,"NN",64,"AANscaleFactor",[1,1.387039845,1.306562965,1.175875602,1,0.785694958,0.5411961,0.275899379]);c$=Clazz.decorateAsClass(function(){this.imageWidth=this.imageHeight=this.bufferPutBuffer=this.bufferPutBits=0;this.ac_matrix=this.dc_matrix=this.ac_matrix1=this.dc_matrix1=this.ac_matrix0=this.dc_matrix0=null;this.numOfACTables=this.numOfDCTables=0;Clazz.instantialize(this,arguments)},J.io2,"Huffman");Clazz.makeConstructor(c$,
function(a,b){this.initHuf();this.imageWidth=a;this.imageHeight=b},"~N,~N");$_M(c$,"HuffmanBlockEncoder",function(a,b,c,d,e){var f,g,h;this.numOfACTables=this.numOfDCTables=2;g=this.dc_matrix[d];e=this.ac_matrix[e];f=c=b[0]-c;0>f&&(f=-f,c--);for(d=0;0!=f;)d++,f>>=1;this.bufferIt(a,g[d][0],g[d][1]);0!=d&&this.bufferIt(a,c,d);h=0;for(g=1;64>g;g++)if(0==(f=b[J.io2.Huffman.jpegNaturalOrder[g]]))h++;else{for(;15<h;)this.bufferIt(a,e[240][0],e[240][1]),h-=16;c=f;0>f&&(f=-f,c--);for(d=1;0!=(f>>=1);)d++;
f=(h<<4)+d;this.bufferIt(a,e[f][0],e[f][1]);this.bufferIt(a,c,d);h=0}0<h&&this.bufferIt(a,e[0][0],e[0][1])},"java.io.BufferedOutputStream,~A,~N,~N,~N");$_M(c$,"bufferIt",function(a,b,c){var d=this.bufferPutBits;b&=(1<<c)-1;d+=c;b<<=24-d;for(b|=this.bufferPutBuffer;8<=d;){c=b>>16&255;try{a.write(c)}catch(e){if(Clazz.exceptionOf(e,java.io.IOException))J.util.Logger.errorEx("IO Error",e);else throw e;}if(255==c)try{a.write(0)}catch(f){if(Clazz.exceptionOf(f,java.io.IOException))J.util.Logger.errorEx("IO Error",
f);else throw f;}b<<=8;d-=8}this.bufferPutBuffer=b;this.bufferPutBits=d},"java.io.BufferedOutputStream,~N,~N");$_M(c$,"flushBuffer",function(a){for(var b=this.bufferPutBuffer,c=this.bufferPutBits;8<=c;){var d=b>>16&255;try{a.write(d)}catch(e){if(Clazz.exceptionOf(e,java.io.IOException))J.util.Logger.errorEx("IO Error",e);else throw e;}if(255==d)try{a.write(0)}catch(f){if(Clazz.exceptionOf(f,java.io.IOException))J.util.Logger.errorEx("IO Error",f);else throw f;}b<<=8;c-=8}if(0<c)try{a.write(b>>16&
255)}catch(g){if(Clazz.exceptionOf(g,java.io.IOException))J.util.Logger.errorEx("IO Error",g);else throw g;}},"java.io.BufferedOutputStream");$_M(c$,"initHuf",($fz=function(){this.dc_matrix0=Clazz.newIntArray(12,2,0);this.dc_matrix1=Clazz.newIntArray(12,2,0);this.ac_matrix0=Clazz.newIntArray(255,2,0);this.ac_matrix1=Clazz.newIntArray(255,2,0);this.dc_matrix=J.util.ArrayUtil.newInt3(2,-1);this.ac_matrix=J.util.ArrayUtil.newInt3(2,-1);var a,b,c,d,e=Clazz.newIntArray(257,0),f=Clazz.newIntArray(257,0);
a=0;for(b=1;16>=b;b++)for(c=J.io2.Huffman.bitsDCchrominance[b];0<=--c;)e[a++]=b;e[a]=0;b=a;d=0;c=e[0];for(a=0;0!=e[a];){for(;e[a]==c;)f[a++]=d,d++;d<<=1;c++}for(a=0;a<b;a++)this.dc_matrix1[J.io2.Huffman.valDCchrominance[a]][0]=f[a],this.dc_matrix1[J.io2.Huffman.valDCchrominance[a]][1]=e[a];a=0;for(b=1;16>=b;b++)for(c=J.io2.Huffman.bitsACchrominance[b];0<=--c;)e[a++]=b;e[a]=0;b=a;d=0;c=e[0];for(a=0;0!=e[a];){for(;e[a]==c;)f[a++]=d,d++;d<<=1;c++}for(a=0;a<b;a++)this.ac_matrix1[J.io2.Huffman.valACchrominance[a]][0]=
f[a],this.ac_matrix1[J.io2.Huffman.valACchrominance[a]][1]=e[a];a=0;for(b=1;16>=b;b++)for(c=J.io2.Huffman.bitsDCluminance[b];0<=--c;)e[a++]=b;e[a]=0;b=a;d=0;c=e[0];for(a=0;0!=e[a];){for(;e[a]==c;)f[a++]=d,d++;d<<=1;c++}for(a=0;a<b;a++)this.dc_matrix0[J.io2.Huffman.valDCluminance[a]][0]=f[a],this.dc_matrix0[J.io2.Huffman.valDCluminance[a]][1]=e[a];a=0;for(b=1;16>=b;b++)for(c=J.io2.Huffman.bitsACluminance[b];0<=--c;)e[a++]=b;e[a]=0;b=a;d=0;c=e[0];for(a=0;0!=e[a];){for(;e[a]==c;)f[a++]=d,d++;d<<=1;c++}for(a=
0;a<b;a++)this.ac_matrix0[J.io2.Huffman.valACluminance[a]][0]=f[a],this.ac_matrix0[J.io2.Huffman.valACluminance[a]][1]=e[a];this.dc_matrix[0]=this.dc_matrix0;this.dc_matrix[1]=this.dc_matrix1;this.ac_matrix[0]=this.ac_matrix0;this.ac_matrix[1]=this.ac_matrix1},$fz.isPrivate=!0,$fz));Clazz.defineStatics(c$,"bitsDCluminance",[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],"valDCluminance",[0,1,2,3,4,5,6,7,8,9,10,11],"bitsDCchrominance",[1,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],"valDCchrominance",[0,1,2,3,4,5,6,7,8,9,
10,11],"bitsACluminance",[16,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],"valACluminance",[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,
194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],"bitsACchrominance",[17,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],"valACchrominance",[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,
119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250],"jpegNaturalOrder",[0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,
62,63]);c$=Clazz.decorateAsClass(function(){this.imageobj=this.comment=null;this.imageWidth=this.imageHeight=0;this.blockHeight=this.blockWidth=null;this.precision=8;this.numberOfComponents=3;this.lastRowIsDummy=this.lastColumnIsDummy=this.actableNumber=this.dctableNumber=this.qtableNumber=this.vsampFactor=this.hsampFactor=this.compID=this.components=null;this.ss=0;this.se=63;this.al=this.ah=0;this.compHeight=this.compWidth=null;this.maxVsampFactor=this.maxHsampFactor=0;Clazz.instantialize(this,arguments)},
J.io2,"JpegObj");Clazz.prepareFields(c$,function(){this.compID=[1,2,3];this.hsampFactor=[1,1,1];this.vsampFactor=[1,1,1];this.qtableNumber=[0,1,1];this.dctableNumber=[0,1,1];this.actableNumber=[0,1,1];this.lastColumnIsDummy=[!1,!1,!1];this.lastRowIsDummy=[!1,!1,!1]});Clazz.makeConstructor(c$,function(a,b,c){this.components=J.util.ArrayUtil.newFloat3(this.numberOfComponents,-1);this.compWidth=Clazz.newIntArray(this.numberOfComponents,0);this.compHeight=Clazz.newIntArray(this.numberOfComponents,0);
this.blockWidth=Clazz.newIntArray(this.numberOfComponents,0);this.blockHeight=Clazz.newIntArray(this.numberOfComponents,0);this.imageobj=b;this.imageWidth=a.getImageWidth(b);this.imageHeight=a.getImageHeight(b);this.comment=c;this.getYCCArray(a)},"J.api.ApiPlatform,~O,~S");$_M(c$,"getYCCArray",($fz=function(a){var b,c,d,e;this.maxVsampFactor=this.maxHsampFactor=1;for(d=0;d<this.numberOfComponents;d++)this.maxHsampFactor=Math.max(this.maxHsampFactor,this.hsampFactor[d]),this.maxVsampFactor=Math.max(this.maxVsampFactor,
this.vsampFactor[d]);for(d=0;d<this.numberOfComponents;d++)this.compWidth[d]=Clazz.doubleToInt((0!=this.imageWidth%8?8*Clazz.doubleToInt(Math.ceil(this.imageWidth/8)):this.imageWidth)/this.maxHsampFactor)*this.hsampFactor[d],this.compWidth[d]!=Clazz.doubleToInt(this.imageWidth/this.maxHsampFactor)*this.hsampFactor[d]&&(this.lastColumnIsDummy[d]=!0),this.blockWidth[d]=Clazz.doubleToInt(Math.ceil(this.compWidth[d]/8)),this.compHeight[d]=Clazz.doubleToInt((0!=this.imageHeight%8?8*Clazz.doubleToInt(Math.ceil(this.imageHeight/
8)):this.imageHeight)/this.maxVsampFactor)*this.vsampFactor[d],this.compHeight[d]!=Clazz.doubleToInt(this.imageHeight/this.maxVsampFactor)*this.vsampFactor[d]&&(this.lastRowIsDummy[d]=!0),this.blockHeight[d]=Clazz.doubleToInt(Math.ceil(this.compHeight[d]/8));var f;f=a.grabPixels(this.imageobj,this.imageWidth,this.imageHeight,null,0,this.imageHeight);var g=Clazz.newFloatArray(this.compHeight[0],this.compWidth[0],0),h=Clazz.newFloatArray(this.compHeight[0],this.compWidth[0],0),j=Clazz.newFloatArray(this.compHeight[0],
this.compWidth[0],0),k=0;for(d=0;d<this.imageHeight;++d)for(e=0;e<this.imageWidth;++e)a=f[k]>>16&255,b=f[k]>>8&255,c=f[k]&255,g[d][e]=0.299*a+0.587*b+0.114*c,j[d][e]=128+(-0.16874*a-0.33126*b+0.5*c),h[d][e]=128+(0.5*a-0.41869*b-0.08131*c),k++;this.components[0]=g;this.components[1]=j;this.components[2]=h},$fz.isPrivate=!0,$fz),"J.api.ApiPlatform")});Clazz.declarePackage("J.export.image");
Clazz.load(null,"J.export.image.GenericCRCEncoder",["java.util.zip.CRC32","J.util.ArrayUtil"],function(){c$=Clazz.decorateAsClass(function(){this.bytePos=this.startPos=0;this.pngBytes=this.crc=null;this.dataLen=0;this.int4=this.int2=null;Clazz.instantialize(this,arguments)},J["export"].image,"GenericCRCEncoder");Clazz.prepareFields(c$,function(){this.int2=Clazz.newByteArray(2,0);this.int4=Clazz.newByteArray(4,0)});Clazz.makeConstructor(c$,function(){this.pngBytes=Clazz.newByteArray(250,0);this.crc=
new java.util.zip.CRC32});$_M(c$,"setData",function(a,b){this.pngBytes=a;this.dataLen=a.length;this.startPos=this.bytePos=b},"~A,~N");$_M(c$,"getBytes",function(){return this.dataLen==this.pngBytes.length?this.pngBytes:J.util.ArrayUtil.arrayCopyByte(this.pngBytes,this.dataLen)});$_M(c$,"writeCRC",function(){this.crc.reset();this.crc.update(this.pngBytes,this.startPos,this.bytePos-this.startPos);this.writeInt4(this.crc.getValue())});$_M(c$,"writeInt2",function(a){this.int2[0]=a>>8&255;this.int2[1]=
a&255;this.writeBytes(this.int2)},"~N");$_M(c$,"writeInt4",function(a){J["export"].image.GenericCRCEncoder.getInt4(a,this.int4);this.writeBytes(this.int4)},"~N");c$.getInt4=$_M(c$,"getInt4",function(a,b){b[0]=a>>24&255;b[1]=a>>16&255;b[2]=a>>8&255;b[3]=a&255},"~N,~A");$_M(c$,"writeByte",function(a){this.writeBytes([a])},"~N");$_M(c$,"writeString",function(a){this.writeBytes(a.getBytes())},"~S");$_M(c$,"writeBytes",function(a){var b=this.bytePos+a.length;this.dataLen=Math.max(this.dataLen,b);b>this.pngBytes.length&&
(this.pngBytes=J.util.ArrayUtil.arrayCopyByte(this.pngBytes,b+16));System.arraycopy(a,0,this.pngBytes,this.bytePos,a.length);this.bytePos=b},"~A")});Clazz.declarePackage("J.export.image");
Clazz.load(["J.export.image.GenericCRCEncoder"],"J.export.image.GenericPngEncoder",["java.io.ByteArrayOutputStream","java.util.zip.Deflater","$.DeflaterOutputStream","J.viewer.Viewer"],function(){c$=Clazz.decorateAsClass(function(){this.image=null;this.height=this.width=0;this.encodeAlpha=!1;this.compressionLevel=this.bytesPerPixel=this.filter=0;this.scanLines=this.apiPlatform=this.transparentColor=this.type=null;this.byteWidth=0;Clazz.instantialize(this,arguments)},J["export"].image,"GenericPngEncoder",
J["export"].image.GenericCRCEncoder);c$.getBytesType=$_M(c$,"getBytesType",function(a,b,c,d,e,f){a=new J["export"].image.GenericPngEncoder(a,b,!1,0,c);a.type=(e+"0000").substring(0,4);0!=d&&(a.transparentColor=Integer.$valueOf(d));return a.pngEncode(f)},"J.api.ApiPlatform,~O,~N,~N,~S,~A");Clazz.makeConstructor(c$,function(a,b,c,d,e){Clazz.superConstructor(this,J["export"].image.GenericPngEncoder);this.apiPlatform=a;this.image=b;this.compressionLevel=0<=e&&9>=e?e:0},"J.api.ApiPlatform,~O,~B,~N,~N");
$_M(c$,"pngEncode",($fz=function(a){if(null==this.image)return null;this.width=this.apiPlatform.getImageWidth(this.image);this.height=this.apiPlatform.getImageHeight(this.image);this.writeBytes([-119,80,78,71,13,10,26,10]);this.writeHeader();a[0]=this.bytePos+4;this.writeText(J["export"].image.GenericPngEncoder.getJmolTypeText(this.type,0,0));this.writeText("Software\x00Jmol "+J.viewer.Viewer.getJmolVersion());this.writeText("Creation Time\x00"+this.apiPlatform.getDateFormat());!this.encodeAlpha&&
null!=this.transparentColor&&this.writeTransparentColor(this.transparentColor.intValue());return!this.writeImageData()?null:this.getBytes()},$fz.isPrivate=!0,$fz),"~A");c$.setJmolTypeText=$_M(c$,"setJmolTypeText",function(a,b,c,d,e){c="iTXt"+J["export"].image.GenericPngEncoder.getJmolTypeText(e,c,d);d=new J["export"].image.GenericCRCEncoder;d.setData(b,a);d.writeString(c);d.writeCRC()},"~N,~A,~N,~N,~S");c$.getJmolTypeText=$_M(c$,"getJmolTypeText",($fz=function(a,b,c){b="000000000"+b;b=b.substring(b.length-
9);c="000000000"+c;c=c.substring(c.length-9);return"Jmol Type\x00"+a+(a.equals("PNG")?"0":"")+b+"+"+c},$fz.isPrivate=!0,$fz),"~S,~N,~N");$_M(c$,"writeHeader",($fz=function(){this.writeInt4(13);this.startPos=this.bytePos;this.writeString("IHDR");this.writeInt4(this.width);this.writeInt4(this.height);this.writeByte(8);this.writeByte(this.encodeAlpha?6:2);this.writeByte(0);this.writeByte(0);this.writeByte(0);this.writeCRC()},$fz.isPrivate=!0,$fz));$_M(c$,"writeText",($fz=function(a){this.writeInt4(a.length);
this.startPos=this.bytePos;this.writeString("iTXt"+a);this.writeCRC()},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"writeTransparentColor",($fz=function(a){this.writeInt4(6);this.startPos=this.bytePos;this.writeString("tRNS");this.writeInt2(a>>16&255);this.writeInt2(a>>8&255);this.writeInt2(a&255);this.writeCRC()},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"writeImageData",($fz=function(){this.bytesPerPixel=this.encodeAlpha?4:3;this.byteWidth=this.width*this.bytesPerPixel;var a=this.byteWidth+1,b=this.height,c=0,
d,e,f,g=new java.util.zip.Deflater(this.compressionLevel),h=new java.io.ByteArrayOutputStream(1024),j=new java.util.zip.DeflaterOutputStream(h,g);try{for(;0<b;){d=b;this.scanLines=Clazz.newByteArray(a*d,0);var k,l=this.width*d;k=null;k=this.apiPlatform.grabPixels(this.image,this.width,this.height,k,c,d);if(null==k)return!1;for(var n=e=0;n<l;n++)0==n%this.width&&(this.scanLines[e++]=this.filter),this.scanLines[e++]=k[n]>>16&255,this.scanLines[e++]=k[n]>>8&255,this.scanLines[e++]=k[n]&255,this.encodeAlpha&&
(this.scanLines[e++]=k[n]>>24&255);j.write(this.scanLines,0,e);c+=d;b-=d}j.close();f=h.toByteArray();this.writeInt4(f.length);this.startPos=this.bytePos;this.writeString("IDAT");this.writeBytes(f);this.writeCRC();this.writeEnd();g.finish();return!0}catch(p){if(Clazz.exceptionOf(p,java.io.IOException))return System.err.println(p.toString()),!1;throw p;}},$fz.isPrivate=!0,$fz));$_M(c$,"writeEnd",($fz=function(){this.writeInt4(0);this.startPos=this.bytePos;this.writeString("IEND");this.writeCRC()},$fz.isPrivate=
!0,$fz));Clazz.defineStatics(c$,"FILTER_NONE",0,"FILTER_SUB",1,"FILTER_UP",2,"FILTER_LAST",2)});Clazz.declarePackage("J.api");Clazz.declareInterface(J.api,"JmolImageCreatorInterface");Clazz.declarePackage("J.export.image");
Clazz.load(["J.api.JmolImageCreatorInterface"],"J.export.image.GenericImageCreator","java.io.BufferedWriter $.File $.FileOutputStream $.IOException $.OutputStreamWriter java.lang.Error J.export.image.GenericPngEncoder J.io.Base64 J.io2.JpegEncoder J.util.Escape $.Logger J.viewer.Viewer".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.viewer=null;this.privateKey=0;Clazz.instantialize(this,arguments)},J["export"].image,"GenericImageCreator",null,J.api.JmolImageCreatorInterface);Clazz.makeConstructor(c$,
function(){});Clazz.overrideMethod(c$,"setViewer",function(a,b){this.viewer=a;this.privateKey=b;return this},"J.api.JmolViewer,~N");Clazz.overrideMethod(c$,"createImage",function(a,b,c,d,e,f,g){var h=null!=d,j=!h&&-2147483648==g,k=null,l=-1;try{if(!this.viewer.checkPrivateKey(this.privateKey))return"NO SECURITY";if("OutputStream".equals(b))return new java.io.FileOutputStream(a);if(h)if(Clazz.instanceOf(d,Array))l=d.length,k=new java.io.FileOutputStream(a),k.write(d,0,d.length),k.flush(),k.close();
else return this.getImageBytes(b,g,a,e,d,null,null),a;else if(j){if(null==c)return"NO DATA";var k=new java.io.FileOutputStream(a),n=new java.io.OutputStreamWriter(k),p=new java.io.BufferedWriter(n,8192),l=c.length;p.write(c);p.close();k=null}else{var l=1,m=this.getImageBytes(b,g,a,e,null,f,null);if(Clazz.instanceOf(m,String))return m;if(null!=m)return null==a?m:String.instantialize(m);l=(new java.io.File(a)).length()}}catch(q){if(Clazz.exceptionOf(q,java.io.IOException))return J.util.Logger.errorEx("IO Exception",
q),q.toString();throw q;}finally{if(null!=k)try{k.close()}catch(r){if(!Clazz.exceptionOf(r,java.io.IOException))throw r;}}return 0>l?"Creation of "+a+" failed: "+this.viewer.getErrorMessageUn():"OK "+b+" "+l+" "+a+(-2147483648==g?"":"; quality="+g)},"~S,~S,~S,~O,~A,~O,~N");Clazz.overrideMethod(c$,"getImageBytes",function(a,b,c,d,e,f,g){var h=null,j=null;a=a.toUpperCase();var k=a.equals("PDF"),l=null==g&&null!=c&&!k,k=null==g&&null==c&&!k,n=null!=e;e=n?e:this.viewer.getScreenImageBuffer(null,!0);try{if(null==
e)j=this.viewer.getErrorMessage();else{var p=null,m=k&&a.equals("PNGJ")||!k&&null==f;a.equals("PNGJ")&&m&&(p=this.viewer.getWrappedState(c,d,!0,!0,this.viewer.apiPlatform.getImageWidth(e),this.viewer.apiPlatform.getImageHeight(e)));l&&(g=new java.io.FileOutputStream(c));if(a.equals("JPEG")||a.equals("JPG"))if(0>=b&&(b=100),k)h=J.io2.JpegEncoder.getBytes(this.viewer.apiPlatform,e,b,J.viewer.Viewer.getJmolVersion());else{var q=m?this.viewer.getWrappedState(null,null,!0,!1,this.viewer.apiPlatform.getImageWidth(e),
this.viewer.apiPlatform.getImageHeight(e)):J.viewer.Viewer.getJmolVersion();J.io2.JpegEncoder.write(this.viewer.apiPlatform,e,b,g,q)}else if(a.equals("JPG64")||a.equals("JPEG64"))0>=b&&(b=75),h=J.io2.JpegEncoder.getBytes(this.viewer.apiPlatform,e,b,J.viewer.Viewer.getJmolVersion()),k?h=J.io.Base64.getBytes64(h):(J.io.Base64.write(h,g),h=null);else if(a.startsWith("PNG")){0>b?b=2:9<b&&(b=9);var r=a.equals("PNGT")?this.viewer.getBackgroundArgb():0,v=Clazz.newIntArray(1,0),h=J["export"].image.GenericPngEncoder.getBytesType(this.viewer.apiPlatform,
e,b,r,a,v),u=null;if(m){var s=h.length,u=h;null==p&&(p=this.viewer.getWrappedState(null,d,!0,!1,this.viewer.apiPlatform.getImageWidth(e),this.viewer.apiPlatform.getImageHeight(e)));h=J.util.Escape.isAB(p)?p:p.getBytes();J["export"].image.GenericPngEncoder.setJmolTypeText(v[0],u,s,h.length,a)}if(k){if(null!=u){var t=Clazz.newByteArray(u.length+h.length,0);System.arraycopy(u,0,t,0,u.length);System.arraycopy(h,0,t,u.length,h.length);h=t;u=null}}else null!=u&&g.write(u,0,u.length),g.write(h,0,h.length),
u=h=null}else var w=Array(1),h=this.getOtherBytes(c,e,a,k,g,w),j=w[0];null!=f&&null!=g&&(u=J.util.Escape.isAB(f)?f:Clazz.instanceOf(f,String)?f.getBytes():null,null!=u&&0<u.length&&g.write(u,0,u.length));null!=g&&g.flush();l&&g.close()}}catch(y){if(Clazz.exceptionOf(y,java.io.IOException))throw n||this.viewer.releaseScreenImage(),new java.io.IOException(""+y);if(Clazz.exceptionOf(y,Error))throw n||this.viewer.releaseScreenImage(),Error(y);throw y;}n||this.viewer.releaseScreenImage();return null!=
j?j:h},"~S,~N,~S,~A,~O,~O,java.io.OutputStream");$_M(c$,"getOtherBytes",function(a,b,c,d,e,f){f[0]="file type "+c+" not available on this platform";return null},"~S,~O,~S,~B,java.io.OutputStream,~A");Clazz.overrideMethod(c$,"clipImage",function(){return null},"J.api.JmolViewer,~S");Clazz.overrideMethod(c$,"getClipboardText",function(){return null})});Clazz.declarePackage("J.exportjs");
Clazz.load(["J.export.image.GenericImageCreator"],"J.exportjs.JSImageCreator",null,function(){c$=Clazz.declareType(J.exportjs,"JSImageCreator",J["export"].image.GenericImageCreator);Clazz.makeConstructor(c$,function(){Clazz.superConstructor(this,J.exportjs.JSImageCreator,[])})});
