PageSourceSearch

https://thestreamlinefactory.com/assets/AdminImageConverter-DhcS_yDz.js

js thestreamlinefactory.com collected 2026-09-24 14:20:20 UTC 112,372 bytes, 12 lines download raw bytes

vendor: 40,544 bytes, lines 1-12
1import{r as ct,j as N,k as zt,i as qt}from"./react-vendor-C-_weJGF.js";import{c as Jt}from"./query-DA-B5yju.js";import{h as Nt,g as Qt,a as bt,B as xt,s as te}from"./index-DiEum5Ju.js";import{A as Bt}from"./AdminLayout-Byts1X3Z.js";import{I as It}from"./input-TSEJWV9X.js";import{L as mt}from"./label-Dam5lWpQ.js";import{S as Tt}from"./switch-CMORpCAN.js";import{S as Dt}from"./slider-9TpA-5RQ.js";import{J as Wt,K as ee,M as Mt,N as Ht,Q as re}from"./radix-CMA3xQgM.js";import{aF as ne,a1 as Ft,U as ie,aG as se,O as Ut,a4 as ae,X as oe,x as le,D as he}from"./icons-BZJMmL1V.js";import{S as ce,a as ue,b as de,c as fe,d as Ct}from"./select-CQ7qceit.js";import"./supabase-BppBjPB2.js";import"./motion-CfmjrLVm.js";import"./logo-BWhOaj1e.js";const Gt=ct.forwardRef(({className:lt,value:ft,...g},L)=>N.jsx(Wt,{ref:L,className:Nt("relative h-4 w-full overflow-hidden rounded-full bg-secondary",lt),...g,children:N.jsx(ee,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(ft||0)}%)`}})}));Gt.displayName=Wt.displayName;const $t=ct.forwardRef(({className:lt,...ft},g)=>N.jsx(Mt,{className:Nt("grid gap-2",lt),...ft,ref:g}));$t.displayName=Mt.displayName;const At=ct.forwardRef(({className:lt,...ft},g)=>N.jsx(Ht,{ref:g,className:Nt("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",lt),...ft,children:N.jsx(re,{className:"flex items-center justify-center",children:N.jsx(ne,{className:"h-2.5 w-2.5 fill-current text-current"})})}));At.displayName=Ht.displayName;function Et(lt){throw new Error('Could not dynamically require "'+lt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Kt={exports:{}};/*!
2
3JSZip v3.10.1 - A JavaScript class for generating and reading zip files
4<http://stuartk.com/jszip>
5
6(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
7Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
8
9JSZip uses the library pako released under the MIT license :
10https://github.com/nodeca/pako/blob/main/LICENSE
11*/(function(lt,ft){(function(g){lt.exports=g()})(function(){return function g(L,y,c){function l(b,v){if(!y[b]){if(!L[b]){var m=typeof Et=="function"&&Et;if(!v&&m)return m(b,!0);if(n)return n(b,!0);var _=new Error("Cannot find module '"+b+"'");throw _.code="MODULE_NOT_FOUND",_}var i=y[b]={exports:{}};L[b][0].call(i.exports,function(d){var r=L[b][1][d];return l(r||d)},i,i.exports,g,L,y,c)}return y[b].exports}for(var n=typeof Et=="function"&&Et,h=0;h<c.length;h++)l(c[h]);return l}({1:[function(g,L,y){var c=g("./utils"),l=g("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";y.encode=function(h){for(var b,v,m,_,i,d,r,o=[],s=0,f=h.length,w=f,S=c.getTypeOf(h)!=="string";s<h.length;)w=f-s,m=S?(b=h[s++],v=s<f?h[s++]:0,s<f?h[s++]:0):(b=h.charCodeAt(s++),v=s<f?h.charCodeAt(s++):0,s<f?h.charCodeAt(s++):0),_=b>>2,i=(3&b)<<4|v>>4,d=1<w?(15&v)<<2|m>>6:64,r=2<w?63&m:64,o.push(n.charAt(_)+n.charAt(i)+n.charAt(d)+n.charAt(r));return o.join("")},y.decode=function(h){var b,v,m,_,i,d,r=0,o=0,s="data:";if(h.substr(0,s.length)===s)throw new Error("Invalid base64 input, it looks like a data url.");var f,w=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===n.charAt(64)&&w--,h.charAt(h.length-2)===n.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=l.uint8array?new Uint8Array(0|w):new Array(0|w);r<h.length;)b=n.indexOf(h.charAt(r++))<<2|(_=n.indexOf(h.charAt(r++)))>>4,v=(15&_)<<4|(i=n.indexOf(h.charAt(r++)))>>2,m=(3&i)<<6|(d=n.indexOf(h.charAt(r++))),f[o++]=b,i!==64&&(f[o++]=v),d!==64&&(f[o++]=m);return f}},{"./support":30,"./utils":32}],2:[function(g,L,y){var c=g("./external"),l=g("./stream/DataWorker"),n=g("./stream/Crc32Probe"),h=g("./stream/DataLengthProbe");function b(v,m,_,i,d){this.compressedSize=v,this.uncompressedSize=m,this.crc32=_,this.compression=i,this.compressedContent=d}b.prototype={getContentWorker:function(){var v=new l(c.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),m=this;return v.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),v},getCompressedWorker:function(){return new l(c.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},b.createWorkerFrom=function(v,m,_){return v.pipe(new n).pipe(new h("uncompressedSize")).pipe(m.compressWorker(_)).pipe(new h("compressedSize")).withStreamInfo("compression",m)},L.exports=b},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(g,L,y){var c=g("./stream/GenericWorker");y.STORE={magic:"\0\0",compressWorker:function(){return new c("STORE compression")},uncompressWorker:function(){return new c("STORE decompression")}},y.DEFLATE=g("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(g,L,y){var c=g("./utils"),l=function(){for(var n,h=[],b=0;b<256;b++){n=b;for(var v=0;v<8;v++)n=1&n?3988292384^n>>>1:n>>>1;h[b]=n}return h}();L.exports=function(n,h){return n!==void 0&&n.length?c.getTypeOf(n)!=="string"?function(b,v,m,_){var i=l,d=_+m;b^=-1;for(var r=_;r<d;r++)b=b>>>8^i[255&(b^v[r])];return-1^b}(0|h,n,n.length,0):function(b,v,m,_){var i=l,d=_+m;b^=-1;for(var r=_;r<d;r++)b=b>>>8^i[255&(b^v.charCodeAt(r))];return-1^b}(0|h,n,n.length,0):0}},{"./utils":32}],5:[function(g,L,y){y.base64=!1,y.binary=!1,y.dir=!1,y.createFolders=!0,y.date=null,y.compression=null,y.compressionOptions=null,y.comment=null,y.unixPermissions=null,y.dosPermissions=null},{}],6:[function(g,L,y){var c=null;c=typeof Promise<"u"?Promise:g("lie"),L.exports={Promise:c}},{lie:37}],7:[function(g,L,y){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",l=g("pako"),n=g("./utils"),h=g("./stream/GenericWorker"),b=c?"uint8array":"array";function v(m,_){h.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=_,this.meta={}}y.magic="\b\0",n.inherits(v,h),v.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(b,m.data),!1)},v.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},v.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},v.prototype._createPako=function(){this._pako=new l[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(_){m.push({data:_,meta:m.meta})}},y.compressWorker=function(m){return new v("Deflate",m)},y.uncompressWorker=function(){return new v("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(g,L,y){function c(i,d){var r,o="";for(r=0;r<d;r++)o+=String.fromCharCode(255&i),i>>>=8;return o}function l(i,d,r,o,s,f){var w,S,k=i.file,D=i.compression,O=f!==b.utf8encode,W=n.transformTo("string",f(k.name)),I=n.transformTo("string",b.utf8encode(k.name)),G=k.comment,q=n.transformTo("string",f(G)),p=n.transformTo("string",b.utf8encode(G)),R=I.length!==k.name.length,e=p.length!==G.length,F="",et="",M="",rt=k.dir,H=k.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};d&&!r||(Q.crc32=i.crc32,Q.compressedSize=i.compressedSize,Q.uncompressedSize=i.uncompressedSize);var A=0;d&&(A|=8),O||!R&&!e||(A|=2048);var E=0,C=0;rt&&(E|=16),s==="UNIX"?(C=798,E|=function(B,J){var it=B;return B||(it=J?16893:33204),(65535&it)<<16}(k.unixPermissions,rt)):(C=20,E|=function(B){return 63&(B||0)}(k.dosPermissions)),w=H.getUTCHours(),w<<=6,w|=H.getUTCMinutes(),w<<=5,w|=H.getUTCSeconds()/2,S=H.getUTCFullYear()-1980,S<<=4,S|=H.getUTCMonth()+1,S<<=5,S|=H.getUTCDate(),R&&(et=c(1,1)+c(v(W),4)+I,F+="up"+c(et.length,2)+et),e&&(M=c(1,1)+c(v(q),4)+p,F+="uc"+c(M.length,2)+M);var U="";return U+=`
12\0`,U+=c(A,2),U+=D.magic,U+=c(w,2),U+=c(S,2),U+=c(Q.crc32,4),U+=c(Q.compressedSize,4),U+=c(Q.uncompressedSize,4),U+=c(W.length,2),U+=c(F.length,2),{fileRecord:m.LOCAL_FILE_HEADER+U+W+F,dirRecord:m.CENTRAL_FILE_HEADER+c(C,2)+U+c(q.length,2)+"\0\0\0\0"+c(E,4)+c(o,4)+W+F+q}}var n=g("../utils"),h=g("../stream/GenericWorker"),b=g("../utf8"),v=g("../crc32"),m=g("../signature");function _(i,d,r,o){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=r,this.encodeFileName=o,this.streamFiles=i,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(_,h),_.prototype.push=function(i){var d=i.meta.percent||0,r=this.entriesCount,o=this._sources.length;this.accumulate?this.contentBuffer.push(i):(this.bytesWritten+=i.data.length,h.prototype.push.call(this,{data:i.data,meta:{currentFile:this.currentFile,percent:r?(d+100*(r-o-1))/r:100}}))},_.prototype.openedSource=function(i){this.currentSourceOffset=this.bytesWritten,this.currentFile=i.file.name;var d=this.streamFiles&&!i.file.dir;if(d){var r=l(i,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},_.prototype.closedSource=function(i){this.accumulate=!1;var d=this.streamFiles&&!i.file.dir,r=l(i,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),d)this.push({data:function(o){return m.DATA_DESCRIPTOR+c(o.crc32,4)+c(o.compressedSize,4)+c(o.uncompressedSize,4)}(i),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},_.prototype.flush=function(){for(var i=this.bytesWritten,d=0;d<this.dirRecords.length;d++)this.push({data:this.dirRecords[d],meta:{percent:100}});var r=this.bytesWritten-i,o=function(s,f,w,S,k){var D=n.transformTo("string",k(S));return m.CENTRAL_DIRECTORY_END+"\0\0\0\0"+c(s,2)+c(s,2)+c(f,4)+c(w,4)+c(D.length,2)+D}(this.dirRecords.length,r,i,this.zipComment,this.encodeFileName);this.push({data:o,meta:{percent:100}})},_.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},_.prototype.registerPrevious=function(i){this._sources.push(i);var d=this;return i.on("data",function(r){d.processChunk(r)}),i.on("end",function(){d.closedSource(d.previous.streamInfo),d._sources.length?d.prepareNextSource():d.end()}),i.on("error",function(r){d.error(r)}),this},_.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},_.prototype.error=function(i){var d=this._sources;if(!h.prototype.error.call(this,i))return!1;for(var r=0;r<d.length;r++)try{d[r].error(i)}catch{}return!0},_.prototype.lock=function(){h.prototype.lock.call(this);for(var i=this._sources,d=0;d<i.length;d++)i[d].lock()},L.exports=_},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(g,L,y){var c=g("../compressions"),l=g("./ZipFileWorker");y.generateWorker=function(n,h,b){var v=new l(h.streamFiles,b,h.platform,h.encodeFileName),m=0;try{n.forEach(function(_,i){m++;var d=function(f,w){var S=f||w,k=c[S];if(!k)throw new Error(S+" is not a valid compression method !");return k}(i.options.compression,h.compression),r=i.options.compressionOptions||h.compressionOptions||{},o=i.dir,s=i.date;i._compressWorker(d,r).withStreamInfo("file",{name:_,dir:o,date:s,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(v)}),v.entriesCount=m}catch(_){v.error(_)}return v}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(g,L,y){function c(){if(!(this instanceof c))return new c;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var l=new c;for(var n in this)typeof this[n]!="function"&&(l[n]=this[n]);return l}}(c.prototype=g("./object")).loadAsync=g("./load"),c.support=g("./support"),c.defaults=g("./defaults"),c.version="3.10.1",c.loadAsync=function(l,n){return new c().loadAsync(l,n)},c.external=g("./external"),L.exports=c},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(g,L,y){var c=g("./utils"),l=g("./external"),n=g("./utf8"),h=g("./zipEntries"),b=g("./stream/Crc32Probe"),v=g("./nodejsUtils");function m(_){return new l.Promise(function(i,d){var r=_.decompressed.getContentWorker().pipe(new b);r.on("error",function(o){d(o)}).on("end",function(){r.streamInfo.crc32!==_.decompressed.crc32?d(new Error("Corrupted zip : CRC32 mismatch")):i()}).resume()})}L.exports=function(_,i){var d=this;return i=c.extend(i||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),v.isNode&&v.isStream(_)?l.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):c.prepareContent("the loaded zip file",_,!0,i.optimizedBinaryString,i.base64).then(function(r){var o=new h(i);return o.load(r),o}).then(function(r){var o=[l.Promise.resolve(r)],s=r.files;if(i.checkCRC32)for(var f=0;f<s.length;f++)o.push(m(s[f]));return l.Promise.all(o)}).then(function(r){for(var o=r.shift(),s=o.files,f=0;f<s.length;f++){var w=s[f],S=w.fileNameStr,k=c.resolve(w.fileNameStr);d.file(k,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:i.createFolders}),w.dir||(d.file(k).unsafeOriginalName=S)}return o.zipComment.length&&(d.comment=o.zipComment),d})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(g,L,y){var c=g("../utils"),l=g("../stream/GenericWorker");function n(h,b){l.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(b)}c.inherits(n,l),n.prototype._bindStream=function(h){var b=this;(this._stream=h).pause(),h.on("data",function(v){b.push({data:v,meta:{percent:0}})}).on("error",function(v){b.isPaused?this.generatedError=v:b.error(v)}).on("end",function(){b.isPaused?b._upstreamEnded=!0:b.end()})},n.prototype.pause=function(){return!!l.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},L.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(g,L,y){var c=g("readable-stream").Readable;function l(n,h,b){c.call(this,h),this._helper=n;var v=this;n.on("data",function(m,_){v.push(m)||v._helper.pause(),b&&b(_)}).on("error",function(m){v.emit("error",m)}).on("end",function(){v.push(null)})}g("../utils").inherits(l,c),l.prototype._read=function(){this._helper.resume()},L.exports=l},{"../utils":32,"readable-stream":16}],14:[function(g,L,y){L.exports={isNode:typeof Buffer<"u",newBufferFrom:function(c,l){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(c,l);if(typeof c=="number")throw new Error('The "data" argument must not be a number');return new Buffer(c,l)},allocBuffer:function(c){if(Buffer.alloc)return Buffer.alloc(c);var l=new Buffer(c);return l.fill(0),l},isBuffer:function(c){return Buffer.isBuffer(c)},isStream:function(c){return c&&typeof c.on=="function"&&typeof c.pause=="function"&&typeof c.resume=="function"}}},{}],15:[function(g,L,y){function c(k,D,O){var W,I=n.getTypeOf(D),G=n.extend(O||{},v);G.date=G.date||new Date,G.compression!==null&&(G.compression=G.compression.toUpperCase()),typeof G.unixPermissions=="string"&&(G.unixPermissions=parseInt(G.unixPermissions,8)),G.unixPermissions&&16384&G.unixPermissions&&(G.dir=!0),G.dosPermissions&&16&G.dosPermissions&&(G.dir=!0),G.dir&&(k=s(k)),G.createFolders&&(W=o(k))&&f.call(this,W,!0);var q=I==="string"&&G.binary===!1&&G.base64===!1;O&&O.binary!==void 0||(G.binary=!q),(D instanceof m&&D.uncompressedSize===0||G.dir||!D||D.length===0)&&(G.base64=!1,G.binary=!0,D="",G.compression="STORE",I="string");var p=null;p=D instanceof m||D instanceof h?D:d.isNode&&d.isStream(D)?new r(k,D):n.prepareContent(k,D,G.binary,G.optimizedBinaryString,G.base64);var R=new _(k,p,G);this.files[k]=R}var l=g("./utf8"),n=g("./utils"),h=g("./stream/GenericWorker"),b=g("./stream/StreamHelper"),v=g("./defaults"),m=g("./compressedObject"),_=g("./zipObject"),i=g("./generate"),d=g("./nodejsUtils"),r=g("./nodejs/NodejsStreamInputAdapter"),o=function(k){k.slice(-1)==="/"&&(k=k.substring(0,k.length-1));var D=k.lastIndexOf("/");return 0<D?k.substring(0,D):""},s=function(k){return k.slice(-1)!=="/"&&(k+="/"),k},f=function(k,D){return D=D!==void 0?D:v.createFolders,k=s(k),this.files[k]||c.call(this,k,null,{dir:!0,createFolders:D}),this.files[k]};function w(k){return Object.prototype.toString.call(k)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(k){var D,O,W;for(D in this.files)W=this.files[D],(O=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&k(O,W)},filter:function(k){var D=[];return this.forEach(function(O,W){k(O,W)&&D.push(W)}),D},file:function(k,D,O){if(arguments.length!==1)return k=this.root+k,c.call(this,k,D,O),this;if(w(k)){var W=k;return this.filter(function(G,q){return!q.dir&&W.test(G)})}var I=this.files[this.root+k];return I&&!I.dir?I:null},folder:function(k){if(!k)return this;if(w(k))return this.filter(function(I,G){return G.dir&&k.test(I)});var D=this.root+k,O=f.call(this,D),W=this.clone();return W.root=O.name,W},remove:function(k){k=this.root+k;var D=this.files[k];if(D||(k.slice(-1)!=="/"&&(k+="/"),D=this.files[k]),D&&!D.dir)delete this.files[k];else for(var O=this.filter(function(I,G){return G.name.slice(0,k.length)===k}),W=0;W<O.length;W++)delete this.files[O[W].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(k){var D,O={};try{if((O=n.extend(k||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:l.utf8encode})).type=O.type.toLowerCase(),O.compression=O.compression.toUpperCase(),O.type==="binarystring"&&(O.type="string"),!O.type)throw new Error("No output type specified.");n.checkSupport(O.type),O.platform!=="darwin"&&O.platform!=="freebsd"&&O.platform!=="linux"&&O.platform!=="sunos"||(O.platform="UNIX"),O.platform==="win32"&&(O.platform="DOS");var W=O.comment||this.comment||"";D=i.generateWorker(this,O,W)}catch(I){(D=new h("error")).error(I)}return new b(D,O.type||"string",O.mimeType)},generateAsync:function(k,D){return this.generateInternalStream(k).accumulate(D)},generateNodeStream:function(k,D){return(k=k||{}).type||(k.type="nodebuffer"),this.generateInternalStream(k).toNodejsStream(D)}};L.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(g,L,y){L.exports=g("stream")},{stream:void 0}],17:[function(g,L,y){var c=g("./DataReader");function l(n){c.call(this,n);for(var h=0;h<this.data.length;h++)n[h]=255&n[h]}g("../utils").inherits(l,c),l.prototype.byteAt=function(n){return this.data[this.zero+n]},l.prototype.lastIndexOfSignature=function(n){for(var h=n.charCodeAt(0),b=n.charCodeAt(1),v=n.charCodeAt(2),m=n.charCodeAt(3),_=this.length-4;0<=_;--_)if(this.data[_]===h&&this.data[_+1]===b&&this.data[_+2]===v&&this.data[_+3]===m)return _-this.zero;return-1},l.prototype.readAndCheckSignature=function(n){var h=n.charCodeAt(0),b=n.charCodeAt(1),v=n.charCodeAt(2),m=n.charCodeAt(3),_=this.readData(4);return h===_[0]&&b===_[1]&&v===_[2]&&m===_[3]},l.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var h=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,h},L.exports=l},{"../utils":32,"./DataReader":18}],18:[function(g,L,y){var c=g("../utils");function l(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}l.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var h,b=0;for(this.checkOffset(n),h=this.index+n-1;h>=this.index;h--)b=(b<<8)+this.byteAt(h);return this.index+=n,b},readString:function(n){return c.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},L.exports=l},{"../utils":32}],19:[function(g,L,y){var c=g("./Uint8ArrayReader");function l(n){c.call(this,n)}g("../utils").inherits(l,c),l.prototype.readData=function(n){this.checkOffset(n);var h=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,h},L.exports=l},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(g,L,y){var c=g("./DataReader");function l(n){c.call(this,n)}g("../utils").inherits(l,c),l.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},l.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},l.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},l.prototype.readData=function(n){this.checkOffset(n);var h=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,h},L.exports=l},{"../utils":32,"./DataReader":18}],21:[function(g,L,y){var c=g("./ArrayReader");function l(n){c.call(this,n)}g("../utils").inherits(l,c),l.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var h=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,h},L.exports=l},{"../utils":32,"./ArrayReader":17}],22:[function(g,L,y){var c=g("../utils"),l=g("../support"),n=g("./ArrayReader"),h=g("./StringReader"),b=g("./NodeBufferReader"),v=g("./Uint8ArrayReader");L.exports=function(m){var _=c.getTypeOf(m);return c.checkSupport(_),_!=="string"||l.uint8array?_==="nodebuffer"?new b(m):l.uint8array?new v(c.transformTo("uint8array",m)):new n(c.transformTo("array",m)):new h(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(g,L,y){y.LOCAL_FILE_HEADER="PK��",y.CENTRAL_FILE_HEADER="PK��",y.CENTRAL_DIRECTORY_END="PK��",y.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",y.ZIP64_CENTRAL_DIRECTORY_END="PK��",y.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(g,L,y){var c=g("./GenericWorker"),l=g("../utils");function n(h){c.call(this,"ConvertWorker to "+h),this.destType=h}l.inherits(n,c),n.prototype.processChunk=function(h){this.push({data:l.transformTo(this.destType,h.data),meta:h.meta})},L.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(g,L,y){var c=g("./GenericWorker"),l=g("../crc32");function n(){c.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}g("../utils").inherits(n,c),n.prototype.processChunk=function(h){this.streamInfo.crc32=l(h.data,this.streamInfo.crc32||0),this.push(h)},L.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(g,L,y){var c=g("../utils"),l=g("./GenericWorker");function n(h){l.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}c.inherits(n,l),n.prototype.processChunk=function(h){if(h){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+h.data.length}l.prototype.processChunk.call(this,h)},L.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(g,L,y){var c=g("../utils"),l=g("./GenericWorker");function n(h){l.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(v){b.dataIsReady=!0,b.data=v,b.max=v&&v.length||0,b.type=c.getTypeOf(v),b.isPaused||b._tickAndRepeat()},function(v){b.error(v)})}c.inherits(n,l),n.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,c.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(c.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var h=null,b=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":h=this.data.substring(this.index,b);break;case"uint8array":h=this.data.subarray(this.index,b);break;case"array":case"nodebuffer":h=this.data.slice(this.index,b)}return this.index=b,this.push({data:h,meta:{percent:this.max?this.index/this.max*100:0}})},L.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(g,L,y){function c(l){this.name=l||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}c.prototype={push:function(l){this.emit("data",l)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(l){this.emit("error",l)}return!0},error:function(l){return!this.isFinished&&(this.isPaused?this.generatedError=l:(this.isFinished=!0,this.emit("error",l),this.previous&&this.previous.error(l),this.cleanUp()),!0)},on:function(l,n){return this._listeners[l].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(l,n){if(this._listeners[l])for(var h=0;h<this._listeners[l].length;h++)this._listeners[l][h].call(this,n)},pipe:function(l){return l.registerPrevious(this)},registerPrevious:function(l){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=l.streamInfo,this.mergeStreamInfo(),this.previous=l;var n=this;return l.on("data",function(h){n.processChunk(h)}),l.on("end",function(){n.end()}),l.on("error",function(h){n.error(h)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var l=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),l=!0),this.previous&&this.previous.resume(),!l},flush:function(){},processChunk:function(l){this.push(l)},withStreamInfo:function(l,n){return this.extraStreamInfo[l]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var l in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,l)&&(this.streamInfo[l]=this.extraStreamInfo[l])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var l="Worker "+this.name;return this.previous?this.previous+" -> "+l:l}},L.exports=c},{}],29:[function(g,L,y){var c=g("../utils"),l=g("./ConvertWorker"),n=g("./GenericWorker"),h=g("../base64"),b=g("../support"),v=g("../external"),m=null;if(b.nodestream)try{m=g("../nodejs/NodejsStreamOutputAdapter")}catch{}function _(d,r){return new v.Promise(function(o,s){var f=[],w=d._internalType,S=d._outputType,k=d._mimeType;d.on("data",function(D,O){f.push(D),r&&r(O)}).on("error",function(D){f=[],s(D)}).on("end",function(){try{var D=function(O,W,I){switch(O){case"blob":return c.newBlob(c.transformTo("arraybuffer",W),I);case"base64":return h.encode(W);default:return c.transformTo(O,W)}}(S,function(O,W){var I,G=0,q=null,p=0;for(I=0;I<W.length;I++)p+=W[I].length;switch(O){case"string":return W.join("");case"array":return Array.prototype.concat.apply([],W);case"uint8array":for(q=new Uint8Array(p),I=0;I<W.length;I++)q.set(W[I],G),G+=W[I].length;return q;case"nodebuffer":return Buffer.concat(W);default:throw new Error("concat : unsupported type '"+O+"'")}}(w,f),k);o(D)}catch(O){s(O)}f=[]}).resume()})}function i(d,r,o){var s=r;switch(r){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=r,this._mimeType=o,c.checkSupport(s),this._worker=d.pipe(new l(s)),d.lock()}catch(f){this._worker=new n("error"),this._worker.error(f)}}i.prototype={accumulate:function(d){return _(this,d)},on:function(d,r){var o=this;return d==="data"?this._worker.on(d,function(s){r.call(o,s.data,s.meta)}):this._worker.on(d,function(){c.delay(r,arguments,o)}),this},resume:function(){return c.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(d){if(c.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new m(this,{objectMode:this._outputType!=="nodebuffer"},d)}},L.exports=i},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(g,L,y){if(y.base64=!0,y.array=!0,y.string=!0,y.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",y.nodebuffer=typeof Buffer<"u",y.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")y.blob=!1;else{var c=new ArrayBuffer(0);try{y.blob=new Blob([c],{type:"application/zip"}).size===0}catch{try{var l=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);l.append(c),y.blob=l.getBlob("application/zip").size===0}catch{y.blob=!1}}}try{y.nodestream=!!g("readable-stream").Readable}catch{y.nodestream=!1}},{"readable-stream":16}],31:[function(g,L,y){for(var c=g("./utils"),l=g("./support"),n=g("./nodejsUtils"),h=g("./stream/GenericWorker"),b=new Array(256),v=0;v<256;v++)b[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;b[254]=b[254]=1;function m(){h.call(this,"utf-8 decode"),this.leftOver=null}function _(){h.call(this,"utf-8 encode")}y.utf8encode=function(i){return l.nodebuffer?n.newBufferFrom(i,"utf-8"):function(d){var r,o,s,f,w,S=d.length,k=0;for(f=0;f<S;f++)(64512&(o=d.charCodeAt(f)))==55296&&f+1<S&&(64512&(s=d.charCodeAt(f+1)))==56320&&(o=65536+(o-55296<<10)+(s-56320),f++),k+=o<128?1:o<2048?2:o<65536?3:4;for(r=l.uint8array?new Uint8Array(k):new Array(k),f=w=0;w<k;f++)(64512&(o=d.charCodeAt(f)))==55296&&f+1<S&&(64512&(s=d.charCodeAt(f+1)))==56320&&(o=65536+(o-55296<<10)+(s-56320),f++),o<128?r[w++]=o:(o<2048?r[w++]=192|o>>>6:(o<65536?r[w++]=224|o>>>12:(r[w++]=240|o>>>18,r[w++]=128|o>>>12&63),r[w++]=128|o>>>6&63),r[w++]=128|63&o);return r}(i)},y.utf8decode=function(i){return l.nodebuffer?c.transformTo("nodebuffer",i).toString("utf-8"):function(d){var r,o,s,f,w=d.length,S=new Array(2*w);for(r=o=0;r<w;)if((s=d[r++])<128)S[o++]=s;else if(4<(f=b[s]))S[o++]=65533,r+=f-1;else{for(s&=f===2?31:f===3?15:7;1<f&&r<w;)s=s<<6|63&d[r++],f--;1<f?S[o++]=65533:s<65536?S[o++]=s:(s-=65536,S[o++]=55296|s>>10&1023,S[o++]=56320|1023&s)}return S.length!==o&&(S.subarray?S=S.subarray(0,o):S.length=o),c.applyFromCharCode(S)}(i=c.transformTo(l.uint8array?"uint8array":"array",i))},c.inherits(m,h),m.prototype.processChunk=function(i){var d=c.transformTo(l.uint8array?"uint8array":"array",i.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var r=d;(d=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),d.set(r,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var o=function(f,w){var S;for((w=w||f.length)>f.length&&(w=f.length),S=w-1;0<=S&&(192&f[S])==128;)S--;return S<0||S===0?w:S+b[f[S]]>w?S:w}(d),s=d;o!==d.length&&(l.uint8array?(s=d.subarray(0,o),this.leftOver=d.subarray(o,d.length)):(s=d.slice(0,o),this.leftOver=d.slice(o,d.length))),this.push({data:y.utf8decode(s),meta:i.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:y.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},y.Utf8DecodeWorker=m,c.inherits(_,h),_.prototype.processChunk=function(i){this.push({data:y.utf8encode(i.data),meta:i.meta})},y.Utf8EncodeWorker=_},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(g,L,y){var c=g("./support"),l=g("./base64"),n=g("./nodejsUtils"),h=g("./external");function b(r){return r}function v(r,o){for(var s=0;s<r.length;++s)o[s]=255&r.charCodeAt(s);return o}g("setimmediate"),y.newBlob=function(r,o){y.checkSupport("blob");try{return new Blob([r],{type:o})}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return s.append(r),s.getBlob(o)}catch{throw new Error("Bug : can't construct the Blob.")}}};var m={stringifyByChunk:function(r,o,s){var f=[],w=0,S=r.length;if(S<=s)return String.fromCharCode.apply(null,r);for(;w<S;)o==="array"||o==="nodebuffer"?f.push(String.fromCharCode.apply(null,r.slice(w,Math.min(w+s,S)))):f.push(String.fromCharCode.apply(null,r.subarray(w,Math.min(w+s,S)))),w+=s;return f.join("")},stringifyByChar:function(r){for(var o="",s=0;s<r.length;s++)o+=String.fromCharCode(r[s]);return o},applyCanBeUsed:{uint8array:function(){try{return c.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return c.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}}()}};function _(r){var o=65536,s=y.getTypeOf(r),f=!0;if(s==="uint8array"?f=m.applyCanBeUsed.uint8array:s==="nodebuffer"&&(f=m.applyCanBeUsed.nodebuffer),f)for(;1<o;)try{return m.stringifyByChunk(r,s,o)}catch{o=Math.floor(o/2)}return m.stringifyByChar(r)}function i(r,o){for(var s=0;s<r.length;s++)o[s]=r[s];return o}y.applyFromCharCode=_;var d={};d.string={string:b,array:function(r){return v(r,new Array(r.length))},arraybuffer:function(r){return d.string.uint8array(r).buffer},uint8array:function(r){return v(r,new Uint8Array(r.length))},nodebuffer:function(r){return v(r,n.allocBuffer(r.length))}},d.array={string:_,array:b,arraybuffer:function(r){return new Uint8Array(r).buffer},uint8array:function(r){return new Uint8Array(r)},nodebuffer:function(r){return n.newBufferFrom(r)}},d.arraybuffer={string:function(r){return _(new Uint8Array(r))},array:function(r){return i(new Uint8Array(r),new Array(r.byteLength))},arraybuffer:b,uint8array:function(r){return new Uint8Array(r)},nodebuffer:function(r){return n.newBufferFrom(new Uint8Array(r))}},d.uint8array={string:_,array:function(r){return i(r,new Array(r.length))},arraybuffer:function(r){return r.buffer},uint8array:b,nodebuffer:function(r){return n.newBufferFrom(r)}},d.nodebuffer={string:_,array:function(r){return i(r,new Array(r.length))},arraybuffer:function(r){return d.nodebuffer.uint8array(r).buffer},uint8array:function(r){return i(r,new Uint8Array(r.length))},nodebuffer:b},y.transformTo=function(r,o){if(o=o||"",!r)return o;y.checkSupport(r);var s=y.getTypeOf(o);return d[s][r](o)},y.resolve=function(r){for(var o=r.split("/"),s=[],f=0;f<o.length;f++){var w=o[f];w==="."||w===""&&f!==0&&f!==o.length-1||(w===".."?s.pop():s.push(w))}return s.join("/")},y.getTypeOf=function(r){return typeof r=="string"?"string":Object.prototype.toString.call(r)==="[object Array]"?"array":c.nodebuffer&&n.isBuffer(r)?"nodebuffer":c.uint8array&&r instanceof Uint8Array?"uint8array":c.arraybuffer&&r instanceof ArrayBuffer?"arraybuffer":void 0},y.checkSupport=function(r){if(!c[r.toLowerCase()])throw new Error(r+" is not supported by this platform")},y.MAX_VALUE_16BITS=65535,y.MAX_VALUE_32BITS=-1,y.pretty=function(r){var o,s,f="";for(s=0;s<(r||"").length;s++)f+="\\x"+((o=r.charCodeAt(s))<16?"0":"")+o.toString(16).toUpperCase();return f},y.delay=function(r,o,s){setImmediate(function(){r.apply(s||null,o||[])})},y.inherits=function(r,o){function s(){}s.prototype=o.prototype,r.prototype=new s},y.extend=function(){var r,o,s={};for(r=0;r<arguments.length;r++)for(o in arguments[r])Object.prototype.hasOwnProperty.call(arguments[r],o)&&s[o]===void 0&&(s[o]=arguments[r][o]);return s},y.prepareContent=function(r,o,s,f,w){return h.Promise.resolve(o).then(function(S){return c.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new h.Promise(function(k,D){var O=new FileReader;O.onload=function(W){k(W.target.result)},O.onerror=function(W){D(W.target.error)},O.readAsArrayBuffer(S)}):S}).then(function(S){var k=y.getTypeOf(S);return k?(k==="arraybuffer"?S=y.transformTo("uint8array",S):k==="string"&&(w?S=l.decode(S):s&&f!==!0&&(S=function(D){return v(D,c.uint8array?new Uint8Array(D.length):new Array(D.length))}(S))),S):h.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(g,L,y){var c=g("./reader/readerFor"),l=g("./utils"),n=g("./signature"),h=g("./zipEntry"),b=g("./support");function v(m){this.files=[],this.loadOptions=m}v.prototype={checkSignature:function(m){if(!this.reader.readAndCheckSignature(m)){this.reader.index-=4;var _=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+l.pretty(_)+", expected "+l.pretty(m)+")")}},isSignature:function(m,_){var i=this.reader.index;this.reader.setIndex(m);var d=this.reader.readString(4)===_;return this.reader.setIndex(i),d},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var m=this.reader.readData(this.zipCommentLength),_=b.uint8array?"uint8array":"array",i=l.transformTo(_,m);this.zipComment=this.loadOptions.decodeFileName(i)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var m,_,i,d=this.zip64EndOfCentralSize-44;0<d;)m=this.reader.readInt(2),_=this.reader.readInt(4),i=this.reader.readData(_),this.zip64ExtensibleData[m]={id:m,length:_,value:i}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var m,_;for(m=0;m<this.files.length;m++)_=this.files[m],this.reader.setIndex(_.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),_.readLocalPart(this.reader),_.handleUTF8(),_.processAttributes()},readCentralDir:function(){var m;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(m=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(m);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var m=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(m<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip f
12ile ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(m);var _=m;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===l.MAX_VALUE_16BITS||this.diskWithCentralDirStart===l.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===l.MAX_VALUE_16BITS||this.centralDirRecords===l.MAX_VALUE_16BITS||this.centralDirSize===l.MAX_VALUE_32BITS||this.centralDirOffset===l.MAX_VALUE_32BITS){if(this.zip64=!0,(m=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(m),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var d=_-i;if(0<d)this.isSignature(_,n.CENTRAL_FILE_HEADER)||(this.reader.zero=d);else if(d<0)throw new Error("Corrupted zip: missing "+Math.abs(d)+" bytes.")},prepareReader:function(m){this.reader=c(m)},load:function(m){this.prepareReader(m),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},L.exports=v},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(g,L,y){var c=g("./reader/readerFor"),l=g("./utils"),n=g("./compressedObject"),h=g("./crc32"),b=g("./utf8"),v=g("./compressions"),m=g("./support");function _(i,d){this.options=i,this.loadOptions=d}_.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(i){var d,r;if(i.skip(22),this.fileNameLength=i.readInt(2),r=i.readInt(2),this.fileName=i.readData(this.fileNameLength),i.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((d=function(o){for(var s in v)if(Object.prototype.hasOwnProperty.call(v,s)&&v[s].magic===o)return v[s];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+l.pretty(this.compressionMethod)+" unknown (inner file : "+l.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,d,i.readData(this.compressedSize))},readCentralPart:function(i){this.versionMadeBy=i.readInt(2),i.skip(2),this.bitFlag=i.readInt(2),this.compressionMethod=i.readString(2),this.date=i.readDate(),this.crc32=i.readInt(4),this.compressedSize=i.readInt(4),this.uncompressedSize=i.readInt(4);var d=i.readInt(2);if(this.extraFieldsLength=i.readInt(2),this.fileCommentLength=i.readInt(2),this.diskNumberStart=i.readInt(2),this.internalFileAttributes=i.readInt(2),this.externalFileAttributes=i.readInt(4),this.localHeaderOffset=i.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");i.skip(d),this.readExtraFields(i),this.parseZIP64ExtraField(i),this.fileComment=i.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var i=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),i==0&&(this.dosPermissions=63&this.externalFileAttributes),i==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var i=c(this.extraFields[1].value);this.uncompressedSize===l.MAX_VALUE_32BITS&&(this.uncompressedSize=i.readInt(8)),this.compressedSize===l.MAX_VALUE_32BITS&&(this.compressedSize=i.readInt(8)),this.localHeaderOffset===l.MAX_VALUE_32BITS&&
vendor: 53,677 bytes, line 12
12(this.localHeaderOffset=i.readInt(8)),this.diskNumberStart===l.MAX_VALUE_32BITS&&(this.diskNumberStart=i.readInt(4))}},readExtraFields:function(i){var d,r,o,s=i.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});i.index+4<s;)d=i.readInt(2),r=i.readInt(2),o=i.readData(r),this.extraFields[d]={id:d,length:r,value:o};i.setIndex(s)},handleUTF8:function(){var i=m.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=b.utf8decode(this.fileName),this.fileCommentStr=b.utf8decode(this.fileComment);else{var d=this.findExtraFieldUnicodePath();if(d!==null)this.fileNameStr=d;else{var r=l.transformTo(i,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var o=this.findExtraFieldUnicodeComment();if(o!==null)this.fileCommentStr=o;else{var s=l.transformTo(i,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var i=this.extraFields[28789];if(i){var d=c(i.value);return d.readInt(1)!==1||h(this.fileName)!==d.readInt(4)?null:b.utf8decode(d.readData(i.length-5))}return null},findExtraFieldUnicodeComment:function(){var i=this.extraFields[25461];if(i){var d=c(i.value);return d.readInt(1)!==1||h(this.fileComment)!==d.readInt(4)?null:b.utf8decode(d.readData(i.length-5))}return null}},L.exports=_},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(g,L,y){function c(d,r,o){this.name=d,this.dir=o.dir,this.date=o.date,this.comment=o.comment,this.unixPermissions=o.unixPermissions,this.dosPermissions=o.dosPermissions,this._data=r,this._dataBinary=o.binary,this.options={compression:o.compression,compressionOptions:o.compressionOptions}}var l=g("./stream/StreamHelper"),n=g("./stream/DataWorker"),h=g("./utf8"),b=g("./compressedObject"),v=g("./stream/GenericWorker");c.prototype={internalStream:function(d){var r=null,o="string";try{if(!d)throw new Error("No output type specified.");var s=(o=d.toLowerCase())==="string"||o==="text";o!=="binarystring"&&o!=="text"||(o="string"),r=this._decompressWorker();var f=!this._dataBinary;f&&!s&&(r=r.pipe(new h.Utf8EncodeWorker)),!f&&s&&(r=r.pipe(new h.Utf8DecodeWorker))}catch(w){(r=new v("error")).error(w)}return new l(r,o,"")},async:function(d,r){return this.internalStream(d).accumulate(r)},nodeStream:function(d,r){return this.internalStream(d||"nodebuffer").toNodejsStream(r)},_compressWorker:function(d,r){if(this._data instanceof b&&this._data.compression.magic===d.magic)return this._data.getCompressedWorker();var o=this._decompressWorker();return this._dataBinary||(o=o.pipe(new h.Utf8EncodeWorker)),b.createWorkerFrom(o,d,r)},_decompressWorker:function(){return this._data instanceof b?this._data.getContentWorker():this._data instanceof v?this._data:new n(this._data)}};for(var m=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],_=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},i=0;i<m.length;i++)c.prototype[m[i]]=_;L.exports=c},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(g,L,y){(function(c){var l,n,h=c.MutationObserver||c.WebKitMutationObserver;if(h){var b=0,v=new h(d),m=c.document.createTextNode("");v.observe(m,{characterData:!0}),l=function(){m.data=b=++b%2}}else if(c.setImmediate||c.MessageChannel===void 0)l="document"in c&&"onreadystatechange"in c.document.createElement("script")?function(){var r=c.document.createElement("script");r.onreadystatechange=function(){d(),r.onreadystatechange=null,r.parentNode.removeChild(r),r=null},c.document.documentElement.appendChild(r)}:function(){setTimeout(d,0)};else{var _=new c.MessageChannel;_.port1.onmessage=d,l=function(){_.port2.postMessage(0)}}var i=[];function d(){var r,o;n=!0;for(var s=i.length;s;){for(o=i,i=[],r=-1;++r<s;)o[r]();s=i.length}n=!1}L.exports=function(r){i.push(r)!==1||n||l()}}).call(this,typeof zt<"u"?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(g,L,y){var c=g("immediate");function l(){}var n={},h=["REJECTED"],b=["FULFILLED"],v=["PENDING"];function m(s){if(typeof s!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,s!==l&&r(this,s)}function _(s,f,w){this.promise=s,typeof f=="function"&&(this.onFulfilled=f,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function i(s,f,w){c(function(){var S;try{S=f(w)}catch(k){return n.reject(s,k)}S===s?n.reject(s,new TypeError("Cannot resolve promise with itself")):n.resolve(s,S)})}function d(s){var f=s&&s.then;if(s&&(typeof s=="object"||typeof s=="function")&&typeof f=="function")return function(){f.apply(s,arguments)}}function r(s,f){var w=!1;function S(O){w||(w=!0,n.reject(s,O))}function k(O){w||(w=!0,n.resolve(s,O))}var D=o(function(){f(k,S)});D.status==="error"&&S(D.value)}function o(s,f){var w={};try{w.value=s(f),w.status="success"}catch(S){w.status="error",w.value=S}return w}(L.exports=m).prototype.finally=function(s){if(typeof s!="function")return this;var f=this.constructor;return this.then(function(w){return f.resolve(s()).then(function(){return w})},function(w){return f.resolve(s()).then(function(){throw w})})},m.prototype.catch=function(s){return this.then(null,s)},m.prototype.then=function(s,f){if(typeof s!="function"&&this.state===b||typeof f!="function"&&this.state===h)return this;var w=new this.constructor(l);return this.state!==v?i(w,this.state===b?s:f,this.outcome):this.queue.push(new _(w,s,f)),w},_.prototype.callFulfilled=function(s){n.resolve(this.promise,s)},_.prototype.otherCallFulfilled=function(s){i(this.promise,this.onFulfilled,s)},_.prototype.callRejected=function(s){n.reject(this.promise,s)},_.prototype.otherCallRejected=function(s){i(this.promise,this.onRejected,s)},n.resolve=function(s,f){var w=o(d,f);if(w.status==="error")return n.reject(s,w.value);var S=w.value;if(S)r(s,S);else{s.state=b,s.outcome=f;for(var k=-1,D=s.queue.length;++k<D;)s.queue[k].callFulfilled(f)}return s},n.reject=function(s,f){s.state=h,s.outcome=f;for(var w=-1,S=s.queue.length;++w<S;)s.queue[w].callRejected(f);return s},m.resolve=function(s){return s instanceof this?s:n.resolve(new this(l),s)},m.reject=function(s){var f=new this(l);return n.reject(f,s)},m.all=function(s){var f=this;if(Object.prototype.toString.call(s)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=s.length,S=!1;if(!w)return this.resolve([]);for(var k=new Array(w),D=0,O=-1,W=new this(l);++O<w;)I(s[O],O);return W;function I(G,q){f.resolve(G).then(function(p){k[q]=p,++D!==w||S||(S=!0,n.resolve(W,k))},function(p){S||(S=!0,n.reject(W,p))})}},m.race=function(s){var f=this;if(Object.prototype.toString.call(s)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=s.length,S=!1;if(!w)return this.resolve([]);for(var k=-1,D=new this(l);++k<w;)O=s[k],f.resolve(O).then(function(W){S||(S=!0,n.resolve(D,W))},function(W){S||(S=!0,n.reject(D,W))});var O;return D}},{immediate:36}],38:[function(g,L,y){var c={};(0,g("./lib/utils/common").assign)(c,g("./lib/deflate"),g("./lib/inflate"),g("./lib/zlib/constants")),L.exports=c},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(g,L,y){var c=g("./zlib/deflate"),l=g("./utils/common"),n=g("./utils/strings"),h=g("./zlib/messages"),b=g("./zlib/zstream"),v=Object.prototype.toString,m=0,_=-1,i=0,d=8;function r(s){if(!(this instanceof r))return new r(s);this.options=l.assign({level:_,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:i,to:""},s||{});var f=this.options;f.raw&&0<f.windowBits?f.windowBits=-f.windowBits:f.gzip&&0<f.windowBits&&f.windowBits<16&&(f.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new b,this.strm.avail_out=0;var w=c.deflateInit2(this.strm,f.level,f.method,f.windowBits,f.memLevel,f.strategy);if(w!==m)throw new Error(h[w]);if(f.header&&c.deflateSetHeader(this.strm,f.header),f.dictionary){var S;if(S=typeof f.dictionary=="string"?n.string2buf(f.dictionary):v.call(f.dictionary)==="[object ArrayBuffer]"?new Uint8Array(f.dictionary):f.dictionary,(w=c.deflateSetDictionary(this.strm,S))!==m)throw new Error(h[w]);this._dict_set=!0}}function o(s,f){var w=new r(f);if(w.push(s,!0),w.err)throw w.msg||h[w.err];return w.result}r.prototype.push=function(s,f){var w,S,k=this.strm,D=this.options.chunkSize;if(this.ended)return!1;S=f===~~f?f:f===!0?4:0,typeof s=="string"?k.input=n.string2buf(s):v.call(s)==="[object ArrayBuffer]"?k.input=new Uint8Array(s):k.input=s,k.next_in=0,k.avail_in=k.input.length;do{if(k.avail_out===0&&(k.output=new l.Buf8(D),k.next_out=0,k.avail_out=D),(w=c.deflate(k,S))!==1&&w!==m)return this.onEnd(w),!(this.ended=!0);k.avail_out!==0&&(k.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(l.shrinkBuf(k.output,k.next_out))):this.onData(l.shrinkBuf(k.output,k.next_out)))}while((0<k.avail_in||k.avail_out===0)&&w!==1);return S===4?(w=c.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===m):S!==2||(this.onEnd(m),!(k.avail_out=0))},r.prototype.onData=function(s){this.chunks.push(s)},r.prototype.onEnd=function(s){s===m&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=s,this.msg=this.strm.msg},y.Deflate=r,y.deflate=o,y.deflateRaw=function(s,f){return(f=f||{}).raw=!0,o(s,f)},y.gzip=function(s,f){return(f=f||{}).gzip=!0,o(s,f)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(g,L,y){var c=g("./zlib/inflate"),l=g("./utils/common"),n=g("./utils/strings"),h=g("./zlib/constants"),b=g("./zlib/messages"),v=g("./zlib/zstream"),m=g("./zlib/gzheader"),_=Object.prototype.toString;function i(r){if(!(this instanceof i))return new i(r);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},r||{});var o=this.options;o.raw&&0<=o.windowBits&&o.windowBits<16&&(o.windowBits=-o.windowBits,o.windowBits===0&&(o.windowBits=-15)),!(0<=o.windowBits&&o.windowBits<16)||r&&r.windowBits||(o.windowBits+=32),15<o.windowBits&&o.windowBits<48&&!(15&o.windowBits)&&(o.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var s=c.inflateInit2(this.strm,o.windowBits);if(s!==h.Z_OK)throw new Error(b[s]);this.header=new m,c.inflateGetHeader(this.strm,this.header)}function d(r,o){var s=new i(o);if(s.push(r,!0),s.err)throw s.msg||b[s.err];return s.result}i.prototype.push=function(r,o){var s,f,w,S,k,D,O=this.strm,W=this.options.chunkSize,I=this.options.dictionary,G=!1;if(this.ended)return!1;f=o===~~o?o:o===!0?h.Z_FINISH:h.Z_NO_FLUSH,typeof r=="string"?O.input=n.binstring2buf(r):_.call(r)==="[object ArrayBuffer]"?O.input=new Uint8Array(r):O.input=r,O.next_in=0,O.avail_in=O.input.length;do{if(O.avail_out===0&&(O.output=new l.Buf8(W),O.next_out=0,O.avail_out=W),(s=c.inflate(O,h.Z_NO_FLUSH))===h.Z_NEED_DICT&&I&&(D=typeof I=="string"?n.string2buf(I):_.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,s=c.inflateSetDictionary(this.strm,D)),s===h.Z_BUF_ERROR&&G===!0&&(s=h.Z_OK,G=!1),s!==h.Z_STREAM_END&&s!==h.Z_OK)return this.onEnd(s),!(this.ended=!0);O.next_out&&(O.avail_out!==0&&s!==h.Z_STREAM_END&&(O.avail_in!==0||f!==h.Z_FINISH&&f!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=n.utf8border(O.output,O.next_out),S=O.next_out-w,k=n.buf2string(O.output,w),O.next_out=S,O.avail_out=W-S,S&&l.arraySet(O.output,O.output,w,S,0),this.onData(k)):this.onData(l.shrinkBuf(O.output,O.next_out)))),O.avail_in===0&&O.avail_out===0&&(G=!0)}while((0<O.avail_in||O.avail_out===0)&&s!==h.Z_STREAM_END);return s===h.Z_STREAM_END&&(f=h.Z_FINISH),f===h.Z_FINISH?(s=c.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===h.Z_OK):f!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),!(O.avail_out=0))},i.prototype.onData=function(r){this.chunks.push(r)},i.prototype.onEnd=function(r){r===h.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg},y.Inflate=i,y.inflate=d,y.inflateRaw=function(r,o){return(o=o||{}).raw=!0,d(r,o)},y.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(g,L,y){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";y.assign=function(h){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var v=b.shift();if(v){if(typeof v!="object")throw new TypeError(v+"must be non-object");for(var m in v)v.hasOwnProperty(m)&&(h[m]=v[m])}}return h},y.shrinkBuf=function(h,b){return h.length===b?h:h.subarray?h.subarray(0,b):(h.length=b,h)};var l={arraySet:function(h,b,v,m,_){if(b.subarray&&h.subarray)h.set(b.subarray(v,v+m),_);else for(var i=0;i<m;i++)h[_+i]=b[v+i]},flattenChunks:function(h){var b,v,m,_,i,d;for(b=m=0,v=h.length;b<v;b++)m+=h[b].length;for(d=new Uint8Array(m),b=_=0,v=h.length;b<v;b++)i=h[b],d.set(i,_),_+=i.length;return d}},n={arraySet:function(h,b,v,m,_){for(var i=0;i<m;i++)h[_+i]=b[v+i]},flattenChunks:function(h){return[].concat.apply([],h)}};y.setTyped=function(h){h?(y.Buf8=Uint8Array,y.Buf16=Uint16Array,y.Buf32=Int32Array,y.assign(y,l)):(y.Buf8=Array,y.Buf16=Array,y.Buf32=Array,y.assign(y,n))},y.setTyped(c)},{}],42:[function(g,L,y){var c=g("./common"),l=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{l=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var h=new c.Buf8(256),b=0;b<256;b++)h[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;function v(m,_){if(_<65537&&(m.subarray&&n||!m.subarray&&l))return String.fromCharCode.apply(null,c.shrinkBuf(m,_));for(var i="",d=0;d<_;d++)i+=String.fromCharCode(m[d]);return i}h[254]=h[254]=1,y.string2buf=function(m){var _,i,d,r,o,s=m.length,f=0;for(r=0;r<s;r++)(64512&(i=m.charCodeAt(r)))==55296&&r+1<s&&(64512&(d=m.charCodeAt(r+1)))==56320&&(i=65536+(i-55296<<10)+(d-56320),r++),f+=i<128?1:i<2048?2:i<65536?3:4;for(_=new c.Buf8(f),r=o=0;o<f;r++)(64512&(i=m.charCodeAt(r)))==55296&&r+1<s&&(64512&(d=m.charCodeAt(r+1)))==56320&&(i=65536+(i-55296<<10)+(d-56320),r++),i<128?_[o++]=i:(i<2048?_[o++]=192|i>>>6:(i<65536?_[o++]=224|i>>>12:(_[o++]=240|i>>>18,_[o++]=128|i>>>12&63),_[o++]=128|i>>>6&63),_[o++]=128|63&i);return _},y.buf2binstring=function(m){return v(m,m.length)},y.binstring2buf=function(m){for(var _=new c.Buf8(m.length),i=0,d=_.length;i<d;i++)_[i]=m.charCodeAt(i);return _},y.buf2string=function(m,_){var i,d,r,o,s=_||m.length,f=new Array(2*s);for(i=d=0;i<s;)if((r=m[i++])<128)f[d++]=r;else if(4<(o=h[r]))f[d++]=65533,i+=o-1;else{for(r&=o===2?31:o===3?15:7;1<o&&i<s;)r=r<<6|63&m[i++],o--;1<o?f[d++]=65533:r<65536?f[d++]=r:(r-=65536,f[d++]=55296|r>>10&1023,f[d++]=56320|1023&r)}return v(f,d)},y.utf8border=function(m,_){var i;for((_=_||m.length)>m.length&&(_=m.length),i=_-1;0<=i&&(192&m[i])==128;)i--;return i<0||i===0?_:i+h[m[i]]>_?i:_}},{"./common":41}],43:[function(g,L,y){L.exports=function(c,l,n,h){for(var b=65535&c|0,v=c>>>16&65535|0,m=0;n!==0;){for(n-=m=2e3<n?2e3:n;v=v+(b=b+l[h++]|0)|0,--m;);b%=65521,v%=65521}return b|v<<16|0}},{}],44:[function(g,L,y){L.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(g,L,y){var c=function(){for(var l,n=[],h=0;h<256;h++){l=h;for(var b=0;b<8;b++)l=1&l?3988292384^l>>>1:l>>>1;n[h]=l}return n}();L.exports=function(l,n,h,b){var v=c,m=b+h;l^=-1;for(var _=b;_<m;_++)l=l>>>8^v[255&(l^n[_])];return-1^l}},{}],46:[function(g,L,y){var c,l=g("../utils/common"),n=g("./trees"),h=g("./adler32"),b=g("./crc32"),v=g("./messages"),m=0,_=4,i=0,d=-2,r=-1,o=4,s=2,f=8,w=9,S=286,k=30,D=19,O=2*S+1,W=15,I=3,G=258,q=G+I+1,p=42,R=113,e=1,F=2,et=3,M=4;function rt(t,T){return t.msg=v[T],T}function H(t){return(t<<1)-(4<t?9:0)}function Q(t){for(var T=t.length;0<=--T;)t[T]=0}function A(t){var T=t.state,j=T.pending;j>t.avail_out&&(j=t.avail_out),j!==0&&(l.arraySet(t.output,T.pending_buf,T.pending_out,j,t.next_out),t.next_out+=j,T.pending_out+=j,t.total_out+=j,t.avail_out-=j,T.pending-=j,T.pending===0&&(T.pending_out=0))}function E(t,T){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,T),t.block_start=t.strstart,A(t.strm)}function C(t,T){t.pending_buf[t.pending++]=T}function U(t,T){t.pending_buf[t.pending++]=T>>>8&255,t.pending_buf[t.pending++]=255&T}function B(t,T){var j,u,a=t.max_chain_length,x=t.strstart,P=t.prev_length,Z=t.nice_match,z=t.strstart>t.w_size-q?t.strstart-(t.w_size-q):0,$=t.window,Y=t.w_mask,K=t.prev,X=t.strstart+G,at=$[x+P-1],nt=$[x+P];t.prev_length>=t.good_match&&(a>>=2),Z>t.lookahead&&(Z=t.lookahead);do if($[(j=T)+P]===nt&&$[j+P-1]===at&&$[j]===$[x]&&$[++j]===$[x+1]){x+=2,j++;do;while($[++x]===$[++j]&&$[++x]===$[++j]&&$[++x]===$[++j]&&$[++x]===$[++j]&&$[++x]===$[++j]&&$[++x]===$[++j]&&$[++x]===$[++j]&&$[++x]===$[++j]&&x<X);if(u=G-(X-x),x=X-G,P<u){if(t.match_start=T,Z<=(P=u))break;at=$[x+P-1],nt=$[x+P]}}while((T=K[T&Y])>z&&--a!=0);return P<=t.lookahead?P:t.lookahead}function J(t){var T,j,u,a,x,P,Z,z,$,Y,K=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=K+(K-q)){for(l.arraySet(t.window,t.window,K,K,0),t.match_start-=K,t.strstart-=K,t.block_start-=K,T=j=t.hash_size;u=t.head[--T],t.head[T]=K<=u?u-K:0,--j;);for(T=j=K;u=t.prev[--T],t.prev[T]=K<=u?u-K:0,--j;);a+=K}if(t.strm.avail_in===0)break;if(P=t.strm,Z=t.window,z=t.strstart+t.lookahead,$=a,Y=void 0,Y=P.avail_in,$<Y&&(Y=$),j=Y===0?0:(P.avail_in-=Y,l.arraySet(Z,P.input,P.next_in,Y,z),P.state.wrap===1?P.adler=h(P.adler,Z,Y,z):P.state.wrap===2&&(P.adler=b(P.adler,Z,Y,z)),P.next_in+=Y,P.total_in+=Y,Y),t.lookahead+=j,t.lookahead+t.insert>=I)for(x=t.strstart-t.insert,t.ins_h=t.window[x],t.ins_h=(t.ins_h<<t.hash_shift^t.window[x+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[x+I-1])&t.hash_mask,t.prev[x&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=x,x++,t.insert--,!(t.lookahead+t.insert<I)););}while(t.lookahead<q&&t.strm.avail_in!==0)}function it(t,T){for(var j,u;;){if(t.lookahead<q){if(J(t),t.lookahead<q&&T===m)return e;if(t.lookahead===0)break}if(j=0,t.lookahead>=I&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,j=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),j!==0&&t.strstart-j<=t.w_size-q&&(t.match_length=B(t,j)),t.match_length>=I)if(u=n._tr_tally(t,t.strstart-t.match_start,t.match_length-I),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=I){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,j=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,--t.match_length!=0;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else u=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(u&&(E(t,!1),t.strm.avail_out===0))return e}return t.insert=t.strstart<I-1?t.strstart:I-1,T===_?(E(t,!0),t.strm.avail_out===0?et:M):t.last_lit&&(E(t,!1),t.strm.avail_out===0)?e:F}function V(t,T){for(var j,u,a;;){if(t.lookahead<q){if(J(t),t.lookahead<q&&T===m)return e;if(t.lookahead===0)break}if(j=0,t.lookahead>=I&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,j=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=I-1,j!==0&&t.prev_length<t.max_lazy_match&&t.strstart-j<=t.w_size-q&&(t.match_length=B(t,j),t.match_length<=5&&(t.strategy===1||t.match_length===I&&4096<t.strstart-t.match_start)&&(t.match_length=I-1)),t.prev_length>=I&&t.match_length<=t.prev_length){for(a=t.strstart+t.lookahead-I,u=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-I),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=a&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+I-1])&t.hash_mask,j=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),--t.prev_length!=0;);if(t.match_available=0,t.match_length=I-1,t.strstart++,u&&(E(t,!1),t.strm.avail_out===0))return e}else if(t.match_available){if((u=n._tr_tally(t,0,t.window[t.strstart-1]))&&E(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return e}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(u=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<I-1?t.strstart:I-1,T===_?(E(t,!0),t.strm.avail_out===0?et:M):t.last_lit&&(E(t,!1),t.strm.avail_out===0)?e:F}function tt(t,T,j,u,a){this.good_length=t,this.max_lazy=T,this.nice_length=j,this.max_chain=u,this.func=a}function st(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=f,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new l.Buf16(2*O),this.dyn_dtree=new l.Buf16(2*(2*k+1)),this.bl_tree=new l.Buf16(2*(2*D+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new l.Buf16(W+1),this.heap=new l.Buf16(2*S+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new l.Buf16(2*S+1),Q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ot(t){var T;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=s,(T=t.state).pending=0,T.pending_out=0,T.wrap<0&&(T.wrap=-T.wrap),T.status=T.wrap?p:R,t.adler=T.wrap===2?0:1,T.last_flush=m,n._tr_init(T),i):rt(t,d)}function ut(t){var T=ot(t);return T===i&&function(j){j.window_size=2*j.w_size,Q(j.head),j.max_lazy_match=c[j.level].max_lazy,j.good_match=c[j.level].good_length,j.nice_match=c[j.level].nice_length,j.max_chain_length=c[j.level].max_chain,j.strstart=0,j.block_start=0,j.lookahead=0,j.insert=0,j.match_length=j.prev_length=I-1,j.match_available=0,j.ins_h=0}(t.state),T}function dt(t,T,j,u,a,x){if(!t)return d;var P=1;if(T===r&&(T=6),u<0?(P=0,u=-u):15<u&&(P=2,u-=16),a<1||w<a||j!==f||u<8||15<u||T<0||9<T||x<0||o<x)return rt(t,d);u===8&&(u=9);var Z=new st;return(t.state=Z).strm=t,Z.wrap=P,Z.gzhead=null,Z.w_bits=u,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=a+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+I-1)/I),Z.window=new l.Buf8(2*Z.w_size),Z.head=new l.Buf16(Z.hash_size),Z.prev=new l.Buf16(Z.w_size),Z.lit_bufsize=1<<a+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new l.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=T,Z.strategy=x,Z.method=j,ut(t)}c=[new tt(0,0,0,0,function(t,T){var j=65535;for(j>t.pending_buf_size-5&&(j=t.pending_buf_size-5);;){if(t.lookahead<=1){if(J(t),t.lookahead===0&&T===m)return e;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var u=t.block_start+j;if((t.strstart===0||t.strstart>=u)&&(t.lookahead=t.strstart-u,t.strstart=u,E(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-q&&(E(t,!1),t.strm.avail_out===0))return e}return t.insert=0,T===_?(E(t,!0),t.strm.avail_out===0?et:M):(t.strstart>t.block_start&&(E(t,!1),t.strm.avail_out),e)}),new tt(4,4,8,4,it),new tt(4,5,16,8,it),new tt(4,6,32,32,it),new tt(4,4,16,16,V),new tt(8,16,32,32,V),new tt(8,16,128,128,V),new tt(8,32,128,256,V),new tt(32,128,258,1024,V),new tt(32,258,258,4096,V)],y.deflateInit=function(t,T){return dt(t,T,f,15,8,0)},y.deflateInit2=dt,y.deflateReset=ut,y.deflateResetKeep=ot,y.deflateSetHeader=function(t,T){return t&&t.state?t.state.wrap!==2?d:(t.state.gzhead=T,i):d},y.deflate=function(t,T){var j,u,a,x;if(!t||!t.state||5<T||T<0)return t?rt(t,d):d;if(u=t.state,!t.output||!t.input&&t.avail_in!==0||u.status===666&&T!==_)return rt(t,t.avail_out===0?-5:d);if(u.strm=t,j=u.last_flush,u.last_flush=T,u.status===p)if(u.wrap===2)t.adler=0,C(u,31),C(u,139),C(u,8),u.gzhead?(C(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),C(u,255&u.gzhead.time),C(u,u.gzhead.time>>8&255),C(u,u.gzhead.time>>16&255),C(u,u.gzhead.time>>24&255),C(u,u.level===9?2:2<=u.strategy||u.level<2?4:0),C(u,255&u.gzhead.os),u.gzhead.extra&&u.gzhead.extra.length&&(C(u,255&u.gzhead.extra.length),C(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&(t.adler=b(t.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(C(u,0),C(u,0),C(u,0),C(u,0),C(u,0),C(u,u.level===9?2:2<=u.strategy||u.level<2?4:0),C(u,3),u.status=R);else{var P=f+(u.w_bits-8<<4)<<8;P|=(2<=u.strategy||u.level<2?0:u.level<6?1:u.level===6?2:3)<<6,u.strstart!==0&&(P|=32),P+=31-P%31,u.status=R,U(u,P),u.strstart!==0&&(U(u,t.adler>>>16),U(u,65535&t.adler)),t.adler=1}if(u.status===69)if(u.gzhead.extra){for(a=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>a&&(t.adler=b(t.adler,u.pending_buf,u.pending-a,a)),A(t),a=u.pending,u.pending!==u.pending_buf_size));)C(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>a&&(t.adler=b(t.adler,u.pending_buf,u.pending-a,a)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73;if(u.status===73)if(u.gzhead.name){a=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>a&&(t.adler=b(t.adler,u.pending_buf,u.pending-a,a)),A(t),a=u.pending,u.pending===u.pending_buf_size)){x=1;break}x=u.gzindex<u.gzhead.name.length?255&u.gzhead.name.charCodeAt(u.gzindex++):0,C(u,x)}while(x!==0);u.gzhead.hcrc&&u.pending>a&&(t.adler=b(t.adler,u.pending_buf,u.pending-a,a)),x===0&&(u.gzindex=0,u.status=91)}else u.status=91;if(u.status===91)if(u.gzhead.comment){a=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>a&&(t.adler=b(t.adler,u.pending_buf,u.pending-a,a)),A(t),a=u.pending,u.pending===u.pending_buf_size)){x=1;break}x=u.gzindex<u.gzhead.comment.length?255&u.gzhead.comment.charCodeAt(u.gzindex++):0,C(u,x)}while(x!==0);u.gzhead.hcrc&&u.pending>a&&(t.adler=b(t.adler,u.pending_buf,u.pending-a,a)),x===0&&(u.status=103)}else u.status=103;if(u.status===103&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&A(t),u.pending+2<=u.pending_buf_size&&(C(u,255&t.adler),C(u,t.adler>>8&255),t.adler=0,u.status=R)):u.status=R),u.pending!==0){if(A(t),t.avail_out===0)return u.last_flush=-1,i}else if(t.avail_in===0&&H(T)<=H(j)&&T!==_)return rt(t,-5);if(u.status===666&&t.avail_in!==0)return rt(t,-5);if(t.avail_in!==0||u.lookahead!==0||T!==m&&u.status!==666){var Z=u.strategy===2?function(z,$){for(var Y;;){if(z.lookahead===0&&(J(z),z.lookahead===0)){if($===m)return e;break}if(z.match_length=0,Y=n._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,Y&&(E(z,!1),z.strm.avail_out===0))return e}return z.insert=0,$===_?(E(z,!0),z.strm.avail_out===0?et:M):z.last_lit&&(E(z,!1),z.strm.avail_out===0)?e:F}(u,T):u.strategy===3?function(z,$){for(var Y,K,X,at,nt=z.window;;){if(z.lookahead<=G){if(J(z),z.lookahead<=G&&$===m)return e;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=I&&0<z.strstart&&(K=nt[X=z.strstart-1])===nt[++X]&&K===nt[++X]&&K===nt[++X]){at=z.strstart+G;do;while(K===nt[++X]&&K===nt[++X]&&K===nt[++X]&&K===nt[++X]&&K===nt[++X]&&K===nt[++X]&&K===nt[++X]&&K===nt[++X]&&X<at);z.match_length=G-(at-X),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=I?(Y=n._tr_tally(z,1,z.match_length-I),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(Y=n._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),Y&&(E(z,!1),z.strm.avail_out===0))return e}return z.insert=0,$===_?(E(z,!0),z.strm.avail_out===0?et:M):z.last_lit&&(E(z,!1),z.strm.avail_out===0)?e:F}(u,T):c[u.level].func(u,T);if(Z!==et&&Z!==M||(u.status=666),Z===e||Z===et)return t.avail_out===0&&(u.last_flush=-1),i;if(Z===F&&(T===1?n._tr_align(u):T!==5&&(n._tr_stored_block(u,0,0,!1),T===3&&(Q(u.head),u.lookahead===0&&(u.strstart=0,u.block_start=0,u.insert=0))),A(t),t.avail_out===0))return u.last_flush=-1,i}return T!==_?i:u.wrap<=0?1:(u.wrap===2?(C(u,255&t.adler),C(u,t.adler>>8&255),C(u,t.adler>>16&255),C(u,t.adler>>24&255),C(u,255&t.total_in),C(u,t.total_in>>8&255),C(u,t.total_in>>16&255),C(u,t.total_in>>24&255)):(U(u,t.adler>>>16),U(u,65535&t.adler)),A(t),0<u.wrap&&(u.wrap=-u.wrap),u.pending!==0?i:1)},y.deflateEnd=function(t){var T;return t&&t.state?(T=t.state.status)!==p&&T!==69&&T!==73&&T!==91&&T!==103&&T!==R&&T!==666?rt(t,d):(t.state=null,T===R?rt(t,-3):i):d},y.deflateSetDictionary=function(t,T){var j,u,a,x,P,Z,z,$,Y=T.length;if(!t||!t.state||(x=(j=t.state).wrap)===2||x===1&&j.status!==p||j.lookahead)return d;for(x===1&&(t.adler=h(t.adler,T,Y,0)),j.wrap=0,Y>=j.w_size&&(x===0&&(Q(j.head),j.strstart=0,j.block_start=0,j.insert=0),$=new l.Buf8(j.w_size),l.arraySet($,T,Y-j.w_size,j.w_size,0),T=$,Y=j.w_size),P=t.avail_in,Z=t.next_in,z=t.input,t.avail_in=Y,t.next_in=0,t.input=T,J(j);j.lookahead>=I;){for(u=j.strstart,a=j.lookahead-(I-1);j.ins_h=(j.ins_h<<j.hash_shift^j.window[u+I-1])&j.hash_mask,j.prev[u&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=u,u++,--a;);j.strstart=u,j.lookahead=I-1,J(j)}return j.strstart+=j.lookahead,j.block_start=j.strstart,j.insert=j.lookahead,j.lookahead=0,j.match_length=j.prev_length=I-1,j.match_available=0,t.next_in=Z,t.input=z,t.avail_in=P,j.wrap=x,i},y.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(g,L,y){L.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(g,L,y){L.exports=function(c,l){var n,h,b,v,m,_,i,d,r,o,s,f,w,S,k,D,O,W,I,G,q,p,R,e,F;n=c.state,h=c.next_in,e=c.input,b=h+(c.avail_in-5),v=c.next_out,F=c.output,m=v-(l-c.avail_out),_=v+(c.avail_out-257),i=n.dmax,d=n.wsize,r=n.whave,o=n.wnext,s=n.window,f=n.hold,w=n.bits,S=n.lencode,k=n.distcode,D=(1<<n.lenbits)-1,O=(1<<n.distbits)-1;t:do{w<15&&(f+=e[h++]<<w,w+=8,f+=e[h++]<<w,w+=8),W=S[f&D];e:for(;;){if(f>>>=I=W>>>24,w-=I,(I=W>>>16&255)===0)F[v++]=65535&W;else{if(!(16&I)){if(!(64&I)){W=S[(65535&W)+(f&(1<<I)-1)];continue e}if(32&I){n.mode=12;break t}c.msg="invalid literal/length code",n.mode=30;break t}G=65535&W,(I&=15)&&(w<I&&(f+=e[h++]<<w,w+=8),G+=f&(1<<I)-1,f>>>=I,w-=I),w<15&&(f+=e[h++]<<w,w+=8,f+=e[h++]<<w,w+=8),W=k[f&O];r:for(;;){if(f>>>=I=W>>>24,w-=I,!(16&(I=W>>>16&255))){if(!(64&I)){W=k[(65535&W)+(f&(1<<I)-1)];continue r}c.msg="invalid distance code",n.mode=30;break t}if(q=65535&W,w<(I&=15)&&(f+=e[h++]<<w,(w+=8)<I&&(f+=e[h++]<<w,w+=8)),i<(q+=f&(1<<I)-1)){c.msg="invalid distance too far back",n.mode=30;break t}if(f>>>=I,w-=I,(I=v-m)<q){if(r<(I=q-I)&&n.sane){c.msg="invalid distance too far back",n.mode=30;break t}if(R=s,(p=0)===o){if(p+=d-I,I<G){for(G-=I;F[v++]=s[p++],--I;);p=v-q,R=F}}else if(o<I){if(p+=d+o-I,(I-=o)<G){for(G-=I;F[v++]=s[p++],--I;);if(p=0,o<G){for(G-=I=o;F[v++]=s[p++],--I;);p=v-q,R=F}}}else if(p+=o-I,I<G){for(G-=I;F[v++]=s[p++],--I;);p=v-q,R=F}for(;2<G;)F[v++]=R[p++],F[v++]=R[p++],F[v++]=R[p++],G-=3;G&&(F[v++]=R[p++],1<G&&(F[v++]=R[p++]))}else{for(p=v-q;F[v++]=F[p++],F[v++]=F[p++],F[v++]=F[p++],2<(G-=3););G&&(F[v++]=F[p++],1<G&&(F[v++]=F[p++]))}break}}break}}while(h<b&&v<_);h-=G=w>>3,f&=(1<<(w-=G<<3))-1,c.next_in=h,c.next_out=v,c.avail_in=h<b?b-h+5:5-(h-b),c.avail_out=v<_?_-v+257:257-(v-_),n.hold=f,n.bits=w}},{}],49:[function(g,L,y){var c=g("../utils/common"),l=g("./adler32"),n=g("./crc32"),h=g("./inffast"),b=g("./inftrees"),v=1,m=2,_=0,i=-2,d=1,r=852,o=592;function s(p){return(p>>>24&255)+(p>>>8&65280)+((65280&p)<<8)+((255&p)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(p){var R;return p&&p.state?(R=p.state,p.total_in=p.total_out=R.total=0,p.msg="",R.wrap&&(p.adler=1&R.wrap),R.mode=d,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new c.Buf32(r),R.distcode=R.distdyn=new c.Buf32(o),R.sane=1,R.back=-1,_):i}function S(p){var R;return p&&p.state?((R=p.state).wsize=0,R.whave=0,R.wnext=0,w(p)):i}function k(p,R){var e,F;return p&&p.state?(F=p.state,R<0?(e=0,R=-R):(e=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?i:(F.window!==null&&F.wbits!==R&&(F.window=null),F.wrap=e,F.wbits=R,S(p))):i}function D(p,R){var e,F;return p?(F=new f,(p.state=F).window=null,(e=k(p,R))!==_&&(p.state=null),e):i}var O,W,I=!0;function G(p){if(I){var R;for(O=new c.Buf32(512),W=new c.Buf32(32),R=0;R<144;)p.lens[R++]=8;for(;R<256;)p.lens[R++]=9;for(;R<280;)p.lens[R++]=7;for(;R<288;)p.lens[R++]=8;for(b(v,p.lens,0,288,O,0,p.work,{bits:9}),R=0;R<32;)p.lens[R++]=5;b(m,p.lens,0,32,W,0,p.work,{bits:5}),I=!1}p.lencode=O,p.lenbits=9,p.distcode=W,p.distbits=5}function q(p,R,e,F){var et,M=p.state;return M.window===null&&(M.wsize=1<<M.wbits,M.wnext=0,M.whave=0,M.window=new c.Buf8(M.wsize)),F>=M.wsize?(c.arraySet(M.window,R,e-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):(F<(et=M.wsize-M.wnext)&&(et=F),c.arraySet(M.window,R,e-F,et,M.wnext),(F-=et)?(c.arraySet(M.window,R,e-F,F,0),M.wnext=F,M.whave=M.wsize):(M.wnext+=et,M.wnext===M.wsize&&(M.wnext=0),M.whave<M.wsize&&(M.whave+=et))),0}y.inflateReset=S,y.inflateReset2=k,y.inflateResetKeep=w,y.inflateInit=function(p){return D(p,15)},y.inflateInit2=D,y.inflate=function(p,R){var e,F,et,M,rt,H,Q,A,E,C,U,B,J,it,V,tt,st,ot,ut,dt,t,T,j,u,a=0,x=new c.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!p||!p.state||!p.output||!p.input&&p.avail_in!==0)return i;(e=p.state).mode===12&&(e.mode=13),rt=p.next_out,et=p.output,Q=p.avail_out,M=p.next_in,F=p.input,H=p.avail_in,A=e.hold,E=e.bits,C=H,U=Q,T=_;t:for(;;)switch(e.mode){case d:if(e.wrap===0){e.mode=13;break}for(;E<16;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(2&e.wrap&&A===35615){x[e.check=0]=255&A,x[1]=A>>>8&255,e.check=n(e.check,x,2,0),E=A=0,e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=!1),!(1&e.wrap)||(((255&A)<<8)+(A>>8))%31){p.msg="incorrect header check",e.mode=30;break}if((15&A)!=8){p.msg="unknown compression method",e.mode=30;break}if(E-=4,t=8+(15&(A>>>=4)),e.wbits===0)e.wbits=t;else if(t>e.wbits){p.msg="invalid window size",e.mode=30;break}e.dmax=1<<t,p.adler=e.check=1,e.mode=512&A?10:12,E=A=0;break;case 2:for(;E<16;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(e.flags=A,(255&e.flags)!=8){p.msg="unknown compression method",e.mode=30;break}if(57344&e.flags){p.msg="unknown header flags set",e.mode=30;break}e.head&&(e.head.text=A>>8&1),512&e.flags&&(x[0]=255&A,x[1]=A>>>8&255,e.check=n(e.check,x,2,0)),E=A=0,e.mode=3;case 3:for(;E<32;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}e.head&&(e.head.time=A),512&e.flags&&(x[0]=255&A,x[1]=A>>>8&255,x[2]=A>>>16&255,x[3]=A>>>24&255,e.check=n(e.check,x,4,0)),E=A=0,e.mode=4;case 4:for(;E<16;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}e.head&&(e.head.xflags=255&A,e.head.os=A>>8),512&e.flags&&(x[0]=255&A,x[1]=A>>>8&255,e.check=n(e.check,x,2,0)),E=A=0,e.mode=5;case 5:if(1024&e.flags){for(;E<16;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}e.length=A,e.head&&(e.head.extra_len=A),512&e.flags&&(x[0]=255&A,x[1]=A>>>8&255,e.check=n(e.check,x,2,0)),E=A=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&(H<(B=e.length)&&(B=H),B&&(e.head&&(t=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),c.arraySet(e.head.extra,F,M,B,t)),512&e.flags&&(e.check=n(e.check,F,B,M)),H-=B,M+=B,e.length-=B),e.length))break t;e.length=0,e.mode=7;case 7:if(2048&e.flags){if(H===0)break t;for(B=0;t=F[M+B++],e.head&&t&&e.length<65536&&(e.head.name+=String.fromCharCode(t)),t&&B<H;);if(512&e.flags&&(e.check=n(e.check,F,B,M)),H-=B,M+=B,t)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=8;case 8:if(4096&e.flags){if(H===0)break t;for(B=0;t=F[M+B++],e.head&&t&&e.length<65536&&(e.head.comment+=String.fromCharCode(t)),t&&B<H;);if(512&e.flags&&(e.check=n(e.check,F,B,M)),H-=B,M+=B,t)break t}else e.head&&(e.head.comment=null);e.mode=9;case 9:if(512&e.flags){for(;E<16;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(A!==(65535&e.check)){p.msg="header crc mismatch",e.mode=30;break}E=A=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),p.adler=e.check=0,e.mode=12;break;case 10:for(;E<32;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}p.adler=e.check=s(A),E=A=0,e.mode=11;case 11:if(e.havedict===0)return p.next_out=rt,p.avail_out=Q,p.next_in=M,p.avail_in=H,e.hold=A,e.bits=E,2;p.adler=e.check=1,e.mode=12;case 12:if(R===5||R===6)break t;case 13:if(e.last){A>>>=7&E,E-=7&E,e.mode=27;break}for(;E<3;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}switch(e.last=1&A,E-=1,3&(A>>>=1)){case 0:e.mode=14;break;case 1:if(G(e),e.mode=20,R!==6)break;A>>>=2,E-=2;break t;case 2:e.mode=17;break;case 3:p.msg="invalid block type",e.mode=30}A>>>=2,E-=2;break;case 14:for(A>>>=7&E,E-=7&E;E<32;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if((65535&A)!=(A>>>16^65535)){p.msg="invalid stored block lengths",e.mode=30;break}if(e.length=65535&A,E=A=0,e.mode=15,R===6)break t;case 15:e.mode=16;case 16:if(B=e.length){if(H<B&&(B=H),Q<B&&(B=Q),B===0)break t;c.arraySet(et,F,M,B,rt),H-=B,M+=B,Q-=B,rt+=B,e.length-=B;break}e.mode=12;break;case 17:for(;E<14;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(e.nlen=257+(31&A),A>>>=5,E-=5,e.ndist=1+(31&A),A>>>=5,E-=5,e.ncode=4+(15&A),A>>>=4,E-=4,286<e.nlen||30<e.ndist){p.msg="too many length or distance symbols",e.mode=30;break}e.have=0,e.mode=18;case 18:for(;e.have<e.ncode;){for(;E<3;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}e.lens[P[e.have++]]=7&A,A>>>=3,E-=3}for(;e.have<19;)e.lens[P[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,j={bits:e.lenbits},T=b(0,e.lens,0,19,e.lencode,0,e.work,j),e.lenbits=j.bits,T){p.msg="invalid code lengths set",e.mode=30;break}e.have=0,e.mode=19;case 19:for(;e.have<e.nlen+e.ndist;){for(;tt=(a=e.lencode[A&(1<<e.lenbits)-1])>>>16&255,st=65535&a,!((V=a>>>24)<=E);){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(st<16)A>>>=V,E-=V,e.lens[e.have++]=st;else{if(st===16){for(u=V+2;E<u;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(A>>>=V,E-=V,e.have===0){p.msg="invalid bit length repeat",e.mode=30;break}t=e.lens[e.have-1],B=3+(3&A),A>>>=2,E-=2}else if(st===17){for(u=V+3;E<u;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}E-=V,t=0,B=3+(7&(A>>>=V)),A>>>=3,E-=3}else{for(u=V+7;E<u;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}E-=V,t=0,B=11+(127&(A>>>=V)),A>>>=7,E-=7}if(e.have+B>e.nlen+e.ndist){p.msg="invalid bit length repeat",e.mode=30;break}for(;B--;)e.lens[e.have++]=t}}if(e.mode===30)break;if(e.lens[256]===0){p.msg="invalid code -- missing end-of-block",e.mode=30;break}if(e.lenbits=9,j={bits:e.lenbits},T=b(v,e.lens,0,e.nlen,e.lencode,0,e.work,j),e.lenbits=j.bits,T){p.msg="invalid literal/lengths set",e.mode=30;break}if(e.distbits=6,e.distcode=e.distdyn,j={bits:e.distbits},T=b(m,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,j),e.distbits=j.bits,T){p.msg="invalid distances set",e.mode=30;break}if(e.mode=20,R===6)break t;case 20:e.mode=21;case 21:if(6<=H&&258<=Q){p.next_out=rt,p.avail_out=Q,p.next_in=M,p.avail_in=H,e.hold=A,e.bits=E,h(p,U),rt=p.next_out,et=p.output,Q=p.avail_out,M=p.next_in,F=p.input,H=p.avail_in,A=e.hold,E=e.bits,e.mode===12&&(e.back=-1);break}for(e.back=0;tt=(a=e.lencode[A&(1<<e.lenbits)-1])>>>16&255,st=65535&a,!((V=a>>>24)<=E);){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(tt&&!(240&tt)){for(ot=V,ut=tt,dt=st;tt=(a=e.lencode[dt+((A&(1<<ot+ut)-1)>>ot)])>>>16&255,st=65535&a,!(ot+(V=a>>>24)<=E);){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}A>>>=ot,E-=ot,e.back+=ot}if(A>>>=V,E-=V,e.back+=V,e.length=st,tt===0){e.mode=26;break}if(32&tt){e.back=-1,e.mode=12;break}if(64&tt){p.msg="invalid literal/length code",e.mode=30;break}e.extra=15&tt,e.mode=22;case 22:if(e.extra){for(u=e.extra;E<u;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}e.length+=A&(1<<e.extra)-1,A>>>=e.extra,E-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=23;case 23:for(;tt=(a=e.distcode[A&(1<<e.distbits)-1])>>>16&255,st=65535&a,!((V=a>>>24)<=E);){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(!(240&tt)){for(ot=V,ut=tt,dt=st;tt=(a=e.distcode[dt+((A&(1<<ot+ut)-1)>>ot)])>>>16&255,st=65535&a,!(ot+(V=a>>>24)<=E);){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}A>>>=ot,E-=ot,e.back+=ot}if(A>>>=V,E-=V,e.back+=V,64&tt){p.msg="invalid distance code",e.mode=30;break}e.offset=st,e.extra=15&tt,e.mode=24;case 24:if(e.extra){for(u=e.extra;E<u;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}e.offset+=A&(1<<e.extra)-1,A>>>=e.extra,E-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){p.msg="invalid distance too far back",e.mode=30;break}e.mode=25;case 25:if(Q===0)break t;if(B=U-Q,e.offset>B){if((B=e.offset-B)>e.whave&&e.sane){p.msg="invalid distance too far back",e.mode=30;break}J=B>e.wnext?(B-=e.wnext,e.wsize-B):e.wnext-B,B>e.length&&(B=e.length),it=e.window}else it=et,J=rt-e.offset,B=e.length;for(Q<B&&(B=Q),Q-=B,e.length-=B;et[rt++]=it[J++],--B;);e.length===0&&(e.mode=21);break;case 26:if(Q===0)break t;et[rt++]=e.length,Q--,e.mode=21;break;case 27:if(e.wrap){for(;E<32;){if(H===0)break t;H--,A|=F[M++]<<E,E+=8}if(U-=Q,p.total_out+=U,e.total+=U,U&&(p.adler=e.check=e.flags?n(e.check,et,U,rt-U):l(e.check,et,U,rt-U)),U=Q,(e.flags?A:s(A))!==e.check){p.msg="incorrect data check",e.mode=30;break}E=A=0}e.mode=28;case 28:if(e.wrap&&e.flags){for(;E<32;){if(H===0)break t;H--,A+=F[M++]<<E,E+=8}if(A!==(4294967295&e.total)){p.msg="incorrect length check",e.mode=30;break}E=A=0}e.mode=29;case 29:T=1;break t;case 30:T=-3;break t;case 31:return-4;case 32:default:return i}return p.next_out=rt,p.avail_out=Q,p.next_in=M,p.avail_in=H,e.hold=A,e.bits=E,(e.wsize||U!==p.avail_out&&e.mode<30&&(e.mode<27||R!==4))&&q(p,p.output,p.next_out,U-p.avail_out)?(e.mode=31,-4):(C-=p.avail_in,U-=p.avail_out,p.total_in+=C,p.total_out+=U,e.total+=U,e.wrap&&U&&(p.adler=e.check=e.flags?n(e.check,et,U,p.next_out-U):l(e.check,et,U,p.next_out-U)),p.data_type=e.bits+(e.last?64:0)+(e.mode===12?128:0)+(e.mode===20||e.mode===15?256:0),(C==0&&U===0||R===4)&&T===_&&(T=-5),T)},y.inflateEnd=function(p){if(!p||!p.state)return i;var R=p.state;return R.window&&(R.window=null),p.state=null,_},y.inflateGetHeader=function(p,R){var e;return p&&p.state&&2&(e=p.state).wrap?((e.head=R).done=!1,_):i},y.inflateSetDictionary=function(p,R){var e,F=R.length;return p&&p.state?(e=p.state).wrap!==0&&e.mode!==11?i:e.mode===11&&l(1,R,F,0)!==e.check?-3:q(p,R,F,F)?(e.mode=31,-4):(e.havedict=1,_):i},y.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(g,L,y){var c=g("../utils/common"),l=[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],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],b=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];L.exports=function(v,m,_,i,d,r,o,s){var f,w,S,k,D,O,W,I,G,q=s.bits,p=0,R=0,e=0,F=0,et=0,M=0,rt=0,H=0,Q=0,A=0,E=null,C=0,U=new c.Buf16(16),B=new c.Buf16(16),J=null,it=0;for(p=0;p<=15;p++)U[p]=0;for(R=0;R<i;R++)U[m[_+R]]++;for(et=q,F=15;1<=F&&U[F]===0;F--);if(F<et&&(et=F),F===0)return d[r++]=20971520,d[r++]=20971520,s.bits=1,0;for(e=1;e<F&&U[e]===0;e++);for(et<e&&(et=e),p=H=1;p<=15;p++)if(H<<=1,(H-=U[p])<0)return-1;if(0<H&&(v===0||F!==1))return-1;for(B[1]=0,p=1;p<15;p++)B[p+1]=B[p]+U[p];for(R=0;R<i;R++)m[_+R]!==0&&(o[B[m[_+R]]++]=R);if(O=v===0?(E=J=o,19):v===1?(E=l,C-=257,J=n,it-=257,256):(E=h,J=b,-1),p=e,D=r,rt=R=A=0,S=-1,k=(Q=1<<(M=et))-1,v===1&&852<Q||v===2&&592<Q)return 1;for(;;){for(W=p-rt,G=o[R]<O?(I=0,o[R]):o[R]>O?(I=J[it+o[R]],E[C+o[R]]):(I=96,0),f=1<<p-rt,e=w=1<<M;d[D+(A>>rt)+(w-=f)]=W<<24|I<<16|G|0,w!==0;);for(f=1<<p-1;A&f;)f>>=1;if(f!==0?(A&=f-1,A+=f):A=0,R++,--U[p]==0){if(p===F)break;p=m[_+o[R]]}if(et<p&&(A&k)!==S){for(rt===0&&(rt=et),D+=e,H=1<<(M=p-rt);M+rt<F&&!((H-=U[M+rt])<=0);)M++,H<<=1;if(Q+=1<<M,v===1&&852<Q||v===2&&592<Q)return 1;d[S=A&k]=et<<24|M<<16|D-r|0}}return A!==0&&(d[D+A]=p-rt<<24|64<<16|0),s.bits=et,0}},{"../utils/common":41}],51:[function(g,L,y){L.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(g,L,y){var c=g("../utils/common"),l=0,n=1;function h(a){for(var x=a.length;0<=--x;)a[x]=0}var b=0,v=29,m=256,_=m+1+v,i=30,d=19,r=2*_+1,o=15,s=16,f=7,w=256,S=16,k=17,D=18,O=[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],W=[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],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],G=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],q=new Array(2*(_+2));h(q);var p=new Array(2*i);h(p);var R=new Array(512);h(R);var e=new Array(256);h(e);var F=new Array(v);h(F);var et,M,rt,H=new Array(i);function Q(a,x,P,Z,z){this.static_tree=a,this.extra_bits=x,this.extra_base=P,this.elems=Z,this.max_length=z,this.has_stree=a&&a.length}function A(a,x){this.dyn_tree=a,this.max_code=0,this.stat_desc=x}function E(a){return a<256?R[a]:R[256+(a>>>7)]}function C(a,x){a.pending_buf[a.pending++]=255&x,a.pending_buf[a.pending++]=x>>>8&255}function U(a,x,P){a.bi_valid>s-P?(a.bi_buf|=x<<a.bi_valid&65535,C(a,a.bi_buf),a.bi_buf=x>>s-a.bi_valid,a.bi_valid+=P-s):(a.bi_buf|=x<<a.bi_valid&65535,a.bi_valid+=P)}function B(a,x,P){U(a,P[2*x],P[2*x+1])}function J(a,x){for(var P=0;P|=1&a,a>>>=1,P<<=1,0<--x;);return P>>>1}function it(a,x,P){var Z,z,$=new Array(o+1),Y=0;for(Z=1;Z<=o;Z++)$[Z]=Y=Y+P[Z-1]<<1;for(z=0;z<=x;z++){var K=a[2*z+1];K!==0&&(a[2*z]=J($[K]++,K))}}function V(a){var x;for(x=0;x<_;x++)a.dyn_ltree[2*x]=0;for(x=0;x<i;x++)a.dyn_dtree[2*x]=0;for(x=0;x<d;x++)a.bl_tree[2*x]=0;a.dyn_ltree[2*w]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function tt(a){8<a.bi_valid?C(a,a.bi_buf):0<a.bi_valid&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function st(a,x,P,Z){var z=2*x,$=2*P;return a[z]<a[$]||a[z]===a[$]&&Z[x]<=Z[P]}function ot(a,x,P){for(var Z=a.heap[P],z=P<<1;z<=a.heap_len&&(z<a.heap_len&&st(x,a.heap[z+1],a.heap[z],a.depth)&&z++,!st(x,Z,a.heap[z],a.depth));)a.heap[P]=a.heap[z],P=z,z<<=1;a.heap[P]=Z}function ut(a,x,P){var Z,z,$,Y,K=0;if(a.last_lit!==0)for(;Z=a.pending_buf[a.d_buf+2*K]<<8|a.pending_buf[a.d_buf+2*K+1],z=a.pending_buf[a.l_buf+K],K++,Z===0?B(a,z,x):(B(a,($=e[z])+m+1,x),(Y=O[$])!==0&&U(a,z-=F[$],Y),B(a,$=E(--Z),P),(Y=W[$])!==0&&U(a,Z-=H[$],Y)),K<a.last_lit;);B(a,w,x)}function dt(a,x){var P,Z,z,$=x.dyn_tree,Y=x.stat_desc.static_tree,K=x.stat_desc.has_stree,X=x.stat_desc.elems,at=-1;for(a.heap_len=0,a.heap_max=r,P=0;P<X;P++)$[2*P]!==0?(a.heap[++a.heap_len]=at=P,a.depth[P]=0):$[2*P+1]=0;for(;a.heap_len<2;)$[2*(z=a.heap[++a.heap_len]=at<2?++at:0)]=1,a.depth[z]=0,a.opt_len--,K&&(a.static_len-=Y[2*z+1]);for(x.max_code=at,P=a.heap_len>>1;1<=P;P--)ot(a,$,P);for(z=X;P=a.heap[1],a.heap[1]=a.heap[a.heap_len--],ot(a,$,1),Z=a.heap[1],a.heap[--a.heap_max]=P,a.heap[--a.heap_max]=Z,$[2*z]=$[2*P]+$[2*Z],a.depth[z]=(a.depth[P]>=a.depth[Z]?a.depth[P]:a.depth[Z])+1,$[2*P+1]=$[2*Z+1]=z,a.heap[1]=z++,ot(a,$,1),2<=a.heap_len;);a.heap[--a.heap_max]=a.heap[1],function(nt,pt){var vt,gt,wt,ht,kt,jt,_t=pt.dyn_tree,Ot=pt.max_code,Yt=pt.stat_desc.static_tree,Vt=pt.stat_desc.has_stree,Xt=pt.stat_desc.extra_bits,Rt=pt.stat_desc.extra_base,yt=pt.stat_desc.max_length,St=0;for(ht=0;ht<=o;ht++)nt.bl_count[ht]=0;for(_t[2*nt.heap[nt.heap_max]+1]=0,vt=nt.heap_max+1;vt<r;vt++)yt<(ht=_t[2*_t[2*(gt=nt.heap[vt])+1]+1]+1)&&(ht=yt,St++),_t[2*gt+1]=ht,Ot<gt||(nt.bl_count[ht]++,kt=0,Rt<=gt&&(kt=Xt[gt-Rt]),jt=_t[2*gt],nt.opt_len+=jt*(ht+kt),Vt&&(nt.static_len+=jt*(Yt[2*gt+1]+kt)));if(St!==0){do{for(ht=yt-1;nt.bl_count[ht]===0;)ht--;nt.bl_count[ht]--,nt.bl_count[ht+1]+=2,nt.bl_count[yt]--,St-=2}while(0<St);for(ht=yt;ht!==0;ht--)for(gt=nt.bl_count[ht];gt!==0;)Ot<(wt=nt.heap[--vt])||(_t[2*wt+1]!==ht&&(nt.opt_len+=(ht-_t[2*wt+1])*_t[2*wt],_t[2*wt+1]=ht),gt--)}}(a,x),it($,at,a.bl_count)}function t(a,x,P){var Z,z,$=-1,Y=x[1],K=0,X=7,at=4;for(Y===0&&(X=138,at=3),x[2*(P+1)+1]=65535,Z=0;Z<=P;Z++)z=Y,Y=x[2*(Z+1)+1],++K<X&&z===Y||(K<at?a.bl_tree[2*z]+=K:z!==0?(z!==$&&a.bl_tree[2*z]++,a.bl_tree[2*S]++):K<=10?a.bl_tree[2*k]++:a.bl_tree[2*D]++,$=z,at=(K=0)===Y?(X=138,3):z===Y?(X=6,3):(X=7,4))}function T(a,x,P){var Z,z,$=-1,Y=x[1],K=0,X=7,at=4;for(Y===0&&(X=138,at=3),Z=0;Z<=P;Z++)if(z=Y,Y=x[2*(Z+1)+1],!(++K<X&&z===Y)){if(K<at)for(;B(a,z,a.bl_tree),--K!=0;);else z!==0?(z!==$&&(B(a,z,a.bl_tree),K--),B(a,S,a.bl_tree),U(a,K-3,2)):K<=10?(B(a,k,a.bl_tree),U(a,K-3,3)):(B(a,D,a.bl_tree),U(a,K-11,7));$=z,at=(K=0)===Y?(X=138,3):z===Y?(X=6,3):(X=7,4)}}h(H);var j=!1;function u(a,x,P,Z){U(a,(b<<1)+(Z?1:0),3),function(z,$,Y,K){tt(z),C(z,Y),C(z,~Y),c.arraySet(z.pending_buf,z.window,$,Y,z.pending),z.pending+=Y}(a,x,P)}y._tr_init=function(a){j||(function(){var x,P,Z,z,$,Y=new Array(o+1);for(z=Z=0;z<v-1;z++)for(F[z]=Z,x=0;x<1<<O[z];x++)e[Z++]=z;for(e[Z-1]=z,z=$=0;z<16;z++)for(H[z]=$,x=0;x<1<<W[z];x++)R[$++]=z;for($>>=7;z<i;z++)for(H[z]=$<<7,x=0;x<1<<W[z]-7;x++)R[256+$++]=z;for(P=0;P<=o;P++)Y[P]=0;for(x=0;x<=143;)q[2*x+1]=8,x++,Y[8]++;for(;x<=255;)q[2*x+1]=9,x++,Y[9]++;for(;x<=279;)q[2*x+1]=7,x++,Y[7]++;for(;x<=287;)q[2*x+1]=8,x++,Y[8]++;for(it(q,_+1,Y),x=0;x<i;x++)p[2*x+1]=5,p[2*x]=J(x,5);et=new Q(q,O,m+1,_,o),M=new Q(p,W,0,i,o),rt=new Q(new Array(0),I,0,d,f)}(),j=!0),a.l_desc=new A(a.dyn_ltree,et),a.d_desc=new A(a.dyn_dtree,M),a.bl_desc=new A(a.bl_tree,rt),a.bi_buf=0,a.bi_valid=0,V(a)},y._tr_stored_block=u,y._tr_flush_block=function(a,x,P,Z){var z,$,Y=0;0<a.level?(a.strm.data_type===2&&(a.strm.data_type=function(K){var X,at=4093624447;for(X=0;X<=31;X++,at>>>=1)if(1&at&&K.dyn_ltree[2*X]!==0)return l;if(K.dyn_ltree[18]!==0||K.dyn_ltree[20]!==0||K.dyn_ltree[26]!==0)return n;for(X=32;X<m;X++)if(K.dyn_ltree[2*X]!==0)return n;return l}(a)),dt(a,a.l_desc),dt(a,a.d_desc),Y=function(K){var X;for(t(K,K.dyn_ltree,K.l_desc.max_code),t(K,K.dyn_dtree,K.d_desc.max_code),dt(K,K.bl_desc),X=d-1;3<=X&&K.bl_tree[2*G[X]+1]===0;X--);return K.opt_len+=3*(X+1)+5+5+4,X}(a),z=a.opt_len+3+7>>>3,($=a.static_len+3+7>>>3)<=z&&(z=$)):z=$=P+5,P+4<=z&&x!==-1?u(a,x,P,Z):a.strategy===4||$===z?(U(a,2+(Z?1:0),3),ut(a,q,p)):(U(a,4+(Z?1:0),3),function(K,X,at,nt){var pt;for(U(K,X-257,5),U(K,at-1,5),U(K,nt-4,4),pt=0;pt<nt;pt++)U(K,K.bl_tree[2*G[pt]+1],3);T(K,K.dyn_ltree,X-1),T(K,K.dyn_dtree,at-1)}(a,a.l_desc.max_code+1,a.d_desc.max_code+1,Y+1),ut(a,a.dyn_ltree,a.dyn_dtree)),V(a),Z&&tt(a)},y._tr_tally=function(a,x,P){return a.pending_buf[a.d_buf+2*a.last_lit]=x>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&x,a.pending_buf[a.l_buf+a.last_lit]=255&P,a.last_lit++,x===0?a.dyn_ltree[2*P]++:(a.matches++,x--,a.dyn_ltree[2*(e[P]+m+1)]++,a.dyn_dtree[2*E(x)]++),a.last_lit===a.lit_bufsize-1},y._tr_align=function(a){U(a,2,3),B(a,w,q),function(x){x.bi_valid===16?(C(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):8<=x.bi_valid&&(x.pending_buf[x.pending++]=255&x.bi_buf,x.bi_buf>>=8,x.bi_valid-=8)}(a)}},{"../utils/common":41}],53:[function(g,L,y){L.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(g,L,y){(function(c){(function(l,n){if(!l.setImmediate){var h,b,v,m,_=1,i={},d=!1,r=l.document,o=Object.getPrototypeOf&&Object.getPrototypeOf(l);o=o&&o.setTimeout?o:l,h={}.toString.call(l.process)==="[object process]"?function(S){process.nextTick(function(){f(S)})}:function(){if(l.postMessage&&!l.importScripts){var S=!0,k=l.onmessage;return l.onmessage=function(){S=!1},l.postMessage("","*"),l.onmessage=k,S}}()?(m="setImmediate$"+Math.random()+"$",l.addEventListener?l.addEventListener("message",w,!1):l.attachEvent("onmessage",w),function(S){l.postMessage(m+S,"*")}):l.MessageChannel?((v=new MessageChannel).port1.onmessage=function(S){f(S.data)},function(S){v.port2.postMessage(S)}):r&&"onreadystatechange"in r.createElement("script")?(b=r.documentElement,function(S){var k=r.createElement("script");k.onreadystatechange=function(){f(S),k.onreadystatechange=null,b.removeChild(k),k=null},b.appendChild(k)}):function(S){setTimeout(f,0,S)},o.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var k=new Array(arguments.length-1),D=0;D<k.length;D++)k[D]=arguments[D+1];var O={callback:S,args:k};return i[_]=O,h(_),_++},o.clearImmediate=s}function s(S){delete i[S]}function f(S){if(d)setTimeout(f,0,S);else{var k=i[S];if(k){d=!0;try{(function(D){var O=D.callback,W=D.args;switch(W.length){case 0:O();break;case 1:O(W[0]);break;case 2:O(W[0],W[1]);break;case 3:O(W[0],W[1],W[2]);break;
12default:O.apply(n,W)}})(k)}finally{s(S),d=!1}}}}function w(S){S.source===l&&typeof S.data=="string"&&S.data.indexOf(m)===0&&f(+S.data.slice(m.length))}})(typeof self>"u"?c===void 0?this:c:self)}).call(this,typeof zt<"u"?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Kt);var pe=Kt.exports;const me=qt(pe),Pt=["image/jpeg","image/jpg","image/png","image/webp","image/gif","image/bmp","image/avif"],ge=25*1024*1024,_e=[512,1024,1920];function be(lt){return lt.replace(/\.[^/.]+$/,"").replace(/[^a-zA-Z0-9-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,80)||"image"}function Lt(lt){return lt<1024?`${lt} B`:lt<1024*1024?`${(lt/1024).toFixed(1)} KB`:`${(lt/(1024*1024)).toFixed(2)} MB`}function Zt(lt){return new Promise((ft,g)=>{const L=URL.createObjectURL(lt),y=new Image;y.onload=()=>{URL.revokeObjectURL(L),ft(y)},y.onerror=()=>{URL.revokeObjectURL(L),g(new Error("Failed to load image"))},y.src=L})}function Re(){const{user:lt,role:ft}=Qt(),g=ft==="super_admin"||ft==="editor",L=ct.useRef(null),[y,c]=ct.useState([]),[l,n]=ct.useState(!1),[h,b]=ct.useState(!1),[v,m]=ct.useState("convert"),[_,i]=ct.useState(90),[d,r]=ct.useState("width"),[o,s]=ct.useState(1024),[f,w]=ct.useState(1024),[S,k]=ct.useState(50),[D,O]=ct.useState("1024"),[W,I]=ct.useState(!0),[G,q]=ct.useState(!1),p=ct.useCallback(async C=>{const U=[];for(const B of Array.from(C)){if(!Pt.includes(B.type)){bt.error(`${B.name}: unsupported file type`);continue}if(B.size>ge){bt.error(`${B.name}: exceeds 25MB limit`);continue}try{const J=await Zt(B);U.push({id:`${Date.now()}-${Math.random().toString(36).slice(2,9)}`,file:B,status:"pending",originalUrl:URL.createObjectURL(B),originalSize:B.size,originalWidth:J.naturalWidth,originalHeight:J.naturalHeight})}catch{bt.error(`${B.name}: failed to read image`)}}c(B=>[...B,...U])},[]),R=Jt({mutationFn:async C=>{lt&&await te.from("image_conversion_logs").insert({admin_user_id:lt.id,...C})}});if(!g)return N.jsx(Bt,{children:N.jsxs("div",{className:"text-center py-16",children:[N.jsx(Ft,{className:"w-12 h-12 mx-auto mb-3 text-destructive"}),N.jsx("h1",{className:"font-display text-xl font-bold",children:"Unauthorized"}),N.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"You don't have permission to access this page."})]})});const e=C=>{c(U=>{const B=U.find(J=>J.id===C);return B&&(URL.revokeObjectURL(B.originalUrl),B.resultUrl&&URL.revokeObjectURL(B.resultUrl)),U.filter(J=>J.id!==C)})},F=()=>{y.forEach(C=>{URL.revokeObjectURL(C.originalUrl),C.resultUrl&&URL.revokeObjectURL(C.resultUrl)}),c([])},et=(C,U)=>{if(v==="convert")return{w:C,h:U};let B=C,J=U;const it=D==="custom"?null:parseInt(D,10);if(d==="width"){const V=it??o;B=V,J=Math.round(U/C*V)}else if(d==="height"){const V=it??f;J=V,B=Math.round(C/U*V)}else d==="exact"?(B=o,J=W?Math.round(U/C*o):f):d==="percent"&&(B=Math.round(C*(S/100)),J=Math.round(U*(S/100)));return G||(B>C||J>U)&&(B=C,J=U),{w:Math.max(1,B),h:Math.max(1,J)}},M=async C=>{try{const U=await Zt(C.file),{w:B,h:J}=et(U.naturalWidth,U.naturalHeight),it=document.createElement("canvas");it.width=B,it.height=J;const V=it.getContext("2d");if(!V)throw new Error("Canvas not supported");V.imageSmoothingEnabled=!0,V.imageSmoothingQuality="high",V.drawImage(U,0,0,B,J);const tt=v==="resize",st=C.file.type,ut=tt?["image/jpeg","image/png","image/webp"].includes(st)?st:"image/png":"image/webp",dt=ut==="image/jpeg"||ut==="image/webp",t=await new Promise(Z=>dt?it.toBlob(Z,ut,_/100):it.toBlob(Z,ut));if(!t)throw new Error("Conversion failed");const j={"image/jpeg":"jpg","image/png":"png","image/webp":"webp"}[ut]||"webp",u=be(C.file.name),x=v!=="convert"&&(B!==U.naturalWidth||J!==U.naturalHeight)?`${u}-${B}w.${j}`:`${u}.${j}`,P=URL.createObjectURL(t);return{...C,status:"complete",resultBlob:t,resultUrl:P,resultSize:t.size,resultWidth:B,resultHeight:J,resultName:x}}catch(U){return{...C,status:"failed",error:(U==null?void 0:U.message)||"Unknown error"}}},rt=async()=>{const C=y.filter(J=>J.status==="pending"||J.status==="failed");if(C.length===0){bt.info("Nothing to process");return}b(!0);let U=0,B=0;for(const J of C){c(V=>V.map(tt=>tt.id===J.id?{...tt,status:"processing"}:tt)),await new Promise(V=>setTimeout(V,0));const it=await M(J);it.status==="complete"?U++:B++,c(V=>V.map(tt=>tt.id===J.id?it:tt))}b(!1),bt.success(`Processed: ${U} succeeded, ${B} failed`),R.mutate({images_processed:C.length,success_count:U,failure_count:B,settings:{mode:v,quality:_,resizeMode:d,targetWidth:o,targetHeight:f,percentScale:S,preset
12:D,maintainRatio:W,allowUpscale:G}})},H=C=>{if(!C.resultBlob||!C.resultName)return;const U=document.createElement("a");U.href=C.resultUrl,U.download=C.resultName,U.click()},Q=async()=>{const C=y.filter(tt=>tt.status==="complete"&&tt.resultBlob);if(C.length===0){bt.error("No completed images");return}const U=new me,B=new Set;for(const tt of C){let st=tt.resultName,ot=1;for(;B.has(st);)st=tt.resultName.replace(/(\.[^.]+)$/,`-${ot}$1`),ot++;B.add(st),U.file(st,tt.resultBlob)}const J=await U.generateAsync({type:"blob"}),it=URL.createObjectURL(J),V=document.createElement("a");V.href=it,V.download=`converted-images-${Date.now()}.zip`,V.click(),setTimeout(()=>URL.revokeObjectURL(it),1e3)},A=C=>{var U;C.preventDefault(),n(!1),(U=C.dataTransfer.files)!=null&&U.length&&p(C.dataTransfer.files)},E=y.filter(C=>C.status==="complete").length;return N.jsxs(Bt,{children:[N.jsxs("div",{className:"mb-6",children:[N.jsx("h1",{className:"font-display text-2xl font-bold",children:"Image Converter & Resizer"}),N.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Upload images, convert them to WebP, and resize them for faster website performance."})]}),N.jsxs("div",{className:"bg-card border border-border rounded-lg p-5 mb-5 space-y-5",children:[N.jsxs("div",{children:[N.jsx(mt,{className:"text-xs uppercase tracking-wide text-muted-foreground mb-2 block",children:"Operation"}),N.jsxs($t,{value:v,onValueChange:C=>m(C),className:"flex flex-wrap gap-4",children:[N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx(At,{value:"convert",id:"m-convert"}),N.jsx(mt,{htmlFor:"m-convert",className:"cursor-pointer",children:"Convert only"})]}),N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx(At,{value:"resize",id:"m-resize"}),N.jsx(mt,{htmlFor:"m-resize",className:"cursor-pointer",children:"Resize only"})]}),N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx(At,{value:"both",id:"m-both"}),N.jsx(mt,{htmlFor:"m-both",className:"cursor-pointer",children:"Convert and resize"})]})]})]}),N.jsxs("div",{children:[N.jsxs("div",{className:"flex items-center justify-between mb-2",children:[N.jsx(mt,{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"WebP Quality"}),N.jsxs("span",{className:"text-sm font-medium",children:[_,"%"]})]}),N.jsx(Dt,{value:[_],onValueChange:C=>i(C[0]),min:10,max:100,step:1})]}),v!=="convert"&&N.jsxs("div",{className:"space-y-4 pt-2 border-t border-border",children:[N.jsxs("div",{children:[N.jsx(mt,{className:"text-xs uppercase tracking-wide text-muted-foreground mb-2 block",children:"Resize Mode"}),N.jsxs(ce,{value:d,onValueChange:C=>r(C),children:[N.jsx(ue,{className:"bg-secondary",children:N.jsx(de,{})}),N.jsxs(fe,{children:[N.jsx(Ct,{value:"width",children:"Width only (auto height)"}),N.jsx(Ct,{value:"height",children:"Height only (auto width)"}),N.jsx(Ct,{value:"exact",children:"Exact width and height"}),N.jsx(Ct,{value:"percent",children:"Percentage scale"})]})]})]}),(d==="width"||d==="height")&&N.jsxs("div",{children:[N.jsx(mt,{className:"text-xs uppercase tracking-wide text-muted-foreground mb-2 block",children:"Preset Size"}),N.jsxs("div",{className:"flex flex-wrap gap-2",children:[_e.map(C=>N.jsxs("button",{type:"button",onClick:()=>O(String(C)),className:`px-3 py-1.5 rounded-md text-sm border transition-colors ${D===String(C)?"bg-primary text-primary-foreground border-primary":"bg-secondary border-border hover:border-primary/50"}`,children:[C," px"]},C)),N.jsx("button",{type:"button",onClick:()=>O("custom"),className:`px-3 py-1.5 rounded-md text-sm border transition-colors ${D==="custom"?"bg-primary text-primary-foreground border-primary":"bg-secondary border-border hover:border-primary/50"}`,children:"Custom"})]}),D==="custom"&&N.jsx(It,{type:"number",min:1,className:"mt-2 bg-secondary w-40",value:d==="width"?o:f,onChange:C=>d==="width"?s(parseInt(C.target.value)||0):w(parseInt(C.target.value)||0)})]}),d==="exact"&&N.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[N.jsxs("div",{children:[N.jsx(mt,{className:"text-xs text-muted-foreground",children:"Width (px)"}),N.jsx(It,{type:"number",min:1,value:o,onChange:C=>s(parseInt(C.target.value)||0),className:"bg-secondary mt-1"})]}),N.jsxs("div",{children:[N.jsx(mt,{className:"text-xs text-muted-foreground",children:"Height (px)"}),N.jsx(It,{type:"number",min:1,value:f,onChange:C=>w(parseInt(C.target.value)||0),className:"bg-secondary mt-1",disabled:W})]})]}),d==="percent"&&N.jsxs("div",{children:[N.jsxs("div",{className:"flex items-center justify-between mb-2",children:[N.jsx(mt,{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Scale"}),N.jsxs("span",{className:"text-sm font-medium",children:[S,"%"]})]}),N.jsx(Dt,{value:[S],onValueChange:C=>k(C[0]),min:1,max:200,step:1})]}),N.jsxs("div",{className:"flex flex-wrap gap-6",children:[N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx(Tt,{id:"ratio",checked:W,onCheckedChange:I}),N.jsx(mt,{htmlFor:"ratio",className:"cursor-pointer",children:"Maintain aspect ratio"})]}),N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx(Tt,{id:"upscale",checked:G,onCheckedChange:q}),N.jsx(mt,{htmlFor:"upscale",className:"cursor-pointer",children:"Allow upscale"})]})]})]})]}),N.jsxs("div",{onDragOver:C=>{C.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:A,className:`border-2 border-dashed rounded-lg p-8 text-center transition-colors mb-5 ${l?"border-primary bg-primary/5":"border-border bg-card"}`,children:[N.jsx(ie,{className:"w-10 h-10 mx-auto mb-3 text-muted-foreground"}),N.jsx("p",{className:"font-medium",children:"Drag & drop images here"}),N.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-3",children:"JPG, PNG, WebP, GIF, BMP, AVIF · Max 25MB per file"}
12),N.jsx("input",{ref:L,type:"file",className:"hidden",multiple:!0,accept:Pt.join(","),onChange:C=>{C.target.files&&p(C.target.files),C.target.value=""}}),N.jsx(xt,{variant:"outline",onClick:()=>{var C;return(C=L.current)==null?void 0:C.click()},children:"Select Files"})]}),y.length>0&&N.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-4 bg-card border border-border rounded-lg p-3",children:[N.jsxs("div",{className:"text-sm text-muted-foreground",children:[y.length," file(s) · ",E," converted"]}),N.jsxs("div",{className:"flex gap-2",children:[N.jsx(xt,{variant:"outline",size:"sm",onClick:F,disabled:h,children:"Clear All"}),E>1&&N.jsxs(xt,{variant:"outline",size:"sm",onClick:Q,children:[N.jsx(se,{className:"w-4 h-4 mr-1"})," Download All as ZIP"]}),N.jsx(xt,{size:"sm",onClick:rt,disabled:h,children:h?N.jsxs(N.Fragment,{children:[N.jsx(Ut,{className:"w-4 h-4 mr-1 animate-spin"})," Processing"]}):"Process Images"})]})]}),y.length===0?N.jsxs("div",{className:"text-center py-12 text-muted-foreground bg-card border border-border rounded-lg border-dashed",children:[N.jsx(ae,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),N.jsx("p",{children:"No files uploaded yet"})]}):N.jsx("div",{className:"space-y-3",children:y.map(C=>{const U=C.resultSize?Math.round((1-C.resultSize/C.originalSize)*100):0;return N.jsxs("div",{className:"bg-card border border-border rounded-lg p-3 flex gap-3",children:[N.jsxs("div",{className:"flex gap-2 shrink-0",children:[N.jsx("div",{className:"w-20 h-20 rounded-md overflow-hidden bg-secondary",children:N.jsx("img",{src:C.originalUrl,alt:C.file.name,className:"w-full h-full object-cover"})}),C.resultUrl&&N.jsx("div",{className:"w-20 h-20 rounded-md overflow-hidden bg-secondary border-2 border-primary/30",children:N.jsx("img",{src:C.resultUrl,alt:"converted",className:"w-full h-full object-cover"})})]}),N.jsxs("div",{className:"flex-1 min-w-0",children:[N.jsxs("div",{className:"flex items-start justify-between gap-2",children:[N.jsxs("div",{className:"min-w-0",children:[N.jsx("p",{className:"font-medium text-sm truncate",children:C.file.name}),N.jsxs("p",{className:"text-xs text-muted-foreground",children:[C.originalWidth,"×",C.originalHeight," · ",Lt(C.originalSize),C.resultSize&&N.jsxs(N.Fragment,{children:[" → ",N.jsxs("span",{className:"text-foreground font-medium",children:[C.resultWidth,"×",C.resultHeight," · ",Lt(C.resultSize)]})," ",N.jsxs("span",{className:U>0?"text-primary":"text-muted-foreground",children:["(",U>0?"-":"+",Math.abs(U),"%)"]})]})]})]}),N.jsx("button",{onClick:()=>e(C.id),disabled:h,className:"text-muted-foreground hover:text-destructive shrink-0",children:N.jsx(oe,{className:"w-4 h-4"})})]}),N.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[N.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[C.status==="pending"&&N.jsx("span",{className:"text-muted-foreground",children:"Pending"}),C.status==="processing"&&N.jsxs(N.Fragment,{children:[N.jsx(Ut,{className:"w-3 h-3 animate-spin"})," Processing"]}),C.status==="complete"&&N.jsxs(N.Fragment,{children:[N.jsx(le,{className:"w-3 h-3 text-primary"})," ",N.jsx("span",{className:"text-primary",children:"Complete"})]}),C.status==="failed"&&N.jsxs(N.Fragment,{children:[N.jsx(Ft,{className:"w-3 h-3 text-destructive"})," ",N.jsxs("span",{className:"text-destructive",children:["Failed: ",C.error]})]})]}),C.status==="complete"&&N.jsxs(xt,{size:"sm",variant:"outline",className:"h-7 ml-auto",onClick:()=>H(C),children:[N.jsx(he,{className:"w-3 h-3 mr-1"})," Download"]})]}),C.status==="processing"&&N.jsx(Gt,{value:50,className:"h-1 mt-2"})]})]},C.id)})})]})}export{Re as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.